Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Tyler Romeo
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 | tylerro...@gmail.com


On Sun, May 19, 2013 at 11:44 PM, Brian Wolff bawo...@gmail.com wrote:

 On 2013-05-19 10:09 PM, K. Peachey p858sn...@gmail.com wrote:
 
  On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen
  mflasc...@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

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Brion Vibber
It predates the API.

-- brion
On May 20, 2013 9:12 AM, Tyler Romeo tylerro...@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 | tylerro...@gmail.com


 On Sun, May 19, 2013 at 11:44 PM, Brian Wolff bawo...@gmail.com wrote:

  On 2013-05-19 10:09 PM, K. Peachey p858sn...@gmail.com wrote:
  
   On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen
   mflasc...@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
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Tyler Romeo
On Mon, May 20, 2013 at 12:23 PM, Brion Vibber bvib...@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 | tylerro...@gmail.com
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Chad
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 tylerro...@gmail.com wrote:

 On Mon, May 20, 2013 at 12:23 PM, Brion Vibber bvib...@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 | tylerro...@gmail.com
 ___
 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

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Daniel Friesen


// @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;
}

--
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]

On Mon, 20 May 2013 10:43:26 -0700, Chad innocentkil...@gmail.com wrote:

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 tylerro...@gmail.com wrote:


On Mon, May 20, 2013 at 12:23 PM, Brion Vibber bvib...@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 | tylerro...@gmail.com



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Bartosz Dziewoński

On Mon, 20 May 2013 19:51:50 +0200, Daniel Friesen dan...@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.

--
Matma Rex

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Thomas Gries
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.






___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Daniel Friesen
On Mon, 20 May 2013 12:45:32 -0700, Bartosz Dziewoński  
matma@gmail.com wrote:


On Mon, 20 May 2013 19:51:50 +0200, Daniel Friesen  
dan...@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.

--
~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-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Daniel Friesen

On Mon, 20 May 2013 12:55:24 -0700, Thomas Gries m...@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-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Eran Rosenthal
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 dan...@nadir-seen-fire.com
 wrote:

 On Mon, 20 May 2013 12:55:24 -0700, Thomas Gries m...@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 mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Matthew Flaschen
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

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread Tim Starling
On 21/05/13 05:45, Bartosz Dziewoński wrote:
 On Mon, 20 May 2013 19:51:50 +0200, Daniel Friesen
 dan...@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


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-20 Thread 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


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-19 Thread Matthew Flaschen
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

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-19 Thread Chad
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 mflasc...@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
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-19 Thread K. Peachey
On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen
mflasc...@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

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-19 Thread Brian Wolff
On 2013-05-19 10:09 PM, K. Peachey p858sn...@gmail.com wrote:

 On Mon, May 20, 2013 at 4:34 AM, Matthew Flaschen
 mflasc...@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] State of MediaWiki's render action (parameter to index.php)

2013-05-18 Thread MZMcBride
Hi.

https://www.mediawiki.org/w/index.php?diff=597288oldid=579490

https://www.mediawiki.org/w/index.php?diff=691576oldid=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



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-18 Thread Bartosz Dziewoński

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-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-18 Thread Chad
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@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
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] State of MediaWiki's render action (parameter to index.php)

2013-05-18 Thread Daniel Friesen
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 innocentkil...@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@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


--
~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-l