# Question
Title: Unable to create a contribution from back-office (Civi 5.21.2)
Configuration: \- Civi 5.21.2 \- Wordpress

What am I trying to do : Create a contribution manualy trhough the back-office :http://localhost/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Fadd&reset=1&action=add&context=standalone

here is my filled form:

When submitting the form I get this error:

```
CRM_Core_Exception: One of parameters (value: ) is not of the type Integer in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php on line 1524

```

Exception trace:

```
#   Function    Location
0   CRM_Utils_Type::validate('', 'Integer') /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1524
1   CRM_Core_DAO::composeQuery('SELECT id,name,l…', Array, true)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1402
2   CRM_Core_DAO::executeQuery('SELECT id,name,l…', Array)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php:475
3   CRM_Price_BAO_PriceSet::getSetDetail(null)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:1371
4   CRM_Contribute_Form_Contribution->submit(Array, 1, null)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:944
5   CRM_Contribute_Form_Contribution->postProcess() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:479
6   CRM_Core_Form->mainProcess()    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153
7   CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120
8   CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
9   HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
10  HTML_QuickForm_Page->handle('upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:335
11  CRM_Core_Controller->run()  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:316
12  CRM_Contribute_Page_Tab->edit() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:372
13  CRM_Contribute_Page_Tab->run(Array, null)   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:268
14  CRM_Core_Invoke::runItem(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:68
15  CRM_Core_Invoke::_invoke(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
16  CRM_Core_Invoke::invoke(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm.php:1449
17  CiviCRM_For_WordPress->invoke('')   /var/www/html/wp-includes/class-wp-hook.php:288
18  WP_Hook->apply_filters('', Array)   /var/www/html/wp-includes/class-wp-hook.php:312
19  WP_Hook->do_action(Array)   /var/www/html/wp-includes/plugin.php:478
20  do_action('toplevel_page_Ci…')  /var/www/html/wp-admin/admin.php:254
21  {main}

```

I'm sure this issue is due to some misconfiguration of some kind. Could someone help with that? What Am I missing.

I also have a 500 error when viewing an existing contribution.

Any help appreciated, we are stuck in this situation.

# Answer
According to the trace and to your comments, this SQL query can help find if there is data missing from the database:

```
SELECT * FROM civicrm_price_set WHERE name = 'default_contribution_amount'

```
> 3 votes

# Answer
Do have have any overridden / customised files?

I came across similar issues recently but was ultimately down to customisation.

Would suggest trying with core version of those files and see if it works correctly for you :).
> 0 votes

---
Tags: wordpress, civicontribute
---


title: Late membership renewal fees

text:
# Question
Title: Late membership renewal fees
Is there a mechanism to charge users extra when they renew their membership after it has expired, e.g. extra 20% if paid after half year, extra 50% if paid later?

# Answer
> 2 votes
It might be easier to make the memberships expensive and give discounts for "early" payments. I'm not sure without looking into it, but you may be able to do this with CiviDiscount?

# Answer
> 0 votes
Perhaps if you use a Price set with a 'late payment fee' field that is set to 'on' but is then hidden/ignored via JS based on the membership status of the member then it could do the required. it would also avoid that extra fee being charged if someone clicks auto-renew etc if you offer it

---
Tags: civimember, contributions
---


# Question
Title: Can we do quick search on non primary details?
There is a option called 'Search Primary Details Only' under Administer \>\> Customize Data and Screens \>\> Search Preference when set to 'No' it works only when searched using search forms like Advance contact search or Find contact search but the quick search on top left corner doesn't respect this setting. Is it a core bug or intended to search on primary details or never supported?

# Answer
There has been discussion going on to implement this in CiviCRM core code, developed a small extension to do that for time being until its been implemented in core.
> 1 votes

---
Tags: quicksearch
---


title: Is there a token for contribution type?

text:
# Question
Title: Is there a token for contribution type?
There seems to be tokens for all sorts of contribution things but not for the financial type. Maybe I'm missing it somewhere.

We're doing tax letters and the type ends up being the fund the people donated to, which we'd like to include in the letter.

# Answer
> 4 votes
I thought I had tried the obvious but must have had a typo. It is there but it isn't listed in the list of tokens. It's {contribution.financial\_type}. Should it be listed? If so, it looks like a bug.

It didn't take much make it show. In my test version I hacked SelectValues.php and added financial type to the contribution token array. If I looked at the latest versions of that file it doesn't seem to be there either.

# Answer
> 1 votes
This token {latestcontribs.financial\_type} From this extension https://civicrm.org/extensions/nzcofuzioncivitoken works for the online receipt

# Answer
> 0 votes
In the Contributions - Receipt (off-line) default template I see this line: `{ts}Financial Type{/ts}: {$formValues.contributionType_name}`. Will that work (or some variation), even if it's not in response to a particular form being filled out?

---
Tags: civicontribute, tokens
---


# Question
Title: Showing Financial Transaction Data with Contributions
I have created a drupal view of contributions. In this view i want it to show:

1. Date Contribution Created (CiviCRM Contributions: Date Received)
2. Financial Type (CiviCRM Contributions: Financial Type)
3. Fee Amount(CiviCRM Contributions: Fee Amount)
4. Net Amount (CiviCRMContributions: Net Amount)
5. ***Payment Date*** \- This is the only data i can't extract as this is linked to the financial Transaction. I need the transaction date

I have added a relationship "CiviCRM Contributions: CiviCRM Line items" but it pulls in other transnational data not the txrn date.

When i create a view of "CiviCRM Financial Trxn" I am unable to add in a relationship therefore unable to pull in contributions data.

Any Ideas?

---

I have thought about putting a View within a View to pull that data and it works unfortunately it shows a duplication of the contribution as there is several financial transaction entries for that contribution.

Thanks

# Answer
> 1 votes
Unfortunately there is no relationship being handled in views between contribution and payment(financial trxn table). You can do this by writing a small module implementing hook\_views\_data() hook with civicrm entity module.

---
Tags: contributions, drupal-views
---


title: Can't search profile in Wordpress

text:
# Question
Title: Can't search profile in Wordpress
I have created a new profile in CiviCRM that I want to use for searches of services offered by associate members. When I test the profile from CiviCRM it behaves as expected. If I embed the profile in a WordPress page, I get no results. When I submit the form, I just return to my profile search form.

When I open the console on the page, I get the following error: {}ExtensionContent.jsm Error: Incorrectcontentsfetched, pleasereload.

# Answer
The resolution is a total head slapper. The problem was caused by previewing the page instead of publishing the page and viewing the published content. The directory profile is working.
> 3 votes

---
Tags: wordpress, profile, search, search-results, individual
---


# Question
Title: Error during event registration linked to GDPR extension
As per title, after a user registers for an event and goes through the confirmation screen, they are treated to the following error:

> Notice: Undefined index: comm\_pref\_in\_thankyou in /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/CRM/Gdpr/CommunicationsPreferences/Utils.php on line 507
>
> Notice: Undefined index: comm\_pref\_in\_thankyou in /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/CRM/Gdpr/CommunicationsPreferences/Utils.php on line 508

As you can see in the screenshot, their details are registered and it goes through fine in Civi's backend, we are just getting this error as well which is seemingly linked to the GDPR extension.

Due to running a hosted system, I am unable to check the PHP file but I am speaking to our host regarding this as well. I am asking here in the hopes someone has seen this before and knows what the error is expecting.

Running on Wordpress 5.3.2 with CiviCRM 5.21.1 The GDPR extension is version 2.8

