WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wpGallery class instead of wp-gallery (3 posts)

  1. Manuel Schmalstieg
    Member
    Posted 1 year ago #

    Working on parallel on two sites running WP 3.6-beta3, I'm bumping into a very weird issue:

    On one of the two sites, Image Galleries are not displayed in the visual editor. They are just fine in the text mode.

    Inspecting the HTML, I see that the generated markup looks like this:
    <img class="wpGallery mceItem" data-mce-src="http://example.com/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif" src="http://example.com/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif" alt="" title="gallery ids="100,101,102"">

    This microscopic image does not get styled, so the gallery remains invisible in the editor.

    On the other site, the markup looks like this:
    <img class="wp-gallery mceItem" data-mce-src="http://example.org/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif" src="http://example.org/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif" alt="" title="gallery ids="100,101,102"">

    In the second case, the CSS class is wp-gallery instead of wpGallery, and it's getting properly styled.

    On the non-working style, I disabled all plugins, and reverted to the TwentyThirty theme : issue is still persisting.

    Pretty crazy, isn't it?

  2. Sergey Biryukov
    WordPress Dev
    Posted 1 year ago #

  3. Manuel Schmalstieg
    Member
    Posted 1 year ago #

    Ah, thanks for that.

    A browser dependent JS bug! Suddenly things make sense - I was running one site in Firefox (=was working), the other in Chrome.

    Also I had forgotten to set define('SCRIPT_DEBUG', true) on that 3.6-beta install. So the CSS was already updated to use "wp-gallery", while the compiled JS wasn't.

    Now it works in Chrome as well, it uses the "wp-gallery" class. Great!

Topic Closed

This topic has been closed to new replies.

About this Topic