Location Fields not showing up (need updated patch for import with Node Import Module to Location Module 5.x)
jcamfield - September 12, 2008 - 19:18
| Project: | Node import |
| Version: | 5.x-1.9 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
| Issue tags: | location importing |
Jump to:
Description
In trying to import into a content type with location information, only Location:Country, Location:Latitude and Location:Longitude are available from the drop down list in field-matching.

#1
In node_import/supported/location.inc
commenting out as follows seems to fix this (perhaps a bug caused by the latest location.module?)
Line 12:
$fields = array();
foreach ((array)location_field_names() as $field => $fieldname) {
/** if (variable_get('location_'. $field .'_'. $type, $field == 'country' ? 1 : 0)) {
*/
$fields['node_import_location_'. $field] = t('Location: @fieldname', array('@fieldname' => $fieldname));
/** }
*/
}
#2
Patch at http://drupal.org/node/297009 seems to work.
#3
confirm that it works for Location v.5x-3.0-rc2. Brilliant thank you.
For those who use Location v.5x-3.x-dev import didn't work for me.
#4
cross post from http://drupal.org/node/297009
Having had the location.inc file fix this bug work with the location.inc from #2 on the above link
and then updated location module today with location 5.x-3.0 (http://drupal.org/node/346395) the node import is not displaying all the location fields again
#5
Same problem exists for me i.e. node import does not recognise location fields. I have tried patch (#2) and the other solutions posted in this queue and the location queue. Still no joy though.
I'm testing on: Drupal 5.10 | Node Import 5.x-1.9 | Location 5.x-3.0
Any solutions or a point in the right direction would be gratefully appreciated.
#6
subscribing.
#7
I tried the method from #1.
It works.
Thank you, jcamfield.
#8
I am able to see the missing location fields, however, it does not seem to be able to import those fields.
#9
I'm having the same issue using latest versions(dev for location) of all related modules. I tried fixes from previous comments without success.
When I go to map the fields for importing a csv file, location lat / lon / country show up. But Location address, state/province, zipcode, phone, fax etc do not show up.
I'm using the location field within a CCK if that make any difference.
#10
#1 works for Node Import 5.x-1.9 / Location 5.x-3.0 : the fields show up on import menu.
HOWEVER data is not imported. See also http://drupal.org/node/297009#comment-1271766 since that doesn't work either.
#11
i applied #1 but like mostly said it displayed the entire "location:" fields BUT doesn't import anything.
but i did not even reach to that point when i encountered this error
Fatal error: Call to undefined function _location_province_select_options() in /home/smsadler/public_html/spnew/sites/all/modules/node_import/supported/location.inc on line 167
does everyone who did say that it still didn't work encountered this error too?
any update on this issue? it has been driving me crazy...anyone who has a workaround (except for backporting), pls share it here...
thanks
#12
I was having issues with this and tried the fixes in the related threads without success.
Since my site is in early development, I was able to switch to drupal 6 and all the latest 6.x modules and was able to import my location nodes without issue, and have them plotted on a gmap.
I know this isn't a fix... But switching to the latest versions of everything worked for me...
#13
marked #297009: All Location Fields Don't Appear when Using Node Import Module as a duplicate of this issue. (it had a patch that seems not to work with the newer versions)
#14
subscribing.
#15
Internets, did you use the Inc file win 6.x ?
If someone could post an example/instructions for location 6.x that would be great. Also did people get this to work with node locations or cck locations?
Thanks.
#16
Subscribing, +1 for D6 version.
EDIT: Interesting..it seems that node_import AND feedapi with feedapi_mapper_location have the same issues. It seems very difficult to get somehow location fields filled with data from an import...
In D6 also problems in this perspective.
Greetings, Martijn