# Question
Title: A week after upgrade whole site is erroring
Upgrading to the latest CiviCRM on a drupal based site didn't seem to be an issue. About a week later, perhaps a change in PHP version, I noticed that my entire site gives this message now and nothing really works: Fatal error: Class 'CRM\_Extension\_System' not found in .../public\_html/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php on line 1837

Any ideas as to what I may have done to cause this? Thank you for all your help!

Regards, Yasir

# Answer
> 6 votes
I had the same issue and the same solution - the antivirus renamed the

> httpdocs \> sites \> all \> modules \> civicrm \> CRM \> Extension \> System.php.suspect

Not sure how to make the server leave that file alone, or what triggered it.

# Answer
> 2 votes
It looks like your upgrade process did not run smoothly could you check whether the file CRM/Extensions/System.php does exist? If not then it looks like not all source files are on the server.

ps. It is usually a good idea to have test environment where you could test upgrades before actually performing them on production. The same is true for upgrading to the latest php version. First do that in a test environment.

# Answer
> 0 votes
I would try clear caches first to ensure everything is being picked up from the file system. From the error it looks as though a site move has taken place or the directories have moved/been renamed?

# Answer
> 0 votes
Check it after deleting the temporary folder of civicrm.

---
Tags: drupal
---


title: Membership directory

text:
# Question
Title: Membership directory
I created a public list (directory) of members based on a relationship. I was able to set-up a smart group with a profile and can see the list. But I want to customize the list by country, without creating a profile for each country. I read that you can append the url like this: civicrm/profile&reset=1&force=1&gid=N&city=London

But it is not working. What is the field name for countries? Are country names stored as an integer or a text value such as France? How do I get a list of fields and values for CiviCRM? Thanks for your help.

# Answer
> 2 votes
I resolved this. I was using the wrong field name. The field name is "country-3" and I was using "country".

---
Tags: profile, search, fields
---


title: How to retrieve contacts from trash

text:
# Question
Title: How to retrieve contacts from trash
I inadvertently deleted a number of contacts and sent them to "trash". How do I retrieve them?

# Answer
Use the Advanced Search (in the Search menu) and check the box labeled 'Search in Trash (deleted contacts)'. It is a small check box in the Search Settings part of the Basic Criteria section. Whatever search you do will look in the 'Trash' rather than among active contacts.

Once those search results come up, you can select your desired contacts and, from the Actions list, 'restore' them.
> 6 votes

---
Tags: contacts, search
---


# Question
Title: Warning: getimagesize() error profile picture
Happy new years all!

I'm having problems showing images uploaded to a profile.

While editing a profile I can upload an image, but upon loading the profile page I get the following error across the top of the page (directory redacted here)

```
Warning: getimagesize(…photo=Mateusz_Pozar_da0ef7da9ecd68e909817e2c733e0d79.jpg):failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in …wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/View.php on line 164

```

The line in the php file is:

```
list($imageWidth, $imageHeight) = getimagesize(CRM_Utils_String::unstupifyUrl($image_URL));

```

Trying to open the image directly via "show image" on the profile page I get a 404

```
The requested URL /civicrm was not found on this server.

```

The specified directory for uploaded images is plugins/files/civicrm/custom/ and I can see the four images I've tried uploading and they look fine when opened directly.

Could this be caused by a too big or heavy image?

I'm running WP 4.4 and CiviCRM 4.6.6

Cheers / M

# Answer
> 2 votes
It sounds like there's a settings mismatch. Check the values of "Image Directory" on **Administer menu \> System Settings \> Directories** and "Image Upload URL" on **Administer menu \> System Settings \> Resource URLs**.

If the two look correct, please update the original question with the values so we can see them.

---
Tags: images, contact-image
---


