Navigation überspringen

[Gelöst] Toolset view not loading when results filtered

This support ticket is created vor 1 Monat. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Dieses Thema enthält 0 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von matthewL-7 vor 3 Wochen, 5 Tage.

Assistiert von: Minesh.

Author
Artikel
#2793695
Screenshot 2025-01-23 at 12.32.04.png

Hi

There is Toolset view on this page:
versteckter Link

That loads the country flags the view is called "list of countries for offer listing".

However when you filter the results or enter a search query the view for the offer does not load in for each one.

This used to work but has stopped. Any ideas why?

I disabled all caching/security plugins in case this was the issue but it still persists.

Thanks.

#2793758

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please send me admin access details and what is your expeted result?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2793871

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

When I try to offer page it shows critical error:
- versteckter Link

When I checked the error logs I can see couple of fatal erros (you can filter the errors with error type on the following page to see fatal error):
- versteckter Link

I'm not sure how exactly you structure the page but I see the following fatal errors:

PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/wowtrk/webapps/WOWTRK_clone/wp-content/plugins/toolset-blocks/embedded/inc/wpv-query-debug.class.php:549
10 minutes ago 24/01/25
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/wowtrk/webapps/WOWTRK_clone/wp-includes/class-wp-term-query.php on line 1131

What if you try to build a test page and create new view just do not add the flags column otherwise everything you should build and then get back to me and I will check further how we can display the flags.

#2794030

Hmm that is odd as its a clone and it works on the OG site. It seems like the clone site is broken as the homepage has a critical error as well now since access was sent over.

I think maybe its easier If I just re-clone the site again and then fix this as theres other issues now as well.

I have re-cloned the site and you can edit the page now. I kept the login info the same so you can just log back on.

I just deleted a lot of of the offers CPT as its faster to edit the page when it has less content in the backend to deal with.

Thanks

#2794171

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

When I try to login to wp-admin using the access details you shared - I now see the following message when I try to login:

Your access to this site has been temporarily limited by the site owner

Can you please grant full access so I should be able to login to admin panel without any issues.

I have set the next reply to private which means only you and I have access to it.

#2794204

Sorry I forgot to readd the user account! The login should work now. 🙂

#2794571

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Ok what I found is interesting.

I see you are using the following complex conditional code within your view's output in grid colum:
=> versteckter Link

<!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:toolset-blocks/fields-and-text {"style":{"fontSize":14,"textColor":{"r":145,"g":145,"b":145,"a":1},"cssClasses":["offerflagicon"],"display":true},"editorMode":"html"} -->
<div class="tb-fields-and-text offerflagicon" data-toolset-blocks-fields-and-text="1">
[wpv-conditional if="( [count_post_terms post_id='[wpv-post-id]' taxonomy='country'] lt 4 )"] [wpv-view name="list-of-countries-for-offer-listing" limit="3"] [/wpv-conditional] [wpv-conditional if="( [count_post_terms post_id='[wpv-post-id]' taxonomy='country'] gte 4 ) AND ( [count_post_terms post_id='[wpv-post-id]' taxonomy='country'] lt 40 )"]</p>
<div class="tooltip">[count_post_terms post_id='[wpv-post-id]' taxonomy='country'] Countries<span class="tooltiptext">[wpv-post-taxonomy type="country" format="slug"]</span></div>
<p>[/wpv-conditional] [wpv-conditional if="( [count_post_terms post_id='[wpv-post-id]' taxonomy='country'] gte 40 )"]</p>
<div class="tooltip">[count_post_terms post_id='[wpv-post-id]' taxonomy='country'] Countries<span class="tooltiptext">See Offer Page</span></div>
<p>[/wpv-conditional]</p></div>
<!-- /wp:toolset-blocks/fields-and-text --></div>
<!-- /wp:toolset-blocks/grid-column -->

So, I see you are using addon plugin to manage your snippet and the snippet you are using is "Count taxonomy linked to Post ID " with above conditional statement.
=> versteckter Link
=> versteckter Link

The thing is that when you load the page first time - the code snippet does run but as soon as you search with keyword "ipad" the above code snippet does not load (seems having no scope with ajax request).

Later I found that you added the same code snipped with "Custom Code" section offered by Toolset:
=> versteckter Link
With code snippet namely "Count taxonomy linked to post ID."

So what I did is, I've deactivated the code snippet "Count taxonomy linked to Post ID" here:
=> => versteckter Link

And activated the code snippet "Count taxonomy linked to post ID." at "Custom Code" section offered by Toolset:
=> versteckter Link

Then when I search with the keyword "ipad" it does display the country images.

Can you try to activate the Code snippet from "Custom Code" section and disable it from the addon snippet plugin and check if that help you to resolve your issue.

#2794675

That is very odd! I will report to Code Snippets but really appreciate you assisting with helping find the issue. Have simply activated it in Toolset now and it is working. 😊