BrowserTestBase::drupalPostForm Ajax submission

Created on 28 February 2017, over 7 years ago
Updated 1 July 2024, 4 months ago

API page: https://api.drupal.org/comment/reply/12094481

The documentation falsely states the method BrowserTestBase::drupalPostForm() would emulate AJAX submission, provided the $submit parameter is an array of the specified kind.
The array [ 'path' => '/support/request?ajax_form=1&_wrapper_format=drupal_ajax', 'triggering_element' => 'op' ] used as $submit parameter causes the method to crash with "preg_match() expects parameter 2 to be string, array given" which clearly shows that the $submit parameter can not be an array.

Please fix the documentation as it instantly misleads into faulty solution and time waste.

🐛 Bug report
Status

Closed: outdated

Version

11.0 🔥

Component
Documentation 

Last updated about 14 hours ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024