Cannot drill down to a lens with a slash sign in the name

Expected Behavior

When drilling down to a particular lens, a list of photos is shown

Current Behavior

If the lens name contains a slash sign ("/"), clicking on the link results in an empty page

Steps to Reproduce

  1. Upload pictures done with a lens containing slash in the name - for example Canon/EF 85mm f/1.8 USM
  2. Drill down to the lens (e.g. Lens β†’ Canon β†’ Canon/EF 85mm f/1.8 USM)
  3. The last step will produce an empty page

Environment

Operating system and version: Windows 11, Firefox 97.0.1

PhotoStructure edition: PhotoStructure for Node v1.1.0

Additional info

I was able to debug it a bit. It seems like an encoding issue - the lens name is resolved via API which returns the redirect URL - /tag/Lens/Canon/EF%2085mm%20f/1.8%20USM?seed=5331" in my case. As you see the β€œslash” sign in the lens name is not encoded, which apparently makes the server later split the path by the β€œ/” sign and misunderstand the path. I also assume, it is due to incorrect way the URL is encoded - instead of calling encodeURI on the whole URL, each segment should be encoded with encodeURIComponent, which would take care of the slash sign as well.
Unfortunately, the source code is not available :frowning: so I was not able to create a pull request or even validate my assumptions.

Thanks for the bugreport @szymonbultrowicz !

It was indeed an encoding error: I actually found this issue and fixed it in this beta build, if you want to try that and verify it’s working for you.

Cheers,

Matthew

Hey @mrm, seems to be fixed in 2.0.0-beta.1, indeed. Thanks! :slight_smile: