Events Made Easy Forums How do I … Jetpack sharing problem – specifies multiple 'og:url' values

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #53518
    Anonymous
    Inactive

    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/&#8217; 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?

    #53520
    Franky
    Keymaster

    If the meta is still there, it might be added by your theme. You need to figure out where they are coming from …

    #53522
    Anonymous
    Inactive

    Sure, but this problem is only happening on the events pages, not anywhere else on my website.

    #53523
    Anonymous
    Inactive

    Would 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/

    #53529
    Franky
    Keymaster

    Updating 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); 
    
    #53537
    Anonymous
    Inactive

    I 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.

    #53556
    Anonymous
    Inactive

    Hi 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/&#8217; 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?

    #53557
    Franky
    Keymaster

    First, use ‘og:image:url’, not ‘og:image’ (if that is what facebook wants).
    Second, you have 2 times the property ‘

    #53558
    Franky
    Keymaster

    Als:, I don’t know if you need to provide <meta property="og:type" content="article" />, I think the default is ok.

    #53560
    Anonymous
    Inactive

    Ok, 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/&#8217; 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”?

    #53564
    Franky
    Keymaster

    If 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).

    #53566
    Franky
    Keymaster

    Btw; the first canonical value seems to be generated by “Headway SEO”, so you should check there.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top