- Issue created by @el7cosmos
- last update
about 1 year ago Custom Commands Failed - @el7cosmos opened merge request.
- last update
about 1 year ago 29,393 pass, 1 fail - 🇦🇺Australia acbramley
Adding 2 related issues that may make this obselete.
At the moment, altering a plugin is done via hook_<plugin_alter_info>_alter
, this happens after derivatives are already defined. The problem is, we can't change for example the deriver
class because it's already too late.
In our case, we have layout_builder
and block_content
enabled and also have these block plugins:
Depending on the number of entity types and their fields, those base plugins can have a vast number of derivatives, and in our case, it gives OOM when visiting a page after rebuilding the cache. We try to remove not needed derivatives via hook_block_alter
, but this is too late because the $definitions
array is already too big and consuming much memory. Only when we filtered out not needed derivatives in our custom deriver class, then the OOM problem solved.
I haven't found any use case other than block plugins, this may be a specific issue with the block plugin manager.
Provide a hook alter or dispatch event before calling \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::getDerivatives
so that the base plugin definition can be altered.
I see two approaches:
getDerivatives
method public.Active
11.0 🔥
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Adding 2 related issues that may make this obselete.