• Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #23763 - AMP doesn't reload/show HTML widget changes in rich text editor (Widget form content)

Hi Fred,

I wanted to do some changes for the mobile side of our webshop by changing some text within the HTML widget. Our development site is meanwhile promoted to the live domain and, after some hick ups, everything seemed fine but I thought this was something which might have gone wrong afterall…
Checking it on the development domain however showed the same behaviour, you can edit and save the HTML form content and it will show up on the mobile website. But if you go back to edit something everything is gone, nothing shows up. This happens as well on the live domain as the development domain so I guess it is not due to the migration this weekend. Also I noticed that after you close the widget and go back right after that all the top boxes (with the editor options) are gone (only the multilanguage box is visible). A page refresh will bring the editor boxes back.
Hope you have some clue what is happening!?
Thanks.

Kind regards,
Howard

Comments

Fred 19 Sep 2022, 17:55

Hi, Howard.
We had such experience a couple of times and the reason was broken or not valid HTML code.
I recommend you to clean your code before you pasting it into the widget.
Use for example this cleaner https://html-cleaner.com/

Howard van der Burgt 20 Sep 2022, 19:05

Goodevening Fred,

The problem is I did not use and special HTML, I just entered the text as shown on our mobile website and the text is there alright. On the backend however it is a I described; nothing to be seen…. You can type, save, see it on the website. Going back to edit is not possible as nothing is shown anymore although it must be there otherwise you would not see the changed text:-) I removed the HTML widget and put a new one in but just the same…

Grtz.
Howard

Fred 21 Sep 2022, 19:16

Could you please share the HTML code you are trying to add?

Howard van der Burgt 22 Sep 2022, 08:21

I just type some words as “Rambling Rose Crockery, Brocante & Decorations” and use the H2 tag with center tag. Then ENTER and second line of text also centered. I don’t type any HTML tags myself, I just use the given edit buttons. Same thing in both our languages.
Can’t remember if I used a <div style…> or <p style…> in the beginning through the source code button but I assume that is fully allowed HTML? Can it be something is left behind within the database which blocks everything? I looked into the database record but as everything is saved together from the AMP page I have no idea if something written there is valid or not valid and maybe the cause of the trouble.
Thanks.

Fred 22 Sep 2022, 17:43

I see. Working on a solution…

Howard van der Burgt 22 Sep 2022, 18:10

Tnx!

Fred 22 Sep 2022, 22:46

Please try now, it should work

Howard van der Burgt 23 Sep 2022, 08:55

Okay, thanks!
I tried this morning and I’ll describe what I experienced: normally I working in Chrome only and the symptoms I described were all experienced in Chrome (latest version). When I went to the AMP Homepage everything showed up within the HTML widget except that everything was presented in HTML, like when you view through the Source code button. After closing the widget and re-opening the button bar with the editor options was gone and so was the text once again! Yesterday I created another HTML widget with a button link and the code for that one was still available (also without button bar).
Another thing I experience with the HTML widget is that only after a complete emptying of the cache the changes become visible. Also all discount labels stay visible on the front while the ending date/time was long gone. Going to the product reveals there is no discount active anymore. Within the non-AMP pages the ending of the discount period was correctly reflected without having to empty the cache. Not sure if this is related?!
Doing the same thing in Edge keeps all data visible although it also shows the raw HTML only. The editor buttons bar do disappear in Edge also.

Sorry for my lengthy description! Just wondering if this only happening for me/some or you can reproduce the same behaviour on your side?

Thanks! Howard

Fred 23 Sep 2022, 17:40

I believe that’s just a cache of your browser.
We have tested out this solution locally and on a live websites of our other customers as well

Howard van der Burgt 23 Sep 2022, 19:11

Behaviour is the same on my Linux laptop, in Windows Edge en Chrome… Maybe the hosting company.. I have memcache deactived just now and there is no other cache active. Not fatal but annoying to need the workaronds :-) Tbanks and enjoy your weekend!

Fred 23 Sep 2022, 21:08

No, that’s definitely not your server fault of memcache. The problem is in the /modules/pkamp/views/js/admin/widget.js file. we will try to fix it, but the main issue when the content completely disappeared is resolved.