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

Entry Field data import issue: "Setting unknown property: craft\\elements\\db\\EntryQuery::elements.id - Component.php: 209" #1438

Closed
joelod opened this issue May 7, 2024 · 2 comments
Assignees
Labels

Comments

@joelod
Copy link

joelod commented May 7, 2024

Description

When running a JSON feed import, I'm getting the following error:

{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Preparing for feed processing."}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Preparing for database backup.","key":"mistufthflvsmmgtibsw"}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Starting database backup.","key":"mistufthflvsmmgtibsw"}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Limit: 100 Path: \/var\/www\/html\/storage\/backups\/feedme-240506_190154_lmxbbempvh.sql.","key":"mistufthflvsmmgtibsw"}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Finished database backup successfully.","key":"mistufthflvsmmgtibsw"}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Finished preparing for feed processing."}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Starting processing of node #1.","key":"yxbvswuemlwegsccmfxt"}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Match existing element with data {\"title\":\"A&A Pump Company\"}.","key":"yxbvswuemlwegsccmfxt"}
{"date":"2024-05-06 12:01:54","type":"error","message":"Test: Setting unknown property: craft\\elements\\db\\EntryQuery::elements.id - Component.php: 209.","key":"yxbvswuemlwegsccmfxt"}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Starting processing of node #2.","key":"nvkvjnbzuckgzqhsvtzi"}
{"date":"2024-05-06 12:01:54","type":"info","message":"Test: Match existing element with data {\"title\":\"Advanced Filtration Technologies, Inc.\"}.","key":"nvkvjnbzuckgzqhsvtzi"}
{"date":"2024-05-06 12:01:54","type":"error","message":"Test: Setting unknown property: craft\\elements\\db\\EntryQuery::elements.id - Component.php: 209.","key":"nvkvjnbzuckgzqhsvtzi"}

This seems to be caused by a specific part of my JSON:
"distributorLocation": ["1733"]

The distributorLocation handle and the ID of 1733 are both valid.
Tested with a few different methods, but getting the same error.
"distributorLocation": "1733"
"distributorLocation": 1733
distributorLocation": ["United States & Canada"]
distributorLocation": "United States & Canada"

Steps to reproduce

  1. Create a new feed to import a JSON of entries
  2. Setup all Entry Fields and Content Fields (including the entry field mentioned above)
    imagem
  3. Process the newly created Feed Me feed

Additional info

  • Craft version: 5.1.1
  • PHP version: 8.2
  • Database driver & version: MariaDB 10.4
  • Plugins & versions: 6.0.1

EDIT:

distributorLocation": "United States & Canada" worked, so the issue seems to be related with IDs only.

@i-just
Copy link
Contributor

i-just commented May 8, 2024

Hi, thanks for reporting! I raised a PR for this.

@angrybrad
Copy link
Member

Resolved in #1440 and will be included in the next release.

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