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

CakePHP error importing entries fields #616

Closed
janhenckens opened this issue Oct 9, 2019 · 10 comments
Closed

CakePHP error importing entries fields #616

janhenckens opened this issue Oct 9, 2019 · 10 comments

Comments

@janhenckens
Copy link

Description

We're seeing an error with feeds that have an entries field in the settings:

Invalid data type, must be an array or \\ArrayAccess instance. - Hash.php: 50

In this cakephp file.

When dumping the data that is causing the exception, that appears to be craft\\fields\\Entries.

This used to run without issues and I'm not sure since when it's broken.

Steps to reproduce

  1. Have a feed that includes relations to other entries in the site
  2. Have an entries field on that feed, set select the related entry

Additional info

  • Plugin version: 4.1.2
  • Craft version: 3.3.7
@janhenckens
Copy link
Author

janhenckens commented Oct 18, 2019

Update: after an afternoon of debugging & dumping stack traces we ended up seeing that Feed Me was trying to import and create Commerce products, simply because the field in question had "variants" as its handle. Changing the handle fixed it.

Commerce isn't installed on this site so this might be something worth having a look at. Thanks!

@paul-blundell
Copy link

Just ran into this exact same issue. Renaming the field from variants fixed the issue. Thanks.

@MaartenVenema
Copy link

This issue still persists.

@carlcs
Copy link

carlcs commented Dec 9, 2020

Thanks @janhenckens for posting this issue. Saved me from wasting time debugging!

@janhenckens
Copy link
Author

Cheers @carlcs :) I was hoping this would be fixed by now :)

@angrybrad
Copy link
Member

Having a hard time trying to reproduce this, unfortunately. Can someone send a sample feed, database dump, and composer.json file over to support@craftcms.com and reference this issue so we can dig in further?

@carlcs
Copy link

carlcs commented Dec 14, 2020

Hello @angrybrad, here’s everything you need to reproduce this problem. Thanks for looking into it!

Archiv.zip

@carlcs
Copy link

carlcs commented Dec 14, 2020

Ok, so there seems to be a new bug in Feed Me 4.3.3 that didn’t exist in 4.3.1. Even after changing the field handle to something else than variants, it’s still not importing content into that field. Probably unrelated to the “Invalid data type” error this issue is about. But I’d probably recommend to use 4.3.1 to reproduce and debug this.

@angrybrad
Copy link
Member

Thanks, everyone - fixed for the next release.

@Kashkin
Copy link

Kashkin commented Sep 5, 2022

This bug appears to exist in Craft 4 when importing from a feed with a key of productId. The same error listed above is returned, and relabelling the key resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants