Last modified: 2013-10-23 18:17:08 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 T37216, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35216 - __NOEDITSECTION__ not working with gallery
__NOEDITSECTION__ not working with gallery
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.18.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-14 02:41 UTC by jimsafley
Modified: 2013-10-23 18:17 UTC (History)
6 users (show)

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


Attachments

Description jimsafley 2012-03-14 02:41:55 UTC
I found a rather obscure bug in action=parse. While using the __NOEDITSECTION__ behavior switch on wikitext that contains a heading and a gallery, the section edit link is nevertheless returned. Take the following wikitext:

"
== Headline ==
<gallery>
Image:Example.jpg|Caption1
</gallery>"

Make the following request:

text=__NOEDITSECTION__%0A%3D%3D+Headline+%3D%3D%0A%3Cgallery%3E%0AImage%3AExample.jpg%7CCaption1%0A%3C%2Fgallery%3E&format=json&action=parse

The response includes the unwanted edit link:

<span class="editsection">[<a href="/mediawiki/index.php?title=API&amp;action=edit&amp;section=1" title="Edit section: Headline">edit</a>]</span>

What's interesting is that removing the "|Caption1" from the wikitext fixes the problem.
Comment 1 P.Copp 2012-03-14 18:39:52 UTC
Seems to be fixed in 1.19. At least I can't reproduce it anymore neither with an existing nor a missing filename. My guess is, that r109547 fixed it, since that revision removed an instance of message parsing from within the parser, which often leads to bugs like this.
Comment 2 Dan Collins 2012-03-14 19:00:34 UTC
Fixed by r109547 probably. Let us know if you still see this.

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


Navigation
Links