Style editor has no edit box (firefox)

Hi!

When I try creating a new style from the toolbar button, there's no editor box displaying. Am using latest version and Firefox 49.0.1. I tried going back a few version of stylish but same problem.

Any ideas? Thanks!

Comments

  • How about if you go to the Add-ons page (Ctrl+Shift+a or Command+Shift+a), click User Styles in the left column, then click the Write New Style button above the list. Same problem?
  • Is it that it doesn't do anything at all or that you just can't see it? Stylish usually opens in a new tab, but you can change it to windowed mode too and I ran into a problem with that recently, which is why I ask. The window would "load" and appear on the taskbar, but wouldn't actually appear anywhere on the screen and nothing I did could "move" it into view. The fix for that is here, if that's what's happening for you: https://forum.userstyles.org/discussion/51403/window-mode-broken#latest

    Side note: is it just when you try to make a new style or does it happen when you try to edit and such too?
  • Jefferson: yes, same problem
    Novadestin: I see the buttons and the box to type in the name, but there's nothing under that where the edit box should be. I looked at about:config like in that link but my coords were not whack; and the option to "reset" is greyed out so I couldn't try that either. Same problem for new or edit.
  • Same here. See screenshot (using, F50.0)
    1229 x 693 - 30K
  • (1) Open Browser Console (ctrl+shift+j), 'Filter output' on "stylish" (or some part of it), and report any errors you see.
    (2) Open Inspector (ctrl+shift+c), click the area where the editor should be, expand as much of the DOM around that element as you can, and post a screenshot of Developer Tools.
  • This is the error I receive for the edit window:
    TypeError: cm is undefined
    Editor.prototype.getText()editor.js:533
    get value()edit.js:557
    save()edit.js:239
    oncommand()stylish-edit?code=%40namespace%20url(http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml)%3B%0A%0A%40-moz-document%20domain(%22example.com%22)%20%7B%0A%0A%7D:1
    1editor.js:533:7

    And the iframe's body in the edit window is empty:
    image

    1144 x 876 - 156K
  • abny solution for this? i've tried to add my own userstyle in that edit box and it is not working (I am not an IT person, please don't speak "coddish" - but I had 0 problems until today
  • sp00n82 said:

    This is the error I receive for the edit window:

    TypeError: cm is undefined                                            editor.js:533:7
    Editor.prototype.getText() resource://devtools/client/sourceeditor/editor.js:533
    get value() chrome://stylish/content/edit.js:557
    save() chrome://stylish/content/edit.js:239
    oncommand() about:stylish-edit?code=%40namespace%20url(http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml)%3B%0A%0A%40-moz-document%20domain(%22example.com%22)%20%7B%0A%0A%7D:1:1
    This is a problem with Firefox, not Stylish. Reading from the bottom up, you (1a) chose "Write new style > For example.com ..." from the toolbar button then (1b) clicked 'Save' or pressed ctrl+s, which (2) called Stylish's 'save()' function, which (3) read codeElementWrapper.value, which in turn (4) called getText() on the editor instance provided by Firefox, which (5) didn't exist.

    Maybe it's a bad Firefox installation. You could try re-installing it. Alternatively, follow the errors upstream until you find what's causing it, then file a bug report with Mozilla. Filtering for "editor.js" in the Browser Console should show an failure when the Stylish editor is initially opened.

    Oh, and that was good work. Very helpful.
    niahm said:

    I had 0 problems until today

    So what did you do differently today? You're still using Firefox 49 in Win7, so it isn't an upgrade issue.

    I never speak coddish. (Very fishy.) Hohowow aboboutot rorovoveror sospopeecochoh, tothohougoghoh? Itot isos a lolotot momorore fofunon.
  • I am running FF50.0 for Windows. And I get a screen like the one posted by paulo1b above. I haven't yet submitted a bug report for Mozilla or investigated further. Just wanted to make the community aware that the problem may be widespread with the latest FF version for Windows.
  • edited November 2016 Firefox

    I am yet another user who has the same issue as the others above.

    When I open Browser Console, this is the only error that comes up with filtering for stylish:

    DEPRECATION WARNING: This path to Loader.jsm is deprecated.  Please use Cu.import("resource://devtools/shared/Loader.jsm") to load this module.
    You may find more details about this deprecation at: https://bugzil.la/912121
    resource://gre/modules/devtools/Loader.jsm 19 null
    chrome://stylish/content/edit.js 7 null
    
  • pkiff said:

    Just wanted to make the community aware that the problem may be widespread with the latest FF version for Windows

    Not likely. In this thread half of the reports are from FF49 users, so FF50 isn't the problem per se. FF50 was released ten days ago, FF49 was released nine weeks ago, and here we have just six reports. Not a widespread problem.
    kazerniel said:

    When I open Browser Console, this is the only error that comes up with filtering for stylish:

    That warning is written by code at the old URI, which then loads the code from the new URI. It deserves attention, but it's not causing this failure.

    Can you filter on "editor.js"? The problem is that Firefox is failing to create an editor instance, and the Mozilla people will need to know where that's happening in their code if they're to have any hope of fixing it.
  • edited November 2016 Firefox
    I have the same problem but I realized that Stylish works if I disable NoScript. The latest version of NoScript is also blocking custom search engines for supposed XSS attacks, so it's probably a NoScript problem.

    (edit cont.)

    In the logs I found a few of these types of errors:
    "Security Error: Content at moz-nullprincipal:{33f4..09d5} may not load or link to chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.css"

    The NoScript false positive for XSS says:
    "NoScript filtered a possible cross-site scripting (XSS) attempt from [moz-nullprincipal:]."
  • edited November 2016 Firefox
    Can you filter on "editor.js"?

    Filtering for editor.js doesn't display any error.

    I have the same problem but I realized that Stylish works if I disable NoScript. The latest version of NoScript is also blocking custom search engines for supposed XSS attacks, so it's probably a NoScript problem.

    I tried whitelisting the edit page of Stylish on the NoScript XSS settings with the ^about:stylish-edit\?id=\d+ entry, but it didn't make any difference. (Also while I have NoScript, I have globally permitted scripts, if that's relevant.)

  • I had to disable the NoScript addon completely for it to work. I have found a workaround, though.

    After allowing scripts globally, go to the NoScript options and, under the 'Embeddings' tab, uncheck 'Block every object coming from sites marked as untrusted'. You can then load the editor and revert NoScript settings.
  • I have the same problem but I realized that Stylish works if I disable NoScript.

    I think we have a winner. NoScript + Stylish in a new profile fails as described.
    https://forums.informaction.com/viewtopic.php?f=10&t=22293&sid=a82e40b58bba64a6af84729943d7e666

    Fails in FF50, FF51 but not in FF52. Can you wait until March?

    In the logs I found a few of these types of errors:

    Yes, I see them too, but CodeMirror can work without a stylesheet. Perhaps NoScript is blocking script for the same reason without logging it in the console.
    kazerniel said:

    I tried whitelisting the edit page of Stylish on the NoScript XSS settings ... but it didn't make any difference.

    As I read it you'd want to whitelist the Firefox editor URIs, not the URIs that are loading them (also Firefox URIs; it's Firefox's calls that are failing, not Stylish's). However that doesn't work either.
  • After allowing scripts globally, go to the NoScript options and, under the 'Embeddings' tab, uncheck 'Block every object coming from sites marked as untrusted'. You can then load the editor and revert NoScript settings.

    I can confirm this solved it for me.

  • Yep, NoScript is the problem.

    Thanks, everyone! I'll go tinker with NoScript now, to get it to play nice. :)
  • The best solution is in the link that hideheader posted. In about:config, set extensions.stylish.editorWindowMode to 1. Thanks everyone from me as well!
  • The best solution is in the link that hideheader posted. In about:config, set extensions.stylish.editorWindowMode to 1. Thanks everyone from me as well!

    Yes!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    That fixed it in a second!
    Now stylish is in a separate window but that's not a real matter and it can prove to be even better!
  • The best solution is in the link that hideheader posted. In about:config, set extensions.stylish.editorWindowMode to 1. Thanks everyone from me as well!

    I can confirm this fixes the problem for me in Firefox 50 for Windows also.

Sign In or Register to comment.