I was evaluating this module for my use case and got the following error when exporting:

Drupal\eme\ExportException: Unexpected error while processing 'discoverContentReferences'. in Drupal\eme\Export\ExportPluginBase->executeExportTask() (line 524 of /var/www/html/web/modules/eme/src/Export/ExportPluginBase.php).

I realised then that I had no content to export!, I think the error could be friendlier or a validation could be added :)

This is failing on `discoverContentReferences`, specifically:

    $unchecked = array_diff($sandbox['entities_to_export'], $sandbox['entities_checked']);
    $current = reset($unchecked);
    $sandbox['progress'] += 1;

Because entities to export is empty, $current returns false and throws an exception on `explode(':', $current);`

Comments

pcambra created an issue. See original summary.

huzooka’s picture

Assigned: Unassigned » huzooka
Category: Task » Bug report
huzooka’s picture

Assigned: huzooka » Unassigned
Status: Active » Needs review
StatusFileSize
new8.31 KB
new16.91 KB

Let's see how this works with core 9+!

Status: Needs review » Needs work
huzooka’s picture

"path_alias" isn't installed in 9+ kernel test base.

  • huzooka committed de9a7ba on 1.0.x
    Issue #3208348 by huzooka, pcambra: Verify if there's content before...
huzooka’s picture

Status: Needs review » Fixed

@pcambra, Thanks for the report and for your patience!

huzooka’s picture

Just tagged an another alpha with this fix.

pcambra’s picture

Awesome, many thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

bradallenfisher’s picture

hi!

I'm trying to use this module with https://www.drupal.org/project/section_library
I have section library entities created and there is a checkbox for them here: /admin/config/development/entity-export

When i hit start export i get the error:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=1351&op=do_nojs&op=do
StatusText: 500 Service unavailable (with message)
ResponseText: The website encountered an unexpected error. Please try again later.Drupal\eme\ExportException: Unexpected error while processing 'discoverContentReferences'. in Drupal\eme\Export\ExportPluginBase->executeExportTask() (line 536 of modules/contrib/eme/src/Export/ExportPluginBase.php). array_reduce() (Line: 632)
Drupal\eme\Export\ExportPluginBase::getEmeIds() (Line: 599)
Drupal\eme\Export\ExportPluginBase->getRelatedContentEntities() (Line: 263)
Drupal\eme\Export\ExportPluginBase->discoverContentReferences() (Line: 523)
Drupal\eme\Export\ExportPluginBase->executeExportTask() (Line: 295)
_batch_process() (Line: 137)
_batch_do() (Line: 93)
_batch_page() (Line: 55)
Drupal\system\Controller\BatchController->batchPage()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 708)
Drupal\Core\DrupalKernel->handle() (Line: 19)

wondering if there is something that section_library needs to do to make the entities exportable? or if it's just an edge case....

either way i'm happy to help test and try for a solution if you could point me in the right direction?