Description
Preconditions (*)
- Magento 2.4-develop
- M2.4.*
- Enable built-in JS Minification (production mode) (
bin/magento config:set dev/js/minify_files 1
) - DIsable old media gallery ( Stores -> Configuration -> System -> Media Gallery and set Enable Old Media Gallery to No)
Steps to reproduce (*)
- Go to Admin -> Catalog -> Categories -> Content -> Select from Gallery
- Open the context menu for any image (3 dots) and select "Edit"
- Enter image title, description, add keywords
- Click "Save"
Expected result (*)
Image details are saved
Actual result (*)
Image details are not saved. Uncaught TypeError: Cannot read property 'call' of undefined
in jquery.validate
There are JS console errors when media gallery is opened:
Uncaught SyntaxError: Invalid regular expression: missing /
validate-image-title.min.js:1
Uncaught SyntaxError: Invalid regular expression: missing /
validate-image-description.min.js:1
Before/After Minification of the regex:
/^[a-zA-Z0-9\-\_\.\,\n\ ]+$|^$/i.test(value);
/^[a-zA-Z0-9\-\_\.\,\]+$/i.test(value);
Space and new line are escaped and not recognized as part of the regex. Also regarding the JSShrink issues, it looks like there plenty of issues with regex, isn't any other working library? https://github.com/tedious/JShrink/issues
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status