The options "availableCurrencies" do not exist in constraint

Created on 25 June 2024, 5 months ago
Updated 29 July 2024, 4 months ago

Describe your bug or feature request.

When I try to add a variation to a product I see the following error.
Can I get advice on the subject? Thanks

Versions:
Commerce:8.x.2.39 & 8.x.2-dev
Drupal:10.3
Php:8.3

Symfony\Component\Validator\Exception\InvalidOptionsException: The options "availableCurrencies" do not exist in constraint "Drupal\field_validation\Plugin\Validation\Constraint\CurrencyConstraint". in Symfony\Component\Validator\Constraint->normalizeOptions() (line 180 of /var/www/html/dstart10/vendor/symfony/validator/Constraint.php).
#0 /var/www/html/dstart10/vendor/symfony/validator/Constraint.php(126): Symfony\Component\Validator\Constraint->normalizeOptions()
#1 /var/www/html/dstart10/vendor/symfony/validator/Constraints/Currency.php(47): Symfony\Component\Validator\Constraint->__construct()
#2 /var/www/html/dstart10/web/core/lib/Drupal/Core/Validation/ConstraintFactory.php(31): Symfony\Component\Validator\Constraints\Currency->__construct()
#3 /var/www/html/dstart10/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Validation\ConstraintFactory->createInstance()
#4 /var/www/html/dstart10/web/core/lib/Drupal/Core/Validation/ConstraintManager.php(86): Drupal\Component\Plugin\PluginManagerBase->createInstance()
#5 /var/www/html/dstart10/web/modules/contrib/commerce/modules/price/src/Plugin/Field/FieldType/PriceItem.php(154): Drupal\Core\Validation\ConstraintManager->create()
#6 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php(45): Drupal\commerce_price\Plugin\Field\FieldType\PriceItem->getConstraints()
#7 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php(38): Drupal\Core\TypedData\Validation\TypedDataMetadata->getConstraints()
#8 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(152): Drupal\Core\TypedData\Validation\TypedDataMetadata->findConstraints()
#9 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(164): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode()
#10 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(164): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode()
#11 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(106): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode()
#12 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php(93): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate()
#13 /var/www/html/dstart10/web/core/lib/Drupal/Core/TypedData/TypedData.php(132): Drupal\Core\TypedData\Validation\RecursiveValidator->validate()
#14 /var/www/html/dstart10/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php(518): Drupal\Core\TypedData\TypedData->validate()
#15 /var/www/html/dstart10/web/core/lib/Drupal/Core/Entity/ContentEntityForm.php(188): Drupal\Core\Entity\ContentEntityBase->validate()
#16 [internal function]: Drupal\Core\Entity\ContentEntityForm->validateForm()
#17 /var/www/html/dstart10/web/core/lib/Drupal/Core/Form/FormValidator.php(82): call_user_func_array()
#18 /var/www/html/dstart10/web/core/lib/Drupal/Core/Form/FormValidator.php(274): Drupal\Core\Form\FormValidator->executeValidateHandlers()
#19 /var/www/html/dstart10/web/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm()
#20 /var/www/html/dstart10/web/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormValidator->validateForm()
#21 /var/www/html/dstart10/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm()
#22 /var/www/html/dstart10/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#23 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#24 /var/www/html/dstart10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#25 /var/www/html/dstart10/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#26 /var/www/html/dstart10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#27 /var/www/html/dstart10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#28 /var/www/html/dstart10/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#29 /var/www/html/dstart10/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#30 /var/www/html/dstart10/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#31 /var/www/html/dstart10/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#32 /var/www/html/dstart10/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#33 /var/www/html/dstart10/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#34 /var/www/html/dstart10/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#35 /var/www/html/dstart10/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#36 /var/www/html/dstart10/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#37 /var/www/html/dstart10/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#38 /var/www/html/dstart10/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#39 /var/www/html/dstart10/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#40 /var/www/html/dstart10/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#41 /var/www/html/dstart10/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#42 /var/www/html/dstart10/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#43 {main}
💬 Support request
Status

Fixed

Version

2.0

Component

Price

Created by

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

Comments & Activities

Production build 0.71.5 2024