dev/drupal#127 - CRM_Core_Session::setStatus() gets ignored sometimes #17914
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
https://lab.civicrm.org/dev/drupal/-/issues/127
This part isn't specific to drupal.
It looks like there are two paths to get a status message popup. One follows a javascript-only path, the other goes through templates/CRM/common/info.tpl. For the second one, if you only set a title and leave the message blank when calling CRM_Core_Session::setStatus(), then it gets ignored.
There's a couple places where this happens:
Probably the easiest way to reproduce is:
Before
No popup status message.
After
Popup status message as intended.
Technical Details
All the code along the way seems to support having a title but no message except the last stage when it runs thru the template, where it only does anything if there's a message component.
Comments