Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#23715 closed defect (bug) (fixed)

Plugins/Themes that rely on get_option('embed_autourls') may fail in 3.5.x

Reported by: standardbanter's profile standardbanter Owned by:
Milestone: 3.5.2 Priority: normal
Severity: normal Version: 3.5
Component: Embeds Keywords: has-patch commit fixed-major
Focuses: Cc:


After upgrading to WordPress 3.5. or greater from 3.4.x and below, the option "embed_autourls" will still exist in the database. Plugins or Themes that make assumptions based on this may fail as regardless of the answer, the actual behavior is that embed_autourls is always on per

WordPress will automatically turn that into a YouTube embed when the post is viewed. As of 3.5, Auto-embeds are automatically enabled and there is no setting to turn them off in the WordPress admin pages. Prior to 3.5, there was an "Auto-embeds" checkbox in Administration > Settings > Media SubPanel.

Backwards compatibility could be preserved if this option would always return true from 3.5.x onward. Perhaps removing this option (from all sites if multisite) as an upgrade step could be another solution (though terrifying) to at least have a consistent (though not helpful) return value. These are just ideas that come to mind.

I did a quick scan through the options code I didn't see a history of forcing an option to a specific value for historical purposes. I assume this ticket will likely result in a "won't fix" but I wanted to make a record of it in the event others search the bug database.

Thank you for your time!

Attachments (1)

23715.patch (697 bytes) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (13)

#1 @nacin
11 years ago

The upgrade routine improperly deletes autoembed_urls, instead of embed_autourls. (This was almost surely my mistake; I had done it elsewhere.)

Once the option is deleted, this code in default-filters.php takes care of it always returning true:

add_filter( 'default_option_embed_autourls', '__return_true' );

#2 @nacin
11 years ago

  • Component changed from General to Embeds
  • Milestone changed from Awaiting Review to 3.5.2
  • Version set to 3.5

#4 @SergeyBiryukov
11 years ago

  • Keywords has-patch added

#21719 references the wrong option name in ticket summary and description, looks like that's where the confusion came from.

#5 @standardbanter
11 years ago

I applied the patch to 3.5.1 and upgraded a copy of the 3.4.1 multisite install where I found the bug. I wrote a script to check each blog's value for get_option('embed_autourls') and verified that every site that registered "off" before the upgrade now registered "on" after the upgrade. I'd be happy to attach the script if helpful.

This patch appears to fix the problem described. Thanks!

#6 @SergeyBiryukov
11 years ago

  • Keywords commit added

#7 @nacin
11 years ago

In 23902:

Use correct option name when deleting embed_autourls. props SergeyBiryukov. see #23715.

#8 @nacin
11 years ago

  • Keywords fixed-major added

#9 @bpetty
11 years ago

What's stopping this from being committed on the 3.5 branch so we can close this out?

#10 @ryansatterfield
11 years ago

  • Cc r@… added

#11 @nacin
11 years ago

In 24438:

Use correct option name when deleting embed_autourls. props SergeyBiryukov. see #23715.

Merges [23902] to the 3.5 branch.

#12 @nacin
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.