stopped working with php82-8.2.18

by jtojnar, Monday, May 20, 2024, 02:42 (30 days ago) @ snak-pak

Hi, sorry about that.

If it started happening suddenly, that sounds like the database got corrupted or gotten to inconsistent state somehow. But selfoss only really modifies triggers when it is updated to a new version, and it stores the info that it performed a migration step in the database itself, so I am baffled how it could happen.

[2024-05-18T19:33:42.850580+00:00] selfoss.ERROR: SQLSTATE[HY000]: General error: 1360 Trigger does not exist {"exception":"[object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1360 Trigger does not exist at /usr/local/www/nginx/mywebsite.com/src/helpers/DatabaseConnection.php:140)

Actually, you are not the first person experiencing this. It was reported on GitHub.

You should be able to work around it by replacing DROP TRIGGER with DROP TRIGGER IF EXISTS on the the following lines:

https://github.com/fossar/selfoss/blob/d45cba4a8013e0c50cdd583da9ca8e0aa5516d75/src/daos/mysql/Database.php#L241-L242

Also, are you sure SQLite complains about the trigger not existing? We are not even touching the existing trigger in SQLite – instead we create a new table from scratch.

I was using sqlite so I switched to mysql to test things and got the same error, yet when I check mysql from the shell the database connection did in fact work and tables got created in a fresh new database, despite seeing the above error.

If you are willing to debug this, I would appreciate the following info:


Complete thread:

 RSS Feed of thread

powered by my little forum