Closed (works as designed)
Project:
Drupal core
Version:
11.x-dev
Component:
layout_builder.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Sep 2022 at 16:26 UTC
Updated:
21 Mar 2024 at 10:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
cassioalmeida commentedI faced this issue today on multiple sites.
Based on this issue (https://github.com/jquery/jquery/issues/5098) the has selector has a bug on Chrome due to new CSS selectors.
I changed the code to use a for each instead of a pure CSS selector.
Comment #5
cassioalmeida commentedComment #6
carolpettirossi commentedRTBC. The "Merge request !2744" solved the issue for me.
I tested the patch without applying any other core patch, and the reported issue is gone.
As a side note, I'm using it in combination with patch #23 provided on 3103506 and it works as expected too.
Comment #7
tim.plunkettThis should have automated test coverage.
Comment #8
leo liao commentedHad the same problem in 9.3
Comment #10
cassioalmeida commentedDoes not the test
Drupal\Tests\layout_builder\FunctionalJavascript\BlockFilterTestalready check for it?I'm considering this a refactor, and the test ensures it still works.
Here are the test results (all passing) - https://dispatcher.drupalci.org/job/drupal_patches/147661/testReport/Layout_builder/
Comment #11
_utsavsharma commentedTried to fix CCF for #8.
Please review.
Comment #12
shani mauryaAdding Patch for 9.4.3 core version
Comment #13
shani mauryaComment #15
cassioalmeida commentedComment #16
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #17
crzdev commentedInto D10 (10.0.7) version & just adding "$build['#type'] = 'container';" to choose block customized controlled (has no type by default, just children items, calling to parent method to get original structure) seems working correctly (seems js context "const $categories = $('.js-layout-builder-categories', context);" detect nothing, 0 length, if that selector is the first level of context). Maybe is easier to add into original controller if that works too for D9.5 version or modify js to avoid that extra tag (not checked for D9, js seems different). Scenario: layout builder lock + layout builder restrictions & customized choose block controller.
Comment #18
drupalninja99 commentedI am still having this issue in D10
Comment #19
digitalfrontiersmedia@CRZDEV, Are you using the Layout Builder Modal module? If so, the context returned is different from off-canvas context and is one level lower than what is returned with off-canvas. "$('.js-layout-builder-categories', context)" returns 0 length in this situation. There could be other alters, etc. type of configurations that could result the same. I had to duplicate layout-builder.js in a custom library since Core patch in our case wasn't an easy option. The custom version used "$(context).parent()" instead of "context".
Comment #20
sahilgidwani commentedAdding patch for v10.1
Comment #21
_utsavsharma commentedFixed failures in #20.
Comment #22
crzdev commented@DigitalFrontiersMedia Not exactly that module but yeah, a modal provided by VLSuite, change that you suggest also has sense in that context. In any case not sure if it should work as intuition suggests, maybe it should, main context selector is also loaded by ajax.
Comment #23
johnpitcairn commentedComment #24
phjouI don't know if it is related because the "Filter by block name" seems to work on Chrome but on Firefox, I do not get any results and the feature brings the CPU usage to 100% and ultimately the browser tab ends up crashing.
Comment #25
danielvezaHey all,
I've been testing this with a fresh install of D11 and the block filter is working correctly in all of my tests.
Steps I've taken:
Do people have other LB modules that may be causing issues here? For example I see that Layout Builder browser has had various issues related to this over the years.
Could we please get some steps to replicate with just Drupal core?
Comment #26
carolpettirossi commentedI couldn't reproduce the issue on Drupal 10.2.4
1. Created a D10 instance on simplytest.me
2. Enabled LB & overrides on the basic page content type
3. Created a basic page
4. Clicked on Layout tab
5. Click to "add block"
6. Try filter by an invalid block name and then fix the typo
Result: working as expected listing the available blocks.
Comment #27
cassioalmeida commentedBased on the last comments, it seems this is not related to Layout Builder but a combination of it with other modules, such as Layout Builder Modal.
If this is the case, I'd recommend closing this issue.
Comment #28
r_cheh commentedThe layout builder block search wasn't working because of front theme on the layout edit page, the solution was found - the script tried to hide the parent element of the link but we needed to hide just the links. For me it works, maybe it also will be useful for someone.