Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Bruno Kos 1 year, 11 months ago.

Assisted by: Bruno Kos.

Author Posts
July 3, 2023 at 12:28 pm #13932651

sanfordF

Hi There,

We are fetching videos with categories-based tabs. Under each category 5 posts load by default and then with the load more button with an offset of 5. It's working fine with the English language. But on my site this site we are using 2 languages French and English,

I have checked when we change the language category id will change of post type
like

Cat id with the French language selected: hidden link
Cat id with the English language selected: hidden link

So have used 'suppress_filters' => true, in my query that works fine its load the categories ids according to language selected. Now when click on the load more button it doesn't work correctly it will repeat the posts randomly like its skip 7 or 8 no posts and repeat other post in place of this index. but it load the all posts in number like one category have 13 posts it will load 13 but not correctally.

hidden link

here is the above page please have a look and let me know if you need the access of code i will provide. thanks.

ss: hidden link

Regards,

July 4, 2023 at 10:27 am #13939447

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

So this is a custom solution, this loading more is developed by you and are not using any of the existing plug-ins for this such as https://wordpress.org/plugins/ajax-load-more/?

Also, can you make sure that https://wpml.org/documentation/getting-started-guide/language-setup/enabling-language-cookie-to-support-ajax-filtering/ is active, in case it is deactivated on your website?

Regards,
Bruno Kos

July 6, 2023 at 6:26 am #13955015

sanfordF

Hi,

I'm not using any custom plugin I have make it custom with ajax and if don't use 'suppress_filters' => true, then it will work fine on english language but not in French
and from wpml setting language filtering is enabled.

Regards,

July 6, 2023 at 8:08 am #13956157

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Would you be willing to provide me with WordPress credentials so I could investigate the issue directly?

Can you also install https://wordpress.org/plugins/wp-file-manager/ and tell me where in the theme is the custom ajax code that manages this?

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

I marked your next reply as private so that you can safely add credentials.

July 6, 2023 at 1:44 pm #13960529

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I asked our 2nd tier about this - I am not sure if we can accommodate such functionality, this all being custom developed solution that should be handled by our https://wpml.org/contractors/ using our API, such cases are not within the scope of support.
https://wpml.org/purchase/support-policy/

I will let you know!

July 7, 2023 at 7:28 am #13964927

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you tell me if you changed something in the meantime?

Because yesterday when I escalated this case, it was different than today, because I can see that now it only repeats the same posts from the same language.

hidden link

Yesterday it loaded from other languages, e.g N°5 Depression.

July 7, 2023 at 9:06 am #13966423

sanfordF

No we did't changed anything in the code or in the site.

July 7, 2023 at 9:08 am #13966449

sanfordF

This is a bug that is because of WPML plugin when i use 'suppress_filters' => true, to do this form multi langual then it will not works fine otherwise its working fine you can remove this parameter from query args and then test with english language. all works fine.

July 7, 2023 at 1:14 pm #13968237

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I deactivated WPML, removed supress_filters, cleared the cache and see the same.

Can you record a video on the issue, with and without WPML, using tools such as hidden link to illustrate in which scenario does this happen?

Because I'm not able to get the same results.

no wpml and removed supress filter.jpg
July 10, 2023 at 9:49 am #13976343

sanfordF

Hi There,

Check here all working fine here you make some change in the code but in the staging you can check all working fine

hidden link

July 10, 2023 at 2:38 pm #14007195

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

But on your staging website "load more" seems to be working properly with WPML already active:
hidden link

So not sure what should I check?

July 11, 2023 at 6:21 am #14010081

sanfordF

Mate Did you understand my Question Clearly!!!!!

On staging its working fine but only for default language (english) okay

hidden link

Please load the page in french language and check nothing will display on the page because CAT id's change and Query args not works.

if you are not a technical person please give it your any developer that can check its serious issue that we are facing form last 18 days.

hidden link

Regards,

July 11, 2023 at 10:28 am #14013161

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you check this?

https://wpml.org/forums/topic/wp_query-not-working-in-translated-website/#post-11353605

This answer coming from our 2nd tier support, if you're not seeing categories in another languages, it may indicate that you are missing our hook and have hardcoded it, but need to use the hook to have WPML use the translated category ID.

The topic ‘[Closed] With ajax loadmore request posts are skip randomly and repeates each other.’ is closed to new replies.