Problem/Motivation
✨
Skip requests to the API when the API key is missing
Fixed
seems to have introduced an inadvertent BC-breaking change: https://git.drupalcode.org/project/applenews/-/commit/a5144bbc39cc6c3eb8...
This leads to this error when pushing for the first time to AppleNews:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 2 passed to Drupal\applenews\ApplenewsManager::getMetadata() must be of the type string, null given, called in /var/lib/tugboat/web/modules/contrib/applenews/src/ApplenewsManager.php on line 310 in Drupal\applenews\ApplenewsManager->getMetadata() (line 347 of modules/contrib/applenews/src/ApplenewsManager.php).
Drupal\applenews\ApplenewsManager->getMetadata(Array, NULL, 1) (Line: 310)
Drupal\applenews\ApplenewsManager->saveToAppleNews(Object, Object) (Line: 280)
Drupal\applenews\ApplenewsManager->syncToAppleNews(Object) (Line: 138)
Drupal\applenews\ApplenewsManager->entitySave(Object) (Line: 65)
applenews_entity_insert(Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'applenews') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_insert', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_insert', Array) (Line: 251)
Drupal\Core\Entity\EntityStorageBase->invokeHook('insert', Object) (Line: 900)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('insert', Object) (Line: 598)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, ) (Line: 781)
Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, ) (Line: 523)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 270)
Drupal\node\NodeForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('node_blog_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
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: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
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: 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: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes