## Support forums

“Unique” attribute not working in EE 1.6.8
Posted: 13 October 2009 02:56 PM —
Newbie
Total Posts:  1
Joined  2009-10-13

Hello.  Import is working great in EE 1.6.8…but it seems to be ignoring the “unique” attribute.  Data can be imported multiple times and is creating multiple records.

Here is my code.  Small file, so I don’t think there’s any typos.  Just keeps reimporting data.  You can grab the .CSV from the code below.  The file is still up.

{exp:csvgrab url="http://gsis.amystoddard.com/GSIS-Staff-Directory-Sample.csv" delimiter="," encloser="QUOTE" weblog="2" title="1" use="2|3|4|5|6|7|8|9|10" fields="directory-first-name|directory-last-name|directory-title|directory-department|directory-office-phone|directory-phone-alt|directory-fax|directory-description|directory-photo" unique="title"}

Let me know if you’d like access to this Dev site, Andrew.  Otherwise, great work!

.amy

Posted: 13 October 2009 03:22 PM —   [ # 1 ]
Total Posts:  1357
Joined  2006-04-12

Hi Amy,

There is a bug in the plugin when you try to use just the “title” field to test for duplicate entries.

I’ll fix this as soon as I can, but in the meantime you might be able to add another field to the test to get it to work, eg,

unique="title|directory-office-phone"

(or a more appropriate custom field).

Thanks,
Andrew

Posted: 13 October 2009 07:10 PM —   [ # 2 ]
Newbie
Total Posts:  1
Joined  2009-10-13

Hi Andrew.

You’re right about not using “title” as the “unique” field.  I just moved my fields around and it works great now.  Thanks for the help.

.amy

Posted: 24 July 2010 07:18 AM —   [ # 3 ]
Newbie
Total Posts:  7
Joined  2010-07-24

Hello Andrew,

Has the unique=‘title’ parameter bug been fixed? I can’t seem to stop the CSV file from duplicating entries. Unfortunately, I don’t have any other fields that I can attach the unique parameter to.

I also have this PHP Error showing up:
Deprecated: Function split() is deprecated in C:\wamp\www\test\system\plugins\pi.csvgrab.php on line 88

Deprecated: Function split() is deprecated in C:\wamp\www\test\system\plugins\pi.csvgrab.php on line 93

I’m using CSVGrab 0.2.3 and EE 1.6.9.