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

assets with spaces in filename fail in 2.5+ #1205

Closed
sheldonkotyk opened this Issue Jan 30, 2017 · 15 comments

Comments

Projects
None yet
4 participants
@sheldonkotyk

sheldonkotyk commented Jan 30, 2017

Expected behaviour

Spaces in filename should be replaced with %20 as in 2.1.19

Statamic version:
2.5.1

Updated from an older Statamic or fresh install:
updated from 2.1.19

@sheldonkotyk sheldonkotyk changed the title from assets with spaces in name fail in 2.5+ to assets with spaces in filename fail in 2.5+ Jan 30, 2017

@sheldonkotyk

This comment has been minimized.

sheldonkotyk commented Jan 30, 2017

also, it seems to have broken my assets area in the CP and assets modal.

Note sure if it is just a bad upgrade or not.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Feb 1, 2017

We wouldn't ever actually replace the spaces with %20 permanently, just encode them when they need to be. I did find (and fix) an issue with the Focal Point Editor not working with spaces, but can't find any other areas with issues.

When you say "it seems to have broken my assets area in the CP and asses modal", what do you mean specifically? What's broken?

@sheldonkotyk

This comment has been minimized.

sheldonkotyk commented Feb 1, 2017

Going to the assets index page or opening the modal just brings up an eternal loading spinner.

I just did some more testing and it seems to be the 2.5.1 update that is causing it. 2.5.0 upgrade alone worked but adding the 2.5.1 upgrade after breaks it.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Feb 1, 2017

Do you get any errors? The AJAX requests should say something useful, if you have debug on.

@sheldonkotyk

This comment has been minimized.

sheldonkotyk commented Feb 1, 2017

oh. tried again and 2.5.0 didn't work. Must have been cached or something.

screen shot 2017-02-01 at 9 53 52 am

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Feb 1, 2017

CSS FTW!

background: url('your url') and background: url(your url) were not made equal.

@jackmcdade jackmcdade closed this Feb 1, 2017

@sheldonkotyk

This comment has been minimized.

sheldonkotyk commented Feb 1, 2017

The other issue here was the CP was broken due to the index.php "resources" change I think? Anyone else with that issue may have a problem.

@jeffmckeand

This comment has been minimized.

jeffmckeand commented Feb 1, 2017

Not sure this is completely fixed. I'm running into the same issue on 2.5.2 when loading the edit modal for an S3 asset that has spaces in the filename.

@sheldonkotyk

This comment has been minimized.

sheldonkotyk commented Feb 1, 2017

Ya me too.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Feb 1, 2017

Are you sure it's the spaces that's the problem?

@sheldonkotyk

This comment has been minimized.

sheldonkotyk commented Feb 1, 2017

Nope. Not sure.

@jeffmckeand

This comment has been minimized.

jeffmckeand commented Feb 2, 2017

Assets with no spaces in the filename work just fine, so I'm assuming it is.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Feb 2, 2017

What's not working for you?

@jeffmckeand

This comment has been minimized.

jeffmckeand commented Feb 2, 2017

I can easily browse a list of images in an S3 container; all of the thumbnails load just fine. But when I go to edit an image with spaces in the filename, I get an endless spinner and a 500 error.
Attempting to directly load the asset in the browser (e.g. nbcc.dev/cp/assets/s3/lessons/Mosaic/Square%20Share%20500x500.jpg) yields this error:

ErrorException in DimensionBuilder.php line 110:
getimagesize(https://s3.amazonaws.com/nbccweb/lessons/Mosaic/Square Share 500x500.jpg): failed to open stream: HTTP request failed! HTTP/1.1 505 HTTP Version not supported

No such error on files where the name doesn't contain spaces. The asset loads just fine within the modal.

@lardnicus

This comment has been minimized.

lardnicus commented Jun 6, 2017

Client keeps breaking the cp by uploading complete garbage... I like that the 2.5+ now catches corrupt images, but for some reason after I leave them alone with it they eventually upload something which breaks it

http://thesite.com/cp/assets/browse Failed to load resource: the server responded with a status of 500 (Internal Server Error)

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