Home›Support›English Support›[Resolved] Ajax pagination not showing correct language after pagination action
[Resolved] Ajax pagination not showing correct language after pagination action
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using Events Calendar Pro, Toolset Views, and WPML plugins to create an event directory. The issue arises with AJAX pagination on the Inuktitut language side of the site, where the 'load more' button does not display events in the correct language. Instead of showing the Inuktitut venue names, it displays the English ones.
Solution: We recommend replacing the shortcode used in the Toolset Views template with standard fields. Instead of using the original shortcode:
This change should resolve the issue with the AJAX pagination not displaying the correct language for event venues. Please check and confirm if this solution works for you.
If this solution does not seem relevant to your issue, please do not hesitate to open a new support ticket with us.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
We are using the Events Calendar Pro + Toolset Views + WPML plugins to create a event directory (a view listing all the events created with Events Calendar Pro).
In the event view (using Toolset Views to built it), it show some details about the event, such as the date (start + end), venue (built-in from Events Calendar Pro plugin), regions (custom taxonomy created with Toolset plugin), audiences (custom taxonomy created with Toolset plugin), etc.. The view is using AJAX pagination.
For now, we have only translated all the Event Venues using the WPML plugin.
When you land on the event directory page, it will show the first 2 events, and if you click on the 'load more' button, it will load the next 2 events. It's working fine on the English side, but on the Inuktitut side, it's not displaying the correct language after clicking the 'load more' button. It's displaying the primary language (which is English).
The 3rd + 4th event will be displayed after the load more button is clicked.
The venue for 3rd + 4th events should be the same as the 2nd event (which is Venue ID: 3889) ᑲᖏᖅᖠᓂᖅ. However, it's displaying the English venue translation ((Venue ID: 3183) Rankin Inlet).
For some reason, it's grabbing the English venue ID (#3183) even if you are on the Inuktitut side. The Inuktitut Venue ID for 'Rankin Inlet' should be #3889.
I have attached some screenshots (EN-front-end.png + secondary-language-front-end.png)
Currently on the English side:
-Event 1: (Venue ID: 3220) Arviat
-Event 2: (Venue ID: 3183) Rankin Inlet
-Event 3: (Venue ID: 3183) Rankin Inlet
-Event 4: (Venue ID: 3183) Rankin Inlet
Currently on the Inuktitut side:
-Event 1: (Venue ID: 3870) ᐊᕐᕕᐊᑦ -- this is correct
-Event 2: (Venue ID: 3889) ᑲᖏᖅᖠᓂᖅ -- this is correct
-Event 3: (Venue ID: 3183) Rankin Inlet -- this is not correct, it should be (Venue ID: 3889) ᑲᖏᖅᖠᓂᖅ
-Event 4: (Venue ID: 3183) Rankin Inlet - this is not correct, it should be (Venue ID: 3889) ᑲᖏᖅᖠᓂᖅ
I did try to use a pagination nav that doesn't use AJAX and it works fine. It was displaying the venue language correctly when going to the next page. It just doesn't seem to work when using AJAX pagination.
I have already contacted Toolset about it too.
How can the issue be fixed if we want to use ajax for paginations (like what I have now)?
Can you provide me a URL where I can see the issue?
Also, Could you please go to WPML-> Support ->Troubleshooting and click the below buttons and see if it helps?
+ Clear cache in WPML
+ Set language information
+ Fix element types collation
+ Remove ghost entries from the translation tables
+ Assign translation status to duplicated content
Note: Create a backup before proceeding.
Further, can you go to WPML->Languages->Language filtering for AJAX operations and see if "store a language cookie to support language filtering for AJAX " is enabled?
The issue is happening in the highlighted area (yellow) on my screenshot. Those are the event venues, and all venues are all already translated to the secondary language.
To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.
So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply. hidden link
Sure, you can disable/enable themes/plugins on that dev site. is there a secure form that I can provide you the shareable link, so you can download the package?