Plone site doesn't load base.css anymore, and layout is screwed - css

a few days ago on our site we've enabled ploneFormGen, and after that they layout of the page got screwed, with portlet columns having different widths for headers and items.
I have a backup, whose layout was fine, but content is old, so i'm trying to fix the current site instead.
After doing a lot of comparisons between current site and backup, i realised that while the main template and custom.css are exactly the same, the current site (the screwed one) seems to apply only custom.css according to firebug, while the backup was applying also base.css.
at this stage i'm a bit lost because i have no idea of where i can check why base.css is not applied anymore. Anybody has any clue?
the site is http://www.isf-firenze.org.
thanks!

http://www.isf-firenze.org/base.css
return an empty file. I think you've a problem with portal_css. Try to switch on/off the development mode, or check if there's an empty base.css in portal_skins/custom.

Check portal_css (from the ZMI) if base.css is enabled.
Also note that in development mode, all the CSS files are served separately, but in production mode, CSS files are merged and compressed. The URLs for the merged resources are based on the first CSS file included in the bundle, so a URL ending in custom-cachekey1234.css could still also include base.css. You can see if resources are merged in the portal_css tool (checkbox at the top of the page).

Related

How to get Plone's CSS Registry to load new CSS files

I'm trying to upgrade a Plone 3.3.5 server to 4.3.6. However, when I update the site, I find that the CSS for the site is not carried over. If I go to my CSS Registry, I find that almost all of my CSS is producing the (resource not found or not accessible) error.
My confusion seems to be in how Plone locates and links/imports stylesheets in general as Plone seems to be loading virtually none of my CSS and pretty much giving me raw HTML in the browser. I'm assuming the CSS registry is loading CSS from the buildout-cache. With this assumption, an example stylesheet that I'm targeting is located under:
Plone/buildout-cache/eggs/Products.NuPlone-1.0b3-py2.7.egg/Products/NuPlone/skins/nuplone_styles/base.css
When the CSS Registry failed to load this, I noticed that some CSS was being loaded in via handles like this:
++resource++tinymce.stylesheets/tinymce.css
But this format doesn't work with base.css and others.
So my question is, given I've got a new product installed with some CSS included in it, how do I get Plone to target said CSS?
For resources inside "skins" FS folders, the way to register on portal_css tool is to simply provide the filename, so simply put there base.css.
If this is not working probably the nuplone_styles skin folder is not registered properly in the portal_skins tool.
So go to ZMI --> portal_skins --> click on "Properties" and check the following:
what theme is used? You must probably switch back to NuPlone (but I'm not sure if it works on Plone 4)
is the nuplone_styles folder in the list of CMF layers of the used theme?
Please note also that adding the nuplone_styles layer to another theme is not a good idea. Please think about copying CSS you need in the custom directory.
This is not an answer, but some additional explanation, not fitting in a comment:
The "old" way to include style-sheets via skin-folders, requires to specify only the file-name, not a full path, and will be found by traversal, meaning the first found file with the according name, will be taken. In case of several files with the same name, the order of skins matters.
The other way is to register style-sheets via a browser-package, to have an unambiguous path to a certain file, they must start with +++resource++.

Search for a CSS file

A few hours ago I had to change the width and padding on a few divs on this page. I messed around with the developer tool of the browser for a few minutes to see what exactly I want to change. After I connected to the ftp I made the changes I thought were necessary, but I nothing happened. After banging my head for half an hour it turns out that I was making the changes to a cached version of the file. I asked the guy who gave me the task where the css file was, but he couldn't answer me.
So how do I find out where the css file is after I log into the ftp server? In this case there were multiple directories with multiple css files.
As you pointed out, the website uses a plugin to cache CSS files, and these cached files shouldn't be edited directly. It looks like the site is running Wordpress, in which case you'll need to look in the wp-content/themes folder (it will depend on which theme you're running where exactly the CSS file is). It's also often possible to edit the CSS directly from within the wordpress admin panel (Appearance > Editor)

Can't edit/work with compressed stylesheet (css) in Wordpress

There are two stylesheets for Wordpress theme - Trending:
style.dev.css (30kB) uncompressed ( „dev” means it’s for development).
style.css (23kB) compressed.
Doesn’t matter which file I change in many variations and upload through FTP it doesn’t work! That means layout takes no changes. Edited CSS, uploaded to the server but no change is taken.
Tried out many ways –
1.edited „style.dev.css”, loaded it to the server (don’t work), then renamed to „style.css” (still don’t work).
2.after editing „style.dev.css” compressed it and then loaded to the server (don’t work), then renamed to „style.css” (still don’t work).
when both are on server, server chooses the dev version „style.dev.css”, when I delete it, server jumps to „style.css”.
tried to edit one of them and then send to server (there is still no chage in layout).
Please someone give me a hint where the problem could be?
I have no idea where the problem could be, searched for a solution like for 2 days already.
Link to my site on which I'm working
At the moment your site is pointing to
<link rel="stylesheet" href="http://cfs-gometzlaville.fr/cfs/wp-content/themes/trending/style.css" type="text/css" media="all"> for its style, to replace the stylesheet you will need to rename the updated / modifed sheet AFTER you have named the orignal style.css to something like style_orig.css and then change the name of the updated / modifed file to style.css. Once you have done that you will need to reset the cache from any caching plugins that you use. If this still doesn't work clear your browser cache.
EDIT
If i change the style.css in the websites HTML to style.dev.css changes are made.
As an alternative maybe you should look at Child Theme's here as this will be much more manageable for you. All you will have to do is follow the instructions on the link and then copy and paste the css from your dev.css into the child themes css and it will override the parent styles.
The website is currently referencing style.dev.css, which doesn't exist. It could be a problem with some caching plugin.
Read this page

Updated CSS not appearing in merged file

A skin.css file has been updated on a DotNetNuke website, but the updated change to the file has not yet come through on the main css file.
Tried clearing the cache within DNN and no luck...
I'm not overly familiar with DNN and how it works, but isn't it supposed to get merged into the rest of the CSS files with the DependencyHandler.axd. This does not seem to have happened.
Anyone any ideas?
When you say it isn't showing up in the Main.CSS file, I am going to assume you are using the CDF functionality in the platform. If so, you can go to the Host/Host Settings page, and look for the Client Dependency Framework portion of the settings.
In those settings you can "increase" the version number, which should cause the files to be regenerated, you can also turn off CDF to allow DNN to just load the CSS and JS files normally which generally makes debugging things a little bit easier.

Drupal: Multiple Stylesheets

I'm currently creating a custom Drupal theme for my company and I'm having trouble getting multiple stylesheets to load.
I followed the instructions on this page by adding stylesheets to the .info file in the format:
stylesheets[all][] = style.css
stylesheets[all][] = name2.css
etc...
However, when I load the page nothing changes and when I view source, it consistently lists style.css but seems to ignore the others. Am I misunderstood in the process of adding additional stylesheets? What could I be doing incorrectly?
Thanks for any help!
Make sure the ‘Optimize CSS files’ and ‘Caching mode’ settings on /admin/settings/performance are disabled. Try clearing the Drupal cache by hitting the ‘Clear cached data’ button on the bottom of that page.
Apart from the mentioned cache clear, You might also need to visit the theme-selection page once:
admin/build/themes/select
This is to make sure the .info-file gets read again (it's not read on every pageview if Drupal already read it beforo you modified it).
If you see the .css file in the source as "style.css", the CSS optimization is 'off' (when it's on the files have been aggregated to one or several css file with hashed filenames like 'css_1d74ed895e4b5634b0aa1e99c1d0a174.css').
Also, you don't have to turn CSS-optimization off, clearing the cache rebuilts it. While you develop the css files all the time though, it's best to turn if off so you don't have to clear the cache all the time. Turn it on after you're done, it's a really significant page-load booster (in fact IE css loader can break if you dont use the optimizer and have too many css files).
Just to make sure, the css-files should be in the same folder as the .info file (and not for example the parent theme of a subtheme).
PS: clearing cache is fast and easy with the excellent admin_menu module
( http://drupal.org/project/admin_menu ).

Resources