Make WordPress Core

Opened 21 months ago

Closed 20 months ago

Last modified 20 months ago

#56733 closed defect (bug) (fixed)

oEmbed: Add support for Tumblr reader URLs

Reported by: pento's profile pento Owned by: pento's profile pento
Milestone: 6.1 Priority: normal
Severity: normal Version: 6.1
Component: Embeds Keywords: has-patch dev-reviewed
Focuses: Cc:

Description

We've supported Tumblr's blog network URLs since WP 4.2. Tumblr has since added a dashboard view, which WP currently doesn't support.

For example, this post embeds correctly, but the same post in the Tumblr dashboard doesn't embed.

Attachments (2)

56733.diff (1.0 KB) - added by pento 21 months ago.
56733.2.diff (1.2 KB) - added by pento 20 months ago.

Download all attachments as: .zip

Change History (13)

@pento
21 months ago

#1 @pento
21 months ago

  • Keywords has-patch added
  • Owner changed from Pento to pento

#2 @pento
21 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 54393:

Embeds: Add support for Tumblr Dashboard URLs.

WordPress has supported embedding Tumblr blog network posts since 4.2.0. This commit adds support for embedding posts using Tumblr Dashboard URLs.

Fixes #56733.

@pento
20 months ago

#3 @pento
20 months ago

  • Keywords needs-review added
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version set to trunk

Re-opening this ticket, as the original fix was incorrect: Tumblr just changed their URL structure. 🙃

I think it's reasonable to change the behaviour to rely on Tumblr's oEmbed endpoint to tell us whether this is a valid embed URL or not. (For example, trying to embed the embed endpoint correctly returns an error.)

This brings Gutenberg and WordPress core behaviour into line (once GB44854 is merged).

This ticket was mentioned in Slack in #core by chaion07. View the logs.


20 months ago

#5 @chaion07
20 months ago

  • Keywords needs-testing reporter-feedback added

Thanks @pento for reporting this. We reviewed this during a recent bug-scrub session. Here's the summary of the feedback received from the team:

  1. Adding keyword needs-testing as we feel that the ticket could benefit from some testing. Since this is a bug introduced during 6.1, it should probably be fixed. We are not as concerned with the GB PR not being merged yet.
  2. We may just punt it and if that is the case then there is a chance that 54393 may also be reverted.
  3. This Github Issue is also necessary. So folks from the Editor team should also weigh in.
  4. There is an updated patch available for testing.
  5. The Team finally decided to leave the ticket as is and possibly address after RC2 because it seems like a bug in the current implementation added in 6.1

Cheers!

Props to @desrosj @davidbaumwald @jorbin @jeffpaul @bernhard-reiter

Version 1, edited 20 months ago by chaion07 (previous) (next) (diff)

#6 @chaion07
20 months ago

  • Keywords reporter-feedback removed

Updating ticket as this keyword was added mistakenly. Thanks!

#7 @cbravobernal
20 months ago

The editor part PR is working fine when applying this patch.

https://github.com/WordPress/gutenberg/pull/44854#issuecomment-1283827792

#8 @Bernhard Reiter
20 months ago

  • Keywords dev-reviewed added; needs-review needs-testing removed

I've tested the updated patch. Note that WordPress caches oEmbeds (in the corresponding post’s post meta), so we’re taking that into account in the following instructions.

On trunk:

You should see the first URL properly expanded into the tumblr post’s oEmbed, but the second one un-expanded (just the URL).

  • Write down the post ID. We’ll refer to it as YOUR_POST_ID in the following.
  • In your terminal, verify that the post has oEmbed data cached in its post meta:
npm run env:cli post meta list YOUR_POST_ID
  • You should see a post meta table with a few entries starting with _oembed_. Something like
+---------+-----------------------------------------------+------------------------------------------------------------------------------------------+
| post_id | meta_key                                      | meta_value                                                                               |
+---------+-----------------------------------------------+------------------------------------------------------------------------------------------+
| 45      | _edit_lock                                    | 1666213351:1                                                                             |
| 45      | _oembed_1c805202e7bc7384a18e9127ac66fc0a      | <div class="tumblr-post" data-href="https://embed.tumblr.com/embed/post/vmmie3u7VrfQyfsJ |
|         |                                               | WrijkQ/696629352701493248" data-did="5d8c0d3a24e12f917cd50640525f7785fc206836"  ><a href |
|         |                                               | ="https://photomatt.tumblr.com/post/696629352701493248/why-go-nuts-show-nuts-doesnt-work |
|         |                                               | -in-2022">https://photomatt.tumblr.com/post/696629352701493248/why-go-nuts-show-nuts-doe |
|         |                                               | snt-work-in-2022</a></div><script async src="https://assets.tumblr.com/post.js"></script |
|         |                                               | >                                                                                        |
| 45      | _oembed_time_1c805202e7bc7384a18e9127ac66fc0a | 1666213194                                                                               |
| 45      | _oembed_897442790bd8799408ee0d764e295748      | {{unknown}}                                                                              |
+---------+-----------------------------------------------+------------------------------------------------------------------------------------------+
  • Now delete that post meta:
    npm run env:cli "post meta delete YOUR_POST_ID --all".
    
  • Apply the patch.
  • Reload the post on the frontend.

Verify that this time around, both URLs expand into their corresponding oEmbeds.

This ticket was mentioned in Slack in #core by bernhardreiter. View the logs.


20 months ago

#10 @pento
20 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 54652:

Embeds: Broaden the Tumblr oEmbed matcher to include all Tumblr URL structures.

Tumblr's oEmbed API correctly rejects invalid URLs, we can rely on that for the handful of cases that aren't embeddable URLs.

Props cbravobernal, bernhard-reiter.
Fixes #56733.

#11 @pento
20 months ago

In 54653:

Embeds: Broaden the Tumblr oEmbed matcher to include all Tumblr URL structures.

Tumblr's oEmbed API correctly rejects invalid URLs, we can rely on that for the handful of cases that aren't embeddable URLs.

Props cbravobernal, bernhard-reiter.
Merges [54652] to the 6.1 branch.
Fixes #56733.

Note: See TracTickets for help on using tickets.