# Question
Title: How do you implement more than one "Employee of" field?
How do you implement more than one "Employee of" field?

We have a number of contacts that have multiple jobs. Ideally we would like to have the Employee Of field have multiple sub fields (primary, secondary, etc) however we are open to all implementation. How do most people implement other Employers on an individual contact's record?

# Answer
> 2 votes
It is allowed to have multiple relationship as employee of for individual with an organization. However you can only have one as a current employer. You can create custom field for relationship with options primary, secondary etc and use it while creating relationship.

HTH

Pradeep

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


# Question
Title: How to give fine grained access to communicating with selected contacts only?
We're a non-profit swimming club, just starting out with CiviCRM. We're offering ~20 courses per semester and already set up registration for those with CiviEvent.

For an ideal setup i'd now need to be able to assign a responsible Trainer to each of the courses and give this person access to the registered participants contact data (only) and send e-mails (possibly sms in future) to these (groups of) participants.

What i've seen so far it seems that the usual ACL system isn't quite prepared for this as i'd need to create 20 roles, assigning 20 groups with mostly just one person (trainer) in it.. or am i not thinking the CiviCRM-way yet? (or have i possibly overlooked a way to assign ACLs to single users?)

also found this https://civicrm.org/extensions/view-my-event-participants which looks promising, but isn't quite ideal (yet) either. first off i'd need to hack something to change the event's creators (which usually isn't the trainer), and from a first test it seems that in CiviMail i only get access to single contacts (not groups).

thanks for any hints, markus.

# Answer
You will need to create an extension and use acl where clause hook to restrict view/edit operation for a contact.
> 0 votes

---
Tags: civievent, civimail, acl, plugin
---


# Question
Title: Different Membership Status Rules for Different Memberships?
We are using CiviCRM to manage data for several levels of our organization. At the moment, rules around grace/lapse periods are not standardized across the organization. Is it possible to apply different membership status rules to different membership types?

1. Membership A. Current 0-12 months from start; Grace until +2 months after membership end date.
2. Membership B: Current 0-12 months after start; Grace until 1 month after membership end date.

Thanks in advance for any help.

Rachel

# Answer
> 3 votes
You can't do this with out-of-the-box CiviCRM and I am not aware of any extension that provides that functionality.

As I am not a developer I can't comment on how difficult it would be to write an extension to provide what you would like, however, even if it is an easy task, extensions need to be maintained as CiviCRM is upgraded.

Grace periods have usually been arbitrarily determined at some time in the past so in a situation like this is I would go to the parties involved and say something like "Managing membership with CiviCRM will deliver lots of benefits, (enumerate) but the grace period is going to need to be standardized across the organization." and leave it to them (or the common boss in their management chains) to decide whether it will be one or two months.

---
Tags: civimember
---


title: CiviCRM 4.7.29 Update Indices fails

text:
# Question
Title: CiviCRM 4.7.29 Update Indices fails
I've messed around unsuccessfully to update indices by following various posts in StackExchange for similar errors. I have the impression that the Update Indices button simply does not work correctly.

If I push it at the moment, I get:

```
DB Error: already exists
Debug information:
CREATE UNIQUE INDEX index_entity_id_entity_table_account_relationship ON civicrm_entity_financial_account (entity_id, entity_table, account_relationship) [nativecode=1062 ** Duplicate entry '0-civicrm_financial_type-12' for key 'index_entity_id_entity_table_account_relationship']

```

Does anyone have a good way of removing all indices and recreating them?

I just upgraded from 4.7.25 to 4.7.29 (and am on the latest Wordpress version) if that is relevant.

Tried CiviCRM Update 4.7.27 Operation failed: Update Indices Errno: 150 but it didn't work either `(complained about ALTER table civicrm_option_value DROP INDEX index_option_group_id_name with #1091 - Can't DROP 'index_option_group_id_name'; check that column/key exists)`

Thanks, David

# Answer
> 1 votes
Here is the possible solution for this. Try running the sql queries through shell or phpmyadmin and than re-run the update indices.

Looking at the db error i can see civirm\_entity\_financial\_account have duplicate rows. Please get rid of one row or all with entity\_id = 0 as it doesn't make sense and then re-run update indices.

```
Delete civicrm_entity_financial_account where entity_id = 0 and entity_table = 'civicrm_financial_type';

```

---
Tags: indices
---


# Question
Title: Add custom field and populated with array/data from a non-civicrm table
newby here with a quick question about custom fields. Is it possible to set up a custom field that queries a non-civicrm table? Hoping to create an autocomplete dropdown menu that does a SELECT on a legacy table we have. Am I looking in the right direction when I browse this page: https://wiki.civicrm.org/confluence/display/CRMDOC/hook\_civicrm\_custom ?

Thank you so much! johnnyeng

# Answer
You can do this in a few ways:

If the legacy table is static, just move the data across into a custom field select option. You'll be happier when it's done. You can do this with a SQL command if there are a lot of options.

If the data in the legacy system is changing, there are two few ways: A) Create MySQL triggers to update the values, B) Create a batch script to update the options in Civi from the table,
> 1 votes

# Answer
When you create a custom group, it creates a table in the database and each custom field will have a column created in this table. (see table civicrm\_custom\_group -\> table\_name and civicrm\_custom\_field -\> column\_name)

So i guess the best you could do is to copy the data from your legacy table to the civicrm custom table.

If you need the legacy table for other purpose, you will have to synchronize the data between the two tables. You could use triggers or implement hook\_civicrm\_custom to get the data pushed to your legacy table every times a new custom value is created in the inserted / updated.
> 0 votes

# Answer
hook\_civicrm\_custom isn't really what you're looking for here - that's to take action when data is entered/changed in a custom field, not to configure it.

Check out hook\_civicrm\_fieldOptions, which should let you create field options for this field on the fly.
> 0 votes

---
Tags: custom-fields, database, hooks, php, mysql
---


title: 4.7.29 not installing on test site

text:
# Question
Title: 4.7.29 not installing on test site
Trying a test install of CivicCRM 4.7.29 for Wordpress before purchasing. Not going well. As we attempt to install as a plugin, we get the following error msg:

Warning: POST Content-Length of 26644350 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

Are you sure you want to do this?

When we try again, same result.

This install is on a WP test site on an XAMPP install on a local machine. I'm assuming the length limit is controlled by a setting in some conf file, but the error msg is not at all intuitive as to which file it is addressing. Can't purchase if we can't install it.....

# Answer
> 2 votes
First, CiviCRM is always available freely, and never for sale. You shouldn't be purchasing CiviCRM from anyone (CiviCRM installations are different). It's free to download, use, and install yourself, without limitations. If anyone is trying to charge you for a CiviCRM license, please take them to court for fraud by misrepresentation.

At which stage are you getting this? Which tables have been created in the DB?

---
Tags: installation
---


# Question
Title: Displaying Transaction Id in Thank you letter
I am trying to create thank you letters grouping the transactions by contact. I am creating a table to display the contribution information but I am running into a problem with Transaction ID. since not every contribution has one, it doesn't align properly in the table. I tried using the 'line break' and 'verticle table cell' but the
or is not printing for when the token is empty.

I tried to work around it by printing N/A when if the token is empty but I can't seem to get this working either {capture assign=temp}{contribution.trxn\_id}{/capture}{if $temp ne ""}{$temp}{else}N/A{/if}

UPDATE: I tried @RayWright's suggestion and it worked for individual thank you letters perfectly. However, when grouping the contribution records by contact, the same code will only print the transaction ID when there is one and will not print NA when there isn't one...

# Answer
> 2 votes
This is a known bug and is documented and fixed at CRM-21690. You will need to apply the patch to fix the problem or will need to wait for 4.7.30 release.

---
Tags: tokens, smarty, pdf
---


title: CiviMail WYSIWYG not working

text:
# Question
Title: CiviMail WYSIWYG not working
\*****UPDATE ADDED 1/22/18-Additonal Settings from Civicrm.settings.php

```
// Additional settings generated by installer:

```

$civicrm\_paths\['wp.frontend.base'\]\['url'\] = 'https://secure.blank.org/'; $civicrm\_paths\['wp.backend.base'\]\['url'\] = 'https://secure.blank.org/wp-admin/'; $civicrm\_setting\['URL Preferences'\]\['userFrameworkResourceURL'\] = 'https://secure.blank.org/wp-content/plugins/civicrm/civicrm';

\*****UPDATE ADDED 1/22/18-
Please see the screenshot below. Could this be the problem? There is not a /secure/ subdirectory. The paths should be: https://secure.blank.org/wp-content/plugins/civicrm/civicrm/
not https://secure.blank.org/**secure**/wp-content/plugins/civicrm/civicrm/ and https://secure.blank.org/wp-content/uploads/civicrm/ not https://secure.blank.org/**secure**/wp-content/uploads/civicrm/

I am not seeing where to change this in civicrm.settings.php. Is there another file where this is set?

\****END UPDATE\****

We are using Civi 4.7.29 on WordPress 4.9.1

When creating a new mailing in CiviMail, I will select the template and it will be displayed differently in the HTML editor than it should be. The preview show it correctly. Please see the screen shots below. I am thinking it is either a paths issue or a permissions issue. Has this happened to anyone else? Does anyone have any idea where I can start with resolving it?

These are the ERRORs being shown Failed to load resource: the server responded with a status of 404 (Not Found) /wp-content/plugins/civicrm/civicrm/extern/open.php?q= /secure/wp-content/uploads/civicrm/persist/crm-ckeditor-default.js?t=G87D Failed to load resource: the server responded with a status of 404 (Not Found)

What should the permissions be for these two files? My open.php is 664 My crm-ckeditor-default.js is 644.

# Answer
Not exactly, but I've seen WYSIWYG having problems on one of our sites due to incorrect loading of `[cms.root]` token in Resource URL. To check what's wrong.

* Look for the token populated by clicking on the small help icon on `civicrm/admin/setting/url?reset=1` (Administer -\> System Setting -\> Resource URL).
* Similarly on `civicrm/admin/setting/path?reset=1` (Administer -\> System Setting -\> Directories).
* If any of the path looks incorrect, specify it explicitly in your `civicrm.settings.php` file as below.

```
global $civicrm_paths;
$civicrm_paths['cms.root'] = array(
  'url' => 'http://cms_root_url',
  'path' => '/cms/root/path',
);
$civicrm_paths['civicrm.root'] = array(
  'url' => 'http://civicrm_root_url',
  'path' => '/civicrm/root/path',
);
$civicrm_paths['civicrm.files'] = array(
  'url' => 'http://civicrm_files_url',
  'path' => '/civicrm/files/path',
);

```
> 2 votes

# Answer
Based on the screenshots it looks like you've installed WP in it's own directory as opposed to the web root.

Starting in Version 4.7.27 CiviCRM will detect if WP is installed in it's own directory

So on new installs we will see a new section in civicrm.settings.php:

```
// Additional settings generated by installer:
$civicrm_paths['wp.frontend.base']['url'] = 'https://wpsub.test/';
$civicrm_paths['wp.backend.base']['url'] = 'https://wpsub.test/wordpress/wp-admin/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://wpsub.test/wordpress/wp-content/plugins/civicrm/civicrm/';

```

Does you civicrm.settings.php have the above lines? If this was an upgrade it would not. The reason for these settings is that the baseurl is different for the front end and back end of a WP site if it's installed in it's own directory.
> 3 votes

---
Tags: wordpress, civimail, ckeditor, wysiwyg
---


# Question
Title: Is CiviEngage available with Backdrop CMS?
CiviEngage is a Drupal module. Since Backdrop CMS is a fork of Drupal, porting modules is rather straightforward, from what I understand. Is CiviEngage available for Backdrop CMS yet?

# Answer
It seems that the long-term plan is to turn CiviEngage into an extension for CiviCRM (see here and here) and deprecate the module. I don't see much recent action on that front, so you might be right that a simple port to BackdropCMS from the Drupal7 module would be the quickest way to start using it in the meantime. In short:

* If you are able to help convert to a native CiviCRM extension (by coding or sponsoring), that would be a great place to start.
* If you can't do that but can do the module port to Backdrop CMS, that should be quite painless (he says without having looked at the code directly).
* Beyond those, you could also submit a module port request for Backdrop CMS here. (I'm guessing it won't get into CiviCRM's core Backdrop implementation since the plan is to phase that into an extension, but it could be ported and hosted on BackdropCMS's contrib section in the meantime until such an extension exists).

**UPDATE:** It seems that CiviEngage may be ported to Backdrop and included in the Backdrop version of CiviCRM, unbeknownst to me. I have not tested it but give it a shot. https://github.com/civicrm/civicrm-backdrop/tree/1.x-master/modules/civicrm\_engage
> 5 votes

# Answer
Your best bet is to contact the developers if you can't find anything on the CiviCRM Extension Repository.
> 0 votes

---
Tags: civicampaign, backdrop
---


# Question
Title: how do I find a new page I just created so that I can link it on another page?
I just created a new Basic page, and I want to link to it on another page, but I can't find it when I browse for it in the Create Link option. I'm VERY new to this platform.

# Answer
Never mind. I just went into my browser history and found it that way, but it seems like there must be a better way.
> 1 votes

---
Tags: links
---


# Question
Title: No Text Alignment option in CiviMail WYSIWYG Editor
We are using civi 4.7.29 on wordpress 4.9.1 Some of our Administrators are not going to know HTML when they are creating a new mailing. I noticed there are not any text aligning options in CiviMail for Left Align, Center, Right Align. Shouldn't there be? Am I forgetting to install something?

# Answer
> 3 votes
Solved. Go to Admisister \> Customize and Data Screens \> Display Preferences Scroll down and click the Configure CKEditor Button In the space for "Plugins" Find "Justify" and save it. While you are at it, add "colorbutton" and "font"

---
Tags: civimail, wysiwyg
---


title: Newsletter Signup Page/Block

text:
# Question
Title: Newsletter Signup Page/Block
I was looking around but haven't been able to find an obvious answer to my question, but has anyone ever dealt with a newsletter signup block or page just for site visitors? I've been trying to find examples but it doesn't really seem as though anyone's ever required this. We'd like to move our current newsletter signup form over to CiviCRM just so everything is all handled in one place, but I'm stuck as to how to accomplish this.

I'd appreciate any help or advice - Matt

# Answer
> 5 votes
There are two ways to do this in Drupal.

### CiviCRM Profiles

* Go to **Administer » System Settings » Misc**, and set *Accept profile submissions from external sites* to **Yes**.
* Create a profile in CiviCRM with the "Add to Group" option set to add someone to the group in question.
* Once the profile is created, select its **more menu » HTML Form Snippet** (see screenshot).
* Paste the HTML snippet into a Drupal block. Handle access to the block like any other Drupal block.

**SPECIAL NOTE:** This creates a bit of a security issue - when you enable the "Remote Profile Submissions", anyone who knows what your profiles are can add contacts to your system by recreating the form on a remote site. If you choose this path, consider editing your web server to block access to profile URLs by IP address.

### Webform CiviCRM integration

Alternatively, you can use Webform-CiviCRM integration to build webforms to handle this. This is much more flexible, but can be trickier to get right, depending on your needs. I'd probably try this first.

### Bonus: WordPress edition

* Create a profile in CiviCRM with the "Add to Group" option set to add someone to the group in question.
* Use a shortcode to drop the profile into a page. Use the Shortcode Widget if you want to drop it into a sidebar.

# Answer
> 3 votes
I'd highly recommend a page as opposed to a block. If you use a block, you can't put a captcha on it. And I can tell you from experience that it will be hit by Russian bots like CRAZY!

Create your profile. Make sure you have it set to be used for "Standalone Form or Directory".

On the profile listings page - http://www.yourdomain.com/civicrm/admin/uf/group?reset=1 \- click on the "more" link to get a pop-up. Then choose "Use - Create Mode". That will open up the link that you can send visitors to in order to fill out the form.

I've switched to this method instead of a block so that I can have a captcha on the page. I still have a block about subscribing, it just links folks to this page instead of having the form there.

Hope this helps!

---
Tags: drupal, newsletter
---


# Question
Title: Error: Sorry an error occurred Supervised rule for Individual does not exist
I am trying to add a new member. Each time I enter the name and email I get the error message: Sorry an error occurred Supervised rule for Individual does not exist

Does anyone know what this means and how I can get around it.

Many thanks!

# Answer
> 3 votes
It sounds like you don't have a rule for Individuals that is set to be the supervised rule.

Here's the description of this rule type: "The 'Supervised' rule for each contact type is automatically used to check for possible duplicates when contacts are added or edited via the user interface. Supervised Rules should be configured with a broader definition of what constitutes a duplicate."

In my CMS (Drupal), I find the page to set these here: http://www.mydomain.com/civicrm/contact/deduperules?reset=1

You'll want to choose how a record is determined to be a duplicate when you're adding/editing someone. And then set that rule to be your supervised one.

---
Tags: civimember
---


# Question
Title: What is the recommended way to upload teenage volunteer and their parents data from csv file
What is the recommended way to upload teenage volunteer and their parents data from csv file This is the info looking to upload First Last Email Cell Address City State Zip Home Phone Email 2 Birthday School Gender
Moms Prefix Moms First Name Moms Last Name Moms Cell Moms Email Moms Gender Moms Birthday
Father Prefix Fathers Name Fathers Last Name Fathers Email Fathers Gender Fathers Birthday Also...how do i group only the volunteer as group Volunteer & not the parents? Would you recommend to have the parents as a smart group such as parents of teenage volunteers for mailing purposes for example or to make a group called parents of teenage volunteers? How would i load that as part of this upload. Thank you!

# Answer
You can use relationships to tie the parent(s) to the teen.

https://docs.civicrm.org/user/en/latest/organising-your-data/relationships/

Here is some information on importing relational data on this page. Just scroll down about 3/4 of the way down:

https://docs.civicrm.org/user/en/latest/common-workflows/importing-data-into-civicrm/
> 1 votes

---
Tags: data-import, upload
---


# Question
Title: Which Backdrop themes allow viewing CiviCRM inline fields without scrolling?
By default, CiviCRM on Drupal's "Bartik" theme and Backdrop's "Basis" and "Seven" themes cause CiviCRM inline fields to display with horizontal scroll bars, which hurts usability (see screenshot 1).

In Drupal, the civi\_bartik theme fixes this (see screenshot 2). Is there an equivalent theme for Backdrop CMS?

# Answer
Finding nothing better, I made my own Seven subtheme civi\_seven.

CSS is definitely not my strong suit, but the net result is definitely an improvement on the existing options.
> 0 votes

# Answer
I haven't seen one. Usually in cases like this I just make changes to the theme myself to account for things like this. Themes often times only take Drupal, its core modules, and some of the major add-ons into consideration for its theme. So when you use something else, like CiviCRM, you have to make changes yourself for usability.
> 1 votes

---
Tags: theme, usability, backdrop, ux
---


# Question
Title: Is it possible to integrate CiviCRM with a hosted VOIP solution?
My company may be moving to a hosted VOIP solution. I've been looking for a solution to integrate a VOIP system with CiviCRM but it appears that this is still under development and no solution is in place at this time. Is it possible to integrate a VOIP system with CiviCRM? I'm looking to automate creation of an activity and update fields with call data. I assume a browser plugin could handle the click to dial portion but Im unsure. Any help is appreciated.

# Answer
There isn't a single unified VOIP interface, so each interface with civi would have to be custom.

I've seen two interfaces with an Asterisk based VOIP: \- fetch the name of the caller (based on the number) to display it on the phone when ringing \- add click to call on various screen (at least the contact details) \- log a call

For the last one, I don't think it has never been very useful, because most of the callers don't seem to think most of the calls are important enough

Neither of these were hard to develop, but as said, it's probably quite specific to what is your VOIP solution.
> 1 votes

---
Tags: api, civicrm-entity, phone
---


# Question
Title: How do I search for the exact string match using CiviCRM API
How do I perform Contact GET for the contact with the exact display name which will return only contacts with that exact display name?

Say I create two users xyz and xyzA

```
$result = civicrm_api3('Contact', 'create', array(
  'sequential' => 1,
  'contact_type' => "Individual",
  'display_name' => "xyz",
));