# Question
Title: How can I run a php script to display API response with social media information for a contact
OK so I am interested in displaying social media account information for my contacts. Attentiv.ly looks awesome but very expensive :((

So I have been investigating other options and can now successfully pass a rest API via a php file to retrieve json from PIPL for a contact. Within civicrm I can create a link to the json using the email variable. I have temporarily (for exploratory purposes only don't worry!) hacked the email.tpl with this

```
<a href="https://api.fullcontact.com/v2/person.html?email={$item.email}&apiKey=XXXXXX"> social profile</alink

```

And when clicked it takes me to the correct social mediaprofile. It also works with the Fullcontact API. Hooray!!!

However what I really need is to somehow substitute the link for the script - but I can't put the PHP in the smarty template so now I'm stumped.

```
 //    $curl = curl_init();
 //   curl_setopt ($curl, CURLOPT_URL, "https://api.pipl.com/search/v4/?email=email@email.com&key=xxxxxxxxxxxxxx ");
 //   curl_exec ($curl);
 //  curl_close ($curl);
?>

```

Or this

```
//include_once '../creds.php';
//include_once '../Services/FullContact.php';

//initialize our FullContact API object
//get your api key here:  http://fullcontact.com/getkey
//$fullcontact = new Services_FullContact_API($apikey);

//do a lookup
//$result = $fullcontact->doLookup('bart@fullcontact.com');

//dump our results
//echo "<br/>----------------<br/><pre>";
//print_r($result);
//echo "</pre><br/>----------------<br/>\n";

```

Obviously substituting the email for the civicrm email variable.

Or indeed if I am going about this entirely the wrong way I'm all ears!!!! All input welcome! Thank you!

PS if anyone can also tell me how to copy and paste code without it actually rendering that would be great

# Answer
You can run php inside smarty, you just need to include it within `{php}` tags.

```
{php}
  $result = doSomethingCool();
  $this->assign('coolStuff', $result);
{/php}

<div>Your social media profile is: {$coolStuff}</div>

```

PS instead of hacking the template directly you can add a .tpl.extra file. See https://civicrm.org/blogs/dave-greenberg/now-its-easier-add-custom-behaviors-templates
> 6 votes

# Answer
Since you are wanting to do more than just a "little bit" of php in your smarty template I would suggest this alternate approach:

1. Implement a hook that fires when you want, such as hook\_civicrm\_pageRun.
2. In your hook, run the php code you want to retrieve the remote data (also add a conditional to only run it in the specific circumstance you want, since this is a rather ubiquitous hook - check the page name).
3. I might also suggest some form of local caching so you are not firing external rest requests *all the time*.
4. From your hook, inject the content you want into a region of the page.
> 4 votes

# Answer
Second the solution from Coleman. If however you do not want to include PHP in a Smarty template you could also create an API in an extension that does what you want to do, and then use CRM.api to retrieve the data in jQuery/JS.
> 2 votes

---
Tags: smarty, social-media
---


title: Wordpress Theme on Contribution pages

text:
# Question
Title: Wordpress Theme on Contribution pages
I am having an issue with setting what theme/layout is being used on contribution pages. I assume it is using the defualt layout but that ends up allowing sidebars and a slider to display. how do i set the layout for civicrm pages and profiles?

# Answer
Assuming you're adding the Civi content via a WP page (Pages \> Add Page, use the CiviCRM button to add your chosen functionality), under Page Attributes there should be the option to select a template. Depending on the theme you've selected, there may be a Full Width option. If not, you may be able to add that option to your theme.

~ Lesley
> 1 votes

---
Tags: civicontribute, wordpress, theme
---


# Question
Title: 403 - Forbidden Error on Dashboard Modules
We suddenly started receiving a "403 - Forbidden Error" on the dashboard modules. This is not an issue itself, however, at the same time the gridlines on the PDF reports have disappeared. Are these two issues connected? Either way any reason as to why the gridlines have disappeared?

We are running CiviCRM 4.6.10 on drupal 7.

# Answer
Yes, both could be related when the URL settings are wrong. Admin - Settings - Resource URLs and Admin - Settings - Cleanup Caches and Update Paths

I have seen it gone wrong by things as simple as: enforcing www or https.
> 1 votes

---
Tags: drupal, civireport, dashboard, pdf
---


title: Geocoding scheduled job failure

text:
# Question
Title: Geocoding scheduled job failure
When running the Geocoding/parsing scheduled job (CiviCRM 4.6.10/Drupal 7) I get the following error message:

```
    Full message:
Finished execution of Geocode and Parse Addresses with result: Failure, Error message: Error: Both Geocode mapping as well as Street Address Parsing are disabled. You must configure one or both options to use this script.

```

I've got Google set as the service provider for mapping and geocoding data, with no API key. I'm not interested in address parsing, and have the parsing parameter for the scheduled job set to 0.

If I run the job via URL it works fine, but executing it via the UI gives the error message.

Am I missing something?

# Answer
It looks like you have may not have set a command parameter in the Scheduled Job (but maybe you're adding it when you run the job via URL?). Do you have `geocoding=1` in your command parameters for "Geocode and Parse Addresses"?

See Managing Scheduled Jobs from the Civi wiki for reference (2nd row of the table).
> 4 votes

---
Tags: cron-job, geocoding
---


# Question
Title: Display: is it possible yet to collapse a set of non-custom data?
This is my first time on stack exchange so please excuse me if I've posted this in the wrong place, tagged it incorrectly, or missed anything else. And although I feel that I know civiCRM fairly well, I'm not at all a computer whiz, so forgive me if my tech language/terms aren't accurate. :)

Here goes... is it possible yet to collapse a set of built in/core fields, via the UI? I know how to do it for custom fields, but it'd be really helpful if I could do it for sets when I'm adding a contribution, for example.

I found this topic on the civiCRM Community Forum from 2012... https://forum.civicrm.org/index.php?topic=26273.0

Sounds like Lobo thought it would be a good little project, but I haven't found any updates.

Thanks in advance for any help you can give!

UPDATE: Specifically, when recording a New Contribution, I'd like to collapse the Soft Credit fieldset, and expand the Additional Contribution Info fieldset. It would speed up my data entry if I didn't have to tab through the fields within Soft Credit or reach for my mouse to expand the Additional Contribution Info section.

# Answer

> 1 votes

---
Tags: custom-fields
---


# Question
Title: Problem processing inbound emails to activities
Using Civi 4.6.10 and Drupal 7, when running the scheduled job to process inbound emails I'm constantly seeing the following error:

```
Dec 31 13:39:53  [info] $Fatal Error Details = Array
(
    [message] => No clue about the ezcMailDeliveryStatus
    [code] =>
)

Dec 31 13:39:53  [info] $backTrace = #0 /data/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(322): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /data/www/html/sites/all/modules/civicrm/CRM/Utils/Mail/Incoming.php(88): CRM_Core_Error::fatal("No clue about the ezcMailDeliveryStatus")
#2 /data/www/html/sites/all/modules/civicrm/CRM/Utils/Mail/Incoming.php(221): CRM_Utils_Mail_Incoming::formatMailPart(Object(ezcMailDeliveryStatus), (Array:0))
#3 /data/www/html/sites/all/modules/civicrm/CRM/Utils/Mail/Incoming.php(115): CRM_Utils_Mail_Incoming::formatMailMultipartReport(Object(ezcMailMultipartReport), (Array:0))
#4 /data/www/html/sites/all/modules/civicrm/CRM/Utils/Mail/Incoming.php(85): CRM_Utils_Mail_Incoming::formatMailMultipart(Object(ezcMailMultipartReport), (Array:0))
#5 /data/www/html/sites/all/modules/civicrm/CRM/Utils/Mail/Incoming.php(342): CRM_Utils_Mail_Incoming::formatMailPart(Object(ezcMailMultipartReport), (Array:0))
#6 /data/www/html/sites/all/modules/civicrm/CRM/Utils/Mail/EmailProcessor.php(249): CRM_Utils_Mail_Incoming::parseMailingObject(Object(ezcMail))
#7 /data/www/html/sites/all/modules/civicrm/CRM/Utils/Mail/EmailProcessor.php(111): CRM_Utils_Mail_EmailProcessor::_process(FALSE, Object(CRM_Core_DAO_MailSettings))
#8 /data/www/html/sites/all/modules/civicrm/api/v3/Job.php(386): CRM_Utils_Mail_EmailProcessor::processActivities()
#9 /data/www/html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_fetch_activities((Array:1))
#10 /data/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php(96): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#11 /data/www/html/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->run("Job", "fetch_activities", (Array:1), NULL)
#12 /data/www/html/sites/all/modules/civicrm/CRM/Core/JobManager.php(131): civicrm_api("Job", "fetch_activities", (Array:1))
#13 /data/www/html/sites/all/modules/civicrm/CRM/Core/JobManager.php(102): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#14 /data/www/html/sites/all/modules/civicrm/bin/cron.php(53): CRM_Core_JobManager->executeJobByAction("job", "fetch_activities")
#15 {main}

```

In researching this issue I've come across https://issues.civicrm.org/jira/browse/CRM-9484 which looks to be generating the same error (although I'm not seeing empty contact records being created). I can see that that issue is fixed for 4.7., but I don't want to upgrade to 4.7 (it's in beta as I write, plus I want to stay with 4.6. as the nominated LTS version). I also know that email to activity processing was working correctly a few months ago. Might this be due to problematic email messages in the mailbox being checked?

# Answer
> 3 votes
Yes it sounds like it's hitting an email it doesn't know how to parse - see the code for that function formatMailPart() where it fails (https://raw.githubusercontent.com/civicrm/civicrm-core/master/CRM/Utils/Mail/Incoming.php). Can you tell which email? Anything odd about it? In particular if you view the message source there might be a "Content-Type:" line with an unsupported type.

That "fix" for 4.7 all it does is just skips the email instead of a fatal error, but you'd still have an email that doesn't get processed.

---
Tags: email, cron-job
---


# Question
Title: Changing page layout for Contribution pages in Joomla
I have a need to remove certain Joomla styling from a specific Contributions page generated by CiviCRM, such as the main banner at the top.

I have investigated such things as editing the templates in Joomla, but that would change pages other than this particular Contributions page.

# Answer
> 1 votes
In Joomla, it's actually not too difficult to override the CSS of any particular page. You can give your page a custom CSS class, then append the CSS to the end of your template CSS file, or a custom CSS file that is pulled into the page.

1. If you don't already have one, create a menu item for the particular Contributions pages you want to override. You can create a hidden or links menu in Joomla that doesn't have an associated module. Select the CiviCRM - Contribution page type, then the page. You'll need to do this separately for each page.
2. Under Page Display Options for the menu item, add the new class into the Page Class box.

A few notes: When I create CSS overrides for individual pages, I usually define the page class, then use Firebug (or something similar) to test the overrides prior to uploading them. Depending on how and when the CSS of your template loads, you may need to make use of the `!important` declaration.

Also, the use of `display:none` usually works for me in the case of having to hide certain elements, but there is some debate about when you should and shouldn't use that.

Another option that's a little more work than creating a template override is to create an entirely new template. One of the features that Joomla has over certain other CMSes is the ease with which you can assign different templates to individual pages via the template manager. This would completely avoid having to hide certain elements, because you would simply leave them out of your new template. You could start with your current template, and just remove the pieces that you don't need. Install it via the Extension manager, and assign it to your Contribution pages. Note that you will still need to create a menu item for each Contribution page in question.

# Answer
> 0 votes
LMK Web's answer is pretty good, and Joomla-specific. CiviCRM provides similar ways of doing the same thing, such as using a .extra.tpl file.

If you go the .extra.tpl route, you can make sure the CSS is only appended to a single contribution page by putting the file in the appropriate folder structure, as detailed here. For instance, to modify the event registration page for event ID 14, put the file here:

```
/<path to CiviCRM custom templates folder>/CRM/Event/Form/Registration/14/Register.extra.tpl

```

---
Tags: contributions, joomla, templates, css
---


# Question
Title: is it possible to switch languages on a page manually?
I have a Civi install that needs to support multiple languages for a few forms. The site itself is not multilingual, so I've not enabled the option to inherit the CMS language, and the language-switching should be available to anonymous users, so I can't make use of the language preference field. I'd like to be able to allow the visitor to switch the language dynamically -- presumably with a URL parameter. Is there a way to do this?

# Answer
This is done by appending &lcMessages=fr\_FR to the URL (where fr\_FR is the desired language code).

When multiple languages are enabled, there is a language switcher block that becomes enabled. What threw me off is that in Joomla that is a fixed block in the admin interface left sidebar -- but is not available to the public side of the site. In Drupal it is a block, which is more configurable. But all the language switcher does is reload the current URL with the appropriate language value.
> 6 votes

---
Tags: localisation
---


# Question
Title: Receipts Sent to Customer for Current Donation Include Previous Donations
Ok, I'm hoping I can explain this so it makes some sort of sense :)

In CiviCRM, we have a customer who has custom profile fields that donors can enter the amount of their contribution that they want to go to a specific cause

The issue is that the receipt is including the contribution the donor just made as well as the previous amount(s) they chose to designate the last time they made a contribution (since it's the same donor with the same email address).

Is there any way to remove the amount from the previous contribution the donor made? It's not helpful for our customer because they don't know what amount/designation applies to what year when they view the receipt that's sent and the customers are concerned that they are being charged twice.

Any help with this would be GREATLY appreciated because this is one of our my vocal customers. :)

If you need any additional information, please let me know.

Thank You, Nicole

* DRUPAL 7
* CIVICRM 4.6.8

# Answer
The custom fields that allow you to specify who the donation should go to should most likely be attached to the contribution, not the contact. Change the data model and the receipts should fix themselves.
> 1 votes

---
Tags: civicontribute, drupal, custom-fields, message-templates, system-workflow-messages
---


title: Administration Console

text:
# Question
Title: Administration Console
After Civi 4.6.10 upgrade I can no longer access the Administer/Administration Console without getting an error. Here is a sample:

@import url(/devjom3update/administrator/components/com\_civicrm/civicrm/css/civicrm.css); @import url(/devjom3update/administrator/components/com\_civicrm/civicrm/bower\_components/jquery-ui/themes/smoothness/jquery-ui.min.css); Sorry but we are not able to provide this at the moment. You do not have permission to access this page.

Return to home page.

function toggle( element ) { var className = element.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { element.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

# Answer
Check the URL before you select the Administration Console link. Does it have a www or no www? Is it http:// or https://? Next, check the URL of the error page for the same things. Is there a difference? If so, that's your problem. Check here for a solution.
> 1 votes

# Answer
In civicrm common folder is missing. Check common folder is there or not
> -1 votes

---
Tags: admin
---


# Question
Title: Why does Assigned To: for an Activity to any admin, and only one other user not work since 4.6.7?
We're on 4.6.9 and Drupal 7.

Ever since the changes to, then the rollback of, Access Control Levels (ACLs) /user permissions in 4.6.6/4.6.7/4.6.8 (see here), I can Assign To: an Activity to all users *except* our two Admin users, and one other user, who has the same permissions as other users who can have an Assign To: for an activity.

I'll check these three user records (one of which is mine) for any corruption or other weirdness.

Has anyone else experienced this?

I'm not sure how I could duplicate on demo/sandbox without doing the same version updates/rollbacks we did from 4.6.6 to 4.6.8.

# Answer
In the any thoughts category: If you can't find it in 4.6.8 demo and you mention a rollback. A common problem with rollbacks is that when a table is created during an upgrade and you use a db dump to roll back to previous version, the created table stays in the database. If you then redo the upgrade, it does not expect that table to be there. So it could leave you with a system that is in disbalance.

So, my question is, when you did the rollback, did you remove and recreate the DB or did you just apply the db dump (with the risk of leaving a created table behind)?

If you did the latter: Do you still have your 4.6.6 DB? If so, could you immediately upgrade it to 4.6.8 and see if the problem still exists? If it doesn't, you could compare the table structures of your current live DB and this upgraded DB.
> 1 votes

# Answer
FYI, I found that removing the API key in the Contact table for the other Admin user and I then allowed both of our names to appear in search as Assigned To: for Activities, but that "fix" doesn't work for another user, who had no API key. Thinking its something else particular to that user's ACL settings but they are not unique to that record. Any thoughts appreciated, thanks
> 0 votes

---
Tags: activities, permissions, acl, upgrade
---


# Question
Title: How to print reports with non-English characters like accents?
We have instances of CiviCRM in Spanish and Catalan. When we try to print some reports the Spanish and Catalan specific characters (accents, umlauts, etc.) are printed with a wrong charset. E.g. It prints **RelaciÃ³** instead of **Relació**

It is a bug or we're missing something?

# Answer
> 3 votes
Although not an ideal solution, if we add the following line in the .htaccess the reports are printed well.

```
AddDefaultCharset utf-8

```

# Answer
> 3 votes
This is probably caused by the settings for your database? We had the same problem with Norwegian special characters because their CiviCRM database was set to Latin-1. It has to be UTF-8 general-ci for CiviCRM.

---
Tags: civireport, localisation, reports
---


# Question
Title: How to have credit card option appear without enabling Pay Later option
We recently moved to WordPress 4.3.1 and just upgraded to Civi 4.6.10. We've been having an issue with the credit card option on our donation forms since the move to WordPress. The credit card option will not appear unless you enable the Pay Later option. Which we do not wish to show.

(FYI - we have taken the label off so as to confuse our donors less. It just says "Other" now.)

# Answer
I believe you're coming up against this bug: https://issues.civicrm.org/jira/browse/CRM-17735. I believe CiviCRM 4.6.11 comes out Wednesday with a fix!
> 1 votes

# Answer
It basically related to civicrm template. If you are using civicrm custom template then check the version of custom template and installed civicrm version. Both template must have the same version. Also make credit card payment processor as default processor.
> -2 votes

---
Tags: wordpress
---


# Question
Title: How do I setup an import for the Do Not Email field?
I am a newby.

Why would 'Do not Email' not be checked even though my import mapped and imported without error?

It says it didn't have an error, but it must have imported with an error. I was able to force an import error message with data like "Checked".

The import completed without error when the Do not Email column is Y. I think it even worked when it is YES. But the import hasn't actually changed the contacts' data.

**How do I set up the import correctly for the 'Do Not Email' field?**

Thanks.

Johnny

# Answer
Welcome to CiviCRM!

For the import of Boolean fields (yes/no, true/false, check boxes, etc.) the correct syntax is 0 for no or false and 1 for yes or true. **Use 1 instead of Y or YES**, and it should work for you.

Be aware that your imports thus far may have created NULL values in the database. See this question and answer for reference: https://civicrm.stackexchange.com/a/7396/105

You'll want to check your database or have your admin check those values to make sure you've got 1s and 0s instead of NULL.
> 2 votes

---
Tags: import, field-mapping
---


# Question
Title: Contribution Page-Amount page options now showing
0 down vote favorite

Greeting, When I add new Contribution Page then chick on "Amount" option in CiviCRM, In the "Amount" options page all checkboxes and radio buttons except PayPal Standard checkbox will disappear also Minimum Amount and Maximum Amount text boxes not showing .

I open the page in 4 different web browser and I cleared the cash and flash my Drupal website and still these options now showing. I am using Drupal 7.41 and CiviCRM 4.6.10.

Please advice how to fix this problem.

Regards,

# Answer
> -1 votes
Check it after deleting the civicrm temporary files (../files/civicrm/templates\_c). If this will not fix your issue, then check your civicrm log file (../files/civicrm/ConfigAndLog). Here your will get more details about the error.

---
Tags: drupal, webform-civicrm
---


title: Custom work for Wordpress CiviCRM

text:
# Question
Title: Custom work for Wordpress CiviCRM
Is there anyone who can help me with some customised data for my CiviCRM (for wordpress)

1. I need the fields from New Contact to be replaced with my own.

* It will be included a start date.
2. I need to have reminder with 30 days before expiring the "start date" - custom email template

* I need to have reminder with 7 days before expiring the "start date" - custom email template
    * I need to have reminder with 1 day before expiring the "start date" - custom email template
3. The dashboard should show only some columns that I choose, not everything - with sorting, searching and filtering.

That's it. I will pay, just tell me who can do that for me. Thank you

# Answer
You can find paid CiviCRM consultants on this list here.

With that said - much of what you'd like to do should be something you can do yourself, you may just need training. I would recommend finding a consultant who will train you to set these things up together.
> 3 votes

---
Tags: wordpress
---


# Question
Title: Send a Receipt to a user when adding a manual membership OR any payment
Using WP4.3.1 and CiviCRM 4.6.9 When creating a manual (off line) membership or payment for a contact is there a way to have a receipt of that sent to another user(email address)? And is there a way to modify what is on that receipt?

# Answer
You may be able to hook something together using CiviRules, but it's unlikely - because CiviRules won't have the same context for generating the receipt. So CiviRules is probably fine for sending an internal email stating, "Hey, this contribution came in, here are the details", but (most likely) can't generate the exact receipt.

That's probably good enough - but if it's not, you can create an extension to handle this, using hook\_civicrm\_alterMailParams.
> 1 votes

---
Tags: receipts
---


# Question
Title: CiviMail scheduling problem due to timezone issues
i have a mailing that looks like it has been caught out due to timezone issues. The person who set it up was in NZ, but moved to Europe but didn't change their timezone. Looks like the Mailing got the scheduled time using NZ timezone, but civi sees it as happening in the future so is not sending it. Am i okay to change scheduled\_date in civicrm\_mailing table directly?

# Answer
I've never changed the scheduled date directly in civicrm\_mailing, but it seems like a pretty harmless maneuver.

If your CMS is WordPress, I have a fork of wp-cli here that lets you specify the time zone in which a cron job should assume it runs. It's specifically to handle a WordPress/Civi multisite where different sites are maintained by users in different time zones. Each site's cron job runs in that site's local time zone.
> 1 votes

---
Tags: civimail, timezone
---


title: How are timezones handled in CiviCRM?

text:
# Question
Title: How are timezones handled in CiviCRM?
We were running into issues with how CiviCRM activities are showing in Drupal Calendar (Views). Drupal is adjusting the provided activity date/time based on the user configured time zone. For us, this is desired behavior because we have users crossing multiple time zones who want to see the time the activity is executed in whatever time zone they are in.

After a little research (and finding these threads: https://issues.civicrm.org/jira/browse/CRM-9683,
https://forum.civicrm.org/index.php/topic,23411.msg98329.html#msg98329, What timezones should we use on the server and database?, though there are many more tangentially related ones) it appears that CiviCRM assumes that all users will be in the same timezone and stores activity date/times as the local time into the database. Drupal expects that the stored times are in UTC, hence our issue. Would a "simple" fix of converting the activity datetime column format to a timestamp format in mysql be a reasonable fix? I'm worried that we're going to run into this in multiple places...

Thanks!

As an aside, I think it would make sense as a future change for CiviCRM to respect the Drupal user configurable time zones.

# Answer
> 4 votes
For us, there were a couple of changes that made this to work. First, in the database, the civicrm activity\_date\_time type was modified to be a timestamp. This made it so that when CiviCRM saved the date and time it was stored in the database as UTC once the Drupal timezone was also set to UTC (but users are able to select their own timezone and it behaves appropriately). According to developers in the CiviCRM IRC, this change can be made for any CiviCRM date time type. We also set our OS time to UTC. With just these changes, the Calendar View was still not displaying correctly because it was being adjusted twice. To fix that, we set tz\_handling to 'none' in the function civicrm\_date\_views\_fields in civicrm.views.inc.

Hope it helps somebody else!

---
Tags: activities, timezone
---


title: Civi Administer Tab issues

text:
# Question
Title: Civi Administer Tab issues
Anything I click on under administer tab goes to our home page...then list the administer topic? So everything clicks to our home page then shows the topic?

# Answer
If you have recently moved from one location to other or DB. please follow the link which should fix the issue

http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location
> 1 votes

---
Tags: sysadmin
---


# Question
Title: How do I create set up batch update members via profile?
I want to expire all members in the database and start over.

# Answer
I would suggest that you start by looking at the documentation on Profiles. If you still have questions please come back with some more details about what the problem is.
> 1 votes

---
Tags: profile
---


# Question
Title: How to handle event payments that include contributions
Sometimes we have situations where someone will pay for an event with a check and add a donation to the amount. How can I record a contribution and event payment in civi that was made with the same check?

Thanks

# Answer
An event payment will create a contribution. To add a donation to the event payment form I suggest you look at pricesets. There you can add a donation field. http://gitbook.civicrm.org/events/complex-event-fees.html
> 2 votes

---
Tags: civievent
---


# Question
Title: Drupal Views - Sorting of family members in a contact list
I am working on a church website with civicrm integration.

What I want is a list of church members sorted or grouped by household.

Sorting by sortname is no problem. I am able to get members with the same last name to show up below each other. And then from the eldest to the youngest of a family.

The problem is with children from divorced families. They dont have the same last name but do live (in most cases) on the same address. The mother has her own maiden name, and the children the name of their father. But in this case the children are part of the household of the mother.

When sorting on last name the children do not list under the mother.

I know there is an option to do something with relations, from A to B but it is not clear to me how this works.

I read information that is related, but not specific here, and here.

Any help would be greatly appreciated!

This is an export of my current view:

```
    $view = new view();
$view->name = 'civicrm_ledenlijst';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'civicrm_contact';
$view->human_name = 'Civicrm ledenlijst';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Civicrm ledenlijst';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['use_more_text'] = 'meer';
$handler->display->display_options['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
  3 => '3',
  2 => '2',
);
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['submit_button'] = 'Toepassen';
$handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Sorteren op';
$handler->display->display_options['exposed_form']['options']['sort_asc_label'] = 'Oplopend';
$handler->display->display_options['exposed_form']['options']['sort_desc_label'] = 'Aflopend';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '150';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['pager']['options']['expose']['items_per_page_label'] = 'Items per pagina';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all_label'] = '- Alle -';
$handler->display->display_options['pager']['options']['expose']['offset_label'] = 'Startpunt';
$handler->display->display_options['pager']['options']['tags']['first'] = '« eerste';
$handler->display->display_options['pager']['options']['tags']['previous'] = '‹ vorige';
$handler->display->display_options['pager']['options']['tags']['next'] = 'volgende ›';
$handler->display->display_options['pager']['options']['tags']['last'] = 'laatste »';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
  'sort_name' => 'sort_name',
  'birth_date' => 'birth_date',
  'street_address' => 'street_address',
  'postal_code' => 'postal_code',
  'city' => 'city',
  'phone' => 'phone',
  'phone_1' => 'phone_1',
  'email' => 'email',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'sort_name' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'birth_date' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'street_address' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'postal_code' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'city' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'phone' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'phone_1' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'email' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
);
$handler->display->display_options['style_options']['sticky'] = TRUE;
/* Veld: CiviCRM Contacts: Sort Name */
$handler->display->display_options['fields']['sort_name']['id'] = 'sort_name';
$handler->display->display_options['fields']['sort_name']['table'] = 'civicrm_contact';
$handler->display->display_options['fields']['sort_name']['field'] = 'sort_name';
$handler->display->display_options['fields']['sort_name']['label'] = 'Naam';
$handler->display->display_options['fields']['sort_name']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['sort_name']['link_to_civicrm_contact'] = 0;
/* Veld: CiviCRM Contacts: Birth Date */
$handler->display->display_options['fields']['birth_date']['id'] = 'birth_date';
$handler->display->display_options['fields']['birth_date']['table'] = 'civicrm_contact';
$handler->display->display_options['fields']['birth_date']['field'] = 'birth_date';
$handler->display->display_options['fields']['birth_date']['label'] = 'Geb. datum';
$handler->display->display_options['fields']['birth_date']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['birth_date']['date_format'] = 'custom';
$handler->display->display_options['fields']['birth_date']['custom_date_format'] = 'd-m-Y';
$handler->display->display_options['fields']['birth_date']['second_date_format'] = 'long';
$handler->display->display_options['fields']['birth_date']['timezone'] = 'Europe/Amsterdam';
/* Veld: CiviCRM Address: Full Street Address */
$handler->display->display_options['fields']['street_address']['id'] = 'street_address';
$handler->display->display_options['fields']['street_address']['table'] = 'civicrm_address';
$handler->display->display_options['fields']['street_address']['field'] = 'street_address';
$handler->display->display_options['fields']['street_address']['label'] = 'Adres';
$handler->display->display_options['fields']['street_address']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['street_address']['location_type'] = '0';
$handler->display->display_options['fields']['street_address']['location_op'] = '0';
$handler->display->display_options['fields']['street_address']['is_primary'] = 0;
$handler->display->display_options['fields']['street_address']['is_billing'] = 0;
/* Veld: CiviCRM Address: ZIP / Postal Code */
$handler->display->display_options['fields']['postal_code']['id'] = 'postal_code';
$handler->display->display_options['fields']['postal_code']['table'] = 'civicrm_address';
$handler->display->display_options['fields']['postal_code']['field'] = 'postal_code';
$handler->display->display_options['fields']['postal_code']['label'] = 'Postcode';
$handler->display->display_options['fields']['postal_code']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['postal_code']['location_type'] = '0';
$handler->display->display_options['fields']['postal_code']['location_op'] = '0';
$handler->display->display_options['fields']['postal_code']['is_primary'] = 0;
$handler->display->display_options['fields']['postal_code']['is_billing'] = 0;
/* Veld: CiviCRM Address: City / Suburb */
$handler->display->display_options['fields']['city']['id'] = 'city';
$handler->display->display_options['fields']['city']['table'] = 'civicrm_address';
$handler->display->display_options['fields']['city']['field'] = 'city';
$handler->display->display_options['fields']['city']['label'] = 'Plaats';
$handler->display->display_options['fields']['city']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['city']['location_type'] = '0';
$handler->display->display_options['fields']['city']['location_op'] = '0';
$handler->display->display_options['fields']['city']['is_primary'] = 0;
$handler->display->display_options['fields']['city']['is_billing'] = 0;
/* Veld: CiviCRM Phone Details: Phone Number */
$handler->display->display_options['fields']['phone']['id'] = 'phone';
$handler->display->display_options['fields']['phone']['table'] = 'civicrm_phone';
$handler->display->display_options['fields']['phone']['field'] = 'phone';
$handler->display->display_options['fields']['phone']['label'] = 'Tel. vast';
$handler->display->display_options['fields']['phone']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['phone']['location_type'] = '0';
$handler->display->display_options['fields']['phone']['location_op'] = '0';
$handler->display->display_options['fields']['phone']['is_primary'] = 0;
$handler->display->display_options['fields']['phone']['phone_type'] = '1';
/* Veld: CiviCRM Phone Details: Phone Number */
$handler->display->display_options['fields']['phone_1']['id'] = 'phone_1';
$handler->display->display_options['fields']['phone_1']['table'] = 'civicrm_phone';
$handler->display->display_options['fields']['phone_1']['field'] = 'phone';
$handler->display->display_options['fields']['phone_1']['label'] = 'Tel. mobiel';
$handler->display->display_options['fields']['phone_1']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['phone_1']['location_type'] = '0';
$handler->display->display_options['fields']['phone_1']['location_op'] = '0';
$handler->display->display_options['fields']['phone_1']['is_primary'] = 0;
$handler->display->display_options['fields']['phone_1']['phone_type'] = '2';
/* Veld: CiviCRM Email: E-mailadres */
$handler->display->display_options['fields']['email']['id'] = 'email';
$handler->display->display_options['fields']['email']['table'] = 'civicrm_email';
$handler->display->display_options['fields']['email']['field'] = 'email';
$handler->display->display_options['fields']['email']['location_type'] = '0';
$handler->display->display_options['fields']['email']['location_op'] = '0';
$handler->display->display_options['fields']['email']['is_primary'] = 1;
/* Sorteercriterium: CiviCRM Contacts: Last Name */
$handler->display->display_options['sorts']['last_name']['id'] = 'last_name';
$handler->display->display_options['sorts']['last_name']['table'] = 'civicrm_contact';
$handler->display->display_options['sorts']['last_name']['field'] = 'last_name';
/* Sorteercriterium: CiviCRM Contacts: Birth Date */
$handler->display->display_options['sorts']['birth_date']['id'] = 'birth_date';
$handler->display->display_options['sorts']['birth_date']['table'] = 'civicrm_contact';
$handler->display->display_options['sorts']['birth_date']['field'] = 'birth_date';
/* Filtercriterium: CiviCRM Contacts: Contact Type */
$handler->display->display_options['filters']['contact_type']['id'] = 'contact_type';
$handler->display->display_options['filters']['contact_type']['table'] = 'civicrm_contact';
$handler->display->display_options['filters']['contact_type']['field'] = 'contact_type';
$handler->display->display_options['filters']['contact_type']['value'] = array(
  'Individual' => 'Individual',
);
/* Filtercriterium: CiviCRM Contacts: Is Deleted */
$handler->display->display_options['filters']['is_deleted']['id'] = 'is_deleted';
$handler->display->display_options['filters']['is_deleted']['table'] = 'civicrm_contact';
$handler->display->display_options['filters']['is_deleted']['field'] = 'is_deleted';
$handler->display->display_options['filters']['is_deleted']['value'] = '0';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'civicrm-ledenlijst';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Civicrm ledenlijst';
$handler->display->display_options['menu']['name'] = 'main-menu';
$translatables['civicrm_ledenlijst'] = array(
  t('Master'),
  t('Civicrm ledenlijst'),
  t('meer'),
  t('Toepassen'),
  t('Reset'),
  t('Sorteren op'),
  t('Oplopend'),
  t('Aflopend'),
  t('Items per pagina'),
  t('- Alle -'),
  t('Startpunt'),
  t('« eerste'),
  t('‹ vorige'),
  t('volgende ›'),
  t('laatste »'),
  t('Naam'),
  t('Geb. datum'),
  t('Adres'),
  t('Postcode'),
  t('Plaats'),
  t('Tel. vast'),
  t('Tel. mobiel'),
  t('E-mailadres'),
  t('Page'),
);

```

# Answer
Welcome to CiviCRM StackExchange!

\** This answer assumes you've already created Households in CiviCRM and related Individuals to their respective Households. If you already have your families separated into Households, then you're very close.

We're using the default `Household Member of` / `Household Member is` CiviCRM relationship type, so below is how we have our View setup to display Individuals grouped by their Households. (We're a church using CiviCRM and Drupal as well).

Couple of notes first for the sake of the Views setup:

* "Household Member of" is Side A of the Civi relationship.
* "Household Member is" is Side B of the Civi relationship.

Our Drupal view first pulls the Households themselves, then the individuals related to the Households. So for our **Views Relationship connections**, we have to start from Contact B (which is the Households) and set it up this way:

1. Add a relationship (under the Advanced section of the view): `CiviCRM Contacts: CiviCRM Relationship (starting from Contact B)`. We could specify a relationship there if we wanted to (Household Member of|Household Member is), but we don't have to because of Step 3.
2. Add a second relationship: `CiviCRM Relationships: Contact ID A` which uses the relationship from Step 1.
3. Use a `CiviCRM Contacts: Contact Type = Household` filter in the **Filter Criteria** section. (We also use `CiviCRM Contacts: Is Deleted (False)` and `(CiviCRM Contact A) CiviCRM Contacts: Is Deleted (False)` to make sure we're not getting Households or Individuals from the Trash).

For the sake of the **Field Criteria** then, any field that needs to display Household info, we just use the normal fields as is, Display Name, Address, etc. For example:

Any time we are listing the individuals from the Household we specify the Views Relationship we setup in Step 2 above - `CiviCRM Relationships: Contact ID A`.

A final and *critical* step is the **Format Settings** (looks like you're using a Table format like we do): **Make sure to group by the Household Name** (or some other unique Household identifier like Household Contact ID maybe):

If you have any questions, please don't hesitate to ask. Views + CiviCRM is incredibly powerful.
> 3 votes

# Answer
Sounds doable with civicrm relationships as drupal relationships. In CiviCRM menu:

**Admin - Customize Data and Screens - Relationship Types**

you can see what Contact A is and what Contact B.

In relationship "Household Member of/Household Member is" the Individual is Contact A and the Household is Contact B. Hope that helps.

(Als je wil kan ik meekijken :) )
> 1 votes

---
Tags: drupal, drupal-views, relationships
---


# Question
Title: Can CiviCRM set up an event registration on a separate server?
Once upon a time, I seem to recall that it was possible to use pretty much any CiviCRM form and export the HTML to an external server. The idea is/was that you could have CiviCRM running on a non-advertised server and the signup or event forms on your regular Website. Is this still possible? If so, how? If not, are the only options an iframe or some other workaround?

One of my customers would like to have a server that doesn't offer the entire contact database (for security reasons) but allows for event sales or mailing list registrations which are then processed by the private CiviCRM server. There's a Webform module for CiviCRM but I believe it needs CiviCRM to be on the same machine.

Thoughts? Ideas? Suggestions?

# Answer
CiviCRM profiles still have HTML snippets, which you can post on another website. They can be used for Mailing subscription forms, but if I'm right not for event subscription.

Other options I am thinking about would be:
> 6 votes

# Answer
You might have a look at CiviProxy. It is a proxy server that filters requests and passes "good ones" on to CiviCRM which can then be run in a VPN. Caveat: It does not have whitelisting rules for CiviEvents implemented as of now and thus would require some further development effort. But the concept and framework could be interesting for security-minded users.
> 2 votes

---
Tags: civievent, webform-civicrm
---


title: Monitoring other's activities

text:
# Question
Title: Monitoring other's activities
As an admin is there a way to see what other people have been doing on their accounts on the same civicrm database?

# Answer
Most actions are saved as an `Activity` in CiviCRM. You can get all Activities through the `Advanced Search`:

1. Menu: `Search` \> `Advanced Search`
2. For the search field `Display Results As` select `Activities`

Using all the other search criteria you can filter the kinds of activities you are interested in (e.g. Activities of a specific user).

Does this help? Or what kind of things are you looking for?
> 1 votes

---
Tags: civimember, contacts
---


title: GoCardless and one-off payments

text:
# Question
Title: GoCardless and one-off payments
I understand GoCardless can accept a one-off payment but it looks as if the extension written for Civi may not yet have any way to connect to the GoCardless one-off bill resource. Does anyone know if that's the case?

We had been trying to set up two contribution pages (membership options): one for recurring monthly payments and the other for annual, non-recurring payments. For the annual payments, on the amounts tab, we did try leaving the checkbox for Recurring Contributions unticked but naturally, on testing, GoCardless throws an error: Interval length can't be blank - Interval unit must be "day", "week" or "month".

Any thoughts? Should we just use another payment processor for the non-recurring payments?

# Answer
From @kakajaran's 26 November comment on veda-consulting/uk.co.vedaconsulting.payment.gocardlessdd#5, it seems at this time the extension is expected to work with recurring payments only.

I would suggest filing an issue on the project's Github to signal that you'd like support for this, then either reaching out to the extension developers directly or finding other ways to support the fix you require (eg by submitting a patch directly, or sponsoring work to make it happen).
> 2 votes

---
Tags: civicontribute
---


# Question
Title: What is the proper CiviCRM response when an Authorize.net CC transaction is declined?
using WP4.3.1 and Civi 4.6.9. We got the below message from a member: "I renewed online with a credit card but did not get a confirmation of my payment. After completing and clicking on ‘make payment’ it took me back to the renewal page. If I am confirmed, could you please send me a receipt?"

When we checked on our end, it said Transaction Status: Declined (Card declined by issuer - Contact card issuer to determine reason.)

We are concerned that the system isn’t letting people know if there was an issue processing their payment. I was pretty sure that it would give them some sort of message, but wanted to check.

# Answer
Usually Civi displays an error message from Authorize, e.g., The card number is invalid. Perhaps the user missed it?

I assume there are no odd CSS settings in your theme that might be hiding the message.
> 3 votes

---
Tags: civicontribute
---


title: CiviSMS merge option prior to sending?

text:
# Question
Title: CiviSMS merge option prior to sending?
When exporting search results or preparing a New Mailing in Civi Mail, there is an option to merge contacts from the same household/address (export) or remove duplicate emails (CiviMail).

1. Does a similar merging option exist for a New SMS in CiviSMS?
2. If not, what is best practice for preventing multiple SMS going to duplicate phone numbers?

Backstory: Our organization has a large number of families, so parents will often register their children with the parent's mobile number. Thus the high probability of duplicate mobile numbers for mass SMS.

# Answer
1. It appears there isn't a merge option for SMS.
2. At present, I am exporting my search results and/or group, finding/removing the duplicate mobile phone numbers in Excel (via Conditional Formatting), and re-importing the remaining contacts and numbers as a new group that I can then target for the New SMS.

I don't know of a purely Civi way of doing this, but if someone has other ideas, I'd love to hear them.
> 0 votes

---
Tags: civisms, duplicate-contacts
---


title: Server Error 500 when cron runs

text:
# Question
Title: Server Error 500 when cron runs
I am running Joomla 3.4.7 and CiviCRM 4.6.9. I am getting the following error when my cron runs automatically.

```
--2016-01-05 08:00:01--  http://www.sitename.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=loginid&pass=password&key=c12121212121212121212121
Resolving www.sitename.org... 188.143.132.180 Connecting to www.sitename.org|188.143.132.180|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2016-01-05 08:00:01 ERROR 500: Internal Server Error.

```

If I run the cron manually, I get the following 500 Server Error:

```
The website encountered an error while retrieving http://www.divingrebels.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=loginid&pass=password&key=c121121212121212121212121. It may be down for maintenance or configured incorrectly.

```

The cron which is running in CPanel is a wget cron.

I contacted my webhost and they sent me the log which shows the cron running, but the email I get after the cron runs shows the 500 Server Error. I have a 100 emails per hour limit and have the mailer batch limit in CiviCRM set to 99.

I have enabled debugging and backtrace in CiviCRM, but have no idea where to find the info or how to read it. Any help would be greatly appreciated.

# Answer
I ran an update to Joomla 3.4.8 and it resolved the issue. There must have been a bug in Joomla 3.4.7 which caused the cron issue.
> 3 votes

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


# Question
Title: Where is the merge function for CiviMail located in code?
CiviMail has a great feature that finds intended recipients with the same email address prior to a mailing and prevents multiple emails getting sent to the same address. It seems similar to the Merge Address or Merge Household features in the Export action. **Where in the code base is the CiviMail merge functionality located?**

I'd like to create a similar function for CiviSMS and am looking for a starting point.

Based on the merge functions I've found in Export (https://github.com/civicrm/civicrm-core/blob/master/CRM/Export/BAO/Export.php), I've tried a few different searches on GitHub for the CiviMail merge function like "mergeemail" or "merge\_email" but can't find anything yet.

# Answer
> 1 votes
Well I think the dirty work is done here in a sql statement using a group by clause. I don't know the code base at all however. I am on win7 and use the grepWin program.

..\civicrm\civicrm\CRM\Mailing\BAO\Mailing.php

Line 558

```
  // CRM-3975
  $groupBy = $groupJoin = '';
  if ($dedupeEmail) {
    $groupJoin = " INNER JOIN civicrm_email e ON e.id = i.email_id";
    $groupBy = " GROUP BY e.email ";
  }

```

CiviMail should have the option of not sending duplicate emails https://issues.civicrm.org/jira/browse/CRM-3975

---
Tags: civimail, civisms
---


# Question
Title: How can I synchronize civimail and my microsoft outlook mail program?
As response mails arrive in my "normal" outlook account, I'd like to see them automatically on civicrm in order to have a better overview. Is there a possibility to create a folder in outlook that updates mails in civicrm?

thanks a lot for your help!

# Answer
One way would be to create a special response email address and then use CiviCRM's email-to-activity functionality to attach them to your CiviCRM contact records. You could also make a folder in your IMAP account and let that folder be imported into CiviCRM.

http://book.civicrm.org/user/advanced-configuration/email-system-configuration/

*From the book:*

> **Email-to-Activity processing**
>
> CiviCRM can automatically retrieve email from a specified inbox and file it as an email activity against contacts corresponding to sender and recipients of the email. New contacts are created for emails not already in the database.
>
> There are two ways to do this (either or both ways can be setup at same time):
>
> * **Special email address:** Set up a special email address for your organization, e.g. civiemails@example.com. Users can then add this address in the Bcc field for your outbound emails; they will get auto filed in CiviCRM as described above. No one who receives the email will see this special address if the Bcc field is used.
> * **IMAP Folder:** Set up a folder in your IMAP Inbox where you can drag emails that you want filed in CiviCRM.Â This works with both inbound and outbound emails. (this requires that your email be set up using IMAP.)
> 3 votes

# Answer
Another option is to use our outlook plugin and extension. The extension will let you file emails into CiviCRM from your outlook client and it will also create contacts where needed. Its a bit more powerful than activity to email as it will let you pick from duplicate civicrm contacts and it also lets you create/update cases from emails too.

You can see more about the functions here and here
> 3 votes

---
Tags: civimail
---


# Question
Title: Inserting details of another contact as tokens into an email
I'm trying to set up a template to be sent to one contact. It includes tokens that are specific details of a second contact. How do I specify the contact whose details I am trying to insert through these tokens?

# Answer
> 2 votes
Are you using drupal as your CMS? We have some custom tokens with token data from the organizational record that individuals are related to.

Check it out here, it won't get you all the way as we are using custom fields and relationships not applicable but you may be able to use it as a template of sorts:

https://github.com/elisseck/civi4.6-related-info-token

# Answer
> 1 votes
the second contact is how related to the first? it sounds like some custom tokens. http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens

# Answer
> 0 votes
We've found another way round the problem by compiling a report and sending that off to the appropriate party! :) Thanks for your advice!

---
Tags: civimail, tokens
---


title: Date of birth fields

text:
# Question
Title: Date of birth fields
We're trying to have the date-of-birth field for our contacts displayed in dd-mm-yyyy format when using mailings but despite me altering every single relevant setting in Civi...our test mailings still display the date of birth in yyyy-mm-dd format? Why might this be?

# Answer
> 1 votes
It might well be that the relevant function does (wrongly) not use the date formatting based on the settings. Could you check that?

---
Tags: localisation
---


title: Onboarding CIVICRM

text:
# Question
Title: Onboarding CIVICRM
My name is Nada Kartouch and I am helping thinkforward charity to find suitable CRM system to support their work.

The charity is based in London and looks after less-privileged teenagers to help them continue education and / or find decent jobs.

I think CIVICRM is a very suitable solution, therefore I would like to verify couple of points with you.

First: To what extent we can configure contacts / contributions / events. As can we change the fields / names / relationship between items.

Second: would be possible to get a quote for hosting 25 to 30 accounts (as I read that you can help us do so with your partners)

Third: can you provide a quote as well if we need help in customising the solution.

Finally, let me thank you in advance for the great support and solution.

Warm regards Nada

# Answer
thanks for showing an interest in CiviCRM. Let me first explain that this 'forum' is a community thing, there is no 'CiviCRM' company which can give you a quote. You can however find a CiviCRM partner with this link: https://civicrm.org/partners-contributors. As you can see on the list there a a few partners based in the UK who might be able to help you. I am part of a partner organization in The Netherlands.

You can configure quite a lot in CiviCRM, but I am not sure what you mean when you say that you want to configure contacts, contributions and events. I can say that there are quite a few charities that do use CiviCRM for contact management, contributions and events so I would expect you should be able to do most of what you want.
> 2 votes

# Answer
To add to Erik's answer I would also suggest that you look at the documentation to get an overview of CiviCRM and see what configuration is possible. CiviCRM is very flexible.
> 1 votes

---
Tags: configuration, evaluating-civicrm
---


title: Wordpress multisite capabilities

text:
# Question
Title: Wordpress multisite capabilities
I'm setting up an association website integrated with CiviCRM (used for membership management among other features).

The wordpress site is a multisite install: a main site, where CiviCRM is active and showing, and a ecommerce subsite where CiviCRM is active but not showing (using the CiviCRM admin tool).

On the main site I'm using capabilities associated with membership types. For example, membership type 1 adds automatically to wordpress users the civimember\_1 capability. Then I use this capabilities to restrict access to some special pages where only active members should be authorized to see.

While on the main site it works great, on the subsite dedicated to the store, those capabilities are not showing. There are a couple of civicrm-related capabilities showing on the groups plugin, but the membership-related capabilities don't and therefore I can't restrict some articles to active members.

How can I do in order to have the civicrm capabilities also on site 2?

From what I read I'm not interested in a multisite CiviCRM as different domains don't mean different groups or organisations, I just want CiviCRM to communicate specific capabilities to all my wordpress sites (they are using the same DB, of course).

Can anyone help?

Cheers João

# Answer
> 1 votes
João: By design WordPress user capabilities are restricted to a single site because many Multisite instances treat sub-sites as entirely separate entities. So in order to achieve what you want, you'll have to:

1. explicitly propagate users and their capabilities to the sub-site(s)
2. propagate the Groups plugin sync to the sub-site(s)

Task 1 is fairly straightforward: you'd use the `civi_wp_member_sync_add_cap` hook to detect when a capability has been added to a user. First add the user to your sub-site(s) with `add_user_to_blog()`, then `switch_to_blog()` and add the capability to the user before switching back to the current site.

Task 2 is a little more tricky. The Groups plugin states that "All features are supported independently for each blog in multisite installations". As a result (as you've discovered) the CiviCRM WordPress Member Sync plugin only syncs capabilities to the Groups plugin on the main site. To propagate that sync to the sub-site, you'll need to use the family of `civi_wp_member_sync_rule_*_capabilities` hooks and sync the capabilities to the Groups plugin instance on the sub-site(s) yourself. If it makes life easier, I can add some `do_action` calls in the relevant places so that you can guarantee that your code will run when expected.

---
Tags: wordpress, civimember, user
---


title: Volunteer Timesheet

text:
# Question
Title: Volunteer Timesheet
I've just installed CiviCRM 4.6 on a HostGator hosted Wordpress site and, I should first point out that the not-for-profit I help and I have been looking for a year for a CRM/BI solution and have come up with nothing. So, finding CiviCRM is a treat. Especially considering how small we are.

But, our greatest asset is our volunteers, both court appointed for community service, as well as kindness of one's heart (food pantry, etc.). I cannot for the life of me figure out where to start with recording a volunteer's time.

Our charity (tituscountycares.org) has about 9 different programs- all of them helping the needy. Some of the recipients may also volunteer. And some volunteers (and donors) may work on 4 or 5 different programs.

Where is the best place to start with a time sheet?

I started trying to install CiviCRM on a Godaddy account, figured out the MySQL trigger restriction, then figured out MyPHP Admin on HostGator, so I can figure this out. If you recommend a professional, please make sure they're free.

Kind Regards- Scott

# Answer
Welcome to the Civi community!

The place you will want to start with volunteer management (including time tracking) is CiviVolunteer, an CiviCRM extension you install to integrate with Civi (here are extension installation instructions). The extension was created by the folks at Ginkgo Street Labs.

They just released the 2.0 version of the extension last month. Here are a couple of blog posts about it. The first has a quick screencast:

They also have a couple of videos from earlier in 2015 that will give you more of an overview of how the extension works --
> 4 votes

---
Tags: civihr
---


# Question
Title: Custom Search Problem - Unknown column contact_a.id in field list when tagging returned contacts
I'm running into almost the same problem that was detailed a couple years ago on the forums at https://forum.civicrm.org/index.php?topic=28829.0. When I run a custom search using the built in Contributions made in Year X and not Year Y search, and then pick Select All Results and select Tag Contacts from the drop down, I get a DB Error: no such field. The full logged error is:

```
Jan 06 16:27:59  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] =>
SELECT     contact_a.id as contact_id
FROM       civicrm_contact AS contact
LEFT JOIN  civicrm_contribution contrib_1 ON contrib_1.contact_id = contact.id

WHERE      contrib_1.contact_id = contact.id
AND        contrib_1.is_test = 0
            AND contrib_1.receive_date >= 20150101000000 AND contrib_1.receive_date <= 20151231000000
GROUP BY   contact.id

ORDER BY   donation_amount desc
 [nativecode=1054 ** Unknown column 'contact_a.id' in 'field list']
    [type] => DB_Error
    [user_info] =>
SELECT     contact_a.id as contact_id
FROM       civicrm_contact AS contact
LEFT JOIN  civicrm_contribution contrib_1 ON contrib_1.contact_id = contact.id

WHERE      contrib_1.contact_id = contact.id
AND        contrib_1.is_test = 0
            AND contrib_1.receive_date >= 20150101000000 AND contrib_1.receive_date <= 20151231000000
GROUP BY   contact.id

ORDER BY   donation_amount desc
 [nativecode=1054 ** Unknown column 'contact_a.id' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT     contact_a.id as contact_id
FROM       civicrm_contact AS contact
LEFT JOIN  civicrm_contribution contrib_1 ON contrib_1.contact_id = contact.id

WHERE      contrib_1.contact_id = contact.id
AND        contrib_1.is_test = 0
            AND contrib_1.receive_date >= 20150101000000 AND contrib_1.receive_date <= 20151231000000
GROUP BY   contact.id

ORDER BY   donation_amount desc
 [nativecode=1054 ** Unknown column 'contact_a.id' in 'field list']"]
)

```

This appears to occur no matter what size the result set is (I had one test set of 1 result, and 1 with 1767), on current versions (I noticed it first on 4.4.19 but I retested on 4.6.10 with the same result), and does occur not just for adding a tag but also for putting them in a group like the original poster describes.

Has anyone found a solution for this or at least a workaround?

# Answer
> 0 votes
I just tried to reproduce the issue in 4.6.11 and wasn't able to; though, it's possible I didn't pick the "correct" criteria. I know there has been some work done on the dynamically created sql, which this is, in more recent releases that might have fixed the issue. I suggest you try to reproduce it in one of the demo databases.

When I've run into things like this before, sometimes, though not always, I can get around the issue by running the query, creating a smart group out of it and then doing an advanced search with the only criteria being the contacts are in that smart group. Then doing the tags or whatever with that resultant set.

---
Tags: drupal, contributions, custom-search
---


# Question
Title: How do I use custom Smarty functions in a Form?
The "Extending Smarty" page at http://wiki.civicrm.org/confluence/display/CRMDOC/Extending+Smarty gives instructions for writing custom php functions and calling them from Smarty templates used in Pages, by using the pageRun hook to add a plugin directory to your template. But this doesn't work for Forms.

For example, a custom function works from the main Case dashboard, but not from the search view when filtering Cases by status.

How do I have the plugin directory included in Forms, not just Pages?

# Answer
Use the config hook instead of pageRun. I originally had this hook in place, as per the example at "Extending Smarty":

```
function civicrm_pageRun(&$page) {
  $template = $page->getTemplate(); // retrieve Smarty template object
  array_push($template->plugins_dir, '/path/to/civi_custom/plugins');
}

```

I replaced that with:

```
function civicrm_config( &$config ) {
  $template =& CRM_Core_Smarty::singleton( );
  array_push($template->plugins_dir, '/path/to/civi_custom/plugins');
}

```

and now I can use my custom Smarty functions from both Pages and Forms.
> 2 votes

---
Tags: smarty
---


# Question
Title: How do I restore a default report template?
Using WP and current CiviCRM. We changed a default Report Template. Is there a way to restore a default report template?

# Answer
> 1 votes
Don't know a way through the UI, but I think you could do it through SQL.

The default reports appear to be defined in `xml/templates/civicrm_navigation.tpl`, which in turn gets copied into `sql/civicrm_data.mysql`.

You might make a new instance with the default settings by copying the definition:

1. Open `sql/civircm_data.mysql` and search for `civicrm_report_instance`. Find the `INSERT` statement which corresponds to your report.
2. Copy the `INSERT` statement into a text editor.
3. Change `@domainID` to `1` (unless you have a special/multidomain system; then adjust accordingly).
4. Open your MySQL tool (e.g. `mysql` cli or `phpmyadmin`) with an appropriate user+database.
5. Paste and execute the `INSERT` statement.

If you want to reset the existing report and know a bit of SQL, then you can massage the `INSERT` and produce an `UPDATE` for the existing report.

---
Tags: civireport
---


# Question
Title: Import custom field to fill duplicate contacts
I am importing two custom fields and an email address (which is used to match up with the contact)

I have 1000 rows and successfully imported 800. The error reason for the 200, was'record duplicates multiple contacts'.

I believe this is because there's duplicate contacts (2 or more contacts with the same email). Therefore I want to import these but fill in the two custom fields into each duplicate contact.

So one row but into multiple contacts with the same email.

Is there a way to do this?

Drupal. Civi CRM 4.5.8

Many thanks in advance, Andy

# Answer
> 2 votes
One way to do it is to place these 200 records in a separate csv and add a column with the CiviCRM contact id and use that as the matching identifier. In that case you would also need to copy the records for each contact with the same email address.

Another one is to do the same, but then use the "external identifier" field as the matching identifier.

Quite a bit of manual work.

All other solutions I see would be with custom coding (or custom import scripts).

---
Tags: import, error
---


# Question
Title: Advance search result does not match with the member report
There is a problem with the Civi Reports. The report feature is not pulling all of the members in each of the categories, when we generate one member report and also generate the same report with the same criteria on advance search but there is difference in the both result. Please check the screenshot.

Ultimately there is a bug somewhere in the reporting feature that is preventing all of the records from showing up when they are queried.

Please let me know is anyone faced such type of issue, if yes then please suggest solution. Looking forward for response on same.Advance thanks to all.

# Answer
> 1 votes
I do see a difference in the search criteria. Not sure if it has an impact on the results.

In the report it looks you also limit on "Group : Rasta Winter Memberships". Would that cause the difference in outcome?

---
Tags: civireport
---


# Question
Title: How to do ab testing on transactional emails?
Some transactional emails have call to action (eg "click here to confirm your subscription") and I'd like to see if I can improve how many actions are taken by ab testing.

Is there an easy way to implement that, eg could I leverage some of the existing features of the ab testing in civimail?

# Answer
What I'm doing right now is to use the contact id to split the contacts into two buckets (if it's odd, group A, even group B).

So in the email, I use smarty:

```
{if $contact_id % 2}
   one of the two texts I want to test
{else}
   and the other test I want
{/if}

```

And measure the result:

```
SELECT count(id) as total, mod(id,2) as bucket FROM civicrm_contact join whatever ... group by mod(id,2);

```

It's a bit of a hack and needs a bit of sql massaging, but seems to work. Do you see any problem using the id % 2 as way to randomly distribute between the groups?

And I'd like to be able to measure open rate and click rate, but haven't quite figured that one yet. Any suggestion more than welcome...
> 1 votes

---
Tags: email, abtesting
---


# Question
Title: Integrating CiviMail tracked links with Google Analytics
I'm in the process of cleaning up our analytics tracking, and I've realised that one of the gaps we have is between the tracked links in our CiviMail mailings and Google Analytics.

The main thing we need to implement is to (remember to) use GA campaigns, but I also wanted to check whether there's anything I'm missing on the CiviCRM side.

One issue is that we have CiviCRM installed on a subdomain without any GA tracking - however, I'm not clear on why the CiviMail tracked links aren't registered by Google Analytics as referrals from the subdomain.

(It may be that there isn't anything I can about this from the CiviCRM and I just need to deal with it from the GA side - I'm happy to close the question if that's the case)

# Answer
It's possible to add tokens to a url - I was concerned that the token wouldn't get replaced before CiviCRM sets up the redirect url for tracking links. I've tested this and the token is replaced first, so it's possible to use tokens in a correctly formatted GA campaign url (using https://support.google.com/analytics/answer/1033867?hl=en ) that's still tracked by CiviCRM.

I haven't done this with a 'real' mailout, just test runs - I've various things to sort out on the Google Analytics end, and will update this answer if anything relevant arises.

Obviously there are privacy issues about sending contact info to Google - I'm probably just going to use the CiviCRM ID, but if anyone has any recommendations about which tokens would add value to GA data, do let me know.
> 2 votes

---
Tags: civimail, links, tracked-links
---


# Question
Title: Can't find a »Back to search results« link on contact pages
When visiting a contact from the results list of a civicrm search, it's possible to navigate forward and backwards through the results set.

Wouldn't it be good to add back-to-list-button which targets the search results list?

# Answer
I totally agree.

Once good way to do this would be to add a breadcrumb link here:

It was fairly simple so I just created a pull-request to add this to the upcoming 4.7 release.

https://github.com/civicrm/civicrm-core/pull/7555
> 1 votes

---
Tags: search, ui
---


# Question
Title: recently viewed items stack: Add a configuration option for MAX_ITEMS in Recent.php
What's the recommended way to make the max item count of civi's recently viewed items stack configurable. Current value ist a constant `MAX_ITEMS` defined directly in `CRM/Utils/Recent.php`.

A quick glance at `civicrm.settings.php` lets me think that this is not the right place – stuff there seems to be more generic/low level.

Maybe it's possible to add a new field in `admin/setting/misc` (`CRM_Admin_Form_Setting_Miscellaneous`)?

So where to put this?

# Answer
> 2 votes
You would need to patch CiviCRM to change this from a hardcoded constant into a setting.

Create a pull-request for this change and the core team will review it and merge it into 4.7.

See http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference

---
Tags: developer
---


# Question
Title: Is there a limit to the number of soft credits you can add to a contribution?
Is there a limit to the number of soft credits you can add to a contribution? If so, is there a way to change the limit?

# Answer
Yes, I see that we have a limit for generating soft credit blocks on the New Contribution Page to 10.

I don't think we can modify this limit from the UI level as it is hardcoded to a value of 10 here. Changing this value to 16 can generate 15 softcredit values and so on:)

Modifying here can result in loosing this feature after upgradation to the latest version.
> 6 votes

# Answer
I also found this CRM-15802 issue in Jira which relates exactly to this discussion and I hope to produce a pull request using Coleman's "cheap trick" idea of using jquery.clone to produce a form with essentially no limit to soft credits.
> 0 votes

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


# Question
Title: Configure what gets added to recent items stack / Where to implement
For my organization it would be nice to define, what types of entities the "recent items" stack holds.

For example the list in the corresponding "recently viewed" widget gets flooded with the same activity entry when composing pdf letters for a group of contacts.

So it would be beneficial if there would be a configuration option to decide which entities/actions to include in the recent items stack.

This is related to recently viewed items stack: Add a configuration option for MAX\_ITEMS in Recent.php and should be treated together.

I'll investigate how to accomplish this, but I appreciate any hint about the more advanced civi programmers would integrate this. Should I add a new configuration form? Should I extend `CRM_Admin_Form_Setting_Miscellaneous`?

Thanks in advance // nielo

# Answer
> 1 votes
No need to extend the class - there's a hook for this, hook\_civicrm\_recent.

# Answer
> 0 votes
For anybody looking for a starting point on how to add settings/configuration options, see @coleman's hint to civicrm's settings reference on https://civicrm.stackexchange.com/a/8694/321

---
Tags: developer, ui
---