# Question
Title: database connection fails, but only in cron
I moved a site - actually copied a production site to a development region.

The site is working in the development region, including CiviCRM, but the CiviCRM cron job fails:

```
Jun 29 16:33:02  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -24
    [message] => DB Error: connect failed
    [mode] => 16
    [debug_info] =>  [nativecode=mysql_connect(): Access denied for user 'hostuser_drupal'@'localhost' (using password: YES)]
    [type] => DB_Error
    [user_info] =>  [nativecode=mysql_connect(): Access denied for user 'hostuser_drupal'@'localhost' (using password: YES)]
    [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::handle prefix="" info=" [nativecode=mysql_connect(): Access denied for user 'hostuser_drupal'@'localhost' (using password: YES)]"]
)

```

I can log into the site as the same user that the cron job is using, and everything works. But the cron job fails, saying that the Drupal database user is denied.

There is a Drupal database and a CiviCRM database. There is a MySQL user for each database. At this point, both users have access to both databases.

Obviously the credentials in the config files *are* correct, since Drupal and CiviCRM work as normal in the browser. But the cron task fails as described above, whether called by cron or by using the cron URL in the browser.

Here is the cron job:

```
wget -O - -q -t 1 'http://somedevsite.com/sites/all/modules/civicrm/bin/cron.php?name=admin&pass=33333333333333&key=44444444444444444444444444444444'

```

What could be going on?

EDIT I switched the cron task to call /civicrm/bin/cli.php directly (via php) and it fails in exactly the same way.

# Answer
> 1 votes
OK, I was being stupid. Typo in the Drupal database password in the CiviCRM config file.

Digging into civicrm/packages/DB/mysql.php and inserting some logging showed that the passwords being used for the Drupal user were just *slightly* different between Drupal and CiviCRM. CiviCRM was adding an extra '@' to the end.

Didn't see it before because due to the CiviCRM config file format, it was a double @ - my eye didn't see the double.

define( 'CIVICRM\_UF\_DSN' , 'mysql://host\_drupal:123456789@@localhost/host\_drupal?new\_link=true' );

# Answer
> 0 votes
Commandline and webserver PHP differ in a few ways.

* They can read different PHP configurations via `php.ini`
* They may therefore have different PHP modules enabled (this doesn't seem to be the problem for you, but might cause CLI PHP to lack the `mysql` module)
* CLI PHP doesn't automatically have the HTTP host populated

IMO the most likely cause is that the relocation to a dev environment has changed behaviour in the last of those, if you're using Drupal's multisite functionality. You might have addressed this for the new dev environment, but not informed the cron task of your changed config.

If so, you can probably address this by -

* updating the cron command to use the dev URL (`drush -l example.dev civicrm-cron`), or
* through Drupal's `sites.php`, or
* symlink `sites/example.dev => sites/example.com` directory (\*ew).

---
Tags: database, cron-job, cron
---


# Question
Title: Scheduled Follow Up activity after creating an event
We wanted to create 2 reminders after creating events within civicrm.

The first is to automatically create a follow-up activity to a particular contact after an event has been create ie pay invoice etc

The second is to automatically send an email to a particular contact X amount of days before the event date and the email to have event tokens like amount of participants etc.

I'm struggling to find ways to do this within CiviCRM or via extensions or modules like CiviRules or the Civi Rules / Civi Entity modules.

Does anyone have any suggestions?

# Answer
You don't mention your CMS, but if you find CiviRules cannot be coerced in to doing your bidding, then if you are on Drupal and add CiviCRM Entity in to the mix, then you can build Drupal Rules which may provide a sidestep solution.
> 1 votes

---
Tags: civievent, civimail, civirules
---


# Question
Title: How can I make a mailing public after it's been sent?
If a mailing has already been sent, how can we make the archive of it public? We didn't set the Visibility to Public when we were sending it. Is there a way to change this retroactively?

Thanks.

# Answer
If you can access the civicrm\_mailing table you could try changing the value in the column = Visibility so it is set to Public Pages, not User and User Admin Only
> 4 votes

# Answer
What you can do is copy and paste the HTML (under the Source button) of the mailing and paste it into one of your website pages (make sure it can accept Full HTML; that it has no text filtering that may strip some of your elements) - and publish it!
> 0 votes

---
Tags: civimail
---


# Question
Title: Civix reports "Failed to locate civicrm.settings.php"
I used the command `civix generate:api Civicrmzapier submit` to an API function to an extension i am working on, but got the following error as on the screenshot and the api function is not added.

> Failed to locate civicrm.settings.php. By default, this tool searches the parent directories for a standard CMS (Drupal, WordPress, etal) and standard civicrm.settings.php. Symlinks and multisite configurations may interfere. To customize, set variable CIVICRM\_SETTINGS to point to the preferred civicrm.settings.php.

# Answer
The `generate:api` subcommand (and a few others) require access to a working copy of CiviCRM.

To locate this, it uses a process reminiscent of `drush` or `wp-cli`. For example, if the command-line is running inside `/var/www/sites/default/files/civicrm/ext/org.example.foo/`, then it will perform an upward search to find the CMS root:

```
/var/www/sites/default/files/civicrm/ext/org.example.foo
/var/www/sites/default/files/civicrm/ext
/var/www/sites/default/files/civicrm
/var/www/sites/default/files
/var/www/sites/default
/var/www/sites
/var/www
/var

```

In each case, it is looking for a tell-tale sign of a CMS+Civi system. For example, in a typical Drupal installation, you'd expect to see the file `sites/default/civicrm.settings.php`.

There are some cases where the default search may not work correctly, e.g.

* Using a new or custom CMS.
* Using a multisite configuration.
* Using symlinks.

The quickest way to resolve this? Don't rely on a search. Instead, tell `civix` specifically where to find your copy of CiviCRM by setting the variable `CIVICRM_SETTINGS`, e.g.

```
export CIVICRM_SETTINGS=/var/www/sites/default/civicrm.settings.php
civix generate:api ...

```

More aggressive ways to resolve this would be:

* Arrange your directory structure so that it looks like a normal build (e.g. replace symlinks with real folders).
* Use `civibuild` for your dev sites. It always produces standard builds.
* Submit a patch for `Civi/Cv/Bootstrap` to add support for your directory structure.
> 6 votes

# Answer
Note that civix does not generate/add anything because it can not find your civicrm.settings.php - that's a configuration issue

Can you e.g.

```
civix generate:api -h

```

Note the option that you can set an environment variable CIVICRM\_SETTINGS pointing to where your civicrm.settings.php is - if needed.
> 0 votes

---
Tags: drupal, api, extension, developer, civix
---


# Question
Title: How to allow an active membership with payment pending?
We want to start recording membership payments, but we also want memberships to become current when the start date hits even if the payment is still pending. Our members are schools paying by invoice, and membership grants the member access to a custom portal.

I have been told status override isn't good enough because it would add steps to the process to set it after entering a membership and to remove it once the membership is paid so that it will eventually expire normally.

I have investigated hook\_civicrm\_alterCalculatedMembershipStatus but this sees what the status would be if it wasn't pending payment- ie already what I want it to be- so I can't change it from pending there.

I'm on 4.4.13 if it makes any difference.

# Answer
For offering membership privileges on your site, you should be able to give the same privileges to pending as current. You should be able to give discounts to pending members too.

Drupal: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMember+Roles+Sync

WordPress: https://github.com/tadpolecc/civi\_member\_sync (this seems to be working correctly on CiviCRM 4.6.6)
> 1 votes

# Answer
You can edit which Membership Status is considered as "Current Membership"

> **\[ \] Current Membership?**
>
> Should this status be considered a current membership in good standing. EXAMPLE: New, Current and Grace could all be considered 'current'.

This option is found under `Administer > CiviMember > Membership Status Rules` when editing a Membership Status there. Although the status "Pending" can't be edited, you can edit the column "MEMBER" inline in the list of status.
> 0 votes

---
Tags: civicontribute, civimember
---


# Question
Title: CiviCRM 4.7.8 error after upgrade on eWay Recurring
I have just upgraded from 4.6.18 to 4.7.8. The upgrade was successful but when I try to open CiviCRM menu items I get the following error:

> Fatal error: require\_once(): Failed opening required 'CRM/Core/Payment/Ewayrecurring.php' (include\_path='.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:/var/www/test/sites/all/modules/civicrm/vendor/tecnickcom:/var/www/test/sites/all/modules/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php:/usr/share/pear') in /var/www/test/sites/all/modules/civicrm/Civi/Payment/System.php on line 59

I can't find reference to this anywhere. Has anyone else seen this issue?

When I reverted to CiviCRM 4.6.18 and then attempted to disable eWayRecurring I got this error:

I have reverted to Civicrm 4.6.18 and when I attempt to disable eWayRecurring extension I get the following error:

> Fatal error: require\_once(): Failed opening required 'CRM/Core/Payment/Ewayrecurring.php' (include\_path='/var/www/test/sites/default/files/civicrm/extensions/com.pogstone.contenttokens/:/var/www/test/sites/default/files/civicrm/extensions/com.cividesk.helptab/:/var/www/test/sites/default/files/civicrm/extensions/uk.co.vedaconsulting.mosaico-1.0-alpha4/:/var/www/test/sites/default/files/civicrm/extensions/com.pesc.sparkpost-1.1/:/var/www/test/sites/default/files/civicrm/extensions/coop.palantetech.nodrilldown-master/:/var/www/test/sites/default/files/civicrm/extensions/uk.co.vedaconsulting.mailchimp/:/var/www/test/sites/default/files/civicrm/extensions/org.civicoop.membershippayment-master/:/var/www/test/sites/default/files/civicrm/extensions/nz.co.fuzion.extendedreport/:.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:/var/www/test/sites/all/modules/civicrm/vendor/tecnickcom:/var/www/test/si in /var/www/test/sites/all/modules/civicrm/Civi/Payment/System.php on line 52

Any help would be appreciated.

Regards Martin Fuggle

# Answer
> 2 votes
It looks like you had at some point set up the eWay Recurring extension. Looked at the list of paths, it doesn't seem to be installed currently.

I looked at line 59 in `Civi/Payment/System.php`, which your error references. It seems like that function is running based on the payment processors you have configured.

The solution is to either: a) Install the eWay Recurring extension it's 4.7-compatible); or b) Go to **Administer menu » System Settings » Payment Processors** and delete your payment processor that uses eWay Recurring.

---
Tags: payment-processor, error, eway
---


# Question
Title: Forgot to make new database for civi... how uninstall?
I installed CIVI but forgot to create a new database just for civi... how do I undo or uninstall and start over?

# Answer
You can remove `civicrm.settings.php` and run the installer again. Here's where to find it:

* Backdrop: `<webroot>`
* Drupal: `<webroot>/sites/default`
* Joomla: `<webroot>/components/com_civicrm`
* WordPress: `<webroot>/wp_content/plugins/civicrm`

Note that this will NOT remove the old tables from your existing database. To do that, see here.
> 1 votes

---
Tags: installation, install
---


# Question
Title: Are custom Dedupe General rules working for anyone?
On CiviCRM 4.7.8/Joomla 3.5.1, I've experimented with variety and can't seem to get this to work. The preset reserved rules, import, inclusive in contact record and main dedupe rules are all working. If I create a new General Rule with just Email set for 10 characters with a weight of 10 and a Threshold of 10 on a group of 10, 50 and 100 contacts in a group with both known and no dupes. Running this rule just runs and runs without any results whether or not the frontend times out to 500 error.

The default Reserved Rules run lickety-split. Please advise.

# Answer
It sounds like you might be running the dedupe on a large database with slow MySQL performance; I've certainly seen this before. The database doesn't even have to be that big; I've seen this on databases with as few as 20,000 contacts.

The pre-set dedupes that can't be edited use a fundamentally different approach to deduping that runs MUCH faster, but it must be hard-coded.

There's an unpublished extension from Veda (see item 1 here; most subsequent items are part of Civi 4.7) that adds a framework for more hard-coded dedupes, along with a large number of extra pre-built dedupes. That may be better for your situation. I'm not sure it's tested on Civi 4.7 though, so try it on a copy of your database first!
> 1 votes

---
Tags: database, duplicate-contacts, rules
---


# Question
Title: SendGrid requires credentials for every login using WP
Just move our site to a new hosting environment. Did not have this problem before. Using CiviCRM with WordPress. Every time we go into CiviCRM we must enter the SendGrid credentials. Any idea what would cause this and how to stop it?

Update: This problem came back. It is an authentication login and it is required. It is part of the Sendgrid plugin for CiviCRM. Wrote to the developer who tells me that this plugin is incorrectly listed as CRM independent - it only works 'properly' with drupal.

The authentication is required for any access to civicrm, including public listing or event registration, etc. Hence Sendgrid Plugin is not viable for WordPress.

# Answer
> 2 votes
This is resolved on its own, not sure why or how but this is no longer happening. If I find more info I will post for anyone else with the same problem.

Update: This problem came back. It is an authentication login and it is required. It is part of the Sendgrid plugin for CiviCRM. Wrote to the developer who tells me that this plugin is incorrectly listed as CRM independent - it only works 'properly' with drupal.

The authentication is required for any access to civicrm, including public listing or event registration, etc. Hence Sendgrid Plugin is not viable for WordPress.

# Answer
> 1 votes
With Reference to the update in your answer: "...Sendgrid Plugin is not viable for WordPress"

We have implemented SendGrid on a number of WP sites, the only problem we were finding was that Bounce Processing was not working. Andrew Hunt forked the extension and added code to make it work with WP (& Joomla I think). Forked extension can be found at: https://github.com/agh1/com.imba.sendgrid \- A pull request was made to the original extension, but I don't think it's been accepted yet.

---
Tags: civimail, extension
---


# Question
Title: Why won't contact ID display in a profile?
I want to display Contact ID as a View only field in a profile. I can add the field to the profile. Other View only fields display properly for a logged in user when they visit the relevant contribution page but the Contact ID field is blank. (The profile displays their name, address and phone number. Phone number is the only field they can edit. They need to make all other changes by editing their Drupal user record.)

I believe I have tried all combinations of **Drupal user account registration option?** and **What to do upon duplicate match** under the Advanced Settings for the profile in case a specific combination was required.

The contact ID does show up in the email receipt, which is the most important part I suppose as the receipt is cc'd to someone who needs that contact ID. However the "empty" Contact Id field on the contribution form will confuse the users.

Does anyone know if/how I can get the Contact ID value to display properly?

(Note: This non-appearance of the contact ID happens on our 4.4.20 installation and also on dmaster.demo.civicrm.org. I have only been able to check the contents of the email receipt on our installation.)

# Answer
Since this is not available in core civicrm, for Drupal users you can have the contact\_id displayed in a Webform : just change the Widget to "Textfield" (in the WEBFORM tab) to make it visible
> 1 votes

---
Tags: profile
---


title: Social Media Links

text:
# Question
Title: Social Media Links
In Civimail we edited one of the inbuilt mail templates. One of the tips is to change the links for the social media icons. We right click on that icon and click on insert link. We put our correct link to our facebook page and save

The link shows. However when sending a test email and clicking on the facebook link, it sends the user to this link: https://crm.arpra.org.au/sites/all/modules/civicrm/extern/url.php?u=8&qid=10

this is not the link we pasted into the facebook icon. There seems to be very little instruction on this in the user guide. Any clues?

# Answer
> 3 votes
The change in link is caused by tracking click-throughs (another setting in CiviMail). When CiviMail is set to track click-throughs, it creates a 're-direct' link on your own server so if someone clicks your link in your mailing, Civi knows that it was actually clicked. If the link went directly to your Facebook page, Civi would have no way of knowing that the link was used.

As for the white screen and error that comes up when you click the link, see email links not working - date.timezone function and CiviMail - when Track Click Throughs is enabled, links result in a white screen with warnings for how to correct it.

---
Tags: civimail
---


# Question
Title: How to get a CiviCRM popup form (eg create new Group / Tag etc) working via a Drupal link
We wanted to let a Drupal user 'create new group' in civicrm without needing to go in to CiviCRM itself.

Clues from here suggested we might be able to do it without using API etc. The suggestion was that

```
 putting <a class="crm-popup" href="/civicrm/group/add?reset=1"> Create a New Group </a> into block body (Full HTML input format)

```

may suffice. It didn't as it seems to require 'something' to initialise civicrm

# Answer
At this point it looks as if putting

```
civicrm_initialize();
$manager = CRM_Core_Resources::singleton();
$manager->addCoreResources();

```

in to a module in hook\_init() does the job.
> 4 votes

---
Tags: drupal, contacts, groups, tags
---


# Question
Title: Smart Group searching event participants not saving
We use CiviCRM 4.7.8. My organization hosts a childrens' activity every year during the summer. For this I created smart groups to see which children are signed up and who of our volunteers have responded/signed up.
As we are preparing for the new event this year, I wanted to update or make new saved searches for this year's event. But when I try to update the smart group's criteria or even when I try to make a new smart group from an advanced search, the criteria get reset to just 'participant is not test' and everything else I selected is removed from the search.
The only way to get my information now is to re-do the searches by hand every time.
I tried to reproduce the issue on the demo site, but was unable to do so. The demo-site however is running 4.7.10, which is not available for download.
I've tried clearing caches to no avail. Can anyone else using 4.7.8 confirm this issue? My search is for contacts that are listed as registered or present in the role of volunteer at a specific event.

# Answer
You can try to use Search Builder to make your Smart Group as a work around for this problem
> 0 votes

# Answer
There has indeed been some work on smart groups fairly recently - check to see if it's fixed in 4.7.9 (by upgrading a stage copy of your site) with one of these release candidates: http://dist.civicrm.org/by-date/latest/4.7.9-rc/

PS demo runs 4.7.10 - which is master so in this case it would be 4.7.9rc + a couple of bits that were not ready to make it into 4.7.9 in time.

**EDIT**: if this issue still persists in the newest release - the next step is to reproduce the issue on the current demo. If you can -\> file a bug report on JIRA. If you can not -\> then this is specific to your instance/config - either continune using the workaround OR find a few hours of time to pay for a consult by a CiviCRM partner in your area.
> 0 votes

---
Tags: smartgroups
---


# Question
Title: Can automatic CiviDiscounts be contact-specific?
I would like to set up automatic discounts for a membership on an individual basis, so that each person's scholarship can be reflected on the membership payment page without any codes needed. It seems like this should be possible using perhaps the contact ID or something along those lines, but I haven't yet hit upon the correct setting for it. Is this possible, and if so, how would I go about doing it?

I'm using Drupal 7, CiviCRM 4.6.18, & CiviDiscount 3.2

# Answer
> 1 votes
I'm thinking:

* store the scholarship amount into a custom field.
* pull it up on the event registration (or contribution/membership) page and use a PHP hook to calculate the balance due.
* this hook lives in a small extension and uses the civicrm\_buildAmount hook - just like CiviDiscount does.

# Answer
> 2 votes
This is possible, but you need to know how to address the API using JSON. Also, if you select contacts by name, you're going to need a different discount per contact. Using a custom field might be better.

Also note that this requires that the person filling out the contribution form be logged in!

Attached please find an example of a CiviDiscount configuration that gives a 50% discount to anyone with a last name of "Smith". Check out the API Explorer if you need help with field names or syntax.

# Answer
> 1 votes
You can accomplish this using the webform-civicrm module. Simple enable 'existing user' for contact 1 in your form and use conditionals to define the price field based on the contact name.

---
Tags: drupal, civimember, cividiscount
---


title: Get current contact id?

text:
# Question
Title: Get current contact id?
I display the summary page for a civicrm contact and I need to get the current contact id. Is there any built in function for that?

I have this code where I explicitly refer to the civicrm id 4. Instead of doing that I would like to refer to the current civicrm contact.

```
$contact_id = 4;
$custom_name = array("custom_2","custom_3","custom_6","custom_7");
$params = array(
        'return' => $custom_name,
        'version' => 3,
        'id' => $contact_id,
);

$result = civicrm_api( 'contact','get',$params );

```

# Answer
> 9 votes
If you are on the contact summary screen, then the contact id is always `$_GET['cid']`. To give yourself peace-of-mind about using raw input, cast it to an integer.

```
$contactId = (int) $_GET['cid'];

```

# Answer
> 18 votes
The answer davejenx is correct but no longer considered best practice. Instead use:

```
CRM_Core_Session::singleton()->getLoggedInContactID();

```

# Answer
> 7 votes
*Edit:* The techniques below get the *logged-in user's* contact id. However the questioner has clarified that this isn't what they meant by "the current contact id". I'll leave this answer in place in case it's useful to someone else who misunderstood the question. Here's a simple way:

```
CRM_Core_Session::singleton()->getLoggedInContactID();

```

The above (for which thanks to Jon G) replaces this older technique:

```
$session = CRM_Core_Session::singleton();
$contact_id = $session->get('userID');

```

You can also do it by getting the user id from the CMS (Drupal / Wordpress / Joomla), then using the CiviCRM API to get that user's UFMatch record, which gives you the contact id.

---
Tags: api
---


title: Cannot find import in menu

text:
# Question
Title: Cannot find import in menu
I am running 4.7.8 but cannot find the option to Import from CSV for multiple choice options under a custom field - is this possible?.

Any assistance would be appreciated.

Thanks

Steve

# Answer
For the updated question of how to import custom field multiple choice fields, see How to import to multi-record set custom fields
> 3 votes

# Answer
It depends on what you're importing. You can find 'Import Contacts' and 'Import Activities' in the Contacts menu. 'Import Contributions' is found in the Contributions menu. 'Important Participants' in the Events menu.

You can specify the terms of your import on those screens.

See Importing Data into CiviCRM and Importing Data for information on the importing process in Civi.
> 1 votes

---
Tags: import
---


# Question
Title: Authorize.net Automatic Recurring Billing (ARB) has stopped working
We have been running with Authorize.net for long while now. This past January I setup ARB for membership renewals, and it was working great. We have numerous ARB subscriptions since then. Then, 2 weeks ago, they stopped working.

The membership transaction processes in Authorize.net, but it does not create the ARB subscription. Also, the contribution in CiviCRM stays at Pending, and never is moved to Completed.

The setup in Authorize.net hasn't changed. The Silent Post URL is set properly. Other non-ARB transactions are working properly.

I am at a loss as to what has happened to cause this to stop working. Does anyone have any thoughts on this? Any ideas would be appreciated.

CiviCRM 4.7.8, Joomla 3.5.1

# Answer
> 2 votes
All the payment processors have been tightening up security, especially with regards integrations between systems.

My first inclination would be to check if the SSL postback that Authorize.net uses has the correct secure protocols set up. Specifically, you should be sure that your server is configured to accept TLS 1.2 connections. Check with your hosting provider if necessary.

If this fails to help, I would recommend that you reach out to Authorize.net to see what information that may have in their logs with regards to the failure.

---
Tags: civimember, joomla, authorize.net
---


title: Where/how to save global variables?

text:
# Question
Title: Where/how to save global variables?
We want to store some global variables for token substitution in civicrm. Think of adding current members of board of managers to letters or other phrases to use in mailings or pdf letters.

Example: token

`{board_members}`

should be substitued by

`Jane Doe

Jim Jones

Bud Foo

Frieda Bar
`

Any idea how to store (editable by our staff)? Or should I misuse message templates to store the content? Say I'll create a message template "Board members (don't use as template)". Or an inactive message template?

# Answer
> 2 votes
Creating custom tokens is fairly easy in CiviCRM.

I would create a Group in CiviCRM containing the contacts of all the Board Members. By using a Group, as the Board Members change and are updated in the Group the token will automatically reflect the changes.

Then I would program a custom token that converts `{board_members}` to a list of the names of the contacts in the Group (separated with `<br />`).

The link in @Ramesh's answer should help.

You could probably kludge together a solution using templates or something similar, but it is probably more likely to break and more difficult to upkeep.

# Answer
> 0 votes
you can create tokens to do the same job - instead of using Global variables

that would be more easier than storing in global variables - I guess

please refer to Custom fields for invoice / PDF

I guess this helps !!!

---
Tags: tokens
---


title: Cannot find the Contact Dashboard

text:
# Question
Title: Cannot find the Contact Dashboard
I am running 4.7.8 on Wordpress and cannot find the Contact Dashboard. I see Dashboard for Contributions, Events and Mailings but not under Contacts.

Thanks

Steve

# Answer
> 2 votes
Steve - there is not a Dashboard per se just for Contacts as there is for Contributions etc. If there was, what would it be showing in your opinion in case that clarifies your question enough to point you to what does exist.

# Answer
> 1 votes
Another solution that gives you an instant 'let's see our Contacts is to just click in the QuickSearch (top left - white box) and hit Enter.

In that single click you get the 'Advanced Search' outcome of 'see all contacts' in A-Z order. If you create a Profile that has fields in that you would prefer instead of what is shown as default, you can then set this as your your default view in Admin \> Customise \> Search Preferences ie at civicrm/admin/setting/search?reset=1

---
Tags: contacts, dashboard
---


# Question
Title: Is there functionality in CiviCRM for tracking the results of a fundraiser?
In a recent fundraiser we got a group of people to sell food for a place and wrote down the orders, for who ordered them and who sold them.

Is there any sort of functionality in CiviCRM for tracking these metrics?

# Answer
> 3 votes
Check out the soft credits functionality!

https://book.civicrm.org/user/current/contributions/soft-credits/

# Answer
> 1 votes
This sounds like a good use case for a custom Activity. You can create one via Admin \> Customise \> Activity Types.

If you need custom fields, then you can create these and add them solely to the above Activity Type (eg number of cakes, number of pies).

You can then use Reports (or Drupal Views) to construct a summary of how many such Activities, who they were assigned to, and how many cakes were ordered.

That may not quite be the recipe you are after but may point you in the right direction.

---
Tags: fundraising
---


# Question
Title: Email-to-activity processing - not working
I'm having trouble getting the email to activity processing to work. (Wordpress 4.4.4 and Civi 4.6.4) I keep getting this error:

```
Could not connect to MailStore for XXX@domain.org@imap.gmail.com<p>Error message: <pre>An error occured while sending or receiving mail. Failed to connect to the server: imap.gmail.com:993.</pre><p>

 $backTrace = #0 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(322): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Utils/Mail/EmailProcessor.php(184): CRM_Core_Error::fatal("Could not connect to MailStore for xxxx@domain.org@imap.gm...")
#2 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Utils/Mail/EmailProcessor.php(111): CRM_Utils_Mail_EmailProcessor::_process(FALSE, Object(CRM_Core_DAO_MailSettings))
#3 /myfolder/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(379): CRM_Utils_Mail_EmailProcessor::processActivities()
#4 /myfolder/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_fetch_activities((Array:1))
#5 /myfolder/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(96): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#6 /myfolder/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->run("job", "fetch_activities", (Array:1), NULL)
#7 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(131): civicrm_api("job", "fetch_activities", (Array:1))
#8 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(110): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#9 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php(155): CRM_Core_JobManager->executeJobById("3")
#10 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(178): CRM_Admin_Page_Job->browse(NULL, NULL)
#11 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php(140): CRM_Core_Page_Basic->run()
#12 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Admin_Page_Job->run((Array:3), NULL)
#13 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#14 /myfolder/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#15 /myfolder/wp-content/plugins/civicrm/civicrm.php(1189): CRM_Core_Invoke::invoke((Array:3))
#16 [internal function](): CiviCRM_For_WordPress->invoke("")
#17 /myfolder/wp-includes/plugin.php(525): call_user_func_array((Array:2), (Array:1))
#18 /myfolder/wp-admin/admin.php(236): do_action("toplevel_page_CiviCRM")

```

We use google apps to host our mail and I've read through the posts on here already regarding that set up. I don't think it's google apps that's tripping things up. I get this same error message with any email set up I try. Here's what I've done to try and narrow down the problem - all of these result in the same error "could not connect to MailStore"

* Used emails hosted through GoDaddy and Hostmonster.
* Tried both IMAP and POP3 settings
* Turned on and off SSL
* Cleaned the email accounts I was testing (i.e. they only had one or two emails in the account)
* To see if a different error would populate, purposefully used the wrong password.

Can anyone suggest what I might need to look for? I'm not sure I know what the rest of the backtrace means....

Thanks!

# Answer
Sounds like firewall is blocking port 993. Do you use outlook or a desktop email program with imap? Does it work there? Do you know how to use telnet to test - can you telnet to port 993?
> 1 votes

---
Tags: civimail, activities
---


# Question
Title: Unable to change contribution status using API
I am attempting to update a contribution's status but I am getting the error "Cannot change contribution status from Pending to In Progress." I am doing this through the API. I understand there may be some specification bug where In Progress is intended for pledges, not contribution's -- but I can't think of any better way to represent the data I am getting using the available contribution statuses :-S In Britain, a contribution or payment of any kind can have multiple states and frequently goes through multiple state changes. I understand this is different to, say, the US system which I have limited experience of. I am using the contribution status 'Pending' to mean "The direct debit mandate has been created (but not submitted by the payment gateway to the banks)". I am trying to use the contribution status 'In Progress' to mean "The direct debit mandate has been submitted to the banks (but not yet paid)" I believe this is in keeping with expected behaviour for these terms in this context.

# Answer
> 1 votes
For the why on restrictions - see: Reasons for restricting changing contribution statusses?

I'm co-maintaining the iATS extension and we're doing Uk direct debit - so I hear you. And I also have a status = Returned that I need to be able to get in for North American ACHEFT processing. ACHEFT here can go from Pending -\> Completed -\> to Returned. And Returned is not a refund. It's also not quite a Canceled either.

---
Tags: civicontribute, api, contributions
---


# Question
Title: Track contacts who attended more than 1 event
Is there a way to track contacts that have registered for more than 1 event within the past 12 months? Either through reports or smart groups or any other way?

# Answer
> 3 votes
You can easily GROUP BY and COUNT() in mysql - do you have access to mysql? If not you can also put this in to a CiviCRM custom report.

Here's the query:

So below contact\_id 2309 participated in 5 events; contact\_id 3186 in 2 etc.

```
    mysql> SELECT contact_id, COUNT(*) from civicrm_participant GROUP BY contact_id HAVING COUNT(*)>1
+------------+----------+
| contact_id | COUNT(*) |
+------------+----------+
|       2309 |        5 |
|       3186 |        2 |
|       3568 |        2 |
|       5820 |        2 |
|       7007 |        3 |
|       7045 |        3 |
|       7048 |        3 |
|       7083 |        3 |

```

# Answer
> 1 votes
In Drupal you can build Views with Aggregation, which could provide you a list of names and 'count' of events they have attended. Not certain about ability to filter or sort on that value though.

---
Tags: contacts, reports
---


title: Contact id as an URL Argument?

text:
# Question
Title: Contact id as an URL Argument?
I have developped an external php program to generate a customized contact data-sheet (pdf).

This program must be run from a Civi Page via an URL which requires the current Contact\_id as an argument, in the following way :

https://www.mysite.com/fpdf/myprogram.php?contact=***current contact id***

How can I get and must I parameterize this ***current contact id*** ?

As an alternative, I could use the Current Drupal User-Id instead of the Civi Contact-Id (the user is supposed to be authenticated, and I know how to convert user to contact)

# Answer
> 1 votes
Extention is probably the best and right way to do it : I have seen that the API is able to get the Contact Id.

I have to learn how to make an Extension.

Thanks to all of you for your answers

# Answer
> 1 votes
Another is convert your external program to an extension, then make api calls.

# Answer
> 0 votes
One way is use a drupal view with a field with the link in it since you can access user id from view fields. Make it a block if you need it to be on a specific page.

# Answer
> 0 votes
If you developed an external program I would highly recommend you to put this in a CiviCRM extension. How are you accessing your program? You could easily add a button or link to the page with your extension which then includes the contact\_id?

---
Tags: contacts, urls
---


title: How to Create a New Participant Profile

text:
# Question
Title: How to Create a New Participant Profile
I want to create a new Participants Profile which includes Participant custom fields. How can I do that ?

The only way I see is by copying/renaming the "reserved" Participant Status Profile, and adding my custom fields ; but I can't remove the Participant Status field from it, nor disable the original "reserved" Participant Status Profile.

So, when I want to multiple update (Action) some selected participants of an Event Search, I have the choice between those 2 Profiles which both contain the same Participant Status field (which is confusing).

As an alternative, how can I remove the "Participant Status" profile from this choice ?

# Answer
"When you create a profile, it is the fields that you select that determine what the profile type is"

Thank you Tamar, I did not realize that
> 0 votes

# Answer
You should be able to go to Admin \> Customise \> Profiles, then Add Profile, then add some Participant fields

There is a short lived example here http://d46.demo.civicrm.org/civicrm/admin/uf/group/field?reset=1&action=browse&gid=16
> 1 votes

# Answer
When you create a profile, it is the fields that you select that determine what the profile type is - you mention that you have custom data that you want to update, the custom data set must be designated for use for participants - all fields in the profile must be of type participant for the profile to be available for updating multiple participants.

Hope this helps, Tamar
> 1 votes

# Answer
It is not recommended to make changes to reserved profiles since they are most likely in use by the code for certain "under the hood" actions that the system performs, but if you have a developer on hand, they should be able to disable it under the hood if they deem that it does not affect anything that you need for your daily operations.

Alternatively, you could create a completely new profile and call it "Update Participants" so that it is easier to differentiate from the reserved Participant Status profile.

Hope this helps, Tamar
> 0 votes

---
Tags: civievent, custom-fields, profile
---


# Question
Title: Several contributions generated after paypal payment
I have just update to civicrm 4.7.8 But now i have a weird problem on contribution when order are made with paypal. Several contribution are created and one are refunded. This issue is for all new contribution payed by paypal. You can see that the total of the contribution is 0. Could you please help me ?

# Answer
This may not be specific to PayPal - I think it may be related to a bug that has been resolved in the latest release candidate:

http://dist.civicrm.org/by-date/2016-06-26/4.7.9-rc/

Should not be long before it's out.

Here's the JIRA issue on that: https://issues.civicrm.org/jira/plugins/servlet/mobile#issue/CRM-18661
> 1 votes

---
Tags: contributions, paypal
---


title: Where is include_path set?

text:
# Question
Title: Where is include_path set?
I try to get rid of this persistent and annoying warning message:

> Warning: is\_dir(): open\_basedir restriction in effect. File(/usr/share/pear/api/v3) is not within the allowed path(s): (/var/www/civicrm/htdocs:/var/www/civicrm/apps:/var/www/civicrm/priv:/var/www/civicrm/tmp:/usr/share/php:/tmp) in Civi\API\Provider\MagicFunctionProvider-\>getEntityNames() (line 106 of /var/www/civicrm/htdocs/drupal/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php).

getEntityNames gets the /usr/share/pear path from the get\_include\_path(). Where is the /usr/share/pear coming from? The path does not even exist on my Ubuntu 14.04 system. I have been looking everywhere. CiviCRM runs under Drupal, Apache and PHP fastcgi.

# Answer
`open_basedir` is a PHP setting that limits which files can be accessed by PHP for processing. Its default value invariably is not set to work with CiviCRM and the general recommendation is to disable it.

To disable it, in the httpd.conf file add a php directive: `php_admin_value open_basedir none`.

More details can be found here: http://php.net/manual/en/ini.core.php#ini.open-basedir
> 1 votes

# Answer
I found my own preferred solution.

The default *include\_path*, when not set elsewhere, is in my case *.:/usr/share/php:/usr/share/pear* It is determined at compile time. It can be overridden everywhere also in the script civicrm.settings.php where it is changed for CiviCRM's purposes:

```
$include_path = '.'           . PATH_SEPARATOR .
                $civicrm_root . PATH_SEPARATOR .
                $civicrm_root . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR .
                get_include_path( );

```

As you can see the compiler default is appended.

Knowing where it is set. We also can find the best solution.

In my case I can simply insert this:

```
set_include_path('.'.PATH_SEPARATOR.DIRECTORY_SEPARATOR.'usr'.DIRECTORY_SEPARATOR.'share'.DIRECTORY_SEPARATOR.'php');

```

in civicrm.settings.php somewhere before the previously quoted code. That will remove path that does not exist and does not appear in open\_basedir.
> 1 votes

# Answer
Sounds like it's guessing the path; Have you tried explicitly adding paths to your civicrm.settings.php

For your CMS path: define CIVICRM\_CMSDIR

and double check the: CiviCRM\_UF\_BASEURL
> 0 votes

---
Tags: error, php, configuration
---


# Question
Title: Modifying Contribution and Event Templates
I am trying to modify the confirmation and final page (not sure of the name) for contributions and events. I want to modify the templates like described in this post - Why does the Contribution page amounts appear as a quanity?.

A few questions:

1. How do I find what template to modify?
2. How do I know where to put the custom template?
3. Is it best to just modify the template or to put this in an extension? I already have an extension with some simple JS.

I appreciate the help.

Thanks!

# Answer
You're looking for the Confirm and ThankYou templates - they live here - for Contribution pages (and tree structure is very similar for Event):

Two options to override them:

1. add a custom\_templates directory in the System Settings -\> Directories - mimic this entire three.
2. or yes put it into your extension! I like that option better as I tend to forget about custom\_php and custom\_tpl when I upgrade sites. Same thing - in your extension -\> copy the entire tree starting with templates - of course rename everything. Perhaps you already used civix to create your extension? Then you should already have a templates/ directory ready to be used!
> 1 votes

---
Tags: civievent, civicontribute, extension, templates, custom-templates
---


# Question
Title: Allow WordPress Users To Edit Own CiviCRM Record
I think I am missing something simple. I would like for a user to be able to edit their own CiviCRM record after logging into WordPress. I have used a Short Code for the dashboard but there is not an edit link on the dashboard. I appreciate the help in making this work.

Thanks, Steve

# Answer
> 2 votes
I am not completely sure on how to do this. But in Civicrm you can create profiles. A profile has multiple purposes and one of them is an input form for editing contact data. You can then insert this profile into a WordPress page

---
Tags: wordpress
---


# Question
Title: Pay Later option not displaying on front end when Paypal option
Joomla 3.5.1 - Civicrm 4.7.8

I have created a Contribution page (plus a profile with some custom data in it) and wanted to give option to pay later. However, the Pay Later option is not showing on front end whilst the Paypal option is displayed. However, if I remove the option to use Paypal, then the pay later option appears (though with a permanent x in box which cannot be unselected).

I have attempted to replicate on demo site (which is older version - 4.6) and when I choose pay later option it does not display on front end either. However, I cannot remove option to pay by paypal (sandbox) as that breaks the page. So cannot see if pay later would show without paypal.

So, 2 problems 1) pay later not showing with paypal option available -

2) Permanent x in box of pay later when it can be seen on the front end after removing paypal option.

I think this may be a bug but not certain. Wanted advise first.

# Answer
Looks like there is a history of issues with pay later an pay pal express - there is a ticket on JIRA that sounds like it might be related to what you are reporting can be seen here: https://issues.civicrm.org/jira/browse/CRM-18118

Hope this helps, Tamar
> 1 votes

---
Tags: civicontribute, joomla, paypal, paylater
---


# Question
Title: How can i redirect a user to the PCP link once they login
I have added a note to the top of **create a PCP page** on the thank you event page.  I have added this note in the custom template file ThankYou.tpl. For "here" i have added a href= /user, however if they login it just shows only the account information. How can i redirect user to access the PCP pages once they login. Please help, I am a newbie and do not know much about smarty template customization and CiviCRM. BTW site is Drupal 7.

# Answer
You wont be able to redirect back to the thank you page, as the thank you page URL is dynamic (with \_qfkey, etc.)

**Alternative solution:**

You can use the URL of the create personal campaign page as the destination after login.

In the href for the login page, you can use the below

```
please go <a href="/user?destination=%2Fcivicrm%2Fcontribute%2Fcampaign%3Faction%3Dadd%26reset%3D1%26pageId%3D1%26component%3Dcontribute">here<a> to login

```

Note: The value for 'destination' query paramater should be encoded for the redirect to work correctly for any CiviCRM URLs.

So after login, the user will be redirected to the create personal campaign page directly. This will also avoid an extra button click in the user journey you are expecting (i.e after login redirect back to thankyou page and then the user click 'Create personal campaign page' button which then takes the user to create personal campaign page.

Hope this helps.
> 1 votes

# Answer
You can enable PCP in the Contribution/event page setup

also please refer to the below link for creating own PCP page in the thank you page https://book.civicrm.org/user/current/contributions/personal-campaign-pages/

Please click this link for example http://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2

I guess this helps
> 0 votes

---
Tags: pcp
---


# Question
Title: How do make an ACL to allow the searching of contacts in a smart group?
I want to allow someone to send email to a group.

So I'm trying to set up an ACL to allow for the searching for contacts in this group. In the ACL definition dialog I'm choosing the 'search' operation and for type of data, 'a group of contacts'. But I'm getting an error, "Only 'View' and 'Edit' operations are valid for this type of data."

It seems like this should be possible...but I don't understand the reason behind the error message.

Can anyone shed some light on how to do this?

Thanks

# Answer
You can use 'View' operation on the group of contacts. This will restrict the ACL role to search and view only the contacts in the group which you specified.
> 1 votes

---
Tags: email, search, acl
---


# Question
Title: Embedding a listing or directory with variables
I need to create a public list from civicrm. That part is straightforwards. A profile with shortcodes into WP would work. But the list needs to be filtered by country. So it is not practical to have a profile for every country. What is the best way to embed a public list in a WordPress page based on a profile combined with a variable for country?

# Answer
Add/edit 'Country' field to the profile and make is searchable.

This will allow you to filter the results based on country in the directory listing.

Demo: http://civi.intdms.com/civicrm/profile?gid=14&reset=1&force=1
> 2 votes

---
Tags: wordpress, profile, directory
---


title: Group contact cache deadlocks

text:
# Question
Title: Group contact cache deadlocks
I have tried to activate the job specified in an entry in Eileen's blog but get the following error.

# Answer
Check the new release, I think it has a fix included for this issue: https://civicrm.org/blog/yashodha/announcing-civicrm-4619-and-479-release
> 1 votes

---
Tags: smartgroups, cache
---


# Question
Title: After upgrading to 4.6.18, cannot enter credit card details in event registration
We just upgraded our site at www.fremantlechamber.com.au to the latest version of Drupal and CiviCRM 4.6.18

Now when we try to register for an event, the credit card details are not appearing and noone can pay for registration.

Please help

Thanks

# Answer
I had a look and can you entire billing block is indeed MIA.

**Two thoughts:**

1) get into the Event Registration Config and try re-adding the Payment Processor - re-save

2) check for errors in your ConfigAndLog/ when you load this form

EDIT - more thoughts:

3) check the Payment Processors their config - and create a (Test) Contribution page where you run a transaction with a fake credit card

4) (in general) check the Manage Extensions screen and look if there are any upgrades for your Payment Processor (of course this only applies to those which are not baked in core)
> 1 votes

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


# Question
Title: Is there a way to integrate CiviCRM with Ticketspice.com and other Event ticketing platforms like Eventbrite?
We're on Civi 4.6.17 and Drupal.

We're using ticketspice.com for an Event ticketing page, mostly because I have not figured out a way to create an Event registration page in Civi using the Discount codes extension. Our Ticketspice event registration page is here.

Has anyone created an integration between Ticketspice event pages and CiviCRM, or Eventbrite event pages? I have not had a chance to check out either the Ticketspice or Eventbrite APIs or webhooks.

UPDATE: We're using Authorize.net to process payments for tickets purchased on the Ticketspice event page, and it seems like there should be a way to pull in that data from Authorize to Civi. We also use the same Authorize account to process contributions, event fees/tickets made through Civi pages and price fields.

# Answer
> 2 votes
Much easier to get Events working in CiviCRM and/or with CiviDiscount than to API integrate a third party ticketing system! You'd have to think about how to handle duplicate Contacts, get the monies right - where are any refunds being recorded etc.

Where are you stuck with Events in CiviCRM w/ CiviDiscount? What version of CiviCRM? Post a question on it - and we'll try help you out.

---
Tags: civievent, civicontribute, payment-processor, developer
---


# Question
Title: How do you add activity types to scheduled reminder dropdown
I would like to trigger scheduled reminders based on activities of type "contribution". Only 8 of many activity types show in the dropdown on the scheduled reminder create page - is there a way to expose more options here and trigger off more activity types?

# Answer
> 3 votes
All (most?) activity types are exposed as options in scheduled reminders in 4.5 and 4.6. "Contribution" certainly is.

If you are still on 4.4 and don't want to upgrade yet then this forum topic may provide a way to do what you want.

# Answer
> 0 votes
It's worth noting that as of CiviCRM 4.7 you can schedule reminders based on the contribution itself, which allows you to use the contribution tokens in the reminder.

---
Tags: civicontribute, activities, scheduled-reminders
---


# Question
Title: Need help setting up Scheduled Reminders
I want to use the Scheduled reminders to send emails to all members who are not already members for the upcoming membership cycle. We have a fixed membership cycle that begins on September 1 each year. But we accept memberships starting on June 1 for the new cycle since we don't want people paying for only 1/4 year worth of membership. Anyone joining on June 1 or after will be listed as a member for September 1, 2016 - August 31, 2017.

On August 1 I want a scheduled reminder to go out to members who are not yet paid for 2016/17. Not sure what settings to use. I also want to send another message on September 1, October 1 and December 1 throughout the membership enroll season.

Anyone willing to help me with this? I'm not a programmer. I am just a board member who unfortunately agreed to be Treasurer and in charge of memberships. Ugh! I have one Scheduled reminder set up but not sure at all that the settings are correct.

Thanks if you can help me with this.

# Answer
> 2 votes
That depends on how you record your renewals. The "correct" way to renew a membership doesn't create a second membership, but changes the end date on your original membership. However, that's not workable for many organizations for a variety of reasons.

However, if you do renewals the "correct" way, then you could set your August 1st scheduled reminder to go out 1 month before the membership end date. See screenshot. October 1st can be one month after membership end date, and so on.

# Answer
> 1 votes
You could use CiviMail rather than scheduled reminders.

Create a smart group of existing members and another smart group of those who have paid membership fees since 1 June.

In Civimail the recipients list should include the group of existing members and exclude the group who have already paid for next year.

You then create your email and run it on 1 August.

Reuse it on 1 September and 1 October etc.

---
Tags: scheduled-reminders
---


# Question
Title: Webform contribution for multiple items?
In a webform, I want to offer a selection of prices and quantities (like a simple price set).

For example:

```
  Thing A  $10  [quantity box]
  Thing B  $20  [quantity box]

```

