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

fix: Only remove openfile from route when closing the viewer #2493

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Sep 12, 2024

If the route has changed between when the Viewer was opened and then closed, then the 'old' route will be restored. But we probably want to keep the current route and only remove the openfile query.

More specifically, the fileid is removed from the route if it was not in the route when the Viewer was opened.

Can be triggered by changing the view and opening a file. Somehow not triggered every time.
On load, the viewer is somehow triggered twice, a first time with fileid = undefined, and a second time with fileid = an actual file ID. So the bug is not really visible.

Here, it is visible on the third attempt to close the Viewer:

Screencast.from.2024-09-12.15-41-14.mp4

Found this while working on nextcloud/server#47920

@artonge artonge added bug Something isn't working 3. to review Waiting for reviews javascript Javascript related ticket labels Sep 12, 2024
@artonge artonge self-assigned this Sep 12, 2024
@artonge artonge added this to the Nextcloud 31 milestone Sep 12, 2024
@artonge artonge force-pushed the artonge/fix/only_remove_openfile branch from d3143de to ecaff7e Compare September 12, 2024 13:56
If the route has changed between when the Viewer was opened and then closed, then the 'old' route will be restored. But probably want to keep it and only remove the `openfile` query.

Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge force-pushed the artonge/fix/only_remove_openfile branch from ecaff7e to a4143a9 Compare September 14, 2024 15:00
@skjnldsv
Copy link
Member

/compile rebase /

@skjnldsv
Copy link
Member

/backport a4143a9 to stable30

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Sep 14, 2024
@skjnldsv
Copy link
Member

/backport a4143a9 to stable29

@skjnldsv
Copy link
Member

/backport a4143a9 to stable28

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsv skjnldsv merged commit ca19811 into master Sep 14, 2024
29 checks passed
@skjnldsv skjnldsv deleted the artonge/fix/only_remove_openfile branch September 14, 2024 15:54
Copy link

backportbot bot commented Sep 14, 2024

The backport to stable28 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable28
git pull origin stable28

# Create the new backport branch
git checkout -b backport/2493/stable28

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick a4143a9

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/2493/stable28

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Copy link

backportbot bot commented Sep 14, 2024

The backport to stable29 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable29
git pull origin stable29

# Create the new backport branch
git checkout -b backport/2493/stable29

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick a4143a9

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/2493/stable29

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Copy link

backportbot bot commented Sep 14, 2024

The backport to stable30 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable30
git pull origin stable30

# Create the new backport branch
git checkout -b backport/2493/stable30

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick a4143a9

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/2493/stable30

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@skjnldsv
Copy link
Member

hmmmm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews backport-request Pending backport by the backport-bot bug Something isn't working javascript Javascript related ticket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants