Page MenuHomePhabricator

action=formcreate results in save error
Closed, InvalidPublic


When you try to create a new page via action=formcreate it results in a weird Javascript redirect which drops the tokens, resulting in an It appears that your browser does not support Unicode. It is required to edit pages, so your edit was not saved. error. Clicking save again will be successful, but the whole experience is somewhat confusing.

It seems that when formcreate is submitted, it generates a blank page with an invisible form and an auto-submit-on-load JS script on it, as a way of generating a POST redirect. The form (which points to the normal page edit form, action=submit) does not include the CSRF token, nor the unicode check, so the form submission fails.

Surely there are better ways than this to redirect a form to another one. But the very least, the redirect form should include the CSRF and Unicode tokens.

Page Forms - 4.3 (c35e352)
MediaWiki - 1.30.0 (830bb58)

Event Timeline

Tgr created this task.Oct 11 2018, 12:58 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 11 2018, 12:58 AM
Tgr updated the task description. (Show Details)Oct 11 2018, 1:00 AM

thank you, Tgr

@Tgr - I can't reproduce this with the latest version of Page Forms, 4.4. 4.3 came out a long time ago - maybe upgrading PF would fix the problem?

I'm planning to do development upgrades in Dec. Can it wait until then?

Tgr closed this task as Invalid.Oct 11 2018, 6:30 PM

I'd say let's reopen this task in December if that does not fix the issue, but just by looking at the code it seems it should.
(Sorry, I skimmed the commits between 4.3 and master before submitting but somehow missed that one.)