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
URL filling with nulls #785
Comments
@jrosindell I'm not seeing this behavior on Chrome, using the same tour at the same step. My URL looks like https://beta.onezoom.org/life/@biota=93302?otthome=%40_ozid%3D1&tour=%2Ftour%2Fdata.html%2Ffrogs%404#x783,y1066,w1.4031 Maybe there are other factors at play? |
@jrosindell @hyanwong did you figure out what needs to be done to replicate this? When does an extra "null/" get added? Could you copy-paste what the full URL looks like? I'd guess it's something to do with 56cbc37, but I've not many ideas how off the top of my head. |
I could also believe it only happens if you start the tour in a particular way. Going to a URL like It's a very neat explanation, but unfortunately the URL above seems to work fine. |
Right, I had tried a number of things, but could not reproduce this issue. Not sure to what extent it's related, but I did notice that if you add random tokens to the URL path, they get preserved and the site otherwise works fine. e.g. https://beta.onezoom.org/life/random/other/tokens |
Yeah, that's how we're repeating the A bodge would be to not record a URL if the pinpoint we're trying to record is |
If a state doesn't have a pinpoint, we shouldn't be appending null to it. Why this is the case I'm not sure, but this should at least stop URLs filling with "null/".
I still can't reproduce this (@hyanwong says that rapid fire "Next"ing can do it, but not here). However, the pull request should at least solve the repeated "null/"s. I'm still not sure why there would be a state without a pinpoint mind, but the problem is somewhere around here: OZtree/OZprivate/rawJS/OZTreeModule/src/navigation/record.js Lines 34 to 48 in 2ee6900
Note that (line 34) refuses to record a URL without a pinpoint, but when in a tour we ignore this state and craft our own based on the current page location. If this URL doesn't have a pinpoint, it'd get passed through regardless. I don't think the solution is moving this check. We still want to record the current tourstop in the URL, so we can then refresh / share the current URL. |
navigation/state: deparse states missing a pinpoint #785
The text was updated successfully, but these errors were encountered: