Opened 12 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 | Owned by: | |
---|---|---|---|
Milestone: | 3.5.2 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Embeds | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
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 http://codex.wordpress.org/Embeds
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)
Change History (13)
#2
@
12 years ago
- Component changed from General to Embeds
- Milestone changed from Awaiting Review to 3.5.2
- Version set to 3.5
#4
@
12 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
@
12 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!
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: