Last modified: 2014-04-29 15:56:13 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 T46608, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44608 - Exception "Invalid marker" on edit with unbalanced </translate> tag count
Exception "Invalid marker" on edit with unbalanced </translate> tag count
Status: RESOLVED DUPLICATE of bug 56226
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: testme
: 46758 48697 54693 55803 (view as bug list)
Depends on:
Blocks: UNIQ
  Show dependency treegraph
 
Reported: 2013-02-02 22:15 UTC by Marius Hoch
Modified: 2014-04-29 15:56 UTC (History)
14 users (show)

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


Attachments

Description Marius Hoch 2013-02-02 22:15:25 UTC
A user got an exception while trying to edit Wikidata:Glossary on wikidata.org:
Invalid marker: UNIQ6f0f58bb63b1f5f7-languages-0000002F-QIN

Trace: http://p.defau.lt/?dS2GliYRZLbirRpME8TWDA
Text he tried to submit: https://www.wikidata.org/w/index.php?title=User:PinkAmpersand/sandbox&oldid=5661038 (without the <nowiki>)

He had to submit the change to his sandbox with <nowiki> to not trigger the exception while I'm not able to reproduce it at all (I only receive a "Unbalanced </translate> tag." warning).
Comment 1 Nemo 2013-02-02 22:26:22 UTC
Why is this poor Wikidata:Glossary page so unlucky? :/ 
This was already fixed once...

Pasting stack trace for search purposes.

----

