Support » Plugin: Events Manager » [Plugin: Events Manager] Latitude and longitude not saved right

Viewing 11 replies - 1 through 11 (of 11 total)
  • you can test it by changing to default theme and deactivating other plugin (temporarily) leaving only EM active and see if its working properly.

    I’ve found a solution.

    Classes -> em-location
    Line 152
    $result = $wpdb->insert($table, $data, $this->get_types($data));
    changed to
    $result = $wpdb->insert($table, $data);

    Did the same on line 145, whereafter I could save changes to locations, which was not possible before.

    location and latitude are set to float in mysql

    location_latitude float Ja NULL
    location_longitude float Ja NULL

    What issues may I run into by deleting $this->get_types($data)?

    here’s the function description of get_types Function to retreive wpdb types for all fields, or if you supply an assoc array with field names as keys it’ll return an equivalent array of wpdb types

    can I know the purpose of deleting $this->get_types($data)? it sounds like not a good idea coz’ it can break EM function

    Purpose. I want latitude and longitude to be saved completely, not truncated. By deleting $this->get_types($data) that is accomplished.
    I don’t want to break any EM function so I would appreciate another solution.

    Obviously, trunkation happens when saved to Mysql. Why is that?

    how about changing the datatype at mysql table instead?

    or setting a length to the float type

    I set flot to 7,7 and put back $this->get_types($data).
    I’m back where I can’t save changes to latitude and longitude. Database error.

    Changed datatype to varchar (12). Same error as above.


    hope this article could help you

    Plugin Author Marcus


    NetWebLogic Support

    a handful of users seem to get this, however, since we’re saving them as floats via wpdb (we use the %f type) and the the mysql should be a float, I have a feeling it’s being caused by something else specific to your site

    if you can figure out what’s causing it on your site, maybe we can correct it for others

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Events Manager] Latitude and longitude not saved right’ is closed to new replies.