New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagebuilder content type extension mobile responsive bug | Prevents developers extending mobile functionality #38565
Comments
Hi @RickyGoacher. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @RickyGoacher, Thanks for the report and collaboration! We have tried to reproduce the issue in the latest development branch ie 2.4-develop but the issue is not reproducible for us. We have created the below module to reproduce the issue, please find attached the same for reference: We are able to save for both Desktop and Mobile versions. Please let us know if we missed anything. Thanks |
Hi @engcom-Hotel , Thanks for taking a look at this. Looking at the module you've attached I can see that you have created a new content type. Extending this mobile form I've attached an example of this below. In this example I've added the option to change the overlay colour for the banner on mobile. By setting the overlay colour on Desktop view, then switching to mobile view and setting the colour for mobile, the error will appear when you attempt to save the page. (Some times also while switching between mobile and desktop view) This issue occurs because all the default content types with mobile form have a mobile min-height option. This is why we see the min-height error. |
Hello @RickyGoacher, Thanks for the updates! We are now able to reproduce the issue. Please have a look into the below screenshot for reference: Hence confirming the issue. Thanks |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11826 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
Preconditions and environment
When attempting to extend a pagebuilder content type to add in additional functionality, if the content type already has an extension by default to add in the
min-height
option on mobile, thejs/converter/style/min-height.js
file will error preventing the user from saving the page or block.This error is caused by the min-height input on mobile having an empty value, which is then returned as undefined by the
min-height.js
file.The return statement in the
toDom
function cannot handle anundefined
value.return value.split(/\+|\-|\*|\//).length > 1 ? "calc(" + (0, _object.get)(data, name) + ")" : value;
Adding a conditional to check if
value !== undefined
prevents the error and allows the admin user to save the changes for the page or block.Or adding a conditional to set the value of
value
if it's undefinedThis error prevents developers from adding additional functionality to pagebuilder for mobile devices and i believe it also adds to the confusion when it comes to developing for pagebuilder.
Steps to reproduce
min_height
mobile option).Cannot read properties of undefined (reading 'split')
Expected result
Extending pagebuilder content types which have the
min-height
option should not result in an error preventing the user from saving the page or block.This prevents developers extending content types for mobile.
Actual result
Attempting to extend pagebuilder content types (which already have a mobile form) to add additional functionality for mobile view results in an error being thrown from
min-height.js
and prevents the user from saving the page or block.Additional information
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: