Skip Navigation

[Closed] DB fields have incorrect values, while the backend is correct

This support ticket is created 2 years, 10 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/Karachi (GMT+05:00)

Author
Posts
#2090361

I was told to try disabling other plugins and see if the DB issue is resolved, however, it is not. hidden link has still issue with filtering and there are only 2 plugins enabled - Toolset types & ACF.

Interesting thing is that the WP backend (post edit page) and the front-end of the post show the same author (connected custom post type), the only issue is the filtering, it shows the posts of another author when performing filtering (and has the wrong connection ID in the DB). However, during the manual fixes of those connection in the DB, other posts are reassigned randomly to another author.

Please investigate.

#2091223

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

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

Your website seems to be served through the Cloudflare CDN and your host WPEngine also applies its own cache and optimizations.

It is possible that you're seeing older cached results from filtering? I'll recommend checking that, after clearing all involved caches.

Also when you say "manual fixes of those connection in the DB" do you mean making direct changes to the database? It is never recommended.

If the issue still persists, you're welcome to share temporary admin login details, along with the exact steps for how and where the incorrect filtering can be seen.

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#2094483

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

During troubleshooting, I noticed that the website is using a PHP template file "archive-blog_post.php" for the custom search/filtering of posts on the blog page.

Is there any reason why you're not using Toolset's WordPress Archive feature for creating the search/filtering of posts?
( ref: https://toolset.com/course-chapter/designing-the-archive-for-directory-items/ )

Even if you do have to use a custom PHP template, we don't recommend making direct query calls from the Toolset tables like "toolset_connected_elements". Toolset offers Relationship API function "toolset_get_related_posts" to get the related posts:
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_posts

The downside of making direct queries from the database is that any future changes on the Toolset side will make your code ineffective.

Any posts which are shown correctly related to a post on the post edit screen mean that they are correctly joined in the backend. If you're seeing extra entries in the database, that could be the result of the incorrect import process or manual changes made to the database. You'll have to remove them manually from the database.

Also, there is nothing in the Toolset Types plugin that would automatically join posts in the relationship or revert the database changes. If you're experiencing that, it would be interesting to test the website's clone on a different server, to rule out the effect of server cache or optimization.

I hope this helps and please let me know if you need any further assistance around this.

#2095803

Hey,

Thank you for your reply!

We will try to rewrite the code and see how it goes. Can we have this ticket open just in case it won't work?

#2095851

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update and I'll wait to hear back from you.

This ticket will stay open for the next couple of weeks. But even if you have a follow-up question after it is closed, you can start a new one and just share this ticket's link in it and we'll have the background information.

The topic ‘[Closed] DB fields have incorrect values, while the backend is correct’ is closed to new replies.