REMINDER
Page builder code corruption
-
Last night, I had two separate cases of code disappearing from my page. Before, I thought I accidentally did this myself, but when it happened again, I started wondering what was wrong.
It started when I disabled a section of code which I did not need any more, but wanted to keep for future reference. I did this as follows:
<!--- --->
As few 'saves' later, I noticed the whole disabled bloc of code was gone!
Then I had a piece of text that I used for showing a message disappear. Since the message is set via a javascript function, as follows:
document.getElementById("feedbackMessage").innerHTML = "You're record has been updated succesfully!";
... I thought I could make the text empty. Again, after a couple of 'saves' my Javascript code stopped working. I then figured out that the text element was gone, which was causing an error and made my Javascript code stop.
I then recalled a similar problem a couple of days ago, where I spent hours trying to figure out why a whole row disappeared from the preview code under certain conditions. I couldn't figure it out and finally I decided to remove and rebuild this row from scratch. I was happy that I got it working again, although it bothered me that I did not figure out what was wrong.
I totally relied on the assumption that Page builder was keeping my code in check, although in hindsight I should have known that tools can have their own bugs and code can get corrupted.
Long story short; there's something wrong in Page Builder that can mess up your code!!!
The upside of the hours and days I spent to finally figure this out, is that I'm getting the feeling that I'm becoming an expert in debugging
-
Hey Dick,
if you comment a whole section it will disappear from the page builder ... because it's commented ... and pagebuilder show only the visible elements on your page. Since the code was commented your JS code trying to update that part was also failing because that commented element is not on the page! In that case the only way to uncomment it will be to use the Code Editor where you see the whole source code of your page (and also commented sections)Last thing, we store all revisions of your pages and files for 30 days, with the restore function you can preview/restore previous versions:
https://support.appdrag.com/doc/How-to-restore-a-page -
@Joseph-Benguira the problem is as follows:
I have the following code:
Now I comment out the first part, as follows:
I save and close, do some other modifications to my page, go back to my code and then the commented code has disappeared:
Unfortunately, I can not reproduce this problem, but this already happened twice. I also had a text element disappear and a input field that did not work as expected anymore. I appreciate how difficult it is to find a problem if the problem is not properly reproducible. So let's leave it for now. I'll keep a tight eye on this and as soon as I find something that can be reproduced, I'll report back to you.
Thanks again and best regards - Dick
-
@Joseph-Benguira I can now reproduce this!
I disable the code ... save and close ... quit Chrome ... start Chrome ... open page in Page Builder ... open code section ... commented code gone !!!