Importer Module

Posts: 96
Joined: 10/29/2007
Bug Finder

Hi,
I've fought with the importer module for about 6 hours and I'm ready to cry 'uncle'. First, I built a CSV file from scratch, then I used the csv export (very cool module) to create a xml file, and finally I even tried with the export file created. Nothing is working, The file inports but then thows php fatal error

252] PHP Fatal error: Call to a member function data() on a non-object in /var/www/vhosts/vlfit.com/httpdocs/sites/all/modules/contrib/ubercart/uc_importer/uc_importer.module on line 984, referer: http://www.vlfit.com/admin/store/

I saw where anohter user commented this out and skipped the hash stuff, but thtat didn't work for me. I also added the 3rd paramater to the child funciton as suggest by Lyle. I still get same error.

I've used the latest RC on Druapl, and also pulled the module from bazaar.

Has anyone gotten the import to run lately? Attached is my xml file with my product data if you want to test.

Any idea?

Thanks

AttachmentSize
uber.xml119.41 KB
Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

The importer module is complaining because there isn't a <weight_units> or a <default_qty> tag for the product. Those values are being used to create the unique_hash, and weight_units at least should be required. I'm sure the documentation isn't up to date, so I should go figure out what I really want to have happen.

Posts: 96
Joined: 10/29/2007
Bug Finder

I'll add these to the xml to see if it works, thanks for the tip.

Posts: 96
Joined: 10/29/2007
Bug Finder

I added thse two tags to the sql, and now I get same error but at line 998

$id_map['products'][(string)$product_data->id[0]->data()] = $nid;

Fatal error: Call to a member function data() on a non-object in /var/www/vhosts/vlfit.com/httpdocs/sites/all/modules/contrib/ubercart/uc_importer/uc_importer.module on line 998

What does this line do and does this have something to do with more xml tags missing. Here is updated xml file

Thanks
Jim

AttachmentSize
uber.xml129.45 KB
Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

Yeah, the products are missing <id> tags. This is just to keep track of them later, in case some module decides to extend the importer module in some way.

The page really needs a facelift, but the expected structure of the XML file can be found at http://www.ubercart.org/docs/user/354/importing_data. Make sure you've got the required tags in your XML.