Hi.
https://www.mediawiki.org/w/index.php?diff=597288&oldid=579490
https://www.mediawiki.org/w/index.php?diff=691576&oldid=686908
These two diffs explain what happened better than I could. I think this was the best outcome, but I'm posting on this list in case I missed some other discussion about the render action and it is, in fact, now deprecated. I checked the talk page, but didn't see anything.
MZMcBride
Foreign file repo is using action=render to get file descriptions from a remote wiki. (I think that's how file descriptions from Commons are loaded on all WMF wikis, too.)
Yea, it's definitely being used. I've not heard of it causing problems, so this deprecation is news to me.
-Chad On May 18, 2013 2:53 PM, "Bartosz Dziewoński" matma.rex@gmail.com wrote:
Foreign file repo is using action=render to get file descriptions from a remote wiki. (I think that's how file descriptions from Commons are loaded on all WMF wikis, too.)
-- Matma Rex
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
It may not be explicitly deprecated now, but it would be nice to deprecate and remove action=render.
We STILL have this sitting around Title:
// @todo FIXME: This causes breakage in various places when we // actually expected a local URL and end up with dupe prefixes. if ( $wgRequest->getVal( 'action' ) == 'render' ) { $url = $wgServer . $url; }
On Sat, 18 May 2013 13:15:15 -0700, Chad innocentkiller@gmail.com wrote:
Yea, it's definitely being used. I've not heard of it causing problems, so this deprecation is news to me.
-Chad On May 18, 2013 2:53 PM, "Bartosz Dziewoński" matma.rex@gmail.com wrote:
Foreign file repo is using action=render to get file descriptions from a remote wiki. (I think that's how file descriptions from Commons are loaded on all WMF wikis, too.)
-- Matma Rex
On 05/18/2013 03:40 PM, MZMcBride wrote:
These two diffs explain what happened better than I could. I think this was the best outcome, but I'm posting on this list in case I missed some other discussion about the render action and it is, in fact, now deprecated. I checked the talk page, but didn't see anything.
I put back the deprecated warning (using the template this time). 'Deprecated' means one should move away from using it, not that it's actually gone yet.
We should give people a heads up, unless/until it's reconsidered and we decide to undeprecate it (maintain support indefinitely).
Matt Flaschen
Where was any discussion regarding this? Or pointers to where it's been causing problems.
-Chad On May 19, 2013 11:35 AM, "Matthew Flaschen" mflaschen@wikimedia.org wrote:
On 05/18/2013 03:40 PM, MZMcBride wrote:
These two diffs explain what happened better than I could. I think this was the best outcome, but I'm posting on this list in case I missed some other discussion about the render action and it is, in fact, now deprecated. I checked the talk page, but didn't see anything.
I put back the deprecated warning (using the template this time). 'Deprecated' means one should move away from using it, not that it's actually gone yet.
We should give people a heads up, unless/until it's reconsidered and we decide to undeprecate it (maintain support indefinitely).
Matt Flaschen
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 05/19/2013 02:47 PM, Chad wrote:
Where was any discussion regarding this? Or pointers to where it's been causing problems.
-Chad
I wasn't there for the discussion that led Terry to mark it as such.
The deprecate tag was removed. If someone still wants to deprecate it, they know where to post.
Matt Flaschen
On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen mflaschen@wikimedia.org wrote:
We should give people a heads up, unless/until it's reconsidered and we decide to undeprecate it (maintain support indefinitely).
Matt Flaschen
Um, how it be discussed and considered to deprecate it in the first place?
On 2013-05-19 10:09 PM, "K. Peachey" p858snake@gmail.com wrote:
On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen mflaschen@wikimedia.org wrote:
We should give people a heads up, unless/until it's reconsidered and we decide to undeprecate it (maintain support indefinitely).
Matt Flaschen
Um, how it be discussed and considered to deprecate it in the first place?
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
It seems a little odd to deprecate something due to load, when realistically we probably represent 95% of the load due to that feature. (Number pulled out of a hat. I have no idea what the real numbers are, but ive never heard of anyone other than mediawiki using that feature, and we use it quite a lot). Im also not a fan of telling people not to do something and then doing it ourselves.
-bawolff
I'm confused as to what the point of action=render is. How is it different from using the API?
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Sun, May 19, 2013 at 11:44 PM, Brian Wolff bawolff@gmail.com wrote:
On 2013-05-19 10:09 PM, "K. Peachey" p858snake@gmail.com wrote:
On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen mflaschen@wikimedia.org wrote:
We should give people a heads up, unless/until it's reconsidered and we decide to undeprecate it (maintain support indefinitely).
Matt Flaschen
Um, how it be discussed and considered to deprecate it in the first
place?
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
It seems a little odd to deprecate something due to load, when realistically we probably represent 95% of the load due to that feature. (Number pulled out of a hat. I have no idea what the real numbers are, but ive never heard of anyone other than mediawiki using that feature, and we use it quite a lot). Im also not a fan of telling people not to do something and then doing it ourselves.
-bawolff _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
It predates the API.
-- brion On May 20, 2013 9:12 AM, "Tyler Romeo" tylerromeo@gmail.com wrote:
I'm confused as to what the point of action=render is. How is it different from using the API?
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Sun, May 19, 2013 at 11:44 PM, Brian Wolff bawolff@gmail.com wrote:
On 2013-05-19 10:09 PM, "K. Peachey" p858snake@gmail.com wrote:
On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen mflaschen@wikimedia.org wrote:
We should give people a heads up, unless/until it's reconsidered and
we
decide to undeprecate it (maintain support indefinitely).
Matt Flaschen
Um, how it be discussed and considered to deprecate it in the first
place?
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
It seems a little odd to deprecate something due to load, when realistically we probably represent 95% of the load due to that feature. (Number pulled out of a hat. I have no idea what the real numbers are,
but
ive never heard of anyone other than mediawiki using that feature, and we use it quite a lot). Im also not a fan of telling people not to do something and then doing it ourselves.
-bawolff _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Mon, May 20, 2013 at 12:23 PM, Brion Vibber bvibber@wikimedia.orgwrote:
It predates the API.
Yes, but I mean what is the argument for keeping it and not deprecating it? As far as I can tell this has been deprecated by API functionality.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
Deprecated means we don't use it and other people shouldn't either. I think you mean superseded, which an argument that can be made here. However, all I've seen is vague hand waving about performance concerns.
-Chad On May 20, 2013 9:32 AM, "Tyler Romeo" tylerromeo@gmail.com wrote:
On Mon, May 20, 2013 at 12:23 PM, Brion Vibber <bvibber@wikimedia.org
wrote:
It predates the API.
Yes, but I mean what is the argument for keeping it and not deprecating it? As far as I can tell this has been deprecated by API functionality.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
// @todo FIXME: This causes breakage in various places when we // actually expected a local URL and end up with dupe prefixes. if ( $wgRequest->getVal( 'action' ) == 'render' ) { $url = $wgServer . $url; }
On Mon, 20 May 2013 19:51:50 +0200, Daniel Friesen daniel@nadir-seen-fire.com wrote:
// @todo FIXME: This causes breakage in various places when we // actually expected a local URL and end up with dupe prefixes. if ( $wgRequest->getVal( 'action' ) == 'render' ) { $url = $wgServer . $url; }
That TODO has been there since 2006 (r12621), so apparently it doesn't cause that much breakage if nobody bothered to fix it.
On Mon, 20 May 2013 12:45:32 -0700, Bartosz Dziewoński matma.rex@gmail.com wrote:
On Mon, 20 May 2013 19:51:50 +0200, Daniel Friesen daniel@nadir-seen-fire.com wrote:
// @todo FIXME: This causes breakage in various places when we // actually expected a local URL and end up with dupe prefixes. if ( $wgRequest->getVal( 'action' ) == 'render' ) { $url = $wgServer . $url; }
That TODO has been there since 2006 (r12621), so apparently it doesn't cause that much breakage if nobody bothered to fix it.
Breakage is fairly irrelevant. It's a hack using global context sitting directly inside of our fundamental Title class. Breakage or no breakage, we don't support hacks forever. ;) sounds like this hack is stretching it's lifespan pretty thin.
On 21/05/13 05:45, Bartosz Dziewoński wrote:
On Mon, 20 May 2013 19:51:50 +0200, Daniel Friesen daniel@nadir-seen-fire.com wrote:
// @todo FIXME: This causes breakage in various places when we // actually expected a local URL and end up with dupe prefixes. if ( $wgRequest->getVal( 'action' ) == 'render' ) { $url = $wgServer . $url; }
That TODO has been there since 2006 (r12621), so apparently it doesn't cause that much breakage if nobody bothered to fix it.
That fixme comment is a pretty clear indication of what would break if you tried to migrate commons image descriptions from action=render to API action=parse. There's no Title.php hack or anything equivalent for the API action.
The problem here is the use of global state, necessitated by Linker interfaces. Ideally, action=render and its hypothetical API replacement would indicate that full URLs are required via ParserOptions.
Making sure every caller of a Linker static method passes an appropriate option would be tricky. Maybe a better approach would be to introduce Linker wrappers to Parser in the form of non-static methods, or to introduce a $parser->mLinker object with wrapper methods and the appropriate state.
Or, if action=render is undesirable for some reason other than the Title.php hack, you could just migrate it to the API line for line:
// @todo FIXME: This causes breakage in various places when we // actually expected a local URL and end up with dupe prefixes. if ( !empty( ApiParse::$forceAbsoluteUrls ) ) { $url = wfExpandUrl( $url, PROTO_RELATIVE ); }
At least it wouldn't be any worse than how it is now. I know there's a psychological barrier to maintaining inelegant code. But it's just psychological. Despite appearances, touching it won't make your hand dirty.
-- Tim Starling
On 21/05/13 09:38, I wrote:
// @todo FIXME: This causes breakage in various places when we // actually expected a local URL and end up with dupe prefixes. if ( !empty( ApiParse::$forceAbsoluteUrls ) ) { $url = wfExpandUrl( $url, PROTO_RELATIVE ); }
Note that there are already five API actions which use FauxRequest/DerivativeContext, which in my opinion is an even worse form of architectural hack. With DerivativeContext, you could leave Title.php as it is, and just set up a fake request with action=render to fool the Title.php code, thus obfuscating the data flow and setting a crafty trap for anyone who tries to remove action=render in the future.
It would be more consistent with other API actions, but I like my way better.
-- Tim Starling
Am 20.05.2013 18:11, schrieb Tyler Romeo:
I'm confused as to what the point of action=render is. How is it different from using the API?
I do use it (action=render) in rendering the content div of a mediawiki A in a different web page B, in the context of the authenticated user, in an iframe.
The different web page B has no additional logic, especially, I cannot add javascript or jquery, so render=action appears to be an easy solution for my problem. Unfortunately, and this is a drawback. action=render does currently not apply the mediawiki A stylesheets.
On Mon, 20 May 2013 12:55:24 -0700, Thomas Gries mail@tgries.de wrote:
Am 20.05.2013 18:11, schrieb Tyler Romeo:
I'm confused as to what the point of action=render is. How is it different from using the API?
I do use it (action=render) in rendering the content div of a mediawiki A in a different web page B, in the context of the authenticated user, in an iframe.
The different web page B has no additional logic, especially, I cannot add javascript or jquery, so render=action appears to be an easy solution for my problem. Unfortunately, and this is a drawback. action=render does currently not apply the mediawiki A stylesheets.
action=render should NOT be used for this purpose. &action=render is not a valid html page. It's meant to be read by something that does additional processing (which could use the api instead) and embedded inside of another html document.
I also don't see how your technique will logically work at all, since the moment the user clicks a link they lose action=render.
To include a page within iframe, sometimes it is reasonable to use "?printable=yes". For example there is a gadget in hewiki that shows Wikidata entry in iframe (within dialog) with ?printable=yes to allow uses to edit properties. (the benefit of printable=yes is that the JS is loaded, but there is no sidebar - which is nice for this purpose)
On Mon, May 20, 2013 at 11:17 PM, Daniel Friesen <daniel@nadir-seen-fire.com
wrote:
On Mon, 20 May 2013 12:55:24 -0700, Thomas Gries mail@tgries.de wrote:
Am 20.05.2013 18:11, schrieb Tyler Romeo:
I'm confused as to what the point of action=render is. How is it different from using the API?
I do use it (action=render) in rendering the content div of a mediawiki A in a different web page B, in the context of the authenticated user, in an iframe.
The different web page B has no additional logic, especially, I cannot add javascript or jquery, so render=action appears to be an easy solution for my problem. Unfortunately, and this is a drawback. action=render does currently not apply the mediawiki A stylesheets.
action=render should NOT be used for this purpose. &action=render is not a valid html page. It's meant to be read by something that does additional processing (which could use the api instead) and embedded inside of another html document.
I also don't see how your technique will logically work at all, since the moment the user clicks a link they lose action=render.
-- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org