When viewing revisions _revisioning_view_revision() just statically calls node_page_view. But node/%node can be handled by other router items (ie panels/panelizer/panels node). This patch respects the menu router path defined by node/%node. code stolen from workbench moderation and back ported to d6.

Comments

rdeboer’s picture

Title: Viewing revisions doesn't respect node_view menu router » Patch to respect node_view menu router
Assigned: Unassigned » rdeboer

Thanks for the patch cangeceiro!
Hope to apply it soon.
Rik

rdeboer’s picture

This has dropped of my radar. Sorry. I hope to apply this patch soon.

Rik

rdeboer’s picture

Patch applied to 6.x-3.x branch (ie 6.x-3.x-dev snapshot).
Thanks cangeceiro !
Rik

rdeboer’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

LittleRedHen’s picture

The standard router path defined for node/%node is now _revisioning_view (set in revisioning_menu_alter at line 278).

With this patch in place, every time you try to view a particular revision, _revisioning_view will be called instead of revisioning_view_revision. If you happen to have the 'Links to view content default to displaying the latest revision' configuration setting turned on, it will then *always* be the latest revision that gets shown, never the one you asked for.

This breaks the revision list; no matter which revision you select, it is always the latest one that gets shown.

I worked around it by replacing this patched function with my own page-callback that did not include this patch, but it would be nice if the revisioning module handled that scenario correctly.

LittleRedHen’s picture

Status: Closed (fixed) » Needs work

Attempting to re-open this issue, because I'm pretty sure it's not quite working the way you'd intend...

rdeboer’s picture

Version: 6.x-3.15 » 6.x-3.16

Thanks LittleRedHen,
See what you're saying... Darn why wasn't this picked up by anyone during the 2 weeks that the module was in dev....

rdeboer’s picture

I've put in a band-aid check for Panels, while thinking of a better solution.

rdeboer’s picture

Issue summary: View changes

No longer actively maintaining D6. Sorry.

rdeboer’s picture

Status: Needs work » Closed (won't fix)
ruloweb’s picture

Version: 6.x-3.16 » 7.x-1.9
Assigned: rdeboer » Unassigned
Status: Closed (won't fix) » Needs review
Issue tags: +panelizer
StatusFileSize
new1.12 KB

Re opening this issue, and assigning to 7.x.

Panelizer is not working with revisioning, nodes call default node_view callback.

This patch try to solve this, it applies to 7.x-1.9

Thanks!

jantoine’s picture

The patch from #12 works with the default node page provided by the page_manager ctools module. Needs some comment cleanup and additional tests wouldn't hurt, so leaving as needs review for now.

damienmckenna’s picture

Ran into this helping someone to get revisions and Page Manager to work together. The patch in #12 seems to work reasonably well. FYI the latest CTools already uses Page Manager to handle the page load if the node_view display is being managed by it.

ruloweb’s picture

Status: Needs review » Active
StatusFileSize
new1.07 KB

Hi,

I created a new version, which uses DRUPAL_ROOT instead of $_SERVER['DOCUMENT_ROOT'] . base_path(). The last one causes a FALTA ERROR when your site is in a subdirectory like www.example.com/site/

Also I did some creanup.

Thanks.

damienmckenna’s picture

Status: Active » Needs review
sidharth_k’s picture

The patch in #15 is a good one. I've tested it.

Thanks @ruloweb

Also note that if you've got Display suite installed, it tries to mess around with revisioning menu entries in its ds_menu_alter() (Specifically, you should check _ds_menu_alter(). You may need to deal with that depending on your situation.

damienmckenna’s picture

Version: 7.x-1.9 » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

Good to go, imho.

damienmckenna’s picture

damienmckenna’s picture

  • RdeBoer committed f326ade on 7.x-1.x authored by ruloweb
    Issue #1567880 by ruloweb, sidharth_k: Patch to respect node_view menu...
rdeboer’s picture

Committed a version of #12 & #15.
Thanks everyone.

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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