Support » Fixing WordPress » editor-styles-wrapper class not applied to editor-styles css

  • Resolved mluzvdb

    (@mluzvdb)


    I use the gutenberg editor with some custom styling applied in the backend. These css files are added with editor-styles.

    So I have added editor-styles theme support:

       
    add_theme_support( 'editor-styles' );
    

    and I load the stylesheet with the add_editor_style() function. I do this in the after_setup_theme.

    Everything works fine on my localhost, and also on my (online) test server. I can see the custom styling and it is prefixed with the .editor-styles-wrapper in the body as expected.

    But now I moved this website to the live webserver and the editor-styles css files are loaded with a 200 status, but there is no prefixed version of them in the body. I cannot find any other case like this.

    The server configuration of the live server and test server are identical.

    What could be causing this problem?

    • This topic was modified 2 years, 5 months ago by mluzvdb.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Jorge Costa

    (@jorgefilipecosta)

    Hi @mluzvdb,
    Thank you for sharing this issue you are facing!

    Does your live server have any plugins installed that compress stylesheets/minimizes them or otherwise change them in some way?
    Is there any plugin that is installed on the live server and not on the test server?
    Is the live server using any service that may interact with the requests (e.g., Cloudflare) and the test server not using that service?

    Thank you in advance for providing these additional insights that may be useful in debugging this issue.

    Thread Starter mluzvdb

    (@mluzvdb)

    Hi @jorgefilipecosta ,

    Thank you for your fast reply!

    I do have the WP fastest cache plugin installed. However this plugin is installed on both the test environment as the live. I also played around with the settings already and unchecked all css related features on the live server (so the files are not combined or minified).

    The files that are loaded are minified by my own preprocessor. But again, these files on live are identical to the test and localhost.

    Thread Starter mluzvdb

    (@mluzvdb)

    In addition to the previous explanations: The stylesheets that I load with add_editor_style() are loaded in the tinyMCE wysiwyg editors when editing a block, but not in the gutenberg blocks editor column on the edit page.

    So I do see the stylesheets being loaded with a status 200 initiated by tinymce.min.js in the network console. But there is no version of these files in an inlined style block in the body where it should be prefixed by the .editor-styles-wrapper class.

    Thread Starter mluzvdb

    (@mluzvdb)

    I’ve found the problem.
    There was a problem with the SSL root certificate.

    Loading the stylesheets in the wp-admin/edit-form-blocks.php file gave cURL error 60: SSL certificate problem: unable to get local issuer certificate as a response.

    After reinstalling the root certificate everything works like a charm!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘editor-styles-wrapper class not applied to editor-styles css’ is closed to new replies.