In reply to David Anderson.

@david here's the explanation of the issue.

In `sitepress-multilingual-cms/classes/query-filtering/class-wpml-get-page-by-path.php` (`\WPML_Get_Page_By_Path::get_page_by_path_filter`), we had the following where clause:

```
$this->wpdb->prepare( "ID IN ( SELECT element_id FROM {$this->wpdb->prefix}icl_translations WHERE language_code = %s AND element_type LIKE 'post_%%' ) AND ", $this->language )
```

In case this is not clear, here we want to add a WHERE clause which filters by language and looks for all element types starting with "post_". To escape the "%", we must prefix it with another "%".

With WP 4.8.3, this string is converted into something like that:

```
"ID IN ( SELECT element_id FROM wptests_icl_translations WHERE language_code = 'en' AND element_type LIKE 'post_{e72a1103990676cd16df62a59657d29057b9f79ef08138075ceae85fee130fb6}' )"
```

`post_%%` was turned into `post_{e72a1103990676cd16df62a59657d29057b9f79ef08138075ceae85fee130fb6}`.

We hook this method which adds the WHERE clause to the `query` filter.

We've fixed the issue by using a higher priority (-1).

This way the placeholder gets fixed by WP after we adjust the where clause.

In our case, it was only one affected place (at least, after looking at all similar issue and running our tests which, thankfully, spotted the problem before our fix).

As Amir wrote, like we had this problem, many other plugins and themes could have been affected.