Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Please help, I'm trying to use IMCE together with media stored remotely but accessible with FlySystem via SFTP.
I'm able to successfully access files by url on my DEV host with /_flysystem/test-www/images/test.jpg but when I install and enable IMCE 8.x-1.5 on Drupal 8.3.3 it starts throwing the following error when I try to access /imce/test-www
Component\Routing\Exception\InvalidParameterException: Parameter "filepath" for route "flysystem.serve" must match ".+" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 202 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('flysystem.serve', Object, Array, Array) (Line: 291)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('flysystem.serve', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('flysystem.serve', Array, Array, ) (Line: 753)
Drupal\Core\Url->toString() (Line: 35)
Drupal\flysystem_sftp\Flysystem\Sftp->getExternalUrl('test-www://.') (Line: 67)
Drupal\flysystem\FlysystemBridge->getExternalUrl() (Line: 234)
file_create_url('test-www://.') (Line: 93)
Drupal\imce\Imce::processUserConf(Array, Object) (Line: 79)
Drupal\imce\Imce::userConf(Object, 'test-www') (Line: 31)
Drupal\imce\Imce::userFM(Object, 'test-www', Object) (Line: 24)
Drupal\imce\Imce::response(Object, Object, 'test-www') (Line: 35)
Drupal\imce\Controller\ImceController->page('test-www', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comments
Comment #2
ufku CreditAttribution: ufku commentedIt should be handled on Flysystem side.
Comment #3
paulgranted CreditAttribution: paulgranted commentedI am experiencing the same issue using : 8.6.15, IMCE and flySystem 1.0.
"It should be handled on Flysystem side." - Can you elaborate a little more on this - Can you also link the duplicated issue to this issue. Information on this error is sparse to say the least.
Comment #4
paulgranted CreditAttribution: paulgranted commentedReopening to get more information on resolution
Comment #5
paulgranted CreditAttribution: paulgranted commentedComment #6
paulgranted CreditAttribution: paulgranted commentedFound duplicate : https://www.drupal.org/project/flysystem/issues/2886858