1

I am importing Entries from Google Spreadsheets and I have a column in my spreadsheet containing the filename of an image already existing in Craft.

The import itself works, but images are not found / not selected in the asset field.

In the logs I can see that the image query is wrong, it looks like that:

Search for existing asset with query {"siteId":1,"status":null,"folderId":1,"kind":null,"limit":"9","filename":"test-container-3.png","includeSubfolders":true}

The filename is correct, however the folderId is wrong, it should be 2.

I tried working with plain filenames like "test-container-3.png", I also tried prepending an alias pointing to the correct folder (absolute URL) like "@importImages/test-container-3.png". Made no difference.

How does FeedMe decide to use folderId 1 in its query? How can I change this?

1

So, I found the problem / solution myself:

  • I have 2 file volumes in my Craft installation (documents, images)
  • The asset field I am trying to fill via FeedMe is in its configuration limited to the "images" file volume, but the default location for uploads is (erroneously) configured in the documents share.
  • In this case, FeedMe is determining the folderId from the default location for uploads.
  • The same thing happens, if all volumes are configured for selection, so in my eyes this is a bug, which I filed here (https://github.com/craftcms/feed-me/issues/833)
  • So after changing the default upload location of my asset field to be where my files are actually located ("images" volume), everything works.
  • The column value needs to be the filename only, no alias or anything else prepended.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.