On two separate websites, when I browsed to the Blocks administration page while Administration Theme is installed and configured, the Blocks admin page displayes the Admin theme's blocks in the page for the Site theme.

E.g., if I have my admin theme set to Rootcandy, and my site theme to Tapestry, the Tapestry tab shows the blocks definition for Rootcandy.

If I disable the Hide Submit module, the problem disappears.

On a separate site showing the same problem, I simply disabled Hide Submit on the Blocks admin page, and the Blocks admin page displayed in the Site theme (as it should, given my Admin theme config) and showed the correct blocks.

So, workaround: Disable Hide Submit on the Blocks administration page.

This appears to be a flaky error -- on one site it cropped up only after several days of work had elapsed since any of these modules were updated, and on another it appeared immediately on installing Hide Submit -- so I can't give you steps to reproduce. Sorry. Will try to come back to this if no one else has supplied more info in the interim.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Optalgin’s picture

Status: Active » Postponed (maintainer needs more info)

Are you sure this one is related to hide-submit module??

I tried to reproduce this issue on few sites and it didn't reproduce
I cannot find any link between the script and the issue you describe

Do you have any javascript errors or any php errors in your log?

Can you also try to reproduce with the 6.x-1.x-dev release
I changed the script and moved it into a separate .js file, maybe it will work now

escoles’s picture

As noted, the error can't be reliably reproduced on a new site. All I am able to say is that on the sites where it's observed, it can be reliably reproduced by removing the hide-submit exclusion for the modules page.

jusyjim’s picture

I can confirm what escoles reported. FYI - I updated to dev version and it's OK now.

Addendum: I spoke a little too soon... the setting for "show on every page" is what breaks the block pages functionality, even in dev version.

Optalgin’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks,
I'll try again to reproduce it on my test server
Can you specify the themes you are using, site and admin

jusyjim’s picture

lots of themes since it's a blogger's site.
A cloudy day
Admire Grunge
Chamfer
chocotheme
Grassland
icandy
jq_theme
Motion
Paradise
Scruffy
Wilderness

Scruffy is the admin theme.

jerryjoh’s picture

FYI - I'm having the same problem in 6.x-1.15 and I don't have the Hide Submit module installed. When I go to the Blocks page I get the admin theme (Garland) instead of the site theme (my own creation). When the admin theme is set to default I get my theme.

t0b1’s picture

subscribing .
i am having the same problem with the current release of hidesubmitbutton 6.x-1.10

using rootcandy as admin_theme and shakennotstirred as site template

Fidelix’s picture

I use Seven as my admin theme, and i have this exact same problem.

Rosamunda’s picture

I can confirm this error, I´ve installed several modules and one by one deactivating (and uninstalling) them, and the adim blocks page reverted to normal only after I deactivated this module.

Josephnewyork’s picture

Status: Active » Patch (to be ported)
FileSize
508 bytes

Here is the problem...

You cannot call the theme() function on hook_init()... I have see this issue with PopupsAPI. When you call theme() on hook_init(), it initiates the theming engine too early. Hence breaking the block theme.

The issue is occurring here:

hide_submit.module:
  hide_submit_init():100
     :: _hide_submit_get_javascript_settings():103 -->
  _hide_submit_get_javascript_settings():323
     :: _hide_submit_get_message():360 -->
  _hide_submit_get_message():303
     :: theme():315

A way to get round this could be to bypass calling theme(), by calling it manually with theme_render_template(...). But that's probably overkill and since calling theme('image') is a very simple theme call, handling this with a simple string will work just fine.

Replace hide_submit.module line 315 with this and your blocks config will use the right theme :)
$image = '<img src="'.url($image).'" alt="" title="" />&nbsp';

Optalgin’s picture

This is great news..
Thank you for solving this mystery

I'll issue a new release soon
Thanks

Optalgin’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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

igorgoncalves’s picture

Thaank you so much!

i had exactly the same problem, i was calling the path_to_theme() function on hook_init.

works fine now!

c4rl’s picture

Status: Closed (fixed) » Active

This is a problem again due to #1112114: Allow modules and theme to define their own image. init_theme() cannot be called before block_admin_display_form().

c4rl’s picture

Version: 6.x-1.9 » 6.x-1.x-dev

Updating version

c4rl’s picture

Status: Active » Needs review
FileSize
864 bytes

New patch, rolled against latest 6.x, eliminates the call to init_theme() that was introduced in #1112114: Allow modules and theme to define their own image.

Will also be considering porting the 7.x-2.x to a new 6.x-2.x, in which hook_hide_submit_image_alter() does not exist.

greggles’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Thanks for submitting this issue.

The 6.x branch of this module is not supported. This issue was filed against the 6.x version so I'm closing it because it doesn't seem relevant to the 7.x version.

If the issue is relevant for the 7.x version: I apologize for closing it. Can you please reopen it and adjust the version number?