title: Cautionary Tale: Drupal 8.7.0 upgrade

text:
# Question
Title: Cautionary Tale: Drupal 8.7.0 upgrade
Don't do it yet. We had an issue where the drush updb failed.

**A fresh install then drush updb did work** but simply updating drupal and civicrm with composer then running drush updb left database in a state where it could no longer be updated by drush.

I have no idea where the source of the issue is but the updb was complaining about null values in the database.

We ran the drupal8/civicrm install from scratch then updated the db and it worked fine.

Here's a link to the relevant drupal upgrade complaint thread: https://www.drupal.org/project/drupal/issues/3052464

Luckily we try all of these things out in a mint copy of production vm first, before we actually do upgrades. This issue may or may not occur for you. Be careful!!!

-Neil

# Answer
> 1 votes
Found solution. It's at the drupal complaint thread above :-) cheers!

Here's a link to the relevant drupal upgrade complaint thread: https://www.drupal.org/project/drupal/issues/3052464

---
Tags: drupal, upgrade
---


# Question
Title: Import Contribution Fails - Financial Type
Trying to import contributions. The data file has integer for Financial Type. Import fails Error File says: "Financial Type is not valid: 1"

Everything I have read said to enter the Financial Type Id. My data table for Financial Type has IDs 1,2,3,4,5 How can 1 not be valid?

# Answer
We’ve hit this too in the past -\> solution is to use the Name of the Financial Type. eg Donation (instead of 1). PS - Also match the case.
> 4 votes

---
Tags: civicontribute
---


title: Mailing sent with wrong link

text:
# Question
Title: Mailing sent with wrong link
I've just realised I've sent an email out with a broken link.

Unfortunately it's munged in a way that means that I can't easily catch it with a drupal redirect.

I could probably figure out an nginx regex to match this - but is there an easier way?

# Answer
Yes.

There is a way that doesn't involve nginx regex's (https://xkcd.com/208/)

If you are comfortable accessing your civicrm database directly you can locate the correct row in the civicrm\_mailing\_trackable\_url and update the value of the url.

If you run

```
select id, url, mailing_id from civicrm_mailing_trackable_url where mailing_id = X;

```

Where X is the mailing id - you will get a list of urls for that mailing and you should be able to pick out the broken link and update it.
> 1 votes

---
Tags: civimail
---


# Question
Title: What is the server IP in database trigger definitions?
We just did a MySQL server migration. I completely cleared out all the triggers and executed

> https://test.sdcbcdream.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1&triggerRebuild=1

This rebuilt the triggers. When I examine them, though, they all have for the definer field

> sdcbc@173.236.128.0/255.255.128.0

The IP for the new MySQL server is 208.97.161.77. Where is the rebuild trigger function getting the other IP? I believe that was the old IP, but am unsure as that server has been decommission by our host service.

We are running CiviCRM 5.10.3 on WordPress 5.1

Thanks for any help

# Answer
Thanks to comments by Demerit, my confusion arises from the fact that our MySQL server and web server (with core CiviCRM files) are separate. The 173.236.128.0/255.255.128.0 mask matches our web server and so that definer field in the trigger just indicates the server from which the triggerRebuild command was executed. There was nothing wrong with our website operation. I just didn't understand the source of that IP, thinking it should match the IP of the MySQL server, which is wholly different. A good argument for a true VPS where you have full control of both Apache and MySQL on the same server.
> 1 votes

---
Tags: database, trigger
---


# Question
Title: How to Export/Import all CiviCRM data from one website to another one
I am recreating my website on another server. So my big concern is how to move all CRM data to new server/website. To do separately exporting/importing contacts, membership, activities etc. is not so much accurate way, because there is a possibility of missing something.

Also I can't dump whole database. Is there any possible method, how can I do this??

# Answer
> 2 votes
I think you are saying that you have a single database for CMS content on the old site and that you already have new CMS content in the database for the new site. I think you want to move the CiviCRM structure and data. If I have understood that correctly (it would be good if you clarified by editing the question) then you can do the following.

1) split the CMS and CiviCRM databases: KEEP A BACKUP! Create a copy of the combined database by dump, rename the original and then reload). In the original you delete the CiviCRM tables (with e.g. phpMyAdmin) and in the copy, delete the WP tables. You need to edit the civicrm.settings.php to change the name of the CRM database - it will have the same username when created this way. This last bit allows you to keep access to the old CiviCRM so you can check things.

2) on your new site, reinstall CiviCRM using the same version as the old site and the same database details. Now replace the CiviCRM database with the CiviCRM database from the old site. Have a look at the documentation first! https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/

---
Tags: database
---


title: Use - Create Mode - URL error message

text:
# Question
Title: Use - Create Mode - URL error message
I am currently trying to setup an online membership signup form for our organisation.

I am in the early stages at the moment but so far I have created the bare bones of the form by creating a profile containing the various fields that need to be on the form. After doing this I wanted to test completing the form online so that members / organisations are added to Civi. When clicking on Use - Create mode I am able to view the form and complete it etc (This only appears however to be when I am still logged into my session). If I try the URL in private mode or on a difference browser then I get the following error:

(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. The requested Profile (gid=16) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance.)

What could be the cause of this?

The other issue I am coming across is that I want to use this profile via a Contribution page, however when setting up the Contribution page, under the profile tab section, the drop down Include Profile (top of page) will not list the profile I have created so I cannot add it.

As per below I have created a profile called "Membership Form" however this profile is not showing in the dropdown list to add to the Contribution page.

Any help would really be appreciated - I am pretty new to CiviCRM.

Thanks in advance everyone :)

# Answer
For the first part, see if this answer helps: https://civicrm.stackexchange.com/a/22434/225

For the second part where the profile is not showing up, that can mean that you have added fields that are not valid in the context where you are trying to use the profile. Civi determines the type of the profile based on the fields it contains, so adding fields can reduce the places where it can be used. Looking at your screenshot shows `Testing_Only` in the type so look at your fields and remove whatever relates to `Testing_Only` and see if that results in the profile showing up where you want it.
> 1 votes

---
Tags: civicontribute, profile
---


# Question
Title: What does the option "Always post to Accounts Receivable" in CiviContribute do?
In the settings page of the CiviContribute module, there is the option "Always post to Accounts Receivable?" which can be activated or de-activated.

I have searched through the documentation and googled for it, but I cannot find a clear description of this option. I would have expected it to create additional bookkeeping entries for contributions in order to always involve the 'accounts receivable' account, even if an immediate payment is performed. But so far, I have not been able to make it work. In my tests, I get always the same set of bookkeeping transactions, irrespective of this setting.

I am not sure if this is a problem with my installation, if the feature just does not work or if I need to configure something else in addition.

(I am using Civi 5.11.0 and Wordpress 5.1).

# Answer
> 2 votes
There is probably a bug in storing the settings for this option, which prevents it from having any effect. See also here.

---
Tags: civicontribute, accounting, financial-accounts, bookkeeping
---


# Question
Title: How to set up Accruals Accounting/Deferred Revenue?
In a video from 2017, CiviAccounts and the **accruals accounting feature**/deferred revenue are explained quite well: https://www.youtube.com/watch?v=bNIHXBA6EEg (starting from minute 39). According to the video, the **feature was supposed to be new in 2017**. What it does is, instead of creating one transaction for an annual membership, it should basically break it up into twelve monthly transactions.

In a test installation, I am now trying to set this up. I.e. when someone purchases an annual membership on July 1, half of the revenue shall be recognized within the current year, the other half in the following year.

Although I enabled the check box in the settings of CiviContribute ('Enable Deferred Revenue') and set up the deferred revenue account under the financial type 'Member Dues', I absolutely cannot get this feature to work. - According to the video, nothing else needs to be done.

Unfortunately, I cannot find anything about this in the User Guide or in the System Administrator Guide. Also google reveals only very little information, e.g. 'CRM-16189 Deferred Revenue Support', but this did not really help me in configuring my system.

This leads me to two questions:

1. Does this feature actually exist or has it never been completed or removed?
2. Am I missing any obvious or hidden settings that I need to tweak in order to make deferred revenue work?

Any help is much appreciated!

Edit: I am using CiviCRM 5.11.0 with Wordpress

# Answer
There is probably a bug in storing the settings for this option, which prevents it from having any effect. See also here.
> 1 votes

---
Tags: civicontribute, accounting
---


# Question
Title: Assigning Drupal roles on removal of inherited membership
I'm testing CiviMember Roles Sync to build a membership web site. The majority of our users are organisations, all of whose employees and volunteers should have access to the restricted nodes on the site.

I've set up Drupal roles for active members and expired members, and I've created the relevant organisation and individual memberships in CiviCRM. Then I've set up the association rules as illustrated (obviously 'church' is our organisation membership and 'supporter' the individual):

These rules seem to work just as expected for adding and removing individual members. But contacts who inherit their membership from an organisation never seem to get marked as expired themselves. So if a contact is removed as an employee or volunteer with their parent organisation they are stripped of their active member role without being reassigned the expired member role. Is there a way to sync roles on removal of the right to an inherited membership?

**Postscript:** When I stated writing this question, my test user didn't seem to have the active role removed when disabling the relationship to the parent organisation. As I've continued testing, that's started working even though I don't believe I've changed anything. But I still can't assign the expired role at this point, so any assistance gratefully received.

# Answer
This is a workaround rather than an answer, as I've not figured out how to do what I originally asked. But I've avoided it the need for it for the time being by treating all users who don't have the active member role as expired. That might not work for more complicated membership structures, but I think it meets my needs for now.
> 1 votes

