Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questioning entries dates #4906

Closed
JeanLucEsser opened this issue Sep 9, 2019 · 1 comment
Closed

Questioning entries dates #4906

JeanLucEsser opened this issue Sep 9, 2019 · 1 comment

Comments

@JeanLucEsser
Copy link

Hi there,

I was trying to make sense of how dateCreated and postDate are handled:

1/ About dateCreated

Shouldn't we reset dateCreated when "Saving as new" in an entry?

2/ About postDate

If an entry is set as inactive by default, when saving our first draft, postDate doesn't get populated. It does get set when the entry is made active for the first time. Which does make sense in a way.

But then when it gets inactive and active again, postDate doesn't update. Which also does make sense in a way.

But when considering both behaviors, I feel an inconsistency. Maybe we could make postDate update every time an entry is made active. Or postDate should be set only on saving our first draft, no matter if the entry is active yet.

@brandonkelly
Copy link
Member

Shouldn't we reset dateCreated when "Saving as new" in an entry?

Good point, that has been changed for the next release.

Regarding Post Date, Craft will automatically set that to the current time when an entry is saved as enabled, and a specific Post Date isn’t chosen in the form already. Which explains both of the behaviors you’re seeing.

Craft isn’t specifically setting it the first time you enable it, and choosing not to set it the second time you enable it – you are choosing to have it retain its existing Post Date, by submitting the form with a value in the Post Date field. If you want the Post Date to be reset, you must clear out the field first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants