Warnings lose need special handling for context

Created on 10 July 2025, 2 months ago

Problem/Motivation

Warnings that are created by 'warn' rules need a bit of special handling. If a warning is shown AND there was something like a 'prevent' that kept the content from saving, then the warning message has the context it needs because you are still on the same edit form. The problem is that if a warning is shown when the save is not prevented, then the warning appears for example when the site returns you to the content list, so the warning appears, but the user has no reference to what entity generated the warning.

Unfortunately when the warning message is generated, the code has no idea whether the save event is going to be allowed or not so it does not know to optionally include more context like a link to the node.

Steps to reproduce

Proposed resolution

Likely the only solution available to us it so include the link to the content in every warning so that wherever the warning appears, the user has the context and the ability to get back to fix the issue.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @swirt
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    This one is blocked until we have a design.

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    In thinking about this a bit more, a link could be added to the warnings, but since we don't know what page we are on, if there was a validation error and we are back on the edit page, if you click the link you will leave the form and never save the changes you intended to make.

    The only way this is possible without doing harm is to be able to detect what page the status is on, but I don't think that is possible. Or detect if there was an error, but status message does not have access to that either.

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Taking this off the Major/MVP list because I do not see a way at this time to attain it. At the point the status message is added, there is no way to know where the destination of the page submit is going to be. The resulting link, if we added one, would more likely do more harm than good.

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida
Production build 0.71.5 2024