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.

Our next available supporter will start replying to tickets in about 0.16 hours from now. Thank you for your understanding.

Author Posts
May 31, 2019 at 9:42 pm #3933493

kevinL-40

My site have total 21 languages. I add all 21 translation for my about page. then I edited and when try to update that page not updated and showing an error "Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case."
translation save well but original page not saved when it have more than 8 translation.
I also tried with twentynineteen theme and no result. also try to disable all plugins and Identify the plugins "Easyship" for causing Connection lost. if I disable this plugins. not display the connection lost but work slowly.

I enable wp debug and try again their have not any error to record on wp debug log. only some php notice https://pastebin.com/KRqsztN0
also install Debug Object Plugins and the query result here: https://pastebin.com/FaV4euAu

Is there a similar example that we can see?
you can see it wp-admin/post.php?post=6&action=edit&lang=en
What is the link to your site?
store.hiyh.info/home

May 31, 2019 at 11:00 pm #3933571

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

to verify , you said that when you disable "Easyship" plugin by Easyship the issue of the Database connection is resolved , correct ?

Easyship plugin is currently not listed as a compatible plugin with WPML

https://wpml.org/documentation/plugins-compatibility/

I did however add it to my testing sandbox enviroment to test and i was able to duplicate a page without any errors. Then i also added around 23 languages to further test it and even though things became a bit slower the execution still happened without any errors.

I do see that your site has adequate memory available , but i wonder what are your results if you increase your Time Limit to higher than 300 ?

Is this issue happening to all pages ? I wonder what are your results if you just created a page right now with minimal content int it, maybe just a string saying "test" and then duplicate it to all the languages, do you get the same issue.

Additionally i would suggest contacting your host provider as well to take a look from their side

The following errors from your error log all point to Woocommerce and your theme and are not related to WPML. Also the last one shows an access denied error.

[31-May-2019 18:01:16 UTC] PHP Notice: woocommerce_get_page_id is deprecated since version 3.0! Use wc_get_page_id instead. in /home/hiyhvnyx/public_html/addon-domain/store/wp-includes/functions.php on line 4435

[31-May-2019 19:37:49 UTC] PHP Notice: Trying to get property of non-object in /home/hiyhvnyx/public_html/addon-domain/store/wp-content/themes/hiyh-store/inc/custom-header-images.php on line 464

[31-May-2019 19:48:35 UTC] PHP Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'hiyhvnyx_hiyhstore'@'localhost' (using password: NO) in /home/hiyhvnyx/public_html/addon-domain/store/wp-includes/wp-db.php on line 1612

May 31, 2019 at 11:31 pm #3933645

kevinL-40

if I translate fewer languages with minimal content (some word) with easyship plugins then it's ok. but when add more content with all language (some time more than 5) then show "Connection Lost Error" error.

My old site already translated with a plugins by BWS and work well and easy to use. But I need wpml for my newly setup woocommerce with easyship and my old content.

Current Memory limit 640M & Max execution time 300. I test with max execution time 600 and get same result.

my site host on name cheap and I contact them and discuss more than one hour. Although it is not their problem, they have tried to solved it. but result nothing.

I think the php notice is not the cause for this. because also I try with twentynineteen theme.

you know why "Access denied" last Error?
The "Debug Object" log says-
Database Errors
No database errors.
Page generated in 563.9ms ( 0.564s )
Total: 338 queries

I think Total: 338 queries is the cause for "Access denied" eror.

May 31, 2019 at 11:34 pm #3933647

kevinL-40

Also I tried on different host (amazon lightsail) but result same.

June 3, 2019 at 7:42 pm #3945591

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

As i was not able to replicate this on my environment we can migrate your site to one of our test servers and further investigate this issue

To do this if possible i would like to take a closer look at your backend in order to migrate the site to our servers

**Before we proceed I recommend to please take FULL BACKUP of your database and your website.**
I often use the Duplicator plugin for this purpose See: http://wordpress.org/plugins/duplicator/

I would like to request temporary access (wp-admin and FTP) to your site

You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you will enter is private which means only you and I can see and have access to it.

Thank you,
Bobby

June 20, 2019 at 12:52 pm #4060063

kevinL-40

Sorry my site size more than 8GB and have 252 posts and 59 pages with 6500+ existing media. This translation process work very slowly. and media duplication process is very bad. media duplication work one by one and it take long time. after passing 3 hours only 400(±50) media translated. the current issue (Connection Lost Error) solved for all post/pages but issue only have one page. when translate and click to save and close it take more than 30 second some time it more than one minute. so maybe need to db query optimization.

Can you tel me how to duplicate all 6000+ media for all 20 language with easy way. can you set any code when media have no translation then display default item? if you can set it then it good for all. because when you duplicate data store on db the db size increased (supposed I have 6000 existing media and 21 languages. when I duplicate it it will be 6000*21=126000). so need optimization your plugins.

June 21, 2019 at 5:37 am #4064743

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

My recommendation would be to try and run some tests on our staging servers on Cloudways which could allow us to test the issue on a different server.

What are your results when you go to WPML->Settings ->Set media languages?

the media should not require duplication as they should be able to display in all languages without it.

if that doesnt happen you could try switching WPML->Settings->Post Types Translation->Media to Translatable - use translation if available or fallback to default language

but do note that this option has its issues as its not meant to be used this way , you can't change the default WPML language or it stops working but could be a viable workaround.

please do let me know if you would like to proceed with testing on our cloudways server to exclude server related issues

June 29, 2019 at 12:09 pm #4111521

kevinL-40

post type media was set (Translatable - only show translated items). and after setting (Set language information for existing media) it not work. after duplicate it work. it wast my 6 hours. Now I know how to display media without duplicating from your last reply. now I want to delete all duplicate media. but if I delete it from library page it slow process. Can you give me a sql query for deleting all duplicate(WPML) media? also I want translation tab (if possible. maybe it a great thing. image attached) like translation By BWS on post/page editor. that means translate post/page without load another page and it save our time. so your plugins user can translate fast and will be happy for this option.

June 30, 2019 at 6:16 am #4113437
kevinL-40

Also have another issue. I have a page that contain different short code for different category from post for different language. all post no need translation but content not showing without duplication. I set the "Post Types Translation" to "Translatable - use translation if available or fallback to default language". if not translate the page shortcode content showing on all language with default. but when translate page for showing different category from post with shortcode then not display content on other language. how can I display different category from post on a specific page.

More explain:
suppose I have some category "english content, chines content, german content" etc on post.
I want to display them on a static page name "Article".
Article page have 21 translation. all contain different short code for display content from posts.
example: for German page I want to display category "german content", for Chines display category "chines content".
how it possible without duplication.

July 2, 2019 at 5:11 pm #4129097

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

For removing your duplicated media

Since the WPML tables are still there, you can follow this process:
* Go to Media > Library
* In the WordPress admin bar, use the language selector to choose the language you want to remove.
** The media listed will be for that language.
* Select all the media, and from Bulk Actions select Delete permanently. This will delete only the media for the selected language.

Alternative Options:

Regarding an SQL script you can try the following but please do note that the advice given in the thread is from a few years back and with any custom script it is recommended to take a full backup of the database and site or test in a development environment.

=> https://wpml.org/forums/topic/how-to-delete-in-one-go-all-photos-duplicates-in-various-languages/page/2/#post-306028

There is also another way provided by another user (again do make sure you create a backup if you decide to try this )

=> https://wpml.org/forums/topic/deactiving-the-wpml-media-translation-plugin-created-many-duplicates/#post-878730

Regarding the translation tab as this is not a feature that WPML offers as you can find our options for translation under the languages tab on the right side of the page

i suggest to add this as a feature request which our developers get to review directly

-> https://wpml.org/suggest-a-new-feature-for-wpml/

Also i do see that you are experiencing another issue as described above, as we try to keep each thread to one issue i will be separating that issue to a new ticket.

The topic ‘[Closed] need solution for WordPress Connection Lost Error When page/post updating’ is closed to new replies.