Events Made Easy Forums Generic An error occured while communicating to the server

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #57908
    Anonymous
    Inactive

    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 761

    #57909
    Franky
    Keymaster

    Like that options specifies, you need the class NumberFormatter in your php version. So I guess your php version is too old.

    #57912
    Anonymous
    Inactive

    Hi 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,12

    So I guess that NumberFormatter is active ?

    #57913
    Anonymous
    Inactive

    To 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 €

    #57914
    Franky
    Keymaster

    PHP needs versioni 5.3 or newer for numberformatter to work, see:
    http://php.net/manual/en/numberformatter.formatcurrency.php

    Also, 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).

    #57915
    Anonymous
    Inactive

    Yep, the outdated PHP-Version was the reason. You can close the ticket. And thanks a lot for your support and the great plugin!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Generic’ is closed to new topics and replies.
Scroll to Top