I've got a content type used to define places, i've enabled location module and enabled (for that content type) all the locative informations including phone and fax numbers BUT when i try to import my .csv via node_import, i cannot see the Phone or Fax fields in the dropdown of available fields to import to.
So i tried to see into "supported" subdir of node_import module where i noticed all supported content types definitions are in. I edited location.inc and realized that the fileds are collected from the function location_field_names() which i think is in locaiton module. I don't kow if i can override that or it's a problem of communications between location module and node_import module.
So, simply, how can i import using phone nad fax location field too ?
Comments
Comment #1
redmood commented.. obvuously the title was intented to be: "unable to import phone and fax numbers... " and not "enabled to import..." :-) sorry
Comment #2
nexco commentedI too had this issue and discovered two places in the code of location.module that, if changed, popped everything into place. This patch fixes all three of the missing phone, fax and additional street fields which do not display in the node_import field mapping popup. More testing of these changes is needed but it works for me now.
This first bit of code adds the missing phone and fax fields into the mapping popup in node_import, it also adds the missing 'additional' street address field as a bonus. (But the 'additional' field won't show up unless you make the second change entered below this first one.)
location.module
starting line 339 approx
This second bit of code adds the missing additional street info radio button default choices into a content type's locative edit screen. Once you have added this code to the location.module, go to edit your content type and open the locative information. You will see the newly added 'Additional Street Info' radio buttons. Make a choice and save the content type. If you have chosen to work with the additional field you will now see it too has been added to the node_import popup.
location.module
starting line 636 approx
Comment #3
pcorbett commentedI can confirm this patch works for me.
Comment #4
brf123 commentedCan you post the completed file or pm with a link? I think that the line numbers are not matching up and I would like to implement this for a vendor database. Thanks!
Comment #5
Robrecht Jacques commentedDuplicate of http://drupal.org/node/307677.