I've added a Contribution on the webform and ticked the box to add the contribution amount to the form. It seems like it should just be a matter of changing the widget type for the contribution amount to the right thing ... but I haven't found the right widget :-(

'Select options' lets me select 0/1 of each item, but not a user-entered quantity.

What widget type will do that? Alternatively, any other suggestions for structuring the webform to achieve this?

\[I want to use a webform for its other features that I don't get with a priceset and contribution page.\]

(Drupal 7, CiviCRM 4.6.18)

# Answer
How about something like this:

1. Finite quantities for each item (if you have too many - make them select lists).
2. Calculate the Contribution Amount w/ some jQuery - \[just like on CiviCRM contribution pages\] - OR - if you don't have too many combinations - you can do this via Webform Conditionals - so no code required.
> 2 votes

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


title: Recurring Memberships

text:
# Question
Title: Recurring Memberships
We have been struggling with the membership facilities in CiviCRM because we have been unable to find a way of allowing members to pay their memberships in instalments. We are using Drupal 7.x, CiviCRM 4.6.x and the eWay payment gateway. We wish to adopt the eWayRecurring extension to CiviCRM. Ideally we would like to do the following:

* Allow members to pay their membership fees in a predefined series of payments. For example if the membership fee is $300 we would like to allow members to make an initial payment of say $100 and then make 4 monthly payments of $50.00
* We are comfortable that the initial payment updates their membership in accordance with the membership type. In our case for the fixed period of 1 year starting on 1st January.
* Subsequent payments would have no impact on the status of their membership but it would be good if they were 'linked' to the membership, however not critical.

My thinking was to create a Membership Price Set which contains the membership component and separately a recurring contribution to pick up the additional payments. The problem is that it does not seem possible to pre populate the recurring payment with the parameters required and prevent them from being altered by the user.

Is this possible or is there a better way that others have adopted?

# Answer
> 1 votes
I don't have any idea about eWayrecurring extension

we did something similar and our base extension was https://civicrm.org/blog/andyw/offline-recurring-payment-extension

offline-recurring-payment-extension - this extension was creating contribution for a contact which we altered to link with membership

The process which you have explained will create multiple contribution for a single membership

Other way of doing the same would be

Using partial membership which will allow multiple payment for a single contribution - that involves bit more development - still to come in core

I guess this helps !!!

---
Tags: civimember, recurring-contributions
---


# Question
Title: How do I manually update External Identifier
I want to do a contributions import using a spreadsheet exported from Go Cardless.

When matching this info to contacts in Civi, 'External Identifier' is a mandatory field. I want to override what exists there as not everyone currently has an External Identifier, using data from Go Cardless.

How do I do that?

Thanks!

# Answer
If you don't have 'External Identifier' for everyone yet - do a Contact import first!

**Contact import:** Include the data fields used for contact "matching" based on your configured Duplicate Matching rules. For the default duplicate matching rules, you would include 3 columns in each row with the contributors' First Name, Last Name and Email Address.

Your main Goal here is to find the Contacts in your Database and add an 'External Identifier' for them (and these come from your Go CardLess)

**Contribution import:** Very straightforward now that everyone has an 'External Identifier' - you can even now dump the name fields; all you need is 'External Identifier' and the contribution data columns.
> 2 votes

---
Tags: import
---


title: Stats on website

text:
# Question
Title: Stats on website
Is it possible to get stats on the number of members and push them to a webpage so that they are always updated? Is there some extension that might do it?

# Answer
> 4 votes
If you're using Drupal, you can use Views with its aggregation to handle this. I helped someone do pretty much exactly this. I also used the "Views Field Views" module to show a bunch of aggregated stats all in one view.

# Answer
> 3 votes
That's CMS specific -\> For Drupal you could write a small module that has a query that pulls the count from the CiviCRM database using mysql -\> creates a block for it -\> which you can then place anywhere on a Drupal site on the blocks configuration page.

---
Tags: civimember
---


# Question
Title: Display all Contributions with event, membership etc details
Excuse me if I'm probably missing something obvious here... Civi 4.6.18, Drupal 7.44

I want to build a simple report that shows: Contribution fields, Contact name, Event name (if it came from an event), Membership type (if it came from a membership), etc. In one row.

Our finance team want to see all payments every month, and want to quickly see exactly what each payment was for.

It doesn't matter if some fields are blank - eg if membership fields are blank in a row that is about an event contribution.

I can't see a way to do this in Civi Reports, so turned to Views starting with the Contribution entity.

But I can't see a way to create a relationship to Participants in Views.

And I can make a relationship to memberships, but only if the payment is recurring. That doesn't cover all our membership possibilities.

Surely this would be a fairly standard report, so I'm wondering what to do? Thanks for your help!

**24-8-16: Editing this to add more info:**

If you create a View based on Civirm Contributions, in fact Membership details are in the fields available to the View. So that's half the story.

However, Participation fields are not available. Neither can you add a relationship to anything that looks like Civicrm Event tables. This is so after adding a relationship to the Contact ID.

So, if payments are made for events, there is no way to link the contribution to the event it is for, if you are starting from the Contribution table.

And if that is possible, the next question would be (with the advent of partial payment processing), if a part payment is made for an event, is there a way in Views to see the individual part payments?

If there was a bridge from the contribution table to event table(s) then we'd have our solution: a View that can show what payments are being made for, if they are membership or participant contributions.

Thanks again.

# Answer
The first thing to do when looking for more reporting functionality is to add:

https://civicrm.org/extensions/extended-reports

That extension will give you a lot more and a lot more detailes reports to work with!

If you still can't get all the details you'd like in it - then you'll need to make some edits in code (create a fork of this extension).
> 1 votes

# Answer
Using the CiviCRM Entity module provides you with the ability to connect a large number of CiviCRM entities (including Contributions) to Drupal. That then makes them available to Views as fields, filters and relationships.
> 1 votes

---
Tags: civicontribute, civireport, drupal-views
---


title: CiviContribute "Held For Review"

text:
# Question
Title: CiviContribute "Held For Review"
We received a donation through our website via CiviContribute. In our payment gateway (Authorize.net), we had certain countries blocked from making online donations due to previous fraudulent activity. This donor happened to be from one of these blocked countries, so initially her transaction was denied. She called us, we told her to try her donation again and we "Held it for Review" in Authorize.net. Then, we approved the donation.

The transaction went through Authorize.net successfully, however, I can't find any record of her donation in CiviCRM. Can someone tell me where her donation is being stored? Thanks!

# Answer
While researching another issue I stumbled across this on JIRA: https://issues.civicrm.org/jira/browse/CRM-17779 \- so as of 4.7.9, it looks as if you will be able to update the pending contribution to completed (haven't tested, but you should test both online and offline contributions to see what happens).

Kind regards, Tamar
> 1 votes

# Answer
In my experience, I have seen that contributions that are held for review and then manually approved do not trigger the IPN to send a message back to Civi to create a contribution and that those contributions need to be recorded manually in Civi to match what is reflected on authorize.net. But before you do that, just in case, did you try searching for the contribution by date, amount or some other generic criteria without reference to a contact name to make sure that the contribution didn't end up on a new contact record?

Hope this helps, Tamar
> 0 votes

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


# Question
Title: Is automatic new Drupal user to existing CiviCRM contact linking a possible security vulnterability?
According to this CiviCRM wiki page, when a new Drupal user is created, its e-mail address is checked against the CiviCRM contacts list and, if a match is found, the new user is associated with the existing contact. While this helps to prevent contact duplication, it seems like it could also represent a potential security problem.

A simple scenario: a membership organization has migrated their existing CRM data to CiviCRM. They would like new members to be able to sign up online, so they allow anonymous Drupal user account creation. Existing members are encouraged to create Drupal users (which get automatically associated with their CiviCRM contact information) so that they can renew their memberships online.

In this scenario, what prevents a malicious person from using an existing contact's e-mail address during Drupal user registration? Using an existing contact's e-mail address (which can be assumed to be fairly public information) would potentially give the malicious person access to all of that contact's personal information, and (if Rules synchronization is implemented) access to other parts of the website they shouldn't have access to.

This appears to me to be a security hole with the potential to expose personal information; am I missing something? How can this be mitigated?

# Answer
It is but isn't specific to civicrm - the problem in that scenario is allowing anonymous signup without either administrator approval or email verification. Set at least the setting in drupal user settings that sends an email to the email on file and then the owner would have to click a link to verify it.
> 6 votes

---
Tags: drupal, security, user-account
---


# Question
Title: Programatically obtaining a Profile's HTML Snippet
Using the administrative dashboard I can obtain an HTML Form Snippet for any profile which I can use to embed in any webpage or context. This is an extremely useful feature.

Is there any way to obtain it programatically, for example using the API or using Drush or some other command or URI foo, so that administrators can change the Profile and the embedded forms will always be updated?

# Answer
Take a look at CRM\_UF\_Page\_Group::profile().

You want to do that except instead of passing gid (the profile id) through the url you'd make it a function parameter, and then what you want is the value of the $profile variable.
> 1 votes

---
Tags: api, profile, forms, form-snippets
---


title: Exporting relationships

text:
# Question
Title: Exporting relationships
I have an individual who receives from one to many honors. The honors are listed and an organization. I created a relationship and have loaded the relationship. If I look at relationships in the contact record I am able to see them.

I want to export the relationships or at least the contact numbers so I can take them to another database and bring the records together. I am using a "Software as a Service", I don't have access to the database.

I tried this on 2 Civi systems one at 4.6.5 and the other one at 4.7.8.

# Answer
Have you tried Reports \> Contact Reports \> Relationships? The contact IDs of both Contacts A and B are concatenated with the name in parenthesis, and you also have the option to add the contact ID for Contact A as a column as well as other fields you might need.

Hope this helps, Tamar
> 6 votes

# Answer
Search and Export should work too. When you are in the export builder, if you go wwwwaaaayyyy down the bottom of the select list, you should find 'relationships' based options.
> 2 votes

---
Tags: relationships, export
---


# Question
Title: Mapping of CiviCRM's Contact card fields to Drupal user entity's
Essentially, we are having an integration problem where one component we are using is expecting to find or use default user entity fields, but these fields are not mapped into CiviCRM's user Contact card.

To be precise, we are using Drupal's LDAP module to exchange data with legacy systems and provide SSO auth. The LDAP module allows us to specify which Drupal user entity fields are mapped into the LDAP record using Drupal tokens, for example \[field.field\_lname\], \[field.field\_fname\], etc. However, those entity fields are not mapped into CiviCRM. As a result, we can't query their data using Civi, or expose it to users to edit using Civi's profile forms.

How can we manage mappings between CiviCRM's Contact record fields and Drupal's entity API?

# Answer
> 5 votes
In general the way to sync drupal entities with CiviCRM fields is to enable the civicrm\_entity module.

Documentation can be found here.

---
Tags: drupal, contacts, civicrm-entity, field-mapping, sso
---


# Question
Title: User registration creating duplicate contact in CiviCRM
I have a CiviCRM database with lots of contacts some of whom are now going to start creating Drupal accounts. I'm testing the process and have discovered that when I create Drupal user with an email address matching a Civi contact, it creates duplicate contacts instead of merging.

The Unsupervised Individual Email rule didn't seem to be working and, because it's 'reserved', I couldn't see its settings, so I created my own 'email only' Unsupervised rule with Email set to weight 10 and threshold set to 10. Still creating duplicate contacts.

The process of creating the user doesn't seem to affect the issue. That is, I can 'add user' as an admin or create a user as anonymous and Civi reacts the same way. No deduping.

Any thoughts?

Thanks, Lewis

# Answer
That doesn't seem to reflect experience i have had with this. Creating a Drupal User should create a row in UF Match table with the civi contact with that email, and if there are multiple civi contacts with same email i thought it opted for the one with lowest cid.

If you can't figure what is mis-firing (and have a look at your civicrm\_uf\_match table if you haven't already just to confirm what is in there) there are possible workarounds to try, eg use a webform, confirm that you can ensure that a match on email, or first+last+email is working in that context, and then you can use civicrm\_entities and drupal rules to trigger the drupal user creation - old-ish blog here about process
> 1 votes

---
Tags: drupal, registration, duplicate-contacts, user
---


# Question
Title: Completing an abandoned PayPal contribution
I have PayPal standard set up as a payment processor for membership subscription payments.

If a user does not successfully complete the process then they get set up as a contact, an account is created in WordPress but the membership payment contribution gets stuck at "Pending (Incomplete Transaction)".

Is there any way to allow the user to complete the transaction?

Thanks in advance

# Answer
There is currently now way to resubmit a pending contribution either from the front or the back end of Civi - it would be best to cancel the pending contribution and contact the donor to request that they resubmit their membership contribution.

Kind regards, Tamar
> 1 votes

---
Tags: paypal
---


# Question
Title: No Civi Confirmation Email After Using Paypal
I apologize in advance, as this question seems to have been asked many times, but the answer is still not clear after looking at different responses. I am using Civi 4.7.7 and Wordpress. I am using PayPal Pro for both credit cards and PayPal, on my own website. When a client uses credit card, there is no problem, and he also receives a Civi Contribution Confirmation Email. However, when PayPal is used, a payment receipt email is generated through PayPal, but there is no Civi confirmation sent, and on the backend of Civi it says the status of the transaction is pending (incomplete transaction).

The PayPal IPN is pointing to the the homepage of my website. Please can you tell me how to fix this problem?

Thank you! S

# Answer
> 1 votes
Not sure if this applies, but there is a known issue regarding receipts and payment recording for recurring payments. See CRM-18805.

PR-8615 corrects this and is scheduled to be merged into the 4.7.10 release, or you can apply it yourself to 4.7.6.

---
Tags: paypal, receipts, confirmation
---


# Question
Title: Updating Civicrm Activities with Drupal Webforms
We've been using Drupal webforms to create and update activities for contacts in Civicrm. Ever since we updated to civicrm 4.6.18 (from 4.6.10), When the webform is submitted which is supposed to update a civicrm activity, it creates a new activity instead with a random date and a random contact as the "added by" name. I've tested this on another site running 4.6.18 and the error only happens on my current site. I've disabled all the extensions and the error remains...

I enabled the date field in the Webform and set it to "now". When I enable "Update Existing Activity" It sets the date for may 23 2016. If I leave it disabled, the date field is set for today.

I'm at a lost where to look... any ideas?

# Answer
Looks like this is an error that appeared with the Webform\_Civicrm Module once updated Civicrm 4.6.18. The reason I wasn't able to reproduce this error on my second site is because I didn't have the data needed to produce the error. Issue was opened here: https://www.drupal.org/node/2759099
> 1 votes

---
Tags: activities
---


# Question
Title: Dynamically Change QuickForm on EntityRef selection
I am building a form that has an entityRef that gets me a list of groups. When a group is selected I want another entityRef to be displayed that uses the value of from the entityRef selection (I'm getting the child groups for the selection).

I'm looking for some direction on the best approach to this.

Thanks!

# Answer
This can be done by adding javascript directly to the TPL file associated with the QuickForm.

In the FORM php file The following are the elements that I add for selecting:

```
        $this->addEntityRef('field_dc_group', ts('Select DC for the Leader'), array(
        'entity' => 'group',
        'api' => array(
            'params' => array(
                //'tag' => GetCiviSetting('org.namelessnetwork.smallgrouptracking', 'small_group_leader_tag'), // filters results to just those with Small Group Leader Tag
                'parents' => array('IN' => array(34)), // this will get the DC we want to select
            )),
        'select' => array(minimumInputLength => 0),// auto populate results),
        'id' => 'field_dc_group'),
            true // require
    );

    $this->addEntityRef('field_sg_group', ts('Select Small Group Leader'),array(
        'entity' => 'group',
        'id' => 'field_sg_group',
        'select' => array(minimumInputLength => 0),
        ),
            true
    );`

```

At the bottom of the FORM tpl file I added the following javascript code (inside {literal} tag):

```
<script type="text/javascript">
    CRM.$(function ($) {

      console.log($("#field_dc_group").val);

      $("#field_dc_group").change(function() {
        $('#field_sg_leader').select2('data', {id: null, text: null}); // clear currently selected group
          console.log("DC Group ID: " + $("#field_dc_group").val());
        $('[name=field_sg_group]').crmEntityRef({
            entity: 'group',
            api: {params: {parents: $("#field_dc_group").val()}},
            create: true
        });

      });
      $( document ).ready(function() {
        $('#field_sg_group').hide();
      });
  });
</script>

```

Using this setup I am able to update the select2 fields dynamically as well as get the value in the FORM postProcess.
> 2 votes

---
Tags: quickform, entityref
---


# Question
Title: What are the most popular extensions for CiviCRM?
Ever wonder how many Civi sites are using a particular extension? Which are the popular extensions your site is not yet using? Me too!

# Answer
> 4 votes
Here's the answer - the most popular extensions for CiviCRM ranking numbers are here: https://stats.civicrm.org/?tab=sites

---
Tags: extension, developer
---


title: Contributes (Total amount pending)

text:
# Question
Title: Contributes (Total amount pending)
It's possibile in report of contributes, check for single contact a total amount of contributes pending? Or have a difference between complete contributes and pending contributes? thank'you

# Answer
Have you tried Reports \> Contribution Reports \> Contribution Summary Report? You can add a column to show the contribution status and you can modify the filter to show whatever status you would like on the report. By setting the grouping options to Contact and Contribution Status and nothing else, you will get a single row totaling contributions by status, and then a total row for the contact, but this will not give you a difference between the two.

Hope this helps! Tamar
> 1 votes

---
Tags: drupal, contacts, contributions, pending
---


# Question
Title: CiviCRM - Can not access Manage Groups Page
In civicrm i can not access Manage Groups Page I got following error.

Sorry but we are not able to provide this at the moment.
DB Error: unknown error
http://screencast.com/t/tzZBWqKq

But after commenting following code \[civicrm/CRM/Contact/BAO/GroupContactCache.php\] , i can access manage group page.

line : 683 to 700

```
$tempTable = 'civicrm_temp_group_contact_cache' . rand(0, 2000);
foreach (array($sql, $sqlB) as $selectSql) {
  if (!$selectSql) {
    continue;
  }
  $insertSql = "CREATE TEMPORARY TABLE $tempTable ($selectSql);";
  $processed = TRUE;
  CRM_Core_DAO::executeQuery($insertSql);
  CRM_Core_DAO::executeQuery(
    "INSERT IGNORE INTO civicrm_group_contact_cache (contact_id, group_id)
    SELECT DISTINCT $idName, group_id FROM $tempTable
  ");
  CRM_Core_DAO::executeQuery(" DROP TEMPORARY TABLE $tempTable");
}

self::updateCacheTime($groupIDs, $processed);

```

but by commenting this i can not create smart group using search builder, to create smart group i have to uncomment this code.

please help me to solve this caching group problem as soon as possible.

**CiviCRM Version : 4.7.8 , Drupal core 7.43**

**Full Error Log**

```
   Database Error Code: Operand should contain 1 column(s), 1241
   Additional Details:
   Array
      (
         [callback] => Array
            (
              [0] => CRM_Core_Error
              [1] => handle
      )

[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache492 (SELECT 15 as group_id,  contact_a.id as id  FROM civicrm_contact contact_a  LEFT JOIN civicrm_group_contact `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)` ON (contact_a.id = `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.contact_id AND `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.status IN ("Added"))   LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)` ON contact_a.id = `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)`.contact_id   WHERE  (  ( ( ( `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.group_id IN ( (1,2,3,4,5,6,7,8,9,10,11,12,13) ) ) OR ( `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)`.group_id IN ("(1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13)") ) ) AND contact_a.contact_type = 'individual' )  )  AND (contact_a.is_deleted = 0)   AND contact_a.id NOT IN (
                          SELECT contact_id FROM civicrm_group_contact
                          WHERE civicrm_group_contact.status = 'Removed'
                          AND   civicrm_group_contact.group_id = 15 ) ); [nativecode=1241 ** Operand should contain 1 column(s)]
