Search

Hello all.

I am having some issues with the Map Location Field extension on Symphony 2.3.6 running PHP 5.3

Whenever I add a map location field to a section, I get:

Symphony Fatal Database Error: Column 'default_location_coords' cannot be null

This is affecting creation of new entries, editing of the section and CSV imports too.

I had tried to replace instances of self::_geocodeAddress() to static::_geocodeAddress() in field.maplocation.php, after reading on SO that it could have been the cause, however I have had no luck with this.

Has anybody come across this before?

Double check that the Section Editor has some default coordinates set up :)

Actually, if you are mass importing entries with maps it's quite possible you've exceeded the free quota for the 24 hour period...

Whenever I put the default marker location (eg - "London, England") and default zoom (eg - "5") in the section editor and then go on to save the entry, it still gives me the fatal error regarding default_location_coords..

plus another thing I had noticed, was that in field.maplocation.php, there is a call to _geocodeAddress() in two places - one where default_location_coords is output, and one where it outputs the current location co-ordinates to display the map in the CMS. If this call was not working for any reason, it would mean that co-ordinates would be returned as NULL, plus entries would not update properly when imported.

I have never had any problems with quota limits before, so I am unsure if this would be the reason for one of the problems I am having.

Does your sym_fields_maplocation actually have that field?

In the section editor - no. I only have default marker location and default zoom...

he meant in the database.

In the database, It is there as a field, but there are no mysql entries

^ yeah sorry - it's early.

:)

I am guessing that the lack of mysql entry would probably be the problem here - but the question is why no entry is being created....

From @brendo's comment above:

Actually, if you are mass importing entries with maps it's quite possible you've exceeded the free quota for the 24 hour period...

Ok - I have never had issues with quota limit before, as I mentioned above - however I will try this again tomorrow morning to see if it makes a difference.

I am importing a flat value from a CSV file into the entry, so "London" or "Birmingham" for example.

I uploaded the csv set of data this morning, but although the data seems correct in the CMS, the map now doesn't display in the CMS, nor does anything get geolocated on the front end.

The website uses map location fields to find jobs by location, however on the front end of the site no jobs are being returned when filtered using maplocationfield

I am really coming to my wits end now. I have a client who has a website which isn't working properly and I have tried pretty much everything I know to sort this out :(

I have also noticed that I get a MySQL error like the following whenever I try to do uploads via CSV.

22 August 2014 08:16 > UNKNOWN: DatabaseException 0 - MySQL Error (1146): Table 'my-db.sym_entries_data_' doesn't exist in query: DELETE FROM sym_entries_data_ WHERE  `entry_id` = '176158' on line 845 of /var/www/vhosts/my-website-address/httpdocs/symphony/lib/toolkit/class.mysql.php

The error above only appears when maplocationfield is mapped out in the CSV.

I have the same problem coming up while trying to create this field on a development-server that cannot »phone-out«. Apparently the geocoding fails on field creation. Will try to edit the SQL directly.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details