Skip Navigation

[Resolved] On some views not all infos showed or dont show the correct content

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/Karachi (GMT+05:00)

This topic contains 7 replies, has 2 voices.

Last updated by Waqar 8 months, 2 weeks ago.

Assisted by: Waqar.

Author
Posts
#2686912

I am trying to:
On some views not all infos showed or dont show the correct content if the url dont have the view attributes. See with the below links the differences:
hidden link
hidden link
Or here on the related products:
hidden link
hidden link

#2686913

I forgot to mention, the correct infos showed only when filter triggered or pagination triggered not with the links i sent.

#2686937

Hi,

Thank you for contacting us and I'd be happy to assist.

This looks like a cache issue. Cache plugins can show a cached copy of the page on the initial load and the updated version is shown when the page is updated with the URL parameters or through an AJAX call.

Can you please test this will all cache and code optimization plugins disabled, temporarily?

Let me know how it goes.

regards,
Waqar

#2687205

I have disable them but the same issue goes on

#2687215

Thank you for sharing this update.

In that case, I'll need to see how these views and templates are set up in the admin area. Can you please share temporary admin login details, in reply to this message?

I'll also need your permission to download a clone/snapshot of the website if it needs to be investigated on a different server.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

#2687264

Thank you for sharing the access details.

During troubleshooting, I noticed that the issue of the incorrect post data gets fixed if the custom shortcode '[getPortfolioGall]' is removed from the view's content template.

After further investigation, I found the code for this and other custom shortcodes in the active theme's file 'library/shortcodes.php'.

This and a few other shortcodes in the file, use the 'wp_reset_postdata' function which resets the current post used in the views query:
( ref:https://developer.wordpress.org/reference/functions/wp_reset_postdata/ )


wp_reset_postdata();

You can remove these functions from the code of these shortcodes and the issue should be fixed.

#2687273

I removed them, in portfolio seems ok but on the single product the related products still has issues

#2687282

For the view 'Related Products', I've added the suppress_filters="true" attribute to its content template's shortcode:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body


[wpv-post-body view_template="loop-item-in-related-products" suppress_filters="true"]

This has fixed the output of this related products view too.

#2687370

Thank you very much for your help!