I can't figure out if this goes here, or at the Panels issues.
I was trying Stylizer for the first time, and tried to make a style using the Rounded shadow box basic style, and ended up with the WSOD. It works fine using the Plain one. I checked my server logs and found this:

PHP Fatal error:  Call to undefined function _color_unpack() in /var/www/clients/client2/web2/web/sites/all/modules/ctools/includes/stylizer.inc on line 462
CommentFileSizeAuthor
#10 883902_ctools_remove_color_module.patch3.98 KBhefox

Issue fork ctools-883902

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Title: Crash when adding new style with Stylizer » stylizer module depends on color.module but does not have it in .info file
Category: support » bug

Ahh, you need color.module enabled for stylizer to work. Maybe the dependency didn't make it over to the stylizer module in CTools. If so that's a bug.

wxman’s picture

Something weird is going on. I just checked core optional, and the color module is grayed out, and hasn't been installed. It won't let me check it to install.

wxman’s picture

Here's what I just did.
I uninstalled Stylizer. Checking the core list again showed the color module installed OK. I tried to install Stylizer again, and got this:


    * The plugin definition of stylizer cannot locate schema stylizer.
    * Warning: Invalid argument supplied for foreach() in ctools_export_ui->hook_menu() (line 54 of /var/www/clients/client2/web2/web/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php).

After that, I noticed that both are showing installed now, but the menu link is missing.

codekarate’s picture

Not sure if this helps, but I had that issue when I did not have PHP GD image library installed. I believe the color module requires the library before it will be available to be installed. Hopefully that helps.

wxman’s picture

I'm checking on that. I can't remember how I left GD when I switched to ImageMagick.

It says I have GD 2.0 or higher installed.

merlinofchaos’s picture

Ok, I'm wrong. color *is* listed in the dependencies. So I don't know what's going on here.

wxman’s picture

I've tried several different uninstall/reinstall looking for the cause, but I don't see anything other than the PHP error. It definitely won't let me install it successfully.

hefox’s picture

Title: stylizer module depends on color.module but does not have it in .info file » Color module is not enabled if disabled, but dependent stylizer is
Project: Chaos Tool Suite (ctools) » Panels
Version: 6.x-1.7 » 6.x-3.x-dev

panels update panels_update_6310 installs stylizer

but only stylizer. drupal_install_modules does not install dependencies.

So drush update db runs, and enabled stylizer on any site that recieves this update.

Then, run drush en or drush dis any module. drush uses drupal_execute on system modules form).

Since color is a dependency, it is disabled (if in the drupal_executed one). All disabled depent on enabled modules (as in disabled => true fapi) modules are added into modules that should be enabled due to how system module's logic is done.

Thus, when enabling/disabling another module, colour module is silently enabled. Like a ghost!

Or, if enable/disable is never run via drush (all our production en/dis are /usually in update hooks) it isn't, but stylizer is. Quite inconstant.

So, um:
a) enable colour module if not enabled.
b) don't enable stylizer.
c) Remove needing color module dependency

I favour b, but not I haven't had the time to look at stylizer yet, but mostly: I don't want color module enabled automatically, like a ghost, on ever site that panels is! Ahh, I hate, love it, but mostly hate! Hate! hate! hate! hate hate hate hate hate. Hate hate hate hate hate hate hate hate hate. How about a message about how cool stylizer is, but not actually enabling it? :(.

hefox’s picture

Title: Color module is not enabled if disabled, but dependent stylizer is » Remove color module depency
Project: Panels » Chaos Tool Suite (ctools)
Version: 6.x-3.x-dev » 6.x-1.x-dev
Status: Active » Needs review

As not using stylizing, haven't tested (and as was using ctools checked out from cvs).

Replaces all _color_ module calls to ctools_color_ calls and copy overs the 3 functions from colour module, removing dependency.

hefox’s picture

Wat, I KNOW I attached a file.

wxman’s picture

I don't know if I did something wrong, but I manually tried the patch on the current dev version and got this when I tried to install stylizer:

    * The plugin definition of stylizer cannot locate schema stylizer.
    * Warning: Invalid argument supplied for foreach() in ctools_export_ui->hook_menu() (line 61 of /var/www/clients/client2/web2/web/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php).

EDIT: On a happy note, the stylizer does sort of work now. I can add a new style, and it works on the pages. I can't go back and edit, or remove the style though at admin/build/stylizer/list/style-name/edit

merlinofchaos’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

Committed to D6. Doesn't quite apply to the D7 version, hopefully is an easy fix though.

merlinofchaos’s picture

Status: Patch (to be ported) » Closed (duplicate)

All of the 'to be ported' patches got merged in during the porting sprint in September.

tsvenson’s picture

Status: Closed (duplicate) » Active

After talking with @merlinofchaos on IRC, its seems that the dependency on the Color module for Stylizer should not be here and he asked me to reopen this issue.

Would be sweet if the dependency could be removed as this is the only module I need that still requires it.

joelpittet’s picture

Issue summary: View changes
Status: Active » Needs review

There is currently an issue with the color module in our tests because of how composer looks for dependencies. So let's remove it and see how we fair.

joelpittet’s picture

Status: Needs review » Needs work

Though I agree with the direction, I'll leave this patch to someone who needs the removal. There are still a few calls (like the D6 patch) to _color_* functions