I noticed that in popup, my site's theme CSS is applied and not my admin theme's. Using the site theme instead of the admin theme also resulted in my Panels Everywhere site template being applied to the popup.
Could be that the popup URL does not contain /admin/ in its path.
Ex. Popup URL
http://localhost/imagecrop/crop/3/adaptive-960/node/page/field_test
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 1491494-admin-theme-11.patch | 1.21 KB | ianthomas_uk |
Comments
Comment #1
nils.destoop commentedThe admin paths hook has indeed been removed. This caused issues in the overlay module. Popups where not working, when using overlay.
Maybe we can force the admin theme in code? Or make it a setting (use frontend / backend theme).
Comment #2
bryancasler commentedHaving a choice is always better, but I would still expect the default to be the admin theme.
Comment #3
nils.destoop commentedThe setting has been added. Default is admin theme.
Comment #5
anandkp commentedIssue is back for me...
Hi! I just updated Imagecrop and this issue has reappeared for me. Could someone please point me to where the settings for the theme that is used can be found?
Many thanks!!!
Comment #6
anandkp commentedI just moved from the official 7.x-1.0-rc3 version to 7.x-1.0-rc3+52-dev and found that the settings are back. I found them on the Imagecrop page.
I'm updating this issue to reflect the version where the settings disappeared.
The code that's missing is in imagecrop.admin.inc at line 37:
The code above is not in the the official rc3 version...
Hope this helps!
Comment #7
nils.destoop commentedThis code was fixed in dev, but will never be in rc3. It will be in 1.0 release. It contains more then only the settings.
Comment #8
anandkp commentedReopening issue and submitting a patch.
Version = 7.x-1.0-rc3+56-dev
Was getting the following error in the popup:
The theme function for the popup - imagecrop_page() - is using the global $theme to get the theme and this is always returning the default theme. I'm not 100% sure what is supposed to happen here but updating the global $theme to $theme = variable_get(variable_get('imagecrop_theme', 'admin_theme')) fixes the problem.
Additional Info
I'm using Panels Everywhere and thus, the block region (which is being called for in this segment of code) is not set.
This might be an even larger issue if Panels Everywhere was used for the admin theme as well as technically, no block is used then...
I'm a bit of a noob developer, a more experienced person's insight might be good.
Patch is attached...
http://drupal.org/files/1491494-popup-content-not-found.patch
PS - AWESOME MODULE! I use it in every project :o)
Comment #9
ianthomas_ukI can't reproduce this with the latest released versions of the various modules (and imagecrop 7.x-1.x-dev), can you confirm if it's still a problem?
If so, are you able to provide any more help reproducing the issue? It would be great if you could get it to happen on a fresh Drupal install.
Comment #10
dmsmidtI'm also getting the non-admin theme, although I've set it to use the admin-theme.
imagecrop: 7.x-1.0-rc3+56-dev
media: 7.x-2.0-alpha2
First I tried the 7.x-1.0-rc3 release and then updated to dev.
Comment #11
ianthomas_ukOK, I could reproduce this after all, but bartik and seven both work and look pretty similar so I didn't notice the wrong theme being used.
The patch on #8 is incorrect - that code is to decide which region to put the HTML into once the theme has been chosen. I've attached a new patch that should set the theme in the right place, please review if you've been having this issue. Note that if you don't have the 'View the administration theme' priviledge, then you will be shown the public theme instead. The new patch also improves some of the English.
Comment #12
anandkp commentedHi!
Will do my best to review the new patch and post my findings here tonight.
Thanks for looking into it @ianthomas_uk!
Comment #13
ianthomas_ukCommitted and pushed to 7.x-1.x