Page 1 of 1

default latitude and longitude

Posted: Tue Jan 21, 2014 12:38 pm
by dyoung
When trying to edit a facility layout I am getting the following error:
Before using the layout editor, you must set the default latitude and longitude for your organization.
When I goto Configurations:Settings:Organization the lat and long are set.

My debug is set to 2 and I see no other errors.

Re: default latitude and longitude

Posted: Tue Jan 21, 2014 12:50 pm
by GregS
Very strange, that's a pretty simple check that generates that error message. You don't have either of them set to 0 by any chance? That would trigger the same condition as not being set.

You could look in controllers/maps_controller.php and right before where it says

Code: Select all

if (empty($leaguelat)...
put this line:

Code: Select all

pr(Configure::read('organization')); exit;
This will give you a dump of your organization settings, and you can look for the latitude and longitude settings to confirm that they are what you think they are.

Re: default latitude and longitude

Posted: Tue Jan 21, 2014 2:55 pm
by dyoung
I will give that a try.
I have looked in the settings table within the database and the lat and long are correct there.
Thought it was very bizzar.

Re: default latitude and longitude

Posted: Tue Jan 21, 2014 3:58 pm
by dyoung
When I added that line in I only get a white screen.
This is happening on a fresh install I am using a a control.

I reinstalled and everything is working correctly now. Not sure what caused the previous problem.

Re: default latitude and longitude

Posted: Tue Jan 21, 2014 4:07 pm
by GregS
You'd get a white screen from that if debug was back to 0. I don't think you should ever get a white screen with debug set to 2 (unless maybe your installation is so messed up that it can't find the CakePHP files, but that clearly isn't true in your case).