Hello.
I am having this problem.
I am using Phlox Theme.
plugins:
Advanced TinyMCE Configuration
Cloudflare
Code Snippets
CSS Plus
Jetpack by WordPress.com
Livemesh SiteOrigin Widgets
Loginizer
Master Slider Pro
Microthemer
Page Builder by SiteOrigin
Phlox Core Elements
Post Snippets
Reusable Content & Text Blocks by Loomisoft
SEO by SQUIRRLY
SG Optimizer
SiteOrigin Premium
SiteOrigin Widgets Bundle
Sticky Menu (or Anything!) on Scroll
TinyMCE Advanced
Website Tools by AddThis
WP Dashboard Notes
WP Rollback
WPML Multilingual CMS
WPML String Translation
thanks,
.pat
Hello Pat,
in your case it seems to be due to the CSS Plus plugin. We’ll try within the next days to make a compatibility for the plugins, if that is possible.
Thank you for informing me about it and for sharing the list of active plugins.
Hi Pat,
would you please update to the 3.6 version and see if the problem is solved?
Hello Diana.
That did it! It works now. Thank you. I had too much code in the other plugin to easily deactivate it.
all the best,
.p
Hi Diana Burduja.
I ran into a related problem where my child-theme was using code-mirror. At first I tried to just dequeue all the CodeMirror scrips loaded by “Simple Custom CSS and JS”. This worked fine untill I realized that in “ccj_admin.js”, not only the editor is initialized, but there is also other functions for your plugin.
Would be great if you can put your CodeMirror “initialization” in a separate file, so if we need to we can just completely dequeue your CodeMirror scripts and styles.
I did get it all working though, letting your CodeMirror load, and preventing my by using a ‘if’ function before I enqueued my CodeMirror scripts and styles like this:
if (!wp_script_is( 'ccj_admin', $list = 'enqueued' )) {
//"Simple Custom CSS and JS" is not loaded here
}
Note the above was inside:
add_action( 'admin_enqueue_scripts', 'enqueue_codemirror_scripts' );
Thanks!
Reinhard
Hello Reinhard,
would you please let me know what theme and child-theme are you using? Maybe I can have a look into it.
The CodeMirror library loaded by the Simple Custom CSS and JS plugin is limited only to the “Add Custom Code” admin pages. I find this a good practice in order to avoid any conflicts with other plugins.
I would suggest to you to limit the theme’s JS and CSS assets to only required admin pages. This is definitely an easier solution to your problem.
You can check the theme’s admin_enqueue_scripts hook and write the following at the beginning of the function:
$screen = get_current_screen();
// Not for custom-css-js post type
if ( $screen->post_type == 'custom-css-js' )
return false;
Here is how it’s supposed to look like:
add_action('admin_enqueue_scripts', 'child_theme_admin_enqueue_script');
function child_theme_admin_enqueue_script() {
$screen = get_current_screen();
// Not for custom-css-js post type
if ( $screen->post_type == 'custom-css-js' )
return false;
// The rest of the function's code ...
}
Thank you Diana that is going to work perfectly. It is just a custom child theme that I am busy making for Genesis, and I loaded CodeMirror onto all post.php pages. I didn’t think about using “post_type == ‘custom-css-js'”, that feels so much cleaner than checking if a script is enqueued. Also thank you for the great plug-in.