Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After updating to version 7.x-2.4 my styles do not get applied to the WYSIWYG editor.
I'm using tinyMCE and I've set under Editor-CSS that it should take a theme and then I set my backend theme for the editor.
Comments
Comment #2
TwoDWhich version did you update from?
Does the account you're checking with have access to use the admin theme?
Make sure your server can make HTTP requests to itself.
As of 7.x-2.3 Wysiwyg gets the list of stylesheets by requesting an empty page which it has altered the delivery callback for. If this doesn't work you could run into issues like this one: #2861390: WYSIWYG profile adds 30 seconds to each editing form load time
I'm trying to come up with a semi-automated way to detect and work around this but I don't know exactly which server settings cause it yet.
What do you see if you go to the path
wysiwyg_theme/[THEME MACHINE NAME]
? This is the page which gets requested internally and it should give you an HTTP 200 status code and just the text 'OK'.Comment #3
maki3000 CreditAttribution: maki3000 commented>> Which version did you update from?
Sorry, I can't remember
>> Does the account you're checking with have access to use the admin theme?
I guess yes. Before it worked...
If i call
wysiwyg_theme/seven
, then there's an OK.Comment #4
maki3000 CreditAttribution: maki3000 commentedIt suddenly started working. Is it because i called
wysiwyg_theme/seven
?Comment #5
TwoDThat is likely, yes. The results gathered when that page is requested are cached and returned whenever Wysiwyg needs to know the list of stylesheets a specific theme loads.
If you clear the cache and reload a form with an editor on it, Wysiwyg will have to re-try the internal request to that path because the cache is empty. If that fails you'll most likely end up without any stylesheets loaded into the editor.
Check the Drupal/Apache/PHP logs if that happens to see if there are any clues.
Comment #6
tomsegarra CreditAttribution: tomsegarra commentedI had the same issue: after updating from 7.x-2.2, no stylesheets were being applied to the editor. The problem persisted even after clearing the cache multiple times. After manually visiting wysiwyg_theme/[THEME_MACHINE_NAME], it was fixed.
Comment #7
TwoDOk, then this is likely a server which can not make requests to itself directly. We've encountered this before and I there's a detailed explanation in #2874819: CSS from admin theme doesn't get applied so I'll mark this a duplicate of those to focus the effort a bit.