---
Tags: drupal, civimember, roles
---


# Question
Title: Escaping quotes in ckeditor breaks smarty-syntax
The ckeditor has the habit to escape characters like quotes or umlauts. This breaks the smarty-syntax when generating PDFs or mails. Is there a good work-around or solution?

# Answer
Go to **Administer menu » Customize Data and Screens » Display Preferences**, click the **Configure CKEditor** button and add **entities** = **false** in the advanced options (see screenshot).

**Note:** This is the default in CiviCRM 5.61+.

keywords: quotation marks, double quotes
> 10 votes

# Answer
A much simpler solution is to keep the portion of your smarty code that has quotes into HTML comments, so that the quotes won't be escaped:

```
<!-- {capture assign=genre}{contact.gender}{/capture}
{if $genre == "F"}{assign var='salutation' value='Chère'}
{else}
{assign var='salutation' value='Cher'}{/if}
 -->
<p>Chers parents, {$salutation} {contact.first_name},</p>

```
> 2 votes

# Answer
For anyone looking for how to do this in Configure CKEditor, the setting you need is /civicrm/admin/ckeditor and set entities = false under advanced options.
> 1 votes

---
Tags: email, pdf, smarty
---


# Question
Title: CiviRules Trigger:Contribution is Added not working for Online Payments
I've created several rules that assign a contact subtype to contacts depending on their level of donation.

The trigger I am using is "Contribution is added".

The rules function correctly if a contribution is added via the backend, but not when people make online payments through a donation page.

Is there a setting that would affect this? Is there a way to set up rules that will trigger by online payments?

# Answer
> 1 votes
I did a test with a completely new rule, and online payment correctly triggered the rule.

---
Tags: civirules
---


# Question
Title: How do you give in honor/memory of someone but acknowledge someone else?
In some other donation management software, it's possible to say, e.g., "I'm giving $100 in memory of my grandfather. I want my mother and uncle to be acknowledged."

Has anyone tried to incorporate such a workflow into CiviCRM? How do you best do it? Do you soft credit my grandmother? Or my mother/uncle? How do you generate reports of who needs acknowledging?

# Answer
It depends a bit on the purpose of gathering soft credits and acknowledging the donation. For acknowledgement purposes it may be sufficient to gather email and name (and perhaps address) on a front or backend form and with a hook send off an acknowledgement email. I think this can be very nice for those related to the honoured person, allowing them to send a thank you card if they want. Personally I won't bother creating additional soft credits for the mother and uncle beyond those for the person in honour/memory of.
> 1 votes

# Answer
I recalled that my former coworker wrote an "acknowledgee" extension to handle a similar situation and put it on my Github. You can find it here: https://github.com/MegaphoneJon/org.ccr.acknowledgee.

It's rough around the edges, but a) it adds a set of fields to the contribution page if "in memory of" is selected; b) if you have a contribution custom field "Acknowledgee" of type "Contact Reference", it will populate that field with the contact ID that is created/updated.
> 1 votes

---
Tags: civicontribute, soft-credit, honoree
---


# Question
Title: Can custom Tokens for pledges be created?
I need to include the amount pledged and the amount they need to pay (which are different values) within an email I'm sending from CiviMail to let our pledgers know when/how to pay and how much. This data is available under each contact, but I can't see anyway to add a new token so I can insert the necessary merge fields into my email and they aren't currently showing in the drop down list. Is this possible?

# Answer
> 0 votes
seems we have done work to create such a new token but it has not yet been contributed back to the civitoken extension. would you be able to help fund this to happen.

Also a colleague reminded me we have done some work so that you can generate a checksum with a link that will take the person through to a contribution page with the Pledge ID and Amount in the url so the form loads with the right data. Doesn't deal with your first request, but could be really useful if the reason for sending them the 'amount' is because you want them to pay, and to have an easy online way of paying that actually connects the payment to the relevant pledge

# Answer
> 0 votes
There is a CiviCRM hook that allows the development of additional tokens, so it is certainly possible. Do I assume correctly that you are not developing yourself? If so, you could either provide some funding to add this to the civitoken extension as @petednz suggested, or you can fund an expert near you (or one you already are in contact with) to develop this for you.

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


# Question
Title: Email greeting token not working with mosaico
Building a mailing with mosaico

Contact email greeting not showing in final mail

(shows in html preview) mail sent as test and as mailing. No greeting in either.

d 7.66 c 5.10.3

other contact tokens (first name etc) are showing

Any ideas?

# Answer
> 1 votes
Thanks to Parvez, for pointing this out.

As well as Mosaico we had the GDPR extension installed. Upgrading to latest version GDPR has fixed the issue!

---
Tags: civimail, tokens, mosaico
---


# Question
Title: CiviCRM 5.x is storing lot of empty records while sign petition
I am using Drupal 7 with CiviCRM 5.x version and I am not sure why but civicrm is storing lots of empty records(means no email, name etc) it just creates user record.

All these empty details records are created from petition page.

Is anyone faced same king of issue? any help is appreciate.

# Answer
> 0 votes
I have a same pb of "blank" contacts when a petition is signed (Form/Profile hosted on an other website). Drupal / civicrm V4.7.31

---
Tags: drupal, civipetiton
---


# Question
Title: Importing Event Participants with Contribution/ Payment
I am relatively new at civicrm and I have a question about Event imports. I've been reading the documentation here: https://docs.civicrm.org/user/en/latest/common-workflows/importing-data-into-civicrm/ about `Import Participants` and `Import Contributions`. The documentation seems to keep them separate from each other. The documentation touches upon importing multiple csv's for relational data, but doesn't go into great detail about the actual process.

The question is: Is there a standard procedure for importing event participants with their corresponding contributions / payment?

I know that there are many tables involved such as contribution, financial\_trxn, financial\_entity\_trxn, event, participant, line\_item...that are involved in this sort of import and frankly, it seems like a complicated import.

# Answer
The way to do this is to import the Contributions and Participant records separately via the CiviCRM import tools. You may need to also import any new contacts you have first. Using the import tools takes care of all the extra complicated tables.

Then to connect the Contributions to the Participants: You will need to export a csv of all the imported Contributions and a csv of all the imported Participant records. Match up those two lists based on the Contact ID. Then you will manipulate that data to be importable into the civicrm\_participant\_payment table. Which is just Participant id and Contribution id.

Then you will have all data where it needs to be and properly connected
> 3 votes

# Answer
I ended up using a combination of my own solution and Tommy B's. I wrote two PHP scripts. Each time, the PHP script would parse relevant data from a csv file, storing the information in an array, looping through the array and then using code that the civicrm API generated for doing participant and contribution data inserts.

```
define ('SITEROOT', '/home/****/public_html');
define('CIVIROOT', SITEROOT.'/administrator/components/com_civicrm/civicrm');
require_once CIVIROOT.'/civicrm.config.php';
require_once CIVIROOT.'/CRM/Core/Config.php';

$config = CRM_Core_Config::singleton();

echo 'CiviCRM has been successfully initialized.<br/><br/>';

require_once 'CRM/Utils/Request.php';
//is dryrun unless ?dryrun=0
$nA = CRM_Core_DAO::$_nullArray;
$dryrun = CRM_Utils_Request::retrieve('dryrun', 'Positive', $nA, FALSE, 1, 'REQUEST');
echo 'dryrun: '.($dryrun?'TRUE':'FALSE').'<br/><br/>';

$mysqli = new mysqli("localhost", "*******", "*****", "*******");

$csvFile = file('eventsFull.csv');
$data = [];
foreach ($csvFile as $line) {
    $data[] = str_getcsv($line);
}
foreach ($data as $row) {
$eventID = $row[93];
$statusID = $row[19];
.......etc
//// This is from the API below /////////
  $result = civicrm_api3('Participant', 'create', [
    'event_id' => $eventID,
    'contact_id' => $userID,
    'status_id' => $statusID,
    'role_id' => $roleID,
    'register_date' => $registrationDate,
    'source' => $source,
    'fee_level' => $feeLevel,
    'fee_amount' => $price,
    'fee_currency' => $currency,
    'discount_amount' => $discount,
    'custom_35' => $dietNeeds,
    'is_pay_later' => $isPayLater,
  ]);
  $i++;
}

```

There was some more to the code, but that was the general idea. I had two other imports, three in total. One for `$result = civicrm_api3('Contribution', 'create',` One for `$result = civicrm_api3('Participant', 'create', [` and one for `$result3 = civicrm_api3('ParticipantPayment', 'create', [`
> 2 votes

---
Tags: civievent, civicontribute, civimember
---


# Question
Title: not of type Boolean error message when testing Stripe in Test Mode
I am getting the following error message when testing Stripe recurring membership dues in test mode:

> 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.
>
> * One of parameters (value: ) is not of the type Boolean

any help with how to fix this would be greatly appreciated, best regards, David

# Answer
This issue has a ticket in Gitlab so you can follow updates there: https://lab.civicrm.org/extensions/stripe/issues/53
> 0 votes

---
Tags: stripe, testing
---


# Question
Title: Case Type Filter bug in Case Summary Report? Multiple case types reported
Applying the case type filter in the case summary report *CRM\_Report\_Form\_Case\_Summary* is resulting in two case types being reported where only one is selected in the case type filter.

Looking at the developer tab of the report shows that is is looking for anything that contains a case\_type\_id of *9* as follows in the where clause:-

