Closed (fixed)
Project:
Section Library
Version:
1.2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
27 Jan 2021 at 20:20 UTC
Updated:
23 Jan 2025 at 21:14 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #3
aaronchristian commentedComment #4
jastraat commentedI'm attaching a patch that integrates the MR's changes with the latest dev of section_library. Unfortunately I could not make changes to the MR directly. This also does not resolve the two last issues.
Comment #5
jastraat commentedUpdated patch that pre-filters template type based on the import link clicked. Still haven't figured out how to get the ajax modal to close after adding a template.
Comment #6
jastraat commentedAnd finally figured out the dialog closing issue. This latest patch addresses both of the outstanding issues mentioned in #3.
I also fixed the failing test.
Comment #7
jastraat commentedSorry - that earlier patch included some changes from another section_library patch I have applied.
Here's a clean one.
Comment #8
aaronchristian commentedThanks @jastraat for picking this up so long after the creation of this issue!
I did try to test the patch but received some errors in doing so;
Wondering if maybe there is still some of the other patch being caught up in the mix here.
I also tried to apply patch #5 but got the same error.
Going to mark this as "Needs work" for the time being.
If you manage to sort things out feel free to post back and I'll give it another test.
Thanks again!!!
Comment #9
jastraat commentedHey @AaronChristian thank you for testing! Just to make sure, did you fully clear the Drupal cache after applying the patch? This injects a new service to check for layout_builder_modal.
Comment #10
dmundra@jastraat would the patch benefit from a update hook to clear the cache?
Comment #11
jastraat commentedAdding a patch with a post-update hook to automatically clear the cache and pick up the updated form dependencies.
Comment #12
jastraat commentedI'm afraid my last few patches were corrupted. Here's a new patch with the changes from patch 7 + a post update hook to clear the cache and prevent the error @AaronChristian saw.
Comment #16
jastraat commentedComment #17
jastraat commentedComment #18
jastraat commentedComment #19
jastraat commentedComment #20
jastraat commentedI adjusted the scope of this issue so that the solution could be supported by layout builder with no modal, layout builder modal, and layout builder iframe modal.
The MR now adds a select to allow filtering by "Section" versus "Template", removes the sass directory since CSS now supports nesting and all the node packages were really out of date, improves the module's compatibility with layout builder iframe modal, removes the dependency on jquery, and fixes a few warning errors from the pipeline. Also refactored to take into account the fixes from #3217647: Adding stuff to library doesn't close dialog if dialog opens in popup.
It also addresses the problem with access checking and the core navigation module outlined in #3241715: Access check problems on add_to_template link and #3480604: Error with core navigation module.
Please test creating and importing templates with no modal modules, with layout builder modal, and with layout builder iframe modal. Also test enabling the core navigation module and visiting /admin/config/user-interface/navigation-block
Please confirm that you can filter by section versus template when choosing a template to import and that it combines with the label search that was already there.
Comment #21
terracoders commentedTested as working per all criteria established in comment #20. Patch is working great!
Comment #22
mahmoud-zayed commentedLooks good to me, css will be much simpler!
Comment #24
jastraat commented