Download & Extend

Twitter card image tag broken

Project:Metatag
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

According to the documentation https://dev.twitter.com/docs/cards the image tag should use meta but a link is generated instead.

The current code generates:
<link property="twitter:image" content="https://example.com/test.png" />

It should output:
<meta property="twitter:image" content="https://example.com/test.png" />

Comments

#1

Status:active» needs review

Line 125 of the metatag_twitter_cards.metatag.inc should use 'DrupalTextMetaTag' instead of 'DrupalLinkMetaTag'.

AttachmentSizeStatusTest resultOperations
metatag-twitter_card_fix-1864340-1.patch1 KBIdlePASSED: [[SimpleTest]]: [MySQL] 11 pass(es).View details

#2

Ah, I used DrupalLinkMetaTag instead of DrupalTextMetaTag for several items. Looking at it further, I think the classes are incorrectly named, but that's a different issue.

AttachmentSizeStatusTest resultOperations
metatag-n1864340.patch2.29 KBIdlePASSED: [[SimpleTest]]: [MySQL] 11 pass(es).View details

#3

Yeah, that very well could be. I was only using twitter:image so that's the only one I noticed/patched but it does look like there are other instances.

#4

Status:needs review» fixed

Committed! Thanks for finding this, cdoyle.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here