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\helpers\Db::escapeParam(): Argument #1 ($value) must be of type string, array given when using a URL field as the unique field value #1563

Open
jamesmacwhite opened this issue Dec 11, 2024 · 0 comments
Labels

Comments

@jamesmacwhite
Copy link
Contributor

jamesmacwhite commented Dec 11, 2024

Description

When mapping a URL field/value as the unique field to match on Feed Me throws the following error:

craft\helpers\Db::escapeParam(): Argument #1 ($value) must be of type string, array given, called in /var/www/html/vendor/craftcms/feed-me/src/base/Element.php on line 170 - Db.php: 472

Match existing element with data {"webUrl":{"value":"https://spotthestation.nasa.gov/sightings/view.cfm?country=United_Kingdom&region=England&city=Nottingham&ss=83D8CB58-4263-457E-86C99174259184FD","type":"url","label":null,"target":null}}

I believe this is because the URL field is passed with it's JSON serialised value, where the value intending to be checked is the value key.

I believe this did work until a recent version.

Steps to reproduce

  1. Create a feed using a URL field as the unique field value
  2. Attempt to import the feed
  3. craft\helpers\Db::escapeParam() triggers an error preventing items being imported.

Additional info

  • Craft version: 5.5.5
  • PHP version: 8.3
  • Database driver & version: MySQL 8
  • Plugins & versions: 6.6.1
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

1 participant