Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#34489 closed defect (bug) (duplicate)

WP oEmbed: The embed-template 404 condition isn't getting triggered for 404'd embeds

Reported by: drewapicture's profile DrewAPicture Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Embeds Keywords: needs-patch has-screenshots 2nd-opinion close
Focuses: Cc:

Description

When a post has been embedded and the permalinks have since been changed, an iframe with the 404 template for the embed site is displayed instead of triggering the 404 condition in embed-template.php.

Steps to reproduce:

  1. Create a post.
  2. Create a second post, embedding the first post.
  3. Change the site's permastruct to something else
  4. View the second post.

Expected: The 404 markup from embed-template.php
Actual: The general 404 markup for the the embed source site theme in an iframe.

Example post: http://wcpdx.trywpbeta.com/2015/10/testing-oembedding-of-posts/

Attachments (1)

34489_changed_permalinks.png (113.9 KB) - added by DrewAPicture 9 years ago.

Download all attachments as: .zip

Change History (12)

#1 @swissspidy
9 years ago

  • Owner set to swissspidy
  • Status changed from new to assigned

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


9 years ago

#3 @swissspidy
9 years ago

It looks like this falls back to what #4328 describes: When the permalink structure changes, WordPress doesn't catch this and properly redirect to the new structure.

You have the same problem with any other rewrite endpoint, e.g. when accessing the post's comment feed under the old permalink structure.

Too late to fix that scenario in this cycle though. On the other hand, we could treat the embed endpoint as a special case, always setting is_embed to true when /embed/ is found in the request URL.

I'm not really familiar with the rewrite component, so if anyone wants to help out, let me know.

Version 0, edited 9 years ago by swissspidy (next)

#4 @swissspidy
9 years ago

  • Owner swissspidy deleted

#5 @swissspidy
9 years ago

  • Keywords 2nd-opinion added

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


9 years ago

#7 @DrewAPicture
9 years ago

  • Milestone changed from 4.4 to Future Release

Punting pending further consideration of a good solution.

#8 @swissspidy
9 years ago

  • Keywords close added

Suggesting close in favour of #34489

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


9 years ago

#10 @swissspidy
9 years ago

Of course I meant another ticket yesterday. Suggesting close in favour of #4328.

#9825 and #27019 are also very similar. This bug mentioned here is not specific to embeds after all.

#11 @swissspidy
8 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #4328.

Note: See TracTickets for help on using tickets.