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

Multisite: Propagate date change to descendants #6634

Conversation

arthurperton
Copy link
Contributor

@arthurperton arthurperton commented Sep 4, 2022

This fixes #3440.

I made these choices:

  • The date set on an 'origin' entry will automatically also be set on any of its descendant entries*
  • If any of the descendants have revisions enabled, a working copy will be made when needed
  • The published state for the origin entry won't be propagated to its descendants

* Note that this won't take into account if the (custom) date field has been desynced. The date will be copied regardless.

@arthurperton
Copy link
Contributor Author

Where should the tests for these changes go?

@arthurperton arthurperton marked this pull request as ready for review September 5, 2022 07:52
Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the propagating should be happening in Entry@save, just like the other propagating stuff.

That way, it can happen if you were to save programmatically instead of only in the control panel.

The tests can go into EntryTest. There are other propagation tests in there.

@arthurperton arthurperton marked this pull request as draft September 6, 2022 11:17
@arthurperton arthurperton marked this pull request as ready for review September 6, 2022 19:48
@jasonvarga
Copy link
Member

This works, thanks for making the changes.

However after thinking about it some more, I don't think it should work this way.

Nowhere else do we forcibly update the descendants.

I think the real fix should be something more inline with how origin fallback values work for all other fields.
i.e. If you set a date on the localized entry, it should be saved into the filename like it does now. But if you want to inherit the date, then the filename should just not have the date.

@jasonvarga jasonvarga closed this Sep 9, 2022
@arthurperton
Copy link
Contributor Author

Makes total sense.

@arthurperton arthurperton deleted the issue/issue-3440-multisite-change-entry-date branch December 19, 2024 07:52
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

Successfully merging this pull request may close these issues.

Date doesn't update for Multisite Entries.
2 participants