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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT created an issue. See original summary.

YesCT’s picture

Status: Active » Needs work
FileSize
4.43 KB

should 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.

YesCT’s picture

Status: Needs work » Needs review
Related issues: +#2859550: "status_messages"-like render element with a preset message

this approach uses the extra fields, and has less caching issues. but is messy with the html markup to simulate warning.

YesCT’s picture

  • YesCT committed 9a65eee on 8.x-2.x
    Issue #3097230 by YesCT: Warning of unpublishing disappearing when no...
YesCT’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.