feed-me
feed-me copied to clipboard
Importing a CSV with a value that is "OR" doesn't import correctly.
Description
I've been banging my head against a wall on this and I think I might have just worked out the cause. A client is using Feed Me to import / update a list if dogs regularly. One of the fields in the CSV is the dog's location (campus) which can either be California ("CA") or in Oregon ("OR"). Recently, any dog that is in OR has just been importing as "Campus" (the column header) instead of the actual value, "OR". Is there any chance that because "OR" could be interpreted as an SQL / PHP "OR" rather than the location, that it's defaulting or failing to import it correctly? Example CSV is below. The dog in CA works fine, the dog in OR also imports, but the dogLocation is set to Campus instead of OR.
Report,DogName,GDBID,DateWhelp,RecallDate,SireName,SireFlickr,SireID,DamName,DamFlickr,DamID,ShortDesc,Breed,Color,Sex,DogLevel,DogStatus,LitterID,Campus,Instructor,DogLocation,DateGDBRelease,RelCode,StartDate,DispDate,ArchiveDate,ArchiveYN
PD,Adelaide,6P52,1/6/2024,4/3/2025,Adventure,https://flic.kr/p/2oeGSoc,62032,Yvette,https://flic.kr/p/2mKCRt4,60752,"Adelaide has arrived on campus, and we are getting to know her. Look for her first Pupdate in April!",LAB,Yellow,F,BRDEVL,BRDEVL,14740,CA,,CA Training 1 - CT1-106 - Breeding Eval,,BRDEVL,4/3/2025,,,N
PD,Talbot,62R7,6/16/2024,,Swenson,https://flic.kr/p/2osT9ZR,62320,Kendra,https://flic.kr/p/2pnmKXv,62905,"Talbot has arrived on campus, and we are getting to know him. Look for his first Pupdate in April!",LGX,Yellow long,M,PRP,GDBREL,14873,OR,,OR Training 1 - OT1-114 - CEC Eval,3/27/2025,GDBREL,3/27/2025,3/27/2025,,N
Steps to reproduce
- Import the above CSV file.
dogLocationis a category field. The dog inORdoesn't importORas it's category, instead creating one calledCampus
Additional info
- Craft version: 5.6.13
- PHP version: 8.3.15
- Database driver & version: MySQL 8
- Plugins & versions: Admin Bar 5.3.1 Amazon S3 2.2.1 CKEditor 4.6.0 Dashboard Begone 3.0.0 Feed Me 6.8.0 Formie 3.0.21 Hyper 2.2.4 Knock Knock 3.0.2 Retcon 3.2.1 SEOmatic 5.1.11 Social Share 2.0.4 Twigpack 5.0.0
Hi, thanks for reporting and for all the details! ~I raised a PR for this (in the cms).~ I'm working on a solution.
Resolved in https://github.com/craftcms/feed-me/pull/1629 and included in the 6.9.0 release.