craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
287 stars 140 forks source link

Asset filenames renamed on import #847

Closed d-pollard closed 2 years ago

d-pollard commented 3 years ago

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

aalbrecht17235 commented 2 years ago

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

d-pollard commented 2 years ago

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

d-pollard commented 2 years ago

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 commented 2 years ago

I am also having the same issue :(

angrybrad commented 2 years ago

Just released 5.0.4 with a fix for this.

d-pollard commented 2 years ago

Amazing work @angrybrad