ui_patterns
ui_patterns copied to clipboard
Issue#304: Detect all theme patterns.
This PR attempts to solve multiple issues originating from the \Drupal\ui_patterns_library\Plugin\Deriver\LibraryDeriver::getDirectories
method collecting only the default theme and the base theme directories.
Besides the issues described in #304 and #308, I also had errors during site install with existing config, when using patterns in layout builder, because during install the default theme is stark.
This PR is a follow up to PRs #305 and #310 and uses the method suggested here: https://github.com/nuvoleweb/ui_patterns/issues/304#issuecomment-687164731
+1 on this! Thanks @kp77 this is IMO the proper fix.
This just solved our problem with patterns not showing up in a multi-domain setup, where we use a different theme for each domain:
Our steps to reproduce
(We only use patterns on domain 2)
- drush cr
- Visit domain 1
- domain 2 patterns are broken
- drush cr
- Visit domain 2
- domain 2 patterns are NOT broken
Oddly, once we deinstall ui_patterns_library, the patterns will never show up.
Moved to Drupal.org https://www.drupal.org/project/ui_patterns/issues/3311471