Services Plugins FAQs

URL Router for Navigation Plugin not working when back button in browser is pressed

Hi,
We’re using the plugin for navigation on a site, and it works fine when moving forwards - you select buttons in the UI that change the URI as expected, and if you paste the URL into a browser the UI reacts as expected and shows the right page.
However, if after moving forwards like this for a while I hit the back button, the URI changes as expected but the UI remains unchanged ie. does not change to reflect the URI. I’ve set breakpoints in the Javascript and can confirm that at no point does the data.parse_url_dev function get called when moving backwards, but it does when going forwards.
Could the plugin not intercept the popstate event and trigger this automatically so the UI updates? Or is it supposed to work with the Back button but is somehow broken on our site?
Cheers

Hi @tom.godber,
Thanks for reaching out!

Unfortunately, our plugin is not recognising the “back” browser’s button as the plugin is not changing the actual page/app structure, but just changes the look of the page URL. That’s why we have a “go back router” action to trigger a button. So, please use it instead to go back to the previous URL router’s step.

In case you will have any other questions, please let me know.

Regards,
Gulce

Zeroqode team. I have the same issue. How can we trigger this action from the browser event? It’s not logical to believe a user would not use the browser’s native back buttons and instead use an unnecessary button that we must place in our applications. This is the only thing holding this plugin back from being great. Please help!

If this isn’t possible then I’m simply going to need to load the page every time which defeats the purpose of a single page app…

Hi @rwarner, thanks for your question and sorry for the inconveniences met during the plugin use.

Regretfully, the current plugin functionality doesn’t allow tracing and triggering on the back button press on the browser. Sorry about that.

We’ve added your request to the plan of plugin possible improvements, and the developer team will see what could be done in this regard and how feasible would be to add this in future plugin updates.

Once any feedback about this will appear, I will let you know for sure.

In the meanwhile, please let us know if there is anything else that I can help you with about our plugins.

Regards,