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

Imgur post embed gives 404 error #4697

Closed
dharmin opened this issue May 13, 2020 · 2 comments · Fixed by #5485
Closed

Imgur post embed gives 404 error #4697

dharmin opened this issue May 13, 2020 · 2 comments · Fixed by #5485
Assignees
Labels
Bug Something isn't working Changelogged Whether the issue/PR has been added to release notes. Embeds WS:Core Work stream for Plugin core
Milestone

Comments

@dharmin
Copy link

dharmin commented May 13, 2020

Bug Description

The Imgur post embed generates AMP tag, it uses post id as data-imgur-id, and it creates incorrect embed URL: https://imgur.com/2q6AS6i/embed?pub so it’s not displayed on the AMP page.

<amp-imgur
    data-imgur-id="2q6AS6i"
    layout="responsive"
    width="540"
    height="633"
  >
  </amp-imgur>

In the official AMP documentation, there is no information available for Imgur post embed.
https://amp.dev/documentation/components/amp-imgur/

And there is a merged PR to add the support for Imgur posts:
ampproject/amphtml#23829

Expected Behaviour

The Imgur post embed should generate data-imgur-id as a/<post_id>. It generates the correct embed URL https://imgur.com/a/2q6AS6i/embed?pub.

<amp-imgur
    data-imgur-id="a/2q6AS6i"
    layout="responsive"
    width="540"
    height="633"
  >
  </amp-imgur>

Steps to reproduce

  1. Edit/Create WordPress post.
  2. Add an Imgur post URL. eg. https://imgur.com/gallery/2q6AS6i
  3. Submit the post.
  4. View it on AMP mode

Screenshots

C3r0URGdKN

Additional context

  • WordPress version: 5.4
  • Plugin version: 1.5.3
  • AMP plugin template mode: Standad
  • PHP version: 7.4
  • OS: Windows 10
  • Browser: Google Chrome

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

@pierlon
Copy link
Contributor

pierlon commented May 13, 2020

Hi @dharmin,

Thanks for raising this issue. This will be accounted for in #4650.

@pierlon pierlon self-assigned this May 21, 2020
@pierlon pierlon added Bug Something isn't working WS:Core Work stream for Plugin core Embeds labels May 21, 2020
@westonruter westonruter added this to the v1.7 milestone Jun 26, 2020
@pierlon pierlon modified the milestones: v2.1, v2.0.5 Oct 9, 2020
@pierlon pierlon self-assigned this Oct 14, 2020
@pierlon
Copy link
Contributor

pierlon commented Oct 14, 2020

When embedding the URL https://imgur.com/gallery/2q6AS6i, it does correctly show on the AMP page:

image

@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Oct 14, 2020
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. Embeds WS:Core Work stream for Plugin core
Projects
None yet
3 participants