While display in layout builder for extra_field was fixed in core, settings form from extra_field_plus doesn't work due to an upstream bug: #3069731: 3.x settings form doesn't work in layout builder

FYI: Both 8.x versions may have problems with layout_builder, because layout_builder has problems with extra_fields. It should work as soon as #3069578: Layout builder doesn't show new "extra fields" is fixed.

NOTE: Once implemented, the layout builder js test can be activated for 3.0.x!

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

Anybody created an issue. See original summary.

anybody’s picture

Title: Doesn't work with layout_builder » 3.x settings form doesn't work in layout builder
Version: 8.x-2.x-dev » 3.0.x-dev
Issue summary: View changes
Parent issue: » #3069731: 3.x settings form doesn't work in layout builder

Postponed on #3069731: 3.x settings form doesn't work in layout builder. Clear upstream bug, I'll leave this open just for information.

After the issue is fixed, the 3.x settings form should also work in layout_builder. Furthermore modules like "Fences" should show the settings form for the field attributes also in layout_builder.

  • Anybody committed 3e212e2 on 8.x-1.x
    Issue #3205608 by Anybody: Provide Drupal 9 compatible 1.x release until...
gurrmag’s picture

I'm facing the same issue where I need the settings form in layout builder. Can you please confirm what the upstream bug is - the link here seems to be back to this ticket? I assume its https://www.drupal.org/project/extra_field_plus/issues/3069861 from the main module page?

I can work around it by embedding a different display with the needed settings set outside of layout builder, but then I cannot edit the layout again. This error is in the logs:

Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "node" for route "entity.node.canonical" must match "\d+" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 204 of /var/www/html/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php).

This is the same error as in https://www.drupal.org/project/readmore_extrafield/issues/3132472, which was closed in favour of https://www.drupal.org/project/readmore_extrafield/issues/3183520 which is closed. The fix there was to change the twig file, but it is not clear how to do that for 3.x or if that would fix this.

grevil’s picture

Issue summary: View changes
grevil’s picture

Once implemented, the layout builder js test can be activated for 3.0.x!

anybody’s picture

Status: Postponed » Needs work

@Grevil: parent issue is fixed, so this can be tested! :)

anybody’s picture

@Grevil I didn't find such tests in 3.0.x. Thought they were commented out, but they were not added yet?

grevil’s picture

@Anybody, last test in 3.0.x javascript test! It's not really commented out, you just have to remove "todo" in "todoTestFieldInLayoutBuilder"

anybody’s picture

Status: Needs work » Needs review

Thank you, cool pattern @Grevil :)
Let's see what the tests return!

anybody’s picture

Status: Needs review » Needs work

2 Fail - can you check that please @Grevil?

The test finds two read more's... perhaps that's correct?

anybody’s picture

Tests with layout builder settings will start working in 3.1.x as of #3305929: [PP-1][3.1.x] Require extra_field_plus 3.x and lock 3.0.x on extra_field_plus:^2
We have to rename the functions for extra_fields_plus 3.x! With 2.x it can't work.

grevil’s picture

The tests are incorrect, but this issue's fork fix does not work, the settings still do not appear in layout builder.

anybody’s picture

Version: 3.0.x-dev » 3.1.x-dev
anybody’s picture

Status: Needs work » Needs review
anybody’s picture

Status: Needs review » Needs work
anybody’s picture

Status: Needs work » Needs review

Trying to retrigger tests...

grevil’s picture

OK, nice the settings are displayed in layout builder! I can overhaul the tests once again now :)

grevil’s picture

All tests run locally, let's see if they turn green here!

anybody’s picture

Status: Needs review » Needs work
grevil’s picture

Status: Needs work » Fixed

Unclear why these tests fail... They run with no problem locally, and we use similar tests in https://www.drupal.org/project/extra_field_plus.

Let's test if it's the issue branches fault!

  • Grevil committed c4c8506 on 3.1.x authored by Anybody
    Issue #3069731: 3.x settings form doesn't work in layout builder
    

Status: Fixed » Closed (fixed)

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