Fixed
Details
Priority
MinorAssignee
AlexAlexReporter
AlexAlexDeveloper
AlexAlexReviewer
Dmitry AndrejevDmitry AndrejevChange Log Group
ChangedChange Log Message
When AJAX-validated form submit URL wasn't specified during form configuration use form's "action" attribute as fallback.Patch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
Story Points
1Fix versions
Details
Details
Priority
Assignee
Alex
AlexReporter
Alex
AlexDeveloper
Alex
AlexReviewer
Dmitry Andrejev
Dmitry AndrejevChange Log Group
Changed
Change Log Message
When AJAX-validated form submit URL wasn't specified during form configuration use form's "action" attribute as fallback.
Patch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
Story Points
1
Fix versions
Created May 25, 2013 at 12:20 PM
Updated December 30, 2024 at 2:21 AM
Resolved May 25, 2013 at 12:27 PM
FormManager is a JavaScript class, that is used by In-Portal be able to perform real-time form data validation and submission.
Right now it takes form data and sends it (along with OnCreateAjax or similar event) to homepage. Fact, that form data is sent to homepage instead of current page (where form was submitted) might seem strange, but it doesn't really change much because event, which would do data processing doesn't care about url from where it was submitted.
Recently I stumbled upon problem, that forces me to reconsider url to which form is being submitted via AJAX. The unit I was writing wasn't able to complete it's task without several other units being present on page url as well. Since the url where submission was made wasn't having these units, then as a result event ended up with a Fatal Error.
After a bit of coding I ended up with following submission url detection scheme:
use url, specified during form configuration (via
FormManager::registerForm
method)if missing, then use url from
action
attribute of form, that will be submittedif missing, then use homepage url as before