Skip Navigation

[Resolved] Multiple Views doesn’t work properly

This thread is resolved. Here is a description of the problem and solution.

Problem:

I created two views. One only shows the results, and the other is for search and show results. When I add both of them to the same page, the custom search doesn't work and the site breaks. The button doesn't work either.

Solution:

It is a compatibility problem with custom theme:

You can locate the problem by this:
deactivate other plugins, and switch to wordpress default theme 2019, deactivate all Custom code snippets, and test again

Relevant Documentation:

This support ticket is created 5 years, 7 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 12 replies, has 2 voices.

Last updated by FelipeP5703 5 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1226883

I am trying to: I created two views. One only shows the results, and the other is for search and show results. When I add both of them to the same page, the custom search doesn't work and the site breaks. The button doesn't work either.

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

I expected to see: I expected that both Views worked correctly independently.

Instead, I got: Using together, they break the site.

#1226980

Hello,

Thanks for the details, I can see the problem in your website, please check these:
1) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, deactivate all Custom code snippets, and test again

2) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1227322

So I changed the theme to 2019 and now it works, but when I go back to Astra Child, the problem persist. What can I do to be able to use Astra Child theme and not have this issue?

#1227521

There might be some custom PHP/CSS/JS codes in your "Astra Child theme", please try to switch to parent Astra theme, and test again.

If the problem is fixed, then you will need to check the custom codes in your "Astra Child theme", debug them manually.

#1227980

I have removed all the custom php from the child theme function.php file and it still does not work. I also changed to the parent Astra theme and it still does not work.

What do I do now?

#1228166
v_breaking3.jpg
v_breaking2.jpg
v_breaking.jpg

I've noticed that if I remove the View that has the custom search, the site does not break. I even tried different views and they don't break the site. The only one that breaks the site is a view with the custom search. See Images

#1228280

As you see, it is a compatibility problem, please provide a copy of your website in below private message box, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1229099

Thanks for the details, I am downloading the files, will update here if there is anything found

#1229196
search-form.JPG

I can import your duplicator package, here are what I found:

I assume we are talking about post view "Todos os Anuncios" (ID: 337)

It is not in the home page, so I have tired these:
1) Deactivate all other plugins(except Toolset plugins), switch to Astra Child theme,
2) Put the "Todos os Anuncios" into home page content,
3) Test the home page, the custom search form works fine, see screenshot search-form.JPG
4) and you should be able to see there are lots of 500 errors in the Chrome console window, it is the .access file conducted the problem: /wp-includes/.htaccess
remove it should be able to fix the 500 errors, so there isn't the same problem in my localhost with your duplicator package.

Then I have checked the page of your website again:
hidden link

There isn't the problem any more.

So there might me other server/compatibility problem in your website, if you need more assistance for it, please provide a test with the same problem, I need to test and debug it in a live website.

#1229745
search-form3.JPG

I have tried it in your test site without any modification:
hidden link

it works fine, see screenshot search-form3.JPG

Please check it.

#1230121

Yea, it's working but you neglected that it broke the home page... I sent you the screenshots on previous message. Please look at them.

#1230809

Thanks for the details, the problem is you are using custom HTML codes to customize the Views parameter search form, and it breaks the HTML structure.

I have done below modification in your website:
Edit the post view: Todos os Anuncios
hidden link

In section "Search and Pagination", replace the codes from:

</div>
[/wpv-filter-controls]
[wpv-filter-end]

To:

[/wpv-filter-controls]
[wpv-filter-end]

Please test again, check if it is fixed.

#1231063

My issue is resolved now. Thank you!