Last modified: 2013-11-15 11:10:41 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 T43769, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41769 - frame:expandTemplate doesn't work with parser functions
frame:expandTemplate doesn't work with parser functions
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: Normal normal (vote)
: MW 1.22 version
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-04 18:11 UTC by Daniel Friesen
Modified: 2013-11-15 11:10 UTC (History)
5 users (show)

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


Attachments

Description Daniel Friesen 2012-11-04 18:11:09 UTC
frame:expandTemplate does not work on parser functions. I didn't test #style but at the very least fullurl doesn't work with it.

This would be problematic for the same reason it's problematic for templates.
Comment 1 Yannick Perret 2013-02-09 21:28:29 UTC
As far as I know parser functions are not "real" templates (but it uses the same syntax so...).

Calling "fullurl" works if you use frame:preprocess() rather that frame:expandTemplate().

Whatever in my opinion all these functions should be mapped inside mw module, including pseudo-templates such as {{PAGENAME}} and others.

Regards,
Comment 2 Daniel Friesen 2013-02-09 21:38:45 UTC
(In reply to comment #1)
> As far as I know parser functions are not "real" templates (but it uses the
> same syntax so...).
> 
> Calling "fullurl" works if you use frame:preprocess() rather that
> frame:expandTemplate().

frame:preprocess() does not handle argument data directly. It's far to unreliable to use when you have user specified data. And iirc with what I remember of the way our parser works with it's handling of variables, it's actually impossible to use frame:preprocess in every situation that frame:expandTemplate would work.
Comment 3 Yannick Perret 2013-02-09 22:48:11 UTC
That's true. It can be used as a workaround but not for general use.

Whatever I still think that the best way is to treat these features at Lua/C level in order to avoid calling preprocess/expandTemplate.
It is what is expressed in http://www.mediawiki.org/wiki/Extension:Scribunto/Deployment_priorities#Should_have (the goal of Lua is to avoid calling too much mediawiki preprocess stuff, after all).

Something like mw.parserfunctions maybe, or something with dedicated submethods such as mw.page, mw.tools, ...
Comment 4 Brad Jorsch 2013-03-04 18:23:14 UTC
Gerrit change #52060
Gerrit change #52061
Comment 5 Brad Jorsch 2013-03-20 13:42:55 UTC
Merged. Note this will likely be deployed along with 1.22wmf1, see https://www.mediawiki.org/wiki/MediaWiki_1.22/Roadmap for the schedule.
Comment 6 Kevin Israel (PleaseStand) 2013-04-17 00:53:39 UTC
Is Gerrit change #52060 necessary for Scribunto compatibility with MW 1.21? If so, should it be backported?
Comment 7 Brad Jorsch 2013-04-17 02:57:51 UTC
(In reply to comment #6)
> Is Gerrit change #52060 necessary for Scribunto compatibility with MW 1.21?

Only if you want to use a version of Scribunto later than 0dc45ff2f89b8a6b90cee7e0c1fb70e2a38985f1.
Comment 8 Kevin Israel (PleaseStand) 2013-04-17 05:11:43 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Is Gerrit change #52060 necessary for Scribunto compatibility with MW 1.21?
> 
> Only if you want to use a version of Scribunto later than
> 0dc45ff2f89b8a6b90cee7e0c1fb70e2a38985f1.

I take that to mean the change is *not* supposed to be released as part of 1.21.
Fine with me.
Comment 9 Brad Jorsch 2013-04-17 13:07:28 UTC
(In reply to comment #8)
> 
> I take that to mean the change is *not* supposed to be released as part of
> 1.21.
> Fine with me.

Take it more literally: If 1.21 should be compatible with a version of Scribunto later than 0dc45ff2f89b8a6b90cee7e0c1fb70e2a38985f1, then this would need to be backported.
Comment 10 Gerrit Notification Bot 2013-04-17 16:00:37 UTC
Related URL: https://gerrit.wikimedia.org/r/59637 (Gerrit Change I339b882010dedd714e7965e25ad650ed8b8cd48f)
Comment 11 Gerrit Notification Bot 2013-11-14 15:18:55 UTC
Change 95391 had a related patch set uploaded by MarkAHershberger:
(bug 41769) Add frame:callParserFunction() and frame::extensionTag()

https://gerrit.wikimedia.org/r/95391
Comment 12 Gerrit Notification Bot 2013-11-14 15:22:41 UTC
Change 95391 merged by MarkAHershberger:
(bug 41769) Add frame:callParserFunction() and frame::extensionTag()

https://gerrit.wikimedia.org/r/95391
Comment 13 Andre Klapper 2013-11-15 11:10:41 UTC
No open patches to review here (backport patch to REL_1_21 got merged), hence resetting status to RESOLVED FIXED. Backport_to_Stable flag might be set to "+" by hexmode.

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


Navigation
Links