Skip Navigation

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 WPMLMedia 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

  1. Make sure you have full back of the site.
  2. Edit the file /wpml-media-translation/classes/menus/wpml-media-translations-ui.php.
  3. Look for line 310 and replace:
    		$query_count = preg_replace(
    			'/^SELECT /',
    			'SELECT SQL_CALC_FOUND_ROWS ',
    			$query
    		);
    
  4. With
    		$query_count = preg_replace(
    			'/^SELECT /',
    			'SELECT SQL_CALC_FOUND_ROWS ',
    			trim($query)
    		);
    

Alternatively, you can also try this:

  1. Go to WPMLMedia Translation.
  2. Click on the Screen options tab at the top of the page.
  3. 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.

6 Responses to “WPML Media Translation - Pagination in Media Translation is not working with WordPress 6.0”

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

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