Last modified: 2014-11-04 22:53:16 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 T2878, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 878 - "Templates used on this page" on section edit should show templates used in the section at initial edit as well as preview
"Templates used on this page" on section edit should show templates used in t...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Lowest normal with 10 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: 11385 11637 13845 14136 16130 (view as bug list)
Depends on: 2948
Blocks: section-editing
  Show dependency treegraph
Reported: 2004-11-14 07:18 UTC by lɛʁi לערי ריינהארט
Modified: 2014-11-04 22:53 UTC (History)
18 users (show)

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


Description lɛʁi לערי ריינהארט 2004-11-14 07:18:23 UTC
Please edit 
and make a preview.

"Templates used on this page:" will shows all templates of the 
page. The section does not contain any template.

Regards Reinhardt
Comment 1 Brion Vibber 2004-11-29 00:31:17 UTC
This would require parsing the text on edit. Possible but ugly.
Comment 2 Brian Jason Drake 2005-12-23 06:31:29 UTC
A related issue: When adding a new section, "Templates used on this page:" 
should not appear.
Comment 3 lɛʁi לערי ריינהארט 2006-05-05 10:38:16 UTC
updated url
* the previous was refering to the "old" test wiki
* the new url reflects comment 2

possible implementations:
a) list only the templates used in the (meta-)section
=== a ===
==== a one ====
==== a two =====

b) *dynamicaly* list the used templates in preview; this was mentioned at

Bug 5604: 'Templates used on this page:' should display in "view source" for
protected pages
Relates also to the unability to see the "new" templates in preview. This would
be required when "debugging" a page.
Comment 4 Brion Vibber 2007-09-18 18:07:17 UTC
*** Bug 11385 has been marked as a duplicate of this bug. ***
Comment 5 Brion Vibber 2007-10-15 20:06:35 UTC
*** Bug 11637 has been marked as a duplicate of this bug. ***
Comment 6 Gurch 2008-02-05 18:52:12 UTC
Have I missed something, or is this fixed now? If I edit a section, or start a new one, and hit preview, I am shown only the templates in that section. If there are none, there is no list.

The only thing that doesn't seem to be fixed is bug 11637, which was marked as a duplicate of this one even though it seems to address a different issue.

When you edit a page, you are shown the list of templates used immediately. When editing a section, you are not shown the list of templates unless you hit "Show preview". At no point do you see templates that aren't used in that section; rather, you just fail to see ones that are.

If that can be fixed, great; if not, should this be marked as fixed and bug 11637 reopened?
Comment 7 Splarka 2008-04-26 08:55:02 UTC
*** Bug 13845 has been marked as a duplicate of this bug. ***
Comment 8 Brion Vibber 2008-05-15 21:21:17 UTC
*** Bug 14136 has been marked as a duplicate of this bug. ***
Comment 9 Brion Vibber 2008-05-15 21:22:22 UTC
Per bug 14136, we do appear to be showing the current (thus incorrect) list for full-page edits starting from an old revision; in addition we're still listing blank for section edits until the preview is done.
Comment 10 Lejonel 2008-10-26 17:57:34 UTC
*** Bug 16130 has been marked as a duplicate of this bug. ***
Comment 11 Brion Vibber 2008-12-30 02:52:49 UTC
Updated summary for more detail
Comment 12 Happy-melon 2009-07-24 13:52:27 UTC
Perhaps it would be best just not to show the transclusion list if we have reason to believe (presence of 'section', 'oldid', etc, GET variables) that it won't be accurate? 
Comment 13 Gregor Hagedorn 2011-11-26 08:39:27 UTC
In version 1.18 it seems that for section edit NO templates are ever shown. I find this quite confusing. Perhaps a better solution would be always to show the templates of the page, but simply clearly label as: "Templates used on the page containing this section" oder "Templates used in this or other sections of the page"?
Comment 14 Timeshifter 2013-06-17 04:37:08 UTC
I removed the URL in the description because it does not illustrate anything. 

I had no idea until today that a list of templates used in a section existed. I knew only of the full page list. I did not know that a preview of a section edit would show a list of templates used in the section.

It is important to fix this because with the roll-out of the VisualEditor (VE) there is a huge necessity to simplify finding the stuff that VE can't edit. 

VE will more than likely have "edit source" links or icons for every section. People will be using those links all the time in order to try to edit or move around those templates in article sections. 

Transcluded templates in those sections will not be easily accessible to many editors due to the common lack of knowledge about how to get to them. I have tens of thousands of edits on Wikipedia and always went to the full-page list to find them. That is difficult. 

Concerning editing after VE is implemented there are multiple bug requests for ease of access to wikitext source editing of sections and templates in sections. See these discussions (or find them in the archives):

* Bug 49665 - VisualEditor: Provide a get-me-into-the-wikitext-editor link on every header.
* Bug 49666 - VisualEditor: Display both [edit] and [edit source] on every header.
* Bug 48429 - VisualEditor: Support editing of sections inside a page.
Comment 15 Andre Klapper 2013-06-18 01:09:10 UTC
I fail to see the urgency, hence resetting priority lower.
Comment 16 Timeshifter 2013-06-18 09:37:48 UTC
I discuss this further here:
[[Wikipedia:VisualEditor/Feedback]] - see the thread titled "View list of transcluded templates in a section" or something similar. You can find it in the archives when it is moved there. 

From what I can tell the visual editor edits template text poorly, and does not edit the formatting at all. I am not sure if VE can, or will be able to, edit transcluded templates at all. At least not where the transcluded template is used in a section of an article. In any case the most thorough editing of a template is done with the source editor. 

So we need quicker access to a list of transcluded templates used in that section of the article. Also, the name needs to be changed from "View templates on this page" to "View templates in this section".

[[Wikipedia:VisualEditor/Feedback]]. To see what I am talking about hit the edit source link for any discussion section with a Bugzilla tracking template. You will not see any template links after the edit window. Then click the "show preview" button. You will now see the Bugzilla tracking template linked after the edit window under "view templates".
Comment 17 Timeshifter 2013-06-19 05:54:30 UTC
Here is a page that has a table and a couple transcluded navigation-box templates at the bottom:
[[List of countries by incarceration rate]]

With VisualEditor (VE) the table is editable and WYSIWYG.

But with VE the existing text in the 2 navigation boxes at the bottom of the page can not be edited as far as I can tell. At least not within VE from that page. I am talking about after clicking the edit icons for the navigation boxes. 

In VE new parameters can be added to one of the templates, but not to the other. I don't see a way to edit the text for existing parameters in either navigation box. 

So to be able to edit one of those templates better in source mode or VE it would be helpful to have links to the template pages. It would be more helpful if those links were more easily accessible than they are now. 

See related bug 49772 - "VisualEditor: Template dialogs should include a link to the [template:name] page". But that is only talking about links to the top-level templates. 

Sometimes I also want links to component templates for various reasons. Such as to be able to read more documentation, choose better templates, etc.. All those templates need to be more accessible by having the template list for a section show up when first clicking the edit link for a section.
Comment 18 Eduard Braun 2013-06-26 19:13:11 UTC
I'd also love if "View templates on this page" would be visible directly when doing section edits (without the need of doing a preview first).

The reason is, that I'm often involved in discussions around templates. If I want to comment on a section I click the corresponding edit link. If I want to easily check the documentation page of a template used in the section I have to do a preview first to actually get a click-able link.
Comment 19 Quim Gil 2014-04-30 06:23:12 UTC
Trying to summarize with an example:

Edit source

* In edit view, there are no templates listed.

* After clicking preview, "Templates used in this preview:" are shown.

So it seems that we are in the same point where we were almost 10 years ago.

At the time Brion said:

> This would require parsing the text on edit. Possible but ugly.

This is probably true still today, and this is perhaps why there hasn't been any change. The use case for this seems to be quite marginal, and the alternative relatively simple: click Preview.

Proposing a Wontfix.
Comment 20 Timeshifter 2014-04-30 23:19:18 UTC
Until I read this thread awhile back I did not know one could get a list of templates used in a section. By any means. So by reading this thread I learned I could click preview to get that list. Funny thing is that I forgot this trick until just now when I read this thread again - after getting an email about this thread being modified. :)

So maybe one thing that could be done to let people know is to add a link called "Show templates in this section". Add it to the top or bottom of the edit window. At least then I would not forget. It could be another preview link, or it could actually do the same thing as a preview but only show the list of templates. Or just the edit window and the list of templates. Preview would be removed or made invisible. 

I am one of the top 2500 editors (by edit total) on Wikipedia, and for years I did not know I could use the "Page information" link in the toolbox to get a list of templates used on the whole page. I always clicked the top edit button on a page to get to templates. Anything that helps editors do things faster is important nowadays. Since there are more articles and less editors. 

The other alternative "parsing the text on edit" would slow down the opening a section for editing, I believe. Never a good idea. Now that I think about it why not avoid showing a list of templates at anytime, even for a whole page, except when one specifically clicks a link: 
*"Show templates in this section". 
*"Show templates in this page". 
That would speed up opening pages and sections for editing. 

That could especially help the visual editor open a page faster for editing. Its long time to open pages with lots of templates and/or references for editing is its fundamental flaw. Especially since VE does not have true section editing.

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