First of all, thanks for this awesome set of modules.

Having tried them for the first time a little bit ago, the one thing I really thought the WB Moderation could use was the ability to visually see the changes between two revisions. I think if this module can somehow utilize the Diff(http://drupal.org/project/diff) module it would make it even greater.

Here is a sample of the visual comparison diff provides: http://test.tschannen.net/node/8/revisions/view/18/19

I'd also be happy to help with this. I can work on it and submit a patch or whatever, though I thought it'd be best to make a post to make sure no one else has started on this already. Thanks again!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moreorless’s picture

I second the motion. A diff-like comparison of revisions would be a big bonus for Workbench. The current method of shuffling between the revisions is not real user friendly.

Thanks also for the work you have put into these modules. They look to have great potential. Workflow is a critical factor for many sites but the implementation is still rather immature in Drupal 7. Hopefully Workbench will address this.

michaellander’s picture

I've got diff working. I'm working on using jquery to add checkboxes and the ability to 'compare'. Though it may be more ideal to not use jquery for that part, I just don't really know the best way to do it. I'll post a patch in the coming days.

binford2k’s picture

subscribe.

binford2k’s picture

Hey Mike, how's that patch coming?

michaellander’s picture

binford, I'm hopefully *fingers crossed* going to have time to finish it tonight. It's honestly a rather simple patch. I've really just need to finish the jquery submit stuff. It may end up being a proof of concept for now. Some decisions will need to be made from the maintainers if we want to go with my approach, or if they want to move the diff script into their own module rather than relying on the Diff module for the additional feature.

binford2k’s picture

The diff menu handlers work fine, so it's really just a matter of exposing that functionality in the UI. I wouldn't use jquery to do it. Add it to the forms using FAPI. You can see how it's done right in the diff module.

Right now I'm using the inline diff block and it works really well, but I'd like the ability to choose arbitrary left/right revisions too.

michaellander’s picture

Yeah, but it's exposing it to the UI that I'm unsure how to do.

BenK’s picture

Subscribing

muriqui’s picture

subscribe

stevector’s picture

If we do integrate directly with the Diff module we will have to account for colliding uses of hook_menu_alter() that cause node/%nid/revisions to break on unmoderated content types.

#1089834: Call to undefined function node_revision_overview()

BenK’s picture

Any more progress on this?

--Ben

Taxoman’s picture

Subscribing

bforchhammer’s picture

Diff would be useful. Subscribing.

varunarora’s picture

Dear Steve, as you are aware Diff is currently clashing with Workbench moderation. If you could come up with an alternative to using node/%node/revisions in the hook_alter_menu() to avoid this clash, I would sincerely appreciate it!

Varun

Taxoman’s picture

Version: 7.x-1.0-beta5 » 7.x-1.x-dev
Component: Miscellaneous » Code
Priority: Normal » Major
Jeremy’s picture

Subscribe.

nrambeck’s picture

subscribe

eriknewby’s picture

man this would be great!

robeano’s picture

Priority: Major » Critical

I am marking this critical but not a blocker for a 1.0 release.

chiebert’s picture

sub

stevector’s picture

FileSize
60.53 KB
157.92 KB

I'm working on this now and I'm running into a bit of a UI blocker. I thought I'd be repurposing the Diff column from the Diff UI as a column in the Workbench Moderation UI. This approach would yield a form within a form which is invalid HTML. See these screenshots.

http://drupal.org/files/wbm_ui_skitched.jpg
http://drupal.org/files/diff_ui_skitched.jpg

I'm not committed to reusing the Diff UI as is since the double radio buttons can be confusing so I'm open to suggestion. A new UX designer at Palantir, Patrick Grady, suggested making the rows themselves clickable (possibly with a hidden checkbox). This reminded me of Views Bulk Operations which does something similar. I'd be willing to convert this page to a View but that doesn't solve the form within a form problem.

Perhaps the the mini moderation form needs to be moved of of the table if Diff is on. Or maybe it's just always outside of the table.

Dave Reid’s picture

Priority: Critical » Major

Make a sub-tab off of the moderate local task called 'Diff' and put the diff code there until we can figure out a better way to do or clean this up.

node/%node/moderate
node/%node/moderate/moderate
node/%node/moderate/diff

I have code that does this already for scheduling if you need it.

Can we reserve critical for things that absolutely break workbench suite and use major instead for things we really want to get done?

stevector’s picture

Assigned: Unassigned » stevector

On it.

stevector’s picture

Assigned: stevector » Unassigned
Status: Active » Needs work
FileSize
2.97 KB

So this gets the job done in the way #22 describes. I'm not crazy about using module_exists(). I don't see a way around it beside making this functionality a sub/spinoff module that depends on diff.

Refineo’s picture

subscribe

j.slemmer’s picture

sub.

mariancalinro’s picture

I tested #24, and it was working for me, i could get to the diff page.

stevector’s picture

Status: Needs work » Needs review
knaffles’s picture

subscribe

stijndm’s picture

Tested #24. Works like a charm, although it would be nice if the Diff page was also part of hook_admin_path.

derjochenmeyer’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
16.78 KB

Patch #24 works.

Here is a quick idea how the diff tab functionality could be integrated with the moderate tab.

colan’s picture

+1 for the idea in #31!

RyanPrice’s picture

subscribing. Is this planned for incorporation into a future release now?

Désiré’s picture

Patch #24 works here. -> RTBC +1

Taxoman’s picture

Each revision can have its own "revision note" (the field that is only visible in edit view and not on node display) - it would be very practical if those notes were displayed either after selecting in that drop-down box _before_ clicking on compare, or even in the very drop-down menu itself? (Maybe this should be a subsequent new/separate feature request and not hold up this issue from being committed, though.)

rogical’s picture

+1 very much need.

Z2222’s picture

Has this feature been added in the dev version? In Drupal 7.9 with Workbench Moderation 7.x-1.1, I'm getting this error when enabling the Diff Module:

Fatal error: Call to undefined function node_revision_overview() in . . . sites/all/modules/workbench_moderation/workbench_moderation.module on line 169

I'm trying to find some way to have a diff feature without the error.

Thanks

nrambeck’s picture

Cohen, I'm not sure what's causing that error, but try this. Disable the Workbench Moderation module, then enable the Diff module. If that succeeds, try re-enabling the Workbench Moderation module. Hope that works.

mfer’s picture

The patch for this is from August. Any word on the hold up on getting this in?

mfer’s picture

Category: feature » bug

I'm also setting this to a bug. When workbench moderation is enabled the UI for doing diffs is removed via workbench_moderation_menu_alter(). This is a bug.

RyanPrice’s picture

I'll echo @mfer's comments - any word on when this is being rolled into a release?

stevector’s picture

Status: Reviewed & tested by the community » Fixed

I've committed #24 and opened another issue in 2.x for a more thorough UI integration. #1404642: Better diff integration

fasdalf@fasdalf.ru’s picture

Status: Needs work » Fixed

Updated to 7.x-1.x-dev (January 14). Got an error on unused (not draft, not current public) revision view at /node%/revisions/%/view:

    Notice: Undefined offset: 0 в функции DrupalDiffInline->process_chunk() (строка 1279 в файле /.../sites/all/modules/diff/DiffEngine.php).
    Notice: Undefined offset: 2 в функции DrupalDiffInline->process_chunk() (строка 1283 в файле /.../sites/all/modules/diff/DiffEngine.php).
    Notice: Undefined index: #view_mode в функции eva_entity_view_alter() (строка 44 в файле /.../sites/all/modules/eva/eva.module).
    Notice: Undefined index: #language в функции eva_entity_view_alter() (строка 45 в файле /.../sites/all/modules/eva/eva.module).
    Notice: Undefined index: #entity_type в функции _eva_extract_entity_from_build() (строка 152 в файле /.../sites/all/modules/eva/eva.module).
    Notice: Undefined index: #entity_type в функции _eva_extract_entity_from_build() (строка 157 в файле /.../sites/all/modules/eva/eva.module).
    Notice: Undefined index: #entity_type в функции _eva_extract_entity_from_build() (строка 160 в файле /.../sites/all/modules/eva/eva.module).
    EntityMalformedException: Отсутствует связующее свойство у сущности типа node. в функции entity_extract_ids() (строка 7409 в файле /.../includes/common.inc).

PHP and Drupal are in Russian language.

fasdalf@fasdalf.ru’s picture

Status: Fixed » Needs work

Forgot to change status.

fasdalf@fasdalf.ru’s picture

It's EVA module. EVA+diff works, EVA+workbench_moderation works. EVA+diff+workbench_moderation fails.

Status: Fixed » Closed (fixed)

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

jwilson3’s picture

Not sure why this got closed, its not fixed yet!

Rerolled patch adding functionality requested in #30, so that the diff comparison page will use the admin theme, if you have one!

This "works for me" but i would also second incorporating this functionality *directly* into the workbench moderation revisions listing page, as requested in #31. Heck i might just keep working on this a bit now to see if i can figure it out.

Status: Needs review » Needs work

The last submitted patch, workbench_moderation-diff-integration-1083720-30.patch, failed testing.

jwilson3’s picture

Status: Needs work » Needs review
FileSize
691 bytes

#facepalm...this did get fixed (it helps to check the latest dev).

Here's an add-on patch that *just* adds the request in #30...

jwilson3’s picture

Was having issues getting my own patch to work predictably.

I've updated it and this version should work now.

iStryker’s picture

Status: Needs review » Closed (fixed)

@jwilson - Next time, do not reopen a previous fixed & committed issue. Instead open a new issue that references the previous one. The patch you created does not include the changes from the previous patch. There should be only 1 patch per issue. This makes it easier to track, apply and test.

I have created a new issue. #1786604: Add missing admin paths. Please create a new patch for that issue (I would but then I would be stealing your credit). If you do not like the name and/or description of it, change that too.

jwilson3’s picture

Sorry 'bout that iStryker. Normally I would have done as you say in a new issue... but i originally thought this issue was closed by accident. After I realized it was actually fixed, it was just a gut-reaction to try to correct my stupid patch with one that worked. I'll try to do better next time, and follow the proper workflow (that i already know, of course ;).

Status: Closed (fixed) » Needs review

Status: Needs review » Needs work

The last submitted patch, 50: workbench_moderation-diff-admin-theme-1083720-50.patch, failed testing.

JeebsUK’s picture

Issue summary: View changes

Do the previous comments from #51 and #52 mean that this is actually fixed? Just trying to follow this issue. Thanks!

rv0’s picture

Status: Needs work » Closed (fixed)

Sure it's fixed and it works..
The testbot re-opened it due to the patches posted 3 years ago.

mtiminer’s picture

Hi All, sorry i'm a newbie here. Does this Diff-like enhancement work in the currently published 7x-1.4? or do i have to use the dev version and then apply the patch?

RyanPrice’s picture

@mtiminer Its in the latest release, no need to apply patches yourself.

antonio.estevez’s picture

It seems like only the title and body are diffed... is there support for the comparison of field values too?

thedut’s picture

@antonio.estevez : I have have just tested : yes it supports the comparison of field values too.