Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

getting 'easy' csv import to work


3 replies to this topic

#1 mdowsett

  • Community Member
  • 3 posts
  • Real Name:Mark Dowsett
  • Gender:Male
  • Location:Ontario, Canada

Posted 30 December 2008, 06:54

I can't get the 'easy csv import' contribution to work.

I get an error when trying to import the file that reads "Row 2: The count of fields is wrong" (which is the first row as it ignores the first row) but I have the proper number of fields (columns) in my file.

Any ideas? (I don't think I can attach files here can I...?)

#2 blakebarlow

  • Community Member
  • 1 posts
  • Real Name:Blake Barlow

Posted 31 December 2008, 01:23

View Postmdowsett, on Dec 29 2008, 11:54 PM, said:

I can't get the 'easy csv import' contribution to work.

I get an error when trying to import the file that reads "Row 2: The count of fields is wrong" (which is the first row as it ignores the first row) but I have the proper number of fields (columns) in my file.

Any ideas? (I don't think I can attach files here can I...?)


I am having this same problem...

#3 mrbuddd

  • Community Member
  • 18 posts
  • Real Name:Chris Stanley

Posted 13 January 2009, 05:17

View Postmdowsett, on Dec 30 2008, 01:54 AM, said:

I can't get the 'easy csv import' contribution to work.

I get an error when trying to import the file that reads "Row 2: The count of fields is wrong" (which is the first row as it ignores the first row) but I have the proper number of fields (columns) in my file.

Any ideas? (I don't think I can attach files here can I...?)

I had same problem and this fixed
Change the delimiter: ";" fields separator if you leave blank {TAB} is used
change it to a comma ","

Edited by mrbuddd, 13 January 2009, 05:17.


#4 pleasureidea

  • Community Member
  • 28 posts
  • Real Name:Oleg Gladkiy

Posted 10 February 2011, 23:17

Hello!
The problem appears with thumbnail images when the image name have + (pluses) in name. Thumbnail will not show up but when you click on it, the regular popup image appears. Looks like get_image_from_url function must be corrected somehow. I also use 'On The Fly' Auto Thumbnailer using GD Library 2.1 contribution. Please help me to figure out this. Here is the function:

function get_image_from_url($url, $filename) {
	if(function_exists('curl_init')) {
		
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_HEADER, 0);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

		$out = curl_exec($ch);
		curl_close($ch);
	
		if($out === false) {
			return false;
		}

		if($handle = fopen(DIR_FS_CATALOG_IMAGES . $filename, 'wb')) {
			fwrite($handle, $out);
			fclose($handle);
		}
		
		return true;
	}

	csv_import_message(CSV_CURL_MISSING_CANT_IMPORT_REMOTE_IMAGE, 'warning');
	return false;
}

Edited by pleasureidea, 10 February 2011, 23:20.