e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: v2.3.3 database issues #5199

Open Vodhin opened 4 months ago

Vodhin commented 4 months ago

What e107 version are you using?

v2.3.3

Bug description

All worked OK prior to the v2.3.3 update. I decided to add the table to my plugin's sql.php file and ran the [Check database validity] option to build the table. After clicking the [Fix Selected Items Button] it appeared that nothing happened after form submission:

Warning
1 table(s) have problems.
Table missing!

So I repeated the step and got:

Warning
Update Unsuccessful [CREATE TABLE `e107nf_estate_user` (`user_idx` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_name` varchar(25) NOT NULL, PRIMARY KEY (`user_idx`)) ENGINE=InnoDB;]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'e107nf_estate_user' already exists

and

Success
Tables appear to be okay!

How to reproduce

Add a new table to your plugin's _sql.php file Run the Check Database Validity on your plugin Check the Items to Fix (Table Missing!) ClickFix Selected Items Get the same error message (Table Missing!)

Recheck the the Items to Fix (Table Missing!) Click Fix Selected Items Get the error message that Table Exists, Get Success Message that Tables OK

Expected behavior

I expected it to not return an error, since it worked anyway.

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

7.4.33