Support » Plugin: Easy Digital Downloads - Simple eCommerce for Selling Digital Files » Table ‘xyz.wp_edd_notifications’ doesn’t exist

  • Resolved Marios Alexandrou

    (@marios-alexandrou)


    I tried to submit this via your support forum, but the submission form just kept “spinning” after I hit submit. So I’m sharing an error from my logs here. I don’t actually see anything not work, but the error repeats regularly.

    WordPress database error Table 'xyz.wp_edd_notifications' doesn't exist for query SELECT conditions FROM wp_edd_notifications
    			WHERE dismissed = 0
    			AND (start <= '2022-01-04 23:08:47' OR start IS NULL)
    			AND (end >= '2022-01-04 23:08:47' OR end IS NULL)
    			ORDER BY start DESC, id DESC made by require_once('wp-admin/admin.php'), require_once('wp-admin/admin-header.php'), do_action('admin_notices'), WP_Hook->do_action, WP_Hook->apply_filters, edd_admin_header, EDD\Database\NotificationsDB->countActiveNotifications, EDD\Database\NotificationsDB->getActiveNotifications
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Mihai Joldis

    (@misulicus)

    Hey @marios-alexandrou

    Can you try sending in a support ticket but don’t add the error message in the body of the ticket. Most likely our systems are blocking the form because of the SQL contents of the message.

    You can put that error message in a text file and upload it in the Attachments field when submitting the support ticket.

    Our team will take a look at this report as soon as we can!

    Plugin Support Mihai Joldis

    (@misulicus)

    Hey @marios-alexandrou

    Just as an update please check that your website is running on PHP 8.0.

    Thread Starter Marios Alexandrou

    (@marios-alexandrou)

    It isn’t running PHP 8.0. Is that now a requirement? I’ve been delaying the upgrade while some plugins I use catch up.

    Plugin Support Mihai Joldis

    (@misulicus)

    Hey @marios-alexandrou

    Can you please contact us via the support form here https://easydigitaldownloads.com/support/ so that we can investigate?

    The only time we have seen this is if the site was on PHP 8.1 but WordPress does not support that version at this time but PHP 8.0 works just fine.

    Hi,

    This error is most likely caused by the notifications table creation query failing during the EDD update on older versions of MySQL (under 5.6? my test system is 5.5.68) due to CURRENT_TIMESTAMP() being an unsupported default value for the date_created and date_updated columns.

    The notifications functionality looks introduced in EDD 2.11.4.

    To complicate matters, changing the columns types to timestamp is insufficient, since older MySQL will now complain with:
    Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    Since I see EDD does set default values in the code for these two columns, I removed the default SQL value for both columns and that allowed me to manually resolve the error by creating the table manually with:

    CREATE TABLE __TABLENAME__ (
    	    id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    	    remote_id bigint(20) UNSIGNED DEFAULT NULL,
    	    title text NOT NULL,
    	    content longtext NOT NULL,
    	    buttons longtext DEFAULT NULL,
    	    type varchar(64) NOT NULL,
    	    conditions longtext DEFAULT NULL,
    	    start datetime DEFAULT NULL,
    	    end datetime DEFAULT NULL,
    	    dismissed tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
    	    date_created timestamp NOT NULL,
    	    date_updated timestamp NOT NULL,
    	    PRIMARY KEY (id),
    	    KEY dismissed_start_end (dismissed, start, end)
    		) DEFAULT CHARACTER SET __$wpdb->charset__ COLLATE __$wpdb->collate__;

    Update the table name, charset and collation with those valid on your server.

    I can’t say if the table structure change has any effect on the dashboard functionality (I haven’t noticed anything terribly broken so far, though).

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.