Anytime I change any settings, the sites/default/files/mayo#$%^/color.css file gets changed and leaves out the background-clor of the base, with the following error in the code.

body,
#page-wrapper {
  background-color: ;
  color: #434342;

I also get these messages upon saving;

Notice: Undefined index: wall in _color_rewrite_stylesheet() (line 475 of /home/iwasborn/public_html/growtogive.com/modules/color/color.module).
Notice: Undefined index: even in _color_rewrite_stylesheet() (line 475 of /home/iwasborn/public_html/growtogive.com/modules/color/color.module).

I can change the code, add a color and all is well...until I make any changes in theme settings, and then the color.css file gets changed back to the missing color, faulty code.

CommentFileSizeAuthor
#4 theme code.jpg272.76 KBIWasBornToWin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ontological’s picture

I don't have this problem. Perhaps you might want to check to make sure that permissions are correct so that Drupal has write permission to the folder where the customized style changes are saved.

IWasBornToWin’s picture

It has to have correct write permissions....it changes all other colors anytime I change them in the settings and It deletes the base color. This still doesn't address the issue about base color selector not being visible in the settings?

Thanks

mermentau’s picture

Status: Active » Postponed (maintainer needs more info)

IWasBornToWin, Don't be too quick to dismiss the idea of a configuration problem in your install. We have hashed this over in http://drupal.org/node/1356622 where you first mentioned the problem, and with over 6,000 users of Mayo now I'm thinking there would be more of a clamor here if it is "faulty code".

That said can you describe how we can recreate the problem? I assume you have the latest 7.x-1.x-dev.

IWasBornToWin’s picture

FileSize
272.76 KB

Yes, I have the latest dev. I think what you hashed over in the last post is not related to this...but perhaps...not sure.

It may be core, I'm not sure what it is, just trying to figure out how to fix it. But I can be very quick to deduct it's not a file permission issue if the colors.css file is being rewritten, correct? Or could it still be? mayo theme folder is 755. /files/color folder is 755. /files/color/mayo@#$%fsde234 is 755. /files/color/mayo@#$%fsde234/colors.css is 664

That said can you describe how we can recreate the problem?

I can't tell you much more than I did in my initial post here.

The colors.css file gets rewritten anytime I save theme settings. This rewrite saves all the new settings but deletes the base color. I edit the new saved file, insert the deleted base color, and then after saving it, everything is fine.

Also, there is no filed in my settings to change the base color. Now that i'm thinking about this, since there is no field, the rewrite is saving a blank, null value? If the base field were visible in my settings and I inserted the color, i bet it would work. Instead, I'm having to manually insert the color. So, the golden question--how do I get the base color field to show in my settings? Another interesting things to not, no base color shows in the theme preview either.

Here's some code from inspecting the element. Not sure what this "hidden" means?

<input type="hidden" name="var" value="theme_mayo_settings">

Here's a screen shot of that code

code

ontological’s picture

IWasBornToWin, not sure if this idea would help, but I've noticed that with the color module, the first time a theme is enabled it creates 4 rows in the variables table. If the names or number of items in the color.inc file have changed (new version of the theme or site buillder adds them) those might not be reflected on the admin appearance screen. To get around this I have deleted those 4 rows, cleared the cache, deleted the sites/default/files/themename#$%^/color.css files, and then customized the settings again. Also, I'm not fully sure, but I suspect that you cannot add items manually to the theme color.css file as it might throw off the writing of the color over-rides done in the admin appearance screen. If you want to add colors then use a different style sheet.

Hope this helps. Let us know.

IWasBornToWin’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Awesome....that fixed it!

For reference, Base, Even table background, and Sticky node color were all unavailable settings until I did this.

Thank you.

fuzzy76’s picture

Issue summary: View changes

Wow, I was bitten by this too. What an obscure bug. Is this a problem of the color.module?

To avoid losing my colors I:

  1. opened admin/appearance/settings/mayo
  2. deleted the colors.css file
  3. deleted the color_mayo_palette row from the database
  4. cleared all caches
  5. re-saved the admin/appearance/settings/mayo form
mermentau’s picture

@fuzzy76, This issue is so old maybe we should open another issue if you are interested. Drupal core and Mayo have both changed some in the 3 years since this was opened.

fuzzy76’s picture

I'm good, thanks. On the other hand, it is the exact same issue, so I don't know why splitting it up would help. But I wonder if this should have been posted in the color.module issue queue instead (depending on how it calculates the numeric hash it appends to the css files).

fuzzy76’s picture

Status: Closed (fixed) » Closed (duplicate)