- Issue created by @kamalMaroc
I'm also experiancig this issue and would love a fix. I'm using the S3FS Module (8.x-3.2) as well.
TypeError: Drupal\single_content_sync\ContentSyncHelper::createZipInstance(): Return value must be of type Drupal\Core\Archiver\ArchiverInterface, null returned in Drupal\single_content_sync\ContentSyncHelper->createZipInstance() (line 158 of /var/app/current/html/web/modules/contrib/single_content_sync/src/ContentSyncHelper.php)
- πΊπ¦Ukraine nginex
Thanks for the feedback, I'm going to test the module with some basic s3 set up.
- Status changed to Postponed: needs info
over 1 year ago 2:13pm 3 June 2023 - πΊπ¦Ukraine nginex
Hi @tbadaczewski and @kamalMaroc,
I just finished testing drupal 10 with s3 setup and I cound not reproduce the issue, in my case the zip file was generated without problems.
Please provide more details:
- which drupal core version is used
- which "Default download method" is used (check on /admin/config/media/file-system)
- which PHP version is used Drupal Version: 9.5.9
Default Download Method: Public files served from Amazon S3.
PHP: 8.0.28I tried changing the "Default Download Method" to "Private local files served by Drupal." because that seemed like it could solve it, but I recieve the same error. Ran a "drush updatedb" and "drush cr" after change to make sure everythign was refreshed.
I'm trying to export by checking multuiple content items from the "/admin/content" window and then using the "Export content" action to "Apply to selected items". I check "Include all assets" and "Include all translation"s, but it fails even if those are not checked.
TypeError: Drupal\single_content_sync\ContentSyncHelper::createZipInstance(): Return value must be of type Drupal\Core\Archiver\ArchiverInterface, null returned in Drupal\single_content_sync\ContentSyncHelper->createZipInstance() (line 158 of /var/app/current/html/web/modules/contrib/single_content_sync/src/ContentSyncHelper.php) #0 /var/app/current/html/web/modules/contrib/single_content_sync/src/ContentFileGenerator.php(108): Drupal\single_content_sync\ContentSyncHelper->createZipInstance('', 8) #1 /var/app/current/html/web/modules/contrib/single_content_sync/src/Form/ContentBulkExportForm.php(144): Drupal\single_content_sync\ContentFileGenerator->generateBulkZipFile(Array, false, false) #2 [internal function]: Drupal\single_content_sync\Form\ContentBulkExportForm->submitForm(Array, Object(Drupal\Core\Form\FormState)) #3 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array(Array, Array) #4 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #5 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #6 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm('single_content_...', Array, Object(Drupal\Core\Form\FormState)) #7 /var/app/current/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\single_content_sync\Form\ContentBulkExportForm), Object(Drupal\Core\Form\FormState)) #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #9 /var/app/current/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #10 /var/app/current/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #11 /var/app/current/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #12 /var/app/current/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #13 /var/app/current/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #14 /var/app/current/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #15 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /var/app/current/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /var/app/current/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /var/app/current/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /var/app/current/html/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /var/app/current/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #24 {main}
- πΊπ¦Ukraine nginex
Hi @tbadaczewski,
Thanks for more details, could you please try with "Public local files served by the webserver" as Default Download Method.
And the S3 File System Module I'm using is version 8.x-3.2
I don't appear to have that option since I'm using the S3FS module. I did try "Amazon Simple Storage Service", but it was the same error. I've attached a screenshot.
- πΊπ¦Ukraine nginex
I think that's the issue, it seems like you do not have public schema, currently zip can only be created by using public file schema
The reports status page clears the checks for the filesystem and S3FS Public Processing,
FILE SYSTEM: Writable (public download method)
S3FS PUBLIC:// TAKEOVER Enabled
S3FS is processing public:// file requests.
This is interesting. I see that the "content-bulk-export-XXXXXX.zip" zip files do get created and sent to S3, but they are all 0 B.
I've attached a screenshot.
- πΊπ¦Ukraine nginex
Try to revert this change locally and see if the bug disappear
https://git.drupalcode.org/project/single_content_sync/-/commit/b1c562d4...
I'm getting the same error, but on a different line after using the changes.
Location https://XXXXXXX/admin/content/bulk-export?destination=%2Fadmin%2Fcontent
Referrer https://XXXXXXX/admin/content/bulk-export?destination=/admin/contentTypeError: Drupal\single_content_sync\ContentSyncHelper::createZipInstance(): Return value must be of type Drupal\Core\Archiver\ArchiverInterface, null returned in Drupal\single_content_sync\ContentSyncHelper->createZipInstance() (line 147 of /var/app/current/html/web/modules/contrib/single_content_sync/src/ContentSyncHelper.php) #0 /var/app/current/html/web/modules/contrib/single_content_sync/src/ContentFileGenerator.php(105): Drupal\single_content_sync\ContentSyncHelper->createZipInstance('', 8) #1 /var/app/current/html/web/modules/contrib/single_content_sync/src/Form/ContentBulkExportForm.php(168): Drupal\single_content_sync\ContentFileGenerator->generateBulkZipFile(Array, false, false) #2 [internal function]: Drupal\single_content_sync\Form\ContentBulkExportForm->submitForm(Array, Object(Drupal\Core\Form\FormState)) #3 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array(Array, Array) #4 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #5 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #6 /var/app/current/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm('single_content_...', Array, Object(Drupal\Core\Form\FormState)) #7 /var/app/current/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\single_content_sync\Form\ContentBulkExportForm), Object(Drupal\Core\Form\FormState)) #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #9 /var/app/current/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #10 /var/app/current/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #11 /var/app/current/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #12 /var/app/current/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #13 /var/app/current/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #14 /var/app/current/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #15 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /var/app/current/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /var/app/current/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /var/app/current/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /var/app/current/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /var/app/current/html/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /var/app/current/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #24 {main}
- π²π¦Morocco kamalMaroc
@nginex first of all thank you for help us,
any update to fixe this issue ??thank you
- π²π¦Morocco kamalMaroc
@tbadaczewski are u found any others solution ??
- Assigned to nginex
- Status changed to Active
about 1 year ago 8:01pm 25 August 2023 - πΊπ¦Ukraine nginex
I could reproduce the issue when s3fs.upload_as_private is TRUE, I'm going to fix it ASAP
- @nginex opened merge request.
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 8:36pm 25 August 2023 - πΊπ¦Ukraine nginex
Guys, could you please test the fix I provided in new MR, It worked it my case really well
- πΊπ¦Ukraine nginex
@kamalMaroc, let me create a new patch release now, I will keep you posted
-
nginex β
committed d4e25652 on 1.3.x
Issue #3362720: Use temporary file schema for exporting/importing zip.
-
nginex β
committed d4e25652 on 1.3.x
- Status changed to Fixed
about 1 year ago 10:56am 28 August 2023 - πΊπ¦Ukraine nginex
@kamalMaroc,
Here is a new release with the fix https://www.drupal.org/project/single_content_sync/releases/1.3.17 β
I'm going to backport it to 1.4.x
-
nginex β
committed 97f444dc on 1.4.x
Issue #3362720: Use temporary file schema for exporting/importing zip.
-
nginex β
committed 97f444dc on 1.4.x
- πΊπ¦Ukraine nginex
External file import issue has been fixed in π External assets from S3 are not correctly importing Fixed
Automatically closed - issue fixed for 2 weeks with no activity.