title: Contact Dedupe Basics

text:
# Question
Title: Contact Dedupe Basics
I'm new to CiviCRM and I'm trying to help a non-profit clean up what looks to be a very large number of duplicate contact entries. I have searched this site and a few other resources and I have a grasp on the process, as I understand it. While I'm new to CiviCRM, I have worked with many other database and CRM solutions. Here are the two questions I have:

1) What are dedupe exceptions? While most things related to CiviCRM and dupe are well documented, I've not located an explanation for this. I assume it is some sort of white list of possible dupe contacts? What happens when I remove the exception? Do they become "eligible" for the dedupe rules engine?

2) None of the General rules that have been setup will work. The Supervised/Unsupervised rules work just fine when I use them manually. What I'm experiencing is basically a very long period where I'm waiting on the database followed by an unable to perform at this time message. Any thoughts on using General Rules. I have tried various approaches but basically trying to match on 3-4 fields. I understand the weight/threshold approach but it doesn't seem to be linked to that as much as to General rules. None of the rules I have setup nor the ones that existed before me seem to work as General rules.

Thanks in advance and please take it easy on a noob. :)

Dave

# Answer
> 2 votes
Dedupe exceptions are those contacts that have been flagged as potential duplicates, but someone clicked the "Not a Duplicate" link next to them. If you remove the exception, they can be considered duplicates again.

CiviCRM has two kinds of dedupe rules - those that you build and some pre-built rules that give much better performance. Many of the default supervised/unsupervised rules are pre-built rules. The rules you're building are timing out. To deal with this, try increasing the server's PHP timeout or reducing the complexity of your rules. Also - dedupe has received a lot of love in recent months, so consider upgrading CiviCRM to the latest 4.7 for a performance boost.

If you're handy with SQL and want to write a "pre-built" dedupe query, the hook is `hook_civicrm_dupeQuery`. Veda's dedupe extension is outdated and may not work on current versions of CiviCRM but has a large number of high-performance dedupe rules.

---
Tags: duplicate-contacts
---


# Question
Title: What differences are there between CiviCRM 4.6 and 4.7?
We're trying to make the decision to upgrade from 4.6 to 4.7 and would like a complete list of changes between the two. Does such a document exist? I can't find anything except blog entries about point releases. Is there any point upgrading to 4.7?

I'm not a Civi enthusiast, I just maintain a large installation.

# Answer
> 6 votes
The performance improvements to move from 4.6 to 4.7 when you have a large installation is, in itself, worthwhile (we did it when we had about 500k contacts, we would have done it earlier if we'd known how much faster some things were). If you go for a big upgrade, I recommend you to move to php7 too.

As for the features, this blogs list a few, but it's more than a year old.

Since January last year, the bunch of the new features and developments have happened on 4.7, both in the core and in extensions. Whatever need or problem you are, it's way more likely someone else has already sorted it out or is working on it in 4.7, not in 4.6.

And in any open source project, being where the community is is in itself a good reason enough to go through a major upgrade.

---
Tags: drupal, 4.7, 4.6
---


# Question
Title: Validating emails of new CiviCRM accounts?
We are offering CiviCRM to Indivisible working groups and we have a concern that the unauthenticated registrations are going to be a problem. We're pretty sure that the ability to create an account without responding to an opt-in email will get targeted by trolls, since this movement is focused on very contentious political issues.

Our platform is cPanel/WHM, Wordpress, and CiviCRM. We're pretty familiar with Wordpress and want it for the public dialog features it offers. We would not consider a switch to Drupal. We own the cloud provider we use, we're familiar with DNS, email, Linux, MySQL administration, PHP development, etc.

We have tried Wordpress registration that triggers a Civi Contact creation and this does work, but it's terribly clumsy. The only benefit is that this does require email opt-in.

We are told that the right way to do things would be something like this:

1. accept sign ups, collect some additional custom data, and include a radio button choice - such as male/female/other.
2. Use a cron job to sweep all males, females, and others into a group that requires email opt-in.

We've got a CiviTeacher subscription, we've gone through a bunch of the material, but it isn't at all clear how we'd automate this. Do we need some sort of cron job to sweep the new registrations into a group?

# Answer
Your question is rather complex, so this answer only addresses the registration issue. It might be better to start a new question for the other issues you face.

You can use BuddyPress for user registration - in conjunction with BP XProfile WordPress User Sync and CiviCRM WordPress Profile Sync. The registration form will have "First Name" and "Last Name" fields which will be synced to both WordPress and CiviCRM.

I'd recommend using the GitHub version of BP XProfile WordPress User Sync because there are limitations in BuddyPress which make auto-updating problematic. You'll find the relevant info on the plugin's page.

In order to capture additional data, you can use BuddyPress xProfile fields for this. There are hooks in both plugins which will allow you to sync the content of a BuddyPress field to the appropriate CiviCRM field.
> 2 votes

---
Tags: wordpress, user-account, validation
---


# Question
Title: RECURRING contribution and auto-renew membership
I am trying to setup an optional but **recurring** donation/contribution on a membership signup *Contribution Page*. Ideally, the new member will also have an option to choose frequency of payment, but we can do without.

I have tried price sets with a second membership for a "dummy" organisation for the donation bit, but it doesn't seem to give me an option for BOTH to be recurring.

I have also tried activating membership contribution and Contributions Amount on the campaign page, (without price sets) but as soon as I activate recurring contributions, I get the following error:

When I then enable separate payments from the membership tab, I get the error

> You cannot enable both Recurring Contributions and Auto-renew memberships on the same online contribution page.

Has anyone got a workaround? Any help and guidance towards the right direction is much appreciated.

# Answer
> 2 votes
If you are on Drupal, then webform\_civicrm can indeed mix and match different monies \[Membership + Contribution + Event\] and since recently construct a recurring series as well. There are some differences though compared to how each of these individual bits work using CiviCRM Core itself:

* you will add up all components using webform elements -\> to get a Total $ amount;
* you can then present to the user (or config them yourself) - how you want these to be paid (now, monthly installments, etc)
* you end up with one payment - and since CiviCRM Core is not really expecting that this is possible, you won't see the distribution of that payment in the backend. So a $100 contribution + $50 Membership will show $150 payment both on the Contribution screen as well as on the Membership screen.

---
Tags: civimember, contribution-page, price-sets
---


# Question
Title: Can an expired checksum provide any warning to the user when they get to the site?
If a user clicks on a checksum link that has expired, I don't think they get any notification to that effect. This can mean, for example, that when renewing a membership, they might create a duplicate record if they use a different email etc.

Could civicrm provide a warning to the user?

I think this idea may be too specific for general use, but an extension that offers a 'self service' checksum option, ie 'please enter your email address and check your emails for a new link' might be useful.

Thoughts?

# Answer
> 2 votes
Would something like this work?

# Answer
> 1 votes
This is not an existing feature of CiviCRM and would need to be added by a programmer. You can open a ticket in JIRA (https://issues.civicrm.org) and see if anyone would be willing to pick-up this task. If no-one does, and you have a budget to pay for such improvements, you can ask for a quote on your ticket through the Paid Issue Queue (https://civicrm.org/paid-issue-queue).

---
Tags: checksum
---


# Question
Title: How to test for CiviCRM status messages in selenium?
CiviCRM presents status messages in a slick overlay, which looks neat for human users but has been hard for me to test for in Selenium. It appears the messages first appear within the main page content, but are then moved into the overlay div, where they appear on-screen only for several seconds before fading.

I'm guessing CiviCRM's own Selenium tests have standardized a variation on assertText() that works with this overlay, but I've not dug around enough to find it.

How would one detect the presence of a given status message, in Selenium IDE and in phpunit?

# Answer
So one possibility is to use Selenium2TestCase as your base class for you test...

I've been using Selenium Standalone Server 3.3 (looks like 3.4 just released) http://www.seleniumhq.org/download/

So its a little different that SeleniumTestCase, because Selenium 2 uses the WebDriver, and support for firefox may require you install the third party gecko drivers, there's a chrome driver there too that works really well.

So I have a test class that extends Selenium2TestCase , and added this helper function:

```
/**
   * Utility function to wait for an element to be displayed
   *
   * @param $elementCssPath
   * @param $timeout
   * @return \PHPUnit_Extensions_Selenium2TestCase_Element
   * @throws Exception
   */
  public function findElementWaitUntilDisplay($elementCssPath, $timeout){
    $this->waitUntil(function() use($elementCssPath){
      if ($element = $this->byCssSelector($elementCssPath)) {
        if($element->displayed()) {
          return true;
        }
        else {
          return null;
        }
      }
      return null;
    }, $timeout);
    try{
      $element = $this->byCssSelector($elementCssPath);
      return $element;
    }
    catch(Exception $e){
      throw $e;
    }
  }

```

So then you may have a test use it like so:

```
testStatusMessageDisplayed() {
  $status_message_element = $this->findElementWaitUntilDisplay('whatever-your-css-selector-is', 5000); //wait 5s for status message to appear
  $this->assertEquals('expected text', $status_message_element->text());
}

```

This helper function has been coming in handy, whether I am waiting for a page to load, or an ajax request, or some javascript rewrite the dom.
> 2 votes

---
Tags: testing
---


# Question
Title: Webform CiviCRM not showing credit card payment fields
I am using CiviCRM 4.7 in combination with Webform CiviCRM version 7.4-14. The payment fields are not showing, but on submitting it asks for the invisible fields to be filled in.

Is there anything wrong with the config that I am missing?

# Answer
Webform-CiviCRM integration is not yet compatible with CiviCRM 4.7. See here: https://www.drupal.org/node/2661232
> 3 votes

# Answer
**TLDR;** I've created a patched repo for easier download: https://github.com/emphanos/webform\_civicrm

```
cd <your_drupal_7_docroot>
cd sites/all/modules/contrib/
rm -rf webform_civicrm
git clone https://github.com/emphanos/webform_civicrm.git
drush en -y webform_civicrm
drush updatedb -y
drush cc all

```

**The longer more detailed information on the bug fix:**

For webform\_civicrm to work with CiviCRM 4.7.18 you'll need the latest dev branch of webform https://www.drupal.org/project/webform\_civicrm/releases/7.x-4.x-dev (released 2017-Apr-05) and patch it with this patch https://www.drupal.org/files/issues/2661232.patch

```
cd <your_doc_root>
drush dl -y webform_civicrm --dev
drush en -y webform_civicrm
drush updatedb -y
cd sites/all/modules/contrib/webform_civicrm/
wget https://www.drupal.org/files/issues/2661232.patch

```

(see issue here: https://www.drupal.org/node/2661232) NOTE: Everything except for the last chunk of the patch will be applied, just skip the last chunk.

```
patch -p1 < 2661232.patch
patching file includes/wf_crm_webform_base.inc
Hunk #1 succeeded at 32 (offset 8 lines).
Hunk #2 succeeded at 71 with fuzz 2 (offset 11 lines).
patching file includes/wf_crm_webform_postprocess.inc
Hunk #1 succeeded at 1926 with fuzz 1 (offset 151 lines).
patching file includes/wf_crm_webform_preprocess.inc
Hunk #1 FAILED at 183.
1 out of 1 hunk FAILED -- saving rejects to file includes/wf_crm_webform_preprocess.inc.rej
patching file js/webform_civicrm_payment.js
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file js/webform_civicrm_payment.js.rej

```

You'll notice that the payment fields don't get displayed, but that the total is also coming out as zero. There is a problem in the JQuery summation function in tally() that will incorrectly add up the data-amount values and in case the total is zero will not display the payment block.

The Paypal Express Orange Checkout button will also not work, so it's best to hide it from showing up to avoid user confusion.

You'll need to fix the tally function you need to apply a few changes to this file sites/all/modules/contrib/webform\_civicrm/js/webform\_civicrm\_payment.js

```
diff --git a/js/webform_civicrm_payment.js b/js/webform_civicrm_payment.js
index d1eaf44..a8ad53d 100644
--- a/js/webform_civicrm_payment.js
+++ b/js/webform_civicrm_payment.js
@@ -26,11 +26,7 @@ cj(function($) {
         // When an express payment button is clicked, skip the billing fields and submit the form with a placeholder
         var $expressButton = $('input[name$=_upload_express]', '#billing-payment-block');
         if ($expressButton.length) {
-          $expressButton.removeClass('crm-form-submit').click(function(e) {
-            e.preventDefault();
-            $('input[name=credit_card_number]', '#billing-payment-block').val('express');
-            $(this).closest('form').find('input.webform-submit.button-primary').click();
-          })
+            $('#billing-payment-block .description').hide();
         }
       });
     }
@@ -50,7 +46,7 @@ cj(function($) {

   function tally() {
     var total = 0;
-    $('.line-item:visible', '#wf-crm-billing-items').each(function() {
+    $("#wf-crm-billing-items tr:not(#wf-crm-billing-total)").each(function() {
       total += parseFloat($(this).data('amount'));
     });
     $('td+td', '#wf-crm-billing-total').html(CRM.formatMoney(total));

```
> 3 votes

# Answer
Try the following suggestions:

1) Clear Drupal Cache (under System -\> Performance).

2) Look to see if you are using any custom templates - these can show different fields to those required by webform. If you aren't a coder your developer or webadmin will be able to help you here.

3) Remember that payment values generally need to be handled differently than normal data. Particularly be wary of this information being stored longer than needed in the submissions table.
> 0 votes

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


