- Status
- 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.