Needs work
Project:
Color.module: SoC 2008
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2008 at 22:56 UTC
Updated:
29 Oct 2008 at 01:47 UTC
I see this change was just made. Unfortunately, it results in WSOD on admin/build/themes if you have 2 themes that define the same phptemplate_* function. For example, both Garland and Acquia’s Marina define phptemplate_preprocess_page.
And you end up with this error:
Fatal error: Cannot redeclare phptemplate_preprocess_page() (previously declared in themes/garland/template.php:55) in themes/acquia/acquia_marina/template.php on line 300
So you have 2 options:
color_compatible() and whatever else needs rewriting.
Comments
Comment #1
johnalbinLooks like its only
color_get_color_hook()andcolor_compatible()that need re-writing if #2 is chosen.Comment #2
johnalbinCame up with a third option…
3. Don't determine if themes have color module support by examining if it has a hook_color function. If the theme has a color/color.inc file, you know it has support for the color module. Of course, you don't know if that support is original or '08 support. So you still need to examine color.inc for something specific to '08. I’m not sure what that something is yet.
Comment #3
johnalbinMore accurate title.
Comment #4
tonyn commentedCorrect me if I'm wrong, but why is Garland set at phptemplate_preprocess_page() and not garland_preprocess_page()? It undermines the system. Isn't this a core bug that should be fixed?
Update:
http://drupal.org/node/223430
"It is recommended that base themes use the engine name (7 & 8) for its preprocessor. This makes it easier to move around code between themes and post snippets on Drupal.org."
Why is this the case?
Comment #5
Danial Namousi commentedsubscribe
Comment #6
tonyn commentedhttp://drupal.org/cvs?commit=149617
OK. I am trying another option (we mentioned this one before in #drupal-themes). Nothing is final, but I wanted to move forward. To my knowledge, this is an OK implementation.
We are checking the theme .info file for
color = TRUE(which is$theme->info['color'] = TRUEwhen it's unserialize'd from DB.color_list_colorable_themes() has been consolidated into our special list_themes() named color_list_themes(). We can list colorable themes easily because this function pull theme info by default anyway.
color_compatible() will do a DB look up for color = TRUE.