# Question
Title: CiviCRM Recurring Contributions Report with Campaign
I'm trying to find a way to get a report on all the Recurring Contributions and what campaign they are attached too. Has anyone else done this? The Recurring Contributions report can give me the donations but there is no Campaign column.  Thanks

# Answer
I was able to add this to the bottom of the alterDisplay in the Recur.php file to change the Campaign Id to the Campaign Title.
> 1 votes

---
Tags: civicontribute, civireport, reports
---


# Question
Title: civicrm " Sorry but we are not able to provide this at the moment. " joomla
Facing an issue in civicrm contact for a particular contact. As in events that contact has near about 60 events which he/she participated in but when i view that contact it shows the count of events correctly but on click its show " Sorry but we are not able to provide this at the moment.see image

Dec 23 06:56:09 \[debug\] $backTrace = #0 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(385): CRM\_Core\_Error::backtrace("backTrace", TRUE) =\>1 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/DAO.php(1195): CRM\_Core\_Error::fatal() =\>2 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/BAO/Event.php(1029): CRM\_Core\_DAO::getFieldValue("CRM\_Event\_DAO\_Event", NULL, "is\_monetary") =\>3 /home/nihcmlive/public\_html/media/civicrm/custom2/extensions/com.servnettech.participantlistemaildisplay/CRM/Event/Selector/Search.php(402): CRM\_Event\_BAO\_Event::isMonetary(NULL) =\>4 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Selector/Controller.php(420): CRM\_Event\_Selector\_Search-\>getRows(4, 0, 50, Object(CRM\_Utils\_Sort), 1, NULL) =\>5 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Selector/Controller.php(341): CRM\_Core\_Selector\_Controller-\>getRows(Object(CRM\_Core\_Selector\_Controller)) =\>6 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Form/Search.php(373): CRM\_Core\_Selector\_Controller-\>run() =\>7 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Form/Search.php(409): CRM\_Event\_Form\_Search-\>submit((Array:0)) =\>8 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Form/Search.php(109): CRM\_Event\_Form\_Search-\>postProcess() =\>9 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Form.php(590): CRM\_Event\_Form\_Search-\>preProcess() =\>10 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM\_Core\_Form-\>buildForm() =\>11 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM\_Core\_QuickForm\_Action\_Display-\>perform(Object(CRM\_Event\_Form\_Search), "display") =\>12 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML\_QuickForm\_Controller-\>handle(Object(CRM\_Event\_Form\_Search), "display") =\>13 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller.php(351): HTML\_QuickForm\_Page-\>handle("display") =\>14 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/Tab.php(54): CRM\_Core\_Controller-\>run() =\>15 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/Tab.php(190): CRM\_Event\_Page\_Tab-\>browse() =\>16 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(290): CRM\_Event\_Page\_Tab-\>run((Array:4), NULL) =\>17 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:12)) =\>18 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:4)) =\>19 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm.php(121): CRM\_Core\_Invoke::invoke((Array:4)) =\>20 /home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm.php(40): civicrm\_invoke() =\>21 /home/nihcmlive/public\_html/libraries/src/Component/ComponentHelper.php(402): require\_once("/home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm.php") =\>22 /home/nihcmlive/public\_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/home/nihcmlive/public\_html/administrator/components/com\_civicrm/civicrm.php") =\>23 /home/nihcmlive/public\_html/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com\_civicrm") =\>24 /home/nihcmlive/public\_html/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication-\>dispatch() =\>25 /home/nihcmlive/public\_html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication-\>doExecute() =\>26 /home/nihcmlive/public\_html/administrator/index.php(51): Joomla\CMS\Application\CMSApplication-\>execute() =\>27 {main} "

