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

Comments

nils.destoop’s picture

The 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).

bryancasler’s picture

Having a choice is always better, but I would still expect the default to be the admin theme.

nils.destoop’s picture

Status: Active » Fixed

The setting has been added. Default is admin theme.

Status: Fixed » Closed (fixed)

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

anandkp’s picture

Status: Closed (fixed) » Active

Issue 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!!!

anandkp’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc3

I 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:

$form['imagecrop_theme'] = array(
    '#type' => 'radios',
    '#title' => t('Theme beïng used'),
    '#default_value' => variable_get('imagecrop_theme', 'admin_theme'),
    '#options' => array('admin_theme' => t('Admin theme'), 'theme_default' => t('Frontend theme')),
  );

The code above is not in the the official rc3 version...

Hope this helps!

nils.destoop’s picture

Status: Active » Closed (fixed)

This 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.

anandkp’s picture

Priority: Normal » Major
Status: Closed (fixed) » Needs review
StatusFileSize
new3.24 KB
new44 KB

Reopening 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)

ianthomas_uk’s picture

I 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.

dmsmidt’s picture

I'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.

ianthomas_uk’s picture

Version: 7.x-1.0-rc3 » 7.x-1.x-dev
Issue summary: View changes
StatusFileSize
new1.21 KB

OK, 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.

anandkp’s picture

Hi!

Will do my best to review the new patch and post my findings here tonight.

Thanks for looking into it @ianthomas_uk!

ianthomas_uk’s picture

Status: Needs review » Fixed

Committed and pushed to 7.x-1.x

Status: Fixed » Closed (fixed)

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