Closed (fixed)
Project:
Diff
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2011 at 18:41 UTC
Updated:
16 Apr 2013 at 09:08 UTC
Any ideas why clicking the "Show Diff" button on the back-end switches themes to my front-end theme? FWIW, the changes are displayed perfectly, I just can't figure out why they're not just shown in the back-end theme (Seven).
Comments
Comment #1
realityloop commentedCan you paste the respective URLs that are displayed?
Also if you vcould test if this still happens with the Dev release it would be appreciated
Comment #2
michaelgiaimo commentedSure. I go from here:
http://mydomain.com/drupal/?q=node/30546/revisions
to here, by clicking on "Show Diff" button.
http://mydomain.com/drupal/?q=node/30546/revisions/view/100372/100373
Again, the Diff part is working - it shows the color-coded side-by-side changes. It's just in my front end for some reason.
Comment #3
michaelgiaimo commentedAnd so very sorry - this was the Dev release. Updated issue.
Comment #4
michaelgiaimo commentedAny ideas?
Comment #5
michaelgiaimo commentedComment #6
michaelgiaimo commentedComment #7
realityloop commenteddo you have editing set to use the front end theme?
Comment #8
michaelgiaimo commentedI have the box checked to have editing use the Admin theme with Content editing.
Diff is awesome, and track changes was absolutely mission critical for a project I'm working on - so for now, and in case anyone else has this issue, I installed this module:
http://drupal.org/project/admin_theme
And it's working. This of course could be done with a custom function using a menu hook, but this module gives a nice gui to it.
Comment #9
mariusz.slonina commentedhttp://api.drupal.org/api/drupal/modules--system--system.api.php/functio...
I think the module should implement this hook for *revisions* paths.
Comment #10
realityloop commentedAdded, should be in next dev release
Comment #12
dozenson commentedI'm using the latest dev version and diff_admin_paths_alter has no effect.
I replaced it with hook_admin_paths as mariusz.slonina suggested and this did the trick
Comment #13
elijah lynnI am having this issue on 7.x-2.0.
Comment #14
mitchell commentedPlease test with the latest 7.x-3.x branch and report back.
Please also investigate if this problem is caused by Admin Theme.
Comment #15
alan d. commented@Elijah Lynn
This should be fixed in 2.x branch as per Brains comment in #10 and new issues arising from this have been addressed in 3.x (i.e. the admin theme enforcement is configurable)
Comment #16
broonJust for other user experiencing a similar behavior.
I was using 7.x-3.2 and Admin theme 7.x-1.0.
While admin theme was used for administrators, diff changed to front-end theme for other users (e.g. content manager).
I did add the paths to Appearance (/admin/appearance) >> Adminsitration Theme >> Pages >> Custom
and at /admin/config/content/diff/entities I checked the option "Treat diff pages as administrative".
However, the diff pages were still displayed differently for various user roles.
Using both modules, you have to give the permission of using the admin theme to respective user roles.
Comment #17
alan d. commented@Paul
Being a crusty old Drupal developer, I've assumed that permissions to access the admin theme was a known thing. So should the description be updated in the Diff settings to point this out?
Something like:
Rendering something like this:
Diff pages are treated as administrative pages by default, although it is up to each module to enforce this and to implement this optional setting. Users need to have the permission "View the administration theme" for this setting to have any effect.
Comment #18
broonFrom my personal experience of only four years of Drupal development, I experienced a lot of situations in which the permission system is not very intuitive. And the vast majority of my clients' questions can be solved by some permission settings (ever worked on a Drupal site with Node Access and Organic Groups and tried to explain your customer why (s)he has to change permissions in three different places in order to display one new field?).
So yes, I would always try to include advise on which permissions are necessary.
In the special case above for example, some might get crazy as there is the Drupal core permission "System >> View the administration theme" (which you included in your patch) as well as "Administration theme >> Access administration theme" (which I was referring to). It can easily be missed that a role needs both permissions if both Diff and Admin theme are installed.
Comment #19
alan d. commentedI actually thought Administration theme was dropped with core inclusion. Guess you learn something new everyday.
cross-posting #1970872: Add permissions help for admin theme setting - I'll leave it open for a while to get more feedback, but personally I think it is a handy enhancement.
Comment #20
broonAdministration theme has been included in core, that's right, but it only works for admin pages (and yes, one might think that's induced by its title). Other modules can define their own pages to be treated as admin pages, just as Diff now does. However, there are still some modules that don't and then you can still install the D7 version of Administration theme.
The actual problem probably came up when upgrading from Diff 2 to Diff 3. While my Diff 2 pages were treated as admin pages by using Administration theme, there is no need when using Diff 3. But the Diff paths were still set as admin with Administration theme. So in fact, the Diff pages are now "double-admin", hence one needs both permissions for the Diff pages eventually be displayed with admin theme.