Database Exception when trying to add exchange rate
I have a Drupal 10.6.2 site running on localhost before going live. Commerce 3.2.0.
I have installed Commerce Exchanger + Commerce Currency Resolver.
I attempt to add an Exchange Rate at this page:
/admin/commerce/config/exchange-rates/add
Receive this error and nothing can be added or updated in the module:
The website encountered an unexpected error. Try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.commerce_exchanger_latest_rates' doesn't exist: SELECT "e"."source" AS "source", "e"."target" AS "target", "e"."value" AS "value", "e"."manual" AS "manual" FROM "commerce_exchanger_latest_rates" "e" WHERE "e"."exchanger" = :db_condition_placeholder_0; Array ( [:db_condition_placeholder_0] => ) in Drupal\commerce_exchanger\ExchangerManager->getLatest() (line 48 of modules/contrib/commerce_exchanger/src/ExchangerManager.php).
Drupal\Core\Database\StatementWrapperIterator->execute() (Line: 851)
Drupal\Core\Database\Connection->query() (Line: 524)
Drupal\Core\Database\Query\Select->execute() (Line: 48)
Drupal\commerce_exchanger\ExchangerManager->getLatest() (Line: 172)
Drupal\commerce_exchanger\Form\ExchangeRatesForm->form() (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm() (Line: 101)
Drupal\commerce_exchanger\Form\ExchangeRatesForm->buildForm()
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Comments
Comment #2
valicthe error suggests that the table `commerce_exchanger_latest_rates` haven't been installed alongside the module.
Can you try uninstall and install the module again?