# Question
Title: CiviRules Identify how many times a donor contributed in a given time period
I am trying to set up a CiviRule to identify if a donor has donated more then 10 times in the last 12 months. I used the Linked Condition xth Day of Contributing By Donor and set it to 10 last 12 months, but that did not work. Is this the right condition to use? If not is there a better way to identify those donors?

# Answer
> 1 votes
This did work. I was thinking it was 10 or more times in the last 12 months, but it only works if there is exactly 10 contributions.

---
Tags: civirules
---


# Question
Title: Chamber of Commerce with multiple levels and sublevels of membership
I am in the process of evaluating CiviCRM for a Chamber of Commerce site that I am working on.

This specific Chamber has 4 levels of membership, each with 4 levels within it, So: Classic with 1 to 5 employees = $175 Classic with 6 to 10 employees = $225 Classic with 11 to 20 employees = $275 Classic with 21+ employees = $325

And then Bronze, Silver and Gold with the same divisions.

Can this be accomplished with CiviCRM?

# Answer
Yes - this is fairly straightforward. In fact, unless there are different benefits to membership, I'd only create a single membership type with different price set levels. If there are different membership benefits, I'd consider multiple membership types.
> 4 votes

---
Tags: civimember, evaluating-civicrm
---


# Question
Title: Can I put custom field tokens into a message template?
I want to add custom fields to mail templates without writing tokens. Is this possible?

If so, where can I find the entity relationship diagram for civi? Thanks,

# Answer
> 11 votes
Yes it is possible to include custom contact fields for individuals in messages sent by CiviMail by just selecting the custom field from the list of tokens.

The help on the Insert Token widget for CiviMail explains how to do it for custom organizational contacts, and the same process works for custom household fields as well:

> Custom tokens (based on custom data) can be added for organizations as well. These tokens will not be displayed in the list of available tokens, but can be added manually. The format is {contact.custom\_12} – where 12 is the ID of the custom data field. To find the custom data field ID, go Administer \> Customize Data & Screens \> Custom Fields and click ‘edit’ on the field you want to use. Look at the URL. The last part of the URL will be an equal sign and a number (=12). The number (12 in this example) is the id of that custom field.

# Answer
> 3 votes
I have custom data fields, and they are 'multi-value' sets (e.g. employment history; John has 3 prior jobs attached to his contact profile.) These data elements are not currently available by default in CiviCRM. In order for me to be able to use these custom data elements in CiviMail, I had to write a bit of code in a Drupal Module to implement the proper 'hooks' as described at http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens See my code at http://pastebin.com/LaDq0z82

# Answer
> 0 votes
I have just created a number of custom tokens for things like relationships, mailing lists and some multi-value custom fields. I used hooks to do so, and found the API explorer (Support -\> Development -\> API Explorer)very useful in the development as it helped create the key code to get the data.

---
Tags: civimail, tokens
---


title: Tying Contributions to Events

text:
# Question
Title: Tying Contributions to Events
I'm trying to attach an event to a contribution that I enter by hand. I see that the "source" field is where I need to do that. I've been entering the name of the event into the source field but my totals in the revenue report are still zero for the event. Is there a way that the source can be a drop down of events to choose from or is it a matter of using the exact naming of the event in the source field?

Any help is appreciated. Thanks

# Answer
> 2 votes
The link internally between a contribution and a contribution page or an event is not something you can edit via the web interface. The only way would be to directly edit the database data via an SQL query. This is the type of thing you would need to hire a developer to do, however.

# Answer
> 2 votes
As a UI work-around for this particular event, I would probably create a campaign type Event and a campaign with the event name and details. Contributions can then be linked to the campaign when you enter them and you can run reports to find the total contributions for the campaign.

---
Tags: civievent, contributions
---


# Question
Title: How to access Financial Items through API?
In my organization, we have local chapters who sometimes get part of the national membership dues. The BOD doesn't want the breakdown to show up on the email receipt, and the calculation has to be done whether the dues are posted online or offline, so I do my breakdown during the posting of the line item for the membership dues.

I access the chapter share and reduce the line item by the chapter's share and create a new line item for the chapters share, since it's a different financial type. Everything works well, except the chapter's share doesn't show up on the bookkeeping report. That's when I noticed that the Financial Item record isn't created for the chapter's share line item record.

So I looked at the API explorer and I can't figure out which API entity and which API call creates the Financial Item records.

# Answer
I don't think their is a separate API for creating Financial Item records - this gets created whenever an contribution and line\_item is been created

so, you can write an API for creating financial\_item also make sure you make an entry in entity\_financial\_item

or you can create these records manual using CRM\_Financial\_BAO\_FinancialItem::add() which will create new financial item
> 1 votes

# Answer
Version 4.7.6 opens access through api for Financial Item as well as other Financial tables.
> 1 votes

# Answer
There is an API for Financial Items in this extension: https://civicrm.org/extensions/financial-item-api
> 1 votes

---
Tags: api, developer
---


title: Input file must be in csv format

text:
# Question
Title: Input file must be in csv format
I am trying to import a csv file as a test into Civicrm. I first exported the exact same file from Civicrm, and then i tried to import the exact same file. When i click on Continue, i get an error "Input file must be in CSV format". I have this error code:

```
Array
(
    [name] => Map1.csv
    [type] =>
    [tmp_name] =>
    [error] => 6
    [size] => 0
)

```

Can someone tell me what to do?

With kind regards, Hilco Regterschot

# Answer
> 2 votes
Your name sounds Dutch, what often happens to me is that if you open this file with Excel and save it again, it is saved with ; in stead of ,

Could that be the case?

It also is possible it is saved as an Excel file in stead of .csv

---
Tags: contacts, import
---


# Question
Title: How do I run a list of "on-hold" email addresses?
I want to run a current list of emails that are "on Hold" in our system. How do I do this?

# Answer
> 8 votes
You can use the "advanced search", there is an option to select the emails that are on hold

# Answer
> 3 votes
I'm going to dredge this question up because I just discovered something for myself here:

(I am currently using civiCRM 4.6.4)

**Advanced Search:** The email On Hold search option brings up "On Hold = 1", which will bring up all users with 'On Hold Bounce'. This does not seem to bring up users with 'On Hold Opt Out'.

**Search Builder:** It turns out that the value for 'On Hold User Opt Out' seems to be '2'. The only ways I have found to bring this up are in Search Builder either by searching "On Hold != 0" or "On Hold \> 0" if you want to bring up all on hold contacts at once.

An interesting note is that if I search 'On Hold = 2' I get an error message "please enter a valid value"... so to bring up contacts with 'on hold user opt' out I need to search for 'On Hold \> 1'.

---
Tags: civimail
---


# Question
Title: How to display a frontend CiviMember page?
I have a profile set up with standard membership fields which I want to display as a front-end page in WordPress. The profile is enabled and set up as a standalone for.

Problem: on the WordPress page when I try to embed the form the profile is not listed. Are there any dependencies for CiviMember? I'm on Civi 4.6.7

# Answer
Please try to create a contribution page first and then test the contribution page by embedding against wordpress page

Once I did face similar issue - word press needs a contribution page to be created as a base - please give a try and test

If everything works fine with contribution page then try embedding your standalone profile that should work

If it fails let me know. so i will investigate more - thanks
> 0 votes

---
Tags: wordpress, civimember, forms
---


# Question
Title: Scheduled reminders triggered by new relationship
**The Objective:**

We'd like to set up a template email that will send (one time only) to individuals who have a specific relationship type added to their contact record.

E.g.

1. (Individual) A is a member of (organisation) X. Both A and X are in Civi as contacts.
2. A has a new relationship to X (e.g. of type 'Chairman of') added to their contact record
3. This triggers an automated email to be sent to A (with helpful content specific to that relationship type)

**What we tried**

I thought I might be able to do this through:

* setting up a Smart Group (for all contacts with relationship type 'Chairman of')
* setting up a scheduled reminder with recipients limited to the Smart Group so that every time a new contact is added to the Smart Group they would be sent the scheduled reminder.

However, this doesn't seem to be enough, as there's no 'entity' (of 'contact in group' or 'relationship type') or similar to trigger the scheduled reminder.

Any ideas if/how we might be able to get this going?

# Answer
> 1 votes
I think using the CiviRules extension (to be found at https://civicrm.org/extensions/civirules) will help you with what you want to achieve.

You will also need to install the Email API extension (found at https://civicrm.org/extensions/e-mail-api) to be able to use the CiviRules action to send an email.

I do not know if the trigger 'new relationship' has been thoroughly tested, but you start should be to read the CiviRules documentation and see if this might do the trick.

---
Tags: relationships, scheduled-reminders
---


# Question
Title: How do I add CiviCRM Activity attachment to View
Trying to set up an activity view that displays attachments uploaded to activities.

I can't seem to find the field to add.

Any ideas?

# Answer
> 2 votes
Partial answer.

I tried CiviCRM Entities and the Expose Civi tables to Views projects. Entities doesn't seem to fit my needs and did not appear to add the tables I needed to Views.

Expose tables to Drupal Views would have worked but was throwing errors and still required me to write a small custom module.

I think this stuff should be in core anyway, so I started down that route.

In the civicrm.core.inc file I started to play around with the civicrm\_file table.

**I told Views about the table and defined all pertinent columns: id, entity\_id, uploaded date, description and mime type.**

```
/*
     * Add support for CiviCRM attachments
     */
     /*
     * Add CiviCRM file table
     */
      $data['civicrm_file']['table']['group'] = t('CiviCRM Files');

      $data['civicrm_file']['table']['base'] = array(
        //
        'field' => 'id',
        'title' => t('CiviCRM Files'),
        'help' => t("View displays CiviCRM Attachments"),
      );
      //Numeric File ID
      $data['civicrm_file']['id'] = array(
        'title' => t('File ID'),
        'help' => t('The numeric ID of the Attachment'),
        'field' => array(
          'handler' => 'views_handler_field_numeric',
          'click sortable' => TRUE,
        ),
        'argument' => array(
          'handler' => 'views_handler_argument_numeric',
          'numeric' => TRUE,
        ),
        'filter' => array(
          'handler' => 'views_handler_filter_numeric',
        ),
        'sort' => array(
          'handler' => 'views_handler_sort',
        ),
      );
        //URI
      $data['civicrm_file']['uri'] = array(
        'title' => t('URI'),
        'help' => t('The URI of the Attachment'),
        'field' => array(
          'handler' => 'views_handler_field_file',
          'click sortable' => TRUE,
        ),
      );
      //File Upload Date
      $data['civicrm_file']['upload_date'] = array(
        'title' => t('File Upload Date'),
        'help' => t('The date the Attachment was uploaded'),
        'field' => array(
          'handler' => 'civicrm_handler_field_datetime',
          'click sortable' => TRUE,
        ),
        'filter' => array(
          'handler' => 'civicrm_handler_filter_datetime',
        ),
        'sort' => array(
          'handler' => 'civicrm_handler_sort_date',
        ),
      );
      //File Description
      $data['civicrm_file']['description'] = array(
        'title' => t('Description'),
        'help' => t('The description of the Attachment'),
        'field' => array(
          'handler' => 'civicrm_handler_field',
          'click sortable' => TRUE,
        ),
        'argument' => array(
          'handler' => 'views_handler_argument_string',
          'numeric' => TRUE,
        ),
        'filter' => array(
          'handler' => 'views_handler_filter_string',
        ),
        'sort' => array(
          'handler' => 'views_handler_sort',
        ),
      );
      //File Mime Type
      $data['civicrm_file']['mime_type'] = array(
        'title' => t('Mime Type'),
        'help' => t('The mime type of the Attachment'),
        'field' => array(
        'handler' => 'views_handler_field_file_filemime',
        'click sortable' => TRUE,
       ),
     );

```

**Then added the join in the Activities section.**

```
 /*
  //TABLE JOINS FOR CIVICRM ACTIVITIES GO HERE!
    /*
     * Add joins for CiviCRM attachments
     */
  $data['civicrm_file']['table']['join']['civicrm_activity'] = array(
    'left_table' => 'civicrm_entity_file',
    'left_field' => 'file_id',
    'field' => 'id',
  );

  $data['civicrm_entity_file']['table']['join']['civicrm_activity'] = array(
    // Directly links to file table
    'left_field' => 'id',
    'field' => 'entity_id',
    'extra' => array(
      array(
        'field' => 'entity_table',
        'value' => 'civicrm_activity',
        'numeric' => FALSE,
      ),
    ),
  );

```

I'm sure my code can use some clean up as that's not my bag, but when I create a View of Activities, I now get these options:

**And this is the resuult:**

Struggling to form the url correctly.

I'd like to use the same handler that Civi uses for custom file fields (civicrm\_handler\_field\_custom\_file or the non-custom alternative, civicrm\_handler\_field\_file) but when I try either of those, I get a broken handler error.

Those handlers pass the entity id as well as the file id into the url. So the url is formed like:

localhost/civicrm/file?id=\[file\_id\]&eid=\[entity\_id\]#

The error has to do with the entity\_id column referenced in those handlers.

# Answer
> 3 votes
I attended a session yesterday at CiviCon (https://denver2015.civicrm.org/sessions/civicrmdrupal-integration-showcase; the slides are up already) about exposing more Civi tables to Views.

CiviCRM Entity 1.x might display the table you need. CiviCRM Entity 2.x-dev most definitely will. (https://www.drupal.org/project/civicrm\_entity) The session slides have lots of details on installation and use.

A sandbox module is also available to expose the Civi tables to Views (https://www.drupal.org/sandbox/markusa/2474103).

The inherent (edited) difference is the sandbox module is just exposing the data to Views. The CiviCRM Entity module will make Civi data available to all of Drupal as entities.

# Answer
> 2 votes
For a project I have build a Drupal CiviCRM views module which extends the Drupal views module with missing data, such as attachments. You can find this module, which is quite project specific, at https://github.com/PUMNL/pum\_civicrm\_views

# Answer
> 2 votes
Update of Partial Answer

Following on from the partial answer i added the following table definition for the entity\_file table. This section of code was added just after the definition for the file table (the first bit of the partial answer). The joins have already been taken care of in the original answer (second bit), this just gives the fields to use to build a working link to download the file

```
/*
 * Add CiviCRM entity file table
 */
$data['civicrm_entity_file']['table']['group'] = t('CiviCRM Entity Files');

$data['civicrm_entity_file']['table']['base'] = array(
  //
  'field' => 'id',
  'title' => t('CiviCRM Entity Files'),
  'help' => t("View displays CiviCRM Attachments create link to download"),
);
//Numeric File ID
$data['civicrm_entity_file']['id'] = array(
  'title' => t('Entity File ID'),
  'help' => t('The numeric ID entity file record of the Attachment'),
  'field' => array(
    'handler' => 'views_handler_field_numeric',
    'click sortable' => TRUE,
  ),
  'argument' => array(
    'handler' => 'views_handler_argument_numeric',
    'numeric' => TRUE,
  ),
  'filter' => array(
    'handler' => 'views_handler_filter_numeric',
  ),
  'sort' => array(
    'handler' => 'views_handler_sort',
  ),
);
  //EntityTable
$data['civicrm_entity_file']['entity_table'] = array(
  'title' => t('Entity Table'),
  'help' => t('The content type associated with the attachment'),
  'field' => array(
    'handler' => 'civicrm_handler_field',
    'click sortable' => TRUE,
  ),
);
//Entity ID
$data['civicrm_entity_file']['file_id'] = array(
  'title' => t('File ID'),
  'help' => t('FK to the ID of the file in civicrm_file table'),
  'field' => array(
    'handler' => 'views_handler_field_numeric',
    'click sortable' => TRUE,
  ),
);
//Entity ID
$data['civicrm_entity_file']['file_id'] = array(
  'title' => t('File ID'),
  'help' => t('FK to the ID of the file in civicrm_file table'),
  'field' => array(
    'handler' => 'views_handler_field_numeric',
    'click sortable' => TRUE,
  ),
);

```

# Answer
> 1 votes
The link is in the civicrm\_entity\_file table, which links the activity and the attachment. The attachment itself is in the civicrm\_file table.

---
Tags: civicase, drupal-views, activities
---


# Question
Title: Not all extensions appear in Add New list
I want to install an extension in Joomla 3.5.1 (CiviCRM 4.6.15, Php 5.6.19, Linux, been using CiviCRM for several years, continuous upgrading).

But, the extension isn't appearing for me ("SPARKPOST / CIVICRM INTEGRATION 1.3.1"). I've refreshed, waited a day and refreshed again, but it doesn't appear. It's been released for more than two months, although the most recent version is from beginning of April.

I don't know what else to try. I would like to avoid manually downloading and installing the extension, because I'm concerned that it wouldn't show future updates if it's not showing the actual released version.

Many extensions are listed under the Add New list of extensions, but ***some newer ones*** (as far as I can tell) are not, although they're listed as available on CiviCRM.(https://civicrm.org/extension-civicrm-compatibility/civicrm-46)

Two of the missing items, for example: "SPARKPOST EMAIL EXTENSION FOR CIVICRM 1.0" and "SPARKPOST / CIVICRM INTEGRATION 1.3.1".

Another one (with a more recent release date than the two above "OUTBOUND DOMAIN ENFORCEMENT VERSION 1.4" **IS** listed on my "New Extensions" tab, so it's not just a date thing.

# Answer
Extensions don't get added to the "Add New" tab just because they are on the https://civicrm.org/extensions. They must be approved by the CiviCRM team first. We are working to get our extension published into that list to make it easier for users to install.
> 2 votes

---
Tags: joomla, extension
---


# Question
Title: Changing information displayed for Pay Later feature on contribution pages
Does anyone know where to go in Civicrm to change the I will send payment by check option on contribution pages?

I want to replace it with something like I will pay by cash or Bank Transfer

# Answer
It is on the Contribution Amounts tab for any Contribution Page eg http://d46.demo.civicrm.org/civicrm/admin/contribute/amount?reset=1&action=update&id=1.

Enable Pay Later and you will see

* Pay Later label
* Pay Later instructions
> 2 votes

---
Tags: contribution-page
---


# Question
Title: Paypal ipn issues after upgrade to 4.6.15.
Paypal ipn is failing with 500 after upgrading to 4.6.15 from 4.6.10

The notification url looks correct but isn't working https://www.mysite.com/civicrm/extern/ipn.php?reset=1&contactID=83&contributionID=80&module=contribute

I am using Drupal 7 with Pantheon. I already have implemented this patch https://www.drupal.org/node/2177647

I'm not sure how to further debug this. The extern/ipn.php file hasn't changed from 4.6.10 to 4.6.15. Where else can I look.

Any tips on debugging would be greatly appreciated, thanks.

# Answer
> 2 votes
**Why is IPN failing on Pantheon?**

Check out CRM-17212: IPN and other scripts break on Pantheon due to session handler although it does look like you have a similar patch in effect. Compare your changes with those merged into the 4.7 branch, or consider trying 4.7.

**How do I debug on Pantheon?**

On Pantheon hosting, you can inspect your application's error logs in:

```
logs/php-error.log

```

For additional tips on debugging PHP errors, see also:

Pantheon specific docs on logfiles are:

---
Tags: paypal, ipn
---


# Question
Title: How to change DB user password for CiviCRM 4.7.3?
For my own reasons, I needed to change the Civi database user password. After doing so in my hosts CP, this of course broke CiviCRM (WP). I'm a Civi newbie so I was expecting I might be able to easily find the file to change the pw like WP's wpconfig file. No such luck.

What files and their locations must I change so I can reconnect Civi to its DB?

# Answer
> 3 votes
Supplementing Jason's answer for a Drupal installation: the file civicrm.settings.php will be found in your site's directory, e.g. drupal/sites/default/ or drupal/sites/mysite.com/ . Look for `CIVICRM_DSN` in civicrm.settings.php .

# Answer
> 2 votes
Ok, I figured it out and for the benefit of anyone who might Google search this same question, here's the answer. 1. Go to your webhost's file browser. 2. The file should be located in /public\_html/wp-content/uploads/civicrm/civicrm.settings.php 3. Open the file with the code editor. 4. Modify the credentials string which contains the password and save.

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


# Question
Title: Where are CiviCRM's date preferences actually used?
Under Administer \> Customize Data and Screens \> Date Preferences, CiviCRM offers a number of date classes for which an administrator can specify date formats. *activityDate* is described as "Date for activities including contributions: receive, receipt, cancel. membership: join, start, renew. case: start, end." *activityDateTime* is described as "Date and time for activity: scheduled. participant: registered."

Where are these settings actually used? I changed the date format for both of these, cleared CiviCRM's caches, and headed over to the contact summary, expecting to see the new date formats on the Activities and Contributions tabs. Instead, I found no change at all.

# Answer
> 2 votes
There are actually (at least) two places where you can change the formats. One is where you described, the other one (that affects most of the displayed date formats e.g. in the contact tab) is available at \>\>Administer \>\>Localization \>\>Date formats.

Below is a screenshot of settings we usually use for German language environments.

---
Tags: localisation, dates
---


# Question
Title: Financial types in contribution is always default and not taken from contribution page
I have contribution pages for different membership classes. Each page has a different Financial Type so that the transactions can be exported and the accounts differ for each membership type. However no matter what Financial Type is set in the contribution page it seems that 'a default' gets associated with the contribution. This does not happen for Events where the Financial Type is correctly picked up from the Event.

Maybe I have something set up incorrectly but it looks like a bug to me.

Cheers Martin Fuggle

# Answer
If you are using Price Sets on the contribution pages - i.e. you selected *Click here if you want to configure the Regular Fees below as part of a Price Set, with the added flexibility and complexity that entails* \- then it may be that the financial type is being taken from the price set rather than from the contribution page settings.

Also note the distinction between the financial type of the contribution and the financial type of line items - see discussion at Contribution Page Price Sets Not Recording Different Financial Types.

However in the similar question Why is a contribution given a financial type different from that allocated to the contribution page used?, price sets were not the issue and a solution was not recorded.
> 1 votes

---
Tags: contributions, financial-types
---


# Question
Title: How would I view an attachment PDF that is attached to a contact activity, through the REST API?
This is through the REST API, I'm using CiviCRM 4.4.14, REST API v3.

I read that there is an attachment API, but the attachment API does not seem to be available through the REST API.

# Answer
I think you're right. The table that links attachments to what they're attached to is `civicrm_entity_file`, and the table with details of the file itself is `civicrm_file`. In 4.4 (and indeed 4.6 and 4.7) the former has its own DAO but isn't its own API entity.

If you want to get details of the attachments on some entity, you might need to write a custom API function wrapping `CRM_Core_BAO_File::getEntityFile`.

One way you can present a link to the user to download the attachment, is `/civicrm/file?id=<file ID>&eid=<activity ID>`, but they'll need the 'access uploaded files' permission. On Drupal (I don't know about roles and permissions in Wordpress) this means they'd either need to be actually logged into Civi with a role that has that permission, or the permission would need to be granted to anonymous users, which would mean anybody could grab any attachment by guessing the numbers.

Another way you could allow your app to download an attachment is to write a custom API that base64-encodes the file contents and includes that in the API result.
> 1 votes

---
Tags: api, attachments
---


# Question
Title: Where to report Gitbook error (Problem loading page)
When I try to visit CiviCRM's GitBook I am forwarded to https://docs.civicrm.org/user/en/4.6 with the following error:

Who should I report this to?

# Answer
You can report infrastructure-related bugs on the "Infrastructure" project of JIRA (https://issues.civicrm.org/jira/browse/INFRA/).

I opened an issue for this: https://issues.civicrm.org/jira/browse/INFRA-175
> 2 votes

# Answer
If you experience this problem when trying to view the documentation it may be that your browser is either Chrome or Firefox and that you have previously visited the same page prior to 22 March 2016 (or for Firefox perhaps just visiting the main site https://civicrm.org could be enough).

The gitbook link now redirects to http://docs.civicrm.org/user/en/4.6 (the read the docs version). The read the docs version previously used https and the switch to http can cause problems. I am not an expert on this but I know it has something to do with HSTS. I think that Chrome and Firefox will redirect to https even if you specifically enter http if the sub-domain previously used https.

I was able to solve the problem with Chrome by deleting docs.civicrm.org from chrome://net-internals/#hsts (clearing caches or browser history did not work for me).

I have not yet managed to solve the problem with Firefox. Again clearing caches or browser history did not work for me.
> 2 votes

---
Tags: documentation
---


# Question
Title: Change log rollback not restricted to a single contact
Not so much a question as a development request...

We manually add/edit records but also do a lot of importing into Civi. When some errors were found on a particular contact record we used the 'revert these changes' button in the change log expecting it to revert only the update to the single specific contact record.

Unfortunately because the changes were as the result of an import into civi for approximately 650 contacts it rolled back all changes across all 650 records.

Because we could not unpick which specific import it was (there were a number of imports against these 650) we then had to delete all 650 contacts and re-import from scratch.

Not sure where to put the request for future development, but it would be great to be able to choose between a revert against a single record versus the full import set...

# Answer
> 1 votes
That sounds frustrating. Thanks for sharing your experience. Feature requests should be made in CiviCRM's issue tracker.

---
Tags: contacts, import
---


title: CiviVolunteer jobs in drupal views?

text:
# Question
Title: CiviVolunteer jobs in drupal views?
Is there a way to use the CiviVolunteer job opportunities in Drupal views? If not would this need work on the CiviVolunteer extension or the CiviCRM entities module?

We are looking for a way to expose the vacancies in a nice and flexible way in our drupal views.

# Answer
> 2 votes
Presently CiviVolunteer does not have a direct integration with Drupal Views. I have worked with the CiviCRM/Views integration before, but it's been quite a while now, so I'm not sure what's changed... that said, my work was integrating CiviCRM core fields with Drupal Views. I'm not sure what it would take -- or even if it would be all that different -- to integrate Drupal Views with entities defined by a CiviCRM extension.

As of version 2.0, CiviVolunteer does provide a filterable list of available volunteer opportunities. Here's an example. Perhaps this obviates the need for a Views integration?

---
Tags: drupal, drupal-views, civivolunteer, civicrm-entity
---


# Question
Title: CiviVolunteer 2.0 fails to enable volunteer management for events
I'm running CiviVolunteer 2.0 beta 2 with CiviCRM 4.6.8 on Drupal 7. After installing the extension, I create a test even and attempt to enable volunteer management. Here's the resultant error and stack:

```
Sorry but we are not able to provide this at the moment.
Not enough data to create volunteer project object.

```

and...

```
#0 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/Error.php(360): CRM_Core_Error::backtrace()
#1 /var/www/drupal/cfsc/sites/default/files/civicrm/extensions/org.civicrm.volunteer-4.6-2.0.beta2/CRM/Volunteer/BAO/Project.php(221): CRM_Core_Error::fatal("Not enough data to create volunteer project object.")
#2 /var/www/drupal/cfsc/sites/default/files/civicrm/extensions/org.civicrm.volunteer-4.6-2.0.beta2/CRM/Volunteer/Form/Volunteer.php(89): CRM_Volunteer_BAO_Project::create((Array:4))
#3 /var/www/drupal/cfsc/sites/default/files/civicrm/extensions/org.civicrm.volunteer-4.6-2.0.beta2/CRM/Volunteer/Form/Volunteer.php(285): CRM_Volunteer_Form_Volunteer->saveProject((Array:2))
#4 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/Form.php(345): CRM_Volunteer_Form_Volunteer->postProcess()
#5 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(166): CRM_Core_Form->mainProcess()
#6 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(133): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Volunteer_Form_Volunteer), "upload")
#7 /var/www/drupal/cfsc/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Volunteer_Form_Volunteer), "upload")
#8 /var/www/drupal/cfsc/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Volunteer_Form_Volunteer), "upload")
#9 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("upload")
#10 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
#11 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Volunteer_Form_Volunteer", "Manage Volunteer", NULL)
#12 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:14))
#13 /var/www/drupal/cfsc/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#14 /var/www/drupal/cfsc/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:4))
#15 [internal function](): civicrm_invoke("event", "manage", "volunteer")
#16 /var/www/drupal/cfsc/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#17 /var/www/drupal/cfsc/index.php(21): menu_execute_active_handler()
#18 {main}

```

What am I doing incorrectly? Thanks!

# Answer
I know this is a late answer, but I believe the blog post announcing the beta 2 release acknowledged this error. At that stage, the standalone volunteer project functionality was prioritized over the event integration. The bugs introduced in the volunteer/event integration were addressed before the final 2.0 release, and these features are working together nicely now.
> 1 votes

---
Tags: civivolunteer, 4.6.8
---


# Question
Title: Exports in 4.7.6 are not working correctly
If I do any type of search and then try to export my search results, the export CSV only contains one record. Even if the search finds hundreds of records, and I tell the export to export them all, I only get one record in the CSV.

It was working fine for us on 4.6, but as soon as we upgraded to 4.7 this broke.

Are other people having this issue? Anyone have any thoughts on how to fix this?

Any help at all would be appreciated. Thanks.

# Answer
> 5 votes
This is a bug and will be updated in the next release. In the meantime, you can use this PR to fix.

Further info on Jira.

---
Tags: 4.7, issues, export
---


title: CiviReports filtering on email adress

text:
# Question
Title: CiviReports filtering on email adress
I want to display a report of all my contacts with a certain email adress ending, like "@gmail.com".

I find many reports that display email adress as the result, but I fail to find any report that can filter on email adress.

> Is there a CiviReport that can filter on email adress?

# Answer
> 1 votes
I don't believe there is a core report that allows filtering by email. Have you checked to see if there is one in an extension?

An alternative would be to create a smart group where the criteria is, for example, "%@gmail.com". Most reports will let you filter by group.

---
Tags: civireport, email
---


# Question
Title: How to link preexisting fundraising pages to 'contributions' when setting up CiviCRM
My NGO is thinking about setting up CiviCRM primarily to coordinate donations but we're totally new to all of this. We have various preexisting fundraising pages and profiles on other websites through which people can donate. Is it possible to link all of these diverse sources through to the CiviCRM Contributions section so they're coordinated? How is this done?

# Answer
The standard way of using CiviCRM is to create contribution pages within CiviCRM for displaying on your website to collect donations.

You **may** be able to do what you want using the API, but that would need definitely need to be set up by a developer. (I am not a developer hence the "may".)
> 2 votes

# Answer
If you can replace any links pointing to those 'other' systems and send everyone to the Contribution page as explained by JoAnne
> 0 votes

---
Tags: contributions, evaluating-civicrm
---


title: Error with CRON after updating to 4.7.6

text:
# Question
Title: Error with CRON after updating to 4.7.6
I am getting the following error after updating to 4.7.6:

> Warning: Missing argument 1 for CRM\_Utils\_System\_Joomla::getDefaultSiteSettings(), called in /home/mysite/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php on line 687 and defined in /home/mysite/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php on line 698 Error displaying the error page: Application Instantiation Error: Failed to start the session because headers have already been sent by "/home/mysite/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php" at line 698.

I did not have this error in 4.7.4, skipped 4.7.5 update. Running Joomla 3.5.1 and Php 5.5

# Answer
I discovered I had an issue with Joomla's database. Here is the answer I found: The fix is easy:

1. Enter your Joomla site's backend
2. Select from the admin menu: Extensions -\> Manage -\> Database
3. Click on the FIX button. You may find that some other updates need to be done to bring the database up to 3.5.
4. Head to Global Configuration, and turn the site 'off' before this next step to discourage any users for a while.
5. Then, as mentioned above, head to phpMyAdmin and delete all the entries in the xxxxx\_sessions table.
6. Head to the backend and turn the site back on.

http://forum.joomla.org/viewtopic.php?f=710&t=913838
> 1 votes

# Answer
just pass the argument to this getDefaultSiteSettings(); of your live site url: something like this $this-\>getDefaultSiteSettings('http://localhost/CiviCrm/'); at line no: 687
> 0 votes

---
Tags: joomla, error, cron-job, cron
---


# Question
Title: CiviMail not sending mails in 4.7.6 / Drupal 7 "DB Error: syntax error"
Since upgrading to 4.7.6 we have two CiviMail bulk emails with the status "Running" that have not actually been sent. In the scheduled jobs log there is this message:

> Finished execution of Send Scheduled Mailings with result: Failure, Error message: DB Error: syntax error
>
> Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}
>
> Full message: Finished execution of Send Scheduled Mailings with result: Failure, Error message: DB Error: syntax error

In ConfigAndLog The full error is shown here, but I'm struggling to locate the actual fault / corrective action. Any help greatfully received.

# Answer
> 3 votes
If you'll notice (as per your Google Doc you posted), the last `VALUE` that the query is trying to insert is `( 1668, , 3537, null, '78ed5224ae6ab7d9' )`. The second argument is missing, and therefore the Query is invalid.

Double check if Contact with ID `3537` has an email address associated with it. I don't know why Civi wouldn't catch this error, but that seems to be the issue.

---
Tags: civimail
---


title: Accessing sent emails

text:
# Question
Title: Accessing sent emails
I would like to keep track of emails that I have sent on Civicrm? Is there a way to do this or do I have to print them to keep a record of sent emails?

Thanks

# Answer
> 2 votes
There are a number of options depending on exactly what you are trying to do.

Do you want to view mass mailings sent through CiviMail? If so Robin's answer should help.

Or do you want to view emails that you have sent to an individual contact in CiviCRM? If so, you can view these in that contact's activity tab.

Or do you want to record emails that you have sent outside of CiviCRM against a contact in CiviCRM? If so, you can find more details here: Configuring inbound email processing

# Answer
> 1 votes
Emails sent through CiviMail are stored in Mailings \> Scheduled and sent mailings, just click the 'report' button next to each mailing.

---
Tags: email
---


# Question
Title: When new members sign up an email gets sent to filter.select@gmail.com
We are using CiviCRM 4.6.4 in Wordpress. We have a membership page processed through paypal. All emails are sending from our own SMTP server.

However, when an email is sent as acknowledgement of signup/payment for membership, there is also an email being sent to filter.select@gmail.com

What is this email and how do I stop it from being sent?

# Answer
> 1 votes
Unless you some kind of customization that sends out those emails, I can only think of one place should have a look at:

1. go to "Contributions" --\> "Manage Contribution Pages"
2. next to the contribution page in question, use the link "configure" and then "Thank-You and receipting"
3. tick the box "Email Receipt to Contributor" (if not ticked already) and check if "filter.select@gmail.com" is in the cc or bcc field.

# Answer
> 1 votes
Another possibility could be if you have a profile in use on the membership page which has a setting to notify someone when that profile is filled out. Go to **Administer \> Customize Data and Screens \> Profiles** and click "Settings" on the profile in question, in the *Advanced Settings* section look for "Notify when profile form is submitted":

---
Tags: civimember, email
---


title: How to run triggerRebuild URL

text:
# Question
Title: How to run triggerRebuild URL
Apparently I am not allowed to ask for clarification in the post, so can someone please elaborate on this?

Sounds good. To be sure, please execute ///civicrm/menu/rebuild?reset=1&triggerRebuild=1 which fixes the trigger and function definitions in the database."

It looks like I need to do this, but where/how? I asked my hosting provider and they referred me back here. :/

# Answer
> 3 votes
Sorry for the too terse explanation you received on the other answer, using a shortform that experts are used to. If you are running a Drupal site, example.com, then to rebuild your triggers navigate in your browser (by pasting in the url) to http://example.com/civicrm/menu/rebuild?reset=1&triggerRebuild=1 , for WordPress it is http://example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmenu%2Frebuild%3Freset%3D1&triggerRebuild=1 , and for Joomla it is https://example.com/administrator/?option=com\_civicrm&task=civicrm/menu/rebuild?reset=1&triggerRebuild=1.

Without a reference to your earlier question, I'm not sure which version of CiviCRM you are running. FWIW, I think this fixup may have changed in recent versions.

Make sure you have admin CiviCRM permissions.

---
Tags: database
---


# Question
Title: Outbound SMTP through Google Apps: Rejected Connection
When I try to set up my SMTP through our Google Apps, I keep getting errors:

> Failed to connect to ssl://smtp.gmail.com:465 \[SMTP: Failed to connect socket: Connection refused (code: -1, response: )\]

I have tried all the different ports and also a personal Gmail account. I've seen other questions and how Google puts a cap on email campaigns. We are planning on using our existing Mailchimp for mass emailing. This is also a new installation. Any ideas how to connect?

# Answer
> 2 votes
It doesn't appear to be an authentication issue, it appears to be a network issue. Do you have a firewall on the server, or between the server and the Internet that could be blocking your outbound request to port 465?

---
Tags: email, smtp
---


# Question
Title: DB Error: no such field afer civicrm_domain truncate
In an attempt to solve an issue of

> 'Please make sure the folder is writable' in .../sites/all/modules/civicrm/packages/IDS/Monitor.php

I started looking for solutions in the forums. I followed an advise which became fatal for me. The advise can be read here: https://forum.civicrm.org/index.php?topic=5390.msg41785#msg41785 , namely to truncate civicrm\_domain, which someone confirmed to be effective. It was effective for me in that it broke civi completely. Now after log-in I get everywhere the error:

> Sorry but we are not able to provide this at the moment. DB Error: no such field

How to repair civicrm\_domain?

# Answer
> 2 votes
Try restore that one table from a mysql backup.

If you don't have a backup - then try populate the id, name, description, version, contact\_id. Set config\_backend, locales and locale\_custom\_strings to NULL (i.e. their default) - these will be regenerated - as you reconfigure your CiviCRM (settings, components, countries, currencies, etc). This is for a 4.6.x site

---
Tags: drupal
---


# Question
Title: Advanced Search gives different dataset than same search in Reports
When I use the Advanced Search or Search Builder to select a dataset the returned contacts are correct. If I do the same search using in CiviReport with the same search criteria one contact is displayed twice. If from the advanced search I create a smart group the group contains the correct number of contacts. If I then use CiviReport and search using the smart group one of the contacts is shown twice.

I have looked at the database to see if I can understand what might be causing this without success. It is possible that it has happened after merging the erroneous contact but I am not certain.

# Answer
Advanced Search and Search Builder produce a list of Contacts. But a report can pull data other than Contacts and the Group By in the report can be such that you can get a Contact more than once in your output. For example when pulling a Membership or a Contribution Report.

For a Constituent Report if you're seeing the Contacts more than once: hit the checkbox for Contact ID (under Columns) - to confirm these are the same contacts in your CiviCRM database. If the Contact IDs are different - then go and merge them. If Contact IDs are the same then you are likely selecting a column that a contact has more than one bit of data for.
> 3 votes

---
Tags: civireport
---


title: Network error after upgrade to 4.6.5

text:
# Question
Title: Network error after upgrade to 4.6.5
CiviCRM: 4.6.5 Wordpress: 4.2.2

I have followed the instructions here: https://forum.civicrm.org/index.php/topic,35850.0.html

All CiviCRM and Wordpress extensions are disabled.

Details:

When going into Contributions/Manage Contributions and trying to view the details of a contribution, I get the civiCRM error:

> Network Error Unable to reach the server. Please refresh this page in your browser and try again.

On my google chrome console, I get error:

> Failed to load resource: the server responded with a status of 500 (Internal Server Error) GET http://www.lafabriquecoop.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/con…id=405&action=view&context=dashboard&selectedChild=contribute&snippet=json 500 (Internal Server Error)

# Answer
> 2 votes
I found the problem,

I had the stripe payment gateway configured with the extension disabled.

Thanks!

# Answer
> 1 votes
If you got this "network error' when a civi pop up page came up, try the following.

Go to Admin \> System Settings \> Debug and turn on debug and back trace.

Next, instead of clicking on the Edit link for your Contribution etc, right click and make it open in a new Tab. This should avoid the pop up and cause the page to load as a proper page. if it does, then I suspect you may see the real error. If that is the case, then look in the output for the actual ERROR and paste here.

Then turn off debug.

# Answer
> 0 votes
When experiencing the 'Network Error' bubble in CiviCRM 4.6 after a recent upgrade: review your Extensions in the Manage Extensions list and check to see if you have missed upgrading any of them to their 4.6 compatible version. If you have - hit the Upgrade link. If there is no newer version - then disable that Extension. I just had a 'Network Error' bubble because an Extension was trying to inject a button on the View Contribution screen. Solved after upgrading that Extension to its 4.6 compatible version.

---
Tags: civicontribute, upgrade
---


# Question
Title: Include organization name in employee's postal address
It's a pretty common scenario -- we'd like to print mailing labels addressed to individuals at their workplaces. For example,

Angela Davis
**UC Santa Cruz**
1156 High Street
Santa Cruz, CA 95064

What is the best practice for doing this in Civi? We could just put the organization name in "Street Address", and move the "real" address lines down into "Supplemental Address" fields. In fact, this is what we do -- but it doesn't seem quite right for a couple reasons:

* In Civi's database schema, the "street\_address" column is described as *Concatenation of all routable street address components (prefix, street number, street name, suffix, unit number OR P.O. Box)*. The organization name doesn't seem to belong there, really.
* This is a relational database, so why are we storing the organization name twice (once in the org's own record and once in the employee's address?) There should be a more elegant way to handle this.

Other CRMs include a special "Company" address field, distinct from the "Street Address" field, but again this would be duplicative.

# Answer
1/ to get Organisation name you should be able to use the token {contact.current\_employer} at /civicrm/admin/setting/preferences/address?reset=1 (assuming you have them set up with the employee/employer relationship)

2/ if multiple individuals have same Employer address then use the 'share address' feature if you don't already know about that (so
> 1 votes

# Answer
It sounds like you have the organisation addresses already in the database so Pete's answer is probably what you want.

But for completeness for others who might find this question but don't use the employer/employee relationship I will include the following.

We have re-purposed the 'Address name' field to hold company name for the individuals who want to include a company name in their address. This means that their street address is in the street\_address field. (Our contacts don't have 'Term address' or 'summer address' etc so the original purpose of 'Address name' is not relevant to our system.)
> 1 votes

---
Tags: contacts, mailing, addresses, address-labels
---


# Question
Title: Accessing CiviCRM contact data from external page
I have a civi instance installed on WP and would like to access and display a contact's data on a different (non WP) site.

Tried to embed the whole civi page and pass the contact ID using this url format but since cross origin framing is not allowed it didn't work:

```
http://myserver/wordpress/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview&cid=**XXX**

```

How can I fetch and display a contact's details on an external page?

# Answer
The best way to do that is to make use of the CiviCRM REST API.

It can be used via PHP or via JavaScript.

With that method you collect the data you need, and then you can display it as you like.

Much more information can be found: https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface
> 5 votes

# Answer
We are just working on a situation where a customer wants to send data from a Wordpress form on the website to CiviCRM on another site, check https://civicrm.org/blogs/erikhommel/passing-form-data-from-wordpress-to-civicrm
> 3 votes

# Answer
Using the REST API is probably a good venture when your instance wants to communicate with other servers and systems.

Very important things are to be taken into consideration

1) you have tried to use the API explorer on your civi instance on WP to fetch and display contacts in JSON, from which a request URL will be provide for performing the same operation through REST

2) The site key is replaced in the REST URL with the site key in the civicrm.settings.php probably in ".../wp-content/plugins/civicrm"

3) The security verification process is validated. This is done by ensuring that the current user who sends the request has an api\_key to authenticate the request. you could verify this by searching the contact on your civi instance, getting the id, and then querrying you database with " select api\_key from civicrm\_contact where id='user\_id;'

If the api\_key is not there update the record with " update civicrm\_contact set api\_key='chosen\_key' where id='user\_id "

with all of this you should specify how you want the server to return the data probably in JSON ( by adding argument in URL &json=1 )

Finally you should have a URL that looks like this http://your-server/wordpress/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&id=203&api\_key=XXXXXXXXX&key="XXXXXXXXXXXXXXXXXXXXXXXX"&json=1

The returned data should be useful you can now manipulate and display on the other server page.

You can find more at CiviCRM REST API.
> 2 votes

---
Tags: wordpress, contact-view
---


title: CiviCRM training courses for beginners

text:
# Question
Title: CiviCRM training courses for beginners
I'm a new user of CiviCRM and I would like to ask for specific training courses for beginner users. Where could I find them? Thanks a lot!

# Answer
> 6 votes
There are a good set of answers on this post but since you are asking specifically about training, and that was about 'tutorials' these questions may be subtly different. Perhaps you could clarify in your question if you mean videos, online training, or direct/custom training

# Answer
> 4 votes
Three Important Thing to do

Join The Community - which you have done already

Attend a Meet up - look for the civicrm meetup/event/training near you

Sign up to Civicrm Newsletter

For more information please visit https://civicrm.org/

https://civicrm.org/trainings

https://civicrm.org/documentation

I guess this helps! - All the best for your learning

# Answer
> 3 votes
There is a great video by Oliver Gibson on YouTube titled "CiviCRM for Absolute Beginners". It's a part of the presentation he gave during CiviCon London 2015. If you are more of a YouTube self learner person I would suggest you to watch CiviCRM 101 Webninar(s). There is also a great webinar video by Erik Hommel and another one present on the CiviCRM Channel. Here are the links for webinar(s):

# Answer
> 1 votes
A number of CiviCRM Partner Organisations offer training: https://civicrm.org/partners-contributors

My suggestion: hire a consultant to analyse your org's needs and configure it with you, training at the same time.

---
Tags: tutorials, training
---


# Question
Title: How do I subscribe to a CiviCRM developer email list/group?
I'd like to get more involved with the CiviCRM development process. How can I subscribe to the API or General Development email list/discussion group that I keep hearing about?

# Answer
> 3 votes
To find a list of possible discussion groups/email list, navigate to http://lists.civicrm.org/lists/lists and click on the list you're interested in. On the list's page, click the subscribe button to the left. You'll get an email verifying your interest. Confirm your subscription with the link in the email you receive.

---
Tags: api, email, developer
---


# Question
Title: Contribution Amount via Webform Conditionals (Error)
I use CiviCRM Webform Integration for Event Registration and Payment ; and I use Conditionals to calculate the Contribution Amount :

If ... Then Conditional Amount is set to 45,00 (french format)

When I submit the registration, I get the following error :

Warning : preg\_match(): Compilation failed: nothing to repeat at offset 464 dans webform\_number\_format\_match() (ligne 831 dans /home/paroisse/public\_html/test/drupal/sites/all/modules/webform/components/number.inc). Contribution Amount field value must format numbers as "12 345,68".

(But, if I set this Conditional Amount = 45,00 manually, the submission is OK.)

Is there any explanation for this error ?

# Answer
Seems to be a Drupal problem :

Even if you work in french, you must define every numeric Webform fields in english format (coma thousand separator, period decimal separator).

Contribution amount is an example, but the same problem exists also for any numeric Webform "new component".
> 1 votes

---
Tags: webform-civicrm
---


# Question
Title: Best Practice for CiviEvent using Webform Integration?
I have a complex registration process to have Parent + Children (1, 2, or 3) registered by an "Administrator", including Contribution Amount calculation (and on line payment (if possible)).

I use Webform Integration to manage the registration phase and the Contribution Amount calculation ; and I am quite happy with this (amazingly more than expected : I strongly recommend !).

But I am not sure that I fully understand how this Webform process integrates with CiviEvent : for instance : how to integrate : \- Event location and date (and map), \- Confirmation Page, \- Confirmation email, \- ... which are defined in the Event definition ?

Is there a process Event to Webform and back ?

# Answer
> 6 votes
I use Webform CiviCRM for many Event and Membership registrations - as the key advantage (unlike in CiviCRM itself) you can expose multiple profiles and store them all with relationship - capturing Primary + Spouse + Children all on one page.

Online payment: yes is possible - generally works for inline Payment Processors such as PayPal Pro and iATS Payments (credit card only at this point - on my ToDo list to get this working w/ ACHEFT via Webform CiviCRM). To get online payment to work - you must set up a Contribution Page even if it's just purely for the purpose of the Webform integration - enable a Payment Processor - Webform CiviCRM will use that info to grab/display the Payment Fields and to submit the payment for processing.

Event: location/date/map -\> if you go with Webform Integration - do all that in your Webform - add a Markup Element - and off you go. Once you enable Event Registration in the Webform CiviCRM section you can decide which events and how you'd like to sign people up. How to handle the max participants; if and how to waitlist them - etc.

Don't forget to use Webform Layout - to help make things easy to CSS - and also don't hesitate to use conditionals to pop up e.g. #civicrm contacts fields (kids) you'd like to register.

**To add waitlist functionality:**

* enable Participant Status - on waitlist in your webform -\> you need to visit: /civicrm/admin/participant\_status?reset=1 and enable both `On waitlist` as well as `Pending from waitlist`
* you need to reconfigure your webform\_civicrm (Registration Status) and/or Participant Fee (perhaps a smaller fee or no fee) if you're at the point where you want to start waitlisting people

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


title: Why doesn't my dashboard get saved?

text:
# Question
Title: Why doesn't my dashboard get saved?
If I edit the dashboard widgets and save, it only lasts for the current session. Next time I log in it's the same set up as the default when I upgraded to CIVI 4.7 - i.e. Getting Started, CIVI CRM News, etc. (Joomla 3.5.1)

# Answer
I am pretty sure this happens because the link between your Civi contact id and your CMS user has broken. This happened to one of my clients, the cause was that I moved the Civi database & not the Drupal one, so the link was broken. The table to look at in Civi is civicrm\_uf\_match - field is uf\_id which should link to your CMS user table (in my case, it was Drupal's 'users' table)
> 1 votes

---
Tags: dashboard
---


# Question
Title: How to have a Detailed Membership Report filtered/sorted by pertaining Organization
I have several Organizations

I need a Report which displays the following columns : Organization, Membership Type, Member (first and last name), email, Phone, Status

I would like this Report sorted by the 3 first columns, and/or filtered by Organization.

How can I ?

# Answer
> 1 votes
Personally (others will disagree!) I've always found writing CiviCRM Reports to be a horrible Pain In The MySQL!

There are two really easy ways to get what you want:

1) Make a Custom Profile of type "Search Results" then, on advance search, you will see all of these columns side by side, in whichever order and with ability to sort by any column.

2) (If you are a coder or have access to one) build a custom extension! Extensions that retrieve data and display it are really quick to write - one like this would take less than a day. An expert could bang it out in an afternoon.

# Answer
> 1 votes
To build a View you would start with a view based on Contacts. Then add Drupal relationship (under Advanced) to add Contact A to the relationship of 'employee/employer'. Then add fields for eg Display Name (use Relationship to make it the organisation), add display Name, add Membership Type etc. May need to tinker with Filters too.

---
Tags: civimember, civireport
---


# Question
Title: Does removing wordpress user delete the related civicrm contact?
Does removing a wordpress user delete the related civicrm contact? An admin left the organization so their wordpress login was removed. I now find their civicrm contact in the trash for some reason.

Edit: I just ran another test and the deleted user was still in the list of contacts. So the reason for the deletion of a couple of other contacts/users remains a mystery.

# Answer
Paul, this is not an answer for you but as a note to others that the Drupal behaviour is that if you delete the Drupal user the civicrm record is not deleted. (I sometimes wish it would)
> 0 votes

---
Tags: wordpress, 4.7
---


# Question
Title: My dashlets have stopped working after my host moved my domain to another server
My host moved my site to another server and Drupal/CiviCRM are mainly working fine. However, the dashlets on the dashboard are no longer working. Each dashlet comes up as follows:

> Not Found The requested URL /civicrm/report/instance/42 was not found on this server. Apache/2.2.16 (Debian) Server at XXXXXXXXXXXXXXX Port 80

I've tried clearing the caches, upgrading Civi to 4.6.10 and restarting the VPS, but it's not fixed it.

If I look in the Apache error log, it comes up with a version of this error for each dashlet:

> File does not exist: /etc/apache2/htdocs/civicrm/report/instance/42

Does anyone have any idea what might have changed?

# Answer
Please check your civicrm.settings.php and after that

* Administer - System Settings - Directories
* Administer - System Settings - Resource URLs
* Administer - System Settings - Cleanup Caches and Update Paths

And then Clear Cache again
> 5 votes

# Answer
Ok, my host support team have now fixed the problem. Here's what they did:

> In /etc/hosts, your website XXXXXXXXXXXXX.co.uk was pointing to one server IP address, but the Civi website was running on the other IP address. I corrected that and things are working now.
>
> Civi seems to be a little unusual in that it fetches sub-pages via php code running server side; this code was not able to access pages on it's own site.
> 3 votes

# Answer
Another case is when you use Geoip blocking on a server that is not located in one of the allowed IP addresses. For instance when you only allow access from France and the server is located in Germany. In that case you have to specifically allow access from the IP address of the webserver. In my case I used an Apache module and had to add the line "allow from server.ip.address". Without that you lock out the server from accessing itself.
> 0 votes

---
Tags: dashboard, hosting
---


# Question
Title: is there a maximum number of memberships?
Is the number of contacts or memberships we can manage for free limited ? I don't see this information on your website.

# Answer
CiviCRM is a free, open source software package. You can download it for free, and you can do what you like with it.

The number of contacts or memberships supported is not limited by licensing or restricted in any way. Practically speaking, the limit will be what your website hosting can support.

For most cases this is effectively unlimited - some CiviCRM sites have millions of contacts. Organisations of that size tend to spend more on hosting than smaller orgs. Your mileage will vary according to your needs. I know of sites running some thousands of contacts on "commodity" website hosting. While this works, it can be more work (and cost) than using a provider familiar with CiviCRM.

Getting up and running is the first step, but in future you'll likely need help keeping your site running well, ensuring your contact data is secured appropriately when updates are released, and configuring or customising the features your org needs.

You'll find there is a great community supporting CiviCRM and its users, with places like the forum and IRC. If your org has technical skills "in house" you'll probably be able to get up and running by yourselves. Even so, find some allies to help you on your way. You might find some orgs in your space or existing network who are using CiviCRM, and there are a range of commercial outfits supporting CiviCRM as well.
> 8 votes

---
Tags: civimember, contacts, evaluating-civicrm
---


title: member login; view & pay pledges

text:
# Question
Title: member login; view & pay pledges
I run an organization that takes pledges from members. I am looking for software that would allow members to login to their accounts; view past and outstanding pledges and pay online for any money that is owed. Does CiviCRM do this? Thank you for any assistance that you can offer.

# Answer
> 5 votes
CiviPledges can be set up so that \- a logged in contact can see their upcoming Pledges on their dashboard \- a contribution page can be set up as a self-service payments page

I set one up on the Drupal demo site so it should be there for a few hours before it flushes.

Dashboard is here

Setting up a pledge is here

The self-service payment is here but will only show if 'demo' contact has a pledge set up

If you need to add a Pledge to contact called 'demo' you can do so here

Hope that helps you.

---
Tags: payment-processor, evaluating-civicrm, pledges
---


title: Using Profiles for Data Entry

text:
# Question
Title: Using Profiles for Data Entry
I am using profiles for data entry in my CiviCRM instance. They seem to be working (the contacts that should be created are saving), but I get the following (big ugly) notices at the top of the page on a save:

```
Notice: Undefined index: contact_sub_type in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2010 of /var/www/html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).
Warning: in_array() expects parameter 2 to be array, null given in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2011 of /var/www/html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).
Notice: Undefined index: contact_sub_type in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2012 of /var/www/html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).

```

The contact\_sub\_type\_hidden is being submitted when the form is submitted with an appropriate value, so I'm at a bit of a loss as to why these errors are being thrown and what impact they have on what I'm doing. Any pointers appreciated.

# Answer
In Drupal under Configuration \> Development \> Logging and Errors ie admin/config/development/logging you can set Errors and warnings to be 'off' and it is normal to do so on the production site, while leaving them showing on the development version.

The reason you don't see this on 'edit' but do on 'create' is, as you say, because Edit uses the overlay, but if you were to right click on the button instead and open in a new tab then I would expect the error is showing.

This doesn't answer your 'how do we fix it' but might explain how to avoid the error showing to users.
> 3 votes

---
Tags: drupal, profile, 4.7, issues
---


# Question
Title: Embedding Google Analytics code on CiviMail message
I'm guessing this isn't possible, but it never hurts to ask...

We publish our newsletter using CiviMail and have the mailings publicly visible, then add links to the published version for people to access via our website and from social media. However, when people visit this web-based version of the newsletter, it doesn't show up in Google Analytics. Most of the other pages we make public through CiviCRM do show up because they load the full frame of our website, which includes the tracking script.

I know how to add tokens to links to have them be tracked, but is there a way to add the tracking code that is embedded in website pages to the web-based version of the message? I imagine that adding the Google Analytics tracking script to the message itself would trigger spam filters. Is there a way to have code just in the web-based version of the messages, but not in the emailed version?

# Answer
This doesn't seem to be supported yet, but thanks for asking - giving voice to needs is how these things start!

Currently CiviMail generates a URL like http://dmaster.demo.civicrm.org/civicrm/mailing/view?reset=1&id=10 which renders the mail as sent out (without site theme).

First thought: look at using your existing site theme to include your tracking codes, and display your newsletter content wrapped in the default site theme. This might be possible by commenting out the `CRM_Utils_System ::civiExit()` line mentioned in @diegov's answer below, or by (eg) creating a Drupal View which displays the rendered Mailing content at a similar path but without skipping the site theme.

Alternatively, a quick CiviCRM extension could detect the mail when viewed over the web and include your tracking codes?

Both of these would require some work, so consider contributing the end result back to the community if you do take it from here! And if you can't, maybe post it as a feature request on issues.civicrm.org?
> 5 votes

# Answer
You could achieve this but, AFAIK, it would be needed to change a core PHP file do CiviCRM. This file would be `civicrm/CRM/Mailing/Page/View.php` and you should add a line inserting the Analytics call, something like that in the lines 193-195:

```
  print $content;
  echo 'Your Analytics code here';
  CRM_Utils_System::civiExit();

```
> 3 votes

---
Tags: civimail
---


title: Links corrupt on send

text:
# Question
Title: Links corrupt on send
I use our CiviCRM database to send out mailings to members. The mailings contain links to articles on our website. It has worked well for years but now when I press 'Send' the links in the email corrupt and reference a CiviCRM link instead of the website link so recipients can't access it. For a while I didn't notice because of course when I click the link myself in the copy I receive, it opens, and CiviCRM doesn't give an alert or warning.

Any idea what's happening and how I can fix it? (Remember I'm not an expert!)

# Answer
> 2 votes
When you create a mailing with CiviMail, there's an option:

> Track Click Throughs
>
> Track the number of times recipients click each link in this mailing.
>
> NOTE: When this feature is enabled, all links in the message body will be automatically re-written to route through your CiviCRM server prior to redirecting to the target page.

Perhaps you have enabled this option? This wouldn't normally prevent the links from working, however.

Are the links in the email something like, http://mysite.com/sites/all/modules/civicrm/extern/url.php?u=123&qid=12345 ? If so, that is normal when tracking click throughs is enabled.

What happens when a user clicks on one of the links?

Which CiviCRM version and CMS (Drupal, Wordpress or Joomla) are you using?

# Answer
> 0 votes
If it works for you but not for anonymous users, it is likely connected to a permission problem either caused by CiviCRM/your CMS or your server set up. Did you change anything on your set up lately e.g. put your install behind a VPN?

---
Tags: issues, links
---


# Question
Title: In 4.7 a contact's activites are in ascending date order: should that be descending?
In previous versions of CiviCRM, a contact's activities were listed most recent first on the Activities tab of their record. This is handy for seeing what they've been up to recently.

In 4.7 they're shown oldest first. As we've been using CiviCRM since 2008 some of our data is OLD!

Is this a feature or a bug?

If it's a bug, it can be fixed by modifying line 42 of templates/CRM/Activity/Selector/Selector.tpl and changing "asc" to "desc".

# Answer
> 1 votes
This is believed to be an unresolved bug and is reported at https://issues.civicrm.org/jira/browse/CRM-18275?jql=project%20%3D%20CRM Hope this helps.

---
Tags: contacts, activities
---


title: Adding states to countries

text:
# Question
Title: Adding states to countries
Hello we are moving an old CRM into CiviCRM. We are a very international organization and we have found that CiviCRM is missing many states. How do we get this added to CiviCRM? Should we make these additions to our instance, or can we get this added to the standard CiviCRM state table?

17. Gabon: No States.
18. Ghana: Some States are missing.
19. Gibraltar: No States.
20. Greece: Syros is missing.
21. Greenland: No States.
22. Guadeloupe: No States.
23. India: Telangana is missing.
24. Macedonia, Republic of: No States.
25. Malta: Some States are missing.
26. Mexico: Michoacan is spelled wrong.
27. Moldova: States are missing.
28. Montenegro: States are missing
29. Nepal: No States.
30. Paraguay: Central is missing.
31. Portugal: Coimbra is spelled wrong.
32. Serbia: States are missing.
33. Seychelles: States are missing.
34. Singapore: States are missing.
35. Sweden: Halsingland is missing.

36.Tajikistan: Karotegin is missing.

37. Thailand: Bueng Kan is missing.
38. Togo: Plateaux is missing.
39. Venezuela: Bolivar is missing.
40. Yugoslavia: it doesn’t exist, move states to new respective countries.
41. Zambia Some States are missing.

# Answer
The countries in CiviCRM are based on ISO 3166, and the state / province list per country is based on ISO 3166-2. Not all countries have these defined, and we may need to grab a more up to date copy. Can you check against http://www.unece.org/cefact/locode/subdivisions.html and comment if that is sufficient? Alternatively, you can update the list in your instance of CiviCRM using a tool like phpMyAdmin to include unofficial states and provinces of countries by adding records to the civicrm\_state\_province table.
> 2 votes

# Answer
There is no specialized mechanism for updating the state/province values in the database. You can file an issue in JIRA (https://issues.civicrm.org/) and provide the details there, and someome from the team can add the appropriate changes for the next release.

You could also apply the changes at Github and then request a pull. The `civicrm_state_province` table is populated during installation via https://github.com/civicrm/civicrm-core/blob/master/xml/templates/civicrm\_state\_province.tpl . You can find country IDs in the country ID template.
> 4 votes

---
Tags: database
---


title: How can I speed up CiviCRM on Wordpress

text:
# Question
Title: How can I speed up CiviCRM on Wordpress
Hi I've installed CiviCRM on Wordpress. The Wordpress side of things run smoothly and fast. But inside the administration area of CiviCRM adding contacts, and any other administrative functions takes around 45 seconds or longer for a page to load or update after saving changes. I am currently using the 2013 Theme for Wordpress.

Are there any tips and tricks I can use to get the Civi side of the site to move faster? Thanks.

# Answer
> 16 votes
We struggled with this initially. Things we went through:

1. Check the debug console in Chrome to make sure Civi isn't having trouble finding resources - look for 404s in the Source tab. This can slow down Civi tremendously as it waits for them to time out. Can be fixed in the Admin -\> Resource URLs / Directories / Update Paths
2. If you're running PHP 5.3, get APC cache. If you're on 5.5, turn on PHP Opcache (probably with this). With 5.4 you can install ZendOpcache, but if you can upgrade to 5.5 you probably should. This can make a huge difference.
3. Disable all Civi extensions and see if speed is better. Then turn them on one by one to see if any in particular are being problematic.
4. Ditto WordPress plugins. These can be deadly - we have a couple that are very heavy-duty (Admin Menu Editor Pro is great, for example, but can slow things down). I take the hit on them, but it's a close-run thing.
5. Try disabling the cron job and restarting apache (or whatever), just to make sure that's not doing stuff that's slowing everything down.
6. If you want to get really fancy, there's a WordPress plugin you can hijack to kill all WP plugins loading on certain Civi pages - instructions here.
7. Also on the server, install memcache and turn on memcache support in the civi settings file. Honestly, this might just be placebo, but it *seems* a bit faster
8. Might be worth optimizing the database tables in phpmyadmin, just in case those have gone wrong somehow.
9. Civi 4.5+ is pretty snappy, so do update if you're still on 4.4.x. \[Edit: some big sites have found upgrades to 4.6, then 4.7, then 5.0 continue to improve performance.\]
10. Turn off as many search options as possible in Admin -\> Customize Data and Screens -\> Search Preferences to see if any of those help (they never did for me, tbh, but others report good results).
11. Turn off Smart Group caching on the above page by setting it to 0, in case it's running that every 5mins and dragging everything to a halt.
12. If the issue is that your server is struggling, WP-Super-Cache does a good job of caching WordPress front-end pages so the server can focus on important stuff, and is very configurable.
13. Make sure mysql caching is turned on.
14. Check the mysql slow queries log to see if it's struggling to extract data. Normally this isn't a problem, but worth checking.
15. If all else fails, you might just need hardware resources (memory and CPU), or a VPS, or a dedicated server. We moved onto the latter and it made a big difference.

# Answer
> 3 votes
I've sped up CiviCRM considerably by using NGINX over Apache, huge speed boost!

# Answer
> 3 votes
In general, the CiviCRM code is not that much slower than Wordpress, so something other than CPU is involved here. I'd suggest your two best lines of inquiry are:

1. If the slowness is very specific to after saving a new contact or making changes, then either your SQL server has way too much caching, or else you have some kind of slow extension/customization that is executing after the save (e.g. perhaps you've got geo-coding turned on and it's failing to communicate with that external service - many providers tend to block or slow down outgoing http requests, I've noticed).
2. If the slowness has no particular pattern to it, then it might be just running out of RAM (i.e. server memory). When that happens, servers get super slow as they swap stuff in and out to disk.

In any case, your first step is to get more diagnostic material. DON'T just start trying random fixes recommended by your brother-in-law - chances are that you could be muddying the waters and making things worse (or maybe that's how you got into this in the first place ...).

---
Tags: wordpress, best-practice
---


title: Multiple value field makes Listing loop

text:
# Question
Title: Multiple value field makes Listing loop
I'm modifying `/templates/CRM/Profile/Page/Listings.tpl` to a specific customer need. The profile I need to show using that includes a Multiple Value custom field.

When I tried the Listing with a record (Contact ID) with more than one value in that custom field, is shown multiple times that Contact ID, each one with one value from the Multiple Value custom field.

I turned debug on and the $rows array really shows multiple entries, each one with one value from the Multivalue field.

No matter if I turn `is_multi_summary => "1"` on or off, it doesn't change anything.

The code from Listing.tpl I'm working on looks like that:

```
  {foreach from=$rows item=row name=listings}
  <div id="row-{$smarty.foreach.listings.iteration}" class="{* cycle values="odd-row,even-row" *} ppindiv">

    <p class="crm-{$columnHeaders.2.field_name}">{$row.2}</p>
    <div class="crm-{$columnHeaders.1.field_name}">{$row.1}</div>
    <p class="crm-{$columnHeaders.5.field_name}">{$row.5}</p>
    <p class="crm-{$columnHeaders.7.field_name}">{$row.7}</p>

  </div>
  {/foreach}

```

Also, makes no difference if I use the original loop to show the values, like that:

```
  {foreach from=$row key=index item=value}
    {if $columnHeaders.$index.field_name}
      <p class="crm-{$columnHeaders.$index.field_name}">{$value}</p>
    {else}
      {* $value *}
    {/if}
  {/foreach}

```

Things still got duplicated.

Is it possible to says Smarty to show the Multivalue Field only once, with all the values inside? Like a localized "foreach"?

# Answer
Answer or sort of.

First you cannot pass numbers as index ie. `$columnHeaders.1.whatever` smarty will print just `$columnHeaders`

Second, same applies for `$rows`, I guess it holds an array of arrays with perhaps an `id` for each array with the custom fields, or just an index, if that's the case you need to nest your loops.

Example:

```
{foreach from=$rows key=index item=row}
     {foreach from=$row key=field item=value}
        <p>{$field}: {$value}</p>
     {/foreach}
{/foreach}

```

Hope that gives you a hint and helps.
> 1 votes

---
Tags: profile, joomla, 4.7
---


title: how to add a Pledge to contact

text:
# Question
Title: how to add a Pledge to contact
**Hi, How do I add a Pledge to contact so that he may view & pay pledges thru the self-service payments page?**

# Answer
> 2 votes
Did you read the manual before asking this question?

As per my reply here

CiviPledges can be set up so that

* a logged in contact can see their upcoming Pledges on their dashboard
* a contribution page can be set up as a self-service payments page

Setting up a pledge is here

The contacts Dashboard is here

The self-service payment is here but will only show if 'demo' contact has a pledge set up

If you need to add a Pledge to contact called 'demo' you can do so here

Hope that helps you.

---
Tags: pledges, civipledge, simple-donate-form
---


# Question
Title: In 4.7 the activity 'Assign Case Role' is assigned to the client: is this a bug?
I can reproduce this on the 4.7 demo.

I create a case of type 'Adult Day Care Referral' for client Rebekah Adams.

Using the civicrm/contact/view/case screen, I assign the role 'Health Services Coordinator' to Junko Adams. I use the 'pencil' icon to do this.

The role is assigned to Junko Adams, but the 'Assign Case Role' activity is assigned to Rebekah Adams (the client) and the subject is 'Health Services Coordinator is : Dr. Rebekah Adams'.

That's confusing, and if an email is sent to the client, that could be nasty.

# Answer
It's a bug. On line 1804 of CRM/Case/BAO/Case.php there is the following test ...

```
   if (isset($dao->caseId) || $dao->rel_contact_id != $contactId) {

```

Observing how the function is called, the Case Id will always be set, so the condition is always true and the else part is never executed.

Changing the condition to ...

```
   if ($dao->rel_contact_id != $contactId) {

```

fixes the behaviour.
> 4 votes

# Answer
It doesn't send an email. There's a couple things like that - e.g. merges show the reported by as the client. I'd probably say it's just never been a high enough priority for anyone to look into.
> 0 votes

---
Tags: civicase
---


# Question
Title: CiviReport - Can Report Titles be sorted?
I've created about 20 reports under Event Reports but Civi seems to sort the report titles in order of creation. Is there way to have the report titles sorted alphabetically?

# Answer
I don't think there is.

I would get around this by creating a new top level menu item called "XYZ reports" (assuming you work for company XYZ).

Then you can add major categories so that you can group reports as you want. (I have finance, membership, fundraising,training and marketing as my categories/parents for the reports.) Once you have assigned a report to the appropriate parent menu you have complete control over the order of the reports via Administer \> Customize Data and Screens \> Navigaiton Menu.
> 3 votes

---
Tags: civireport
---


# Question
Title: Cannot create Survey when Events have 'is required' custom data: is this the fix?
This is an issue with 4.7.6 and its reproducible on the Drupal 7 demo site.

1. Create a custom field called 'X' for Events that is required
2. Attempt to create a Survey via civicrm/survey/add (enter values and press 'Continue')

Step 2 fails with the error 'X is a required field'

The issue can be fixed by changing line 83 of CRM/Campaign/Form/Survey.php ...

```
$this->set('type', 'Event');

```

to

```
$this->set('type', 'Survey');

```

This change fixes the problem, but I'm unsure whether there is a deeper issue.

The form that is used by civicrm/survey/add is CRM/Campaign/Form/Survey/Main.php. The parent form is CRM/Campaign/Form/Survey.php. The possibly deeper issue is that the preProcess function of both forms (Main.php and Survey.php) deals with Custom Data.

I feel the child form (Main.php) should leave it to its parent to deal with Custom Data. But I think someone from the Core team might need to look at that.

# Answer
I've created an issue and a PR for this fix. See https://issues.civicrm.org/jira/browse/CRM-18447 and https://github.com/civicrm/civicrm-core/pull/8188
> 1 votes

---
Tags: civicampaign, civisurvey
---


title: How can I use CiviCRM's cache table?

text:
# Question
Title: How can I use CiviCRM's cache table?
When developing an extension, I'd like to cache some data to avoid the expense of re-calculating it. Is there a civicrm version of the Drupal's caching interface for developers?

# Answer
> 4 votes
I found the corresponding reference page here:

https://docs.civicrm.org/dev/en/latest/framework/cache/

Looks straightforward:

1. Set a cache value with Civi::cache()-\>set('mykey', 'myvalue');
2. Get a cached value with Civi::cache()-\>get('mykey');
3. Delete a cached value with Civi::cache()-\>delete('mykey');
4. Flush the entire cache with Civi::cache()-\>flush();

As far as I know, the civicrm caching schema is pretty simple, there's just one key/value table.

As an aside - I just discovered that Herb @ freeform has contributed a recent patch for using Redis as the cache backend. I'm a Redis fan also, so thanks Herb!

---
Tags: extension, developer, cache
---


title: Event Webform Templates?

text:
# Question
Title: Event Webform Templates?
I have a complex Event registration process, for which I create a complex Webform (I use Webform Integration).

This event recurs several times a year, and the webform is painful to re-create each time.

Is there any way to either clone an existing webform (then adapt), or create a Event Webform template from which I could then derive individual Event Webform occurrences ?

# Answer
This is more of a Drupal answer than a CiviCRM answer, but I believe you can use Node Clone to copy/duplicate webforms.

> The clone module allows users to make a copy of an existing item of site content (a node) and then edit that copy. The authorship is set to the current user, the menu and url aliases are reset, and the words "Clone of" are inserted into the title to remind you that you are not editing the original content.
> 3 votes

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


# Question
Title: Timestamp mismatch between MySQL and PHP
Every time I log in to CiviCRM I get the following error message:

> Timestamps reported by MySQL (eg "2015-11-06 13:44") and PHP (eg "2015-11-06 11:44" ) are mismatched.

I am using CiviCRM 4.6.10 and Drupal 7.41.

The host (CiviHosting) has said that the MySQL server timezone is set to "Europe/Sofia" and can't be changed.

I have set the PHP timezone via php.ini to match this:

```
date.timezone = "Europe/Sofia"

```

However, I am still getting this error message.

The date section of phpinfo shows the following:

```
date/time support   enabled
"Olson" Timezone Database Version   2013.3
Timezone Database   internal
Default timezone    Europe/London

Directive   Local Value Master Value
date.default_latitude   31.7667 31.7667
date.default_longitude  35.2333 35.2333
date.sunrise_zenith 90.583333   90.583333
date.sunset_zenith  90.583333   90.583333
date.timezone   Europe/Sofia    Europe/Sofia

```

(Note that the 'Default timezone' is different to the 'date.timezone'.)

Any idea how I can fix this?

Thanks for your help.

# Answer
I have discovered that if I change the timezone for my Drupal user account to 'Europe/Sofia' then I no longer get this error message.

This solves the problem, but not in a very satisfactory way as I'm based in the UK and would like the timezone for my user to reflect this.

It appears that CiviCRM creates this error message if your Drupal user account isn't in the same timezone as the database server.

I'm still not sure if this actually causes any real problems. See my related post: Does the 'timestamp mismatch' error cause any real problems?
> 1 votes

# Answer
I have flagged a similar problem with Joomla as an issue a long time ago and submitted some code to solve it:

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

The CiviCRM team reckon it will be fixed in 4.7.7.
> 2 votes

# Answer
check what's the timezone under /admin/config/regional/settings, drupal can overwrite the php default timezone
> 1 votes

# Answer
This is one possible solution.

https://beta.suresupport.com/faq/article-1568/en/setting\_mysql\_session\_time\_zone

Another is setting the 'timezone' property in php.ini or .htaccess file, or in civicrm.settings.php or drupal's settings.php
> 1 votes

# Answer
As an experiment, I edited your CRM/Utils/System/Base.php file and changed:

```
      $sql = "SET time_zone = '$timeZoneOffset'";

```

to

```
      $sql = "SET time_zone = 'Europe/London'";

```

and that seems to have fixed the problem. This is certainly not the ideal solution, but it does work.
> 1 votes

---
Tags: drupal, mysql, php, timezone
---


# Question
Title: Is CiviCRM a 'master database' / 'master system'?
The membership organisation I work for currently has serious issues with it's membership databases. That information is currently split between a wordpress user database with an extension s2pro which extends that, mailchimp, paypal, and an accounts package KashFlow.

Those all have various relations with each other but somehow seem to conflict and don't work properly - resulting in the system unsubscribing people from mailchimp, and various other problems with data not matching up.

My manager thinks that what we need to sort this out is a new 'master database' for the membership information which would communicate directly with all the other software packages and be an authoritative place for the data, rather than them all talking to each other and conflicting.

I'm wondering, would CiviCRM be able to serve as that master system? Thanks.

# Answer
> 6 votes
Yes, CiviCRM would be a great match for what you're describing. CiviCRM is a central 'master' information hub that has quite a bit of reach out of the box:

Using KashFlow for accounting, there may be a little bit of custom work involved for you (or a developer) to customize the CiviCRM CSV export for accounting information (looks like Kashflow has a good bit of CSV instructions on what is needed for their system; without diving into the particulars, hard to say if custom work would be needed). The default CSV accounting batch export from CiviCRM has a large number of fields: it would be a matter of making sure your Kashflow-needed fields are in that export and potentially removing the unneeded ones.

Personal testimony: prior to using CiviCRM, our organization had a separate contact management system for each department, and none of the systems talked with each other (and manual comparisons between them often resulted in conflicting information). We have benefited 100x fold from the time and energy put into learning and customizing CiviCRM. We have one central place, integrated with our website, that keeps all our information current and accessible for staff. I'm so glad we made the choice to introduce CiviCRM into our administrative process.

---
Tags: civimember, database, evaluating-civicrm, integration
---


# Question
Title: Where do you put human contacts on the Organization entry?
When you create a new contact for an organization on CiviCRM, there does not seem to be any place to add the name of a human contact. Am I missing something?

# Answer
> 10 votes
Both organizations and individuals are 'contact' entities in CiviCRM (a household is also a 'contact'). An organization is a separate 'contact' from the individuals related to that organization. By having the organization entity separate from the people in/related to that organization, you can specify the nature of the relationships those people have to the org.

You'll want to create an organization (Top menu \> Contacts \> New Organization, as you have done) then separately create individuals (Top menu \> Contacts \> New Individual) who have relationships to that organization. You can connect the individual(s) to the org with either the Current Employer field or using the relationships tab on a contact's summary screen once a contact has been created.

You can read more about contacts and relationships here: http://docs.civicrm.org/user/en/4.6/organising-your-data/contacts/

# Answer
> 2 votes
You don't. a human contact is a contact type "individual", what you create is an organisation.

If you want to create a human, create an individual, and set the current employer as the organisation. it will automatically create 2 contacts, the individual and the organisation, and create a employee/employer between them

you can as well later on update the relationships between organisations and individuals from the relationship tab. You can even create new type of relationships (volunteer, member of the board...) on the top of the standard employee.

X+

# Answer
> 1 votes
I also often like to have an individual associated with an organisation, but don't want to create a separate record for them, although that is clearly the more flexible option.

So I have created a simple Custom Data field that I call "Main Contact" that appears on the Summary page of an Organisation contact type, with a simple text field for the main person associated with the organisation. It's not hard to do and fits our use case much better than creating a whole new record for that person. It also means you can customise the Email or Postal Greeting to have something like "Dear Mr Smith, Duke Street Church".

# Answer
> 0 votes
For email & snail mail I use the main contact for the email address, addressee and and greetings in the Organization record.

---
Tags: contacts
---


# Question
Title: Backbone JS error with 4.6.4 on WP messing up contribution page set up
It feels inappropriate posting this on Stack Exchange, but I don't see any other viable option since the support forum has been deprecated and no-one goes there any more, so here goes:

Just upgraded to 4.6.4 on a simple up to date Wordpress site. When setting up a contribution page the Receipting tab doesn't load correctly, the clickable fields that open up into CKEditor text areas don't work. I'm seeing a JS error in the Console: "TypeError: Backbone.Marionette is undefined" and a reference to line 11 of civicrm/js/crm.designerapp.js

Can't replicate on the demo site, but then again that is apparently not running 4.6.4, but 4.6.5.

Anyone?

# Answer
It seems that newer versions of Marionette do not like the Backbone.Marionette.Application call, and would rather have Marrionette.Application.

So changing line 11 in civicrm/civicrm/js/crm.designerapp.js from: CRM.designerApp = new Backbone.Marionette.Application(); to: CRM.designerApp = new Marionette.Application(); removes the error and allows the date picker lines to show correctly.

However, I'm unable to figure out what's changed to get the Profiles section to work, which is where the error:

TypeError: Backbone.CollectionSubset is not a constructor - (line 225, col 14) subset = new Backbone.CollectionSubset(options);

in file civicrm/civicrm/packages/backbone/backbone.collectionsubset.js is coming from. Seems like it may be a larger reworking will be needed, but I'm pretty much stabbing at the dark on all of this.
> 1 votes

# Answer
On closer investigation, and with thanks to @coleman for referring me to the troubleshooting guide, I have successfully identified the culprit as the JetPack WP plug-in. With it de-activated, my contribution page set-up works without a hitch.
> 1 votes

---
Tags: javascript
---


# Question
Title: Problem with membership on behalf of orgnization
We accept registrations on behalf of organizations. We have been requiring users to provide organization level data when purchasing a membership. However, after filling out the membership contribution page and clicking Next to confirm the data, the organization level data does not show on the confirmation screen. Additionally, after clicking the button to finalize the payment, we receive error messages that all organization level data is missing and must be provided even though we have filled in the data. We have noticed that if we make the organization level information optional, rather than required, and the user chooses to register on behalf of an organization, the process works fine.

We are running 4.7.3 with WordPress 4.4.2.

Error screenshot:

# Answer
4.7.6 seems to have resolved this issue
> 2 votes

---
Tags: wordpress, civimember
---


title: Creating a Report on Donor History

text:
# Question
Title: Creating a Report on Donor History
Good morning,

I need to look through our donors and see who is a recurring donor and who is not. What is the protocol to create these kinds of reports?

Thank you!

# Answer
> 2 votes
Install this extension: https://github.com/adixon/ca.civicrm.contributionrecur

And it will create a report template (Reports -\> Create Report from template) for you that you can use to get at all your recurring series data (frequency, installments, status, amount, next scheduled date and more).

For anyone using the iATS payments extension we include a report template very similar to that.

# Answer
> 1 votes
You can use a search (slightly different from a report) by going to **Search menu \> Advanced Search**. From there, open the "Contributions" section (by clicking on the header) and then open the "Recurring Contributions" subsection. Set your criteria and press "Search".

# Answer
> 0 votes
You can read more about creating reports here: What is CiviReport?

However, for this sort of question you may find the search functionality is more powerful. By using an advanced search you can filter your contacts by a range of different criteria to generate the information you need. Read more here: Advanced Search

---
Tags: civicontribute, reports
---


# Question
Title: Get Temporary Files Directory value from my extension
In my extension I need to write a temporary .csv file but (it's my first extension) I'm not able to get the configured "Temporary Files Directory" value. How can I do it? Thanks

Marcello

# Answer
You can get any settings values from the API and, you can see how, exploring the API through http://yoursite.site/civicrm/api URL.

To answer your question you can follow this screenshot:
> 2 votes

---
Tags: extension
---