Skip Navigation

[Resolved] Ajax not working and something wrong with view shortcode

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 5 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1187349
screenshot2.png
screenshot1.png

I am trying to:
Make custom search working with ajax..
Nothing happens when I select these settings:
- "AJAX results update when visitors click on the search button"
- "AJAX results update when visitors change any filter values"
(The URL will not get any parameters and nothing is happening .. No error in console)

Link to a page where the issue can be seen:
hidden link

I expected to see:
- A working search form with ajax when change any input or click submit
- Both the search form and results should be showing when I insert view shortcode and select "Both the search form and results" in settings

Instead, I got:
- A page where only "page refresh" is working when I search in custom posts.
- The search form is not shown when using shortcode for "Both the search form and results"

Extra information:
I tried disable all plugins except "Toolset Types" and "Toolset Views"
I also change theme to "Twenty Sixteen"

I am running latest version of Toolset (Types v. 3.2.4) (Views 2.7.2)
I am running latest version of wordpress 5.0.3
I am running php 7.2

Screenshot2.png = I searched for "test" and clicked "submit" .. nothing happended. After <hr> break is shortcode for both search and results but search is missing.

#1187740

Hi, can you tell me more about how you created this page?
- Is this a custom Page? What is the content of this Page? Please share any code from the Page contents.
- Is there a Content Template applied to the page? If so, please share the contents of that template.
- I see one search form and two sets of results. Showing the results twice on one page can be a problem. Instead, please display the search form only once, and the search results only once. Let me know if that fixes the problem or not.

#1191468

Hi Christian,

I don't know what you want to know about how I created the page?

I builded a custom theme with Underscores but I have also tried with twentynineteen and other default wordpress themes and disabled all other 3rd party plugins except for toolset plugin and extensions.

FIRST ERROR:
I tried to embed the [wpv-view name="test"] shortcode with both search filter and results, but only results are showing (no search options) ..
Search option will only show if I use both the [wpv-view name="test" view_display="layout"] and [wpv-form-view name="test" target_id="self"] shortcodes ...

SECOND ERROR:
Search will not work with any ajax options.. I can only perform a search when I choose the setting for a page to be updated.

There were new updates for Forms and Access, I run with these plugins:
Toolset Types v. 3.2.4
Toolset Views v. 2.7.2
Toolset Forms v. 2.2.1.2
Toolset Access v. 2.6.1

I can give you access for the page if you need to look into it from dashboard.

I don't use any content template for the page..
This is my code for the current page:

"<div class="row">
<div class="col-8">[wpv-view name="test" view_display="layout"]</div>
<div class="col-4">[wpv-form-view name="test" target_id="self"]</div>
</div>

<hr>

[wpv-view name="test"]"

I tried with one shortcode at a time but I placed both so you could see the problem. I can move [wpv-view name="test"] to a different page if you want to see 🙂

Best Regards
Shane Madsen

#1191631

Okay thanks, it will be helpful for me to take a look in wp-admin. Please provide login credentials in the private reply fields here.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.