For now, here are some notes for the port:

- since http://drupal.org/node/133028 has landed, we can now add our Preview Changes button to node form with form_alter() and don't need to hijack the themeing of that form.
- we can add a submit handler to that button which will obviate the crazy #after_build stuff.

CommentFileSizeAuthor
#4 diff_6_port.patch12.58 KBrötzi

Comments

dww’s picture

Status: Active » Postponed

I'm happy to see us gather notes on what needs to happen. However, to avoid much trouble and badness, I'd strongly encourage that no one actually tries to roll a patch until http://drupal.org/node/125494 is done and committed. Otherwise, we're just going to make a ton more work for ourselves.

wayland76’s picture

Status: Postponed » Active

I note that patch is now marked as fixed. I'll take the liberty of marking this "active"

Freso’s picture

Subscribing.

rötzi’s picture

Assigned: Unassigned » rötzi
Status: Active » Needs review
StatusFileSize
new12.58 KB

I did a first port to Drupal 6. I didn't do extensive testing yet but the normal use was OK.

The changes are mostly the use of the new menu and forms system.
Also I moved the theme functions from the DiffEngine file to the module file.
And I removed the "requirements" check as this was only done to hijack the node menu item which is now done through menu_alter.

The patch applies to the DRUPAL-6--1 branch (which is a copy of the DRUPAL-5--2-0-RC2 branch)

moshe weitzman’s picture

Very nicely done rötzi. the code looks like splendid cleanup. if someone can verify that this works, i'll commit it. i'll try to get to it if noone else does.

Freso’s picture

The "po" dir needs to be renamed/moved to "translations".

I actually wanted to do a review of this today, but never got around to it. C'est la vie. I'll probably try to get around to it tomorrow or during the weekend, if not moshe or someone else beats me to it.

rötzi’s picture

I did set up my test-page again with Drupal 6. The diff module works there as expected, you can see for yourself: http://test.tschannen.net/node/8/revisions

I think we can just commit the patch if no one objects.

Freso’s picture

Status: Needs review » Needs work

I'm getting two notices, notice: Undefined offset: 4 in /srv/http/localhost/htdocs/drupal6/includes/menu.inc on line 568. and notice: Undefined offset: 5 in /srv/http/localhost/htdocs/drupal6/includes/menu.inc on line 568., when viewing a node (both with and without revisions) with Diff enabled. Disabling Diff makes these disappear.
Those two notices also appear on the revisions tab, along with notice: Undefined variable: output in /srv/http/localhost/htdocs/drupal6/sites/all/modules/diff/diff.module on line 191..
Finally, when actually viewing a diff, I'm getting a bunch (32!) of notice: Use of undefined constant USE_ASSERTS - assumed 'USE_ASSERTS' in /srv/http/localhost/htdocs/drupal6/sites/all/modules/diff/DiffEngine.php on line 448., as well as some where the line number is 197 (3 instances), 198 (3), and 428 (8).

Edit: This is on a fresh install of Drupal 6(-1-dev, fresh from CVS), with only CVS Deploy enabled, apart from the default D6 modules. PHP 5.2.5 (w/ Suhosin), Apache 2.2.8, and PostgreSQL 8.0.15.

rötzi’s picture

Status: Needs work » Fixed

I fixed the notices now and commited the patch. Also I did a development release which will be up soon.

In addition, I removed the diff.install file. The file is not needed anymore as the menu hijacking is now done in menu_alter and does not depend on the node weights anymore.

Anonymous’s picture

The release seems to work here. There is only one thing left: #226040: Rename "po" to "translations"
Would be nice to release this as a first stable version, because it is a very useful module for website administrators.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.