Browser and workflow back buttons not working on a certain page

On my user profile page, a ‘return to previous page’ action doesn’t work after arriving at that page from one of the other pages. However, it does when the profile page was navigated to from another page. Both pages use the same user card from a RP.

I also have a ‘return to previous page’ action running from a back button placed on the page. This doesn’t ever work on this page, even after arriving from the page that does work with the browser’s back button.

Interestingly, when I press this page’s back button with the action, it breaks the browser’s back button, leaving it unable to work even on the page that it did work with.

Note that the same back button with the action does work on other pages.

What could be the problem? I need this to work as I’m making a PWA.

any custom code or plugin that may be messing up with browser navigation?

Nothing in the Page HTML Header field, if that’s what you’re meaning about custom code?

I tested both pages without any plugins, and the problem persists…

it’s a bit confusing what other pages are. are you talking about other pages of the app or external pages?

how are you doing internal page navigation? links or go to page action? have you checked Multi-page applications - Bubble Docs ?

In Bubble, you have the option to check Replace the entry in the browser’s history when you use the Go to page action.
This means that when a user clicks the ‘back’ button, they won’t see the replaced page, but instead navigate to whichever page in the history was before that. You can see it as moving on to the next page in a book and ripping out the one you just read.

The page the back buttons don’t work with is an internal page that lists all users of the app.

The page that the back button work with is an internal page that lists the logged in user’s followed users.

I’m just using a standard go to page action. I don’t see any ‘Replace the entry in the browser’s history’ option. Where is that?

in my editor I can see it as soon as I select a page :man_shrugging:
image

That’s weird. I’m on the latest version (28). Which version are you on?

It’s not showing because it the destination has to be the same as the current page. Makes sense.

Never noticed that because I try not to modify history

Another thing that you can check are event listener on the window: in chrome type in the dev tool’s console getEventListeners(window), look for popstate, for each item check the listener and see if the function location is some bubble code (e.g. run.js) or not.
image

I’m getting all sorts of errors on all my pages. I’m don’t even have the Lottie plugin installed, or any Lottie files on the page, so I don’t know why it’s showing that error.

Do you know how to deal with these errors?

they are different problems, mainly because there are plugins not checking if they have already initialized global instances or if they have all the necessary data. Plugins can load scripts globally even if you don’t use them on the page. It’s something that need to (and can) be fixed, but not relevant to this problem.

have you tried to preview the page without plugins and html?
image

I just tried these (I didn’t know they existed). I don’t think it’s possible to test the forward/back functionality since when I leave the origin page, it appears the destination page is no longer in safe mode…

try adding “send current page parameters” to your navigation actions for this test

Fixed. It didn’t like that the page was navigating to a particular page tab when the page was loaded, for some reason. I replace those workflows with another way that does the same thing. Thanks for the help!

I’m happy you fixed it.

Do you mean that a “scroll to” action was causing the problem? It happened to me in an app that “scroll to” was throwing an error and stopping everything else in the workflow.

Maybe that was it! I will test. Weird.

This topic was automatically closed after 70 days. New replies are no longer allowed.