I would also like to vote for the first post update.
I installed the first post plugin (it didn’t work).
I then had to read through these pages and then found the newer version of the plugin.
Once I installed the correct version everything worked great! I was only importing 150 articles which was more than I wanted to do manually. I’ll defiantly be using this plugin often. Thank you!
This worked well for me for about 100,000 entries now, but it’s decided to start grinding again, to the tune of about one entry every two seconds. If I take off the unique setting it zips through pretty well—but instead of inserting duplicates it actually just inserts 1 of the dupe entries. For example, I have several branches of Joe’s Library, but it checks all occurrences and only inserts one of them. I tried a code snippet in an earlier post, but it just borks the script entirely… anyone out there with similar issues?
I only went as far as 50,000 total entries but the plugin still worked for me. When you try to insert too many records at a time, the duplicate entries occur, so if you can limit it to about 3,000 per run, everything should process smoothly.
OK, wow. First, I had already been trying to import a series of smaller files that I had split apart but to the same effect. However, I went into the database itself and modified the datatype of the field I needed to specify as unique (which was a uid in the csv) to a ‘char’ with a length limit of 10. I then created an index on that column. Bang. I’ve imported 30,000 entries now in the time between your response and this one!
Firstly, apologies for neglecting this thread recently. It seemed to have slipped off my “Notify me by email when someone posts” list…
I now (finally) have a new version of CSVGrab that is multiple sites compatible - sorry for the delay in posting. An additional parameter, site_id=”“, has been added to select which site to import the data into.
Also, from now on, rather than posting the plugin in the forum, it now has its own page where the most recent version can be downloaded.
Please see the CSVGrab page on my site for the latest version.
Finally, I’d like to gather some opinions: the usage of the plugin has always been cumbersome and has become increasingly so as features have been added. What would the interest be in a CSVGrab module where the configuration is done using a wizard-style, step-by-step process?
IMHO a wizard style step-by-step process would be user friendly for users who don’t often use the ‘grabber’; however, for the more technical user a step-by-step process may take more time.
An interface would be nice for this. Perhaps one that has the file upload right in it. This might help offload this work to non-tech users who want to import data. Currently that would be a little cumbersome.
More so though, it would be great to have an expiration date added. Would be nice to have hours and minutes, not just dates as entry and expiration dates.
Thanks for the plugin though, I use it about once every month!
I put the newest version (0.2.1) on my site and now I’m getting this error:
Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /home/httpd/vhosts/.../pi.csvgrab.php on line 202
I was using 0.1 and it worked great, the only reason I changed it was because I wanted to use the “unique=” and it didn’t seem to work, so I thought maybe that feature wasn’t in the older version.
Here is the template I’m calling it with:
{exp:csvgrab url=“http://...csv”
weblog=“3”
title=“1”
skip=“1”
delimiter=”,”
encloser=”“
category_field=“4”
category_group=“3”
use=“2|3”
fields=“food-details|food-price”
unique=“title,food-details,food-price” }
Like I said, this template works on the same csv with the old version. I didn’t change anything but the csvgrab version and now it’s not working. Any Ideas??
Unfortunately, I am unable to get CSVGrab working. It looks like some sort of fopen security issue on the server. Here’s an excerpt from the Apache logs:
[Thu Jun 05 10:00:00 2008] [error] [client 12.34.56.789] PHP Warning: fopen(http://255.123.456.78/testing.csv) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\r\n in D:\\folder\\subfolder\\plugins\\pi.csvgrab.php on line 192
Anyone with experience on same issue?
[UPDATE Jun 09]
After further experimentation, it seems that this error and subsequent failures may be due to PHP version 5 versus 4. Everything works fine under PHP4, but fails under PHP5. All other variables the same. Only change being version of PHP running.
So, I’m not sure what is going on at this point. I resaved the CSV file and all of the sudden the test worked and all columns were imported into their correct fields in the weblog. I changed the title and official_name field for a second import test and it didn’t work - just a white screen on the go page.
Update: I think I’ve got this figured out. Turns out exporting a CSV from Excel didn’t work - CSVGrab didn’t like the file. I had to convert the XLS doc to a Numbers format then export to CSV from Numbers. Strange, but it worked. Great Plugin.