Main.css changes reverting back to original

I have been trying to make changes to the main.css file that comes with a blank Treepl site and within a few minutes of changing it in the admin console or uploading it via FTP, it defaults back to the original.

For example I want to make the gallery images 25% width instead of 33.33% and update the file, refresh the page and it works. A few minutes later it has gone back to 33.33% again.

I am also having the problem that making some changes to this file in the File Manager, it doesn’t allow you to change some of the numbers ie. I can’t change 33.33% to 25% as it wants to make the ‘5’ a ‘3’ so I can only make it 23%. Really strange stuff…

Hi @SiroccoDigital.

The files in cms-assets may get overridden at anytime (system updates, etc) so it’s not advisable to edit these. I’d make your own css file and override and styles that way.

Regarding the weird number changing issue, I assume you’re editing the minified version. I’ve experienced a similar effect (even in BC) when the editor has a very very long line of code and it seems to offset the visual display of text to what you are actually editing. So I’m guessing it’s not that you can’t change a 3 to a 5 but rather your cursor is in a displaced position to the text you are seeing.
Does that seem to be the case for you?

@Adam.Wilson I have setup a new css to control the gallery slider and this has worked well to fix the problem. You are correct that the minified version of the file in the file manager is the one I was working on and was causing this issue. Now that I have a separate css to control this it is no longer an issue for me. Thank you for providing the solution to this so promptly.

As Adam said, the “cms-assets” folder is a system folder. This folder stores information for default items. This files can be rewritten during system update ,update default items or throughout the operation of the site. To avoid the loss of the created content, it is recommended to create your own files (preferably in a different custom folder).

Thanks for the confirmation @Denis.l I will keep this in mind in new site builds.

Is this still the case? As I’m having trouble saving my .css file in “cms-assets” through ftp.
So I should create a completely seperate folder /assests/css and not import anything in “cms-assets”?

Correct @luke, I wouldn’t touch the cms-assets directory.

1 Like