# Question
Title: Drush failing to build database during new installation
I am building a Docker container for CiviCRM, it is 99.9% done. Unfortunately, when I try to install the actual module via Drush, it spits out an error. I am fairly certain this isn't a Docker related issue, hopefully someone here has advice or direction.

The error that is thrown:

> Cannot execute INSERT INTO (snip) ;: DB Error: already exists Drush command terminated abnormally due to an unrecoverable error

The full error, including (snip) can be found below.

Now, I dug around the Drush command script and it appears that the issue originates at the \_civicrm\_install\_db function. Specifically, before line 390 as that log entry is never printed.

I did some looking through the JIRA bug tracker and found two possibly related issues. The first CRM-17874 mentions the mysql:// database call, I tried patching the file and the same error is being thrown. The second CRM-18120 mentions Deadlocks which seems highly plausible, but I did not see an easy patch.

Anyway, I have asked for advice on IRC but to no avail as of yet. Please let me know if you have any solutions or thoughts. I will check here frequently as well as being available for synchronous chat in IRC.

Thanks!

**Edit 1:** Here is the Drush command being run for installation: `drush -y civicrm-install \
 --dbuser=${MYSQL_USER} \
 --dbpass=${MYSQL_PASSWORD} \
 --dbhost=db \
 --dbname=${MYSQL_DATABASE_CIVICRM} \
 --tarfile=/var/www/civicrm.tar.gz \
 --destination=sites/all/modules \
 --site_url=${VIRTUAL_HOST} \
 --ssl=on \
 --load_generated_data=false`

(full error)

> Cannot execute INSERT INTO `civicrm_acl` (`id`, `name`, `deny`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `acl_table`, `acl_id`, `is_active`) VALUES (1,'Edit All Contacts',0,'civicrm\_acl\_role',1,'Edit','civicrm\_saved\_search',0,NULL,NULL,1),(2,'Core ACL',0,'civicrm\_acl\_role',0,'All','access CiviMail subscribe/unsubscribe pages',NULL,NULL,NULL,1),(3,'Core ACL',0,'civicrm\_acl\_role',0,'All','access all custom data',NULL,NULL,NULL,1),(4,'Core ACL',0,'civicrm\_acl\_role',0,'All','make online contributions',NULL,NULL,NULL,1),(5,'Core ACL',0,'civicrm\_acl\_role',0,'All','make online pledges',NULL,NULL,NULL,1),(6,'Core ACL',0,'civicrm\_acl\_role',0,'All','profile listings and forms',NULL,NULL,NULL,1),(7,'Core ACL',0,'civicrm\_acl\_role',0,'All','view event info',NULL,NULL,NULL,1),(8,'Core ACL',0,'civicrm\_acl\_role',0,'All','register for events',NULL,NULL,NULL,1),(9,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviCRM',NULL,NULL,NULL,1),(10,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviContribute',NULL,NULL,NULL,1),(11,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviEvent',NULL,NULL,NULL,1),(12,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviMail',NULL,NULL,NULL,1),(13,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviMail subscribe/unsubscribe pages',NULL,NULL,NULL,1),(14,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviMember',NULL,NULL,NULL,1),(15,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviPledge',NULL,NULL,NULL,1),(16,'Core ACL',0,'civicrm\_acl\_role',1,'All','administer CiviCase',NULL,NULL,NULL,1),(17,'Core ACL',0,'civicrm\_acl\_role',1,'All','access my cases and activities',NULL,NULL,NULL,1),(18,'Core ACL',0,'civicrm\_acl\_role',1,'All','access all cases and activities',NULL,NULL,NULL,1),(19,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete in CiviCase',NULL,NULL,NULL,1),(20,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviGrant',NULL,NULL,NULL,1),(21,'Core ACL',0,'civicrm\_acl\_role',1,'All','access Contact Dashboard',NULL,NULL,NULL,1),(22,'Core ACL',0,'civicrm\_acl\_role',1,'All','administer Multiple Organizations',NULL,NULL,NULL,1),(23,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete activities',NULL,NULL,NULL,1),(24,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete in CiviContribute',NULL,NULL,NULL,1),(25,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete in CiviMail',NULL,NULL,NULL,1),(26,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete in CiviPledge',NULL,NULL,NULL,1),(27,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete contacts',NULL,NULL,NULL,1),(28,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete in CiviEvent',NULL,NULL,NULL,1),(29,'Core ACL',0,'civicrm\_acl\_role',1,'All','delete in CiviMember',NULL,NULL,NULL,1),(30,'Core ACL',0,'civicrm\_acl\_role',1,'All','translate CiviCRM',NULL,NULL,NULL,1),(31,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit grants',NULL,NULL,NULL,1),(32,'Core ACL',0,'civicrm\_acl\_role',1,'All','access all custom data',NULL,NULL,NULL,1),(33,'Core ACL',0,'civicrm\_acl\_role',1,'All','access uploaded files',NULL,NULL,NULL,1),(34,'Core ACL',0,'civicrm\_acl\_role',1,'All','add contacts',NULL,NULL,NULL,1),(35,'Core ACL',0,'civicrm\_acl\_role',1,'All','administer CiviCRM',NULL,NULL,NULL,1),(36,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit all contacts',NULL,NULL,NULL,1),(37,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit contributions',NULL,NULL,NULL,1),(38,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit event participants',NULL,NULL,NULL,1),(39,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit groups',NULL,NULL,NULL,1),(40,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit memberships',NULL,NULL,NULL,1),(41,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit pledges',NULL,NULL,NULL,1),(42,'Core ACL',0,'civicrm\_acl\_role',1,'All','access CiviReport',NULL,NULL,NULL,1),(43,'Core ACL',0,'civicrm\_acl\_role',1,'All','access Report Criteria',NULL,NULL,NULL,1),(44,'Core ACL',0,'civicrm\_acl\_role',1,'All','administer Reports',NULL,NULL,NULL,1),(45,'Core ACL',0,'civicrm\_acl\_role',1,'All','import contacts',NULL,NULL,NULL,1),(46,'Core ACL',0,'civicrm\_acl\_role',1,'All','make online contributions',NULL,NULL,NULL,1),(47,'Core ACL',0,'civicrm\_acl\_role',1,'All','make online pledges',NULL,NULL,NULL,1),(48,'Core ACL',0,'civicrm\_acl\_role',1,'All','profile listings and forms',NULL,NULL,NULL,1),(49,'Core ACL',0,'civicrm\_acl\_role',1,'All','profile create',NULL,NULL,NULL,1),(50,'Core ACL',0,'civicrm\_acl\_role',1,'All','profile edit',NULL,NULL,NULL,1),(51,'Core ACL',0,'civicrm\_acl\_role',1,'All','profile listings',NULL,NULL,NULL,1),(52,'Core ACL',0,'civicrm\_acl\_role',1,'All','profile view',NULL,NULL,NULL,1),(53,'Core ACL',0,'civicrm\_acl\_role',1,'All','register for events',NULL,NULL,NULL,1),(54,'Core ACL',0,'civicrm\_acl\_role',1,'All','view all activities',NULL,NULL,NULL,1),(55,'Core ACL',0,'civicrm\_acl\_role',1,'All','view all contacts',NULL,NULL,NULL,1),(56,'Core ACL',0,'civicrm\_acl\_role',1,'All','view event info',NULL,NULL,NULL,1),(57,'Core ACL',0,'civicrm\_acl\_role',1,'All','view event participants',NULL,NULL,NULL,1),(58,'Core ACL',0,'civicrm\_acl\_role',1,'All','edit all events',NULL,NULL,NULL,1),(59,'Core ACL',0,'civicrm\_acl\_role',2,'All','access CiviMail subscribe/unsubscribe pages',NULL,NULL,NULL,1),(60,'Core ACL',0,'civicrm\_acl\_role',2,'All','access all custom data',NULL,NULL,NULL,1),(61,'Core ACL',0,'civicrm\_acl\_role',2,'All','make online contributions',NULL,NULL,NULL,1),(62,'Core ACL',0,'civicrm\_acl\_role',2,'All','make online pledges',NULL,NULL,NULL,1),(63,'Core ACL',0,'civicrm\_acl\_role',2,'All','profile listings and forms',NULL,NULL,NULL,1),(64,'Core ACL',0,'civicrm\_acl\_role',2,'All','register for events',NULL,NULL,NULL,1),(65,'Core ACL',0,'civicrm\_acl\_role',2,'All','view event info',NULL,NULL,NULL,1);: DB Error: already existsDrush command terminated abnormally due to an unrecoverable error. \[error\]

# Answer
After doing some print-line debugging, I traced the issue to line 413 which determines whether or not pre-generated demo data should be loaded.

I have tried a variety of combinations to no avail: `load_generated_data=false
load_generated_data=FALSE
load_generated_data="FALSE"`

As I am out of ideas, for now the flag is just going to be removed from my script. However, it appears that this is a bug with the Drush command.

Thanks to everyone who took a look and offered advice, here and on IRC.

**Edit:** load\_generated\_data=0 WORKS!
> 1 votes

# Answer
This error can happen if you attempt to load a CiviCRM DB over the top of an existing DB. It's possible that's what you're running into here.

Looks like there are two files in the CiviCRM distribution which might try to populate that table, so make sure you aren't getting both executed.

* `civicrm/sql/civicrm_acl.mysql`
* `civicrm/sql/civicrm_generated.mysql`

But this is speculative - can you describe in detail how you're installing CiviCRM via Drush? That might help someone reproduce the error you're hitting or give a more definite reply.
> 2 votes

---
Tags: drupal, database, installation, issues, drush
---


title: Turn deduping off?

text:
# Question
Title: Turn deduping off?
Since upgrading from 4.4-\>4.6 we're having issues with on-behalf-of membership signups. It is very common for our use-case to have people create both an Individual and and Organization with the same name and email address. We're finding that in the process of a membership signup where a person creates both these things, the individual is created during the drupal user creation, but then when the Org should be created it instead overwrites the previous Individual and changes its type but leaves the Organization Name field blank.

What I would really love in the short term is to be able to turn off unsupervised deduping entirely, but I can't find a way to. Simply deleting the unsupervised rule for individuals causes the user-creation step to barf an error that no unsupervised rule exists, but I can't find a way to just turn it off until I can find a better solution.

# Answer
Either change the unsupervised dedupe rule or create a new one where the conditions can't be met. So change the "Weight Threshold to Consider Contacts 'Matching':" number to something higher than the conditions can add up to. That way it's never met, so it isn't applied.

You didn't ask for help on the underlying problem but it sounds like for some reason it isn't first matching on the contact type. You might also be able to up the threshold. I think the default unsupervised rule or organization has 10 for name and 10 for email but only needs 10 to pass so if either the name or email matches it says it's a match. Maybe if you make the match 20.
> 3 votes

# Answer
I think I've got a temp solution for this. Further testing suggested that there was some logic matching the on-behalf contact by display\_name; the issue only persists if the individual contact's display\_name was the same as the org that got created in the membership signup.

I diffed my version of the file (4.6.14) against a more recent version (4.7.3) and found this change in the logic:

```
 // if onbehalf-of-organization
-    if (!empty($this->_params['hidden_onbehalf_profile'])) {
+    if (!empty($this->_values['onbehalf_profile_id']) && !empty($this->_params['onbehalf']['organization_name'])) {
       // CRM-15182
-      if (empty($this->_params['org_option']) && empty($this->_params['organization_id'])) {
-        if (!empty($this->_params['onbehalfof_id'])) {
-          $this->_params['organization_id'] = $this->_params['onbehalfof_id'];
-        }
-        else {
-          $this->_params['organization_id'] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_params['onbehalf']['organization_name'], 'id', 'display_name');
-        }
-      }
+      $this->_params['organization_id'] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_params['onbehalf']['organization_name'], 'id', 'display_name');

```

I applied this change to my version of the file and the issue appears to be resolved. Long-term fix looks like a 4.6.14-\>4.7.3 or .4 upgrade. Thanks @petednz-fuzion for your help!
> 1 votes

---
Tags: duplicate-contacts
---


title: PayPal Standard and Webform CiviCRM

text:
# Question
Title: PayPal Standard and Webform CiviCRM
visiting this page https://forum.civicrm.org/index.php?topic=34814.0 Coleman said "PayPal standard feature is being added to Webform-CiviCRM right now, should be ready sometime next week." It was on November 14, 2014. Any news/update on this subject?

# Answer
I'd say it should be ready for you to do some testing with. According to this ticket it seems like Paypal Standard functionality should now be active.

*(Caveat: Webform\_Civicrm is not yet fully compatible with CiviCRM 4.7).*
> 2 votes

---
Tags: webform-civicrm
---


# Question
Title: "Invalid Contact ID" displayed after merge?
Drupal 7, Civicrm 4.7.4

I'm getting this error message after every contact merge. Any ideas?

---

## debug message

```
CiviCRM_API3_Exception: "Invalid Contact Id"

 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(1945): civicrm_api3("activity", "create", (Array:5))
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(1834): CRM_Dedupe_Merger::createMergeActivities("55836", "197792")
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Contact/Form/Merge.php(318): CRM_Dedupe_Merger::moveAllBelongings("55836", "197792", (Array:35))
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Form.php(423): CRM_Contact_Form_Merge->postProcess()
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Contact_Form_Merge), "next", "Next")
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contact_Form_Merge), "next")
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "next")
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact", NULL)
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:3))
 [internal function](): civicrm_invoke("contact", "merge")
 /var/www/vhosts/example.com/httpdocs/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
 /var/www/vhosts/example.com/httpdocs/index.php(21): menu_execute_active_handler()
 {main}
 Sorry but we are not able to provide this at the moment.
Invalid Contact Id

```

# Answer
Ah - if the contact id doesn't exist perhaps delete to trash is off?
> 3 votes

# Answer
This is happening as a result of CRM-18106, "Add activity to deleted contacts showing they were deleted by merge". I added a comment to that issue referencing this question. In short: In Civi 4.7.4, this activity is added to contacts deleted by merge - part of a larger effort to make deduping reversible. It's not working for you. That's unfortunate - but the good news is that what's broken didn't exist before 4.7.4, so you shouldn't be experiencing any ill effects other than the error.
> 1 votes

# Answer
This is now logged with a patch here https://issues.civicrm.org/jira/browse/CRM-18307

However if you are experiencing this I suggest you give serious consideration to enabling 'Contact Trash and Undelete' per Cullen McGough Mar 25 at 20:39 - since that setting is the default and for most sites having the delete to trash option turned on is a sensible precaution
> 1 votes

# Answer
shot in the dark... any external ID's?
> -1 votes

---
Tags: contacts, issues, duplicate-contacts
---


# Question
Title: Could not load settings file at: 4.7.0 wordpress
I tried to load my contact to civicrm using the command line however was i tried to execute the import.php i received an error"could not load the settings file at:

i tried to further investigate i noticed that my civicrm.config.php is identical to the other server i used before that works perfectly fine as i tried the command line this error always comes up.

please do help a newbie.

# Answer
Upgrade to 4.7.4. There was a bug in civicrm.config.php in 4.7.0 that would result ib the settings file not being found in WP under certain circumstances.
> 1 votes

---
Tags: import
---


# Question
Title: How to include an opt-out link (with token) in a reminder?
I'm new to working with Scheduled Reminders, and am trying to figure out how to include our org's standard forward, opt out and sent-from info in each reminder, as we do with bulk Civi emails.

Our email template includes this:

====

# To forward this to a friend {action.forward} To never receive any email from the RFC {action.optOutUrl} This email is sent from: {domain.address}

But those tokens don't seem to work when I copy and paste into reminders. I don't understand why, or how to properly set up forward, opt out and sent from address in reminders.

# Answer
> 1 votes
This can't be done - because that token was created with CiviMail in mind. There was a sense that scheduled reminders wouldn't be used for something that required an opt-out - but of course, people always want to use the software in new and interesting ways!

Unfortunately, I don't think you're going to get this one unless someone writes an extension to do so, or submits a patch to core CiviCRM.

# Answer
> 1 votes
If you are wanting to give them an option to set selves to 'do not mail' then, while not an ideal solution, for users of Drupal a webform can be used to allow people to set themselves to opt-out, set to 'do not send', etc

Your scheduled reminder would therefore need to include a checksum to the webform, the construction of which is explained on the civi tab of the webform

# Answer
> 1 votes
We get around the lack of an opt-out link in what could be a very labour-intensive way.

We link the words "opt-out" to an email (rather than a URL) and pre-fill it with an email address (info@...), subject (Please don't send me any more emails) and text (eg. "Source: Membership reminder - three weeks out").

Fortunately our opt-out rate for membership reminders is only 2 or 3 per thousand and we can manage that manually.

---
Tags: tokens, scheduled-reminders
---


title: Contribution Email Attachment Name

text:
# Question
Title: Contribution Email Attachment Name
My client would like to change the attachment name of the pdf they receive when a contribution is made.

This is now receipt.pdf (which is the case for a lot of emails).

Can this be changed?

I'm using Wordpress

# Answer
> 3 votes
I didn't manage to test this but Receipt.pdf is been hard-coded in CiviCRM Core and if you need to change the name of the attachment then you need to look into the below file and you need to override the file to achieve your change

.../wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/confirm.php

'PDFFilename' =\> 'receipt.pdf' - Line 1274

Also look into the link before overriding the file

Can I override core classes or PHP files with custom versions?

I guess this helps!

---
Tags: wordpress, attachments
---


title: Bounce type = Quota

text:
# Question
Title: Bounce type = Quota
I have a confounding challenge.

Email addresses are placed on **hold** after having bounced (where bounce type is Quota).

I looked at the actual bounce messages (see an example attached below) for some of the email addresses which bounced with bounce type=quota and the messages indicate that the email job exceeded the outgoing email sending quota on the sending server (this is an issue I plan to look into and resolve later).

However, What is strange is that email addresses to which email could not be 'sent' because sending server quota for outgoing email has been exceeded is now marked as onHold.

Another strange but related observation, is that there is an actual bounce email message - which should not be the case if the original email never left the outgoing server.

My questions:

1. Could the bounce email message be wrong and the email was actually sent but the receiving inbox is full?
2. If not, what am I missing?

Thanks a lot in advance!

# Answer
> 1 votes
Unfortunately, the bounce messages aren't standardized, so pretty much every mail server has their own text to say that the account doesn't exist, or that the mailbox is full or any of the bounce reason.

So what civimail has to do is to look at these emails and parse them to find keywords "INVALID MAILBOX", "DNS error" and if that specific keywords are found, flag the bounce accordingly.

Unfortunately for you, "quota" is one of these keywords, and to add insult to injury, your mail server puts a "this is a permanent error", but clearly is is not the case, as it would go through.

You could try to look at these rules in civi and try to come up with a new one for your "quota" email and flag it as a temporary bounce, but it means going into the database directly to update and create these rules.

I would suggest you that your time is too valuable for that and it would be cheaper to move to an hosting provider that doesn't have quota, or use an external mailing provider (eg mailjet, sendgrid...) to handle pushing your emails.

---
Tags: bounce
---


# Question
Title: Differences in results between 'Find Cases' and a 'Case Report'
Using 4.6.10 currently, although aiming to update shortly, I've created a case summary report from the template that simply lists all cases that are either 'ongoing' or 'urgent'. This lists 10 cases. All good.

However, if I then use 'Cases' \> 'Find Cases' and specify the exact same criteria (i.e. find all cases with the status 'ongoing' or 'urgent', it lists 14 cases.

Comparing the two results lists and looking for differences between the cases that might explain the difference in results, I can see none. We have only one case type, and all the cases as listed in the civicrm\_case table carry the same case type id, they are all open and not deleted, the status id values marry up as I would expect, and I can see no differences that might lead to these four cases not being included in my report.

My assumption/conclusion is that the case summary report template is in some way broken in this version? As I say I'm about to update to the current 4.6.x version (4.6.14 at the time of writing), but wondering if others have had odd results with the Case Summary Report, or indeed the 'Find Cases' search facility?

# Answer
As a result of the input from Demerit, for which many thanks, it seems clear that the Case Summary Report presents inaccurate – or at least potentially misleading – results, arising from the apparent grouping by contact, which is not made clear in the UI.

Making the two suggested changes to the file at CRM/Report/Form/Case/Summary.php as noted in the comments resolves the issue for me, aligning the results from the Case Summary Report with a search based on the same filters/criteria.

This was logged at issues.civicrm.org/jira/browse/CRM-18294
> 2 votes

# Answer
The Case Summary report has a grouping on contact. Do two or more of the cases have the same client?
> 2 votes

---
Tags: civireport, civicase
---


title: AJAX issues with CiviCRM 4.7

text:
# Question
Title: AJAX issues with CiviCRM 4.7
We seem to be having intermittent AJAX issues with our 4.7 installation. I've seen the following post:

https://forum.civicrm.org/index.php?topic=35850.0

And done a bit of troubleshooting. I can see from the console that I'm receiving a 500 error from Apache, however, when I look in the logs, there's no additional information beyond the 500 and an empty message. I've got every piece of debugging I know of turned on - does anybody have ideas about how to get additional information about the problem?

In case it helps, the specific call that is failing is when trying to edit the navigation menu. Most of the other AJAX calls seem to be working fine. I can manage ACLs, etc. Is it possible that I've missed a permission somewhere that is causing this to fail? I'm logged in as an administrator trying to make this change.

# Answer
> 1 votes
For our specific implementation, we ran into an issue with a permissions module we had previously written. We're still not entirely sure what the conflict was, but disabling the module enabled us to edit the navigation menu again.

---
Tags: 4.7
---


# Question
Title: After upgrading to 4.6.7 Civimail fails to send mail
The error message reads:

> Failed to run permission check: Unrecognized target entity table (civicrm\_note)

# Answer
> 2 votes
As Francesc pointed out, the symptoms sounds very similar to a contemporaneous question -- Why unexpected attached files are loaded in all mailings by default?

That was patched with https://github.com/civicrm/civicrm-core/pull/6644 and released as part of 4.6.9.

---
Tags: civimail, upgrade
---


# Question
Title: Updating Custom Form Value via jQuery not Saving to Database
I have been charged with developing CivicCrm for my place of business.

The company I work for is a nonprofit and we help people with disabilities both mental and physical. The Department that deals with seniors needs to produce reports to certain agencies. As part of the reporting, a matrix must be filled out – This is a questionnaire.

I currently have all of the question fields created in sections/tabs under CivicCase. The matrix is grouped by questions. For example a section entitled Income will have 4-5 questions based on Income. Depending on the yes or no answers a final field (#6) will need to be automatically populated. For example the questions are:

1. Does the household have income (both earned income and cash benefits)?
2. Is the household's income greater than or equal to 200% of Federal Poverty Guidelines?
3. Does the household show appropriate spending habits (Focus on meeting basic needs before purchasing luxuries, no unusually high costs, no spontaneous or inappropriate spending)
4. Does the household need assistance (Outside of own income) to meet basic needs?
5. Does the household have discretionary income and the ability to save?
6. Score:

So if 1 is answered yes you would continue to 2. If 2 were answered yes you would continue to 3. If 3 was “no” then a score would need to be recorded in field #6 above and no further questions would be needed and the rest would need to be changed to no. There will be several sections that will be about employment, Housing, etc. that would need to be scored similarly.

I have currently been able to use JavaScript to change the fields but when saved the incorrect value is saved in the database. I am using 2 answer dropdown selections.

I know this is probably something simple I am missing. What value should I be changing for it to save to the database?

CivicCRM version: 4.7.4 Drupal: 7.43

I am not using anything other than a custom jQuery script that I am including in the head of the document using the Drupal template.php file.

Thank you C Tyler

# Answer
> 1 votes
Are you changing it to the "value" or the "label" for the dropdown options? It should be the "value" (as defined when you set up the multiple choice options for the field). Or you can look in the generated html which might look like this `<option value="1">Yes</option>`, and then you'd use "1", not "Yes". It's the select tag you want to update not the associated input tag (well, yes the input tag too, but it only matters for the display on-screen).

---
Tags: custom-fields, civicase, javascript
---


title: Make badges using Event Reports

text:
# Question
Title: Make badges using Event Reports
How can I generate badges from an event report I created for conference registrants?

# Answer
> 3 votes
From Find Participants, you should find an option to Print Event Name Badges - you can see this here is you want to check http://d46.demo.civicrm.org/civicrm/event/search?reset=1

I do not think you can do it directly from a Report. If there is a reason why you can't easily select them via Find Participants, in Reports you can add your Participants to a Group, then use Adv Search, and select that Group, and set Display Results As, to Event Participants, then you should have Print Event Name Badge available to you under Actions. HTH

---
Tags: civievent
---


title: How to Identify Contact as Deceased

text:
# Question
Title: How to Identify Contact as Deceased
We have a contact in our database that is now deceased. We would like to maintain their historical records for archival use, but want to ensure that we stop sending mailings.

How do I identify someone in CiviCRM as being deceased?

# Answer
> 10 votes
Inside a contact, under demographics (gender, age, etc.) when you choose "Edit demographics" there's an option for "Contact is deceased".

# Answer
> 2 votes
As well as what RayWright said, if you're using 4.4 or below you might like to try this extension: https://civicrm.org/extensions/show-contact-deceased

---
Tags: contacts
---


# Question
Title: Can't get through initial install - dashboard error page
Well, I thought this would be a fairly simple, two-beer process: set up wordpress, install civicrm, and call it a day. Now I'm stuck and out of beer. I got wordpress installed fine (via the web host's one-click install process), but after activating civicrm and doing the "check requirements and install," when I am taken to the dashboard for the first time, I am met with these errors:

```
System Status: Error
Cron Not Running
Timestamp Mismatch
Configure Default Mailbox
Complete Setup
View details and manage alerts

```

\[

I'm on the following:

* civicrm verson 4.7.2
* php 5.6
* MariaDB Server 5.5.44-MariaDB-cll-lve
* wordpress 4.4.2

This should be a pretty standard install - I quite literally installed wordpress and then civicrm. I've seen the cron and mailbox errors before, but the timestamp and "complete setup" are new to me. I figure if I can push through those somehow, I'll be in business.

This is a fresh install of both the domain and hosting, so civicrm has not worked previously here. I've gotten civicrm running on a personal vm to learn the install process, but this one's throwing me for a loop. If I click on "View details and manage alerts," I am simply taken back to this same screen. No top civicrm menu appears, either, so I can't click around to various parts/modules within civicrm. Clicking on configure or refresh dashboard does takes me back to this screen, as well. I cannot for the life of me get past this screen. The server is hosted in Amsterdam. I have updated the PHP timezone settings to Europe/Amsterdam and Wordpress to +1:00.

I'm not sure where to start with this one - what log files to dig into, etc. I can successfully access other pages I know exist, such as www..com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact, where I can search for contacts (though my db doesn't contain any user content yet). I have the same db user configured for the wordpress db and the separate civicrm db (not sure if this follows best practices, but I'm just trying to get past this install screen first). I've given the db user all the necessary permissions and am not receiving any errors indicating db connection issues. I originally had a separate db user for civicrm and wordpress, but in troubleshooting have since blown everything away and started fresh (removed the databases, db users, wordpress install - everything).

Apologies if this is a dumb issue, but I've searched for answers and have so far been unsuccessful. Where do I start with this one? Thank you for any help.

# Answer
I followed the instructions on Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus and was able to add the following immediately after the initial `<?php` line of my wp-content/uploads/civicrm/civicrm.settings.php file:

```
global $civicrm_setting;
$civicrm_setting['Directory Preferences']['customTemplateDir'] = 'public_html/wp-content/plugins/civicrm/civicrm/templates/';
$civicrm_setting['Directory Preferences']['customPHPPathDir'] = 'public_html/wp-content/plugins/civicrm/civicrm/php/';
$civicrm_setting['Directory Preferences']['extensionsDir'] = 'public_html/wp-content/plugins/civicrm/civicrm/extensions/';
$civicrm_setting['URL Preferences']['extensionsURL'] = 'https://www.<website>.com/wp-content/plugins/civicrm/civicrm/extensions/';
$civicrm_setting['URL Preferences']['imageUploadURL'] = 'https://www.<website>.com/wp-content/uploads/civicrm/persist/contribute/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://www.<website>.com/wp-content/plugins/civicrm/civicrm/';

```
> 2 votes

# Answer
After quite some time struggling with a wordpress install in a subdirectory, i found the simple setting solved everything: define('CIVICRM\_CMSDIR', '/path/to/install/root/');
> 0 votes

---
Tags: installation, timestamp
---


# Question
Title: When users are contributing a duplicate record is created in wordpress
A member when contributing again is not linking to the member but creating a new profile even if name is different? can we have only unique email for member contribution?

# Answer
This should be able to be controlled via your Matching Rules.

I would suggest you read up about them and look at your DeDupe/Matching rules at civicrm/contact/deduperules?reset=1
> 3 votes

---
Tags: wordpress, duplicate-contacts
---


title: Civicrm altering contribution page

text:
# Question
Title: Civicrm altering contribution page
I have been struggling for weeks now trying to figure out the best way to prepare a form where :

* user selects province, apply a tax based on the province
* user selects the membership priceset
* total updated with the new membership price and tax according to the province selected.

is there any reference of key of achieving this? is this possible or not possible? I have been trying to use civitax but that's not the way to use it, and I tried adding mulitple tax field or trying to find conditional methods but that is not populating.

I am thinking of setting up the form in drupal custom form, then after that populate it via custom submit where when it submits, it manually db insert the transactions and all of that? but is that possible, as I search no clue of programmatically inserting/creating new user with membership info and so on.

thank you

# Answer
> 1 votes
How many different tax rates are involved?

It there aren't too many, a no-tech solution would be to create a different price set for each different tax rate and have province-based links on your call to action page.

Added later:

I don't know a lot about the tax feature but I put down what I **think** might work. (This is all untested so could be totally wrong.) Assuming you have already ticked **enable tax and invoicing** at **Administer \> CiviContribute \> CiviContribute Component setttings**, I would have thought you might need to:

* create three different financial account with the different tax rates say tax2, tax3, tax4.
* create three different financial types member\_dues2, member\_dues3, member\_dues4
* edit the three different financial types to link each to the appropriate sales tax account
* edit the three different financial accounts you will now have, to set the account code to the same value for each so that that membership revenue can totalled across aall the provinces using a line item report (if this is a what you need.) -Create a price set for each province lined to the correct financial type.

If this doesn't work, my apologies, but it may help you on your way somehow.

---
Tags: civicontribute, custom-fields, contributions, payment-processor, taxes
---


# Question
Title: is it worth switching from Joomla to Drupal for better CiviCRM integration?
Our site is currently using Joomla 2.5.27 and Civi 4.4.11. We need to either upgrade Joomla & CiviCRM to the latest or migrate our site to a drupal platform. Both sound like a lot of work. But we have some kinks in optimally using Civi that appear to be the result of incompatibility w/ Joomla. I am not a developer but am a knowledgeable user; I have some tech volunteers who are prepared to help me once I make a decision. Any thoughts?

# Answer
> 4 votes
Developers tend to prefer Drupal over Joomla. But each CMS has it's pros & cons. You need to figure out which one is better for you.

For example if you have a Joomla extension that gives you functionality which would require a lot of custom coding in Drupal, it would make sense to stay with Joomla.

The kinks you mention may not be around in that later versions of Joomla & CiviCRM, but there may be others, so you really need to do some testing to make a decision that's right for you.

Demos are available at: https://civicrm.org/demo \- but they are reset periodically so you may prefer to create a sandbox on your own server or local machine for testing.

# Answer
> 1 votes
The big advantages that we typically use with Drupal are

Views: the ability to build query/displays that can be used in many different settings

Webforms: ability to push/pull data from civi in a form building tool that has a lot of extras

CiviCRM Entity: means Drupal can see/use CiviCRM data as if it is a Drupal Entity.

Whether it is 'worth' the effort is harder to judge as that would depend on what you have in the CMS and how easy it would be to rebuild that in Drupal. The Joomla to Drupal migration/conversion process has worked well for us in the past.

If we had a client on old Joomla, and if upgrading Joomla would involve rebuilding theme, rethinking content types, etc, then we 'would' migrate to Drupal. But that is opinion/preference, not a 'solution'.

---
Tags: joomla, drupal-views
---


# Question
Title: What broke the contribution thermometer blocks in the CiviCRM 4.7 upgrade? How to resolve the issue?
Upon upgrading from CiviCRM 4.6.x to 4.7.x, the CiviCRM contribution thermometer within a Drupal block stopped functioning. Please see the current state of the block:

I have found some posts that sound related to what we are seeing:

https://issues.civicrm.org/jira/browse/CRM-17965

https://issues.civicrm.org/jira/browse/CRM-17970

I posted a reply to the CRM-17965 post as to trying the suggested patch back on CiviCRM 4.7.3, which did not change what we see displayed in the block... however it did achieve the test URL displaying HTML rather than nothing, so I would have hoped for some change in behavior of the actual Drupal block.

Suggestions how to get this resolved?

I am thankful, Michael

# Answer
I experienced the exact same issue you described and used the fix that Marty Wright described in https://issues.civicrm.org/jira/browse/CRM-17965 to resolve on several sites. Once the file change was made, I did have to clear my Drupal cache for the site to update. Hope this helps you.
> 2 votes

---
Tags: civicontribute
---


# Question
Title: Does anyone use CiviCRM behind a Web Application Firewall?
We're looking at deployment for a client who's sensitive to being hacked, so we want to put CiviCRM behind, say, nginx running mod\_security2. Has anyone used a WAF with CiviCRM that can share recommendations?

# Answer
> 5 votes
we have a slightly different approach for an enhanced security architecture using a proxy-server plus vpn. If you are interested, please sind more information plus code on GitHub, there was also a session on last year's CiviCon.

Let me know if you have any questions regarding CiviProxy.

Kind Regards Fabian

# Answer
> 1 votes
I've configured CiviCRM behind both Pound and NginX. Both worked perfectly well, no complaints. If there were any special configurations required, they can't have been troublesome enough to remember :)

You will need to ensure CiviCRM is capable of "accessing itself", since some requests (eg dashboard contents) are made to the current CiviCRM website. This includes DNS / web access from the webserver CiviCRM is running on - see this answer.

---
Tags: security, sysadmin
---


# Question
Title: Intermittent instances of duplicate participant rows created - is this a MySQL issue?
CiviCRM 4.4 install that has been running for ~ 2 years now, no update to code - in the past week I have seen 3 instances of duplicated participant rows (same contact\_id, same event\_id, fee, but register timestamp shows difference of 7 minutes to 1 hour). The participant\_id is different of course. Has anyone seen this or have suggestions how to debug this - MySQL server is hosted so I cannot get logs.

# Answer
I have seen similar and it has always been traced to the user submitting the (in our case) membership form twice.

For some reason the final "Your membership has now been created" (or whatever it says) message has not been displayed, so they think it has failed and submit again. Worse still they may get "We cannot provide that at this time", which they interpret to mean the transaction has failed when really I thnk it is a timeout message for displaying that final "Done" message.

They should have received a confirmation email, but they have given the wrong adress, or it is caught up in a spam filter or delayed in transmission or ?

Why three times in one week? Perhaps there has been a heavier-than-usual load on the shared server leading to time-outs for that final message.
> 1 votes

---
Tags: mysql, registration
---


title: How do I delete my account

text:
# Question
Title: How do I delete my account
I have not used my civicrm account for many many years. Today I got 139 password reset email notifications. I don't want to have to deal with this, I just want to delete the account.

If you have someone to whom I can forward some of these emails, I"m happy to do so. Just let me know to whom I should forward it.

Obviously, I can't login again because someone/something has changed my password.

Peace CJ Rhoads

# Answer
I assume you are talking about your account at civicrm.org

There's no way for users to delete their accounts - you can unsubscribe from emails, which I think you have done.

There's a contact email at https://civicrm.org/contact \- you can send your request to that.
> 1 votes

---
Tags: user-account
---


# Question
Title: MySQL support not included in PHP - Wordpress Heroku
Got this error on heroku wordpress with ClearDB Mysql Connected. Everything works expect this:

Any ideas? Thanks.

# Answer
The CiviCRM installer checks for the presence of `mysql_connect`. Your Heroku environment has `mysql_*` extension disabled. The installer won't run if the environment doesn't pass CiviCRM's checks (as you've discovered).

This mysql\_ library was deprecated in PHP5.5 and removed in PHP7. It looks like Heroku do offer `mysql_` as an option you can enable through composer.json (see their docs on Heroku PHP extension support).

Even so, it's likely easier to use a hosting environment known to support CiviCRM; if you're a CiviCRM pioneer on Heroku, you may have to deal with other features of that environment which CiviCRM hasn't been road-tested with. (Not a criticism of Heroku - but CiviCRM has some expectations of its host environment above and beyond the "average" PHP app.)

It's also possible that you could convert CiviCRM to use `mysqli_*` with a global replace of the `mysql_*` functions through the CiviCRM codebase ... if that works, the relevant ticket is CRM-16067: Replace deprecated mysql api with PDO or mysqli!

See also:
> 0 votes

---
Tags: wordpress, php
---


# Question
Title: Using CiviCRM to manage a Community Center?
We're preparing for a new community center which will hopefully break ground this year and open in early 2018. In the meantime, we've gots lots of planning to do and I've been tasked to recommend a CRM.

Initially, we'll need a crowd funding solution for our capital campaign. Then we'll need to manage, members, donors, volunteers, have a color coded event calendar, registration and attendance tracking for events, programs and classes, space reservations, online social community for constituents, management of partnerships with collaborating orgs, and sales of t-shirts and caps, etc.

Which CMS would be best? Cost for creating such a system?

Any other feedback?

# Answer
You could use CiviCRM for what you describe, though you may want a developer to set it up for your specific use-case. Since CiviCRM is open source, the only cost would be the cost of whatever development team you use. If you have a tech-savvy person of your own, it might not take a developer at all, though it will take a lot of work. To go through your specific needs, with links ot the documentation explaining how it can be done:

* Crowd funding: CiviContribute, or if you want to include marketing, CiviCampaign.
* Manage members: CiviMember.
* Manage donors: I refer you again to CiviContribute.
* Manage volunteers: The extension CiviVolunteer will do this. To clarify, all the previous links are to core functionalities. This one is not, but it is easy to download and install extensions such as this one.
* Calendar: This would be managed through CiviEvent. Color coding would probably be through your theming, I'm not entirely sure about that one. But you can create event types, so it shouldn't be too difficult to manage the event types being different colors.
* Registration, attendance, progams, classes: These are all jobs for CiviEvents.
* Space reservations: I don't think civiCRM has this capability, but it can be gained in other ways. This thread might be useful to you.
* Online social community: It sort of depends on how robust you want this to be. It is simple enough to allow members to view each other's profiles, but complex interaction may be more difficult. If you want to set up a facebook page and then link to it, that's simple though.
* Management of partnerships with collaborating orgs: Each org can be a contact in the CRM, and employees of that org can be grouped to them. You can track emails etc. I'm not sure what other functionalities you're looking for here.
* Sales of t-shirts etc: CiviContribute again can probably help you, but I'm not sure exactly how others have done this, though I'm sure you can figure it out.

And finally, for CMS, I recommend Drupal as the most robustly extensioned & maintained. But There are more in-depth answers to be found here.

In conclusion: Yes, I think you can run your community center with CiviCRM with few issues.
> 4 votes

# Answer
I am a bit confused because in the same question you mention that you are tasked to recommend a CRM and you ask which CMS to use. They are two different things so what are you asking?

What you mention you can probably achieve with either Joomla, Drupal or Wordpress so the answer will be a general one. My rule of thumb for what it is worth: if your website requirements are not too much based on logged in users and different roles seeing different things I would probably go for Wordpress as it is widely used. But I have recently heard a dogmatic answer: Wordpress is for babies :-)

If I could predict the cost of such a system based on 4 lines of text I would be a magician!!!! I would sincerely recommend you to either visit another non-profit that uses CiviCRM in combination with the CMS you want, has the same kind of processes and culture, and then ask what they paid. Or contact a CiviCRM expert/partner (see https://civicrm.org/experts) who will be able to talk with you and give you some insight. But IMHO you can not expert even a cost range based on 4 lines of text, sorry!
> 2 votes

---
Tags: wordpress, drupal, calendar
---


title: Upgrading to ver 4.7.4

text:
# Question
Title: Upgrading to ver 4.7.4
I am upgrading from CiviCRM ver 4.7.3 on WordPress 4.4.2. I am very new to CiviCRM. What are the exact instructions to upgrade with these versions? Have looked at this: https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress but it seems to be extremely complicated for a minor version upgrade?

I am hoping that the newer version will make my site faster and more responsive. It's crawling right now after having installed 4.7.3.

# Answer
> 1 votes
As you have already installed civicrm you should be looking at https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+WordPress not the installation instructions.

---
Tags: wordpress, upgrade
---


# Question
Title: Dashlets and SSL in multiple secure virtualhost environment
I've identified what may be bug or feature request, or at least a case of another item to add to the list of things which can make dashlets fail.

I have an Apache 2.4 server which has multiple virtual hosts using different SSL certificates.

Apache used not to support multiple SSL certs from different domains at all, but now it does it in effect because browsers specify which domain they want the SSL cert for. If a server has two certs installed "domainone.com" and "domaintwo.com" the user's browser needs to specify it wants to use the cert for "domaintwo.com", otherwise the server will provide whichever one comes earliest in the server config. This is apparently called Server Name Indication (SNI)(https://en.wikipedia.org/wiki/Server\_Name\_Indication)

If using wget or cURL, SNI does not happen by default.

Therefore, in my situation where I am using CiviCRM over an https connection, the dashlets will not load because they are loaded via cURL (I believe), and cURL will receive an error because it is using the wrong SSL certificate to connect.

In theory this could be because of an old version of cURL installed on the server, but I have checked and that isn't the case.

I believe it's more likely to be that the code needs to use something like SSL context options `SNI_enabled boolean` and `SNI_server_name` (http://php.net/manual/en/context.ssl.php), although I'm not sure how that integrates with using PHP's curl functions.

As you can see, I haven't delved into the code to work out if this is all right.

Could someone give me their thoughts on whether they agree this is the problem, and whether a code change would be beneficial?

On a completely separate note - given that dashlets seem to be a persistent issue that can conflict with server configuration or minor user config file errors - wouldn't it be better to just rewrite them to use AJAX?

# Answer
This problem has been assigned to a CiviCRM bug which requires funding to resolve. The suggested fix is an AJAx solution.

See: https://issues.civicrm.org/jira/browse/CRM-17663
> 1 votes

---
Tags: dashboard, dashlet, ssl
---


# Question
Title: I have a list of requirements I am looking to fill -- Can CiviCRM do these?
Thanks for the help. Our organization, and registration is fairly complex. We have three branches: volunteers, athletics, and scouting. All branches support all ages. We have one general membership fee that covers all members (except volunteers, of course), and as a member you could be in any and all branches. So here is what we need a system to do...

* One account to manage multiple members (i.e. parent creating an account to create 2 memberships for his children)
* Householding
* Setting primary contact (i.e. for members under 18, a parent is the primary contact; for members 18+ they are their own contact)
* The membership application needs to include two file uploads (that can be extracted/downloaded)
* Member group - we (admin) need to have the ability to assign each member to individual groups like "Boys Basketball age 5-7 Team 1" and "Boy scouts troop 2". Again each member might be in more than one group
* The ability to filter and contact by groups above. That is we need to be able to filter to everyone in basketball, or everyone in basketball on 5-7 age teams, etc
* Ability to create an event calendar by each group/team
* Process yearly membership dues
* Ability to filter for and contact unpaid members

So I think this is most everything -- please let me know if you need clarity on the above.

# Answer
CiviCRM can do all the things you described above, with two caveats:

* Some of the requests you're making around primary contact and one account managing multiple members work in CiviCRM with any CMS - but if your CMS isn't Drupal, you'll end up with some clunky public-facing data entry. Stack Exchange is littered with people asking how to do forms like you're describing in WordPress and are largely disappointed. If you're starting fresh, definitely use CiviCRM atop Drupal, and use Webform-CiviCRM integration to handle your public-facing forms.
* Ditto the calendar - a WordPress or Joomla person can tell me if I'm wrong, but if you want a calendar in a calendar view (instead of, e.g., an events listing) I think you need Drupal.
* Finally - you're right, this is definitely a complicated setup, no matter what CRM you choose! I would dissuade most people new to CiviCRM from attempting something this complex on their first go-round. Consider hiring someone, or be prepared for a challenge!

Fortunately, several of the items you're requesting (grouping into multiple groups, searching/contacting by groups, file uploads, processing membership dues, filtering for/contacting unpaid members) are all pretty out-of-the-box. In fact, all of this is doable out-of-the-box (except the calendar, which requires a Drupal module), but the devil's in the details - specifically in the public-facing form details.
> 5 votes

---
Tags: evaluating-civicrm
---


# Question
Title: Transactional emails, such as confirmations, are not going out
I am in the process of setting up CiviCRM to send via SparkPost using the following extension - com.cividesk.email.sparkpost

CiviMail appears to be working (both using test emails and cron) but, confirmations are not being sent when people subscribe to mailing lists or to become members.

**Administer \> CiviMail \> CiviMail Component Settings:** shows that 'Enable Double Opt-in for Profile Group(s) field' is checked.

Is there something else that needs to be done such as a scheduled job?

# Answer
CiviMail isn't responsible for anything other than Bulk Mailouts.

There are Scheduled Jobs required for things like Scheduled Reminders which you can find at civicrm/admin/job?reset=1

In case you hadn't spotted, there have been two SparkPost extensions released. the other is here. Not suggesting either is better, or even how relevant it is to your issue

If you just click 'Send Email' via Actions on a civi contact record, does it get sent?

And what is the outcome from send a Test Email from /civicrm/admin/setting/smtp?reset=1
> 2 votes

---
Tags: confirmation
---


# Question
Title: Find and remove contacts based on no activity, contributions, memberships and events
At some time our CiviCRM/Drupal installation has had lots of spam accounts created. As these are over a period of time I can't isolate by date. One tell-tail sign that the accounts are spam is their Civi contact summary has no recorded touch points (activity, contributions, memberships and events). Is there a way to search for contacts that meet this criteria and delete? I've looked at the Find Contacts - Advanced Search but there doesn't appear to be an option for null values. I've also looked at modifying one of the Contact Report Templates which does allow null matches but haven't been able to find a setting that gives the spam accounts.

# Answer
> 3 votes
You could find them via groups (or tags) and the custom include/exclude search.

If you have always used CiviCRM for everything then I think you should only need two groups or tags:

* All contacts
* All contacts with activities (as activites are created for contributions, membership and events)

If you have migrated data from a previous system or imported contributions, memberships or event participants then you may need to create groups or use appropriate tags for the all of the following:

* All contacts
* All contacts who have made contributions
* All contacts who have memberships
* All contacts who have registered for events
* All contacts who have activities.

Then go to **Search \> Custom searches \> include/exclude search**. You include **All contacts** and exclude the rest.

You can delete contacts from the results screen.

# Answer
> 0 votes
I have not tried this myself because I would then go to the database directly, but have you tried to achieve this with the search builder?

# Answer
> 0 votes
If you use the Summary Fields extension, then you may have some better search options, such as Lifetime donations \<1 etc and be able to use them in a single Advanced Search. I think then you would add them to a Group, and then select that Group and search for Activities to try and find those who might have had some level of engagement such that you do want to keep them.

---
Tags: contacts, spam
---


# Question
Title: Set custom field during Membership signup through a Contribution Page
I need to save some additional information related to the membership during sign-up. This will be stored in custom fields of the membership. Sign-up (Membership creation) is happening through a Contribution Page which includes a Profile with those custom fields.

The Profile does not transfer the values from the custom field into the custom field of the newly created Membership.

Previously I used (Drupal Module) custom code and the civicrm\_api to update the membership. However, nowadays I don't seem to be able to get the `contributionID` and `membershipID` values from the `$form->_params` array anymore.

**How can I add custom fields to a Membership from a Contribution Page?**

# Answer
> There was a bug in this feature. As of CiviCRM version 4.7.5 the following steps will work.

The standard civi approach would be

* create custom field group and set to be used on Membership
* add custom field
* create Profile to be used on that Contribution page and include the above field.

That is all assuming that the 'field' is actually specific to the Membership and not to the Contact or the Contribution or some other component.
> 0 votes

# Answer
Please check the PR: https://github.com/civicrm/civicrm-core/pull/8052

The bug mentioned in description is not replicating, but found an additional bug. After making online membership contribution, with custom field included in profile, custom data is not getting saved in fields. When, view a membership record on contact summary page.

So made additional fix for CRM-18282.
> 2 votes

# Answer
Adding as separate answer. Appears to be a bug - adding Membership fields, then adding in to Profile. We see them on the form, and the data we enter (both Text and Yes/No) show on the Confirmation page and the Thank you page (see

Needs a JIRA ticket imo.
> 1 votes

---
Tags: civimember, custom-fields, profile, contribution-page
---


# Question
Title: CiviCrm will not install on Joomla 3.5.0
Installation fails with the following error using Joomla 3.5.0:

0 Call to undefined function dl()

Installation succeeds when using Joomla 3.4.8

Any help would be appreciated.

# Answer
> 1 votes
I'm currently running J 3.5.0 with CiviCRM v 4.7.4. Have you tried upgrading J 3.4.8 install to J 3.5.0? If not, I would give that a try.

---
Tags: installation
---


title: Tags in contact reports

text:
# Question
Title: Tags in contact reports
Using Civi 4.74 combined with Joomla 3.5

WE're looking to include tags in our contact reports but there's no obvious way to do so. What are we missing?

# Answer
> 1 votes
If you are talking about eg http://d46.demo.civicrm.org/civicrm/report/instance/2?reset=1 then no there is no option via the UI to do so. A developer would be able to add such a feature I expect.

Meantime there are other options such as: you can use eg Advanced Search, find the contacts you want to export, select "Select fields for export" then in the Export Mapping you can set the Tags field, and it should include that data with all the contacts Tags in a single cell separated by a comma. eg

Irvin Deforest | Volunteer,Major Donor alidacooper@airmail.biz | Volunteer,Major Donor

You can then save that Export for future use. I have done this on Demo - it is called Contacts and Tabs via "Select fields for export" and then look under "use Saved Mapping fields".

But demo site will flush in a few hours

HTH.

---
Tags: civireport
---


# Question
Title: Why does A/B testing cause 'dedupe by email' to fail when sending CiviMail to contacts with same email address
Client is asking why 4 emails have been delivered to 4 contacts who all have same address.

Test1: tested with 2 contacts and didn't use A/B testing.

Outcome: was told would be delivered to ~1 address and was only 1 delivered - GOOD

Test2: tested with same 2 contacts with A/B - 50% to A and 50% to B (so no FINAL mailing)

Outcome: was told would be delivered to ~1 address and was only 1 delivered (to A mailing) - GOOD

Test3: tested with 4 contacts sharing same email with A/B - 25% to A and 25% to B and 50% to FINAL

Outcome: was told would be delivered to ~1 address. Had 1 delivered (to A mailing), 1 delivered to B mailing, and 1 delivered to Final mailing - BAD

So I think A/B testing is causing 'dedupe by email' to break

# Answer
> 1 votes
From what you describe it sounds like the deduping is happening within each group rather than **before** the recipients are split into A, B and final groups.

You could confirm this by doing:

Test 4: 8 contacts sharing same email with A/B - 25% to A and 25% to B and 50% to FINAL

I would expect the same results as for test 3: 1 delivered to A mailing, 1 delivered to B mailing, and 1 delivered to Final mailing.

---
Tags: civimail, duplicate-contacts, abtesting
---


title: Override TPL path dynamically

text:
# Question
Title: Override TPL path dynamically
Is it possible to dynamically override the .tpl file path in CiviCRM? Rather than use the corresponding TPL file to the Class.

# Answer
> 4 votes
**Use an extension's `templates` dir**

Creating a simple extension via `civix` provides a `templates/` directory in the extension. This is searched before the default templates, so you can intercept and provide your own.

If that doesn't go far enough & you want to dynamically select a template (eg *replace Form.php, but only when foo=123*), these options are available:

**Use CiviCRM's `hook_civicrm_alterTemplateFile()`**

Alters template files, based on the form & form data. This is something you'd do in an extension or CMS module. (Function signature refers to `$form`, I'm not sure what this will mean if you're rendering a page.)

**Nest templates**

Copy the default template `Foo.tpl` to your custom (or extension) template dir as `Foo-default.tpl` and `Foo-123.tpl`, create a wrapper `Foo.tpl` which uses Smarty to insert the correct template based on your criteria.

This last method can be done without creating a custom extension.

# Answer
> 2 votes
One way I've come up with is to add the override path to the mix, and it will pick up the tpl file in the path.

```
$displayContactSummary = CRM_Utils_Request::retrieve('value', 'Boolean');

$template = CRM_Core_Smarty::singleton();
$template->clear_compiled_tpl();

if ($displayContactSummary) {

    $templatePath = realpath(dirname(__FILE__) . "/templates_override");
    $template->addTemplateDir($templatePath);
}

```

Clearing the cache every time though isn't ideal, otherwise when value=false, or isn't present, the old file doesn't load

---
Tags: smarty
---


# Question
Title: How To Apply Membership Type Update To Existing Records
i have a set of membership records set to expire every two years. So i have a lot of members whose expiry date is set to 2 years.

Now i have updated membership type to 1 year expiration. I find that only new members inherit the new expiry date but not the old records. How can i update the old records membership to reflect the changes.

# Answer
You may have to amend the 'end dates' that are on those old style memberships either

* via SQL
* manually in the DB
* via a Batch Update of Memberships
* export Membership data and reimport it (as per JoAnne's answer - added here to include in this list)

Which option suits you may depend on your skills and the number of memberships involved.
> 2 votes

# Answer
You haven't given enough detail in your question but I will have a go at answering what I think is your question.

You say "Now i have updated membership type to 1 year expiration".

I am taking that at face value, ie your membership type called "our membership" did have a duration of 2 years but has been updated so that it now has a duration of 1 year. (If instead you have created a **new** membership type of one year duration then what follows is irrelevant to your situation.)

If these are paid memberships, then I would expect that the existing expiry dates should stand but when members renew they should only get an 12 month extension to their membership end date. That would be normal CiviCRM behaviour, so I have ot assume that is not your situation.

That suggests that these are free memberships and you want **alter** the expiry date of the existing memberships. That seems a little out of the ordinary. I am not sure I would be happy if an organisation said to me "Yes, we know we said your membership expires on 31 December 2017, but we changed our minds and now it expires on 31 December 2016".

Still, if that is what you want to do, you need to realise that the end date of a membership is fixed when the membership is created, so you will have to change the existing end dates.

I would do it by exporting the membership data, altering the end dates in a spreadsheet then importing the membership data with the new end dates.

When you export the membership data I suggest you export membership Id, membership type, membership status, member since date (or is it "membership join date"), membership start date and membership end date. The importer always needs more fields than I think it should, so it is better to be get all those fields out in just one export.
> 2 votes

---
Tags: civimember, upgrade
---


# Question
Title: What is the best place to update Wordpress user on Contact change
I want to update the corresponding fields (i.e. first name, last name) of a wordpress user every time the linked contact is changed either on the frontend or the admin area. I saw in the CiviCRM admin area the same field can be changed in quite few places so is there a hook or something that can be used?

# Answer
> 5 votes
I believe you are looking for something like this:

CiviCRM WordPress Profile Sync

> The CiviCRM WordPress Profile Sync plugin keeps the "First Name", "Last Name", "Email Address" and "Website" fields of a WordPress (and BuddyPress) user profile in sync with the corresponding fields of a CiviCRM contact. The synchronisation takes place regardless of whether the changes are made in WordPress, BuddyPress or CiviCRM.

I guess you could extend that plugin if you want to include CiviCRM custom fileds.

Hope that helps.

---
Tags: wordpress, civimember
---


# Question
Title: Installing and Setting wkhtmltopdf Path In Civicrm
How can i install wkhtmltopdf in civicrm and set the path to the exe. I am using Civicrm with Wordpress. Any help will be appreciated.

# Answer
> 4 votes
Download the compiled binaries for your system from http://wkhtmltopdf.org/downloads.html to your server and extract to somewhere convenient. The files need to be readable by the account running the webserver. Then go to Administer \>\> System Settings \>\> Misc and enter the path to the wkhtmltopdf.

# Answer
> 2 votes
Check this out: Could CiviCRM 4.5 or 4.6 make it easier to generate large numbers of PDFs at once?

I came across that by googling wkhtmltopdf civicrm by the way ;)

---
Tags: pdf
---


# Question
Title: Can I use CiviCRM to track web use demographics on a joomla website?
My website is www.MyNDTALK.org - it uses a joomla platform. I need to track who (age, gender, race, education, employment status) is accessing the website, from where, what programs are being accessed. Can I use CiViCRM for this? I access the website via a mac computer and will be using GoDaddy hosting -

# Answer
Not really, maybe partially.

If you're looking to collect information from your users via a form, CiviCRM can help with that - but is probably overkill for your purposes. If you want to know which pages your users are visiting, you're looking for an analytics tracking program, like Piwik or Google Analytics (or something fancier still). People have occasionally linked CiviCRM with analytics tools, but that's a big-budget project.

Google Analytics will provide you with demographics and interest analysis in aggregate. I'd start there and see how far that gets you before considering a tool like CiviCRM.
> 4 votes

# Answer
Since you're using Joomla, you may want to look at this Joomla Component, which easily integrates Google Analytics with Joomla:

https://joomla.digital-peak.com/products/ganalytics
> 1 votes

---
Tags: joomla
---


# Question
Title: How does one download the CiviCRM 4.6 User Guide in PDF?
Civi Peeps.

Almost embarrassed to ask this ask this question, but only almost.

On its documentation site, under "About this book", Civi states:

"This book is freely available to read online and download in multiple formats."

I haven't yet found a way to download the entire guide in PDF or any other format.

The link to that page is here:

http://docs.civicrm.org/user/en/4.6/introduction/about-this-book/

Please advise.

Many thanks.

# Answer
> 4 votes
Looks like PDF isn't available, but a downloadable copy of those docs in Markdown format is available from the Github repository linked in the top right of http://docs.civicrm.org ("Edit in Github").

github.com/civicrm/civicrm-user-guide =\> Download ZIP

This (zipped) download is in a quite readable format, even in a plain text editor. Which tool you view it in will determine whether some features like inline images are displayed; search for a Markdown editor for your OS if you want support for images / visual formatting.

Bonus: it's a great format to submit docs fixes! Perhaps your first submission will improve on "This book is freely available to read online and download in multiple formats." in `docs/index.md` :)

In that linked Github repo, you'll see a `mkdocs.yml` file indicating that CiviCRM's docs are built via MkDocs. According to this FAQ answer on readthedocs.org, the Markdown/MkDocs format doesn't provide us with automatic PDF generation (yet) but it does make it easy for people to contribute improvements.

---
Tags: documentation
---


# Question
Title: How can we make Event custom fields available as tokens for scheduled reminders?
We've done some investigation and found two places we could intervene to make this possible:

1. Intervene here: CRM\_Core\_BAO\_ActionSchedule::sendMailings(), but to make tokens available we'd have to collect all custom field info for a specific event. This would possibly be very database heavy, and further, it can't be optimised for when only a (small) specific subset of tokens are used in the scheduled reminder.
2. Or we could intervene here: hook\_civicrm\_tokenValues() But at this point we no longer know for which event we need to get the additional custom field data from.

So, what to do? Any ideas? Thanks for your help!

# Answer
How about modifying the core event code to also suck in the event custom fields before sending it to the templates. In general, especially for specific events (and contributions etc), including custom fields seems a good thing (and potentially not very expensive from a query perspective)
> 2 votes

# Answer
I think your second idea can be made to work:

> Or we could intervene here: hook\_civicrm\_tokenValues() But at this point we no longer know for which event we need to get the additional custom field data from.

As far as I can tell, the parameters passed into this hook during the processing of a Scheduled Reminder actually do include the event ID -- the structure is just a little off as discussed elsewhere.

Here's an implementation that provides the value of a custom field:

```
/**
* Populates a token named "mytoken" with the value from a custom field
* (id 123) for use in Scheduled Reminders
* Implements hook_civicrm_tokenValues().
*/

function foo_civicrm_tokenValues(&$values, $cids, $job = null, $tokens = array(), $context = null) {
static $events = array();

  if (is_numeric($cids)) {
    // We're being called by CRM/Core/BAO/ActionSchedule.php:465
    // Params are structured differently than they're supposed to be, but we
    // can work with it. See https://civicrm.stackexchange.com/questions/3573/can-tokenvalue-hooks-be-used-in-scheduled-reminder-emails

    if ($event_id = CRM_Utils_Array::value('event.event_id', $values)) {
      // We've been passed an event ID

      if (!array_key_exists($event_id, $events)) {
        // We haven't looked up the custom field value yet

        // Fetch the custom field value from the database
        $event = civicrm_api3('Event', 'getsingle', array(
          'sequential' => 1,
          'return' => "custom_123",
          'id' => $event_id,
        ));

      $val = CRM_Utils_Array::value('custom_123', $event);

      // Keep this value in memory to use with the other event participants
      $events[$event_id] = $val;

      } else {
        // We stored the value previously
        $val = $events[$event_id];
      }

      $values['event.mytoken'] = $val;
    }
  }
}

```

Note: event information is not passed to the hook for additional (non-participant) recipients of the Scheduled Reminder.
> 2 votes

---
Tags: email, custom-fields, tokens, civievent
---


# Question
Title: Merge related activities and related groups options not available in merge contacts
We've recently upgraded a site to 4.6.10

When merging duplicate contacts the options to merge activities and groups (and tags and events etc) are missing.

I've tried merging a couple of dummy contacts. Contact data merges as expected, but associated group and activity data is deleted along with the duplicate contact not transferred to the remaining contact.

The demo work displays as expected. Are there any settings that control this activity that I've overlooked?

Has anybody experienced this issue before?

Any hints/tips/pointers as to where I can look?

Thanks

Craig

# Answer
We have found that there have been a few database schema issues. By rebuilding the schema and checking foreign keys, this issue has been resolved! Phew.
> 0 votes

# Answer
Try upgrading to the latest release.

(NB I realise I may not be adding much to above comments but am trying to get some unanswered questions answered as that is currently the 'weakest' aspect of our Beta civicrm stackexchange according to these \[stats\]\[1\])
> 1 votes

---
Tags: activities, duplicate-contacts
---


title: How to get name of Financial Type ID?

text:
# Question
Title: How to get name of Financial Type ID?
I am adding some custom code to the Bookkeeping Report so that each Financial Type's sub total is added to the bottom in the statistics. I have successfully done so, but I can't figure out how to list the name of the Financial Type ID instead of the ID itself.

For instance it is currently listed as 6: $300, 17: $540, etc. I would rather have it listed as: Event Income: $300, Fundraisers: $540, etc. I know this is listed in the table civicrm\_financial\_type and I can manually build it into the function; however, I did not know if there was an API or a function already built that returned the name of the ID.

# Answer
> 2 votes
There is a FinancialType API which returns the name with the ID, for example:

```
$financialTypeName = civicrm_api3('FinancialType', 'Getvalue', array('id' => $financialTypeId, 'return' => 'name'));

```

# Answer
> 1 votes
There is a function used in the Bookkeeping report to do this:

```
CRM_Contribute_PseudoConstant::financialType()

```

See e.g.

```
  public function alterDisplay(&$rows) {
    $contributionTypes = CRM_Contribute_PseudoConstant::financialType();
...
      // handle financial type id
      if ($value = CRM_Utils_Array::value('civicrm_line_item_financial_type_id', $row)) {
        $rows[$rowNum]['civicrm_line_item_financial_type_id'] = $contributionTypes[$value];
      }

```

---
Tags: civireport, custom-reports, financial-types
---


title: Suitable for online social group?

text:
# Question
Title: Suitable for online social group?
Im a board member of an online social group. We are looking at updating our website and backend IT systems to include online registration, subscription management, member database, self managing profiles, event booking and payment and member interaction. Plus marketing options and email distributions.

Is this what CiviCRM can help with ?

Thanks for responses - am going through book.civicrm now.
I guess we are particularly interested to know if logging in to the wordpress or joomla based website via CiviCRM will authenticate access to other components like a forum, messaging and restricted / controlled page views etc. In other words can CiviCRM validate the whole site ?

# Answer
YES! - Having read your clarifying response to my previous comments, CiviCRM can absolutely do what you require.

To restrict who can access which other users (i.e. when they search etc) you would need to do a (small amount) of custom work. Drupal might be a better platform for you that WordPress or Joomla! Future First is an example of a charity that has a custom "client portal" that allows a range of clients to search and send messages through CiviCRM (in their case CiviCRM is hidden from the user, although it does the majority of the leg work), although there are many others.

As it sounds like you need some custom work done, my suggestion is that you contact one of the excellent CiviCRM Partner Organisations that can be found here: https://civicrm.org/partners-contributors. They will also be able to help you arrange hosting, training, and do the minimum amount of customisation that your organisation needs.

(I'd like to make clear that I am not a CiviCRM Partner Organisation nor do I get a commission :P)
> 1 votes

# Answer
Yes, CiviCRM can do all of these things. It is also a very flexible system with a number of extensions that provide additional functionality that you may need in future.

To get a better idea of what CiviCRM can do I would suggest that you read the user guide and try the one of the demo sites.
> 4 votes

# Answer
Agree with William, and on top of that you might also check some of the YouTube videos here: https://www.youtube.com/playlist?list=PLjSU7YfE0E03DWaWNTLemvtQR30PzcB\_o
> 2 votes

---
Tags: wordpress, acl, evaluating-civicrm, validation
---


# Question
Title: Back end credit card not sending info to PayPal
We're running Civi 4.7.4 on Wordpress 4.4.2. We recently switched to PayPal Pro (from Standard) in order to use back end credit cards and keep everything on one site. So far, PayPal Pro has been handling transactions properly from the front end. When I tried to submit something via the back end yesterday (member renewing over the phone) the renew-credit card screen appeared, I filled out the data, and submitted it. The screen refreshed and a new renew-credit card screen appeared and no transaction went through.

Today I decided to do some testing in the back end. None went through. It appears Civi overwrote the test api credentials. I then tried to save the test api credentials again. The credentials were saved, but the "sandbox" portion of the URL was removed. As a result I can't test - everything comes back "internal error internal error." This is occurring when I use an anonymous window as well. What does "internal error internal error" mean? Does Civi show the paypal error code somewhere? Edit: I think I solved this part - it needed a valid mailing address.

I am using credit card = 4111111111111111, CVV 123, expiry Apr 2017, which seems to be what paypal suggests.

Finally, how do I test a contribution page without overwriting my contact profile? When I click to test as a different person from the logged-in account it appears to send me to a regular version of the contribution page. Edit: using anonymous window here. This part is solved.

I'm at a total loss - I want to be able to test that my payments are going to work when our members try to join or renew, and I would really like to be able to call members as part of our fundraising drive.

Any pointers that can help me get to the bottom of this are appreciated.

# Answer
Lots of questions wrapped together ;)

As for how to test without overriding your account: either use an anonymous windows so you aren't logged in anymore or add manually cid=0 as an extra param should do it

And to avoid any mistake, you might want to install the no-overrite extension that locks the first and last name : https://civicrm.org/extensions/no-overwrite
> 1 votes

---
Tags: civicontribute, paypal
---


# Question
Title: Auto Renewal Membership Confirmation Emails not being sent - PayPal (Updated Title 2016-04-05)
CiviCRM: 4.7.3 Joomla: 3.4.8 PHP: 5.5.45

None of my Membership Contribution confirmation emails are being sent. It doesn't matter if the person pays via PayPal, or is using Pay Later, they don't go out.

I receive the confirmation from PayPal that a membership fee payment has been made, but no other communications from CiviCRM, and I do have the email setup for CC to me.

Scheduled emails are being sent, as people are coming to the website to renew their memberships; and I've done the Outbound email check to verify that CiviCRM can send emails through the server.

This was working fine until August 2015, about the time I upgraded to 4.6.8 or so.

I kept up with the upgrades thinking that it was a fluke, but have not seen any corrections. I am not seeing any PHP errors, and I have been testing this using dummy names and a real email address to see if I can force any error messages.

I'm basically at a loss, and with a major event coming up, I need to have confirmations sent when people pay. I haven't tested with event confirmations yet, but that's the next step.

UPDATE: Just tested with events, and Confirmation emails are being sent to the attendee, and the treasurer so, at least for PayLater, the confirmations are going out for events.

**UPDATE - 2016-03-18** upgraded to 4.7.4, and had to revert out of it as it broke the 'pay later' display as described in CRM-18118.

Installed the patch to CRM/Contribute/Form/Contribution/Main.php as shown in 18118, and also patched CRM/Contribute/Form/Contribution/Confirm.php as showin in 18118.

The live page shows the Pay Later, and when tested sent an email to confirm the renewal, and show an invoice. The CC email copies were sent properly. I am not going to reinstall 4.7.4 as it appears something else in that release broke the fixes in 18118.

# Answer
**UPDATE - 2016-04-05** \- OK ... the patch I installed from CRM-18245 appeared to take care of the issue with manual renewals from the website. I received a copy of the Paid Invoice, along with the email from PayPal acknowledging the payment.

So the final issue now is what is happening with Auto-Renewal Memberships? Are they supposed to be acknowledged by the system, and a receipt issued to the member??

Based on the fact that on April 4th I received a PayPal notice of payment, but no other notice of an Auto-Renewal, I suspect that area is not working correctly.
> 1 votes

# Answer
If you have customised any of the System Workflow Messages (right Tab at /civicrm/admin/messageTemplates?reset=1), then I suggest you Edit, copy all your txt and html, then save externally. Then return to previous screen and 'Revert to Default' and confirm if your notifications go out. If they do, then there is an issue with your Edited version, which may be something that needed looking at during an upgrade. M

Most often upgrades will spit out a 'and by the way the System Workflow Messages for x or y have changed and you will need to ensure any edited messages are corrected' type message.

HTH
> 0 votes

# Answer
Check the logs at /media/civicrm/ConfigAndLog shortly after a payment has been made but no confirmation sent.

If you see something like the below, the issue is that Civi cannot access the information that was entered in the profile.

I'm having similar problem

Mar 15 19:13:18 \[info\] Contribution record updated successfully

Mar 15 19:13:18 \[info\] $Fatal Error Details = Array ( \[message\] =\> The requested Profile (gid=XXXXX) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance. \[code\] =\> )
> 0 votes

# Answer
**UPDATE 2016-04-01** I just did a clean re-install of 4.7.4 on the site. The confirmation emails are being sent properly now when the Pay Later option is selected, however, none are being sent when using PayPal.

Again, the only notice I get is the PayPal sent notice. I know the emails are going out for Pay Later as I received one yesterday. When I tested a live renewal today, again, only a PayPal receipt showed up.

The logfile shows this for the renewal.

---

```
Apr 01 06:50:21  [info] Contribution record updated successfully

```

Apr 01 06:50:22 \[info\] $Fatal Error Details = Array ( \[message\] =\> The requested Profile (gid=10) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance. \[code\] =\> )

Apr 01 06:50:22 \[info\] $backTrace = #0 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(366): CRM\_Core\_Error::backtrace("backTrace", TRUE)

1 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/BAO/UFGroup.php(368): CRM\_Core\_Error::fatal("The requested Profile (gid=10) is disabled OR it is not configured to be used...")

2 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Contribute/BAO/ContributionPage.php(499): CRM\_Core\_BAO\_UFGroup::getFields("10", FALSE, 4, NULL, NULL, FALSE, NULL, FALSE, NULL, 4, NULL)

3 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Contribute/BAO/ContributionPage.php(336): CRM\_Contribute\_BAO\_ContributionPage::getProfileNameAndFields("10", "193", (Array:0))

4 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Contribute/BAO/Contribution.php(2524): CRM\_Contribute\_BAO\_ContributionPage::sendMail("193", (Array:37), FALSE, FALSE)

5 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Contribute/BAO/Contribution.php(4626): CRM\_Contribute\_BAO\_Contribution-\>composeMessageArray((Array:31), (Array:11), (Array:37), FALSE, FALSE)

6 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Contribute/BAO/Contribution.php(4575): CRM\_Contribute\_BAO\_Contribution::sendMail((Array:31), (Array:11), Object(CRM\_Contribute\_BAO\_Contribution), (Array:37), FALSE, FALSE)

7 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Payment/BaseIPN.php(450): CRM\_Contribute\_BAO\_Contribution::completeOrder((Array:31), (Array:11), (Array:7), Object(CRM\_Core\_Transaction), FALSE, Object(CRM\_Contribute\_BAO\_Contribution), FALSE, FALSE)

8 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php(290): CRM\_Core\_Payment\_BaseIPN-\>completeTransaction((Array:31), (Array:11), (Array:7), Object(CRM\_Core\_Transaction), FALSE)

9 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php(343): CRM\_Core\_Payment\_PayPalIPN-\>single((Array:31), (Array:11), (Array:7), FALSE, FALSE)

10 /home/nwtaadmin/public\_html/administrator/components/com\_civicrm/civicrm/extern/ipn.php(55): CRM\_Core\_Payment\_PayPalIPN-\>main()

11 {main}

---

I verified that the profile in question is configured for profiles, it is NOT disabled, and the user is authorized to access the profile. As I mentioned the PayPal confirmations stopped around 4.6.8

This looks like the same issue as described in this bug report:

https://issues.civicrm.org/jira/browse/CRM-18245
> 0 votes

---
Tags: civimember, joomla, email, contributions
---


# Question
Title: How do I create a Smart Group of Participants using a Custom Data Field in Events?
We use the Events module to offer three main types of classes: adult art classes, youth art classes, and professional development workshops. Students register online. What I would like to be able to do is create Smart Groups of Participants based on the subject matter of the class, for example: painting, drawing, or portfolio review, so that we can mail to these groups and let them know about future classes they might be interested in. I created a Custom Data Field called "Class Department" with multiple choice options for the different subjects assigned to the Event types that we use for classes: Class (adult), Class (youth), and Workshop. My issue is that, having done that, I'm unable to use the "Class Department" data field as a search option in Advanced Search, even though I clicked the "is the event searchable?" box. Is this a version issue? We're still on 4.3.11. If this becomes available in later versions, what version does it first become available in?

# Answer
I checked in 4.4 and 4.6.

It does not work in 4.4, but it does in 4.6.

So, not sure about 4.5, but if you upgrade that far I advise to upgrade to 4.6 anyway, because then you are on the current LTS (Long Term Support) version.
> 2 votes

---
Tags: civievent, custom-fields, search, smartgroups, custom-search
---


title: File Storage on CiviCRM

text:
# Question
Title: File Storage on CiviCRM
We have a client who is looking to upload about 5G per year of files onto client records in CiviCRM.

We can obviously arrange for the server to manage that, but wondered if anyone has ever notice speed issues with uploading so many files? They need to keep records for 7 years, so will eventually have around 35G of files attached to activities.

# Answer
> 5 votes
the files are stored outside of civi database, the database itself contains only the file name, it shouldn't be a problem

However, did you think about using a "real" document management system (ie. one that offer full search on the documents and revision and whatelse) and integrate it with civi? given the quantities you expect, might be easier for the users

# Answer
> 1 votes
As the files are stored on disk, their size is not a significant issue, as @Xavier mentions in his answer. However, retrieving the files becomes slow at the operating system level in linux if you have a very large number files in the same directory - see answers 2 and following of https://stackoverflow.com/questions/466521/how-many-files-can-i-put-in-a-directory. Choosing the type of file system for the disk drive you store the files on can have a dramatic impact on performance (https://unix.stackexchange.com/questions/28756/what-is-the-most-high-performance-linux-filesystem-for-storing-a-lot-of-small-fi). Probably easiest optimization is to pay for an SSD drive rather than a HDD.

Separately, you may want to search these files both by content and by contact name. Consider using https://github.com/civicrm/apachesolr\_civiAttachments.

---
Tags: attachments, files
---


# Question
Title: How to retrieve all contacts belonging to a smart group
Given the ID of a smart group, what API/BAO/whatever do I need to use to retrieve all contacts belonging to that group? I've been looking through the source code all morning and can't seem to find what I need. Thanks.

# Answer
> 3 votes
As of version 4.6, you can use the API Explorer (top menu: Support \> Developer \> API Explorer) to get code, examples and docs. You can use the entities and actions to find the right combination to `get` the info you're looking for. (You can use any number of actions, but it is a live API tool so if you e.g. update an entity, it will change values in the database).

In this case, go to the Explorer then click the tab for Examples. Choose the entity: `Contact` and then example: `GroupFilterUsingContactAPI`. That generates this code (taken from the Drupal Demo at dmaster.demo.civicrm.org, but the API explorer is not CMS dependent):

```
<?php
/**
 * Test Generated example demonstrating the Contact.get API.
 *
 * Get all from group and display contacts.
 *
 * @return array
 *   API result array
 */
function contact_get_example() {
  $params = array(
    'filter.group_id' => array(
      '0' => 1,
      '1' => 26,
    ),
    'contact_type' => 'Individual',
  );

  try{
    $result = civicrm_api3('Contact', 'get', $params);
  }
  catch (CiviCRM_API3_Exception $e) {
    // Handle error here.
    $errorMessage = $e->getMessage();
    $errorCode = $e->getErrorCode();
    $errorData = $e->getExtraParams();
    return array(
      'error' => $errorMessage,
      'error_code' => $errorCode,
      'error_data' => $errorData,
    );
  }

  return $result;
}

/**
 * Function returns array of result expected from previous function.
 *
 * @return array
 *   API result array
 */
function contact_get_expectedresult() {

  $expectedResult = array(
    'is_error' => 0,
    'version' => 3,
    'count' => 1,
    'id' => 1,
    'values' => array(
      '1' => array(
        'contact_id' => '1',
        'contact_type' => 'Individual',
        'contact_sub_type' => '',
        'sort_name' => 'man2@yahoo.com',
        'display_name' => 'man2@yahoo.com',
        'do_not_email' => 0,
        'do_not_phone' => 0,
        'do_not_mail' => 0,
        'do_not_sms' => 0,
        'do_not_trade' => 0,
        'is_opt_out' => 0,
        'legal_identifier' => '',
        'external_identifier' => '',
        'nick_name' => '',
        'legal_name' => '',
        'image_URL' => '',
        'preferred_communication_method' => '',
        'preferred_language' => 'en_US',
        'preferred_mail_format' => 'Both',
        'first_name' => '',
        'middle_name' => '',
        'last_name' => '',
        'prefix_id' => '',
        'suffix_id' => '',
        'formal_title' => '',
        'communication_style_id' => '',
        'job_title' => '',
        'gender_id' => '',
        'birth_date' => '',
        'is_deceased' => 0,
        'deceased_date' => '',
        'household_name' => '',
        'organization_name' => '',
        'sic_code' => '',
        'contact_is_deleted' => 0,
        'current_employer' => '',
        'address_id' => '2',
        'street_address' => '1 my road',
        'supplemental_address_1' => '',
        'supplemental_address_2' => '',
        'city' => '',
        'postal_code_suffix' => '',
        'postal_code' => '',
        'geo_code_1' => '',
        'geo_code_2' => '',
        'state_province_id' => '',
        'country_id' => '',
        'phone_id' => '',
        'phone_type_id' => '',
        'phone' => '',
        'email_id' => '1',
        'email' => 'man2@yahoo.com',
        'on_hold' => 0,
        'im_id' => '',
        'provider_id' => '',
        'im' => '',
        'worldregion_id' => '',
        'world_region' => '',
        'individual_prefix' => '',
        'individual_suffix' => '',
        'communication_style' => '',
        'gender' => '',
        'state_province_name' => '',
        'state_province' => '',
        'country' => '',
        'id' => '1',
      ),
    ),
  );

  return $expectedResult;
}

/*
* This example has been generated from the API test suite.
* The test that created it is called "testGetGroupIDFromContact"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
* https://test.civicrm.org/job/CiviCRM-master-git/
*
* To Learn about the API read
* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
*
* Browse the api on your own site with the api explorer
* http://MYSITE.ORG/path/to/civicrm/api
*
* Read more about testing here
* http://wiki.civicrm.org/confluence/display/CRM/Testing
*
* API Standards documentation:
* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
*/

```

# Answer
> 2 votes
There is also a "less-code" variation of this:

```
  $result = civicrm_api3('Contact', 'get', array(
        'group' => array('IN' => array(1,2,3)), // <-- Group IDs array
    ));

```

---
Tags: smartgroups
---


title: Extension page no more reachable

text:
# Question
Title: Extension page no more reachable
I'm developing my first extension (through civix) which contains a custom form and a specific menu item linking to the form. All was working until today, but suddenly, the page URL is no more reachable, the URL is sometime redirected to the home page, sometime a path warning error is displayed. I tried to uninstall and reinstall the extension, but unsuccessfully. What can i do?

Thanks Marcello

# Answer
> 1 votes
Try updating the file perms of the new extension and then clearing cache :)

# Answer
> 1 votes
So, as always, plenty of reasons that can explain why something goes wrong.

It might be that your extension is not taken into account -\>try to die("here") on the main php of your extension, just to be sure it's properly used

It might be that your new page isn't taken into account -\> try to rebuild menu, see if helps

or plenty of other reasons, but I'd start with these two ;)

# Answer
> 1 votes
Ps, next time please add more info to original question!

Under Administrator menu you will see 'directories and paths' and 'resources'. Please set these.

Also, when I said file permissions, I meant on the actual foldee, i.e., in Windows, not civi. But you probably don't need to do that if you set the above properly and clear cache :)

# Answer
> 0 votes
Thanks to all I solved it! debbuging the code I noticed how, installing/disintalling the extension, the record in civicrm\_menu table was missing. I recreate it manually and for a while all worked but ....

Now I found the following new error:

*( ! ) Fatal error: require\_once(): Failed opening required 'CRM\Bollettinipostali\Form\UploadData.php' (include\_path='.;C:/localhost/drupal/sites/all/modules/civicrm;C:/localhost/drupal/sites/all/modules/civicrm\packages;.;C:\localhost\drupal\sites\all\modules\civicrm;C:\localhost\drupal\sites\all\modules\civicrm\packages;C:\localhost\drupal\sites\all\modules\civicrm\vendor/phpseclib/phpseclib/phpseclib;.;C:\php\pear') in C:\localhost\drupal\sites\all\modules\civicrm\CRM\Core\Controller.php on line 451*

In some way my extension folder is not in the include\_path

# Answer
> 0 votes
I solved! I foolishly deleted some functions (eg. \_alterSettingsFolders, ) in the base php. Thanks to all for your interest

---
Tags: extension
---