Page MenuHomePhabricator

Extension:TweetANew not work with long tweet
Closed, DeclinedPublicBUG REPORT

Description

I meet an exception with long tweet on MediaWiki 1.32 and Extension:TweetANew.
Because $wgLang->mb_substr() not work in MediaWiki 1.32.
And mbstring library required since MediaWiki 1.27.
https://www.mediawiki.org/wiki/Manual:Installation_requirements#PHP

Twitter supports expanded limit to 280 characters per tweet (but CJK characters count 2 per character).
https://twitter.com/Twitter/status/928004549478047744
https://www.php.net/manual/function.mb-strwidth.php

I fixed it and worked fine on MediaWiki 1.32.3. Please test and moderate it.

Details written in Japanese: https://kimagurenote.net/kn/TweetANew

P.S.
I tried Gerrit Patch Uploader https://tools.wmflabs.org/gerrit-patch-uploader/ but can't login with MediaWiki account (meet Internal Server Error).

Event Timeline

Thanks for taking a look at the code!

You are very welcome to use developer access to submit the proposed code changes as a Git branch directly into Gerrit which makes it easier to review and provide feedback.
If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader. Thanks again!

I tried Gerrit Patch Uploader https://tools.wmflabs.org/gerrit-patch-uploader/ but can't login with MediaWiki account (meet Internal Server Error).

Please file a separate task following https://www.mediawiki.org/wiki/How_to_report_a_bug