Active
Project:
Get Directions
Version:
7.x-2.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2013 at 17:38 UTC
Updated:
15 Apr 2013 at 08:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
BruceDawson commentedI just realized that something similar would be useful for Organic Groups - so that access would be permitted for all users/nodes in an organic group.
Comment #2
hutch commentedTry the attached version of getdirections.module.
It creates two new paths
getdirections/location_n2cu
getdirections/location_cu2n
The access perms has been relaxed to the more general "getdirections_access_location" and a user check added to the two new functions getdirections_n2cu_setlocation() and getdirections_cu2n_setlocation()
Remember to flush cache after installing the module file so that the new menu paths get picked up.
Comment #3
BruceDawson commentedSorry for taking so long to respond - I had some other "release engineering" issues. I'll try your file shortly and get back to you. Thanks for the prompt response!
Comment #4
BruceDawson commentedI'm getting the attached notice.
At first I thought it had to do with not having a location field in my profile. But I added one and I'm still getting the notice. However, my profile has several addresses and a LatLon field, so I'm wondering which one its using! (Billing address, shipping address, and for this one, a "current address".)
Comment #5
BruceDawson commentedI tried the following patch, but it didn't help things - I still seem to get null results (giving me an empty form with no map and no directions).
Comment #6
hutch commentedThis is very messy.
The line number 1903 given in the notice is nowhere near function getdirections_other_load_locations()
The Addressfield module does not provide the means to geolocate, but as you have managed to get to the line containing
$locations[$ct] += getdirections_addressfield_convert($a);in function getdirections_other_load_locations() you must be using either module geofield or geolocation to provide latitude and longitude.The patch above is not going to solve anything, what you need is lat/lon, the address is just for display purposes. Ramming the address into $locations when there is no lat/lon does not solve the problem.
Somehow you seem to have a geofield or geolocation instance that has no lat/lon, fix that and the rest will fall into place.
What would be a useful addition to prevent this from happening would be:
In getdirections-7.x-2.x-dev line 1780, immediately above
// addressfieldput
and
Replace
with
I will be adding these to the next round of commits.