Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When no extend form, the warning message from the preprocess hook is not shown, due to caching issue.
Proposed resolution
a) implement as content in the node with an extra field (has hacky html markup to simulate warning)
b) show warning, using an event subscriber (tried, but when extending, the page reload still had the old warning)
Remaining tasks
tbd
(reviews needed, tests to be written or run, documentation to be written, etc.)
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Release notes snippet
unknown
Comment | File | Size | Author |
---|---|---|---|
#4 | 3097230-3-warning-disappears.patch | 4.87 KB | YesCT |
#2 | 3097230-2-warning-disappears.patch | 4.43 KB | YesCT |
Comments
Comment #2
YesCT CreditAttribution: YesCT at Lullabot for IBM commentedshould use arguments like https://www.drupal.org/docs/8/api/services-and-dependency-injection/stru...
so no \Drupal....
and when submitting the extend form, the warning still showed, but on refresh went away. :/
putting this here in case want to come back to this approach.
Comment #3
YesCT CreditAttribution: YesCT at Lullabot for IBM commentedthis approach uses the extra fields, and has less caching issues. but is messy with the html markup to simulate warning.
Comment #4
YesCT CreditAttribution: YesCT at Lullabot for IBM commentedComment #6
YesCT CreditAttribution: YesCT at Lullabot for IBM commented