The first time I tried this, it just didn't work (no color options at all on /admin/build/themes/settings/friendselectric & others) so I thought it was unstable.
So I went back to colorizing with core color.module for an hour or two before deciding that I really did need more gradients and more color names.
So I tried again. And it DID work.
And was going well.
Then suddenly (after a themes cache rebuild or something) it inexplicably disappeared again... even on the distro themes.
:-/

Debugging led me to:

function color_compatible($theme_name) {
  static $static;

  $theme_info = unserialize(db_result(db_query("SELECT info FROM {system} WHERE type = '%s'", 'theme')));
  
  if ($theme_info['color'] == TRUE) {
    $static[$theme_name] = TRUE;
  }
  else {
    $static[$theme_name] = FALSE;
  }

  return $static[$theme_name];
}

 

That query does NOT retrieve the requested theme info, just any random theme info! Not all of which are color-enabled :-}

Here's a fix. Including a PHP-STRICT-NOTICE avoidance also.

function color_compatible($theme_name) {
  static $static;

  $theme_info = unserialize(db_result(db_query("SELECT info FROM {system} WHERE type = '%s' AND name = '%s' ", 'theme', $theme_name)));
  if (!empty($theme_info['color'])) {
    $static[$theme_name] = TRUE;
  }
  else {
    $static[$theme_name] = FALSE;
  }

  return $static[$theme_name];
}

Other than that, so far so good... I'm getting results on a zen-based subtheme.

CommentFileSizeAuthor
color.misc-20081010.patch835 bytesdman

Comments

tonyn’s picture

Status: Active » Fixed

Committed

Status: Fixed » Closed (fixed)

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