I have created a search page using toolset views search, relevansi, and elementor, with the search form at the top, and the search results below. So far so good, and the search results display and work correctly.
The site is product based only, and uses woocommerce. I have set relevansi to index only products and all their custom fields and exclude some other custom product fields. All good still.
However when I try to add a search button to the home page, and want display the results in another page, when it tries to search for the destination search page in the elementor widget settings, products are displayed, instead of pages! and only products!
I would have thought this was unexpected behaviour. I can resolve it by including pages in my relevansi indexing, which I've done, and the widget page selection box then provides products and pages for the "page to display the results". But surely it should only ever be looking for pages and not relevansi linked?
Thanks
(picture below demonstrates, all results here are product titles)
So, this maybe isn't just a toolset issue at all, more like just a general worpress issue or an elementor issue, once relevansi is installed and running. I had a similar problem with trying to work on a different post type. It needed adding to relevansi before showing up in elementor selection box for preview. It might be worth updating your relevansi and views tutorial to include this info?
I'm checking now to see if I can reproduce this behaviour locally.
We have very little control over the Elementor interface, but we did create the Views widget, so I'll pursue this. Relevanssi shouldn't be interfering in the query that populates the dropdown.
I'll get back to you soon when I have the test site set up and have reproduced the test.
So, not sure if this is expected behaviour or part of the same problem with relevanssi (likely), but thought I'd better report it either way.
I have some custom URL fields in product categories. These are not picked up at all in the Elementor interface. So for instance I have a URL field in product categories. and I want to set the link on a simple Elementor button. My custom URL fields for other post types or products, show up fine in the dynamic list, but not the category URL fields.
I have product categories checked in relevanssi, but of course there is no way in Toolset to add category or taxonomy fields to relevanssi for indexing. I have found no workaround for this.
I have however managed to succesfuly get this to work is to use ACF where it functions as expected.
Is this just normal Toolset behaviour for categories or again down to using relevanssi?
I would disable Relevanssi to test whether it is interfering here, that's the quickest way to establish that.
In this case, the Dynamic Sources for Elementor modules is written by them, it's not something we have any control over.
I assume when you talk of "I have some custom URL fields in product categories" you mean you have added a custom field group for the product category taxonomies (i.e. we are referring to term meta here) with a custom URL field.
Types stores URL fields as simple text strings, much the same as if you hadn't used a plugin to register your term meta and had done so with core WP functions, so I don't know why it wouldn't work in the Elementor UI.
You have me at a disadvantage because you know Elementor better than I do, and it's not clear to me how you would use a term meta field to provide the dynamic source for a button in Elementor, I'm not sure what the context should be.
I've been discussing with my second tier colleague, using a simple test site, and it seems I can't reproduce the problem as described after all, even though it seemed I could initially.
What I can reproduce is that post types other than pages are included in the dropdown selector to specify the page where the results are shown.
This happens whether or not Relevanssi is active.
But Pages are also included in the results. I had to be careful what I typed in the select search to be sure of that, which I now am.
On the basis of these conclusions we would say that this is a minor usability issue where irrelevant posts (of different types) appear in the select dropdown search, but that shouldn't prevent you from locating the intended page.
Could you carefully check again and see whether this actually corresponds to what happens on your site?
Hi, unfortunately I can't currently share the site due to GDPR (It is long established site) and I don't have time to thoroughly cleanse it right now.
I can confirm my system does act exactly as described (I carefully double checked while writing my last reply). But perhaps this is due to some other difference on my site if you and your colleague no longer have it quite the same. Either state is quite strange though. I've just updated my Elementor pro to the latest release and retested again without change. And I'm using woocommerce 3.9.1 (Perhaps your systems have updated to 4.0? in last couple of days) and latest toolset types and views.
If I get time next week I'll try a fresh install and see if I can replicate again, and if not will happily share.
Over conjecture probably, but I did notice in the Elementor pro changelog there was a fix for dynamic tags for ACF recently (2.8.3), which may explain why my related issue (custom fields in product categories not being visible ever) was fixable by using ACF
Thanks for your attempts with this. I'll have more of a look into it when I have some more time.
OK, well let me mark this as awaiting your feedback so it's not sitting in my queue and you can let me know when you've had chance to do some tests on a fresh site what you find.