```
WHERE case_civireport.case_type_id  REGEXP '[[:cntrl:]]*9[[:cntrl:]]*'

```

We have case types in our Civi that have case\_type\_id's of both 9 and 19, therefore both are being selected when only case type 9 is in the filter.

This doesn't happen with the case detail report *CRM\_Report\_Form\_Case\_Detail* that uses a different select statement as follows:-

```
WHERE ( case_civireport.case_type_id IN (9) )

```

I'm not sure if this is just an inconsistency that needs to be fixed, or if it's there for a reason?

Help appreciated.

# Answer
> 0 votes
It looks like the `*` was added as part of this: https://github.com/civicrm/civicrm-core/pull/7135

I can't immediately see from that why it was added to the case report, but seems to be related to the "not one of" filter.

I'm thinking all the `*` should be `+`, except then it would miss cases that might have somehow been created without the char(1) separators (originally case type was potentially going to be multi-valued, and char(1) is historically how civi separates values in multi-valued fields).

If you change the `*` to `+` does it work for you?

You can check your database to see how the case types are actually stored with something like

`select case_type_id from civicrm_case where left(case_type_id,1) <> char(1);`

If anything is listed then that means the `+` will miss some cases because you have some case types stored without the `cntrl` character separators.

---
Tags: civicase, reports
---


# Question
Title: DB Error when using dupe_check in rest API
On version 5.6.0, using api v3. Not sure if something recently changed in our environment, but as of a couple of days ago, running the contact create api (via rest or the explorer) causes a "DB Error: no database selected" error when using the "dupe\_check" parameter.

For example, if I run this call, the contact is created and api returns successfully:

```
https://domain.org/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","first_name":"pol","last_name":"vor","email":"povor@gmail.com"}

```

But if I run this call, which just has "dupe\_check:1" added to it, it fails:

```
https://domain.org/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","first_name":"pol","last_name":"vor","email":"povor@gmail.com","dupe_check":1}

```

The error details are as follows (from the API Explorer, but it's the same running from a script):

```
    {
    "code": -14,
    "error_message": "DB Error: no database selected",
    "mode": 16,
    "debug_info": "DROP TEMPORARY TABLE IF EXISTS dedupe [nativecode=2006 ** MySQL server has gone away]",
    "type": "DB_Error",
    "user_info": "DROP TEMPORARY TABLE IF EXISTS dedupe [nativecode=2006 ** MySQL server has gone away]",
    "to_string": "[db_error: message=\"DB Error: no database selected\" code=-14 mode=callback callback=CRM_Utils_REST::fatal prefix=\"\" info=\"DROP TEMPORARY TABLE IF EXISTS dedupe [nativecode=2006 ** MySQL server has gone away]\"]",
    "is_error": 1
}

```

Any ideas on what may be causing this? I have a workaround in production for now, but this is a really useful feature to have in the API.

# Answer
Try upgrading to 5.13.2 since there is lots of change in dedupe rule code since 5.6.

Cheers

Pradeep
> 1 votes

---
Tags: api, duplicate-contacts
---


# Question
Title: Is there a way NOT to email if a report with no result
I need to email a report weekly to a department within organisation. Report usually sent via scheduled job in Pdf format. If there's no result an email still gets sent. Is there way NOT to email an empty PDF? thanks

# Answer
As suggested by Demerit you can use alterMailParams to abort the email if the report has 0 rows. It will work on simple use case but would be difficult or need to add more logic you passing any additional parameters when running cron job or through url to filter the result since the ReportTemplate.getrows api will return the results which is saved in the database but not on fly.

However you can using hook\_civicrm\_alterReportVar and set $this-\>\_sendmail to FALSE when $rows are empty.

HTH

Pradeep
> 3 votes

# Answer
If it were CSV you could use hook\_civicrm\_alterMailParams and just check the attachment and if it has 0 rows then set `$params['abortMailSend'] = TRUE;` to stop it sending.

For PDF I guess you could do the same thing, but do an api call to ReportTemplate.getrows (see api/v3/examples/ReportTemplate/Getrows.php, or the api explorer at /civicrm/api) and if it has 0 rows then abort as above.
> 2 votes

---
Tags: email, civireport, pdf, scheduled-job
---


# Question
Title: How to hardcode the unsubscribe /optout URL in a transactional email?
I would like to send a transactional email with unsubscribe/opt-out url included. It usually gets triggered by civirules when the person gets added to a group. when email is sent the unsubscribe url does not render. civirules have suggested I hardcode the link. I have tried `https://example.com/civicrm/mailing/unsubscribe?reset=1&cid={contact.contact_id}&{contact.checksum}` But with this link I get "Missing Parameters" errors. What is missing here? thanks

# Answer
> 1 votes
I think the unsubscribe link either needs mailing id or group id. The other option would be to create a profile with groups and opt-out field. And the include the profile as a unsubscribe link

```
https://example.com/civicrm/profile/edit?reset=1&gid=2&id={contact.contact_id}&{contact.checksum}

```

Where gid is a profile id.

Cheers

Pradeep

---
Tags: email, civirules
---


title: Help! Multiple choice value vs lable

text:
# Question
Title: Help! Multiple choice value vs lable
I created a set of custom questions that are of the type multiple choice. I entered the labels like "Blue", "Green", "Orange", and left the values at 1,2,3

When I run a report in civiCRM, the column for my multiple choice question shows the label.

But, when I export the data, I see the corresponding values (1,2,3) instead of the labels.

But I need the label in my report, not the values.

Thought maybe I could just edit the multiple choice answers and copy the label text to the value column, but realized that the values 1,2,3 were being stored in the database in the custom data set civicrm\_value\_ table, so when I run the report in civiCRM, the column for the multiple choice question was blank (and no value was exported).

Trying to resolve this, I thought maybe I could update the column in the civicrm\_value\_ to store the value (replacing 1 with "Blue", 2 with "Green", 3 with "Orange").

But same result -- blank column in the report.

So question is -- how can I fix my problem? I need to update the multiple choice and copy the label to the value field, and update the existing data submitted so that it has the new text value instead of the old numeric value...

# Answer
> 1 votes
This is definitely bug in report. You can either fix the code so that it is exported as label or use the same text for label and value for the options when creating.

Eg For Blue use Label - Blue and value - Blue.

---
Tags: custom-fields
---


# Question
Title: How do I add a contact to a group using the API?
I looked in the documentation but I can't seem to find a way to add a contact to a group using the API.

# Answer
> 8 votes
Open API Explorer - `Support menu > Developer > API Explorer` and use `GroupContact` API to add contacts to group. See an eg in the screenshot below -

API formed for PHP is -

```
$result = civicrm_api3('GroupContact', 'create', [
  'group_id' => <group_id>,
  'contact_id' => <contact id>,
]);

```

---
Tags: api, groups
---


# Question
Title: Can we report on contributions by payment processor?
Is there support for filtering contribution reports by payment processor?

We have credit card (Authorize.NET) and PayPal (new). How can I report on just PayPal transactions?

The only difference I see is in the transaction ID format. Both payment methods say 'credit card' on the contribution.

# Answer
There are no such reports in CiviCRM that will filter Contribution by Payment Processor. Payment Processor and Payment Method have different meaning. Payment method can be used by N processor. Here are some solutions

1. Going forward have your system to use unique payment method for a payment processor with same name and then you can filter the report using Payment method. So that in future it can be tracked easily using payment method. However, for historical data I won't recommend you to update the Payment method since you will need to update in two tables i.e civicrm\_contribution.payment\_instrument\_id and civicrm\_financial\_trxn.payment\_instrument\_id. Changes to civicrm\_financial\_trxn might impact on Bookkeeping entries for those which are exported in batch and closed for accounting period.
2. Build a custom report for contribution having Payment processor as filter and/or column.
3. Use AlterReportVar hook to add filter and/or column for existing contribution reports and build query accordingly.

The basic query to retrieve contribution done using payment processor is

```
SELECT cc.id FROM civicrm_contribution cc
  INNER JOIN civicrm_entity_financial_trxn ceft
    ON ceft.entity_id = cc.id
      AND ceft.entity_table = 'civicrm_contribution'
  INNER JOIN civicrm_financial_trxn cft
    ON cft.id = ceft.financial_trxn_id
WHERE cft.payment_processor_id = 1;

```
> 6 votes

# Answer
I had a client today with the same issue, so I added this functionality. Thanks to Pradeep's answer I was able to implement this in about 10 minutes.

Version 4.4+ of the Extended Report extension contains this improvement. All reports that can use financial transactions - e.g. "Bookkeeping Report with Extra Fields" - can now include, filter, sort and group by payment processor.
> 3 votes

# Answer
Change the Name so you can differentiate them. Got to Administer \> CiviContribute \> Payment Processors. You can click edit and change the name of your PayPal credit card processor to PP Credit Card (or whatever you want). This will work for going forward. You will have to update the contribution table to change the historical contributions.
> 1 votes

---
Tags: civicontribute, civireport, contributions
---


title: How is Make it Happen implemented?

text:
# Question
Title: How is Make it Happen implemented?
It looks like it is a good implementation crowdfunding that I could use to fund projects for my org at low cost (just credit card charges). Is there any info about its implementation on the civicrm website.

# Answer
I read your question differently to Andy.

The MIH itself is simply a civicrm contribution page.

But there are also MIH 'content types' and the page at https://civicrm.org/make-it-happen is then a View (Drupal) based on the above Content Type and I suspect there is a fair bit of custom stuff happening in that View which means an 'export' of it won't give you it in a box.
> 2 votes

# Answer
While old, this covers a lot of it: https://wiki.civicrm.org/confluence/display/CRM/Make+it+Happen#MakeitHappen-HowdoIsubmitanMIHcandidate?.
> 0 votes

---
Tags: crowd-funding
---


# Question
Title: Is it possible in CiviCRM to change extension of cached php files from .php to something else (e.g. .php_ or .txt)?
Is it possible in CiviCRM to change extension of cached php files from **.php** to something else (e.g. .php\_ or .txt)? Our host (WPEngine) does not allow guest users to write to **php** files on production environment.

We run cron by calling the cron URL from another server using curl, but scheduled reminder emails fail because CiviCRM can't write .php files as guest user (more info: Scheduled Reminder Email is Empty).

# Answer
I ran into this as well. The issue is caused by the CachedCiviContainer cache -- which will write a .php file.

A workaround for this is to set the following constant in the civicrm.settings.php file:

```
define('CIVICRM_CONTAINER_CACHE', 'never');

```

Not ideal, as it disables the container cache altogether. But it avoids these issues.
> 1 votes

# Answer
Since CiviCRM is software, yes, in theory it could be changed to work differently. The question is always *who* is going to do that work?

You could start the ball rolling by identifying where in the code .php files are being generated, and suggest an alternative way of doing it.
> 0 votes

---
Tags: email, scheduled-reminders, smarty, cache
---


# Question
Title: How to Create a Smart Group before Anyone Belongs to it?
The usual way to create a Smart Group is :

1. Select (via Advanced Search) the contacts who meet the Search Criteria
2. Create the pertaining Smart Group

But is it possible to create a Smart Group before anyone meets the search criteria (so that the Group is automatically filled as soon as one contact meets the criteria) ?

# Answer
To create smart group from UI you need to have at least one result but from code its possible to do so.

From UI i would create a test contact so that it matches the smart group criteria. Then Find contacts \>\> create smart group, Delete the test contact permanently.

Cheers

Pradeep
> 2 votes

---
Tags: smartgroups
---


# Question
Title: Unable to use Price Set Details for Event Participants custom search if price set field option is disabled after a registrant has already selected it
Issue: After disabling an event price set field option that one or more participants had already selected in their registration, you are now unable to run the custom search "Price Set Details for Event Participants".

This has been an issue since 4.6 (at least), and reproduced today on the demo site (civicrm.demo.civihosting.com running 5.10.0), as well as the sandbox site (dmaster.demo.civicrm.org running 5.15.alpha1).

When might this happen? You've begun registration for an event, but due to lack of registrations or unforeseen circumstances, you need to cancel one the available options. You issue refunds to anyone who has already paid (not required to reproduce error), and disable the option so that no one else selects it.

How to reproduce:

* Create an event price set, with a radio field with a couple of options (example: workshop 1, workshop 2)
* Create an event and choose your price set
* Register an event participant and select one of the price field options
* Go to *Search \> Custom Searches \> Price Set Details for Event Participants* and get results for your event, all should be good
* Edit the price field and disable the price field option your registrant selected
* Repeat the Price Set search, you will now get an error

> DB Error: no such field

```
Further detail in ConfigAndLog file:

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

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] =>
UPDATE civicrm_temp_custom_06a7d4ad3c362837ef807a1493c88112
SET price_field_271 = 1.00,price_field_284 = 0.00,price_field_289 = 0.00,price_field_306 = 1.00,price_field_307 = 1.00
WHERE participant_id = 1562;
 [nativecode=1054 ** Unknown column 'price_field_289' in 'field list']
    [type] => DB_Error
    [user_info] =>
UPDATE civicrm_temp_custom_06a7d4ad3c362837ef807a1493c88112
SET price_field_271 = 1.00,price_field_284 = 0.00,price_field_289 = 0.00,price_field_306 = 1.00,price_field_307 = 1.00
WHERE participant_id = 1562;
 [nativecode=1054 ** Unknown column 'price_field_289' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="
UPDATE civicrm_temp_custom_06a7d4ad3c362837ef807a1493c88112
SET price_field_271 = 1.00,price_field_284 = 0.00,price_field_289 = 0.00,price_field_306 = 1.00,price_field_307 = 1.00
WHERE participant_id = 1562;
 [nativecode=1054 ** Unknown column 'price_field_289' in 'field list']"]
)

```

You'll find with investigation that the participant in question is the one registered, and the "Unknown column 'price\_field\_\[id\]'" will be the price option that you disabled.

The likely file to be updated is CRM/Contact/Form/Search/Custom/PriceSet.php

Workaround: temporarily reenable the option, run the report, disable the option again.

# Answer
This is a core bug and have submitted a fix for it. Can you please try applying patch from here. If it works for you than please add a comment on PR.

Cheers

Pradeep
> 0 votes

---
Tags: civievent, price-sets, custom-search
---


# Question
Title: CiviCRM_API3_Exception: "DB Error: no such table"
Hello I am getting the below error when going to certain pages in my civicrm install notably after transfering from one server to a new server....the source server does not have this error.....

CiviCRM\_API3\_Exception: "DB Error: no such table"

```
#0 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/CRM/Mailing/Info.php(124): civicrm_api3("Mailing", "gettokens", (Array:3))
#1 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/Civi/Angular/Manager.php(100): CRM_Mailing_Info->getAngularModules()
#2 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/Civi/Angular/Manager.php(178): Civi\Angular\Manager->getModules()
#3 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/Civi/Angular/AngularLoader.php(216): Civi\Angular\Manager->resolveDefaultModules("civicrm/a")
#4 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/Civi/Angular/AngularLoader.php(108): Civi\Angular\AngularLoader->findActiveModules()
#5 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/Civi/Angular/Page/Main.php(83): Civi\Angular\AngularLoader->load()
#6 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/Civi/Angular/Page/Main.php(69): Civi\Angular\Page\Main->registerResources()
#7 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(311): Civi\Angular\Page\Main->run((Array:2), NULL)
#8 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:12))
#9 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:2))
#10 /data/www/vhosts/....org.jm/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:2))
#11 /data/www/vhosts/jta.org.jm/httpdocs/includes/menu.inc(527): civicrm_invoke("a")
#12 /data/www/vhosts/jta.org.jm/httpdocs/index.php(21): menu_execute_active_handler()
#13 {main}

```

# Answer
@trevorforrest I would check that your database has all the same tables as the old server, the error suggests you may have missed a table or something when transferring from the old server to the new server
> 1 votes

---
Tags: civimail
---


# Question
Title: Can members sign-up for two memberships from same organization?
Is it possible to use price sets to require members to sign up to 2 membership (ideally both autorenewed)? One is an annual insurance fee, the other a monthly membership fee. I'm getting error messages at the moment when testing that states that signing up to 2 memberships from one organization is not doable.

is making a 2nd, separate organisation for the insurance the way to go?

Thank you very much for your help, David

# Answer
Yes, introducing a second "dummy" organisation is the way to go. This is described in more detail in the user documentation:

> Some organisations may want people to have two or more memberships of the same organisation that run concurrently. For example, an organisation focused on child health might want to offer a membership for parents that includes a parenting magazine and a membership for health professionals that includes a peer-reviewed journal and discounts at training events. Parents who are health professionals may want both memberships. A challenge to supporting this use case is that CiviCRM's Membership Up-Sell feature expects a contact to have only one active membership with a single organization at any given time. A 'workaround' for this is to create 'dummy' organisations for each of the possible concurrent memberships. For the situation just described, we would need to create an extra organisation for health professionals. Note that you don't have to expose the dummy organisation to your members on the website; it is for administrative purposes only.
> 1 votes

---
Tags: civimember
---


# Question
Title: Profile registeration interaction between wordpress and civicrm
I have been trying to get my head around using Civicrm (5.13.1) with wordpress (5.2) to create membership options for our organisation. I'm not sure I understand the process of creating a user account though that is synchronised between wordpress and civicrm. I managed to set up the membership types, payment processor and sucesfully tested that. I tried setting up some plug ins like CiviCRM WordPress Member Sync, Members and Profile Builder but not sure how to set things up. Ideally we would like to set up a member's only forum eventually, but for now we would like users to be able to log in and edit information like adresses, cancel autorenewals and etc...

Is there a tutorial or resource somewhere that shows one how to set up user log in details for wordpress that can be 'registered' as part of a member signing up to a civicrm membership?

Sorry for the vague question, I'm just a bit lost for directions here. thank you so much for the help, best regards, David

# Answer
A good place to start is in the documentation at https://docs.civicrm.org/user/en/latest/membership/online-membership-sign-up/ in the Civicrm user guide. It would be best to read the whole membership documentation before and after the link given. For Wordpress you will need a login system like the one you mention "Profile Builder" which I use myself and can recommend. You will need to switch on wordpress/settings/General/Membership/Anyone can register but also first get a good security system plug-in otherwise you'll more than likely get a mass of brute-force attempts to infiltrate your system. You may want to consider a plugin to prevent non-members from seeing certain membership pages. Alternatively, after you've set up a membership profile, you could use civicrm to forcibly get non-registered users to open a WordPress user account by using the registration option in ...civicrm/administer/customize data/profiles/settings/advanced settings. There's a lot to be considered. Hope this helps you to get going.
> 0 votes

---
Tags: profile, registration
---


title: REST API call & endpoint

text:
# Question
Title: REST API call & endpoint
Our organisation has an ios/android app and would like to receive donation thru the app. Developer requires details of REST webserver endpoint of our civicrm to receive & post contact/contribution data. We are using drupal and civi 5.13. How do I get started? any help would be much appreciated. Thanks

# Answer
CiviCRM provides api for each entity. Each entity has its own parameter. You can use API explorer to find how params are build and need to send through rest api. The API explorer screen provides detailed information about using various method of using api to perform CRUD operation on CiviCRM.

While using rest api you will need to pass Site key (stored in civicrm.settings.php) and User contact's api key (You can either set this in civicrm\_contact table or use API Key extension to set and see the api key) as part of authentication.

Cheers

Pradeep
> 2 votes

---
Tags: api, rest
---


# Question
Title: How to record work trades as payment on balance owed
We have a handful of people in our organization who pay for events partially with money and partially with work trades. Let's say they owe us $1000 for an event. In month 1, they make a partial payment of $100. We record this via the back office. In month 2, they work for 10 hours and reduce the balance they owe us by $200.

How should we record this $200?

What I would like to do is to create a Payment Method called "Work Trade" but I'm not sure what financial account it should relate to.

* What it should really do is reduce Accounts Receivable. But I'm not sure how to record a negative amount to Accounts Receivable.
* It should not go against Payment Processor Account, because no actual cash is received.
* Should I set up another account type, called like "Work Trade Account" or something?

Another option is to reduce the amount they owe us directly by reducing the $1000 down to $800 in their event registration. But I don't really want to do this because many of our events are fixed price, and so this would introduce the need to modify event prices so I can change their registration. Also, it's not correct -- they are giving us a value of $1000 for that event.

Suggestions or best practices?

Thanks

# Answer
I would create a new Financial Account and Payment Instrument called 'Work Trade'. And use 'Work Trade' payment instrument to record $200. And while exporting accounts you can handle 'Work Trade' accounts separately.

Cheers

Pradeep
> 1 votes

---
Tags: payment, partial-payments, payment-method
---


# Question
Title: API call to modify contact custom data fields fails without error
I'm trying to troubleshoot an issue I'm having with api v3. I can successfully use the api to modify standard CiviCRM contact fields, but if I use the api to modify a contact's custom field the call never completes.

In the api explorer I can create a call to modify a custom field on a contact and click "execute", but nothing is returned – no response or error, the icon in the results box just continues to spin. I'm not seeing an error in the log file either.

So this api call does not execute:

```
$result = civicrm_api3('Contact', 'create', [
  'debug' => 1,
  'id' => 4,
  'custom_6' => 1,
]);

```

And this one executes successfully:

```
$result = civicrm_api3('Contact', 'create', [
  'debug' => 1,
  'id' => 4,
  'do_not_email' => 1,
]);

```

I feel like I am missing something obvious like a wrong permission, but would it return an error on that? Any ideas of where to look to troubleshoot?

# Answer
To try and reproduce this, I visited the CiviCRM.org demo site at https://dmaster.demo.civicrm.org/, logged in, and explored the API Explorer there. You might prefer to use a demo site that matches your platform / version (& note that some folk have found the CiviCRM.org hosted demo sites can be hard to spot beneath the partner-hosted sites on that page).

I found a contact via the regular CiviCRM UI and edited their "Marital Status" and "Most Important Issue" constituent info on the contact edit screen, then used the API explorer to *return* the custom data which had been set.

I then used the same process to try and update the custom data, setting "Marital Status" to "M" (the API explorer presents available options in a list).

This showed a successful result and I confirmed that the update worked by viewing the contact record and seeing that "Other" had now changed to "Married". This indicates that the CiviCRM.org demo site works for this use case (suggesting that the issue you're experiencing might be configuration or permission-dependent, or related to some other site-specific implementation detail).

By observing the network tab while testing these API calls, I could observe the response from CiviCRM. In the event where an API call via JS doesn't return a result, I'd look here to see if there was an unexpected response (either invalid JSON, which could possibly leave CiviCRM's JS API hung, or an HTTP response code other than 200, which might have similar results).

I see your posted code is PHP not JS, so it may be you aren't using the JS API and can discount the HTTP layer as causing your issues. In that case your next step is probably to inspect the result of the attempted API call, and to investigate error logging (also valid when you are using CiviCRM's HTTP/JS interface).

In that case, inspecting details recorded to the CiviCRM debug log, and your hosting environment's PHP and webserver logs can reveal if there's any indication of an issue there. This question has a detailed writeup on where to find the debug log and other logs, as does the CiviCRM docs.

There's a related question on setting custom data via API which suggests that custom data is not consistently supported by various entity types when modified using the API. That's an old question and might not be up to date.

Hope this is some help!
> 1 votes

---
Tags: contacts, custom-fields, api
---


# Question
Title: Changing Membership defaults to extending membership
Our club has different membership types, but all are on the same fixed membership period. If a member upgrades from one membership type to another, we use the "Renew" function to change the membership type and record the payment for the difference. By default, however changing the membership type also extends the membership by 1 term, so we have to manually adjust that.

Is there another way to change membership types, instead of using the renew function to avoid this default behavior?

# Answer
> 1 votes
After spending some time working on this, I finally found a solution that works for our circumstance. The following steps solved the problem:

1. We modified the "guest" membership to be in a different organization than the "club membership".
2. We installed CiviDiscount and use CiviDiscount to discount the guest fee from the full membership fee based on their active "guest" membership.

For the first year, the user remains a member of the "guest" organization and a member of the club, but that doesn't have any negative effects on any of our other processes.

# Answer
> 2 votes
Perhaps you have overlooked the highlighted statement that appears on the renewal screens. (I did for almost 2 years.)

Click on **change** and you can set the renewal period to 0 terms which should do what you want. You will need to manually enter the extra amount, but I imagine you are doing that anyway.

# Answer
> 0 votes
To do so could be problematic from a transactional perspective, all depending on business rules separate and distinct from the rules inside the system.

You could have a Junior Member at $10 annually, but they choose to upgrade to a regular membership at $20 annually mid-year.

Since there is also the ability to override the system, you'd be better off stipulating membership upgrades can only occur at the renewal stage, as it would allow both promotion up and demotion down.

---
Tags: civimember
---


title: How to export/import Civi CRM?

text:
# Question
Title: How to export/import Civi CRM?
How to export/import Civi CRM all database (profile, custom field, contacts etc) with same setting in WordPress?

# Answer
Welcome to StackExchange Rajesh! The simplest option is to dump and load the database (eg using `mysqldump`). If you need something different, edit your question to provide more information.
> 3 votes

# Answer
If you are switching your cms from drupal/joomla to wordpress then there are instructions here. https://docs.civicrm.org/sysadmin/en/latest/misc/switch-cms/

If you are wanting to "clone" an existing set up using mysqldump there is a perl script that you will want to run to remove the "definer": statements.

```
perl -pi -e 's#\/\*\!5001[7|3].*?`[^\*]*\*\/##g' /path/to/mysqldump.sql

```

More info on this thread.

Why do I get "Access denied; you need (at least one of) the SUPER privilege(s) for this operation" when importing a SQL dump to CiviCRM?
> 1 votes

---
Tags: wordpress
---


title: Spanish custom last name solution

text:
# Question
Title: Spanish custom last name solution
I'm new here, but I'm sure not the only one who speaks Spanish. I would like to know what solutions you have used for the problem of the 2 surnames that are used in Spanish.

Which is the best solution for integrating both surnames into Civicrm?

PD. There should be an standard integrated solution to Civicrm, since Spanish is the most spoken language in the world after Chinese. ;)

# Answer
"Lastname" is the field intended to insert both surnames for the contacts they have. The translation of the field in Spanish also indicates it: "Apellidos".

For more than 5 years we have worked with CiviCRM and to date we still have not encountered any inconvenience in saving both surnames in a single field.
> 6 votes

# Answer
One 'cheap' approach that springs to mind would be to re-purpose the **Middle name** field. If you can live without the middle name field, this might be a good option for you.

You could use Word Replacement to replace all instances of *Middle Name* with *Maternal surname* and all instances of *Last name* with *Paternal surname*.

I haven't done this myself, and it might be that there are good arguments against doing it this way. I am interested in hearing any potential downsides from others who have tried / decided against this approach.

I think the answers/comments that Francesc and Luciano have given are very valid and based on pragmatism. They have been fine without it for 5 years. If there specific things that you can't do when they are in the same field, it would be good to know more about them so we can try and suggest way to address them. If the only motivation is to get the data structure right because it "is just plain bad coding and should be fixed", then there are other parts of the code that I would suggest fixing before this :)
> 3 votes

# Answer
for our clients in Colombia we made an extra field for the 2nd. Apellido. Nice feature for them. And this was a must for legal purposes. So it is possible to create extra name fields. leo@enabl.ist
> 1 votes

# Answer
We use them separtly, and as such they should be available as are the surname and all other data fields. Civicrm is not fully internationalized until it respects other customs and cultures that are not from the english speaking world. This is just plain bad coding and should be fixed.
> -5 votes

---
Tags: custom-fields
---


title: Profile field for event not showing

text:
# Question
Title: Profile field for event not showing
I have set up a profile for an event we are running but one of the fields is not appearing and I am not sure why. When I view the preview it is there but not showing on the booking page for the event. It is the Participant - Access Requirements field. Any advice appreciated!

# Answer
> 0 votes
Welcome to SE! Presumably that is a custom field? Check in the settings of its Custom Group that the box "Is this Custom Data Set public?" is ticked. (Go to `Administer > Customise Data and Screens > Custom Fields`, on the relevant Custom Group go to `More > Settings`)

---
Tags: profile
---


# Question
Title: is it possible to show a logged-in frontend user all the events they are registered for?
I'm wondering if it's possible to create something like a frontend information portal where a user can review their existing registration data. Such as, user logs in, user can see a list of all the events they are registered for, then can click on an event to see what selections/options they chose when they registered.

Is this possible out of the box? I'm on a Joomla 3.9 system using CiviCRM 5.13, and I don't see a menu item or similar that will accomplish this.

# Answer
You are probably looking for the Contact Dashboard feature. I have only experience with Wordpress, where the logged in user can see his memberships, events, payments, invoices etc.

There seems to be a similar feature available for Joomla as well according to this question on StackExchange. Unfortunately the question has been unanswered.
> 3 votes

# Answer
I am totally unfamiliar with Joomla so I am not aware if there are similar possibilities to the Drupal Webform CiviCRM module. But with CiviCRM profiles I would imagine you would be able to build this?

Have you checked the User Guide on profiles here" https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/? That might be of help.
> 0 votes

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


# Question
Title: Event registration form loses 'id' url param and then throws an exception
I am running CiviCRM 5.10.0 on Drupal, and I see the following scenario happening, very consistently:

1. go to one of my event registration forms: https://www.terranova.tamera.org/de/civicrm/event/register?reset=1&id=1994
2. submit the form although many required fields are still missing.
3. Form refreshes with all validation errors. Notice that the url has changed and lost its 'id' param, for the current event.
4. complete the registration form correctly and try to submit again.
5. Receive an error saying: Sorry, due to an error, we are unable to fulfill... **Could not find valid value for id**

# Answer
I solved it in a very unusual way - I added this rewrite on .htaccess file:

```
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.terranova.tamera\.org [NC]
RewriteRule ^(.*)$ https://terranova.tamera.org/$1 [L,R=301]

```

To unify all accesses to use the non-www url. For a reason I cannot yet explain, this completely resolved the issue.
> 1 votes

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


# Question
Title: How do I sync contacts who are not members in Wordpress?
My client organization only has organizational members, but provides services and events to individuals connected to the organization. The WP Member sync, seems limited to only syncing members.

I need to create users who are associates of member organizations. Those are mostly 1 to many type relationships. I have some that are many to many type relationships. This is my last step and I hadn't realized there wasn't an obvious path here. What is the proper way to proceed to import these users?

# Answer
> 1 votes
There are two solutions:

1) You can set the Organization Membership to "trickle down" via a relationships. This is hard to change after the fact. You will need to update the Membership type via the database and then manually update all the Memberships.

2) You can create an advanced search pulling all the Organization Memberships and set the Display Results As: Related Contacts. Make that into a Smart Group. Use that Smart Group or most likely multiple Smart Groups into a Group Role Sync via your plugin.

# Answer
> 1 votes
This may not be the best solution, but I figured that I should report back, in case anyone else can benefit from my experience. In short, I created new user roles in WordPress that correspond to my key contact types, because I was going to need this for ACL anyway. I exported my smart groups with enough information to import the records as new users into WordPress and then I synced the contacts with the WordPress users. So far (it's only been a day) nothing has blown up in my face and the testing is going well. I think we go live later today.

---
Tags: wordpress, contacts, import, acl
---


# Question
Title: Participant Search - Failed to interpret input for search
In the latest version of CiviCRM on the latest stable version of Drupal 7, if I attempt the following:

* Events \> Find Participants
* Enter an event name AND a participant status

The search results in an error - "Failed to interpret input for search"

This doesn't happen if you enter the event name only, or the event name and participant role. It also doesn't happen where the combination of event name and participant status results in a 'no matches found' result - it only happens when the search would generate a result.

I've done a 25 second screencast of the issue in action: https://drive.google.com/file/d/1RmpVyqxX6g99UsKLc5H9pcZtXLpCtqmG/view

Any advice gratefully received!

CiviCRM version 5.13.2, Drupal 7.67

Thank you

# Answer
This appears to be a bug since i can replicate at https://dmaster.demo.civicrm.org/civicrm/contact/search/advanced?reset=1

gives

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.

**Failed to interpret input for search**

Have mentioned in https://chat.civicrm.org/civicrm/channels/product-maintenance
> 1 votes

# Answer
Logged here https://lab.civicrm.org/dev/core/issues/956 \- we will include a fix for this in a 5.13 point release in the next few days
> 1 votes

# Answer
I'd just like to add that if you're specifically trying to get all participant with a specific status you need to be careful - with the workaround of searching only on the event, if you try to sort by status, it will then return all participants for all events instead of just the selected event.

I see there's a fix for the original issue in 13.3, I'm on 13.2, so we'll need to check if this secondary issue also exists after the update.

Thanks a bunch for the quick fix! :)
> 0 votes

---
Tags: civievent, search
---


# Question
Title: Drupal 8 and civicrm version compatability
I am trying to get CiviCRM working against Drupal 8.

For testing and setting up I am currently using:

* Oracle VBox 6
* UBuntu 18.04
* php 7.2.17
* mysql 5.7.26
* composer 1.8.5

Let me know if there is anything else relevant or if the above combination does not work.

I am trying to follow David Snopek's latest how to https://www.mydropwizard.com/blog/better-way-install-civicrm-drupal-8

In it David gives the following example:

> composer create-project roundearth/drupal-civicrm-project:8.x-dev some-dir –no-interaction

As I am aiming for something as stable as possible while still on the bleeding edge. (I know that is a contradiction)

I used the following in the /var/www/html

> composer create-project drupal/drupal /var/www/html/drupal

I then went in via my browser and set up Drupal 8 with a standard install. I did not add any modules etc. So now I have Drupal 8.7.0

I then used the following composercommand while in the /var/www/html/drupal directory. see screen output below:

```
peter@UbuntuVM:/var/www/html$ cd drupal
peter@UbuntuVM:/var/www/html/drupal$ composer require roundearth/civicrm-composer-plugin civicrm/civicrm-drupal-8
Using version dev-master for roundearth/civicrm-composer-plugin
Using version dev-master for civicrm/civicrm-drupal-8
./composer.json has been updated
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
    - civicrm/civicrm-core 5.9.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.9.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.9.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.8.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.8.2 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.8.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.8.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.7.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.7.3 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.7.2 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.7.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.7.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.6.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.6.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.6.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.5.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.5.3 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.5.2 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.5.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.5.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.4.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.4.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.4.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.12.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.12.4 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.12.3 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.12.2 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.12.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.12.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.11.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.11.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.10.x-dev requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.10.4 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.10.3 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.10.2 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.10.1 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - civicrm/civicrm-core 5.10.0 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
    - Installation request for civicrm/civicrm-drupal-8 dev-master -> satisfiable by civicrm/civicrm-drupal-8[dev-master].
    - Conclusion: remove psr/log 1.0.2
    - Conclusion: don't install psr/log 1.0.2
    - civicrm/civicrm-drupal-8 dev-master requires civicrm/civicrm-core >=5.4.0 -> satisfiable by civicrm/civicrm-core[5.10.0, 5.10.1, 5.10.2, 5.10.3, 5.10.4, 5.10.x-dev, 5.11.0, 5.11.x-dev, 5.12.0, 5.12.1, 5.12.2, 5.12.3, 5.12.4, 5.12.x-dev, 5.13.0, 5.13.1, 5.13.2, 5.13.3, 5.13.4, 5.13.x-dev, 5.14.x-dev, 5.4.0, 5.4.1, 5.4.x-dev, 5.5.0, 5.5.1, 5.5.2, 5.5.3, 5.5.x-dev, 5.6.0, 5.6.1, 5.6.x-dev, 5.7.0, 5.7.1, 5.7.2, 5.7.3, 5.7.x-dev, 5.8.0, 5.8.1, 5.8.2, 5.8.x-dev, 5.9.0, 5.9.1, 5.9.x-dev, dev-master].
    - civicrm/civicrm-core 5.13.0 requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - civicrm/civicrm-core 5.13.1 requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - civicrm/civicrm-core 5.13.2 requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - civicrm/civicrm-core 5.13.3 requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - civicrm/civicrm-core 5.13.4 requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - civicrm/civicrm-core 5.13.x-dev requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - civicrm/civicrm-core 5.14.x-dev requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - civicrm/civicrm-core dev-master requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.x-dev].
    - Can only install one of: psr/log[1.1.0, 1.0.2].
    - Can only install one of: psr/log[1.1.x-dev, 1.0.2].
    - Installation request for psr/log (locked at 1.0.2) -> satisfiable by psr/log[1.0.2].

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

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.
peter@UbuntuVM:/var/www/html/drupal$

```

I know its a lot but any ideas on how to make this work with a standard drupal 8?

Thanks Peter

# Answer
You can specify the version of civi you want if it can't figure it out, so e.g.

`composer require roundearth/civicrm-composer-plugin civicrm/civicrm-drupal-8 civicrm/civicrm-core:5.13.4`

You might also have to add and specify the psr/log version on the same line to match, based on the error message above.
> 2 votes

---
Tags: drupal-8, drupal-multi-site
---


title: OVH: Cron not detected by CiviCRM

text:
# Question
Title: OVH: Cron not detected by CiviCRM
I'm working on a drupal website with a CiviCRM platform which is hosted by OVH. My cron seems to be working,

but CiviCRM is not detecting it. Is that normal ?

Thanks in advance for your advices.

# Answer
I recommend following the documentation to configure your cron entry.

This page documents method for using built-in CLI commands (`cli.php`) and externally packaged CLI tools (`drush` or `cv`).

The method shown in your screenshot does not appear to match those docs:

* The task is initiated from within the `bin` directory rather than CiviCRM website root (this might or might not be a factor)
* The task uses `cron.php` using CLI SAPI, not the CLI tools documented. (`cron.php` uses `$_REQUEST` for its inputs)
* The task does not specify a CiviCRM scheduled job (eg `Job.execute`)

Following the docs is probably the best next step. If that doesn't work, update your question to include the amended command and output as a text for further guidance.

`cron.php` is documented as intended to be called over HTTP in that page, which you can also do using other CLI tools like `curl`.
> 1 votes

---
Tags: cron, civicrm-home, hosting
---


# Question
Title: How can I export Contact Contribution and event data?
Our database was handled very roughly over last couple of years and tested features recklessly. Mixed events payments with contribution payments etc. Numerous price sets. Bot attack was also another problem until recaptcha implemented. We dont even know how many contact & contribution was populated by bots.

What I am trying is to export all contact data only with potential donors, contribution, and events data. Not bothered about activities. And import it onto a clean instance of Civicrm. Another concern we have is recurring paypal donations. After moving how can we keep those linked to contacts?

Any suggestion would be much appreciated. Thanks

# Answer
> 2 votes
Typically, bots contacts/contributions will follow some standard method of populating information - e.g. a recent bot attack on one of our clients created contacts with "%phone\_short%" listed as their main phone number, so using search builder in the GUI allowed me to identify all associated spam contacts and delete them permanently.

If these spam contacts are associated with contributions, you'll need to delete the contributions before you are able to permanently delete the contacts - you can isolate those contributions by creating a group from the search builder results, then use Contributions \> Find Contributions to search for and delete all contributions made by contacts in your spam group.

Depending on your payment processor, you may have contributions with a status of "Failed" - if so, you can search for all failed contributions (I would do this search using Search \> Advanced Search with Display Results as "Contributions"). Review the list to see if you get any legitimately failed contributions associated with legitimate contacts - if you do, narrow the results further by entering a received date and time range since spam contributions are typically created in rapid succession. Once you've isolated the spam contributions, run the same same search, only this time with Display Results as "Contacts", then create a group of these contacts - this will allow you to isolate the spam contacts for permanent deletion after you have deleted the contributions.

With the above tips, you may be able to stick with the existing database and avoid the need to transfer recurring contributions, but if not, I would suggest creating new recurring contributions since migrating existing ones could prove to be very time consuming and complicated given the many different tables in which contribution information is stored, e.g.:

1. Records in civicrm\_contribution\_recur are associated with a specific civicrm\_contact.id
2. Records in civicrm\_contribution are associated with a specific civicrm\_contribution\_recur.id
3. Records in civicrm\_contribution are associated with several other tables, many of which are interconnected with IDs from yet other tables - e.g.:

3.1. civicrm\_financial\_type \> civicrm\_financial\_acount \> civicrm\_entity\_financial\_acount

3.2. civicrm\_contribution.id \> civicrm\_line\_item.id

3.3. civicrm\_line\_item.id \> civicrm\_financial\_item.id

3.4. civicrm\_entity\_financial\_trxn \> civicrm\_contribution \> civicrm\_financial\_item.id \> civicrm\_financial\_trxn

3.5. civicrm\_contribution\_id \> civicrm\_contribution\_page.id

3.6. civicrm\_contribution\_id \> civicrm\_event.id \> civicrm\_participant.id \> civicrm\_participant\_payment.id

Keep in mind, the above may not be an exhaustive list, and you would most definitely want to do this directly in the database so that you can preserve all of the existing IDs.

Hope this helps, Tamar

---
Tags: export, data-import
---


title: Issue while configuring Repeating Event

text:
# Question
Title: Issue while configuring Repeating Event
I am trying to configure an Event to repeat on every second Sunday but upon saving the event it shows incorrect dates in the Confirmation screen where it shows the same start date for each month and upon confirming it gives an error stating "Invalid day name". I tried by giving other day and it is working correctly but not for "Sunday". This was on CiviCRM version 5.10.3. I tried by upgrading to 5.13.2 but the issue was same in that also. I am not sure what I am missing. Kindly help me to fix the issue.

# Answer
> 3 votes
I'm thinking the invalid day name error is the result of the start date of June 10, 2019 which is a Monday, not a Sunday (note that in your screenshot, there is no date listed for the "Original" event). If you change the start date to June 9 (which ***is*** the second Sunday in June), then the repeat function works as expected (on 5.10.alpha1):

Hope this helps, Tamar

---
Tags: civievent, repeating-events
---


title: Profile only works for logged in users

text:
# Question
Title: Profile only works for logged in users
I Have created a membership directory and it works fine when I am logged in but as soon as i log out I get this message -

The requested Profile (gid=1) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance.

i am using Wordpress

Can someone advise me of a fix :(

Thanks ... I am new to CiviCRM

# Answer
https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/ has all the details you should need:

> Visibility: If the Profile is being used for a searchable directory, set the Visibility of any fields you want to include on the search form to Public Pages or Public Pages and Listings. For fields that will be used on sign-up forms, set Visibility to User and User Admin only. This ensures that other visitors to the form can't view any data from the database. To use fields for Search Views, you must set Visibility to Public Pages or Public Pages and Listings. Choosing either of the Public Page options pops up two additional settings:
> 1 votes

---
Tags: wordpress, permissions
---


title: Multiple memberships Webform and Paypal

text:
# Question
Title: Multiple memberships Webform and Paypal
I've set up a webform to create two memberships at a reduced rate vs two individual memberships. I select two contacts, each has a membership. The payment is associated with the first member. There are options for 1, 2, or 3 years. As an example, individual membership for 1 year is $15, and I want to register two people at the same postal address as members for $20. Setting up the form everything looks fine, with some exceptions. I can even use the feature to copy the postal address of the first member to the second member, cool. One problem is that both members are given the option of membership type (1,2, or 3 yr). In fact, what I want is the chosen term applied to both. Only member one pays, and both get memberships.

Anyway, I fill out the form for both members and submit to PayPal standard. I don't complete the payment. I see a pending household membership for member 2 which presumably would show as completed if I actually paid. But there is no payment for member 2, pending or otherwise. Member 1 has no payment or membership record at all.

So, I thought I could probably work this all out if I was able to hook into the PayPal Instant payment notification (IPN). I thought there would be some civiCRM hooks for this, but I don't see any. So, I really need to know when the payment is completed and assign membership to both.

# Answer
> 1 votes
> One problem is that both members are given the option of membership type (1,2, or 3 yr). In fact, what I want is the chosen term applied to both. Only member one pays, and both get memberships

I would try to tackle this via webform Conditionals, eg if the Memb Type for cid1 is 'not empty', hide Memb Type for cid2 or something similar

# Answer
> 0 votes
You might consider using conferred memberships, where a membership extends to other contacts via relationships. Webform can create the relationship between the contacts.

If you still need to go the IPN route, you'll want the postIPNprocess hook.

---
Tags: webform-civicrm
---


title: Mailing Template Tables

text:
# Question
Title: Mailing Template Tables
How can I keep the Mailing template (tables) from expanding once sent. Example: Everything looks good and formatting is fine when I send from my end but some providers (I think mostly Outlook) is delivered looking extremely wide where you need to scroll over to read. It doesn't look professional at all!

# Answer
This comes down to the difference between how email clients and web browsers render HTML. This article from Litmus gives a good overview.

There are two solutions:

* Develop emails with email-centric design. Since Outlook is the worst offender, design for Outlook.
* Install the Mosaico extension. Its drag-and-drop email template builder takes the guesswork out since the blocks are already Outlook-friendly.
> 1 votes

---
Tags: mailing
---


title: Civicase report shows empty list

text:
# Question
Title: Civicase report shows empty list
I have set up report to list the number of active cases, however the report doesn't show anything when I refresh results, even though there is a number of opened cases which show in the Case dashboard.

Any idea why this might be not working?

I am running version 5.13.1 on Wordpress

---

I added the code for the report (Developer Tab)

```
Class used: CRM_Report_Form_Case_Summary

SQL Modes: NO_AUTO_CREATE_USER NO_ENGINE_SUBSTITUTION

SELECT SQL_CALC_FOUND_ROWS c2_civireport.sort_name as civicrm_c2_client_name, c2_civireport.id as civicrm_c2_id, case_civireport.id as civicrm_case_id, case_civireport.subject as civicrm_case_subject, case_civireport.status_id as civicrm_case_status_id, case_civireport.start_date as civicrm_case_start_date, case_civireport.end_date as civicrm_case_end_date, IF(case_civireport.end_date Is Null, '', DATEDIFF(case_civireport.end_date, case_civireport.start_date)) as civicrm_case_duration

FROM civicrm_contact contact_civireport
inner join civicrm_relationship relationship_civireport on contact_civireport.id = relationship_civireport.contact_id_b
inner join civicrm_case case_civireport on case_civireport.id = relationship_civireport.case_id
inner join civicrm_relationship_type relationship_type_civireport on relationship_type_civireport.id=relationship_civireport.relationship_type_id
inner join civicrm_case_contact case_contact_civireport on case_contact_civireport.case_id = case_civireport.id
inner join civicrm_contact c2_civireport on c2_civireport.id=case_contact_civireport.contact_id

WHERE case_civireport.case_type_id  REGEXP '[[:cntrl:]]*3[[:cntrl:]]*' AND ( case_civireport.status_id IN (1, 3) ) AND ( case_civireport.is_deleted = 0 )

ORDER BY case_civireport.start_date ASC

LIMIT 0, 50

```

# Answer
> 2 votes
Based on additional tests and comments from Demerit, it appears that the report requires the case manager to be assigned to the case to list the case.

The obvious workaround is to assign a case coordinator to a case and then everything seems to work.

# Answer
> 0 votes
Without seeing the filters tab, my guess is one of two things:

1) A popup is appearing at the top right, like this

and maybe it's not clear what it's saying, but it's an error saying that if you have Staff Member and Relationship checked you need to select a relationship type on the Filters tab.

2) That theme is maybe shoreditch? It looks different from the standard so maybe something is going on there. If the problem isn't #1 above, then if you switch to the standard theme does it work?

---
Tags: wordpress, civireport, civicase
---


# Question
Title: How do I find the ID of a custom field, contribution, option value, etc.?
Many answers posted here involve finding an ID number for a custom field, or a group, or something else. How do I do that?

# Answer
The easiest way is to hover your mouse cursor over a link that refers to the item in question. In the link that apppears in the bottom of the browser, look for the part that says `&id=` and note the number after it.

For instance, in the first screenshot, I hover over the "View" link to see that the contribution's ID is 45:

In this example, the custom field ID is 3:

In a few cases, there won't be any `&id=`. For instance, with groups it will be `&gid=`. They should all have "id" in them though! Just make sure you don't pick the wrong one - e.g. in the first screenshot above, "cid" is the contact ID, not the contribution ID.
> 5 votes

---
Tags: user-interface
---


title: Where has a custom field been used?

text:
# Question
Title: Where has a custom field been used?
Drupal 7.65 CiviCRM 5.10.4

Hi everyone,

Bit of a strange question here but I'll explain the context and hopefully there's a solution!

So we have a custom field that asks for people's consent to become a member. We use it specifically on the profile that people fill in to express their interest in being a volunteer. The field is a Yes/No field, with no default answer. We don't use CiviVolunteer or CiviMember. We don't collect membership dues so just have a Group set up for our members, rather than using CiviMember.

When I set that field up I was new to CiviCRM and didn't know about CiviRules and how I could automatically add people to our members group based on them ticking that box.

Now I'm just setting up that CiviRule but realised I haven't done anything with the people who have previously ticked 'yes' on that field, so I did an advanced search of people who have a 'Yes' in that field, and it gave me a lot more users that I was expecting.

Before I add all these people into the members group, I want to double-check whether this field has been accidentally added to any other profiles and set to have a default 'yes' answer. Is there a way I can check where a specific field has been used? I just want to make sure that I don't accidentally add people who haven't specifically said 'yes' to membership, since there won't be a way to remove them and while that membership boost would be amazing, it just seems too high for what we've done in the last few months we've had Civi!

Let me know if you have any questions - hopefully this is clear enough.

# Answer
> 2 votes
I can think of a way, but you need to know how to run SQL on your CiviCRM database.

```
SELECT cug.id, cug.title
FROM civicrm_uf_field cuf
JOIN civicrm_uf_group cug ON cuf.uf_group_id = cug.id
WHERE field_name = 'custom_7';

```

It will give you back the title of any profiles that use the field.

Of course, if you're using Webform-CiviCRM or Caldera Forms-CiviCRM integration, this won't catch those!

---
Tags: custom-fields, profile, advanced-search
---


# Question
Title: Fatal error: Class 'DB_DataObject' not found in /sites/all/modules/civicrm/CRM/Core/DAO.php on line 49
After upgrading to 5.13.4 all of Civi has disappeared to be replaced with the error

> Fatal error: Class 'DB\_DataObject' not found in /var/sites/c/\[site\]/public\_html/sites/all/modules/civicrm/CRM/Core/DAO.php on line 49

I first noticed it trying to visit /civicrm/upgrade?reset=1 after uploading all the updated files, but it appears trying to load any part of CiviCRM. Drupal (7.67) still loads fine, though it's still in maintenance mode at the moment.

And ideas what's gone wrong?

# Answer
> 2 votes
can you delete the existing civicrm folder and untar it from here https://download.civicrm.org/civicrm-5.13.4-drupal.tar.gz and perform upgrade?

---
Tags: upgrade
---


# Question
Title: How do I make street address not a required field?
When creating a contributions page for member dues, street address, city, country are all required fields. I do not want them to be. How can I make them not-required fields?

# Answer
> 1 votes
First, find which profile is being used in your contribution page by going to Contributions/Manage Contribution Pages/Choose relevant Page and select Configure over on right hand side of screen/Include Profiles. This page will show which Profile is being used.

Second go to Administer/Customize date and Screens/Profiles. Find the relevant Profile title and select Fields on the right hand side. This page shows all the fields in use and whether they are required or not. In each field, hover over Yes or No and change them as you wish.

Hope this helps.

---
Tags: civimember
---


# Question
Title: Track activities and changes that were made in civicrm by staff
What is the best way to track what changes that a staff member has made in civicrm? I am trying to track activities and changes that were made in civicrm by staff.

# Answer
> 1 votes
Under administer - system settings - misc you can turn on logging which tracks changes.

Also if using drupal turning on the statistics module is sometimes helpful in seeing what people have been clicking on since it makes a recent hits report available.

---
Tags: contacts, activities, admin
---


title: Installation CiviHR

text:
# Question
Title: Installation CiviHR
I would like to install CiviHR and design the data base, but I need support and training for tha. Is there any organisation or individual in the Netherlands that can provide that support?

# Answer
> 1 votes
we do not have any experience with CiviHR but we have been supporting CiviCRM in The Netherlands for quite some time now :-) Drop me a line at erik.hommel@civicoop.org?

---
Tags: installation, civihr
---


# Question
Title: No Active Recurring Contributions on civi record but stripe has the data. Is there a way to resend IPN?
Due to a webhook problem, we have a few recurring donations that are now being processed by Stripe, but are not being recorded in our CiviCRM contribution table.

Is there a way to resend an IPN, or manually adjust Stripe so future donations get recorded in CiviCRM?

We are interested in having future payments from these people recorded in civiCRM. We can manually enter the missed records. Is there a way to have next month's donations to get transferred back to CiviCRM from Stripe?

Should I be asking this question differently?

# Answer
> 2 votes
Yes. In Stripe, go to **Developers menu » Events**. Items with a pending webhook will have an icon next to them as indicated in the screenshot below:

Scroll to the bottom of the page and click "Retry all webhooks".

I'm not sure how long you can retry for - with PayPal it's 30 days, not sure about Stripe.

---
Tags: civicontribute, stripe
---


# Question
Title: CiviCRM 5.13.1 is not showing "Added By" coumn value
I upgraded site Drupal 7.66 + CiviCRM with latest version 5.13.1 and found out that if you go to any user profile and click on Activities tab then you can see there is "n/a" in "Added by" Column.

But when I click on "View" activity link then I can able to see "Added by" value.

It was working with last version 5.10.4, I think this is bug in CiviCRM latest version. Any help is really appreciate.

Created issue civicrm lab https://lab.civicrm.org/dev/core/issues/951

# Answer
> 3 votes
I'm marking this question as now being answered. The problem is resolved by upgrading from civicrm version 5.13.1 to 5.13.4

---
Tags: drupal, activities
---


# Question
Title: Getting active relationships using the API is returning contacts in trash
I'm doing this call

```
$result = civicrm_api3('Relationship', 'getvalue', [
  'return' => "contact_id_b",
  'relationship_type_id' => 5,
  'contact_id_a' => "user_contact_id",
  'is_active' => 1,
]);

```

It is returning contact B from contacts that are in trash.

I want to filter for contacts that are not in trash but struggling to find a way of doing it.

# Answer
> 4 votes
This seems to work, using a join:

`$result = civicrm_api3('Relationship', 'get', [
 'sequential' => 1,
 'return' => ["contact_id_b"],
 'relationship_type_id' => 5,
 'contact_id_a' => "user_contact_id",
 'is_active' => 1,
 'contact_id_b.is_deleted' => 0,
 ]);`

---
Tags: api
---


title: Deleting duplicate contact

text:
# Question
Title: Deleting duplicate contact
How do you delete a duplicate contact on CRM please? I have looked at the various fields but can't find any deletion button.

Kind regards Amanda

# Answer
> 2 votes
The way i would do is use CiviCRM merge duplicate contact feature. Here is the documentation on how you can use Merge contact screen to merge two duplicate contacts in your system.

If you know the contact that is duplicate and want to delete than you can click on 'Delete contact' button that appears when viewing the contact.

Or find the contact you want to delete using contact search and select the contact and choose from action drop down 'Delete contact' or 'Delete permanently'.

Ref: https://docs.civicrm.org/user/en/latest/organising-your-data/contacts/#deleting-contacts

Cheers

Pradeep

---
Tags: duplicate-contacts
---


title: Auditing Who Merged Contacts?

text:
# Question
Title: Auditing Who Merged Contacts?
Is there any way to audit which admin merged duplicate contacts? I'd like to know who performed the merge, if possible. Thanks.

# Answer
When contacts are merged, activities are created - you can use Search \> Find Activities to search for "Contact Merged" and "Contact Deleted by Merge" activities - the "Added by" column will display the user who performed the merge.

Hope this helps, Tamar
> 3 votes

---
Tags: duplicate-contacts
---