Events+ db error in event detail page

I'm getting the following db error at the bottom of my page when viewing an event detail page:

WordPress database error Table 'vs405498_3.wp_eab_booking_meta' doesn't exist for query SELECT meta_value FROM wp_eab_booking_meta WHERE booking_id = 1 AND meta_key = 'booking_transaction_key'; made by require('E:\inetpub\vs239247\ssl\wp-blog-header.php'), require_once('E:\inetpub\vs239247\ssl\wp-includes\template-loader.php'), include('E:\inetpub\vs239247\ssl\wp-content\plugins\events-and-bookings\default-templates\default\single-incsub_event.php'), Eab_EventModel->user_paid, Eab_EventModel->get_booking_paid, Eab_EventModel::get_booking_meta

In addition to this error, manual payment records/submissions are not being registered.

Plugin version: 1.5.3
WP version: 3.5.1 multisite
Theme: Twenty Twelve
Browser: IE9
Server: Win2003 IIS6
PHP: 5.3.2
MySQL: 5.1

  • Vladislav


    This table missing pretty much explains the other issue you experienced, with the manual payments records missing too. However, this kind of issue is the first for me - perhaps the server timed out, or something similar happened during the table creation. Can you please try deactivating the plugin and activating it again, and see if that helped with the missing table creation? Also, if the PHP logs for your site are available to you, can you please try and see if there's something in there?

  • KJA


    I tried deactivating/reactivating (network) several times but the missing tables are not created in the database.

    I've asked our web host if they can temporarily enable the PHP logs (they're not enabled by default) so we can test to see if the problem is at the PHP end.

    UPDATE: I also tried the plugin on a different WP installation/domain, with same configuration (3.5.1, network sub folder install) and got the same result. The only table created upon activation is "wp_eab_bookings". Is there any specific PHP/MySQL config that needs to be active on the server, that is required for creation of the other tables (that the wp_eab_bookings table doesn't need)??

    UPDATE 2: Just finished debugging with my server admin and the problem appears to be coming from MySQL, not PHP.
    From my server admins:
    "We've located the problem to be with the create table mysql query that's being executed. It is trying to create a column (meta_value) that has the attribute NOT NULL, but has a default value of ''. This is never going to work, and is fundamentally wrong. You could either create a default value that contains something, or remove the NOT NULL attribute from the column to resolve this problem."

    Here is the actual error produced in the PHP log:

    WordPress database error BLOB/TEXT column 'meta_value' can't have a default value for query CREATE TABLE IF NOT EXISTS wp_eab_booking_meta (
    'booking_id' BIGINT NOT NULL ,
                           'meta_key' VARCHAR(255) NOT NULL ,
                           'meta_value' TEXT NOT NULL DEFAULT '',
       	PRIMARY KEY ('id'),
    KEY 'booking_id' ('booking_id'),
    KEY 'meta_key' ('meta_key')
       ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci made by activate_plugin, do_action('activate_events-and-bookings/events-and-bookings.php'), call_user_func_array, Eab_EventsHub->install, dbDelta
  • KJA

    While I was waiting (impatiently) for a resolution/fix to this problem, I started doing some research on the error/cause and decided to hack into the code anyway!

    FYI: The official MySQL documentation says "BLOB and TEXT columns cannot have DEFAULT values" (

    On line 1589 of events-and-bookings.php, I changed the line:
    'meta_value' TEXT NOT NULL DEFAULT '',
    'meta_value' TEXT NOT NULL,

    Upon deactivating and then reactivating the plugin, the wp_eab_booking_meta table was (finally) created.
    I couldn't find any same/similar code in the plugin so hopefully that's the only problemattic area.

    I've read on a couple of Wordpress and other CMS forums that "turning off strict mode in MySQL" can bypass this problem, so maybe those who aren't experiencing this problem (seems to be everyone BUT me) have strict mode off?

    I'll leave this "unresolved" until the devs can confirm that the change I made won't affect any other parts of the plugin and that they'll address it officially in a future update.

    So for now I'll sit back and relax knowing that the ugly error at the bottom of every event page is now gone! :slight_smile: