Skip to content

FIlesystem does not always have a ->path #67

@rgbjay

Description

@rgbjay

Describe the bug
When exporting our Assets Volumes and related Filesystems, we get an error via the Servd Assets plugin as it looks like it has been assumed that path will always exist on all Filesystems type, which is not always the case.

To Reproduce

  1. Create a Filesystem that points to the Servd Assets platform
  2. Try to export the filesystem via Architect

Expected behavior
The filesystem and volume Json to be generated by Architect

Stack trace

yii\base\UnknownPropertyException: Getting unknown property: servd\AssetStorage\AssetsPlatform\Fs::path in /Users/jamespratt/Desktop/Apps/initialisation/vendor/yiisoft/yii2/base/Component.php:154
Stack trace:
#0 /Users/jamespratt/Desktop/Apps/initialisation/vendor/pennebaker/craft-architect/src/base/FilesystemProcessor.php(116): yii\base\Component->__get('path')
#1 /Users/jamespratt/Desktop/Apps/initialisation/vendor/pennebaker/craft-architect/src/base/FilesystemProcessor.php(89): pennebaker\architect\base\FilesystemProcessor->export(Object(servd\AssetStorage\AssetsPlatform\Fs))
#2 /Users/jamespratt/Desktop/Apps/initialisation/vendor/pennebaker/craft-architect/src/controllers/DefaultController.php(148): pennebaker\architect\base\FilesystemProcessor->exportByHandle('businessDirecto...')
#3 [internal function]: pennebaker\architect\controllers\DefaultController->actionExport()
#4 /Users/jamespratt/Desktop/Apps/initialisation/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /Users/jamespratt/Desktop/Apps/initialisation/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#6 /Users/jamespratt/Desktop/Apps/initialisation/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('export', Array)
#7 /Users/jamespratt/Desktop/Apps/initialisation/vendor/craftcms/cms/src/web/Application.php(340): yii\base\Module->runAction('architect/defau...', Array)
#8 /Users/jamespratt/Desktop/Apps/initialisation/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('architect/defau...', Array)
#9 /Users/jamespratt/Desktop/Apps/initialisation/vendor/craftcms/cms/src/web/Application.php(308): yii\web\Application->handleRequest(Object(craft\web\Request))
#10 /Users/jamespratt/Desktop/Apps/initialisation/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#11 /Users/jamespratt/Desktop/Apps/initialisation/web/index.php(26): yii\base\Application->run()
#12 /Users/jamespratt/.composer/vendor/laravel/valet/server.php(110): require('/Users/jamespra...')
#13 {main}

Environment:

  • CraftCMS Version: 4.10.0
  • Version 4.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions