Closed (outdated)
Project:
Diff
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Jul 2012 at 13:15 UTC
Updated:
16 Dec 2024 at 19:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alan d. commentedAppears to be two issues here:
The AJAX request replaces the area with the #node-XX. Anything else in this area would get replaced. So things disappearing is probably by design
But, a real page submit could work ok, if the non-AJAX version worked. This is the first time I've tried (just started helping out), and I have discovered that this is broken, or I should say that the possibly complex logic in capturing the page output from the page that the block is on, then replacing the content with the inline diff has not be done. [i.e. what is does do is probably the best thing without investing too much time into it]
So sorry, no quick fixes :(
If you can, see if you can shift the HTML ID "node-NID" to contain just the main node content. If you can, then this should allow the AJAX to work independently of the rest of the page.
Comment #2
cbrasfield commentedThanks for your quick response Alan.
The display suite layout was in the main content portion of the markup. However, it appears that node_load doesn't account for alterations modules make to the structure of the content. node_view, however does.
I modified diff.pages.inc function diff_inline_show, changing functions node_load and node_build to node_view.
I haven't looked into the non-ajax version, but is there a reason the value of $node is different ($form['node']['#value'] vs $form_state['values']['node'])?
Thanks,
Christina
Comment #3
cbrasfield commentedChanged category from support request to bug. Inline Diff doesn't appear to render the node in it's fully structured state when changing between different revisions.
Comment #4
crystal_alexandre_froger commented+1 - It does not apply to Display Suite only: what about template files that explicitly output fields, for instance?
May not be a Drupal good practice, but still - diff not taking into account the template file the node is using does not seem being a good solution either.
Comment #5
kscheirerso it seems like we need to make #2 into a patch and then get some reviews on it.
@cbrasfield - can you provide more detailed instructions on how to reproduce this bug using Display Suite?
Comment #6
kscheirer#2 converted to patch, not tested.
Comment #7
kscheirerRemoved the default arguments from the node_view() calls, those are not needed. Other this patch is the same as #2 and #6.
Comment #8
cyberschorschI can confirm that this patch is working.
Comment #9
alan d. commentedThis should use the clone to prevent a nasty potential recursive loop.
Comment #10
alan d. commentedMarked #1320162: Inline diff not working when node is based on a Panel page as a duplicate as it suggests the same symptoms.
Comment #11
rdeboerI recently wrote an extension to the greate Diff module, which I called Diff Different: https://drupal.org/project/diff_different.
During that work I initially ran into problems with Display Suite too, but solved them.
Could be worth having a look at the code of Diff Different?
Comment #12
heddnGiven the proximity of EOL for Drupal 7, marking this as won't fix. The likely final Drupal 7 release of diff has landed in https://www.drupal.org/project/diff/releases/7.x-3.5. If this is something still applicable to a more modern version of the module, feel free to re-open and post additional notes.