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

removal of instagram providor breaks proxy requests #9331

Closed
aaronjorbin opened this issue Apr 17, 2018 · 8 comments
Closed

removal of instagram providor breaks proxy requests #9331

aaronjorbin opened this issue Apr 17, 2018 · 8 comments
Assignees
Labels
[Feature] Shortcodes / Embeds [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Pri] High [Type] Bug When a feature is broken and / or not performing as intended

Comments

@aaronjorbin
Copy link

This is easiest to see inside Gutenberg.

Essentially, the removal of the instagram providor in jetpack/modules/shortcodes/instagram.php is causing the instagram matcher to not be present in WP_Embed:get_providor during oembed proxy REST requests such as /wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.instagram.com %2Fp%2FBbba7EYljLv%2F

To reproduce, make sure the instagram shortcode is active in Jetpack ( Not sure how to do that, maybe it's a default?) and try to embed an instagram post into Gutenebrg.

see the related Gutenberg issue: WordPress/gutenberg#3499

@stale
Copy link

stale bot commented Oct 15, 2018

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@stale stale bot added the [Status] Stale label Oct 15, 2018
@jeherve
Copy link
Member

jeherve commented Oct 15, 2018

The bug seems to be gone now, thanks to WordPress/gutenberg#6345

Closing.

@jeherve jeherve closed this as completed Oct 15, 2018
@Ipstenu
Copy link

Ipstenu commented Dec 7, 2018

This bug is happening again :( @jeherve should this be reopened?

@jeherve
Copy link
Member

jeherve commented Dec 7, 2018

Yes, I can reproduce as well right now. Reopening.

Here are some steps to reproduce:
https://videopress.com/v/LrJhFm5r

This was tested with this Instagram URL:
https://www.instagram.com/p/BnMO9vRleEx

To make sure the Shortcodes module is active on your site, you can go to yoursite.com/wp-admin/admin.php?page=jetpack_modules.

@jeherve jeherve reopened this Dec 7, 2018
@stale stale bot removed the [Status] Stale label Dec 7, 2018
@jeherve jeherve added [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Pri] High and removed [Pri] Normal labels Dec 7, 2018
@jeherve jeherve added this to the 6.9 milestone Dec 7, 2018
@mattions
Copy link

@jeherve can confirm: with shortcode embedding from jetpack switched off it works like a charm.

@jeherve jeherve self-assigned this Jan 2, 2019
jeherve added a commit that referenced this issue Jan 2, 2019
Fixes #9331

When using the block editor, let's rely on core's Instagram embed method. We don't really need to
overwrite it to use our own there.
@jeherve jeherve modified the milestones: 6.9, 7.0 Jan 3, 2019
@jeherve jeherve modified the milestones: 7.0, 7.1 Jan 25, 2019
@eurello
Copy link

eurello commented Feb 15, 2019

Note for my reference that this was also reported in #1700941-zen.

@jeherve jeherve removed this from the 7.1 milestone Feb 21, 2019
jeherve added a commit that referenced this issue Feb 25, 2019
#### Changes proposed in this Pull Request:

This updates our custom embed provider to support Instagram TV URLs, just like Core will soon: https://core.trac.wordpress.org/changeset/44486

I also took the opportunity to add some Unit Tests for Instagram, we did not have any before.

#### Testing instructions:

* Try adding the following URLs to a brand new post, and see that they all get transformed into embeds on publish:
```
A classic IG embed

https://www.instagram.com/p/BnMOk_FFsxg/

A TV IG embed

https://www.instagram.com/tv/BkQjCfsBIzi/

A profile alternative picture IG embed

https://www.instagram.com/jeherve/p/BnMO9vRleEx/

A profile alternative video IG embed

https://www.instagram.com/instagram/tv/BkQjCfsBIzi/

An Instagram shortcode

[instagram url="http://instagram.com/p/BnMO9vRleEx/"]
```
* I would recommend testing this with the Classic Editor, because Instagram Embeds are currently broken in the block editor (see #9331)

#### Proposed changelog entry for your changes:

*  Instagram: update embed to support Instagram TV URLs


Co-authored-by: David Biňovec <david.binovec@gmail.com>
@joemcgill
Copy link

joemcgill commented Jul 20, 2020

Ran into this today and while waiting on a fix to land, this gist seems like a decent workaround: https://gist.github.com/joemcgill/765c9ed02185c11f7c957bd3ef8bd0ae

@jeherve
Copy link
Member

jeherve commented Oct 13, 2020

Closing this, since the Instagram provider will be removed from Core soon:
https://core.trac.wordpress.org/changeset/44486

@jeherve jeherve closed this as completed Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Shortcodes / Embeds [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants