-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Page deep-links and browser reloads always switch to control panel #675
Comments
The fix will also be required to be able to allow more fine-grained deep links for z2m in the future e.g. direct link to certain nodes or tabs in the control panel to allow switching between mesh graph and control panel or direct link from other smart home systems to manage a specific node. |
This would require to use query in url or the anchor |
About the main issue, I think this is something that only happens in production right? as I'm not able to repro this in my dev env |
I'm unable to reproduce this on my instance in dev or production env 🤷♂️ |
@robertsLando sorry, for the late reply - here is some more information that may help to reproduce the issue:
Did you try to reproduce it with auth enabled? I suspect that this behavior has been introduced with the auth changes. |
@robertsLando I just found some time to debug this issue and added some logs to output variables that affect the control flow. This is the log output when accessing the settings page:
I'm not really sure about the meaning of all variables but as you can see the router redirects form /settings to / and stays there. It's only happening, if auth is disabled (since I offload auth to traefik). When auth is enabled this is not happening. |
I think your problem could be that the user is not found in localstorage, this happens in router/index in beforeeach functuon, I suggest you to put a breakpoint there and see if the user is found |
Yes, there is no user found in localStorage, but I don't get why it should find one, since I'm running zjs2m with authentication disabled (as I already pointed out before).
|
Sorry I misunderstood the problem, I thought the problem was with auth enabled. Let me check this again |
I have submitted a fix for this, try it out |
@robertsLando, yes it solves the reload problem with auth deactivated :-). |
It should also don't break when it is enabled. Could you double check? :) |
@robertsLando it works with auth enabled and disabled :-). |
This happens when both auth is enabled and disabled, the problem is that when the page is firstly loaded I dunno if auth is enabled or not so by default I redirect user to |
I see - so you're currently using a workaround to solve this problem until a better solution can be found. |
Version
Build/Run method: Docker
zwavejs2mqtt version: 1.2.2
zwavejs version: 6.4.0
Describe the bug
When I reload a page other than the control panel it always switches back to the control panel.
To Reproduce
Steps to reproduce the behavior for browser reload:
Steps to reproduce the behavior for deep-linking:
Expected behavior
The browser should keep the current URL on reload or stay at the given URL when using a direct link.
Additional context
It seems that this behavior change has been introduced with #591 and #640.
The text was updated successfully, but these errors were encountered: