• Resolved topsoftbe

    (@topsoftbe)


    When I activate Add-meta-tags, I’m unable to upload my posts to Facebook with Jetpack.
    These are the errors generated with FB’s debug tool;
    Extraneous Property Objects of this type do not allow properties named ‘article:published_time’.
    Extraneous Property Objects of this type do not allow properties named ‘article:modified_time’.
    Extraneous Property Objects of this type do not allow properties named ‘article:author’.
    Extraneous Property Objects of this type do not allow properties named ‘article:publisher’.
    Extraneous Property Objects of this type do not allow properties named ‘article:section’.
    Extraneous Property Objects of this type do not allow properties named ‘article:tag’.
    Extraneous Property Objects of this type do not allow properties named ‘twitter:card’.
    Extraneous Property Objects of this type do not allow properties named ‘twitter:title’.
    Extraneous Property Objects of this type do not allow properties named ‘twitter:description’.
    Extraneous Property Objects of this type do not allow properties named ‘twitter:image:src’.
    Extraneous Property Objects of this type do not allow properties named ‘twitter:image:width’.
    Extraneous Property Objects of this type do not allow properties named ‘twitter:image:height’.
    Parser Mismatched Metadata
    The parser’s result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a… See More

    I have added an url to a default picture as you suggested 2 weeks ago, it doesn’t change anything.
    A page you test against:
    http://www.rubben.be/2009/11/51/altered-oceans-part-four-plastic-sea-pictures/
    It’s annoying, the plugin is great, but I need my posts on Facebook. All the other Jetpack connections work, it’s only an open graph problem.
    Can you help?
    Thanks.

    https://wordpress.org/plugins/add-meta-tags/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author George Notaras

    (@gnotaras)

    Hello,

    I checked the above link with the FB debugger tool.

    1) The first time I checked it, for some weird reason, the canonical URL of the post was different than the actual url. This is a serious issue (and I think this was the real reason the post didn’t make it to your timeline), but Add-Meta-Tags has nothing to do with it. The above messages are not errors but warnings. One thing I will investigate is whether the current order of the OG metatags is the cause of some of the warnings above.

    2) Now that I check the post again with the debugger tool, the canonical url seems ok. One problem I see is the empty image width and height properties, which should not be generated if they are empty. It will be fixed in the next release. May I ask how these images have been attached to the post? WordPress should always save their width and height.

    More feedback about using Jetpack with Add-Meta-Tags would be much appreciated from other users as well.

    Thread Starter topsoftbe

    (@topsoftbe)

    Thanks for your quick reply.
    The images are inserted in the posts the normal way: I write the article, click on “Add Media”, drag and drop he picture in the Library, add the Alt tag and the Description, Then the picture is uploaded, inserted in the post and I add the caption. This is what the code looks like:

    <div class="imgCaption"><a href="http://www.rubben.be/articles/wp-content/uploads/2009/11/Altered-Oceans-Part-Four-Plastic-Sea-02.jpg"><img src="http://www.rubben.be/articles/wp-content/uploads/2009/11/Altered-Oceans-Part-Four-Plastic-Sea-02.jpg" alt="Spinner dolphin" width="700" height="482" class="aligncenter size-full wp-image-6040" />Spinner dolphin</a></div><p>&nbsp;</p>

    As you can see, height and with are not empty. But when I look at the page source in Firefox I see this for the pictures:

    wp-content/uploads/2009/11/Altered-Oceans-Part-Four-Plastic-Sea-16.jpg?resize=700%2C482

    Maybe that’s the reason? I use Hueman, which is a responsive theme.

    What you said about the URL being different in the debug tool, I suppose you don’t remember what it was? Could it be because of me using WP Super Cache? Anyway, that can’t be the reason why FB does not accept the post, because I tried to post with all my plugins ctivated, except for add_meta_tags, and then I have no problems.

    Are there some things I can test to help you find a solution?

    (I started another thread this morning, please disregard that one).

    Plugin Author George Notaras

    (@gnotaras)

    1) Filed a bug report to clean those args from the image urls.

    2) I asked about how the images have been attached in order to find an explanation about the missing width and height attributes. The images seem to be hosted to an external server or CDN (http://i2.wp.com/www.rubben.be/articles/wp-content/uploads/&#8230;). This is not a problem.

    3) AFAIK the FB debugger tool should list the last three canonical urls (please check at the bottom of the page).

    I will investigate whether the order of the OG metatags can introduce any such issues with sharing and fix it in the next release.

    As a temporary workaround in order to remove the og:image:width and og:image:height tags, can you add the following code to your theme’s functions.php file?

    function amt_filter_og_tags( $tag ) {
        if ( strpos($tag, 'og:image:width') > 0 ) {
            return false;
        } elseif ( strpos($tag, 'og:image:height') > 0 ) {
            return false;
        }
        return true;
    }
    
    function amt_workaround_og_tags( $metatags ) {
        // Remove og:image:width & og:image:height OG metatags
        $metatags = array_filter($metatags, "amt_filter_og_tags");
        return $metatags;
    }
    add_filter( 'amt_opengraph_metadata_head', 'amt_workaround_og_tags', 10, 1 );

    Please let me know if jetpack auto-posting to FB works.

    Thread Starter topsoftbe

    (@topsoftbe)

    mmm, it’s not easy to understand where the problem lies.
    First of all, I added your two functions to functions.php.

    Then I disabled Photon in Jetpack. That’s the Jetpack function that makes my pictures being served from the WordPress CDN. Just to be on the safe side, as you said, this would not cause problems.

    Then I also disabled WP Super Cache, to make sure that no old, stale information is sent to FB. I had to delete the instructions in .htaccess in order to completely disable the cache.

    Finally, I uploaded 3 posts, they all were posted on Facebook.

    Then I activated Photon again (the CDN activating module) and posted 3 more articles.

    They all posted on facebook instantaniously.

    The most important test was of course WP Super Cache. I reinstalled the plugin from scratch, then activated and configured it.

    I again posted 3 articles.
    The first one was posted to facebook. I then activated the “preload” function in WP Super Cache, which means that all my posts will be static cached and served from there.
    The subsequent posts were all on Facebook.

    So I guess you found and fixed the problem.
    I will use it like this for a few days and will come back to you on Monday. If it is still working, then you will have well deserved your cup of coffee.
    I will keep you informed and thank you for the great help.

    Plugin Author George Notaras

    (@gnotaras)

    Checking the FB debugger tool yesterday I noticed that it displayed error messages (not always, but some of the times) about the image width and height tags being empty. All the other messages were just warnings, not errors, so I doubt the problem was caused by those issues.

    For instance, the warnings about the twitter card meta tags is an issue that cannot be resolved, unless twitter-card generation is disabled in the plugin settings. The FB debugger tool does not support/understand them, so it will always going to display warnings about them.

    The rest of the warning messages maybe due to the order the OG meta tags are generated by the plugin. I will investigate it and fix it if necessary in future releases.

    The above workaround is temporary, until I add some checks in the code so that meta tags containing empty width/height image attributes are not generated.

    Regardless of the location from which the images are served, the image width/height attributes should be stored to the WP database as soon as the image is uploaded to WordPress. In other words, they should never be empty. I suspect that Jetpack or some other plugin possibly interferes with this process and the issue should be reported to the developers of the those plugins.

    Regarding the workaround, I’d recommend testing it for a longer time just to make sure it works properly for now. Your feedback is always welcome and much appreciated.

    George

    Thread Starter topsoftbe

    (@topsoftbe)

    Update: Facebook and Google+ are working OK now. Tumblr and Twitter don’t work anymore however. Because I’m not sure if this has anything to do with meta tags, I will contact the JetPack people first.
    I’ll let you know if something new comes up. Thks for your help.

    Plugin Author George Notaras

    (@gnotaras)

    Hi,

    The recommended workaround regarding empty width/height image meta tags is to add the following code in the functions.php file:

    function amt_generate_extended_image_tags( $default ) {
        return false;
    }
    add_filter( 'amt_extended_image_tags', 'amt_generate_extended_image_tags', 10, 1 );

    This also exists in ‘Example 7’ on the plugin description page. It makes the plugin generate compact image meta tags suppressing width, height and type meta tags.

    Thread Starter topsoftbe

    (@topsoftbe)

    Thanks,
    Everything is working OK.

    Plugin Author George Notaras

    (@gnotaras)

    Thanks for letting me know.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Posts not uploading to Facebook when plugin activated’ is closed to new replies.