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

Problem uploading when image directories are numbers #3096

Closed
saracarl opened this issue Apr 13, 2022 · 1 comment · Fixed by #3097
Closed

Problem uploading when image directories are numbers #3096

saracarl opened this issue Apr 13, 2022 · 1 comment · Fixed by #3097

Comments

@saracarl
Copy link
Collaborator

Riksarkivet ran into a problem uploading a zip file of images. The upload hung, and they were sent no errors. When I looked at the upload processing, I found this:

Found 310 image files in /tmp/fromthepage_uploads/32003152/30002909/30002909 -- converting to a work
convert_to_work creating database record for /tmp/fromthepage_uploads/32003152/30002909/30002909
	convert_to_work owner = Riksarkivet Sverige
	convert_to_work collection = I demokratins namn – kvinnorna som krävde rösträtt
	convert_to_work default title = 30002909
	convert_to_work looking for metadata.yml in /tmp/fromthepage_uploads/32003152/30002909/metadata.yml
	convert_to_work no metadata.yml file; using default settings
	convert_to_work loaded metadata.yml values 

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: URL must have at least one letter

This is the same as #3074, introduced by #2328

Discussed with @benwbrum and, since the core problem #2328 was trying to solve was slugs (aka URLs) being all numbers (and colliding with IDs), and we've run into problems with this twice now since we deployed that change, a validation is not the right place to put this. We should allow all numeric titles, but in the slug generator append something to make it a string rather than a number.

@saracarl
Copy link
Collaborator Author

@sylvieed take a look at this.

@benwbrum benwbrum linked a pull request Apr 13, 2022 that will close this issue
saracarl added a commit that referenced this issue Apr 13, 2022
Support numeric file uploads by prefixing slug for #3096
sylvieed pushed a commit that referenced this issue Jul 14, 2022
Support numeric file uploads by prefixing slug for #3096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants