Hi,
I am trying to intercept page edits and send them to a PHP page that will make some modifications to the text and test to see if various conditions have been satisfied.
I have changed the post action of the edit form to point to 'modify.php'. I also added another hidden form field with the original action ($action) as it's value.
This way I'm able to use cURL to pass along the modified $_POST data to the page contained in $action. This all works fine until cURL passes the data on. At which point I'm redirected to a preview page that states:
*"**Sorry! We could not process your edit due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in."
Does anyone know how I can maintain the session data throughout this process? I have verified that $_COOKIE still contains the appropriate values. However $_SESSION does not. This seems to be the cause of the problem. Any comments and/or suggestions are welcome.
Thanks, Kevin *
On Mon, Aug 18, 2008 at 10:00 AM, Kevin Jones kevinaj@gmail.com wrote:
I am trying to intercept page edits and send them to a PHP page that will make some modifications to the text and test to see if various conditions have been satisfied.
I have changed the post action of the edit form to point to 'modify.php'. I also added another hidden form field with the original action ($action) as it's value.
Probably a better way to handle this would be to use the ArticleSave hook:
http://www.mediawiki.org/wiki/Manual:Hooks/ArticleSave
Joshua
Joshua,
I've added additional form fields to the edit page. How can I go about getting the values in those fields into my function if I use the hook?
Thanks, Kevin
On Mon, Aug 18, 2008 at 11:53 AM, Joshua C. Lerner jlerner@gmail.comwrote:
On Mon, Aug 18, 2008 at 10:00 AM, Kevin Jones kevinaj@gmail.com wrote:
I am trying to intercept page edits and send them to a PHP page that will make some modifications to the text and test to see if various conditions have been satisfied.
I have changed the post action of the edit form to point to 'modify.php'.
I
also added another hidden form field with the original action ($action)
as
it's value.
Probably a better way to handle this would be to use the ArticleSave hook:
http://www.mediawiki.org/wiki/Manual:Hooks/ArticleSave
Joshua
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org