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

[Craft Pro 4.0.0-RC3] - File Source Import: Asset error - Argument #4 ($field) must be of type craft\\fields\\Assets, null given #1130

Closed
DrewBold opened this issue May 4, 2022 · 1 comment
Labels

Comments

@DrewBold
Copy link

DrewBold commented May 4, 2022

Description

File Error during Asset import

File Source Import: Asset error: http://elc.test/assets/test/photos/1395302_585501621541036_14%20copy.jpg - craft\\feedme\\helpers\\AssetHelper::createAsset(): Argument #4 ($field) must be of type craft\\fields\\Assets, null given, called in /Users/dev1/GIT/explore_lake_como/craft/vendor/craftcms/feed-me/src/helpers/AssetHelper.php on line 121

The dynamic folders are created however the asset is not saved.

Steps to reproduce

  1. Create Feed to store assets into a volume, specify source with absolute local url
  2. Run feed

Additional info

  • Craft version: Craft Pro 4.0.0-RC3
  • PHP version: 8.0.8
  • Database driver & version: MySQL 5.7.34
  • Plugins & versions: Feed-Me 5.0

Log:

{"date":"2022-05-04 02:42:34","type":"info","message":"File Source Import: Starting processing of node `#3134`.","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:34","type":"info","message":"File Source Import: Match existing element with data `{\"filename\":\"1395302_585501621541036_14 copy.jpg\"}`.","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:34","type":"info","message":"File Source Import: Fetching remote image `http://elc.test/assets/test/photos/1395302_585501621541036_14%20copy.jpg` - `1395302_585501621541036_14-copy.jpg`","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:34","type":"error","message":"File Source Import: Asset error: `http://elc.test/assets/test/photos/1395302_585501621541036_14%20copy.jpg` - `craft\\feedme\\helpers\\AssetHelper::createAsset(): Argument #4 ($field) must be of type craft\\fields\\Assets, null given, called in /Users/dev1/GIT/explore_lake_como/craft/vendor/craftcms/feed-me/src/helpers/AssetHelper.php on line 121`.","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:35","type":"info","message":"File Source Import: Search for existing category with query `{\"siteId\":1,\"status\":null,\"groupId\":2,\"limit\":null,\"where\":[\"=\",\"title\",\"Get from Organization\"]}`","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:35","type":"info","message":"File Source Import: Found `1` existing categories: `[\"319\"]`","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:35","type":"info","message":"File Source Import: Data ready to import `{\"title\":\"1395302_585501621541036_14 copy.jpg\",\"urlOrPath\":\"http://elc.test/assets/test/photos/1395302_585501621541036_14%20copy.jpg\",\"filename\":\"1395302_585501621541036_14 copy.jpg\",\"folderId\":4428,\"isActive\":true,\"attributionRequired\":true,\"attributionType\":[\"319\"],\"legacyCardId\":\"1300\"}`.","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:35","type":"info","message":"File Source Import: Asset [`#`](http://elc.test/admin/assets/edit/-1395302_585501621541036_14 copy?site=default) added successfully.","key":"caxjvycrjkvvwsuihhbo"}
{"date":"2022-05-04 02:42:35","type":"info","message":"File Source Import: Finished processing of node `#3134`.","key":"caxjvycrjkvvwsuihhbo"}
@DrewBold DrewBold added the bug label May 4, 2022
@DrewBold DrewBold changed the title File Source Import: Asset error - null given [Craft Pro 4.0.0-RC3] - File Source Import: Asset error - null given May 4, 2022
@DrewBold DrewBold changed the title [Craft Pro 4.0.0-RC3] - File Source Import: Asset error - null given [Craft Pro 4.0.0-RC3] - File Source Import: Asset error - Argument #4 ($field) must be of type craft\\fields\\Assets, null given May 4, 2022
@brandonkelly
Copy link
Member

Thanks for reporting! Feed Me 5.0.1 is out now with a fix for this.

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

2 participants