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.
</code><h3 id="summary-problem-motivation">Problem/Motivation</h3>
i wanted to export a bpmn model that contains every event, action, and condition for https://www.drupal.org/project/eca/issues/3305587#comment-14666991 . but i ran into the following error on export:
<code>The website encountered an unexpected error. Please try again later.
TypeError: Drupal\eca\Service\Modellers::getNestedDependencies(): Argument #2 ($dependencies) must be of type array, null given, called in /var/www/html/web/modules/contrib/eca/src/Service/Modellers.php on line 338 in Drupal\eca\Service\Modellers->getNestedDependencies() (line 325 of modules/contrib/eca/src/Service/Modellers.php).
Drupal\eca\Service\Modellers->getNestedDependencies(Array, NULL) (Line: 338)
Drupal\eca\Service\Modellers->getNestedDependencies(Array, Array) (Line: 288)
Drupal\eca\Service\Modellers->exportArchive(Object, 'temporary://bpmn_io-process_z6jzc9k.tar.gz') (Line: 300)
Drupal\eca_modeller_bpmn\ModellerBpmnBase->export() (Line: 186)
Drupal\eca_ui\Controller\EcaController->export('process_z6jzc9k')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
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}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
the export of smaller models worked without any error. might be the case that not all fields are filled. the main purpose of that model was to see the micro copy of the model elements in context.
Issue fork eca-3305971
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
jurgenhaasPlease give MR !128 a try
Comment #5
rkollerthe export seems to work now. but when i've reloaded the model listing page before the export i got the following new error:
and when i tried to reimport the exported model i ran into the following (is that related and needs a follow up or is it ok in the scope of this issue - just wanted to mention it that it happened when validating the changes):
Comment #6
rkollerafter the second error when going back to the models list page and reload the first error from #5 hasn't shown up again. but when i went to the model import page the same first error from #5 showed up now.
Comment #7
jurgenhaasThe first one from #5 is just a warning and a follow-up on the original exception caused by my lazy approach of solving the problem.
The other one, when importing the model, is unrelated. I suggest we keep this issue to the export problem. Once that's completely solved, let's have a look at the import in a separate issue.
I have updated the MR, so the warning should no longer appear - and the exception should also be resolved. If the warning appears once more, that may well be from the previous page request. You may want to refresh the page once or twice before then trying the export again with the latest MR.
Comment #8
jurgenhaasComment #9
rkolleri've applied the updated patch. the export works now as well as no more warning is showing up. looks good. thanks for the fast fix. and for the re import i will open up a new issue. lets RTBC this one here.
Comment #12
jurgenhaasMerged and back-ported.