magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.51k stars 9.31k forks source link

Magento 2 version 2.4.3-p1 “Page Builder was rendering for 5 seconds without releasing locks” error. #34898

Closed ZephyrDogma closed 1 year ago

ZephyrDogma commented 2 years ago

So friends im having an issue with saving my page at the pagebuilder:

Ubuntu 20.04 Magento Version 2.4.3-p1 So i attempt to create a new page(has same effect as i try to edit an existing one) and i add some elements to the page, afterwards i click save

It should have made the page successfully

  1. And here i get the spinning wheel of death perpetually there and the error "Page Builder was rendering for 5 seconds without releasing locks." that was supposedly fixed in version 2.3.6 of magento

  2. image

Additional Information

The issue was data-content-type="heading". In 2.4.3p1 EE when I'm adding content from scratch then i don't see this attr getting added. But it was there in 2.3.2 EE. After removing this attribute from the page now it saves. I have removed that attribute from all pages using MySQL replace statement.

What you can try, is to add some content and include this

NOS SOLUTIONS

You can edit any h2 tag and include data-content-type="heading" there directly in the DB, as normally there is no option to edit the text in the pagebuilder. And then try to save the page.

m2-assistant[bot] commented 2 years ago

Hi @ZephyrDogma. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

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

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


: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.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

ZephyrDogma commented 2 years ago

@magento I am working on this

m2-assistant[bot] commented 2 years ago

Hi @ZephyrDogma! :wave: Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

m2-assistant[bot] commented 2 years ago

Hi @engcom-Echo. 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:


engcom-Echo commented 2 years ago

Hi @ZephyrDogma,

Thank you for reporting the issue.

However, I tried to replicate the same on Magento 2.4.3-p1 version but not facing any issue as you are having. Below screenshots of the same.

Screenshot 2021-12-29 at 6 51 32 PM Screenshot 2021-12-29 at 6 50 43 PM

As you can see, page is getting saved with any info I add in Page Builder. Based on it, can you please update if you upgraded from older versions which were having this issue or if you can provide more info on what you did differently so that I can try to reproduce it again ?

Thanks

ZephyrDogma commented 2 years ago

Hi @ZephyrDogma,

Thank you for reporting the issue.

However, I tried to replicate the same on Magento 2.4.3-p1 version but not facing any issue as you are having. Below screenshots of the same.

Screenshot 2021-12-29 at 6 51 32 PM Screenshot 2021-12-29 at 6 50 43 PM

As you can see, page is getting saved with any info I add in Page Builder. Based on it, can you please update if you upgraded from older versions which were having this issue or if you can provide more info on what you did differently so that I can try to reproduce it again ?

Thanks

Hello friend i didnt update magento from older versions i just installed it from scracth on my ubuntu, if this would help i will post the rest of the console output after i press save image

engcom-Echo commented 2 years ago

Hi @ZephyrDogma,

Thank you for providing with the console errors info but it is not helpful since I am not getting same errors. The issue was there before but as documentation said, it was fixed and I am not getting it in the same version 2.4.3-p1 as you suggested now.

If you are getting it, there might be a set of steps through which I can also get the same. Can you please try with some other browser and check if you are still getting it ? If you can help me some more info, perhaps I'll be able to reproduce it.

Thanks

janisverins commented 2 years ago

Facing the same issue. Magento ver. 2.4.3-p1. Hapens very rarely, but still happens. Steps to reproduce - in M2 admin save category or product or cms page where pagebuilder content is added. Approx 1 in 50 saves gives this error.

Green2Matter commented 2 years ago

@janisverins it's exactly same as I can see in my instance.

miteshdhaduk commented 2 years ago

Same issue on Magento ver. 2.4.3-p1. nothing to save from the backend where page builder exists.

akkaweb commented 2 years ago

I feel this issue keeps on propping up everywehere without a good solution.

jayeshdolphin commented 2 years ago

I face the same issue. Is there any update?

ghost commented 2 years ago

I have faced the same issue on magento 2.4.3-p1 version. Please refer to the following link: https://webkul.com/blog/fixed-page-builder-was-rendering-for-5-seconds-without-releasing-locks-error-in-magento-2-4-3-p1/ Maybe if you are facing similar error as mine, it can be helpful for you.

m2-assistant[bot] commented 2 years ago

Hi @engcom-November. 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:

engcom-November commented 2 years ago

