Skip to content Skip to sidebar

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

Problem:
You are using the WPML Media Translation search box to filter media by file name, alt tag, caption, and other metadata, but the search results do not appear even though a valid page count is returned. You expected to see 'Roadmap' related media results, but only the page count is displayed.
Solution:
We recommend navigating to the file

wp-content/plugins/wpml-media-translation/classes/menus/wpml-media-translations-ui.php

and adding the following code:

remove_filter( 'posts_request', 'relevanssi_prevent_default_request' );

before this line:

$attachment_posts = get_posts( $args );

This is a temporary workaround. We have escalated this issue to our developers for review and aim to include a permanent fix in the next update.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to 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. Should you need further assistance, 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 0 reply, has 0 voices.

Last updated by yukaK-4 5 months ago.

Assisted by: Kor.

Author Posts
February 21, 2025 at 7:16 pm #16735092

yukaK-4

Background of the issue:
I am trying to use the WPML Media Translation search box to filter media by file name, alt tag, caption, and other metadata. The issue can be seen at: hidden link

Symptoms:
The search results do not appear even though a valid page count is returned. I expected to see 'Roadmap' related media results, but instead, I got only the page count.

Questions:
Why does the WPML Media Translation search return only the page count and not the actual results?
How can I get the search to display 'Roadmap' related media results? See animated gif that is attached.

February 24, 2025 at 12:37 am #16738772

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for contacting us.

Please try the basic troubleshooting steps below and see if it helps:

Important Note : Please perform a full backup before you proceed.

1. Disable all the plugins except the WPML related ones from your WordPress Dashboard > Plugins and see if the issue is gone, if so, activate one plugin at a time until the culprit one is found.

2. Temporary change to a default WordPress theme such as the ‘Twenty Twenty Five’ theme from your WordPress Dashboard > Appearance > Themes menu.

If the issue persists, I would need to take a closer look at your site. So I would need to request temporary access (WP-Admin and FTP) preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed

IMPORTANT: Please, note, a backup is required for security reasons, and to avoid any data loss, you can use the https://wordpress.org/plugins/updraftplus/ plugin for these backup needs.

Your following answer will be private, which means only you and I have access to it.
✙ I would need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if required. This is also a reason the backup is critical.

February 26, 2025 at 7:38 am #16749223

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

It looks like you've shared access to your local installation. We cannot access that. But anyway, I've prepared a sandbox site here hidden link and could you please replicate the issue over there?

March 5, 2025 at 6:02 pm #16780220

yukaK-4

Hello, yes I don't have any access to a shareable site. However I already included the steps to reproduce the bug in the previous response that will allow WPML team to replicate it on their own sandbox sites:

1. Create a clean wordpress site
2. Install the WPML Media and Relevanssi plugins.
3. Enable `Settings -> Relevanssi -> Searching -> Admin Search` option
4. In `WPML -> Media Translation` try to search for a file name
5. Results will be paginated (example 1 of 1 pages) but no results will be listed as Relevanssi search broke WMPL search...

I would like to report a bug.

16748340-Screenshot_2025_02_25_at_16.48.33.png
March 6, 2025 at 4:11 am #16780996

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I'm able to replicate the issue on our sandbox site here hidden link . I will escalate this to our 2nd Tier Support for further assistance. I will come back to you once I've feedback.

March 6, 2025 at 2:35 pm #16784026

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I have a feedback and this is what you can do to fix this. Navigate to: wp-content/plugins/wpml-media-translation/classes/menus/wpml-media-translations-ui.php

Add this code:

remove_filter( 'posts_request', 'relevanssi_prevent_default_request' );

Before this code:

$attachment_posts = get_posts( $args );

This is a workaround and we have escalated this to our devs for a review so that it can be included in the next update.

March 6, 2025 at 7:55 pm #16785247

yukaK-4

Thank you Kor! We have turned off Admin Search for the time being but look forward to the next version fixing this issue.