Support » Plugin: Events Made Easy » So far so good (once I created the tables)

  • I’m giving this 4 stars because in my search for an events plugin this seemed the best for my needs, and so far in my testing I think it will be. One important thing to note (and at least one person with a 1-star rating mentioned this), is that the bool datatype isn’t supported in older mysql versions (I’m not sure why mine isn’t the latest because I installed Xampp from Bitnami just a couple months ago), and 0000-00-00/0000-00-00 00:00:00 don’t work as defaults for date/datetime fields. I tried modifying the file where the tables are created (then copied back to the Zip file I installed from) but I guess somewhere the version of mysql is being looked for, and in older versions the tables don’t get created. There is no indication of this when installing the plugin; you’ll only discover it when trying to add a location or event.

    Since my modifications to the PHP file didn’t work, I just created the full SQL to create the tables by copying it out of the PHP file and making the necessary revisions:

    Bool fields:
    [field_name] bool DEFAULT 0 (or 1 if true)
    should be changed to
    [field_name] boolean DEFAULT false (or true)

    Date fields:
    [field_name] date DEFAULT '0000-00-00'
    should be changed to
    [field_name] date DEFAULT '1000-01-01'

    Datetime fields:
    [field_name] datetime DEFAULT '0000-00-00 00:00:00'
    should be changed to
    [field_name] datetime DEFAULT '1000-01-01 00:00:00'

    Here’s the full SQL (note the error message you get when you try to add an event or location and table name is and make sure you follow that naming convention):

    CREATE TABLE wp_eme_events (
             event_id mediumint(9) NOT NULL AUTO_INCREMENT,
             event_status mediumint(9) DEFAULT 1,
             event_author mediumint(9) DEFAULT 0,
             event_name text NOT NULL,
             event_slug text,
             event_url text,
             event_start_time time NOT NULL,
             event_end_time time NOT NULL,
             event_start_date date NOT NULL,
             event_end_date date DEFAULT NULL, 
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             event_notes longtext DEFAULT NULL,
             event_rsvp boolean DEFAULT false,
             use_paypal boolean DEFAULT false,
             use_2co boolean DEFAULT false,
             use_webmoney boolean DEFAULT false,
             use_fdgg boolean DEFAULT false,
             use_mollie boolean DEFAULT false,
             use_sagepay boolean DEFAULT false,
             price text,
             currency text,
             rsvp_number_days tinyint unsigned DEFAULT 0,
             rsvp_number_hours tinyint unsigned DEFAULT 0,
             event_seats text,
             event_contactperson_id mediumint(9) DEFAULT 0,
             location_id mediumint(9) DEFAULT 0,
             recurrence_id mediumint(9) DEFAULT 0,
             event_category_ids text,
             event_attributes text, 
             event_properties text, 
             event_page_title_format text, 
             event_single_event_format text, 
             event_contactperson_email_body text, 
             event_respondent_email_body text, 
             event_registration_recorded_ok_html text, 
             event_registration_pending_email_body text, 
             event_registration_updated_email_body text, 
             event_registration_cancelled_email_body text, 
             event_registration_paid_email_body text, 
             event_registration_trashed_email_body text, 
             event_registration_form_format text, 
             event_cancel_form_format text, 
             registration_requires_approval boolean DEFAULT false,
             registration_wp_users_only boolean DEFAULT false,
             event_image_url text,
             event_image_id mediumint(9) DEFAULT 0,
             event_external_ref text, 
             UNIQUE KEY (event_id)
             );
    
    CREATE TABLE wp_eme_recurrence (
             recurrence_id mediumint(9) NOT NULL AUTO_INCREMENT,
             recurrence_start_date date NOT NULL,
             recurrence_end_date date NOT NULL,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             recurrence_interval tinyint NOT NULL, 
             recurrence_freq tinytext NOT NULL,
             recurrence_byday tinytext NOT NULL,
             recurrence_byweekno tinyint NOT NULL,
             event_duration mediumint(9) DEFAULT 0,
             recurrence_specific_days text,
             holidays_id mediumint(9) DEFAULT 0,
             UNIQUE KEY (recurrence_id)
    		 );
    
    CREATE TABLE wp_eme_locations (
             location_id mediumint(9) NOT NULL AUTO_INCREMENT,
             location_name text NOT NULL,
             location_slug text,
             location_url text,
             location_address1 tinytext, 
             location_address2 tinytext, 
             location_city tinytext, 
             location_state tinytext, 
             location_zip tinytext, 
             location_country tinytext, 
             location_latitude tinytext,
             location_longitude tinytext,
             location_description text,
             location_author mediumint(9) DEFAULT 0,
             location_category_ids text,
             location_creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             location_modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             location_image_url text,
             location_image_id mediumint(9) DEFAULT 0,
             location_attributes text, 
             location_properties text, 
             location_external_ref text, 
             UNIQUE KEY (location_id)
             );
    
    CREATE TABLE wp_eme_bookings (
             booking_id mediumint(9) NOT NULL AUTO_INCREMENT,
             event_id mediumint(9) NOT NULL,
             person_id mediumint(9) NOT NULL, 
             payment_id mediumint(9) DEFAULT NULL, 
             status tinyint DEFAULT 1,
             booking_seats mediumint(9) NOT NULL,
             booking_seats_mp varchar(250),
             booking_approved boolean DEFAULT false,
             waitinglist boolean DEFAULT false,
             booking_comment text,
             event_price text,
             extra_charge tinytext,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             payment_date datetime DEFAULT '1000-01-01 00:00:00',
             booking_paid boolean DEFAULT false,
             received tinytext,
             remaining tinytext,
             pg tinytext,
             pg_pid tinytext,
             reminder INT(11) DEFAULT 0,
             transfer_nbr_be97 varchar(20),
             wp_id bigint(20) unsigned DEFAULT NULL,
             lang varchar(10) DEFAULT '',
             discount tinytext,
             discountids tinytext,
             dcodes_entered tinytext,
             dcodes_used tinytext,
             dgroupid INT(11) DEFAULT 0,
             attend_count INT(11) DEFAULT 0,
             UNIQUE KEY  (booking_id),
             KEY (status)
             );
    
    CREATE TABLE wp_eme_groups (
             person_id mediumint(9) NOT NULL AUTO_INCREMENT,
             lastname tinytext, 
             firstname tinytext, 
             email tinytext NOT NULL,
             status tinyint DEFAULT 1,
             phone tinytext,
             wp_id bigint(20) unsigned DEFAULT NULL,
             address1 tinytext, 
             address2 tinytext, 
             city tinytext, 
             zip tinytext, 
             state tinytext, 
             country tinytext, 
             state_code tinytext,
             country_code tinytext,
             lang varchar(10) DEFAULT '',
             massmail boolean DEFAULT true,
             gdpr boolean DEFAULT false,
             properties text,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             gdpr_date date,
             UNIQUE KEY (person_id),
             KEY (status)
             );
    
    CREATE TABLE wp_eme_people (
             person_id mediumint(9) NOT NULL AUTO_INCREMENT,
             lastname tinytext, 
             firstname tinytext, 
             email tinytext NOT NULL,
             status tinyint DEFAULT 1,
             phone tinytext,
             wp_id bigint(20) unsigned DEFAULT NULL,
             address1 tinytext, 
             address2 tinytext, 
             city tinytext, 
             zip tinytext, 
             state tinytext, 
             country tinytext, 
             state_code tinytext,
             country_code tinytext,
             lang varchar(10) DEFAULT '',
             massmail boolean DEFAULT true,
             gdpr boolean DEFAULT false,
             properties text,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             gdpr_date date,
             UNIQUE KEY (person_id),
             KEY (status)
             );
    
    CREATE TABLE wp_eme_categories (
             category_id int(11) NOT NULL auto_increment,
             category_name tinytext NOT NULL,
             description text,
             category_slug text,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (category_id)
             );
    
    CREATE TABLE wp_eme_holidays (
             id int(11) NOT NULL auto_increment,
             name tinytext NOT NULL,
             list text NOT NULL,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (id)
             );
    
    CREATE TABLE wp_eme_templates (
             id int(11) NOT NULL auto_increment,
             name tinytext,
             description tinytext,
             format text NOT NULL,
             type tinytext,
             properties text,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (id)
             );
    
    CREATE TABLE wp_eme_formfields (
             field_id int(11) NOT NULL auto_increment,
             field_type tinytext NOT NULL,
             field_name tinytext NOT NULL,
             field_values text NOT NULL,
             admin_values text,
             field_tags text,
             admin_tags text,
             field_attributes tinytext,
             field_purpose tinytext,
             field_condition tinytext,
             field_required boolean DEFAULT false,
             export boolean DEFAULT false,
             extra_charge boolean DEFAULT false,
             searchable boolean DEFAULT false,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (field_id)
             );
    
    CREATE TABLE wp_eme_events_cf (
             answer_id int(11) NOT NULL auto_increment,
             event_id mediumint(9) DEFAULT 0,
             field_id int(11) DEFAULT 0,
             answer text NOT NULL,
             UNIQUE KEY  (answer_id),
             KEY  (event_id),
             KEY  (field_id)
             );
    
    CREATE TABLE wp_eme_locations_cf (
             answer_id int(11) NOT NULL auto_increment,
             location_id mediumint(9) DEFAULT 0,
             field_id int(11) DEFAULT 0,
             answer text NOT NULL,
             UNIQUE KEY  (answer_id),
             KEY  (location_id),
             KEY  (field_id)
             );
    
    CREATE TABLE wp_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)
             );
    
    CREATE TABLE wp_eme_payments (
             id int(11) NOT NULL auto_increment,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             random_id tinytext NOT NULL,
             member_id INT(11) DEFAULT 0,
             pg_pids text,
             pg_handled boolean DEFAULT false,
             UNIQUE KEY  (id)
             );
    
    CREATE TABLE wp_eme_discounts (
             id int(11) NOT NULL auto_increment,
             name varchar(50) DEFAULT NULL,
             description tinytext,
             type tinyint UNSIGNED DEFAULT 0,
             coupon tinytext,
             dgroup tinytext,
             value tinytext,
             maxcount tinyint UNSIGNED DEFAULT 0,
             count tinyint UNSIGNED DEFAULT 0,
             strcase boolean DEFAULT true,
             use_per_seat boolean DEFAULT false,
             valid_from datetime DEFAULT NULL, 
             valid_to datetime DEFAULT NULL, 
             properties text,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (id),
             UNIQUE KEY  (name)
             );
    
    CREATE TABLE wp_eme_dgroups (
             id int(11) NOT NULL auto_increment,
             description tinytext,
             name varchar(50) DEFAULT NULL,
             maxdiscounts tinyint UNSIGNED DEFAULT 0,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (id),
             UNIQUE KEY  (name)
             );
    
    CREATE TABLE wp_eme_mqueue (
             id int(11) NOT NULL auto_increment,
             mailing_id int(11) DEFAULT 0,
             person_id int(11) DEFAULT 0,
             member_id int(11) DEFAULT 0,
             status tinyint DEFAULT 0,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             sent_datetime datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 
             read_datetime datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 
             read_count int DEFAULT 0,
             receiveremail tinytext,
             receivername tinytext,
             replytoemail tinytext,
             replytoname tinytext,
             subject tinytext,
             body text,
             random_id tinytext NOT NULL,
             error_msg tinytext,
             attachments text,
             UNIQUE KEY  (id),
             KEY  (status)
             );
    
    CREATE TABLE wp_eme_mailings (
             id int(11) NOT NULL auto_increment,
             name varchar(50) DEFAULT NULL,
    	 planned_on datetime DEFAULT '1000-01-01 00:00:00', 
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             read_count int DEFAULT 0,
             total_read_count int DEFAULT 0,
             subject tinytext,
             body text,
             replytoemail tinytext,
             replytoname tinytext,
             mail_text_html tinytext,
             status tinytext,
             stats varchar(255) DEFAULT '',
             conditions text,
             UNIQUE KEY  (id)
             );
    
    CREATE TABLE wp_eme_members (
             member_id int(11) NOT NULL auto_increment,
             membership_id int(11) DEFAULT 0,
             person_id int(11) DEFAULT 0,
             status tinyint DEFAULT 0,
             status_automatic boolean DEFAULT true,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             start_date date NOT NULL DEFAULT '1000-01-01', 
             end_date date NOT NULL DEFAULT '1000-01-01', 
             reminder INT(11) DEFAULT 0,
             reminder_date datetime DEFAULT '1000-01-01 00:00:00',
             renewal_count INT(11) DEFAULT 0,
             transfer_nbr_be97 varchar(20),
             payment_id mediumint(9) DEFAULT NULL, 
             payment_date datetime DEFAULT '1000-01-01 00:00:00',
             paid boolean DEFAULT false,
             pg tinytext,
             pg_pid tinytext,
             extra_charge tinytext,
             discount tinytext,
             discountid INT(11) DEFAULT 0,
             dgroupid INT(11) DEFAULT 0,
             UNIQUE KEY  (member_id)
             );
    
    CREATE TABLE wp_eme_memberships (
             membership_id int(11) NOT NULL auto_increment,
             name varchar(50) DEFAULT NULL,
             description tinytext,
             type varchar(50) DEFAULT NULL,
             start_date date DEFAULT '1000-01-01', 
             duration_count tinyint DEFAULT 0,
             duration_period varchar(50) DEFAULT '',
             properties text,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (membership_id)
             );
    
    CREATE TABLE wp_eme_memberships_cf (
             answer_id int(11) NOT NULL auto_increment,
             membership_id mediumint(9) DEFAULT 0,
             field_id int(11) DEFAULT 0,
             answer text NOT NULL,
             UNIQUE KEY  (answer_id),
             KEY  (membership_id),
             KEY  (field_id)
             );
    
    CREATE TABLE wp_eme_countries (
             id int(11) NOT NULL auto_increment,
             alpha_2 char(2) DEFAULT NULL,
             alpha_3 char(3) DEFAULT NULL,
             num_3 char(3) DEFAULT NULL,
             name varchar(100) DEFAULT NULL,
             locale tinytext,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (id)
             );
    
    CREATE TABLE wp_eme_states (
             id int(11) NOT NULL auto_increment,
             code tinytext,
             name varchar(100) DEFAULT NULL,
             country_id int(11) DEFAULT NULL,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             modif_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
             UNIQUE KEY  (id)
             );
    
    CREATE TABLE wp_eme_attendances (
             id int(11) NOT NULL auto_increment,
             type varchar(20) DEFAULT NULL,
             person_id int(11) DEFAULT NULL,
             related_id int(11) DEFAULT NULL,
             creation_date datetime DEFAULT CURRENT_TIMESTAMP,
             UNIQUE KEY  (id)
             );
    • This topic was modified 1 month, 4 weeks ago by bkeplinger.
Viewing 1 replies (of 1 total)
  • Plugin Author Franky

    (@liedekef)

    Based on your changes, you mst have an old and unsupported mysql version (EME requires mysql 5.6 or newer). From the 5.6 doc (I can’t find any older doc):
    https://dev.mysql.com/doc/refman/5.6/en/numeric-type-syntax.html
    you can see that BOOL and BOOLEAN are synonyms for TINYINT(1)
    This is also true for mariadb: https://mariadb.com/kb/en/boolean/

    And for datetime:
    https://dev.mysql.com/doc/refman/5.6/en/numeric-type-syntax.html
    ” Invalid DATE, DATETIME, or TIMESTAMP values are converted to the “zero” value of the appropriate type (‘0000-00-00’ or ‘0000-00-00 00:00:00’), if the SQL mode permits this conversion. The precise behavior depends on which if any of strict SQL mode and the NO_ZERO_DATE SQL mode are enabled; see Section 5.1.10, “Server SQL Modes”. ”

    So maybe there the NO_ZERO_DATE mode is active for you? Maybe the BOOL is an identical problem then, but I haven’t encountered others with this issue.
    It might be worth investigating your setup, this might prove useful for others too (and I may need to change the defaults …)

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this review.