Skip Navigation

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

Problem:
You are trying to connect translations in WPML and encounter a problem where typing in the search bar causes a long timeout and crashes due to a large number of posts (32,000). You asked if it's possible to modify the Ajax search to start only after entering a minimum number of characters.
Solution:
Currently, WPML does not offer a setting to modify the Ajax search behavior directly through its interface. This issue requires custom coding, which is beyond our standard support. We recommend consulting with a developer or considering a WPML contractor from https://wpml.org/contractors/ to implement this functionality. If you can provide an example of the issue, we can forward it to our development team for further consideration.

Please note that this solution might be outdated or not applicable to your specific 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 the problem persists, 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.

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by Andrey 3 months ago.

Assisted by: Andrey.

Author Posts
February 18, 2025 at 4:02 pm #16719986

vyacheslavB-2

Background of the issue:
I'm trying to assign one page to another as a translation using WPML. I pressed the button 'Connect with translations' and there is a popup with a search bar with ID 'post_search' and class 'ui-autocomplete-input'.

Symptoms:
When I started typing the title of some page, Ajax starts to find these posts, but I have around 32000 posts in one of the versions, causing a super long timeout and my page crashes.

Questions:
Can I use something like at least 3 or 5 characters to input to start the Ajax searching?
Is there a part of code to be inserted into functions.php to solve this issue?

February 20, 2025 at 12:45 am #16727095

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hello,

It appears this will require some custom work, which is outside the scope of our Support Policy. However, I will check with our developers to see if I can at least guide you in the right direction. After that, you can consider hiring a developer or a WPML contractor (https://wpml.org/contractors/).

I'm not certain if there's a no-coding alternative available, but I will look into it.

For now, I will keep the ticket assigned to myself until I have more information.

February 20, 2025 at 3:26 pm #16730515

vyacheslavB-2

Ok, great. Maybe I will find some solution by myself, I will keep you informed.

p.s. But that's really a problem. Maybe you should fix that at next versions.

February 20, 2025 at 3:41 pm #16730599

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

As Mihai mentioned, no settings are currently available to change this behavior.

Please provide an example so I can share it with our development team.

The following reply will be private.