stopped working with php82-8.2.18
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:
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:
- Can you check what the
version
table contains. That will tell us how far along it got in the database schema migration step.
- Could you also share the lines in the log below
[stacktrace]
of the original error?
- What version of MySQL server are you running?
- Adding
debug=1
andlogger_level=DEBUG
to your config in latest selfoss and trying with a clean database might be also helpful.
Complete thread:
- stopped working with php82-8.2.18 -
snak-pak,
2024-05-18, 22:05
- stopped working with php82-8.2.18 - jtojnar, 2024-05-20, 02:42