Last modified: 2013-06-12 16:01:00 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 T51376, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49376 - Partial transclusion of pages fails with composite section names
Partial transclusion of pages fails with composite section names
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
LabeledSectionTransclusion (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-10 03:53 UTC by Teak
Modified: 2013-06-12 16:01 UTC (History)
6 users (show)

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


Attachments

Description Teak 2013-06-10 03:53:39 UTC
If a page contains a section with name "A", and the following section is named "A B", then transcluding the first section (fromsection="A" tosection="A") will also append the following section (and anything else that has a composite name "A something"). Although this can be circumvented by renaming the following sections "A_B" or something similar, it seems to be a bug, and these type of section naming is quite common with dictionaries, encyclopedias and the like (following the article names).

Here is an example: http://hy.wikisource.org/w/index.php?title=%D5%80%D5%8D%D5%80/%D4%B1%D5%A2%D5%A2%D5%A1%D5%BD&action=edit
with transclusion from the page: http://hy.wikisource.org/w/index.php?title=%D4%B7%D5%BB:%D5%80%D5%A1%D5%B5%D5%AF%D5%A1%D5%AF%D5%A1%D5%B6_%D5%8D%D5%B8%D5%BE%D5%A5%D5%BF%D5%A1%D5%AF%D5%A1%D5%B6_%D5%80%D5%A1%D5%B6%D6%80%D5%A1%D5%A3%D5%AB%D5%BF%D5%A1%D6%80%D5%A1%D5%B6_%28Soviet_Armenian_Encyclopedia%29_1.djvu/16&action=edit
Comment 1 Philippe Elie 2013-06-11 19:55:48 UTC
This come from the behavior of section transclusion, the correct way to tag section is <section begin="A B" /> which expand to ## "A B" ##, actually you use ## A B ## --> <section begin=A B /> which create a section named A. I'm unsure if it's the intent of the labeled transclusion or a bug ( http://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion ). I'll modify the javascript which handle <section --> ## to add/remove transparently the needed quote "", once done you'll need to do a dummy edit on such page so the needed "" will be added (or you can add it now manually).
Comment 2 Teak 2013-06-11 20:10:17 UTC
I see!

Strange that the mediawiki page of the labeled transclusion extension doesn't include quotation marks in its example...

An automatic way of adding missing quotation marks would be nice indeed. Thanks.
Comment 3 Philippe Elie 2013-06-11 23:30:30 UTC
Fixed by http://wikisource.org/w/index.php?title=MediaWiki:Base.js&diff=355722&oldid=351238 . As I can't reproduce this problem on my local wiki, I let this bug open and changed Component from ProofreadPage to LabeledSectionTransclusion. Anyone know if tag attribute parsing changed recently or the section transclusion code changed so <section begin=A B/>... is now transcluded by a {{#lst:...|A}} ?
Comment 4 Philippe Elie 2013-06-12 14:14:49 UTC
Closing, double checked it and LabeledSectionTransclusion was already working this way.
Comment 5 Teak 2013-06-12 16:01:00 UTC
Thanks! The javascript worked well. Is there any way to implement this where the substitution ## section_name ## to <section begin=section_name/> happens? So that the automatic addition of quotation marks works out of the box in all wikis?

thanks again for looking into this.

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


Navigation
Links