Last modified: 2011-03-13 18:04:44 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 T25180, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23180 - Edit section links don't show up when the section title is in a template
Edit section links don't show up when the section title is in a template
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-13 10:16 UTC by folengo
Modified: 2011-03-13 18:04 UTC (History)
1 user (show)

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


Attachments

Description folengo 2010-04-13 10:16:14 UTC
The French Wiktionary (and possibly other projects too) uses a set of templates to harmonize section titles. For example [[:wikt:fr:template:-étym-]] is one of them.

The problem is that the "edit section" link is not provided. 

Having a bot "subst:" all these templates seems to be a very heavy task. It would take months, someone on the village pump there is saying.

I know this is a feature, not a bug, but would it not be good to have a new "enable edit section links from templates"(with the power of editing the inserting page, not the template) feature on Mediawiki ?
Comment 1 Happy-melon 2010-04-13 12:35:24 UTC
This has nothing to do with transclusion; it's because the template is using <h3> tags rather than wikimarkup.

If it was switched to use wikimarkup, the editsection links would point to the template rather than the including page, for sure.  That's not realistic to change, as a template may contain one or more section headers, and there's no way to easily decide which block of wikitext on an including page 'represents' the section that's being asked to be edited.  

If you reimplemented the template so it was called as:

==={{-étym-}}===

And contained just the contents of the header:


<span class="icone">[[Image:Nuvola apps bookcase.svg|30px|link=Aide:Étymologies|Origine et histoire de « {{PAGENAME}} »]]</span> Étymologie<noinclude>...


You would get section edit links pointing to the right place.
Comment 2 folengo 2010-04-13 13:21:55 UTC
Well, that's an option, this is probably what I would have done if I had created those templates myself. 

But you need people to memorize the number of "=", whether "=" or "==" or "===" or "====". If these "=" are inside the template, people can simply focus in typing the template name, without needing to memorize anything else.
Comment 3 folengo 2010-04-13 13:27:40 UTC
I was also wondering if it could not be made possible to request at least one set of "=" to be put outside the template, and to have the other "=" inside the template. The software would add up all the "=", those inside and those outside, and find out which title level is required.
Comment 4 Happy-melon 2010-04-13 14:15:34 UTC
(In reply to comment #2)
> Well, that's an option, this is probably what I would have done if I had
> created those templates myself. 

That's the *only* option, because the other behaviour is not viable.  Imagine a page [[Foo]] which contains:

----------------------------------------------
==Header 1==
Text
{{bar}}
==Header 4==
Text
----------------------------------------------

Where [[Template:Bar]] contains:

----------------------------------------------
==Header 2==
Text
==Header 3==
Text
----------------------------------------------

When you click the edit section link for header 2, which page, and which block of wikitext, should appear in the edit window?  This is only the simplest of examples; it would be very easy to construct a thoroughly pathological sample.  Changing the destination of these section links is not going to happen.
 
> But you need people to memorize the number of "=", whether "=" or "==" or "==="
> or "====". If these "=" are inside the template, people can simply focus in
> typing the template name, without needing to memorize anything else.

Having the template wrapped in header tags is also quite useful for highlighting that it's actually a header.  Regardless, this is really not more than a minor inconvenience.

(In reply to comment #3)
> I was also wondering if it could not be made possible to request at least one
> set of "=" to be put outside the template, and to have the other "=" inside the
> template. The software would add up all the "=", those inside and those
> outside, and find out which title level is required.

That would indeed be nice, but that's a separate issue (probably related to bug 12974) for which you should file a separate bug.  The specific example raised in the bug report is INVALID, the underlying request ("make section edit links not point to templates") is WONTFIX. Take your pick, but please don't bugwar; you can still comment on closed bugs.

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


Navigation
Links