On one of my pages I can see all logic for components except the “On Page Enter” Logic and get the below error when specifically looking at the logic for "On Page Enter’. I have reloaded the pages a few times but still nothing. The error is:
I noticed in other support tickets some people have had the same errors and you asked what the person was doing before the error. So here is what I was doing before it started to show up. I copied logic from the "Before Page Enter to “On Page Enter” and then deleted the Logic from Before Page Enter. I may have done this back and forth a few times while testing the order of logic placement and visibility of components and timing of logic execution. Why? I wanted to understand and remove object undefined errors I was getting in the console on page load.
Anyway… I also now just did some more testing/trouble shooting and noticed the following. See how in the image below the On Before Page Enter has a plus sign next to it. This would indicate no logic is there.
When I clicked on the plus sign though I get the logic I expect to be in the “On Page Enter”. As I said above I had removed this logic from “On Before Page Enter” and copied it into the “On Page Enter” and removed the logic from “On Before Page Enter”. Interesting the logic is still in the “On Before Page Enter” handler but UI Builder front end seems out of sync with where the logic is.
Luckily I have my code now… Interesting that there was actually code left behind in the “On Before Page Enter” handler but the plus would indicate there was none there. Maybe something to look into.
Here are my thoughts on where some trouble shooting might find the underlying problem… I have a feeling that there may be a series of events in UI Builder which cause an error/bug to occur as it tries to always keep code valid. For example having orphaned code like in the image below is an error which UI Builder warns you about. Moving off this page you will lose that orphaned code. Doing this in a particular sequence or repeatedly with copy/paste of logic and moving between pages may see things get lost or unlinked - just a thought.
Just another note. I also noticed an interesting issue with copying/cloning pages. I think this issue was occuring when coping pages and giving them the same name as previous deleted pages. When I did this I noticed when opening those copied pages some handlers had logic in them and some did not. I found that copying/cloning pages sometimes had logic missing in the handlers. Just an FYI and maybe related?
In the end I got my logic back… so this is not a ticket for help but maybe helps with insights into the “Opps something went wrong” bundle.js error. Hope it helps.