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

Assets import error: Argument #1 ($asset) must be of type craft\elements\Asset, craft\awss3\Fs given #1427

Closed
ax2000 opened this issue Apr 11, 2024 · 1 comment
Labels

Comments

@ax2000
Copy link

ax2000 commented Apr 11, 2024

Description

When trying to import and create an asset via URL I'm getting the following:

Sculptures: sculptureImages - Asset error: https://sculptorsvictoria.asn.au/images/uploads/sculptures/6720/wiskas_n_cream_01.jpg - craft\helpers\Assets::generateUrl(): Argument #1 ($asset) must be of type craft\elements\Asset, craft\awss3\Fs given, called in /var/www/html/vendor/craftcms/feed-me/src/helpers/AssetHelper.php on line 123

My assets filesystem is set to s3 but I've tried using a local folder in case that was the issue and I still get the following:

Sculptures: sculptureImages - Asset error: https://sculptorsvictoria.asn.au/images/uploads/sculptures/6772/beast_with_horns_01.jpg - craft\helpers\Assets::generateUrl(): Argument #1 ($asset) must be of type craft\elements\Asset, craft\fs\Local given, called in /var/www/html/vendor/craftcms/feed-me/src/helpers/AssetHelper.php on line 120

Additional info

  • Craft version: Craft Pro 5.0.4
  • PHP version: 8.2.10
  • Database driver & version: MariaDB 10.2.44
  • Plugins & versions: Feed Me 6.0.0
@ax2000 ax2000 added the bug label Apr 11, 2024
olivierbon added a commit that referenced this issue Apr 16, 2024
`\craft\helpers\Assets::generateUrl` no longer takes an FS as first argument (see [here](craftcms/cms#14353)). Craft 5 only.
@i-just
Copy link
Contributor

i-just commented May 2, 2024

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

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

3 participants