- Status
- Resolved
- Resolved in
- 4.4.5
Overview of the issue
Depending on your permalink structure, REST API endpoints will miss a slash in the URL or have an extra slash.
Workaround
Our developers are checking the bug to devise a permanent fix.
As a workaround, please go to Settings → Permalinks and add the missing trailing slash to your custom permalink structure.
Or you can apply the following patch:
Note: if you have any trouble applying the current patch, please open a support forum ticket and we’ll help you with that.
Edit the file sitepress-multilingual-cms/classes/url-handling/converter/strategy/class-wpml-url-converter-subdir-strategy.php on line 57 and replace:
return $this->convert_url_string( $url, $sitepress->get_current_language() );
By:
$matchTrailingSlash = $url[ strlen( $url ) - 1 ] === '/' ? 'trailingslashit' : 'untrailingslashit'; return $matchTrailingSlash( $this->convert_url_string( $url, $sitepress->get_current_language() ) );