Topic on Help talk:Extension:ParserFunctions

DavidL (talkcontribs)

The #sub function doesn't work on sites where ParserFunctions is enabled. --  David L  discuter ► 19:02, 23 March 2021 (UTC)

MarMi wiki (talkcontribs)

Only #sub? And on what sites? #sub is from the Extension:StringFunctions.

Edit: Oh, it was integrated into Extension:ParserFunctions. Does those sites have it enabled in config ($wgPFEnableStringFunctions; if other string functions works, then they have)?

DavidL (talkcontribs)
MarMi wiki (talkcontribs)

Integrated functions from StringFunctions needs to be enabled in config in order to work, read the extension pages. I'm guessing that after enabling, they should also appear on the parser functions list (at the bottom of the Special:Version).

Edit: They indeed appear on that function list: https://donate.wikimedia.org/wiki/Special:Version, where that extension is enabled by default (Per-wiki settings for Wikimedia wikis from https://meta.wikimedia.org/wiki/Requesting_wiki_configuration_changes#See_also, search for wmgPFEnableStringFunctions).

Since on your wikis there is no "sub" function, then most likely that extension isn't enabled. And judging by https://phabricator.wikimedia.org/T254782, it most likely wont be enabled.

Dinoguy1000 (talkcontribs)

The mentioned wikis are both WMF wikis, and StringFunctions will never be enabled on WMF wikis. The recommended alternative is Lua via Scribunto.

Pppery (talkcontribs)
DavidL (talkcontribs)

If the module is not enabled, it should not appear in Special:Version, or at least there should be a column indicating the module status (enabled or disabled). I found another solution to use in my template, copied from en.wikipedia.org. Thanks for replies.

Dinoguy1000 (talkcontribs)

ParserFunctions is enabled on these wikis (you'll note that the functions #if and #expr, among others, work just fine); however, the StringFunctions components of the extension (including #sub) are behind a configuration flag, which is not enabled on WMF wikis.

Reply to "#sub doesn't work"