[wp-trac] [WordPress Trac] #43250: Instagram Links in posts are overlapping
WordPress Trac
noreply at wordpress.org
Mon Feb 26 16:20:18 UTC 2018
#43250: Instagram Links in posts are overlapping
--------------------------+----------------------
Reporter: jimgrant | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Embeds | Version: 4.9.4
Severity: normal | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Comment (by khromov):
@brittantley It's a self-contained plugin, so you can save it as a file
with any name in your `wp-content/plugins` directory, for example `/wp-
content/plugins/fix-instagram-oembed.php` and then activate it through
your admin control panel.
Some more background of the problem:
It seems to be multiple (possibly related) issues:
- Instagram oEmbeds return different javascript script tags, and it seems
arbitrary, the two I've seen and that the snippets attempts to fix are
are:
* `instagram.com/embed.js`
* `platform.instagram.com/<locale>/embeds.js`
- `embed.js` and `embeds.js` cause javascript errors when enqueued
simultaneously.
- `embeds.js` seems to cause javascript errors by itself when enqueued
multiple times.
The HTML markup does not differ. My workaround gist posted earlier detects
when multiple Instagram embeds are enqueued, strips the script tags for
each individual embed and then adds one call to `instagram.com/embed.js`
in the footer, which is the script that seems to work reliably.
The @ocean90 fix works by fixing the CSS to make the post appear expanded,
so it works on a slightly different level. Both can be combined without
issues.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43250#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list