- Issue created by @jurgenhaas
- 🇩🇪Germany jurgenhaas Gottmadingen
We've further investigated today and found out that we selected the node type "page" with the teaser display mode for rendering the notification content. Unfortunately, that teaser was configured to have a field group with media, title, shortened body and a bit more, and the field group also gets a link so that the whole group can be clicked.
Of course, that's a stupid setup for a notification rendering and we haven't been clever in setting it up this way.
What we should do for this issue, though, is to provide a dedicated node display mode for notifications only. That should only contain title and body, and nothing else. Then, the rendering should work without any issue. As such, that won't solve the underlying issue, that links to the node would still fail, but not using such links in the first place is what makes sense, and that way the problem is avoided.
The new display mode with its basic configuration should become part of the PF package so that it can be used as a quick start. For that, the PF default config should make use of those elements OOTB.
- Merge request !14Issue #3484146: Preparing content for a notification can easily fail → (Merged) created by danielspeicher
- 🇩🇪Germany danielspeicher Steisslingen
@jurgenhaas Can you please take a look if that is correct? Tests were fine without the link around the content. Do we need an update method? I guess, we do.
- 🇩🇪Germany jurgenhaas Gottmadingen
@danielspeicher I've done some clean-up:
- The display mode contained a lot of fields and dependencies that are not available on most Drupal sites.
- Also removed the third party config from Layout Builder, as this should not be used for the display.
- Added the default mode push_framework in prepareContent
- Declared the dependencies in the info file, as they are required by the new config entities
There remains a weakness in this approach, that it assumes that the node type
page
does exist and that it has the body field attached to it. But I think we should be OK with that.Ideally, we should test this by enabling the module on a fresh Drupal site and see if it loads everything as expected.
And then, you're right, we should also have an update hook that imports the 2 new config entities. But I wouldn't update the settings, as that could break some setup on a site that managed that setup themselves with their own settings.
-
danielspeicher →
committed f93dca89 on 2.3.x
Issue #3484146 by danielspeicher, jurgenhaas: Preparing content for a...
-
danielspeicher →
committed f93dca89 on 2.3.x
- Assigned to danielspeicher
- Status changed to Fixed
11 days ago 9:14am 29 December 2024 Automatically closed - issue fixed for 2 weeks with no activity.