{"id":19010668,"date":"2026-09-03T13:08:22","date_gmt":"2026-09-03T13:08:22","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/search-problems-in-em7-4-3\/"},"modified":"2026-09-03T13:08:22","modified_gmt":"2026-09-03T13:08:22","slug":"search-problems-in-em7-4-3","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/search-problems-in-em7-4-3\/","title":{"rendered":"Search Problems in EM7.4.3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I am currently testing Events Manager 7.4.3 and have encountered several related issues with the AJAX event search and browser history.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problems affect standard Events Manager fields such as date, location, distance and pagination. We also use event categories, event tags and an additional event taxonomy, but the same state problems occur with the built-in fields.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Environment:<\/p>\n\n\n\n<ul>\n<li>Events Manager 7.4.3<\/li>\n\n\n\n<li>WordPress: 7.1<\/li>\n\n\n\n<li>PHP: 8.2.9<\/li>\n\n\n\n<li>Browser: Google Chrome on macOS<\/li>\n\n\n\n<li>AJAX event search enabled<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">1. Search state is lost after using the browser Back button<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Steps to reproduce:<\/p>\n\n\n\n<ol>\n<li>Open an event list with the Events Manager search form.<\/li>\n\n\n\n<li>Select a date range, a location, location options, a category or another advanced filter.<\/li>\n\n\n\n<li>Run the search.<\/li>\n\n\n\n<li>Open one of the resulting events.<\/li>\n\n\n\n<li>Use the browser Back button.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Observed behaviour:<\/p>\n\n\n\n<ul>\n<li>The normal search text may remain visible.<\/li>\n\n\n\n<li>Advanced filter values are either lost or remain visible without being applied to the restored result list.<\/li>\n\n\n\n<li>In some cases the form still displays the previous filters, but the complete unfiltered event list is shown.<\/li>\n\n\n\n<li>Date and location filters are particularly affected.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Expected behaviour:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The search form and the event results should both be restored to the same state that existed before opening the event.2. AJAX pagination is not restored after browser Back<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This also happens without using any search filters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Steps to reproduce:<\/p>\n\n\n\n<ol>\n<li>Open an event list containing several result pages.<\/li>\n\n\n\n<li>Navigate to page 4 using the AJAX pagination.<\/li>\n\n\n\n<li>Open an event.<\/li>\n\n\n\n<li>Use the browser Back button.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Observed behaviour:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The visitor is returned to page 1 of the event list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Expected behaviour:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The visitor should return to page 4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It appears that AJAX pagination changes the displayed result page without adding the current page to the browser history or otherwise restoring it on a <code>pageshow<\/code>\/back-forward-cache navigation.3. \u201cClear all\u201d does not reliably clear all search state<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We encountered several variations:<\/p>\n\n\n\n<ul>\n<li>The date range was cleared in the advanced search dialog but remained visible in the main search bar.<\/li>\n\n\n\n<li>A location disappeared from the main search bar but remained in the advanced location field.<\/li>\n\n\n\n<li>The location could not always be removed manually from the advanced field.<\/li>\n\n\n\n<li>The Location Options counter continued to display values such as \u201c2\u201d or \u201c3\u201d, although the corresponding selections appeared empty.<\/li>\n\n\n\n<li>Previously selected countries, states, towns or distance values sometimes continued to affect the results invisibly.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Expected behaviour:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cClear all\u201d should reset all visible fields, hidden values, Selectize components, geolocation data, counters and the resulting event list.4. Search cannot always be submitted again after changing the distance<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Steps to reproduce:<\/p>\n\n\n\n<ol>\n<li>Enter a location.<\/li>\n\n\n\n<li>Run the search. The configured default distance is used.<\/li>\n\n\n\n<li>Open Location Options and change the distance.<\/li>\n\n\n\n<li>Try to run the search again.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Observed behaviour:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The displayed distance changes, but the search cannot reliably be submitted again. At times the search button or search state appears disabled until the page is reloaded.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Expected behaviour:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Changing the distance should mark the form as changed and allow a new search immediately.5. Duplicate form IDs and incorrect label references<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Chrome DevTools reports several instances of:<\/p>\n\n\n\n<ul>\n<li>\u201cDuplicate form field id in the same form\u201d<\/li>\n\n\n\n<li>\u201cIncorrect use of <code>&lt;label for=FORM_ELEMENT&gt;<\/code>\u201d<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The search form appears to contain corresponding controls in both the compact and advanced search interfaces with identical IDs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could these duplicate IDs also contribute to the inconsistent resetting and restoration of the search fields?Questions<\/p>\n\n\n\n<ol>\n<li>Are these issues already known?<\/li>\n\n\n\n<li>Are fixes planned for an upcoming Events Manager release?<\/li>\n\n\n\n<li>Is there a public issue tracker or development ticket we can follow for these particular problems?<\/li>\n\n\n\n<li>Which JavaScript events or APIs would you recommend for restoring search state and AJAX pagination until an official fix is available?<\/li>\n\n\n\n<li>Once these issues are fixed in Events Manager itself, will the changes be documented individually in the plugin changelog?<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">We currently use a local JavaScript workaround to preserve the search form, rerun the search after browser Back and restore the selected pagination page. We would prefer to remove this workaround as soon as the corresponding behaviour is handled reliably by Events Manager itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you very much.<\/p>\n","protected":false},"template":"","class_list":["post-19010668","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19010668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19010668\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19010668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}