gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Gutenberg returns error 500 on save/update

Open Armadur opened this issue 8 years ago • 5 comments

Gutenberg plugin throws error 500 on save of certain pages. I also use WPML translation plugin, and both got stuck on SAVE/UPDATE I have two languages, german and english, translation of same page on german works but on english it fails

To Reproduce Steps to reproduce the behavior:

  1. Go to 'pages' > somePage
  2. Click on 'Save'
  3. See error "Update failed"

Expected behavior I except to save it with no problems, just like other pages,

Screenshots image image image

In my error_log on server i got this error when i try to save

[12-Sep-2018 09:46:18 UTC] PHP Fatal error:  Uncaught Exception: Invalid page template. in /usr/www/users/foodno/v32/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-duplication.class.php:99
Stack trace:
#0 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(4219): WPML_Post_Duplication->make_duplicate(5950, 'he')
#1 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-synchronization.class.php(84): SitePress->make_duplicate(5950, 'he')
#2 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(248): WPML_Post_Synchronization->sync_with_duplicates(5950)
#3 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-admin-post-actions.class.php(113): WPML_Post_Translation->after_save_post('535', Array, 'en', NULL)
#4 /usr/www/users/myDomain/wp-includes/class-wp-hook.php(288): WPML_Admin_Post_Actions->save_post_actions('5950', Objec in /usr/www/users/foodno/v32/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-duplication.class.php on line 99

Additional context

  • Version of Gutenberg is 3.7.0, problems occured before and i updated in hope it will be fixed

Armadur avatar Sep 12 '18 10:09 Armadur

If you disable the translation plugin does saving work as expected? My understanding is many translation plugins create multiple page IDs that are "linked" but Gutenberg is not aware of this as it's arguably a clever hack 😄

I don't think this is an issue with Gutenberg itself, but with the translation plugin. You should file an issue with sitepress-multilingual-cms. The errors I see are not to do with Gutenberg's code.

tofumatt avatar Sep 12 '18 11:09 tofumatt

Yes, it works when i turn WPML off, but i can't do that because page is multi-language

Armadur avatar Sep 12 '18 11:09 Armadur

Understood, in that case you will need to contact WPML and let them know about the bug, as they'll need to work to be compatible with Gutenberg on their end. For now you may want to use the Classic Editor plugin instead of Gutenberg, sorry about that.

tofumatt avatar Sep 12 '18 11:09 tofumatt

@Armadur What version of WPML are you using? We're currently working on Gutenberg compatibility for our next release.

brucepearson avatar Sep 13 '18 10:09 brucepearson

We are using

  • WPML Multilingual CMS v4.0.5
  • WPML String Translation v2.8.6

I hope it will be solved soon, currently you must delete page and then create it again so it can work... Thanks for reply

Armadur avatar Sep 14 '18 07:09 Armadur