- This topic has 2 replies, 2 voices, and was last updated 1 year, 9 months ago by .
-
Topic
-
When placing an address and osm map on a user profile, the Nominatum autocomplete is not working and the following error is being thrown:
Uncaught TypeError: $address.autocomplete is not a function at OsmField.autocomplete (osm.js?ver=4.18.0:134) ...
This error is not being thrown when the meta_box in included on a standard post_type.
After inspecting the address field, there is a difference:
Standard Edit Post:
<input size="30" type="text" id="address" class="rwmb-text ui-autocomplete-input" name="addressx" autocomplete="off">
Edit User Profile:
<input size="30" type="text" id="address" class="rwmb-text" name="address">
The issue can be easily recreated on a fresh WP install with meta-box and mb-user-meta:
add_filter( 'rwmb_meta_boxes', 'register_user_meta_boxes' ); function register_user_meta_boxes( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'address_box', 'title' => __('Address'), 'type' => 'user', 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'type' => 'text', 'name' => __('Address'), 'id' => 'address', ), array( 'id' => 'map', 'name' => __('Location'), 'type' => 'osm', 'address_field' => 'address', 'language' => 'de', 'region' => 'de', ), ) ); return $meta_boxes; }
I’ll continue to troubleshoot, but though you guys should know about the issue.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.