Page MenuHomePhabricator

#lsth: Cannot transclude a section by heading more than once
Closed, ResolvedPublic

Description

When transcluding content by heading (using #lsth:), a given heading can only be transcluded one time in a given article. Subsequent transclusions will yield a link to the article instead of the section's content.

For example, suppose I have a page named "Test" that contains this content (using three dashes to show start/stop):


Example

This is an example.

If I then create a page with the following:


{{#lsth:Test|Example}}

{{#lsth:Test|Example}}

The output I -expect- would be:


This is an example.

This is an example.

The output I -actually- receive is:


This is an example.

[[Test]]


Version: master
Severity: normal

Details

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:49 AM
bzimport set Reference to bz38077.
bzimport added a subscriber: Unknown Object (MLST).

This should also be fixed in https://gerrit.wikimedia.org/r/#/c/31330/ , which is being deployed in the current deployment cycle.

This issue has not been resolved as of the build from November 14, 2018. The same reproduction steps still cause the same error.

This has become a problem for further development of excerpts in the Spanish Wikipedia. The desired usage pattern is:

{{#if: {{#lsth:Article|Section}} | {{#lsth:Article|Section}} | [[Category:Articles with broken excerpts]] }}

But unfortunately this just outputs a link to the article.

Change 917949 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/extensions/LabeledSectionTransclusion@master] Remove non-functional loop detection code

https://gerrit.wikimedia.org/r/917949

Change #917949 merged by jenkins-bot:

[mediawiki/extensions/LabeledSectionTransclusion@master] Remove non-functional loop detection code

https://gerrit.wikimedia.org/r/917949