Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v0.31.1 Killed My BookStack #2465

Closed
swizzle1 opened this issue Jan 9, 2021 · 3 comments
Closed

Update to v0.31.1 Killed My BookStack #2465

swizzle1 opened this issue Jan 9, 2021 · 3 comments

Comments

@swizzle1
Copy link

swizzle1 commented Jan 9, 2021

Updated this morning. I was getting an error 500 when I try to load the site.

Error log showed:
[09-Jan-2021 14:22:17 UTC] PHP Warning: require(/home/ino1jdl5c9we/BookStack/bootstrap/init.php): failed to open stream: No such file or directory in /home/ino1jdl5c9we/public_html/bookstack/index.php on line 22

I see this file no longer exists. Not sure why/how the update process didn't update my index.php, but I found the copy in the source and made the necessary changes.

Now the site still fails to load and my new error is:
[09-Jan-2021 14:25:56 UTC] PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'owned_by' in 'where clause' in /home/ino1jdl5c9we/BookStack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:67
Stack trace:
#0 /home/ino1jdl5c9we/BookStack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(67): PDO->prepare('select count()...', Array)
#1 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(331): Doctrine\DBAL\Driver\PDOConnection->prepare('select count(
)...')
#2 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(662): Illuminate\Database\Connection->Illuminate\Database{closure}('select count()...', Array)
#3 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\Database\Connection->runQueryCallback('select count(
)...', Array, Object(Closure))
#4 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(338): Il in /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 669
[09-Jan-2021 14:26:04 UTC] PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'owned_by' in 'where clause' in /home/ino1jdl5c9we/BookStack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:67
Stack trace:
#0 /home/ino1jdl5c9we/BookStack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(67): PDO->prepare('select count()...', Array)
#1 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(331): Doctrine\DBAL\Driver\PDOConnection->prepare('select count(
)...')
#2 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(662): Illuminate\Database\Connection->Illuminate\Database{closure}('select count()...', Array)
#3 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\Database\Connection->runQueryCallback('select count(
)...', Array, Object(Closure))
#4 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(338): Il in /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 669
[09-Jan-2021 14:26:07 UTC] PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'owned_by' in 'where clause' in /home/ino1jdl5c9we/BookStack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:67
Stack trace:
#0 /home/ino1jdl5c9we/BookStack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(67): PDO->prepare('select count()...', Array)
#1 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(331): Doctrine\DBAL\Driver\PDOConnection->prepare('select count(
)...')
#2 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(662): Illuminate\Database\Connection->Illuminate\Database{closure}('select count()...', Array)
#3 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\Database\Connection->runQueryCallback('select count(
)...', Array, Object(Closure))
#4 /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(338): Il in /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 669

I had a previous bug/issue open in the past where when I would run an update and get this error

[2020-09-25 14:30:24] production.ERROR: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'id'; check that column/key exists (SQL: alter table joint_permissions drop id) {"exception":"[object] (Illuminate\Database\QueryException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'id'; check that column/key exists (SQL: alter table joint_permissions drop id) at /home/ino1jdl5c9we/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669)
[stacktrace]

I still get this error after changing this table to InnoDB but everything seemed to be working fine when I would update so I just ignored it. I'm assuming there were additional database changes after this part which didn't get applied to my installation?

@ssddanbrown
Copy link
Member

Hi @swizzle1,
Yeah, Your database migrations are behind due to a failed previous migration.

You can try following my comment here to restore the id column then re-attempt migrations.

@swizzle1
Copy link
Author

swizzle1 commented Jan 9, 2021

Thank you!

That SQL code worked fine, the database change allowed the update process to complete with no errors, and my BookStack installation appears to be working perfectly fine.

@swizzle1 swizzle1 closed this as completed Jan 9, 2021
@ssddanbrown
Copy link
Member

Awesome, Glad to hear that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants