Open RickyGoacher opened 8 months ago
Hi @RickyGoacher. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. 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: Magz.zip
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.
The issue here is with extending the default content types that already have a mobile form under ui_components
For example the banner content type:
Extending this mobile form pagebuilder_banner_mobile_form.xml
, or any other mobile form available by default causes the error mentioned.
I've attached an example of this below. Example.zip
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)
Desktop
Mobile
Error in console
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
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-11826 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
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