Events Made Easy Forums Bug fixed or feature request implemented Custom fields MySQL 8 incompatibility

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #61631
    Anonymous
    Inactive

    I’ve been fighting with EME over the last couple of days to try and get custom fields working. As far as I know I am on the latest version of the software (WP 5.5.1, EME 2.1.91). I am using MySQL 8 (Azure MySQL DB)

    I installed EME a few months ago and it installed fine. It looks like it created the answers table and named the grouping column “groupings”. However, the current code looks for a “grouping” column. I can’t rename the column to “grouping” as “GROUPING()” is a function supported by MySQL as of version 8.0.1. So custom fields don’t work fully as the answer cannot be saved.

    MySQL 8.0 GROUPING() function: https://mysqlserverteam.com/mysql-8-0-grouping-function/

    Just in case, I removed the plugin completely and tried to reinstall it (several times, and verified that the tables had been removed from the database). Unfortunately, the installer cannot create the answers table anymore because of this keyword conflict.

    Installer error (from /var/log/apache2/error.log):
    [17-Sep-2020 11:03:51 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘grouping int(11) DEFAULT 0,
    occurence int(11) DEFAULT 0,
    creat’ at line 8 for query CREATE TABLE edvr1_eme_answers (
    answer_id int(11) NOT NULL auto_increment,
    booking_id mediumint(9) DEFAULT 0,
    person_id mediumint(9) DEFAULT 0,
    member_id mediumint(9) DEFAULT 0,
    field_id int(11) DEFAULT 0,
    answer text NOT NULL,
    grouping int(11) DEFAULT 0,
    occurence int(11) DEFAULT 0,
    creation_date datetime DEFAULT CURRENT_TIMESTAMP,
    modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    UNIQUE KEY (answer_id),
    KEY (booking_id),
    KEY (person_id),
    KEY (member_id)
    ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by activate_plugin, do_action(‘activate_events-made-easy/events-manager.php’), WP_Hook->do_action, WP_Hook->apply_filters, eme_install, _eme_install, eme_create_tables, eme_create_answers_table, maybe_create_table

    Errors in /var/log/apache2/error.log prior to reinstalling the plugin (when the table column was called “groupings” but the code looked for “grouping”):
    [17-Sep-2020 08:21:52 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
    e right syntax to use near ‘grouping,occurence) VALUES (28,6,’2′,0,0)’ at line 1 for query INSERT INTO edvr1_eme_answers (booking_id,field_id,answer,grouping,o
    ccurence) VALUES (28,6,’2′,0,0) made by do_action(‘wp_ajax_eme_add_bookings’), WP_Hook->do_action, WP_Hook->apply_filters, eme_add_bookings_ajax, eme_book_seat
    s, eme_multibook_seats, eme_record_booking, eme_booking_answers
    [17-Sep-2020 08:21:52 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
    e right syntax to use near ‘=0’ at line 1 for query SELECT * FROM edvr1_eme_answers WHERE booking_id=28 AND grouping=0 made by do_action(‘wp_ajax_eme_add_booki
    ngs’), WP_Hook->do_action, WP_Hook->apply_filters, eme_add_bookings_ajax, eme_book_seats, eme_multibook_seats, eme_replace_booking_placeholders, eme_get_nodynd
    ata_booking_answers
    [17-Sep-2020 08:21:52 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
    e right syntax to use near ‘=0’ at line 1 for query SELECT * FROM edvr1_eme_answers WHERE booking_id=28 AND grouping=0 made by do_action(‘wp_ajax_eme_add_booki
    ngs’), WP_Hook->do_action, WP_Hook->apply_filters, eme_add_bookings_ajax, eme_book_seats, eme_multibook_seats, eme_email_booking_action, eme_replace_booking_pl
    aceholders, eme_get_nodyndata_booking_answers
    [17-Sep-2020 08:21:52 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
    e right syntax to use near ‘=0’ at line 1 for query SELECT * FROM edvr1_eme_answers WHERE booking_id=28 AND grouping=0 made by do_action(‘wp_ajax_eme_add_booki
    ngs’), WP_Hook->do_action, WP_Hook->apply_filters, eme_add_bookings_ajax, eme_book_seats, eme_multibook_seats, eme_email_booking_action, eme_replace_booking_pl
    aceholders, eme_get_nodyndata_booking_answers
    [17-Sep-2020 08:21:52 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
    e right syntax to use near ‘=0’ at line 1 for query SELECT * FROM edvr1_eme_answers WHERE booking_id=28 AND grouping=0 made by do_action(‘wp_ajax_eme_add_booki
    ngs’), WP_Hook->do_action, WP_Hook->apply_filters, eme_add_bookings_ajax, eme_book_seats, eme_multibook_seats, eme_email_booking_action, eme_replace_booking_pl
    aceholders, eme_get_nodyndata_booking_answers
    [17-Sep-2020 08:21:52 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
    e right syntax to use near ‘=0’ at line 1 for query SELECT * FROM edvr1_eme_answers WHERE booking_id=28 AND grouping=0 made by do_action(‘wp_ajax_eme_add_booki
    ngs’), WP_Hook->do_action, WP_Hook->apply_filters, eme_add_bookings_ajax, eme_book_seats, eme_multibook_seats, eme_email_booking_action, eme_replace_booking_pl
    aceholders, eme_get_nodyndata_booking_answers

    #61632
    Anonymous
    Inactive

    Super fast support via email from Franky. All solved and working. Thanks for an awesome plugin and great support.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top