$result = civicrm_api3('Contact', 'create', array(
  'sequential' => 1,
  'contact_type' => "Individual",
  'display_name' => "xyzA",
));

```

The flowing get request always returns both contacts (xyz and xyzA)

```
$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'display_name' => "xyz",
));

```

I want my API call to return only users with a display name xyz. How would I do this?

There is an option to turn off Automatic Wildcard, but that would affect the entire website and all the users. Is there a way around this?

# Answer
The Contact API is non-standard in APIv3; a major goal of APIv4 is to remove these quirks. The behavior you're seeing on Display Name is non-standard. It also seems that a lot of the other operators (e.g. "LIKE") don't work on Display Name.

If you can, you can search on First Name and/or Last Name, neither of which display the problem described here.
> 3 votes

---
Tags: contacts, api, search, civicrm-home, core
---


# Question
Title: Public listing of newsletters in Joomla?
On a Joomla site we would like to allow the public to see a list of newsletters sent through CiviMail. Subject of email would be the link text, body of newsletter including images would be displayed as a site page when clicked. So, similar to a Drupal view like in How can I show users the mailings they have been sent?

What's a good way to do this?

# Answer
a bit late on this one. It's not an ideal solution, but a quick fix could be AcyMailing which has a CiviCRM plugin and front-end newsletter listings. https://www.acyba.com/acymailing/390-acymailing-plugin-civicrm.html
> 1 votes

---
Tags: civimail, joomla, newsletter
---


# Question
Title: Data Protection / GDPR - deleting from logging tables
With the new GDPR legislation taking effect in a matter on months, it dawns on me... how can we delete people permanently from the logging tables? My understanding is that the table types are a special archive type that don't allow for deletion of individual rows.

Is that right?

# Answer
Just to be sure I understand you properly: this is about the right to erasure (a contact ask your organisation to remove any data about them), right?

It's my understanding that indeed you should remove the data both from the live and the log table (as the later isn't a temporary backup but long term archive).

I recall a discussion about changing the format of the archive tables (so the engine isn't ARCHIVE anymore). The impact on the size wasn't that bad for what I remember, so it might be an option.

```
ALTER TABLE my_table ENGINE = InnoDB

```

And the only one I can think of to be able to be compliant.

I'd suggest you to check on a backup first, there is a ROW\_FORMAT=COMPRESSED option, but it seems you need to tune your install a bit to benefit from it on a per table basis... and it might not be needed, based on the size of your installation.
> 3 votes

# Answer
We wrote an extension a while back that anonymises contacts including entries in log tables. So you could anonymise the contact first and then delete them.

As Xavier has mentioned, you will have to make sure the log\_ tables will be created with the right engine (InnoDB). If you already have log tables, you can either drop them, or convert them yourself. Afaik this only is necessary when you use extended logging.

Find more information on the extension here \- we have not tested it 4.7 yet.
> 3 votes

---
Tags: database, logging, gdpr
---


title: Attach pdf file civicrm_api3

text:
# Question
Title: Attach pdf file civicrm_api3
i need help, i'm trying to attach through **civicrm\_api3('Attach', 'create'..)** a **pdf** file, passed with a rest call as simply text:

```
%PDF-1.3
1 0 obj
<< /Type /Catalog
... ecc

```

. The attach works, but i thing that during it, the crm's file save function make an escape of some special chars... the results of content of pdf file is:

```
%PDF-1.3
1 0 obj
<< /Type /Catalog
... ecc

```

there is a way to avoid this behavior?

thanks

# Answer
> 1 votes
Sorry, this is a half-answer.

The HTML encoding is being added because this line is adding default 'wrapper' functions that include adding HTML entities (`CRM_Utils_API_HTMLInputCoder`).

You can fix this by altering the defaults passed into `WrapperAdapter::construct()`, to include `'content'` in the array of `skipFields`. I think you could do this here.

Just add a line like

```
'content', // For attachment.create

```

This does work - I tried it.

**However this may not be secure** because I don't know if any of the other APIs use the rather generic 'content' parameter name. If they do, then removing the protection afforded could result in XSS vulnerabilities or other problems.

So the other way to fix it would be rename the API `content` something more unique `attachment_content` \- but that would require changing a public API (!)

So another way would be to put in some sort of check that changes the default wrappers for the particular case of `attachment.create`, but I'm not familiar enough with the internal workings of the API system to suggest that patch.

Hmmm.

# Answer
> 0 votes
thank you for answer me! i've resolved in this way:

1. I've created file with pure PHP
2. Then i've used **civicrm\_api3('Attach',...)** with 'options.move-file'.

**options.move-file** is used to attach to civicrm\_file record the previously created file.

Maybe isn't the best solution, but works!

Thank you!

---
Tags: custom-fields, api, civicrm-entity
---


# Question
Title: CiviCRM Webform Integration - User registered for event before they've made payment
When you set up a webform in drupal for event registration in civi the last page of the form is "submit" which submits the form and registers the user and *then* takes them to the payment processor.

In the instance that someone doesn't complete the payment they are still being registered for the event.

Is there anyway to only submit the form once they've been redirected back from the payment processor?

Thanks

# Answer
Registered for the Event but Contribution Pending Incomplete is the correct behavior in the case of an offsite payment processor.

It’s essentially a pay later (though the pay later time is shorter than mailing in a chq).

PS - on the second part of yorur question - if you use an onsite payment processor then you will have Payment fields before the Submit button
> 1 votes

# Answer
It sounds like this may be an issue with the webform integration module, not CiviCRM. If so, you'll want to post here: https://www.drupal.org/project/issues/webform\_civicrm?status=All&categories=All
> 0 votes

---
Tags: civievent, drupal, webform-civicrm, payment-processor
---


# Question
Title: What could $civicrm_root setting in civicrm.settings.php appears ignored?
I'm running 4.7.27 and regardless of what I set the $civicrm\_root to, the hints in resource URL and file path setting pages give quite unrelated values for civicrm.root. I am also unable to set the resource URL to anything but the prefilled value (editing it and submitting does nothing).

Consequently it looks like some override is at work. However, I've checked the civicrm.settings.php many times and I'm unable to find such an override.

What could be causing this? Everything displays fine, except for loading of the CKEditor js-files. But the fact that editing civicrm.settings.php doesn't do anything scares me. I've verified that the file is indeed the correct one (removing it breaks the site), and that even removing the $civicrm\_root entirely does nothing.

From the settings:

```
global $civicrm_root;

$civicrm_root = '/foo/www/sites/abc.foo.se/current/web/app/plugins/civicrm/civicrm/';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
   define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/foo/www/sites/abc.foo.se/shared/uploads/civicrm/templates_c/');
}

```

# Answer
> 1 votes
There might two settings defined for CiviCRM. Can look if you have any other civicrm.settings.php file located in different folder?

```
 The recommended location is wp-content/uploads/civicrm/civicrm.settings.php.

 The deprecated location, still supported as of April 2017, was wp-content/plugins/civicrm/civicrm.settings.php

```

HTH

Pradeep

---
Tags: civicrm.settings.php
---


# Question
Title: Re-install Buildkit on Ubuntu for Windows
I have just installed BuildKit on Ubuntu for Windows as root by mistake. Is there a way I can uninstall and start again? Can I just delete the buildkit folder?

Also, I don't need to install Apache, PHP and MySQL, as these are already installed. Is there a particular command for installing the build kit without these? I was following the instructions at https://docs.civicrm.org/dev/en/latest/tools/buildkit/.

# Answer
If you've run `amp`, you should also delete the hidden folder `$HOME/.amp`. Leaving `--full` out of the install command will skip installing apps. Hoewver, There is no side effect to reinstalling the apps, and it includes ancillary programs like `zip` and `curl`, so you're most likely best off running with `--full`. It will also restart Apache for you, which might be necessary.
> 3 votes

---
Tags: civicrm-buildkit, windows
---


title: How to Customize Events Dashboard

text:
# Question
Title: How to Customize Events Dashboard
The 'Event Summary' part in the Events Dashboard has a very useful view of a participant status count per event, but it only shows a few events. How can I customize it to show ALL events in the current year?

The 'Manage Events' page does not have this option to see how many people are in what status, per event.

# Answer
The event dashboard shows `recent and upcoming events (where start date is 7 days ago OR later)`. If you want to show all events of current year than you can do it in either one of the two way given below.

1. Over-ride CRM/Event/BAO/Event.php and edit the where clause at line 357 and 419.
2. Create an extension and use pageRun() hook to over-ride `$eventSummary` variable in smarty and also copy paste CRM\_Event\_BAO\_Event::getEventSummary(); into your extension and update the where clause at line 357 and 419. Below code shows how you can use the hook(not tested)

> ```
> function abc_civicrm_pageRun(&$page) {
>     if ($page->getVar('_name') == 'CRM_Event_Page_DashBoard') {
>       // Call to your custom function which is replica of
>       // CRM_Event_BAO_Event::getEventSummary(); but change in where clause.
>       $eventSummary = EXTENSION_CLASS_FILE_PATH::getEventSummary();
>       $enableCart = Civi::settings()->get('enable_cart');
>       $eventSummary['tab'] = CRM_Event_Page_ManageEvent::tabs($enableCart);
>       $page->assign('eventSummary', $eventSummary);
>    }
> }
>
> ```

PS - #1 is not recommended as it will be difficult to maintain during Incremental upgrade.
> 3 votes

---
Tags: civievent
---


# Question
Title: API creation: my action is not found (only on Linux server)
Using civix I create an extension containing a new API (WD2.importdata). As result I obtained the file:

..ext\org.civicrmitalia.washdog\api\v3\WD2\ImportData.php

containing the following 2 functions:

```
function _civicrm_api3_w_d2_ImportData_spec(&$spec) {
}
function civicrm_api3_w_d2_ImportData($params) {
}

```

In my development server (Windows+Joomla+CiviCrm 4.7.25) the API is working properly. As I copied it in production server (Linux+Joomla+CiviCrm 4.7.25) both the API explorer and the Scheduled Jobs returns the error :

error\_message": "API (WD2, importdata) does not exist (join the API team and implement it!)

I also tried to modify the function name in "\_civicrm\_api3\_w\_d2\_importdata\_spec(&$spec)" or "\_civicrm\_api3\_wd2\_ImportData\_spec(&$spec)", without success.

# Answer
Even i have faced such problems many times in past. But i do some work around and fix it. What i would do

1. rename file ImportData.php to WD2.php
2. move WD2.php to org.civicrmitalia.washdog\api\v3\
3. Use lower case as function name. `eg civicrm_api3_w_d2_importdata($params)`

HTH

Pradeep
> 1 votes

---
Tags: api, error
---


# Question
Title: The requested Profile (gid = 9 ) is disabled OR not set to be used
> The requested Profile (gid = 9 ) is disabled OR not set to be used as 'overviews' OR the Profile with this ID does not exist OR you do not have access to this Profile. Contact the administrator for further assistance.

I get an error as given in title for when I enable contribution form for membership renewal with settings "On behalf of" tick marked and I get that only when I view it as anonymous,but when I view it as logged in user ,I don't get the error

# Answer
> 5 votes
On the Contribution Page setup, below the checkbox to enable 'on behalf of' there is help text explaining that it uses the "On Behalf Of Organization" profile - unless you change it. You are seeing an error relating to profiles when you enable the section that says it uses a profile, so that is a good clue as to the cause of the problem.

Let's step through the various causes suggested in the error message:

1) Is Profile (gid=9) disabled?

Go to `Administer > Custom Data and Screens > Profiles` Click the `Reserved Profiles` tab. Id 9 is 'On Behalf of Organization' in a default config (4.7) which corresponds with the help text.
It is a reserved profile, so you don't have the option to disable it. This is not the cause of the problem.

2) Is Profile (gid=9) set to be used as 'overviews'?

This is not obvious as there is no setting described as 'overviews'. But since this is core behaviour and you can't change it, let's assume that is correct for now.

3) Does Profile (gid=9) exist?

Yes - we have just seen it in the listing. (Arguably this should be the first cause listed!)

4) Do you have access to the Profile?

This is the last of the suggested causes and also corresponds to the behaviour you are seeing that the problem depends on whether or not you are logged in.

Now we need to check permissions. You don't mention which CMS you are using, but I'll use Drupal here.

Go to the Drupal `People > Permissions` page. In the CiviCRM section, look for settings relating to 'profiles' and see what permissions your anonymous users have. It is not always obvious which permissions are relevant but we are using the profile to enter new data rather than view data so 'profile create' looks likely.

Is 'CiviCRM: profile create' enabled for anonymous users? Probably not. Enable it, save and try to view the contribution page again when not logged in.

Warning: Be wary of granting new permissions if you don't understand what they mean, particularly for anonymous users as you can inadvertently expose far more data than intended. You can find confirmation that 'profile create' is appropriate in the documentation.

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


# Question
Title: Unable to see or modify rights in "WordPress Access Control" panel
I'am running a 4.7.27 civicrm on wp. Strangely, for some reason i still ignore, unauthenticated visitors can't suddenly access the petition form (civicampaign) what is a quite big problem because i am engaged in such important campaign.

After reading documentation, I tried to change the access rights from the page "WordPress Access Control".

For another unknowned reason, the "WordPress Access Control" form looks empty (screenshot) and can't be modified despite the fact that i am admin.

If somebody can help me...

# Answer
Found this while having the same problem. The solution is in the CiviCRM utilities Wordpress plugin - go to the plugin settings and there is a box you can tick to "fix the appearance of the WordPress Access Control form". I did that and the Access Controls came back in Civi.
> 2 votes

# Answer
Are you running CiviCRM Admin Utilities? If so, upgrade to the latest version. Also, try flushing CiviCRM's cache - you can do this from the CAU admin page.
> 1 votes

---
Tags: wordpress, permissions, civicampaign
---


# Question
Title: after upgrade, can't edit Contact Details fields (Custom Addressee and de-selected subtypes errors)
I've just updated a Joomla 2.5.28 site from an older version of CiviCRM (4.4) to the latest 4.7.29. Now I can't edit any of the fields under the "Contact Details" pane for existing records.

There are two errors:

1. When editing these fields for contacts that have custom subtypes, a popup appears saying "One or more contact subtypes have been de-selected from the list for this contact. Any custom data associated with de-selected subtype will be removed as long as the contact does not have a contact subtype still selected. Click OK to proceed, or Cancel to review your changes before saving."
2. For all contacts (including custom subtypes from item 1 above), saving doesn't work and throws this error: "Custom Addressee is a required field if Addressee is of type Customized."

It's also interesting that I can create NEW records of contact subtypes, but get the errors again if I try to update the Contact Details of the new record.

I found this post (Why after importing contact records were Addressee field values set to "Customized" for records where Custom Addressee had a null value?) which seems to address issue #1, but I'm a bit stumped as to issue #2. And I didn't want to try the correction suggested in this post until I knew if the two issues could be related.

Site details: Joomla 2.5.28 CiviCRM 4.7.29

# Answer
> 2 votes
I feel this issue is documented and fixed at CRM-21180. You can try by applying patch or wait for 4.7.30 release.

---
Tags: contacts, error, contact-types
---


# Question
Title: CiviCRM + Wordpress + Contact 7, how to get it to work
I am trying to make sense of this WP plugin: https://wordpress.org/plugins/contact-form-7-civicrm-integration/

I have installed it, set the API details, and am now setting it up. The emails get sent, but there is no addition to civicrm. Right now the civicrm options of contact 7 via this plugin are:

Entity: Contact Action: create (all good here, I guess)

Additional parameters (the standard ones given): contact\_type=Individual&source=Wordpress What if I wanted to add this user to a specific group too? I'm not sure about what to write.

In any case, by filling the form an email gets sent, but no addition to CiviCRM is made...! This would be quite important to me, so if anyone had any idea or has any experience with contact 7, any help would be really, really appreciated.

On a secondary note: how do I know the standard names of all "fields"? In the plugin page they give "first\_name" and "last\_name" as samples, but what if I want to add a phone number and/or email? What standard CiviCRM names should I use? I have not found a list yet, and I've searched for a while...

If anyone had any idea, it would be awesome :) thank you in advance, and sorry for being a bit noobish.

# Answer
You must also install a CiviCRM extension on the other end - see this blog post for details.

Note that this plugin is NOT very mature, and isn't recently updated. Its killer feature is the ability to post data to a *remote* CiviCRM.

If the CiviCRM you're trying to post to is installed on the same WordPress site, then you'll want to use Caldera Forms with its CiviCRM integration. This is the plugin of choice for CiviCRM/WordPress developers and is receiving active support.
> 6 votes

# Answer
As JonG mentioned, this extension is developed to send ALL data on a Wordpress form over to a REMOTE CiviCRM. The receiving CiviCRM will then have to do something to receive and process the data. The organization we developed this with also has a customized CiviCRM native extension to process the data it receives.

If you are a developer and want to use this as a basis we would happily explain what is in the extension. If you are not I would not recommend using it. Go with the the Caldera Forms as JonG suggests.
> 2 votes

---
Tags: wordpress
---


# Question
Title: Should Manage Groups display the Smart Group contact count, or just display it as Unknown
When I run Manage Groups, the Smart Group contact count comes up as Unknown for each group. Clicking the *Update Smart Group Counts* link appears refreshes the group list, but still returns *Unknown*. This is after running the Refresh Smart Group cache job manually. CRM-21583 refers to this issue, but has been resolved as *Won't Do* as it seemed to have been related to an addin. We don't have that addin in our Joomla systems, but still have the issue.

My question is whether *Update Smart Group Counts* is supposed to update the counts displayed in *Manage Groups* or whether CRM-21583 should be resurrected?

# Answer
> 3 votes
The issue was solved very simply, you just need a non-zero smart group cache timeout for the problem to go away.

---
Tags: smartgroups, core
---


# Question
Title: Creating thank you letters redirects to a contribution page
I just had a report of someone who was trying to generate PDF thank you letters for recent contributions, and when they click "Make Thank-you Letters", instead of downloading a PDF they were redirected to a Contribution page on the front end.

That sounded bizarre, so I tested and it did the same for me. I can't think of any recent change on the site that could cause this. I just upgraded to the latest release (from 4.7.27 to 4.7.29) and cleared caches, but it didn't solve it.

Has anybody else seen this type of behaviour before? Where to start looking to figure out what's happening?

# Answer
There didn't seem to be anything related in the CiviCRM log (with logging turned on) or PHP error log. In the Apache error log there was a strange error:

```
AH01797: client denied by server configuration:
/home/username/public_html/sites/default/files/civicrm/custom/delete-this-MDH295Ww25

```

Permissions all seemed fine, however.

I ended up installing `wkhtmltopdf` and bypassing `dompdf` which isn't really a solution to the problem but is an alternative.
> 0 votes

---
Tags: pdf, redirect
---


title: How to load my page in a popup window?

text:
# Question
Title: How to load my page in a popup window?
I want to load my page (Generated by extension which is created by me) in a new popup window. Someone please tell me how to do this?

# Answer
> 3 votes
You can use "**crm-popup**" class. you just need to add this class to your a tag. just it!

Just like this:

```
<a href="{crmURL p='path' q="query"}" ... class="crm-hover-button crm-popup action-item">...</a>

```

For more information please follow the Documentation: https://docs.civicrm.org/dev/en/latest/framework/ajax/

---
Tags: webform-civicrm
---


title: Extensions directory error in 3.4.6

text:
# Question
Title: Extensions directory error in 3.4.6
After I enter my extensions directory and save, this message appears: "Public directory down or too slow - please contact CiviCRM team on forums." Appears the extensions directory on civicrm.org may have moved since 3.4 was released?

# Answer
That's entirely possible - CiviCRM 3.4 is about seven years old, and end-of-life support for it would have been about six years ago tops. An upgrade is strongly recommended; such an old version would be extremely insecure at this point.
> 2 votes

# Answer
The default extension directory is located at: `https://civicrm.org/extdir/ver={ver}|cms={uf}`

For instance: https://civicrm.org/extdir/ver=3.4|cms=drupal
> 0 votes

---
Tags: extension
---


# Question
Title: Can I disable Notify Activity Assignees for some Activities and/or user levels and leave it on for other Activities/user levels?
We're on Civi 4.6.21 and Drupal 7.

Under Administer -\> Customize Data and Screens -\> Display Settings there is a setting - "Notify Activity Assignees - When enabled, contacts who are assigned activities will automatically receive an email notification with a copy of the activity." - with a checkbox to enable the setting.

I want to be able to send e-mail notifications based on Activity type, or Activity Subject, or Campaign to which that Activity is linked, or Assigned To contact user level - so, for example, staff who are Assigned an Activity called Membership Signup (of a 'target' contact, the With contact) always receive an e-mail notification; but, volunteers who are Assigned an Activity of Card Signup, with Subject of Protect Puppies as part of a Campaign called Protect Puppies 2016, do not receive an e-mail notification of that Assigned Activity.

Sending e-mail notifications of Assigned Activities is really handy - but not desired in all use cases.

So - how can I disable Notify Activity Assignees for some Activities and/or user levels and leave it on for other Activities/user levels?

Thanks!

# Answer
The extension mentioned by Peter in the answer is now moved into core and can be used from 4.7.30 version. See https://issues.civicrm.org/jira/browse/CRM-21380

It introduces a new setting which blocks some activity types to send an email to the assignees.

To enable this, navigate to `Administer -> Customize Data and Screens -> Display Preferences` and select `Notify Activity Assignees` checkbox. It will then display a multi-select box to choose some activity type which you don't wish to send notifications for.
> 3 votes

# Answer
This is not available out of the box. It'd involve writing a new feature / extension.

It looks like the magic happens in the CRM\_Activity\_BAO\_Activity::sendToAssignee method. This method takes an activity object and an array of contacts to send the mail to.

So would involve a bit of coding, I'm afraid, but is a job that could / should be done "the right way \[tm\]". Which I will be so bold as to suggest is:

1. implement a hook to do the filtering, and rewrite some of the code that calls sendToAssignee so that it is aware of the hook
2. write an extension that with a UI that implements the hook so that configuration is easier and people don't have to write code each time they want to implement the hook.
> 2 votes

# Answer
Just come across this old question. I wrote a hook for this a while back that needs some attention. (Part 1 of Michael's answer)

If you can help review CRM-20638 and PR-10417 we can move this forward.
> 1 votes

# Answer
We have an extension for this now. It is going through some testing process, but since I stumbled on this I thought I should update here. Will add more when it gets published
> 1 votes

---
Tags: extension, email, activities, hooks
---


# Question
Title: I have 2 button (Register Now) for CiviEvent
I would like to add Events and Also website user and the public user could register for events. The problem is registration part: I have two registers now button on event page?

# Answer
Two "Register Now" buttons is by design.

When you add more info to the event such as a formatted description, a picture, a location map etc then the page can get quite large so the idea is that your users can easily get to a 'Register' button at the top and bottom of the page with minimal scrolling.

If you really don't want both buttons you can customise the event display. See various answers here on SE such as this

=== (Years later ...!)

One option is to go to `Administer > System Settings > Resource URLs`, in 'Custom CSS URL' enter `[civicrm.files]/css/extra.css`. Then create your `extra.css` file with the following content:

```
div.register_link-top {
  display: none;
}

```
> 1 votes

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


# Question
Title: what type of protocol and api connection is used for authorize.net
Authorize.net will disable older protocols, TLS 1.0 and TLS 1.1, which are highly vulnerable to security breaches. They will be disabled by Authorize.Net on February 28, 2018

What type of protocol and API connection does CiviCRM use?

# Answer
CiviCRM will communicate with AuthorizeNet using whatever versions of TLS are enabled on your server.

To see if your server is using TLS 1.2, go to https://www.ssllabs.com/ssltest and put in your url

in the Configuration section of the report it will list the TLS versions supported.
> 1 votes

---
Tags: authorize.net
---


title: Civi Event RSVPs

text:
# Question
Title: Civi Event RSVPs
Is it possible to show how many spots are available for RSVPs/registration for events as people are registering on the website (in real time)? For example, say someone wants to register for "X" event, they go to our calendar event on the website, see we have 2 spaces left available but they want to purchase 4 tickets. As of now, they have no way of knowing until they enter how many tickets they would like to purchase.

# Answer
> 2 votes
For sites using Drupal you should be able to get a view block showing on the info and/or registration page showing how many places remain - may require a bit of php in the view to do the subtraction of total places minus registered participants

---
Tags: civievent
---


# Question
Title: How does last authorize.net changes refer to CiviCRM
Lately I have received email stating that a few things are changing in Authorize.net payment. Among a few items (changing urls, longer ids, tls 1.1 force etc) one is:

> **RC4 Cipher Disablement** In an effort to ensure that all of your server-to-server communications with the Authorize.Net platform (both transactional and otherwise) maintain the highest levels of security, we will be disabling the RC4 cipher suite during the first half of 2016. A follow-up notification will be sent out once specific dates for the disablement are ready for the sandbox and production environments.
>
> For now, if you have a solution that relies on RC4 to communicate with our servers, please update it to a current, high-security cipher as soon as possible. Please review our API best practices blog post for more information.

I haven't been able to find anything mentioning rc4 in civicrm authorize.net payment processor. Does anyone know if this relates to CiviCRM?

# Answer
From my understanding, this has a lot more to do with your web server and the cypher suites that are configured than it does with CiviCRM directly. SSLLabs has a great page on getting all of that set up.

https://www.ssllabs.com/index.html
> 2 votes

# Answer
you can see more details about this at: https://civicrm.org/blog/yashodha/are-you-ready-for-tls-12-update-cant-escape-it
> 0 votes

---
Tags: civicontribute, contributions, authorize.net
---


# Question
Title: Contact Form 7 WP PLugin Shows Error when Info is submitted in form. The error is not present when Civi CRM is disabled
We have been using Contact Form 7 (wordpress plugin) on our page for years to take in responses from our listeners during our live radio show. Recently I am troubleshooting an issue involving the plugin and am hoping someone can help shine light on the cause.

WordPress Version:4.8.1 CiviCRM Version:4.7.17

Description of Issue: The form shows up correctly though it shows the error message below once you submit the info. The submitted info then makes its way to a specified email address which seems to be working correctly. There may be some emails that are not making it through as per some emails from our listeners.

Troubleshoot: I disabled all plugins and found that our Civi CRM plugin seems to be contributing to the issue. I have checked the base url and all seems defined correctly.

Other Factors: We did recently switch to SSL though all urls seem correct.

Error Message” “Sorry but we are not able to provide this at the moment. We can’t load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. Error type: Could not find a valid session key.”

Any suggestions would be appreciated. Thanks!

# Answer
> 1 votes
This is really digging back into the cobwebs for me but... I had a very similar problem that I think popped up when we set up SSL. I think that in the Form settings, under the Mail tab, I had to remove the To & From mail-tag and just use my actual email address. I may have ended up deleting the current form and creating a new one.

# Answer
> 1 votes
Did you try to use caldera form? I think caldera form familiar because It can send result directly to CiviCRM.

---
Tags: wordpress, civicrm-home
---


# Question
Title: Can I link memberships to relationships automatically?
I'm using CiviCRM to manage sponsors of children in India for an NGO. I'm configured it and set up some custom fields in order to have the children(contact) connected to the membership.

So far so good, I can generate reports to see payments due, etc.

The problem is, I can not work the other way around, that is, seeing which children don't have sponsors.

My guess to solve this was to use Relationships, as I could then report and filter on that. But I've not been able to automatically create a relationship between sponsor-child when adding the membership. (doing it manually would be really tiring for the people who manage this).

Is it possible? Any other ideas on how I could go about this?

thanks in advance

# Answer
> 1 votes
You can set type of relationship to be used for a membership type. So when a membership is purchased the contact will have relationship with the organization automatically and also will be set to inactive when membership is expired or cancelled.

You can also check documentation for more information at https://docs.civicrm.org/user/en/latest/membership/defining-memberships/ (search keyword - Relationship Type)

# Answer
> 0 votes
If you are using Drupal then you can create Relationships at same time as Membership purchase via the Webform CiviCRM module

---
Tags: civimember, civireport, relationships
---


title: Automating CiviCRM?

text:
# Question
Title: Automating CiviCRM?
What kind of features and extensions are available for automating different tasks in CiviCRM?

I currently know of "scheduled reminders", CiviRules, and CiviCase.

I am looking for stuff that performs tasks like: if A happens, then perform B.

# Answer
You summed it up with

> "scheduled reminders", CiviRules, and CiviCase.
> 1 votes

---
Tags: workflow
---


# Question
Title: can't edit Contact Details for records with a custom subtype (Error: One or more contact subtypes have been de-selected from the list ...")
I first posted this issue under another question (after upgrade, can't edit Contact Details fields (Custom Addressee and de-selected subtypes errors)) thinking two separate issues were related. But apparently they aren't. Since a kind soul correctly solved one of my issues, I marked his answer accepted. But one issue still isn't resolved, I decided to open a new question just for it.

I have upgraded a site from an older CiviCRM version (4.4) to 4.7.29. And now I can't edit the Contact Detail fields for any record with a specific custom subtype.

I have a type named "Member", which is a subtype of the "Individual" contact type. When I open one of these records in the backend, I get the following warning:

```
"One or more contact subtypes have been de-selected from the list for this contact. Any custom data associated with de-selected subtype will be removed as long as the contact does not have a contact subtype still selected. Click OK to proceed, or Cancel to review your changes before saving."

```

If I click "OK" to continue saving, the record does save -- but all of the data associated with the custom subtype "Member" is deleted.

Here's what I know so far:

-- This problem only occurs with the one custom subtype I've created. Other custom subtypes under "Organization" don't have this problem.

-- This problem only occurs in the administrative backend contact record screens. Profiles that are used in the website frontend update all details for this contact subtype without problems.

-- The custom subtype does appear correctly in the "Contact Type" field for the record.

-- Searching for contacts with this contact subtype works correctly and returns all the right data.

-- Creating a new record of this subtype works just fine. However, afterwards trying to save the new record has the same problem.

-- I've confirmed this error is thrown by the file /civicrm/templates/CRM/Contact/Form/Contact.tpl where the Javascript does this check at line 228:

```
{if $oldSubtypes}{literal}
    $('input[name=_qf_Contact_upload_view], input[name=_qf_Contact_upload_new]').click(function() {
      var submittedSubtypes = $('#contact_sub_type').val();
      var oldSubtypes = {/literal}{$oldSubtypes}{literal};

      var warning = false;
      $.each(oldSubtypes, function(index, subtype) {
        if ( $.inArray(subtype, submittedSubtypes) < 0 ) {
          warning = true;
        }
      });
      if ( warning ) {
        return confirm({/literal}'{ts escape="js"}One or more contact subtypes have been de-selected from the list for this contact. Any custom data associated with de-selected subtype will be removed as long as the contact does not have a contact subtype still selected. Click OK to proceed, or Cancel to review your changes before saving.{/ts}'{literal});
      }
      return true;
    });
    {/literal}{/if}

```

So.....it seems that one of my legacy custom contact types is no longer recognized by **some** part of CiviCRM, but it **IS** still recognized by some parts of CiviCRM? Help!

# Answer
> 1 votes
It seems to be problem with data how its saved in database. The settings for Custom group might have been corrupted during upgrade or some scenario are not being handle during upgrade. To debug or fix this you will need to do some troubleshooting

1. Check each Individual and sub types custom groups and re save the settings for each such custom groups so that the settings are saved correctly.
2. Check when updating contacts does the data from all custom data gets deleted or only the subtypes
3. Check if Contact subtype are pre populated correctly on edit screen of contact and also Custom group fieldsets gets loaded of subtype and non subtype.
4. Put debug statements to check what values are loaded in smarty variables for `$oldSubtypes`

HTH

Pradeep

---
Tags: contacts, error, sub-types
---


title: Add transaction to reopened batch

text:
# Question
Title: Add transaction to reopened batch
How do I add a transaction to a reopened batch? The batch is expecting 20 transactions and only has 19

# Answer
> 1 votes
Its a same procedure to assign transaction to reopen batch as of open batch by visiting the transactions list page of batch and then selecting and assigning transactions to batch. The number of items or total amount in batch doesn't matter and it does get updated automatically once a batch is closed. But some organization prefer to have exact count so that it matches with their accounting integration with Quickbooks or Great plains etc

Ref: https://docs.civicrm.org/user/en/latest/contributions/accounting-integration/

HTH

Pradeep

---
Tags: civicontribute, batches
---


# Question
Title: How to set up 'renewal reminders' 5 days after renewal, and filter by a group
I want to send a note to users that renewed their membership. I want to limit that note to only a certain group of members. I thought I would use 'renewal reminders'.

In a renewal reminder, if I choose 'membership' as the entity, there is no trigger for 'renewal date', only for 'start date' and 'end date'.

But if I choose 'activity: membership renewal: completed', I can not limit the recipients (presumably the targets of the activity) to a certain group. There's just no such option.

Any suggestions on how I could do this ?

To clarify: We have several groups of members, and I want to send each renewing member a thank you note specific to his/her group

# Answer
I spent some time looking through the source code and the history of this feature. After review, I think you're best off trying to implement this via CiviRules instead.

* Your CiviRules trigger should be "Activity added", not membership-related. Otherwise you run into similar limitations as the Scheduled Reminders approach.
* Your conditions can be "Activity is of type: Membership Renewal" and "Contact is in Group: X".
* You'll also need to install the Email API extension so you can add an action of "Send Email".
> 3 votes

---
Tags: civimember, groups, scheduled-reminders, 4.7.27
---


# Question
Title: Error when installing civicrm-4.7.29-drupal on Drupal-7.56
when I install civicrm-4.7.29-drupal on Drupal-7.56 just using one database for drupal an civicrm the installation runs perfectly without any errors. If I use two databases for drupal and civicrm I get the following error message: CRM\_Core\_Exception: Found installation canary. This suggests that something went wrong with tracking installation process. Please post to forum or JIRA. in Civi\Core\InstallationCanary::check() (line 53 of /\[my website\]/sites/all/modules/civicrm/Civi/Core/InstallationCanary.php). What did I do wrong? Or is it a bug? Best, Frank

# Answer
> 1 votes
I came accross this error a few weeks ago and it indicates that you are trying to install CiviCXM into a drupal environment which already contains an installed version of CiviCRM.

---
Tags: drupal, database, installation
---


# Question
Title: How to use a different theme for a contribution page using Drupal
The ability to use a mobile friendly theme for a contribution page is vital these days. I used 'Themekey CiviCRM' along with Themekey which worked for a while but doesn't anymore. Fixing that would be good but it seems a bit of a cludge. Isn't there a better solution for this common requirement? Or should I be using a webform rather than the contribution page? I'm using 'Seven' as the normal theme for the back office functions, and don't want to use a different theme for ALL public pages as then CiviVolunteer pages are themed differently. On 4.7.24 and Drupal.

# Answer
Themekey does indeed support this, as long as you are using Drupal. I couldn't get this to work until I found that as well as creating a record of the page and the theme you want to use, you have to do a bit more. You must have 'Themekey CiviCRM Integration' installed and you have to first go to Configuration/Themekey/Settings/Compatability then check 'CiviCRM Theme (Define alternate themes for CiviCRM.)' See also my comments.
> 1 votes

---
Tags: drupal, civicontribute, 4.7, theme
---


# Question
Title: Outbound email configuration. Different sending addresses with different servers
We have an issue to solve to operate as well in our Country (Italy).

Any organization in our Country must use Certified Email (https://en.wikipedia.org/wiki/Certified\_email) to send fiscal and official requests to public organization. This create a config problem inside CiviCRM, which I try to explain:

1. we must use more than one address to outbound email
2. the normal address can send all, using the normal and easy configuration
3. the Certified Email address must use IMAP and the specific server to send messages
4. we didn't find a possibility to configure this difference
5. there are more than these problems to manage inbound email.

Any idea to solve it? TIA

# Answer
I am not sure if all this is possible in current version of CiviCRM

```
#1 - Yes, one can define and select From Address for sending emails.

#2 - CiviCRM sends email using settings defined in Outbound Settings.

#3 - There is no such way where one can specify outbound settings based on from address. But this is possible by creating extension that would create a settings page for each from address to save in civicrm_setting table and then have [hook][1] to alter the mailer setting before sending emails.

```

But i would still prefer you to wait for other people to provide solution.

HTH

Pradeep
> 1 votes

# Answer
If I understand you correctly you need to *determine routing of some outbound email based on the recipient*. This is not a core functionality of CiviCRM.

## Outbound, by extension

CiviCRM allows extensions to implement hooks, and I think for your needs the appropriate hook would be `hook_civicrm_alterMailer()`.

> This hook is called when CiviCRM prepares an email driver class to handle outbound message delivery.

The documentation linked above for this hook gives example code to deliver emails to a logfile instead of via SMTP. Creating an extension which implements this hook and routes email to your CEP server when required would hopefully deliver the outcome you need. If open-sourced, this would be available to other organisations with the same requirements, which is a great outcome.

## Outbound, in MTA

Some mail servers (MTA) allow you to customise routing based on destination. If you control your hosting environment, you might be able to instruct an MTA to route emails for some recipients to be delivered via one channel (SMTP to a specific CEP service, or add headers to CC/sign per requirements), and others via default SMTP routing. An MTA could query for the correct behaviour based on destination email against CiviCRM's HTTP API.

## Inbound

If you need to handle this on the inbound channel (when your organisation receives email), it's possible to configure multiple mailboxes to check in CiviCRM. This is done at **Administer \> CiviMail \> Mail accounts** and has documentation in CiviMail incoming mail setup and CiviCRM inbound mail documentation.
> 1 votes

---
Tags: civimail, configuration
---


title: Navigation menu is not loading

text:
# Question
Title: Navigation menu is not loading
I have just upgraded to 4.7.29.

When i go to manage\>screens\>navigation menu... the navigation menu won't load. It keeps loading. What can i do to resolve this?

error log when I try to rebuild:

\[info\] $ManagedEntities\_failed = Array ( \[entity\] =\> RelationshipType \[action\] =\> create \[params\] =\> Array ( \[version\] =\> 3 \[name\_a\_b\] =\> Case Coordinator is \[name\_b\_a\] =\> Case Coordinator \[label\_a\_b\] =\> Case Coordinator is \[label\_b\_a\] =\> Case Coordinator \[description\] =\> Case Coordinator \[contact\_type\_a\] =\> Individual \[contact\_type\_b\] =\> Individual \[contact\_sub\_type\_a\] =\> \[contact\_sub\_type\_b\] =\> )

```
[result] => Array
    (
        [error_code] => already exists
        [sql] => INSERT INTO civicrm_relationship_type (name_a_b , label_a_b , name_b_a , label_b_a , description , contact_type_a , contact_type_b , is_active ) VALUES ('Case Coordinator is' , 'Case Coordinator is' , 'Case Coordinator' , 'Case Coordinator' , 'Case Coordinator' , 'Individual' , 'Individual' ,  1 )  [nativecode=1062 ** Duplicate entry 'Case Coordinator is' for key 'UI_name_a_b']
        [tip] => add debug=1 to your API call to have more info about the error
        [is_error] => 1
        [error_message] => DB Error: already exists
        [debug_information] => INSERT INTO civicrm_relationship_type (name_a_b , label_a_b , name_b_a , label_b_a , description , contact_type_a , contact_type_b , is_active ) VALUES ('Case Coordinator is' , 'Case Coordinator is' , 'Case Coordinator' , 'Case Coordinator' , 'Case Coordinator' , 'Individual' , 'Individual' ,  1 )  [nativecode=1062 ** Duplicate entry 'Case Coordinator is' for key 'UI_name_a_b']
    )

```

)

Dec 31 14:48:09 \[info\] $Fatal Error Details = array(3) { \["message"\]=\> string(35) "API error: DB Error: already exists" \["code"\]=\> NULL \["exception"\]=\> object(Exception)#10841 (7) { \["message":protected\]=\> string(35) "API error: DB Error: already exists" \["string":"Exception":private\]=\> string(0) "" \["code":protected\]=\> int(0) \["file":protected\]=\> string(90) "/home/kmdero1q/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php" \["line":protected\]=\> int(456) \["trace":"Exception":private\]=\> array(13) { \[0\]=\> array(6) { \["file"\]=\> string(90) "/home/kmdero1q/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php" \["line"\]=\> int(234) \["function"\]=\> string(10) "onApiError" \["class"\]=\> string(24) "CRM\_Core\_ManagedEntities" \["type"\]=\> string(2) "-\>" \["args"\]=\> array(4) { \[0\]=\> string(16) "RelationshipType" =\> string(6) "create" \[2\]=\> array(10) { \["version"\]=\> int(3) \["name\_a\_b"\]=\> string(19) "Case Coordinator is" \["name\_b\_a"\]=\> string(16) "Case Coordinator" \["label\_a\_b"\]=\> string(19) "Case Coordinator is" \["label\_b\_a"\]=\> string(16) "Case Coordinator" \["description"\]=\> string(16) "Case Coordinator" \["contact\_type\_a"\]=\> string(10) "Individual" \["contact\_type\_b"\]=\> string(10) "Individual" \["contact\_sub\_type\_a"\]=\> NULL \["contact\_sub\_type\_b"\]=\> NULL } ....

# Answer
> 1 votes
What version of CiviCRM are you using? Can you check for any Javascript error on browser?

Try rebuilding menu by running /civicrm/menu/rebuild?reset=1 or clearing CiviCRM cache.

# Answer
> 1 votes
My status on this forum would not allow me to add a comment to the original question, though my earlier 'answer' seems to have given me the points to now do so, so I have removed my earlier 'me too' answer.

We too were seeing this issue. However, our error was somewhat different. In addition to the menu screen not loading, we were also seeing an inability to create or edit mailings, load the status page, or load the icons in the menu.

Our error looked more like this:

```
$Fatal Error Details = array(3) {
  ["message"]=>
  string(23) "DB Error: no such field"
  ["code"]=>
  NULL
  ["exception"]=>
  object(CiviCRM_API3_Exception)#254 (8) {
    ["extraParams":"CiviCRM_API3_Exception":private]=>
    array(6) {
      ["error_code"]=>
      string(13) "no such field"
      ["sql"]=>
      string(1021) "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`, a.limit_listings_group_id as `limit_listings_group_id`, a.post_URL as `post_URL`, a.add_to_group_id as `add_to_group_id`, a.add_captcha as `add_captcha`, a.is_map as `is_map`, a.is_edit_link as `is_edit_link`, a.is_uf_link as `is_uf_link`, a.is_update_dupe as `is_update_dupe`, a.cancel_URL as `cancel_URL`, a.is_cms_user as `is_cms_user`, a.notify as `notify`, a.is_reserved as `is_reserved`, a.name as `name`, a.created_id as `created_id`, a.created_date as `created_date`, a.is_proximity_search as `is_proximity_search`, a.cancel_button_text as `cancel_button_text`, a.submit_button_text as `submit_button_text`
FROM civicrm_uf_group_en_US a
WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1")
LIMIT 25
OFFSET 0
 [nativecode=1054 ** Unknown column 'a.cancel_button_text' in 'field list']"

$backTrace = #0 /civicrm/CRM/Core/Error.php(456): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /civicrm/CRM/Core/Invoke.php(55): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))
#2 /civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#3 /var/www/vhosts/docorg.ca/httpdocs/includes/menu.inc(527): civicrm_invoke("ajax", "l10n-js", "en_US")
#4 /var/www/vhosts/docorg.ca/httpdocs/index.php(21): menu_execute_active_handler()
#5 {main}

```

Investigation lead to an existing (resolved) issue in the CiviCRM issue queue: "4.7.28-rc: needs to call rebuildMultilingualSchema()" https://issues.civicrm.org/jira/browse/CRM-21481

In our case, we were still getting the error after an update from 4.7.27 in 4.7.29 on Drupal 7 - our site is multilingual English and French.

The solution for us, as suggested in the issue, was to manually call a rebuild of the multilingual schema using the following drush command:

```
$ drush php-eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_FR"], NULL);'

```

There is a WordPress option as well, find the info here: https://gist.github.com/mlutfy/647e6325a09079e4f08f273af64900d9

* note, we needed "fr\_FR" not "fr\_CA" as in the example, replace with whichever language code you have enabled.

Unfortunately, if you're not running a multi-lingual site, I'm not sure what to suggest.

---
Tags: menu
---


title: How to listen to country select change

text:
# Question
Title: How to listen to country select change
How can I listen in JavaScript to the event of a country value change on the country select field?

both #select2-drop-mask and #select2-drop are not available until the user clicks to open the select.

and the hidden select #country-5 is not firing the change event as its values are set programatically.

This question was asked here but has a wrong answer.

Thank you

# Answer
Try below code:

```
  CRM.$(function($) {
    $('#billing_country_id-5').change(function () {
      var countryId = $(this).val();
    });
  });

```

HTH

Pradeep
> 5 votes

# Answer
In general, when you want to listen to an event on a select2 you place the listener on the original form element (which is either an `<input>` or a `<select>`). When inspecting the dom, you'll see it close to the select2 div, hidden because it has the `select2-offscreen` class.
> 2 votes

---
Tags: select2
---


# Question
Title: Enabling Group description field for webforms
The group description field is visible when using a profile for mailing sign ups.

Does anyone know of a way of including these in a civi enabled webform?

Ta!

# Answer
> 2 votes
The Drupal Webform (core) module does not natively support descriptions of individual checkboxes or select options, so there isn't a built-in way to achieve this. A workaround would be to type the description in yourself by changing "Live Options" to "Static Options" and placing the description in parentheses after the title.

---
Tags: webform-civicrm, groups, gdpr
---


# Question
Title: Upgrade Does Not Pass [Executed: Begin Upgrade to 4.7.19]
I am trying to upgrade from 4.7.18 to 4.7.29. I am doing this on a development server and I have created a sub-domain for it and made sure that the site is running before I attempt to do the upgrade.

I have tried the upgrade several times (having restored the database and reset paths) and I still get stuck at the begging saying - \[Executed: Begin Upgrade to 4.7.19\].

The url I am at is `https://[subdomain].[domain.org]//civicrm/upgrade/queue/runner?reset=1&qrid=CRM_Upgrade`

I have PHP 7.0.22 on my test server and MySQL 5.7.21. Basically, what comes out the box with an Amazon Ubuntu AMI.

Thanks, Josh

# Answer
I used `drush civicrm-upgrade-db` and it appears to be working perfectly.

I had already put the 4.7.29 files in /sites/all/modules/civicrm so only the database had to be upgraded.

-Josh
> 1 votes

---
Tags: upgrade
---


# Question
Title: CiviMail and Sparkpost Bounces Not Updating email address "On Hold"
We have been using the SparkPost extension (civi desk) about a month and it is sending emails fine. However, it may not be processing bounces completely and/or I do not understand how it works. If we get a hard bounce should the contact's email address be placed "On Hold"? I am getting bounces documented in the CiviMail Reports for a mailing. The only bounce type I see in these reports is "Syntax". These emails are not getting placed "On Hold". Should they be placed on hold automatically?

# Answer
There's a forum discussion here which I think helps towards the answer. If you look at the table civicrm\_mailing\_bounce\_type there's a threshold of 3 for bounce type 'Syntax'. I just encountered a bounce for type 'Host' that didn't place the email address on hold, so was also concerned as to why. The answer is in this table.
> 1 votes

---
Tags: civimail, bounce, sparkpost
---


# Question
Title: Idea for extension Someone Else Pays - any feedback?
We are thinking about creating a native CiviCRM extension Someone Else Pays.

In CiviCRM you could use the soft credits (with a new soft credit type) to register another contact pay for an event registration, a membership and in theory any contribution.

Our customer Domus Medica is using that at the moment. We encounter some issues though. Some of the issues are possibly bugs but some are also because we think soft credits is originally not meant to cater for this. It was meant to cater for soft credits. So we prefer to create an extension rather than fix a few issues in a hackish way and then finding out we have some more.

At this point in time our thinking would be to:

* generate a new table (sep\_contribution\_payer) where the contribution\_id and the paying contact\_id are stored if there is a different payer
* add a new collapse window on the contribution forms (also membership and event registration) to show this link if it is there, and enable the setting of 'someone else pays' in the UI
* create API's (get, create, delete)

Any comments, suggestions, tips, offers to co-fund?

# Answer
Here's how we get someone else to pay! This is an Example of an Event Registration:

1. Primary Contact -\> and 4 Participants; Key is: register each Contact separately;

2. Use Conditionals to help with how many # participants fields you need - and configure the Events webform elements - to be a checkbox for the Primary Contact;
3. End result: if Primary Contact (in this example often a Director of a ChildCare program) is simply registering and paying for Staff to attend a Conference -\> the Director pays and all the Participants are added.
4. Example: KarinG will register Karin G: KarinG has paid - but has no Events:
5. Karin G is the Participant but has no Contributions:
6. Receipting? Does it work? Almost -\> the person who paid (KarinG) gets a transaction receipt showing those who have been registered (Karin G) \[triggered via the API - sendConfirmation to be exact)
7. And what about sending a Confirmation to the Participants that their Director has signed them up. That works too - with a little help from... CiviRules! Trigger: participant add; All I needed to do was write a small custom module to generate some participant tokens;

8. Ok what does not work as well yet -\> CiviCRM native is a bit confused about Payments; and the invoicing is a bit off -\> it should really look much like the receipt that you can get at with sendConfirmation - but you can't. It's not clear at all that KarinG paid for Karin G to go to the Conference - Fuzion has helped make this work - by adding a Participant Name to the LineItem before webform\_civicrm uses the lineItem API to create the lineItems:
9. What really does not work is -\> if you sign up more than 1 Participant -\> their Event Participant View -\> shows the total $ for all the participants - not just for their lineItem (so CiviCRM native thinks that each single participant is owed a refund);
10. If I were tasked to do this in an Extension -\> use the APIs that webform civicrm uses to get this registered by functionality up and running; no extra table required; use the registered\_by -\> to properly link payments and event registrations; Extend the registered\_by at the Event level to the Membership level -\> (that would be a gift membership e.g.);
> 2 votes

# Answer
Why are you saying that soft credit isn't meant for it? It's already used to link a contribution to both the individual donor and the organisation that paid for instance, is your use case very different?

See for instance this blog post, what you want to do seems to be conceptually covered, and if there is a bug/UI issue, it could be fixed in the core.

I see the value of having a more tailored extension and it might make sense in your case, but your underlying assumption sounds awfully like "there are bugs in the core, so let's not use the core and write something else"

If the long term plan is to remove soft credit from the core and have it as an extension, it might make sense, but if there is no such plan, you will end up with lots of more of less buggy solutions that do roughly the same thing and it's something that will make it harder to adopt civi and hurt it growths.

Lastly, are the problem you experience linked to how soft credit works, or is this more a problem of separating who pays vs who benefits (is the participant or member)?
> 0 votes

---
Tags: civievent, civimember, extension, payment
---


# Question
Title: Drupal Views and CiviCRM on same database not working
I have CiviCRM 4.7.28, Drupal 7.56 and Views 7.x-3.18 and have CiviCRM and Drupal in the same database.

I have read in the documentation that Views should work out of the box, and most of the issues relating to CiviCRM and Views is to configure setup if CiviCRM and Drupal are on different databases.

Any tip much appreciated!

# Answer
Perhaps you missed this step: https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/

> 1. Before making any changes, it is strongly advised that you make backups of your mysql databases and settings.php file.
> 2. If you have different database users for your CiviCRM and Drupal databases, then you need to grant SELECT access for the Drupal user to all the CiviCRM tables.
> 3. Make sure you are logged into your Drupal site as the administrator.
> 4. Visit http://example.org/civicrm/admin/setting/uf?reset=1
> 5. You should see a page with output that begins with: `$databases['default']['default']['prefix']= array(`
> 6. Copy this setting output, including the trailing `);`
> 7. Open `/sites/default/settings.php` for editing from the root directory of the site, typically `public_html` on most servers.
> > Note: This assumes you have a single site installation. The location of the settings file might be different depending on whether or not you have multiple sites
> 8. Find the database connector array. This is where Drupal stores the information regarding the MySQL database and the necessary credentials to connect to it. The array beings with `$databases = array (` then goes on to include the location and MySQL credentials, as well as additional options.
> 9. Paste your previously-copied settings output here. Be sure to paste it after the trailing `);`
> 10. You may need to indicate the default prefix. If you see an error \[like\] `PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kckruppc_every.semaphore' doesn't exist: SELECT ...` You need to include an additional line, `'default' => '<drupaltableprefix>'`, in your settings.php just after `$database ['default']['default']['prefix']= array(`. …
> 11. Save the file. You might want to clear your site cache at this point.
> 12. You should now be able to create views based on CiviCRM data.
> 2 votes

# Answer
As a test you could install the CiviCRM Entity module, that provides views integration in a different way than core. If that doesn't work then something strange is happening for sure
> 0 votes

# Answer
Like KarinG said, there is a step needed to tell Drupal about CiviCRM's database tables. That is described at https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/. This involves editing your Drupal settings.php file and pasting code provided by CiviCRM.

This has worked well for me, and I have this working on a live site right now. Some of the queries you can run with this in Views are a bit limited compared to native Drupal node queries, but it does work.
> 0 votes

---
Tags: drupal-views
---


# Question
Title: CiviCRM Contact Information Merging and Overriding Unrelated Users/Donors
Ok, I am going to try and explain this as best I can:

I am working with nonprofit to help export their donors for last year, but some of the contacts have their own email address listed as well as another individual's email address that is completely unrelated. Sometimes the address information is completely different as well.

It looks like it has been merging/overriding the contacts based on their first names, but it doesn't do that for everyone with the same first name.

They set their event registration duplicate matching rule to "Name and Address (reserved) - General" and I'm think that may have something to do with the merged contacts? My customer isn't manually merging duplicate contacts, so that's where some of the confusion lies as well.

They also have online contributions setup, so CiviCRM is also merging/overriding the information used when making contributions if it's different than what is already showing in the contact record.

Here are a couple of examples:

1. Billy S recently donated $25 - in his CiviCRM contact record, his home email is listed as xxx@beverly-hanks.com and personal email as yyy@gmail.com
2. Katherine (Kathy) V recently donated $1,000 online - in her CiviCRM contact record, her home email is listed as xxx@ywcaofasheville.org and her billing email is yyy@gmail.com

\**In both of these cases the "home email" is incorrect but the personal or billing email is correct.

---

This example is the one that is actually combining 4 different contacts with the first name of "John", but only one John now exists as a contact in CiviCRM:

John M donated $100 on Oct 30, 2017

John V donated $1,000 on Dec 6, 2017

John W donated $250 on Dec 22, 2017

John R donated $1,000 on Dec 31, 2017 *(this is the only contact that is now showing in CiviCRM, but it includes all 4 of those donations)*

Each of these donors received their receipts to their own email addresses confirming their contribution.

Now, when we pull a report, only John R's name is listed and he's listed as giving 4 times:

10/30/2017 16:25 - $100.00

12/6/2017 22:21 - $1,000.00

12/22/2017 7:32 - $250.00

12/31/2017 10:35 - $1,000.00

When searching contacts in CiviCRM, John R's name is the only one that comes up. When searching by email addresses, only John R's email "exists" in the system.

So, is this all related to the dedupe rule that has been used for events that these donors have also signed up for?

Or is it something else entirely?

Any assistance with this would be GREATLY appreciated!

And if you need any further clarification, just let me know because I know this is very confusing and difficult to fully explain :)

Thank You!

# Answer
Oh dear, yes that sounds like things are in a mess. Some suggestions

1. It sounds like you need to review the Dedupe Rules that are set up and in use. That should include checking that the 'threshold' has been set correctly
2. You should check if logging is turned on (civicrm/admin/setting/misc?reset=1) and hope that it is as that should let you use the Change Log tab to try and identify and restore changes
3. if you have access to the db and have access to some sql skills then you may be able to repair some of the problems
> 1 votes

---
Tags: civievent, drupal, civicontribute, contacts, duplicate-contacts
---


# Question
Title: Support for crypto-currencies like Bitcoin
Our organization would like to start taking donations in the form of bitcoin. Is there any functionality out there I can use to integrate this within a CiviCRM-generated contribution page? Thanks for any help.

Using 4.7.29 on Wordpress 4.9.2

# Answer
> 1 votes
You can use the BitPay payment processor.

---
Tags: civicontribute, payment-processor, payment
---


title: civibuild create is not working/frozen

text:
# Question
Title: civibuild create is not working/frozen
is there any alternative? that I can use to install Drupal+CiviCRM development environment. taking too long it(in screenshot) took 2 hours.

# Answer
Thanks my Problem has been solved! I have used this technique to solve this Problem:

I wanted to use `./bin/setup.sh -g` this command to generate sql and DAO, for that what I did is:

Just downloaded civicrm-core from GitHub and then patched with an installation of CiviCRM drupal module.

**How I did patch this: (in Ubuntu)**

I have just mixed/merged civicrm-core and CiviCRM's drupal module in one directory.

and then I have just configured civicrm-core/bin/setup.conf by copying setup.conf.txt with my real installation of CiviCRM database information.

that's it configuration success.

now I can use `./bin/setup.sh -g` while i am on civicrm-core-master directory.

to generate sql and DAO please read **carefully carefully** every step from here: https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-entity

If you are having any difficulties please comment down below, I will be glad to help you.

Thanks.
> 0 votes

# Answer
You might try a CiviBuild in Docker. See https://github.com/michaelmcandrew/civicrm-buildkit-docker for the link and how to install it.
> 1 votes

# Answer
I use FTP and upload all the files and then run the installer.

https://www.drupal.org/docs/7/installing-drupal-7/step-1-download-and-extract-drupal

I do the same with CiviCRM

https://docs.civicrm.org/sysadmin/en/latest/install/drupal7/
> 0 votes

---
Tags: drupal, extension, civibuild
---


title: CiviContribute link to database error

text:
# Question
Title: CiviContribute link to database error
I recently moved our CiviCRM database to a new host and I'm getting a "DB Error: unknown error" on when testing the payment processing. Have a missed a configuration step?

Many thanks.

# Answer
This can happen if triggers aren't stripped from the db dump before you read it in to your db. This requires running something like

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

```

Where "dumpfile" needs replacing with the name of your db dump.
> 1 votes

# Answer
Try after rebuilding menu and triggers

```
http://yourdomain.org/civicrm/menu/rebuild?reset=1&triggerRebuild=1

```

HTH

Pradeep
> 1 votes

---
Tags: civicontribute
---


# Question
Title: Automated email after event registration
We have an email with instructions about our event, information to help you prepare, hotel information, etc. Currently we're adding it all to the receipt, which makes for a very long message. We'd rather have it sent out as a separate message. Especially seeing as some of our events have different information and we have to include everything in one message, even if it doesn't apply to that event.

Is there a way to have an automated message that goes out after a registration that is not the receipt? Or a way to add to the reminder emails the option for a **certain amount of time after registration**, not time before/after the event?

Thanks!

Oh, I'm on Drupal 7 and CiviCRM 4.7.29

# Answer
You can use Scheduled Reminders (**Administer\>Communication\>Scheduled Reminders**) to automatically send an email based on an event type, or even event name.

Alternatively you can use the CiviRules extension(extension found here: https://civicrm.org/extensions/civirules and documenation here: https://docs.civicrm.org/civirules/en/latest/) to do achieve this.
> 3 votes

# Answer
Not tried, just a thought:

You are using an Event Page, so can you make a contribution type reminder which triggers some hrs(eg 2) after the `receive_date`?

By this, When a new event registration happens, a contribution is recorded for the contact and after 2 hrs - the reminder mail would be triggered containing stuffs for preparation, etc.

Note that this would send reminder for every contribution with financial type = `Event Fee` (selected in the second multi-select box) financial type. If you want to avoid that, you might need to create a custom financial type from `Administer -> CiviContribute -> Financial Type` for this Event Page.

If the above doesn't work, maybe you should proceed in writing an extension and use postProcess() hook on Event confirm page and send a mail using a custom message template.
> 0 votes

---
Tags: civievent, civimail
---