Okay
  Public Ticket #2410512
Syntax Error
Closed

Comments

  • Simon Conway started the conversation

    Hi, 

    After installing Amelia, we are now expreiecing a fault with the SQL syntax with the plugin, could you please assist?

    AH01071: Got error 'error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON DELETE SET NULL' at line 1 for query ALTER TABLE m3vKFp8B_amelia_events ADD COLUMN ON DELETE SET NULL made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CONSTRAINT FOREIGN KEY (`eventId`) REFERENCES m3vKFp8B_amelia_events(`id`)' at line 1 for query ALTER TABLE m3vKFp8B_amelia_events_tags ADD COLUMN CONSTRAINT FOREIGN KEY (`eventId`) REFERENCES m3vKFp8B_amelia_events(`id`) made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON DELETE CASCADE ON UPDATE CASCADE' at line 1 for query ALTER TABLE m3vKFp8B_amelia_events_tags ADD COLUMN ON DELETE CASCADE ON UPDATE CASCADE made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CONSTRAINT FOREIGN KEY (`eventId`) REFERENCES m3vKFp8B_amelia_events(`id`)' at line 1 for query ALTER TABLE m3vKFp8B_amelia_events_periods ADD COLUMN CONSTRAINT FOREIGN KEY (`eventId`) REFERENCES m3vKFp8B_amelia_events(`id`) made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON DELETE CASCADE ON UPDATE CASCADE' at line 1 for query ALTER TABLE m3vKFp8B_amelia_events_periods ADD COLUMN ON DELETE CASCADE ON UPDATE CASCADE made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CONSTRAINT FOREIGN KEY (`userId`) REFERENCES m3vKFp8B_amelia_users(`id`)' at line 1 for query ALTER TABLE m3vKFp8B_amelia_events_to_providers ADD COLUMN CONSTRAINT FOREIGN KEY (`userId`) REFERENCES m3vKFp8B_amelia_users(`id`) made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON DELETE CASCADE ON UPDATE CASCADE' at line 1 for query ALTER TABLE m3vKFp8B_amelia_events_to_providers ADD COLUMN ON DELETE CASCADE ON UPDATE CASCADE made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FOREIGN KEY (`eventId`) REFERENCES m3vKFp8B_amelia_events(`id`)' at line 1 for query ALTER TABLE m3vKFp8B_amelia_coupons_to_events ADD COLUMN FOREIGN KEY (`eventId`) REFERENCES m3vKFp8B_amelia_events(`id`) made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON DELETE CASCADE ON UPDATE CASCADE' at line 1 for query ALTER TABLE m3vKFp8B_amelia_coupons_to_events ADD COLUMN ON DELETE CASCADE ON UPDATE CASCADE made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FOREIGN KEY (eventId) REFERENCES m3vKFp8B_amelia_events(id) ON DELETE CASCADE' at line 1 for query ALTER TABLE m3vKFp8B_amelia_providers_to_events ADD COLUMN FOREIGN KEY (eventId) REFERENCES m3vKFp8B_amelia_events(id) ON DELETE CASCADE made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CONSTRAINT FOREIGN KEY (`couponId`) REFERENCES m3vKFp8B_amelia_coupons(`id`)' at line 1 for query ALTER TABLE m3vKFp8B_amelia_customer_bookings ADD COLUMN CONSTRAINT FOREIGN KEY (`couponId`) REFERENCES m3vKFp8B_amelia_coupons(`id`) made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, AmeliaBooking\Infrastructure\WP\InstallActions\ActivationDatabaseHook::init, AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable::init, dbDelta PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON DELETE SET NULL' at line 1 for query ALTER TABLE m3vKFp8B_amelia_customer_bookings ADD COLUMN ON DELETE SET NULL made by activate_plugin, do_action('activate_ameliabooking/ameliabooking.php'), WP_Hook->do_action, WP_Hook->apply_filters, AmeliaBooking\Plugin::activation, Amel


  • [deleted] replied

    Hello Simon Conway, 

    This is an SQL exception that can be thrown because of the syntax/database version on activation of the plugin, but it doesn't cause any issues within the plugin nor it affects any functionalities. It is shown only on activation and it isn't there later on. So you can proceed using with working with the plugin without any concerns. 

    If you have any further questions feel free to ask. 


  • Simon Conway replied

    Hi Marija,

    Thanks for the resposne.

    Problem is, it does stop the plugin working as you can’t select the menu options and it does repeat these sql errors when clicking the menu items.

    Why would the menu items be blank?

  •   [deleted] replied privately