Posted by xjm
The color module currently only saves a theme's color configuration to config when the color schema does not match any of the default color schemes provided by the theme, going out of its way to return early in
color_scheme_form_submit() if the palette matches one of the default palettes. I'm not sure if this is due to it being in some weird interim limbo until is in, but there doesn't seem to be any reason to do this, and the result is that you cannot rely on the configuration existing.
I discovered this when I tried to provide a local config override in a
$conf['color.bartik'] = array( 'palette' => array( 'top' => '#096d17', 'bottom' => '#151e16', ) );
It worked fine until the main configuration got switched to a default bartik palette, whereupon the config file disappeared from disk, and as a result these two colors were the only ones loaded into the palette, so all the colors that were supposed to be inherited from the active configuration were lost.
The attached patch might be all that's needed to fix this--simply removing the weird exemption for the default color scheme.
This probably needs test coverage, and also some manual testing to make sure it works as intended. Just want to check the test suite before I go any further with it.
PASSED: [[SimpleTest]]: [MySQL] 54,130 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View