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

Last updated by Pedro Henriques 1 year, 4 months ago.

Assigned support staff: Bruno.

Author Posts
May 14, 2018 at 11:41 am #2118019

Pedro Henriques

I am trying to: update translation

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

I expected to see: update page

Instead, I got: error.

From the debug log I get:
[11-May-2018 13:35:15 UTC] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 524288 bytes) in /home/cebsolut/public_html/wp-includes/class-wp-post.php on line 255

The notice doesn't seem to make sense as the memory size exhausted is greater then the suggested one. This is a old issue (https://wpml.org/forums/topic/error-on-save-and-close-translations-not-closing/), not solved yet).

May 14, 2018 at 11:44 pm #2128248

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us.

From the debug information I see that you have available 512Mb of memory on your server, but WordPress is configured to use 384Mb.

Also, be sure that you have configured both constants in the wp-config.php file: WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT. The constant WP_MAX_MEMORY_LIMIT is responsible for managing the memory in the backend: https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

If the problem persists, please as a test, could you disable all non-WPML plugins and see if the problem persists?

Thank you.

May 15, 2018 at 9:44 am #2134651

Pedro Henriques

Hello, Bruno

I didn't understood your explanation... I've set:

define( 'WP_MEMORY_LIMIT', '384M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

From https://codex.wordpress.org/Editing_wp-nfig.php#Increasing_memory_allocated_to_PHP I understand that WP_MAX_MEMORY_LIMIT sets the memory available for administration tasks, which is the case. For frontend use the memory available would be set by WP_MEMORY_LIMIT, correct?

So, where do I have to set that additional memory to get it working?

Also, the debug message doesn't seem coherent: it says that "Allowed memory size of 536870912 bytes exhausted" which is more than what suggests to allocate "(tried to allocate 524288 bytes)"?!

I appreciate your comments.

Thanks

May 15, 2018 at 10:00 am #2135244

Pedro Henriques

Just deactivate Query Monitor and the process finished without error. Would it be just a lack of memory?

Still:

1. I appreciate your comments on my previous e-mail.
2. The debug log is full of entries "[15-May-2018 09:54:58 UTC] PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/cebsolut/public_html/wp-content/plugins/wpml-string-translation/classes/page-builders/strategy/shortcode/class-wpml-pb-update-shortcodes-in-content.php on line 143". Fix?

Thanks

May 15, 2018 at 5:31 pm #2145603

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

Thank you for the explanation. In my previous comment, I just asked if you had already added the constant WP_MAX_MEMORY_LIMIT (from the debug info I can not see this option). From your recent message, you answered yes. That is, your configuration is correct.

About the PHP error message, this looks like PHP was trying to allocate 524288 bytes (~520Kb) after the memory had run out. So the error message happened. That is, PHP used up all available memory and then tried to allocate more, causing the Fatal Error.

About the Query Monitor, yes, this usually uses a lot of resources to be able to debug the system. This plugin should only be enabled to debug the site. In a production environment, this should be disabled.

On your most recent message, the PHP warning message seems that some of the modules you are using in your page builder are trying to add a dataset (array) within an option that should have only one (string). To find out exactly which module might be causing this, you will need to check the modules of the page individually.

This seems to be the same problem you reported here: https://wpml.org/forums/topic/links-targets-not-updating/page/4/#post-1476918. This is happening on which page? What steps do you take to get this warning displayed?

Thank you.

May 23, 2018 at 10:28 am #2214432

Pedro Henriques

Hi, Bruno

Sorry for the late reply.

I disabled Query Monitor and I can finish now the translation updates.

Still some messages in debug.log about WPML that I share here: https://pastebin.com/MaERL8ZM

Should I concern about it?

Thanks

May 23, 2018 at 10:43 pm #2218852

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi

This should apparently not cause problems, however, I'd like to check to confirm.

Have you noticed at what point these alert messages are displayed? For example, what happens when you create/edit a page/post?

I'll need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.

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.

Note:

*** Please let me know exactly what steps should I follow to see the problem.

*** Please, can I install the Duplicator or All in One Migration plugin to make a copy of your site and install it on my test environment? This will help me debug the problem.

*** Note: Please make a full backup of your site.

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thank you.

May 25, 2018 at 1:38 am #2226442

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. By accessing the link that you posted in your first post, I can not replicate the problem in my testing environment.

I access the page (/products/bee2firedetection/) and click to edit the translation. Then I click on the "Save & Close" button and no warning message is displayed. I need to know what steps you are following for these warnings to be displayed so that I can test.

I need to know what steps you are following for these warnings to be displayed. This will help me see and understand what may be happening.

Thank you.

May 25, 2018 at 11:33 am #2228784

Pedro Henriques

Bruno,

The fatal error has gone when I deactivate Query Monitor. Like I said I can now complete the translation update.

I thought you were just checking the messages in https://pastebin.com/MaERL8ZM. They there is nothing to be concern then this ticket is done. Let me know it is the case.

Thanks

May 26, 2018 at 1:44 am #2232029

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

I am wanting to replicate the problem with the warnings. When I access both links that you posted, both in the first post and in your private message, no warning is displayed in the log file.

So I was asking you what steps you take to get these warnings to appear. Basically, I've enabled the logs in my test environment and browsing your site, no warning messages are being displayed.

About if this can cause problems on your site, I do not think these warnings can create problems. This may be showing only by following a specific step or on some specific page, but I'm not sure where.

If you do not notice any issues while browsing your site (both back-end and front-end), then your site is working properly.

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

May 28, 2018 at 2:25 pm #2239457

Pedro Henriques

Hello, Bruno

Right now it's working without problems for that matter. Hope it stays this way.

Thanks