Events Made Easy › Forums › Generic › An error occured while communicating to the server
- This topic has 5 replies, 2 voices, and was last updated 6 years, 7 months ago by Anonymous.
-
AuthorPosts
-
Sun 22 Apr 2018 at 10:21 #57908AnonymousInactive
Using WP-Language “formal German – Germany” with the EME-option “localize price” activated (currency is EUR), EME crashes when I try to edit existing bookings via the EME-admin-panel “Change Registration”. The crash shows a popup-window saying “An error occured while communicating to the server.” When I untick “localize price”, it works. Here’s the logfile, hope that helps to tackle the problem. Thank you!
PHP Fatal error: Uncaught IntlException: Constructor failed in …/wp-content/plugins/events-made-easy/eme_functions.php:761
Stack trace:
#0 …/wp-content/plugins/events-made-easy/eme_functions.php(761): NumberFormatter->__construct(‘de_DE_formal@cu…’, 2)
#1 …/wp-content/plugins/events-made-easy/eme_rsvp.php(3169): eme_localized_price(0, ‘EUR’)
#2 …/wp-includes/class-wp-hook.php(286): eme_ajax_bookings_list(”)
#3 …/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
#4 …/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#5 …/wp-admin/admin-ajax.php(97): do_action(‘wp_ajax_eme_boo…’)
#6 {main}
thrown in …/html/zunftprod/wp-content/plugins/events-made-easy/eme_functions.php on line 761Sun 22 Apr 2018 at 11:57 #57909FrankyKeymasterLike that options specifies, you need the class NumberFormatter in your php version. So I guess your php version is too old.
Sun 22 Apr 2018 at 12:25 #57912AnonymousInactiveHi Franky, thanks a lot for your quick reply!
I’m using PHP version 5.2. When I run the following PHP (copied from PHP.net), I don’t get an error message, but the expected result
$a = new \NumberFormatter(“it-IT”, \NumberFormatter::DECIMAL);
echo $a->format(12345.12345) . “<br>”; // outputs 12.345,12So I guess that NumberFormatter is active ?
Sun 22 Apr 2018 at 12:33 #57913AnonymousInactiveTo complete my previous post: I run the following script (copy from line 761 in eme_functions) and it outputs as expected:
$formatter = new NumberFormatter( “de_DE_formal” . “@currency=EUR”, NumberFormatter::CURRENCY );
echo $formatter->format(123456.1234); // outputs 123.456,12 €Sun 22 Apr 2018 at 14:44 #57914FrankyKeymasterPHP needs versioni 5.3 or newer for numberformatter to work, see:
http://php.net/manual/en/numberformatter.formatcurrency.phpAlso, I clearly state in the EME requirements (at wordpress plugin site) that I require at least php version 5.6. Older versions might work, but are not supported.
So, please do update your version (php 5.2 is already out of support for years btw).Sun 22 Apr 2018 at 15:01 #57915AnonymousInactiveYep, the outdated PHP-Version was the reason. You can close the ticket. And thanks a lot for your support and the great plugin!
-
AuthorPosts
- The forum ‘Generic’ is closed to new topics and replies.