GlotPress / gp-translation-helpers

GlotPress plugin to add features like discussions
https://glotpress.blog
4 stars 4 forks source link

php 8.1.2 error in translate #32

Closed fuddinid closed 2 years ago

fuddinid commented 2 years ago

I'm using php 8.1.2 on latest xampp and installed wordpress, glotpress plugin and GlotPress Helper plugin. but when I entered the translation there was an error.

Error: {"code":"internal_server_error","message":" There is a serious error on your website.<\/p>

[Learn more about troubleshooting in WordPress.<\/a><\/p>","data":{"status":500},"additional_errors":[]}](http://localhost/% 22https:////wordpress.org//support//article//faq-troubleshooting///%22)

akirk commented 2 years ago

Thanks for reporting. We'll take a look! Did you maybe receive an e-mail with a more detailed error message?

amieiro commented 2 years ago

I am trying to reproduce the errors with a clean installation (macOS, Laravel Valet, nginx/1.21.4, PHP 8.1.2, MySQL 8.0.27, WordPress 5.9.1, last GlotPress commit in the develop branch, gp-translation-helpers disabled).

I have enabled the errors in the wp-config.php file:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );

When I try to set up my local environment with some projects in GlotPress, I get some deprecating warnings:

image

When I try to upload a .po file to a project, the upload shows a lot of errors, but the translation file is imported.

image

Then I create a translation set with a locale and a user with validation permissions and I can start translating.

The next screenshots were taken with the debug info disabled and the gp-translation-helpers plugin enabled.

If I click in a string from the WooCommerce translation, I can access to the discussion link:

image

In this new page, I can create a new discussion:

image

image

We get some deprecated warning both in GlotPress and in this plugin, but you can test it with PHP 8.1.2. I think your errors are related to something particular to your installation, so it would be helpful if you can provide more information, including error messages.

amieiro commented 2 years ago

We don't get any new information about this, and the plugin is working with PHP 8.1, so I am going to close this issue.