Problem/Motivation

When trying to update a block in Layout Builder on a page that has a language dropdown, the following error is thrown:

Error: Call to undefined method Drupal\Core\Form\FormAjaxException::getStatusCode() in Drupal\dropdown_language\Plugin\Block\DropdownLanguage->build() (line 142 of /var/www/web/modules/composer/dropdown_language/src/Plugin/Block/DropdownLanguage.php)

This is due to the exception not being an HttpException as DropdownLanguage is assuming.

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:

Tag1 supports Drupal development!Tag1 logo

Comments

amelio created an issue. See original summary.

amelio’s picture

Status: Active » Needs review
FileSize
950 bytes
paraderojether’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
483.34 KB
16.78 MB

Hi @amelio

I applied patch #2 against the Dropdown Language module version 3.1.0 with Drupal core version 9.4.7 and the patch works fine, a block in Layout Builder on a page that has a language dropdown can be updated without any error.

Please look at the file attached.

Thank You.

SKAUGHT’s picture

Assigned: Unassigned » SKAUGHT

Anybody made their first commit to this issue’s fork.

Anybody’s picture

Version: 3.1.0 » 3.0.x-dev

Anybody’s picture

Assigned: SKAUGHT » Unassigned

Created MR from #2

  • Anybody committed d73f5aac on 3.0.x
    Issue #3334364: Error when saving block in layout builder form -...
Anybody’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 3.x and 4.x. Totally makes sense.

  • Anybody committed 3b2f8b77 on 4.0.x
    Issue #3334364: Error when saving block in layout builder form -...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.