1

A clean install of CiviCRM on Wordpress crashes whenever I select ZMK as default currency. My installation details are:

WordPress version 5.9.2
Current theme: Twenty Twenty-Two (version 1.1) Current plugin: CiviCRM (version 5.47.2)
PHP version 8.0.16

=============
An error of type E_ERROR was caused in line 19 of the file /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/vendor/brick/money/src/Exception/UnknownCurrencyException.php. Error message: Uncaught Brick\Money\Exception\UnknownCurrencyException: Unknown currency code: ZMK in /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/vendor/brick/money/src/Exception/UnknownCurrencyException.php:19
Stack trace:
#0 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/vendor/brick/money/src/ISOCurrencyProvider.php(120): Brick\Money\Exception\UnknownCurrencyException::unknownCurrency()
#1 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/vendor/brick/money/src/Currency.php(91): Brick\Money\ISOCurrencyProvider->getCurrency()
#2 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/vendor/brick/money/src/Money.php(189): Brick\Money\Currency::of()
#3 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/CRM/Utils/Money.php(209): Brick\Money\Money::of()
#4 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/CRM/Utils/Money.php(88): CRM_Utils_Money::formatUSLocaleNumericRounded()
#5 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/CRM/Core/Resources/Common.php(219): CRM_Utils_Money::format()
#6 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/CRM/Core/Resources/Common.php(128): CRM_Core_Resources_Common::coreResourceList()
#7 /home/monkey/public_html/civic/wp-content/uploads/civicrm/templates_c/CachedCiviContainer.a02b080bd0d8fdf7053d123f1aecc5d2.php(807): CRM_Core_Resources_Common::createFullBundle()
#8 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/vendor/symfony/dependency-injection/Container.php(306): CachedCiviContainer->getBundle_CoreResourcesService()
#9 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/Civi.php(174): Symfony\Component\DependencyInjection\Container->get()
#10 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/CRM/Core/Resources.php(214): Civi::service()
#11 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm/CRM/Core/Resources.php(382): CRM_Core_Resources->addBundle()
#12 /home/monkey/public_html/civic/wp-content/plugins/civicrm/civicrm.php(1087): CRM_Core_Resources->addCoreResources()
#13 /home/monkey/public_html/civic/wp-content/plugins/civicrm/includes/civicrm.admin.php(761): CiviCRM_For_WordPress->add_core_resources()
#14 /home/monkey/public_html/civic/wp-includes/class-wp-hook.php(307): CiviCRM_For_WordPress_Admin->admin_page_load()
#15 /home/monkey/public_html/civic/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#16 /home/monkey/public_html/civic/wp-includes/plugin.php(474): WP_Hook->do_action()
#17 /home/monkey/public_html/civic/wp-admin/admin.php(237): do_action()
#18 {main}
  thrown```

After this, I can't do anything else under the CiviCRM menu. 

1 Answer 1

0

Yes this seems like a bug. Can you make a ticket at https://lab.civicrm.org/dev/financial/-/issues/new ?

Looks like it changed to ZMW in 2013.

If you have access to the mysql database you can get your site back by doing UPDATE civicrm_setting SET value='s:3:"USD";' WHERE name='defaultCurrency';

1
  • 1
    Thanks Demerit! That worked for me. I have reported the issue accordingly.
    – Sam Phiri
    Commented Mar 18, 2022 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.