Support » Plugin: Meow Lightbox » For broken HTML / other issues

  • ResolvedPlugin Author Jordy Meow

    (@tigroumeow)


    Hello,

    To make the debug easier, please install the plugin called “Code Snippets” and drop this code into it:

    update_option( 'mwl_obmode', true );
    update_option( 'mwl_parsing_engine', 'HtmlDomParser' );
    update_option( 'mwl_rendering_mode', 'rewrite' );

    It only needs to be run once, and it set the settings used by the Meow Lightbox. Those options above are quite safe, and they are not the default ones currently. To get back to the defaults, please use this.

    update_option( 'mwl_obmode', false );
    update_option( 'mwl_parsing_engine', 'DiDom' );
    update_option( 'mwl_rendering_mode', 'rewrite' );

    Basically, it’s better to avoid the OB mode. Without it, however, the Meow Lightbox will only analyze the content of the page/post (not the whole page). DiDom and HtmlDomParser are DOM parsers. DiDom is faster, but if your HTML is somehow badly formatted (it happens, it can be anything even though it looks fine), it might break it even more (actually by making it technically correct). In that case, HtmlDomParser is a safer solution.

    The mwl_rendering_mode can be set to ‘replace’ as well, you can try it too. If you use the OB mode, the rendering mode will be forced to ‘rewrite’.

    Please let me know here which solution works for you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Blamedutchie

    (@blamedutchie)

    Hi Jordy,

    After running the snippet, the lightbox works where it previously did not. However, now my debug log gets flooded with:

    PHP Notice:  Undefined offset: 1 in /xxx/yyyy/zzzzzz/wp-content/plugins/meow-lightbox/mwl_core.php on line 415
    
    PHP Notice:  Undefined offset: 2 in /xxx/yyyy/zzzzzz/wp-content/plugins/meow-lightbox/mwl_core.php on line 415

    [line 415:]$html = $matches[0] . $matches[1] . $mwlData . $matches[2];

    With the mwl_rendering_mode set to replace the lightbox no-show remains.

    Plugin Author Jordy Meow

    (@tigroumeow)

    That is strange… could you try to remove the PREG_SPLIT_NO_EMPTY part, at the line 414? So that would look like this:

    $matches = preg_split('/(<body.*?>)/i', $html, -1, PREG_SPLIT_DELIM_CAPTURE);

    Let me know if that works for you 🙂

    Blamedutchie

    (@blamedutchie)

    Took it out, lightbox shows, but also still does the PHP Notice in debug.

    [ great photos, btw 😉 ]

    Plugin Author Jordy Meow

    (@tigroumeow)

    I worked on a new version, which will fix this I think. Can you contact me directly? I would like to share it with you. Here: https://meowapps.com/contact

    done

    Hi Jordy

    It works perfectly! Thanks!

    Thanks, this fixed an issue for me where the h3 tag was being applied to the entire page.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.