2

When importing an image via http in Magmi with the Image attribute processor it will not parse an http link correctly if it has a "(" or ")" in the image name. I have tried numerous ways to format the url.

example:

http://img.banggood.com/images/upload/2012/liuguanglian/SKU064425%20&#x28-;4&#x29-;.JPG
Had to add - to the above example or it would auto change to ( )

http://img.banggood.com/images/upload/2012/liuguanglian/SKU064425%20(4).JPG

both are retrievable via http (browser) but fail during importing. This is the error:

source error, Cannot fetch URL:
http://img.banggood.com/images/upload/2012/liuguanglian/SKU064425%20(
Image attributes processor v1.0.31 - 4) cannot be found in images path
Image attributes processor v1.0.31 - .JPG cannot be found in images path
Image attributes processor v1.0.31 - error copying

Any help would be greatly appreciated.

DSKONLINE
  • 55
  • 7

1 Answers1

1

I suppose your problem happens only on media_gallery column.

The problem might come from the ; of the encoded ( and ) since it's a separator for media_gallery column.

Would those ( and ) be set as is in the image url instead of encoded, then it should work correctly.

this can be solved by using value replacer with following settings:

  • attribute to replace : media_gallery,image,small_image,thumbnail
  • new value for media_gallery : {{ urldecode(html_entity_decode({item.media_gallery})) }}
  • new value for image : {{ urldecode(html_entity_decode({item.image})) }}
  • new value for small_image : {{ urldecode(html_entity_decode({item.small_image})) }}
  • new value for thumbnail : {{ urldecode(html_entity_decode({item.thumbnail})) }}
dweeves
  • 5,525
  • 22
  • 28
  • unfortunately it fails in all 4 image attributes small_image, thumbnail, image, and media_gallery. I added your suggestion to the value replacer and still same results. (I checked for white space,missing separators, and even tried utf 8 http encoding. no good results – DSKONLINE Oct 31 '14 at 14:42
  • updated sample to cover all your image fields. it seems that the url itself (containing html entities instead of their basic values) is the cause (because of ;) . image base fields should not react this way however. i'll make some tests this weekend to investigate a bit more – dweeves Oct 31 '14 at 16:14
  • Well not sure how changing it for all images fixed it but it did. Thanks @dweeves been working on this for a month. Now if I can figure out why the image processor renamer only works when it's a http file and not at all if it's a local file. but thats another question on the same subject. – DSKONLINE Oct 31 '14 at 16:35
  • Found out that when you edit a csv in excel or openoffice anytime there was a space in front of a ( it would replace the space with a semicolon. so your answer was correct the first time. Thanks Again – DSKONLINE Oct 31 '14 at 16:45
  • Will it not parse a + sign? Can't figure out how to import an image that has a + sign like item1+item2.jpg it errors and turns the + in to a blank space tried + still comes out a blank space. Any ideas? – DSKONLINE Nov 07 '14 at 23:28
  • what a strange file name :(,i'm surprised the filesystem accepted it. is it local or remote image ? – dweeves Nov 10 '14 at 15:50
  • for some reason overseas distributors thought they needed to add + and characters like "产品组-1.jpg" no way for me to cover every utf8 code in 65k products. The images are remote http: and since they are remote there is no way for me to bulk modify the filenames. I can download them manually but if I try to import local images the rename function of the image processor does not operate and is needed to keep files from being overwritten 1.jpg, 2.jpg etc. Any suggestions? the remote download would work best so I would not have to download each image and re-upload them to the server-2.5mil – DSKONLINE Nov 10 '14 at 19:23
  • i cannot answer directly as a comment on this SO thread, but i would need a sample "image url" to fix your problem. could you then create an issue on magmi GitHub with an attached sample url ? – dweeves Nov 17 '14 at 16:41