# Answer
> 2 votes
Its just the warning (Notice), either you can turn off php warnings for wordpress or update the GDPR Communications Preferences settings(http://domain.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/gdpr/comms-prefs/settings&reset=1) and choose something (eg Do Nothing) for 'Add to Event and Contribution Thank-you pages' option under 'Event & Contribution thank you page' section.

HTH

Pradeep

---
Tags: wordpress, civievent, extension, gdpr
---


# Question
Title: Custom emails automatically generated based on participants filling in drupal forms
Hi to all and thanks in advance.

I'm on Drupal 7 and Civi 5.20.2. I have the CiviRules and EmailAPI (CiviCoOp) extensions as well as Mosaico. We have participants to our events that apply for funding (either travel, accomodation or both) through a Drupal (Civi Powered) form. I need to be able to send automated user tailored emails when they submit the form.

Like

Dear {user}, Thank you for aply for funding for {event title}. We are considering your {type\_of\_funding} application and we will get back to you sortly. Kind regards...

I can get the event to triger through CiviRules and EmailAPI, but I cannot (or more correctly do not know) how to create an email template that can feed of the {xxx info xxx} when the specific rule runs, so the email is user specific and friendly.

Kind regards Aris

# Answer
The list of tokens you see when editing a template changes depending on where you're editing from. Unfortunately, CiviRules doesn't expose event/participant/contribution tokens in the drop-down - but if you use them in the email, they WILL work.

To see the tokens you may want to use, create a new Scheduled Reminder (\**Administer menu » Communications » Scheduled Reminders), and create a new reminder based on an event. You should be able to see event etc. tokens (see screenshot below). Then either save as a new template, or simply copy the tokens into an existing one.
> 3 votes

---
Tags: civievent, custom-fields, email, civirules, custom-templates
---


title: Incoming Grants: CiviGrant or CiviCase?

text:
# Question
Title: Incoming Grants: CiviGrant or CiviCase?
A new non-profit is asking which component is best for tracking incoming grants, and tracking them at a more detailed level (with activities, maybe even tying the final incoming contribution to the grant).

I saw the older blog post about CiviGrant vs CiviCase, and understand the concepts there. But I'd like to get a feel for what most folks use these days for this type of incoming grant tracking.

It seems to me that CiviGrant is rather basic in design. It just tracks the most basic parts of a grant: its status, type, amounts, etc. It doesn't necessarily track ongoing activities at the grant level (each time there is communication or meetings about the grant, and so on). It also doesn't tie to a contribution, it seems.

CiviCase, on the other hand, is rather complex in its structure as it has workflows. It almost does more than what one might want for grant tracking. But it seems to allow for activities and maybe even contributions tied to the grant.

So it's a toss up between simplicity vs deeper tracking. What do people find most useful for incoming grant tracking? Do you all use CiviGrant and add activity types (but not sure how it would link to the grant itself)? Or do you use CiviCase and create a more basic workflow?

Appreciate any thoughts you all might have!

# Answer
I find that this is really dependent on the client's needs. If all they need is a list of grants they applied for, I might use neither - and just use activities. If they need to track upcoming deadlines for applications, deliverables, statuses, etc., then CiviCase is a better fit.
> 3 votes

---
Tags: civicase, civigrant
---


# Question
Title: How do I safely export my database and import it on a new server?
I will move a CiviCRM installation to another server and realized some strange database issues: it was not possible to save contacts with phone number anymore. The problem are the triggers in the database: both `civicrm_phone_before_update` and `civicrm_phone_before_insert` call a function `civicrm_strip_non_numeric()`. On export of the whole database these triggers and functions are exported with "definers" - database users which do not exist anymore in the new database.

So it seems that you cannot easily dump your CiviCRM database and import your dump to a fresh database. How should I process that?

And why are there these triggers in the database? Why is this not handled on the level of the app?

# Answer
> 9 votes
You can export the civicrm database without triggers and functions and After importing and making sure you have CiviCRM working, recreate the triggers by running 'civicrm/menu/rebuild?reset=1&triggerRebuild=1' in browser

---
Tags: database, trigger
---


# Question
Title: Ajax error with Manage Groups after upgrading to PHP 7.3, MySQL 8.0 and 5.22.0
I may have done too many upgrades at once but I was really eager to upgrade my environment following the release of Civi 5.22.0. I started out with upgrading my Civi Wordpress environment from 5.21.0 to 5.22.0. I made a backup of my site and database on the old stack. Then I upgraded my Bitnami stack to PHP 7.3.13 and Mysql 8.0.18. I performed a data import into the Mysql 8.0 database and everything appeared fine on the surface.

Today I was trying to manage groups that were previously working under the old environment and received an Ajax error (see below). I have tried deleting all of my groups per recommendations and this did not resolve the issue. I believe that something may be incorrectly configured within PHP but I'm not sure what it could be. Can anyone make sense of the error that I am receiving?

Error that occurs when I click on Contacts \> Manage Groups within CiviCRM for Wordpress:

```
DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7

```

Backtrace:

```
<p>backTrace</p><p><pre>#0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
#1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB.php(997): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
#3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
#4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", "DB_Error", TRUE)
#5 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
#6 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(935): DB_common->raiseError(-2, NULL, NULL, "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
#7 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(405): DB_mysqli->mysqliRaiseError()
#8 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
#9 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2416): DB_common->query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
#10 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
#11 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(420): DB_DataObject->query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
#12 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1419): CRM_Core_DAO->query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", TRUE)
#13 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Group.php(854): CRM_Core_DAO::executeQuery("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", (Array:11), TRUE, "CRM_Contact_DAO_Group")
#14 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Group.php(726): CRM_Contact_BAO_Group::getGroupList((Array:11))
#15 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Group/Page/AJAX.php(52): CRM_Contact_BAO_Group::getGroupListSelector((Array:11))
#16 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(234): CRM_Group_Page_AJAX::getGroupList()
#17 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
#18 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#19 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:3))
#20 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress->invoke("")
#21 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#22 /opt/bitnami/apps/wordpress/htdocs/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
#23 /opt/bitnami/apps/wordpress/htdocs/wp-admin/admin.php(254): do_action("toplevel_page_CiviCRM")
#24 {main}

```

# Answer
> 1 votes
MySQL 8 isn't officially supported yet. This particular problem should be fixed in 5.23 though since it's the word "groups" that mysql 8 doesn't like - see https://lab.civicrm.org/dev/core/issues/1143 and the more general https://lab.civicrm.org/dev/core/issues/392

---
Tags: groups, ajax, php7, datatables, mysql-8.0
---


# Question
Title: Constraint violation when viewing Mailing Detail Report (group_id the cause)
CiviCRM version: 5.19.4

CMS: Drupal 7.69

PHP version: 7.1

When trying to view the Mailing Details Report page, I get the following error:

```
DB Error: Constraint violation

```

Looking in the error logs, it is due to the group\_id column as you can see here:

```
[nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`prefix`.`civicrm_group_contact`, CONSTRAINT `FK_civicrm_group_contact_group_id` FOREIGN KEY (`group_id`) REFERENCES `civicrm_group` (`id`) ON DELETE CASCADE)]"])

```

The important bit being:

```
CONSTRAINT `FK_civicrm_group_contact_group_id` FOREIGN KEY (`group_id`) REFERENCES `civicrm_group` (`id`)

```

I sort of understand why this error has come about, it's due to a `group_id` in the `civicrm_group_contact` table not being found in under the `group_id` column of the `civicrm_group` table (I think).

I have tried running the following to try and find which row(s) is causing this problem:

```
SELECT * FROM `civicrm_group_contact` WHERE group_id NOT IN (SELECT id from civicrm_group)

```

However, this returned no results.

I have also truncated the cache tables which is the solution to a few of the other problems I have found whilst researching and cleared normal CiviCRM cache.

It's not just me getting this error, it's anyone else trying to access the same page getting the error as well.

I've found a lot of similar questions regarding this but most of them have not have any solutions and the ones that do, I have either tried them or do not apply to me.

Any help would be greatly appreciated.

EDIT: Added the backtrace from the ConfigAndLog file in the hope it helps solve my problem.

```
#6 /home/.../public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-3, NULL, NULL, "\nREPLACE INTO civicrm_group_contact ( group_id, contact_id, status )\nVALUES...", "1452 ** Cannot add or update a child row: a foreign key constraint fails (`cr...")

```

# Answer
> 1 votes
Turned out to be a filter value in the report that was referencing a mailing group that no longer exists. It's 'id' was therefore missing from the civicrm\_group table.

# Answer
> 1 votes
So I feel rather silly, all that was needed was to go into the report and edit the filters so that it was no longer looking at the group that no longer existed rather than going to the report via the shortcut we have which ran the report and hence brought up the error.

---
Tags: drupal, error, groups, sql
---


title: CIVICRM respecte t'il la RGPD?

text:
# Question
Title: CIVICRM respecte t'il la RGPD?
Le règlement no 2016/679, dit règlement général sur la protection des données (RGPD, ou GDPR, de l'anglais General Data Protection Regulation) est applicable en France depuis le 25 Mai 2018 (normalement).

Nous avons des clients qui nous demandent la confirmation que CIVICRM respecte les règles de la RGPD.

1) Savez vous si c'est OK ou pas pour CIVICRM ?

2) Y a t'il un document qui en parle ?

Merci pour votre aide

Bonne journée

bien cordialement

Pierre COCHAT Makoa

---

English translation:

Regulation No. 2016/679, known as the General Data Protection Regulation (GDPR, or GDPR, from the English General Data Protection Regulation) has been applicable in France since May 25, 2018 (normally).

We have customers who ask us for confirmation that CIVICRM respects the rules of the GDPR.

1) Do you know if it's OK or not for CIVICRM?

2) Is there a document that talks about it?

Thanks for your help

Have a good day

Best regards

Pierre COCHAT Makoa

# Answer
Bienvenue sur Stack Exchange, avez-vous vérifié l'extension GDPR qui permet à vos bases de données CiviCRM de suivre les directives GDPR?

Vous pouvez l'installer via la page CiviCRM Extension Manager ou via ce lien - https://civicrm.org/extensions/gdpr

---

Welcome to Stack Exchange, have you checked out the GDPR extension which enables your CiviCRM databases to follow GDPR guidelines?

You can install this through the CiviCRM Extension Manager page or through this link - https://civicrm.org/extensions/gdpr
> 7 votes

# Answer
Jade's answer is very helpful, but I think its important to point out that a piece of software cannot be compliant or not to the regulation and that Pierre's users are actually asking the wrong question. Its your organisation's procedures and processes that are compliant with GDPR (RGPD) or not. The extension helps with that of course.

Hope that the Google translation is adequate as its the best I can do.

---

La réponse de Jade est très utile, mais je pense qu'il est important de souligner qu'un logiciel ne peut pas être conforme ou non à la réglementation et que les utilisateurs de Pierre posent en fait la mauvaise question. Il s'agit des procédures et processus de votre organisation conformes ou non au RGPD (GDPR). L'extension aide à cela bien sûr.

J'espère que la traduction de Google est adéquate car c'est la meilleure que je puisse faire.
> 4 votes

---
Tags: civicrm-home
---


# Question
Title: Can Gravity Forms be integrated with CiviCRM?
We have a site that has 5 different Gravity Forms currently. They work great and we love them. We're planning on setting up CiviCRM for this organization in WordPress and want to know if its possible to map all the data from our current forms directly into CiviCRM. Is this possible?

# Answer
CiviVIP has a paid solution for Gravity Forms CiviCRM integration. \- though depending on what you are doing - it may not integrate with everything you are doing in Civi. (I think it only does activities and contacts)

The CiviCRM WordPress community has galvanized around Caldera Forms and CiviCRM integration. Which is quite robust.

You may also be able to get away with using profiles \- depending on what you are doing with your forms.
> 2 votes

---
Tags: wordpress, forms, integration
---


# Question
Title: How to send a thank to a recipient of a soft credit
We want to send a thank you/acknowledgment letter to a donor who has their donation matched by their workplace. We log the workplace match under their workplace organization as a donation and we apply a soft credit to the employee. We use 'Find Contributions' to search for the employee match soft credits. We want to create a thank you letter that pulls in the employee name, the match amount, and the employer. The 2nd 2 variables are easy, but the employee that is linked with the soft credit appears to only be referenced as a contact ID. Is there a way to pull in the {contact.postal\_greeting} or {contact.first\_name} for this acknowledgment letter? I have looked through various extensions, but have not found anything. Thanks for any advice this group can provide.

# Answer
I've been writing extensions these past few weeks to address this very scenario, but I haven't finished them completely and haven't advertised their existence yet - in part because of improvements to CiviCRM that aren't in the released version yet.

### Ready Now

My Soft Credit Tokens extension adds some name tokens for the soft creditee. Note that I've only tested this with CiviRules, but should work in the scenario you mention.

There's also Send to Soft Creditee which creates a CiviRules action of the same name, but I don't recommend its use as more than a stopgap for more than a couple of weeks (see below).

I actually have several extensions to improve soft credits; several seem relevant to your situation.

### Ready Soon

Instead of the "Send to Soft Creditee" extension, in CiviCRM 5.23+ I've added support for firing a hook on Soft Credit creation/update. I also added support for "soft credit created/edited/deleted" in CiviRules 5.12+. Both should be released in early March 2020. Once both are released, the "Send to Soft Creditee" extension will be obsolete. You can also get this functionality today by applying the patch linked here and downloading the "master" branch of CiviRules.

Currently, all these tokens don't actually operate on the contribution selected, but **on the most recent contribution of the contact who made the donation**. This is due to current limitations in how custom (non-contact) tokens work, but Matt Wire is actively working on a solution. I work around this by sending the thank-you out immediately via CiviRules.
> 1 votes

---
Tags: civicontribute, civimail, soft-credit
---


title: Captcha Alternative to ReCaptcha

text:
# Question
Title: Captcha Alternative to ReCaptcha
ReCaptcha can be one of the most annoying captchas out there. Are there alternative captcha solutions out there for native civi profiles and pages?

# Answer
> 1 votes
I like CiviHoneypot myself, especially on contribution pages.

# Answer
> 1 votes
Not quite a captcha solution but this extension blocks repeated submissions on a contribution form from the same IP address. https://github.com/fuzionnz/nz.co.fuzion.iprestrictions

This wouldn't prevent the use of Tor or similar to mask ip addresses, and doesn't currently work on profiles.

---
Tags: recaptcha
---


# Question
Title: Error when trying to create a public form using a profile with a Grant field
I am trying to create a publicly accessible grant application page using a CiviCRM profile with form fields for Grant record information.

To test this, I created a profile with only one Grant-record field in it.

When I then create a Wordpress post using the shortcode for the profile, it gives this error: "Profile search, view and edit are not supported for Profiles which include fields for more than one record type."

If I change the form to have just one field of some other type of field (with no Grant field), for example, Individual - Birth Date, then it works just fine.

Does anyone know how to fix this?

# Answer
You'll need the Grant Application Pages extension to do what you want. I believe Caldera Forms CiviCRM will also do the trick, and give you some more flexibility to boot - but I'll admit I haven't tried that approach.
> 3 votes

---
Tags: wordpress, profile, grant
---


# Question
Title: Google error "This page didn't load Google Maps correctly."
Got Google Geocoding working, but can't get the map to work. When I try to map a contact, a map flashes briefly but is replaced immediately by the error screen in the 1st snippet below.

The Google Cloud dashboard shows my Geocoding work, but none of my failed mapping requests are counted (2nd snippet below). The CiviCRM log (in sites/default/files/civicrm/ConfigAndLog) shows all my errors while I worked on Geocoding, but no errors since I moved on to mapping.

In case it helps anything, the relevant page source (anonymized) is listed below the snippets. Apologies I can't get the markdown any better. Any help appreciated.

Im on CiviCRM 5.21.0 and Drupal 7.69.

```
<script src="//maps.googleapis.com/maps/api/js?key=012345678901234567890123456789012345678&sensor=false&callback=initMap" type="text/javascript" defer="defer"></script>

```

function initMap() { var latlng = new google.maps.LatLng(27.000001,-82.000001); var map = new google.maps.Map(document.getElementById("google\_map")); map.setCenter(latlng); map.setMapTypeId(google.maps.MapTypeId.ROADMAP); setMapOptions(map); }

```
function setMapOptions(map) {
    bounds = new google.maps.LatLngBounds( );

  var data = "<a href='/civicrm/contact/view?reset=1&cid=123'>snip</a><br />Main<br />snip<br />snip<br />snip<br /> United States<br /><br />Get Directions FROM: <input type=hidden id=to value='snip'><input type=text id=from size=20> <a href=\"#\" onclick=\"gpopUp(); return false;\">» Go</a>";

  var address = "snip<br />snip<br />snip<br />snip";

      var point  = new google.maps.LatLng(27.000001,-82.000001);
var image  = null;
                            image = "/sites/all/modules/civicrm/i/contact_ind.gif";

            createMarker(map, point, data, image);
            bounds.extend(point);

            map.setCenter(bounds.getCenter());
                map.setZoom(16);

}

function createMarker(map, point, data, image) {
    var marker = new google.maps.Marker({ position: point,
                                          map: map,
                                          icon: image
                                        });
    var infowindow = new google.maps.InfoWindow();
    google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(data);
                                                                infowindow.open(map,marker);
                                                               });
}

```

# Answer
> 3 votes
My bad. I had restricted the key based on IP address which works for server requests to Geocode, but not for JS (browser) requests to map. Changed the restriction to referrer and maps now display correctly.

---
Tags: map
---


title: Little Bic for France

text:
# Question
Title: Little Bic for France
Does the Little BIC extension work for France and how does it work?

I read the short documentation but couldn't figure out if I had to download BIC codes for France or not. And if so, how it should look like.

Any informations about it?

best regards, Guillaume

# Answer
> 1 votes
There is a UI function to get/update BICs for several countries under yourdomain.org/civicrm/bicImport?reset=1

Afaik there is no source for French BICs yet. In order to add French BIC you would need to:

1. find a freely available list/source of French BIC
2. implement fetching/parsing the list in LittleBIC

If you cannot do 2. you may create an issue in Github once you found the list - maybe someone can implememt it for you.

---
Tags: civisepa
---


# Question
Title: Mailings advanced search error - Invalid mysql syntax
I'm on **Drupal 7.69** and **CiviCRM 5.20.0**.

As long as I remember I've been experiencing an error when I've tried to look up the bounced recipients of mailings through Advanced Search.

I can't look up any mailing recipients by advanced search. It works through reports though. In the advanced search, I'm only choosing the mailing title and status (completed).

I see that the error is about MySQL syntax but I don't know what could I do to fix this. Is there any way to rebuild the whole database in CiviCRM? here is the full error from logs:

```
Feb 17 09:53:36  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
       FROM civicrm_contact contact_a   LEFT JOIN civicrm_mailing_recipients ON civicrm_mailing_recipients.contact_id = contact_a.id  LEFT JOIN civicrm_mailing ON civicrm_mailing.id = civicrm_mailing_recipients.mailing_id  LEFT JOIN civ$
          civicrm_mailing_event_queue.contact_id = civicrm_mailing_recipients.contact_id
          AND civicrm_mailing_event_queue.job_id = civicrm_mailing_job.id AND civicrm_mailing_job.job_type = 'child'
      WHERE  (  AND civicrm_mailing.id IN (407) AND  civicrm_mailing_job.status = 'Complete'  )  AND (contact_a.is_deleted = 0)

      GROUP BY sort_name
      ORDER BY sort_name asc [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND civicrm_mailing.id IN (407) AND  civicrm_mailing$
    [type] => DB_Error
    [user_info] => SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
       FROM civicrm_contact contact_a   LEFT JOIN civicrm_mailing_recipients ON civicrm_mailing_recipients.contact_id = contact_a.id  LEFT JOIN civicrm_mailing ON civicrm_mailing.id = civicrm_mailing_recipients.mailing_id  LEFT JOIN civ$
          civicrm_mailing_event_queue.contact_id = civicrm_mailing_recipients.contact_id
          AND civicrm_mailing_event_queue.job_id = civicrm_mailing_job.id AND civicrm_mailing_job.job_type = 'child'
      WHERE  (  AND civicrm_mailing.id IN (407) AND  civicrm_mailing_job.status = 'Complete'  )  AND (contact_a.is_deleted = 0)

      GROUP BY sort_name
      ORDER BY sort_name asc [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND civicrm_mailing.id IN (407) AND  civicrm_mailing$
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
       FROM civicrm_contact contact_a   LEFT JOIN civicrm_mailing_recipients ON civicrm_mailing_recipients.contact_id = contact_a.id  LEFT JOIN civicrm_mailing ON civicrm_mailing.id = civicrm_mailing_recipients.mailing_id  LEFT JOIN civ$
          civicrm_mailing_event_queue.contact_id = civicrm_mailing_recipients.contact_id
          AND civicrm_mailing_event_queue.job_id = civicrm_mailing_job.id AND civicrm_mailing_job.job_type = 'child'
      WHERE  (  AND civicrm_mailing.id IN (407) AND  civicrm_mailing_job.status = 'Complete'  )  AND (contact_a.is_deleted = 0)

      GROUP BY sort_name
      ORDER BY sort_name asc [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND civicrm_mailing.id IN (407) AND  civicrm_mailing$
)

Feb 17 09:53:36  [debug] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(208): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /var/www/html/sites/all/modules/civicrm/packages/DB.php(987): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...")
#3 /var/www/html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...")
#4 /var/www/html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr..."$
#5 /var/www/html/sites/all/modules/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
#6 /var/www/html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-2, NULL, NULL, "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...", "1064 ** You have an error in your SQL syn$
#7 /var/www/html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /var/www/html/sites/all/modules/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...")
#9 /var/www/html/sites/all/modules/civicrm/packages/DB/DataObject.php(2416): DB_common->query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...")
#10 /var/www/html/sites/all/modules/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...")
#11 /var/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php(435): DB_DataObject->query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...")
#12 /var/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php(1428): CRM_Core_DAO->query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...", TRUE)
#13 /var/www/html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(5027): CRM_Core_DAO::executeQuery("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n       FROM civicr...")
#14 /var/www/html/sites/all/modules/civicrm/CRM/Contact/Selector.php(1199): CRM_Contact_BAO_Query->alphabetQuery()
#15 /var/www/html/sites/all/modules/civicrm/CRM/Utils/PagerAToZ.php(108): CRM_Contact_Selector->alphabetQuery()
#16 /var/www/html/sites/all/modules/civicrm/CRM/Utils/PagerAToZ.php(136): CRM_Utils_PagerAToZ::getDynamicCharacters(Object(CRM_Contact_Selector), FALSE)
#17 /var/www/html/sites/all/modules/civicrm/CRM/Utils/PagerAToZ.php(52): CRM_Utils_PagerAToZ::createLinks(Object(CRM_Contact_Selector), NULL, FALSE)
#18 /var/www/html/sites/all/modules/civicrm/CRM/Contact/Form/Search.php(869): CRM_Utils_PagerAToZ::getAToZBar(Object(CRM_Contact_Selector), NULL)
#19 /var/www/html/sites/all/modules/civicrm/CRM/Contact/Form/Search/Advanced.php(320): CRM_Contact_Form_Search->postProcess()
#20 /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php(495): CRM_Contact_Form_Search_Advanced->postProcess()
#21 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75): CRM_Core_Form->mainProcess()
#22 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Advanced), "refresh")
#23 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Advanced), "refresh")
#24 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("refresh")
#25 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(284): CRM_Core_Controller->run((Array:4), (Array:0))
#26 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#27 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#28 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:4))
#29 /var/www/html/includes/menu.inc(527): civicrm_invoke("contact", "search", "advanced")
#30 /var/www/html/index.php(21): menu_execute_active_handler()
#31 {main}

```

I will appreciate any help towards the solution of this error.

# Answer
> 0 votes
Welcome to CiviCEM Emeryk, The issue you getting has been now fixed and will be part of 5.23 release. You can either wait for 5.23 release and upgrade CiviCRM or apply patch from here.

HTH

Pradeep

---
Tags: error, search, mysql, mailing
---


title: Multiple PDF in one CiviRule

text:
# Question
Title: Multiple PDF in one CiviRule
Is it possible to generate and send several .pdf files with CiviRules "send PDF" function? I want to send an invoice and a certificate that have different templates.

I could send several emails but one email with 2 attachments sounds better. :-)

regards, Guillaume

# Answer
> 1 votes
This is not so much a CiviRules question but more a PDF API question. At this point it time I do not think this is possible. But I know we have 1 party interested in this, you might want to contribute too?

# Answer
> 1 votes
You can create many pdfs from one webform submission and then send them by civirules. Look up FillPDF extension for drupal.

---
Tags: civirules
---


# Question
Title: Handling registration of multiple participants for an event?
I'm not sure if this should be here, in *Mattermost* or in *Issue Reporting*. It refers to CiviCRM 5.22.0. We allow on-line registration of multiple participants for an event, and allow a deposit to be paid. The initial registration is *Pending (Pay Later)* as we do not wish to get involved with payment processors and the associated security implications. Instead, we monitor our bank account for such payments. The email sent in response to the receipt of the registration sent to the primary participant contains the information about all the participants. However, the email sent in response to the administrator recording the payment (and changing the status to *Partially Paid* only shows the registration of the primary participant and it also shows the total amount paid and the outstanding balance. Editing and sending another receipt just shows the information about the primary recipient and no balance information.

Would it be better if all such receipts showed:

* The information about *all* the recipients
* The amount paid so far and the outstanding balance.

?

I have been investigating how this might be accomplished and discovered, among other things, that there seem to be several ways in which the total amount payable is calculated, depending on which part of *CiviEvent* is doing the calculation.

Has anyone any thoughts on this?

# Answer
> 1 votes
This by default is not available in CiviCRM ATM. You can alter the message template under System workflow message for 'Events - Registration Confirmation and Receipt (off-line)' to include additional details. If you are good in smarty variables than you can use api to fetch details like additional participant or payments and include it in your message template, or you can create extension to implement tokens and tokenvalue hook to add tokens and process the value when rendering message template before it is send to user.

---
Tags: civievent
---


# Question
Title: How best to integrate CiviCRM into our WordPress website
Our website uses WordPress but the developers are having issues integrating CiviCRM.

Should we go elsewhere? We want integration with our website but can we do this hosting CiviCRM outside of the website?

# Answer
> 2 votes
It depends on what type of experience / skills they have. There are a lot of Wordpress 'developers' that wouldn't be able to go fully into a web development role.

However they likely have no experience of CiviCRM so they will have to learn a new solution from scratch so there will be issues along the way.

If they are having issues they can reach out to the community for advise on how to bring it forward and resolve any issues they are having.

# Answer
> 1 votes
Your title doesn't quite match the detail of the question. As Jade says it would help to have more detail, but answering the title question, I'd say that its an integration issue rather than an actual WordPress problem (many people run CiviCRM on WordPress successfully). So I'd say the website company needs to address the issues.

Looking at the more detailed question, it probably would be possible to host CiviCRM on WordPress elsewhere, but that isn't likely to make life easier. Your website developers are still going to have to integrate it into their site and you are also adding complexity by introducing a third party.

# Answer
> 1 votes
the answer may depend on how much you want to keep the WP developers involved in your WP site. Seem like several solutions eg

* change WP developer to one who can also support civicrm
* move hosting to a VPS so both your existing WP developers and a civicrm developer can have full access
* host your CiviCRM system 'somewhere else' and use eg Remote Forms to get your civi forms on your main WP site
* ask your existing WP developers if they can provide SSH access to a civicrm partner to take care of the installation

---
Tags: wordpress, hosting
---


# Question
Title: Issue exporting and importing Contacts / Membership data
first time posting and really hope someone can help me!

We are trying to EXPORT our data from an old installation of CiviCRM on a drupal server IMPORTED into a new installation of CiviCRM on WordPress. All of the data has been exported using CiviCRM's built in export so we have all of the fields etc.

When importing Contacts using the CiviCRM import option you of course have to match all the fields to what is in your spreadsheet and here is where we run into a problem ... we have exported the contact ID and have contact ID for all contacts but there is no field Internal Contact ID to select / match to when importing data!

When we import Members there are TWO required fields, internal contact ID AND external contact ID ... we can't import internal contact ID to internal contact ID here, because since there was no option to do that when importing Contacts, all the contacts we imported were given different auto increment contact ID's.

We were thinking that when we import contacts we will map Internal Contact ID -\> External Contact ID (since there is not an Internal Contact ID option to import to) .... then when we import members we again map Internal Contact ID -\> External Contact ID .... then the External Contact ID will be the same for both members AND contacts .... effectively connecting them ... so that is what we tried ...

When importing contacts we mapped Internal Contact ID -\> External Contact ID. Then we made a blank column in the spreadsheet we were importing, which we named Contact ID and which was blank for every row, and when importing mapped the this blank field -\> Internal Contact ID and the ACTUAL Internal Contact ID's from the old system -\> External Contact ID's ... this way external id's would match for contacts and members, linking the two .... but we got error that Internal Contact ID's do not match (the blank value in the members import does not match the auto-incremented ID in the contacts table).

I did a test where I tried importing only one Membership record, where I took the new auto-incremented Contact ID and replaced the Contact ID that from the old system and this imported, properly linking the Contact and Member.

How come when you are importing though there is no option to import Internal Contact ID? Without using some complicated MySQL Query, only using the CiviCRM export / import, how am I able to do this without having to manually match every Member Record Internal Client ID with the newly created auto-incremented Internal Client ID created when I imported the clients?

I Hope this all makes sense. Please help!

EDIT: Thanks for your responses guys!

I know my post was a bit confusing so I'll try to explain it again more simply. We had CiviCRM on a Drupal system. We want to import the existing data into our new WordPress system (fresh install of CiviCRM).

When we import the contacts (which were exported from CiviCRM so we have all the fields) there is no option to import the internal contact id, so all the contact id's are now auto incremented and not the old ones. Then when we import members the contact id's don't match.

Because of this, on import we mapped the old contact id's to the external id field. Then when we import members though, even though we have mapped the contact id -\> external id field for both (so they could sync that way) we saw that contact ID was a required field with asterix next to it .... but mapping the new auto incremented contact id's would require a TON of manual work!!!

I THINK WE GOT IT WORKING THOUGH!!!!

At first we tried making a new blank column that we would map to the "required" contact id when importing members but that gave an error that the contact id's were not valid (because they were all blank).

What we tried next, which I can't believe worked, was just setting the "required" contact id field to NOT IMPORT .... and it SEEMS to have imported all of the members records and properly synced them by their external id's!

I don't know if that made any more sense unfortunately.

# Answer
> 3 votes
We had a similar problem importing from an old (non CiviCRM system) and I wanted to make the old membership numbers the Contact ids on the new CiviCRM system. Fortunately membership numbers 1 & 2 were not in use so no clash with the initial admin and organisation contact records. There were some gaps in the old membership numbers and I was also quite happy that new Contact ids would also include none members. All I needed was for them to be unique and increasing.

In my contact import file, I added dummy records for all the missing Contact ids (except 1 & 2) and added an "ZZZZ" in the last name field with the rest of the fields in a valid format, but meaningless. I imported real and dummy records matching Contact Id as (new) External Id and then deleted the records with "ZZZZ" in the last name. All the kept new records have the same Contact Id as the old system membership numbers (or old Conact Id in your case.

If the expanded import file is very large, you will probably need to split it to avoid timeouts.

You can then use the Contact Id to match the membership records.

Hope that helps.

# Answer
> 2 votes
Was this all driven by wanting to move from Drupal to WordPress? If so, you can do this at the database level since most of Civi's data is independent of the CMS.

See https://docs.civicrm.org/sysadmin/en/latest/misc/switching-cms/switch-cms/

# Answer
> 1 votes
To get that field to appear in the dropdowns, then on the first page of the import steps you need to choose Update or Fill for "For Duplicate Contacts".

---
Tags: civimember, contacts, database, import, data-import
---


# Question
Title: Activity get API3 does not return case activity
Im using API3 to get activities

My code is

```
function hook_any_activity_get($cid,$type) {
  $params = [
    'contact_id' => $cid,
    'activity_type_id' => $type,
    'sequential' => 1,
    'is_deleted' => 0,
  ];
  try{
    $result = civicrm_api3('Activity', 'get', $params);
  }
  catch (CiviCRM_API3_Exception $e) {
    // Handle error here.
    $errorMessage = $e->getMessage();
    $errorCode = $e->getErrorCode();
    $errorData = $e->getExtraParams();
    return [
      'is_error' => 1,
      'error_message' => $errorMessage,
      'error_code' => $errorCode,
      'error_data' => $errorData,
    ];
  }
  return $result;
}

```

This works fine when the activity is created outside of a case.

When the activity is created within a case I get an error

One of parameters (value: ) is not of the type Positive

I have tried this written into a module and in Drupal rules. Same error.

I'm not seeing anything in backtrace or the CiviCRM log file.

Ive even tried it just by trying to return the activity using the activity ID.

I also tried it by including the case ID

# Answer
Turns out there is a bug in the CiviMobile extension that is breaking this functionality. Disabling this extension fixes the problem.
> 2 votes

# Answer
There is an extension for a case activity API, although I have not tested it for a while! https://civicrm.org/extensions/caseactivity-api That might help you?
> 1 votes

# Answer
Parameter `contact_id` should be `target_contact_id` (if looking for client) or `source_contact_id` (if looking for author).
> 1 votes

---
Tags: api, civicase, activity
---


title: Custom permission through UI

text:
# Question
Title: Custom permission through UI
Is there any extension that allow user to create permission through UI so that they can be used for defining permission for menu items or reports or form(eg form builder extension)

# Answer
Pushed Custom permission extension, where you can create your own permission through UI by navigating to CiviCRM \>\> Administrator \>\> Customize Data and Screens \>\> Custom Permissions
> 6 votes

---
Tags: permissions
---


# Question
Title: CC Option in Contribution - Email Receipt
I need my Receipt to be CC'd to specific (Sponsor of the user) whenever I email my receipt to the actual user - How do I achieve this?

Note: each user will have a different sponsor

Is their a way I can do ?

Or do I have to add CC option in the Form ?

Thanks in advance

# Answer
> 0 votes
Perhaps you could use CiviRules (along with the added extension Email API to enable CiviRules to send emails) not sure though. I don't think CiviCRM provides you facility to choose cc or bcc when sending receipt from offline contribution form(you can add extension and implement buildform and altermailparams hook). However you could achieve this by doing some manual process

1. Create contribution and don't send receipt.
2. Find contribution and select contribution, use 'Print receipt' action
3. Download the receipt
4. Use Email to activity to send email with receipt as attachment.

Cheers

Pradeep

# Answer
> 0 votes
If you have something like a Relationship set up (or contact reference field) so that there is a connection between the Donor and the Sponsor then an extension could probably automate this.

Without knowing your full workflow/specs the other thing to confirm you know about so you can rule it out is the PCP - Personal Contribution Page - which is very much designed so that donations for a specific cause/case can be channelled through someone like a sponsor

---
Tags: contributions, receipts
---


title: Option to Tell a Friend

text:
# Question
Title: Option to Tell a Friend
When I click "tell a friend" and submit my friend's name and email after I've made a contribution on our contribution page I get error, "Supervised Rule for Individual Doesn't Exist" -- what does this mean? How can I fix this so our contributors can share information about our organization?

# Answer
CiviCRM is telling you that there is no "supervised" rule configured for the Individual contact type - it doesn't know how to check that those "friends" are new unique contacts and not existing donors/members/contributors etc.

There's some information on deduping and merging contacts in the CiviCRM User Guide

In particular please check that you have a supervised rule configured for individuals as seen in the screenshot on the first linked page.
> 2 votes

---
Tags: civicontribute, contribution-page
---


# Question
Title: Donation recorded under the wrong contact name
Help!

When one of our donors contributed on our online contribution page with Civi, it was recorded in civi under another (unrelated) donors name. But it was recorded properly in our payment processor. Civi even sent a confirmation email to the correct email address but using the incorrect name of our donor. What went wrong?

I want to move the donation from the wrong client to the correct one, but if I try to delete the donation it says it will delete any financial record of that donation as well. Is this true? Will it delete the payment as recorded in our payment processor Authorize.net?

Thank you all.

# Answer
> 2 votes
If its a matter of updating one contribution than you can

1. use api explorer(CiviCRM \>\> Support \>\> Developer \>\> API explorer 3) to update the contact id for the contribution, see below image(use the contribution id to move the contribution)

2. Execute below sql statement in your mysql (below sql statement update contribution with 23 to set contact to id 103)

sql:

```
UPDATE civicrm_contribution SET contact_id = 103 WHERE id = 23;

```
3. You can use Move contribution extension to move contribution to different contact

---
Tags: civicontribute
---


# Question
Title: Disabling Scheduled Jobs, Transactions, etc (from command line)?
I'm working on migrating our site to a different server. I need to do some testing on the new server while keeping the production site live. The problem is that the test server continues to run all the scheduled jobs and recurring contributions. I read about changing the environment (https://docs.civicrm.org/sysadmin/en/latest/misc/staging-production/#changing-your-environment), but that doesn't clearly state what actually gets disabled (besides mail jobs).

What is the best way to ensure that my test server has all that stuff disabled? I have several sites running on the server and need to do this from the command line.

Thanks!

# Answer
> 2 votes
Setting the environment to Staging/Development will turn off all schedule job from running unless you explicitly specify `runInNonProductionEnvironment=TRUE` in job parameter and also no emails will be send out from CiviCRM to any contact(will be logged in a file on server disk)

You can set the option to Staging/Development using one of the below methods

1. CiviCRM \>\> Administer \>\> Debugging and Error Handling, Select option for 'Environment'
2. `cv api Setting.create environment="Staging"`
3. `drush cvapi Setting.create environment="Staging"`
4. Over-ride settings by adding below lines in civicrm.settings.php

:

```
global $civicrm_setting
$civicrm_setting['domain']['environment'] = 'Production';
define( 'CIVICRM_MAIL_LOG', '/Users/pradeep/Sites/drupal7/sites/default/files/civicrm/templates_c//mail.log');

```

---
Tags: civicontribute, recurring-contributions, scheduled-job, drush
---


# Question
Title: Update Multiple Contributions with Missing Attributes via Search Builder?
We have 300 or so contributions that are missing a custom field. We want to manually update those records. We are running a search for contributions that have a custom field but are missing the custom field we want. We run a search builder.

Example

* Contribution - Custom Field 1 - = - Attribute
* Contribution - Custom Field 2 - Is Empty
* Contribution - Date Received - \> - ##/##/####
* Contribution - Amount - \> - 1

I run the search and I find the 300 or so contributions. I can only update each record by clicking on the contact, going to their contributions, finding the contribution, edit the custom fields. If I try to update multiple records - I can only update the contacts - not the contributions. So I add them to a group - run a contribution search for the date range and limit to only the group. Now I have over 700 contributions as those contacts may have given multiple times. I can bulk update the contributions now with a profile - but I now have to sift through half the contributions that do have the correct custom field chosen and find only those that are blank.

Is there a better way to do this?

Export/Import is not a good solution.

# Answer
> 2 votes
Try creating a Profilewith the necessary Contribution fields and then accessing it via Actions (Bulk update) from the Find Contributions page

# Answer
> 1 votes
You can do either one of the two methods

1. Export all contributions into csv, use csv skills to clear rows that are not empty and then update the rows with necessary data and import it back using contribution ID from import contribution UI.
2. Use contribution reports(contribution detail report probably) to filter contribution that have empty data for custom fields, export the results with contribution id, update csv file with necessary data and import it back using contribution ID from import contribution UI.

HTH

Pradeep

# Answer
> 0 votes
You could do this via the API with chaining. The basic pattern is:

```
civicrm_api3('Contribution', 'get', [
  'sequential' => 1,
  'custom_1' => ['IS NULL' => 1],
  'api.Contribution.create' => ['id' => "\$value.id", 'custom_1' => "42"],
]);

```

Or in words:

* Find contributions that you want to update: this just looks for the `custom_1` field being null. Add whatever conditions you need.
* When you have a contribution that matches, call Contribution.create with the existing id to update it, and set the field you want. `"\$value.id"` is a bit of API magic to give you the id of the contribution you just found.

You'll need to add `'options' => ['limit' => 0]` if you want to process all 300 in one go.

You can run this via the API Explorer, or if you have shell access, create a script and run with `cv`

---
Tags: civicontribute, contributions, search-builder
---


title: is there a jobboard in civiCRM

text:
# Question
Title: is there a jobboard in civiCRM
new to civiCRM;-)

is there a jobboard in civiCRM

or to ask it in other words: does civiCRM has a board constructed more in the realm of an Applicant Tracking System OR does it allow to function as a jobboard:

It might help if i describe a user scenario as well eg

**User A** want to list a job. They need to specify the Salary, Location, Skills required etc.

**User B** wants to find a job. They want to be able to search by Skilll, Location, Salary, etc

does civiCRM accomplish this?

# Answer
> 1 votes
There is no 'job board' feature as such. You could have a look at CiviHR but I don't recall it being a place where people could advertise their own jobs.

If I had to do this, on Drupal, I would be using Drupal Webforms that would generate Activities which would then be displayed in a Drupal View with links that would take the 'applicant' to another Drupal Webform where they would generate another Activity that was somehow referencing the 'job position'.

Not much help to you directly but hope this gets the conversation started.

# Answer
> 1 votes
This is more of a Drupal thing. You'd have a content type "job listing".

You should then use CiviCRM to handle the communications that can be sent to different job hunters by different job listers.

This sounds like it would function in a similar way to Future First's custo. Please feel free to ask me for further help and details at CiviFirst.com

# Answer
> 0 votes
The CiviGrant component could be a good fit (with a few custom fields). Where the 'grant' is a job offer, and people could submit their application.

---
Tags: webform-civicrm, php
---


# Question
Title: How to call my post_provision_install hook after CiviCRM installed?
I want to automate the removal of households from CiviCRM, right after it has been installed via Aegir on Drupal 7.

I implemented my post\_provision\_install hook, but it runs before the same hook of Hosting CiviCRM module, means before the install of the CiviCRM module.

How can I change the calling order of the `post_provision_install` hooks in this particular case?

Or how can be an `post_hosting_install_task` hook implemented and called?

# Answer
> 1 votes
You could perhaps do this with a CiviCRM extension rather than a Drupal module so you are sure it is only executed once CiviCRM is installed? Not sure if it is possible in your scenario.

---
Tags: installation, hooks, aegir
---


title: CiviVolunteer - Reports Not Appearing

text:
# Question
Title: CiviVolunteer - Reports Not Appearing
I don't use this option a lot so forgive me if I'm just forgetting how this works, but last I knew in CiviVolunteer if you wanted to generate a report of the hours logged, you'd go to Contact Reports -\> New Report and doing Volunteer Report would be an option from there. (Could have sworn I did this ages ago and saved it as a report, but that doesn't seem to be showing up either.)

I'm wondering if a recent upgrade might have hosed the CiviVolunteer reports? I'm on CiviCRM 5.22.0 running on WordPress 5.3.2.

I checked the CiviCRM logs and the only thing I see in there that I'm wondering might be related is this message: `Deprecated Path: There is a setting (generate_schema_and_data) not correctly defined. You may see unpredictability due to this. CRM_Core_Setting::setItems`

Other than that functionality seems normal from what I can tell so I'm a bit flummoxed and would appreciate any ideas folks might have. Thanks!

# Answer
In my case an upgrade to 5.22.1 fixed the issue.
> 1 votes

# Answer
Can you check if the report template is enabled by navigation to Administer \>\> CiviReport \>\> ManageTemplates? If disabled than enable it, if not found than add one with values shown in below screenshot
> 0 votes

---
Tags: civivolunteer
---


# Question
Title: Impossible to add a relationship between contacts / organisations
When I add a Relationship to a Contact or an Organisation, the list of Relationship Types is displayed in background and I cannot select one of them. See screenshot:  Any idea ? I use CiviCRM 15.7.0 under WP (last version)

# Answer
> 2 votes
This case has been solved. We found that there is an incompatibility with the popular Divi Theme we are using between WP and CiviCRM. We can provide details if needed.

---
Tags: wordpress, relationships
---


# Question
Title: Getting "set_time_limit() has been disabled for security reasons" when importing a CSV file into contacts
I'm getting "set\_time\_limit() has been disabled for security reasons" when importing a CSV file into my contacts.

The exact warning is "set\_time\_limit() has been disabled for security reasons in /home/clients/9f584f50407ada97b7c17ed3b0bbc0f0/crm/wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Controller.php on line 31"

I use CiviCRM v5.21.0 under WP last version

Any idea will be much appreciated. Thanks

# Answer
This case has been solved in adding this two lines in the wp\_config.php file after the define section:

*ini\_set('display\_errors','Off');*

*ini\_set('error\_reporting', E\_ALL );*

It is also important to solve it because it can have consequences for CiviCRM (for us in the import process). Hope this helps
> 0 votes

---
Tags: wordpress, php
---


# Question
Title: Very strange thing when trying to import contacts
I am trying to import contacts into our database from a CSV file. I cannot reach the first step of the import process because I never get the input field to enter the filename of the CVS file. I just have a field telling me 2 possibilities (SQL and CSV) but this field is not editable and there is no Explorer Windows opening. Strange because it works fine for Import Activities and there I have the Windows Explorer coming to enter the CVS filename. I use CiviCRM 5.21.0 under WP with a laptop under Chrome, Windows 10... Same problem under Edge or under another workstation. Any help will be much appreciated, thanks

# Answer
Solved by editing the wp\_config.php file by adding

*ini\_set('display\_errors','Off');*

*ini\_set('error\_reporting', E\_ALL );*

after the define section.

See also this question
> 0 votes

---
Tags: wordpress, ui, windows
---


# Question
Title: New Contacts and Profiles - Is there a way to update the source field?
We use some profiles - some of which are embedded on external sites. It would be helpful if the Contact Source could be updated to reflect the source of the contact being the profile.

I know this can be done using Drupal and WebForm - but I am specifically interested in Profiles.

This has been asked before \- but its been a few years - so hopefully we will get some fresh answers. :)

# Answer
> 4 votes
One option is very similar to this question/answer.

Add contacts created by the profile to a group and use CiviRules to populate the source field when the contact is added to the group - it's not "clean" and honestly a PR/extension to allow profiles to set any field using tokens (including a token for "profile name".) would probably be a better long-term solution.

Alternatively a PR to CiviRules to directly support profiles.

---
Tags: profile, form-snippets
---


title: CiviMail: Mystery Unsubscribes

text:
# Question
Title: CiviMail: Mystery Unsubscribes
I just did our first email blast and it went pretty well. I'm using the token {action.optOutUrl} in the footer, plus the domain address, but that's it. The Opt Outs appear to have worked fine and they're labeled "No Bulk Emails (User Opt Out)" in the CiviCRM database. The bounces processed properly as well.

The weird thing was that the Mail Report shows that 5 people made "unsubscribe requests". How did they do that since the token isn't there?? Plus, their records aren't flagged with any red message, tho they do show up in Advanced Search. Did these people hit the spam button on their email programs? Will they get future emails? Am I supposed to do something with them? Thanks, in advance! Jim

# Answer
> 8 votes
I had this question also and just figured it out!

Civimail always includes a List-Unsubscribe header in the messages it sends out (https://issues.civicrm.org/jira/browse/CRM-3251).

That header is invisible to most recipients and is intended as a way for mail clients to provide easy and standardized unsubscribe mechanisms (http://www.list-unsubscribe.com/).

I note that google doesn't seem to do anything with it, though they do expose the list unsubscribe option for mailman lists, or used to .. But, it appears that Windows Live does use it, so anyone using that software that receives Civimail can use it.

The only clue I had was in my apache logs - the time of the unsubscribe matched a soap request that came in via UAS/CiviSMTP that handles the bounces for this domain.

Thanks to Leyla UAS/CiviSMTP support (http://www.civismtp.com/) for confirming this idea.

For bonus points, assuming you really only want people to opt-out instead of unsubscribing, you can include this in a custom extension or module, changing 'hook' to the name of your custom extension or module.

```
function hook_civicrm_alterMailParams(&$params, $context) {
  if ('civimail' == $context || 'flexmailer' == $context) {
    $params['List-Unsubscribe'] = str_replace('mailto:u.','mailto:o.',$params['List-Unsubscribe']);
  }
}

```

# Answer
> 1 votes
I suspect that unsubscribes are a subset of opt out. So in CiviCRM, when a user opts out, they are also automatically unsubscribed from the mailing list groups you used.

As opposed to those that might unsubscribe (if you had included that link) wherein they would be removed from the mailing list group they are in but would not have been opted out.

# Answer
> 1 votes
It's weird indeed. Are you using an external provider to handle the mailings (eg mandrill or mailjet?) by any chance?

Given the low number, I would suggest you to contact the 5 to tell them that you quite don't understand what happened with your mail server, if they could remember and explain you what they did to unsubscribe, it'd be super useful for you to understand their workflow.

(be clear it's a personal email, not a mass mailing one and that you will remove them from the mailing list). I would send them from your mail client, not via civi

Please update us on your finding.

# Answer
> 0 votes
OK - I think I have this (thanks for input from @pradpnayak)

according to the docs for hook\_civicrm\_alterMailParams:

> You can add custom headers by appending to $params\['headers'\]. Example:
>
> ```
> $params['headers']['X-My-Header'] = 'my header value';
>
> ```
>
> The headers key may not exist in the $params array when passed into the hook.

so this was the codce in an extension to unset the existing 'List-Unsubscribe', and put in a NULL replacement into the headers:

```

/**
 * Implements hook_civicrm_alterMailParams().
 *
 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
 */
function custom_civicrm_alterMailParams(&$params, $context) {
  if ($context == 'flexmailer' || $context == 'civimail') {
    // remove existing header
    unset($params['List-Unsubscribe']);
    // replace via the 'headers' key
    $params['headers']['List-Unsubscribe'] = NULL;
  }
}

```

---
Tags: civimail
---


# Question
Title: Removing "List-Unsubscribe" from civimail headers (for when getting seemingly random unsubscribes)
There is a "header" entry automatically put into mailnigs from civimail (also when using flexmailer / mosaico) which some email clients use to enable unsubscribing (or opting out) from mailing lists.

If, for example, an unsubscribe link is in your email, and the site is reporting opt-out's (or vice-versa) then this may be the reason why. So - how to fix it?

# Answer
> 2 votes
thanks to @pradpnayak for guidance :D

according to the docs for hook\_civicrm\_alterMailParams:

> You can add custom headers by appending to $params\['headers'\]. Example:
>
> ```
> $params['headers']['X-My-Header'] = 'my header value';
>
> ```
>
> The headers key may not exist in the $params array when passed into the \> hook.

so this was the code in an extension to unset the existing 'List-Unsubscribe', and put in a NULL replacement into the headers:

```
/**
 * Implements hook_civicrm_alterMailParams().
 *
 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
 */
function custom_civicrm_alterMailParams(&$params, $context) {
  if ($context == 'flexmailer' || $context == 'civimail') {
    // remove existing header
    unset($params['List-Unsubscribe']);
    // replace via the 'headers' key
    $params['headers']['List-Unsubscribe'] = NULL;
  }
}

```

---
Tags: civimail, extension, php
---


# Question
Title: CiviCRM emails not sending with attachments
I'm sending post event emails to participants Find Participants\> Event Name is\> send mail to less than 50). These send fine when just mail body text is included.

When I add an attachment and press submit I get the following error message

I tried the same thing from find contacts- Find Contacts- random search criteria\> send to less than 50.

Again, just text works fine, add an attachment and this time I get sent to the advanced search page with this message popping up

Currently Civi 5.19.4 Drup 7.69

Anyone seen anything similar?

Woo-hoo! Just recreated on dmaster.demo

Raised at lab.civicrm.org https://lab.civicrm.org/dev/core/issues/1604

# Answer
The attachment size exceeded the site max file upload.

Not a bug in Civi as suspected, but the error message is really unhelpful in this instance.
> 3 votes

---
Tags: email
---


# Question
Title: What message triggers can be found in the dedupe process?
We a deduping a lot of records, many of which were imported from sources prior to using CiviCRM. Apparently, at least one merged record triggered a change of email notification. Can I kill those notifications? There are likely to be many of them.

Is there a specific trigger? For example, if we overwrite a record with an old address with a new address instead of opting to keep just the newer record? The point is that we don't want to send a pile of notices for changed email addresses.

# Answer
Is it this wordpress feature? https://wordpress.stackexchange.com/questions/202783/fwd-website-name-notice-of-email-change

https://build.trac.wordpress.org/browser/tags/5.3/wp-includes/user.php#L2056

Short answer to prevent it: `add_filter( 'send_email_change_email', '__return_false' );`

Any time a contact record is updated, civi will attempt to update the corresponding user account in the CMS for name and email. So it would only be for contacts that have an associated user account.

You can also turn this sync off at Administer - System Settings - CMS Database Integration - Sync CMS Email, but then your users and contact records can get out of sync.
> 0 votes

---
Tags: email, duplicate-contacts
---


# Question
Title: Duplicate users being created by... something!
I have been trying to unpick a mystery now for a week without success! I wonder if anyone can help.

We have two contacts (out of a database of c 7,500) where we're seeing some odd behaviour.

As an example - let's call him John Doe.

John Doe has a contact record, linked to a Wordpress user account. He has registered for an event recently (may or may not be relevant). His record has a linked current employer, job title, and address.

Every day at 12:13pm or 12:14pm, a duplicate John Doe account appears in CiviCRM, according to the change log created by John Doe, with matching:

* Name
* Email

But without

* Linked Wordpress account
* Job Title
* Current Employer

I am at a loss to explain why. Things I have tried:

* Disabling the Capitalisation Correction Extension
* Disabling CiviRules
* Examining the scheduled jobs log

Cron runs every five minutes. The Scheduled Jobs log shows that between 12:10 and 12:15pm each day, there are no scheduled jobs running:

> 2020-02-20 12:10:02 Finishing scheduled jobs execution.
>
> 2020-02-20 12:15:05 Starting scheduled jobs execution

There are no scheduled jobs which uniquely run at 12:10pm.

For each contact, there is only one item in the change log:

I'd be extremely grateful for any advice on investigating this further as I am now drawing a blank (and I have 36 John Does in the database!)

We are currently on 5.13.4 (security upgrade imminent)

# Answer
> 1 votes
This was resolved by removing the user's current employer, saving the record, and then re-adding the current employer. Seems potentially to have been some problem around the cascading membership?

---
Tags: contacts
---


# Question
Title: How to include source page URL in donation page email receipt?
When my CiviContribute donation pages send out email receipts, I would like the emails to include the URL of the source page (i.e., the WordPress page that contains the shortcode of the CiviCRM donation page). Is there a Smarty variable that has that source (or "referrer") page URL? Or is there another way to accomplish this? (Seems like this would be a good variable to have.)

I'm on WordPress 5.23 and CiviCRM 5.13.

I've added the `{debug}` token to the HTML email template to inspect the available variables and didn't find anything quite suitable. There is a variable called `$printerFriendly` that seems to have the page URL but with extra query string parameters. Is there a Smarty feature to discard the query string and retain just the page URL?

(*Side note in case it helps someone: if you include `{debug}` in **both** the HTML email template and the plain text email template, the contribution page will fail with a "too many redirects" error, and the contribution does not get recorded!*)

# Answer
I think the short answer must be "no". Once the client is on a CiviCRM page, there are usually a few clicks before you get to the email receipting code, so at that point, there wouldn't be any record of the referrer (unless you have some code that is saving it).

There should be a way to construct at least one version of a contribution page url, if you have that in your smarty variabloes, using the contribution page id, like:

```
https://yourdomain.org/civicrm/contribute/transact?reset=1&id={contribution page id}
```

There's probably a way to convert that to a wordpress shortcode if you're smarter than I am about such things.
> 1 votes

---
Tags: civicontribute, email, receipts, smarty, donations
---


# Question
Title: Repeat currency symbol in a contributions list
I would like to send a classic mailing to our donors which lists the contributions of the previous fiscal year following this guide.

But the list I obtain, only have the currency symbol near the first contribution.

And even in the above-mentioned guide, the currency symbol appears only near the first contribution:

Is there a way to fix this and have currency symbol near each of the contributions listed?

Thank you.

# Answer
> 0 votes
The short answer is: "yes".

And the longer answer is: dig into the code and submit a PR, or hire someone to do that.

---
Tags: mailing
---


title: Export to csv/xls with a template

text:
# Question
Title: Export to csv/xls with a template
I have a customer who is an old-aged volunteer and is not so familiar to spreadsheets but still needs to use them until the whole database is imported and I want to make the export from CiviCRM easier to use for her.

I know this is a weird question because the first answer is: "don't use spreadsheet or at least learn how to use them" but I was wondering if there is a way / extension to help doing this:

* export to excel with the possibility of choosing and arranging columns

Any Idea?

regards,

Guilllaume

# Answer
> 1 votes
To address the export to excel part of the question, you can use this (well-written and maintained) extension:

https://civicrm.org/extensions/export-native-excel

But the field ordering is harder - by default, you can't change that.

# Answer
> 0 votes
You can get part of this by using the constituent summary civireport and choosing the desired columns and saving that as an instance, then using the export to csv action from the dropdown.

But it's not a complete list of fields and you can't reorder them.

---
Tags: export
---


title: Errors Tracking Opens

text:
# Question
Title: Errors Tracking Opens
We are having an issue with tracking opens for mailing. Click throughs track fine but opens do not. I inserted the URL for the tracking image into my browser and got a 500 error. I get the following in the PHP error log:

```
 [19-Feb-2020 16:37:18 UTC] PHP Fatal error:  Uncaught Exception: Function "is_admin()" is missing, even though WordPress is the user framework. in /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:264
Stack trace:
#0 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(203): CRM_Utils_System_Base->theme('<div id="crm-co...', false, false)
#1 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(196): CRM_Utils_System::theme('<div id="crm-co...')
#2 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#3 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(998): PEAR_Error->__construct('DB Error: no su...', -19, 16, Array, 'INSERT INTO civ...')
#4 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-19, 16, Array, 'INSERT INTO civ...')
#5 /home/mysite/public_html/wp-content/plug in /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 264

```

We get the following in the CiviCRM log:

```
[error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']"]
)

```

Site is WordPress 5.3.2, CiviCRM 5.22.1

# Answer
> 1 votes
The "DB Error: no such field" bit in your error message is your key clue.

The missing field is listed as "Unknown column 'j.start\_date' in 'where clause'", but it's not showing any more of the sql to know which table that comes from.

I dug through some code, and I'm pretty sure it's supposed to be coming from the civicrm\_mailing\_job.

So - either that table isn't getting joined properly (likely a code issue), or else that field is missing in that table in your instance.

Since 5.22.1 is fresh out the door, it could be a code issue.

---
Tags: reports, mailing
---


title: System Status page notifications

text:
# Question
Title: System Status page notifications
After upgrading CiviCRM on Drupal 7 to 5.22.1 (from 5.21), the system status page says:

> The site is running 5.21.0. Additional patches are available:
>
> * 5.21.1 (2020-01-10): Fix recent regressions involving "Enable multiple bulk emails" and "Payment Summary" table.
> * 5.21.2 (2020-01-23): Fix recent regressions involving contact date-filters, certain receipts, certain smart-groups, and localized installation."

An attempt to run the database upgrade again returns the error: *The database has already been updated to 5.22.1.*

Does this mean the upgrade did not succeed? If it did, how can the system status page be updated?

Help will be greatly appreciated.

# Answer
> 0 votes
I'd suspect you didn't actually update CiviCRM, as far as CiviCRM is concerned.

1. Perhaps the old code is still kicking around and accessible to your CMS (e.g. perhaps you left it in, maybe renamed?).
2. Perhaps you have a very aggressive opcache that hasn't recognized the new code yet.
3. Perhaps you didn't install the new CiviCRM codebase that you thought you did (I've done that before often enough ...).

---
Tags: upgrade
---


# Question
Title: Will Installing Updates in Civi and Drupal mess up my website?
I know I need to update Civi (5.17.5) and Drupal (8.7.8) - My question is, is there anything I need to be aware of -- changes with the site or with Civi in the background -- that will alter how we use these sites? Or will largely nothing change what I have going on?

Thank you!

# Answer
It's always recommended to test the upgrade on a copy of your site first. A guide how to make a copy is at https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/
> 5 votes

# Answer
@Demerit is correct - and I'll also leave the Drupal portion of the question unanswered here. There are modules that might have bugs in newer versions, or aren't compatible with Drupal 8.8.x.

As for CiviCRM, you shouldn't see meaningful changes to existing functionality with an upgrade from 5.17 - that's only a few months back. However, it's always good to test key functionality in case a bug snuck in - doubly true if you're using custom extensions or similar. Also when upgrade completes, you'll see a list of potential changes you'll need to investigate. For instance, I'm pretty sure that some receipt templates have changed. If you haven't customized your receipt templates this shouldn't result in a meaningful change, but you may be missing out on some of the new functionality if you've customized and don't review the changes.
> 4 votes

---
Tags: upgrade
---


title: Add columns to SYBUNT report

text:
# Question
Title: Add columns to SYBUNT report
We run CiviCRM 5.20.2 on Joomla 3.9.15

We use Reports - Donation Reports - Sybunt
We need to be able to select in the Columns area: • Nickname • Do not mail / contact • Deceased • Postal Greeting

Is a custom report necessary? If so how do I use the SYBUNT report as a template to copy?

Thank you!

# Answer
> 1 votes
I prefer to use hook\_civicrm\_alterReportVar(Instead of making copy of existing report and adding code) to add columns or filters to any report in $vars for $varType == 'Column'.

---
Tags: civireport, custom-reports
---


title: List unassigned Inbound SMS activities

text:
# Question
Title: List unassigned Inbound SMS activities
I'm facing the same issue as spidersilk in this old question - Is there a way to add a custom field to the Inbound SMS activity type?. Trying to keep the one CiviCRM instance I support as "out of the box" as possible, so hoping for an answer that doesn't require custom status-es or CiviRules.

Is there an "out of the box" way to search for activities with a blank "Assigned To?" With that, I could just list activities of type "Inbound SMS" that have yet to be assigned. I realize assignment isn't the end, but it'll suffice. I had high hopes for the Search Builder but, to my surprise, Assigned To is not one of the fields exposed for Activity.

CiviCRM 5.21.0 on Drupal 7.69.

# Answer
This might not meet your needs but it can be done from the Support menu under api4 explorer (but not api3). Choose activity - get, and then for the where clause pick assignees.id Is Null. Then click execute. Note on a stock install the screen will look weird but it functions.
> 2 votes

---
Tags: sms, civisms
---


title: CiviMobile server connection problem

text:
# Question
Title: CiviMobile server connection problem
My CiviCRM install on the WP. And I installed the CiviMobileAPI(v5.0.0).

I succeeded login from iPhone. but I try to use same URL to login from Android, I get error that says "can't connect to the server. Check the CiviCRM site URL or internet connect"

Not sure what else to try here, does any one have any insights? I'm sure I've put in my correct credentials.

Thanks in advance

# Answer
Go to Resource URL page and click on '?' and see if civicrm.root and cms.root variables are set correctly, if not than you may need to update civicrm.settings.php to fix it.
> 1 votes

---
Tags: civimobile
---


# Question
Title: 'A potentially unsafe operation has been detected in your request to this site' error
I want to get a membership list contaitning their name and address through the 'Report' function. But when I do this, a message 'A potentially unsafe operation has been detected in your request to this site' appears and cannot get the list' appears. What should I do? Thanks.

# Answer
> 1 votes
This error doesn't come from CiviCRM, but comes from either the Wordfence plugin for WordPress, or your hosting provider has `mod_security` configured in such a way that it breaks normal operation of CiviCRM. I generally warn people away from shared hosting providers for this reason and toward a VPS unless they specifically know that CiviCRM is supported. In theory, a good webhosting company will fix their settings - but bad shared webhosting companies are far more common than good ones!

If you have Wordfence, see if disabling it fixes your problem. If so, it may be worth exploring a bit further which Wordfence setting is causing the problem. If you aren't running Wordfence, open a support ticket with your webhosting company.

---
Tags: civireport
---


# Question
Title: using cancellation link after event start date?
It seems that Civi does not allow people to use the self-service cancellation after the event start. We have some multi-day and longer-term events that it would be very helpful for them to still be able to self-cancel. Questions: * Is there setting to let Civi permit cancellations after the event start?

* If not...would the event online registration setting "cancellation or transfer time limit (hours)" - could that be made negative somehow (i.e. until 1d after event start)?

Just a user, not a developer here, thanks in advance!

# Answer
By chance I also recently discovered this limitation, and opened a ticket for it.

I wrote the code to add this feature, but it requires a change to the CiviCRM schema, so I don't recommend patching yourself unless you know what you're doing. I wrote a patch to clean up checking whether a participant can self-update. Once that's approved, I'll submit a patch to allow negative values for the "hours until cancellation" field.
> 2 votes

# Answer
I think(but not sure) if you append is\_backoffice=1 to the self-service cancellation url it should do what you want.
> 0 votes

---
Tags: civievent, online-registration
---


title: Cannot Export a Report to a CSV file

text:
# Question
Title: Cannot Export a Report to a CSV file
Since upgrading from CiviCRM 4.4.3 to CiviCRM 5.8.0 last week, I am unable to export my employee training reports to a CSV. The page simply refreshes and doesn't do anything. I have tried making a new report with the same criteria, but it doesn't seem to be working.

Any ideas as to what else I can do?

# Answer
I have the same problem. This occurs when exporting with a user which is not an admin.

As a workaround, I am able to export directly by using the options on the report overview. Can you reproduce that?
> 1 votes

---
Tags: civireport
---


title: Is there a list of tokens anywhere?

text:
# Question
Title: Is there a list of tokens anywhere?
Is there a list of tokens that are available anywhere? Is it stored in some db table I haven't seen?

CiviCRM 5.20.2 on Wordpress

# Answer
This is a bit tricky to answer, because there are three different token processors in CiviCRM. The Smarty processor, the legacy token processor, and the new `Civi\TokenProcessor` processor.

### Legacy Processor (aka `CRM_Utils_Token`)

For most messages - quick emails, PDFs, etc. - you're using the legacy token processor. You can find most of these tokens in CRM\_Core\_SelectValues. Note that contacts will provide all exportable fields as tokens, minus the ones explicitly excluded in that file.

You can also add tokens via extensions, so this isn't a complete list. Note that with the legacy token processor, you can only add new contact tokens.

### TokenProcessor

Currently, TokenProcessor is only available with Scheduled Reminders and Flexmailer. Work is currently underway to bring TokenProcessor support to the rest of CiviCRM, which will allow you to use more fields, and define custom tokens that are based on contributions/activities/etc. In the next month or so, I'd expect to see support for TokenProcessor for emails sent with Email API (i.e. CiviRules), along with PDFs/emails generated from activities, with contribution PDFs/emails not far behind.

### Smarty

Smarty tokens are available only in System Workflow messages, and the tokens vary on a per-template basis. You can also enable Smarty token processing if you're not using Flexmailer and/or Mosaico by adding `define( 'CIVICRM_MAIL_SMARTY', 1 );` to your `civicrm.settings.php`.
> 6 votes

# Answer
There's the list in the user guide: https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#available-tokens

It should be mostly complete.
> 1 votes

# Answer
Worth noting the the Extended tokens extension offers some other ones
> 1 votes

---
Tags: tokens
---


title: South African Rand Payment Processor

text:
# Question
Title: South African Rand Payment Processor
Does anyone know of a payment processor that integrates with Civi and also accepts South African Rand? We're finding out that most payment processors don't accept African currencies.

# Answer
Stripe offers ZAR so you could check that out - see https://stripe.com/docs/currencies#charge-currencies

We have Stripe working on several of our implementations but not had to try with ZAR yet.
> 2 votes

# Answer
While Stripe can accept payments in ZAR, they are currently unable to payout in that currency. Thus, they effectively cannot support operations entirely in ZAR.
> 3 votes

---
Tags: payment-processor
---


# Question
Title: Deadlocks on a high load of contact inserts
We use CiviCRM 5.21.2 with Drupal 7.69 and Webform together with webform\_civicrm to provide petitions. The petitions ask for address and email. So every petition signature creates a contact with email and address. Additionally every contact gets a tag and if the email is confirmed with webform\_confirm\_email in some cases a group.

If the load on this webform submission gets higher we face deadlocks. Some of them seem to connected to group cache and acl cache and some to email or address inserts.

I saw that the tables email and address have triggers defined for insert, update and delete that write into the table contact. For example:

UPDATE civicrm\_contact SET modified\_date = CURRENT\_TIMESTAMP WHERE id = NEW.contact\_id;

Is it possible that these triggers have something to do with at least some of the deadlocks. Or that they at least make the chance higher to run into a deadlock?

Does anybody know, why they are there? Is it necessary to update the modified\_date in the table contact immediately or would it be sufficient for the system if this is done by a cron job that runs once per day?

# Answer
> 1 votes
Do you have some smart groups that are getting re-calculated on each submission perhaps?

Here's my answer to a more general question about smart groups and performance: How Smart Groups Work

---
Tags: drupal, contacts, webform-civicrm, email, database
---