Download & Extend

Blocks page is broken for multiple themes.

Project:SimpleMenu
Version:6.x-1.7
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The most recent version of simplemenu_init() has gotten caught by a known and annoying bug.
#219910: Calling theme function from hook_init() interferes with administration theme

It looks like zroger has already had to deal with issue before.
#336119: Problems with administration theme displaying on block admin page

Once there is solution I will switch my site over to the simplemenu-6.x-dev version to test the fix and I will keep my site on the dev version so I can help you test things.

Thanks,
~jake

BTW, A quick fix is to just disable simple menu on all block admin page.

// LINE 50: simplemenu.module.
function simplemenu_init() {
  // do a simple access check here, since theme isn't available to check yet
  if (simplemenu_enabled() && strpos($_GET['q'], 'admin/build/block') !== 0) {

Comments

#1

Hi jrockowitz,

Would you please try by changing the weight of the simplemenu module to 1?

From what I read, it just needs to run after system_init() and system has a weight of 0. (maybe that the system should be initialized first and have a weight of -50... hmmm...)

Thank you.
Alexis

#2

Alexis,

Changing the weight did not fix the problem. It seems like once a theme function is called within hook_init() the global $theme variable is being defined which is causing the issue.
http://drupal.org/node/219910#comment-2064906

The site I am working on is pretty big with lots of module including things like the jquery_update.module and the switchtheme.module. Just to be sure none of theses modules were causing the problem I installed a stripped down Drupal installation with only simplemenu enabled and was able to duplicate the issue.

~ jake

#3

Status:active» fixed

jrockowitz,

Fixed. I also proposed a fix for the blocks as you can see there: #219910: Calling theme function from hook_init() interferes with administration theme (link you posted here, thank you!)

It is checked in so it will appear in the next 6.x-1.x-dev. Feel free to reopen if the problem persists for you.

There are two new flags in the admin screen, "Allow Simplemenu to call the theme() function" should not be checked, although it is ignored in the block list pages.

Thank you.
Alexis

#4

I just downloaded and switched my site to the 6.x.1.x-dev version and the bug is fixed.

This is a very smart solution without hacking core.

Thanks,
~jake

Alexis, one quick recommendation is to mark the bug as 'needs review' first before 'fixed'. This will encourage other people to test your fix. At the same time I know how rewarding it is to mark a tricky bug like this 'FIXED'.

#5

Jake,

From my experience, marking it fixed generates a reaction, whereas "needs review" is more like I have a patch for your module and I want you to review it. I know core uses those things in a different way...

Yet, most of the people do not know how to use the issue system. So even the "postpone (maintainer needs more info)" does not work. If the user posts more info, he's unlikely to change the status back to "active".

So now a days, I mark things fixed and the user can mark it back "active". That works 95% of the time. 8-)

Thank you.
Alexis

#6

Status:fixed» closed (fixed)

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

nobody click here