# Question
Title: Can't add profiles to contribution page (DB Error: constraint violation)
I am getting the same problem that is described here and here, but I can't find a clear resolution on either of these pages.

I am working with a fresh install of CiviCRM 4.7.11 on Wordpress 4.6.1. This is running on an AWS EC2 running Ubuntu 14.04. When attempting to create a membership signup page, the profiles tab contains a text box instead of drop-down menus. I created a custom profile after I observed this behavior, and am unable to access a selection mechanism to select the profile I created or any of the stock profiles.

When I look at the console log for errors, these two errors appear consistently:

Any advice would be much appreciated!

# Answer
> 1 votes
The problem came with the theme I had activated (Nimva by Rockythemes). I haven't been able to troubleshoot exactly what caused it (and likely won't have time anytime soon) but switching to a default theme and even leaving all the plugins activated allowed the dropdown menus to work as intended.

# Answer
> 1 votes
I have had this issue recently and the issue was with the plugin 'WPBakery Visual Composer' that caused the issue. We deactivate the plugin, add the profile and reactivate it. We suspect it is a setting within the plugin but haven't identified it yet. I will update when we do.

---
Tags: wordpress, profile
---


# Question
Title: Normal to have API error while saving a Case Type?
I'm on CiviCRM 4.6.18 and Drupal. When I save a case type, I keep getting an error on the top right that says "API error: DB Error: already exists." I'm not sure if this is causing another issue I'm having which is when I create a case, the loading keeps hanging.

# Answer
Not sure what was going on, but thank you to Eileen. I did the following steps on CiviCRM 4.7.18, probably not ideal if you already have data though.

1. Delete all cases and case types.
2. Delete all relationships
3. Disable CiviCase
4. Clear Cache
5. Re-enable CiviCase
> 0 votes

# Answer
No, not normal. And not, AFAIK a known error. In order to make sense of something like this devs usually need debugging information. There is error output in the log files in the ConfigAndLog directory - on drupal sites this will usually be in sites/default/files/civicrm/ConfigAndLog
> 0 votes

---
Tags: civicase
---


# Question
Title: Unable to select profiles when creating online event registration
I am running CiviCRM 4.7.17 and Joomla 3.6.5 and I am unable to select a profile when I turn on online registration for an event. The "include profile" drop down field is greyed out, and when I click it only "None Found" is listed. However, if I click on the "preview" button, it displays the default "Your Registration Info" profile. I can also click "create" and create a new one. It saves to the profiles, but when I come back into the event and select online registration, the new profile no longer shows up in the "include profile" field.

This is true for any of the "include profile" fields on the online registration configuration page.

I can select a profile for a contribution page but just not events.

I went back to Test site that was running CiviCRM 4.5.4, and I could select profiles. I upgraded to CiviCRM 4.6.9, and I was no longer able to select the profiles. Version 4.6.9 post upgrade notes indicated that there were changes for the event workflow templates. Not sure if that is related.

I tried this on the CiviCRM Joomla demo site, currently running v4.6.18, and I could select profiles. However, the major difference is that I have several of the CiviCRM extensions installed on my Test and Prod sites.

I see similar posts, but some answers discuss Wordpress and others indicate a fix back in v4.5.4.

Can anyone point me in the right direction?

Thank you in advance for any assistance.

# Answer
> 2 votes
Found answer from a newer post:

> After more investigation, the problem is solved using the fix from agh1 (thanks to him by the way).
>
> It looks like a problem in the civicrm code using jquery.
>
> Here is the url of the fix. We tested it and it works.
>
> https://github.com/civicrm/civicrm-core/pull/10152
>
> I hope this will be in the next civicrm release code.

---
Tags: civievent, profile, joomla
---


# Question
Title: Cron job not working after CIVICRM update (Joomla 3.7.0 and CIVICRM
we used to send emails to members with great succes before. Now, I've upgraded the site's Joomla and CIVICRM versions, prepared a draft email, but started to receive emails from the system about a bad configuration, her's the message:

**Warning**: ini\_set(): A session is active. You cannot change the session module's ini settings at this time in **/home/XXX/public\_html/libraries/joomla/session/handler/joomla.php** on line **46**
**Fatal error**: Call to a member function get() on null in **/home/XXX/public\_html/libraries/joomla/session/handler/joomla.php** on line **71**

I tried to execute the cron by entering the URL in a browser (wich worked before the upgrades) but I get the same error.

So what should I look after? I tried to see by myself and looked in forums, but can't nail how to have it work out.

Thanks for your help!

Marc.

# Answer
I feel like the first thing to do is try to isolate the issue (or clarify it): did civicrm work before upgrading to Joomla 3.7, it was it civicrm that you had upgraded (what was the exact upgrade that broke the cron jobs).

It's strange because those errors look more like a session cache issue.

Did you try the "run all scheduled jobs" link from the jobs page?

Are you executing with a user that had the needed permissions?
> 1 votes

# Answer
I have this issue too after upgrading to Joomla 3.7.0 on a CiviCRM 4.7.18 installation that was previously working fine. I don't see the errors you describe, only the civi pop-up message saying cron is not running. Running all scheduled jobs works fine.
> 0 votes

# Answer
To resolve the Warning: ini\_set(): error, which I've experienced on my site for several updates of civiCRM I have to comment out, 'ini\_set('session.use\_trans\_sid', '0');' in the joomla.php file. Doing this has resolved my CRON not working issue every time, except for the latest update of Joomla to 3.7 and PHP to 7.0. Now, after commenting out the above referenced line, I'm getting the following error, 'Error displaying the error page: Application Instantiation Error: Call to a member function get() on null' which I've not been able to resolve. I've posted it here as a question (Cron job not working after CIVICRM update (Joomla 3.7.0 and CIVICRM) a few days ago, but have not received a response.
> 0 votes

# Answer
It is caused by a Joomla 3.7.0 bug. See https://github.com/joomla/joomla-cms/pull/15605 The patch therein works OK for me (libraries/joomla/factory.php).
> 0 votes

---
Tags: civimail
---


# Question
Title: Can't add addresses when geocoding is enabled
# Steps to reproduce

On the CiviCRM 4.7 / Drupal 7 demo site (demo.civihosting.com):

1. Go to "Administer -\> System Settings -\> Mapping and Geocoding"
2. Set "Mapping Provider" and "Geocoding Provider" to "Google"
3. Go to "Create New -\> Individual"
4. Set "First Name" and "Last Name" to "Test"
5. Open "Address"
6. Set "Country" to "Italy"
7. Click "Save"

# Expected behavior

A new contact should be created, and I should see the summary page for it.

# Actual behavior

I see an error page, reading:

```
Sorry but we are not able to provide this at the moment.
Return to home page.

Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame thrown in /home/galleryr/www/demo/sites/all/modules/civicrm/Civi/Core/Transaction/Manager.php on line 107

```

# Analysis

After reading the logs in ConfigAndLog, I found the problem had to do with the empty state/province field. I tracked it down to lines 1060 to 1068 of`CRM/Core/DAO.php`:

`1060 if (
1061 empty($searchValue) ||
1062 trim(strtolower($searchValue)) == 'null'
1063 ) {
1064 // adding this year since developers forget to check for an id
1065 // or for the 'null' (which is a bad DAO kludge)
1066 // and hence we get the first value in the db
1067 CRM_Core_Error::fatal();
1068 }`

Simply deleting these lines seems to resolve the issue. From the comment about "we get the first value in the db", I expected the newly created contact to have an address with state/province id 1, but actually it worked as it should: I gave no state/province, and no state/province is what came out.

Hope that helps. Cheers!

# Answer
Similar to the above seems to be fixed recently. Can you please try https://github.com/civicrm/civicrm-core/pull/10192 and check if that fixes for you?

Note: The PR is merged in 4.7.20, so it should work without error on this version.
> 1 votes

---
Tags: error, 4.7, geocoding
---


# Question
Title: How can I avoid my import crashing with a Fatal Error due to an existing external ID?
I've had a few separate imports crash with a fatal error in the last month:

> Sorry but we are not able to provide this at the moment. DB Error: already exists
>
> Fatal error: Uncaught CRM\_Core\_Exception: \[0: Transaction integrity error: Expected to find active frame thrown in /home/user/public\_html/sites/all/modules/civicrm/Civi/Core/Transaction/Manager.php on line 107

In my case it seems to have something to do with external IDs that already exist in the database and are also in the import file. How can I avoid having imports fatally die in the middle of things?

# Answer
Thanks to Jamie McClelland, there is a patch available to make this more user-friendly. At some point hopefully it will be merged into core.

With this patch applied, instead of a fatal error, the import will continue and the problem rows will be pulled out in an error file at the end.
> 2 votes

---
Tags: import, duplicate-contacts, external-id
---


title: Workaround Duplicate Label

text:
# Question
Title: Workaround Duplicate Label
I noticed that all labels in the "Activity Type Options" and "Custom Fields" cannot be the same. For example, if I wanted to add a "Medical Assessment" activity type, I cannot use the same label again. This matters, because when I assign this activity type to a specific case, I have custom fields attached to this medical assessment activity.

The problem is, when I create another case type and use "medical assessment" again, I want different custom fields to be attached.

# Answer
Unfortunately, there isn't too many options here. At this time, labels have to be unique. We can't put "Medical Assessment" in case type Family Model and "Medical Assessment" in case type Youth Model, for example.

The workaround I used was to label all the Activity Types by ordering. For example in Family Model, it would be "1. Medical Assessment" and in case type Youth Model, it would be "2. Medical Assessment". All activity types on the case dropdown list needs to be numbered too. There are unique custom fields attached to these activity types.

FAMILY MODEL 1. Medical Assessment 1. Mental Health Assessment

YOUTH MODEL 1. Mental Health Assessment 2. Medical Assessment
> 0 votes

# Answer
You could rename the activities - for example: "Medical Assessment - Type 1", "Medical Assessment - Type 2" or something more descriptive and link the appropriate custom fields to each one.
> 0 votes

---
Tags: custom-fields, civicase, activities
---


# Question
Title: Do I need to know Linux to administer CiviCRM?
Do I need to know Linux to administer CiviCRM? This is not a rhetorical question :) . And it's a question I wish I had asked three and a half years ago.

My answer now, to my self of three and half a years ago, would be: No, knowing Linux is not strictly necessary, especially if you use a hosted version of CiviCRM, like Powerbase or CiviDesk, or have a partner like Fuzion or CiviCoop doing your Linux server set up and maintenance; but Yes, knowing how to use a flavor of Linux would be really helpful, regardless, especially if you want to understand what's going on "under the hood" with your Linux server, if that's what your CiviCRM installation is hosted on.

I believe there are three good answers to this question - Yes, No and Maybe.

Your thoughts appreciated....

# Answer
> 5 votes
The question is tricky because it's a bit imprecise -- different people may interpret "know Linux" and "administer CiviCRM" a bit differently.

It might be clearer to rephrase the issue this way:

1. To administer the data model, profiles, contacts, events, mailings, etc, you need an analytic mindset and a general understanding of data-management, but you do not need sysadmin skills.
2. To administer the installation, backup, or upgrade, you do need sysadmin skills (for HTTP/MySQL/PHP on your chosen platform). For a general GNU/Linux hosting platform with Ubuntu/Redhat/etc, general GNU/Linux skills should do. For Windows or cloud platforms, you probably need more advanced/niche skills.

Additionally, there are the wildcards -- adding new features or perfecting the appearance within your site or debugging hard problems. These are wildcards because the required skills vary widely. Sometimes basic point-and-click will do; sometimes you need robust skills in a dozen systems.

As others have mentioned, a good model is to partner with someone more experienced. You can handle a lot of administration yourself -- and when/if a task comes up which needs more skills, reach out to them.

# Answer
> 4 votes
I would tend to say "No", it is not required. We have a bunch of customers that administer CiviCRM without Linux knowledge (or GNU, as Tomislav pointed out). However, they do pay for service providers to do this for them. Just as you do not need to know about Windows for server management, but your (internal or external) sys admin does have to know.

# Answer
> 3 votes
@Joe To kick off, you probably mean GNU more than Linux (it's the tools that you learn, not the kernel). That said, being a MySQL/PHP-based system, it's naturally geared towards GNU/Linux as the most popular OS for the platform. In addition, appropriate Linux hosting is probably somewhat more available and cheaper.

There's a partially related discussion on the CiviCRM forum on a related subject and the answer - according to my interpretation - is between 'yes' and 'maybe'. If you only want to prototype, you can probably live with a Windows install. If you want to deploy and have people actually use it, it's almost sure to end up on a Linux machine: if it's you they call when something's wrong, than you can't avoid learning it. If they will call someone else, than you'll get away with Windows.

That said, GNU/Linux is a really nice OS: you'll like it. :) The learning curve has been radically flattened by the incredible amount of useful documentation and discussions on-line and the radical improvements in ease of use made over the last 10 years or so.

# Answer
> 3 votes
No, you don't need to 'know linux'.

CiviCRM has been intentionally built so that all day to day use and administration of the system can be carried out via the user interface (i.e. the screens that you look at in your web browser).

You can sign up with a CiviCRM partner who will provide you with a ready to use hosted CiviCRM installation that doesn't require any knowledge of linux to operate.

In case you're interested...

The partner who hosts the site more than likely does 'know linux', much like the company that hosts your website (or the people that run any other web service) but as a day to day user and administrator, you don't need to concern yourself with that.

The confusion probably arises because *you can choose to host your own CiviCRM installation*, in which case some knowledge of linux (or similar) is required. But unless you have an internal technical team with this knowledge, and a specific reason not to choose a hosted solution (privacy, cost, etc.) it makes sense to sign up with a CiviCRM partner, who will take care of the hard stuff for you.

PS. I think you answered the question pretty well yourself :)

# Answer
> 1 votes
No, because you can also run it on Windows, Mac or whatever if you have the web server, PHP and MySQL.

# Answer
> 1 votes
Tim Otten's answer seems best to me - CiviCRM is a complex app, Linux is an underlying operating system. I came to the environment with decades of Linux experience and some time with other CRM apps, but had never touched CiviCRM before January of 2017. I have an associate who is not a Linux CLI guy, but he's a master of many apps, as soon as I get some basic problems solved, he'll be off and running with Civi.

And I found this question because we're running WordPress under WHM with Cloud Linux, and this is the only question other than the first one I asked that is found, and it's not even Cloud Linux specific, just had both "cloud" and "linux" included. I guess I have some work to do in this area :-)

# Answer
> 0 votes
Maybe - is likely the case - If you can live with the Civi as is - you are likely not to really need it - If you need custom work have complex upgrades due to that custom work - you will likely not need it.

---
Tags: installation, settings, civicrm-buildkit
---


# Question
Title: book library mgmnt and student credit system
I just started exploring the civiCRM options for our donation based educational institution. It fits the donor managment, people management needs. However I would like to add two more functionalities, so that civiCRM becomes one stop solution for all the management necessities for our institution

1. Library management - storing list of books available, books issue/return, new arrivals data, etc
2. Student's credit system management - list of courses, papers, credit system for the students.

Do I need to code separate extensions for this? Or already available? should I use wordpress or drupal for this needs

Mostly it wont be available... In that case, I am planning to introduce new components for library system, define relationships, etc. my guess, it should be possible. Just that I want all database into one system

# Answer
> 1 votes
In terms of Library functionality, not suggesting civicrm couldn't be bent do what you want (I will answer re school stuff separately) but you might want to look at http://www.koha.org/ which is open source library system that some other kiwis made

# Answer
> 0 votes
For schools we have provided solutions that are primarily built using custom Activity Types and custom Fields. In our case Attendance is recorded on a weekly basis, so an Activity for each Student is created each week, the teachers then record am/pm attendance via a Custom 'edit in place' report, and then Views are used to deliver out the calculations they require.

For Credits etc, again we have used Activity Types with a range of custom fields to record who is doing what, and who achieved what.

---
Tags: drupal, extension, upgrade, developer, evaluating-civicrm
---


title: using CiviCRM like Access?

text:
# Question
Title: using CiviCRM like Access?
I am new to CiviCRM. Is it possible for me to use CiviCRM like MS Access?

I really don't need all the fields CiviCRM is offering.

All I need is the fields shown as below:

First Name Last Name State License Number Expiration Date

How can I ditch all other info and just come up with those 5 fields for Contacts? I also don't want the interface to display anything other than those 5 fields I am going to be entering.

# Answer
Well, CiviCRM has a high learning curve, so if you think it's overkill for your needs, I'd advise you to consider whether this solution is right for you at this time.

If CiviCRM generally meets your needs and you're just looking for a way to simplify data entry, you might have a look at the Profiles chapter in the user guide.
> 3 votes

# Answer
For such a simple requirement some people would consider using a Google spreadsheet
> 1 votes

# Answer
I will have to agree with GinkgoFJG. CiviCRM really does have a high learning curve and if you really only need those 5 fields, you might be better building this form in Drupal or Wordpress. Personally, I recommend Drupal because you'll be able to do a lot more displaying of fields in Views (and if you like, integrate your expiration field in another table or calendar, set permissions by field type).

If you use CiviCRM for your purpose, its definitely possible. You would use Profiles. On the backend though, you'll just see all the fields CiviCRM provides, some you won't be able to remove from the interface (e.g., employer, job title, etc). If you think your setup/fields in the future then CiviCRM will be powerful for you to expand your needs.
> 0 votes

---
Tags: contacts, custom-fields, fields, display, data-model
---


title: Upgrading CiviHR to 1.6.8

text:
# Question
Title: Upgrading CiviHR to 1.6.8
Does anyone have clear instructions on how to upgrade CiviHR? The ones included on GitHub are for drupal. I tried to do it manually by copying over the CiviHR folder with 1.6.8 but it just broke CiviCRM altogether. I don't have access to drush or anything like that, so I can only copy it and then run the updates manually in extensions manager in CiviCRM.

# Answer
CiviHR isn't a normal extension that you can install on a general purpose CiviCRM installation. It is intended to be run as a dedicated CiviHR system and is only supported on Drupal.

There is a new site at https://civihr.org/ and wiki at https://civihr.atlassian.net/wiki/display/CIV/Welcome

There is a lot of development activity ongoing and some of the docs are lagging behind. I think they are still offering free hosting if you join the Early Adopters program and meet certain requirements.
> 0 votes

---
Tags: civihr
---


# Question
Title: Error when updating Pending Contribution
After searching pending contributions and ticking some of them, I select Action \> Update Pending Contribution Status \> Completed \> Update.

I get the following error : "Sorry, we cannot provide this at the moment ; expected one PriceSet but found 19" ... which is rather amazing, since : \- I have only 4 PriceSets defined in my Civi; \- The Contribution Page uses no PriceSet.

However, I don't have any error when I select "Update multiple Contributions" instead of "Update Pending Contribution Status"

(Currently running Civi 4.7.16 / Drupal 7.54)

# Answer
> 0 votes
I believe this is the same underlying error reported here: https://issues.civicrm.org/jira/browse/CRM-20297

Specifically, contributions containing line items without a matching priceset can cause problems (because CiviCRM tries to match them up with priceset items and can generate errors when it does that badly).

It seems likely this error can be fixed using the patch provided for that issue, here:

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

Here's a short cut url to to a patch ready version of that pull request:

https://github.com/civicrm/civicrm-core/pull/10012.diff

---
Tags: civicontribute
---


# Question
Title: Volunteer Report does not report on 'Role'
When I assign volunteers to shifts via the 'Assign Volunteers' screen, the roles are missing from the Volunteer Report. When I assign volunteers to shifts via the api though, the Volunteer Report shows their roles.
But if i remove the same volunteers from a role via the 'Assign Volunteers' screen, to mark them as available, then again the Volunteer Report is not responding and shows the person as still having the initial role that the api was able to assign.
Am i doing something wrong? This happens on the latest Civi 4.7.19 on wordpress , but also on a new clean install of Civi 4.7.14 on wordpress .

# Answer
> 1 votes
It looks like you've found a bug in CiviVolunteer, which I've been able to reproduce, but it's not with the report -- it's with the assignment.

If you assign the volunteer by dragging them from "Available Volunteers" to a volunteer opportunity, the role is erroneously not populated. You can see this by opening up the contact's record and inspecting the activity on the activity tab.

If you assign the volunteer using the magnifying class in the top right corner of the volunteer opportunity, the role is populated as when you use the API. You can validate this by opening up the contact's record and inspecting the activity on the activity tab.

---
Tags: reports, civivolunteer
---


title: AMAZON SES Rate Limit Question

text:
# Question
Title: AMAZON SES Rate Limit Question
I am looking at using SES for a small 1,500 email list that is not super time critical.

Setup went fine - exiting the sandbox was easy - daily quota of 50k more than I will ever need.

14 emails per second - that sounds like it could be an issues - but hard to tell - How fast is the SMTP call in CIVI.Mailer

Can I use throttle time and add 100,000 microseconds between each email to lower my rate to 10 per second. For that matter I could do 500,000 and do 2 per second

Trying to avoid having to use a postfix installation.

Thoughts

Thanks

# Answer
> 3 votes
I've used Amazon SES for a similar sized mailing list to you for a client. I was confused initially and then surprised when they gave me a 14/s send limit.

However, when you work it out that's just over 50,000 per hour so the only issue is how to keep below the 14/s limit. Well, as you've mentioned, CiviCRM has the very helpful "Throttle Time" which you can set to 75000microseconds to limit the send rate from CiviCRM to just under 14/second.

The client has found SES to be extremely fast and reliable. Just make sure you've got access to your DNS so you can configure necessary DNS entries to allow SES to send email for you.

---
Tags: civimail, amazon-ses
---


title: Re-using templates without editing

text:
# Question
Title: Re-using templates without editing
I would like to use a newsletter template from a different chapter. I am afraid if I edit the template it will change their settings they have in place. I simply just want to copy what they have and edit the text I will need for the Atlanta newsletter.

Thank you.

# Answer
There are a couple of ways to do this. The way I'm describing below isn't the easiest method, but it should work in all versions of CiviCRM.

* Go to **Mailings menu » Message Templates**.
* Press "Edit" next to the template you'd like to copy.
* In the editor, you should see a "Source" button. It may look different depending on your version of CiviCRM, but the most common version looks like this:
* You'll see the raw HTML, which looks like gibberish. You'll want to do a "Select All" and "Copy" (Ctrl-A, then Ctrl-C on Windows).
* Press "Cancel" to go back to the message templates selection screen.
* Press "Add Message Template" to start a new template
* On the new (blank) template, press the "Source" button.
* Paste in the raw HTML from the origin template.
* Press "Source" again, and it should look like the original - but now you're in a copy of the original template! Save this one with its own name and edit it however you like.
> 3 votes

---
Tags: civimail
---


# Question
Title: Deduping's "No of contacts to find matches for" field definition
When you go to "Use Rule" on the "Find and Merge Duplicate Contacts" page, you get a new page that has 2 fields, one called "Select Group" and the other called "No of contacts to find matches for" with a default value of 3. What is this second field and how does it work? The documentation I've found so far doesn't include it.

I'm on wordpress 4.7.3 and civicrm 4.7.18.

Thanks, Ruth

# Answer
I'm on the same version and this is the view that I'm seeing. Haven't seen what you are referring to...
> 1 votes

---
Tags: duplicate-contacts
---


# Question
Title: How can I edit the Subject of a CiviCase?
Whilst Cases have subjects there appears to be no way to edit via the interface.

# Answer
> 2 votes
It seems from this forum post that the ability to edit the subject of a CiviCase has not been implemented, and that its implementation should be done by creating a new core/case Activity Type for 'Change Case Subject' so that any change was also tracked on the Case.

That sounds a reasonable improvement, in the meantime it seems the only option is to edit the field in the civicase table - which my brief testing suggests doesn't not bring the wrath of code down upon my head

# Answer
> 2 votes
It appears that this has been fixed in the new release today for CiviCRM 4.7.19.

---
Tags: civicase
---


# Question
Title: Is there an easy way to add YTD giving to receipts?
We have a client that we moved from Donorperfect who brought up that they feel the receipt tools are incomplete without the ability to include YTD (year to date) giving on receipts. This seems like a simple and common request. Am I missing something simple here?

# Answer
Install Jamie McClelland's Summary Fields extension - see here \- and insert Total Contributions this Year as a token.
> 9 votes

# Answer
It sounds like you're looking for the Contributions Table Token extension: https://civicrm.org/extensions/contributions-table-token
> 2 votes

---
Tags: civicontribute, contributions, configuration, receipts
---


# Question
Title: Under what circumstances is API joining available?
If I go to the API explorer and select `ContributionSoft` as the entity, I see options to enable joining. But I don't see any joining options available for other entities like `Contribution` and `Participation`. Why? I would expect expect that a join automatically becomes possible any time a foreign key exists, and also becomes possible in some other special circumstances (e.g. option value).

Is it *really* the case that joining is only available on some entities?

* If so, what is the logic behind which entities offer joining?
* If not, I would like to understand, as an example, how I can execute an API call on `Participation` which joins `Event`.

# Answer
The API is largely metadata-driven, and whether an API field is joinable is *usually* determined by the data returned by that entity's `getfields` API action. If you look in `<civiroot>/templates/CRM/Admin/Page/APIExplorer.js` at the `renderJoinSelector()` function you'll see the logic.

However, right at the top of that function there's a reference to the const `NO_JOINS`. Right up at the top of that file, you'll see:

```
// The following apis do not use Api3SelectQuery so do not support advanced features like joins or OR
NO_JOINS = ['Contact', 'Contribution', 'Pledge', 'Participant'],

```

These sorts of quirky APIs are exactly the sort of thing that APIv4 is intended to eliminate. It's no coincidence that the Participant entity is the first one slated to be released under APIv4. It's quirky and it shouldn't be, but changing the behavior would break the API contract not to change on some extension author.
> 1 votes

---
Tags: api, developer
---


# Question
Title: How can I import the "communication style" field when importing contacts?
In my csv I have a field named "Communication style", which I wish to map to the respective field in "communication preferences" for each contact in CiviCRM (formal / familiar).

Yet, while importing the constituents, on the "match fields" step 2, I don't see the "communication style" option in the drop-down.

Which is the way to do this matching?

# Answer
From communication\_style\_id not fully supported in issues.civicrm.org:

> Unfortunately, support for this field is not completed: We can enter it, export it and search after it using the search builder, and use it within profiles. However, it also should be implemented for:
>
> > * Importing of contacts
> > * Advanced Search
> 1 votes

---
Tags: contacts, import, fields
---


# Question
Title: Error: Warning: ini_set(): A session is active
I am requesting Reports via Cron to email: https://crm.xxx.lv/sites/all/modules/civicrm/bin/cron.php?pass=xxx&name=xxx&key=xxxx&job=mail\_report&format=csv&instanceId=70

All reports work just fine, except for one which returns the following error when I run the address in browser.

Before there was an identical report (Constituent Summary) which just disappeared from system somehow. When I created identical new report, this error came up.

How can I solve it?

CiviCRM 4.7.14. on Drupal

# Answer
> 1 votes
My fault. The issue seems to be caused by wrong Permission in Access settings in Report.

Instead of using **CiviCRM: View all contacts** it was set to **CiviReport: Access CiviReport**.

---
Tags: reports, cron
---


# Question
Title: Is smart/fuzzy searching possible in CiviCRM?
I'm not sure what the feature is called, but Google seems to collapse all accented letters to their base character when indexing. So a search for "Nandor" will find a record "Nándor". But searching my Civi database for the unaccented name finds no results. Is there a setting (either in CiviCRM or MySQL) or a plugin that would make such searches work?

# Answer
This feature exists. It is part of MySQL and called *collation*. You can read about the background on https://dev.mysql.com/doc/refman/5.7/en/charset-collation-effect.html .

In my test database a search on *Nandor* returns *Nándor*. Reason `last_name` column is defined as

```
 `last_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Last Name.'

```

and the collation `utf8_unicode_ci` defines them to be the same.

Altering the setting with

```
ALTER TABLE civicrm_contact MODIFY last_name varchar(64) COLLATE latin1_bin;

```

has the effect that they are not considered the same anymore.

What is your collation setting?
> 2 votes

---
Tags: database, search
---


# Question
Title: How can I import ADDED BY field of Activities?
I have data in spreadsheet. How can I import Activities with respective **Added by** values (specified in spreadsheet)?

Can't find this field in CiviCRM Activities import tool.

# Answer
> 3 votes
Selecting the Source Contact should do the trick.

---
Tags: import, activities
---


# Question
Title: How to get more debug info about "DB Error: no such field Return to home page"
I have created an event registration form, using a profile with a custom field. When I click `Continue` after filling in the form, I see `Processing ...` and then I get the confirmation screen, which looks good. But when I hit `Continue` I get:

```
Sorry but we are not able to provide this at the moment. DB Error: no such field Return to home page.

```

WordPress 4.7.4 CiviCRM 4.7.17

I'm filling in two of the input fields from URL variables. Not sure if that might be a problem.

If you want to try:

https://connectionpractice.org/test-webinar-with-affiliate-code/?affiliatecode=irthlingz1&eventtype=Introduction

I'm thinking I need to get more debug info to figure out which field is causing the problem. How can I do that?

P.S. My code for the URL variables

```
<script>
(function($) {
  // all JS code here
var l = document.location;
  var affiliatecode = l.search.match(/affiliatecode=([a-zA-Z0-9_]+)/)[1];
var eventtype = l.search.match(/eventtype=([a-zA-Z0-9_]+)/)[1];
   $( "input#custom_3").val(affiliatecode);
   $( "input#event_type").val(eventtype);
})(jQuery);
</script>

```

# Answer
There are two ways. First, you can enable debugging and backtrace under **Administer menu » System Settings » Debugging and Error Handling**.

The same information should be available in your ConfigAndLog directory. See Where are the "ConfigAndLog" and "templates\_c" directories?
> 2 votes

---
Tags: wordpress, error, database
---


# Question
Title: Webform Civi Payment fields not showing up
I just created a webform with a Civi contribution page enabled. When I save the form to test, the payment options are not showing as part of the form. Do I need to do something other then enabling the contribution section and assigning it a contribution page to get the credit card and billing address fields to show?

# Answer
> 4 votes
Presumably you are on 7.x-4.15 of webform\_civicrm since you say you just upgraded. If you switch back to 7.x-4.14, does it work? If so, it looks like the same issue I logged here: https://www.drupal.org/node/2676752

# Answer
> 0 votes
With the fixes outlined here: https://civicrm.stackexchange.com/a/18449/930

The payment fields should work in webform version 7.x-4.18 with CiviCRM 4.7.18.

---
Tags: webform-civicrm, contributions
---


title: DB Error: no such field

text:
# Question
Title: DB Error: no such field
I have created an event registration form, using a profile with a custom field. When I click `Continue` after filling in the form, I see `Processing ...` and then I get the confirmation screen, which looks good. But when I hit `Continue` I get:

```
Sorry but we are not able to provide this at the moment. DB Error: no such field Return to home page.

```

WordPress 4.7.4

CiviCRM 4.7.17

Full debug info is shown below. I get that `civicrm_event.event_type_id` is the problem but I'm not sure what to do about it.

I get the feeling this relates to the profile used with this event. In the profile, the event type is associated with the participant

I'm filling in the event\_type field from a URL variable. Not sure if that might be a problem.

If you want to try:

https://connectionpractice.org/test-webinar-with-affiliate-code/?affiliatecode=irthlingz1&eventtype=Introduction

My code for the URL variables

```
<script>
(function($) {
  // all JS code here
var l = document.location;
  var affiliatecode = l.search.match(/affiliatecode=([a-zA-Z0-9_]+)/)[1];
var eventtype = l.search.match(/eventtype=([a-zA-Z0-9_]+)/)[1];
   $( "input#custom_3").val(affiliatecode);
   $( "input#event_type").val(eventtype);
})(jQuery);
</script>

```

Debug info:

```
Database Error Code: Unknown column 'civicrm_event.event_type_id' in 'on clause', 1054
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a
LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1
LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5
LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )
LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id
LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                               AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']
    [type] => DB_Error
    [user_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a
LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1
LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5
LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )
LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id
LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                               AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a
LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1
LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5
LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )
LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id
LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                               AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']"]
)

```

phpmyadmin screenshot showing that the field is there:

Backtrace, in case that might be helpful (site specific info replaced by `mysite`)

```
#0 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(187): CRM_Core_Error::backtrace()
#1 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
#2 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB.php(984): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#3 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#4 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "DB_Error", TRUE)
#5 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#6 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause'")
#7 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#9 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2438): DB_common->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#10 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1627): DB_DataObject->_query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#11 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(354): DB_DataObject->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#12 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1304): CRM_Core_DAO->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", TRUE)
#13 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(4372): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#14 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1639): CRM_Contact_BAO_Query::apiQuery((Array:1), (Array:11), (Array:0))
#15 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1972): CRM_Contact_BAO_Contact::getHierContactDetails("2", (Array:8))
#16 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1880): CRM_Contact_BAO_Contact::formatProfileContactParams((Array:24), (Array:8), "2", NULL, "Individual")
#17 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php(1171): CRM_Contact_BAO_Contact::createProfileContact((Array:24), (Array:8), "2", (Array:0), NULL, "Individual", TRUE)
#18 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php(510): CRM_Event_Form_Registration_Confirm::updateContactFields("2", (Array:24), (Array:8), Object(CRM_Event_Form_Registration_Confirm))
#19 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(453): CRM_Event_Form_Registration_Confirm->postProcess()
#20 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#21 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Event_Form_Registration_Confirm), "next", "Next")
#22 /mysite/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Event_Form_Registration_Confirm), "next")
#23 /mysite/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Registration_Confirm), "next")
#24 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
#25 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(310): CRM_Core_Controller->run((Array:3), NULL)
#26 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15))
#27 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#28 /mysite/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:3))
#29 /mysite/wp-content/plugins/civicrm/includes/civicrm.basepage.php(132): CiviCRM_For_WordPress->invoke()
#30 /mysite/wp-includes/class-wp-hook.php(298): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#31 /mysite/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters("", (Array:1))
#32 /mysite/wp-includes/plugin.php(515): WP_Hook->do_action((Array:1))
#33 /mysite/wp-includes/class-wp.php(746): do_action_ref_array("wp", (Array:1))
#34 /mysite/wp-includes/functions.php(955): WP->main("")
#35 /mysite/wp-blog-header.php(16): wp()
#36 /mysite/index.php(17): require("/mysite/wp-blog-header.php")
#37 {main}

