Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have added open graph tags to my site, but on one content type OG tags don't work properly. They are present in html but when checked with FB tool http://developers.facebook.com/tools/debug I get 500 error for them. This is one of the links
http://turkeydental.co/alanya-dental-clinic and this is what I get
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fturk...
and The 'og:url' property is required, but not present.
But it is in html, only thing I see is that order of meta tags is all jumbled up, so maybe this confuses FB?
Comment | File | Size | Author |
---|---|---|---|
#3 | metatag-n1978568-3.patch | 1.92 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaI think the problem is that there's a newline character in the og:description that's confusing the OG parser.
Comment #2
DamienMcKennaLets focus this issue on the line breaks and fix it for all meta tags.
Comment #3
DamienMcKennaPlease test this patch and let me know if it removes the line break in the og:description meta tag.
Comment #4
Marko B CreditAttribution: Marko B commentedI did apply the patch but FB debuger still output the same error.
Comment #5
Pls CreditAttribution: Pls commentedPatch works great, thanks.
Comment #6
DamienMcKenna@deepM: While there may still be a problem, the line breaks are no longer causing part of the problem. I think the remaining problem boils down to the core RDF module being enabled, which is known to cause problems with validating the Open Graph meta tags.
Comment #7
DamienMcKennaCommitted.
Comment #8
Marko B CreditAttribution: Marko B commentedWhich part of RDF? Html tags seems fine, don't get it what is the problem for validators.
Tried w3c validation
http://validator.w3.org/check?uri=http%3A%2F%2Fturkeydental.co%2Fdental-...
there are some problems with RDF there.
How could I test this thing. I would cut off scripts, meta tags line one by one and then check it agains validator but only way I know is that I disable module one by one. I could also save a page as html and then edit lines (if page works that way), anyone knows some better way?
Comment #9
DamienMcKenna@deepM: Try disabling the RDF module, see if that fixes the problem, it has fixed the problem for others.
Comment #10
Marko B CreditAttribution: Marko B commentedSeems no one even checked what I posted :-) anyway it works now. What I realized that FB caches URL and data, so even If you change something to URL it uses data it first got. So probably this line break fix worked when cache expired.