• Resolved acann

    (@acann)


    I just activated AMP 0.3.2 on WordPress 4.5.2, and also Glue For Yoast SEO & AMP 0.3.2

    Google Search Console informs me that I have errors which prevent the AMP pages from being indexed. They are all for:

    The attribute ‘rel’ may not appear in tag ‘div’

    When I go in dev tools of Google Chrome, it appears to be within a div that is part of Elegant Themes Monarch Plugin.

    For example:

    <ul class="et_social_icons_container">
    	<li class="et_social_pinterest">
    		<div data-social_link="mydomain.com" rel="nofollow" class="et_social_share" data-social_name="pinterest" data-social_type="media" data-post_id="7221" data-location="media">
    		<i class="et_social_icon et_social_icon_pinterest"></i>
    			<span class="et_social_overlay"></span>
    		</div>
    	</li>
    </ul>

    Should the AMP plugin strip this rel=”nofollow” out? Or do I need to contact Elegant Themes support? What is my next step?

    Thanks for any help you can offer.

    https://www.ads-software.com/plugins/amp/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,
    yes, the rel=nofollow tag is intended for anchor links, not divs.

    They are doing a clever background link thing for the button, but that’s not technically proper usage of that tag. Meaning, they are making the div the link, but the rel=nofollow on the div as a link is what is throwing that off.

    AMP plugin does not manage anchor links or tags unrelated to amp.

    Thread Starter acann

    (@acann)

    Thanks, I was able to edit (with their assistance) the monarch.php file to remove those tags and now it seems to be indexing the AMP pages properly. Thanks for your help!

    Hi Acann,

    I’m having the same rel-problem with monarch. Can you share your solution or point me to the right place please? Your fix doesn’t seem to be included in the production version of monarch (I have no update notices, so should have the most recent version).

    In my case the divs are added after each image in blog-posts, showing the share-links of monarch, but not as funtional links. Monarch (or an amp-plugin, I don’t know) seems to add the ul with the monach share links after the image before the link end-tag, but the normal links are divs in stat of tags and cause this error.

    I understand from you it is a monarch problem and not a problem of the amp-plugins.

    Thanks,

    Hans

    Thread Starter acann

    (@acann)

    Hi Hans, sure here is the excerpt from the ET post (you can find it in the ET forum by searching for “Monarch Issue with AMP Plugin” and it should be in the first few results (look for the post with that exact title).

    Instructions from Elegant Themes:

    Please open monarch.php file and remove the rel only from this code:
    <div data-social_link="%3$s" rel="nofollow" class="et_social_share" data-social_name="%1$s" data-social_type="%4$s" data-post_id="%5$s" data-location="%6$s">

    and from this one:
    <div rel="nofollow" class="et_social_open_all" data-location="%1$s" data-page_id="%2$s" data-permalink="%3$s" data-title="%4$s" data-media="%5$s">

    It shouldn’t impact with anything else, I guess this code can be completely removed from Monarch. I will add this issue into our issues list, our Dev team will check it.

    Just to be clear, you remove the entire text rel="nofollow"

    As for the production Monarch, that response was in July, and I’ve yet to see this making it’s way into a Monarch release so I have been manually doing it after each update.

    • This reply was modified 8 years, 5 months ago by acann.

    HI Acan,

    Thanks for sharing. I found while looking at the problem, that it seems to occur at my website only at the buttons to share images. Since those links aren’t even performing as links anymore in the amp-pages, I decided to just stop putting share-buttons on images. Since they are just decorative anyway, it is no big issue to leave them out on the non-amp-version of the content.

    I haven’t further looked into the monarch-program, but I quess Monarch might use js to change the divs into link-tags. I don’t know why they do it that way, probably something to do with hovering above the image. The normal inline share-buttons are indeed link-tags, so don’t have this issue.

    On my websites the images are wrapped in link-tags themselves (to the full version of the image), so the divs then become part of this link instead of linking to the social networks. Removing the rel-attribute won’t change that and becomes confusing. It would be better if Monarch had some option to stop this buttons from appearing on amp-versions of the page al together. Having the links show without being functional, doesn’t seem an attractive alternative.

    I have seen that the rel=nofollow problem with amp has been reported and commented on several times in the support forum of elegant themes, and they just acknowledge that the plugin has issues with amp. So like you, I don’t think a solution will come soon. It will not yet be important to them to fix.

    Thanks again,
    Hans

    • This reply was modified 8 years, 5 months ago by Hans Schuijff.

    By the way… the Bloom plugin also has a problem with the inline forms, since the form is removed by the amp-plugin a lot of divs and the headings aren’t removed and still are visible. Some css to hide the et_bloom_inline_form class will do the trick there.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘AMP Error The attribute 'rel' may not appear in tag 'div'’ is closed to new replies.