WordPress 4.8 editor “Failed to load content css”
-
After updating to WordPress 4.8, editing a post causes a floating error message to appear at the top of the editor saying that it could not load the theme’s editor-style sheet. The message says, “Failed to load content css: https://mydomain.com/wp-content/themes/mytheme/assets/css/editor-style.css”
Setup:
- WordPress 4.8 on Ubuntu w/ Apache2
- Twentyseventeen theme installed
- Using child theme of Twentyseventeen.
- The file mentioned above does exist.
- The child theme was working fine and did not produce this error before the update of WordPress and the Twentyseventeen theme.
- The strangest part is that I can confirm that the css file in question is being downloaded by the browser and is having an effect on the editor. The actual URL being generated by WP is: https://mydomain.com/wp-content/themes/mytheme/assets/css/editor-style.css?wp-mce-4603-20170530
- This is the editor style code in my child theme’s functions.php file:
function child_theme_setup() { add_editor_style(array( get_stylesheet_directory_uri() . '/assets/css/editor-style.css', child_theme_fonts_url() )); } add_action('after_setup_theme', 'child_theme_setup', 99);
- The topic ‘WordPress 4.8 editor “Failed to load content css”’ is closed to new replies.