On 2013-10-11 1:24 PM, "Aaron Schulz" aschulz4587@gmail.com wrote:
The doEdit() call needs to parse and reuses $wgParser, which is already in use so it probably breaks the state of it. Maybe you could use a DeferredUpdate to actually to the edits, or do them via an api.php
request,
or stash $wgParser, replace it with a new one before doing the edit and
then
swap it back.
In any case doing edits on tag parse could be kind of slow (e.g. someone does a page preview with hundreds of tags in it). One might want to limit that somehow.
-- View this message in context:
http://wikimedia.7.x6.nabble.com/Is-WikiPage-doEdit-dangerous-in-a-parser-ta...
Sent from the Wikipedia Developers mailing list archive at Nabble.com.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
The babel extension works around this by mixing the globals.
Note calling api.php internally to edit (not making actual http request) will still cause parser to be called recursively and is unsafe from parser tags.
-bawolff