Less Compilation of Customized Barceloneta Pseudo-Failing: Plone 5.1.6

One thing that I run into frequently is difficulty making basic theme changes TTW. I'm running a custom theme based on Barceloneta in Plone 5.1.6, and often when making changes and then recompiling the less, compilation claims to succeed, but certain changes never make it into the actual compiled css.

Specific example:

We would like the background to be pure white (#ffffff) instead of off-white (#fafafa). This is defined in variables.plone.less in the following line:

@plone-body-bg: #ffffff; //pure-white

As you can see, I've modified it. When I then compile barceloneta.plone.less, it succeeds, but the page background colour remaind #fafafa. If I do a search-in-files for #fafafa it doesn't appear ANYWHERE in the theme except in barceloneta-compiled.css. You can see the search results here:

Annotation 2020-01-23 160818

This is just one example. Even some properties that I've modified in the past sometimes become "immutable" in this way. For example, I've added a custom background image to every page. If I go and modify the url of that image file that now, nothing changes, and the "compiled" css file still contains the reference to the old image file.

However, some changes do still work, so it's not completely failing. For example, I changed the colour of all h1 elements, and I just went and modified that, recompiled, and that worked.

Clearing the browser cache, clearing the site cache, stopping and restarting Plone, rebooting the whole server, etc., all fail to have any effect.

However, the code changes are also not being "lost" -- if I restart/reset everything and go back into "Modify theme", my changes still show up.

This is totally baffling to me. Any ideas or help, or pointers as to where I'd even begin to start tracking this down?

(Note: In the past, I had a similar issue that was resolved by pinning plone.resourceeditor to version 2.1.1, but it wasn't the same -- in that case, the compilation never completed. Here it completes and says it's succeeded but just doesn't actually change the values.)

I should note that after the upgrade to 5.2, this problem continues to exist.

Here's what I just did as a test:

I downloaded the Barceloneta theme to my local filesystem and search-and-replaced (manually checking each one to make sure it made sense) every instance of Barceloneta in every file in the entire theme with ksh (the name of the new theme), to ensure there were no references to the old Barceloneta theme at all. I also renamed all files with "barceloneta" in the filename accordingly. I then uploaded the theme back to the site with the new name and applied it. The result, of course, looked like Barceloneta.

I then tried changing @plone-body-bg in variables.plone.less from #fafafa to #ffffff. This didn't work.

I then did a Find in Files in the TTW theme customization panel and replaced every instance in every tile, including ksh-compiled.css and ksh-compiled.css.map. with #ffffff. This, of course, worked. There were now also no references in any file in the entire theme to #fafafa.

I then opened ksh.plone.less and compiled it.

Afterward, the background colour went back to #fafafa, and the ksh-compiled.css contained 8 instances of #fafafa. However, the code doesn't appear in any other file in the entire theme.

Where in the world is it pulling that from?

1 Like

Plone Foundation Code of Conduct