• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 20.10.20, 08:32
  • Opened by: Axon web
  • Closed by: Fred
  • Closed on: 21.10.20, 22:17
  • Reason: Closed
  • Comment: Glad to help!

Ticket #19496 - Error when saving changes on HTML blocks

When trying to save changes on an HTML block (Layout Builder > Page Builder) it fails with an error and the changes don’t get saved.

The first time I save change after loading the Page Builder it seams to work. The Widget settings dialog closes and, if I edit the widget again, the changes are there. However, if I reload the page, nothing has changed. Also the second time I modify something in the HTML block (without reloading the Page builder) and click Save, the dialog doesn’t close and I get this error on the console:

On Firefox:

08:24:22.714 Uncaught TypeError: can't access dead object
    jQuery 13
        ut
        setDocument
        at
        select
        a
        fire
        onPreProcess
        serialize
        getContent
        save
        triggerSave
        u
        triggerSave
    WPO_Widget http://anne.axontest.com/modules/pspagebuilder/views/js/admin/widget.js:361
    jQuery 2
        dispatch
        handle
jquery-1.11.0.min.js line 2 > eval:2:5598

On Chromium:

Uncaught TypeError: Cannot read property 'body' of null
    at NodeList.eval (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:97333)
    at u (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:34223)
    at Object.serialize (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:97281)
    at B.getContent (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:238201)
    at B.save (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:236946)
    at Array.eval (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:247817)
    at u (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:34223)
    at Object.triggerSave (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:2:247788)
    at HTMLButtonElement.<anonymous> (widget.js:361)
    at HTMLButtonElement.dispatch (jquery-1.11.0.min.js:3)
eval	@	VM341:2
u	@	VM341:2
serialize	@	VM341:2
getContent	@	VM341:2
save	@	VM341:2
eval	@	VM341:2
u	@	VM341:2
triggerSave	@	VM341:2
(anonymous)	@	widget.js:361
dispatch	@	jquery-1.11.0.min.js:3
r.handle	@	jquery-1.11.0.min.js:3

Environment:

  • PrestaShop: 1.7.6.8
  • PHP: 7.2.5
  • Alysum: 5.6.0
  • Firefox: 81.0.2
  • Chromium: 86.0.4240.75

Comments

Fred 20 Oct 2020, 10:35

Hi, Axon web.
Please fill out all necessary fields in your profile https://support.promokit.eu/index.php?do=myprofile to access to your back office

Could you please also give me a code you tied to insert there

Axon web 20 Oct 2020, 11:19

Hi Fred,
I’ve already fill out the profile fields.

As per the code I’m inserting. I’m just modifying the theme placeholder text. It’s the first HTML block after the slider. This is the content:

<div class="first-message">
<h6 style="text-align: center;">IS A PREMIUM ECOMMERCE THEME.</h6>
<p style="text-align: center;"><span>Quisque euismod pretium lacinia. Vivamus sollicitudin placerat sit amet sagittis. Mauris ac ante porta, pellentesque lacus.</span></p>
</div>

I’ve just modified the text on the h6 to test the issue.

Fred 20 Oct 2020, 12:43

I just added a widget with your code without any problem https://take.ms/cjRb3

Axon web 20 Oct 2020, 13:34

Ok, I can save the changes the first time. I hadn’t clicked “Save Layout Profile”, I thought the page was saved on every save of a dialog. Nevertheless, I still can’t modify an HTML block a second time. Steps:

  1. Go to Layout Builder > Page Builder
  2. Edit an HTML element by clicking the cog. The widget setting dialog opens.
  3. Make a change in the “Content” field of the “Widget form” section.
  4. Click Save. The widget setting dialog closes.
  5. Edit again the HTML element by clicking the cog. The widget setting dialog opens.
  6. Make a change in the “Content” field of the “Widget form” section.
  7. Click Save. The widget setting does NOT close. The errors in the first message of the ticket appear in the browser console.
Fred 20 Oct 2020, 18:47

I see the following message when I try to login to back office https://take.ms/Ca3LM

Axon web 21 Oct 2020, 08:28

Sorry, it’s really weird, I don’t know what happened but just clearing the cache fixed it. You should be able to log in now.

Fred 21 Oct 2020, 11:20

I just added these three symbols one by one like you described (open-add-close, open-add-close… SAVE) https://take.ms/fxZjl

Axon web 21 Oct 2020, 15:18

Ok, there’s something really strange here. On my computer I can always reproduce the problem, both with Firefox and Chromium. However, on a colleague’s computer, he hasn’t been able to reproduce the issue on Firefox, but he has on Chromium.

I’ll tell you if I find some consistent way of reproducing the issue. If you don’t know what may be happening, you can close the issue.

Fred 21 Oct 2020, 22:17

Ok, let me know if the issue will back