I'm trying to use node import to import a CSV file; however, not all the location fields appear in the drop down box when i try to map the file. The only location fields which appear are Country, Longitude, and Latitude. My file contains company name, address, city, state, zip, and phone.
Has anyone else experienced this problem? Does anyone have any advice for me?
Thanks in advance! I'd appreciate any help.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | location.inc_.txt | 7.15 KB | bdragon |
| #2 | location.inc_.patch | 3.67 KB | bdragon |
Comments
Comment #1
bdragon commentedIt seems that node_import doesn't know about the Location 3.x changes yet.
I'll cook up a patch.
Comment #2
bdragon commentedHere's a minimally tested (for lack of sample data) patch that should hopefully have cross-compatibility with all versions of Location.
Comment #3
bdragon commentedAnd for those unable to patch, a drop in .inc file, suitable for use with a DRUPAL-5 checkout or whatever the latest 5.x release is. (I patched against DRUPAL-5.)
Comment #4
bdragon commented(try 2)
Comment #5
mlondon77 commentedThanks for the response.
I'm relatively new to drupal. I can't apply a patch because I'm on a shared server. If I wanted to go the route of the .inc file, how would I apply it?
Thanks.
Comment #6
Robrecht Jacques commentedmlondon77: Copy the
location.inc_.txtfile (comment #4) intosites/all/modules/node_import/supported(or whereever you install your contrib modules) renaming it tolocation.inc. There should be alocation.incin that directory already.Can you then tell whether the new files works like expected?
Comment #7
mlondon77 commentedDude!!! You're awesome! Thanks so much!! I tried it with some test files and it mostly worked.
One thing: in the drop down box, there is one field named "Location: ". I assume this is location name; however, when I use this field for the location name, it doesn't import anything. Any ideas?
Thanks again so much. This is really helpful.
Comment #8
DanielJohnston commentedSubscribing. Also going to test this patch against 5.x-3.0-RC1. Note that http://drupal.org/node/307677 is a dupe under node_import issues queue.
Comment #9
hansrossel commentedThanks! Patch #4 works for me with node_import 1.9, location rc2 and drupal 5.10.
As opposed to #7, I have a Location: location name available during the import and can import into it.
Comment #10
scandi commented#4
Location:Latitude and Location:Longitude field is not imported.
Comment #11
uksigma commentedWill the above patch work on the latest version(s)?
Location 5.x-3.0-rc2
Node import 5.x-1.9
Only my location.inc is now in sites/all/modules/location/location.inc not in sites/all/modules/location/supported/location.inc and if you replace one with t'other then you get a fatal error?
Comment #12
scandi commentedThis patch for file sites/all/modules/node_import/supported/location.inc
Comment #13
uksigma commented...and that will have been my 'fatal' mistake. I spent hours on that, all because I didn't read it properly.
Thank you very much for your prompt help
Comment #14
emlomar1 commentedIn response to #10
Actually I've discover this has something to do with the (location_geo_logic function in the location.module). This funcion allways sets lat and long to 0. To avoid that just edit the location.module and replace (line 1569 aprox.)
with:
hope this helps.
Comment #15
uksigma commentedHaving had this work with the location.inc from #2
and then updated today with location 5.x-3.0 (http://drupal.org/node/346395) the node import is not displaying all the location fields again
Also posted at http://drupal.org/node/307677#comment-1161336
Comment #16
j0k3z commentedemlomar1 - your 2 lines of code fixed an issue that has been driving me nuts for 2 days. Thank you.
Comment #17
EvanDonovan commentedAs per #15, the location.inc patch does not work with Location 5.x-3.0.
Comment #18
jessicakoh commentedsubscribing.
Comment #19
erem commentedDrupal 5.15, Node Import 5.x-1.9, Location 5.x-3.0, also tried http://drupal.org/node/307677 where the fields show up, but data is NOT imported.
Having tried #4 of this post: Location:country no longer shows up, only long/lattitude. Other location fields are NOT availabe, see #17.
HELP..!
Comment #20
internets commentedI'm having the same issues as #19. Fields not showing up. I did apply the patch from #1 in http://drupal.org/node/307677 and I was able to get the fields to show up but they would not import. I got errors about invalid state / province...
Tried both location and the location dev version. Using 5.15 drupal, latest CCK and latest node import...
Comment #21
yesct commentedIt seems the other issue might have more recent information...
marking this one as a duplicate of #307677: Location Fields not showing up (need updated patch for import with Node Import Module to Location Module 5.x)
Also, tagging.
Comment #22
yesct commentedtagging.