Ultimate FB Conflict with mission critical SEO plugin

Yo @Vladislav,

I frequently work with an SEO firm that makes pretty extensive use of local search optimization in Google - and the main plugin that makes it easy for them is this one:
http://wordpress.org/plugins/local-search-seo-contact-page/

I haven't dug into who is stomping on who but if both are enabled at the same time, the SEO plugin's map & contact data is rendered twice - once above the body and again in the right place via shortcode.

Anyhow, I thought you might be able to check it out since I haven't seen a plugin freak out quite like that in a while.

Thanks man, I know you are under a ton of pressure with all the projects right now. If I figure out the conflict first I'll let you know.

    Jack Kitterhing

    Hi there @Imperative Ideas

    I hope you are well today, thanks for pointing this out, That is very strange, I've just flagged Ve on this to take a look when he can :)

    Thanks!

    Kind Regards
    Jack.

    Vladislav

    Hello,

    Thanks for the detailed info, it helped a lot with determining what's going wrong. As it turned out, the Local Search plugin echoes out the generated shortcode content instead of returning it for replacement (it does that at the very end, so it could be something they really need - I haven't tested extensively the repercussions of replacing echo with return in their code). This gets triggered by our content parsing for OpenGraph image detection, so the output gets out twice - once in the head and once where it should be shown.

    There are a few ways we can prevent that from happening. Probably the easiest and least involved one would be to set "Always use this image" setting in Ultimate Facebook OpenGraph settings - this takes absolute precedence and will make sure the shortcode doesn't get triggered. If this is not possible or desired, another option might be to add featured images to the posts/pages where this shortcode is being used, if possible. This will also take precedence over content parsing for images and prevent the content filtering from being triggered. Lastly, a bit more involved option would be to use the attached Beta and add a define like this to your code (wp-config.php, a mu-plugin or at the beginning of functions.php):

    define('WDFB_OG_IMAGE_SKIP_CONTENT_FILTER', true);

    This will prevent the content filters from being applied against the post content when we search it for the possible images. This is a code-level approach, but might be the cleanest as it doesn't require you to change OpenGraph settings or interfere with your content.

    Imperative Ideas

    You, sir, are a champion. That will do nicely.

    I'll give it a test spin now.

    Vladislav

    Hi,

    That's great news, I'm happy we managed to work this issue out :) By the way, regardless of the approach you took, the define I mentioned above will for sure be in the next official release too, so you can rely on it in the future as well. I'm marking this as resolved, but please feel free to re-open if anything comes up related to this.

Join 365840 happy members

Get access to our entire collection of epic plugins, astonishing themes & genius support

Become a member