Popup form gives error “No action has been set for this form.“ even though actions have been set. Happens only on popup in second language “English“ but returns the error in italian (Maybe a clue to the source of the bug), see explainer vid below. A copy of the form on the italian side does work.
I am facing the same issues using Bricks 2.3.1 and Polylang. My main language is German, and there the forms work, but on the English pages, the message that appears is “Für dieses Formular wurde keine Aktion festgelegt.” (“No action has been set for this form.”)
I noticed however that this only happens if the form is part of a Bricks template that is embedded to the page. If I create a new (English) page and place the form directly on the page, it works.
Update:
I traced it to the call to Database::set_active_templates in wp-content/themes/bricks/includes/database.php. For the first language, this returns the templates active on the current page. For the other language, this does not return the template; as a consequence the get_element_settings() function cannot find the configured form actions.
I am not familiar with the code or database layout, that makes it quite difficult to trace further.
Update #2:
Ok, it seems that the form submission generated contains the form field lang with the content en_US. Somehow this value is not valid and gets mapped to the default language de, and then it cannot find the english template.
If I manually simulate the form submission with lang set to en, it behaves as expected.
Replying with a dedicated comment to indicate a workaround.
The underlying issue is the following: currently the form element contains a language attribute, with a value that is the locale . If it contains the language-code , the form submission works.
Option 1: fix it in the code, maybe around line 2711 in wp-content/themes/bricks/includes/elements/form.php.
Option 2: go to the Polylang language settings and edit the language list. Set the “locale” to the same value as the “code”. For example, I had to set the locale of English from “en_US” (default) to “en”.