You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our controller inherits from the Neos\Neos\Controller\Module\AbstractModuleController and creates flashmessages via $this->addFlashMessage('Error ...', 'MyModule', Message::SEVERITY_ERROR, [$e->getMessage()]);
I noticed that flashmessages of the type "error" disappear after 5 seconds which makes it rather hard to screenshot or copy&paste the error message that way, especially for non-technical editors.
Expected Behavior
Error flashmessages should stay on-screen and should have to be actively closed by the x button.
Steps To Reproduce
See above.
Environment
- Flow: 8.3.4
- Neos: 8.3.5
- PHP: 8.2
I checked the Git history and did not find any significant changes affecting the issue back to Neos 7, i.e. the code probably associated with this has not changed in 2 years.
Anything else?
After making sure the error was not due to anything in our codebase I did some debugging with the developer tools in FF and found out that the code responsible seems to be in located in this file:
This module offers individual methods for creating messages with different severity levels. There is for example a dedicated error() method which sets the timeout to 0 and adds a closing button. However, that method is not called in our specific context, instead the flashmessage is rendered in the markup of the page like this
and picked up by the init() method of the module (lines 82 ff). The init() method only uses a generic call to render the message (without any options)
_renderNotification(title, "", type);
which together with a default timeout of 5000 ms in the Toast component leads to the described behavior.
In conclusion, I think that the loop in the init() method could be adjusted to take into account the severity of the message and then use the dedicated other methods to render them.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
We have a Fluid-based backend module using a very simple layout like this:
Our controller inherits from the
Neos\Neos\Controller\Module\AbstractModuleController
and creates flashmessages via$this->addFlashMessage('Error ...', 'MyModule', Message::SEVERITY_ERROR, [$e->getMessage()]);
I noticed that flashmessages of the type "error" disappear after 5 seconds which makes it rather hard to screenshot or copy&paste the error message that way, especially for non-technical editors.
Expected Behavior
Error flashmessages should stay on-screen and should have to be actively closed by the x button.
Steps To Reproduce
See above.
Environment
Anything else?
After making sure the error was not due to anything in our codebase I did some debugging with the developer tools in FF and found out that the code responsible seems to be in located in this file:
Packages/Application/Neos.Neos/Resources/Public/JavaScript/Services/Notification.js
This module offers individual methods for creating messages with different severity levels. There is for example a dedicated
error()
method which sets the timeout to 0 and adds a closing button. However, that method is not called in our specific context, instead the flashmessage is rendered in the markup of the page like thisand picked up by the
init()
method of the module (lines 82 ff). Theinit()
method only uses a generic call to render the message (without any options)which together with a default timeout of 5000 ms in the
Toast
component leads to the described behavior.In conclusion, I think that the loop in the
init()
method could be adjusted to take into account the severity of the message and then use the dedicated other methods to render them.The text was updated successfully, but these errors were encountered: