This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 4 replies, has 2 voices.

Last updated by Janatan Snippert 6 months, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
February 3, 2019 at 11:41 am #3155339

Janatan Snippert

I am trying to:
replace a string on my site using

<em><u>hidden link</u></em>

after replacing the string, my site broke. So, I checked what could of go wrong and I found out that there is a row at wp_options, (option_name = "wpml_translation_services"), which after search and replace its option_value lost the most of the string in it and became to

a:82:{i:0;O:15:"WPML_TP_Service":0:{}i:1;O:15:"WPML_TP_Service":0:{}i:2;O:15:"WPML_TP_Service":0:{}i:3;O:15:"WPML_TP_Service":0:{}i:4;O:15:"WPML_TP_Service":0:{}i:5;O:15:"WPML_TP_Service":0:{}i:6;O:15:"WPML_TP_Service":0:{}i:7;O:15:"WPML_TP_Service":0:{}i:8;O:15:"WPML_TP_Service":0:{}i:9;O:15:"WPML_TP_Service":0:{}i:10;O:15:"WPML_TP_Service":0:{}i:11;O:15:"WPML_TP_Service":0:{}i:12;O:15:"WPML_TP_Service":0:{}i:13;O:15:"WPML_TP_Service":0:{}i:14;O:15:"WPML_TP_Service":0:{}i:15;O:15:"WPML_TP_Service":0:{}i:16;O:15:"WPML_TP_Service":0:{}i:17;O:15:"WPML_TP_Service":0:{}i:18;O:15:"WPML_TP_Service":0:{}i:19;O:15:"WPML_TP_Service":0:{}i:20;O:15:"WPML_TP_Service":0:{}i:21;O:15:"WPML_TP_Service":0:{}i:22;O:15:"WPML_TP_Service":0:{}i:23;O:15:"WPML_TP_Service":0:{}i:24;O:15:"WPML_TP_Service":0:{}i:25;O:15:"WPML_TP_Service":0:{}i:26;O:15:"WPML_TP_Service":0:{}i:27;O:15:"WPML_TP_Service":0:{}i:28;O:15:"WPML_TP_Service":0:{}i:29;O:15:"WPML_TP_Service":0:{}i:30;O:15:"WPML_TP_Service":0:{}i:31;O:15:"WPML_TP_Service":0:{}i:32;O:15:"WPML_TP_Service":0:{}i:33;O:15:"WPML_TP_Service":0:{}i:34;O:15:"WPML_TP_Service":0:{}i:35;O:15:"WPML_TP_Service":0:{}i:36;O:15:"WPML_TP_Service":0:{}i:37;O:15:"WPML_TP_Service":0:{}i:38;O:15:"WPML_TP_Service":0:{}i:39;O:15:"WPML_TP_Service":0:{}i:40;O:15:"WPML_TP_Service":0:{}i:41;O:15:"WPML_TP_Service":0:{}i:42;O:15:"WPML_TP_Service":0:{}i:43;O:15:"WPML_TP_Service":0:{}i:44;O:15:"WPML_TP_Service":0:{}i:45;O:15:"WPML_TP_Service":0:{}i:46;O:15:"WPML_TP_Service":0:{}i:47;O:15:"WPML_TP_Service":0:{}i:48;O:15:"WPML_TP_Service":0:{}i:49;O:15:"WPML_TP_Service":0:{}i:50;O:15:"WPML_TP_Service":0:{}i:51;O:15:"WPML_TP_Service":0:{}i:52;O:15:"WPML_TP_Service":0:{}i:53;O:15:"WPML_TP_Service":0:{}i:54;O:15:"WPML_TP_Service":0:{}i:55;O:15:"WPML_TP_Service":0:{}i:56;O:15:"WPML_TP_Service":0:{}i:57;O:15:"WPML_TP_Service":0:{}i:58;O:15:"WPML_TP_Service":0:{}i:59;O:15:"WPML_TP_Service":0:{}i:60;O:15:"WPML_TP_Service":0:{}i:61;O:15:"WPML_TP_Service":0:{}i:62;O:15:"WPML_TP_Service":0:{}i:63;O:15:"WPML_TP_Service":0:{}i:64;O:15:"WPML_TP_Service":0:{}i:65;O:15:"WPML_TP_Service":0:{}i:66;O:15:"WPML_TP_Service":0:{}i:67;O:15:"WPML_TP_Service":0:{}i:68;O:15:"WPML_TP_Service":0:{}i:69;O:15:"WPML_TP_Service":0:{}i:70;O:15:"WPML_TP_Service":0:{}i:71;O:15:"WPML_TP_Service":0:{}i:72;O:15:"WPML_TP_Service":0:{}i:73;O:15:"WPML_TP_Service":0:{}i:74;O:15:"WPML_TP_Service":0:{}i:75;O:15:"WPML_TP_Service":0:{}i:76;O:15:"WPML_TP_Service":0:{}i:77;O:15:"WPML_TP_Service":0:{}i:78;O:15:"WPML_TP_Service":0:{}i:79;O:15:"WPML_TP_Service":0:{}i:80;O:15:"WPML_TP_Service":0:{}i:81;O:15:"WPML_TP_Service":0:{}}

what can I do to fix it

February 5, 2019 at 12:26 pm #3161823

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Are you able to restore the site to how it was before you've performed the string replacement? There is one thing related to choosing a plugin however - the plugin you have used has the following information in its GitHub repository:

Latest commit c8dfccb  on Nov 12, 2015

This means that is has been abandoned more than 3 years ago and is not developed any more, also meaning that it might cause issues with new WordPress plugins, including WPML. Therefore, is there a reason why you want to keep using it, since there are other plugins doing the same, but maintained regularly?

For example, this could be one of these: Better Search Replace which is also compatible with WPML.

Some other plugins could be some of the following as well:
https://wpml.org/documentation/plugins-compatibility/?wpv_view_count=119945&dev=0&wpv-plugin-functionality=0&wpv_post_search=search&wpv_filter_submit=Search

Can you try any of the above and let me know if the issue is still happening?

Regards,
Bruno Kos

February 5, 2019 at 12:53 pm #3161942

Janatan Snippert

Thanks for the answer,
main reason is : it is not a plugin and i can use it to search and replace WordPress database without WordPress admin interface, and it is fast. none of the mentioned plugins has such a functionality and some of them not related to the question! i will check the plugins and let you know if it works for me.

February 5, 2019 at 1:08 pm #3162058

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I completely understand your rationale for choosing a particular plugin. However, if the plugin is not compatible and not being developed for years, it may be harder to reach out developers and including them into discussion.

However, since you are looking for a backend way to replace strings, have you considered trying WP-CLI for this?
https://developer.wordpress.org/cli/commands/search-replace/
hidden link

I have not tested any of these methods however and can't give you any information on how these commands behave with WPML.

Regards,
Bruno Kos

February 12, 2019 at 12:28 pm #3188465

Janatan Snippert

thanks,
I will check wp-cli, but it is not exist on some shared hosting providers.
i hope i find time to fork that script on github and create a new version compatible with WPML.