By nux on
I'm looking for a button I had in Drupal 7 (now on Drupal 10). I want something like on Wikipedia – check my changes to an page before I save it.
Is this something available in the core now? It is quite natural for me to review changes before publishing to check for typos etc.
Comments
Maybe it was somehow done
Maybe it was somehow done with the Diff module? https://www.drupal.org/project/diff
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
I do have the diff project
I do have the diff project installed on D10 and diff after saving an article is working as it did. But I was not able to find no option to have a diff widget on the edit form.
Hi nux,
Hi nux,
The Diff Module is the right building block, but by design it only compares two revisions that already exist in the database. It has no hook into the unsaved values sitting in the edit form. That's why enabling it gets you a diff after you save, but nothing on the form itself.
To get closer to the Wikipedia-style "show changes before saving" experience, you can try the following:
Content Moderation + Diff (no custom code): If you enable Content Moderation on the content type, every save creates a new revision in whatever state you define (e.g. Draft). You can then use Diff's revision comparison to check the draft against the last published revision before you actually publish it.
@sajibsaha334 - are you using
@sajibsaha334 - are you using AI to write those posts? Please see the AI Policy.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Thanks for asking @jaypan, I
Thanks for asking @jaypan, I was thinking the same. Because the answers seem slightly off ...
For example, in this post the question was: "... check my changes to an page before I save it." [emphasis added], but the answer includes saving.