```

Note that the Event Type field is a standard choice for Participants. That is not a custom field that I added. Below is a screenshot from a brand new install of CiviCRM. Perhaps this option should not be there?

# Answer
That column really really should exist. Do you have access to see the underlying database through phpmyadmin or similar? I would expect either you have logging turned on but there is a problem with the database table or you have an issue with your mysql server, possibly the disk is full, or some db admin has made an error and deleted the column
> 1 votes

---
Tags: wordpress, database
---


# Question
Title: Installing Wordpress and drupal on same machine
I am trying to install wordpress and drupal on same server. Using WAMP. I have installed both WP and Drupal under wwww directory.

In Wordpress CiviCRM works fine. Drupal installation went through.

issue 1 :

Installing civiCRM module through URL option or by choosing tar.gz file is not working. I didn't even get an error message. Just I am again seeing the "Install module" page again.

issue 2:

Did the alternate option given in step 2 in this link https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+Drupal+7

when I go to step 4, http:///sites/all/modules/civicrm/install/index.php I am getting the error shown in the screenshot. It identifies as wordpress installation instead of drupal.

# Answer
> 2 votes
Ok... got what the issue. I downloaded latest drupal. that is drupal 8.x.x ... CiviCRM version exists only for drupal 7... Now I am facing different issue. but this is solved.

# Answer
> 1 votes
You're installing Civi/Drupal and Civi/WP on ... Windows? What's the motivation for doing this?

If this is an R&D environment and your machine is up to the task I think this would all work much better as a pair of Linux virtual machines running under Virtual Box.

My day to day machine is a MacBook Pro with 16 gig and an SSD for storage. I could easily run two Linux VMs as I describe and still have room for other activities. The Lubuntu (lightweight Ubuntu) distro only needs about five gig of space for a minimal install, it's much more efficient than full Ubuntu. If you're wanting CentOS I have no great wisdom to offer there, haven't found a lightweight distro based on that.

---
Tags: wordpress, drupal, installation, drupal-6
---


title: "Printer-friendly" pages

text:
# Question
Title: "Printer-friendly" pages
Does anyone use the little printer icon at the top right of many pages? It is supposed to produce a printer-friendly view of the page, but the output looks pretty bad. It shows the main content rather than the whole page that you get from a browser print so is potentially useful.

According to this this jira, the printer friendly views were ok in 4.4.20, deteriorated in 4.5.9 and improved a bit by 4.6.9.

So, is this an old piece of cruft that can be removed, or a useful feature in need of attention?

# Answer
> 5 votes
Agree, it's probably time to remove it.

Over on https://civicrm.org, it's handled like this:

```
.crm-container #printer-friendly {
  display: none;
}

```

---
Tags: 4.7, printing
---


title: Exclude members in a smart group

text:
# Question
Title: Exclude members in a smart group
I want to create a group of members that have paid their contribution last year, but not yet this year, and do not have an email address.

With an email address, the solution is simple: create two groups "paid last year" and "paid this year". Send an email via CiviMail to "last year" by excluding "this year". CiviMail only takes into account the contacts with email.

But how to do so with the ones without email? I do not see a way to "subtract" (= excluding members who paid this year) two groups outside CiviMail.

Or do I need to activate CiviMember for this purpose? Now, I enter the value of the year of payment into the field "Source of contribution" and, for the moment, we do not see the added value of another component CiviMember.

# Answer
> 6 votes
There's two answers, although you probably just need the first:

* Instead of Advanced Search, use Search Builder (also in the Search menu). Use "paid this year" and "email address is empty".
* Alternatively, there's a custom search (**Search menu \> Custom Searches**) called **Include/Exclude by Group/Tag**. So alternatively you can create a smart group in Search Builder "No email" and combine it with existing searches using the include/exclude search.

---
Tags: civicontribute, smartgroups
---


# Question
Title: Problems with display name/sort name saving as contact.first_name
Every time a contact record is edited and then saved, the display name and sort name revert to "contact.first\_name \[Last name\]". When you are in edit mode, the First name is still there (and other associated fields, such as email greeting all still display the contact's first name).

I've updated CiviCRM to 4.7.18 - tis hasn't fixed anything. (This site has lots of events and I saw a couple of people reporting issues with events on the latest version so avoided 4.7.19).

I can save it using the phpMyAdmin UI but that's only temporary, until a user edits the same contact record again.

Drupal 7.54

# Answer
> 3 votes
The format of the display name and the sort name are configured at *Administer -\> Customize Data and Screens -\> Display Preferences*. Check if this format is correct. (For example, the curly brackets must match).

---
Tags: contacts
---


# Question
Title: How do i export all the data in civicrm?
I need to export all data in the database, activities, relationships, contacts everything. Is there a way to export all data? There is more room for human error if i have to do it individually by section on civi as how will i know if it downloaded all the fields?

# Answer
The way to export the complete data is a full database dump, eg via `mysqldump`.

Much of the data will be exported if you do it piece by piece, but it will not be complete and as you suggest there is risk of missing some fields doing so manually.

It's possible your hosting environment will offer some interface to make a db dump - they should have documentation, or you can ask their support staff.

If possible, I'd recommend talking to a technical advisor to ensure you get a complete copy. One you have this, make sure you verify it's complete somehow (ie by loading it into a new system); an untested backup shouldn't be trusted on faith alone.
> 1 votes

---
Tags: export
---


# Question
Title: Creating a single manage your subscriptions link for mails sent via CiviMail and Mailchimp
We have a number of mailing lists, some of which are synchronised with mailchimp lists with emails sent via mailchimp (organisational culture means that they want to keep these with mailchimp). The others are sent via CiviMail.

We've created a manage my subscriptions page that contains all mailing list subscriptions. We can provide a checksummed link to this page from CiviCRM mailings I am struggling to see how we could create this from mailchimp. One thing we can do is create links in mailchimp of the form example.org/link-to-manage-my-subscriptions?email=email@example.org. And have this URL trigger an email to the recipient that authenticates them to example.org/link-to-manage-my-subscriptions.

I'm wondering if I am missing a trick that would allow us to create a checksum link in mailchimp and authenticate to that page without the extra email step.

# Answer
Assuming you're using the mailchimp extension headed by Veda...

You cannot supply more data from CiviCRM to mailchimp, such as data from other fields, or calculated such as a unique URL or checksum.

Furthermore, there is no direct one-to-one link (e.g. ContactID) between the data at Mailchimp and the contacts in CiviCRM. Since integration means that people will always be able to subscribe directly at Mailchimp (or via another consumer of their API), it would be impossible to maintain a state of having a known ID in Mailchimp.

I recently quoted for implementing the first of these and it looked like a *lot* of work. The latter could be implemented with less work, but you would still have to deal with the cases of subscribers at Mailchimp that might not exist/have corresponding contacts in CiviCRM.

**A practical solution** might be to have a service that runs on a schedule to: fetch subscribers without this magic link (yet) using Mailchimp's API; then loop those, calculate the links and create a bulk API update call.

My CRM\_Mailchimp\_Api3 class has methods for submitting and waiting on a bulk Mailchimp API operation.

That way as long as your link does not need changing (it might, in the case of a subscriber changing their email address), and as long as the scheduled job runs frequently enough, you should be able to pull in that magic URL as a `|*MERGE_TAG*|`.
> 1 votes

---
Tags: civimail, mailchimp
---


# Question
Title: Is there a way to make report filters mandatory
I have made some custom reports which contain two types of filters:

1. a date field. This does not correspond to a database field. Its just used in some calculations
2. some custom fields

Is it possible to make these filters mandatory? Defaulting the values doesn't really help.

OR is it possible for the report to produce a custom error message which the user can see if the field is not set? For example, in the custom report if the filter values are not set then set error message and stop running the report.

# Answer
> 1 votes
If you are setting the filter value (with a default) and don't want the user to change it, you can use the 'no\_display' parameter to hide the filter from the user. (Per the docs here: https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference#CiviReportReference-filters ) Unfortunately, it doesn't look like the Required parameter is an option for filters like it is for fields.

---
Tags: wordpress, custom-fields, civireport, 4.7, custom-reports
---


title: Can't install CiviCRM on Joomla

text:
# Question
Title: Can't install CiviCRM on Joomla
I can't install the CiviCRM onto my Joomla. When trying to install it looks like it's working then it goes back to the install screen and nothing is installed. I have tried the zip file and tmp folder.

# Answer
> 1 votes
Make sure you are running the update database action, but it sounds like you might be installing a bad package or timing out. Could you share a screenshot? I might not be able to help much tonight, but I'd be happy to help you later this week if you don't have it resolved by then.

---
Tags: joomla, installation
---


# Question
Title: Staging Site: staging.site.com/civicrm 404 WordPress
All paths seem to be set up correctly, I've gone through Pointing to /civicrm breaks Wordpress site, 404 HTTP response and the forum link posted on there but with no success

So for example staging.site.com/civicrm?page=CiviCRM&q=civicrm/contribute/transact will return a 404 error (anything /civicrm returns a 404 error inc "staging.site.com/civicrm") There is a single error in the error log relating

staging.site.com \[Fri Mar 10 17:21:10 2017\] \[error\] \[pid 2446\] mod\_negotiation.c(1291): \[client 123.123.123.123:52418\] AH00687: Negotiation: discovered file(s) matching request: /home/profile/www/staging/civicrm (None could be negotiated).

The CiviCRM page in WordPress exists and every other page works okay, the main production site works okay

I've checked all the resource URLs etc and everything looks good, matches the production version apart from pointing to the staging directory, permalinks are setup, as is the .htaccess file

I've looked up the error in the error.log file and nothing comes up at all related to civi so at a bit of a loss now, hopefully there's something simple to fix!

I'm fairly new to civi, so things that are probably easy fixes I'm not aware of yet! The staging site is a clone of the production site but with everything in the settings file & database changed to the staging directory

Thanks in advance!

# Answer
Sorry I forgot to put a response here... Just to let those know who may have this issue

Adding "Options -MultiViews" to the .htaccess fixed it...

Simple fix but was an environment based issue... There is info about this online but apparently I couldn't put 2 and 2 together!!!
> 1 votes

# Answer
welcome to the CiviVerse!

Check for the presence of the .htaccess files. Depending on how you cloned the site perhaps these were lost.
> 1 votes

---
Tags: wordpress, error, configuration, urls, error-page
---


title: DB error: Unknown error in search

text:
# Question
Title: DB error: Unknown error in search
Using both WP & Drupal with different databases.

CiviCRM version : 4.6.28 Drupal version 7.54 Wordpress version :4.7.4

I am trying to use the search option given in CiviCRM. It fails in both WP & drupal with " Sorry but we are not able to provide this at the moment. DB Error: Unknown error"

why this issue is seen? What is the solution?

========================================================

```
#0 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Error.php(182): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...")
#4 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...")
#5 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\DB\common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...", "DB_Error", TRUE)
#6 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\DB\mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1055 ** Expression #37 of SELECT list is not in GROUP BY clause and contains ...")
#7 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\DB\mysql.php(328): DB_mysql->mysqlRaiseError()
#8 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\DB\common.php(1216): DB_mysql->simpleQuery("SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...")
#9 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\DB\DataObject.php(2442): DB_common->query("SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...")
#10 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\DB\DataObject.php(1634): DB_DataObject->_query("SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...")
#11 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\DAO.php(321): DB_DataObject->query("SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...")
#12 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\DAO.php(1181): CRM_Core_DAO->query("SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...", TRUE)
#13 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Contact\BAO\Query.php(4685): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`,...")
#14 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Contact\Selector.php(550): CRM_Contact_BAO_Query->getCachedContacts("civicrm search b941cfc8ff1839fc77f5e89495a28257_3756", 0, 50, FALSE)
#15 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Selector\Controller.php(403): CRM_Contact_Selector->getRows(4, 0, 50, Object(CRM_Utils_Sort), 1, NULL)
#16 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Selector\Controller.php(340): CRM_Core_Selector_Controller->getRows(Object(CRM_Contact_Selector_Controller))
#17 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Contact\Form\Search.php(876): CRM_Core_Selector_Controller->run()
#18 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Contact\Form\Search\Advanced.php(330): CRM_Contact_Form_Search->postProcess()
#19 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Form.php(345): CRM_Contact_Form_Search_Advanced->postProcess()
#20 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\QuickForm\Action\Refresh.php(75): CRM_Core_Form->mainProcess()
#21 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\HTML\QuickForm\Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Advanced), "refresh")
#22 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\packages\HTML\QuickForm\Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Advanced), "refresh")
#23 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Controller.php(353): HTML_QuickForm_Page->handle("refresh")
#24 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Invoke.php(312): CRM_Core_Controller->run((Array:4), (Array:0))
#25 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#26 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#27 C:\wamp64\www\wordpress\wp-content\plugins\civicrm\civicrm.php(1196): CRM_Core_Invoke::invoke((Array:4))
#28 [internal function](): CiviCRM_For_WordPress->invoke("")
#29 C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php(298): call_user_func_array((Array:2), (Array:1))
#30 C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php(323): WP_Hook->apply_filters("", (Array:1))
#31 C:\wamp64\www\wordpress\wp-includes\plugin.php(453): WP_Hook->do_action((Array:1))
#32 C:\wamp64\www\wordpress\wp-admin\admin.php(222): do_action("toplevel_page_CiviCRM")
#33 {main}

```

# Answer
> 2 votes
I think you might have mysql full group by mode on - 4.7 supports that (latest version is 4.7.19) but not 4.6. I think full group by is on by default or always on mysql 5.7

https://stackoverflow.com/questions/23921117/disable-only-full-group-by

# Answer
> 0 votes
If you turn on debugging you should get more information about the error & people will hopefully be able to interpret it for you - under Administer-\>System Settings-\>debugging and Error handling. Turn on debugging and backtrace.

---
Tags: wordpress, drupal, search, search-results, custom-search
---


title: Wordpress Cron Issues

text:
# Question
Title: Wordpress Cron Issues
Ok I did search and I do recall fussing with this a bunch when setting up cron jobs, but here is the situation.

I accidentally deleted my civicrm-settings.php file the other day. Really it was no big deal, restored within 5 minutes from a backup only a few hours old. HOWEVER, since then cron has not been running.

Trying to pull it via: wget -O - -q -t 1 'http://www.SITE.com/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=cronjobs&pass=#####&key=####'

I have been getting:

ERROR: Invalid key value sent. More info at:http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

* Absolutely nothing has changed
* Verified Site Key
* Verified administrator un/pw

Tried running it with cli.php and it is still not running (despite setting permissions on that file)

Any incite?

# Answer
> 0 votes
I was able to add the following line to my System.php file and run the cron from my Chrome browser one time to see what was actually being passed.

At Line 570 I went from:

```
    if ($key !== $siteKey) {
  return self::authenticateAbort(
    "ERROR: Invalid key value sent. " . $docAdd . "\n",
    $abort
  );
}

```

To:

```
`return self::authenticateAbort(
        "ERROR: Invalid key value sent. " . $docAdd . $key . $siteKey ."\n",
        $abort
      );
    }`

```

So the cron is running, but I am getting header errors now. Hey at least this one is solved.

Found most of the answer here: Cron - Invalid key value sent

Though the log wasn't generating the lines I needed, so I just ran with it. My solution isn't the most secure, but it got the job done after a month of manually running jobs.

# Answer
> 0 votes
Looks like your user name for this is 'cronjobs'. try creating a new user without the word 'cron' in it. I had a similar issue with a new site recently and removing 'cron' from the user name did the trick.

Hope this helps.

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


title: Connect Gmail to CiviMail?

text:
# Question
Title: Connect Gmail to CiviMail?
Is there a way to to do this without multiple layers of installation on multiple computers (this would be intended for 4-5 staff members regularly using Civi for donor outreach).

# Answer
I'm not clear exactly what you are trying to achieve here, but there are a number of extensions that link CiviCRM to Gmail. Have you looked at the following any of the following?
> 2 votes

---
Tags: civimail
---


# Question
Title: What's the rationale behind the new Civi folder in civicrm?
From a cursory glance, everything in Civi seems to be namespaced and everything in CRM is not. I'm guessing the answer has something to do with this.

# Answer
According to the developer docs on namespaces, the two standards represent two eras of trend in programming standards:

> CRM (e.g.: `CRM_Core_Invoke`) classes use PEAR-style class-naming conventions that were common up until PHP 5.2. Class names include underscores and MUST NOT use the PHP "namespace" directive. Use CRM style when creating classes that plug into existing CRM subsystems such as payment processors (CRM\_Core\_Payment) and reports (CRM\_Report).
>
> Civi (e.g.: \Civi\API\Kernel) "Civi" classes use PHP 5.3 namespaces. They MUST use the "namespace" directive. Namespaces are designated with "\\".
>
> ...*snip*...
>
> The Civi namespace uses composer's PSR-0 autoloader. This autoloader does not support custom PHP overrides.

Obviously the developer costs of a refactor are prohibitively high and fraught with inter-operability difficulties with all the extensions, PHP versions etc. (I'm frequently shocked how many organisations still run CiviCRM on an unsupported (read: insecure) version of PHP.)

So CiviCRM started with PEAR's conventions, then jumped on the PSR-0 bandwaggon.

PSR-0 has been deprecated since 2014, so maybe we might have `\CiviCrm` namespace soon that follows PSR-4 *and* the CiviCRM brand guidelines about not shortening the name to Civi?

It's *so* hard staying fashionable these days and CiviCRM's rocking the retro
> 2 votes

---
Tags: architecture
---


# Question
Title: Being given the contribution_id, how can I update the Contribution?
I have a lot of Organizations, each with its administrator.

Authenticated users can contribute to those (for membership, participation, or simple donation), via Webforms including a Contribution page where the user can select "pay later".

For safety and ease reasons I don't want those organization administrators to use the Civi Contribution Search UI to update a "pay later" Contribution when they receive a check (Check # and Status). And I am looking for a solution to do that in a monitored way.

One way could be : a Views report can provide him with the Contribution\_id number.

But then, what ? For instance, how could I use this contribution\_id as a token to open a form to update this payment ?

I am open to any suggestion.

(I run Civi 4.7.16 / Drupal 7.54) (I tested Views VBO, but unsuccessfully) (I am not a Programmer)

# Answer
I do not know how exactly but I am sure there will be guys and girls around that do. But you should be able to link a Webform (with CiviCRM integration - check https://www.drupal.org/project/webform\_civicrm) to a View and pass a contribution\_id to that form.
> 0 votes

# Answer
It sounds to me like you may need to add some new functionality to VBO so that these fields become available to you.
> 0 votes

---
Tags: civicontribute
---


title: Duplicate Contacts

text:
# Question
Title: Duplicate Contacts
I am new to using CIVI at my work place, and there are a ton of duplicate entries in the system (we did a merge from our previous system). Is there a quick and easy way to merge all duplicate contacts?

# Answer
Yes. One of the questions to consider is what you mean by a duplicate. If two contacts have the same first and last names, same address, same email and same date of birth, then you're fairly safe in assuming they represent the same person. But real data is far messier and incomplete so Civi lets you choose what characteristics to look for - those are described by a 'Dedupe Rule'.

If you have lots of duplicates you will need to repeat the process several times using different dedupe rules. I tend to start with quite specific ones (eg first name, last name, postcode), deal with those, then broaden the criteria.

In brief:

* go to `Contacts > Find and Merge Duplicate Contacts`
* click `Use Rule` on one of the Individual Rules, or `Add Rule for Individuals` to set up a new rule
* select a group - or leave it blank to search all contacts
* review the duplicates and merge them

For much more detail, see https://docs.civicrm.org/user/en/stable/common-workflows/deduping-and-merging/
> 3 votes

# Answer
In addition to Aidan's answer, CiviCRM does come with a Batch Merge tool which can resolve the most straightforward of matches and leave you to just deal with the odd or complex ones manually.

This process is described in the section "Merging multiple contacts simultaneously" in https://docs.civicrm.org/user/en/4.7/common-workflows/deduping-and-merging/
> 2 votes

---
Tags: duplicate-contacts
---


# Question
Title: Installing Civicrm session_start(): error fatal
I installed Civicrm on Wordpress on the plugin folder and I can't active it.

I have this error :

> Warning: session\_start(): user session functions not defined in /srv/bindings/code/wp-content/plugins/civicrm/civicrm.php on line 282 Fatal error: session\_start(): Failed to initialize storage module: user (path: ) in /srv/code/wp-content/plugins/civicrm/civicrm.php on line 282

Can you help me? Thanks

# Answer
> 2 votes
It looks like your hosting provider or server config has overridden the PHP ini setting `session.save_handler` (or related settings like `session.save_path`).

You could try applying a fix similar to the one over on CRM-17212: IPN and other scripts break on Pantheon due to session handler

---
Tags: error, installation, cms-integration
---


# Question
Title: Cannot Backup my CiviCRM DataBase due to an Unexpected Error
I use the Backup & Migrate Drupal Module

I realize that I have never had my CiviCRM DB saved, though it is mentionned in the Sources Backup configuration list.

I have only one Settings Profile, which only contains "Default Settings" / "Default DataBase" (which I understand to be the Drupal DB).

If I want to "override" the existing Setting or "Create a New Profile", I get the following message :

"The Web site has encountered an unexpected error ; please try later".

Is there any expectable reason ?

(Currently in Drupal 7.54)

--------------------------- Edited 04/19/2017

I have submitted the problem to CiviHosting : this is their answer :

*"I enabled logging for your site and the error is this: PDOException: SQLSTATE\[HY000\] \[1045\] Access denied for user 'XXXXX'@'' (using password: YES) in backup\_migrate\_source\_db-\>\_get\_db\_connection() (line 213 of /home/XXXXX/www/www/sites/all/modules/backup\_migrate/includes/sources.db.inc). which I do not understand as the XXXXX has access to both the CiviCRM and the Drupal database."*

# Answer
Finally, I have deleted my CiviCRM DB from the Settings Sources, then recreated it, and it seems to work now.

I may have entered bad credentials, but the error message is not very explanatory.
> 1 votes

---
Tags: backups
---


# Question
Title: Create profile not creating contact properly unless logged in on wordpress with civicrm 4.6
bit lost here

We have a newsletter signup page which has a form created using profiles. When the user submits the information it should create a contact (then a civirule will add a new activity when the user gets added to the newsletter signups group)

At first, the issue that we were seeing was, when not logged in (when logged in, it all works fine), when civirules was trying to add the user to the group it would say "source\_contact\_id is not a valid integer" Disabling the civirule gets you to the success page but doesn't fix the underlying issue.

When logged in the contact is created properly The newsletter page responds as so: First Name tester Last Name test Email test@example.org

And adds the contact info to the contact

When not logged in it returns: First Name Last Name Email

And doesn't add any contact info to the contact The civi url would be for example: ?page=CiviCRM&q=civicrm/profile/view&reset=1&id=123456&gid=12

So in short, if the form is filled in and the user is logged in, everything works as it should. If it is an anonymous user the contact gets created but the name & email isn't created Permissions are set up with anonymous being able to edit/create profiles and even just giving permission to everything doesn't help... There's no errors either...

Please help!!!

# Answer
> 0 votes
The symptoms I thought there were, weren't there, the contact was being created correctly, my method of testing was wrong...

The problem is a bug in civirules, when creating an activity when not logged in, it doesn't have the "source\_contact\_id" parameter available for the API (when you look at an activity, it's the bit that says "added by"...

My solution (we're on wordpress) was to add if(!is\_user\_logged\_in()){ $parameters\["source\_contact\_id"\]=1; } before the API call in the plugin.

I've reported the issue over here https://github.com/CiviCooP/org.civicoop.civirules/issues/152 and will build in the method of being able to set a default contact for activities if the user isn't logged in (which I'll pr on the git repo), my fix is wordpress specific, hacky and needed to be done quickly

---
Tags: wordpress, profile, 4.6
---


title: Need help in organizing/mapping my data

text:
# Question
Title: Need help in organizing/mapping my data
I need help in mapping/organizing data.

For our organization we need to capture some details of 3 categories of people. an individual can fall under all 3 or even one of them.

1. Professors / Scientists
2. visitors
3. donors

Apart from regular contact details, we want to capture their

educational degrees from which university,
Areas of interests,
Thesis/ dissertations submitted,
skill sets, and
medium of intro to our institute ( like web visitor, stall visitor, direct visit to organization, through some outreach events (want to capture every event specifically), etc)
also some gradation level how much they are interested in contributing to our org

We will be needing reports based on any of the above data.

As a first time civiCRM user, cannot determine which would be an ideal way to map/organize my data. Can you help me to use which civiCRM feature (groups,tags,custom fields) to use for my requirements?

# Answer
You're half way there with this. I would say that the three types of people are 'Contact Types'. Groups and/or Tags can be used to break these down where relevant, for instance, tags might be used to identify who actively contributes to your org, and groups might be used for the people that you will be mailing newsletters to.

The rest are probably mostly custom fields, with the exception of the medium of introduction to your institute - this may be an activity (use activity types and/or custom fields to specify the information you want to capture) because this will make it easier to see how many new interactions you've had in any given time period.

Ultimately, though, CiviCRM is really flexible and there are other approaches to capture and report on the same information. If you give some thought now to the specifics of what you will report on, you may decide that there is a better approach.
> 2 votes

---
Tags: contacts, custom-fields, groups, smartgroups, field-mapping
---