Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

Multiple Fatal Errors pointing to "Unknown Column"s #434

Closed TQPS closed 2 months ago

TQPS commented 2 months ago

Describe the bug and how to reproduce it Just pulled for updates and noticed 4 SQL files.

Ran php aowow --update and received the following:

C:\Servers\WOTLK.bots\_Server\apache\htdocs\database>php aowow --update

03:18:04          [update] checking for sql updates...
03:18:32  [OK]     -> 03.07.2024 #1: 54 queries appliedPHP Warning:  mysqli_query(): (42S22/1054): Unknown column 'post' in 'field list' in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\libs\DbSimple\Mysqli.php on line 165

Warning: mysqli_query(): (42S22/1054): Unknown column 'post' in 'field list' in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\libs\DbSimple\Mysqli.php on line 165
PHP Fatal error:  Unknown column 'post' in 'field list' at C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\kernel.php line 117 in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\database.class.php on line 92

Fatal error: Unknown column 'post' in 'field list' at C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\kernel.php line 117 in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\database.class.php on line 92
PHP Warning:  mysqli_query(): (42S22/1054): Unknown column 'post' in 'field list' in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\libs\DbSimple\Mysqli.php on line 165

Warning: mysqli_query(): (42S22/1054): Unknown column 'post' in 'field list' in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\libs\DbSimple\Mysqli.php on line 165
PHP Fatal error:  Unknown column 'post' in 'field list' at C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\kernel.php line 152 in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\database.class.php on line 92

Fatal error: Unknown column 'post' in 'field list' at C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\kernel.php line 152 in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\database.class.php on line 92

C:\Servers\WOTLK.bots\_Server\apache\htdocs\database>

Thinking I can get around it by adding the 4 updates manually proved incorrect, HeidiSQL also complained.

The site still appears to work but concerned it might affect future updates.

Update: Was reviewing "Blood of heroes" and got the following within the browser:

Warning: mysqli_query(): (42S22/1054): Unknown column 'post' in 'field list' in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\libs\DbSimple\Mysqli.php on line 165

Fatal error: Unknown column 'post' in 'field list' at C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\kernel.php line 117 in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\database.class.php on line 92

Warning: mysqli_query(): (42S22/1054): Unknown column 'post' in 'field list' in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\libs\DbSimple\Mysqli.php on line 165

Fatal error: Unknown column 'post' in 'field list' at C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\kernel.php line 152 in C:\Servers\WOTLK.bots\_Server\apache\htdocs\database\includes\database.class.php on line 92

The failed update appears to have had additional affect on some aspects of the site.

Screenshots N/A

System:

Sarjuuk commented 2 months ago

This should have been added here: https://github.com/Sarjuuk/aowow/commit/7d545167df49bf5918dc1196fde8b37b7a651c75

/e: it's specific to MariaDB

Maybe DROP COLUMN IF EXISTS is mysql specific or something.

TQPS commented 2 months ago

Anyone else using MySQL and received these errors? Any advice on moving forward?

Sarjuuk commented 2 months ago

Any advice on moving forward?

Delete the IF EXISTS or wait for a week or so until I can fix it myself.

TQPS commented 2 months ago

Acknowledged. Will wait so I don't cause additional issues.

Others will benefit as well.

Thank you for the update.

Sarjuuk commented 2 months ago

fixed in e3fc4ebd62c599d859933319edf57dc2bec3b4cb

you may need to apply the query manually if the updater says you have no pending updates and the table aowow_errors is missing the post column

ALTER TABLE `aowow_errors` ADD COLUMN `post` text NOT NULL AFTER `query`;