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

Asset filenames renamed on import #847

Closed
d-pollard opened this issue May 13, 2021 · 6 comments
Closed

Asset filenames renamed on import #847

d-pollard opened this issue May 13, 2021 · 6 comments
Labels

Comments

@d-pollard
Copy link

d-pollard commented May 13, 2021

Description

When importing into assets, filenames that contain the characters ( & ) and duplicate symbols (characters, example -- turns into -) seem to be either trimmed or removed entirely .

This wouldn't be an issue, except that craft doesn't use their renamed filename, but rather, uses the one provided in FeedMe.

This leads to situations where the URL in craft for the asset is broken, and previews don't work for asset (which makes it easy to spot the culprits).

Example

Original file name:
booklist--700-x-460.jpg

Filename in S3 (imported by feedme):
booklist-700-x-460.jpg

Craft Asset file URL:
{BUCKET}/assets/booklist--700-x-460.jpg

Actual file URL:
{BUCKET}/assets/booklist-700-x-460.jpg

Steps to reproduce

  1. Import an asset with the filename booklist--700-x-460.jpg
  2. Review the asset created in craft

Additional info

  • Craft version: 3.6.14
  • PHP version: 7.4.19
  • Database driver & version: MySQL 8.0.22
  • Plugins & versions:
    • Amazon S3 | 1.2.11
    • Feed Me | 4.3.6
    • ImageOptimize | 1.6.33
    • Redactor | 2.8.7
    • SEOmatic | 3.3.41
@d-pollard d-pollard added the bug label May 13, 2021
@aalbrecht17235
Copy link

hey @d-pollard any luck finding a solution for this? I'm running into the same issue

@d-pollard
Copy link
Author

@aalbrecht17235 unfortunately not; I believe I ended up having to unset the filename or something of that nature

@d-pollard
Copy link
Author

I set the unique key to the unique key of the CMS I was importing from; so had to create a text field in Craft just for that unique key

@robzor
Copy link

robzor commented May 18, 2022

I am also having the same issue :(

@angrybrad
Copy link
Member

Just released 5.0.4 with a fix for this.

@d-pollard
Copy link
Author

Amazing work @angrybrad

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

4 participants