ixray
Forum Replies Created
-
This is really starting to get annoying.. please fix it!
Any words from devs when we can expect a fix? Creating draft events for all locations is not really a feasible option.
After hours of digging in EM’s code I have found the problem:
For whatever reason the dbem_version field in my database was set to “5,55” (with comma) instead of “5.55”. So with each page refresh, em-install.php (which includes various version checks) would write the default values into the database.
Manually setting dbem_version to 5.55 fixed this.
The problem is that “-1” is being passed as a category ID to the map if “all categories” is selected in the search form.
As a workaround I’ve come up with a piece of code that replaces “-1” with a comma-separated list of all category ids:
if ($_REQUEST['category'] == "-1") { $terms = get_terms( 'event-categories' ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ foreach ( $terms as $term ) { $categories .= $term->term_id . ','; } } $_REQUEST['category'] = $categories; } echo em_get_locations_map_shortcode($_REQUEST);Add this to your templates/events-list.php
Same here. This is a bad bug, please fix it soon!
To clarify: Map shows search results if I select a category and a country in the Ajax search form (see #1 below), but not if I select (only) a country (#2). Is that expected behavior?
Output in
em-locations-map-coordsdiv:#1(map shows results)
{"action":"search_events_grouped","em_search":"","geo":"","near":"","category":"518","country":"DE","near_distance":"200","near_unit":"km","em_ajax":true,"width":"100%","height":"100%","query":"GlobalMapData","random_id":"37c25"}#2 (map shows no locations found)
{"action":"search_events_grouped","em_search":"","geo":"","near":"","category":"-1","country":"DE","near_distance":"200","near_unit":"km","em_ajax":true,"width":"100%","height":"100%","query":"GlobalMapData","random_id":"6e603"}Thanks, Angelo. I’ve checked again and it does not work with the country selector, either. What’s the point of the global map then if it can’t be updated with search results?
Thanks but the code example in that thread does not work.
Hi Angelo,
thanks but there’s nothing about the new ’em_maps_locations_map_options’ hook in that document. Also, the paragraph about modifying maps with javascript is not very helpful (see my other thread).
Sorry, my fault, it’s working now.
Here’s another option field that gets overwritten with the default value on every refresh:
dbem_location_event_single_formatSeeing that other options are saved correctly I don’t really understand what is going wrong here.
The latest public versions of both Events Manager and WordPress.
Something seems to delete the
dbem_events_page_search_formentry with every page refresh. If I add an entry nameddbem_events_list_search_form(or anything else, really) and modify em-events.php accordingly it works like a charm. Of course, modifying EM’s core files is a bad solution.As a work around for now I am adding the [event_search_form] shortcode to the events page.
Forum: Plugins
In reply to: [MailPoet Newsletters (Previous)] Form and newsletter editor brokenJust figured out it seems to be a conflict with the WP Review plugin. Now if only I knew how to fix it.
Forum: Plugins
In reply to: [MailPoet Newsletters (Previous)] Form and newsletter editor brokenHere’s what Safari error console says for the newsletter editor:
“[Error] TypeError: ‘undefined’ is not an object (evaluating ‘_.memoize’)
(anonyme Funktion) (load-scripts.php, line 31)
[Error] ReferenceError: Can’t find variable: Backbone
(anonyme Funktion) (notes-common-v2.js, line 32)
[Error] TypeError: ‘undefined’ is not an object (evaluating ‘_.extend’)
global code (admin-bar-v2.js, line 2)
[Error] TypeError: ‘undefined’ is not a function (evaluating ‘$(‘.wp-review-color’).wpColorPicker()’)
(anonyme Funktion) (admin.js, line 155)
c (load-scripts.php, line 3)
fireWith (load-scripts.php, line 3)
ready (load-scripts.php, line 3)
q (load-scripts.php, line 3)
[Error] TypeError: ‘undefined’ is not a function (evaluating ‘element.dispatchEvent(event)’)
fire (prototype.js, line 5733)
_methodized (prototype.js, line 417)
fireContentLoadedEvent (prototype.js, line 5819)”Forum: Themes and Templates
In reply to: User Role Template TagHi kafkaesqui,
strangely, this only works if I am logged in.. what I want to do though is showing the role of the author on the single.php, no matter if I myself am logged in or not..
How would I need to change your code to do that?