Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#34354 closed defect (bug) (wontfix)

Embeds endpoint not working after switching permalinks

Reported by: pbearne's profile pbearne Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Embeds Keywords: close
Focuses: Cc:

Description

I just set the permalinks back to the default /?p=1219 format and the iframes is still pointing to the /eb/embed/ URL so we get the fall through

I don't know if we can catch this but I post this just in case someone can work out a way.

Attachments (3)

embeds.PNG (62.9 KB) - added by pbearne 9 years ago.
screenshot show the iframe
embeds.2.PNG (32.3 KB) - added by pbearne 9 years ago.
this still shows in the editor after I added a link in the ?post=12312 embed
embeds.3.PNG (38.9 KB) - added by pbearne 9 years ago.
I can even edit it

Download all attachments as: .zip

Change History (8)

@pbearne
9 years ago

screenshot show the iframe

@pbearne
9 years ago

this still shows in the editor after I added a link in the ?post=12312 embed

@pbearne
9 years ago

I can even edit it

#1 @swissspidy
9 years ago

  • Summary changed from WP embed show admin bar with default permalinks to Embeds endpoint not working after switching permalinks

#2 @swissspidy
9 years ago

I just set the permalinks back to the default /?p=1219 format and the iframes is still pointing to the /eb/embed/ URL so we get the fall through.

That's because oEmbed responses ( the <iframe> embed code) are cached. WordPress doesn't know if an embed code is for your own site and therefore can't change it. Besides that, none of your pretty permalinks will work when you switch back to ugly permalinks. That is not limited to embeds.

Since oEmbed responses are cached, invalid responses won't suddenly begin to work. You'd need to clear the oEmbed cache during development, e.g. by using WP_Embed::delete_oembed_caches() or by deleting the rows manually from postmeta tables.

#3 @swissspidy
9 years ago

  • Keywords close added

#4 @johnbillion
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

If you change your permalink structure back to the default, all of your permalinks break, not just the /embed endpoint. I don't think anyone can expect them to continue to work in this situation.

It does appear, though, that canonical redirects don't take endpoints into consideration, which means if you change your permalink structure to something else (except the default), the endpoint (such as /embed) gets stripped from the redirect. This probably needs its own ticket.

Note: See TracTickets for help on using tickets.