dgrundel / woo-product-importer

A simple, free CSV importer for WooCommerce
200 stars 99 forks source link

Says "importing" but stays at 0 and keeps spinning for hours #35

Closed treisto closed 11 years ago

treisto commented 11 years ago

Hello,

In Woo Product Importer » Upload >> Advanced I get this error: "Couldn't get a list of available locales from your server."

However in Wordpress/Settings/General I've set Time Zone to New York.

In the "Woo Product Importer » Preview" I get this warning at the top of the screen: Notice: Undefined index: user_locale in /home/u448528489/public_html/wp-content/plugins/woo-product-importer-master/woo-product-importer-preview.php on line 21

Path to uploads Folder is set to /home/u448528489/public_html/wp-content/uploads

I've tried to upload the example.csv included with no luck; as well, I've tried to map the columns in many different ways.

My csv was:

PROGRAMNAME,PROGRAMURL,CATALOGNAME,LASTUPDATED,NAME,KEYWORDS,DESCRIPTION,SKU,MANUFACTURER,MANUFACTURERID,UPC,ISBN,CURRENCY,SALEPRICE,PRICE,RETAILPRICE,FROMPRICE,BUYURL,IMPRESSIONURL,IMAGEURL,ADVERTISERCATEGORY,THIRDPARTYID,THIRDPARTYCATEGORY,AUTHOR,ARTIST,TITLE,PUBLISHER,LABEL,FORMAT,SPECIAL,GIFT,PROMOTIONALTEXT,STARTDATE,ENDDATE,OFFLINE,ONLINE,INSTOCK,CONDITION,WARRANTY,STANDARDSHIPPINGCOST,AFFILIATE,BUTTONTEXT Total Gym,http://www.totalgymdirect.com,Total Gym Fitness Product Catalog,04/26/2013,Total Gym XLS,"home fitness gyms, total gym xls, total gym details, total gym specifications, xls home gym, chuck norris total gym xls, total gym xls accessories, total gym xls workout, total gym body makeover, total gym exercises, total gym xls product details, gym equipment, gyms equipment","The Total Gym XLS, the newest unit in the Total Gym family, sets the standard for fitness excellence. This total fitness system features: 400 lb weight capacity for total strength and stability Upgraded comfort system Upgraded pulley and cable system Flexible nylon strap handles Upgraded squat stand Padded glideboard with head support Chrome package Exercise capability - over 80 exercises Dimensions Unfolded: 19"" W x 90"" L x 43"" H Dimensions Folded: 19"" W x 51"" L x 9"" H",TG9D1,TotalGymDirect,,851513004333,,USD,899.55,899.55,"1,999.00",,http://www.anrdoezrs.net/click-7120210-11073177?url=http%3A%2F%2Fwww.totalgymdirect.com%2Ftotal-gym-xls.php%3Fkey%3Dcjdata,http://www.ftjcfx.com/image-7120210-11073177,http://feedshare.goldenfeeds.com/totalgym/XLS.JPG,Sporting Goods > Exercise & Fitness,,Fitness,,,,,,,,,Save an additional 10% off using the code 11001 at checkout,,,,yes,YES,NEW,• 30-Day Trial • Warranty - Lifetime warranty on frame. • Flexible payment options to fit all budgets 1. Pay in Full - receive a FREE upgrade 2. Monthly Payment Plan • FREE Shipping - a $100 value,,external,Visit Store

Total Gym,http://www.totalgymdirect.com,Total Gym Fitness Product Catalog,04/26/2013,Total Gym XLS payment plan - First payment $1.00+ 9 monthly payments of $99.84,"home fitness gyms, total gym xls, total gym details, total gym specifications, xls home gym, chuck norris total gym xls, total gym xls accessories, total gym xls workout, total gym body makeover, total gym exercises, total gym xls product details, gym equipment, gyms equipment","The Total Gym XLS, the newest unit in the Total Gym family, sets the standard for fitness excellence. This total fitness system features: 400 lb weight capacity for total strength and stability Upgraded comfort system Upgraded pulley and cable system Flexible nylon strap handles Upgraded squat stand Padded glideboard with head support Chrome package Exercise capability - over 80 exercises Dimensions Unfolded: 19"" W x 90"" L x 43"" H Dimensions Folded: 19"" W x 51"" L x 9"" H",TG9D,TotalGymDirect,,851513004333,,USD,899.55,899.55,"1,999.00",,http://www.dpbolvw.net/click-7120210-11073177?url=http%3A%2F%2Fwww.totalgymdirect.com%2Ftotal-gym-xls.php%3Fkey%3Dcjdata,http://www.ftjcfx.com/image-7120210-11073177,http://feedshare.goldenfeeds.com/totalgym/XLS.JPG,Sporting Goods > Exercise & Fitness,,Fitness,,,First payment $1.00+ 9 monthly payments of $99.84,,,,,,Save an additional 10% off using the code 11001 at checkout,,,,yes,YES,NEW,• 30-Day Trial • Warranty - Lifetime warranty on frame. • Flexible payment options to fit all budgets 1. Pay in Full - receive a FREE upgrade 2. Monthly Payment Plan • FREE Shipping - a $100 value,,external,Visit Store

