s2member
s2member copied to clipboard
s2member over-writing OpenGraph tags
EXPLANATION OF THE ISSUE
Posts that are assigned an S2 post restriction are having their OpenGraph image, canonical URL, description, and title tags overwritten by S2 after other OpenGraph plugins (like Yoast) set them appropriately for social media. S2 resets these tags to point to the "membership options page".
STEPS TO REPRODUCE THE ISSUE
Simply assign a post an S2 restriction level -- even Level 0 will cause S2 to overwrite the tags.
BEHAVIOR THAT I EXPECTED
I do not expect S2 to interfere with OpenGraph tags at all, as these are social tags whose integrity needs to closely controlled and protected for SEO reasons, as well as social media.
BEHAVIOR THAT I OBSERVED
If you follow the steps above, then look at the results on a site such as debug.facebook.com you'll immediately see the problem. While the original URL of the post will be preserved, the canonical URL and the image chosen for social media will not show up, and the post Facebook will show you will be your membership options page. If you drill down and look at the actual code, you'll see that the tags have, indeed been overwritten. If you then set the post restriction level to blank, so that S2 ignores the post, the tags will be preserved and debug.facebook.com will show your post, image, title, and description properly.
We are running:
- Wordpress 4.9.8
- s2Member Pro v170722
- Yoast SEO 9.0.3
- Weaver Xtreme 4.1
Has this been addressed? @clavaque