[type] => DB_Error
[user_info] => CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache492 (SELECT 15 as group_id,  contact_a.id as id  FROM civicrm_contact contact_a  LEFT JOIN civicrm_group_contact `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)` ON (contact_a.id = `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.contact_id AND `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.status IN ("Added"))   LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)` ON contact_a.id = `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)`.contact_id   WHERE  (  ( ( ( `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.group_id IN ( (1,2,3,4,5,6,7,8,9,10,11,12,13) ) ) OR ( `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)`.group_id IN ("(1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13)") ) ) AND contact_a.contact_type = 'individual' )  )  AND (contact_a.is_deleted = 0)   AND contact_a.id NOT IN (
                          SELECT contact_id FROM civicrm_group_contact
                          WHERE civicrm_group_contact.status = 'Removed'
                          AND   civicrm_group_contact.group_id = 15 ) ); [nativecode=1241 ** Operand should contain 1 column(s)]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache492 (SELECT 15 as group_id,  contact_a.id as id  FROM civicrm_contact contact_a  LEFT JOIN civicrm_group_contact `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)` ON (contact_a.id = `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.contact_id AND `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.status IN ("Added"))   LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)` ON contact_a.id = `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)`.contact_id   WHERE  (  ( ( ( `civicrm_group_contact-(1,2,3,4,5,6,7,8,9,10,11,12,13)`.group_id IN ( (1,2,3,4,5,6,7,8,9,10,11,12,13) ) ) OR ( `civicrm_group_contact_cache_(1,2,3,4,5,6,7,8,9,10,11,12,13)`.group_id IN ("(1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13)") ) ) AND contact_a.contact_type = 'individual' )  )  AND (contact_a.is_deleted = 0)   AND contact_a.id NOT IN (
                          SELECT contact_id FROM civicrm_group_contact
                          WHERE civicrm_group_contact.status = 'Removed'
                          AND   civicrm_group_contact.group_id = 15 ) ); [nativecode=1241 ** Operand should contain 1 column(s)]"]

```

)

# Answer
Your issue lies with your group with a group ID of 15. From skimming your SQL, it looks like group 15 is anyone who's a member of groups 1-13? It also sounds like you made this group using Search Builder.

So you've almost certainly found a bug - and if you can replicate that bug on the demo server, someone may be able to take a look at it. If you can take a look at it, even better! For now though, I want to get you the result you're looking for.

Try one of the following approaches: * Use parent and child groups - make groups 1-13 a child of group 15. * Instead of using Search Builder, use the Custom Search "Include/Exclude by Group/Tag". You'll find that at **Search menu » Custom Searches** \- click on **Custom Searches**, NOT on the items on its submenu. You'll find more custom searches there!
> 1 votes

# Answer
I had a similar issue following an upgrade from 4.5 to 4.6, and rebuilding the smart group solved it.

Googling your database error code found me this: https://stackoverflow.com/questions/14046838/mysql-operand-should-contain-1-columns which suggests that the query builder associated with your smart group just hit a wall in complexity.

Conclusion: what Jon said.
> 0 votes

---
Tags: drupal, groups
---


title: How do I set text width in CiviMail?

text:
# Question
Title: How do I set text width in CiviMail?
I have centered text in a mailing that I'm setting up. The line length is too long for easy readability. How do I set up a maximum text width? Here's how it looks now:

# Answer
Insert a table with one row and one column and choose the desired width of the column when creating the table. Paste your plain text into the table - not an image with text, which will not appear correctly in some e-mail programs.
> 2 votes

# Answer
```
<td style="max-width:200px;">

```

is the safest way. You cannot floating text over a table background image in Outlook (which is still a huge user base). It's not difficult: it's impossible. Better to use graphic text and repeat in alt tag.
> 0 votes

---
Tags: email
---


# Question
Title: Should the API return code always be 200?
The Civicrm API seems to always return 200 (aka 'Success') even when there is an error (in the parameters of the request, or otherwise). To indicate an error, it instead sets the 'is\_error' flag to '1' in the response.

This is fine, but is there a reason why it wouldn't set a more appropriate error code depending on the case (i.e. a 400 'Bad Request' code for malformed requests)? For example, when using a javascript http client and making an ajax API request it would allow use of default error handlers (function to call on success, function to call on fail).

# Answer
> 1 votes
HTTP return codes are typically indicative of "plumbing" issues between the client through the web server. A malformed API call is more indicative of an underlying data issue so doesn't really fit the same scheme (IMHO).

Further, I think that error handling for plumbing issues (ala "Website not available") probably needs to be different than that for API errors. I know my coding would always handle things differently.

That said, this question really calls for no more than personal opinions so should probably be closed.

---
Tags: api
---


# Question
Title: How to locate household for event participant
We organize a yearly week where children come to our community center to play and have fun. All children are entered and linked to their household, which is also where we put all contact-information for the parents such as phone numbers and e-mail address.
We would like to send an e-mail to the parents of last year's participants, inviting them to sign up their children for this year's event but I can't figure out how to do that with the available search options.
Is this something that I can only fix with a custom search?

# Answer
Have you used the "relationship" section of the Advanced Search in conjunction with the "event" section to find the related households of participating individuals?
> 0 votes

---
Tags: search, custom-search
---


# Question
Title: How can I turn off Extension Download Errors?
Fresh install today of CiviCRM 4.7.9 on Wordpress. There are no installed extensions and I don't need to install any extensions. However—maybe due to how new the release is—I get this error message on *every* screen, *every time* I navigate anywhere in CiviCRM:

> "Extension download error Unable to download extension from https://civicrm.org/extdir/ver=4.7.9|cms=WordPress/single. Error Message: Failed to connect to civicrm.org port 443: Connection timed out"

This wasn't happening with the install of 4.7.8 I was working with just a few hours ago, on the same server. I am confident it can make external HTTP requests.

Can this error be fixed or, if not, at least turned off? I don't currently need any extensions so I'm fine with CiviCRM (silently) failing to reach that URL.

# Answer
To do so, you need to add this following line on your civicrm.settings.php

```
global $civicrm_setting;
$civicrm_setting['Extension Preferences']['ext_repo_url'] = false;

```

https://wiki.civicrm.org/confluence/display/CRMDOC/Extensions#Extensions-Disableautomaticinstallationsofextension
> 4 votes

---
Tags: wordpress, extension, error
---


# Question
Title: Any experiencing errors upgrading to 4.7.9, related to 'CRM-16189 Financial account relationship'
My upgrade simply hangs (20+ minutes) and then crashes a 2GB VPS trying to execute the MySQL related to 4.7.9.

My guess is that line 26 and beyond in 4.7.9.mysql.tpl is writing checks that my server cannot cash, given over 100,000 contributions already in Civi.

Can this query be optimized or can I see a less smarty-ized version of it I can run? What are the consequences of not running these queries, if we do not use Accounting integration or Financial Accounts?

# Answer
Actually I found it was the FK changes in 4\_7\_8 in FourSeven.php in conjunction with the 4.7.8.mysql.tpl were crashing server. By commenting out all 4.7.8.mysql.tpl and then manually running these after upgrade complete, there were no crash/hang.
> 1 votes

---
Tags: upgrade
---


# Question
Title: How do I import both student and parent information together?
I am trying to find out how to import student and parent information at the same time. I have seen instructions about importing student and then adding the parent information afterwards, but I have a school roll of over 1000 students and adding parent information manually afterwards would take forever!!

Thanks for any assistance.

Steve

# Answer
> 3 votes
No need to do this manually! Providing that you have a spreadsheet/data source that has all students and a parent/guardian column - so that you can create relationship during import. I'll try dig up a field mapping for you - and post it here shortly.

EDIT: found a wiki page for you: https://wiki.civicrm.org/confluence/display/CRMDOC/Importing+Student,+Staff+and+Parents

PS - though tailored for CiviSchool - which is no longer supported - the import/mapping screens will show you how what import/mapping to use.

EDIT: highlighting the key screens from this Wiki - it's a two pass import:

***First: import the student:***

***Next: import the parent: key is Child of relationship to the Student:***

---
Tags: import
---


title: Error with photo fields

text:
# Question
Title: Error with photo fields
I am crafting a view to produce a directory of contacts, with contact\_image as one of the fields (rewritten to wrap \[IMAGE\_URL\] in an img element). My output is headed by an error for each call to the image fetcher:

```
Notice: Undefined index: photo in CRM_Contact_Page_ImageFile->run() (line 44 of /srv/www/htdocs/drupal/sites/all/modules/civicrm/CRM/Contact/Page/ImageFile.php).

```

I'm not certain if this refers to a database or array index. Using CiviCRM version 4.6.10 on Drupal 7.44

# Answer
> 1 votes
It started working, the last action before it did so was me updating the views module.

# Answer
> 0 votes
I don't have a 4.6.10; but on a CiviCRM 4.7.8 - this is working as below - out of the box - no rewriting and no views-views-fields.tpl.php required.

**In CiviCRM:**

**In Views:**

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


# Question
Title: How to position a custom top level menu before/after some menu?
While this documentation tells how to add a custom top level menu, it adds to the last. Say, I want to add a new custom menu "My Menu" and position it right before "Administer" menu. How would I do this?

# Answer
Pretty sure you need to GET `weight` of the "Administer" menu and then based on that you can SET the `weight` for "My Menu" - in the civicrm\_navigation table. like in Drupal I think you'll be ok having two items with the same weight - no need to renumbering them all!
> 1 votes

---
Tags: hooks, menu
---


# Question
Title: Contribution Page - Unlink last year's contributions?
I am new to the position of keeping our website up-to-date. The previous person told me that I could edit over previous versions of pages so we don't have multiple pages that are similiar of events we do each year. I updated one of our contribution pages (YLS Supports Income Programs), however I notice on the widget page that it is pulling the contributions from last year's event. Is there a way to unlink that so we can start fresh at $0 this year? Or is there a better way to go about this?

Thank you, Kim

# Answer
Ah yes -\> make a copy instead of editing!

```
Events -> Manage Events -> under the more (on the far right) -> hit Copy.

```

This will copy all your settings/etc but will not copy your participants. Contribution pages: very similar -\> same thing!

```
Contributions -> Manage Contribution Pages -> under the more (on the far right) -> hit Make a copy.

```
> 1 votes

---
Tags: civievent, civicontribute
---


title: Invalid API Key provided

text:
# Question
Title: Invalid API Key provided
System Details

**Versions** **CiviCRM:** 4.7.4
**WordPress:** 4.4.2

When I attempt to renew an expired membership via the Renew-Credit Card option I am presented with the following error.

`Payment Error Response:
Error: Invalid API Key provided: ************W4kG`

We know the API keys are valid because we have other functions of CiviCRM that are authorizing succesfully with Authorize.net. Any help would be welcomed with open arms. XD.

# Answer
Not so much an answer as a possible approach to debugging:

1) find out the URL that this command visits and see if you get the same result. If so it's a bug with authorize.net

2) if that URL works then it's a bug with civi. In this case get it to spit out what the api key is and check that against the vale you've entered, checking they're the same.

The error should lie in one of those two places.
> 2 votes

# Answer
We had this issue and we solved it by uninstalling the stripe extension. Somehow it was interfering with Authorize.net processing.
> 1 votes

---
Tags: api, authorize.net
---


title: Putting Together A Mailing List

text:
# Question
Title: Putting Together A Mailing List
I want to put together a mailing list of all primary individual members (current, lapsed, expired) who have no email address. How do I do this?

# Answer
You can use Search Builder (under the Search menu). On the first Search line, search for

> Contacts \> Email \> Primary \> Is Empty

On the next search line(s), set your criteria for the members piece.

EDIT: And then you can save as a Smart Group which you can use as your List
> 1 votes

---
Tags: groups, smartgroups
---


# Question
Title: how to manage documentation of past events (add files, links, summary, etc)
so we are using civicrm for events, webinars etc. we want to move the documentation of the events also to civicrm (photos, presentations, attendees, summary, links etc.) for contacts its easy with the activities tabs. is there a way to link activities to (past) events. or do you know a way how to do documentation for events in civicrm? thanks a lot in advance

# Answer
You can create custom data/fields for Events and can attached the documentation.

**Custom fields for events**

**Attach the files when you configure events**

**Download documentation from Event info page**
> 1 votes

---
Tags: civievent, documentation
---