CSS editor won't save anything

Nothing gets saved in the CSS editor. After I hit “save changes” it just takes me to a blank page with the path: Archive Iraq

When I go back into the CSS Editor after, it’s just blank.

Any idea why this is happening?

What style are you trying to save? There’s filtering on the styles, and styles and elements the filter doesn’t know about can be removed.

I’m trying to position an image using the top and right styles.

I saw HTML filters in the settings, but not CSS. Where do I make those adjustments?

By the way, this is to create hyperlinked flag icons to make the site multilingual. This is a short-term fix until I can figure out how to place the icons in the header of the theme.

Can you share the actual CSS you tried to save?

There isn’t really a configuration for what the CSS Editor allows, but it’s limited by the HTML Purifier library that’s being used to filter the styles.

.lang {
  top:0;
  right:0;
}

I wanted to assign the class .lang to a couple of hyperlinked flag images (to select language options) and position them at the top right corner of the page.

This code isn’t being stripped out for me. Are you able to get anything else working using the CSS Editor? Something simple, like

body {
font-size:24px
}

should be immediately noticeable.

I think from your description of saving the CSS Editor taking you to a white/blank screen, we’ve found the issue you were having, and should have a fix for it in place. I’ll update you when we have an updated version available.

Yes, that worked! But it still doesn’t seem to work for classes or ids. Would I have to add classes and ids to the HTML filter?

I’m seeing the same thing as @RossCaputi : a blank screen after trying to configure the CSS Editor. This is with v1.1 of the plugin and Omeka Classic 3.0.3, and with the body font test from @AllanaMayer.

I was planning to tweak the Seasons theme, e.g.:

.winter body {
color: black;
}

When you say “that worked,” what did you do that worked? And when you say it still doesn’t work for classes, what’s it doing wrong in that case?

When the plugin is working properly, you shouldn’t have a problem with using classes or IDs in the CSS you input.

The new CSS Editor version, 1.2, should resolve the problems people are reporting here with the configure form leading to a white screen and not saving the CSS. It also makes some additional small updates to the allowed styles and some other small improvements.

Thank you very much, John. v1.2 is working for me. This is beyond the call of duty on a Friday evening :slight_smile:

I was still on v1.1 when I said it worked. All I did was copy and paste the line of code that Allana shared into the CSS Editor and hit save. Then when I went back into the plugin, the code was still there.

I didn’t have the same success when I tried to use a class as a selector. But leaving that aside for a moment, because I’ve upgraded to v1.2 and now it’s not saving my code again. It’s not sending me to a white screen like before. I entered:

div,p,h1,h2,h3,h4,li {
direction:rtl;
}

And then hit save. I exited the plugin and then went back in, and this was all that was save:

div,p,h1,h2,h3,h4,li {
}

Any idea why?

What you’re experiencing there is the editor working “correctly”: we use a filtering library on the CSS, and I believe it doesn’t allow the direction rule.

You can make edits to the theme CSS files directly in cases where CSS Editor doesn’t work well for what you need.

1 Like

Thanks, but the results are similar to the solution offered by @ebellempire to add the dir="rtl" attribute to the HTML tag in the header.php file. Adding a direction:rtl; rule to the styles.css file gives the correct results on the web page, but it doesn’t do anything to the HTML editor. It’s more tedious, but I find it less disorienting to use the style attribute within paragraph and div tags in the HTML editor so I can see where the punctuation where will fall.

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.