-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
Progress: ready for groomingTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Description
Summary (*)
We upgraded to Magento 2.4.3 and cannot load the product editor anymore in the backend.
There is a javascript error raised:
Uncaught TypeError: Cannot read properties of null (reading 'padding')
at Object.eval [as handler] (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:19:182)
at validate (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:5:61)
at eval (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:8:217)
at Function._.every._.all (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:16:571)
at validator (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:8:112)
at UiClass.validate (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:9:678)
at setNested (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:5:50)
at Object.nested (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:11:127)
at UiClass.set (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:12:318)
at updateValue (eval at require.load (ffa15b10614cc201590659b91698e94c.min.js:178), <anonymous>:11:80)
We tracked that down to the following code
Line 237 in 8ed420d
if (typeof value === 'object' && !!(value.padding || value.margin)) { |
It seems to be a valid case, that value is null. In this case, the script still tried to read .padding
.
Is that intended?
Also I do not understand why the validator required-entry
is registered - isn't that already a commonly used validator which also should work on null values?
Proposed solution
if (typeof value === 'object' && value !== null && !!(value.padding || value.margin)) {
Metadata
Metadata
Assignees
Labels
Progress: ready for groomingTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it