Resolved
Reported for: WPML Media Translation 2.7.0
Resolved in: 2.7.1
Overview of the issue
If you update to WordPress 6.0, when you go to WPML → Media Translation, the pagination does not work and it displays only the first 20 images. The only way to access to the additional images is by using the filtering option.
Workaround
- Make sure you have full back of the site.
- Edit the file /wpml-media-translation/classes/menus/wpml-media-translations-ui.php.
- Look for line 310 and replace:
$query_count = preg_replace( '/^SELECT /', 'SELECT SQL_CALC_FOUND_ROWS ', $query );
- With
$query_count = preg_replace( '/^SELECT /', 'SELECT SQL_CALC_FOUND_ROWS ', trim($query) );
Alternatively, you can also try this:
- Go to WPML → Media Translation.
- Click on the Screen options tab at the top of the page.
- Increase the number of images you need to display.
Please, keep in mind that it can impact your site’s performance if this value is set too high.
Will this be fixed in the next plugin update?
Hey there,
We don’t have an ETA yet, however we will update it here once we have any news.
Thank you for your understanding.
Hi,
are you currently working on upgrading WPML to adapt to WordPress 6.0 referring to display pagination correctly in media translation?
Best wishes
Markus
Hello Markus,
Yes, our developers are working on it. We will update here once we have any news.
Regards
Workaround is working.
Thank you.
I’m glad it helped @markusH-59.