I am trying to download a file with this module enabled using the file entity module field formatter and I get this error. I tried to debug, but I don't see where this would be the case.

The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to xmlsitemap_file_transfer() must be an instance of Symfony\Component\HttpFoundation\Response, string given in xmlsitemap_file_transfer() (line 2222 of modules/contrib/xmlsitemap/xmlsitemap.module).

xmlsitemap_file_transfer('public://2017-04/Vertical_City_Black_0.jpg', Array)
call_user_func_array('xmlsitemap_file_transfer', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('file_transfer', Array) (Line: 79)
Drupal\file_entity\Controller\FileController->download(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: 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: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

diggingrelic created an issue. See original summary.

Chewie’s picture

Have the same issue. Here patch that I hope will solve this issue