- Issue created by @rmpereira
- π«π·France rmpereira
I think it could also be a problem if we don't have a "page" content type.
- π©πͺGermany jurgenhaas Gottmadingen
I was actually wondering, when we implemented this a few years ago, whether this issue would ever come up. Now, it actually happened, but I'm not sure if we can address this. The whole notification template system is built around the assumption that a notification has a subject and a body. That's what most channels also require, the most popular example being an email notification.
I don't think we have a way to provide a generic solution that wouldn't even have that common ground. Unless, there is something I'm missing, it looks like this module is not for sites that are restricted that much and would allow for a body field.
- π©πͺGermany jfeltkamp Hamburg
Hey JΓΌrgen,
Sounds like there is a missunderstanding. I have the same problem here and thats why we stuck on version 2.3.4. We have no node type "page" but also definitly want to use push_framework module.Since Version 2.3.5 there are dependencies in the config/install/core.entity_view_display.node.page.push_framework.yml for the config entities:
- field.field.node.page.body
- node.type.page
@jurgenhaas Could you have a look on this? https://git.drupalcode.org/project/push_framework/-/blob/2.3.x/config/in...
- π©πͺGermany jurgenhaas Gottmadingen
@jfeltkamp that's exactly what I was talking about in #3. To render notifications, we've built this to use an entity with a title and a body. And the assumption has been made, that the node bundle page would be providing that, which I still assume is the case is the vast majority of Drupal sites.
I understand that you have a site which doesn't have that, and that's unfortunate. If somebody has a proposal on how we could do rendering otherwise, I'm happy to discuss them and review MRs for this.
- π©πͺGermany joachim namyslo Kulmbach π©πͺ πͺπΊ
Hey, you!
I also tried to install the module today in conjunction with https://www.drupal.org/project/pf_notifications β in a Drupal CMS Installation.
Of course, when I activate the module, I get exactly the same error message because the body field is no longer available in the Page content type in Drupal CMS either.
The default field is now called field_content. This means that the module is currently not usable even in the new standard download of Drupal.
Is there a way to allow the user to configure the desired filed that should serve as an alternative for βbodyβ? Eg via a Drush command or the settings page in the ui?
Maybe the module can show just a message about the fact that this is neccecary once afte installing the module to make it work finally?
This is not yet a merge request, but perhaps the dilemma can be resolved in this way.
It would be a shame if everyone who uses Drupal CMS and therefore no longer has a field named Body in the Page content type could no longer use the Push Framework.
- π©πͺGermany jurgenhaas Gottmadingen
I've looked through the code again and I can't find any hard coded usage of the body field or the page node type. Both only appear in the provided default config in the install directory:
- core.entity_view_display.node.page.push_framework.yml
- core.entity_view_mode.node.push_framework.yml
Maybe by moving them into the optional directory, that may already resolve the issue.