# Answer
> 2 votes
From the backtrace, it looks like the error is due to the participantlistemaildisplay (https://github.com/voiply/com.servnettech.participantlistemaildisplay) extension enabled on your site.

To fix -

---
Tags: civievent, joomla, civicrm-contact, civicrm-event
---


title: Export all data for Contact

text:
# Question
Title: Export all data for Contact
i'm new on civicrm and try to export specific contacts. I found the search menu to select the data and i made an export with " Export PRIMARY contact fields" but some fields are not in the export. How i could select all the fields of my contacts create on the civicrm database. Thanks for your Help. Marilyn

# Answer
> 1 votes
Welcome to stack exchange. There are some other questions that may provide you with some answers. Before asking a question you should always do a search. Try searching for "export all data". Also it would be worth saying why you want to do this export. It seems an odd thing to do with a new site.

But to help you, "Export PRIMARY contact fields" is a particular set of fields chosen by someone else and rather general. If you choose "select fields for export, you can chose whatever you want. A bit tedious for all fields, but you can save the selection for later use.

Be aware that you can't export multi-value custom fields this way (though you can get a report to do this.

---
Tags: contacts, export, fields
---


title: Countries up to date?

text:
# Question
Title: Countries up to date?
in CiviCRM 5.15.2 (but also in 5.17.2 alpha on the CiviCRM demo site) the country North Macedonia is still referred to as: Macedonia, Republic of.

Users can not change this themselves obviously. In the documentation it is stated: *The installed CiviCRM database contains both an ISO 3166-1-compliant list of countries, and a full, ISO 3166-2-compliant list of provinces (states, departments, voivodships, etc.).*

However, this does not seem to be the case.

Can somebody tell me if CiviCRM needs updating the countries (or may be I should add my question somewhere else?)

# Answer
Yes at the moment the list is manually maintained (see https://github.com/civicrm/civicrm-core/blob/5.15.2/xml/templates/civicrm\_country.tpl#L172). You can file an update request at https://lab.civicrm.org/dev/core/issues
> 1 votes

# Answer
The particular issue is resolved in CiviCRM 5.21: See release notes

* **Countries: Renamed "Macedonia, Republic of" to "North Macedonia".**

others have commented on the wider point.
> 1 votes

# Answer
The country/province lists *do not* have the correct ISO 3166 numeric ids (ex 1228 for USA should be 240.

This is important because everyone else uses ISO ids and in order to map the right country IDs for civi, you need to create a mapping table. PITA. Get it right!

As well the country names do not all match.

Why not just use the ISO data dumps to create these tables, like the rest of the world does? \>SMH\<

This becomes very important when you need to create forms with addresses in them. You have to use one ID for civi and the correct ID for everything else....
> 0 votes

---
Tags: contacts, addresses
---


# Question
Title: Reassigning Case Role Gives DB Constraint on Membership
I recently moved to a new webhost with Drupal 7 and upgraded to CiviCRM 5.21.0. Everything seems to be working fine, I have no errors in the Administration Console. However, when I go to cases, and I reassign a case role, I get an error:

"DB Constraint Violation - membership\_contact\_id should possibly be marked as mandatory for Membership,get API. If so, please raise a bug report."

I don't even have CiviMember or CiviCampaign enabled. I ran the upgrade script again, no issues. I disabled and re-enabled CiviCase again. Clear cache, deleted everything in template\_c. I don't know what else to try. Any ideas?

# Answer
Based on chat discussion there was a missing database field for unknown reasons. Running this helped:

`ALTER TABLE civicrm_membership ADD COLUMN status_override_end_date date DEFAULT NULL COMMENT 'Then end date of membership status override if ''Override until selected date'' override type is selected.';`
> 2 votes

---
Tags: drupal, civicase
---


# Question
Title: Is it possible to update the mosaico versafix template to the 1.1.16 version?
Mosaico has an updated version of the versafix template -

Mosaico Versafix 1.1.16

What is required to add/replace the current versafix with this updated version?

# Answer
> 4 votes
You can check out the version from github repo and place the template in your installation. I have just cloned https://github.com/voidlabs/versafix-template/tree/v1.1.19/dist/template folder to my Mosaico templates folder and it works.

You can copy the folder as versafix-new and rename html file as template-versafix-new.html so your legacy copy wouldn't get overrided.

p.s. The blog post was about 1.5 years old so my answer is about 1.1.19 instead of 1.1.16.

---
Tags: mosaico
---


# Question
Title: Notification for failed payment transaction
is there a way to get a notification of some kind for when a recurring payment hasn't gone through? Maybe with membership rules? We've had it a couple of times now that payments haven't gone through for insufficient funds for example and we only find out about it by chance a few days later.

Thanks again for the help

# Answer
The answer depends on the Payment Processor you’re using. We have that option in the iATS Payments Extension and we can do that because its recurring payments are initiated/controled from within CiviCRM.

If you’re using another payment processing that processes a recurring contribution off-site and then notifies CiviCRM you will likely have to get into that Payment Processor’s admin/config and look for such a notification option.
> 1 votes

---
Tags: payment-processor
---


title: Remove CiviCRM logo from Invoice pdf?

text:
# Question
Title: Remove CiviCRM logo from Invoice pdf?
I am on Wordpress 4.9.5 and Civi 5.0.1. Please see the screen shot of a downloaded pdf invoice. I would really like to remove that CiviCRM logo or replace it with my own. Is there a configuration somewhere I can do that?

Thank you

# Answer
> 5 votes
The invoice is generated based on the template "Contributions - Invoice". It contains a line to the logo ({$resourceBase}/i/civi99.png" height = "34px" width = "99px") that you would need to replace.

You can find teh message templates by Navigating to \>\>Administer \>\>CiviMail \>\>Message Templates in the tab "System Workflow Messages"

# Answer
> 0 votes
I think a great way to make this easier would be to show the profile picture of the admin user at this place. Also I think the standard CiviCRM logo should adhere to the "Show 'powered by' setting" in civicrm/admin/setting/misc I will create a PR for the later option.

---
Tags: pdf, invoice, logo
---


# Question
Title: Contribution page with cookies blocked just reloads on submission - is this expected behaviour?
We recently had a donor call our office who was having trouble donating online (https://secure.wildsight.ca/civicrm/contribute/transact?reset=1&id=1).

It turned out they had blocked cookies in general and when trying to use the contribution page, the site just reloaded blank after submission (nothing was processed). We are not using a confirmation page.

Is this the expected behaviour? Should users be able to make a contribution without cookies? Should they receive an error message that tells them to enable cookies?

5.19.4 on Drupal 7.69

# Answer
> 1 votes
Yes, that's the expected behaviour.

I'm intrigued that anyone would try and make a contribution with cookies disabled - presumably they are (justifiably) concerned about privacy on the internet, but there aren't going to be many donation forms that work without cookies.

The reason you need cookies enabled (with civicrm) is because some of the form state gets saved in your session which is tied to you via your cookie(s).

Here's an equivalent issue in Drupal from 16 years ago that's still going. The proposed solution is to provide some notice to users that don't have cookies enabled.

https://www.drupal.org/project/drupal/issues/2946

Options going forward are:

1. Build yourself an extension which pops up a warning when a visitor to civicrm has cookies disabled.
2. Create a PR for core to do this.
3. Use an existing drupal module to do the same thing.

I'd recommend you start with an existing Drupal module and see how it works. There will be a few different ways to do this, some more invasive than others. For a core patch, I'd only recommend that it pop up after an attempted submission because otherwise you're generated some extra load and risk messing something up.

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


title: Exhausted memory error

text:
# Question
Title: Exhausted memory error
I am getting reports from users of blank screens when going to register for an event. This does not happen for most users. The PHP error log says:

`PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 400572416 bytes) in /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/Error.php on line 520`

There is no error in the CiviCRM log in the ConfigAndLog directory. I have tried allocating 1GB instead of 512MB and it makes no difference. Can anyone help me debug this please?

# Answer
As per @Demerit's comment, and somewhat counter-intuitively, make sure you've got your debugging settings to "off" - it's running out of memory when reporting the error. If you turn the various debugging settings off, it'll still report quite a lot of detail of the error.
> 2 votes

---
Tags: php
---


# Question
Title: How to add a second photo to a mailing block
How can I change a mailing block to add a second photo

# Answer
Each (mosaico) block is configured for one or more images. If you want a block with a different number of images, choose a different block.

You might be able to trick mosaico into including an image where it's not expecting it, but that would defeat the purpose of what it does for you (i.e. mobile + support for many different mail readers).
> 1 votes

---
Tags: mailing
---


# Question
Title: Registration - Thank you page Error - Call to undefined method -Joomla
Joomla 3.9.14 and Civi 5.20 / 21 registration has been running fine for years with various different combos of Civi and joomla The full error is: Call to undefined method CRM\_Core\_BAO\_UFGroup::getFrontEndTitle()

User is registered to the event - just an error page where a thank you page should be - any thoughts were to look.

Thanks

# Answer
At administer - system settings - directories, there's one called custom php path that contains a folder path. Go look in that path in the filesystem and you probably have a customized version of CRM/Core/BAO/UFGroup.php. It will need to be updated with some recent changes that were made to the real CRM/Core/BAO/UFGroup.php, in particular the addition of the function getFrontEndTitle().
> 1 votes

# Answer
Turns out this was an issue with an extension CiviGrant - Since our site no longer uses this - it was disabled. Thank you to Brian Shaughnessy for the recommendation.
> 1 votes

---
Tags: civievent, joomla, registration
---


# Question
Title: Updating Custom Data Fieldset Settings via php my admin
I've got a site where custom data has been created for Particpant records.

And the fieldsets have been made available for all event types.

The site in question relies heavily on segmenting events by type, and some of the participant fieldsets are not applicable/suitable for some event types

However the empty fieldsets are appearing in the confirmation emails for the events they are not appropriate for and causing confusion to end users.

So...My question is... am I safe updating the values in the civicrm custom group tables for the fields EXTENDS ENTITY COLIUMN ID and EXTENDS ENTITY vALUE for the relevant data sets

I guess this is the reverse of the question asked here Can I change settings for a custom field set for participants without losing any data?

Can anyone advise me of any potential pitfalls?

# Answer
> 1 votes
Hmm I think you should be OK but carefully....and make sure you are not hit by any of the VALUE\_SEPARATORS?

---
Tags: custom-fields
---


title: CiviVolunteer install fails

text:
# Question
Title: CiviVolunteer install fails
Failure installing CiviVolunteer ver 4.6-2.1.1 on CiviCRM ver 4.7.6.

## I'd previously had CiviVolunteer1.4, (pretty much just playing with it) then attempted 2.0 install several weeks ago. Nothing happened, and then learned that it was incompatible with 4.7. Newest release was supposed to fix, but, on attempting install -\> I'm getting: message:

Sorry but we are not able to provide this at the moment. Field: `name` must be unique. An conflicting entity already exists - id: 104

## Return to home page.

On return to Civi dashboard, lots of msgs get displayed for just a few sec re: found title, found field name...  Also including image of extensions screen, if that's interesting...

Thanks!

# Answer
I was also dealing with the same problem and after many debugging, the following uninstall script finally helped me to install CiviVolunteer succesfully. Warning: you will lose the data stored in CiviVolunteer tables. Use at own risk.

```
/* drop custom tables */
DROP TABLE IF EXISTS `civicrm_volunteer_need`;
DROP TABLE IF EXISTS `civicrm_volunteer_project_contact`;
DROP TABLE IF EXISTS `civicrm_volunteer_project`;

/* drop report-related records */
DELETE FROM `civicrm_report_instance` WHERE report_id = 'volunteer';

/* drop custom option group for roles (FK takes care of option values) */
DELETE FROM `civicrm_option_group` WHERE NAME = 'volunteer_role';
DELETE FROM `civicrm_option_group` WHERE NAME = 'skill_level';

/* drop custom field group from Activities (FK takes care of fields) */
DELETE FROM `civicrm_custom_group` WHERE `name` = 'CiviVolunteer';
DELETE FROM `civicrm_custom_group` WHERE `name` = 'Volunteer_Information';
DELETE FROM `civicrm_custom_group` WHERE `name` = 'volunteer_commendation';

DELETE FROM civicrm_option_group WHERE `name` = 'msg_tpl_workflow_volunteer';
DELETE FROM civicrm_option_group WHERE `name` = 'volunteer_project_relationship';
DELETE FROM civicrm_contact_type WHERE `name` = 'Volunteer';
DELETE FROM civicrm_custom_group WHERE civicrm_custom_group.name = 'CiviVolunteer';
DELETE FROM civicrm_custom_field WHERE civicrm_custom_field.name = 'Volunteer_Need_Id';
DELETE FROM civicrm_custom_field WHERE civicrm_custom_field.name = 'Volunteer_Role_Id';
DELETE FROM civicrm_custom_field WHERE civicrm_custom_field.name = 'Time_Scheduled_Minutes';
DELETE FROM civicrm_custom_field WHERE civicrm_custom_field.name = 'Time_Completed_Minutes';
DELETE FROM civicrm_custom_field WHERE civicrm_custom_field.name = 'volunteer_project_id';
DELETE FROM civicrm_custom_field WHERE civicrm_custom_field.name = 'camera_skill_level';
DELETE FROM civicrm_msg_template WHERE msg_title = 'Volunteer - Registration (on-line)';
DELETE FROM civicrm_navigation WHERE `name` = 'New Volunteer';
DELETE FROM civicrm_option_value WHERE `label` = 'Volunteer';
DELETE FROM civicrm_option_value WHERE `label` = 'Volunteer Commendation';
DELETE civicrm_uf_join FROM civicrm_uf_group JOIN civicrm_uf_join ON civicrm_uf_join.uf_group_id = civicrm_uf_group.id  WHERE `group_type` = 'Volunteer,Contact';
DELETE FROM civicrm_uf_group WHERE `group_type` = 'Volunteer,Contact';

/* relationship_type, */

/* drop volunteer sign-up profile (FK takes care of profile fields) */
DELETE FROM `civicrm_uf_join` WHERE `module` = 'CiviVolunteer';
DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up';

```
> 4 votes

# Answer
The multiple installs (and I'm guessing not always clean uninstall) of the CiviVolunteer module have most certainly corrupted your database and left some files behind that produce these messages (these look like debug messages left by the developer in a not-yet-final version).

Since you have no data in CiviVolunteer I would:

* disable, then uninstall the CiviVolunteer extension from the GUI,
* if this produces errors, or just for safety, go in the database and execute the following file: https://github.com/civicrm/org.civicrm.volunteer/blob/master/sql/volunteer\_uninstall.sql, then execute: DELETE FROM civicrm\_extension WHERE full\_name = 'org.civicrm.volunteer';
* clear all caches in CiviCRM (Administer \>\> System Settings \>\> Cleanup Caches and Update Path)
* delete the org.civicrm.volunteer folder in your extensions directory
* download the latest **released** version of the extension that supports your version of CiviCRM, and go through the install process again
> 2 votes

# Answer
I had the same trouble. That was a nightmare.

Finally I got through with this command :

https://domainURL/civicrm/admin/extensions?action=disable&id=org.civicrm.volunteer&key=org.civicrm.volunteer

But still there is several tables that need to be remove manually in the SQL database : civicrm\_value\_civivolunteer\_2 civicrm\_value\_volunteer\_com\_4 civicrm\_value\_volunteer\_inf\_3 civicrm\_volunteer\_need civicrm\_volunteer\_project civicrm\_volunteer\_project\_contact

but after reinstall there is an error :

> `CiviCRM_API3_Exception: "Field:`name`must be unique. An conflicting entity already exists - id: 108"`

So I remove manually from civicrm\_custom\_group and civicrm\_custom\_field for everything with volunteer :

> DELETE FROM `civicrm_custom_group` WHERE `civicrm_custom_group`.`id` = 2; DELETE FROM `civicrm_custom_field` WHERE `civicrm_custom_field`.`id` = 2;

But still when reinstall the extension I still have an error.

> CiviCRM\_API3\_Exception: "Field: `name` must be unique. An conflicting entity already exists - id: 108"

Then I found this https://github.com/civicrm/org.civicrm.volunteer/blob/master/sql/volunteer\_uninstall.sql

But no luck still. Error.

So I give up. I will not use this extension that leave too much legacy. I remove it from the ext folder to avoid installing again.

////// EDIT //////

Finally, as there there were no way to avoid countless errors indicating Volunteer. I decided to try reinstall it rather than suppress it. That wasn't possible. So I compare a fresh install of CiviCRM with Volunteer. First I copy these tables (all are empty) via phpmyadmin, or in one case I changed the name to match :

Then I enter the SQL line :

> INSERT INTO `civicrm_extension` ( `type`, `full_name`, `name`, `label`, `file`, `schema_version`, `is_active`) VALUES ( 'module', 'org.civicrm.volunteer', 'CiviVolunteer', 'CiviVolunteer', 'volunteer', NULL , 1);

Then Volunteer worked. Happy !
> 1 votes

# Answer
Is missing in volunteer\_uninstall.sql:

DELETE FROM `civicrm_option_group` WHERE `name` = 'skill\_level';
> 0 votes

---
Tags: installation, civivolunteer, failure
---


# Question
Title: Why am I getting duplicate contacts for contributions?
I am getting dupes created when contributing. Contribution pages use the 'Unsupervised' dedupe rule, which I have set to First name, Last name & email, assigning 10 to each with a threshold of 30. But then I am getting duplicate contacts created every time, with exact matches on all three fields. When I change the value of email to 20 and set the threshold to 20 a match is made & no dupe. It seems that first name and last name are being ignored and only email is working. Am I misunderstanding something here? Could this be a bug? Using Stripe 4.7.2, Civi 4.7.24 with Drupal 7.

# Answer
Hi I can confirm the same behaviour. We are on Drupal 7, CiviCRM 5.19.4 and the problem is that the Billing address profile seems to be ignored for the dedupe rules. You must create a new profile with all fields needed for dedupe rule and include it in page. The billing address name and first name is not used.
> 2 votes

# Answer
This sounds like the reverse to what you are experiencing but one issue with email field when matching is that if a record has more than one email, then each of those matching emails is counted - and it is easy for a record to end up with the same email 3 times. So I recommend a rule such as

* First = 10
* Last = 10
* Email = 2
* Threshold = 22

That way a record would have to have 11 of the same emails to count as a match.
> 1 votes

# Answer
I had the same problem and can confirm that names are ignored. I worked around it by created a new rule matching on email address and postcode, and changing the settings to make it use that as the unsupervised rule.

\[Edit: adding some info to help diagnose the problem\]

This was the original rule:

When I make two online donations under the same email and both names the same, it creates two contacts.

Then I switched the rule to this:

and made another online donation with the same details (including the same postcode), and it logged the donation on the existing contact as expected. (But only when I included a profile with main address fields in the contribution page. Without that, it failed to match, presumably because it matches on main and not billing address).

NB: When the original (email and name) rule is set to *supervised*, it works - i.e, when I use the "Check for matching contacts" button it finds the one with the same name and email.

\[Edit: adding another screenshot\]

I also tried with this rule:

and it created a duplicate contact despite having the same first name, last name and email.
> 0 votes

---
Tags: civicontribute, 4.7, stripe
---


# Question
Title: Rule to Cancel Membership After Certain Number of Events Attended
I'm new to CiviRules. I have a membership type that I want to be an event based membership in that I want users to users to be able to attend 5 events and then their membership is cancelled. I guess the rule would be: When active member on 'event membership' type attends 5 events their membership is cancelled and a renewal reminder email is sent. Can anyone help me with how to set this up?

# Answer
> 1 votes
I think the trigger should be 'participant changed' as you want to test this everyone time someone attends an event.

The first condition would be something like 'participant status changed to registered'.

I am not sure if you can combine membership conditions with a participant trigger, so checking the membership type would be weird (the data is not there when dealing with a participant of an event). But you could put all members in a group and then check if the participant is a member of that group.

The third condition would be to count if it is the fifth, I do not think there is a ready made condition for that, so it would have to be developed (probably about 4 hrs work).

The first action would be to send an email (you will need to install the Email API extension to do this: https://civicrm.org/extensions/e-mail-api).

The second action would be to cancel the membership. At the moment there is no action to do this, so that would need to be developed (approx. 4 hrs work).

I would recommend extensive testing too :-) CiviRules is powerful but also allows you to automatically send lots of emails.

Good luck!

---
Tags: civimember, civirules
---


title: Automatic Invoice on CiviCrm

text:
# Question
Title: Automatic Invoice on CiviCrm
My question is, can the Member get an automatic invoice directly from CiviCRM once he renewals his membership even if he didn't pay online, or he chooses to pay via bank transfer?

# Answer
> 1 votes
Abdalla, Welcome to CiviCRM SE. Yes, Member will get the receipt when a payment is processed from payment processor or bank transfer. CiviCRM sends the receipt to the user if the payment is complete. CCiviCRM also lets you generate invoice which includes tax details for the contribution(payment), this is not send automatically to user by CiviCRM.

HTH

Pradeep

---
Tags: civimember
---


# Question
Title: How to customise the activities tab listing
I used to hack the Activities BAO to change the search results to make the subject line something more useful; i.e. extract other data from particular activity types and auto-create a summary in place of the actual subject.

I'm doing an upgrade and realised what a royal maintainance PITA this has become :-)

I thought I could implement hook\_civicrm\_searchColumns but I've tried from a Drupal module and also from an extension created for the job but it does not appear to be being called for the tab selector? Is there another way? I've tried this on 4.6 and 4.7.

I might not be explaining which bit I need to customise very clearly, so here's a diagram:

# Answer
> 1 votes
You can't realy customise the main activities tab. However there are several other options to create other tabs which show activities which do allow more customisation.

* Activity Tabs extension written by me, this offers a reasonably easy way to add tab(s) with filtered lists of activities and allows you to choose which fields (inc. custom) you want displayed.
* Data Processor extension this is very flexible/powerful, but a bit more of a learning curve (well worth it!)
* Extended Reports extension \- I've not used this but I believe it allows its reports to be embedded as tabs on a contact record.

# Answer
> 0 votes
The hook\_civicrm\_summary might help you?

# Answer
> 0 votes
I thought you were referring to the activities tab in the contact summary? Alternative is to create a copy of the report in an extension as described in the **add a report** section of https://docs.civicrm.org/dev/en/master/extensions/civix/.

Once you have copied the report all you have to do is use the alterRow function to update the search results.

---
Tags: developer, 4.7, hooks, 4.6
---


# Question
Title: how to find contacts who have paid for their membership?
Civi 5.15.1, WP 5.3.2

My organization manually enters all memberships and membership payments using the Civi UI (we don't expose this functionality on our website). I need to create a smart group of contacts for whom the membership record has been created AND the Member Dues payment is Completed. However, I can't find any payment-related fields in the Advanced Search form used to add contacts to a smart group, except for Pay Later, which does not appear on the New Membership form anyway (perhaps we disabled it in some settings somewhere).

I've also tried searching for the Member Dues financial type, the Completed payment status, any payment type, and any date received, using Find Contribution, Search Builder, the Custom Searches, and all the available Contribution and Membership reports. Either no results return or those fields are empty.

The Civi documentation implies that any membership that has not been paid for is in Pending status, so maybe I could search for membership statuses that are not that, or even create a new one to do the trick? Alas no -- any new membership we create starts out in Current status (we disabled New), I believe because we're entering it manually. And the membership status rules are based solely on Member Since and start/end date, not payment status. Nor is the Pending rule editable.

So, is there any way to find payments the way we can find contacts, memberships, events, contributions, etc? If not, are my only options to figure out how to get Pay Later on the membership form, or to create a custom field that essentially duplicates payment status? Thanks!

# Answer
You can use Advance search to get the contacts that have membership and have paid for their membership.

1. Navigate to CiviCRM \>\> Search \>\> Advance search
2. Expand Contribution accordion
3. Select Contribution status to Completed and other filters if required
4. Expand Membership accordion
5. Select 'Membership is a Test?' to No and other filters if required
6. Hit Search.

The result should only list contact having membership with its payment.

HTH

Pradeep
> 4 votes

---
Tags: civimember, search, smartgroups, payment
---


# Question
Title: Is there a specific Exception for the API4 like CiviCRM_API3_Exception?
There is a specific Exception for the CiviCRM API3 called CiviCRM\_API3\_Exception. Is there a similar specific Exception for API4 or do I just catch the standard Exception?

# Answer
I believe api4 throws API\_Exception and sometimes Exception.
> 3 votes

---
Tags: api, errorhandling
---


title: Token for {$totalAmount|crmMoney}?

text:
# Question
Title: Token for {$totalAmount|crmMoney}?
I want to use in a Mosaico template a token for the contribution and I found in a system template this string: `{$totalAmount|crmMoney}`.

I tried to use it in my new template but it doesn't show in the email. I have the civitoken extension but `{latestcurrentmembership.allfee}` doesn't show because it's a "pay later" option and I guess this token works only when the membership is already paid.

Any idea?

# Answer
There are multiple "token" systems in CiviCRM depending on your context.

`{$totalAmount|crmMoney}` is a Smarty token, which only works in Smarty emails. System Workflow messages are Smarty, traditional templates don't handle Smarty by default, but can; Mosaico templates don't support Smarty (by design).

None of the approaches suggested above are without issues, but let's discuss them in turn.

* `{latestcurrentmembership.allfee}` in Civitoken does NOT return the membership fee paid. It returns the "minimum fee" for the membership type (see screenshot):

If all of your memberships of a particular type are always the same cost, you can set the "minimum fee" and use this token to solve your problem.

* Even if you were using Smarty with your mailing, `{$totalAmount|crmMoney}` wouldn't be available as an option to you. Mosaico mailings are sent to contacts, not to contributions; the "total amount" token wouldn't know which payment you were referring to. Consider if instead you can use Thank-you emails or Scheduled Reminders or CiviRules instead of CiviMail. There's the mosaicomsgtpl extension that copies a Mosaico template to a traditional one for use with non-CiviMail mailings.
* When sending as a contact, you CAN use a token for "Total amount of latest completed contribution". It's available in CiviToken, and depending on your situation, may solve your issue - but only considers completed contributions. To change this, open the `civitoken` folder, go to `tokens/latestcontribs.inc`, and remove the line that reads `AND civicrm_contribution.contribution_status_id = 1` to consider all contributions, complete or not.

Finally, some solutions that don't (yet) exist:

* The "Latest Membership Fee" token in CiviToken CAN return the actual amount - the author just didn't need to in her case, so she wrote a shortcut. One could create such a token.
* I've got a task on my plate (probably for this month) to write tokens for contributions that can be filtered on financial type. So instead of "Total amount of latest completed contribution" you can specify "Total amount of latest completed contribution with Financial Type of 'X'". If this would solve your problem, let me know on https://chat.civicrm.org and I'll let you know when I get to it.
> 5 votes

---
Tags: tokens, mosaico
---


# Question
Title: Name fields in Profile are Billing not Default
On a WordPress site with CiviCRM 5.20.1 we have a Profile used for Event Registration. In that Profile we have "Individual: First Name" and "Individual: Last Name"

The problem is that if I register using my name John Doe and I pay with my employer's credit card and his name is George Washington then on the Thank You screen it shows George Washington as my First and Last Name and then my personal address and other details.

How can we have it show my name and not my employer's?

# Answer
I think that is a fixed regression - https://github.com/civicrm/civicrm-core/blob/master/release-notes/5.20.3.md
> 3 votes

---
Tags: civievent
---


# Question
Title: API permission check failed: CiviEvents Fails after update to 4.7.19 and 4.7.20
After updating to 4.7.20, when the Event Info Page is accessed, it generates the following error, "API permission check failed for Event/get call; insufficient permission: require access CiviCRM and access CiviEvent and view event info". If I roll the system back to 4.7.18 it works. Any suggestions on a fix or work-around are much appreciated.

# Answer
I ran in to this on an inherited site. It fixed itself once I removed the permission for "access CiviEvent" (which i assume had been erroneously given by previous developers)

Once removed the other permissions worked fine.

Maybe this counts as a bug. Will raise up a level.
> 3 votes

# Answer
I've confirmed this bug and reported at https://lab.civicrm.org/dev/core/issues/1517

PR https://github.com/civicrm/civicrm-core/pull/16266 should fix the problem.
> 1 votes

---
Tags: civievent, api, permissions
---


# Question
Title: cron jobs stopped working under Joomla 3.9.13 and CiviCRM 5.18.4
I am involved with three CiviCRM instances, a live one under LAMP, Joomla 3.9.13 and CiviCRM 5.18.2, a test one under LAMP, the same Joomla version and CiviCRM 5.18.4 and a development environment running under Windows 10, IIS, the same Joomla version and CiviCRM 5.18.4. The live environment is OK, the development environment is OK, but cron jobs are not running in the test environment. The PHP log file gives these two errors:

```
[07-Nov-2019 19:05:30 Europe/London] PHP Warning:  ini_set(): A session is active. You cannot change the session module's ini settings at this time in <joomla_root>/libraries/joomla/session/handler/joomla.php on line 48
[07-Nov-2019 19:05:30 Europe/London] PHP Warning:  session_cache_limiter(): Cannot change cache limiter when headers already sent in <joomla_root>/libraries/joomla/session/handler/native.php on line 235

```

The command line is:

```
wget -q -t 1 'https://<example.com>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=<user>&pass=<password>&key=<key>'

```

I've tried clearing the session table, but it hasn't helped. Debugging is difficult - I've tried the error\_log() function to track what is happening, but not very successfully; PHP doesn't always write to the log file.

Can anyone suggest where I should look? I hesitate to update the live environment until the test environment is working properly.

# Answer
I had difficulties getting cron.php to log progress and, as the issue was on a remote server would have difficulties debugging. As a consequence, I rolled the CiviCRM installation and database back to backups taken before the issue occurred, and then reinstalled the CiviCRM upgrades. The cron job now appears to be working. Fortunately, the problem was on a test system so it didn't matter about any recent work. Had it been on a live system, it the issue would have been much more serious.
> 1 votes

# Answer
It doesn't answer why it stopped working, but have you tried using `cv` in your cron job? Works for me.
> 0 votes

---
Tags: joomla, cron-job
---


# Question
Title: Relationships Calendar is in Russian - How do I fix?
I recently updated CiviCRM to 5.21.0 and have noticed a rather strange bug affecting the relationships function.

Specifically, when I go to add a new relationship to an individual the pop-up calendar that appears to specify the start/end of the relationship is in cyrillic (Russian).

As I'm using the default US english install, I'd rather the calendar appear in English... As such, I'd like to seek advice regarding what I might be able to do to fix the issue.

regards,

Robert

ps. My install details and a screenshot are below:

* Database system : MySQL, MariaDB, or equivalent
* Database system version : 5.5.5-10.1.43-MariaDB-0ubuntu0.18.04.1
* PHP 7.2.24-0ubuntu0.18.04.1
* Web server: Apache/2.4.29 (Ubuntu)
* Drupal 7.69
* CiviCRM 5.21.0.

# Answer
> 2 votes
I've tracked down what caused the - duplicate calendar icons . It was an outdated version of the CiviCRM Shoreditch extension that was installed. I've disabled, uninstalled and deleted it. The duplicate icons are gone, the Russian text still remains though.

I have posted a ticket on the Shoreditch extension github site with the details. Hopefully they can resolve the issue. In the meantime, i've disabled the extension.

---
Tags: relationships, language
---


# Question
Title: I would like to change the membership type
I have a member who signed up under the incorrect membership type. Can I change this? What if the member has already made her membership fee?

# Answer
Yes you can change the membership type by visiting the contact and editing membership under membership tab. If the membership amount you want to change to has higher amount than you can ask the member to do balance payment or take offline payment and update the contribution to correct amount associated with membership.

You may need to take care if the user has purchased a membership that will auto renew automatically, if so than you will also need to update the amount at the payment processor gateway so that next time during renewal it charges the correct amount.
> 1 votes

---
Tags: civimember
---


title: Documentation for new sms provider?

text:
# Question
Title: Documentation for new sms provider?
I use NowSMS for my SMS provider instead of Twilio and Clickatell. NowSMS goes through a cell phone, which is flat rate pricing instead of per text. I've found documentation for twilio or clickatell, but none about the api itself. Can someone point me toward documentation for the civicrm hooks or the "add new provider" screen? I assume civicrm does http/https in and out based on some triggers or web hooks, etc, soap, rest, xml, something? I'm self hosting civicrm on wordpress on my LAN, and NowSMS server is on the same lan, no authentication required, very very easy to program via simple http get commands with two phone numbers and some text. Anyway, yes, documentation please? We've already paid for NowSMS, and we currently use it quite successfully on other projects, so we are not willing to switch, thank you. Any help appreciated!

# Answer
You need to write an extension (https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-module), and you can use the existing provider extensions as a template and change what you need. You can also look at other third party extensions. I wrote one recently (https://lab.civicrm.org/extensions/ringcentral), which has some maybe nonstandard things, but mostly I copied and pasted the overall structure from twilio and clickatell, e.g. https://github.com/civicrm/org.civicrm.sms.twilio/blob/master/org\_civicrm\_sms\_twilio.php
> 4 votes

# Answer
API documentation exists - https://docs.civicrm.org/dev/en/latest/api. You might even be able to get incoming SMS without coding an extension, using either the standard REST API or with the Form Processor extension. However, you're not going to get Civi to submit a request to an external URL without an extension.

That said - CiviRules handles a significant chunk of what you're trying to do. However, there's no "submit to an external URL" action. If you were to sponsor the authorship of such an action, you could probably get quite a lot of mileage out of it.
> 0 votes

---
Tags: api, sms
---


# Question
Title: DB Error: no such field -- for new contribution page
Trying to create a New Contribution page, this is the message I get: "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. DB Error: no such field"

Doesn't seem to matter what choices, options, or data I might enter on the page where I create a new Contrib page -- it always gives me this error. Don't know where to look next.

CiviCRM version 5.20.0

Drupal version 7.69 - Profile civicrm\_starterkit

\** CiviCRM ERROR MESSAGE\**

Jan 09 13:36:55 \[error\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> exceptionHandler )

```
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT a.id as `id`, a.title as `title`, a.intro_text as `intro_text`, a.financial_type_id as `financial_type_id`, a.payment_processor as `payment_processor`, a.is_credit_card_only as `is_credit_card_only`, a.is_monetary as `is_monetary`, a.is_recur as `is_recur`, a.is_confirm_enabled as `is_confirm_enabled`, a.recur_frequency_unit as `recur_frequency_unit`, a.is_recur_interval as `is_recur_interval`, a.is_recur_installments as `is_recur_installments`, a.adjust_recur_start_date as `adjust_recur_start_date`, a.is_pay_later as `is_pay_later`, a.pay_later_text as `pay_later_text`, a.pay_later_receipt as `pay_later_receipt`, a.is_partial_payment as `is_partial_payment`, a.initial_amount_label as `initial_amount_label`, a.initial_amount_help_text as `initial_amount_help_text`, a.min_initial_amount as `min_initial_amount`, a.is_allow_other_amount as `is_allow_other_amount`, a.default_amount_id as `default_amount_id`, a.min_amount as `min_amount`, a.max_amount as `max_amount`, a.goal_amount as `goal_amount`, a.thankyou_title as `thankyou_title`, a.thankyou_text as `thankyou_text`, a.thankyou_footer as `thankyou_footer`, a.is_email_receipt as `is_email_receipt`, a.receipt_from_name as `receipt_from_name`, a.receipt_from_email as `receipt_from_email`, a.cc_receipt as `cc_receipt`, a.bcc_receipt as `bcc_receipt`, a.receipt_text as `receipt_text`, a.is_active as `is_active`, a.footer_text as `footer_text`, a.amount_block_is_active as `amount_block_is_active`, a.start_date as `start_date`, a.end_date as `end_date`, a.created_id as `created_id`, a.created_date as `created_date`, a.currency as `currency`, a.campaign_id as `campaign_id`, a.is_share as `is_share`, a.is_billing_required as `is_billing_required`, a.frontend_title as `frontend_title`

```

FROM civicrm\_contribution\_page a WHERE (a.id = "1") LIMIT 25 OFFSET 0 \[nativecode=1054 \** Unknown column 'a.frontend\_title' in 'field list'\] \[type\] =\> DB\_Error \[user\_info\] =\> SELECT a.id as `id`, a.title as `title`, a.intro\_text as `intro_text`, a.financial\_type\_id as `financial_type_id`, a.payment\_processor as `payment_processor`, a.is\_credit\_card\_only as `is_credit_card_only`, a.is\_monetary as `is_monetary`, a.is\_recur as `is_recur`, a.is\_confirm\_enabled as `is_confirm_enabled`, a.recur\_frequency\_unit as `recur_frequency_unit`, a.is\_recur\_interval as `is_recur_interval`, a.is\_recur\_installments as `is_recur_installments`, a.adjust\_recur\_start\_date as `adjust_recur_start_date`, a.is\_pay\_later as `is_pay_later`, a.pay\_later\_text as `pay_later_text`, a.pay\_later\_receipt as `pay_later_receipt`, a.is\_partial\_payment as `is_partial_payment`, a.initial\_amount\_label as `initial_amount_label`, a.initial\_amount\_help\_text as `initial_amount_help_text`, a.min\_initial\_amount as `min_initial_amount`, a.is\_allow\_other\_amount as `is_allow_other_amount`, a.default\_amount\_id as `default_amount_id`, a.min\_amount as `min_amount`, a.max\_amount as `max_amount`, a.goal\_amount as `goal_amount`, a.thankyou\_title as `thankyou_title`, a.thankyou\_text as `thankyou_text`, a.thankyou\_footer as `thankyou_footer`, a.is\_email\_receipt as `is_email_receipt`, a.receipt\_from\_name as `receipt_from_name`, a.receipt\_from\_email as `receipt_from_email`, a.cc\_receipt as `cc_receipt`, a.bcc\_receipt as `bcc_receipt`, a.receipt\_text as `receipt_text`, a.is\_active as `is_active`, a.footer\_text as `footer_text`, a.amount\_block\_is\_active as `amount_block_is_active`, a.start\_date as `start_date`, a.end\_date as `end_date`, a.created\_id as `created_id`, a.created\_date as `created_date`, a.currency as `currency`, a.campaign\_id as `campaign_id`, a.is\_share as `is_share`, a.is\_billing\_required as `is_billing_required`, a.frontend\_title as `frontend_title` FROM civicrm\_contribution\_page a WHERE (a.id = "1") LIMIT 25 OFFSET 0 \[nativecode=1054 \** Unknown column 'a.frontend\_title' in 'field list'\] \[to\_string\] =\> \[db\_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM\_Core\_Error::exceptionHandler prefix="" info="SELECT a.id as `id`, a.title as `title`, a.intro\_text as `intro_text`, a.financial\_type\_id as `financial_type_id`, a.payment\_processor as `payment_processor`, a.is\_credit\_card\_only as `is_credit_card_only`, a.is\_monetary as `is_monetary`, a.is\_recur as `is_recur`, a.is\_confirm\_enabled as `is_confirm_enabled`, a.recur\_frequency\_unit as `recur_frequency_unit`, a.is\_recur\_interval as `is_recur_interval`, a.is\_recur\_installments as `is_recur_installments`, a.adjust\_recur\_start\_date as `adjust_recur_start_date`, a.is\_pay\_later as `is_pay_later`, a.pay\_later\_text as `pay_later_text`, a.pay\_later\_receipt as `pay_later_receipt`, a.is\_partial\_payment as `is_partial_payment`, a.initial\_amount\_label as `initial_amount_label`, a.initial\_amount\_help\_text as `initial_amount_help_text`, a.min\_initial\_amount as `min_initial_amount`, a.is\_allow\_other\_amount as `is_allow_other_amount`, a.default\_amount\_id as `default_amount_id`, a.min\_amount as `min_amount`, a.max\_amount as `max_amount`, a.goal\_amount as `goal_amount`, a.thankyou\_title as `thankyou_title`, a.thankyou\_text as `thankyou_text`, a.thankyou\_footer as `thankyou_footer`, a.is\_email\_receipt as `is_email_receipt`, a.receipt\_from\_name as `receipt_from_name`, a.receipt\_from\_email as `receipt_from_email`, a.cc\_receipt as `cc_receipt`, a.bcc\_receipt as `bcc_receipt`, a.receipt\_text as `receipt_text`, a.is\_active as `is_active`, a.footer\_text as `footer_text`, a.amount\_block\_is\_active as `amount_block_is_active`, a.start\_date as `start_date`, a.end\_date as `end_date`, a.created\_id as `created_id`, a.created\_date as `created_date`, a.currency as `currency`, a.campaign\_id as `campaign_id`, a.is\_share as `is_share`, a.is\_billing\_required as `is_billing_required`, a.frontend\_title as `frontend_title` FROM civicrm\_contribution\_page a WHERE (a.id = "1") LIMIT 25 OFFSET 0 \[nativecode=1054 \** Unknown column 'a.frontend\_title' in 'field list'\]"\] )

# Answer
> 1 votes
The upgrade or install script was suppose to create frontend\_title field in civicrm\_uf\_group table. Did you get any error while doing upgrade or install?

To fix you will need to manually add the 'frontend\_title' field to the table by running below sql query.

```
ALTER TABLE `civicrm_uf_group` ADD  `frontend_title` VARCHAR(64) NULL DEFAULT NULL COMMENT 'Profile Form Public title';

ALTER TABLE `civicrm_uf_group` ADD  `add_cancel_button` TINYINT(4) NULL DEFAULT '1' COMMENT 'Should a Cancel button be included in this Profile form.';

```

---
Tags: civicontribute, contributions
---


title: Export all contacts using SQL Query

text:
# Question
Title: Export all contacts using SQL Query
I want to export all contacts with all field values through SQL.

I'm not able to export from CiviCRM, it throwing 504 Gateway timeout error.

What will be the SQL query?

# Answer
> 4 votes
It is little difficult to provide sql for contact export as it is has many tables joins. The basic query to fetch all primary details is pasted below. The output may not be same as what you get in exported file because some of the options are converted from value to label using php and also the query is not joined with the custom data table as the table name may vary because they are generated dynamically.

```
SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`, contact_a.display_name as `display_name`, contact_a.do_not_email as `do_not_email`, contact_a.do_not_phone as `do_not_phone`, contact_a.do_not_mail as `do_not_mail`, contact_a.do_not_sms as `do_not_sms`, contact_a.do_not_trade as `do_not_trade`, contact_a.is_opt_out as `is_opt_out`, contact_a.legal_identifier as `legal_identifier`, contact_a.external_identifier as `external_identifier`, contact_a.nick_name as `nick_name`, contact_a.legal_name as `legal_name`, contact_a.image_URL as `image_URL`, contact_a.preferred_communication_method as `preferred_communication_method`, contact_a.preferred_language as `preferred_language`, contact_a.preferred_mail_format as `preferred_mail_format`, contact_a.hash as `hash`, contact_a.source as `contact_source`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.prefix_id as `prefix_id`, contact_a.suffix_id as `suffix_id`, contact_a.formal_title as `formal_title`, contact_a.communication_style_id as `communication_style_id`, contact_a.email_greeting_id as email_greeting_id, contact_a.postal_greeting_id as postal_greeting_id, contact_a.addressee_id as addressee_id, contact_a.job_title as `job_title`, contact_a.gender_id as `gender_id`, contact_a.birth_date as `birth_date`, contact_a.is_deceased as `is_deceased`, contact_a.deceased_date as `deceased_date`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, contact_a.sic_code as `sic_code`, contact_a.user_unique_id as `user_unique_id`, contact_a.employer_id as `current_employer_id`, contact_a.is_deleted as `contact_is_deleted`, contact_a.created_date as `created_date`, contact_a.modified_date as `modified_date`, contact_a.addressee_display as addressee_display, contact_a.addressee_custom as addressee_custom, contact_a.email_greeting_display as email_greeting_display, contact_a.email_greeting_custom as email_greeting_custom, contact_a.postal_greeting_display as postal_greeting_display, contact_a.postal_greeting_custom as postal_greeting_custom, IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) as current_employer, civicrm_address.id as address_id, civicrm_location_type.id as location_type_id, civicrm_location_type.name as `location_type`, civicrm_address.street_address as `street_address`, civicrm_address.street_number as `street_number`, civicrm_address.street_number_suffix as `street_number_suffix`, civicrm_address.street_name as `street_name`, civicrm_address.street_unit as `street_unit`, civicrm_address.supplemental_address_1 as `supplemental_address_1`, civicrm_address.supplemental_address_2 as `supplemental_address_2`, civicrm_address.supplemental_address_3 as `supplemental_address_3`, civicrm_address.city as `city`, civicrm_address.postal_code_suffix as `postal_code_suffix`, civicrm_address.postal_code as `postal_code`, civicrm_address.geo_code_1 as `geo_code_1`, civicrm_address.geo_code_2 as `geo_code_2`, civicrm_address.manual_geo_code as `manual_geo_code`, civicrm_address.name as `address_name`, civicrm_address.master_id as `master_id`, civicrm_address.county_id as county_id, civicrm_address.state_province_id as state_province_id, civicrm_address.country_id as country_id, civicrm_phone.id as phone_id, civicrm_phone.phone_type_id as `phone_type_id`, civicrm_phone.phone as `phone`, civicrm_phone.phone_ext as `phone_ext`, civicrm_email.id as email_id, civicrm_email.email as `email`, civicrm_email.on_hold as `on_hold`, civicrm_email.is_bulkmail as `is_bulkmail`, civicrm_email.signature_text as `signature_text`, civicrm_email.signature_html as `signature_html`, civicrm_im.id as im_id, civicrm_im.provider_id as `im_provider`, civicrm_im.provider_id as provider_id, civicrm_im.name as `im`, civicrm_openid.id as openid_id, civicrm_openid.openid as `openid`, civicrm_worldregion.id as worldregion_id, civicrm_worldregion.name as `world_region`, civicrm_website.id as website_id, civicrm_website.url as `url`,
                CONCAT_WS(',',
                GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
                GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
              )
              as groups, GROUP_CONCAT(DISTINCT(civicrm_tag.name)) as tags, GROUP_CONCAT(DISTINCT(civicrm_note.note)) as notes
FROM civicrm_contact contact_a
LEFT JOIN civicrm_address
  ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 )
LEFT JOIN civicrm_country
  ON ( civicrm_address.country_id = civicrm_country.id )
LEFT JOIN civicrm_email
  ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)
LEFT JOIN civicrm_phone
  ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1)
LEFT JOIN civicrm_im
  ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1)
LEFT JOIN civicrm_openid
  ON ( civicrm_openid.contact_id = contact_a.id AND civicrm_openid.is_primary = 1 )
LEFT JOIN civicrm_location_type
  ON civicrm_address.location_type_id = civicrm_location_type.id
LEFT JOIN civicrm_group_contact
  ON contact_a.id = civicrm_group_contact.contact_id
LEFT JOIN civicrm_group_contact_cache
  ON contact_a.id = civicrm_group_contact_cache.contact_id
LEFT JOIN civicrm_entity_tag
  ON ( civicrm_entity_tag.entity_table = 'civicrm_contact' AND civicrm_entity_tag.entity_id = contact_a.id )
LEFT JOIN civicrm_note
  ON ( civicrm_note.entity_table = 'civicrm_contact' AND contact_a.id = civicrm_note.entity_id )
LEFT JOIN civicrm_worldregion
  ON civicrm_country.region_id = civicrm_worldregion.id
LEFT  JOIN civicrm_tag
  ON civicrm_entity_tag.tag_id = civicrm_tag.id
LEFT JOIN civicrm_website ON contact_a.id = civicrm_website.contact_id
WHERE (contact_a.is_deleted = 0) AND contact_a.is_deleted != 1
    GROUP BY contact_a.id LIMIT 0, 100000

```

If you getting 504 error while doing export it worth to export in batches rather doing all in one go.

HTH

Pradeep

---
Tags: contacts, joomla, export
---


# Question
Title: Is resource_url from civicrm_settings.php saved in the civicrm_setting table, under what name?
Where in civicrm\_settings table is resource\_url saved? I cannot use the System Settings/Resource URLs to set it, but can access the database.

# Answer
Instead of editing the database why not just override the value in the civicrm.settings.php file?

Check you have

```
global $civicrm_setting;

```

Then add $civicrm\_setting\['URL Preferences'\]\['userFrameworkResourceURL'\] = 'http://example.com/example-resource-url/';

More information here on this https://docs.civicrm.org/sysadmin/en/latest/customize/settings/

If you do want to update this directly in the database try the civicrm\_setting table you want to search for a name of "userFrameworkResourceURL" and update the value column.

Best to make a back up of the database - or at the very least the table before changing it.

Alternatively you might also be able to set this via the api:

```
cv api Setting.create userFrameworkResourceURL="resource url here"

```

or

```
drush cvapi Setting.create userFrameworkResourceURL="resource url here"

```

depending on how broken your install is. Perhaps use Setting.get on dmaster via the api explorer to confirm what the appropriate format is:

https://dmaster.demo.civicrm.org/civicrm/api3#explorer
> 1 votes

---
Tags: civicrm-home
---


# Question
Title: Missing input parameters error on opt-out form
Our site is producing fatal "Missing input parameters" errors from the mailing opt-out form. This happens several times every day at random times. I have looked at a few other SE posts with similar errors, but those issues seem unrelated. The log output is lengthy so I dumped it here. If anyone could decipher it and let me know how to debug this, I'd appreciate it. Thanks.

# Answer
> 0 votes
The error seems like it might be happening because one of the jid, qid, h params are not present.

As a first step - I'd make sure that the opt out was working properly with a test contact (send them an email and opt out via the link and confirm it's working).

Then if that is working I'd check your server logs - it's possibly something hitting the url without the correct params (some sort of automated crawl etc).

If you wanted to you could try editing the file /home/user/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php on line 31 and output further information about the request. Definitely back up that file first!

---
Tags: civimail, opt-out
---


# Question
Title: Forward CiviEvent Registration Confirmation and Receipt
Apologies for such a basic question but I can't figure out how to do this. I want to forward the CiviEvent Registration Confirmation and receipt to a different email address than the email of the person who registered. I tried editing the event registration and going through the activities of that person and I'm not seeing where I could do this.

# Answer
You can include additional email address in the CC or BCC field while configure the event. On the “Online Registration “ tab, at the very bottom, in confirmation email section.
> 1 votes

---
Tags: civievent, email
---


# Question
Title: how can I add Members of a Groups (JCVA Color Guard group) to event participants for a Color Guard event
I have created events for our association's color guard to present the colors for different and various Organisations and they are showing as Events in CiviCRM. I would like to be able to place color guard groups members in these events and track who (color guard group members) is participating in what Color guard events. I don't see a way to add group members as event participants.

# Answer
> 1 votes
if you carry out a contact search (selecting the group your interested in) and select all of the results, one of the actions you see in the actions menu will be to add them to an event (Register Participants to an event). Have you tried that approach?

Once registered you'll be able to carry out all the tracking/reporting you've highlighted.

---
Tags: civievent
---


# Question
Title: An email confirmation with these payment instructions has been sent to
I am using CiviCRM 5.18.4 with WordPress 5.3.2.

On a Donation page, when "pay later" is available and selected, and when the option to send confirmation email is also selected, the "pay later" instructions that are displayed to the user include: "An email confirmation with these payment instructions has been sent to ."

But no email address is displayed. The email is sent OK, but the user is understandably worried.

I did see a question about this back in 2018, with a suggested code fix, but that fix has not been implemented.

If no one can fix the code, can someone suggest a workaround? I do want to use the Pay Later option, without causing users to worry and me to look sloppy.

Thanks!

# Answer
> 1 votes
This looks like there's a fix just hasn't been confirmed yet:

https://lab.civicrm.org/dev/core/issues/1255

https://github.com/civicrm/civicrm-core/pull/15314

If you can try out the patch and make a comment there that it fixes it for you it will help get it included faster.

---
Tags: wordpress, paylater, donations
---


title: Webform and Mosaico

text:
# Question
Title: Webform and Mosaico
Is it possible to use a Mosaico template within Webform-civicrm?

I can copy paste the code but what if I want to select a template, which is easier to manage if the code evolves frequently.

regards

Guillaume

# Answer
Asking an other question drove me to the best option. I am not sending the confirmation email within webform but rather with a civirule. It's more efficient and also brings more possibilities.
> 0 votes

---
Tags: webform-civicrm, mosaico
---


# Question
Title: How can I 'or' 2 conditions using the api?
If I want to find all contacts without a birth date, I can do this with the api:

```
$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'birth_date' => array('IS NULL' => 1),
));

```

If I want to find all contacts with a birth date before a given date, it works like this:

```
$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'birth_date' => array('<=' => "1960-01-01"),
));

```

Now suppose I want to both the contacts without a birth date and the contacts born before a particular date, can I do that in one API call?

# Answer
Barring some undocumented feature (which are rife in the API, so someone please correct me), I think you'll have to merge the two. However, since you're dealing with "get" calls, it's straightforward to merge the two results.

First, you'll want to get rid of the `sequential` parameter; without it, you'll get arrays of values keyed by ID. Then, you'll have a pretty simple situation:

```
$result = civicrm_api3('Contact', 'get', array(
  'birth_date' => array('IS NULL' => 1),
));

$result2 = civicrm_api3('Contact', 'get', array(
  'birth_date' => array('<=' => "1960-01-01"),
));

$combined = array_merge($result['values'], $result2['values']);

```

The result will have only one row per contact. Although obviously there's no overlap between people with no birth date and people with birth dates prior to 1960, you could use the same principle for merging potentially overlapping groups since the array key is the ID.
> 5 votes

# Answer
With API4 you can do it like this:

```
$contacts = \Civi\Api4\Contact::get()
  ->addClause('OR',
     ['birth_date', '<=', '1960-01-01'],
     ['birth_date', 'IS NULL']
    )
  ->execute();
