Page MenuHomePhabricator

Pre-save transform skips extensions using wikitext (gallery, references, footnotes, Cite, status indicators, pipe trick, subst, signatures)
Open, Needs TriagePublic

Tokens
"Burninate" token, awarded by Liuxinyu970226."Pirate Logo" token, awarded by Dvorapa."Burninate" token, awarded by Daimona."Burninate" token, awarded by Pols12."Manufacturing Defect?" token, awarded by Boshomi."The World Burns" token, awarded by SamB."Mountain of Wealth" token, awarded by Ciencia_Al_Poder."Love" token, awarded by He7d3r.
Assigned To
None
Authored By
bzimport, Jul 4 2005

Description

Problem

The PST features in wikitext are things like ~~~~ (becomes a signature on-save), pipe trick on links [[Title (disambig)|]] (becomes [[Title (disambig)|Title]] on save), and {{subst:#time:}} which can insert the current date.

These can be used in templates and in passing text, but not inside extension tags such as <ref> or <gallery>.

Use cases
  • Adding a signed caption inside a gallery, for example on a wikiproject page, or talk page. <gallery>File:Example|I like this one. ~~~~</gallery>.
  • Using the pipe trick in links inside gallery captions.
  • Using the current date as the default for template parameters. <ref>{{Cite web|title=|url=|access-date={{subst:#time:Y-m-d}}}}</ref>

Details

Reference
bz2700
Related Gerrit Patches:
mediawiki/core : masterPre-save transform inside extension tags
mediawiki/extensions/Cite : masterPre-save transform inside extension tags
mediawiki/extensions/ImageMap : masterPre-save transform inside extension hooks

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

This bug is not only/mainly about tag extensions: see pipe trick, subst, signatures.

AdamCuerden raised the priority of this task from High to Unbreak Now!.Sep 24 2015, 8:58 AM

this has surely gone on long enough, with maqsses of lost resources.

Aklapper lowered the priority of this task from Unbreak Now! to High.Sep 24 2015, 9:37 AM

This task has not suddenly become more urgent than before, hence reverting the recent Priority change. See https://www.mediawiki.org/wiki/Phabricator/Project_management#Setting_task_priorities for more information. Thanks.

Meno25 removed a subscriber: Meno25.Feb 22 2016, 7:18 PM

Change 272916 had a related patch set uploaded (by Cenarium):
Pre-save transform inside extension tags

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

Restricted Application added a subscriber: Luke081515. · View Herald TranscriptJul 10 2016, 4:00 PM
Pols12 awarded a token.Aug 1 2016, 9:55 AM
Pols12 added a subscriber: Pols12.
He7d3r merged tasks: T10125: Pre-save transform not applied to markup inside <ref> container, T8222: any links inside <gallery> won't autopipe, T8157: template substitution does not work inside <ref> tags, T8814: Pre-save transform not executed for references (signatures, pipe trick, subst don't work), T10929: When a subst: is used inside a <ref> it doesn't get subst'ed, T12927: "pipe trick" links don't work, T14016: subst: don't work inside <ref> tags, T15072: refs fail to parse the piped link trick, T15959: Problem with <ref> and [[xxx (yyy)|]], T16007: Auto-piping does not work in galleries, T15120: New parser breaks signatures inside gallery tags, T16550: Cannot substitute templates withing <ref> tags, T17547: Automatic conversion of the wikitext doesn't work in references, T17467: Pipe trick not working when used as template parameter that is in turn used in a reference citation, T20064: The "pipe trick" does not work in footnotes, T22359: Subst: prefix does not work in image captions inside <gallery></gallery> tags., T15141: Pipetrick doesn't work in gallery image caption, T24258: Five tildes don't produce timestamp in en.wikipedia article namespace, T26131: ~~~~ in <gallery>, T26160: Magic words, templates and parser functions not substituted in <ref> tags, T26446: Automatic signatures (~~~~) do not work in <ref></ref>, T28859: Template substitution doesn't work inside <ref> tags, T30680: Pipe trick doesn't work within ref, T31775: <ref>...</ref> in template, T32135: Substitution not working in gallery tags, T36999: <ref> doesn't expand triple-brace template parameters, T37954: Inter-project links into <ref> do not work when alternative text is empty, T44078: {{subst:foo}} does not work in <ref>, T74079: {{subst: doesn't work inside <ref>...</ref>.Sep 3 2016, 12:53 PM
He7d3r added subscribers: bzimport, Wtmitchell, Krinkle and 14 others.
Izno added a project: Cite.Sep 3 2016, 7:25 PM
Izno moved this task from Unsorted backlog to Defect backlog on the Cite board.Sep 6 2016, 9:25 PM
demon removed a subscriber: demon.Oct 17 2016, 8:11 PM
Liuxinyu970226 awarded a token.
Wargo added a subscriber: Wargo.Apr 19 2017, 5:42 PM
Krinkle removed a subscriber: Krinkle.Apr 19 2017, 7:30 PM

Am I correct in thinking that {{subst:CURRENTMONTH}} and {{subst:CURRENTYEAR}} not being substituded in this edit is due to this bug?

Yes, substituting within refs won't work if this bug is not resolved!

@Thryduulf use {{#tag:ref|}} or {{subst:#tag:ref|}} and it will work

and I would love to see this added to the projects for fixing that are coming up. It is truly time that this got resolved for all wikis.

@Billinghurst add an entry to https://meta.wikimedia.org/wiki/2017_Community_Wishlist_Survey (I guess it would fit in the editing section?).

Liuxinyu970226 awarded a token.
Dalba added a subscriber: Dalba.Jan 26 2018, 1:27 PM
Daimona added a subscriber: Daimona.
gpaumier removed a subscriber: gpaumier.Jul 18 2018, 5:57 PM
Liuxinyu970226 awarded a token.
Krinkle updated the task description. (Show Details)Apr 15 2019, 8:57 PM
Krinkle updated the task description. (Show Details)
Krinkle removed a project: Patch-For-Review.

Not sure why this needs triage now. It's a long standing broken part of the system, which should have been fixed a long time ago. If the foundation can't fix it in 14 years, and with, I suppose, about $1bn to spent, I despair of having anythung useful done. Certainly lowering the priority won't help, and raising it seems unlikely to either.

TOKEN FOR RICH!

Ammarpad removed a subscriber: Ammarpad.Jan 6 2020, 12:24 PM