Closed (fixed)
Project:
Display Suite
Version:
7.x-1.x-dev
Component:
Panel view modes
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2011 at 17:10 UTC
Updated:
21 Aug 2011 at 00:52 UTC
Jump to comment: Most recent file
Comments
Comment #1
swentel commentedI can't reproduce that over here, even if I don't override the layout of the revision at all. Simpletests in DS also proves that users with access to view/edit/revert revisions can access those pages, even it's not user 1. So I'm pretty sure something is completely wrong with your setup, but I can't really guess what might be wrong, it sounds like the menu alter is not doing it's job well although that only overrides the page callback. Are you able todo some debugging or this, because, as I said, I can't reproduce this at all.
Comment #2
misterT commentedI can do some debugging, but I'm not exactly sure what I need to do. What additional information do you need? I have found that it is specifically the revision view page that access is denied for. I can go to regular edit (node/%node/edit) or view (node/%node), but if I try to view a revision (node/%node/revisions/%rev/view) I get the access denied error in place of the form to edit the node. Are there other modules that are known to conflict with display suite?
Edit: this happens regardless of whether I actually have "revision" checked in node type-> manage display -> custom display settings. Also I am using book content type.
Comment #3
swentel commentedHmm, could you test this on say the basic page content type? Can't look into code right now but maybe book has another hook_access which triggers the denied access? If it works on another ctype, then we can just look into the book code. Also, maybe check if the revision access callback is called and what it returns.
Comment #4
swentel commentedOk, tried it myself on the book content type and everything is ok here as well. Not sure where to look. The only module that I can think of that might conflict is maybe page manager, or maybe views (although, that would be weird since you can't enter wildcards in the menu path of a view).
Comment #5
misterT commentedOk, couple of updates. I have replicated this issue on a fresh subsite. Details below. From your tests I assume there is something different about my setup that is causing this issue. Even if my setup is incorrect for achieving my intended purpose, I still shouldn't be getting an access denied error, right? (Especially for admins) For the record, I was using page manager & views when I first encountered this issue, but not when I replicated it.
Replication procedure:
-Created new subsite (Drupal 7.7, released 2011-July-27)
-Installed modules display suite (7.x-1.x-dev), ctools (7.x-1.0-rc1), revisioning (7.x-1.2), enabled book content type
-Created roles & users, set role permissions
-Enabled revision view mode in Display Suite Extras
-Set book content type options for creating revisions (create new revision, new revision in draft, create new revision every time book content is updated)
-Created a book type node
-Went to revisions list for node (/node/%node/revisions)
-Clicked on the date for a revision row (/node/%node/revisions/%rev/view)
-Access denied message displayed instead of form
-Manually directing the browser to /node/%node/revisions/%rev/edit displays the regular revision edit form
-Disabling revision view mode in Display Suite Extras results in the regular revision view form, and re-enabling it results in the access denied message
I would like to solve this issue, because if my understanding of this module & overriding the revisioning display is correct, this functionality is exactly what I'm looking for. I need to override the view & edit display for book type, which includes the revisioning view and edit display, and this is the only module I've found that allows customizing the display of revisions. For the benefit of anyone in the future who stumbles upon this post looking for this functionality, here are some pages I've found containing relevant information:
http://drupal.org/node/1191336 - Issue discussion where Display Suite revision overrides are implemented
http://drupal.org/node/515518 - Issue discussion about overriding task handler for revisions. Results in the Revisioning module implementing the override, I assume for the option of whether links to edit or view revision content default to the current or latest revision (which doesn't allow display customization).
http://drupal.org/node/519924 - Issue discussion about integrating Panels and revisions. Remains unimplemented at the time of this posting.
http://drupal.org/node/1189928 - Issue posted by Panels user looking for the same functionality
Comment #6
swentel commentedOk, it's revisioning that's conflicting, could reproduce it as well now. Both modules are trying to override the same menu view callback and some racing conditions take place here since revisioning module completely removes the menu paths first and ds adds them again. I'll see if I can do something about it.
Comment #7
swentel commentedHere's a patch - apply it against latest dev. Seems to make everything work out fine. Let me know if it all works out for you, and than I'll commit this.
Comment #8
misterT commentedThe patch appears to resolve the access denied error. Thank you!! Looking at the patch, I thought it might make a difference if the Revisioning module was installed before or after the Display Suite module (with the patch), but the order of module installation doesn't appear to affect anything. I haven't tested the features of display suite with this patch, I just tested the error I encountered, but think if I run into issues with other features it would be unrelated. If you want to commit this patch that would be great. Thanks again!
Comment #9
swentel commentedok, commited and pushed! (will be for release 1.4)
Comment #10
BenK commentedKeeping track of this thread.
Comment #11
rdeboerThanks Swentel for fixing #1229178: Access denied when trying to view a revision with Display Suite module enabled.
Great module too!
Rik, maintainer of Revisioning