Skip Navigation

[Resolved] filters do not work anymore in many-to-many relationships after update

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

Problem:

Views filter on custom checkboxes field does not work in Types 3.0 + Veiws 2.6

Solution:

There is an issue with the Checkbox fields that save “0” when they are not set on a post.

Our developers have provide a errata for this:
https://toolset.com/errata/checkboxes-that-save-0-are-interpreted-as-checked-by-views/

Relevant Documentation:

This support ticket is created 6 years, 6 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)

Tagged: 

This topic contains 16 replies, has 3 voices.

Last updated by fredr 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#906326

I am trying to: repair a client's website.

The situation : It is a bookshop.
I have two types "books" and "authors", with a many to any relationships called "jobs"
Jobs can be : author, contributor, translator, illustrator, etc...

The site worked well : on the product page, I can display the author, the photographer, and other roles (one view for each)
I upgraded to new versions of types and views today
The client entered a new book : now the author is also displayed as photographer, contributor, illustrator, etc...

Link to a page where the issue can be seen:

New product page with error : hidden link

I expected to see:
Example of an old product page (stays ok) : hidden link

Instead, I got:

New product page with error : hidden link

#906554

Hi Fred,

We will need to check your installation to understand your website structure.

The login credentials are not working. please provide working credentials so that we can work on the issue.

Thanks.

#906575
#906641

Thanks for the details, I can see the problem in your website, the custom field filter does not work, for example:
hidden link
filter:
Sélectionner les éléments avec le champ :
Type de collaboration est un chaîne égal à Illustrateur

This filter does not take effect on the result any more.

The problem is abnormal, in case it is a compatibility problem, please try this:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks

#907548
#908004

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

#908319
Afficher-illustrateur.JPG

There isn't similar problem in my localhost, the view "Afficher illustrateurs" does not output any result, see screenshot Afficher-illustrateur.jpg, so it might be a compatibility problem or server problem, I need to debug in your website, please backup your website then update this thread. thanks

#908350

Thanks a lot ! Backup is done.
On other books, do the view have an output ?

#908622

On other books, the view does not have an output,

You are using old version of Toolset plugins, so I am updating the Toolset plugins to the latest version in your website, and trying to debug in it, will feedback if there is anything found

#908623

Toolset plugins updated, the problems still persists, I have tried to switch theme, but get a PHP 500 error, so I need to get the debug logs from your website, but the FTP access you provided above is not valid, I get this error:
Connecting to 213.186.33.**:21...
Status: Connection established, waiting for welcome message...
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server

Please check it, make sure it is valid, thanks

#908672
#908750

Thanks for the details, I can duplicate the same problem with the exported Toolset setting file from your website, and I have escalated this ticket to our 2nd tier supporters, will update this thread if there is anything news.

#909217

Here is the feedback from our 2nd tier supporters:

It is a know problem, there is an issue with the Checkbox fields that save “0” when they are not set on a post.

Our developers have provide a errata for this:
https://toolset.com/errata/checkboxes-that-save-0-are-interpreted-as-checked-by-views/

Please let me know if you need assistance to adjust the codes

#909226

Thanks for this solution.

The strange thing is that the website has been working perfectly for the last two years, and errors started to appear last week only.

How do I change "0" to nothing in the database ? I cannot figure out which fields to edit.

#909245

The problem occurs in Types version 3.0, the custom checkboxes field should be "Type de collaboration":
hidden link