I'm sure I've either got the module installed incorrectly, or I'm just being obtuse, but I'm having a problem changing the color more than once. That is, the first time I select colors for elements and hit "Update theme," the settings work -- but after that if I choose different values, and hit "Update theme" again, the new colors are discarded and the page reloads with the old options in place. I've got caching turned off completely, and I've set permissions in the /files directory to world-writable -- but still not able to change configuration without first blowing away all existing settings.

CommentFileSizeAuthor
#7 theme_hues_tables.sql_.gz896 bytesongdesign

Comments

ongdesign’s picture

Title: Where's the end-user UI? » Can't change settings without discarding first!
aacraig’s picture

This is usually because the stylesheet has been cached on your browser. Try reloading your page from scratch (Shift+reload on most browsers).

In the next release, this should be taken care of automatically.

ongdesign’s picture

No, the module is not writing new data to the stylesheet at /sites/default/files/theme_hues/theme_hues-style.css. Could I have some permissions configured wrong? That file is set to 664, and the enclosing directory (theme_hues) to 777.

This looks like a great offering, even with the current UI -- much simpler than using the color module for simple color changes.

aacraig’s picture

Can you confirm that the stylesheet is not getting created / edited?

Remove the file /sites/default/files/theme_hues/theme_hues-style.css and then save your settings from the Admin section. This should result in a new stylesheet being created.

If that works, save a copy then make a change and save your settings. Compare the two files. If they are the same then I agree that it may be a permissions problem.

To test permissions, you could set the file to globally writeable and save your settings. If that works, it certainly is permissions, and you need to check that the file is owned by the user running your server process.

ongdesign’s picture

Version: 6.x-1.3-beta1 » 6.x-1.4

Thanks for the reply!

I began by upgrading to the 1.4 version. Then I deleted the theme_hues-style.css file, then saved settings, which did recreate the file. Then I attempted to change the colors and save changes.

The file is, in fact, being re-created (with an updated modification date), so it's not a permissions issue -- but the changes aren't being reflected in the new file. When the page refreshes after being submitted, it still shows the old values, and the CSS file still uses the old values as well.

Only by clicking "reset theme" can I empty out those values, then put in new ones. Can you shed any light on this behavior? Thanks!

aacraig’s picture

I'm not able to reproduce this error.

Could you dump your theme_hues tables from the database and post them in an archive? Also, could you post the result of this sql statement:

SELECT *  FROM variable WHERE name LIKE 'theme_hue%'

At least this way I can test with your settings.

ongdesign’s picture

StatusFileSize
new896 bytes

Sure, here's the archive. The SQL statement returned an empty set. I assume that's not the desired behavior!

aacraig’s picture

Your database setup looks fine. I'm wondering if this is a problem with the installation.

Let's just walk through step by step and make sure everything is at it should be.

First, a clean uninstall:
De-activate the module in the modules admin form.
Click the uninstall tab, select and uninstall the module.
Run this SQL (in your case not necessary, but just to be precise): DELETE FROM variable WHERE name LIKE 'theme_hue%';
Also, remove the theme_hues directory from your files directory (should be something like sites/default/files/theme_hues)
(these last two will be performed on uninstall by Theme Hues in the next release)
Ensure that there are no theme_hues_* tables in your database.

Now, re-activate the module in the admin form.
Check that there are theme_hues_* tables in your database.
Check that there is a directory called theme_hues in your files directory (should be something like sites/default/files/theme_hues)
From a clean install, the default setting is globally visible styles. Create a Region in Theme Hues admin, and give it a color in the Theme Hues config form.
Now check to make sure there is a file "theme_hues-style.css" in the files that reflects the settings you just did in the config form.
Finally, check to make sure that this file is being injected into the page by viewing your source on the page.

To test that the styles update, change the color in your test region and save. You will probably need to Shift+refresh to get the stylesheet to reload from the server and see the new changes in your browser.

If your experience deviates from the above in any way, let me know where the deviation occurs.

ongdesign’s picture

OK, I went through all these steps, everything was as expected, but I am still having the same issue: I created a single region, and gave it the color 999999, which worked fine. When I select a different color (say, FF99FF), and hit Update Theme, the new color is not applied (and the value shown in the input box for that region is still 999999). The mod date on the theme_hues-style.css changes to the current time every time I update the theme, but the file still contains a value of #999999 for that region.

I've tried changing permissions on the theme_hues-style.css file to 777, but every time I hit "Update Theme" the file is recreated with 644 permissions -- is that expected behavior?

The theme_hues_color table is being updated with the various values I try, as you can see below, but the CSS file continues to just show #999999:

INSERT INTO `theme_hues_color` (`rid`, `uid`, `color`) VALUES
(1, NULL, '999999'),
(1, NULL, 'FF99FF'),
(1, NULL, '33FF99'),
(1, NULL, '22FF99'),
(1, NULL, '22FF99'),
(1, NULL, 'FF00FF'),
(1, NULL, '#99FFF'),
(1, NULL, 'FF9922'),
(1, NULL, '222222'),
(1, NULL, '22FF99');

INSERT INTO `theme_hues_region` (`rid`, `name`, `description`) VALUES
(1, 'Background', 'This is the overall background, behind the page area.');

INSERT INTO `theme_hues_selector` (`rid`, `selector`, `property`) VALUES
(1, 'body', 'background-color');

Thanks, and sorry to be such a pain!

aacraig’s picture

Please download the latest release (6.x-1.5). Disable and then uninstall the module and check to make sure that your theme_hues dir has been deleted.

Then re-enable the module. Check that the theme_hues dir has been created with 0755 permissions. Then test changes and see if it works.

Thanks for your patience!

pribeh’s picture

I'm experiencing the same on 1.5. :(

I've tried this on a fresh copy of my site and triple-checked that everything is in order permission-wise.

Thanks so much for your hard work though aacraig.

[updated] Wow, so weird but I just realized that the selector properties aren't changing when viewing the user's own profile if you have "User Content" selected under the Theme Hue admin. So at least I see the changes taking effect when I view another user's profile whose changed their selector properties.

pribeh’s picture

Actually, on second glance, my last update doesn't happen on each fresh install of the module. It happened once that I could see the changes of another user's theme hue configuration.

aacraig’s picture

What is the style visibility? Global to all users? User content only?

ongdesign’s picture

Thanks -- the problem is resolved in this update! I appreciate all your work and troubleshooting!

pribeh’s picture

I have "User Content" only. I've tried uninstalling and reinstalling several times. I wish I had the same luck as ongdesign.

aacraig’s picture

Are you having the identical problem?

pribeh’s picture

Well, it is the same problem as that of described above but more specifically it is the same as http://drupal.org/node/587132 ... I'll stop posting in this thread and try posting in that one.

aacraig’s picture

Status: Active » Closed (fixed)
tgldesign’s picture

when i want to edit a selector in a rule set, it doesn't save when I click save changes. the only way around this is to delete the entire rule set and rewrite all the selectors with the changes I need. It could get annoying if I had a lot of selectors. i am using the latest release 6.x-2.0 2011-May-25

Great module btw