Skip to content

Add Ability to Schedule a Revision#12

Open
sjstark wants to merge 3 commits into
Goldinteractive:masterfrom
sjstark:bkwld-tweaks
Open

Add Ability to Schedule a Revision#12
sjstark wants to merge 3 commits into
Goldinteractive:masterfrom
sjstark:bkwld-tweaks

Conversation

@sjstark
Copy link
Copy Markdown

@sjstark sjstark commented Feb 16, 2023

We had a need to schedule a draft, but then also schedule returning to the initial state. Unfortunately, something to do with the way Neo blocks function, we weren't able to create two drafts from the same point and schedule both (Draft 1 would write, and then the Draft 2 diffs would see the committed Draft 1 diffs as more up to date and would not implement Draft 2 changes)

We updated the publisher package to allow for scheduling a revision (including the current revision). Revisions are seen as an absolute truth and don't use a diff function to apply changes (like the issues we saw with scheduling drafts)

@lukasNo1
Copy link
Copy Markdown
Contributor

Hey sjstark, it basically looks good, but i have some feedback

src/controllers/EntriesController.php:81 -> draft can be null at this point

src/templates/_cp/entriesEditRightPane.twig:54 -> the "creator" variable doesn't exist, which throws an exception

The "publishRevisionId" db field should be in a new migration and not in the Install.php, as the install migration only gets called on first plugin install

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.

2 participants