Follow-up to #2263569: Bypass form caching by default for forms using #ajax. β .
There, in RenderElement::preRenderAjaxForm()
we changed the default URL of an AJAX submission from Url::fromRoute('system.ajax')
to Url::fromRoute('<current>')
. Most of the time, this is the same as $form['#action']
, but not always. For example, comment forms sometimes set the action to a separate page.
For the cases where the action is not the current page, let's discuss which one AJAX should submit to, and then add docs and test coverage for that. In most cases, since the AJAX response is built solely out of what's in $form and $form_state at the end of form processing, which route we submit to probably doesn't result in any difference, if both the current route and action route end up calling $form_builder->buildForm() with the same arguments, and if there aren't alter hooks that modify differently based on the route. But, since it is possible to write routes and alter implementations that result in differences, we should take a stance here.
Active
11.0 π₯
Last updated
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.