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 thread is resolved. Here is a description of the problem and solution.

Problem:
When I try to edit an existing Cornerstone page (which is used as an 404 page) I receive the following error:

2019/07/12 12:35:54 [error] 1999#1999: *247464 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to WPML_Cornerstone_Register_Strings::register_strings_for_modules() must be of the type array, null given, called in /var/www/vibegroup.nl/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/compatibility/class-wpml-page-builders-register-strings.php on line 53 and defined in /var/www/vibegroup.nl/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders-cornerstone/src/class-wpml-cornerstone-register-strings.php:9

Solution:
This didn't happen for newly created pages. The solution was

#1 Open affected page, save Cornerstone Template
#2 Deleted the page
#3 Created a new page with the same name
#3 Load Template

Tagged: 

This topic contains 13 replies, has 2 voices.

Last updated by davidv-34 2 months, 3 weeks ago.

Assigned support staff: Marcel.

Author Posts
July 12, 2019 at 10:53 am

davidv-34

Please be aware this is a LIVE website! Please do not make any changes without consulting with me first!!

I am trying to:

save a page I edited with cornerstone (the page says 404 not found; which is exactly the page I am trying to edit, so this is not an error)

Link to a page where the issue can be seen:

hidden link

I expected to see:

Saved!

Instead, I got:

Error saving page; in my log files I see the following:

2019/07/12 12:35:54 [error] 1999#1999: *247464 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to WPML_Cornerstone_Register_Strings::register_strings_for_modules() must be of the type array, null given, called in /var/www/vibegroup.nl/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/compatibility/class-wpml-page-builders-register-strings.php on line 53 and defined in /var/www/vibegroup.nl/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders-cornerstone/src/class-wpml-cornerstone-register-strings.php:9
Stack trace:
#0 /var/www/vibegroup.nl/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/compatibility/class-wpml-page-builders-register-strings.php(53): WPML_Cornerstone_Register_Strings->register_strings_for_modules(NULL, Array)
#1 /var/www/vibegroup.nl/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-page-builder-integration.php(61): WPML_Page_Builders_Register_Strings->register_strings(Object(WP_Post), Array)
#2 /var/w" while reading response header from upstream, client: 217.100.88.234, server: vibegroup.nl, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "hidden link:", host: "vibegroup.nl", referrer: "hidden link"

July 12, 2019 at 3:17 pm #4200083

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi David,

Thank you for contacting WPML Support.

Which is the name from the affected page? Please check if you have the identical name also in your basket. If yes this would cause the 404. Cleaning the basked would solve the problem.

Please let me know

Best Marcel

July 12, 2019 at 3:57 pm #4200323

davidv-34

Hi Marcel,

I don't know which basket you are referring to? Also, it's not a 404 error, it is the 404 page which I am trying to edit (it is a page like any other in wp-admin).

Regards,
Rinck

July 16, 2019 at 7:52 am #4217255

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi David,

Thanks for the info. Sorry, I expected the 404 as the issue.

I was able to reproduce the error. Please update your WPML plugins here:
hidden link

Your X Theme is newer than the installed WPML versions, so this is causing errors as you can see in the JS console. Please let me know once this is done.

Best Marcel

July 16, 2019 at 8:07 am #4217429

davidv-34

Hi Marcel,

thanks for pointing that out; I've now updated the plugins, but unfortunately that does not solve the issue yet. Any other suggestions?

Thanks,
David

July 16, 2019 at 9:18 am
July 16, 2019 at 9:50 am #4218427

davidv-34

Hi Marcel,

the migration is complete!

Regards,
David

July 18, 2019 at 10:51 am #4237701

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi David,

I was able to reproduce the issue on a minimal environment only with the Cornerstone plugin and WPML+Extension (without X Theme/ Child Theme).

Could you please install the Cornerstone plugin here on this isolated Sandbox environment and try to reproduce the issue?

hidden link

Please let me know if you can reproduce the issue.

Best Marcel

July 18, 2019 at 10:56 am #4237831

davidv-34

Hi Marcel,

I can't, at least not without installing X altogether since X theme bundles Cornerstone. Which means I don't have a valid license for just the Cornerstone plugin. Also, I'm not quite sure what it is you're trying to test? If you can reproduce the issue, then why do I need to reproduce it again, since the copied version of the website already has the same reproducible issue?

I could make another (fresh) copy using the info you provided earlier, does that help?

Regards,
Rinck

July 18, 2019 at 11:13 am #4237941

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi David,

good question, please let me explain 🙂

- Cloudways Environment = Your duplicated settings like PHP version, WordPress version, php.ini, .htaccess, wp-config, .. ..
- Sandbox = Our isolated testing environment with neutral, straightforward settings.

This means we still don't know if every installation is affected or only your server. If this also happens on an isolated Sandbox then we now sure all installations are affected. So I will provide our Compatibly Team with a site copy from this Sandbox and they will contact Themco, the Theme/Plugin Autor.

You can please install it from the bundled Theme, then we can deactivate this later and continue testing only with Cornerstone. The Theme is secondary as the issues coming from the cornerstone JS files.

Best Marcel

July 18, 2019 at 11:31 am #4238041

davidv-34

Hi Marcel,

thanks for the info; I've just uploaded a copy of X and activated Cornerstone. The license for this test site is currently invalid, but if needed I could activate it since I have a license left atm.

Regardless, I see I didn't mention this explicitly in my initial post, but the error doesn't occur with all pages which I try to edit with cornerstone. Could it be related to the fact that this particular page (the 404 page) has not been translated and was created before WPML was ever installed and activated? It is probably the oldest page on our website.

Regards,
Rinck

July 18, 2019 at 1:36 pm #4239147

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi Rinck,

of course, it could be that Cornerstone is handling this older page different. Can you please try to create a new 404 site?

Best Marcel

July 18, 2019 at 8:00 pm #4242129

davidv-34

Hi Marcel,

I tried duplicating the 404 page and saving the copy, which results in the same error. When I create an entirely new page, saving works just fine.

I also tried editing other pages which were created around the same time as the 404 page, and they also save just fine, so it seems it something with this page specifically. Any other suggestions?

July 19, 2019 at 7:23 am #4244497

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi David,

I did now the following on the Cloudways copy:

#1 Opened affected page, save Cornerstone Template
#2 Deleted the page
#3 Created a new page with the same name
#3 Load Template

Please let me know if it was working for you.

Best Marcel

July 22, 2019 at 7:00 am #4254219

davidv-34

Thanks, that solved the issue! I was able to create a new page, load the template and make changes and save them! 🙂