title: Wrong database user

text:
# Question
Title: Wrong database user
Maybe I've been staring at this too long and am missing something obvious. I do this duplicating of the live site onto the dev site often, but today it's broken.

I created a copy of our site. It's on Drupal 7 and CiviRM 4.7.22. I can log into the site and visit CiviCRM. When I try to register for an event, it fails with errors. I turned on all the error reporting. It shows it is failing because it is using the wrong database user - it's trying to use the database user for the live site instead of this dev one. Everything is correct in the settings file - it links to the right database user. So where else should I be looking to find a place where it is looking at the wrong database user? Thanks!

UPDATE: Well, I ran an update to 4.7.30 and now it's fixed.

# Answer
> 1 votes
While this is an older thread I recently found myself in the exact same situation. (We copied live to dev and couldn't update anything - the wrong database user error kept popping up.)

Turns out that while the settings file database user was correct, the triggers in the database still had a reference to the live database user (the trigger definer). While I'm exploring if there's a way to update those trigger definers - I assume that in your case running a database upgrade did that for you.

EDIT: (thanks to Demerit) to fix the wrong database user, I rebuilt the database triggers using the Civi URL command and all is good.

---
Tags: database
---


title: Data Not Showing Up After Upgrade

text:
# Question
Title: Data Not Showing Up After Upgrade
We upgraded a site from 5.14.x to 5.16.3 and we are now seeing strange issues where some data is clearly in the system but it is not showing on the screen.

For examples, if you edit an address you can see the address on the screen before you edit it and you can see the lat/long data when you edit it but you do not see any of the other fields filled in.

The data is all in MySQL.

Also, we have an event in the system. We need to edit the *Info and Settings* tab. This tab loads blank.

All of the other tabs are fine.

We tried to create a new event and also get a blank screen.

There are no JavaScript errors showing up in the console and no errors being reported in CiviCRM.

Thank you in advance for your help.

# Answer
Thank you, @Lesley Carter - BackOffice - I had cleared the cache but I had not deleted the files in templates\_c. Clearing out templates\_c solved all the problems.
> 1 votes

---
Tags: civievent, upgrade, addresses
---


title: Contact reminder

text:
# Question
Title: Contact reminder
I have entered a contact in Civi. I want to reminder myself to contact her in a year. I don't have administer privileges. I can't find anything within the contact to let me do this.

# Answer
> 3 votes
You can create a scheduled Activity with this contact. https://docs.civicrm.org/user/en/latest/organising-your-data/activities/ via the Actions button on the contacts Summary screen

If you add the dashlet for activities to your dashboard, you will also be reminded of this whenever you log in until you mark the activity as completed.

# Answer
> 1 votes
If your administrator isn't willing to set up the scheduled reminders, then you could always just put a regular calendar reminder in your regular calendar.

---
Tags: contacts, scheduled-reminders, dates
---


title: Multisite on CiviCRM with Drupal 7

text:
# Question
Title: Multisite on CiviCRM with Drupal 7
I'm trying to install CiviCRM on my drupal multisite installation. To create the multisite i used this tutorial. As I read the doc for the CiviCRM multisite installation, i understood that i had to use my default site DB. Did I understand it wrong, or is there a way to use separate DBs for CiviCRM multisites ?

Thanks in advance for your advices.

# Answer
> 1 votes
Yes, You can use the same db of drupal as well as use the separate db, civicrm gives the option to add another db. If you want to use another db for civicrm then you have to create the db first and enter the name at time of installation , If you are first time installing civicrm use this doc .Civicrm use civicrm.settings.php to use the database connection,you can also check out that.

And as you said you have multisite installation you can placed the civicrm at /sites/all/modules to be accessible to all your drupal sites

---
Tags: drupal, multisite
---


title: Out of country addresses

text:
# Question
Title: Out of country addresses
How do I add another country to the address field on CiviCRM 5.13.5? I cannot find a way under settings to alter my options. Only "United States" appears.

# Answer
> 2 votes
It's under Administer -\> Localization -\> Languages, Currency, Locations. Closer to the bottom of the page.

---
Tags: contacts
---


# Question
Title: Geocoder error in log but no geocoder configured or wanted
CiviCRM 4.7.31 WordPress 5.2.2

I get this error in the log file but don't have any geocoding provider selected (nor wanted) in Settings -\> Mapping and Geocoding Providers. I think this is happening when new contacts are entered. It does not stop the contact from being entered successfully.

Any ideas what to change to stop this error (short of adding a geocoding provider, do not want that).

Message: Aug 28 10:03:44 \[error\] Configured geocoder is invalid, must provide a format method Array ( \[geocode\_class\] =\> )

# Answer
> 2 votes
You probably had it set to yahoo at some point, and then when yahoo was removed somehow the setting didn't get blanked out, so it's looking for the yahoo code files but they aren't there anymore. Did you try just re-saving the page at Mapping and Geocoding Providers with none selected? That should clear it.

---
Tags: wordpress, error, geocoding
---


# Question
Title: Pass parameter in URL to select Other field on contribution page
It's possible to pass an amount to fill in the other field in the URL to a contribution page:

How can I pass in the contribution amount via URL?

But is it possible to pass a parameter in the URL to select other amount?

There doesn't seem to be any way to set other as the default even in the contribution page settings.

You can change the selected donation amount to any other option by passing the id of the option in the URL with the input name, but you can't seem to select the other amount option in the same way, as it is actually a different input element.

# Answer
> 1 votes
Other than the issue of the "Other' radio button not being selected, the answer here should work for Other too: https://civicrm.stackexchange.com/a/12977/96

---
Tags: civicontribute, urls
---


# Question
Title: Event fees not showing on info page or registration page
Have set up an event with fees and pay later option (no payment processor installed yet)

The fee list does not show on the event info page,

And when following the register now link no fee option is given there either...

But if you complete the registration and billing contact details, you get an error message...

Please correct the following errors in the form fields below: Select at least one option from Event Fee(s).

Running D7, and Civi 5.13.4

Checked on dmaster- can't replicate

Checked on another site running 5.13.4 and got the same error

Anyone else seen this?

Are there permissions I've not checked?

# Answer
> 2 votes
This was an issue with the CiviCalendar extension https://civicrm.org/extensions/civicalendar/330. Disabled the extension and it works. New update to CiviCalendar 3.30 fixes the issue.

---
Tags: civievent
---


# Question
Title: How do I get CiviXero to process contributions missed in the first run?
I've got the first 10 items for CiviXero transferred and it is transferring any new invoices. I set the start date to the start of the month but it does not seem to be adding the items missed in the first run after the first 10 items.

* How do I get CiviXero to add a specific contribution to it's account\_invoice table for consideration?
* How do I get CiviXero to process a specific contribution. I've tried invoice push job with contribution\_id as the argument. Without the item being in account\_invoice it doesn't consider it as needing being pushed.

# Answer
> 3 votes
> How do I get CiviXero to add a specific contribution to it's account\_invoice table for consideration?

I think if you just edit and save the contribution, it should be added to this table (provided it does not end up with any error).

> How do I get CiviXero to process a specific contribution. I've tried invoice push job with contribution\_id as the argument. Without the item being in account\_invoice it doesn't consider it as needing being pushed.

Only the rows present in "civicrm\_account\_invoice" is considered by the civixero extension to push to xero. So if the contribution id is not present in this table, you need to make sure it does.

After a record is added to 'civicrm\_account\_invoice' table, you can use `contribution_id` param to push a single payment to xero.

---
Tags: civixero
---


title: How to fix stripe webhook settings?

text:
# Question
Title: How to fix stripe webhook settings?
I am on civi 5.16.3, drupal 7.X and stripe 5.4.1 and when setting up stripe webhook, keep receiving this message. how can I fix it please? Thanks

# Answer
> 5 votes
I would follow the instructions on screen:

* Log in to your Stripe account, go to the Webhooks section
* Delete the existing webhook (on live and testing sides)
* Come back to CiviCRM and use the "Update/Create Webhook" button

# Answer
> 2 votes
If you think the webhook URL is correct and the extension is still printing the error message on the status page and the same is also not getting fixed by `Fix Stripe Webhook`, make sure -

* You have correct latest API version set for your webhook.
* Only a bunch of events are enabled for triggering the webhook instead of "All Events". The events currently supported by the extension is -

1. invoice.payment\_succeeded
    2. invoice.payment\_failed
    3. charge.failed
    4. charge.refunded
    5. charge.succeeded
    6. customer.subscription.updated
    7. customer.subscription.deleted

---
Tags: payment-processor, stripe, settings
---


title: SMARTY error with template

text:
# Question
Title: SMARTY error with template
I have this issue I don't understand with a civirule that should be sending an email with a .pdf attached when adding a member to a group but it's blocked by Smarty during the process of merging the fields and creating the pdf file.

If I look at Drupal's log, I can identify these User error. I checked the html code with the W3C validator and there's nothing special at it.

They are all related to the style but I don't know how and if can improve anything except using inline style but it's a pdf not an email.

I tried with CKEditor turned off and it changed nothing.

Here are some examples:

```
User error : Smarty error: [in string:<meta content="text/html; charset=utf-8" http-equiv="content-type" /> <title></title> <style>@page { size: 21cm 29.7cm; margin-left: 1.5cm; margin-right: 1.5cm; margin-top: 1.5cm; margin-bottom: 1.1cm } p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; orphans: 2; widows: 2; background: transparent } p.western { font-family: "Times New Roman", serif; font-size: 10pt; } h1 { margin-bottom: 0.11cm; direction: ltr; color: #000000; orphans: 2; widows: 2; background: transparent; page-break-after: avoid } h1.western { font-family: "Arial", sans-serif; font-size: 14pt; font-weight: bold } a:link { color: #000080; text-decoration: underline } a:visited { color: #800000; text-decoration: underline } </style> <table align="center" border="0" cellpadding="0" cellspacing="0" class="background" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 100%;" width="100%"> <tbody> <tr> <td align="center" bgcolor="#FFFFFF" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;" valign="top"> <table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" class="wrapper" style="outline: none;border-collapse: collapse; border-spacing: 0; padding: 0; width: inherit;" width="100%"> <tbody> <tr> <td align="center" style="padding: 0px 0px 0px 0px;border-collapse: collapse; border-spacing: 0; margin: 0;" valign="top"><!-- Header Logos --> <div style="padding-bottom:130px"><img alt="logo_SNPMNS" id="logo_SNPMNS" src="https://media.all-in-group.fr/SNPMNS/gestad/Logox2.png" style="border-width: 0px; border-style: none; float: left; width: 385px; height: 117px; margin: 0px;padding-left: 30px;" /> <img alt="axa_logo" id="axa_logo" src="https://media.all-in-group.fr/SNPMNS/gestad/axa_logo.png" style="float: right; border-width: 0px; border-style: none; width: 79px; height: 77px; margin: 0px;padding-right:30px;padding-top:20px;" /></div> <!-- Corps de lettre --> <div style="padding-top:130px"> <p class="western" style="margin-left: 8.4cm; margin-bottom: 0cm; orphans: 2; widows: 2; background: transparent; page-break-before: auto"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>Guillaume Sorel<br />vfdbv<br /><br />bvxb bsv</b></font></p>   <p align="center" class="western"><font face="Arial, sans-serif" size="4" style="font-size: 14pt"><b>ATTESTATION D’ASSURANCE RESPONSABILITÉ CIVILE PRESTATAIRE DE SERVICE </b></font></p>   <p class="western"><font face="Arial, sans-serif"><font size="2" style="font-size: 10pt"><u><b>Contrat d’assurance n° 639 7892 90 000</b></u> </font></font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>CABINET D’ASSURANCE Sébastien FARINA<br />16, rue Alfred Couturier 78160 - MARLY LE ROI<br />Tél. : 01 39 16 24 15</b></font></p>   <p class="western" style="margin-bottom: 0cm; text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">M. Sorel,<br />Conformément à l’obligation d’assurance du Code du Sport et du Code de la Consommation, nous vous signalons que votre contrat d’assurance couvre, en correspondance avec votre cotisation syndicale, la période du </font></p> <h1 align="center" class="western"><font face="Arial, sans-serif" size="2" style="font-size:10pt">28 août 2019 AU 27 août 2020</font></h1>   <hr />  <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Nous soussignés, SNPMNS 80, boulevard du Général Leclerc B.P.3 92113 CLICHY la GARENNE certifions que :</font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Guillaume Sorel - vfdbv - bvxb bsv</font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">a versé, au titre de la cotisation syndicale comprenant l’assurance pour l’année à date anniversaire de l’adhésion la somme de </font></p> <p class="western" style="text-align: center;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>SOIXANTE TREIZE EUROS (73 €)</b></font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">La présente vous est adressée pour toute utilisation, employeur ou autre demande.<br />Restant à votre disposition pour tout renseignement complémentaire, veuillez agréer, cher(e) collègue mes salutations distinguées.</font></p> <div style="padding-right:30px;"> <p align="right" class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Le trésorier,<br />Roland MEUNIER</font></p> <p align="right"><img alt="signature_roland-meunier" border="0" float="right" height="84" id="signature_roland-meunier" src="https://media.all-in-group.fr/SNPMNS/gestad/signature_roland-meunier.jpg" width="94" /></p> </div> </div> <!-- Footer --> <div style="text-align: center;" title="footer"> <p align="center"><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">Centre du Landy <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> 80, boulevard du Général Leclerc B.P. 3 <b>•</b> Clichy-la-Garenne Cedex<br />Téléphone : 01 42 42 95 34 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> Syndicat régi par la loi du 21 Mars 1884 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> N° Enregistrement : 92 11 81<br /><a href="mailto:snpmns.org@gmail.com" style="color:#2a6099;text-decoration: none;">snpmns.org@gmail.com</a> <a href="https://www.snpmns.org" style="color:#2a6099;text-decoration:none">www.snpmns.org</a></font></p> </div> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> line 9]: syntax error: unrecognized tag: color: #800000; text-decoration: underline (Smarty_Compiler.class.php, line 441) dans Smarty->trigger_error() (ligne 1100 dans /home/allingro/gestad/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).

User error : Smarty error: [in string:<meta content="text/html; charset=utf-8" http-equiv="content-type" /> <title></title> <style>@page { size: 21cm 29.7cm; margin-left: 1.5cm; margin-right: 1.5cm; margin-top: 1.5cm; margin-bottom: 1.1cm } p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; orphans: 2; widows: 2; background: transparent } p.western { font-family: "Times New Roman", serif; font-size: 10pt; } h1 { margin-bottom: 0.11cm; direction: ltr; color: #000000; orphans: 2; widows: 2; background: transparent; page-break-after: avoid } h1.western { font-family: "Arial", sans-serif; font-size: 14pt; font-weight: bold } a:link { color: #000080; text-decoration: underline } a:visited { color: #800000; text-decoration: underline } </style> <table align="center" border="0" cellpadding="0" cellspacing="0" class="background" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 100%;" width="100%"> <tbody> <tr> <td align="center" bgcolor="#FFFFFF" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;" valign="top"> <table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" class="wrapper" style="outline: none;border-collapse: collapse; border-spacing: 0; padding: 0; width: inherit;" width="100%"> <tbody> <tr> <td align="center" style="padding: 0px 0px 0px 0px;border-collapse: collapse; border-spacing: 0; margin: 0;" valign="top"><!-- Header Logos --> <div style="padding-bottom:130px"><img alt="logo_SNPMNS" id="logo_SNPMNS" src="https://media.all-in-group.fr/SNPMNS/gestad/Logox2.png" style="border-width: 0px; border-style: none; float: left; width: 385px; height: 117px; margin: 0px;padding-left: 30px;" /> <img alt="axa_logo" id="axa_logo" src="https://media.all-in-group.fr/SNPMNS/gestad/axa_logo.png" style="float: right; border-width: 0px; border-style: none; width: 79px; height: 77px; margin: 0px;padding-right:30px;padding-top:20px;" /></div> <!-- Corps de lettre --> <div style="padding-top:130px"> <p class="western" style="margin-left: 8.4cm; margin-bottom: 0cm; orphans: 2; widows: 2; background: transparent; page-break-before: auto"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>Guillaume Sorel<br />vfdbv<br /><br />bvxb bsv</b></font></p>   <p align="center" class="western"><font face="Arial, sans-serif" size="4" style="font-size: 14pt"><b>ATTESTATION D’ASSURANCE RESPONSABILITÉ CIVILE PRESTATAIRE DE SERVICE </b></font></p>   <p class="western"><font face="Arial, sans-serif"><font size="2" style="font-size: 10pt"><u><b>Contrat d’assurance n° 639 7892 90 000</b></u> </font></font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>CABINET D’ASSURANCE Sébastien FARINA<br />16, rue Alfred Couturier 78160 - MARLY LE ROI<br />Tél. : 01 39 16 24 15</b></font></p>   <p class="western" style="margin-bottom: 0cm; text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">M. Sorel,<br />Conformément à l’obligation d’assurance du Code du Sport et du Code de la Consommation, nous vous signalons que votre contrat d’assurance couvre, en correspondance avec votre cotisation syndicale, la période du </font></p> <h1 align="center" class="western"><font face="Arial, sans-serif" size="2" style="font-size:10pt">28 août 2019 AU 27 août 2020</font></h1>   <hr />  <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Nous soussignés, SNPMNS 80, boulevard du Général Leclerc B.P.3 92113 CLICHY la GARENNE certifions que :</font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Guillaume Sorel - vfdbv - bvxb bsv</font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">a versé, au titre de la cotisation syndicale comprenant l’assurance pour l’année à date anniversaire de l’adhésion la somme de </font></p> <p class="western" style="text-align: center;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>SOIXANTE TREIZE EUROS (73 €)</b></font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">La présente vous est adressée pour toute utilisation, employeur ou autre demande.<br />Restant à votre disposition pour tout renseignement complémentaire, veuillez agréer, cher(e) collègue mes salutations distinguées.</font></p> <div style="padding-right:30px;"> <p align="right" class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Le trésorier,<br />Roland MEUNIER</font></p> <p align="right"><img alt="signature_roland-meunier" border="0" float="right" height="84" id="signature_roland-meunier" src="https://media.all-in-group.fr/SNPMNS/gestad/signature_roland-meunier.jpg" width="94" /></p> </div> </div> <!-- Footer --> <div style="text-align: center;" title="footer"> <p align="center"><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">Centre du Landy <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> 80, boulevard du Général Leclerc B.P. 3 <b>•</b> Clichy-la-Garenne Cedex<br />Téléphone : 01 42 42 95 34 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> Syndicat régi par la loi du 21 Mars 1884 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> N° Enregistrement : 92 11 81<br /><a href="mailto:snpmns.org@gmail.com" style="color:#2a6099;text-decoration: none;">snpmns.org@gmail.com</a> <a href="https://www.snpmns.org" style="color:#2a6099;text-decoration:none">www.snpmns.org</a></font></p> </div> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> line 9]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 585) dans Smarty->trigger_error() (ligne 1100 dans /home/allingro/gestad/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).

```

Any ideas?

SOLUTION brought by DEMERIT: For javascripts and css in template, we have to use `{literal}...{/literal}` around javascripts or css style declaration. more on smarty documentation

# Answer
The styling needs to be wrapped in `{literal}...{/literal}` in the message template.
> 7 votes

---
Tags: smarty
---


title: Placeholders instead of labels in forms

text:
# Question
Title: Placeholders instead of labels in forms
We would like to use placeholders instead of labels on all our CiviEvent and Contribution forms. What is the best way to do this? We are using CiviCRM with Drupal.

We would like it appear like this:

instead of this:

We have been hiding the labels and setting the placeholder text using the following JQuery in a Main.extra.tpl file. However, this code breaks every time we upgrade CiviCRM. I am currently working on upgrading from Civi 4.6.14 to 5.0.0 and am thinking there has to be a better way of doing this. Would it be possible for Civi to make it easy for users to choose to use placeholders instead of labels somehow?

```
// Hide all labels
cj('.label').hide();
cj('#payment_information fieldset:first legend').hide();
cj('input[name$="billing_middle_name"]').hide();

// If IE, then setting placeholder on Gift Amount field causes payment block not to appear
if (detectIE()) {
    //alert('IE ' + detectIE());

    // unhide label for Gift Amount
    cj('.other_amount-section .label').show();

    cj('#billing-payment-block input[type=text].crm-form-text, .custom_post_profile-group input[type=text].crm-form-text').each(function() {
        var label = cj('label[for="'+cj(this).attr('id')+'"]').hide(); // Hide all labels
        cj(this).attr('placeholder', cj.trim(label.text())).attr('title', cj.trim(label.text()).replace('*', ''));
    });
    cj('input[type=text].crm-form-text').each(function() {
        var label = cj('label[for="'+cj(this).attr('id')+'"]'); // Hide all labels
        cj(this).attr('title', cj.trim(label.text()).replace('*', ''));
    });

} else {

    cj('input[type=text].crm-form-text').each(function() {
        var label = cj('label[for="'+cj(this).attr('id')+'"]').hide(); // Hide all labels
        cj(this).attr('placeholder', cj.trim(label.text())).attr('title', cj.trim(label.text()).replace('*', ''));
    });

}

// Set Placeholder text and Tooltip to label defined in CiviCRM -- for all select2 menus
cj('div.select2-container').each(function() {
    var idselect = '#' + cj(this).attr('id');
    var label = cj(idselect + ' > label.select2-offscreen');
    var placeholder = cj.trim(label.text());
    var tooltip = placeholder.replace('*', '');
    cj(idselect + ' .select2-chosen').text(placeholder).attr('title', tooltip);
});

// Unhide all radio labels
cj('input[type=radio]').each(function() {
    cj(this).parent().parent().children('.label').show();
});

```

I would really appreciate any insight anyone could give. Thank you, Malachi

# Answer
> 1 votes
I've been working on a similar goal but I've been working in WordPress. I followed the advice given to me and added Caldera Forms with CF-CiviCRM. CF-CiviCRM is WordPress plugin that functions as a bridge between Calder Forms and CiviCRM. I fully appreciate that you are currently in Drupal. You really need to decide if you are on the right platform for your ultimate goal. If you have the coding chops to pull this off, keep going the way you are going. On the other hand, if you want an existing solution to the problem you've presented, Wordpress with CiviCRM and Caldera Forms is a very workable solution.

---
Tags: civievent, civicontribute, forms
---


# Question
Title: How can I limit CiviDiscount codes to be used for a maximum number of participants rather than amount of times?
For some of the events we host we want to give our sponsors a certain number of free/discounted tickets. We allow them to purchase tickets for multiple participants at the same time.

We have set up discount codes for each of the sponsors that can be used a limited number of times. but this doesn't prevent them signing up 10 people at one time and therefore purchasing 10 tickets but only using up one discount code.

Is there a way to limit the number of participants a discount code can be used for rather than limiting by the number of times it is used? or is there another way we could achieve this?

Ideally if the sponsor wanted to purchase 10 tickets all at the same time but only get 5 discounted tickets they would get the first 5 for the discounted price and the next 5 they would need to pay full price for.

# Answer
You might try installing the Redeem By Participant extension, which changes CiviDiscount's default behavior of only incrementing the use count by 1 no matter how many registrations are included in a single transaction. With this extension, if a sponsor purchases 10 tickets at the same time, the use count of the discount code would be incremented by 10 (rather than by 1), which may help your use case.

https://github.com/ginkgostreet/com.ginkgostreet.cividiscount.rbp

(I realize this is a very old question, and you may have solved this already, but this is an option that might help someone else.)
> 2 votes

---
Tags: civievent, cividiscount
---


# Question
Title: How can I suppress the presentation of discount codes in receipts?
We use discount codes widely for our events, including the use of what I'd call 'admin-only' codes so that we can apply discounts to registrations that we make on behalf of people like speakers, representatives of event sponsors, etc.

Whilst it is helpful to to clearly show in the receipt/confirmation email that the event fee has been discounted, we don't really want the code itself to be included, as this is an internal code and not for wider use.

Is there a way to suppress the inclusion of the code in the receipt, perhaps still allowing the description text for the code to be included?

# Answer
> 2 votes
I've edited the message template and used a `truncate` filter on the `$line.label` to hide the discount code. Something like this is what I've done:

```
<td {$tdfirstStyle}>
{* Truncate $line.label to hide a discount code if present for certain event types *}
{if $event.event_type_id == 12}
  {if $line.html_type eq'Text'}
    {$line.label|truncate:7:"":false:false}
  {else}
    {$line.field_title} - {$line.label|truncate:7:"":false:false}
  {/if}
{else}
  {if $line.html_type eq 'Text'}
    {$line.label}
  {else}
    {$line.field_title} - {$line.label}
  {/if}
{/if}
{if $line.description}
  <div>{$line.description|truncate:30:"..."}</div>
{/if}
</td>

```

I think for this to work cleanly you might need to have Fee Levels with names of similar character count. There might be some other output filter that would work better than `truncate`... I recall trying to use some sort of RegEx filter that didn't work.

---
Tags: cividiscount
---


title: Lots of database errors

text:
# Question
Title: Lots of database errors
Good evening, I am getting alot of errors when clicking on Mailings, Events, and Contributions. This all used to work before upgrading to 4.6.17. I am using this version as I am using Drupal 6, and PHP 5.5/6. Any quick suggestions?

An Example of this is here dealing with Mailings:

```
#0 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(182): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/seal/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/seal/public_html/sites/all/modules/civicrm/packages/DB.php(979): PEAR_Error->PEAR_Error("DB Error: a515ac9c2796ca0e23adbe92c68fc9fc", "a515ac9c2796ca0e23adbe92c68fc9fc", 16, (Array:2), "\n            SELECT      civicrm_mailing.id,\n                        civicr...")
#4 /home/seal/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error("a515ac9c2796ca0e23adbe92c68fc9fc", 16, (Array:2), "\n            SELECT      civicrm_mailing.id,\n                        civicr...")
#5 /home/seal/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, "a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, "\n            SELECT      civicrm_mailing.id,\n                        civicr...", "DB_Error", TRUE)
#6 /home/seal/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(929): DB_common->raiseError("a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, NULL, "1055 ** Expression #3 of SELECT list is not in GROUP BY clause and contains n...")
#7 /home/seal/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/seal/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("\n            SELECT      civicrm_mailing.id,\n                        civicr...")
#9 /home/seal/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2442): DB_common->query("\n            SELECT      civicrm_mailing.id,\n                        civicr...")
#10 /home/seal/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("\n            SELECT      civicrm_mailing.id,\n                        civicr...")
#11 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(321): DB_DataObject->query("\n            SELECT      civicrm_mailing.id,\n                        civicr...")
#12 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1181): CRM_Core_DAO->query("\n            SELECT      civicrm_mailing.id,\n                        civicr...", TRUE)
#13 /home/seal/public_html/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php(2523): CRM_Core_DAO::executeQuery("\n            SELECT      civicrm_mailing.id,\n                        civicr...", (Array:0))
#14 /home/seal/public_html/sites/all/modules/civicrm/CRM/Mailing/Selector/Browse.php(315): CRM_Mailing_BAO_Mailing->getRows(0, 50, Object(CRM_Utils_Sort), " AND civicrm_mailing.sms_provider_id IS NULL AND (civicrm_mailing.scheduled_i...", (Array:0))
#15 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php(403): CRM_Mailing_Selector_Browse->getRows(4, 0, 50, Object(CRM_Utils_Sort), 2, NULL)
#16 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php(340): CRM_Core_Selector_Controller->getRows(Object(CRM_Core_Selector_Controller))
#17 /home/seal/public_html/sites/all/modules/civicrm/CRM/Mailing/Page/Browse.php(233): CRM_Core_Selector_Controller->run()
#18 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Mailing_Page_Browse->run((Array:4), NULL)
#19 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
#20 /home/seal/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#21 /home/seal/public_html/sites/all/modules/civicrm/drupal/civicrm.module(360): CRM_Core_Invoke::invoke((Array:4))
#22 [internal function](): civicrm_invoke("mailing", "browse", "unscheduled")
#23 /home/seal/public_html/includes/menu.inc(350): call_user_func_array("civicrm_invoke", (Array:3))
#24 /home/seal/public_html/index.php(17): menu_execute_active_handler()
#25 {main}

```

# Answer
Since you are using very old and unsecured version of Civi I would recommend you to upgrade CiviCRM. I have tested it for 4.7.31 and its working fine provided you have certain modules that are compatible on CiviCRM 4.6 or less. The other alternate approach is to turn off ONLY\_FULL\_GROUP\_BY for sql\_mode of mysql
> 2 votes

---
Tags: drupal
---


# Question
Title: How do I delete registrations and automatically recalculate the invoice total?
An end user registered too many people for an event. The client removed participants but the invoice total is not automatically recalculated to reflect fewer participants. Is there a proper way to do this or how do I make the correction to the invoice?

# Answer
I believe this is possible with the Line Item Editor extension.
> 2 votes

---
Tags: civievent, civicontribute, invoice
---


# Question
Title: How do I bulk import Communication/Privacy preferences?
I want to import a large group of people and some of them have opted out of SMS communications and some have opted out of email communications. I have tried multiple ways of entering the fields in my CSV files and none of them will import properly. For example, I created a column "Do Not Email" and in the field for those who wanted do not want to receive email I put "YES" and the file imported properly, but the contact record does not say Do Not Email. What is the correct way to add this information?

# Answer
> 3 votes
Use the number "1" for yes and a blank for no.

One way to see this is if you do an export and then look at how it outputs it.

---
Tags: data-import
---


# Question
Title: CiviCRM isn't recognising CSV files as CSV files
How do I fix this? It's urgent!

When I try to upload a CSV file, CiviCRM does not recognize it as such.

# Answer
CSV files aren't a single common format. For instance, in the US, fields are often separated by commas, but in Europe, often by semicommas. If you're importing, there should be an "import field separator" option (see screenshot).

Ultimately, there's not enough information in your question to help you. Others have made suggestions as to how to better ask the question to get better help. I hope you report back with the solution if you find it!
> 3 votes

# Answer
Some options to consider

* sometimes if you save a csv in eg LibreOffice and then edit it again and resave it can be rejected by civicrm, in which case simply try opening your csv, copy all cells in to a new csv, then save and do not re-edit that file or try the below method
* sometimes an Excel generated csv can be a problem, in which case perhaps try loading as a Google sheet, then downloading a csv from there
> 2 votes

---
Tags: csv
---


title: Hiding Fields or Disabling Them?

text:
# Question
Title: Hiding Fields or Disabling Them?
Can you disable or hide fields in the Individual window?

# Answer
Are you referring to the "Summary" tab when viewing a contact? If so, you can do so by installing the Contact Layout Editor extension.

Note also that many (not all) fields can be disabled from **Administer menu » Customize Data and Screens » Display Preferences**.
> 1 votes

---
Tags: custom-fields, fields
---


# Question
Title: Set up Contribution page to only accept recurring contributions?
We would like to set up a contribution page that only accepts monthly recurring contributions. Is there a simple way to do this in CiviCRM?

This contribution page would be associated with a Campaign, and we would like to be able to use the contribution widget to display how many monthly recurring contributions we have received and count them towards a monthly contribution goal. For example, we would like to fundraise to cover a monthly cost, like rent, and set up the widget to display the total monthly cost, and the portion covered by monthly recurring donations.

We are using CiviCRM 5.6.0 with Drupal 7.

# Answer
Black Fly Solutions has an extension called ca.civicrm.contribution\_recur that enhances recurring contributions. One option it adds is to force recurring payments, which should meet your first need.

The contribution widget only shows total contributions, not total of recurring contributions. To show that you'd need a bit of custom work.
> 5 votes

# Answer
Similar to Black Fly's extension, I published a basic extension that only adds an option to force recurring donations (per contribution page setting). I would still recommend first testing Alan's extension, it has a much more complete feature set. I'm just adding this as an alternative, I wanted to implement it a bit differently.

To download: https://lab.civicrm.org/extensions/forcerecurring
> 4 votes

# Answer
It might be possible to use Webform CiviCRM (https://www.drupal.org/project/webform\_civicrm) to set up a page that forces recurring contributions. Conditionals can be set up to control terms, # of installments, and frequency of installments. I usually put those into a fieldset hidden from the end-user. If I recall correctly, it should be possible to set up open-ended recurring payments (term: 0). With this approach, you have more control over theming and placement and can do it for just one contribution page. Downside is increased overhead and training.
> 3 votes

---
Tags: civicontribute, contribution-page, recurring-contributions
---


title: What is the membership data?

text:
# Question
Title: What is the membership data?
I have logged in to CIvCRM for the first time to interrogate the membership data of my local Green party but I don't know how to find that data. Can you advise me? Jim

# Answer
Jim, Welcome CiviCRM SE. You can use membership search to find membership data or reports.

Search: CiviCRM \>\> Membership \>\> Find Memberships.

Reports: CiviCRM \>\> Reports \>\> Membership Reports.

Doc: https://docs.civicrm.org/user/en/latest/membership/what-is-civimember/

Cheers

Pradeep
> 1 votes

---
Tags: civievent
---


# Question
Title: How can I configure my contribution page so that recurring is not pre-selected by default?
Obviously, I want to provide the option for recurring but I do not want it to load the page with default recurring selected. I think this is the way most administrators would want it to work. Should be simple, right?

# Answer
> 1 votes
Actually in the iATS Extension we've gone back and forth on this but are now "is.checked" as many orgs/administrators make special "Donate monthly now" pages with specific appropriate defaults for monthly $amounts like $25 or $50 - typically less than the default on a "Donate one time" page. On a Donate monthly to get people through without extra checking of boxes - the default is now is.checked (if recurring is an option). To uncheck that box you need to add some Javascript.

This is what you want:

```
$('#is_recur').attr('checked', false);

```

There are several ways to go about adding this \[and not sure this is the best one - but it's one that I understand, it's what I typically do\] - on Drupal 7:

In the theme's template.php - when preprocessing a page - I'll insert js - based on path:

So if we're on a `civicrm/event/transact` url -\> then load `civicrm-recurring.js`

and that `civicrm-recurring.js` file lives in the theme's js directory and looks like:

# Answer
> 1 votes
Apparently, enabling the iATS ACG/EFT payment processor on a donation page causes the recurring checkbox to be pre-checked. We're using CiviCRM with WordPress, with a child theme and a custom page template for the CiviCRM front end page. I was able to automatically uncheck the recurring checkbox by simply adding the following javascript to the CiviCRM page template, just after the content section:

```
    <script type="text/javascript">
        document.getElementById("is_recur").checked = false;
    </script>

```

---
Tags: civicontribute, contribution-page, recurring-contributions, javascript, iats
---


# Question
Title: Can civi pre-authorise funds for events and is only charged the amount if the registered participant is a no-show?
We have a client who wants to take a deposit fee for events and have it only processed if the participant is a no show. Is there a way to achieve this with Civi? Should we be talking to the payment processor about this?

We run on the latest version of Drupal 7 and the CiviCRM 5.13.x LTS version.

Thanks

# Answer
> 5 votes
Yes, the answer to this is - it depends on the Payment Processor that you use whether you can do this. With the CiviCRM iATS extension you could have people schedule a recurring contribution with one installment for a date in the future (perhaps the day after your event). What this will do is tokenize the credit card; on the future date the token with an amount are submitted to iATS for payment processing. So all you need to do is then make sure you cancel the recurring series ahead of the future date (for people who did show up).

We developed this for a number of reasons, including the abilty to tokenize card for $1 ahead of fundraising/silent auction events. Then on the evening of the event -\> you can process the card on file for any $amount for a fast checkout from within CiviCRM (and of course send a receipt to the donor).

---
Tags: civievent, civicontribute
---


title: Better Theme for CiviCRM

text:
# Question
Title: Better Theme for CiviCRM
I know this has been asked a few times, but I'm working with a group of folks in a new non-profit who tell me they want to move away from CiviCRM (recently installed) because it's not "beautiful" nor "intuitive", they claim people aren't using it. I think they really mean they want a bolder, more-updated style/theme than the standard Garland or Bartik I usually start with (because I care more about function than form). I think they are looking for something more in line with the Shoreditch extension effort (not sure if that is still in development), something bootstrap-feeling.

What would you all recommend to make Civi more pleasing to the eye, more readable? Is Shoreditch the way to go? If so, which base these should it be put on?

Or is there even a theme that doesn't use Shoreditch that I should be looking into? I don't want to lose folks from the great functionality and customization ability of Civi just because of the theme (I happen to be a huge fan, using it for 9 years now, I think). I'm even open to moving to WordPress if that provides better themes for Civi.

Side note: unfortunately, I haven't been able to discuss more details to find out what exactly they mean by "intuitive design" and things like that, to understand what they feel is missing. But I'm thinking I can provide a couple of theming options early on and see if that alone will give them comfort while we talk specifics later on. Thanks for any suggestions!

# Answer
> 3 votes
Apart from Shoreditch there is also the Haystack theme which can be found here: https://github.com/mattwire/civicrm-haystacktheme. As @petednz suggested, try them both?

---
Tags: theme
---


# Question
Title: Allowing users to update information without logging in
I have now followed all the instructions in the CiviCRM Cookbook (https://www.packtpub.com/web-development/civicrm-cookbook) as well as a similar post here on Stack (allow anonymous users to view profiles in WordPress?) but had no joy getting the URL right to get people to update their profile without having to log in.

The instructions state the following:

Using the CiviCRM checksum token in combination with a profile allows you to bypass the requirement to log in.

1. Create a profile you wish to use. The profile contains all the fields of information that you want the user to complete.
2. Make a note of the profile ID.
3. Enable Profile Listings and Forms access for anonymous and authenticated users in your CMS.
4. Now create a CiviMail mailing in the normal way.
5. You now need to use the {contact.checksum} token and the {contact. contact\_id} token to construct a link back to edit the profile you created: http://www.myorganization.org/civicrm/profile/ edit?reset=1&gid=N&id={contact.contact\_id}&{contact.checksum}
6. Substitute your website for http://www.myorganization.org.

Perhaps there was a print error in the book because I have tried numerous variable options to get this working without joy.

Any thoughts? Thanks

EDIT: Added example below.

https://crm.example.com/civicrm/profile/edit?reset=1&gid=1&id=2798&5fb7dfc93d6b855d75659da64805ac82\_1503574955\_179

# Answer
> 1 votes
The construction differs depending on your cms.

Best info imo is at docs.civicrm.org/dev/en/master/framework/civimail/tokens

You have pasted

civicrm/profile/edit?reset=1&gid=1&id=2798&5fb7dfc93d6b855d75659da64805ac82\_1503574955\_179

In point 5. you stated \** and the {contact. contact\_id}\** but i don't see that in your example.

You need to have **cid={contact. contact\_id}** in the string so will not work

# Answer
> 1 votes
As Pete says, your question (and Stack Exchange history) suggests you're using WordPress - but the example you added is using the Drupal URL construction.

In addition to Pete's answer, there's also the Fancy Tokens extension, which you can install from the in-app Extensions directory. It takes the pain out of this for you.

# Answer
> 0 votes
You can use this link to allow user to update their profile without logging in:

```
http://www.myorganization.org/mybasepage?page=CiviCRM&q=civicrm/profile/edit&reset=1&gid=2&id={contact.contact_id}&{contact.checksum}

```

Please note that:

* www.myorganization.org is the URL where CiviCRM is installed
* mybasepage is the basepage of your CiviCRM installation (usually it's civicrm, but it may vary)
* gid=2 is the profile ID number

(Found this solution here)

---
Tags: profile
---


# Question
Title: How to configure the MIGS Omnipay gateway?
I'm trying to combine MIGS and omnipay.

Steps 1. Download omnipay 2.5 https://civicrm.org/extensions/omnipay-multiprocessor-extension

```
sudo -u apache wget https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/archive/2.5.zip
sudo -u apache curl -s http://getcomposer.org/installer | sudo -u apache php
sudo mkdir /usr/share/httpd/.composer
sudo chown apache /usr/share/httpd/.composer

```
2. Unzip into files/civicrm/ext
3. Require MIGS: sudo -u apache ./composer.phar -v require omnipay/migs

I had to do a bit of hacking about. php7.0 and some dependency troubles.

* Edit vendor/omnipay/tests/composer.json - make dev

```
sudo -u apache mkdir /srv/web/docdownload.com.au/web/files/civicrm/ext/nz.co.fuzion.omnipaymultiprocessor-2.5/vendor/sebastian/global-state/src
sudo -u apache mkdir /srv/web/docdownload.com.au/web/files/civicrm/ext/nz.co.fuzion.omnipaymultiprocessor-2.5/vendor/sebastian/comparator/src
sudo -u apache mkdir /srv/web/docdownload.com.au/web/files/civicrm/ext/nz.co.fuzion.omnipaymultiprocessor-2.5/vendor/sebastian/diff/src/

```

Result

```
Using version ^2.2 for omnipay/migs
./composer.json has been updated

```

The omnipay extension is registered.

4. Registering MIGS with omnipay. I want an on-site, pass by xml processor.

I created a file Metadata/omnipay\_Migs\_TwoParty.mgd.php, cleared caches. I tried registering the payments processor and cannot see it in the list. Administration \> System Settings \> payment processors - civicrm/admin/paymentProcessor.

What goes into the metadata file omnipay\_Migs\_TwoParty.mgd.php? Has anybody created one before? Is there a document reference? Reverse engineer? Debug until it works? I created the minimum.

```
 return array(
   array(
    'name' => 'OmniPay - Migs_TwoParty',
    'entity' => 'payment_processor_type',
    'metadata' => array(
  ),
  'params' => array(
    'version' => 3,
    'title' => 'OmniPay - Migs_TwoParty',
    'name' => 'omnipay_Migs_TwoParty',
    'description' => 'Omnipay Migs_TwoParty Onsite processing',
    // DO NOT CHANGE: Labels are used as Omnipay gateway properties.
    'user_name_label' => 'Api Key',
    'password_label' => 'Password',
    // When ready we need to add signature_label & figure out how to pass through to tpl.
    //'signature_label' => 'Public Key (if wishing to use Client Encryption - recommended)',
    'class_name' => 'Payment_OmnipayMultiProcessor',
    'url_site_default' => 'http://unused.com',
    'url_api_default' => 'http://unused.com',
    'url_recur_default' => 'http://unused.com',
    'url_site_test_default' => 'http://unused.com',
    'url_recur_test_default' => 'http://unused.com',
    'url_api_test_default' => 'http://unused.com',
    'billing_mode' => 1,
    'payment_type' => 1,
    'is_recur' => 1,
    ),
  ),
);

```

# Answer
> 1 votes
I got this to work with the following meta-data file. omnipay\_Migs\_TwoParty.mgd.php. Since the field in the code is merchantAccessCode I changed the label for passwords to "Merchant access code'. Both the debugger and the error message show this.

```
return [
 [
   'name' => 'OmniPay - MIGS',
   'entity' => 'payment_processor_type',
   'params' => array(
     'version' => 3,
     'title' => 'OmniPay - MIGS',
     'name' => 'Migs_TwoParty',
     'description' => 'Omnipay MIGS',
     // DO NOT CHANGE: Labels are used as Omnipay gateway properties.
    'user_name_label' => 'Merchant Id',
    'password_label' => 'Merchant access code',
    'signature_label' => 'Secure Hash',
    'class_name' => 'Payment_OmnipayMultiProcessor',
    'url_site_default' => 'http://unused.com',
    'url_api_default' => 'http://unused.com',
    'url_recur_default' => 'http://unused.com',
    'url_site_test_default' => 'http://unused.com',
    'url_recur_test_default' => 'http://unused.com',
    'url_api_test_default' => 'http://unused.com',
    'billing_mode' => 1,
    'payment_type' => 1,
    'is_recur' => 1,
   ),
 ]
];

```

---
Tags: omnipay
---


# Question
Title: Is it possible to use CiviCRM tokens in external services?
Maybe this is a dumb question, but I'm quite new to CiviCRM.

Is it possible to use CiviCRM tokens in external services?

Let's say for example that I would like to use another mailing service instead of CiviMail to send an email to some of my contacts.

In the email, I would like to insert a link with which the recipients could update their profile, using:

```
http://www.myorganization.org/mybasepage?page=CiviCRM&q=civicrm/profile/edit&reset=1&gid=2&id={contact.contact_id}&{contact.checksum}

```

Is there any chance that `{contact.contact_id}` and `{contact.checksum}` are going to work?

# Answer
> 5 votes
Simple answer: No. Those tokens are expanded into text strings by CiviMail for each recipient and your third party service is not going to know what values to substitute for those.

Complex answer: Maybe. If your third party service has a way to allow you to provide tokens for substitution, and you can generate the correct data and format out of Civi then you might be able to make it work.

But it's much easier just to use CiviMail!

If you are comparing CiviMail with another mailing service, do make sure you are using the Mosaico extension \- it's way better than the old interface.

# Answer
> 0 votes
No.we cannot use the civicRM tokens in external services.Beause within the civimail only the tokens are going to be generate. And you can generate the correct data and format out by using civimail only.it is much easier.... just to use CiviMail!

---
Tags: tokens
---


# Question
Title: In mailing all recipients are not showing
I have a problem related to 'mailings'. When I create a new mailing and select a group (for example, 'current members') in 'Recipients' then it is not showing all recipients. For example, I have 5681 total contacts, 67 of which are in 'Current Members' group, but after selecting this group in mailing it is showing only 4 recipients. I have checked there are not any blocked contacts and there are also not "Do Not Call" for any contact.

I am using following versions

CiviCRM Version 4.7.17 Wordpress Version 4.7.3

# Answer
Indeed, civicrm automatically excludes from the mailing recipients contacts that:

* have opted out (do not contact me)
* have bounced
* have said they do not want to receive emails

(I might miss a criteria or two)

Check some of your "vanished" contacts, the contact summary page should make clear why she isn't included.

Bounce emails is a common issue. It *might* be that you had a technical problem once and that your mail server wasn't willing to deliver the emails (eg. because you have a quota on how many emails you can send per hour) and were incorrectly flagged as bounce.
> 3 votes

# Answer
I have a similar issue today, and this fixed it - https://medium.com/@simonjohnparker/mosaico-civimail-all-recipients-not-showing-when-selecting-a-group-for-mailing-5c35c8232996

which links back to this: CiviMail Does Not Send To A Whole Group
> 2 votes

---
Tags: groups, mailing
---


# Question
Title: Recording Funding Applications in CiviCRM
I'm just in the process of implementing a process in CiviCRM so that we can track donations against specific projects. It would also be great if we could record the approaches we've made to organisations, so we know that for example we've approached an organisation for the full amount of funding required for project X, wait until we get a response before applying to other organisations. This would also allow us to generally report on what applications had been made and for how much.

My first ideas are to use contribution statuses or financial types to achieve this. Does anyone have experience of implementing something like this, are there any problems created from using financial types or statuses in this way?

# Answer
I would recommend against using contribution type or contribution status as those have specific system uses for actually received contributions. Instead, you might try creating groups of contacts that have received your mailings or phone calls asking for contributions, perhaps based on whether the contact has specific activities under advanced search. If you want to target prospect contacts for donations of a specific amount I might create a custom field to contain the amount for the ask. You might want to make a Prospect contact type, add this contact type to the relevant contacts, and make the Target Ask' field a custom field of Prospects.
> 1 votes

# Answer
As others have suggested you could use activities for this type of question. If more process steps are involved than "just" keeping track of the fact that we approached them for a certain amount you could have a look at CiviCase as well. That is a little more involved but that might actually be what you are looking for in the longer run?
> 0 votes

---
Tags: civicontribute
---


title: PayPal Pro IPN returns 403 error

text:
# Question
Title: PayPal Pro IPN returns 403 error
Have been receiving email from PayPal that IPN is not working. One off donations were updated but not recurring payments. I am on CiviCRM 5.16.4

How can I fix it please?

I have tried this but still not working anyone getting "IPN warning" emails from PayPal?

EDIT: Content of the email, also added a screenshot of the paypal IPN screen

```
Dear Tapash Datta ,

Please check your server that handles PayPal Instant Payment Notifications (IPN). Instant Payment Notifications sent to the following URL(s) are failing:

https://example.com/sites/all/modules/civicrm/extern/ipn.php

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.

Thank you for your prompt attention to this issue.

Yours sincerely,

PayPal

```

# Answer
> 3 votes
Having reviewed this I believe that your Paypal is possibly configured to point to an older version of the IPN path.

You can change this yourself within your Paypal account, the docs I can see suggest:

To configure Instant Payments Notification (IPN) for your PayPal account Click: Profile, under Selling preferences click "Instant Payment Notification preferences" It looks like yours is currently set to: https://domain.org/sites/all/modules/civicrm/extern/ipn.php

However, it should now be set as: https://domain.org/civicrm/payment/ipn/3 where 3 is the payment processor id which you can get from Payment Processor screen(Administrator \>\> System Settings \>\> Payment Processor). This should fix any new payments setup / made.

For recurring payments that have already been setup what you would need to do is make a change to the site so that those old / failed recurring payments get forced onto the new path, once you've done that you'll need to 'replay' all the previously failed recurring payments from Paypal terminal. Depending on the number of transactions involved, this may involve some work from yourself in the Paypal site again. Or the other method is to use Notification log extension to do replay of failed transaction.

Cheers

Pradeep

---
Tags: payment-processor, paypal, recurring-contributions, payment
---


# Question
Title: Google geocoder prevents profile submission
I get the following error while doing a batch update via profile when Google geocoding is turned on or adding a record via a profile (donation page). The data doesn't even reach civi (no pending transaction), connection timed out instead. Donations sometimes work, but it is a small percentage of the time.

I had also disabled USPS Web Tools per this thread https://forum.civicrm.org/index.php%3Ftopic=24316.0.html and it worked temporarily but that doesn't appear to be the real fix.

I have tried regenerating an API key and trying to run it with USPS disabled and goecoding enabled.

It still works upon an import and while editing or adding on contact summary screen.

In the google API settings I have check all settings. There is no application restrictions. We did just switch servers however.

```
    Array
    (
        [callback] => Array
            (
                [0] => CRM_Core_Error
                [1] => handle
            )

        [code] => 110
        [message] => Connection timed out
        [mode] => 16
        [debug_info] =>
        [type] => PEAR_Error
        [user_info] =>
        [to_string] => [pear_error: message="Connection timed out" code=110 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]

)

```

Here is the backtrace:

```
  content/plugins/civicrm/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace()
#1 .../wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(PEAR_Error))
#2 .../wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(577): PEAR_Error->__construct("Connection timed out", 110, 16, (Array:2), NULL)
#3 .../wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(Net_Socket), "Connection timed out", 110)
#4 .../wp-content/plugins/civicrm/civicrm/vendor/pear/net_socket/Net/Socket.php(173): PEAR->__call("raiseError", (Array:2))
#5 .../wp-content/plugins/civicrm/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("ssl://maps.googleapis.com", 443, NULL, "60", NULL)
#6 .../wp-content/plugins/civicrm/civicrm/CRM/Utils/Geocode/Google.php(126): HTTP_Request->sendRequest()
#7 .../wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Address.php(1380): CRM_Utils_Geocode_Google::format((Array:18))
#8 .../wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Address.php(377): CRM_Core_BAO_Address::addGeocoderData((Array:18))
#9 .../wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Address.php(144): CRM_Core_BAO_Address::fixAddress((Array:18))
#10 .../wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Address.php(120): CRM_Core_BAO_Address::add((Array:18), TRUE)
#11 .../wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Location.php(70): CRM_Core_BAO_Address::create((Array:18), TRUE, NULL)
#12 .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(340): CRM_Core_BAO_Location::create((Array:18), TRUE)
#13 .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(2007): CRM_Contact_BAO_Contact::create((Array:18))
#14 .../wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Task/Batch.php(245): CRM_Contact_BAO_Contact::createProfileContact((Array:17), (Array:10), 282136, NULL, "31", NULL, TRUE)
#15 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(490): CRM_Contact_Form_Task_Batch->postProcess()
#16 .../wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#17 .../wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Contact_Form_Task_Batch), "next", "Next")
#18 .../wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contact_Form_Task_Batch), "next")
#19 .../wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Task_Batch), "next")
#20 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(349): HTML_QuickForm_Page->handle("next")
#21 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(311): CRM_Core_Controller->run((Array:4), (Array:0))
#22 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:13))
#23 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#24 .../wp-content/plugins/civicrm/civicrm.php(1392): CRM_Core_Invoke::invoke((Array:4))
#25 .../wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
#26 .../wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#27 .../wp-includes/plugin.php(465): WP_Hook->do_action((Array:1))
#28 .../wp-admin/admin.php(253): do_action("toplevel_page_CiviCRM")

```

On Civi 5.13.4 and WP 5.2.2. Anyone else experience this issue before or now?

# Answer
> 2 votes
I've now tested this and it works. Only change was removing W3TC and Fast Velocity Minify plugins but since we exempted civicrm pages I still have doubts that that was the cause.

# Answer
> -2 votes
Here is the guide to move update of USPS. You may find answer here.

https://postalpro.usps.com/mnt/glusterfs/2018-10/GuidetoMoveUpdate.pdf

Hopefully it helps!

---
Tags: profile
---


# Question
Title: Importing Notes with external identifier
I'm trying to import notes into CiviCRM with only an external identifier. Inside the current database, the contacts are already assigned these external identifiers correctly within CiviCRM.

I was recently given a .csv file with three columns: Name, External Id and Note. I need to ignore the name completely because the name in this .csv file is a combination of Prefix, First ,Last and Suffix as one field. The names don't match up with my current records, because each part of a contacts name within CiviCRM is its own field. Also, I believe there are too many string variances in the combined name structures to effectively parse them out into 4 fields with code.

So with that information, I am trying to ignore the name completely and using the External ID and Note only in the import.

**The setting I am using are:**
Contact Type: Individual
For Duplicate Contacts: No Duplicate Checking
Dedupe Rule: Left blank

**Field Mapping:**
Name: do not import
Id : External Identifier\*
Note: Note

**Result:**
9668 errors / 9668 rows
"Missing required fields: First Name and Last Name OR Email Address"

What is the point of an external identifier if CiviCRM still requires another identifier?

My real question is; How do I do an import with External ID only in the UI for individual notes? I am thinking about writing a PHP script to try and force the notes into the MySQL database, but setting up a custom script seems like overkill for something I thought would be trivial.

*Note: I can't use email because many of the contacts don't have one*

# Answer
> 3 votes
You need to choose 'Update' for 'For Duplicate Contacts' option on the import screen if you want to update the contact using import.

Cheers

Pradeep

---
Tags: import, external-id
---


# Question
Title: Mailchimp and CiviCRM: possible integration using custom contact fields?
looking for some advice about a potential Mailchimp integration.

I've used the wonderful Mailchimp CiviCRM Extension and it works great, but I'm not sure it will work for a specific case I've got.

If I understand correctly, the Extension only uses the main contact email of each contact, and maps that to groups that are synched with Mailchimp lists.

But each contact profile in this use case includes additional custom contact fields containing names and emails (as an example, an organizational profile includes contact names/emails for different departments).

My questions:

-- Is there any way to synch these groups of custom fields to specific Mailchimp lists?

-- If not (as I suspect!), how would you approach such an implementation? Create individual Civi contact entries for each of these subcontacts? Or is there a way to customize the Extension to use custom fields for synching?

The system in question is Joomla+CiviCRM at latest versions.

Any input appreciated!

# Answer
I don't think this is possible in mailchimp extension ATM. But its possible via creating a extension that will extend mailchimp and use the sync api/function or altering the mailchimp extension itself.

Thanks

Pradeep
> 1 votes

---
Tags: email, integration, mailchimp
---


# Question
Title: Is 'developer' tab in Reports now a deprecated feature?
In Civicrm 5.4 and in current version in WP Sandbox, it seems that the 'Developer' tab is no longer shown. What is the replacement/suggested method for adding a column to reports now?

# Answer
To view developer tab for the report the user will need 'CiviReport: view report sql' permission. This is new permission added in recent version of CiviCRM for broader access control.

You can set permission by navigating to CiviCRM \>\> Administer \>\> Users and Permissions \>\> Permissions (Access Control) \>\> WordPress Access Control

HTH

Pradeep
> 3 votes

---
Tags: civireport
---


# Question
Title: Image / file upload issue on civivolunteer public form
I am just wondering if file uploading (image) is supported in CiviVolunteer as I am having an issue where attaching an image to a volunteer signup form is not being captured / displayed on the view contact details page.

Is this possibly a bug or just not supported by CiviVolunteer?

For clarity on what I have done so far and the results I am experiencing.

We want to add a file upload option on volunteer sign up page that allows the volunteer to add a picture of themself.

So I created a new custom field (file upload) and assigned it to a volunteer application form profile with expected results. i.e: Field is displayed on public form and also available on the contact record.

However, once the form has been submitted and the new contact created the image is not available on the contact details page.

I assumed the image would be rendered next to the label or possibly a link to view elsewhere.

When editing the contact details from within Civi I am able to upload an image and then upon saving it is rendered on screen. So it seems that the file upload is working but just not via the public form.

Tested with CiviCRM 5.13.5 and Master branch of Volunteer.

I have attached screenshots to detail what is going on.

Thanks.

# Answer
da\_adamt, Welcome to CiviCRM SE. This seems to be bug in Civi Volunteer extension. I have just submitted a PR for this. Can you try applying patch from here?

Thanks

Pradeep
> 3 votes

# Answer
Can you explain the fix in the PR? I could not reproduce the problem, but I made the mistake of grabbing an instance that is not up to date with civicrm core. So, I gather this must be caused by a change in core for profile processing.

hmmm... I just noticed that without this patch, the profile submit button does change based on the presence of a file-upload field.

without a file-upload:

```
<input class="crm-form-submit default validate" accesskey="S" crm-icon="fa-check" name="_qf_Edit_next" value="Save" type="submit" id="_qf_Edit_next">

```

with a file-upload:

```
<input class="crm-form-submit default validate" accesskey="S" crm-icon="fa-check" name="_qf_Edit_upload" value="Save" type="submit" id="_qf_Edit_upload">

```

This seems similar to what your PR attempts to achieve?

So, I'm looking for more evidence that this is not an instance configuration problem.
> 0 votes

---
Tags: civivolunteer
---


# Question
Title: Exporting primary addresses exports non-primary addresses for some contacts
I'm exporting contacts with both home and billing addresses, where the home address is set as primary. Even though I've selected primary as the address type for all address fields in the export fields selection, some of the fields in the export are actually the billing address (which is definitely not set as the primary address).

Has anyone else run into this or does anyone know why this might be happening?

It's hard to tell exactly how many contacts this is happening to, but it does seem to be a significant number. I have not been able to replicate the issue on the demo site.

5.7.6 on Drupal.

# Answer
It turns out that the "Search Primary Details Only" setting causes this problem (found under Administer-\> Customize Data and Screens-\> Search Preferences). It seems that if this setting is off, the listings and export will default to the address which was created earlier.

See here for details: Contact Search Results Address Type

This is a weird behaviour in the listings, but for the exports seems like a bug as selecting primary address types in an export does not return primary addresses.
> 3 votes

# Answer
The export issue is actually a confirmed bug, see https://lab.civicrm.org/dev/core/issues/464 I have had moderate success using hook\_civicrm\_export in a custom extension for a client where email location type is really important to their workflow.
> 1 votes

---
Tags: export, addresses
---


# Question
Title: Upgrade from 5.9 to 5.16 in Drupal - upgrade script won't run
I have Drupal 7 on Krystal Hosting, with CiviCRM v5.9 and trying to upgrade to v5.16. I've followed the upgrade steps on the docs.civicrm.org site and got to the step where it says,

"Or, point your web browser to the following URL and follow the on-screen instructions.

http://example.org/civicrm/upgrade?reset=1"

I've tried replacing "example.org" with my site address but just getting page not found.

I've checked I'm logged into **Drupal** as an admin. Only difference in address bar is text after site is **?=civicrm/upgrade?reset=1** instead of just **/civicrm/upgrade?reset=1**. When I click to go into **Civicrm** after extracting/installing 5.16, I get "Website encountered unexpected error" so I can't get to **CiviCRM \>\> Admin \>\> System Status**. Are there error logs anywhere with anything more helpful than "unexpected error" ?

Any help would be appreciated.

# Answer
> 4 votes
If you go to CiviCRM's **Administer menu » Administration Console » System Status** you should see an error "Database Upgrade Needed". There should be a link you can press that should bring you to the upgrade page. This link should account for issues like those mentioned by @Demerit. Please edit your question if this doesn't resolve the issue.

---
Tags: upgrade
---


# Question
Title: Quickform: Set the "Selected" value in a select element
Maybe is a simple question but, in my form, I not able to set the "selected" value, in my SELECT element: The following is my code:

```
CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes, 3);
$this->add('select', 'financial_type', ts('Financial Type'), $financialTypes, 'TRUE');

```

# Answer
> 3 votes
This is how you do it:

```
CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes, 3);
    $this->add('select', 'financial_type', ts('Financial Type'),
            $financialTypes,
            'TRUE'
            );
    $this->_elements[4]->setSelected(9);

```

You need to inspect $this and determine which of the elements is the select you want to modify. In my case it was the 4th one.

You then need to inspect the select (from the browser) and find out the value for the option that you want selected by default.

# Answer
> 0 votes
```
$this->add('select', 'financial_type', ts('Financial Type'),
            $financialTypes,
            'TRUE'
            )->setSelected(9);

```

You can set selected item directly this way.

---
Tags: quickform
---


# Question
Title: Using Mailjet purely as SMTP server - pros & cons?
Mailjet is undoubtedly very good at delivering emails, but the Mailjet extensions for Civi don't seem to be current & don't process bounces. However, given this limitation, using Mailjet solely as an SMTP server without an extension works well and gets emails delivered. Mailjet has some nice reports too. I've tested this setup and it works fine, but I'm concerned that there might be some disadvantage that I've overlooked. Can anyone comment on this setup? Pros & Cons? I'm using 5.13.5 with Drupal.

# Answer
I'm working with a site that has used MailJet via SMTP for a number of years. I'm not aware of any issues of using it in that way.
> 1 votes

---
Tags: civimail, smtp
---


# Question
Title: System Status reports incorrect version number after update stall
I've tried to perform an update from 5.16.1 to 5.17, and the update script at /civicrm/upgrade?reset=1 stalled right at the end of the progress bar. After waiting many times longer than the whole update normally takes, I gave up and refreshed my browser. That page failed with "Your database has already been upgraded to CiviCRM 5.17.0".

Thinking I was in the clear, I went ahead and cleared sites/default/files/civicrm/templates\_c/ and set the site live again. Only now I've noticed System Status is reporting that I'm still running 5.16.1 and need an upgrade. In the footer at the bottom of the page it correctly reports 5.17.

Is this likely to be a problem, and should I do anything to fix it? Or should I just wait for the next update and hope that clears it?

# Answer
If the upgrade stalled out partway through, you'd get a message that you were partially upgraded - so my guess is that the only thing that didn't happen was that `version-msgs-cache.json` didn't get deleted.

That file will update on its own after three days, but you can also find it and delete it. You may want to check the permissions/ownership on it, in case it's owned by the wrong user, and that caused the upgrade to hang. That would indicate a deeper issue to deal with.
> 2 votes

---
Tags: drupal, upgrade
---


# Question
Title: Error: Call to undefined function bccomp() in CRM_Financial_BAO_Payment::isPaymentCompletesContribution()
CiviCRM 5.16.3 Event uses price sets

Background: We offered a $40.00 price set option for an event that later became free. We created a new price set option for $0.00, disabled the old one, and updated the registration to select the new one. After this, the contribution changed status to 'Pending Refund'. We click more \> record refund, the refund due is $40.00, we enter the date, payment method, transaction ID, fee amount, etc. and click 'Record Refund'. The green triangle spins forever, nothing happens, and we do not see an error message in the Civi log viewer or in our error.log from apache. Suggestions for how to proceed?

Update - 9/6/2019. We can make a test contribution as 'Check' and it refunds without a problem. We also created another registration for this event, and paid by check, going through the same pattern, and it was unable to be refunded (same error). Thus, it does not seem to be limited to a payment processor error?

I followed this guide (https://docs.civicrm.org/dev/en/latest/tools/debugging/) and then enabled various forms of debugging and eventually got the page to display the error:

> Error: Call to undefined function bccomp() in CRM\_Financial\_BAO\_Payment::isPaymentCompletesContribution() (line 545 of /srv/www/www.biodynamics.com/public\_html/sites/all/modules/civicrm/CRM/Financial/BAO/Payment.php)

# Answer
Apparently our PHP installation was missing the bcmath package which bccomp() needs. By installing the package via php7.1-bcmath we were able to then process the refunds accordingly. Did not see it here (https://docs.civicrm.org/sysadmin/en/latest/requirements/) but I could be missing something?
> 5 votes

---
Tags: civievent, civicontribute
---


# Question
Title: Civicrm5.4-add a cash donation fails after update
Running on Linx hosted system with latest WP. I just updated from Civi 4.7 to 5.4, now when i try to record a cash donation ('New Contribution') I get a message that the 'site is experiencing technical difficulties'. Paid events are processed. This is not even including an email receipt. Any ideas?

# Answer
> 0 votes
Please cancel! I found the problem. sorry to bother

---
Tags: civicontribute
---


title: Incorrect_Resource_URL virtualbox

text:
# Question
Title: Incorrect_Resource_URL virtualbox
Running civicrm 4.7.26 -\> upgrade 4.7.29 error message Incorrect Resource URL in joomla and drupal. Running civicrm under virtualbox with url http://localhost:10080 absoulte path will be accepted by configuration, but error message still warns. in the configuration section resource url a click of the first ? will show the correct absoulute path and url varibales neither the absoulte path nor the url varibales works any suggestions try configuration unter settings.php global $civicrm\_setting; $civicrm\_setting\['Extension Preferences'\]\['ext\_repo\_url'\] = false;

# Answer
I'm the author of this check.

My guess is that you're forwarding port 80 on the virtual machine to port 10080 on the host machine. However, the check, since it runs over HTTP internally on the virtual machine, is checking port 80.

That SHOULD work properly to detect whether your paths are correct, but I haven't tested this scenario. If you know for a fact that your resource URLs are correct, there's no harm in selecting "Never remind me about this again" and ignoring the message.
> 1 votes

# Answer
I found this 'incorrect resource URL' message and don't know what it is flagging - the resource url set up in civicrm\_settings.php is correct. What exactly is the test for resource url?
> 0 votes

---
Tags: resource-urls
---


# Question
Title: Convert to uppercase all letters in a specific field
Is it possible to convert every letters in a specific field to uppercase?

I would like to have the addresses of my contacts on Civi written in uppercase (for postal service purposes).

The ideal scenario would be to force that field to be uppercase. But also converting it after the record is created would be sufficient.

Thank you.

# Answer
I don't think that is possible out of the box, but it would be an easy extension to write. You could use `hook_civicrm_pre`, look for edit/create operations on Addresses and change the relevant fields to uppercase.
> 2 votes

# Answer
You can connect to USPS Web Tools which will do this standardization. Go to administer \> localization \> address settings. Signup https://www.usps.com/business/web-tools-apis/welcome.htm and you can get it working right away. That will take care of when create / update happen.

For existing records you can use Cividesk Normalize and it allows you to perform normalization based on a contact ID range: https://civicrm.org/extensions/cividesk-normalize.
> 2 votes

# Answer
You may use CSS. **text-transform: uppercase;**
> 0 votes

---
Tags: contacts
---


title: Server Security Update Breaks Cron

text:
# Question
Title: Server Security Update Breaks Cron
A recent security update from our host has resulted in cron throwing out the following errors:

> PHP Warning: ini\_set() has been disabled for security reasons in /.../public\_html/wp-content/plugins/civicrm/civicrm/vendor/symfony/config/ResourceCheckerConfigCache.php on line 84 PHP Warning: ini\_set() has been disabled for security reasons in /.../public\_html/wp-content/plugins/civicrm/civicrm/vendor/symfony/config/ResourceCheckerConfigCache.php on line 99 PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /.../wp-content/plugins/classic-editor/classic-editor.php on line 631

We have been asked to find a workaround rather than reducing security on the server. I've searched around and not found any posts with similar issues so I'm not sure where to start. Any direction would be appreciated.

# Answer
Can you ask your host about raising php's memory\_limit setting to at least 128MB. 32MB is below the current recommended minimum for CiviCRM of 256MB (see https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-configuration), and the absolute minimum value used in the configuration file that calls ini\_set() is currently 128MB (see https://github.com/civicrm/civicrm-core/blob/5.17.0/templates/CRM/common/civicrm.settings.php.template#L540)
> 2 votes

---
Tags: wordpress, cron, security
---


title: CIVIEvent - List of participants

text:
# Question
Title: CIVIEvent - List of participants
Bonjour,

i want to add a custom participant listing option (there is a topic 3 years ago but i don't understand the comment).

I create a specific option in Administer CiviCRM / Lists of choice / List of participants.

But how and where i can specified the field i want : Name + default role for example.

Thanks for your help

# Answer
Pierre94, Welcome to CiviCRM stack exchange. To add custom listing is not straight forward if you not a developer.

To add custom listing you will need to

**1. Add listing option**

Navigate to CiviCRM \>\> Administer \>\> System Settings \>\> Option Groups. Find for 'Participant Listing' and click edit option besides it. Add new option with label as listing name and and Description as class name to invoke when viewing this option eg CRM\_Event\_Page\_ParticipantListing\_NameStatusAndDate.

2. Implement the listing using code in your extension

Copy paste any php file from here into your extension directory(use the path same as defined in your listing option). Similarly do for tpl from here. Modify the php and tpl file as per your needs.

Thanks

Pradeep
> 4 votes

---
Tags: civievent, drupal
---


title: CiviReport Max Participants

text:
# Question
Title: CiviReport Max Participants
I currently generate an Event Report of upcoming events that shows how many participants are registered for each event, but I'd also like for it to show the max participants allowed. When looking through the fields available in the Columns tab, I don't see Max Participants or anything like it.

Any guidance would be appreciated!

# Answer
There's a field called "capacity" on the event income summary report. Is that what you're looking for?
> 4 votes

---
Tags: civievent, civireport
---


# Question
Title: What causes this error on importing email addresses?
I'm getting some (maybe 5%) email address imports rejected with the message "Matching this contact based on the de-dupe rule would cause an external ID conflict" The email addresses in question can be updated in the UI without a problem, and I can't see that adding these rejected email addresses could cause any conflict. The supervised dedupe rule is 'Name and email'. What's the cause of this error? (Changing the dedupe rule to bypass the problem doesn't work so I'm thinking this might be a bug) Civi is at 5.11.0.

# Answer
> 1 votes
I had the same outcome when I imported external ID, first, last name and a physical address update. My dedupe rule only contained 'external ID'. When I removed the first and last name the import worked.

---
Tags: import, duplicate-contacts
---


# Question
Title: Is there a way to allow one user to register many participants for an event and to send separate invoices to each participant?
All of our client's members are either other associations or business "associate members." Many of the associations are managed by association management firms. The association managers need to track payment for each event registrant but they want the convenience of multiple registrations for the online registration. Similarly, Associate members may have satellite offices which need to receive individual invoice but they want one person in the organization to do all the registrations.

We just realized that partial payments from all the business/management entities apparently can't be applied to each registered user. So if "Jo Bob" pays his fee, for example, they don't want that payment to be applied to "Mary Jane."

I don't see a clear path to resolve these competing needs. Does someone out there have a similar need or know of a solution to this user dilemma?

# Answer
I have my Alt Invoice extension, which sends an additional invoice to someone based on their relationship. I'd say that a developer could start from there to make an extension and be more than halfway there.
> 2 votes

---
Tags: civievent, civicontribute, invoice, payment, partial-payments
---


# Question
Title: Change the web version of an email / change a URL?
Example: Sent email, included wrong link and some wrong text. Too late to change email - but is it possible to change the URL direction or change the text for the browser version?

Latest Drupal 7 and CiviCRM

# Answer
> 3 votes
Changing the URL to redirect elsewhere is something that happens outside of CiviCRM. If you have click-through tracking enabled, you could also *probably* change the URL in `civicrm_mailing_trackable_url` in the database, but I've never tried this.

---
Tags: civimail
---


# Question
Title: Change Log Shows Incorrect "Changed By" Name
I'm on CiviCRM 5.16.2 on WordPress, and we have a situation where we have removed one of our organization's email addresses from one user account and added it to another account, but when the new user takes actions in CiviCRM it still shows the old user's name in various areas, one example being the "Changed By" name in the change log, but it also shows up incorrectly if the user enters a contribution, etc.

To explain in a bit more concrete way:

1. User Alice has email address foo@myorg.org
2. foo@myorg.org email address is removed from Alice's record in CiviCRM
3. foo@myorg.org email address is added to Bob's record in CiviCRM
4. User Bob changes a record in CiviCRM
5. Go to change log for the record, "Changed By" shows up as Alice, and even links to Alice's record if you click on the name in the change log

I don't see a way to fix this in the admin interface and I've confirmed that the email in question is absolutely not still in the old user's record, and if you do a search for the email address the only hit that comes up is the new user, so I'm a bit flummoxed why it'd be behaving this way. Any ideas would be greatly appreciated. Thanks!

# Answer
First, on the wordpress side, check what email is listed for Alice in her wordpress user record. If it still has foo@myorg.org that might be the problem.

Otherwise there's a civicrm\_uf\_match table in the database that is used to map between user accounts in the CMS (wordpress) and contacts in CiviCRM and it's partly based on email address. If you look in this table the email address might still be showing as connected to Alice's wordpress user id.
> 3 votes

---
Tags: user-account, user
---


# Question
Title: Buildkit - amp test recieved incorrect response while connecting to a test application
I had successfully ran the buildkit till got this error while running amp test. It created the test application, created data directory, set up few ports

```
Create data directory:/home/***/.amp/canary/data/FivN1DBNa4c05mUoshFCNDn2dHMDc01I
AMP_URL='http://localhost:7979'
AMP_ROOT='/home/***/.amp/canary'
AMP_DB_DSN='mysql://canary_zcz0m:AfLQGc9SAf9Y8zno@127.0.0.1:3306/canary_zcz0m?new_link=true'
AMP_DB_USER='canary_zcz0m'
AMP_DB_PASS='AfLQGc9SAf9Y8zno'
AMP_DB_HOST='127.0.0.1'
AMP_DB_PORT='3306'
AMP_DB_NAME='canary_zcz0m'
AMP_DB_ARGS='-h 127.0.0.1 -u canary_zcz0m -pAfLQGc9SAf9Y8zno -P 3306 canary_zcz0m'

Connect to test application
Expect response: "response-code-8UnKuVzEwx"

```

and while connecting to test application it showed :

```
Received incorrect response: "Error: Failed to write /home/***/.amp/canary/data/FivN1DBNa4c05mUoshFCNDn2dHMDc01I/example.txt
Error: Failed to remove /home/***/.amp/canary/data/FivN1DBNa4c05mUoshFCNDn2dHMDc01I/example.txt"

```

I have followed the commands given here : https://buildkit.civicrm.org/#/tutorials.

And restarted the server many times.

# Answer
The error was due to the permission issue but I used another method for solving this. At the time of amp config I chose \[1\] for the option perm\_type, which sets the appropriate permissions according to linux.

Option: perm\_type Description: How to set permissions on data directories \[none,custom,linuxAcl,osxAcl,worldWritable\]. See https://github.com/totten/amp/blob/master/doc/perm.md

Default: none

Enter perm\_type

1. \[0\] "none": Do not set any special permissions for the web user
2. \[1\] "linuxAcl": Set tight, inheritable permissions with Linux ACLs \[setfacl\] (recommended) In some distros+filesystems, this requires extra configuration. eg For Debian-based distros: https://help.ubuntu.com/community/FilePermissionsACLs
3. \[2\]"osxAcl": Set tight, inheritable permissions with OS X ACLs \[chmod +a\] (recommended)
4. \[3\] "custom": Set permissions with a custom command
5. \[4\] "worldWritable": Set loose, generic permissions \[chmod 1777\] (discouraged)
> 1 votes

# Answer
I encountered the same error, setting up buildkit and then running `amp config` and `amp test` on Ubuntu 19.04.

What I figured out was that I too had initially chosen 0 for `perm_type` when running `amp config`.

I changed the `perm_type` value to `linuxAcl` and chose `www-data` as the web user.

Using those values then allowed me to successfully run `amp test`.
> 1 votes

# Answer
This might be due to permission issues, so as you mentioned that you followed civicrm-buldkit tutorials, now assuming that your buildkit is installed in `/opt/buildkit` directory I would suggest to change the permission of this directory by running the following code :

```
sudo chmod -R 777 /opt/buildkit

```

This command will recursively change the permission of the directory and enable all other users to create/modify/delete files and directories in it. But it is not advisable to do a 777 because of security reasons. If you are really concern about security then please look into changing the ownership of the files/directory or may be do a 755 instead with suitable arguments.

Hope it helps.
> 0 votes

---
Tags: civicrm-buildkit
---


# Question
Title: Mailchimp extension terminology: audiences and lists
I'm slightly confused by the mailchimp extension. It feels like maybe the extension, the documentation and mailchimp have become out of sync.

Looking at the group settings (civicrm/group?reset=1&action=update&id=N) page, I see four options in the Mailchimp settings box:

* Mailchimp list
* Mailchimp grouping
* Mailchimp group
* Are subscriber able to update this grouping from mailchimp?

Looking at mailchimp\_civicrm\_buildForm(), these form elements should be replaced by terms that sound like the documentation below...

> Choose the integration option, called "Membership Sync: Contacts in this group should be subscribed to a Mailchimp List" then choose your list name.
>
> Ensure the tickbox is ticked that says "Ensure lists's webhook settings are correct".

But that is not happening for existing groups. It is happening for a new groups.

Is there a way through?!

# Answer
Here's what you should be seeing:

OR, if you have "Interest sync" enabled:

Words (Note that Mailchimp does not make this terribly easy to refer to as they have changed the words they use, and also because they use "group" and "grouping" interchangeably)

* **Mailchimp list** \- these are now called **Audiences** at Mailchimp. Nb. Mailchimp is heavily pushing people towards only having one "Audience" (List) and using the following to segment within that list.
* **Mailchimp \[interest\] grouping** which is a set of...
* **Mailchimp groups** \- a list member at mailchimp can be in one or more groups within each grouping. Mailchimp's own forms can be configured to allow members to edit these themselves.
* **CiviCRM group** \- self explanatory, but just including to show the distinction between Mailchimp group and CiviCRM group!

The extension requires that you have a "membership group" in CiviCRM which will determine whether someone is subscribed/unsubscribed in the selected Mailchimp audience/list. Optionally, after this, you can sync other CiviCRM groups with mailchimp interest groups within that audience. Adding somone in CiviCRM to a group that is mapped to an interest group does not in itself add them to the list; you need to add people to the group used for membership, too.

It's not clear from your question exactly what you're trying to achieve. If you're trying to sync up an audience called *Green Gazette* with a CiviCRM group so that adding someone in Civi will add them in Mailchimp (and vice versa), then you should select the "Membership Sync" option, then select your list.

CiviCRM remembers which Mailchimp list/audiences and Mailchimp groups are configured by storing a unique ID from Mailchimp. If you delete that audience/group at Mailchimp that link will be broken.

If you get that error message after doing this, but you've been playing around a bit, I would advise just trying edit and saving the CiviCRM group settings again to see if it's repeatable - I know that some of those messages get added to the session at awkward times so can occasionally display at the wrong time. If you've selected a list but when you press save you always get that error, that sounds like a new bug.

> Personal note: the current mailchimp integration (link) has some limitations that I have discussed in my proposed new mailchimp sync extension. Everyone should feel free to comment (issue queue/PR) and input on my plans there.

## EDIT (following your edit with screenshot)

It looks like you're seeing the CiviCRM custom field group fields in the normal CiviCRM way. This means that the .extra.tpl file is not firing; it's not loading in the mailchimp settings template file

`.extra.tpl` files are deprecated these days; the extension needs updating to use the Regions API. I'm not sure which version of CiviCRM you're using; it's entirely possible that they removed `.extra.tpl` files or somehow otherwise changed something that means the required template addition is not sourced. I'd start looking there (and also check for JS errors). Interesting that it works for new groups, though.
> 4 votes

---
Tags: mailchimp
---


# Question
Title: CiviCRM Wordpress Member Sync w/ Wordpress Groups Plugin: How to add CiviMember to WP Group
I have the latest CiviCRM and Wordpress installed. I've got the latest Groups plugin for Wordpress (https://wordpress.org/plugins/groups/), and the CiviCRM Wordpress Member Sync plugin (https://wordpress.org/plugins/civicrm-wp-member-sync/).

I've set up a CiviCRM Membership Type of **Membership A**, and a Group in Wordpress called **Member**

What I thought I would be able to set up in the Member Sync plugin Association Rule is tick a checkbox or something to select a Wordpress Group to add the Member too. I'm not seeing this in the plugin settings dashboard anywhere or options.

So when the plugin syncs it adds a new Wordpress User from **Membership A** from CiviCRM as a (Subscriber)---that's working.

But the new WP User was only added to the default **Registered** group in Groups. I need the new user to be added to the **Member** group in Wordpress.

Please help, as this is integral to hiding pages for members only eyes.

FYI: I have the sync plugin set to **Capabilities** (not Roles) as I need the default Wordpress roles for another plugin.

The description for the civi members sync plugin says it works with Groups, but I just can't see how! https://wordpress.org/plugins/civicrm-wp-member-sync/#installation

I'm hoping one of you Wordpress +CiviCRM experts can help me. I've been scratching my head the whole day!

Cheers, Tracy

# Answer
> 3 votes
This should be resolved in CiviCRM WordPress Member Sync version 0.4 which was released today. Group membership can now be applied via association rules, which means that the Groups v2.8.0+ schema for access control is now fully supported.

---
Tags: wordpress, civimember
---