2013-02-02 21:17:35 mw1066 wikidatawiki: [783f4401] /w/index.php?title=Wikidata:Glossary&action=submit   Exception from line 77 of /usr/local/apache/common-local/php-1.21wmf8/includes/parser/StripState.php: Invalid marker:UNIQ6f0f58bb63b1f5f7-languages-0000002F-QIN
#0 /usr/local/apache/common-local/php-1.21wmf8/includes/parser/StripState.php(66): StripState->addItem('general', '^?UNIQ6f0f58bb63...', '<div class="mw-...')
#1 /usr/local/apache/common-local/php-1.21wmf8/includes/parser/Parser.php(3899): StripState->addGeneral('^?UNIQ6f0f58bb63...', '<div class="mw-...')
#2 /usr/local/apache/common-local/php-1.21wmf8/includes/parser/Preprocessor_DOM.php(1151): Parser->extensionSubstitution(Array, Object(PPFrame_DOM))
#3 /usr/local/apache/common-local/php-1.21wmf8/includes/parser/Parser.php(3079): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#4 /usr/local/apache/common-local/php-1.21wmf8/includes/parser/Parser.php(1150): Parser->replaceVariables('<languages/>?{{...')
#5 /usr/local/apache/common-local/php-1.21wmf8/includes/parser/Parser.php(385): Parser->internalParse('<languages/>?{{...')
#6 /usr/local/apache/common-local/php-1.21wmf8/includes/content/WikitextContent.php(299): Parser->parse('<languages/>?{{...', Object(Title), Object(ParserOptions), true, true, NULL)
#7 /usr/local/apache/common-local/php-1.21wmf8/includes/WikiPage.php(1993): WikitextContent->getParserOutput(Object(Title), NULL, Object(ParserOptions))
#8 /usr/local/apache/common-local/php-1.21wmf8/includes/WikiPage.php(1951): WikiPage->prepareContentForEdit(Object(WikitextContent), NULL, NULL)
#9 [internal function]: WikiPage->prepareTextForEdit('<languages/>?{{...')
#10 /usr/local/apache/common-local/php-1.21wmf8/includes/Article.php(1946): call_user_func_array(Array, Array)
#11 /usr/local/apache/common-local/php-1.21wmf8/extensions/SpamBlacklist/SpamBlacklist_body.php(50): Article->__call('prepareTextForE...', Array)
#12 /usr/local/apache/common-local/php-1.21wmf8/extensions/SpamBlacklist/SpamBlacklist_body.php(50): Article->prepareTextForEdit('<languages/>?{{...')
#13 /usr/local/apache/common-local/php-1.21wmf8/extensions/SpamBlacklist/SpamBlacklistHooks.php(26): SpamBlacklist->filter(Object(Title), '<languages/>?{{...', '', 'c/e', Object(EditPage))
#14 [internal function]: SpamBlacklistHooks::filterMerged(Object(EditPage), '<languages/>?{{...', '', 'c/e')
#15 /usr/local/apache/common-local/php-1.21wmf8/includes/Hooks.php(255): call_user_func_array('SpamBlacklistHo...', Array)
#16 /usr/local/apache/common-local/php-1.21wmf8/includes/GlobalFunctions.php(3871): Hooks::run('EditFilterMerge...', Array)
#17 /usr/local/apache/common-local/php-1.21wmf8/includes/content/ContentHandler.php(1097): wfRunHooks('EditFilterMerge...', Array)
#18 /usr/local/apache/common-local/php-1.21wmf8/includes/EditPage.php(1240): ContentHandler::runLegacyHooks('EditFilterMerge...', Array)
#19 /usr/local/apache/common-local/php-1.21wmf8/includes/EditPage.php(1559): EditPage->runPostMergeFilters(Object(WikitextContent), Object(Status), Object(User))
#20 /usr/local/apache/common-local/php-1.21wmf8/includes/EditPage.php(1141): EditPage->internalAttemptSave(false, false)
#21 /usr/local/apache/common-local/php-1.21wmf8/includes/EditPage.php(396): EditPage->attemptSave()
#22 /usr/local/apache/common-local/php-1.21wmf8/includes/actions/EditAction.php(51): EditPage->edit()
#23 /usr/local/apache/common-local/php-1.21wmf8/includes/actions/EditAction.php(71): EditAction->show()
#24 /usr/local/apache/common-local/php-1.21wmf8/includes/Wiki.php(439): SubmitAction->show()
#25 /usr/local/apache/common-local/php-1.21wmf8/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#26 /usr/local/apache/common-local/php-1.21wmf8/includes/Wiki.php(565): MediaWiki->performRequest()
#27 /usr/local/apache/common-local/php-1.21wmf8/includes/Wiki.php(458): MediaWiki->main()
#28 /usr/local/apache/common-local/php-1.21wmf8/index.php(59): MediaWiki->run()
#29 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#30 {main}
Comment 2 Niklas Laxström 2013-02-03 07:03:26 UTC
I have no idea what is causing this, so I'm afraid I can't help. It might not be caused by the Translate extension.
Comment 3 T. H. Kelly (Pink&) 2013-02-16 07:09:59 UTC
Well, I just got this error again. Once again I was editing a page that uses the Translate extension, and once again the apparent cause involved the <translate> tags. In this case, I attempted to add anchors to Wikidata:Introduction, but apparently anchors are supposed to go before the tag, not after. The original text I tried to submit can be seen here: https://www.wikidata.org/w/index.php?title=User:PinkAmpersand/sandbox&oldid=6667532. (Like last time, I had to use <nowiki> since it gave me an exception error even in my sandbox - even just previewing it.)

