Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

updateLocationData won't work

7 years 4 months ago
  • Steve's Avatar
    Topic Author
  • Steve
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Active

Hello,

The coordinates of the initial registration informations (address) are submitted correctly.
But once they have to be updated, the user gets 255.000000 255.000000 coordinates.

It seems that no $data is processed over here:
models/profile

public function updateLocationData($userid)
	{
		$usermodel	= CFactory::getModel('user');
		$user		= CFactory::getUser($userid);

		// Build the address string
		$address = CMapsHelper::getAddress($userid);

		// Store the location
		$data = CMapping::getAddressData($address);

		// reset it to null;
		$latitude 	= COMMUNITY_LOCATION_NULL;
		$longitude	= COMMUNITY_LOCATION_NULL;

		if($data){
			if($data->status == 'OK')
			{
				$latitude  = $data->results[0]->geometry->location->lat;
				$longitude = $data->results[0]->geometry->location->lng;
			}
		}else{
			
		}

		$usermodel->storeLocation($user->id, $latitude, $longitude);

		return $this;
	}

Can you help me please?

Many thanks in advance!

7 years 4 months ago
Licenses:

Hi, Steve.

Thank you for contacting us.
I assign developer to investigate this issue further.
At the moment he's on holidays and will contact you at Monday.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 4 months ago
  • Steve's Avatar
    Topic Author
  • Steve
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Michal,

thanks for the info!

Hint:
After some research it seems to be because of

$address = CMapsHelper::getAddress($userid);

The country is not translated -> it's still COM_COMMUNITY_LANG_NAME_SOMETHING

Once I made my own country field and changed it in the configuration, it works.
But it's not the perfect solution ..

I could really use some help on Monday :)

7 years 4 months ago
Licenses:

Hi, Steve.

I assign our developer to take a look into this.
He'll contact you at Monday ;)


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Steve,

Thank you for your information, you right, this is valid bug.

thank you!

7 years 4 months ago
  • Steve's Avatar
    Topic Author
  • Steve
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Dimas,

You're welcome :)
Is there a bugfix?

I just bought your MembersMap module, and of course not all the user are shown because of 2 different country fields.
It would be nice to use the default JS country field!

Many thanks in advance!

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Steve,

Not yet, our developer still on holiday, i will let you know once its done.

thank you

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

I just got the fix, open this file
components/com_community/helpers/maps.php
find this code :

$obj->country	= $user->getInfo( $config->get('fieldcodecountry') );
replace to :
$obj->country	= JText::_($user->getInfo( $config->get('fieldcodecountry') ));

7 years 4 months ago
  • Steve's Avatar
    Topic Author
  • Steve
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Active

Hi,

thanks for the bug fix - I already tried this.

But the coordinates are not update properly!
I still get these 255.00000

It would be better to locate the users with saved coordinates instead of making new Google Map requests each time!

Another hint? :)

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Steve,

Please you try to truncate the location cache on this table "#__community_location_cache"

If still doesnt work, I need access to your backend and FTP.. you can send it via Message on our Community page

thank you!

7 years 4 months ago
  • Steve's Avatar
    Topic Author
  • Steve
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Dimas,

the credentials are in your inbox :)

Thanks!

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Steve,

Thank you for FTP access, but I need the full access on that FTP account so I can modify all files on your server..

And what is your phpmyadmin access? seems you missed it :)

thank you!

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Thank you for the phpmyadmin, but its hard to connect since Its need server address..seems you missed it :)

7 years 4 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

I just tried to get the location data from creating an event and the geo location can be found well..

Attachments:
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW