- First commit to issue fork.
When excluding an entity type (or bundle) and not providing a view mode in the service definition, the following warning is thrown:
Warning: Undefined array key "view_mode" in Drupal\entity_preprocess_services\EntityPreprocessServicesManager->serviceDefinitionMatches() (line 122 of modules/contrib/entity_preprocess_services/src/EntityPreprocessServicesManager.php).
Create a service and definition excluding a complete bundle.
Example:
my_module.preprocess.node.teaser:
class: Drupal\my_module\PreprocessService\NodeTeaserPreprocessService
tags:
- { name: entity_preprocess_service, priority: 200 }
properties:
applies_to:
- { entity_type: 'node', view_mode: 'teaser' }
excludes:
- { entity_type: 'node', bundle: 'news' }
A small fix needs to be applied to the "EntityPreprocessServicesManager" so it can correctly exclude entities without view mode or bundle.
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.