I get the error:"[5d46904e] 2013-02-16 07:06:26: Fatal exception of type MWException", under an "Internal error" header. When I put the {{Anchor}}s on the outside of the tags instead (as shown here: https://www.wikidata.org/w/index.php?title=Wikidata:Introduction&diff=6668008&oldid=6617917) it worked just fine.
Comment 4 Nemo 2013-02-16 07:37:22 UTC
(In reply to comment #3)
> When I put the {{Anchor}}s on
> the outside of the tags instead
> it worked just fine.

As the docs say, the Translate extension has a limited tolerance of templates, but this is a simple one. One could also think that it just yells at you (admittedly too loud) to help you avoid very bad ideas like making anchors translatable. (By the way, the marking on that page was not done according to best practice as per docs.)

However, looking at the wikitext I see this:
* <translate><!--T:16--> {{Anchor|Phase 2}}
Docs say that «The markers are always on the line before the unit», [[mw:Help:Extension:Translate/Page_translation_administration#changes]].
I'm just guessing, but I think you'd need a newline after that <!--T:16-->.
Comment 5 T. H. Kelly (Pink&) 2013-02-16 09:03:01 UTC
(In reply to comment #4)

Yeah in both cases I definitely did make markup mistakes. But I was under the impression that exception errors are basically never supposed to happen, even when you're doing something wrong. Last time there was also the issue that Marius didn't get the same error - I'd be curious to know if this is the case this time too. (IIRC, he tried it on IP as well, and it worked, implying that I'm the exception, rather than the rule.)
Comment 6 Nemo 2013-02-16 09:10:01 UTC
Comment 0 is about a different markup error.
I'm not saying that fatals are not a bug, I'm only trying to confirm that it's actually a Translate bug: I think we've established it is for your case, while for hoo's error comment 2 stays for now. Maybe they're related, maybe not: Niklas will tell us if he has more ideas.
Comment 7 Sam Reed (reedy) 2013-04-01 18:59:03 UTC
*** Bug 46758 has been marked as a duplicate of this bug. ***
Comment 8 Nemo 2013-05-22 06:27:56 UTC
*** Bug 48697 has been marked as a duplicate of this bug. ***
Comment 9 Niklas Laxström 2013-05-22 07:43:12 UTC
I cannot reproduce this on my development wiki. Could it have something to do with SpamBlacklist?
Comment 10 Niklas Laxström 2013-07-01 09:54:31 UTC
*** Bug 50460 has been marked as a duplicate of this bug. ***
Comment 11 Niklas Laxström 2013-07-01 10:02:00 UTC
I tried with SpamBlacklist locally and still can't reproduce.
Comment 12 Rainer Rillke @commons.wikimedia 2013-09-03 15:16:54 UTC
What            Removed 	Added
Ever confirmed  1 	  

Why was this never confirmed? 3 users are "ever confirmed 0". Nice to learn.
Comment 13 Nemo 2013-09-03 16:13:05 UTC
Rillke, that "ever confirmed" is confusing but the status is about the current situation, not the past. And unconfirmed is the bug report i.e. its description (including steps to reproduce), not the existence of a problem.

In short, it only means we need more testing...
Comment 14 Nemo 2013-09-27 17:24:17 UTC
*** Bug 54693 has been marked as a duplicate of this bug. ***
Comment 15 Tilman Bayer 2013-10-06 08:14:03 UTC
I am getting the following error message:

Internal error
[cb5e28e2] 2013-10-06 08:12:04: Fatal exception of type MWException


when saving this edit to https://meta.wikimedia.org/w/index.php?oldid=5952830 :


old text:

[[File:Student contributions to Arabic Wikipedia, 2012-13.png|thumb|420px|Students contributions to the Arabic Wikipedia, 2012-13]]


new text:

</translate>
[[File:Student contributions to Arabic Wikipedia, 2012-13.png|thumb|420px|</translate>Students contributions to the Arabic Wikipedia, 2012-13</translate>]]<translate>
Comment 16 Bawolff (Brian Wolff) 2013-10-27 22:14:47 UTC
Didn't realize this bug existed.

I think I've managed to figure out/track down this bug. It has to do with cloning the parser in MessageCache, but not updating the parser reference in the preprocesser. See bug 56226

I'm duping this to the newer bug (even though that's not normally done), as there is more technical details on that bug.

*** This bug has been marked as a duplicate of bug 56226 ***
Comment 17 Siebrand Mazeland 2013-10-28 06:20:42 UTC
Very nice work, Brian!
Comment 18 Niklas Laxström 2014-04-29 15:56:13 UTC
*** Bug 55803 has been marked as a duplicate of this bug. ***

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


Navigation
Links