Problem/Motivation

The Contact us page places the Business contact webform in a Canvas page. The form submits through Ajax, and the Ajax request (/contact-us?ajax_form=1&_wrapper_format=drupal_ajax) answers with the whole page as HTML instead of the Ajax JSON, so core's Ajax code gives up and shows "Oops, something went wrong. Check your browser's developer console for more details." to the visitor. Reproduced on a fresh Rightup 1.0 build in English and in a second language.

Steps to reproduce

  1. Open /contact-us and press Submit Form without filling anything in.
  2. The message above appears. The network tab shows the Ajax POST returning text/html.

Proposed resolution

Turn Ajax off for webform.webform.business_contact with a config action in the Rightup recipe (settings.ajax: false). The form then submits as a normal page request, and the Oops message no longer appears (checked by submitting the empty form on a fresh build: the message was gone, and the phone validation message from the form's own JavaScript showed). The cause of the Ajax response is probably in how Canvas renders a page route for the Ajax wrapper format and is left for the Canvas maintainers; this keeps the visitor's form working meanwhile.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ❌ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ❌ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • The contact form submits with a page reload instead of Ajax.

API changes

  • N/A

Data model changes

  • One setting of an existing webform changes.

Release notes snippet

  • The Business contact form no longer shows an Ajax error when submitted with invalid values.

AI-Generated: Yes. Drafted and tested with Claude Code, reviewed by the contributor.

Issue fork rightup-3628155

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Status: Needs review » Fixed
Issue tags: +rightup-1.0.3

✅ Released rightup-1.0.3

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.