[Resolved] Directory default shows no results in french
This thread is resolved. Here is a description of the problem and solution.
Problem:
The customer created a multilingual directory using Toolset to organize 'Contacts', 'Locals', and 'Employers' in a one-to-many relationship, with metadata categorizing roles. The English version of the directory page displayed correctly, but the French version showed a 'No items found' message, despite translated records and metadata.
Solution:
The issue was traced to a custom filter applied in the Toolset settings under Code Snippets. This filter used English terms (e.g., 'national-president') in the query, which prevented it from retrieving translated French records (e.g., 'président-e-national-e'). Disabling the snippet temporarily allowed French results to display. The snippet needs updating to include the French position names to ensure multilingual compatibility.
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.
__Tell us what you are trying to do?
I am building a directory of all the people involved in the organization that is my client. I have created types called 'Contacts' and 'Locals' and 'Employers' to organize these contacts in one-to-many relationships. I am also using metadata to categorize the roles these contacts play in the organization.
The directory, like the rest of the website uses WPML to run in english (the default language) and french.
When I visit the directory landing page in english, I see the default view which shows the organization's top leadership.
When I visit the directory landing page in french, I expect to see a listing of the organization's top leadership in french but instead I see the 'No items found' message. The contact records, as well as the locals and all the metadata have been translate. I am able to use the exposed search and filter form elements to show directory records in french.
__ Is there any documentation that you are following?
No.
I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Please, let me know if you need any additional details. Have a nice day.
I checked it and the issue seems to come from the filter applied in the Toolset > Settings > Code Snippets > toolset-custom-code hidden link
If you temporarily disable it, you get to see the results in French.
You have a filter in there searching by the English terms, eg.: national-president
hidden link
This one got translated to 'president-e-national-e' in French. It is going to be necessary to update the snippet to include the French position names as well so that they're included in the query.