Error: Undefined constant

Created on 19 May 2024, 11 months ago

Hi on upgrading from 2.0.0-beta2 to 2.0.1 (via /admin/modules/update) I get the following error which means I can no longer create or edit content. I have tried rebuilding permissions, /update.php

Any guidance appreciated

=========
Error: Undefined constant CommerceGuys\Addressing\AddressFormat\LocalityType::TOWN_CITY in Drupal\address\LabelHelper::getLocalityLabels() (line 153 of /home/lowestoftoldnow/public_html/modules/contrib/address/src/LabelHelper.php)
#0 /home/lowestoftoldnow/public_html/modules/contrib/address/src/LabelHelper.php(136): Drupal\address\LabelHelper::getLocalityLabels()
#1 /home/lowestoftoldnow/public_html/modules/contrib/address/src/LabelHelper.php(74): Drupal\address\LabelHelper::getLocalityLabel('post_town')
#2 /home/lowestoftoldnow/public_html/modules/contrib/address/src/Element/Address.php(222): Drupal\address\LabelHelper::getFieldLabels(Object(CommerceGuys\Addressing\AddressFormat\AddressFormat))
#3 /home/lowestoftoldnow/public_html/modules/contrib/address/src/Element/Address.php(190): Drupal\address\Element\Address::addressElements(Array, Array)
#4 [internal function]: Drupal\address\Element\Address::processAddress(Array, Object(Drupal\Core\Form\FormState), Array)
#5 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(1012): call_user_func_array(Array, Array)
#6 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(1075): Drupal\Core\Form\FormBuilder->doBuildForm('node_article_fo...', Array, Object(Drupal\Core\Form\FormState))
#7 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(1075): Drupal\Core\Form\FormBuilder->doBuildForm('node_article_fo...', Array, Object(Drupal\Core\Form\FormState))
#8 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(1075): Drupal\Core\Form\FormBuilder->doBuildForm('node_article_fo...', Array, Object(Drupal\Core\Form\FormState))
#9 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(1075): Drupal\Core\Form\FormBuilder->doBuildForm('node_article_fo...', Array, Object(Drupal\Core\Form\FormState))
#10 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(579): Drupal\Core\Form\FormBuilder->doBuildForm('node_article_fo...', Array, Object(Drupal\Core\Form\FormState))
#11 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm('node_article_fo...', Array, Object(Drupal\Core\Form\FormState))
#12 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\node\NodeForm), Object(Drupal\Core\Form\FormState))
#13 /home/lowestoftoldnow/public_html/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#14 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#15 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#16 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#18 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#19 /home/lowestoftoldnow/public_html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#20 /home/lowestoftoldnow/public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#21 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /home/lowestoftoldnow/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /home/lowestoftoldnow/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /home/lowestoftoldnow/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /home/lowestoftoldnow/public_html/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /home/lowestoftoldnow/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#30 {main}
=============

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom artatac

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @artatac
  • Status changed to Closed: works as designed 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States dww

    The core Update Manager cannot correctly update modules like address that have external dependencies. You need to use composer to manage your updates if you use this module.

Production build 0.71.5 2024