- Issue created by @coaston
- π©πͺGermany jurgenhaas Gottmadingen
This is either an issue with the view mode you're setting, i.e. if that also contains the title, but the default view mode doesn't, then that's where the difference comes from.
What ECA does with your model is just responding to Drupal core's
hook_entity_view_mode_alter()
. Everything else is down to default Drupal functionality and configuration of your site. - πΈπ°Slovakia coaston
Hm...even I change from "teaser" to "default" view mode in "Entity:set view mode" it is the same.
Actually i wanted condition if customer is X then teaser and if negate condition use default.
-title is displayed in both cases.But of course I have tested with a simple model where there is not any condition but if I choose "default" there is the same behaviour.
- π©πͺGermany jurgenhaas Gottmadingen
Then this must be a core bug. Because what's happening here, if it were implemented in PHP, is this:
/** * Implements hook_entity_view_mode_alter(). */ function eca_content_entity_view_mode_alter(string &$view_mode, EntityInterface $entity): void { $view_mode = 'teaser'; }
If that causes Drupal to render the entity with a title, then that's an issue in core.
- πΈπ°Slovakia coaston
Thank you,
I have tested your code with a custom module and I have disabled "My eca model" and now when custom module force teaser or any other view mode (including the default one" i can see title twice. So it seems you were right it is not eca related.
Not sure what now:)
- π©πͺGermany jurgenhaas Gottmadingen
Thank you @coaston for taking the time to test this explicitly. What's required next is a bug report in the Drupal core issue queue. Don't be afraid, just describe what the problem is, maybe on the level of your manual test only because that demonstrates that it's definitely a core issue. Providing the steps on how to reproduce it will help a lot. Maybe you can then link that new issue here so that folks from here can follow along what's happening there.
- πΈπ°Slovakia coaston
Thank you.
I have raised drupal core issue π View Mode renders Title Active
- π©πͺGermany jurgenhaas Gottmadingen
Thanks for creating the other issue. closing this as works as designed.