Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Colonel_mortis Posted November 5, 2022 Posted November 5, 2022 (edited) To reproduce: Go to the full search page, /search/ Apply a date filter (either created or updated), with value set to "Custom" and a start and/or end date Enter a search term, and submit Refresh the page (or click one of the "Didn't find what you were looking for" suggested filters) Expand the search filter options again, and observe that the supplied date filter has been cleared Edit the search term, then submit the search request again, and observe that the date filter is no longer being applied This is because in core/html/front/search/filters.phtml, lines 193/197/219/223, you're directly stringifying the current value, which is a \IPS\DateTime {$elements['search_tab_content']['updatedDateCustom']->value['end']} which results in a non-ISO8601-compliant timestamp like "11/03/22 12:00 AM" (rather than 2022-11-03). You probably need to do something like you already have in the regular Date form element template value="{{if $value instanceof \IPS\DateTime}}{$value->format('Y-m-d')}{{else}}{$value}{{endif}}" (This was reported to me by a user using Firefox, and reproed also in Firefox. It's possible that other browsers tolerate the invalid values, I haven't checked, but doing so would not be standards compliant). Edited November 5, 2022 by Colonel_mortis
Marc Posted November 7, 2022 Posted November 7, 2022 Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
Solution Marc Posted November 30, 2022 Solution Posted November 30, 2022 This item has now been resolved on the latest 4.7.5 release of the platform. If you are experiencing issues once you have upgraded, please let us know.
Recommended Posts