goellner / statamic-assets-organized

Organizes Statamic assets in subdirectories
MIT License
1 stars 1 forks source link

Error on saving #1

Closed jeremydouglas closed 6 years ago

jeremydouglas commented 6 years ago

I'm receiving this error in Statamic 2.9.8 when saving:

[2018-06-27 13:58:50] local-jeremy.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function move() on null in /Users/homefolder/Sites/projectfolder/public/site/addons/AssetsOrganized/AssetsOrganizedFieldtype.php:82
Stack trace:
#0 /Users/homefolder/Sites/projectfolder/public/site/addons/AssetsOrganized/AssetsOrganizedFieldtype.php(52): Statamic\Addons\AssetsOrganized\AssetsOrganizedFieldtype->moveAndRenameAsset('/assets/intrane...', '/', 'test')
#1 /Users/homefolder/Sites/projectfolder/public/statamic/core/Data/Processor.php(49): Statamic\Addons\AssetsOrganized\AssetsOrganizedFieldtype->process(Array)
#2 [internal function]: Statamic\Data\Processor->Statamic\Data\{closure}(Array, 'image')
#3 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Support/Collection.php(469): array_map(Object(Closure), Array, Array)
#4 /Users/homefolder/Sites/projectfolder/public/statamic/core/Data/Processor.php(51): Illuminate\Support\Collection->map(Object(Closure))
#5 /Users/homefolder/Sites/projectfolder/public/statamic/core/CP/Publish/ProcessesFields.php(21): Statamic\Data\Processor->process(Array, true)
#6 /Users/homefolder/Sites/projectfolder/public/statamic/core/CP/Publish/Publisher.php(101): Statamic\CP\Publish\Publisher->processFields(Object(Statamic\CP\Fieldset), Array, true)
#7 /Users/homefolder/Sites/projectfolder/public/statamic/core/CP/Publish/EntryPublisher.php(25): Statamic\CP\Publish\Publisher->publish()
#8 /Users/homefolder/Sites/projectfolder/public/statamic/core/Http/Controllers/PublishController.php(105): Statamic\CP\Publish\EntryPublisher->publish()
#9 [internal function]: Statamic\Http\Controllers\PublishController->save(Object(Illuminate\Http\Request))
#10 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#11 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('save', Array)
#12 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Statamic\Http\Controllers\PublishEntryController), Object(Illuminate\Routing\Route), 'save')
#13 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#14 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#15 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#16 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#17 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#18 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(68): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Statamic\Http\Controllers\PublishEntryController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'save')
#19 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Statamic\\Http\\C...', 'save')
#20 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#21 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#22 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#23 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#24 /Users/homefolder/Sites/projectfolder/public/statamic/core/Http/Middleware/CP/Authenticate.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#25 [internal function]: Statamic\Http\Middleware\CP\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#26 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#27 /Users/homefolder/Sites/projectfolder/public/statamic/core/Http/Middleware/Outpost.php(48): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 [internal function]: Statamic\Http\Middleware\Outpost->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#30 /Users/homefolder/Sites/projectfolder/public/statamic/core/Http/Middleware/CP/Localize.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: Statamic\Http\Middleware\CP\Localize->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#33 /Users/homefolder/Sites/projectfolder/public/statamic/core/Http/Middleware/CP/DefaultLocale.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: Statamic\Http\Middleware\CP\DefaultLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#36 /Users/homefolder/Sites/projectfolder/public/statamic/core/Http/Middleware/CpEnabled.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 [internal function]: Statamic\Http\Middleware\CpEnabled->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#39 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#41 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#42 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(674): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#43 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#44 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#45 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#46 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#47 /Users/homefolder/Sites/projectfolder/public/site/addons/MinifyHTML/MinifyHTMLMiddleware.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 [internal function]: Statamic\Addons\MinifyHTML\MinifyHTMLMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#50 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#51 [internal function]: Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#52 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#53 /Users/homefolder/Sites/projectfolder/public/statamic/core/Http/Middleware/PersistStache.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#54 [internal function]: Statamic\Http\Middleware\PersistStache->handle(Object(Illuminate\Http\Request), Object(Closure))
#55 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#56 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#57 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#58 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#59 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#60 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#61 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#62 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#64 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#65 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#66 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#67 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#68 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#69 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#70 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#71 /Users/homefolder/Sites/projectfolder/public/statamic/core/StaticCaching/Middleware/Retrieve.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#72 [internal function]: Statamic\StaticCaching\Middleware\Retrieve->handle(Object(Illuminate\Http\Request), Object(Closure))
#73 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#74 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#75 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#76 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#77 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#78 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#79 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#80 /Users/homefolder/Sites/projectfolder/public/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#81 /Users/homefolder/Sites/projectfolder/public/index.php(155): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#82 {main}  

My fieldset yaml is:

    fields:
      image:
        container: intranet
        folder: /
        restrict: false
        type: assets_organized
        display: Image
jeremydouglas commented 6 years ago

Actually, nevermind it seems to be unrelated to the addon. Sorry, nothing to see here…