Skip Navigation

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:

(Venue ID: [wpv-post-field name='_EventVenueID']) [tribeEvtVenue id="[wpv-post-field name='_EventVenueID']"]

We suggest using the following:

(Venue ID: [wpv-post-id item="[wpv-post-field name='_EventVenueID']"]) [wpv-post-title item="[wpv-post-field name='_EventVenueID']"]

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.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Shekhar Bhandari 1 year, 1 month ago.

Assisted by: Shekhar Bhandari.

Author Posts
December 7, 2023 at 11:01 pm #15021985

paulM-12

Hi,

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)?

Thank you!

secondary-language-front-end.png
EN-front-end.png
December 11, 2023 at 5:22 am #15032865

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello @paulM-12,

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?

Look forward to your reply.

Thanks

December 12, 2023 at 7:15 pm #15049275

paulM-12

Hi Shekhar Bhandari,

I have tried your way to fix the issue, but still no luck.

Under WPML->Languages->Language filtering for AJAX operations, "store a language cookie to support language filtering for AJAX " was already enabled.

This is the page with the issue:
hidden link

If you click on the load more button, the event venues are still in English instead of the secondary language.

thanks!

December 13, 2023 at 3:14 am #15050539

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

For me, the listings show up like this and they are from the current language, can you please let me know if I am missing something?

Look forward to your reply.

Thanks

Program-Calendar-Ilitaqsiniq.jpg
December 13, 2023 at 3:49 pm #15057067

paulM-12

Hi,

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.

thanks!

Screenshot 2023-12-13 104811.png
December 14, 2023 at 8:00 am #15060905

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

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

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

December 15, 2023 at 6:40 am #15069595

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, a package will help, also, I would need your permission to disable/enable themes/plugins on the provided site.

Look forward to your reply.

Thanks

December 15, 2023 at 6:41 pm #15075801

paulM-12

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?

December 17, 2023 at 2:27 pm #15079047

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Enabled the private reply for you.

December 19, 2023 at 4:55 am #15088267

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

On the toolset views used on that page, you are using the following shortcode in the template
hidden link

(Venue ID: [wpv-post-field name='_EventVenueID']) [tribeEvtVenue id="[wpv-post-field name='_EventVenueID']"]

I replaced it with standard fields like below and it seems to be working without any issue, can you please check and confirm?

(Venue ID: [wpv-post-id item="[wpv-post-field name='_EventVenueID']"]) [wpv-post-title item="[wpv-post-field name='_EventVenueID']"]

Look forward to your reply.

Thanks

December 19, 2023 at 2:44 pm #15093937

paulM-12

Thank you Shekhar! The new code that you provided works!