Support » Plugin: WP YouTube Lyte » Unmatched End Tag

  • Resolved martychc23

    (@martychc23)


    Hey Frank,

    I’m trying to diagnose and issue on Edge and wanted to rule something out.

    Edge console tells me there is an “unmatched end tag” and this appears to be in the code output by this plugin. Is there anyway to fix this?

    <p style="text-align: center;"><div class="lyte-wrapper" style="width:853px;max-width: 100%;margin:5px auto;"><div class="lyMe" id="WYL_nTnXI7uZbI0" itemprop="video" itemscope itemtype="http://schema.org/VideoObject"><meta itemprop="thumbnailUrl" content="https://i.ytimg.com/vi/nTnXI7uZbI0/hqdefault.jpg" /><meta itemprop="embedURL" content="http://www.youtube.com/embed/nTnXI7uZbI0" /><meta itemprop="uploadDate" content="2017-09-14T15:53:28.000Z" /></p>

    Specifically, Edge is highlighting the closing paragraph tag as the issue, but not sure why that would be as it looks to be closing the p style tag

    </p>

Viewing 15 replies - 1 through 15 (of 30 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm, that opening p is not lyte’s, at lyte’s output starts with <div class="lyte-wrapper" (see https://github.com/futtta/wp-youtube-lyte/blob/master/wp-youtube-lyte.php#L299) @martychc23

    frank

    Ah, i think i may have added that in the code to make it centered. Which i realize now probably isn’t needed. Will double check this and get back to you.

    ok, it wasn’t what i thought it was. I tested it out on your site and also received the same error in Edge console.

    Testing this page https://blog.futtta.be/wp-youtube-lyte/ gives unmatched end tag warning, and it highlights the same </p> tag i was getting:

    <div class="lyte-wrapper" style="width:560px;max-width: 100%;margin:5px;"><div class="lyMe" id="WYL_riJJbPdCxBY" itemprop="video" itemscope itemtype="http://schema.org/VideoObject"><meta itemprop="thumbnailUrl" content="https://i.ytimg.com/vi/riJJbPdCxBY/hqdefault.jpg" /><meta itemprop="embedURL" content="http://www.youtube.com/embed/riJJbPdCxBY" /><meta itemprop="uploadDate" content="2006-10-21T06:59:59.000Z" /></p>

    The last </p> is highlighted as being the unmatched end tag.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, when looking at the HTML source I see;

            <meta itemprop="uploadDate" content="2017-09-04T16:00:02.000Z">
            <p></p>
            <div id="lyte_RrWuNUkSzI4" data-src="https://i.ytimg.com/vi/RrWuNUkSzI4/hqdefault.jpg" class="pL">

    so it’s an empty paragraph, but there clearly is an opening p-tag <p></p>. looks like an error on Edge’s part, no?

    There are 2 unmatched end tag warnings for your page. The first one relates to this code:

    <div class="lyte-wrapper" style="width:560px;max-width: 100%;margin:5px;"><div class="lyMe" id="WYL_riJJbPdCxBY" itemprop="video" itemscope itemtype="http://schema.org/VideoObject"><meta itemprop="thumbnailUrl" content="https://i.ytimg.com/vi/riJJbPdCxBY/hqdefault.jpg" /><meta itemprop="embedURL" content="http://www.youtube.com/embed/riJJbPdCxBY" /><meta itemprop="uploadDate" content="2006-10-21T06:59:59.000Z" /></p>

    I see a closing p tag but not an opening p tag. Maybe that’s causing the error?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I can see it, but not in the source code, so … weird. Based on the code this could be related to the captions info being added, can you try if this code snippet helps;
    add_filter( 'lyte_docaptions', '__return_false' );

    frank

    Filter didn’t work.

    Not sure why this is happening as tags look complete on my page source. But the issue is definitely caused by the plugin as when i disable it on my local install the error goes away in Edge console. It reappears when the plugin is enabled.

    Looks like a single tag that’s incomplete is being added somewhere. But yeah, weird, as it looks ok in the source.

    On my local install Edge flags up the last p tag, but from what i can see it isn’t incomplete:

    <p><noscript><a href="http://youtu.be/nTnXI7uZbI0"><img src="http://i.ytimg.com/vi/nTnXI7uZbI0/0.jpg" alt="" width="853" height="460" /><br />Watch this video on YouTube</a></noscript></div>
    </div>
    <div class="lL" style="max-width:100%;width:853px;margin:5px auto;"></div>
    </p>
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    and if you disable microdate in lyte’s settings (don’t forget to clear cache)?

    I tried disabling microdata before, that didn’t work either.

    I used Edge inprivate mode and also cleared the plugin cache.

    Error warning still remains.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I still have this on my to-do list @martychc23, but I will not have time to look into this soon I’m afraid. Eventually we will crack this though 🙂

    Hey, no worries. Just wanted to bring it to your attention. Certainly not an urgent issue, so take your time 🙂

    Hey,
    I have exactly the same problem with closing p tags are not opening.
    This problem cause an error with the httpv youtube url, witch appears like this: “https://youtube.com/watch?v=GKZcCpMofjM%22+”.
    It also causes problems of display.

    I read that you don’t have any time for looking into this, but I hope it will soon be possible !!!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, took me some time, but the problem is caused by WordPress core’s wpautop-function which aims to replace double-br’s with p-tags but does a whole lot more to accomplish this and which seems to malfunction when encountering noscript or meta tags both of which are in Lyte’s HTML output.

    To “fix” that I’ve committed a change that disables wpautop if lytes are found in the_content. Would be great if you could test this by downloading the developement-version of Lyte from github and installing that of the current one.

    frank

    martychc23

    (@martychc23)

    I tried the “master” copy of the plugin but still get the unmatched end tag warnings.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I suspect a page (or object) caching issue there, cfr. the situation on my own site (blog) now; https://blog.futtta.be/2013/04/17/music-from-our-tube-mina-tindle/?ao_noptimize=1 which (as far as I can tell) does not have the issue any more?

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