I’m not sure if this is a bug, or a bubble-change that has been implemented recently, or whether i’m going mad…
A couple of days ago I did a test sign up on my website and was surprised to encounter a nasty issue that was not expected at all - after signing up, the page navigated to the correct page, but then just sat there completely still doing nothing. None of the ‘page load’ actions trigged. It SHOULD have displayed a welcome message, and a confirm your email popup.
I know this WAS working well previously. It was tested thoroughly when i built it.
While digging into what was going on, i found that the issue is related to “go to page” action being run from my nav-bar, which is a reusable element. Surprisingly after loading the new page, it then continues to run the current workflow from the reusable element and then just sat there once it reached the end. Page load on the new page was completely ignored.
I say surprisingly, because i expected the ‘go to page’ action to kill the current workflow completely, like it usually does when called from a normal page. And I expected the new page to trigger all it’s usual ‘do when page load’ actions.
Anyway i ended up fixing it for now, by using ‘open external website’ action instead, although that doesn’t quite feel right…more of a temporary workaround.
Maybe it’s always been this way? maybe there is a bug? Would appreciate any thoughts or insights here from anyone who has experience with this. Thank you.
When you use “Go to page” it doesn’t render a reload, so any workflows on that page will continue and load the next workflows of any reusables that become visible. That’s intended use-case.
Everytime you run a go to page action, any ‘when page is loaded triggers’ will trigger, although the page is not really reloaded by the go to page action if the page to go to is the same page the user is already on. That means custom states are not lost.
The fact that the subsequent actions in the series continued after the go to page action ran is expected if the page to go to is the same page user is on…but either way, placing go to page not as last action is not recommended and definitely should not be used as a termination of workflow to stop subsequent actions in the series from not running.
Thanks guys. I have resolved the issue by adding a ‘refresh page’ action after the goto page action on the reusable element.
But just to ensure i have this right…
using “go to page” WILL reload and trigger new page-load workflows IF it’s a different page.
if it’s the same current page, then the page-load workflows will NOT trigger.
If this is correct, then I may have discovered a bug because 1 was definitely not working and yet the page i was navigating to was a brand new page. Workflows on both ‘when page is loaded’ AND ‘when page is fully loaded’ didn’t fire. [although it worked fine when selecting ‘open in new tab’].
Hey guys, thanks for your input. I finally managed to find the problem.
If you use “go to page” it warns you in the issue checker that this HAS to be the last action on the page, for understandable reasons. It wont let you publish.
However if you have a condition in the ‘go to page’ action, then that warning is not shown, and bubble does let you publish… I get why this is the case: because if the conditions are not met, it would rightly need to continue running the following actions, so bubble does not report this as an error.
My mistake was to assume that if the condition was met, ie the page was switched, then the following workflows would just not run at all. But they still do. And so I completely froze bubble by ending my workflow with a conditionless ‘close popup’ action that attempted to close a popup that no longer existed because the page had since changed. I assumed this would not be run because i’d ‘branched off’ earlier. Doh.
Hope that made sense. It’s not really a bug, it’s more a user ‘assumption’ error. (However i do feel that rather than just freezing completely, bubble’s debugger could have handled this better…)
Anyway just sharing incase this trips anyone else up in future.
There could be a timing issue where the “go to page” action happens before the reusable element finishes its workflow, leading to confusion in triggering “page load” actions. Trigger a custom event that handles the navigation, instead of calling “go to page” directly from the reusable element. This way, you can better control when navigation happens and ensure that workflows terminate correctly.