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 broken view when going back to a nested folder #206

Closed
oparoz opened this issue Jul 5, 2015 · 15 comments
Closed

Fix broken view when going back to a nested folder #206

oparoz opened this issue Jul 5, 2015 · 15 comments

Comments

@oparoz
Copy link
Contributor

oparoz commented Jul 5, 2015

Steps to reproduce

  1. Create the following hierarchy
Folder1
-Folder2
--Folder3
  1. Put some pictures in each folder
  2. Open Gallery and go to Folder3
  3. Click on the Home icon in the breadcrumb
  4. Click on the browser's back button

Expected result

The view at step 3 should be shown again

Actual result

The URL says we're in Folder3
The thumbnails are put in an album named Folder3
The breadcrumb says we're in Folder2

Ctrl+F5 reloads the album correctly (since it uses location.hash to determine the album)

The state must not be saved correctly or the map is not built properly.

I suspect it comes from here:
https://github.com/owncloud/galleryplus/blob/master/js/gallery.js#L19-L32

and it's probably not the only scenario where the wrong mapping is retrieved.

@oparoz oparoz self-assigned this Jul 7, 2015
@oparoz oparoz added this to the 13 milestone Jul 7, 2015
oparoz added a commit that referenced this issue Jul 7, 2015
We were still partially using the old caching mechanism used to map the entire filesystem before loading anything. This led to holes in the mapping as well as lots of redundant an partial information being stored.
This new approach is custom made and can probably still be improved
Fixes #206
oparoz added a commit that referenced this issue Jul 7, 2015
We were still partially using the old caching mechanism used to map the entire filesystem before loading anything. This led to holes in the mapping as well as lots of redundant an partial information being stored.
This new approach is custom made and can probably still be improved
Fixes #206
@oparoz
Copy link
Contributor Author

oparoz commented Jul 7, 2015

Can be tested by using ultimate8 on core stable8

@setnes @deMattin

@libasys you may be interested in the fix for GaDe

@oparoz
Copy link
Contributor Author

oparoz commented Jul 8, 2015

Now available on ultimatedev for core stable8.1

@deMattin
Copy link

deMattin commented Jul 8, 2015

Tested with ultimate8 in a folder structure, where it failed before and browser history back is working now as expected.

@oparoz
Copy link
Contributor Author

oparoz commented Jul 8, 2015

Excellent, thank you.

@setnes
Copy link
Contributor

setnes commented Jul 10, 2015

The test case you described works for me using ultimatedev on 8.1.

However, when I attempt to switch to the file view I get taken to the root directory. When I click the back button from there I loose this game. I also can't enter the slideshow from the files app using ultimatedev on 8.1. I haven't figured that one out.

@oparoz
Copy link
Contributor Author

oparoz commented Jul 10, 2015

It's either a folder name or browser caching issue, hopefully the latter :)

@oparoz oparoz closed this as completed in d51a28e Jul 10, 2015
@setnes
Copy link
Contributor

setnes commented Jul 10, 2015

The issue I had entering the slideshow from the files app went away after clearing the browser cache.

Unfortunately, the issue I have being taken to the root directory is still here. On a private link share, it doesn't go to the root directory, instead I get a "File not found" error. I'm still trying to figure out the exact steps to reproduce. It seems somewhat dependent on folder depth.

@setnes
Copy link
Contributor

setnes commented Jul 10, 2015

There is no problem 1 folder deep. There seems to always be a problem 2 folders deep. I have used different folders and very short folder names, so it does not appear to be the URL length so much as the folder depth.

@oparoz
Copy link
Contributor Author

oparoz commented Jul 10, 2015

Yeah, I need steps :)

I can't reproduce.

  1. Create Link from folder
  2. Navigate by clicking on back or home or any element of the breadcrumb
  3. Go to Files, do the same

So it must be something in the name. A character which it doesn't like maybe.
Or maybe your root contains something it doesn't like...

@oparoz oparoz reopened this Jul 10, 2015
@setnes
Copy link
Contributor

setnes commented Jul 10, 2015

Yup. I can even reproduce this with empty folders.

  1. Create folder named "A" in document root.
  2. Create folder named "B" inside folder "A".
  3. Navigate to folder "B" and switch to Gallery mode.
  4. Click on File List icon.
  5. You should now be in document root instead of the files view for folder "B".
  6. Now navigate to folder "A" and switch Gallery mode.
  7. Click on File List icon.
  8. You should now be in the files view for folder "A". (works from 1 level deep)

@setnes
Copy link
Contributor

setnes commented Jul 10, 2015

The above steps reproduced the problem for me every time on OC 8.1.0 and the ultimatedev branch. I tested in both Google Chrome and Firefox.

I then tested OC 8.1.0 with the stable8.1 branch and the issue exists there as well. The above steps cannot be used on stable8.1, however, unless there are photos in the directories.

@oparoz
Copy link
Contributor Author

oparoz commented Jul 10, 2015

Now I can reproduce it :)
I was testing with master/stable8.

Seems the content is double encoded on 8.1. I'll patch this asap.

@oparoz
Copy link
Contributor Author

oparoz commented Jul 10, 2015

Fixed via db0b120

@setnes
Copy link
Contributor

setnes commented Jul 13, 2015

This works much better now. I tested using the stable8.1 branch. (better late than never)

@oparoz
Copy link
Contributor Author

oparoz commented Jul 13, 2015

Thank you! :)

@oparoz oparoz removed the QA-testing label Jul 13, 2015
@oparoz oparoz closed this as completed Jul 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants