BUGFIX: MediaBrowser's upload action shows empty flash message if file is too big #5553
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.
expected (like in the standalone media browser)
actual (media browser insider neos ui):
interestingly the error works in the neos ui when one uses the media browsers drag and drop
The existence of this bug was uncovered via #5528 because previously no validation error was shown and on upload the server just died:
Upgrade instructions
Review instructions
This bug was uncovered because translate() simply returns undefined, if not initialised. No error no fallback, nuthing.
Also while
I18n.init()
IS called, it doesnt actually initialise anything. For thatneos-development-collection/Neos.Neos/Resources/Public/JavaScript/index.js
Lines 23 to 27 in 847e464
has to be invoked and that is done by adding the link.
Notice also that ist not particularly keen of us to initialise I18n once in the host (neos.ui) and then in the iframe too. This is just extra work for the browser, and we dump the iframe after selecting the image.
Now my pr doenst improve that but there are ideas outlined here neos/neos-ui#3119 and the first step for a global translate api was already introduced via neos/neos-ui#3804.
Nothing for a bugfix to build up on though.
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions