wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.38k stars 194 forks source link

SQLSTATE[HY000]: General error: 1364 Field 'disk_name' doesn't have a default value #1190

Closed josephcrowell closed 2 months ago

josephcrowell commented 2 months ago

Winter CMS Build

dev-develop

PHP Version

8.1

Database engine

MySQL/MariaDB

Plugins installed

No response

Issue description

I've been seeing this again which seems to be a regression of https://github.com/octobercms/october/issues/5270

Stack Trace:

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'disk_name' doesn't have a default value
#70 /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): PDOStatement::execute
#69 /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): Doctrine\DBAL\Driver\PDOStatement::execute
#68 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): Illuminate\Database\Connection::Illuminate\Database\{closure}
#67 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection::runQueryCallback
#66 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection::run
#65 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(534): Illuminate\Database\Connection::statement
#64 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(498): Illuminate\Database\Connection::insert
#63 /vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Query\Processors\Processor::processInsertGetId
#62 /vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3322): Illuminate\Database\Query\Builder::insertGetId
#61 /vendor/winter/storm/src/Database/QueryBuilder.php(284): Winter\Storm\Database\QueryBuilder::insertGetId
#60 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1869): Illuminate\Database\Eloquent\Builder::__call
#59 /vendor/winter/storm/src/Database/Builder.php(300): Winter\Storm\Database\Builder::__call
#58 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1330): Illuminate\Database\Eloquent\Model::insertAndSetId
#57 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1295): Illuminate\Database\Eloquent\Model::performInsert
#56 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1138): Illuminate\Database\Eloquent\Model::save
#55 /vendor/winter/storm/src/Database/Model.php(903): Winter\Storm\Database\Model::saveInternal
#54 /vendor/winter/storm/src/Database/Model.php(927): Winter\Storm\Database\Model::save
#53 /plugins/josephcrowell/annon/components/Incidents.php(1131): JosephCrowell\Annon\Components\Incidents::onAddIncidentAttachment
#52 /modules/cms/classes/ComponentBase.php(194): Cms\Classes\ComponentBase::runAjaxHandler
#51 /modules/cms/classes/Controller.php(839): Cms\Classes\Controller::runAjaxHandler
#50 /modules/cms/classes/Controller.php(730): Cms\Classes\Controller::execAjaxHandlers
#49 /modules/cms/classes/Controller.php(387): Cms\Classes\Controller::runPage
#48 /modules/cms/classes/Controller.php(220): Cms\Classes\Controller::run
#47 /modules/cms/classes/CmsController.php(41): Cms\Classes\CmsController::run
#46 /vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Illuminate\Routing\Controller::callAction
#45 /vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\ControllerDispatcher::dispatch
#44 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\Route::runController
#43 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route::run
#42 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\Routing\Router::Illuminate\Routing\{closure}
#41 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#40 /plugins/winter/translate/classes/LocaleMiddleware.php(31): Winter\Translate\Classes\LocaleMiddleware::handle
#39 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#38 /vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Routing\Middleware\SubstituteBindings::handle
#37 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#36 /vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\View\Middleware\ShareErrorsFromSession::handle
#35 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#34 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Session\Middleware\StartSession::handleStatefulRequest
#33 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession::handle
#32 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#31 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::handle
#30 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#29 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Cookie\Middleware\EncryptCookies::handle
#28 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#27 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline::then
#26 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\Routing\Router::runRouteWithinStack
#25 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\Routing\Router::runRoute
#24 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\Routing\Router::dispatchToRoute
#23 /vendor/winter/storm/src/Router/CoreRouter.php(20): Winter\Storm\Router\CoreRouter::dispatch
#22 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Illuminate\Foundation\Http\Kernel::Illuminate\Foundation\Http\{closure}
#21 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#20 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Sentry\Laravel\Http\FlushEventsMiddleware::handle
#19 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#18 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Sentry\Laravel\Http\SetRequestIpMiddleware::handle
#17 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#16 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Sentry\Laravel\Http\SetRequestMiddleware::handle
#15 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#14 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::handle
#13 /vendor/winter/storm/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(25): Winter\Storm\Foundation\Http\Middleware\CheckForMaintenanceMode::handle
#12 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#11 /vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Http\Middleware\HandleCors::handle
#10 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#9 /vendor/winter/storm/src/Foundation/Http/Middleware/CheckForTrustedProxies.php(56): Winter\Storm\Foundation\Http\Middleware\CheckForTrustedProxies::handle
#8 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#7 /vendor/winter/storm/src/Http/Middleware/TrustHosts.php(46): Winter\Storm\Http\Middleware\TrustHosts::handle
#6 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#5 /plugins/winter/redirect/classes/RedirectMiddleware.php(57): Winter\Redirect\Classes\RedirectMiddleware::handle
#4 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#3 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline::then
#2 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Foundation\Http\Kernel::sendRequestThroughRouter
#1 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Kernel::handle
#0 /index.php(42): null

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1364 Field 'disk_name' doesn't have a default value
#70 /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php(18): Doctrine\DBAL\Driver\PDO\Exception::new
#69 /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(119): Doctrine\DBAL\Driver\PDOStatement::execute
#68 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): Illuminate\Database\Connection::Illuminate\Database\{closure}
#67 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection::runQueryCallback
#66 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection::run
#65 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(534): Illuminate\Database\Connection::statement
#64 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(498): Illuminate\Database\Connection::insert
#63 /vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Query\Processors\Processor::processInsertGetId
#62 /vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3322): Illuminate\Database\Query\Builder::insertGetId
#61 /vendor/winter/storm/src/Database/QueryBuilder.php(284): Winter\Storm\Database\QueryBuilder::insertGetId
#60 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1869): Illuminate\Database\Eloquent\Builder::__call
#59 /vendor/winter/storm/src/Database/Builder.php(300): Winter\Storm\Database\Builder::__call
#58 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1330): Illuminate\Database\Eloquent\Model::insertAndSetId
#57 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1295): Illuminate\Database\Eloquent\Model::performInsert
#56 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1138): Illuminate\Database\Eloquent\Model::save
#55 /vendor/winter/storm/src/Database/Model.php(903): Winter\Storm\Database\Model::saveInternal
#54 /vendor/winter/storm/src/Database/Model.php(927): Winter\Storm\Database\Model::save
#53 /plugins/josephcrowell/annon/components/Incidents.php(1131): JosephCrowell\Annon\Components\Incidents::onAddIncidentAttachment
#52 /modules/cms/classes/ComponentBase.php(194): Cms\Classes\ComponentBase::runAjaxHandler
#51 /modules/cms/classes/Controller.php(839): Cms\Classes\Controller::runAjaxHandler
#50 /modules/cms/classes/Controller.php(730): Cms\Classes\Controller::execAjaxHandlers
#49 /modules/cms/classes/Controller.php(387): Cms\Classes\Controller::runPage
#48 /modules/cms/classes/Controller.php(220): Cms\Classes\Controller::run
#47 /modules/cms/classes/CmsController.php(41): Cms\Classes\CmsController::run
#46 /vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Illuminate\Routing\Controller::callAction
#45 /vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\ControllerDispatcher::dispatch
#44 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\Route::runController
#43 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route::run
#42 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\Routing\Router::Illuminate\Routing\{closure}
#41 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#40 /plugins/winter/translate/classes/LocaleMiddleware.php(31): Winter\Translate\Classes\LocaleMiddleware::handle
#39 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#38 /vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Routing\Middleware\SubstituteBindings::handle
#37 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#36 /vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\View\Middleware\ShareErrorsFromSession::handle
#35 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#34 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Session\Middleware\StartSession::handleStatefulRequest
#33 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession::handle
#32 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#31 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::handle
#30 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#29 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Cookie\Middleware\EncryptCookies::handle
#28 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#27 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline::then
#26 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\Routing\Router::runRouteWithinStack
#25 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\Routing\Router::runRoute
#24 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\Routing\Router::dispatchToRoute
#23 /vendor/winter/storm/src/Router/CoreRouter.php(20): Winter\Storm\Router\CoreRouter::dispatch
#22 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Illuminate\Foundation\Http\Kernel::Illuminate\Foundation\Http\{closure}
#21 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#20 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Sentry\Laravel\Http\FlushEventsMiddleware::handle
#19 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#18 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Sentry\Laravel\Http\SetRequestIpMiddleware::handle
#17 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#16 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Sentry\Laravel\Http\SetRequestMiddleware::handle
#15 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#14 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::handle
#13 /vendor/winter/storm/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(25): Winter\Storm\Foundation\Http\Middleware\CheckForMaintenanceMode::handle
#12 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#11 /vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Http\Middleware\HandleCors::handle
#10 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#9 /vendor/winter/storm/src/Foundation/Http/Middleware/CheckForTrustedProxies.php(56): Winter\Storm\Foundation\Http\Middleware\CheckForTrustedProxies::handle
#8 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#7 /vendor/winter/storm/src/Http/Middleware/TrustHosts.php(46): Winter\Storm\Http\Middleware\TrustHosts::handle
#6 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#5 /plugins/winter/redirect/classes/RedirectMiddleware.php(57): Winter\Redirect\Classes\RedirectMiddleware::handle
#4 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#3 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline::then
#2 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Foundation\Http\Kernel::sendRequestThroughRouter
#1 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Kernel::handle
#0 /index.php(42): null

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1364 Field 'disk_name' doesn't have a default value (SQL: insert into `system_files` (`updated_at`, `created_at`) values (2024-08-24 21:43:31, 2024-08-24 21:43:31))
#67 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(760): Illuminate\Database\Connection::runQueryCallback
#66 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection::run
#65 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(534): Illuminate\Database\Connection::statement
#64 /vendor/laravel/framework/src/Illuminate/Database/Connection.php(498): Illuminate\Database\Connection::insert
#63 /vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Query\Processors\Processor::processInsertGetId
#62 /vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3322): Illuminate\Database\Query\Builder::insertGetId
#61 /vendor/winter/storm/src/Database/QueryBuilder.php(284): Winter\Storm\Database\QueryBuilder::insertGetId
#60 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1869): Illuminate\Database\Eloquent\Builder::__call
#59 /vendor/winter/storm/src/Database/Builder.php(300): Winter\Storm\Database\Builder::__call
#58 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1330): Illuminate\Database\Eloquent\Model::insertAndSetId
#57 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1295): Illuminate\Database\Eloquent\Model::performInsert
#56 /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1138): Illuminate\Database\Eloquent\Model::save
#55 /vendor/winter/storm/src/Database/Model.php(903): Winter\Storm\Database\Model::saveInternal
#54 /vendor/winter/storm/src/Database/Model.php(927): Winter\Storm\Database\Model::save
#53 /plugins/josephcrowell/annon/components/Incidents.php(1131): JosephCrowell\Annon\Components\Incidents::onAddIncidentAttachment
#52 /modules/cms/classes/ComponentBase.php(194): Cms\Classes\ComponentBase::runAjaxHandler
#51 /modules/cms/classes/Controller.php(839): Cms\Classes\Controller::runAjaxHandler
#50 /modules/cms/classes/Controller.php(730): Cms\Classes\Controller::execAjaxHandlers
#49 /modules/cms/classes/Controller.php(387): Cms\Classes\Controller::runPage
#48 /modules/cms/classes/Controller.php(220): Cms\Classes\Controller::run
#47 /modules/cms/classes/CmsController.php(41): Cms\Classes\CmsController::run
#46 /vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Illuminate\Routing\Controller::callAction
#45 /vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\ControllerDispatcher::dispatch
#44 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\Route::runController
#43 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route::run
#42 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\Routing\Router::Illuminate\Routing\{closure}
#41 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#40 /plugins/winter/translate/classes/LocaleMiddleware.php(31): Winter\Translate\Classes\LocaleMiddleware::handle
#39 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#38 /vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Routing\Middleware\SubstituteBindings::handle
#37 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#36 /vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\View\Middleware\ShareErrorsFromSession::handle
#35 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#34 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Session\Middleware\StartSession::handleStatefulRequest
#33 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession::handle
#32 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#31 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::handle
#30 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#29 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Cookie\Middleware\EncryptCookies::handle
#28 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#27 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline::then
#26 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\Routing\Router::runRouteWithinStack
#25 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\Routing\Router::runRoute
#24 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\Routing\Router::dispatchToRoute
#23 /vendor/winter/storm/src/Router/CoreRouter.php(20): Winter\Storm\Router\CoreRouter::dispatch
#22 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Illuminate\Foundation\Http\Kernel::Illuminate\Foundation\Http\{closure}
#21 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#20 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Sentry\Laravel\Http\FlushEventsMiddleware::handle
#19 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#18 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Sentry\Laravel\Http\SetRequestIpMiddleware::handle
#17 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#16 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Sentry\Laravel\Http\SetRequestMiddleware::handle
#15 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#14 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::handle
#13 /vendor/winter/storm/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(25): Winter\Storm\Foundation\Http\Middleware\CheckForMaintenanceMode::handle
#12 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#11 /vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Http\Middleware\HandleCors::handle
#10 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#9 /vendor/winter/storm/src/Foundation/Http/Middleware/CheckForTrustedProxies.php(56): Winter\Storm\Foundation\Http\Middleware\CheckForTrustedProxies::handle
#8 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#7 /vendor/winter/storm/src/Http/Middleware/TrustHosts.php(46): Winter\Storm\Http\Middleware\TrustHosts::handle
#6 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#5 /plugins/winter/redirect/classes/RedirectMiddleware.php(57): Winter\Redirect\Classes\RedirectMiddleware::handle
#4 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#3 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline::then
#2 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Foundation\Http\Kernel::sendRequestThroughRouter
#1 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Kernel::handle
#0 /index.php(42): null

Steps to replicate

$attachment = new File();
$attachment->data = Input::file('attachment'); // Pick a file, any file
$attachment->save();

Workaround

No response

bennothommo commented 2 months ago

@josephcrowell what happens if you run fromPost() directly. ie.

$attachment = new File();
$attachment->fromPost(Input::file('attachment'));
$attachment->save();
josephcrowell commented 2 months ago

I'll give it a go and see. No issues yet but I'll give it a couple days.

LukeTowers commented 2 months ago

@josephcrowell this (https://github.com/wintercms/storm/blob/develop/src/Database/Attach/File.php#L570) is where it is supposed to be handling that for you, can you try some debugging around there to figure out why it is not?

josephcrowell commented 2 months ago

It's happening in production but I haven't been able to trigger it in my development environment. My best guess is that the uploads aren't being detected as instanceof UploadedFile. Could it possibly have something to do with the fact that I'm using this file uploader https://v5-standard-6.legacydocs.mdbootstrap.com/docs/standard/plugins/file-upload/ instead of a standard file input?

LukeTowers commented 2 months ago

@josephcrowell is there any difference in the requests sent by that uploader on production vs development? I can't think of why it should be any different from any other file uploader.

LukeTowers commented 2 months ago

Also is your code in production exactly what you provided?

josephcrowell commented 2 months ago

Yes it's the same code. I haven't gotten the error again after directly using fromPost. Internally that uploader is a standard file input. It just has a drop target tacked on.

LukeTowers commented 2 months ago

Very odd indeed. I'll close this for now then, let me know if it comes back or if you can replicate it on a fresh install.

josephcrowell commented 2 months ago

Will do.