WPML
Status
Resolved
Reported for
WPML Multilingual CMS 4.8.1
Resolved in
WPML 4.9
Topic tags
Bug

Overview of the issue

In some rare cases, if you have a large amount of revisions being kept for a post, and if you do another change and preview the change, you might see wrong or not updated contents instead of the latest possible contents that you just put there.

Workaround

Our developers are working on fixing the issue.

The following workarounds should be used only after taking a proper site backup and making sure that you know what you are doing.

You can limit the number of revisions that are being kept to a lower number – e.g. 5
to do that use this code and place it in your wp-config.php

define('WP_POST_REVISIONS', 3 );

and update the problematic page

Another code workaround would be to go to

/wp-content/plugins/sitepress-multilingual-cms/inc/query-filtering/wpml-name-query-filter.class.php

There in the function \WPML_Name_Query_Filter::get_single_slug_adjusted_IDs
right before this code:
		if ( ! $found ) {
			$pages_with_name = $this->get_single_slug_adjusted_IDs_from_DB( $page_name_for_query, $post_parent );
			$cache->set( $cache_key, $pages_with_name );
		}

please add this code:

		if ($this->post_type == 'revision') {
			return null;
		}

All known issues →