(I saw something for a 6.x-1.x-dev, but since that's not what I'm using, here's a new request.)

Sweaver seems to work fine so long as I'm logged in as admin (user/1), but after I publish my changes, see them fine as admin, I log out to anonymous, and I still see the same old theme I had before without the effects of Sweaver.

One thing I noticed in the page source is that no Sweaver files are loaded for anonymous users. I double-checked the readme files, but best I can tell, I've installed everything (including jquery 1.6) correctly.

Could this be some sort of permissions issue or a module configuration issue? Pretty sure it's not, but I'm open to any suggestions. However, I've never patched a module (not sure if that's a good idea that would fit in with Drupal best practices or not - I'm paranoid) and I especially don't like the idea of hacking core and hacking someone's module (mostly cause that's a pain to keep to up with).

Ok, that's it for now! (:

- Drew


Allow me to reword for clarity:
Sweaver seems to work almost perfectly for me. The only problem is that anonymous users cannot see the Sweaver-modified theme. The anonymous user sees only the base theme I started with. It seems that Sweaver-related files aren't being loaded for anonymous users? Is there a configuration or permission setting that keep anonymous users from being able to view published Sweaver CSS changes?

Please let me know if my question needs further explanation or if I need to provide more details.

Thank you! (:

anon user stuff could be cached, have you cleared the cache?

Version:6.x-1.1» 7.x-1.1

I have the same experience with sweaver under drupal 7. When I log out, the changes ren not visible.

Version:7.x-1.1» 6.x-1.x-dev

The same problem here! followed all normal actions like clearing caches under Drupal 6.2, but no success!

Not sure if this is correct, but I noticed that sweaver wasn't able to write to the directory /sites/example.com/files/sweaver/ . I simply made the directory writable and it solved the problem of changes not being visible to anonymous users.

Status:Active» Fixed

The comment in #5 are correct. You will need write permissions in the /sites/default/files/sweaver/ directory. Could you please check if that solves your issues?

Status:Fixed» Closed (fixed)

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

Priority:Normal» Major
Status:Closed (fixed)» Active

Sorry for opening this issue again. I think the problem is still existing and connected with using the private files system.

Version:6.x-1.x-dev» 7.x-1.x-dev

OK ... the private file system was probably not the problem.

Priority:Major» Normal

Check the perms on the folder as stated in previous comments.

Done ... but that doesn't solve the problem; or am I wrong?
My private files system path: sites/default/files/private.
(see: http://drupal.org/documentation/modules/file)

fact is, if your private files are in the public root, they aren't private. Merely obfuscated with a system path. That path can still be used by calling it directly in the browser. For truly private files the folder they are stored in should be above the public root where the url can't just be given to others. Though this isn't your issue and is outside the scope.

Drupal 7 allows for a public and a private file system to run at the same time. Thus I'd make sure my overall is public allowing modules like sweaver and ctools to add their CSS to the public files folder. IMO it doesn't make any sense to have certain files put in a private file system.

I'm beyond the ability to switch back to a private file system and dig any deeper. I'd suggest a fresh install as a test site to work through this issue.

The path can't be used by calling it directly because of the generated .htaccess file. See the documentation: http://drupal.org/documentation/modules/file:

The best practice for public files is to store them in the multi-site directory like:


The default way to securely add a a private directory for your files is simply to create a sub-directory under this directory like:


You can simply specify the private directory in admin/config/media/file-system and it will automatically create the sub-directory & create a simple .htaccess file with Deny from all.This stops Apache from serving files from this directory.

I understand what the doc says. however, moving the folder above the public root is superior IMO.

you can test on your own the trading of the path and calling the path as a logged in user. Drupal has been putting a .htaccess in the files folder since before the splitting of the private and public file system.

if the htaccess is denying the serving of files from it, then it is likely that is why anon users aren't being served the sweaver css files. Hence why I don't understand why they aren't being stored publicly since there is no reason to protect them in the first place.

best of luck.

Sorry for opening this issue again. I think the problem is still existing and connected with using the private files system.

I too am having this problem.

I've performed a fresh install of Drupal 7.12 and configured it to use the private file system. Next, I installed the current recommended versions of ctools 7.x-1.0-rc1 and sweaver 7.x-1.1.

As administrator, I make changes to the background colour of the front page and clicked Save and Publish. After logging out, the homepage reverts to the "default" Drupal page with the original background colour.

To confirm it was not a permissions problem, I checked the private file system directory (set to "../private" in Configuration > Media > File System; located outside of Drupal's installation). Running "ls -al" on the command line revealed a directory called "sweaver" with 775 permissions owned by www-data:www-data. Inside the "sweaver" directory, there were 2 files "sweaver_bartik_1_draft.css" and "sweaver_bartik_1_live.css". Therefore, there were no problems with permissions as sweaver can write files into the "sweaver" directory.

To test if the problem is due to Drupal configuration being set to private file system, I logged back in as administrator and changed the Default download method to "Public local files served by the webserver". I went back to the homepage, changed the size of the text, and clicked Save and Publish. After logging out, IT WORKED! I was presented with the resized text on the homepage as per changes I made above.

To confirm it was saving the CSS files in the public file system, I opened sites/mydomain.com/files/sweaver and saw 2 files "sweaver_bartik_2_draft.css" and "sweaver_bartik_2_live.css"!

So I guess my question is, why is Sweaver saving the CSS files in the private file system where it cannot serve files to anonymous users? I'm sure there are a lot of users out there using the Sweaver module and the private file system who will experience the same problem. Is there a way for Sweaver to default to using the public file system?

PS - I also tried the development version of sweaver 7.x-1.x-dev (2012-Mar-06) but the same problem occurs.

i have this problem too.
I hope to see a new stable version of sweaver soon

new963 bytes

I'm not familiar with this issue so stop me if I'm wrong. But as long as anonymous users cannot access to private files, sweaver should always write css into public directory.

Therefore this simple patch should work just fine.
Again I don't have a fresh install of drupal with a private file system set up. Therefore you will to test it yourselves.

I'm not familiar with this issue so stop me if I'm wrong. But as long as anonymous users cannot access to private files, sweaver should always write css into public directory.

Therefore this simple patch should work just fine.
Again I don't have a fresh install of drupal with a private file system set up. Therefore you will to test it yourselves.

Thanks for your speedy response to this issue Quentin! Much appreciated!

I tested your patch (1156482-18.patch) using both the recommended version - sweaver 7.x-1.1, as well as the current development version - sweaver 7.x-1.x-dev (2012-Mar-13). Unfortunately, it doesn't work as expected. After clicking Save and Publish, "sweaver_bartik_1_draft.css" and "sweaver_bartik_1_live.css" are now stored in sites/mydomain.com/files/sweaver, and the ../private/sweaver directory is empty. But when I log out of admin, the theme reverts back to its original colours.

If I change the file system to public, sweaver works normally. And any changes to the theme are also saved to sites/mydomain.com/files/sweaver.

After applying the patch and enabling the sweaver module, I noticed that a "sweaver" directory was still being created in the private file system. I'm not sure why this is happening since all files should be stored in the public file system so it can be read by anonymous users.

So to sum up, it appears that the css files are being saved correctly in the public file system (as described in your patch file). However, sweaver is not "reading" the css files in the public file system _IF_ the Drupal configuration is set to use the private file system.

I hope this patch test & analysis helps resolve the problem.

I think you pinpointed the issue, Sweaver is still looking for the files in the private directory. I'll try to make a patch later today. If it is still not working I'll set up a fresh drupal environment on a server to check it ou myself.

new11.08 KB

Okay let see if this works.

If it does, I'm not sure that we will apply it this way in the next stable version, I'll check with others developers of this module.

Okay let see if this works.

If it does, I'm not sure that we will apply it this way in the next stable version, I'll check with others developers of this module.

It works! Patch tested fine against the latest dev version. Many thanks Quentin!!

I'm really looking forward to the next stable version with this patch applied (in one form or another) :-)

Status:Active» Fixed

Great to hear good news from you. The stable version should come very soon. Be patient !

Status:Fixed» Closed (fixed)

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

Downloaded the latest dev today and still I cannot see the changed I made as an anonymous user. The sites/all/files/sweaver dit is writable as I see images and css published there.

It appears that the styles are not outputted (is this correct English?), as I cannot see any of it in the output source.

Status:Closed (fixed)» Active

That is weird. How are permissions set on the folder public://sweaver ?

drwxrwxr-x are the folder settings of sites/default/files/sweaver

Hum that should work. Sorry to ask that but I have to rule that out. Are you sure you publish or save your changes before to log out ? Can you tell me what message is displayed when you publish a change ?

Yes I am pretty sure that I do that.

It says default style has been published (as I saved it with default as the name)

Some additional info:
Using Panels Everywhere and the precision base theme

I have no idea what's causing that for now. I'll get back to you as soon as I think of something.

Me neither. It's a brand new install as of today

Are you ready to do some debug work ? That can only be done if you are not in production stage because it will display unexpected messages to anonymous users.

No problem.... I really want this to work

The output is missing the following entry:
@import url("http://mysite.com/sites/default/files/sweaver/sweaver_template_1_live.cs...")

I copied this from another site of mine which is working well with sweaver.

I am ready to debug Quentin, what should I do next?

new943 bytes

Sorry for the delay, I had a lot of work to do.

Copy/Paste me the result of this patch.

Hi Quentin,

That doens't matter, I appreciate any help.

I applied the patch. What do I do next? Frontend looks the same...

As an anonymous user you should see raw data printed at the top of your website. I need you to copy paste these data.

There's nothing there.... Nothing different anyways....

Even with no style modification Sweaver should display

Style loaded :

Try cleaning the cache even if it shouldn't do anything we never know.

I'm kind of out because I was damn sure this would display something.

Hi Quentin,

Clearing the cache didn't help. It looks like somehow sweaver is not involved in frontend output, whilst it works fine in the backend/logged in.

I disabled Panels Everywhere's default site template, and there it was.... style loaded..

So it has something to do with Panels Everywhere. Which is strange, cause css injector works fine when Panels Everywhere is enabled.

Thanks for pinpointing the issue !

It is however very weird because I'm using Panels Everywhere's and I have no issue of that sort. I'm gonna spend some time today trying to figure this out.

Hi Quentin,

Can I do anything to help? I am no programmer, but I can give you an admin account on my site or so. Maybe it is the combination of PE and the Precision template or so?

I'm gonna try a couple of stuff on my own first but I'll gladly accept some help later. I'll get back to you.


I also posted the issue in the Precision queue


Additional info

Sweaver also doesn't wor with Versatile, Stark and Zen theme

So what is de common denominator here between these themes

I have no problem using sweaver on a zen theme.

Very weird Quentin,

I did a clean install, just to be sure. I just installed css_injector (which I assume has some kind of same mechanism to attach the css on the frontend output) and that worked on all themes.

Just to be sure, here's the list of used versions

Sweaver 7.x-1.3
CSS Injector 7.x-1.7
Chaos tools 7.x-1.0
Zen 7.x-5.1 (default theme)

Version:7.x-1.x-dev» 7.x-1.3

I have exactly this issue (using a WAMP server). Running OpenOutreach with a Fusion/Grenada theme. I tried to update to latest head. Not sure if it completed as I got a database error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

'DEFAULT NULL' at line 1

Note the write error could be related to WAMP but at this point I'm stumped.

Update. I'm using fusion and fusion_accelerator. Tried to remove and uninstall all modules. I then reinstalled with latest Head. When I save a new style, I get an error:
File public://xxx.png could not be copied because it would overwrite itself.

Another problem I have is that the theme settings seem to be ignored. This didn't happen previously, but since I've updated to latest HEAD if i add slogan, or anything else, the settings are ignored. I've basically "lost" my slogan even if i delete any property changes.

Sorry to reopen the initial problem from the first post; however, I've tried emptying the cache and granting write permissions on the sweaver files but the theme still reverts back to default for anonymous users. I've also tried merging the sweaver files into the theme css directory but that did not work. I've tried copying the code from the sweaver files and pasting it into style.css but that did not work as well.

If anyone has any ideas, or if I need to provide additional detail, please let me know:)

Can you indicate your environment. Are you running on windows WAMP by any chance?

Thanks for your response:) No, I am not running on windows WAMP. Can you elaborate on what you mean by environment? I had drupal 7.14 installed a couple of days ago along with other modules.

I don't know if this information helps, but anonymous users do see certain changes with sweaver, such as font changes and border styles. Color, resizing, and various other style changes are not working though. Weird.

Same issue here. I'm using a Drupal Gardens theme (Kenwood) and it looks great when logged in. However, when I log out, all changes are gone.

Please help.

Hi, I am having this same issue. A backed up copy of my site does not exhibit the bad behavior. I took a fresh copy of the live site off line to play around with it on localhost and I noticed the following: When I would give anonymous users permission to edit the site using sweaver, they could see all sweaver changes no problem. I saved and published, so far so good, but when I took away the permissions again, I was back to the problem that anonymous users could not see sweaver styling. Not sure if this helps.

I'm having the same issues. Some changes show up and others don't (for anonymous users). Ater further research, the correct css is in the sweaver_styles table in the database, but the css published to the site is missing content. The issue seems to be related to the publication process. It's not permissions since Sweaver is able to write the css files. It seems like it just stopped working after a few uses.

I just applied the CTools update and the problem is corrected.

Applying the CTools update worked for me as well, but changes don't publish if Sweaver is disabled, or stops working.

It seems that Sweaver does not restart after the site is closed. I'm still not sure how to manually restart it, except by un/reinstalling--disabling doesn't help.

Well, after updating CTools and seeing all my Sweaver settings apply to my site I was excited, but the joy was fleeting. Since the update, none of my additional styling is being published. As before, as the administrator I see the changes, but anonymous users don't. The CSS generated by Sweaver is missing all new style changes. What am I missing? Are there unpublished incompatibilities with other modules that I need to address?

Category:support» bug

Same issue here as well. What I can confirm though is that by manually adding the CSS changes in the Sweaver CSS live files the changes do show up for Anonymous users. The problem seems to be correctly identified in post #56 by JRightmer. The Sweaver CSS is not getting published.

I am currently on

Drupal 7.15
Sweaver 7.x-1.3
Chaos Tools 7.x-1.2

Omega 7.x-3.1

Sweaver creates 2 CSS files for me in sites/default/files/sweaver


What I assume should happen here is that when you click save in sweaver it saves to sweaver_omega_1_draft.css and when you click save & publish or just publish it saves to sweaver_omega_1_live.css. In my case none of these files are getting updated. My guess is the admin user gets to see sweaver in action from the database and not from any of the css files that are generated. I also guess that sweaver_omega_1_live.css is the one that is being used for anon users. So i went ahead and made the CSS changes in this file. I then cleared the cache and it worked. The changes showed up for anon users. So try the below and see if this works as a temporary solution for you till this is fixed

- Identify your live sweaver CSS File
- Manually Add the CSS changes in this file
- Clear Cache
- test as anon user

Hopefully this works !

new992 bytes

OK guys, sorry for the delay but I'm now ready to get my hands into this.

This is certainly due to the same error expressed in #1691344: css file could not be created. In aim to progress on this one I'll need you to tell me the PHP version you're running on. And you can try the following patch proposed by PHP to solve this issue.

Hi, i can't patch!
the output is;

$ patch -p0 < 1156482-61.patch
can't find file to patch at input line 12
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|commit 1c1f4baf984d93abdf4cd02b446236ce91c2c92f
|Author: Quentin Albrand <quentin.albrand@gmail.com>
|Date:   Thu Aug 30 12:41:13 2012 +0200
|    #1156482 : Solution proposed in
|    http://www.php.net/manual/fr/function.fopen.php#95455
|diff --git a/plugins/sweaver_plugin_styles/sweaver_plugin_styles.inc b/plugins/                                         sweaver_plugin_styles/sweaver_plugin_styles.inc
|index 983d850..fb334af 100644
|--- a/plugins/sweaver_plugin_styles/sweaver_plugin_styles.inc
|+++ b/plugins/sweaver_plugin_styles/sweaver_plugin_styles.inc
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored

can i have some istruction?

As said in http://drupal.org/node/1399218 to apply a patch you are supposed to run the command :
wget -q -O - http://drupal.org/files/1156482-61.patch | git apply -

But of course you need to be running this command inside the correct git directory.

thanks for your response!but i have drupal 6 and not seems to work!

Then you need to open a new issue. This issue is tagged for Drupal 7.

Hi, I applied the patch, but still have the issue.
Running PHP version 5.3.3-7+squeeze14.

Hi mtasks, I have tried your solution, but still the page display for anon users and logged users is different, even after clearing caches.
However in my case, the CSS files ARE actually written by sweaver into /sites/default/files/sweaver.
Also anon users can read the css file: I have checked that they could directly access http://www.EXAMPLE-SITE.com/sites/default/files/sweaver/CSS-FILE.css

So I am still stuck here...

Other info: it seems that the changes made under the "Custom CSS" form of Sweaver are the only ones that are not saved under http://www.EXAMPLE-SITE.com/sites/default/files/sweaver/CSS-FILE.css.
All the other changes made with Sweaver seem to be saved normally.

I have a similar problem, but the custom CSS is not even saved to the database (look in sweaver_style > custom_css).

Stats show over 2000 sites using this module - does anyone have a clue why this is affecting a few of us? checked permissions.

I actually encountered similar issues with custom css code, first it was a permission issue, but after fixing that in my case there was a second issue with my css code, it was a case of relative links to images/files going wrong.

After some tinkering with Firebug/Chrome DOM editor i got the right relative links working and the issue was gone.

Title:Sweaver changes do not appear for anonymous usertext-shadow:none; not written to sweaver/*_live.css file
Version:7.x-1.3» 7.x-1.x-dev
Component:Miscellaneous» Code
Priority:Normal» Major
new264.91 KB

In my case, the CUSTOM CSS property text-shadow:none;isn't being written to the sweaver/*_live.css file. Do I have to add it to EDITOR > PROPERTIES? If so, I don't quite understand how to use that feature - can anyone offer some direction?

Other filtered out properties:
outline: 14px solid rgba(116, 88, 122, 0.63);

See screen grab below: