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.
Using the default site_template and turning on node revisions, if I click the "View changes" button while editing a node, the change table is shown twice.
The diff module shows the changes by setting $form_state['node_preview'] which then gets placed into the $form['#prefix'] key for the entire page. This #prefix gets added to the entire panels_everywhere page, but also gets added when the actual page content is rendered within the page-content pane.
I've found a workaround that I'll post as a patch next
Comment | File | Size | Author |
---|---|---|---|
#4 | panels_everywhere-n2656312-4.patch | 940 bytes | DamienMcKenna |
#3 | panels_everywhere-node-changes-shown-twice-2656312-3.patch | 727 bytes | mpotter |
#2 | panels_everywhere-node-changes-shown-twice-2656312-2.patch | 667 bytes | mpotter |
Comments
Comment #2
mpotter CreditAttribution: mpotter commentedHere is a patch that seems to fix it. Not sure if this has any other side-effects, but have tried other pages that use the $form['#prefix'] and they seem to still work.
Comment #3
mpotter CreditAttribution: mpotter commentedHere is an update. On older PHP versions there was a problem if the $info['content'] was a string instead of array.
Comment #4
DamienMcKennaA minor adjustment. I'd prefer to add some additional checks to limit the display to node previews rather than just always remove the #prefix and #suffix.