Events Made Easy › Forums › How do I … › Jetpack sharing problem – specifies multiple 'og:url' values
Tagged: Jetpack, meta property="og:url", sharing
- This topic has 11 replies, 2 voices, and was last updated 9 years, 10 months ago by Franky.
-
AuthorPosts
-
Thu 19 Feb 2015 at 13:18 #53518AnonymousInactive
I’ve followed another thread on this forum and have added:
<meta property=”og:type” content=”article” />
<meta property=”og:title” content=”#_NAME”/>
<meta property=”og:url” content=”#_EVENTPAGEURL”/>
<meta property=”og:image” content=”#_EVENTIMAGEURL”/>
<meta property=”og:description” content=”#_EXCERPT” />
to the html headers in events-settings-other.I’ve also added:
// remove jetpack open graph tags
remove_action(‘wp_head’,’jetpack_og_tags’);
to my custom_functions.php (will that work the same as adding it to functions.php?)But when I use the Facebook Open Graph Object Debugger, I get the error message as below:
Object at URL ‘http://www.herefordequestrian.co.uk/events/12786/fei-european-eventing-championships/’ of type ‘article’ is invalid because it specifies multiple ‘og:url’ values: http://www.herefordequestrian.co.uk/events/12786/fei-european-eventing-championships/, http://www.herefordequestrian.co.uk/events/.Looking at the source page for above event, I can see 2 lots of meta property=”og: but am not sure what to do next?
view-source:http://www.herefordequestrian.co.uk/events/12970/curre-llangibby-hunt-point-to-point/It looks like one batch of meta property=”og: is to do with the custom facebook feed plugin, but when I turn that plugin off, the meta is still there.
Can you help please?
Thu 19 Feb 2015 at 13:41 #53520FrankyKeymasterIf the meta is still there, it might be added by your theme. You need to figure out where they are coming from …
Thu 19 Feb 2015 at 15:09 #53522AnonymousInactiveSure, but this problem is only happening on the events pages, not anywhere else on my website.
Thu 19 Feb 2015 at 15:19 #53523AnonymousInactiveWould it make a difference what version of eme I use? I haven’t upgraded for a while due to the amount of customisation we’ve done to the events page, so I’m still on Version 1.1.2. Its a fantastic plugin Franky – thank you
http://www.herefordequestrian.co.uk/whats-on/Thu 19 Feb 2015 at 17:46 #53529FrankyKeymasterUpdating should work just fine check the changelog for incompatibility changes though) … but 1.1.2 is not supported on WP 4.x
But your html shows that the second og-tags are created by Jetpack, so it means the remove_action didn’t work.
According to this thread: https://wordpress.org/support/topic/plugin-jetpack-cant-disable-opengraph?replies=13
you can also try:add_filter( 'jetpack_enable_opengraph', '__return_false', 99 );
or (if that doesn’t work):
add_filter('jetpack_enable_open_graph', '__return_false', 99);
Thu 19 Feb 2015 at 20:57 #53537AnonymousInactiveI tried both add_filter( ‘jetpack_enable_opengraph’, ‘__return_false’, 99 ); and then add_filter(‘jetpack_enable_open_graph’, ‘__return_false’, 99); to my custom_functions.php file and it killed my site. Re-edited the file via ftp and got it all back.
Have now used a plugin called functionality which added a function.php file and added // remove jetpack open graph tags
remove_action(‘wp_head’,’jetpack_og_tags’); to that which has altered things. I no longer have multiple og:url but have a problem with og:image instead. Trying to sort that issue now.Sat 21 Feb 2015 at 13:22 #53556AnonymousInactiveHi Franky
Further to above, I have done the following:Updated eme to the latest version.
Added add_filter(‘jetpack_enable_open_graph’, ‘__return_false’, 99); to functions.php
As I want to use the same featured image for every event, I added a feature image of 300px x 300px to my events page http://www.herefordequestrian.co.uk/events/, set to full size and with the thumbnail setting in eme-settings-other set to large.
Added the following to the extra event html headers
<meta property=”og:type” content=”article” />
<meta property=”og:title” content=”#_NAME”/>
<meta property=”og:url” content=”#_EVENTPAGEURL”/>
<meta property=”og:image” content=”#_EVENTIMAGEURL”/>
<meta property=”og:description” content=”#_EXCERPT” />But, when I test a single event url at https://developers.facebook.com/tools/debug/og/object/ I still get the errors which must be fixed message:
Object at URL ‘http://www.herefordequestrian.co.uk/events/12923/showjumping-course-practice-day/’ of type ‘article’ is invalid because a required property ‘og:image:url’ of type ‘url’ was not provided.
Sometimes, despite the warning, the preview is correct and it will link to the right url.However, if you then try using the share button on the single event page, the preview doesn’t include the featured image, just a portion of the header and it links to http://www.herefordequestrian.co.uk/events/ not http://www.herefordequestrian.co.uk/events/12923/showjumping-course-practice-day/
Help, please?
Sat 21 Feb 2015 at 13:39 #53557FrankyKeymasterFirst, use ‘og:image:url’, not ‘og:image’ (if that is what facebook wants).
Second, you have 2 times the property ‘Sat 21 Feb 2015 at 13:47 #53558FrankyKeymasterAls:, I don’t know if you need to provide
<meta property="og:type" content="article" />
, I think the default is ok.Sat 21 Feb 2015 at 14:03 #53560AnonymousInactiveOk, I’ve removed <meta property=”og:type” content=”article” />
Now I get a new error message:
Object Missing a Required Value
Object at URL ‘http://www.herefordequestrian.co.uk/events/12923/showjumping-course-practice-day/’ of type ‘website’ is invalid because a required property ‘og:image:url’ of type ‘url’ was not provided.Looking at the source code, I can see there is no content in this: <meta property=”og:image:url” content=””/>
Also, not sure what you mean by “you have 2 times the property”?
Sat 21 Feb 2015 at 14:16 #53564FrankyKeymasterIf there’s no featured image for an event, that will be returned as warning. Define one when creating an event and you should be good.
Concerning the canonical header: look in the html source of your page, you’ll find it twice. Many sharing plugins take the value of this header as url to share (weird though ..), but since you have 2 of these headers the plugin seems to take the first one (with the wrong value).
Also: it seems that facebook wants the og:image property anyway, so give them both (og:image and og:image:url).Sat 21 Feb 2015 at 15:45 #53566FrankyKeymasterBtw; the first canonical value seems to be generated by “Headway SEO”, so you should check there.
AuthorPostsViewing 12 posts - 1 through 12 (of 12 total)- The forum ‘How do I …’ is closed to new topics and replies.