verbb / comments

A Craft CMS plugin for managing comments directly within the CMS.
Other
137 stars 33 forks source link

Feed Me import fails when owner is assigned to a custom field #251

Closed mjniland1 closed 11 months ago

mjniland1 commented 2 years ago

Description I have a database of comments that need to be applied to entries. The only connection between the entry and the comment is the custom field serviceId. I'm using the plugin Feed Me to assign the comments to the proper entry. The import works properly if serviceId is a match for either the slug or the entry title but the import fails when ownership of the entry is set to serviceId AND the "Data provided for this element is" is set to the custom field serviceId.

Example Error from Feed Me:

Comments: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_serviceId' in 'where clause' The SQL being executed was: SELECT elements.id, elements_sites.elementId FROM c_elements elements INNER JOIN c_elements_sites elements_sites ON elements_sites.elementId = elements.id INNER JOIN c_content content ON content.elementId = elements.id WHERE (field_serviceId = '1677') AND (dateDeleted IS NULL) LIMIT 1 - Schema.php: 676

Steps to reproduce

  1. Create an entry with a custom field & value
  2. use Feed Me to assign new comments to that entry based on that custom field

Additional info

Additional context