oembed 404 error

#73030
  • Resolved sven
    Rank Math free

    hi,There is a bug in rankmath, the oembed link of the website cannot get data.

    • This topic was modified 4 years, 3 months ago by sven.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    To fix the oembed issue, please add following code to your theme’s functions.php file:

    
    add_filter( 'oembed_request_post_id', function( $post_id, $url ){
    	if ( $post_id ) {
    		return $post_id;
    	}
    	$parsed_url = wp_parse_url( $url ); // Parse URL
    	$slug = substr( $parsed_url['path'], 1 );
    	$post = get_page_by_path( $slug, OBJECT, 'product' );
    	if ( ! is_wp_error( $post ) && ! empty( $post ) ) {
    		$post_id = $post->ID;
    	}
    	return $post_id;
    }, 10, 2);
    

    That should resolve the issue. If it doesn’t, please let us know.

    Thank you.

    Lori
    Rank Math free

    Hello, I’ve been checking out SEO plugins for our new site and have seen that Rank Math comes highly recommended. During my testing, as stated in this post, I also noticed that with Rank Math page shares to LinkedIn don’t properly pick up the open graph data like I’ve observed on another plugin I’m testing. Since LinkedIn is our highest priority for social sharing, do you have an estimate of when your update for addressing this will be available? I read in another post that you’re working on one. I’m liking your plugin for SEO the best for all the other features, but I’d rather have one that works out of the box without adding fixes with code. Thank you!

    Alberto
    Rank Math business

    Hello Lori,

    All the code fixes we provide here in the forums are usually added in updates few weeks later.

    We provide those quick fixes to help our users have a quick solution and a good experience with us and once we completely integrate the solution in the plugin, it is delivered for everyone, so about it, you don’t have to worry, if you don’t want to add custom codes, you should feel safe, our team is really active developing the plugin and fixes are quickly added in the plugin.

    Looking forward to help you.

    Lori
    Rank Math free

    Hello Alberto, Thanks for the quick reply!

    I have seen a couple of posts here that are at least several weeks old with this fix, and even one a few months old already. So what I’m hoping to find out is how much longer you estimate it’ll be before the update with this fix is released- a week/month/year?

    Also, if someone adds the above code as a temporary fix, what happens when you update the plugin? Does the code need to then be removed from the function php file? (I’m not a programmer so don’t like to mess around with those files.)

    I’d like to use Rank Math but need to know how long I’ll have to wait to get the oembed issue addressed.

    Thanks!

    Alberto
    Rank Math business

    Hello,

    I can’t tell you the amount of time to wait since it depends of the issues we are finding (maybe we find a really big bug and we have to spend all our time fixing it). We release at least one update per week so it will take at least 1 week.

    About what happens once the plugin is updated, you should remove the code if the issue is already fixed in the plugin, to avoid conflicts. But if it is your case and you don’t know how to do it, we are always here to help you.

    Looking forward to help you.

    Lori
    Rank Math free

    Ok, thanks for the reply. I will check back to see if your next update includes this fix before I decide on plugins.

    On a separate but related topic: Is there a definitive answer on the ideal image size for fb, etc. posts, or does it not really matter? In your support docs it lists both 1200×630 and 1200×628 as best – on the same screenshot! I’ve seen both sizes listed on other sites as well, not just yours. Does anybody know the final answer to this big mystery? Does it matter anyway? 🙂

    Thanks!

    Hello,

    That is just the recommended size. It doesn’t mean you can’t use other image sizes all the same. The difference in the sizes doesn’t make such a difference and whichever you choose to be your recommended size would do just fine.

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘oembed 404 error’ is closed to new replies.