userChrome.css - troubleshooting why it quit working Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Lew Rockwell Fan

userChrome.css - troubleshooting why it quit working

Unread post by Lew Rockwell Fan » 2020-02-05, 17:20

Something stopped my userChrome.css from having any effect. I didn't immediately notice it, so I'm not sure exactly when it happened but I know I didn't change the code. I also copied an old backup copy (from a previous profile that was working) over it. So that's not the cause. Firefox has (or had anyway) an about:config option to turn it on and off, but AFAIK, there is no such option in PM. Any suggestions as to what I should check would be appreciated. If I don't come up with anything less drastic, I'll switch back to a copy of an earlier profile and copy item by item from this profile over the corresponding items in that one till I break it, but I was hoping there might be something simpler to try.

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: userChrome.css - troubleshooting why it quit working

Unread post by therube » 2020-02-06, 00:11

What did your .css do?
How about posting its' code?
I also copied an old backup copy (from a previous profile that was working) over it.
That's a copy of the .css file?
Not too clear, did that then work (in your existing Profile)?


As a test, create a new, clean Profile.
Copy the .css into it.
Open that new Profile.
Is the .css working as expected?

Lew Rockwell Fan

Re: userChrome.css - troubleshooting why it quit working

Unread post by Lew Rockwell Fan » 2020-02-06, 18:57

therube wrote:
2020-02-06, 00:11
As a test, create a new, clean Profile.
Copy the .css into it.
Open that new Profile.
Is the .css working as expected?
Thanks. Perfect. I made the new profile and copied elements of the old over, using preserve and backup options to cp. With a lot of repetitions, restarts, and trial and error, I've gotten to here, which is almost a solution:

I can remove all files from the new profile directory, leaving an empty directory and then copy all files from an older profile over EXCEPT:

prefs.js

Then everything works, but of course I've lost tweaks that were presumably stored in that file. I'll look into starting from the old profile and see if I can find some way to export all the prefs stored there in a human readable list. as a guide to resetting them one by one in the new profile.

What happens when I overwrite the new profile's prefs.js with the old one is interesting. Works fine until I drag a button to the menu bar in the customize dialog. Then apparently PM writes to:

xulstore.json

And the new xulstore.json stops PM from recognizing my userChrome.css. It seems to be a valid json as far as I can tell with an automated checker at

https://jsonformatter.curiousconcept.com/

meaning it produces the same file whether I check the fix option or not. And it doesn't cause any other problem. I can over-write xulstore.json with a good copy and userChrome.css is recognized again - until I drag a button to the menu bar. If I over-write the prefs.js with a backup of the out-of-the-box original, it won't itself restore recognition of userChrome.css, but it will stop PM from breaking it every time I drag a button to the menu bar. So the partial fix is:

- a new OOTB prefs.js
- old copies of everything else except xulstore.json
- an older still copy of xulstore.json from before it broke

I say partial because I'm still haven't figured how to generate a list of prefs from the old profile that I can use to reset a few at a time in the new, until, presumably, I find one that's a problem. Some way more efficient that starting it and jotting down every pref I can find that I MIGHT have changed. If all the GUI prefs are reflected in about:config, that should be easy, but I don't know that they are.

Lew Rockwell Fan

Re: userChrome.css - troubleshooting why it quit working

Unread post by Lew Rockwell Fan » 2020-02-08, 03:58

OK, I gather the prefs.js file just stores prefs that either didn't exist or had different values in an OOB installation, but were added or changed either manually or by an extension. I never found a simple clean way to read it, nor to output about:config to a text file for easier comparison. I guess I could have dome some global replacements in an editor and some sed magic to turn it into a more human readable form, but it didn't seem worth the trouble. I just opened the old prefs.js with geany and read it raw. I left the ones I didn't recognize as ones I'd reset manually alone and gradually reset all the rest, expecting it to break at some point, but it never did.

Anyway, it works fine now and I've given up on figuring out WHY It broke beyond the fact that SOMETHING wrong in prefs.js was repeatedly corrupting xulstore.json whenever I used the customize dialog. And THAT somehow caused my css file not to be acted on. Obviously there are whys behind those whys that I'm curious about, but I've given up on them. Replacing those 2 files fixed it. And the bigger solution is to frequently back up the profile, manually or with FEBE. Not sure how I got away from that good habit. Thanks, therube.

Locked