Last modified: 2013-06-18 14:42:27 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 T23681, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21681 - Elements mysteriously empty in PPNode_DOM XML serialization
Elements mysteriously empty in PPNode_DOM XML serialization
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.16.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikpiedia.org/w/index.php?t...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-29 14:51 UTC by P.Copp
Modified: 2013-06-18 14:42 UTC (History)
3 users (show)

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


Attachments

Description P.Copp 2009-11-29 14:51:43 UTC
Steps to reproduce:

1. Open <http://en.wikipedia.org/w/index.php?title=Template:Zh-full&action=edit&oldid=317512308> and copy the wikitext into the text field at <http://en.wikipedia.org/wiki/Special:ExpandTemplates>.
2. Check "Show XML parse tree" and press OK
3. Search in the XML output for the string "<comment></comment>"

Note that the output can't be correct, because a comment node must contain at least the opening "<!--" characters.

A few notes:
- This is not a bug of Special:Expandtemplates, as the api output of action=expandtemplates is the same.
- It appears to happen only very rarely and for certain input values
- The actual preprocessor output appears to be correct, which is why I suspect it might be a bug in the ->saveXML function of the DOM XML extension.
Comment 1 Tim Starling 2009-11-29 23:43:14 UTC
I have an alternate test case, not changed by much:

{{xxxxxxxxxxxxxx|x={{{1|}}}}}<!--
-->{{xxxx{{{2|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{2|}}}}}}}<!--
-->{{xxxx{{{3|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{3|}}}}}}}<!--
-->{{xxxx{{{4|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{4|}}}}}}}<!--
-->{{xxxx{{{5|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{5|}}}}}}}<!--
-->{{xxxx{{{6|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{6|}}}}}}}<!--
-->{{xxxx{{{7|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{7|}}}}}}}<!--
-->{{xxxx{{{8|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{8|}}}}}}}<!--
-->{{xxxx{{{9|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{9|}}}}}}}<!--
-->{{xxxx{{{10|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{10|}}}}}}}<!--
-->{{xxxx{{{11|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{11|}}}}}}}<!--DELETED
-->{{xxxx{{{12|}}}|{{x}} {{xxxxxxxxxxxxxx|x={{{12|}}}}}}}<noinclude>
{{documentation}}
</noinclude>

Note that the bug is sensitive to length and will stop working if you delete or duplicate lines, or if you change the length of the "xxxxxxxxxxxxxx" template name by more than a couple of characters. In the output, there is no DELETED string, that comment becomes empty. 

If this happened in the DOM, instead of on serialization, then it would be impossible to save this text to the wiki since it would be corrupted during pre-save transform.
Comment 2 P.Copp 2009-11-30 01:37:28 UTC
Googling around a bit, I probably found the reason: <http://www.mail-archive.com/xml@gnome.org/msg05436.html>

Since they fixed the issue in Feb 2008, the bug should disappear when the servers are upgraded to anything beyond PHP 5.2.6.

Should this report be left open until then or can it be closed as LATER?
Comment 3 Jesús Martínez Novo (Ciencia Al Poder) 2012-09-29 20:13:08 UTC
Works for me. Seems an old bug. Could you please confirm it's fixed?
Comment 4 Derk-Jan Hartman 2012-10-22 20:17:22 UTC
Wikipedia currently runs 5.3.10-1ubuntu3.4+wmf1, so judging from P.Copps information I would say: Fixed.

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


Navigation
Links