(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! (:
Thanks!
- Drew
Comment | File | Size | Author |
---|---|---|---|
#72 | 13 1-36 PM.jpg | 264.91 KB | polishyourimage |
#61 | 1156482-61.patch | 992 bytes | Anonymous (not verified) |
#36 | Debug-f-1.patch | 943 bytes | Anonymous (not verified) |
#21 | 1156482-21.patch | 11.08 KB | Anonymous (not verified) |
#18 | 1156482-18.patch | 963 bytes | Anonymous (not verified) |
Comments
Comment #1
drewvancamp CreditAttribution: drewvancamp commentedAllow 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! (:
Comment #2
VM CreditAttribution: VM commentedanon user stuff could be cached, have you cleared the cache?
Comment #3
parijke CreditAttribution: parijke commentedI have the same experience with sweaver under drupal 7. When I log out, the changes ren not visible.
Comment #4
msamavi CreditAttribution: msamavi commentedThe same problem here! followed all normal actions like clearing caches under Drupal 6.2, but no success!
Comment #5
gkunstman CreditAttribution: gkunstman commentedNot 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.
Comment #6
jyve CreditAttribution: jyve commentedThe 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?
Comment #8
DocuAnt CreditAttribution: DocuAnt commentedSorry for opening this issue again. I think the problem is still existing and connected with using the private files system.
Comment #9
DocuAnt CreditAttribution: DocuAnt commentedComment #10
DocuAnt CreditAttribution: DocuAnt commentedOK ... the private file system was probably not the problem.
Comment #11
VM CreditAttribution: VM commentedCheck the perms on the folder as stated in previous comments.
Comment #12
DocuAnt CreditAttribution: DocuAnt commentedDone ... 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)
Comment #13
VM CreditAttribution: VM commentedfact 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.
Comment #14
DocuAnt CreditAttribution: DocuAnt commentedThe path can't be used by calling it directly because of the generated .htaccess file. See the documentation: http://drupal.org/documentation/modules/file:
Comment #15
VM CreditAttribution: VM commentedI 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.
Comment #16
ryoken CreditAttribution: ryoken commentedI 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.
Comment #17
dropbydrop CreditAttribution: dropbydrop commentedi have this problem too.
I hope to see a new stable version of sweaver soon
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedI'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.
Comment #19
ryoken CreditAttribution: ryoken commentedThanks 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.
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedI 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.
Comment #21
Anonymous (not verified) CreditAttribution: Anonymous commentedOkay 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.
Comment #22
ryoken CreditAttribution: ryoken commentedIt 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) :-)
Comment #23
Anonymous (not verified) CreditAttribution: Anonymous commentedGreat to hear good news from you. The stable version should come very soon. Be patient !
Comment #25
parijke CreditAttribution: parijke commentedDownloaded 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.
Comment #26
parijke CreditAttribution: parijke commentedComment #27
Anonymous (not verified) CreditAttribution: Anonymous commentedThat is weird. How are permissions set on the folder public://sweaver ?
Comment #28
parijke CreditAttribution: parijke commenteddrwxrwxr-x are the folder settings of sites/default/files/sweaver
Comment #29
Anonymous (not verified) CreditAttribution: Anonymous commentedHum 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 ?
Comment #30
parijke CreditAttribution: parijke commentedYes 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
Comment #31
Anonymous (not verified) CreditAttribution: Anonymous commentedI have no idea what's causing that for now. I'll get back to you as soon as I think of something.
Comment #32
parijke CreditAttribution: parijke commentedMe neither. It's a brand new install as of today
Comment #33
Anonymous (not verified) CreditAttribution: Anonymous commentedAre 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.
Comment #34
parijke CreditAttribution: parijke commentedNo problem.... I really want this to work
Comment #35
parijke CreditAttribution: parijke commentedThe 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?
Comment #36
Anonymous (not verified) CreditAttribution: Anonymous commentedSorry for the delay, I had a lot of work to do.
Copy/Paste me the result of this patch.
Comment #37
parijke CreditAttribution: parijke commentedHi Quentin,
That doens't matter, I appreciate any help.
I applied the patch. What do I do next? Frontend looks the same...
Comment #38
Anonymous (not verified) CreditAttribution: Anonymous commentedAs an anonymous user you should see raw data printed at the top of your website. I need you to copy paste these data.
Comment #39
parijke CreditAttribution: parijke commentedThere's nothing there.... Nothing different anyways....
Comment #40
Anonymous (not verified) CreditAttribution: Anonymous commentedEven with no style modification Sweaver should display
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.
Comment #41
parijke CreditAttribution: parijke commentedHi 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.
Comment #42
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks 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.
Comment #43
parijke CreditAttribution: parijke commentedHi 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?
Comment #44
Anonymous (not verified) CreditAttribution: Anonymous commentedI'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.
Comment #45
parijke CreditAttribution: parijke commentedQuentin,
I also posted the issue in the Precision queue
http://drupal.org/node/1672220
Comment #46
parijke CreditAttribution: parijke commentedAdditional info
Sweaver also doesn't wor with Versatile, Stark and Zen theme
So what is de common denominator here between these themes
Comment #47
Anonymous (not verified) CreditAttribution: Anonymous commentedI have no problem using sweaver on a zen theme.
Comment #48
parijke CreditAttribution: parijke commentedVery 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)
Comment #49
sonicthoughts CreditAttribution: sonicthoughts commentedI 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.
Comment #50
sonicthoughts CreditAttribution: sonicthoughts commentedUpdate. 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.
Comment #51
Fireiceearth CreditAttribution: Fireiceearth commentedSorry 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:)
Comment #52
sonicthoughts CreditAttribution: sonicthoughts commentedCan you indicate your environment. Are you running on windows WAMP by any chance?
Comment #53
Fireiceearth CreditAttribution: Fireiceearth commentedThanks 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.
Comment #54
Phil.Jones CreditAttribution: Phil.Jones commentedSame 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.
Comment #55
jvsteiner CreditAttribution: jvsteiner commentedHi, 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.
Comment #56
JRightmer CreditAttribution: JRightmer commentedI'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.
Comment #57
JRightmer CreditAttribution: JRightmer commentedI just applied the CTools update and the problem is corrected.
Comment #58
Phil.Jones CreditAttribution: Phil.Jones commentedApplying 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.
Comment #59
JRightmer CreditAttribution: JRightmer commentedWell, 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?
Comment #60
mtasks CreditAttribution: mtasks commentedSame 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
sweaver_omega_1_draft.css
sweaver_omega_1_live.css
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 !
-
Comment #61
Anonymous (not verified) CreditAttribution: Anonymous commentedOK 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.
Comment #62
Spada CreditAttribution: Spada commentedHi, i can't patch!
the output is;
can i have some istruction?
thanks!
Comment #63
Anonymous (not verified) CreditAttribution: Anonymous commentedAs 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.
Comment #64
Spada CreditAttribution: Spada commentedthanks for your response!but i have drupal 6 and not seems to work!
Comment #65
Anonymous (not verified) CreditAttribution: Anonymous commentedThen you need to open a new issue. This issue is tagged for Drupal 7.
Comment #66
Louis Bob CreditAttribution: Louis Bob commentedHi, I applied the patch, but still have the issue.
Running PHP version 5.3.3-7+squeeze14.
Comment #67
Louis Bob CreditAttribution: Louis Bob commentedHi 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...
Comment #68
Louis Bob CreditAttribution: Louis Bob commentedOther 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.
Comment #69
tricasse CreditAttribution: tricasse commentedI have a similar problem, but the custom CSS is not even saved to the database (look in sweaver_style > custom_css).
Comment #70
sonicthoughts CreditAttribution: sonicthoughts commentedStats show over 2000 sites using this module - does anyone have a clue why this is affecting a few of us? checked permissions.
Comment #71
hcderaad CreditAttribution: hcderaad commentedI 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.
Comment #72
polishyourimage CreditAttribution: polishyourimage commentedIn my case, the CUSTOM CSS property
text-shadow:none;
isn't being written to thesweaver/*_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:
https://www.evernote.com/shard/s249/sh/e6db8811-02bc-4601-b8cd-bd4670c72...
Comment #73
dagomar CreditAttribution: dagomar commented@polishyourimage
This is a loooooong time ago that you posted, but for future reference, you can add css properties here:
admin/config/user-interface/sweaver
Add text-shadow to Allowed Properties.
Comment #74
batigolixReverting title from before #72 . I think the old title covers better what has been discussed here