When you "View Changes" when creating a new revision it throws this error:
Notice: Undefined index: #builder_function in diff_node_form_build_preview_changes() (line 204 of /ld/www/htdocs/sys/sops/sites/all/modules/diff/diff.module).
and the preview shows the old version of the node.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | builderfunction-997464-7.patch | 1.13 KB | bc |
| #6 | diff-7.x-2.x-997464-6.patch | 878 bytes | hswong3i |
| #3 | diff-module-2011-02-05-motravo.patch | 673 bytes | motravo |
| #1 | diff-module-2011-01-17-hansfn.patch | 419 bytes | hansfn |
Comments
Comment #1
hansfn commentedA change in the API - patch attached.
Comment #2
bryancasler commentedJust applied this patch, seems to work so far.
Comment #3
motravo commentedhansfn, your patch did fix the "undefined index" error for me, but it introduced another problem: the first time I click "View Changes", it reports "No visible changes" and doesn't show any diffs. Clicking "View Changes" a second time successfully shows the diff. It apparently doesn't see the changes the first time because node_form_submit_build_node() has the side effect of modifying the node that will be returned by node_load(). I was able to fix it by calling node_load() first and making a copy of the result before calling node_form_submit_build_node(). My change is attached. I'm a PHP/Drupal noob, so somebody else should review this.
Comment #4
bryancasler commentedHad the same problems as the OP, patch from #3 works for me.
Comment #5
hswong3i commented+1, also confirm #3 works for me ;-)
Comment #6
hswong3i commentedI found that this critical problem still existing and not yet committed. Any thing that we can give a hand for speeding up the processing?
Patch reroll via 7.x-2.x GIT. Tested with Drupal 7.0 and PHP 5.3.3. No more error message or WSOD occur.
Comment #7
bc commentedre-rolled, let's get d.o to test it!
Comment #8
matason commentedI applied the patch with "patch -p1 < builderfunction-997464-7.patch" and it fixes the problem, thanks.
Comment #9
drunken monkeyPlease see #1182154-3: Offering to maintain Diff if you'd be willing to take over this project.
Hopefully, this way all these issues with working patches will finally be fixed.
Comment #10
Higarigh commented@ #1 This worked for me too
Comment #11
realityloop commented