View Issue Details

IDProjectCategoryView StatusLast Update
0008106phpList 3 applicationSubscriber Importpublic18-02-08 14:06
Reporteruser1177Assigned To 
Status resolvedResolutionfixed 
Product Version2.10.2 
Target Version2.10.7Fixed in Version2.10.5 
Summary0008106: import 'foreignkey' fails; bad SQL
DescriptionImporting the foreign key fails if the drop down list (on step two of the import process) is used to match a CSV column to a database field. i.e. when the foreign key column in the CSV file is not 'foreign key', e.g. it is 'foreignkey', or 'key', or 'id' or anything other than 'foreign key' (not case sensitive).

I have reproduced this error in MAMP (like xampp but for mac os x) 1.0 beta (PHP 4, MySQL 4.0)
and the latest release, 1.3.1 (PHP 4, MySQL 5.0)
which means it's not a MySQL version issue.
Additional Informationsteps to reproduce:

1. create a CSV file to import with columns 'email', 'foreignkey'
2. import using /admin/?p=import2
3. match 'foreignkey' to 'Foreign Key'
4. SQL error is reported on results
5. data in 'foreignkey' on CSV was not imported into 'Foreign Key'

Let me know if you need help reproducing the error.

TagsNo tags attached.


related to 0003721 closed phplist 2.10.x 



03-10-06 22:04

administrator   ~0019536

no, I can reproduce that, but the confusion is caused by "foreign key" being listed as one of the fields that you can map onto.

If your source file has "Foreign Key" as the column name, the FK import matching will work.


23-07-07 20:49


When the user chose to map an unknown import attribute to a system attribute this attribute ended up in the $_SESSION["import_attribute"] array. A bit of code has been added which moves the attribute to the system mappings array.