Cannot Save Anything after Update

I was having issues when i tried to edit my invoices to show some more info, kept getting 'promise was reject with a value of ‘undefined’ when tried to view pdf’s. Had been working prior so I deleted the invoice format and created a new one with same results so then I decided to run update. Everything updated then got error 500 if I tried to save anything to the database. I ran domain.com/update?secrete=XXX and I get error 500 on that too. I don’t know what else to try.

Version v5.10.42-C171

Environment Shared Hosting

Last QUEUE Error:
Exception: No Company Found in /home/stillwat/public_html/mydomain.com/app/Models/User.php:306
Stack trace:
#0 /home/stillwat/public_html/mydomain.com/app/Models/User.php(325): App\Models\User->getCompany()
#1 /home/stillwat/public_html/mydomain.com/app/Models/User.php(376): App\Models\User->company()
#2 /home/stillwat/public_html/mydomain.com/app/Models/User.php(353): App\Models\User->companyId()
#3 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(775): App\Models\User->company_user()
#4 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php(104): Illuminate\Database\Eloquent\Builder->Illuminate\Database\Eloquent\{closure}()
#5 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(773): Illuminate\Database\Eloquent\Relations\Relation::noConstraints(Object(Closure))
#6 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(747): Illuminate\Database\Eloquent\Builder->getRelation('company_user')
#7 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(727): Illuminate\Database\Eloquent\Builder->eagerLoadRelation(Array, 'company_user', Object(Closure))
#8 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(703): Illuminate\Database\Eloquent\Builder->eagerLoadRelations(Array)
#9 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php(108): Illuminate\Database\Eloquent\Model->load(Array)
#10 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php(61): App\Jobs\Company\CompanyExport->restoreModel(Object(Illuminate\Contracts\Database\ModelIdentifier))
#11 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php(88): App\Jobs\Company\CompanyExport->getRestoredPropertyValue(Object(Illuminate\Contracts\Database\ModelIdentifier))
#12 [internal function]: App\Jobs\Company\CompanyExport->__unserialize(Array)
#13 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(97): unserialize('O:30:"App\\Jobs\\...')
#14 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(60): Illuminate\Queue\CallQueuedHandler->getCommand(Array)
#15 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array)
#16 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(425): Illuminate\Queue\Jobs\Job->fire()
#17 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(375): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Queue\WorkerOptions))
#18 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(173): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\DatabaseJob), 'database', Object(Illuminate\Queue\WorkerOptions))
#19 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(146): Illuminate\Queue\Worker->daemon('database', 'default', Object(Illuminate\Queue\WorkerOptions))
#20 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(129): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'default')
#21 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#22 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#23 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#24 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#25 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#26 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)
#27 /home/stillwat/public_html/mydomain.com/vendor/symfony/console/Command/Command.php(312): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#28 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#29 /home/stillwat/public_html/mydomain.com/vendor/symfony/console/Application.php(1022): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#30 /home/stillwat/public_html/mydomain.com/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#31 /home/stillwat/public_html/mydomain.com/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /home/stillwat/public_html/mydomain.com/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 {main}

Last Error:
[2024-10-22 18:41:02] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'smtp_host' in 'field list' (Connection: mysql, SQL: update `companies` set `convert_products` = 0, `fill_products` = 1, `update_products` = 1, 

Laravel.log:
p(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#58 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#59 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#60 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#61 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#62 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#63 /home/stillwat/public_html/mydomain.com/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#64 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\\Laravel\\Tracing\\Middleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#65 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#66 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#67 /home/stillwat/public_html/mydomain.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#68 /home/stillwat/public_html/mydomain.com/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))

Hi,

Try running php artisan migrate

wish I could but don’t have access to ssh or anything on shared host. My provider is pretty cool maybe I can ask him to run it for me.

do I have any other option if I can’t run artisan migrate? I asked my provider to run it for me but don’t think it happened. Thanks

On some servers it’s possible to run the migrations using the /update route

One (complicated) option is to setup a copy of the app/database on another server where you can run artisan and then copy over the updated database.

1 Like