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

Publishing a content changes value in modifiedTime #6200

Closed
alansemenov opened this issue Apr 25, 2018 · 6 comments
Closed

Publishing a content changes value in modifiedTime #6200

alansemenov opened this issue Apr 25, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@alansemenov
Copy link
Member

When a content item is published we create a new version and set publish.first. This also causes modifiedTime to be updated with current date/time. We need to avoid modifiedTime being updated. It's common to have content sorted by modifiedTime and publishing should not affect this order.

@GlennRicaud
Copy link
Contributor

We are modifying the content, so the modifiedTime should be updated.
The problem here is the original solution: Setting a value on a content on a publish. It is not only wrong but makes the initial publish 4 times slower.

@GlennRicaud
Copy link
Contributor

GlennRicaud commented May 7, 2018

I will close this issue.

IMHO, we should fix the way we do the publish and scheduled publish in 7.0.
Use the createdTime of the master version (instead of publish.first) and have scheduled task for the future for scheduled publish (instead of publish.from and publish.to)
I added it to the 7.0 backlog

@sigdestad
Copy link
Member

One second.. Yes, we are modifying the node - but we are not modifying the "content/data" which is what this attribute is about. The timestamp value for nodes will change, that is fine - but we definetly do not want to register this as a modification of the content. I guess we should simply not use the content API to add the publish.first value.

NB! publish.first is a completely different value from created. You can create an item today, and then publish it tomorrow.

@sigdestad
Copy link
Member

So, logically the modifiedTime value is wrong, and must not be set as part of the publish process.

@sigdestad
Copy link
Member

It actually breaks a lot of things when this value is changed as part of the publishing process.

@GlennRicaud
Copy link
Contributor

GlennRicaud commented May 8, 2018

Yes. I thought about it after and I definitely talked too fast here.
You are right about timestamp/modifiedTime and I also take back the solution proposed for 7.0 which is also wrong.

modifiedTime is not only about the content/data though. It is also modified on modifications on all the other properties: language, owner,… (which makes sense).
But I agree about making an exception for publish.first/publish.from in this specific case.

@GlennRicaud GlennRicaud added the Bug label May 8, 2018
runarmyklebust pushed a commit that referenced this issue May 15, 2018
Publishing a content changes value in modifiedTime (#6200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants