Last modified: 2014-07-28 09:30:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70635, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68635 - Invalid JSON file: /srv/vagrant/mediawiki/extensions/TimedMediaHandler/MwEmbedModules/TimedText/i18n/qqq.json
Invalid JSON file: /srv/vagrant/mediawiki/extensions/TimedMediaHandler/MwEmbe...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-26 23:26 UTC by Nemo
Modified: 2014-07-28 09:30 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2014-07-26 23:26:29 UTC
$ json_verify < qqq.json
lexical error: invalid char in json text.
                                        {       "@metadata": {          "authors":
                     (right here) ------^
JSON is invalid

----

4) TranslateHooksTest::testPreventCategorization
MWException: LocalisationCache::readJSONFile: Invalid JSON file: /srv/vagrant/mediawiki/extensions/TimedMediaHandler/MwEmbedModules/TimedText/i18n/qqq.json

/srv/vagrant/mediawiki/includes/cache/LocalisationCache.php:562
/srv/vagrant/mediawiki/includes/cache/LocalisationCache.php:876
/srv/vagrant/mediawiki/includes/cache/LocalisationCache.php:452
/srv/vagrant/mediawiki/includes/cache/LocalisationCache.php:326
/srv/vagrant/mediawiki/includes/cache/LocalisationCache.php:260
/srv/vagrant/mediawiki/languages/Language.php:4272
/srv/vagrant/mediawiki/languages/Language.php:202
/srv/vagrant/mediawiki/languages/Language.php:161
/srv/vagrant/mediawiki/includes/GlobalFunctions.php:1424
/srv/vagrant/mediawiki/includes/content/ContentHandler.php:660
/srv/vagrant/mediawiki/includes/Title.php:4932
/srv/vagrant/mediawiki/includes/parser/Parser.php:859
/srv/vagrant/mediawiki/includes/parser/Parser.php:1903
/srv/vagrant/mediawiki/includes/parser/Parser.php:1866
/srv/vagrant/mediawiki/includes/parser/Parser.php:1262
/srv/vagrant/mediawiki/includes/parser/Parser.php:405
/srv/vagrant/mediawiki/includes/content/WikitextContent.php:327
/srv/vagrant/mediawiki/includes/content/AbstractContent.php:486
/srv/vagrant/mediawiki/includes/page/WikiPage.php:2145
/srv/vagrant/mediawiki/extensions/TemplateData/TemplateData.hooks.php:71
/srv/vagrant/mediawiki/includes/Hooks.php:206
/srv/vagrant/mediawiki/includes/GlobalFunctions.php:4031
/srv/vagrant/mediawiki/includes/page/WikiPage.php:1780
/srv/vagrant/mediawiki/extensions/Translate/tests/phpunit/TranslateHooksTest.php:64
/srv/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:133
/srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42
/srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160
Comment 1 Bawolff (Brian Wolff) 2014-07-27 17:27:09 UTC
I'm confused.

bawolff@Bawolff-L:/var/www/w/extensions/TimedMediaHandler/MwEmbedModules/TimedText/i18n$ json_verify < qqq.json 
lexical error: invalid char in json text.
                                        { 	"@metadata": { 		"authors":
                     (right here) ------^
JSON is invalid


So json_verify is pointing to the opening '{' in the file. first thought would be a BOM or something.

bawolff@Bawolff-L:/var/www/w/extensions/TimedMediaHandler/MwEmbedModules/TimedText/i18n$ hd qqq.json |head
00000000  7b 0a 09 22 40 6d 65 74  61 64 61 74 61 22 3a 20  |{.."@metadata": |
00000010  7b 0a 09 09 22 61 75 74  68 6f 72 73 22 3a 20 5b  |{..."authors": [|
00000020  0a 09 09 09 22 45 75 67  65 6e 65 5a 65 6c 65 6e  |...."EugeneZelen|
00000030  6b 6f 22 2c 0a 09 09 09  22 53 68 69 72 61 79 75  |ko",...."Shirayu|
00000040  6b 69 22 2c 0a 09 09 09  22 53 69 65 62 72 61 6e  |ki",...."Siebran|
00000050  64 22 2c 0a 09 09 09 22  55 6d 68 65 72 69 72 72  |d",...."Umherirr|
00000060  65 6e 64 65 72 22 0a 09  09 5d 0a 09 7d 2c 0a 09  |ender"...]..},..|
00000070  22 6d 77 65 2d 74 69 6d  65 64 74 65 78 74 2d 73  |"mwe-timedtext-s|
00000080  74 61 67 65 2d 74 72 61  6e 73 63 72 69 62 65 22  |tage-transcribe"|
00000090  3a 20 22 55 6e 75 73 65  64 20 61 74 20 74 68 69  |: "Unused at thi|


Don't see anything out of the ordinary. I'm not sure what's invalid in this file.
Comment 2 Gerrit Notification Bot 2014-07-27 17:34:11 UTC
Change 149641 had a related patch set uploaded by Brian Wolff:
Fix typo in qqq.json

https://gerrit.wikimedia.org/r/149641
Comment 3 Bawolff (Brian Wolff) 2014-07-27 17:34:34 UTC
Err, nevermind. Error message was just misleading. Issue was lack of escaping '"' character.
Comment 4 Gerrit Notification Bot 2014-07-27 17:36:47 UTC
Change 149641 merged by jenkins-bot:
Fix typo in qqq.json

https://gerrit.wikimedia.org/r/149641
Comment 5 Antoine "hashar" Musso (WMF) 2014-07-28 09:30:37 UTC
This was an issue with TimedMediaHandler, not bug 67216 which is about tests of extensions to work together.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links