Woocommerce status:

WC Version: 2.0.8 WC Database Version: 2.0.8 WP Version: WP 3.5.1 Web Server Info: Apache PHP Version: 5.3.20 MySQL Version: 5.1.61 WP Memory Limit: 64MB WP Debug Mode: Yes WP Max Upload Size: 8MB PHP Post Max Size: 8MB PHP Time Limit: 30 WC Logging: Log directory is writable. fsockopen/cURL: Your server has fsockopen and cURL enabled. SOAP Client: Your server has the SOAP Client class enabled. WP Remote Post: wp_remote_post() was successful - PayPal IPN is working.


Please help me, do you have any idea why is this happening? It is probably something very small I'm missing, a setting or a name or syntax error, but I really cant figure out what it is... Any help would me very much appreciated.

treisto commented 11 years ago

I used firebug to dig deeper. After you hit import, the icon remains spinning, nothing happens further. It comes an error in Firebug:

http://dsfgsfdgh.com/wp-admin/tools.php?page=woo-product-importer&action=result

SyntaxError: unterminated string literal [Break On This Error]

"user_locale": 's:164:"

http://xvcncns.com/wp-admin/tools.php?page=woo-product-importer&action=result (line 395, col 31) which is (copy-paste):

 function doAjaxImport(limit, offset) {
var data = {
"action": "woo-product-importer-ajax",
"uploaded_file_path": "\/home\/u448528489\/public_html\/wp-content\/uploads\/csv_import\/total_gym-total_gym_fitness_product_catalog.csv",
"header_row": "1",
"limit": limit,
"offset": offset,
"import_row": 'a:16:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:1:"1";i:3;s:1:"1";i:4;s:1:"1";i:5;s:1:"1";i:6;s:1:"1";i:7;s:1:"1";i:8;s:1:"1";i:9;s:1:"1";i:10;s:1:"1";i:11;s:1:"1";i:12;s:1:"1";i:13;s:1:"1";i:14;s:1:"1";i:15;s:1:"1";}',
"map_to": 'a:40:{i:0;s:13:"do_not_import";i:1;s:13:"do_not_import";i:2;s:13:"do_not_import";i:3;s:13:"do_not_import";i:4;s:10:"post_title";i:5;s:13:"do_not_import";i:6;s:12:"post_content";i:7;s:4:"_sku";i:8;s:13:"do_not_import";i:9;s:13:"do_not_import";i:10;s:13:"do_not_import";i:11;s:13:"do_not_import";i:12;s:13:"do_not_import";i:13;s:13:"do_not_import";i:14;s:14:"_regular_price";i:15;s:13:"do_not_import";i:16;s:13:"do_not_import";i:17;s:13:"do_not_import";i:18;s:13:"do_not_import";i:19;s:13:"do_not_import";i:20;s:13:"do_not_import";i:21;s:13:"do_not_import";i:22;s:13:"do_not_import";i:23;s:13:"do_not_import";i:24;s:13:"do_not_import";i:25;s:10:"post_title";i:26;s:13:"do_not_import";i:27;s:13:"do_not_import";i:28;s:13:"do_not_import";i:29;s:13:"do_not_import";i:30;s:13:"do_not_import";i:31;s:13:"do_not_import";i:32;s:13:"do_not_import";i:33;s:13:"do_not_import";i:34;s:13:"do_not_import";i:35;s:13:"do_not_import";i:36;s:13:"do_not_import";i:37;s:13:"do_not_import";i:38;s:13:"do_not_import";i:39;s:13:"do_not_import";}',
"custom_field_name": 'a:40:{i:0;s:11:"PROGRAMNAME";i:1;s:10:"PROGRAMURL";i:2;s:11:"CATALOGNAME";i:3;s:11:"LASTUPDATED";i:4;s:4:"NAME";i:5;s:8:"KEYWORDS";i:6;s:11:"DESCRIPTION";i:7;s:3:"SKU";i:8;s:12:"MANUFACTURER";i:9;s:14:"MANUFACTURERID";i:10;s:3:"UPC";i:11;s:4:"ISBN";i:12;s:8:"CURRENCY";i:13;s:9:"SALEPRICE";i:14;s:5:"PRICE";i:15;s:11:"RETAILPRICE";i:16;s:9:"FROMPRICE";i:17;s:6:"BUYURL";i:18;s:13:"IMPRESSIONURL";i:19;s:8:"IMAGEURL";i:20;s:18:"ADVERTISERCATEGORY";i:21;s:12:"THIRDPARTYID";i:22;s:18:"THIRDPARTYCATEGORY";i:23;s:6:"AUTHOR";i:24;s:6:"ARTIST";i:25;s:5:"TITLE";i:26;s:9:"PUBLISHER";i:27;s:5:"LABEL";i:28;s:6:"FORMAT";i:29;s:7:"SPECIAL";i:30;s:4:"GIFT";i:31;s:15:"PROMOTIONALTEXT";i:32;s:9:"STARTDATE";i:33;s:7:"ENDDATE";i:34;s:7:"OFFLINE";i:35;s:6:"ONLINE";i:36;s:7:"INSTOCK";i:37;s:9:"CONDITION";i:38;s:8:"WARRANTY";i:39;s:20:"STANDARDSHIPPINGCOST";}',
"custom_field_visible": 'a:40:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:1:"1";i:3;s:1:"1";i:4;s:1:"1";i:5;s:1:"1";i:6;s:1:"1";i:7;s:1:"1";i:8;s:1:"1";i:9;s:1:"1";i:10;s:1:"1";i:11;s:1:"1";i:12;s:1:"1";i:13;s:1:"1";i:14;s:1:"1";i:15;s:1:"1";i:16;s:1:"1";i:17;s:1:"1";i:18;s:1:"1";i:19;s:1:"1";i:20;s:1:"1";i:21;s:1:"1";i:22;s:1:"1";i:23;s:1:"1";i:24;s:1:"1";i:25;s:1:"1";i:26;s:1:"1";i:27;s:1:"1";i:28;s:1:"1";i:29;s:1:"1";i:30;s:1:"1";i:31;s:1:"1";i:32;s:1:"1";i:33;s:1:"1";i:34;s:1:"1";i:35;s:1:"1";i:36;s:1:"1";i:37;s:1:"1";i:38;s:1:"1";i:39;s:1:"1";}',
"product_image_set_featured": 'a:40:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:1:"1";i:3;s:1:"1";i:4;s:1:"1";i:5;s:1:"1";i:6;s:1:"1";i:7;s:1:"1";i:8;s:1:"1";i:9;s:1:"1";i:10;s:1:"1";i:11;s:1:"1";i:12;s:1:"1";i:13;s:1:"1";i:14;s:1:"1";i:15;s:1:"1";i:16;s:1:"1";i:17;s:1:"1";i:18;s:1:"1";i:19;s:1:"1";i:20;s:1:"1";i:21;s:1:"1";i:22;s:1:"1";i:23;s:1:"1";i:24;s:1:"1";i:25;s:1:"1";i:26;s:1:"1";i:27;s:1:"1";i:28;s:1:"1";i:29;s:1:"1";i:30;s:1:"1";i:31;s:1:"1";i:32;s:1:"1";i:33;s:1:"1";i:34;s:1:"1";i:35;s:1:"1";i:36;s:1:"1";i:37;s:1:"1";i:38;s:1:"1";i:39;s:1:"1";}',
"product_image_skip_duplicates": 'a:40:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:1:"1";i:3;s:1:"1";i:4;s:1:"1";i:5;s:1:"1";i:6;s:1:"1";i:7;s:1:"1";i:8;s:1:"1";i:9;s:1:"1";i:10;s:1:"1";i:11;s:1:"1";i:12;s:1:"1";i:13;s:1:"1";i:14;s:1:"1";i:15;s:1:"1";i:16;s:1:"1";i:17;s:1:"1";i:18;s:1:"1";i:19;s:1:"1";i:20;s:1:"1";i:21;s:1:"1";i:22;s:1:"1";i:23;s:1:"1";i:24;s:1:"1";i:25;s:1:"1";i:26;s:1:"1";i:27;s:1:"1";i:28;s:1:"1";i:29;s:1:"1";i:30;s:1:"1";i:31;s:1:"1";i:32;s:1:"1";i:33;s:1:"1";i:34;s:1:"1";i:35;s:1:"1";i:36;s:1:"1";i:37;s:1:"1";i:38;s:1:"1";i:39;s:1:"1";}',
"post_meta_key": 'a:40:{i:0;s:11:"PROGRAMNAME";i:1;s:10:"PROGRAMURL";i:2;s:11:"CATALOGNAME";i:3;s:11:"LASTUPDATED";i:4;s:4:"NAME";i:5;s:8:"KEYWORDS";i:6;s:11:"DESCRIPTION";i:7;s:3:"SKU";i:8;s:12:"MANUFACTURER";i:9;s:14:"MANUFACTURERID";i:10;s:3:"UPC";i:11;s:4:"ISBN";i:12;s:8:"CURRENCY";i:13;s:9:"SALEPRICE";i:14;s:5:"PRICE";i:15;s:11:"RETAILPRICE";i:16;s:9:"FROMPRICE";i:17;s:6:"BUYURL";i:18;s:13:"IMPRESSIONURL";i:19;s:8:"IMAGEURL";i:20;s:18:"ADVERTISERCATEGORY";i:21;s:12:"THIRDPARTYID";i:22;s:18:"THIRDPARTYCATEGORY";i:23;s:6:"AUTHOR";i:24;s:6:"ARTIST";i:25;s:5:"TITLE";i:26;s:9:"PUBLISHER";i:27;s:5:"LABEL";i:28;s:6:"FORMAT";i:29;s:7:"SPECIAL";i:30;s:4:"GIFT";i:31;s:15:"PROMOTIONALTEXT";i:32;s:9:"STARTDATE";i:33;s:7:"ENDDATE";i:34;s:7:"OFFLINE";i:35;s:6:"ONLINE";i:36;s:7:"INSTOCK";i:37;s:9:"CONDITION";i:38;s:8:"WARRANTY";i:39;s:20:"STANDARDSHIPPINGCOST";}',

////////////////////////////////////////////////////HERE!!!!/////////////////////////////////
"user_locale": 's:164:"
Notice: Undefined index: user_locale in /home/u448528489/public_html/wp-content/plugins/woo-product-importer-master/woo-product-importer-preview.php on line 280
";',
////////////////////////////////////////////////////HERE!!!!/////////////////////////////////

"import_csv_separator": 's:1:",";',
"import_csv_hierarchy_separator": 's:1:"/";'
};
//ajaxurl is defined by WordPress
$.post(ajaxurl, data, ajaxImportCallback); 
treisto commented 11 years ago

What I did next was to change WPLANG to en_GB in wpconfig, and to upload the wordpress language files for en_GB. It seems there are no files for en_US and I thought this could be the problem. To no avail though, I still get the same error... Any insights?

treisto commented 11 years ago

I don't know if it helps... I created this file.


HTML with PHP

My Example


I ftp'd it to my server. When I access it from the browser, this is what I get:

" My Example Hello world! _result_bool(false) "

dgrundel commented 11 years ago

Hi Treisto,

Please download the latest version of the plugin (https://github.com/dgrundel/woo-product-importer/archive/master.zip) and try it again. I think we had a little bug in there...

treisto commented 11 years ago

Helloo Daniel, you were so fast!! :)

Works like a charm!! :)

In the advanced tab, I still have the warning: "Couldn't get a list of available locales from your server.", and just below this line, there is an empty box which is editable now. The "System Default" text is no longer in this box, and it is no longer greyed out and frozen. Anyways, I don't know what should be entered there, so I left it empty, and the import worked from the first attempt.

Thank you very much and God bless you! :)

Next, It'd be great if I could figure out a way to make it do this automatically for me every day... :)

dgrundel commented 11 years ago

Perfect!

I changed the way the plugin behaves when it can't get locale settings from the server so you can enter a locale code manually if you want to. It's perfectly okay to leave it blank.

The "couldn't get a list of locales..." message is showing because of your server configuration. It's nothing to worry about!