Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

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

Closed

Description

@oparoz

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.

Activity

  1. self-assigned this
    on Jul 7, 2015
  2. added this to the milestone on Jul 7, 2015
  3. added 2 commits that reference this issue on Jul 7, 2015
    4270177
    2011fc1
  4. oparoz commented on Jul 7, 2015

    @oparoz
    ContributorAuthor

    Can be tested by using ultimate8 on core stable8

    @setnes @deMattin

    @libasys you may be interested in the fix for GaDe

  5. oparoz commented on Jul 8, 2015

    @oparoz
    ContributorAuthor

    Now available on ultimatedev for core stable8.1

  6. deMattin commented on Jul 8, 2015

    @deMattin

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

  7. oparoz commented on Jul 8, 2015

    @oparoz
    ContributorAuthor

    Excellent, thank you.

  8. setnes commented on Jul 10, 2015

    @setnes
    Contributor

    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.

  9. oparoz commented on Jul 10, 2015

    @oparoz
    ContributorAuthor

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

  10. setnes commented on Jul 10, 2015

    @setnes
    Contributor

    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.

  11. setnes commented on Jul 10, 2015

    @setnes
    Contributor

    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.

  12. oparoz commented on Jul 10, 2015

    @oparoz
    ContributorAuthor

    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...

  13. reopened this on Jul 10, 2015
  14. setnes commented on Jul 10, 2015

    @setnes
    Contributor

    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)
  15. setnes commented on Jul 10, 2015

    @setnes
    Contributor

    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.

  16. oparoz commented on Jul 10, 2015

    @oparoz
    ContributorAuthor

    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.

  17. oparoz commented on Jul 10, 2015

    @oparoz
    ContributorAuthor

    Fixed via db0b120

  18. setnes commented on Jul 13, 2015

    @setnes
    Contributor

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

  19. oparoz commented on Jul 13, 2015

    @oparoz
    ContributorAuthor

    Thank you! :)

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions