Jump to content

Template:Signpost/snippet/autofill/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

Automatically generates a {{Signpost/snippet}} for a given article, using {{Template parameter value}} to automagically extract the template params from the page itself. Takes three params:

  • {{{1}}} - either draft, article, or article-old, to specify which it is (as there are different templates to pull params for depending on which it is).
  • {{{2}}} - Date (i.e. 2005-01-10).
  • {{{3}}} - Subpage (i.e. Arbitration report).

Output looks like this for Wikipedia:Wikipedia Signpost/2023-11-06/Arbitration report:

{{Signpost/snippet/autofill|article|2023-11-06|Arbitration report}}

And this for Wikipedia:Wikipedia Signpost/Next issue/Arbitration report:

{{Signpost/snippet/autofill|draft|Next issue|Arbitration report}}


Detective mystery

Trying to figure out why the draft one works fine and the article one doesn't. For the draft it pulls EVERYTHING completely fine, but for the article it only pulls the RSS desc and NONE OF THE STUFF FROM THE HEADER

Hypotheses

[edit]
  • Title issues, getting wrong pages, etc. No because it gets the RSS fine.
  • Module can't process linebreaks in template No because it does it fine for the draft template params.
  • Weird thing with the {{{1|title goes here}}} thing No because it also completely woofs on the piccy params which are totally normal. In fact they are LITERALLY THE EXACT SAME in the draft article and in the article article (whitespace etc) but work for the draft and not the article
  • Module requires templates to start with Template: Then why does it work for Wikipedia:Wikipedia Signpost/Templates/RSS description?
  • Module woofs when there's wikitext in a template: This is possible, the RSS template has no wikitext and the article header template does. Hmmmm.
Yeah there's no wikitext at all in the draft template. If I add some will it break? Then I will know it's this.
DEBOONKED: it works fine when I put link text in the draft template, and the article one doesn't work even when I remove all wikitext from the header template.

jp×g🗯️ 23:52, 22 December 2023 (UTC)