Resolved
Reported for: WPML Multilingual CMS 4.5.8
Overview of the issue
Currently, when using the Visual Composer plugin, it is not possible to save a post or page translation. Furthermore, if you refresh the page, the translation status icon switches back to the + icon.
Workaround
Update: This issue has been already solved in Visual Composer 45.0.
Make a full backup of your site before proceeding.
- Open the wp-content/plugins/visualcomposer/visualcomposer/Modules/Vendors/WpmlController.php file.
- Replace this code:
1
if
(!isset(
$package
[
'contents'
])) {
return
$package
; }
- With this:
Snippet for Visual Composer: Can't save a translations
123456if
(!isset(
$package
[
'contents'
])) {
return
$package
;
}
if
((bool) preg_match(
'/'
.
'<!-- wp:'
.
'/'
,
base64_decode
(
$package
[
"contents"
][
"body"
][
"data"
] ))) {
return
$package
;
}