In "My Sections", the editable pages are listed with a direct "edit" link in the right hand column.

These edit links do not work when also using the Revisioning module, resulting in:
warning: Missing argument 2 for module_grants_node_access() in /var/www/sites/all/modules/module_grants/module_grants.module on line 177.

The edit link in "My Sections" is like this:
http://hostname.com/node/9/edit

where as going to the page directly, the "edit this revision" link is:
http://hostname.com/node/9/revisions/21/edit

I don't which module is at fault. Maybe Module Grants/Revisioning should automatically handle the original edit links and convert them behind the scenes to edit the latest version. Maybe Menu Node Edit should handle the edit links better?

CommentFileSizeAuthor
#3 469998-menu-alter.patch1.26 KBagentrickard

Comments

agentrickard’s picture

Status: Active » Closed (won't fix)

It is a conflict between the two modules' use of hook_menu_alter() to rewrite the same link node/%/edit.

The two modules thus become incompatible because Revisioning overwrites the access callback for MNE.

A potential solution is to set the weight of MNE to a value higher than Revisioning, but then Revisioning will not work as designed either, I suspect.

I am not changing anything, since MNE uses the normal editing path. You may not be able to use both modules.

agentrickard’s picture

Status: Closed (won't fix) » Active

Let me be more clear. The conflict is solvable if both modules would _fully_ rewrite the menu path node/%/edit.

As it stands now, MNE takes these parts:

  $items['node/%node/edit']['access callback'] = 'menu_node_edit_check';
  $items['node/%node/edit']['access arguments'] = array(1);

And Revisioning takes these parts:

  // Remove "Edit" as a tab and redirect existing edit links to
  // _show_node_revisions() to ensure user picks desired revision first.
  $items['node/%node/edit']['page callback'] = '_show_node_revisions';
//$items['node/%node/edit']['page arguments'] = array(1);
  $items['node/%node/edit']['type'] = MENU_CALLBACK;

I can correct this by being more forceful in menu_node_edit_menu_alter() and declaring all the menu items I need. But this would still cause issues if Revisioning rewrites part of the menu item again. So the only solution would be weighting the modules so that MNE runs _after_ Revisioning or writing a custom hook_menu_alter() function that runs last and clean up everything.

I can do my part, but the rest is up to Revisioning module.

agentrickard’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new1.26 KB

And a patch -- committed -- you can either reassign this issue to the Revisioning module or close it.

Thanks!

agentrickard’s picture

IMO, this patch will not break Revisioning, since we pass the same page arguments. But if Revisioning alters this menu item, then MNE may break.

bae22’s picture

Thanks. I have found Revisioning to be a problem with some modules, so I have been testing Modr8 and Revision Moderation modules instead.
Both of these seem to work well with MNE so I might stick with these. I'll do some more testing before deciding.

agentrickard’s picture

Status: Reviewed & tested by the community » Closed (fixed)