foreach ($contacts as $contact) {
  // do something
}

```
> 4 votes

---
Tags: api
---


title: Why no record locking in civicase?

text:
# Question
Title: Why no record locking in civicase?
I haven't tested all the parts of civicase, but so far I have found that updates to activities, the main case record and custom fields are not locked.

Two users can update the same information with no warning or error at all.

Is this correct or is there a config option I have missed?

V5.17.4 on Drupal 7 if that makes a difference.

# Answer
Regular activities are like that too. Locking isn't widely implemented. It's not on purpose just hasn't been implemented.

In the first few years of CiviCase's life it used to always make new copies when you edited an activity. You'd still have no warning if two people edit, but you'd see the previous versions. It wasn't a good technical design performance-wise and in fact you couldn't turn it off. Then a feature called advanced/detailed logging was added that logs changes to all tables in civi, but it's not turned on by default. Again there'd be no warning, but you'd have the history for all records. Then at some point the case activity revisions feature was converted into an optional feature and turned off by default too. Then it stopped working. So, at the moment, as a partial solution you can turn on detailed logging (under Administer - System Settings - Misc, where it's just called Logging). Then at least you'll have the record in the database (it creates another set of tables named log\_civicrm\_XXX).
> 3 votes

---
Tags: civicase
---


# Question
Title: comply with CAN-SPAM in workflow messages
I am using CiviCRM 5.18.4 with WordPress 5.3.2, and residing in the United States, where we are required by law to include certain info (our postal address and an opt-out link) in ALL our emails. I can do this in my individual messages and bulk email footers, fine. But they don't show up in any of the Mailflow messages.

I have tried adding

```
{$domain.address}
<p>To comply with CAN-SPAM laws, we remind you that you can also opt-out of all mailings from us.  To do so, <a href="{$action.optOutUrl}" click here</a>, or send mail to {$action.optOut}. </p>

```

near the bottom of the (html) message template, but it doesn't plug in the token values (or it just generates a critical error).

But even if I could get it to work, why am I figuring out how to tweak this? Doesn't almost EVERYONE need to include a footer like this in almost ALL their workflow emails?

# Answer
Take out the $ signs. Smarty variables use $ signs, tokens don't. It is a little bit awkward when they're mixed in the same template.

I don't know the legal answer to the other part of the question, but bulk mailings include it by default.
> 2 votes

---
Tags: email, message-templates, spam
---


# Question
Title: CiviCRM Multi-site support under drupal 8
Does anyone do CiviCRM Multisite under drupal 8? We have lots of affiliates and would like to put them all in the same civicrm database with ACLs set up per domain.

Does this work the same way it did with Drupal 7?

It seems like if you were running Drupal 8 multisite as well, and have discrete drupal 8 databases for each subdomain, you'd run into drupal contact id collisions that would play havoc with the drupal -\> civi contact mappings.

If there's no difference between drupal 7/8 with civicrm I'll just read the documentation for drupal 7

Anyone done this?

# Answer
I've set up a multisite with drupal 8 alongside a drupal 7 but not multiple drupal 8 sites.

The existing drupal 7 documentation was enough to go off. Definitely would recommend trying it out on a demo site first.
> 2 votes

---
Tags: multisite, drupal-8, integration
---


# Question
Title: Searchable Custom Field doesn't appear in Quicksearch options list and is not a sort option in reports
I have 2 membership custom fields that are set as searchable. One field is integer the other is alphanumeric. Neither field appears in the Quicksearch options in Search Preferences. The custom fields appear as column options in the membership reports but they are not available as sort options. Is there anything else I need to configure to make them available for search or sortable in reports?

I have tested with a Contact custom field and this works as expected.

Thanks for any help

# Answer
The quicksearch function is for searching contacts, and therefore doesn't call to any of the other components of Civi for data fields.

As per Civi's Docs, if you're looking for data regarding a specific component (i.e Memberships), each component has it's own search function. In Find Memberships, this should also show your custom fields to allow you to search from.
> 1 votes

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


title: How to select templates

text:
# Question
Title: How to select templates
We are running a conference, when sending a receipt to someone how do we select one of the stored templates which we have created e.g late payment?

Thanks

# Answer
There is no way you can select template to replace the receipt/invoice that is send by Civi automatically. If you want to send a separate invoice/template for certain people than you will need to either write an extension to replace the template with user-driven message template or you can use Schedule reminder or Send Email activity.

1. **Extension**:

Implement hook\_civicrm\_alterMailParams in your extension to replace the message template based on $params parameter

2. Create Email Activity or bulk email to a group

You can use Email activity to send email with the help of Civi-token extension.

3. Schedule reminder

Add contact's to a group whom you want to send invoice, create a Contribution schedule reminder and use your template to send email.

HTH

Pradeep
> 1 votes

---
Tags: templates
---


# Question
Title: Is it posisble to stop contributions of zero?
Back office staff occasionally and accidentally enter an amount of zero for a donation, which Civi accepts as valid. Is it possible to reject this as an error? Price sets can do this but don't actually prevent the user from not selecting the price set & then entering zero. Using Civi 5.19.4 & Drupal 7.69

# Answer
I am afraid to say that your use case or business logic is not supported in CiviCRM ATM. You can either raise a request on https://lab.civicrm.org/dev/financial or write an extension and implement hook\_civicrm\_validateForm hook to throw validation error on screen and not allowing user to submit the form.

HTH

Pradeep
> 1 votes

---
Tags: civicontribute
---


# Question
Title: Recurring contributions no longer showing Custom Fields in subsequent contributions
Drupal 7.69 CiviCRM 5.20.0 iATSPayments 1.7

Around the end of Nov 2019 we updated to Civi 5.20 and at the same time we moved to a new server. Since then our recurring series are not including the custom fields from the first contribution. Would this be related to an improper cron setup after the server move or would it be related to the CiviCrm update?

# Answer
How contributions are created as part of a recurring series is not well-defined by CiviCRM core, it depends on the payment processor.

iATS Payments will create the new contribution in the recurring sequence based on a combination of: 1. the settings in the recurring record and 2. it's best guess of a previous contribution to use as a template (i.e. the most recent contribution in the sequence that has a matching amount).

The code that generates the contributions and payments is here: https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/api/v3/Job/Iatsrecurringcontributions.php

So either it's not finding the right contribution to use as a template, or in your case, since it's an issue with all recurring contributions, I suspect it's a code issue, worth posting to the iATS extension issue queue, here:

https://github.com/iATSPayments/com.iatspayments.civicrm/issues
> 1 votes

---
Tags: recurring-contributions, iatspayments
---


# Question
Title: Compucorp Membership Extras: Offline auto-renew questions
We use Stripe and GoCardless for our online payments but we also have circa 400 offline annual direct debits that are collected by a bureau and were created prior to our CiviCRM implementation.

Historically, we've been doing a mass import each year in order to auto-renew these memberships as auto-renew for offline payment methods isn't natively supported by CiviCRM out of the box.

I've been investigating Compucorps 'Membership Extras' plugin and reading Jamie's blog post and this looks like it could really save us from having to do this mass imports each year.

I have a few questions about the plugin:

**1.** Does this plugin actually create a recuring contribution record the same way that online payments do?

I believe we have some CiviRules that use this field as part of the criteria for certain mail sending.

**2.** Is there any way to bulk apply this to our 400 existing direct debits before they auto-renew in April 2020?

**3.** The documentation states:

> Membership Extras uses a built-in "offline payment plan" payment processor to support the offline handling of recurring payment plans. If you happen to have another offline payment processor (payment processor that uses Payment\_Manual class) and you would like all payment plan created in the back office to use that payment processor instead, you will be able to make that change in the “Offline payment processor for back office” setting by going to Administer -\> Payment Plan Settings.

We use two different payment processors for offline auto-renewals; a mix of "Legacy Direct Debit" and "Standing Order". Is there any way for auto-renewal to just use the same payment processor as the original contribution?

**4.** In some cases, a member has an existing direct debit or standing order that adds extra money as a donation on top of the annual membership fee. Historically, we split this into two imports:

In this example, the annual Direct Debit is actually for £46.

Is there any way to have the extension include the donation as part of the 'duplication' auto-renew process?

Thanks for a great plugin. Hoping it's able to solve some of our admin overhead!

Any suggestions or help greatly appreciated.

# Answer
> 2 votes
Thanks for looking into membership extras. Just a quick point that we are planning a release at the end of Jan which will fix a lot of bugs and issues so I would suggest to wait till that is released before using this fully.

Answers to questions below:

> 1. Does this plugin actually create a recurring contribution record the same way that online payments do?

Yes it does - when creating a new membership you have the option to use a payment plan. If you do the system will create a recurring contribution.

> 2. Is there any way to bulk apply this to our 400 existing direct debits before they auto-renew in April 2020?

This is a bit more tricky. For existing memberships who do not have a recurring contribution you would need to set them up with recurring contributions linked to the contributions and memberships. Perhaps with 400 or so this would be best done manually by creating new memberships starting in the new period, but alternatively you could generate a script (or if you would like some developer support with this do get in touch with me at hello@compucorp.co.uk and we can see if we can create this for you).

> 3. We use two different payment processors for offline auto-renewals; a mix of "Legacy Direct Debit" and "Standing Order". Is there any way for auto-renewal to just use the same payment processor as the original contribution?

Afraid not. The payment processor is what does all the clever work behind the scenes to create the payment plan and instalments. Note you also need to enable the renew memberships scheduled job. Why do you need to use the existing payment processors can I ask?

> 4. In some cases, a member has an existing direct debit or standing order that adds extra money as a donation on top of the annual membership fee. Historically, we split this into two imports: Is there any way to have the extension include the donation as part of the 'duplication' auto-renew process?

Yes... but again this is a bit tricky to update existing memberships into. For new memberships the extension completely supports line items so you could have a membership line (or two) + donation lines on a single contribution. These would then recur with the recurring contribution.

Hope the above is useful and do keep an eye out for the v2 release which will be a big update.

Best

Jamie

# Answer
> 1 votes
I wonder if using this extension might work instead?

https://github.com/adixon/ca.civicrm.contributionrecur

It provides a slightly more sophisticated off-line payment processor, as well as a job that will provide implicit membership renewals using the 'auto-membership' feature.

https://github.com/adixon/ca.civicrm.contributionrecur#auto-memberships

---
Tags: wordpress, civimember, payment-processor, recurring-contributions
---


# Question
Title: How do I automatically create a case on inbound email?
I feel like this is an incredibly basic question, but I have read through the user guide, the admin guide, and searched stackexchange and google, and I have not found the answer.

I have set up an e-mail account to receive inbound emails, and I have successfully configured CiviCRM to check that account, pull in email, and turn those emails into Activities on the contact record. So far, so good.

But what I want is for any inbound e-mail to become a case in CiviCase.

I have read in the docs that inbound email will be tagged to an existing case if it contains a subject line field. And I have also read here:

> In the CiviMail chapter the Email Processor was described as a way to get inbound and outbound emails into CiviCRM as non-case activities. When you enable CiviCase, a new action will be available that allows you to file any non-case activity onto a case.

Where is that new action? I edited the Scheduled Job for Process Inbound Email, and it doesn't have an option to put new emails into a case.

Thanks for your help.

CiviCRM 4.7.20 on Drupal if that matters

# Answer
> 3 votes
It can't do that out of the box but you could theoretically write an extension to use hook\_civicrm\_emailProcessor to create the case when an email comes in. But unless you always want the client to be the From address, you'd have to figure out how to decide who is the client if there's multiple To/Cc's. You'd also have to decide what to do when the client/case already exists for an incoming email or you might get duplicate cases.

For the second part of your question, there used to be a link that appears on the far right-hand side of activity search listings, and a button at the bottom of the page when you view activities, but it looks like maybe this has changed in the latest version. But I can see it under search results in the dropdown under Actions (e.g. after doing Search - Find Activities).

# Answer
> 1 votes
You could achieve this with the CiviRules extension, although I am not sure if all the conditions and actions you would require are in the box yet. It would be fairly straightforward to develop them.

Having said so, I would also not use CiviCase as a ticketing system, I think there are better alternatives. As Demerit pointed out there are many types of vehicle....sometimes I prefer the bicycle and sometimes the car :-)

You can find the CiviRules extension here: https://civicrm.org/extensions/civirules and documentation (inluding how to develop conditions and actions) here: https://docs.civicrm.org/civirules/en/latest/

# Answer
> 0 votes
another alternative is to investigate using a webform for people to submit their issue to you, rather than by email. The webform can create cases.

Best

---
Tags: email, civicase
---


# Question
Title: How to add Option Group to Event Online Registration?
I've made a new Option Group, but I'm struggling to add it to the Online Registration of an Event. How can I do this?

As an example, say I've created an Option Group to record a Participant's favourite colour for an Event. I can see that an Event's Online Registration includes a Profile. The Profile is made up of Fields. These Fields are made up of Options Groups. I can't seem to find how to associate Option Groups with Fields. I'd greatly appreciate any help!

# Answer
Shaun, Welcome to CiviCRM SE,

You will need to

1. Add a custom group extending participant (CiviCRM \>\> Administer \>\> Customize Data and Screens \>\> Custom fields)
2. Add custom field of type select/radio/checkbox in a custom group created in #1.
3. Include this custom field in your profile which you are thinking to include for event.

Note: Custom field UI doesn't provide option to select existing option group which is not part of any custom field, you can either re-enter the options again or save the form without options and using api/sql update the option\_group\_id(with the option group id you have already created) column in civicrm\_custom\_field table for custom field you created at #2.

Thanks

Pradeep
> 2 votes

---
Tags: civievent
---


# Question
Title: How can I get the WYSIWYG editor to appear when using CiviCRM with Wordpress on Cloudron?
I have CiviCRM 5.18 running with Wordpress on a server where the Wordpress instance is managed by Cloudron (https://cloudron.io). Several other web applications being used as well on the same server, and handling all the updates is greatly simplified by using Cloudron. The CiviCRM settings needed to be tweaked slightly to get it to work: essentially from what I can see the Wordpress code sits in a directory /app/code (which is managed by Cloudron) apart from the wp-content directory which sits in /app/data/ with a symlink.

so, in my civicrm.settings.php file I have:

$civicrm\_root = /app/data/wp-content/plugins/civicrm/civicrm/

CiviCRM reports:

\[cms.root\] as /app/code

\[civicrm.root\] as /app/data/wp-content/plugins/civicrm/civicrm

\[civicrm.files\] as /app/data/wp-content/uploads/civicrm

So far so good, and CiviCRM appears to be working flawlessly, with one exception: the WYSIWYG editor isn't loading.

For example, on the 'Memberships' tab of a contribution page, where I would expect to see rich text editor fields for the message text for new memberships and renewals, I'm just seeing standard text fields.

My browser console reports a 404 error on these pages, saying that it failed to load the resource at https://mydomain.org/app/data/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN

The URL it should be using is https://mydomain.org/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN so for some reason it is incorrectly constructing the URL.

I'm thinking that I could/should be able to override this URL in civicrm.settings.php and so avoid the issue, but I'not sure what variable I need to be setting there. Can anyone advise?

# Answer
> 1 votes
This is because your cms.root doesn't match properly with civicrm.root variable and you might be using variables in Resource url for 'CiviCRM Resource URL'.

For such cases you add below two line at the end of the file you will need to change

`$civicrm_root = '/app/data/wp-content/plugins/civicrm/civicrm/';` to `$civicrm_root = '/app/code/wp-content/plugins/civicrm/civicrm/';`

```
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm';civicrm/';
$civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm';civicrm/';

```

Thanks

Pradeep

---
Tags: ckeditor, civicrm.settings.php
---


# Question
Title: Install Development Environment CiviCrm for Drupal 8
I've cloned civicrm-core (4.7.28) and civicrm-drupal (switched to branch 8.x-4.7.28-rc) into my top level modules dir of my Drupal 8.4. I was able to install dependencies into vendor dir for civicrm-core using composer. I get the following errors when trying to do same for civicrm-drupal:

Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1 \- The requested package civicrm/civicrm-core could not be found in any version, there may be a typo in the package name.

Potential causes: \- A typo in the package name \- The package is not available in a stable-enough version according to your minimum-stability setting see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details. \- It's a private package and you forgot to add a custom repository to find it

From what I gather the problem is simply a path issue, as civicrm-core 4.7.28 is in a peer dir. As it seems bad practice to modify the composer.json file to point to local path and I wish to keep core/drupal projects in separate dir, there must be a simple solution which I've been unable to stumble on thus far.

Any suggestions?

# Answer
**UPDATE:** You can use this method but instead of a version 5.x in the composer command specify dev-master.

You can also use buildkit with e.g. target d8rec-clean. See https://github.com/civicrm/civicrm-drupal-8/pull/37

---

**OLDER:**

Here's what I've been doing. I don't think it's the ideal solution and am curious if anyone else has a better way.

1. Use the roundearth installer as normal to install the latest "numbered" version. (https://gitlab.com/roundearth/drupal-civicrm-project)
2. Hack the vendor/roundearth/civicrm-composer-plugin/src/Handler.php file so that:

(a) getCivicrmCoreVersion() returns 'NIGHTLY'

(b) addMissingCivicrmFiles() uses `https://download.civicrm.org/latest/civicrm-NIGHTLY-drupal.tar.gz` as the civicrm\_archive\_url.
3. Delete vendor/civicrm/civicrm-core
4. Run `composer require civicrm/civicrm-core:dev-master civicrm/civicrm-drupal-8:dev-master`
> 1 votes

---
Tags: drupal-8
---


# Question
Title: database Upgrade URL does not load Upgrade screen
Civi 5.15.1, WP 5.3.2

We are in the process of upgrading Civi from 5.15.1 to 5.21, and are stuck at the "Upgrade the database" step in the upgrade instructions here: https://docs.civicrm.org/sysadmin/en/latest/upgrade/wordpress/

The first time we pasted the upgrade URL into our browser, we got a message saying our PHP version was out of date. So we upgraded it to version 7, and tried to reload the upgrade URL. Instead of an "Upgrade screen", we got the WP login page. Upon logging in, the WP Dashboard appeared, without any Civi upgrade button. Nor does the WP Updates page list Civi as an option.

We backed up our database before starting the installation -- should we just restore it, or are there other steps we should take first?

EDIT: We performed the above actions using Firefox 72.0.1 with the Standard Browser Privacy settings, but can make changes if need be.

# Answer
Try running the upgrade url

```
http://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

```

Thanks

Pradeep
> 0 votes

---
Tags: upgrade
---


# Question
Title: How do you import contributions as Pending (Pay Later)?
After reviewing Pay Later status on imported contributions \- I followed the answer - created a column listed as Is Pay Later - and added the value 1 to all contributions. Did it again as Yes - both times all contributions were imported as complete instead of pending pay later.

Drupal 7 - 5.20

# Answer
> 5 votes
Make sure you have 'Pay Later' Column set to 1 and Status column set to 'Pending' for the contribution rows that are pending from pay later. If you don't have status column that its set as Completed by default

---
Tags: civicontribute, import, data-import, paylater, pending
---


# Question
Title: WordPress Events Manager Conflict with CiviCRM Registration Pages
I have WordPress 5 running CiviCRM.

We have CiviEvent and CiviContribute enabled and the live registration/donation links are working as expected.

We recently enabled WP Events Manager plugin as well to accommodate some more complex event registrations.

When enabled, the online registration/donation pages redirect to the default CiviCRM page (the one that says Do Not Delete) and the registration/contribution forms disappear.

There are no errors and nothing seems to be wrong other than the fact that the forms no longer display. It doesn't seem to be a URL conflict as the paths are completely different between plugins.

Has anyone experienced this problem?

Where would I even begin this debugging issue?

# Answer
> 0 votes
Figured it out.

The problem is with Events Manager, which overrides permalinks.

I resolved by setting the permalinks to add a leading '/'.

For example:

'events/' '/events/'

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


# Question
Title: better display of incoming email messages in database
Incoming email (e.g. mail imported into the database via the fetch\_activities scheduled job) is stored in the database as plain text (which is great).

However, when you view an inbound email activity, it is displayed without any line breaks, which makes it very difficult to read, especially if there is a long reply thread.

Does anyone know of a way to tell CiviCRM to add line breaks (nl2br or something) for just this one activity type? Or any other suggestions on improving the readability of incoming email messages?

# Answer
Thank you @demerit and @jitendra for your help!

It turns out, the answer is: don't change the label for the Incoming Email activity type :).

The user changed it from Incoming Email to just Email. Changing the label should definitely not break things - but since this issue is still open, it does.

So, in the short term, I'll change the label back. In the long term, getting 1116 fixed would be ideal.
> 2 votes

---
Tags: email, wysiwyg
---


# Question
Title: Individual Custom Fields in Participant List (WordPress)
I have a general participant list for a set of events.

I need to add an Individual Custom Field, but this field is not accessible in the Event report column selection.

Are there any plugins or workarounds to access these fields in the Participant Report?

# Answer
> 1 votes
Install ExtendedReport by Eileen, It provides additional reports with lots of options.

Or make sure you have 'Is this Field Searchable?' option checked for the custom field that you want on the report. If not then edit the custom field and check the option 'Is this Field Searchable?'.

Thanks

Pradeep

---
Tags: wordpress, civievent, participants, civicrm-event
---


title: Cron Job Diagnostics

text:
# Question
Title: Cron Job Diagnostics
WordPress Version: 5.3.2

CiviCRM - Version 5.21.1

Shared Hosting - Dreamhost

I have tested this string in ssh:

```
/usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0

```

It yielded this result:

```
Array
(
  [is_error] => 0
  [version] => 3
  [count] => 1
  [values] => 1
)

```

I assume this is correct, because when it runs in ssh, the web interface tells me cron has run in the status page. So I went to the next step, adding it to cron.

I tried using crontab -e, but it didn't seem to work there, so I tried it with the dreamhost cron interface:

```
1 */2 * * * /usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0

```

This worked because I kept getting emails every two hours one minute after the hour with the array message above. So I appended `> /dev/null 2>&1` to the string, hoping that I could run it without receiving any emails unless there's an error.

Well I'm not receiving errors and the cron isn't running. I'm missing something. I'd be grateful for any suggestions to fix it. Thanks!

# Answer
> 2 votes
Hope you adding `>/dev/null 2>&1` and not only `/dev/null 2>&1` at the end of the cron string.

---
Tags: wordpress, cron, cron-job
---


# Question
Title: Automated emails generated from activities from address
Is there a setting by which all emails from civi will have the same 'from' address? Specifically I am thinking of activity emails, where an activity is added by someone, and currently all emails sent out related to that activity show as being from that person, rather than from the default site email address. Is there a way to change this?

Even when a different person makes a change to an activity, the contact the activity was added by is used for the from address in the email alert.

This is especially relevant when someone leaves an organization, but there are still activities in progress that were added by that person. Of course the data that this person is who added/initiated the activity is valuable, but having emails sent from that person that is no longer in the organization is a problem.

Is there any method that could be employed in the UI that could address this? Or will we need to develop a patch to change what from email address is used for activity updates?

# Answer
> 3 votes
I think civicrm uses the setting from `civicrm/admin/setting/smtp?reset=1`, i.e, Administer -\> System Setting -\> Outbound Email

If the above setting is enabled, civi uses the creator of the activity as a `from` address in all the email notification.

Set this to `No` in order to fix this problem.

Note that the above setting acts on your complete site and cannot be configured only for activities.

---
Tags: activities
---


# Question
Title: Sport Association - Listing organization?
I did some research but I can't find how to it. We are planning to use CIVICRM for our Wordpress Website. We want to show a page / directory of all of our Clubs (Organization). Help will be really appreciate.

Thank you very much,

Guillaume.

# Answer
> 4 votes
As Demerit says, you can configure CiviCRM profiles to make search listings.

People are working on Wordpress Plugins to create views of CiviCRM data https://civicrm.org/blog/justinfreeman/show-civicrm-content-quickly-easily-in-wordpress-using-content-views

So I guess the short answer is, yes you can. But it takes a little thought/ planning/ configuration.

# Answer
> 2 votes
You could try the CiviCRM Directory plugin. It needs a bit of configuration and templating to make the best of it, but it works out-of-the-box for testing purposes.

Otherwise (as others have suggested) Profiles could work for you.

---
Tags: organization
---


# Question
Title: Database error when saving CiviCRM event: “Row size too large”
I'm using CiviCRM in multilingual mode. I can generally create events (and other objects) fine. However, I often run into update problems at some point. The interface will "spin" and never save.

Looking at the CiviCRM error log reveals a database error:

```
nativecode=1118 ** Row size too large (> 8126)

```

I have looked at this clearly related case: Database error when using CiviCRM admin UI: "Row size too large"

I have tried (with some trepidation because I haven't worked on the Civi backend yet and don't know where the pitfalls are) to change the ROW\_FORMAT of Civicrm\_event\_en\_CA to Dynamic, but am told that it is not a base table.

I'm not really clear as I am more of a db user than a programmer, but assume that this table is somehow subsidiary to civicrm\_event.

That table is set to ROW\_TYPE=COMPACT. I'm game to change it, but it seems drastic enough that I am wondering:

1. Is it safe to do so WRT to CiviCRM operation?
2. Will it persist through a CiviCRM upgrade or will it revert (and potentially throw away data)?

# Answer
> 2 votes
this might be a mariadb config issue.

```
# enable large indexes and Barracuda
# for utf8mb4
innodb_file_per_table=1
innodb_file_format=Barracuda
innodb_large_prefix=1

```

might also change the tables to ROW\_FORMAT=DYNAMIC or ROW\_FORMAT=COMPRESSED see this post for much more info on this front https://stackoverflow.com/questions/15585602/change-limit-for-mysql-row-size-too-large

but **do not** follow the suggestion there to alter the tables to use MyISAM instead of INNODB, that's a really bad idea.

# Answer
> -1 votes
Adding this for ease of reference... In addition to the above innodb config, you will need to check the tables as @Keith Nunn alluded to. There are two tables that may need tweaking, SQL code below (row format is the key, but no harm to make sure block size and engine are set):-

```
ALTER TABLE civicrm_contribution_page
ENGINE=InnoDB
ROW_FORMAT=COMPRESSED
KEY_BLOCK_SIZE=8;

ALTER TABLE civicrm_event
ENGINE=InnoDB
ROW_FORMAT=COMPRESSED
KEY_BLOCK_SIZE=8;

```

---
Tags: database
---