Skip to content
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

Pressing browser back after opening a puzzle causes an error about a deleted sheet #2162

Closed
jpd236 opened this issue May 25, 2024 · 3 comments · Fixed by #2183
Closed

Pressing browser back after opening a puzzle causes an error about a deleted sheet #2162

jpd236 opened this issue May 25, 2024 · 3 comments · Fixed by #2183

Comments

@jpd236
Copy link
Contributor

jpd236 commented May 25, 2024

  1. Open a puzzle page
  2. Hit browser back

Expected: Goes back to puzzle list

Actual: Notification shows up in the sheet:

"Cannot open the link because the linked sheet is deleted."

Hitting back again goes back to the list as expected.

jpd236 added a commit to jpd236/jolly-roger that referenced this issue Jun 19, 2024
For some reason, when a Sheets URL is loaded with ?...#gid=0, it
redirects to ?...&gid=0#gid=0; this redirect puts a spurious entry in
the navigation history, which breaks the first back button press.
Embedding the final URL fixes the back button.

Fixes deathandmayhem#2162
jpd236 added a commit to jpd236/jolly-roger that referenced this issue Jun 19, 2024
For some reason, when a Sheets URL is loaded with ?...#gid=0, it
redirects to ?...&gid=0#gid=0; this redirect puts a spurious entry in
the navigation history, which breaks the first back button press.
Embedding the final URL fixes the back button.

Fixes deathandmayhem#2162
@jpd236
Copy link
Contributor Author

jpd236 commented Jun 29, 2024

Hm, this fixed the issue locally, but I just pushed it out and it doesn't seem to have done the trick in our production instance. In production, both of the "gid=0" instances in the URL are replaced with an actual GID number, which seems to cause the same problem. Maybe it's because we have a multi-sheet template in production, whereas locally I was testing without a template.

@zarvox
Copy link
Contributor

zarvox commented Jun 29, 2024

Interesting. I observe that for our production multi-sheet template, the sheet which was the original sheet in the document is still gid=0, whereas the other tabs have nonzero gid= values. I also observe that all of the clones of this template have their initial tabs sharing the same gid= values (i.e. first tab is always gid=0, second tab is always gid=1447632617).

When your production template was created, did you by chance add new sheets and remove the original sheet of the document, causing sheet id 0 to cease to exist in the template?

@jpd236
Copy link
Contributor Author

jpd236 commented Jun 29, 2024

Thanks, yeah, that's exactly it. Our template's first sheet used to be for signing into puzzles manually so we could keep track of who was working on what. We deleted it now that Jolly Roger can do that automatically.

I recreated a new template file and imported the existing sheets into it so now the intended default sheet has gid=0, so we should be fine here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants