- Issue created by @rzan
The last time that class changed was in π SDC's discovery has overly lenient regex Fixed . Does reverting that regex also return the original behavior?
- π¨π¦Canada rzan
Hi cilefen,
I tried reverting to the regex expression before the change from #3446381, but I still get the same behavior. In the version of Drupal were upgrading from, 10.2.7, the class was still part of the SDC module. We do have a folder named components in our theme directory so this may very well be related to that issue.
It looks like in the working version, the \Drupal\Core\Plugin\Discovery\DirectoryWithMetadataPluginDiscovery class was never called at all in the previous version, thus no issue. One of the changes must have triggered this class to now be used for discovery so there must be more going on.
Here is the stack trace I'm dealing with:
Drupal\Core\Render\Component\Exception\InvalidComponentException: Unable to find the Twig template for the component "compony:select". in Drupal\Core\Plugin\Component->__construct() (line 58 of core/lib/Drupal/Core/Plugin/Component.php).
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance() (Line: 102)
Drupal\Core\Theme\ComponentPluginManager->createInstance()
array_map() (Line: 150)
Drupal\Core\Theme\ComponentPluginManager->getAllComponents() (Line: 488)
Drupal\Core\Asset\LibraryDiscoveryParser->librariesForComponents() (Line: 409)
Drupal\Core\Asset\LibraryDiscoveryParser->parseLibraryInfo() (Line: 157)
Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension() (Line: 87)
Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryDefinitions() (Line: 66)
Drupal\Core\Asset\LibraryDiscoveryCollector->resolveCacheMiss() (Line: 149)
Drupal\Core\Cache\CacheCollector->get() (Line: 44)
Drupal\Core\Asset\LibraryDiscovery->getLibrariesByExtension() (Line: 58)
Drupal\Core\Asset\LibraryDiscovery->getLibraryByName() (Line: 68)
Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies() (Line: 70)
Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies() (Line: 41)
Drupal\Core\Asset\LibraryDependencyResolver->getLibrariesWithDependencies() (Line: 87)
Drupal\Core\Asset\LibraryDependencyResolver->getMinimalRepresentativeSubset() (Line: 113)
Drupal\Core\Asset\AssetResolver->getLibrariesToLoad() (Line: 128)
Drupal\Core\Asset\AssetResolver->getCssAssets() (Line: 323)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries() (Line: 167)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments() (Line: 97)
Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments() (Line: 45)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 214)
Symfony\Component\HttpKernel\HttpKernel->filterResponse() (Line: 202)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 53)
Asm89\Stack\Cors->handle() (Line: 263)
Drupal\shield\ShieldMiddleware->bypass() (Line: 219)
Drupal\shield\ShieldMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 124)
Drupal\cloudflare\CloudFlareMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19) - π³πΏNew Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.