So when I go the "Existing tab", I get the following warning:

Warning: Invalid argument supplied for foreach() in Drupal\media_fotoweb\Plugin\EntityBrowser\Widget\FotowebSelection->prepareEntities() (line 210 of modules/contrib/media_fotoweb/src/Plugin/EntityBrowser/Widget/FotowebSelection.php).
Drupal\media_fotoweb\Plugin\EntityBrowser\Widget\FotowebSelection->prepareEntities(Array, Object) (Line: 292)
Drupal\entity_browser\WidgetBase->validate(Array, Object) (Line: 220)
Drupal\entity_browser\Form\EntityBrowserForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'entity_browser_image_browser_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('entity_browser_image_browser_form', Array, Object) (Line: 69)
Drupal\autosave_form\Form\AutosaveFormValidator->validateForm('entity_browser_image_browser_form', Array, Object) (Line: 576)
Drupal\Core\Form\FormBuilder->processForm('entity_browser_image_browser_form', Array, Object) (Line: 144)
Drupal\autosave_form\Form\AutosaveFormBuilder->processForm('entity_browser_image_browser_form', Array, Object) (Line: 319)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 97)
Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm(Object, Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

it seems there's a problem with "autosave_form" module

Comments

doxigo created an issue. See original summary.

doxigo’s picture

Issue summary: View changes
szeidler’s picture

Thanks for reporting it. It does not have to do with the autosave_form module. But as it hooks into every entity form, where it's enabled, it appears in the Stack Trace, although it often is unrelated.

Could you please check the attached patch? The reason was, that the form_state had "NULL" as the value and therefore the foreach loop wouldn't work.

szeidler’s picture

Status: Active » Needs review
doxigo’s picture

Status: Needs review » Reviewed & tested by the community

It works perfectly, thanks!

  • szeidler committed 55f733b on 8.x-1.x
    Issue #3098471 by szeidler, doxigo: Select existing tab, throws a...
szeidler’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the report and review. This got committed to dev.

Status: Fixed » Closed (fixed)

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