Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Geysir would be far more useful in a real world scenario if it worked with draft revisions, preventing the actual deletion of paragraphs and replacing with a removal from the latest revision. It would also need to amend the ajax introduction of content to work with the specific entity revision.
Comment | File | Size | Author |
---|---|---|---|
#12 | interdiff-2895354-8-12.txt | 511 bytes | golddragon007 |
#12 | geysir-revision_support-2895354-12-D8.patch | 21.83 KB | golddragon007 |
#8 | geysir_with_revisions-2895354-8.patch | 21.69 KB | jover |
Comments
Comment #2
andy_w CreditAttribution: andy_w at Numiko commentedThis patch adds the ability for the geysir module to function with revisions, but has the following debatable choices made:
* The use of temporary data on the form state for it to retain the new revision for the purpose of reloading the data by ajax.
* The continued use of the contentEntityDeleteForm as the entity is no longer actually deleted.
Comment #3
andy_w CreditAttribution: andy_w at Numiko commentedComment #4
joverComment #5
vollepeer CreditAttribution: vollepeer at AmeXio commentedIndeed, this is a very important aspect of the full solution. Since Geysir allows authors to manipulate pages in such a quick way, we definitely need a way to "group" these changes and publish them all at once. A few things are needed here:
In attachment there is a example screenshot of how part of that interface could look like.
Comment #6
DamienMcKennaGiven this breaks revision handling, which is one of the key reasons to use Paragraphs over other referenced-entity solutions, this is a major bug, not a feature request.
Comment #7
szato CreditAttribution: szato at Brainsum for Tieto commentedThe uploaded patch works only with the 8.x-1.0-alpha2 release.
I updated patch to works with the actual 8.x-1.0-dev branch.
Comment #8
joverUpdated the patch to work with updated 8.x-1.x-dev branch.
Also updated the add routes & modal functions with the parent_entity_revision parameter.
@szato @andywhale Can you test & review this please?
Comment #9
Dan_RogersPatch in #8 gives me an error when applied against latest 1.x-dev:
This error is seen in the log when viewing a node that has Paragraphs enabled. Patch was applied to existing install of Geysir module(1.x-dev), if it is helpful.
EDIT: Uninstalling/reinstalling patched module cleared errors, and is now working correctly.
Comment #10
szato CreditAttribution: szato at Brainsum for Tieto commentedHi jover,
I tested the #8 patch with core 8.4.4 + paragraphs dev-1.x + workbench_moderation 8.x-1.2. It's working.
Comment #11
vollepeer CreditAttribution: vollepeer at AmeXio commentedI tested the patch #8 on Drupal 8.4.4 using Geysir 8.x-1.x-dev and the core content_moderation + workflows modules.
When working on draft versions of a page, I experience several situations in which the changed made through Geysir are not reflected in the page when the modal closes. Moreover, I've seen cases in which I edited a paragraph, data from another revision is loaded in the modal.
I have to do further tested to dig out and clarify these issues.
Comment #12
golddragon007 CreditAttribution: golddragon007 at Brainsum commentedPatch #8 has an issue with workbench_moderation module. If you edit a content which has enabled revision control and you actually edit a Draft unpublished content, added new paragraphs won't appear after ajax response (adding to a published worked). I attach a patch which fix this issue.
Comment #13
vollepeer CreditAttribution: vollepeer at AmeXio commentedThe last patch in #12 works good. The problems mentioned in #11 are now solved.
One side issue to be tackled: once a draft is created for a node, we should prevent further edits on the published revision. If not, conflicts will arise between the latest revision (draft) and the published revision. I would say edits directly on the published revision should remain possible (to correct typos e.g., but once a draft is present, this should be prevented. I created a new issue for this: https://www.drupal.org/project/geysir/issues/2939188
Comment #14
vollepeer CreditAttribution: vollepeer at AmeXio commentedComment #15
joverPatch committed.