Title: Error while editing a location
Last modified: August 22, 2016

---

# Error while editing a location

 *  Resolved [kostofffan](https://wordpress.org/support/users/kostofffan/)
 * (@kostofffan)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/error-while-editing-a-location/)
 * If any of the fields for location has symbol ‘%’, then $wpdb->prepare(…) in processLocationData.
   php, row 42 will return false.
    And location will not be saved.
 * Had to replace that row with:
    `$wpdb->query($wpdb->prepare("UPDATE ".SL_TABLE."
   SET ".str_replace("%", "%%", $field_value_str)." WHERE sl_id='%d'", $_GET['edit']));`
 * This happens because prepare uses vsprintf() functions. And vsprintf detects 
   more percent symbols than params in the second argument. And it returns false.
 * [https://wordpress.org/plugins/store-locator/](https://wordpress.org/plugins/store-locator/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Viadat](https://wordpress.org/support/users/viadat/)
 * (@viadat)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/error-while-editing-a-location/#post-5307270)
 * Thanks [@kostofffan](https://wordpress.org/support/users/kostofffan/), will look
   into this
 *  Plugin Author [Viadat](https://wordpress.org/support/users/viadat/)
 * (@viadat)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/error-while-editing-a-location/#post-5307330)
 * _Note: fixed in v3.9 — thank you [@kostofffan](https://wordpress.org/support/users/kostofffan/)_

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error while editing a location’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/store-locator_343c21.svg)
 * [Store Locator for WordPress with Google Maps – LotsOfLocales](https://wordpress.org/plugins/store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/store-locator/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Viadat](https://wordpress.org/support/users/viadat/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/error-while-editing-a-location/#post-5307330)
 * Status: resolved