- Merge request !13195007: Adds filtering for section/template with additional text filtering support. → (Closed) created by AaronChristian
- 🇺🇸United States jastraat
I'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.
- last update
9 months ago 2 fail - 🇺🇸United States jastraat
Updated 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.
- last update
9 months ago 1 pass - Status changed to Needs review
9 months ago 9:43pm 30 April 2024 - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8last update
9 months ago Waiting for branch to pass - 🇺🇸United States jastraat
And finally figured out the dialog closing issue. This latest patch addresses both of the outstanding issues mentioned in #3.
- Open on Drupal.org →Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8last update
9 months ago Waiting for branch to pass - 🇺🇸United States jastraat
Sorry - that earlier patch included some changes from another section_library patch I have applied.
Here's a clean one. - Status changed to Needs work
8 months ago 11:14pm 14 May 2024 - 🇨🇦Canada AaronChristian Kelowna, BC
Thanks @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;
TypeError: Drupal\section_library\Form\AddSectionToLibraryForm::__construct(): Argument #4 ($module_handler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /var/www/web/modules/contrib/section_library/src/Form/AddSectionToLibraryForm.php on line 99 in Drupal\section_library\Form\AddSectionToLibraryForm->__construct() (line 88 of /var/www/web/modules/contrib/section_library/src/Form/AddSectionToLibraryForm.php).
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 this error;
TypeError: Drupal\section_library\Form\AddSectionToLibraryForm::__construct(): Argument #4 ($module_handler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /var/www/web/modules/contrib/section_library/src/Form/AddSectionToLibraryForm.php on line 99 in Drupal\section_library\Form\AddSectionToLibraryForm->__construct() (line 88 of /var/www/web/modules/contrib/section_library/src/Form/AddSectionToLibraryForm.php).
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!!!
- 🇺🇸United States jastraat
Hey @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.
- 🇺🇸United States dmundra Eugene, OR
@jastraat would the patch benefit from a update hook to clear the cache?
- Status changed to Needs review
8 months ago 3:03pm 17 May 2024 - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8last update
8 months ago Waiting for branch to pass - 🇺🇸United States jastraat
Adding a patch with a post-update hook to automatically clear the cache and pick up the updated form dependencies.
- 🇺🇸United States jastraat
I'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.
- Merge request !313195007: allow filter by type and improve compatibility with layout builder iframe modal → (Merged) created by jastraat
- 🇺🇸United States jastraat
I 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 🐛 Adding stuff to library doesn't close dialog if dialog opens in popup RTBC .
It also addresses the problem with access checking and the core navigation module outlined in 🐛 Access check problems on add_to_template link Needs review and 🐛 Error with core navigation module. Active
Please test 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.
- 🇺🇸United States TerraCoders
Tested as working per all criteria established in comment #20. Patch is working great!
-
jastraat →
committed 3c5cb1a0 on 1.2.x
Issue #3195007 by jastraat, aaronchristian, dmundra, terracoders, rajab...
-
jastraat →
committed 3c5cb1a0 on 1.2.x