Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured data broken by amphtml link relation in AMP-to-AMP linking #6599

Closed
milindmore22 opened this issue Sep 10, 2021 · 3 comments · Fixed by #6661
Closed

Structured data broken by amphtml link relation in AMP-to-AMP linking #6599

milindmore22 opened this issue Sep 10, 2021 · 3 comments · Fixed by #6661
Assignees
Labels
Bug Something isn't working Changelogged Whether the issue/PR has been added to release notes. P1 Medium priority Schema.org Metadata
Milestone

Comments

@milindmore22
Copy link
Collaborator

Bug Description

In a recent support topic, we found out that BreadCrumbList schema (RDFa) doesn't allow rel="amphtml" attributes and marks structured data as invalid, As per discussion on slack Weston suggested we don't need it.

Example HTML Snippet :

<div class="breadcrumb" typeof="BreadcrumbList" vocab="https://schema.org/">
	<span property="itemListElement" typeof="ListItem">
	    <a property="item" typeof="WebPage" title="Go to Visitor Guard®." href="https://www.example.com?amp" class="home" rel="amphtml">
	        <span property="name">
	            Home
	        </span>
	   </a>
	<meta property="position" content="1">
	</span>
	<span class="post post-page current-item">
	    The Page Title
	 </span>
</div>

Tests :

  1. Invalid Test
  2. Valid Test

Expected Behaviour

The page links should be served without "rel="amphtml" attributes.

Steps to reproduce

  1. Install and activate BreadCrumb Navxt Plugin
  2. Add Breadcrumb to your site
  3. Check the Structured Data on https://search.google.com/test/rich-results
  4. See error

Additional context

  • WordPress version: 5.8.1
  • Plugin version: 2.1.4
  • Gutenberg plugin version (if applicable):
  • AMP plugin template mode: Transional Mode / Reader Mode
  • PHP version: 7.4
  • OS: Mac
  • Browser: chrome, safari
  • Device: Macbook Air

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

@milindmore22 milindmore22 added the Bug Something isn't working label Sep 10, 2021
@westonruter
Copy link
Member

I've made an inquiry as to whether rel should indeed be invalid here.

@westonruter westonruter added this to the v2.2 milestone Oct 13, 2021
@westonruter
Copy link
Member

OK, we should indeed omit the amphtml relation. We can discontinue adding relations altogether. They aren't being used anwayway, so they're just extra decoration.

@milindmore22
Copy link
Collaborator Author

QA Passed

Input

<a rel="noreferrer noopener" href="https://amp-local.test/hello-world/" data-type="post" data-id="1" target="_blank">Internal Link to AMP Page – Should not have amphtml</a>

Output

<a rel="noreferrer noopener" href="https://amp-local.test/hello-world/amp/" data-type="post" data-id="1" target="_blank">Internal Link to AMP Page – Should not have amphtml</a>
Input amphtml nonamphtml Link Type
Internal Link to AMP page Removed N/A Link to AMP page
Internal Link to non-AMP Page Removed N/A Link to AMP Page ( redirects to non-AMP )
Internal Link with noamphtml attribute Removed Present Link with nonamp=mobile parameter
External Link Removed N/A No change
External Link with noamphtml attribute Removed Present No change

@westonruter westonruter changed the title Eliminate AMP to AMP linking attribute from links. Eliminate amphtml link relation from AMP-to-AMP linking Dec 15, 2021
@westonruter westonruter changed the title Eliminate amphtml link relation from AMP-to-AMP linking Structured data broken by amphtml link relation in AMP-to-AMP linking Dec 15, 2021
@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Changelogged Whether the issue/PR has been added to release notes. P1 Medium priority Schema.org Metadata
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants