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

FabianBoensch created an issue. See original summary.

unstatu’s picture

Status: Active » Needs review
StatusFileSize
new4.94 KB
new1.15 KB

Hi,

Thanks for the patch. It worked for me perfectly except for the theme option.

I have modified a little bit the code to work with this option.

johnwebdev’s picture

Thanks for the issue!

I am wondering if we should widen the scope here and ensure any module can be compatible with Layout Builder Modal by allowing modules to alter the contextual links/routes that Layout Builder Modal should target instead.

mark_fullmer’s picture

Status: Needs review » Needs work

Agreed that it would be better to broaden the scope, rather than committing a fix that is specific to Layout Builder ST, but I also think that it would be appropriate for Layout Builder Modal to maintain a list of known link keys & routes that it is compatible with.

It seems like the mechanism for altering the two new arrays should be through alter hooks (as opposed to a site-specific exposed UI for modifying the allowed link keys & form routes.

johnwebdev’s picture

but I also think that it would be appropriate for Layout Builder Modal to maintain a list of known link keys & routes that it is compatible with.

Agreed!

jerdavis’s picture

For what it's worth, this is also incompatible with the core issue for layout translations on which Layout Builder ST is based: https://www.drupal.org/project/drupal/issues/2946333

jerdavis’s picture

StatusFileSize
new4.69 KB

Adding a patch that works with the core patch referenced above.

rigoucr’s picture

Patch #7 worked for me, thank you all

heddn’s picture

#7 on 9.1.0-rc1 works for me.

johnwebdev’s picture

Status: Needs work » Needs review
kmonty’s picture

I have been using patch #7 now for about a year on two sites. Working great. Is there anything left needed for this development-wise to get it committed a new release cut?

vlad.dancer’s picture

Status: Needs review » Reviewed & tested by the community

RTBC +1.

Works good. Just minor code adjustments.

  1. +++ b/layout_builder_modal.module
    @@ -9,22 +9,35 @@ use Drupal\Component\Serialization\Json;
    +  $links = $links;
    

    Odd line.

  2. +++ b/layout_builder_modal.module
    @@ -77,11 +93,21 @@ function layout_builder_modal_link_alter(&$variables) {
    +  $applicable = false;
    

    To be consistent:
    true -> TRUE,
    false -> FALSE

berdir’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new4.47 KB
new3.34 KB

I think something went wrong with the rerolls at some point. The patches are replacing the separate ajax class condition, but the first patches did not do that. I suspect that was added later and was accidently removed when resolving the conflict. New patch is just replacing the route condition.

Also addressed #12.

kcampero’s picture

I'm really grateful for Patch #13! It fixed the issue with Layout Builder Modal in version 8.x-1.2 on Drupal v9.5.4 with PHP Version 8.1.2-1ubuntu2.11. Thank you, Drupal community! 🙌🏼

Kevin Jhonatan’s picture

#13
3133695-13.patch
8.x-1.x: PHP 8.1 & MySQL 8.0, D9.5.9
This worked fine for me, thank you!

Vanessa Zeballos’s picture

#13 3133695-13.patch

PHP Version 8.1.2
Drupal Version 9.5.9

Thank you very much for patch #13! Fixed issue with Layout Builder Modal.
Keep contributing, Drupal community!

figover’s picture

Status: Needs review » Reviewed & tested by the community

PHP Version 8.1.21
Drupal Version 10.1.6

It is working fine.
Thank you very much for patch #13! Fixed issue with Layout Builder Modal.
Keep contributing, Drupal community!

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

mortona2k’s picture

joe_carvajal’s picture

I also confirm that #13 works in D10.3 + layout_builder_st alpha3 + layout_builder_modal 1.2