BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

V0.28 Upgrade results in "call to undefined function array" HTTP 500 errors

Open eferreira2 opened this issue 6 years ago • 7 comments

Running Ubuntu 18.04 on PHP version 7.2.24. I successfully performed the bookstack upgrade from V0.27 to V0.28 however I keep getting HTTP 500 errors.

Laravel.log shows the following: [object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined function array_except() at /var/www/bookstack/storage/framework/views/b6907d7cb3d23d27cb94e567c7d5a2aafd964aab.php:19) [stacktrace] minate\Foundation\Http\Kernel->handle(Object(BookStack\Http\Request)) Debug Error

eferreira2 avatar Feb 06 '20 00:02 eferreira2

Could it be some kind of caching problem? Maybe clearing the view Cache with laravels command php artisan view:clear could help

finnwessel avatar Feb 06 '20 00:02 finnwessel

I followed the upgrade documentation where it suggests running the cache and view clears. I did both successfully, same issue.

php artisan cache:clear php artisan view:clear

eferreira2 avatar Feb 06 '20 00:02 eferreira2

any problems with write permissions for the folder? Sounds like the question on Stackoverflow (Cache Problem) Does those files change after running the command?

finnwessel avatar Feb 06 '20 01:02 finnwessel

Heyho, had the same issue on a similar system (ubuntu 18.04, php 7.2.24) also after upgrading from 0.27. According to this stackoverflow post (https://stackoverflow.com/a/58433430) laravel moved some functions to a helper package. Bookstack worked for me again after running composer require laravel/helpers. Hope that helps.

HavoK-at avatar Feb 06 '20 11:02 HavoK-at

You should not need to run composer require laravel/helpers after updating, this would likely cause more issues when you come to update next time. BookStack has been updated to not need this package.

@eferreira2 After running php artisan view:clear do you have any .php files inside the storage/framework/views/ folder? If so then your current user likely doesn't have permission to clear those files. You may have to run the command with elevated permissions (sudo php artisan view:clear)

ssddanbrown avatar Feb 06 '20 15:02 ssddanbrown

The following 2 articles helped me resolve my issue: https://stackoverflow.com/questions/32573924/composer-hanging-while-updating-dependencies https://stackoverflow.com/questions/58432492/lumen-laravel-6-call-to-undefined-function-array-except/58433430#58433430

eferreira2 avatar Feb 06 '20 16:02 eferreira2

Could it be some kind of caching problem? Maybe clearing the view Cache with laravels command php artisan view:clear could help

helpful!

mtariq786 avatar Mar 17 '21 07:03 mtariq786