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

Images with spaces in the file name result in broken image on the page #32

Closed
jhorsman opened this issue Mar 8, 2016 · 4 comments
Closed
Labels
Milestone

Comments

@jhorsman
Copy link
Contributor

jhorsman commented Mar 8, 2016

Repro steps:

  • Create image component with a space in the file name
  • Add image component to a page
  • Publish page
  • Verify image is broken
  • Examine image url, has %20 properly encoded

This is the counterpart of the same issue in DXA .NET RWS/dxa-web-application-dotnet#17

Reproduced on Tridion 2013 SP1 and DXA 1.2.1.

@jhorsman
Copy link
Contributor Author

jhorsman commented Mar 8, 2016

Tested with the built in DD4T image resizing, not tested with CID profile.

@jhorsman
Copy link
Contributor Author

jhorsman commented Mar 8, 2016

com.sdl.webapp.tridion.DefaultProvider.getStaticContentFile() throws an error when the image URL has a %20 encoded space.

It is findBinaryVariant() who takes the decoded url (with space) and passes it as a path to the Content Delivery DAO. The findBinaryVariant() should do URL encoding first.

    09:32:42.245 [http-bio-9080-exec-3] ERROR c.s.w.c.controller.PageController - Exception while processing request for: /zorgmakelaar/media/beautiful landscape_tcm7-3608_w1024_h311_n.jpg
    com.sdl.webapp.common.api.content.StaticContentNotFoundException: No binary variant found for: [7] /zorgmakelaar/media/beautiful landscape_tcm7-3608.jpg
        at com.sdl.webapp.tridion.DefaultProvider.getStaticContentFile(DefaultProvider.java:301) ~[dxa-tridion-provider-1.2.jar:1.2]
        at com.sdl.webapp.tridion.DefaultProvider.getStaticContent(DefaultProvider.java:260) ~[dxa-tridion-provider-1.2.jar:1.2]

@azarakovskiy
Copy link

@jhorsman thank you for reporting this issue, we have scoped it in an upcoming release.

@azarakovskiy azarakovskiy added this to the v1.4 milestone Mar 8, 2016
@rpannekoek
Copy link
Contributor

Fixed in DXA 1.4

@bkoopman bkoopman changed the title Images with spaces in the file name result in broken image on the page Images with spaces in the file name result in broken image on the page Apr 5, 2016
rpannekoek pushed a commit that referenced this issue Aug 28, 2017
azarakovskiy pushed a commit that referenced this issue Oct 11, 2017
…:feature/update-cil to 1.8/develop

* commit 'e1b3941352856da8159cdaa37538abc2fb2c4982':
  Update version of CIL to use 10.0.0-SNAPSHOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants