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 11 replies, has 2 voices.

Last updated by Bobby 1 year ago.

Assigned support staff: Bobby.

Author Posts
September 29, 2018 at 9:53 pm

Sergio

I am trying to update a post.

Link to a page where the issue can be seen:hidden link

I expected to click update and have the page updated.

Instead, I got:This page isn’t working
hidden link is currently unable to handle this request.
HTTP ERROR 500

Doesn't matter what I change, even if I don't change anything and try update I get the same error.

In the server I get:

2018/09/29 17:42:28 [error] 7777#0: *42676 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /var/www/masaztantrycznywarszawa.pl/masaztantrycznywarszawa.pl/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:76
Stack trace:
#0 /var/www/masaztantrycznywarszawa.pl/masaztantrycznywarszawa.pl/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-image-translate.php(41): WPML_Translation_Element->get_translation('')
#1 /var/www/masaztantrycznywarszawa.pl/masaztantrycznywarszawa.pl/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-translated-images-update.php(54): WPML_Media_Image_Translate->get_translated_image(1033, '', 'thumbnail')
#2 /var/www/masaztantrycznywarszawa.pl/masaztantrycznywarszawa.pl/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php(125): WPML_Media_Translated_Images_Update->replace_images_wi" while reading response header from upstream, client: 89.65.64.196, server: <em><u>hidden link</u></em>, request: "POST /wp-admin/post.php HTTP/1.1", upstream: "<em><u>hidden link</u></em>:", host: "www.masaztantrycznywarszawa.pl", referrer: "<em><u>hidden link</u></em>"
October 1, 2018 at 4:57 pm #2778889

Bobby
Supporter

Languages: English (English )

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

Hello,

If possible please try the following steps and let me know your results

1. verify that you don't have any menus that are empty and any [widgets that are empty (meaning no title for the widgets)]

2. Please go to WPML => Support , and click on "Troubleshooting" while in the Troubleshooting page please perform the actions. (specifically "set language information" but i recommend performing all of them"

are you able to update the products now ?

3. Additionally i can see that your WP Memory Limit is set to 40M , if possible please increase the WP Memory Limit to 256M or higher.

note : before making any debugging steps do make sure to take a site and database backup first.

October 9, 2018 at 7:25 am #2798547

Sergio

1) There were 2 empty menus for each language. I deleted them.
2) I clicked set language information - a message saying that it's ready appeared.

Still the same problem - error 500.

3) Where do you see memory 40M?
In WPML -> Support I see:

 Info
PHP
Version	7.0.31
Memory limit	256M
Memory usage	27.28 MB
Max execution time	300
Max input vars	1500
Utf8mb4 charset	Yes
Multibyte String extension	Loaded
SimpleXML extension	Loaded
WordPress
Version	4.9.8
Multisite	No
Memory limit	128M
Max memory limit	256M
October 9, 2018 at 6:23 pm #2801527

Bobby
Supporter

Languages: English (English )

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

Hello,

thank you for providing me with this information !

i was able to see the memory limit from the debug information that was provided to us

additionally if i go to your site's WPML->Support-> i can see the 40M set there as well.

if possible please update it to a higher one (256M or higher)

this is the only page i was able to replicate the issue and it might be due to the Memory Limit since that page has some media included within it.

October 9, 2018 at 6:31 pm #2801570

Sergio

Oh, I see. I was watching at another blog.
Now I increased the memory limit to 256MB. still the same problem 🙁

October 10, 2018 at 7:24 pm #2805516

Bobby
Supporter

Languages: English (English )

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

Hello,

i am able to go to Pages->Cennik-> Update and it works as expected.

the error 500 was only happening within the Classic WP editor and it was due to the way the images were added to the page.

i removed the embedded images and re added them

before

<img class="alignnone size-thumbnail wp-image-1033" src="hidden link" alt="" width="150" height="150" />

after

<img src="hidden link" alt="null" width="150" height="150" />

after changing this , i was able to save the page as expected.

October 10, 2018 at 8:02 pm #2805691

Sergio

Hi, something got broken during the repair.
The kashmiri massage block is broken.
Also, there is an empty text box with "lorem ipsum".
Also the flags in the menu disappeared and it's not possible anymore to change the language

October 10, 2018 at 9:01 pm #2805835

Bobby
Supporter

Languages: English (English )

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

Hello,

Are you referring to something being broken within the "Cennik" page ?

no other page was changed or tested, the only changes that were done were in the "Cennik" page and that was the change shown above related only in the image.

if you are referring to the translation of "cennik" the page needed to be updated due to updating the default language.

regarding the language switcher , i can see that one is not set within WPML->Languages->Menu language switcher.

please go to WPML->languages and add one to your menu and you should be able to see it.

let me know your results

October 10, 2018 at 9:11 pm #2805856

Sergio

I think it got broken while you were repairing the 500 error.
Yes, I am referring to "Cennik". Its translation is "prices" here: hidden link

As you can see there is a field in the botton which has "Tantric massages for couples".
The Polish page should have (it had) at the bottom "Rytuał Masażu Kaszmirskiego". But it's now broken. The picture is not showing up and the prices too.

The screenshot you sent is the English site. However my original request (first post here) was about the Polish domain.

See the image attached which shows these two new issues.

The language switcher was there yesterday. But it seems it disappeared.

I think this is a bug in WPML, because very often it disappears also from the other site hidden link where, the language switcher is always there, I do something like translatin strings, updating pages or similar, and the language switcher disappears and I have to turn it on manually back and forth in WPML->Languages->Menu language switcher. Very annoying. But it's hard to reproduce it. It happens "randomly" - whatever randomly means in IT.

October 10, 2018 at 11:58 pm #2805990

Bobby
Supporter

Languages: English (English )

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

The issue was that the Polish page "Cenik" was getting error 500 everytime it was updated and only in the Classic WordPress editor.

my steps were to access the page, and figure out why this is happening.

the reason was due to the way the images were added with the following code.

<img class="alignnone size-thumbnail wp-image-1033" src="hidden link" alt="" width="150" height="150" />

once i fixed that i was able to "update" the Polish page.

while i was working on this page there was not a 4th option as shown in the English translation

most likely the issue happened during the update process unfortunately.

The original issue has now been resolved

now i have added the language switcher to your menu as i described above and it works as expected.

also you are seeing the lorem ipsum because it exists within the page.

this has been removed also through here hidden link

and now the page should look as expected.

i am not sure if you wanted this option to be at the top or the bottom.

please verify with me that the original issue has been resolved and additionally the page is looking as expected.

note: make sure to clear your cache.

note2 : if the issue with the language switcher happens again please open a new thread and we will be able to take a closer look, but do note that this behavior can happen if the menu is ever changed as it is assigned to the main menu.

October 11, 2018 at 5:30 am #2806675

Sergio

Thank you. The page cennik seems to be good now.
But the menu switcher has something wrong.

The homepage has the menu that with the cursor on the flag, the next flag appears.
And the subpages, for example "o nas" has the normal languages list.

I tried to change it manually, but for some reason the homepage still keeps showing the wrong menu type dropdown.

I want it to have a list of languages everywhere with these options:
-flag
-native language name

It's strange, that this is actually what is set up in the options, but it applies only to subpages, not the homepages :/

October 11, 2018 at 6:02 pm #2809397

Bobby
Supporter

Languages: English (English )

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

Hello,

when i visit your homepage now it looks like these changes have taken effect, this might have been due to cache

if possible test in incognito window and also clean your browsers cache and let me know your results