• Hi,

    When loading Jetpack’s Custom CSS module (Appearance->Edit CSS), the editor is not loaded. Disabling the Use Google Libraries plugin makes the editor reappear.

    It seems this Jetpack module prefers to use a CodeMirror editor, but can fall back to a textarea if the CodeMirror editor is not available. It seems that in my case, it hides the textarea with id=”safecss”, because class=”hide-if-js”, but fails to load the CodeMirror editor, resulting in no editor at all.

    Strange thing is, I only see this behaviour on my live webserver, not on the local copy I’m running on MAMP.

    For both, I see GET requests for codemirror.min.css, use-codemirror.min.css, codemirror.min.js and use-codemirror.min.js being sent to my webserver/localhost (so not Google), all returning 200 OK.

    This is what Firefox Page Inspector shows me:

    From webserver (not working):

    <textarea id="safecss" class="hide-if-js" name="safecss">
    ...
    </textarea>
    <div class="clear"></div>

    From local MAMP (working):

    <textarea id="safecss" class="hide-if-js" name="safecss" style="height: 188px; display: none;">
    ...
    </textarea>
    <div class="CodeMirror cm-s-default CodeMirror-wrap" style="height: 270.5px;">
    ...
    </div>
    <div class="clear"></div>

    Thanks,
    Peter

    Webserver (not working):
    Apache/2.2.22 (Debian)
    PHP 5.4.35-0+deb7u2

    Local MAMP (working):
    Apache/2.2.26
    PHP 5.4.26

    Same for both:
    WordPress 4.0.1, JetPack 3.2.1, Use Google Libraries 1.6.2
    Other plugins: Akismet 3.0.3, Contact Form 7 4.0.2, Enable Media Replace 3.0.1, Google Analytics by Yoast 5.2.2, Jetpack by WordPress.com 3.2.1, Maintenance Mode 5.4, mqTranslate 2.9, Multipage canonical fix (own), Twenty Eleven Theme Extensions 1.2, Use Google Libraries 1.6.2, User Role Editor 4.17.3, WP-Optimize 1.8.9.7, WP Minify Fix 1.3.4 (problem also occurs when WP Minify Fix is disabled), WP Super Cache 1.4.2.
    Theme: Twenty Eleven 1.9 child theme
    Client used: Firefox 34.0.5

    https://wordpress.org/plugins/use-google-libraries/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jason Penney

    (@jczorkmid)

    Thanks for the details. Sounds like it might be due to an undefined dependency in script registration that doesn’t manifest when concatenation is used.

    Could you open the Firefox Web Console (Tools->Web Developer->Web Console) and reload the page both ways and let me know what (if any) output you see?

    Thread Starter Peter Nowee

    (@now77)

    Thanks for the quick reply. I’m posting here only the differences between loading from my remote webserver and loading from my local MAMP copy:

    Net
    Webserver (Edit CSS CodeMirror editor not showing)

    GET http://www.example.com/example/wp-includes/js/jquery/jquery.js [HTTP/1.1 200 OK 163ms]
    GET http://www.example.com/example/seriousceliac/wp-includes/js/jquery/ui/jquery.ui.core.min.js [HTTP/1.1 200 OK 156ms]

    (And yes, this is with the Use Google Libraries plugin enabled.)

    Local MAMP (Edit CSS CodeMirror editor showing)

    GET http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js [HTTP/1.1 200 OK 100ms]
    GET http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js [HTTP/1.1 200 OK 208ms]

    CSS
    A lot of the same warnings when loading from both webserver and local MAMP. Only difference is the order in which they are shown.

    JS
    Two identical warnings when loading from webserver or local MAMP. One additional warning on webserver (editor not showing):
    TypeError: a(...).sortable is not a function postbox.min.js:1

    Security
    Empty in both.

    Let me know if you need the detailed reports anyway and I will send them to you by email.

    Thanks,
    Peter

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Possible conflict with Jetpack Custom CSS CodeMirror editor’ is closed to new replies.