2

I'm running CiviCRM 4.7.6 with WordPress 4.4.2.

I've created a new membership type called "guest" and set the minimum fee to $25.00. However, in the list of membership types, the minimum fee showed blank, so edited the type to add a minimum fee, but it still shoes blank.

I've also created a separate membership type called "executive" which is a zero dollar membership intended track which members are on the board, and we give them additional permissions using a Smart Group and ACLs. This works fine, however, when you create a new "executive" and select the "executive" membership type you have to "record a payment" and set the amount to zero because otherwose I get the following text in the Amount field:

Invalid format passed to CRM.formatMoney

I'm guessing these two issues are related, and that somehow the minimum fee being passed from the membership type record is invalid causing the error text to be pasted.

I failed to reproduce the problem with the Demo site, which leads me to fear there might be an issue with the database.

Has anyone seen this problem, and is there a known solution for it?

2
  • I just noticed that not only minimum fees have disappeared, but also all of our the dollar values from our recorded membership contributions are blank. Apr 28, 2016 at 20:29
  • added tag for currency since that might help others
    – petednz - fuzion
    May 1, 2016 at 6:08

1 Answer 1

1

After spending time to resolve this across several days and working with our site administrator to troubleshoot we figured it out. The site administrator was able to confirm that the values were being stored in the database, so it was probably something to do with formatting.

I eventually discovered that the display rules were configured wrong. It was configured as follows:

Monetary Amount Display: %c %a

Monetary Value Display: %c

As I understand it, the formatting rules here are nested. When you're trying to display currency, it first looks to "Monetary Amount Display" to figure out how to display the value. In the case above, it was telling it to display the currency symbol with %c followed by the amount with %a.

The second field, "Monetary Value Display" contains the rules for displaying the value requested by %a. With the example above, the rules were to show the currency symbol for the value, which was invalid, so it chose not to show values at all.

I corrected the setting as follows:

Monetary Value Display: %!i

This instructs CiviCRM to display the value using the localization rules specified earlier in the form but to suppress the currency symbol. We don't need it, since we're adding a currency specific symbol in the "Monetary Amount Display" field.

I hope my frustration will save someone else some pain later on!

2
  • Good sleuthing and thanks for closing the loop on this. Do you think someone on your system changed the values and in doing so made an error or something else triggered this breakage? When I look at demo site (which has out of the box settings) i see the %!i for Monetary Value Display. Not trying to rub salt in wounds or anything, just unclear if you know what created the problem.
    – petednz - fuzion
    May 1, 2016 at 6:07
  • I'm not sure. It's possible I may have done it. At first, we weren't getting a currency symbol at all. I solved it by comparing our setting to a demo site. May 1, 2016 at 12:29

Your Answer

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

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