Verified this issue on Magento 2.4-develop branch but cannot able to reproduce the issue even after saving CMS page multiple times with page builder content (Rows, columns and elements added). Its recommended to verify the issues on Magento 2.4-develop branch as the issue might have got fixed and it the upcoming 2.4.x release having latest code base. @ZephyrDogma , kindly recheck the issue on Magento 2.4-develop branch and provide missing steps if any if the issue is still reproducible. image

Thank you.

chazzs commented 2 years ago

I am having this problem as well. however, this is only happening to me when i use an added "appearance" to the Banner component. I followed documentation (https://devdocs.magento.com/page-builder/docs/content-types/extend/add-appearances.html) to add a new appearance. i am able to select the appearance, and it renders correctly in the preview as well. when i go to save the CMS page, that is when the error happens.

If i reload the page and change the banner to one of the default appearances the save works fine. I get the feeling that there is an important detail missing from the documentation.

Magento ver. 2.4.3-p1

manhtranisobar commented 2 years ago

This issue is happening for me when I edit a product with more Page Builder attributes (around 20)

engcom-Hotel commented 2 years ago

Hello @manhtranisobar,

Have you tried the solution given in this comment. Let us know if this resolves your problem.

Thanks

m2-assistant[bot] commented 2 years ago

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:

manhtranisobar commented 2 years ago

Hi @engcom-Hotel I have not tried that solution because we are using Magento Cloud. But I think It is not solution because I am getting that JS console error message when edit CMS page but I still can save CMS page successfully. If It is solution, Magento Cloud should update that config as default.

engcom-Hotel commented 2 years ago

Hello @manhtranisobar,

Thanks for the quick response!

@chazzs we have tried to reproduce the issue by adding Appearance but the issue is not reproducible for us. We have followed the below steps in order to reproduce the issue:

  1. Use this repo for the Appearance module.
  2. Create a New Page by selecting the created appearance: image
  3. We are able to save the page without any issue: image

Maybe we are missing some important reproduction step(s). Please let us know in case we have missed anything.

Thanks

kingshukdeb commented 2 years ago

Having the same issue on 2.4.3p1 EE. I have upgraded from 2.3.2 EE. Its really weird issue. For some page it gets saved properly. Sometime i see the error in console and the loader keeps loading and sometime the page saves without actually saving the data.

kingshukdeb commented 2 years ago

Looks like the issue is with copied texts which has formatting. Like if i copy some texts with color and font from some other place and paste it directly in Text field then it gives me the error and the page doesn't save. It used to work in 2.3.2 EE. And people who usually work with page builder aren't developers so its expected that they will copy texts.

agarcia2-pk commented 2 years ago

I've encountered the same issue on 2.4.2-p2. It's weird because it happens on one specific page, i can edit others without problem but this specific one does not let me.

engcom-Hotel commented 2 years ago

Hello @kingshukdeb,

Thanks for the contribution!

We have tried this as well, and post the content something like below in page, but still we are not ablet to reproduce the issue:

image

We request you to please provide the text in which you are facing the issue.

Thanks

kingshukdeb commented 2 years ago

@engcom-Hotel, Can you try to add that text in 2.3.2 EE and then upgrade to 2.4.3p1 EE and check if you can save the page.

kingshukdeb commented 2 years ago

@engcom-Hotel For me the issue was data-content-type="heading". In 2.4.3p1 EE when i'm adding content from scratch then i dont see this attr getting added. But it was there in 2.3.2 EE. After removing this attribute from page now it saves. I have removed that attribute from all pages using mysql replace statement.

What you can try, is to add some content and include this

<h2 contenteditable="true" data-placeholder="Edit Heading Text" data-content-type="heading" data-appearance="default" data-element="main"><span data-pb-style="6235E010E29C8">NOS SOLUTIONS</span></h2>

You can edit any h2 tag and include data-content-type="heading" there directly in the db, as normally there is no option to edit text in the pagebuilder. And then try to save the page.

engcom-Hotel commented 2 years ago

Hello @kingshukdeb,

Thanks for the update!

The issue is reproducible for us by following the below steps:

  1. Create a new Page from Admin Panel Content -> Pages -> Add New Page
  2. After saving the newly created page, edit its content from the database in table cms_page column content and add the below H2 tag with the specified attributes:
    <h2 contenteditable="true" data-placeholder="Edit Heading Text" data-content-type="heading" data-appearance="default" data-element="main"><span data-pb-style="6235E010E29C8">NOS SOLUTIONS</span></h2>
  3. Refresh the page in Admin Panel.
  4. Try to save the page

But if we remove data-content-type="heading" from the H2 tag then the page is saving successfully.

I have a query here, I haven't found any option to add that attribute data-content-type="heading" from the admin panel. In order to reproduce the issue, we need to edit the content from the database directly. So please help us understand how this attribute is saved previously there for you.

Thanks

kingshukdeb commented 2 years ago

@engcom-Hotel Its coming from 2.3.2 EE. In that version when we edited pages it used to automatically add those attributes. Like for color it used to add like data-desktop-style="color: rgb(255, 255, 255); (the rgb can be diff for sure, its an example) but now if you add color it doesn't add data-desktop-style.

engcom-Hotel commented 2 years ago

Hello @kingshukdeb,

Thanks for the reply!

So the issue is related to the Magento upgrade. I am confirming this issue for further process.

Thanks

github-jira-sync-bot commented 2 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-5903 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 years ago

: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.

cptX commented 2 years ago

I have the exact same issue in Ubuntu 20.04 with clean installation of magento 2.4.4 and nginx. This is my first installation of magento in localhost for developing a site so I have never seen a functional magento 2 working as it should in order to compare. What I can say is that whenever I try to add content to a product (new or existing) system hangs and I get the same error as described in the first post here. Can you please suggest a solution? I have been reading about it the last 2 days but I really cannot find a solution! Really frustrated as this is my first contact with magento and although I have setup all the system without any issues I hit the wall here and now I'm stack...

UPDATE!!: What solved my issue was adding the following line in my server configuration in nginx

add_header X-Frame-Options SAMEORIGIN always;

I am searching for a solution 2 days now and this was nowhere suggested in the internet. Hope it helps someone!

allanmfx commented 2 years ago

I have the exact same issue in Ubuntu 20.04 with clean installation of magento 2.4.4 and nginx. This is my first installation of magento in localhost for developing a site so I have never seen a functional magento 2 working as it should in order to compare. What I can say is that whenever I try to add content to a product (new or existing) system hangs and I get the same error as described in the first post here. Can you please suggest a solution? I have been reading about it the last 2 days but I really cannot find a solution! Really frustrated as this is my first contact with magento and although I have setup all the system without any issues I hit the wall here and now I'm stack...

UPDATE!!: What solved my issue was adding the following line in my server configuration in nginx

add_header X-Frame-Options SAMEORIGIN always;

I am searching for a solution 2 days now and this was nowhere suggested in the internet. Hope it helps someone!

I've faced this issue so many times and it is always caused by this little tricky header. The problem is that the nginx.conf.sample that comes with Magento has this X-Frame-Options set to a correct value, so people got confused and think that the problem is caused by another thing. But they need to look at other nginx files, for example: If you set up SSL locally following some internet tutorials, there's a high chance of you having a file called ssl-params.conf, and inside this file there's the add_header X-Frame-Options DENY; that you need to remove.

Jeffrey-H commented 2 years ago

Recently I'm facing this same issue on a much used Magento environment. The problem appeared out of thin air. After adding the suggested headers, the problem still continues. I'm really frustrated since I can no longer edit any products or categories.

Update: It seems to only affect product updates when changing the attribute set.

jspoe commented 2 years ago

Submitted a support ticket for a commerce client for this.

I asked them if they could add a more specific notice about what pagebuilder element has an error and should be fixed. From support perspective, they could not deliver a fix or script to do this, but managed to get some information that might help someone.

The issue (besides the header) resides pagebuilder elements that were created pre 2.4.3 If there is 'illegal' nested HTML, this scenario is (also) happening.

I'll quote:

"I checked the provided database backup prior to the migration, I still saw invalid contents to those cms pages/blocks. Some contents have "data-content-type="text"" inside another "data-content-type="text"", and some have "data-content-type="heading" inside "data-content-type="text"" that are all invalid"

So this is invalid:

<div data-content-type="text">
<div data-content-type="text">
</div>
</div>
<div data-content-type="text">
<h2 data-content-type="heading"></h2>
</div>

The problem is that most of the shop owners will not be able to fix this, as they don't have the knowledge or access to the raw HTML to fix this themself.

engcom-Hotel commented 2 years ago

Hello @ZephyrDogma @kingshukdeb @jspoe ,

We have again tried to reproduce the issue in the latest Magento 2.4-develop branch and the issue is not able to reproducible.

We have tried the below ways in order to reproduce the issue:

It seems the issue has been fixed and merged with the latest development branch. I request you to please review it in the development branch.

Thanks

engcom-Hotel commented 1 year ago

Dear @ZephyrDogma @kingshukdeb @jspoe,

We have noticed that this issue has not been updated for a period of 14 Days. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

Regards

magejof commented 1 year ago

please add some user permission on media gallery

Screenshot 2022-11-20 at 12 32 39 PM
RobertSokolovSW commented 1 year ago

Hello,

The solution by removing the data-content-type="heading" worked for me. However, now some of the CMS Page's content is not visible when editing in the Admin Panel, and if you hit 'save', the content is lost on the FE as well.

Magento version: 2.4.3-p3

Is there some other solution I could try?

Thanks!

jspoe commented 1 year ago

Hi @RobertSokolovSW

Unfortunately, no other solution was provided yet, other than information about the fact that nested elements are invalid. A colleague also found out that in some situations, column-group was also nested and found invalid in > 2.4.3-p3

I did opted in a Magento Commerce ticket that elements that are invalid should be highlighted in page builder itself or with an error-message of some kind, because indeed there is no way to tell from the pagebuilder perspective what elements are invalid. You can only tell and solve that by editing the raw HTML from the database. For the end-user, editing raw HTML in the database is not a solution.

So I think the solution for you at the moment is to extract the raw HTML from the database, edit it manually and place back the edited version. Elements should remain visible with removing the data-content-type="heading" property, I haven't seen problems there before.

kamephis commented 1 year ago

I've got a the same error in the console. In my case I was adding a link around the pagebuilder row and added the link option to the row component. You can enter an url, you can even save the row. But as soon you put something in the row, you can't save anymore and the spinner spins around and the pagebuilder 5s error is shown in the console.

RobertSokolovSW commented 1 year ago

Hello @kamephis

I solved the problem with the help of this comment https://github.com/magento/magento2/issues/34898#issuecomment-1273092646

I made a patch to rename the nested elements in those cases and the problem is gone now.

kingshukdeb commented 1 year ago

Who are having trouble with this issue, its also because of our non ability to edit the html part of the editor. You can use this great module by Mark Shust to be able to do that if that helps.

https://github.com/markshust/magento2-module-pagebuildersourcecode

kamephis commented 1 year ago

@RobertSokolovSW I am having this problem in general. I just tried it with the FAQ example, after fixing the bug the same issue appears when adding more than one FAQ item to the component (Magento 2.4.4 community).

engcom-Hotel commented 1 year ago

Hello @kamephis @kingshukdeb @RobertSokolovSW,

Please help us with the issue reproduction steps. So that we will analyze this issue more.

Thanks

vipinroy commented 1 year ago

I'm experiencing same issue in 2.4.5-p1 Enterprise version

serzhik commented 1 year ago

I'm experiencing same issue in 2.4.5-p1 Community version

akartavtsev commented 1 year ago

I fixed that issue with this patch:

--- vendor/magento/module-page-builder/view/adminhtml/web/js/stage-builder.js (date 1676459396611) +++ vendor/magento/module-page-builder/view/adminhtml/web/js/stage-builder.js (date 1676459396611) @@ -49,9 +49,11 @@ _.each(styles, function (stylesArray, selector) { var element = document.querySelector(selector);

- _.each(stylesArray, function (style) { - element.setAttribute("data-" + name + "-style", element.getAttribute("data-" + name + "-style") ? element.getAttribute("data-" + name + "-style") + style.cssText : style.cssText); - }); + if (element) + _.each(stylesArray, function (style) { + element.setAttribute("data-" + name + "-style", element.getAttribute("data-" + name + "-style") ? element.getAttribute("data-" + name + "-style") + style.cssText : style.cssText); + }); + } }); });

its24 commented 1 year ago

I have the same problem with page builder version Magento 2.4.5-p1. ./static/adminhtml/Magento/backend/ru_RU/Magento_PageBuilder/js/page-builder.js.map: HTTP error: status code 404, and so on 20 lines.

This solution doesn't work!! I don't know why it hasn't been fixed in this version.

page-builder.js:96 Uncaught TypeError: Cannot read properties of undefined (reading 'id') at PageBuilder.toggleFullScreen (page-builder.js:96:56) at events.js:85:26 at Array.forEach (<anonymous>) at trigger (events.js:82:18) at Object.trigger (events.js:160:20) at Function.trigger (events.js:45:29) at target.trigger (events-mixin.js:25:32) at UiClass.toggleFullScreen (wysiwyg.js:169:20) at UiClass.pageBuilderEditButtonClick (wysiwyg.js:78:18) at HTMLButtonElement.<anonymous> (knockout.js:4669:74)