Jump to content
MediaWiki

Extension talk:TwitterCards

Add topic
From mediawiki.org
Latest comment: 4 years ago by GrandTurion in topic Does not work
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made.


What this do?

[edit ]
Latest comment: 11 years ago 4 comments2 people in discussion

If I install it, what and how will do? Edmundopg (talk) 02:46, 26 September 2014 (UTC) Reply

It attempts to enable TwitterCards display of tweets by adding a bunch of proprietary tags to your HTML output. Legoktm (talk) 00:29, 8 November 2014 (UTC) Reply
Ok, but how to add that tags? Just like documentation of Twitter Cards says? Edmundopg (talk) 05:04, 8 November 2014 (UTC) Reply
If you install the extension, it'll add the tags. Legoktm (talk) 17:38, 12 November 2014 (UTC) Reply

Breaks user script and stylesheet pages

[edit ]
Latest comment: 11 years ago 3 comments3 people in discussion

On a non-Wikimedia Foundation wiki I use, this extension caused the following error message when attempting to view, edit, or get history for any page that is user CSS or JS:

MediaWiki internal error.

Exception caught inside exception handler.

Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.

...until the administrator "configured LocalSettings.php not to load TwitterCards on pages whose title begins with User: and ends with .css or .js." (I am not the server administrator, so I am unable to provide further details at this time.)

I have not yet tested whether CSS/JS in the MediaWiki: namespace is affected, as no such scripts or stylesheets exist on said wiki.

Should the extension itself be modified to avoid CSS/JS pages similarly? -- SoledadKabocha (talk) 02:09, 17 June 2015 (UTC) Reply

This is the workaround I came up with. With my luck, I'm probably doing it all wrong:
$lstitleext = strtolower(strrchr(@$_REQUEST['title'], '.'));
$lsiscss = $lstitleext === '.css' || $lstitleext === '.js';
$lsisuser = explode(':', strtolower(@$_REQUEST['title']));
$lsisuser = $lsisuser[0] === 'user';
if (!$lsisuser || !$lsiscss) {
 require_once "$IP/extensions/TwitterCards/TwitterCards.php";
}
Damian Yerrick (talk) 03:08, 17 June 2015 (UTC) Reply
Thanks for the report, this is filed as phab:T102897 now. Please note that the extension is still in an experimental state. 71.202.162.80 23:43, 17 June 2015 (UTC) Reply

Doesn't add Twitter tags

[edit ]
Latest comment: 10 years ago 1 comment1 person in discussion

It had no effect when I installed this. Is there an extra step somewhere? MorbidEntree (talk) 22:20, 14 April 2016 (UTC) Reply

No Twitter tags added

[edit ]
Latest comment: 8 years ago 4 comments2 people in discussion

I have added this extension along with the OpenGraph extension. This extension does not load any Twitter Tags. The opengraph extension loads og tags minus the image tag. I have tried everything I know to do. Any help would be greatly appreciated at this point. Thecryptochat (talk) 02:29, 19 September 2017 (UTC) Reply

Concerning the Twitter card, are you the owner of this extension? If not, can you share a link to your own TwitterCard extension and/or a link to the OpenGraph extension so we can have a look? Here is the TwitterCard extension I know of: Extension:TwitterCards. X-Savitar (talk) 08:17, 19 September 2017 (UTC) Reply
I am talking about the Extension you linked to above. This extension seems to have no affect on my site and its not adding the twitter tag to the metadata. Also the OpenGraph extension I am talking about is Extension:OpenGraphMeta This extension seems to work minus the image tag. I have tried everything to get the image tag working for OpenGraph but nothing seems to make a difference. Thecryptochat (talk) 17:54, 19 September 2017 (UTC) Reply
Okay! Thanks so much for your reply. One thing to note is that the TwitterCards extension is incomplete and as you can see, it's under experimentation. As for the OpenGraph extension, I have never used it but if you can understand MediaWiki extension, then you can add that functionality (image tag) into the extension to fulfill what you want to do. But try getting in touch with both extension developers and work with them.
You can ask on #wikimedia-dev IRC channel on FreeNode, that's the power house of Wikimedia Developers. I am currently unstable but when I have time, I will try to give you some consistent help. X-Savitar (talk) 20:00, 19 September 2017 (UTC) Reply

ERROR: No card found (Card error)

[edit ]
Latest comment: 7 years ago 1 comment1 person in discussion

I setup TwitterCards. But when i check my Mediawiki page on the Twitter Cards Validator i see it:


INFO: Page fetched successfully

INFO: 6 metatags were found

ERROR: No card found (Card error) Bekircem (talk) 06:01, 8 August 2018 (UTC) Reply

Does not work

[edit ]
Latest comment: 4 years ago 1 comment1 person in discussion

`require_once "$IP/extensions/TwitterCards/TwitterCards.php";`


this file is not there... (tried both the 1.38 and the master versions) GrandTurion (talk) 18:03, 26 June 2022 (UTC) Reply

500 Internal Server Error

[edit ]

Extension crashes whole site.

MediaWiki 1.38.2
PHP 8.0.2 (cgi-fcgi)
MySQL 8.0.28-0ubuntu0.20.04.3
ICU 60.2
Lua 5.1.5
Pygments 2.11.2

Cojoilustrado 00:48, 12 November 2022 (UTC)

AltStyle によって変換されたページ (->オリジナル) /