[Resolved] A view using AJAX to filter results returns incorrect information
This thread is resolved. Here is a description of the problem and solution.
Problem:
I am having an issue with AJAX results updating when visitors change filter values on my site. After configuring the view, the initial page load looks good, but using filters renders results incorrectly, displaying unparsed shortcodes.
I've configured a view to list some posts in this page in my site: hidden link
When I configured the view, I used the "AJAX results update when visitors change any filter values" option in the "Custom Search Settings".
When I first load the page, everything looks good (Initial Page Load.png) but then, if I use any of the filters (either the search box or one of the dropdowns) then the results are rendered in an incorrect way (Error.png)
The exact same configuration that I have right now used to work fine in my previous version of the site, which used PHP 7.0.30 and Toolset version 2.6.3. Now I'm using PHP 8.2.12 and Toolset version 3.6.11
If I use "Full page refresh when visitors click on the search button with input values auto-updating" in "Custom Search Settings", I get the content in the correct way when I use the filters. However, this forces me to reload the page, which is the undesired behaviour.
The problem here is that WPBakery does not register its shortcodes on ajax requests, hence you see the unparsed shortcodes when the contents are updated via ajax.
See this thread for a solution you can try, though note that some clients have at times reported the workaround stopped working. If that's the case you could try contacting WPBakery support and asking if there is an alternative way of registering their shortcodes, otherwise you would need to disable ajax updates for content designed with WPBakery.
I looked in the WPBakery Page Builder menu and I found there's a Shortcode Mapper option. Could this be what we need? If yes, do you know what values I should use in the textbox?
I do not think that is related, as the shortcode mapper is for other custom shortcodes to make it compatible with WPBakery but not unparse the shortcodes as mentioned by my colleague.