Skip to content Skip to sidebar

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

Problem:
The client is experiencing an issue where the product pagination shows 25 products on the first page, but the number decreases on the second page in both Italian and English versions. This issue is suspected to be caused by a conflict between WPML and the Woo Products component due to the use of identical category names and slugs in different languages.

Solution:
We recommend the following steps to resolve the issue:
1. Ensure that product categories are correctly translated to avoid confusion.
2. Remove duplicate name categories or ensure that products are assigned to the correct categories.
3. Adjust the query of the element to use "All products" instead of matching by category to see if the issue persists.

If this solution does not resolve your issue or seems irrelevant due to updates or differences in your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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.

This topic contains 13 replies, has 3 voices.

Last updated by Waqas Bin Hasan 1 year, 10 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
June 17, 2024 at 9:50 am #15744361

ettoreD-4

Background of the issue:
I spoke to the support of the plugin in question and they told me that a WPML function overrides that of their plugin. The bug is that on the reported page the product pagination shows 25 products but then if I go to the second page they decrease. Both in the Italian and English versions.

Symptoms:
On the reported page, the product pagination shows 25 products but then if I go to the second page they decrease.

Questions:
How can I resolve the pagination issue where the number of products decreases on the second page?
Is there a specific WPML function that might be causing this conflict with the Woo Products component?

June 17, 2024 at 9:52 am #15744410

ettoreD-4

Please help me!!!

Screenshot 2024-06-10 alle 11.38.55.png
Screenshot 2024-06-10 alle 11.37.44.png
June 18, 2024 at 5:54 am #15747322

Dražen
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps and try to help with the issue quickly.

1) Can you please share what the plugin in question is?

2) Since you said the issue also happens in the default language, please disable WPML and check if the issue still happens.

Please make a backup before proceeding.

Let us know.

Thanks,
Drazen

June 19, 2024 at 10:37 am #15754883

ettoreD-4

Hi, I'll answer you in points:
1) the plugin is Premium addons
2) I checked by removing the plugin and in the Italian version it works but I can't verify it in English because the plugin is deactivated.

You could check it yourself at this address: hidden link

the access credentials for the staging site are: [removed]

June 20, 2024 at 7:37 am #15761766

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support. I'm assigned this ticket and 'll try my best to help you resolve the issue.

Before proceeding further, may I ask you to try the following?

IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try these in a staging/dev site first, so your live website isn't compromised.

- Deactivate all plugins except WPML, Elementor and the said plugin and check for the issue.
- Activate each plugin one-by-one, while keeping check on the issue after a plugin is activated. This way you'll be able to pinpoint a plugin having a conflict (or problem), if any.
- If the problem persists, repeat the above steps with a default theme of WordPress (i.e. 2021 or 2024).

Please let me know and I'll try my best to help you further on the matter.

Regards.

June 20, 2024 at 1:46 pm #15764202

ettoreD-4

Hi, the plugin that creates a conflict with pagination is wpml, we contacted the premium addons plugin or the plugin that mounts the component we use for the products and it said that wpml overwrites the premium addons code. furthermore, the links with the passwords are from staging so there will be no conflicts with the online one.

June 21, 2024 at 6:16 am #15771231

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates and I understand that plugin support referred you towards WPML.

Do you have any related technical information about what WPML is overriding exactly?

Further, I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.

Your next answer will be private, to share this information safely.

Also provide detailed steps to reproduce the issue and links to pages in admin and on frontend.

IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.

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

June 21, 2024 at 1:08 pm #15775484

ettoreD-4

Hi, I'll share the necessary information with you:

The test site is hidden link
The page is hidden link but is also visible in the Italian version.

*** credentials removed from public message for safety reasons ***

June 24, 2024 at 7:35 am #15803836

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access and the details. I've removed access info from the public message for safety.

I was able to login and seeing a lot of out dated plugins including WPML and the related. However, I'll update these and 'll conduct my tests and investigation.

I'll get back to you accordingly.

June 24, 2024 at 1:06 pm #15807415

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience, I'm still working on this and 'll get back to you accordingly.

June 24, 2024 at 1:32 pm #15807660

ettoreD-4

Thank you very much, I await your response

June 25, 2024 at 7:53 am #15817668

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I've tried different things but in the last I noticed that there's a parameter called "paged" for those pagination links which is sent to an AJAX request. So I registered it in WPML -> Languages -> Language switcher options -> Preserve URL arguments and then it seem to work fine for the Italian language (https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/).

However, this isn't working fine for English language. But the issue happens if I move to another page in English language, then Italian also goes wrong.

So I agree something is overriding as you mentioned after checking with Premium Addons for Elementor support perhaps.

Besides this I noticed some inconsistent behavior on your staging which seem to go unresponsive intermittently.

Give that, before I escalate this issue to our 2nd tier team, I've created a fresh sandbox site at hidden link (one-click login) with WPML and Elementor plugins active, while WC and WCML 'll need your attention about how you want to set these up.

After that please recreate the issue in this sandbox site, using some sample products (no need for images).

So we can see if it is easily reproducible. Then please write me the steps on how to reproduce it. I'll then be able to check for more details and escalate accordingly.

Looking forward.

preserve url arguments.jpg
paged.jpg
June 26, 2024 at 3:04 pm #15835265

ettoreD-4

Hi, I created the sample products and translated them into the English version and the bug doesn't seem to appear.
Could you check?

June 27, 2024 at 7:23 am #15841234

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for trying in the sandbox.

I analyzed further and found that the main difference between your staging and sandbox is, that, in your staging you're using selected product categories for that element (to query the products). While in sandbox, no category is selected.

So please try creating categories in sandbox and check again.

However, my main suspect is around the same categories created in your staging, BECAUSE:

- There are same name categories in the same language.
- Some categories have not even same name, but same slug in different languages (i.e. same name and slug in Italian and English).
- These have different number of products attached.

Given that:

- Same name may confuse visually when selecting the correct category.
- Same slug creates problems with queries, for sure.
- Having same name categories, holding different number of products, may confuse when counting the paging (visually).

So I'll recommend:
- correcting category names (i.e. translating properly to eliminate any confusion).
- either remove duplicate name categories and assign products to correct categories,
- or, know which category you've selected for that element and match the count accordingly.
- also try changing the element's query to use "All products" instead of category matching, to see the results.

Please see attached for a reference, as well as, see this screencast hidden link for an understanding.

Screenshot 2024-06-27 121037.jpg
Screenshot 2024-06-27 121004.jpg
Screenshot 2024-06-27 120903.jpg