0

I have 8 Instagram URLs in this post out of which 3 are not converted into embed/iframes.

I'm using Gutenberg's Instagram embed blog to add the URL's.https://blog.wwf.sg/ocean/2018/11/netflix-documentaries-our-planet-okja-dogs/#

I see the block code in the classic editor which is same as other instagram blocks which render properly but for https://www.instagram.com/p/BqDzw0CF3pC/ it just returns URL.

<!-- wp:core-embed/instagram {"url":"https://www.instagram.com/p/BqDzw0CF3pC/","type":"rich","providerNameSlug":"instagram","className":""} -->
<figure class="wp-block-embed-instagram wp-block-embed is-type-rich is-provider-instagram">
  <div class="wp-block-embed__wrapper">
    https://www.instagram.com/p/BqDzw0CF3pC/
</div>
</figure>
<!-- /wp:core-embed/instagram -->

I tried using shortcode also it's the same result only the below 3 Instagram posts don't render.

[embed]https://www.instagram.com/p/BqDzw0CF3pC/[/embed]

I need help debugging this weired issue

  • Looks like a bug. I'd add a bug report to WP Trac... – Krzysiek Dróżdż Nov 22 '18 at 8:14
  • I tested it in different a different wordpress instance. It works seamlessly. – Manoj H L Nov 22 '18 at 8:15
  • Any conflicts with other plugins/theme? – Krzysiek Dróżdż Nov 22 '18 at 8:40
  • Disabled all plugins and tested with 2017 theme. The issue still persists. – Manoj H L Nov 22 '18 at 8:59
1

Figured it out.

Embed shortcode stores the oemebd data as post meta using md5 hash.

wp-includes/class-wp-embed.php

// Check for a cached result (stored in the post meta)
$key_suffix = md5( $url . serialize( $attr ) );
$cachekey = '_oembed_' . $key_suffix;
$cachekey_time = '_oembed_time_' . $key_suffix;

And has a cache mechanism to fetch new data only after a day.

I deleted the post meta and then it started working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.