# Question
Title: Price Set won't let me turn off auto-pay on contributions
I'm using Drupal 7.43 and CiviCRM 4.7.4., I'm trying to set up a contribution page that will let users pay a one time initiation fee, and then pay their first month dues, with the option to auto-renew the dues.

I created a financial type 'Initiation', and created a membership type for the group with auto-renew optional. I created a price set, see the attached screen shot, where I have one field with radio buttons that has 4 initiation options, each leaves the membership type blank, sets the financial type to initiation, and sets the term to 0. I then created another radio button field with membership options, all tied to the correct membership type.

I then created a contribution page, where I used the membership tab to connect to the price set. However, when I got to the contribution page, it has an auto-renew option for both the initiation, and the membership.

Is this a bug? Or am I just doing something wrong?

enter image description here

# Answer
Unfortunately CiviCRM doesn't cuurently have support without custom programming for doing a one time payment at the same time as setting up recurring payments.

A very simple custom CiviCRM extension built using civix could implement a postProcess hook that filters for the correct contribution page, and then creates a one time contrution from the first priceset field and a recurring contribution for the second.

Most of CiviCRM partners should be able to do this for you or refer to one who can.
> 0 votes

---
Tags: civicontribute, civimember, price-sets, financial-types
---


# Question
Title: Civi posting additional records for recurring PayPal transactions
I'm having problems with recurring transactions with Paypal Pro. It's posting additional financial\_trxn and financial\_item records.

I have exported an example including the following tables:

Looking at the entity\_financial\_trxn table, instead of one entry for the contribution and one for the fee, two are generated for each. (Contributions: 283111, 283114; fees: 283112, 283116) Also, the second contribution record (283114) does not have an associated financial\_item record created.

In the financial\_trxn table, the contribution transaction is entered twice (ids: 141185, 141187). The first entry does not have a valid payment processor code. The second does not have the net value calculated or a valid status code. ALso, the fees are also entered twice (ids: 141186, 141188). The first entry is missing the payment processor code.

Since there are two entries for fees in the financial\_trxn table, there are also two entries in the financial\_item table (ids: 142094, 142096).

So the contribution information is not fully correct in either financial\_trxn record. The second fee record in the financial\_trxn table is correct. All of these additional records are making the bookkeeping reports inaccurate.

# Answer
> 0 votes
It's not feasible to replicate on the demo site in this case, which suggests posting an issue in JIRA is okay without that step -thanks for asking.

However, as this is widely-used functionality it's possible you have something misconfigured or misinterpreted rather than there being an error in the code suitable for a JIRA issue bug report.

Could you edit your question here to include the relevant original and subsequent records from civicrm\_contribution, civicrm\_entity\_financial\_trxn, civicrm\_financial\_trxn and civicrm\_financial\_item as well as the civicrm\_contribution\_recur record? Please refer to the spec for the entries expected in each table for each contribution at https://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Data+Flow and explain how there are too many entries.

(Sorry there's no spec for the contribution\_recur table but it wasn't affected by CiviAccounts work.)

---
Tags: payment-processor, recurring-contributions, debugging
---


# Question
Title: How can I include CiviCRM relationships to node creations screens?
What I want to do is allow content authors to associate their news stories to their organisations.

I currently expose the organisations as an auto-complete field, however the target is for the author to not be able to select any organisation except their own.

I installed Entity Reference View as this appeared to be the way forward and created the following query for it

```
    SELECT civicrm_contact.id AS id, civicrm_contact.display_name AS civicrm_contact_display_name, civicrm_relationship.contact_id_b AS civicrm_relationship_contact_id_b, civicrm_relationship.relationship_type_id AS civicrm_relationship_relationship_type_id, civicrm_contact.organization_name AS civicrm_contact_organization_name
FROM
{civicrm_contact} civicrm_contact
LEFT JOIN {civicrm_relationship} civicrm_relationship ON civicrm_contact.id = civicrm_relationship.contact_id_a
INNER JOIN {field_data_field_test_member_station} field_data_field_test_member_station ON civicrm_relationship.id = field_data_field_test_member_station.field_test_member_station_target_id AND (field_data_field_test_member_station.entity_type = 'node' AND field_data_field_test_member_station.deleted = '0')
INNER JOIN {node} field_test_member_station_civicrm_relationship ON field_data_field_test_member_station.entity_id = field_test_member_station_civicrm_relationship.nid
WHERE (( (civicrm_relationship.relationship_type_id IN  ('17')) ))
LIMIT 10 OFFSET 0

```

As an Entity Reference AND as an Entity Reference View Widget, but neither worked (contact a is the author contact, b is the organisation, field\_test\_member..... is the organisation)

Am I heading into this the wrong way? Should I just build a webform and a node creation rule?

# Answer
Your query seems a bit off to me. Focussing just on the portion of it that retrieves the employers of the logged in user wouldn't you have something like: Select employer.id, employer.display\_name from civicrm\_contact employer inner join civicrm\_relationship r on r.contact\_id\_b=employer.id where r.contact\_id\_a=$current\_contact\_id limit 0,10;

(If your user isn't logged in, then I would just drop the where clause to populate the select widget with all employer orgs.)

IIRC the employer is the b contact for the relationship, not the a - might want to check that.
> 1 votes

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


# Question
Title: Unable to launch a fresh install of CiviCRM
I installed CiviCRM over Drupal. Everything looked fine but when I want to start the module, I get a white screen and the following error when I back to Drupal. I can't enter CiviCRM.

> Warning : include(.../sites/default/files/civicrm/templates\_c/fr\_FR//%%06/069/0693F89E%%drupal.tpl.php): failed to open stream: No such file or directory dans Smarty::fetch() (ligne 1264 dans .../sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).
>
> Warning : include(): Failed opening '.../sites/default/files/civicrm/templates\_c/fr\_FR//%%06/069/0693F89E%%drupal.tpl.php' for inclusion (include\_path='.:.../sites/all/modules/civicrm:.../sites/all/modules/civicrm/packages:.:.../sites/all/modules/civicrm:.../sites/all/modules/civicrm/packages:.../sites/all/modules/civicrm/vendor/tecnickcom:.../sites/all/modules/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php') dans Smarty::fetch() (ligne 1264 dans .../sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).

My configuration is conformed with the basic requirements asked on the wiki :
GNU/Linux 3.2.65-1+deb7u2 x86\_64
Drupal 7.43
CiviCRM for Drupal 7 4.7
PHP Version 5.4.45-0+deb7u2
MySQL 5.5.47-0+deb7u1-log
pcre 8.30 enabled

I changed the permissions to 755 for the 'sites/' folder. But the error still there.

I tried before on my local machine (Debian 8 and PHP 5.6). Everything was great. Why it doesn't work on my host ?

# Answer
> 1 votes
Two "simple" things jump to mind immediately. Did you do a recursive change on the sites/ folder, chmod -R 755 sites? Secondly, and I'd assume from the error message that you did, but you did install the l10n package, correct?

# Answer
> 0 votes
I see from the other answer that you changed the permissions - but it doesn't sound like you have the ability to edit the umask. Depending on what user your web server and PHP process runs as, this could be the issue.

Can you confirm that the files you're looking for exist on the server, and if so, who is the owner/group and what are the permissions? After you fix the permissions, can you confirm that it's complaining about the exact same file not found, or a slightly differently named file? If it's a differently-named file, it's probably a umask issue. In that case, contact your shared hosting support, or find a different host if they refuse to help.

---
Tags: drupal, installation
---


# Question
Title: Is there a way to apply acl to CiviMail's mass mailings?
My collegues need to hide some sensitive mails in mailings list and activities by acl persmissions. Default users shouldn't have access to mailings assigned to role "Chief staff".

How could this be achieved?

# Answer
Users shouldn't be able to see mailings if they don't have access to the groups that the mailings are to. Note that this was broken not too long ago, so make sure you're using a newer version; see here; also relevant is this and this, which help if someone saves a draft of a sensitive mailing without specifying a group.

Also, note this patch, which is a related but different issue, and hasn't been merged into core yet.
> 0 votes

---
Tags: civimail, acl
---


title: Recurring Events and Volunteer Shifts

text:
# Question
Title: Recurring Events and Volunteer Shifts
In Civicrm I can copy an Event that takes place annually and simply update some details without starting from scratch. But the Volunteer component of that Event does not copy over with it. Is there a way to copy all the Volunteer setup too so we don't have start over from scratch to set up the Volunteer requirements and shifts again?

# Answer
> 1 votes
I don't think there is, but perhaps if you contact the team behind CiviVolunteer (Ginkgo Street Labs - inquire@ginkgostreet.com) they'd be able to update it for you :)

John

---
Tags: civievent, civivolunteer
---


# Question
Title: How do I remove previous event details from new event?
sorry if this is terribly obvious, but I'm new to Events. I'm trying to set up a new event, and at the bottom of the registration page details from a previous event keep coming up - as in the screenshot below. I've tried to update the address settings several times, but it won't go away. How do I get rid of this?

thanks!

# Answer
It looks like someone has created a custom field set for events. I gather from you desciption of "previous event" the event that related to is in the past.

If you go to **Administer \> Customize Data and Screens \> Custom Fields** you should see a field set named **Kodaly workshop**. Click on **more** on the far right and **disable** the field set.
> 1 votes

---
Tags: civievent
---


title: CiviCRM in Wordpress

text:
# Question
Title: CiviCRM in Wordpress
I'm trying out CiviCRM and searching the internet I found you guys.

Using Wordpress and installed CiviCRM, but want it in Portuguese. I've read many doc's and found nothing. I have pt\_BR.mo and SQL file, already put in appropriate places and nothing works.

They could give me a hand? Indicate a doc/manual, anything so that I can analyze the CiviCRM and put him in Portuguese.

thanks kklo

# Answer
> 1 votes
Basically you need to :

1. Download the language files from SF (it seems you have already done this)
2. Unpack the language-tarball in wp-content/plugins/civicrm. it creates subdirectories civicrm/i10n and civicrm/l18n with several files
3. Login to CiviCRM and Go to Administer » Localization » Languages, Currency, Locations
4. Enable Portuguese as default language

Beleza, should be working!

More details can be found here: https://wiki.civicrm.org/confluence/display/CRMDOC/i18n+Administrator's+Guide:+Using+CiviCRM+in+your+own+language

---
Tags: wordpress, translation
---


title: Restrict access to CiviCRM home

text:
# Question
Title: Restrict access to CiviCRM home
I am running CiviCRM 4.6.8 on Drupal 7.

I am using the "Event Calendar" extension to expose a calendar view. The extension works well, with one problem: it only displays the calendar to users with the "Access CiviCRM" permission.

I have had to enable this for anonymous users, which isn't ideal to begin with, but I can manage it by restricting their access to everything else. However, as a result, they can access the CiviCRM Home and Dashboard (despite not having permission to it in Drupal permissions). The Dashboard shows every available dashlet with a bit old "ACCESS DENIED" under it. I'd rather avoid this altogether, and get them to an Access Denied page if they try to access CiviCRM home. Is this possible?

# Answer
> 2 votes
I would take a closer look at the event calendar extension and check which permission exactly it needs (something more specific like "CiviEvent: view event info" might work) - if that's not the case, I would file an issue with that extension as it's probably a bug. Ask the extension author to change the permission check to "CiviEvent: view event info".

# Answer
> 2 votes
I published an example View for a CiviEvent calendar. It may be useful to you as a way around the issue. Note the need for CiviCRM Entities module

Screenshots per Jon's request

Add view from template

Views displays

# Answer
> 0 votes
This is pretty good but it doesn't seem to display multi-day events short of adding start and end date fields to the display - other than on whichever date (end or start) selected. I found a way to do this on the Drupal site using a number of modules, but its a little beyond me. Hoping the existing CIVICRM extension is updated!

---
Tags: civievent, drupal, permissions
---


# Question
Title: What is Cron? It keeps on telling me that it's not running
What is cron and why does it keep stopping? What is the effect when it does?

# Answer
> 6 votes
See here: https://en.wikipedia.org/wiki/Cron

It's probably not that it's stopping - but that it was never set up. CiviCRM won't do any tasks that need to happen automatically - including sending mails, updating membership statuses, etc. - until you set up cron. I don't think any of the CMSes that support CiviCRM work reliably without setting up cron, either.

I can't explain how to set up cron for CiviCRM without knowing a lot more about your environment - your CMS version and your hosting environment. If you're using CPanel or a similar control panel for your hosting, there will be a way to set up cron from within the control panel. There's some instructions on this page that are specific to CiviCRM.

---
Tags: cron
---


title: Frontend profile search problems

text:
# Question
Title: Frontend profile search problems
When using a profile to search from the frontend (via the listings mode), using the Contact subtype field causes nothing found, even when there are contacts that should be shown. In other words:

* Fields - individual first & last name, contact - contact subtype
* Searching only by first name works as it should, BUT
* Choosing a contact subtype causes no contacts found, even when there are contacts matching the search
* Filling the last name causes it to be used both as a last name and subtype name, thus nothing is found again

I tried this on the WP demo as well, the above happened. Anyone knows how to fix/avoid this?

# Answer
I just successfully replicated this as well. You've found a bug!

You can report this at http://issues.civicrm.org. See the page "Reporting a bug", starting with step 7.

That said - "CiviCRM is free to use, but not free to write." Given the limited resources of the core team, they're very unlikely to fix this without someone stepping up to help with either money or a fix. That's the economics of free software! So your choice from here is to:

* Submit this to the paid issue queue.
* Fix the bug yourself, or, assuming you're not a programmer, find someone to fix this bug for you. Submit the fix to the core team via Github.
* Work around the bug. Maybe you can restructure your data. If you were using Drupal, I'd recommend using Drupal Views integration, but unfortunately there's no real equivalent to Views for Wordpress.
> 1 votes

---
Tags: profile, search-results
---


# Question
Title: Send an email function not always delivering
We're having a curious case where emails from CiviCRM as not always delivering.

CiviMail works fine. No issues there.

When sending a simple email from the actions on a contact record, Hotmail and Gmail accounts aren't receiving the email, despite CiviCRM displaying the message that is was successfully sent.

However, when emails are sent to my work MS Exchange account, where the IP address is whitelisted, they do arrive.

We've reviewed the mail settings, and when we do a spam test, we score 10/10 on mail-tester.com and are also not on any blacklists.

Has anyone else experienced this type of issue?

Where can I check to ensure CiviCRM is sending out the emails?

# Answer
> 3 votes
What is the mail server you are using to push them out?

If it's a local mailserver (eg. postfix) you can check the log and see if it's actually really sent.

If you are using an external provider, they usually have some kind of log as well.

In any case, have you set up SPF and DKIM for your domain? if not, you are increasing the risks of having some providers that will drop your emails without any notice

# Answer
> 1 votes
You might want to use an external email delivery service that provides whitelisting. Previously I would have recommended Mandrill's service that was free for up to 12k transactional emails per month, but now you have to pay USD$10 / month plus pay for a paid mailchimp account.

Two recent integrations have been created for SparkPost in response to Mandrill's abrupt recent pricing policy changes - see https://github.com/cividesk/com.cividesk.email.sparkpost/issues/6, and https://github.com/proexchange/com.pesc.sparkpost/issues/10.

---
Tags: email
---


# Question
Title: Civicm change UFID to ContactID relationship programatically
How can I programatically change the ufid and contact id of CIVICRM?

I know the table `civicrm_uf_match` holds the matching ids but even if I change that it doesn't matter. It seems like the ids are put into session but even if I try to change the session variables via:

```
$session =& CRM_Core_Session::singleton( );
$session->set( 'userID' , $myjoomauserid);
$session->set( 'ufID' $mycivicid);

```

everytime I click renew member its the same member. I need to be able to change it all on the fly for my custom user interface. It allows a user to view all civicrm contacts and memberships associated with one email address. Then the user can edit renew whichever ones they want -- I created this to allow families to be able to edit there kids and for clubs to edit their members. Any help with how this works would be geatly appretiated. I used to set the ids in the civicrm\_uf\_match programatically then log the user out of joomla and log them back in but that doesnt seem to work anymore since the civicrm uprade to 4.6

I am not sure if synchronizeUFMatch as seen in some of the ecode is the route i neeed to look into such as

$ufmatch = self::synchronizeUFMatch($user, $userSystemID, $uniqId, $uf, NULL, $ctype, $isLogin);

# Answer
> 0 votes
Does Joomla have an equivalent of Masquerade, where you can temporarily become another user? This can also (once per request) be done programmatically with the masquerade\_switch\_user and masquerade\_switch\_back functions.

# Answer
> 1 votes
Well as usual it turns out to be simple. I just need to manually make the link in civicrm\_uf\_match via my program then simply change the session variables via:

require\_once 'administrator/components/com\_civicrm/civicrm.settings.php'; require\_once 'administrator/components/com\_civicrm/civicrm/CRM/Core/Config.php'; require\_once 'administrator/components/com\_civicrm/civicrm/api/v3/UFMatch.php'; require\_once 'administrator/components/com\_civicrm/civicrm.settings.php'; require\_once('CRM/Core/DAO.php');

```
$session = CRM_Core_Session::singleton();

$session->set('ufID' , $ufid);     //joomla ID
$session->set('userID' , $userid); //civi contact id

```

---
Tags: civimember
---


# Question
Title: Required box not appearing, Event Registration
When I try to register event participants I receive a notification saying that I have not filled out three required fields. However, I cannot see or edit these required fields. Anyone know how to fix this? I am using version 4.7.3.

# Answer
> 1 votes
you will get this error due to following reason -

* First if your Event registration is creating an New contact and if you have required field in your contact creation you will get this error message
* OR If you have some custom field created against Event and if those custom field are required fields then you will be getting these error message
* OR If you have any payment processor involved in your Event registration and if the address field are not field properly or card details are missing still you will get these error message

So just make sure you find the required field first and try to set some default value or include the fields in the event registration

If nothing helps please give some example - thanks

---
Tags: registration
---


# Question
Title: CiviCRM Multi-day Events + Drupal Calendar + Views
How can I show CiviCRM Multi-day events on drupal calendar module (Not fullcalendar), civicrm Entity module and views in drupal 7 ?

I am trying to achieve something like this: https://www.drupal.org/files/images/civicrm\_events\_calendar.png

Thanks in advance!!

# Answer
This is available as a CiviCRM extension.

Under the administer tab, click "customise data and screens". You should see a "manage extensions" link - hit that.

In the extensions manager, click on "add new". Look in that list for the calendar, then install it!

If it‘s not in that list for you then please post back including your civi version.
> 1 votes

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


# Question
Title: How to insert youtube link in Civimail, like in mailchimp?
I am trying to send a newsletter with a youtube video link. How to insert youtube link in Civimail, like in mailchimp?

# Answer
> 1 votes
Just copy and paste the link into the body of the template.

You can embed it in html so that it opens inside the message - youtube provides "embed" code to do that. When you paste this in, click the "source" button and paste it there before saving.

Hope this helps,

John

---
Tags: civimail
---


# Question
Title: How do I add a custom Activity with custom fields to an extension?
I want to extend my extension with a custom Activity type that has it's own custom fields. The Activity type is not part of a case.

I can not find in civix help and in http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension how to do that.

Who knows?

# Answer
And this is an example of a function to create an Activity type

```
  /**
   * Function to create activity type
   *
   * @param array $params
   * @return array
   * @throws Exception when params invalid
   * @throws Exception when error from API create
   * @access public
   * @static
   */
  public static function createActivityType($params) {
    $activityTypeData = array();
    $params['option_group_id'] = self::getOptionGroupIdWithName('activity_type');
    if (!isset($params['name']) || empty($params['name'])) {
      throw new Exception('When trying to create an Activity Type name is a mandatory parameter and can not be empty');
    }
    if (empty($params['label']) || !isset($params['label'])) {
      $params['label'] = self::buildLabelFromName($params['name']);
    }
    if (!isset($params['is_active'])) {
      $params['is_active'] = 1;
    }
    if (self::getActivityTypeWithName($params['name']) == FALSE) {
      try {
        $activityType = civicrm_api3('OptionValue', 'Create', $params);
        $activityTypeData = $activityType['values'][$activityType['id']];
      } catch (CiviCRM_API3_Exception $ex) {
        throw new Exception('Could not create activity type with name ' . $params['name']
          . ', error from API OptionValue Create: ' . $ex->getMessage());
      }
    }
    return $activityTypeData;
  }

```
> 5 votes

# Answer
You first create the activity type in your code. Then you create the custom group with extends = Activity, where you then have to set the activity type you want to link the data too in the param 'extends\_entity\_column\_value', something like this:

```
 if ($customGroupParams['extends'] == 'Activity') {
      $extendsActivity = CRM_Streetimport_Utils::getActivityTypeWithName($customGroupData['extends_entity_column_value']);
      $customGroupParams['extends_entity_column_value'] = CRM_Core_DAO::VALUE_SEPARATOR.$extendsActivity['value'];
 }

```

and then you can add your custom fields. Does that answer your question?
> 3 votes

# Answer
I've done this with the API. Pretty much everything you create in CiviCRM has a machine name field. This can be used as a known identifier, whereas the numerical Id fields cannot be known across different installations.

I made a helper which significantly shortened my install code:

```
/**
 * Helper function for creating data structures.
 *
 * @param string $entity - name of the API entity.
 * @param Array $params_min parameters to use for search.
 * @param Array $params_extra these plus $params_min are used if a create call
 *              is needed.
 */
function pelf_get_or_create($entity, $params_min, $params_extra) {
  $params_min += ['sequential' => 1];
  $result = civicrm_api3($entity, 'get', $params_min);
  if (!$result['count']) {
    // Couldn't find it, create it now.
    $result = civicrm_api3($entity, 'create', $params_extra + $params_min);
  }
  return $result['values'][0];
}

```

Then the install can do things like:

```
  // Ensure we have the activity type set up for Prospects.
  $my_activity_type = pelf_get_or_create('OptionValue', [
    'option_group_id' => "activity_type",
    'name' => "my_unique_activity",
  ],
  [ 'label' => 'Something suitable']);

  // Ensure we have the custom field group we need for prospects.
  $customgroup = pelf_get_or_create('CustomGroup', [
    'name' => "another_unique_name",
    'extends' => "Activity",
    'extends_entity_column_value' => $my_activity_type['value'],
  ],
  ['title' => 'Some custom Details']);

  // Add a field.
  $my_field_1 = pelf_get_or_create('CustomField', [
      'name' => "another_name_for_field",
      'custom_group_id' => $customgroup['id'],
      'data_type' => "String",
      'html_type' => "Text",
      'is_required' => "1",
      'default_value' => "0",
    ],
    ['label' => 'Explain it']);

```

Nb. I had to create a select field, too. This was a pain because you have to create the option group for its options, then all its options, then finally create the field itself, passing the id of the option group to the field create. I omitted it here because it's basically more of the same.

Anyway, with that code in my install hook, I can then easily fetch them in other code in my extension by using the names as lookups. AFAICS the name field is a machine-only field - there's usually a 'label' or 'title' field that is used by the UI.
> 1 votes

---
Tags: extension, activities, best-practice
---


# Question
Title: One of parameters (value: Array) is not of the type Integer - initially observed during import, but same when visiting Contact Record
As per the title - this message was observed first during an import, which failed. I re-imported with a 'tracker' field so i could see exactly where it failed. And rinsed and repeated. Found 2 records in import that were tripping it up. When trying to visit those records in civicrm i got same error, and with backtrace got

/sites/all/modules/civicrm/CRM/Utils/Type.php(362): CRM\_Core\_Error::fatal("One of parameters (value: Array) is not of the type Integer")

but does that help identify the culprit data?

# Answer
> 2 votes
Ok - so stroke of luck - was checking the Contact table and spotted that one of my problem patients had 'array' in the Preferred Communications table, as did the other record which the import failed on. As did about another dozen.

Once I changed the value in the db i could then visit the record.

Which I guess poses another question of how did they get array in as the value and I may post that as a separate question.

# Answer
> 1 votes
> Something that happens occasionally with Excel CSV files, particularly if they‘ve also been edited by hand is that they get their ,,,,,,s confused along with its ""s. So I bet that the value that you wanted got uploaded as ""100,"" or "100," not just "100", which would explain why it was interpreted as an array. #Theory
>
> Definitely look in logs.

To answer more comments in the previous thread:

echo $array results in the word Array being output, so it wouldn't surprise me if there were other bits of PHP that do the same. Parts may even call the echo function frankly.

---
Tags: import, error, core
---


# Question
Title: Help: Fatal error doing an export (Civi 4.7.4)
I have just upgraded my Drupal 6 site to the latest CiviCRM 4.7.4 All seemed to go well except that when I try to export contact records (using primary fields). I get the following fatal error:

Fatal error: Can't use function return value in write context in ../public\_html/sites/all/modules/civicrm/CRM/Export/BAO/Export.php on line 435

Steps I followed: 1. Search for contacts 2. Select Export option 3. Select Export Primary fields 4. Press continue

Some help would be hugely appreciated!

Thanks Davy

# Answer
Line 435 in CRM/Export/BAO/Export.php that your error message is referring to says:

```
if (!empty(self::defaultReturnProperty($exportMode))) {

```

This will give an error in all PHP versions below 5.5. From the PHP manual (http://php.net/manual/en/function.empty.php):

> Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error

You should be able to fix this by replacing lines 435-437 in Export.php with something like

```
  $key = self::defaultReturnProperty($exportMode);
  if ($key) {
    $returnProperties[$key] = 1;
  }

```
> 6 votes

---
Tags: 4.7, export, drupal-6
---


# Question
Title: With an upgrade to 4.7.3, Civicase has become inoperable
This is an addition to the question I asked last week. I have been using Civicase for 4 years and now I am unable to use it at all. Below I have provided more details about the problem that I did not include the first time.

I upgraded successfully from Civicrm 4.6.4 to 4.7.3, running on Wordpress 4.4.2

When using the "Find Cases" option for Civicase, the program responds normally if no case is found. However, for any case that meets the search criteria, the following error message is given:

Warning: Invalid argument supplied for foreach() in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php on line 186

The number of error messages matches the number of cases found (5 matching cases will generate 5 of the same error messages above). The list will be followed by the following error message:

```
Warning: Cannot modify header information - headers already sent by (output started at /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php:186) in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

```

If you use the civicase dashboard and click on any number for existing case types (for ex, 3 cases for case type X), it will generate the same number of error messages above the dashboard, such as the following for 3 existing cases :

```
Warning: Invalid argument supplied for foreach() in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php on line 186

Warning: Invalid argument supplied for foreach() in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php on line 186

Warning: Invalid argument supplied for foreach() in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php on line 186

```

Below these error messages, you will find the list of the three cases as it should provide normally.

However, if you click on "manage" for any of these cases, then you get the following error message:

```
#0 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(362): CRM_Core_Error::backtrace()
#1 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php(75): CRM_Core_Error::fatal("Unable to load configuration file for the referenced case type: 'Emergency Fo...")
#2 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/Form/CaseView.php(200): CRM_Case_XMLProcessor_Process->get("Emergency Food", "CaseRoles")
#3 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(540): CRM_Case_Form_CaseView->buildQuickForm()
#4 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#5 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Case_Form_CaseView), "display")
#6 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Case_Form_CaseView), "display")
#7 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#8 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/Page/Tab.php(110): CRM_Core_Controller->run()
#9 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/Page/Tab.php(197): CRM_Case_Page_Tab->view()
#10 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Case_Page_Tab->run((Array:4), NULL)
#11 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#12 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#13 /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm.php(1214): CRM_Core_Invoke::invoke((Array:4))
#14 [internal function](): CiviCRM_For_WordPress->invoke("")
#15 /home/hillcrest/www/www/wp-includes/plugin.php(525): call_user_func_array((Array:2), (Array:1))
#16 /home/hillcrest/www/www/wp-admin/admin.php(236): do_action("toplevel_page_CiviCRM")
#17 {main}

[in yellow]
Sorry but we are not able to provide this at the moment.
Unable to load configuration file for the referenced case type: 'Case Type X' <a href="http://book.civicrm.org/user/case-management/setup" target="_blank" class="crm-doc-link no-popup" title="Opens documentation in a new window.">(learn more...)</a>.

Return to home page.

```

# Answer
It's possible something has changed in 4.7.3 but at least for the earlier versions I'm familiar with this is usually a mismatch between the "name" column (not "label") for your case types in the civicrm\_option\_value table. That has to match what it's looking for. So for example your Emergency Food type might have originally had a different name. And yes if there's still xml files that get used in 4.7.3 then the `<name>` tag that's in there needs to match too. Can check with something like:

```
SELECT ov.name FROM civicrm_option_value ov inner join civicrm_option_group og on (og.name='case_type' and ov.option_group_id = og.id) order by ov.name;

```
> 1 votes

# Answer
After receiving GH's and Demerit's suggestions, I began to examine the case types more closely. Some had matching Name and Title, others did not. Previously, you could change titles but not the Name as they were created in the program files and had to remain as they were. In any case, next to the Name display there is a lock. I unlocked the lock and then saved. After doing this for each case type, everything began to work fine again. I do not know why this worked nor if it will be permanent but for now, the program works fine. (btw, I had upgraded to Civicrm 4.7.4 before doing this, but the upgrade did not solve the problems at all)
> 1 votes

# Answer
Leslie, it looks like you've been up, down, and all around on this issue. However, have you gone into Administer -\> CiviCase -\> Case Types, made a change to an existing case type, and saved it, then checked? You may also want to do the same for Activity Types. Some things definitely changed for CiviCase and I wonder if something in your XML file got deprecated perhaps?

It looks like your cases were initially set up under the file based XML setup. Did 4.7 remove the file based XML hooks for CiviCase and move only to DB based?

(Might add tags like wordpress and upgrade to the question too.)
> 0 votes

---
Tags: wordpress, civicase, upgrade
---


# Question
Title: Why am I getting error messages when trying to search for cases in CiviCase?
I am using Wordpress 4.4.2 and recently upgraded to CiviCrm 4.7.3. When I try to search for cases under the "find cases" menu, I keep getting the following error messages:

Warning: Invalid argument supplied for foreach() in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php on line 186

Warning: Invalid argument supplied for foreach() in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php on line 186

Warning: Invalid argument supplied for foreach() in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php on line 186

Warning: Cannot modify header information - headers already sent by (output started at /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Case/XMLProcessor/Process.php:186) in /home/hillcrest/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

# Answer
> 1 votes
I began to examine the case types more closely. Some had matching Name and Title, others did not. Previously, you could change titles but not the Name as they were created in the program files and had to remain as they were.

In any case, next to the Name display there is a lock. I unlocked the lock and then saved. After doing this for each case type, everything began to work fine again. I do not know why this worked nor if it will be permanent but for now, the program works fine. (btw, I had upgraded to Civicrm 4.7.4 before doing this, but the upgrade did not solve the problems at all)

# Answer
> 0 votes
Woah! It looks like you've found a bug :(

These critters pop up every now and again. The thing to do is to add it as an issue on issues.civicrm.org - stating:

1. the error.
2. which versions you're on.
3. what you search for when it occurs.
4. how to reproduce the same error.
5. whether or not you are using any extensions - either custom made or generic.

If you are using CiviCRM in a production environment, there's a case to be made for using the "Long Term Support" version (currently 4.6). This will have fewer new features being added, but is well-established and stable, unless there's a feature that you need on 4.7.

---
Tags: civicase
---


title: Payment Instruments Financial Accounts

text:
# Question
Title: Payment Instruments Financial Accounts
I have a client with a new In-Kind Payment Instrument and we want it to to go to their In-Kin Financial Account. This is not one of the options how/can we do this?

Thanks!

# Answer
> 1 votes
Go to Administer-\>CiviContribute-\>Financial Accounts and click on Add Financial Account. You will also need to go to Administer-\>CiviContribute-\>Financial Types and set up an In-Kind Financial type to use with your Financial Account.

# Answer
> 0 votes
If I understand you correctly you are looking to set up a new financial type and accounting code.

If so, I suggest that you read this chapter of the book: Contributions - Set up

---
Tags: civicontribute, accounting, financial-accounts
---


# Question
Title: How to create activity for automatic contribution receipts sent
Is it possible to have CiviCRM create an activity (preferably email) every time a contribution receipt is sent?

# Answer
You can set up a Scheduled Reminder that send an email based on the contribution activity.
> 2 votes

---
Tags: receipts
---


# Question
Title: What is the timeout period for links in Civimail? Can it be extended?
We send out a newsletter in Civimail, with links to our main website which is a different domain. We are using 'track click throughs' so the link, when clicked, goes via Civi first. However, the links seem to be expiring fast - I sent a test last night and the links worked fine when I received the email. But 10 hours later clicking a link just takes me into Civi, and not to the main website. What is the default timeout and can it be changed? We are on 4.6.12 and this is a Drupal site.

# Answer
> 4 votes
Yes the checksum lifespan is configurable at this path civicrm/admin/setting/misc?reset=1 which you get to via Admin \> System Settings \> Misc

Changing the duration will only affect future checksums. It will not affect ones that have already been set out.

---
Tags: civimail, drupal, tracked-links, 4.6.12
---


# Question
Title: Contrbution Summary report on Average Contribution?
I am looking for a report that list all contacts who have donated an average between 100 and 200 in a time frame. So if a contact has donated 3 times in the period, one donation of 100 and two donations of 150 I would expect to see that contact.

I have played with the Contribution Summary report as it has a filter 'Contribution Average' and the option to add the donor name. It does not do what I hoped though? The donor name is just confusing on that report I guess.

Any suggestions or someone who has achieved this?

I need this on CiviCRM 4.4 but have also tried on 4.6 with the same results.

# Answer
the summary field extension may be your friend allthough you may hav to tweek/extend it a little bit when it comes to time frames.
> 2 votes

---
Tags: contributions
---


title: Infusionsoft to CiviCRM data migration

text:
# Question
Title: Infusionsoft to CiviCRM data migration
I am a digital marketing consultant and I have a non-profit client who is looking to migrate from Infusionsoft to Civi. I am working with a certified implementation partner however she doesn't like doing data migration. Her exact words were "it drives me to drink". This is also the first time I would be using CiviCRM myself.

I haven't found any reference to this online, except for one Ukranian company that says they do it: https://www.data2crm.com \- I assume no one has heard of these guys?

Can anyone offer suggestions or tips about the best way to implement the migration?

Just some numbers I pulled from Infusionosft: 18,878 Contacts No Leads, Opportunities, Tasks, Notes, Attachments, Calls or Meetings because no one trained them how to use Infusionsoft properly in the first place 56,000 emails sent in the past 30 days with a 25% open rate. They have 357 Action sets, 25 Tag Categories and 578 Tags. What kind of fields would this kind of data migrate to in CiviCRM.

Thanks in advance.

# Answer
if you want to find some support I am sure there are other CiviCRM partners that would be happy to assist with migration? I know we would if we have the time and if it makes sense :-) As you might know the biggest pitfall in migration is to make the switch in thought patterns. When looking at source data you are in the thought pattern of the 'old' system and when you start looking for where the data should go in CiviCRM you remain in the 'old' thought pattern. Really you should know some of the basic processes in CiviCRM before you even start thinking about what fields the data should go to. My recommendation would be to start there, and not with 'what field should this go to'. That drives me to drink :-)
> 1 votes

# Answer
I would suggest that you look through the list of partners on the CiviCRM website and see if any of them are able to help:

Partners and contributors
> 0 votes

---
Tags: wordpress, import
---


# Question
Title: Suppress 'Unsupported locale specified to parseStreetAddress: en_GB' message
If debugging is enabled, 'Unsupported locale specified to parseStreetAddress: en\_GB' message appears in some situations (add/edit contact), which scares non-techy editors.

There are some ancient posts at civicrm forums, which describe clearly **why** this message appears, but I've not been able to find a recipe of how to stop this from popping up, apart from a general advice of "provide custom logic for parsing UK postal addresses".

Any hint about how to hide the message, please. Thanks!

# Answer
If you switch off the checkbox for street parsing (as petednz suggests) the error will disappear. But if you really need the street parsing that will not help you. In that case you would need to add the en\_GB to the array in *CRM\_Core\_BAO\_Address* in an extension, like so:

```
  static function parseStreetAddress($streetAddress, $locale = NULL) {
$config = CRM_Core_Config::singleton();
/* locales supported include:
 *  en_US - http://pe.usps.com/cpim/ftp/pubs/pub28/pub28.pdf
 *  en_CA - http://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp
 *  fr_CA - http://www.canadapost.ca/tools/pg/manual/PGaddress-f.asp
 *          NB: common use of comma after street number also supported
 *  default is en_US
 */
$supportedLocalesForParsing = array('en_US', 'en_CA', 'fr_CA', 'en_GB');

if (!$locale) {
  $locale = $config->lcMessages;
}

```

and this is a bit awkward :-)
> 1 votes

---
Tags: error, localisation, ajax, javascript, debugging
---


# Question
Title: Datepicker / CKEditor won't load unless "Access CRM" is granted
Stumbled across this while setting up specific user roles. Created an "Event Manager" who requires access to creating events. ACL is just "Create Events".

1. User can access the Event creation URL just fine "/civicrm/event/add?reset=1&action=add".
2. They can edit the event (fill in fields, etc)
3. They can press "Continue" to save the event.

They CANNOT do the following until they are granted "Access CiviCRM" permissions:

1. Use CKEditor (it does not load)
2. Or the datepicker (it does not load)

It appears additional javascript (or other scripts) are loaded when "Access CiviCRM" is checked.

If this is not a bug, can anyone advise where to look? The reason why we do not want to grant "Access CiviCRM" permissions is because of the Quick Search bar - to which there doesn't seem to be an ability to disable if "Access CiviCRM" is enabled.

# Answer
> 0 votes
The answer ended up being more straight-forward - "Access CiviCRM" apparently loads a javascript/jQuery that otherwise isn't loaded if that ACL isn't granted. We updated the templates to load these files regardless of ACL.

In case anyone is curious, we made the following change to file: CRM\Core\Resources.php - we moved the scripts above the Permission Check in case you do want to expose back-office functions (like Creating Events) without granting Access CiviCRM permissions.

# Answer
> 1 votes
I think the best solution is to grant them "access CiviCRM" and implement a hook to remove the quicksearch bar for those users.

---
Tags: civievent, acl
---


# Question
Title: Users with Case roles cannot edit activities assigned to them: is this a bug?
first post so please forgive any netiquette transgressions. I'm following the guide https://civicrm.org/bug-reporting to get confirmation this is a bug.

Version: 4.6.12 (also present in 4.7.1)

CMS: Wordpress

*** Bug description ***

User 1 (admin) creates a case and assigns a role to user 2. User 1 creates an activity on this case and assigns the activity to user 2.

User2 has the ACL role "edit my activities and cases" and logs in. They can see their case and Manage it. When user2 clicks the Edit link alongside the activity user1 assigned to them they get an error, "Sorry an Error Occured You are not authorised to access this page.".

This also generates the following in the Apache error log:

PHP Warning: array\_key\_exists(): The first argument should be either a string or an integer in /wp-content/plugins/civicrm/civicrm/CRM/Case/Form/Activity.php on line 121, referer: https://ourtestdomain.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview%2Fcase&reset=1&id=3&cid=16&action=view&context=dashboard&selectedChild=case

Line 121 should be passing a case ID into the array\_key\_exists() call and that case ID should be an int or a string. The comment at the top of Activity.php suggests that the original author expected it to be an int. However the variable passed holds an object that contains the case id in question. This generates the warning in the error log and the pop-up seen by the user. If the case id is extracted from the object and passed into array\_key\_exists the user can edit the activity.

User2 has permission to edit this activity and I believe its a bug that they cannot.

NB because of the need for multiple users I haven't been able to recreate this on the demo install where you only have one user.

If you could confirm this I will file a bug report per step 7 of the guide.

Many thanks.

axa

# Answer
> 5 votes
I've posted a preliminary fix in JIRA.

Joseph

---
Tags: civicase, activities, permissions, acl, roles
---


# Question
Title: Donations Made with False Name and Address using Paypal WPP
A Membership payment was made successfully using our Contribute form with a new contact created such as:

name: fffff fffff

address: asdadad 4 davie, FL 33328 United States

email:

jdchjffdjhf@gmail.com

Contribution says paid by Credit Card, and there is also a transaction/invoice ID.

Why is CiviCRM Paypal WPP processor allowing this contribution which obviously appears to be fraudulent? Is this due to our set up

Thank you.

Drupal 7 / CiviCRM 4.6.x

# Answer
I am not certain what can be done to stop people 'testing' if stolen credit card details if that is what is happening. There is a blog about it and an old forum topic you might glean something from

And this SE question is where the conversation moved to.
> 2 votes

# Answer
PayPal also offers some fraud filters. There's a decent starting set that come with PayPal Pro (they also offer more advanced ones for a monthly fee), their customer service is pretty good if you call and ask for some help with them and explain about the transactions you suspect are fraudulent.
> 2 votes

---
Tags: civicontribute
---


# Question
Title: "Create User Record" - possible to ignore required Drupal User custom fields?
From the back office admin, creating a user is impossible if there are Drupal fields attached that are required. The workaround has been to temporarily unmark the fields as required, but this is tedious. Is there some modification we can make for it to ignore required Drupal fields when we use this function?

Editing for clarity:

1. Users register on the Drupal front end - there's a CiviCRM Membership Profile form that asks for additional information.
2. On top of the Profile (which updates the CiviCRM record), we have a Drupal User field (image below) that allows the User to join an Organic Group at registration (required field).

3. Because this field is required, we cannot use the "Create User Record" function on the CiviCRM Contact record because of the validation error on the required field.

# Answer
I think this is a symptom of a structural issue: you have Drupal fields on a contact. Perhaps they're best brought into Civi?

The quickest option is to give those Drupal fields default values for when they haven't been filled in.

An alternative is to create some kind of custom extension or custom module that prevents this issue for you.
> 1 votes

---
Tags: drupal, civimember, user-account
---


# Question
Title: Moved Wordpress and CivCRM to new server recently
Recently I moved my Wordpress Install with CiviCRM over to a new server. I changed the path location in civicrm.settings.php file to reflect the new location. The front end of appears as if nothing is wrong but on the admin dashboard this appears:

> Warning: require\_once(/CRM/Core/ClassLoader.php): failed to open stream: No such file or directory in /home/xxx\_xxx/public\_html/wp-content/plugins/civicrm/civicrm.settings.php on line 399
>
> Fatal error: require\_once(): Failed opening required '/CRM/Core/ClassLoader.php' (include\_path='.:/home/xxx\_xxx/public\_html/wp-content/plugins/civicrm/civicrm/:/home/xxx\_xxx/public\_html/wp-content/plugins/civicrm/civicrm//packages:.:/usr/lib/php:/usr/local/lib/php') in /home/xxx\_xxx/public\_html/wp-content/plugins/civicrm/civicrm.settings.php on line 399

If I deactivate CiviCRM, everything else appears to work fine, but I need this to work for this site. Any and all help is greatly appreciated!

# Answer
Looks like you've a couple of hangovers! These are usually in the CiviCRM Administer \> System Settings \> Resource URLs, and Administer \> System Settings \> Directories pages. Update those, clear cache, and you should be good to go!
> 3 votes

---
Tags: wordpress, migration
---


title: getting past event by participant

text:
# Question
Title: getting past event by participant
I am setting up views loading civicrm events and loaded the uid of user, and wanted to match the UID with the event he/she is registered from,

in views, I can not connect to participants through anywhere, when I tried loading relations ships :

```
    <select class="ctools-master-dependent form-select ctools-dependent-processed" id="edit-group" name="group">
<option value="all">- All -</option>
<option value="civicrm-custom--contact-person">CiviCRM Custom: Contact Person</option>
<option value="civicrm-custom--moderator">CiviCRM Custom: Moderator</option>
<option value="civicrm-custom--panelist">CiviCRM Custom: Panelist</option>
<option value="civicrm-custom--workgroup">CiviCRM Custom: Workgroup</option>
<option value="civicrm-events">CiviCRM Events</option><option value="civicrm-phone-details">CiviCRM Phone Details</option>
<option value="civicrm-price-set-entities">CiviCRM Price Set Entities</option></select>

```

I tried using the civicrm phone details but when connecting the civicrm participants its not loading anything

anywhere to connect it?

thank you

# Answer
If you are wanting to show 'my events' you can create a View based on civicrm participants, then use Relationship to pull in "CiviCRM Contacts: Drupal ID", then set a views Filter to 'user: current = yes". Done.

But if i misunderstood then pls clarify the outcome you want and in what context.
> 1 votes

# Answer
Woah! Hold your horses!

UID is a Drupal ID! CiviCRM has contact IDs - the two aren't the same. You can find the pairing in the civicrm\_uf\_match table :)
> 0 votes

---
Tags: civievent, drupal-views, registration
---


# Question
Title: does CiviCRM have the capability to handle approx. 70 pieces of data per customer?
I am a contractor working for the Department of Tourism in Vanuatu and we are looking at purchasing CiviCRM. We are also in the process of developing our first ever comprehensive survey for the 1,000 tourism business we have in Vanuatu, that will drive our strategic planning and development in the future. The survey will have approx. 70 questions, the majority quantitative and the remainder qualitative. My question would be, does CiviCRM have the capability to handle approx. 70 pieces of data per customer? And if so can it then be easily analysed for reporting? Can comparisons be made for example…. How many island bungalows (customer type) have electricity and how many have solar power?

# Answer
> 2 votes
Kia ora Mary. There are many civi instances with much broader data sets than you are describing so there is no reason to think civi won't 'handle' the data. In terms of 'comparison' there are a range of searching/reporting capabilities with civicrm and also within Drupal if that is the CMS that could be used for this.

# Answer
> 1 votes
There are several ways to create and administer the survey in CiviCRM, and various ways to analyze and report the results. You likely want to use the misnamed CiviPetition functionality (not CiviSurvey, since that is for cases where you have many staff people posing questions and recording responses to their own batch of respondents that they have reserved for themselves in the system). Or, if you are using CiviCRM with Drupal then you can make the online survey look nicer using the Webform CiviCRM module in Drupal. The reporting questions you pose are quite simple and can be done either in CiviCRM or using Drupal views. More complex ones like crosstab reports might require a bit more work to find a way to produce it, for example using the extended report extension in CiviCRM (from @petednz's company, Fuzion, based in NZ) or a custom report or using https://www.drupal.org/project/views\_crosstab in Drupal.

---
Tags: custom-fields, civireport
---


title: is the dupe finder working?

text:
# Question
Title: is the dupe finder working?
I create a general rule to search my database of 29000 contacts for matching emails - I know there are a few at least, and it says there are none. Also I give it a weight and match that in the threshold but after saving the rule and going back to it, the weight has reset to 0. the same happens with the length setting.

Any clues?

Myles Civi 4.6.10 on drupal

# Answer
> 1 votes
Make sure the rule you are using is for the type of contacts in your db, generally Individual. Then get the rule saved with a weight on the email field \>= threshold, with the latter being \> 0. Once you have verified this is configured properly by clicking to edit again, then try using the rule.

---
Tags: duplicate-contacts
---


# Question
Title: Connecting Civi to a previous install's database
During my update from Civi 4.2 to 4.7 I let it fill in database information that was not correct it connected to the cms database and not the Civi database from the previous install. Is there a file I can edit to have it connect to the old database?

# Answer
> 1 votes
You should edit the civicrm.settings.php file. The location of this file depends on your content management system.

Drupal: `sites/default/civicrm.settings.php`

WordPress: `wp-content/uploads/civicrm/civicrm.settings.php`

Joomla: `administrator/components/com_civicrm/civicrm.settings.php`

You may find this related post helpful: How do I change the CiviCRM Database name

---
Tags: database, settings
---


title: MyISAM, Cron, ERROR

text:
# Question
Title: MyISAM, Cron, ERROR
I get this error on installing the CiviCRM plugin for Wordpress (Wordpress version 4.4.2, CiviCRM 4.7.4)

System Status: Error

MyISAM Database Engine

Cron Not Running

Configure Default Mailbox

Complete Setup

There is no CiviCRM Menu and nothing else appears. Error page appears as this;

Welcome to your Home Dashboard

Your dashboard provides a one-screen view of the data that's most important to you. Graphical or tabular data is pulled from the reports you select, and is displayed in 'dashlets' (sections of the dashboard).
Access Keys: Powered by CiviCRM 4.7.4. System Status: Error CiviCRM is openly available under the GNU AGPL License.

# Answer
The solutions was found in another Question with similar responses.

https://civicrm.stackexchange.com/a/9792/3016
> 0 votes

# Answer
It seems like you have several errors listed. I would start by addressing the most serious first. You'll need to reinstall CiviCRM after enabling the InnoDB database engine in your MySQL instance (see https://stackoverflow.com/questions/4757589/how-to-enable-innodb-in-mysql).
> 2 votes

---
Tags: wordpress, database, error, 4.7, cron
---


# Question
Title: Civicrm registration form sending to Paypal but registration info not being sent back to Civicrm
Using civicrm 4.7.3. We have an event registration form through our civicrm installation on Wordpress 4.4.2. Registrants using this form are sent to PayPal Standard and the payment is received by PayPal but the registrant's information is not being sent back to the Civicrm database. Absolutely no information is sent back from PayPal. This worked using the PayPal sandbox **but not** the live site. My payment processor is set to PayPal with the correct merchant account email and the url set to https://www.paypal.com (Test payments now set to same since site is live). IPN is enabled in PayPal. My civicrm\_system\_log table shows the sandbox notices but nothing since I took the site live.

Help! Does anyone have an idea why this would be the case? Thank you.

# Answer
> 1 votes
They are working on it. I have the same issue. Waiting patiently for the fix: https://issues.civicrm.org/jira/browse/CRM-18107?filter=-4&jql=text%20~%20%22paypal%22%20ORDER%20BY%20createdDate%20DESC

---
Tags: civievent, paypal, registration, ipn
---


title: Civi Rules to send an email

text:
# Question
Title: Civi Rules to send an email
I am trying to use Civi Rules to send me an email anytime someone donates over a certain dollar amount. Is thre a way to do this? I tried to add the activity type of send mail, but I keep getting this error message.

**Fatal error**: Out of memory (allocated 116391936) (tried to allocate 16384 bytes) in **/home/lifelight/www/www/sites/default/files/civicrm/templates\_c/en\_US/%%40/40D/40D353E1%%fatal.tpl.php** on line **5**

# Answer
> 6 votes
Yes you should be able to do this by specifying the amount, the period when that occured and then setting an Activity as assigned to you, which should itself then send you the email you require.

The templates\_c error is unrelated to CiviRules specifically and suggests you should endeavour to truncate the en\_US folder.

EDIT: Adding comment from Jon G that you need to "have the Email API extension installed ... to send emails using CiviRules"

---
Tags: civirules
---


# Question
Title: Auto-Renew option not displaying membership contribution page
Anyone know why the checkbox that allows memberships to automatically renew would not appear? Everything in the membership type and the contribution page settings is correct, providing the option to renew. We have one site that this is happening on and can't quite figure out what it could be. First time I'm seeing this, so wanted to see if anyone else had experience this before.

When a membership is selected it the space where the check box should appear expands, but is empty. When inspecting source it shows as follows:

```
<div class="crm-section auto-renew">
     <div class="label"></div>
     <div class="content"></div>
</div>

```

But should be something like this

```
<div id="allow_auto_renew" style="display: block;">
        <div class="crm-section auto-renew">
            <div class="label"></div>
            <div class="content">
                 <input id="auto_renew" name="auto_renew" type="checkbox" value="1" class="form-checkbox" readonly="readonly" checked="checked"> <label for="auto_renew">Please renew my membership automatically.</label>
            </div>
        </div>
</div>

```

Any ideas?

This is running on CiviCRM 4.6.9 and WordPress 4.3.1.

Not using a price set,just the membership tab on the contrition page options.

# Answer
> 1 votes
I've found that this happens if Pay Later is selected in the contribution - and this is not the behaviour I'd expect. If I turn off Pay Later, the auto-renew checkbox is ticked - but also readonly, which is also not what I've expect for an optional auto-renew. I'm on 4.6.14 and Drupal. Anyway: this might get you going.

Here's my similar question

---
Tags: civimember
---


# Question
Title: Can I search "Added By/Modified By" with a contact ID instead of a name?
First, I'm French and my english is not good, sorry.

currently using CiviCRM (4.6.10) production coupled with Joomla (3.5.0) (thanks to this forum), I currently have a problem with the smart group and the search criteria.

Indeed, to add users to the group dynamic I use the search term "Added by" in the Advanced Search section of ChangeLog.

In this field, we can insert only the NAME of the onscreen user. The problem is we have several employees with the same name and therefore the "contacts" of any one of those employees is seen by all who have the same name.

**1) Is it possible to change this search to replace the name with the contact\_id the database?**

If this is not possible at present in the database in the table "civicrm\_saved\_search" the "where\_clause" a group for example:

```
( contact_b_log.sort_name LIKE '%dupont%' )

```

**2) Is it not possible to change this "sortName" to match the contact\_id collaborator?**

**3) If you see another possible solution?**

Thank you in advance to those who have an idea for my problem,

Lionel

# Answer
Bonjour. I think you are using the field in the Change Log, Modified By (Added by) - ie 'Journal of Change' is your translation of the French version of 'Change Log'. You are right, currently it is just used as a 'text' field. So Advanced Search is not going to help you. And the field is not currently available in Search Builder either. And there is no Custom Search for this.

So, if you have developer/funds is to add the feature to one of the above.

Or create an extension that does the above automatically.

The only other thought is that you could consider another approach, such as, if you are using Drupal you could have your team 'add' contacts through Drupal Webform - and create a Relationship between them. The benefits would be that you could then

* search by the Relationship and then create a Smart Group
* use the Permissioned Relationship extension so that user 'Jean' could only see contacts that they added.

Hope some of the above is helpful.
> 3 votes

---
Tags: smartgroups
---


# Question
Title: Advanced Search AND Operator doesn't operate for Multiple Tags Search (at least)
Have discovered recently while searching for multiple tags. Even if Search operator radio button AND selected, search for two tags returns results with OR logic. Mean, there is a contact, which has several tags assigned; search by selecting, say, two tags contact has, returns contacts tagged by one of tags, not both of them. Double- and triple-checked. Sounds like a bug, but not entirely sure, since no similar complains found. Will anyone with similar setup (mean, contacts with multiple tags), confirm it works / doesn't work, please.

# Answer
> 1 votes
I think the AND operator applies between fields, not within options of a field. If you want to search TagX AND TagY you can do this in Search Builder.

---
Tags: search, search-results, tags
---


# Question
Title: Is there a way to create a new group from report results (instead of adding to an existing group)?
I see that I can "add contacts to a group" from report results, but what if I need a new empty group?

Is there a way to create a brand new group right from the report preview?

# Answer
> 1 votes
You could create your group at **Contact \> New Group** before you ran the report.

---
Tags: civireport, groups, reports
---


# Question
Title: Edits not saving in Case Activity Tab since 4.7.4 upgrade
If I edit an activity (eg the date or the status) in the Activities tab of the Manage Case page, I get the confirmation message "\[activity name\] saved". But the edit is not saved.

This problem only appeared after upgrading to 4.7.4. There are no JS errors, no errors on CiviCRM log, no php errors.

Running Joomla 3.4.8. I can't test on the demo, because it's still on 4.6.

Edit: just tried the Wordpress demo, and the problem is present there as well.

Any suggestions where to look for the problem? Thanks.

# Answer
> 1 votes
I may have found the solution, but I'm not sure.

At line 418 of civicrm/CRM/Case/Form/Activity.php there is this command:
**$params = array\_merge($params, $oldActivity);**
But this seems to be the wrong way round. I changed it to:
**$params = array\_merge($oldActivity, $params);**

This change appears to fix the problem, but I don't really know what I'm doing, so no guarantees.

# Answer
> 1 votes
Verified now that the issue is a general problem with CiviCase in Drupal, Joomla and Wordpress versions. I have raised a bug report here.

# Answer
> 0 votes
I know you aren't seeing errors in your logs, however, I did see errors when I attempted to change the Case Type. Here's the link: With an upgrade to 4.7.3, Civicase has become inoperable

There's a comment, perhaps buried, about removing Roles from Case Types, and then things worked for me.

---
Tags: civicase, activities
---


# Question
Title: How to Disable Calls to CiviCRM site in 4.7?
I am running CiviCRM on a standalone network (for testing purposes) and am getting regular errors about not being able to connect to the CiviCRM site. How can I disable these calls in 4.7?

Thanks!

# Answer
There are multiple calls to CiviCRM.org in the site codebase, so it's not clear which are triggering errors on your site. These are some of the things you could do ...

## Disable Version Checking

According to a comment in CRM-17637, from 4.7 it's possible to disable the daily Version Check scheduled task. See under the menu entry *Administer \> System Settings \> Scheduled Jobs*.

## Disable Community Noticeboard messages

You can disable the connections which update the community noticeboard in `civicrm.settings.php`.

```
$civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = false;

```

(Wiki page on overriding CiviCRM settings.)

## Redirect/disable connections to CiviCRM.org

You could adjust your server configuration to *permit* connections to CiviCRM.org, OR you could adjust it to redirect those connections to a local address (eg by adding an entry to /etc/hosts which will direct the requests to a local address).
> 6 votes

---
Tags: 4.7
---


title: How to migrate database without logs

text:
# Question
Title: How to migrate database without logs
I’d like to move my CiviCRM installation from one Drupal server to another. But I enabled logging in the current server and I don’t want that data to be transferred to the new server. How can I delete the logs before I migrate the database? Or, if there’s a way to migrate without the logs that doesn’t involve deleting them, that would be equally helpful.

# Answer
> 3 votes
This can be done on the commandline. You can pass a list of tables to `mysqldump` and omit the tables starting with `log_`.

(Below, *testdb* is the name of the DB we're using. You may want to add other parameters, eg auth details to connect.)

To get the list of tables you *want*, exclude the `log_` tables using `grep`. (Seems you can't *SHOW TABLES NOT LIKE*.)

```
mysql -ss -e 'SHOW TABLES' testdb | grep -v '^log_'

```

To use this list of tables with mysqldump, use Bash's `$( )` construct to expand the output of the first command into parameters for mysqldump.

```
mysqldump testdb $( mysql -ss -e 'SHOW TABLES' testdb | grep -v '^log_' )

```

To exclude also the trigger information, add mysqldump's `--skip-triggers` parameter.

```
mysqldump --skip-triggers testdb $( mysql -ss -e 'SHOW TABLES' testdb | grep -v '^log_' )

```

# Answer
> 2 votes
You may want to move log tables from main database to specially created database via settings in **civicrm.settings.php**. Of course, new empty database has to be created first. After that please find this in **civicrm.settings.php**:

```
/**
 * CiviCRM Logging Database
 *
 * Used to point to a different database to use for logging (if desired). If unset defaults to equal CIVICRM_DSN.
 * The CIVICRM_DSN user needs to have the rights to modify the below database schema and be able to write to it.
 */
if (!defined('CIVICRM_LOGGING_DSN')) {
  define('CIVICRM_LOGGING_DSN', CIVICRM_DSN);
}

```

when replace

```
  define('CIVICRM_LOGGING_DSN', CIVICRM_DSN);

```

to

```
  define('CIVICRM_LOGGING_DSN','mysql://DBUSER:DBPASSWORD@DBHOST/LOGS_DBNAME?new_link=true');

```

not sure if "new\_link=true" is needed though. This automagically moves all LOG\_ tables from the main database to new database. Thus all LOG\_ tables in main database could be deleted; main database is clean now and could be moved to new server (guess it's worth making same trick at new server). In theory, there could be some performance benefits as well, but not sure.

# Answer
> 1 votes
Take a full backup (good idea anyway, but particularly if you're interested in keeping the old logs somewhere offline), disable logging, do the transfer without the log\_ tables (or drop them first), then re-enable logging on the new server?

---
Tags: database, migration, logging
---


# Question
Title: Civi is Requiring "On Behalf of Organization" fields when that's not even checked
On our contribution form, we allow people to contribute "On Behalf of an Organization" however it's not required.

The problem is even when that box is left unchecked, they get to the confirmation page without error, but when they actually click to submit the form, it says that the organization fields are all required.

It looks like this person had a similar problem. https://forum.civicrm.org/index.php?topic=35137.0

Here's our form: http://rivertreesingers.org/support

If you test it, just check the mail a check option to go through, but it shouldn't let you complete.

If it seems like a bug, where should that be reported? I'm on CiviCRM 4.7.3 in a WordPress environment.

Thanks!

# Answer
> 1 votes
Never did find a good solution. We ended up just removing the option from the form. At the time, I think we misunderstood how CivicCRM works and what the purpose of "on behalf of an organization" was. One thing we learned though, that might help you. The organization in question has to already exist in the database. I think that is still true for the latest versions of CiviCRM.

Anyway, we just tell donors that if they want to contribute "as an organization" (note the wording: not "on behalf of an organization" but rather, "as an organization"), then they need to use a corporate credit card or a corporate bank account. That way, the organization entity gets the tax credit, not the individual. Civi assumes that the donor is an individual. Always, so far as I know. So, if the donor in filling out the online form is "representing" a corporate entity, that's fine. Can do that. But the payer, usually as indicated by the payer address (the billing address associated with the credit card), is the one that the IRS will look for if they ever audit. Of course, you can set it up so that the person filling out the form gets a "soft credit" whereas the actual payer (the organization) gets the hard credit. Hope this helps.

# Answer
> 0 votes
To answer the question "where should a bug be reported" - you should go to https://issues.civicrm.org/jira/login.jsp

But, in general you should not open a new Question if one already exists, so you may find this question gets voted down or deleted.

---
Tags: civicontribute, error, forms
---


# Question
Title: How can I import custom data contact references as names rather than id numbers
When I try to export custom data from the front-end and export a contact reference I get the name of the contact rather than the id. But when I try to do the reverse and import an organization with some custom data(one of which is a contact reference) the front-end demands an ID. Is there a way to fix this?

# Answer
I see, you're right.

It would make sense that the export would have a contact reference be part of the "related contact info". Unfortunately that is not the case at this moment.

The best way for you to approach as I see it is to do the export via the CiviCRM API. It is more cumbersome to use (if you are used to using the front-end), but it has more flexibility and more possibilities.

For more info, look https://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
> 1 votes

---
Tags: import
---


# Question
Title: What does the "All Cases" dashlet actually display?
Does anyone know what the criteria are for a case to be displayed when using the "All Cases' dashlet?

What seems to be clear is that what it doesn't display is all of the cases.

# Answer
> 1 votes
If I'm right it displays only active Cases with scheduled Activities. Indeed a confusing name. If you close all Activities the Case is not shown.

---
Tags: civicase, dashboard, dashlet
---


# Question
Title: Get the "Smart" group of a user id via REST
We've created so called 'smart' groups in civicrm, and we need to know if a certrain user belongs to this group.

I can get the groups of a user with the following code:

http://url.com/sites/all/modules/civicrm/extern/rest.php?debug=0&entity=GroupContact&action=get&contact\_id='.$uid.'&json={"sequential":1}&api\_key='.$api\_key.'&key='.$site\_key

But the "Smart group of the UID is not listed here,. When I do the following:

http://url.com/sites/all/modules/civicrm/extern/rest.php?debug=0&entity=Contact&action=get**&group='.$gid.'**&version=3&contact\_id='.$uid.'&json={"sequential":1}&api\_key='.$api\_key.'&key='.$site\_key

I get the result, that the user belongs to this group.

What I want is only to give the contact\_id as parameter to check in which smart groups this user is

# Answer
Smart Groups are basically a saved search. Checking whether a given contact is in a saved search result means running the search for that combination, which is not efficient - hence the reason the information you want isn't available through existing APIs.

See eg CRM-11903: GroupContact API doesn't get smart group members.

If you want to be able to query the API for this information, you have some options -

* As you're doing, use the Contact API and filter by group ID to check each Contact/Smart group pair. Not efficient, but you've already found it works.
* Create a "regular" group and automate the process of updating its members based on the criteria of your smart group. A bit rough - but probably not too hard.
* Implement the functionality you need in a new API method. Probably not as hard as it sounds, check existing API methods for examples.
> 1 votes

---
Tags: api, groups, smartgroups, rest
---


# Question
Title: Auto-renew option not appearing for membership
In Civi 4.6.12 I am testing recurring PayPal Pro payments for a membership.

A simple recurring contribution works OK once CRM-16698 in place.

However when testing with a new membership, no option for auto-renew appears. CRM-17197 fixed a similar issue when a price-set is used. Any suggestions for fixing this without a price-set?

Thanks, Chris

# Answer
Chris,

I just tested this on my site, and you're right.

If you have the "Pay Later" option selected, the auto-renewal checkbox does not appear.

The checkbox should always appear, and then when the page goes through verification if 'Pay Later' is selected, and the 'auto-renew' box is selected, that should throw an error to the user.

I've created an issue report on this:

https://issues.civicrm.org/jira/browse/CRM-18299
> 2 votes

---
Tags: civimember, auto-renew
---


# Question
Title: Can I create a block like of CiviCRM autocomplete search using "Search AutoComplete" module?
Can I create a block like of CiviCRM autocomplete search using "Search AutoComplete" module?

https://www.drupal.org/project/search\_autocomplete

I have tried to figure out but cant seem to work it out? anyone tried, any suggestion please?

# Answer
> 1 votes
A very speedy google on 'drupal autocomplete block' turned up many modules that will help you. Plug in the results of a civicrm api call, remembering to set count=0 to sidestep the 25 result limit. If you get stuck on a specific part then please reply!

---
Tags: search, quicksearch
---


# Question
Title: 4.7 Install, Database Settings Correct. Still no Contacts
I have upgraded from CiviCrm 4.2 to 4.7 now that I finally have it working it will not bring up contacts from the old Civi database. I looked at the setting php file and all the information is correct. What is the best way to troubleshoot this issue. I have checked the database that is was set to use and the information is present. Is there any sort of mapping that the new install needs to do? Please advise and thank you!

# Answer
Do you have two civi installs looking at the same db? This won't work!

After copying over the files did you go to \[yoursite\]/civicrm/update.php
> 1 votes

---
Tags: upgrade, database
---


# Question
Title: Invoking hook_custom_tokens and hook_custom_tokenValues in Joomla
I have tried, in vain, to invoke hook\_civicrm\_tokens and hook\_civicrm\_tokenValues in a Joomla instance in order to add custom tokens (to be specific: relationship information).

I created a Joomla plugin to allow this, as this seems to be the recommended way to implement hooks in Joomla, to no avail. I have been unable to discover how the mail form gets its list of tokens in case I need to prefix the call names with that module, e.g. Mailing\_civicrm\_tokens. I've looked at:

Create Your Own Tokens for Fun and Profit but it hasn't helped. There is even a reference there to it not working in Joomla that no one has answered the question.

Any suggestions?

# Answer
Here's info about using CiviCRM hooks in Joomla: https://wiki.civicrm.org/confluence/display/CRMDOC/Example+Joomla+Plugin+for+implementing+hooks

But why create a Joomla plugin if you can also use the hooks in a CiviCRM extension? https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension

The advantages of using a CiviCRM extension over a joomla extension:

* Works on all CMS'es
* Much more knowledge available in CiviCRM community

The only advantage of Joomla plugins I see would be if you would need to combine CiviCRM functionality with Joomla functionality.
> 2 votes

---
Tags: joomla, hooks, tokens
---


# Question
Title: Can I automatically replace the "civicrm" from all URLs with another string? (drupal7 + civicrm 4.7.4)
How can I replace the '/civicrm/' portion of all site URLs automatically? I want change all the URLs so I cant do it one by one with a Drupal "URL alias".

Could I somehow swap the name 'civicrm' for a different string such as 'myOrg'? (eg: if someone visited `/civicrm/admin?reset=1` they would be redirected to `/myOrg/admin?reset=1` )

# Answer
There is no easy way to do this.

You might be able to create a drupal module that is able to get the myOrg urls and then renders the CiviCRM version of it.

But then you still have the problem that the internal links that CiviCRM creates will be in the /civicrm/\* form.

To solve that you could first get the CiviCRM page as a string in the drupal module, then do a search/replace and output it.

Very hackish, probably not possible to get it 100% right. I would advise not to.
> 2 votes

# Answer
Thank you @Catorghans for the answer,

I can not add a comment

I created a Drupal Module "myorg" to render CiviCRM URLs

`function myorg_menu() {
 $items['myorg/admin/custom/group'] = array(
 'title' => 'Custom Data',
 'page callback' => 'CRM_Custom_Page_Group',
 'access arguments' => array('Customize Data and Screens'),
 'file' => 'CRM/Custom/Page/Group.php',
 'file path' => 'sites/all/modules/custom/civicrm',
 );
 return $items;
}`

when I accede to 'myorg/admin/custom/group', i have error :

**Fatal error**: Class 'CRM\_Core\_Page' not found in /projet/organisation/sites/all/modules/custom/civicrm/CRM/Custom/Page/Group.php on line 44
> -1 votes

---
Tags: drupal, 4.7, urls
---


# Question
Title: Civicrm fields in Views, present with editable fields?
is it do able to be able to present an editable fields with civicrm custom field? as I tested using it was not available for select?

update: Rephrasing my questions, I am trying to setup a views with the profile contact details, but some of the contact details/fields are going to be a direct editable in the views fields options, like the module we used : drupal editable fields, but its not available for civicrm fields, are we able to do something out of the box?

thank you

# Answer
> 4 votes
(edited) Thanks for triggering me to retest this module ;-)

Some quick testing on the drupal module Editable Views for D7 shows this now works.

Note1: site tested on also using CiviCRM Entity so this may be a requirement.

It worked for me for eg First Name and a custom text field and a custom radio though it only showed Value not Label for the options.

Steps:

* add/enable modules (of course)
* set View up based on civi contact (for my testing purposes)
* add new field and choose CiviCRM Contacts: Entity metadata property (editable)
* this includes a new dropdown called Metadata property where you can then select eg First Name, or a custom field
* Save field
* hey presto

Wasn't super fast in saving but that might be my dev system

Note1 if this is awesome but needs a bit of love in terms of eg multichoice Label v Value, then either the CiviCRM Views code needs a tweak or CiviCRM Entity does.

Note2 there is new work going on to extend CiviCRM Entity currently (see blog) so if it is something you can help fund to happen it would be good to reach out on that project.

# Answer
> 0 votes
Not sure I understand your question correctly. Have you tried the Webform-CiviCRM integration module? That might help if you click on a link in the View?

# Answer
> 0 votes
In civicrm this is called 'inline editing'. Check out the - totes amazeballs - Phone Number Validator for an example of how this works.

In that example I built inline editing into a page, thereby sidestepping forms alltogether.

---
Tags: custom-fields, drupal-views
---


# Question
Title: How do I fix class not found in custom extension after upgrade?
I have just upgraded civicrm to 4.6.11 and am getting a Class Not Found error.

```
Fatal error: Class 'CJT_Page_EmrJournaltracking_JournalControls' not found in ... CRM/Core/Invoke.php

```

The class is in the system

```
 web/sites/all/modules/custom/civicrm/extensions/net.interlated.emrjournaltracking/CJT/Page/EmrJournaltracking/JournalControls.php

```

and defined as follows

```
require_once 'CRM/Core/Page/Basic.php';

class CJT_Page_EmrJournaltracking_JournalControls extends CRM_Core_Page_Basic {

```

The source for this extension is available at https://github.com/jrobens/civicrm-extension-emrjournaltracking

# Answer
> 4 votes
Fixed by changing all the classes to be in the CRM namespace. e.g.

```
class CJT_Page_EmrJournaltracking_JournalControls

```

Becomes

```
class CRM_Page_EmrJournaltracking_JournalControls

```

Disable and re-enable the extension to load the changes.

---
Tags: drupal, extension
---


# Question
Title: Why do some of my participants get sent a receipt when I update event details via a profile form
I'm using CiviCRM V4.4.13 and Drupal 7.41.

I have created a profile for batch updating several custom fields and the status of participants on our events. However, some participants seem to get sent a receipt after saving the updates (around 5-10% of participants) as if we had gone into their participant record and selected send confirmation and receipt. Is this a bug or is this expected behavior because of X reason?

# Answer
When you update the status of multiple participants using a profile, any participant whose status is changed from a non-counted status to a counted status or vice versa will be sent an email.

Go to **Administer \> CiviEvent \> Particpant Statuses** to check which statuses are counted and which aren't. (In this case "counted" means "included in count of total registrations for the event".)
> 4 votes

# Answer
Just make sure you haven't enabled **Online Registration =\> Confirmation Email** in the Event Configure page

please make sure does all the member has a email Id Also please make sure **"On Hold?"** is switched off for all the member
> 0 votes

---
Tags: civievent
---


# Question
Title: Has anyone every had to limit the number of memberships (of a specific type) that can be sold?
Project for swim club: offering kids' swim lessons in different pools + different time/slots. The program sells out quickly so need maximum number of spots available; recurring contribution - monthly payments.

I'm leaning towards looking at this as Membership (with one Membership Type per Pool/time/slot combination). Has anyone every had to limit the number of memberships (of a specific type) that can be sold? Trying to figure out the path of least resistance :-)

# Answer
> 2 votes
This sounds more like civiEvents would work better. You can limit the number of spots(attendees) and even have waitlists. You could set your price set up to be a recurring contribution for the Event.

---
Tags: civimember
---


title: CiviContibute View Customization

text:
# Question
Title: CiviContibute View Customization
I am using CiviCRM on Joomla. I wanted to know if there is a way to customize how I view the contributions on the admin side (in the back-end). I honestly have no need to see time of donation or premiums (we don't use any right now). Are there any ways to hide these fields to clean up the view?

# Answer
What you're asking for isn't possible without coding, unfortunately. It's a major focus of CiviCRM 5.0 to be able to have user-definable forms in this way.

If you're a coder, or you can hire/borrow one, you can use hook\_civicrm\_searchColumns to change which fields show on the Contributions tab. There's an example in this blog post. Finally, I just uploaded an extension I wrote to Github, which replaces the Premium column on the contributions tab with info on soft credits: https://github.com/PalanteJon/coop.palantetech.showsoftcreditsinsummary
> 2 votes

# Answer
If you are talking about setting up contribution pages for end-users of your website, you can do quite a bit to customize your contribution pages, both in initial setup and in the profiles used in conjunction with them. A good place to start is Set-up | Contributions and Profiles here, profiles there, profiles everywhere! (video of CiviCon Denver session)
> 0 votes

---
Tags: civicontribute
---


title: FIne-grained Volunteer Management

text:
# Question
Title: FIne-grained Volunteer Management
There is a need to manage neighbor-helping-neighbor volunteers in Senior Villages (and similar). Senior Villages are mutual-support organizations, often without paid staff, which provide social, cultural, fitness, and household support to enable their members to stay in their homes and age gracefully. Many Villages have a volunteer clearinghouse for things like rides to the doctor, watering plants while the homeowner is away, friendly welfare check-ups, shoveling snow, etc. This is different from volunteers for fixed roles at fixed events. Maybe Civicase with an enhanced client/service match function would work. It is similar to a storefront, but for services, not products. It's actually kind of like Uber or AirB&B, where distributed producers provide distributed services through a clearing house.

What we need is:

* volunteer registration, with tags for skill set, certification
(background check, CPR, etc.), and availability, including vacation
absences.
    + service requests, including: type of service, time of service, locations (transport needs start and final destinations; round
    trip?); special concerns ("needs help with stairs"; "must transport
    wheelchair/walker"), etc.
    + provider/service match (including volunteer's past workload), query, and assignment
    + mutual notification of client and provider
    + confirmation, evaluation, and "lessons learned" feedback from both client and provider; time sheet logging
    + performance reports for evaluation and recognition of outstanding performance ('cause we ain't paying the volunteers money)

Thanks for any help.

Does anyone know of a module to do this, or can suggest one that might be modified? There are commercial apps that do some of this (Ride Scheduler, Club Express), but not all and which are not readily customizable the way Civi is. Without a staff, we need to embed as much paperwork and process expertise in the system as possible. As the population ages, but doesn't die or go into care, this is potentially a big market.

# Answer
despite the detail provided it is hard to presume the workflow involved here but having looked through the Ride Scheduler tour I would approach building the core of this around Drupal Webform-civicrm and Activities and Views.

The webform approach gives the flexibility for capturing the info that civi core lacks.

The use of Activities or Webform delivers the notification process.

Views can be used to give displays of current 'requests' in a more user friendly way.

At this point I don't see CiviCase being necessary but that is because I am probably not imagining the workflow very well.

The one gap I see compared to RideScheduler is the automated call to the driver. But an SMS should be do-able without extra effort using eg CiviRules
> 2 votes

# Answer
Because of the requirements for specific skills and roles (i.e. driver, availability) I would recommend giving the excellent CiviVolunteer extension a look. It would definitely give you some of the functionality, can be built upon, and the developers are always happy to hear from people who want to expand it!

Petednz's suggestion of CiviRules for sending an SMS is a good one here. CiviRules doesn't support this yet, but it would be very easy for a developer to add this as an option :)
> 0 votes

---
Tags: civicase, civivolunteer, modules
---


# Question
Title: CiviCRM 4.7.4 (Joomla version) contains Drupal version of civicrm.config.php
I just downloaded and extracted https://download.civicrm.org/civicrm-4.7.4-joomla.zip. Within /admin I found civicrm.zip. When I extract that and go into the civicrm folder, it contains civicrm.config.php. This file's code looks like Drupaly code, not Joomla-specific code. For example, line 36 is "function civicrm\_conf\_init() {". That's a Drupal function call ... the Joomla version of this file should look very different.

So my question is: is it correct that this file contains what look like Drupal functions? This appears to be preventing my CiviCRM cron jobs from running. The cron job errors out with:

"Could not load the settings file at: /var/www/public\_html/administrator/components/com\_civicrm/civicrm/../..//default/civicrm.settings.php"

I am pretty sure it is due to this civicrm.config.php being a Drupal version rather than a Joomla version. Seems the zip file needs to get updated to include the correct Joomla file.

EDIT: Just wanted to clarify that I was attempting to upgrade CiviCRM from 4.6.8 to 4.7.4, after which I encountered the above issues.

# Answer
> 1 votes
When you install CiviCRM in Joomla, that file is re-written to a Joomla-specific version -- which basically just has references back to the civicrm.settings.php file one directory up. The installation package will always have the default version which was built with Drupal in mind. The rewrite happens during installation.

If your site version of that file is the same as the package version, it suggests there may have been a problem installing CiviCRM in Joomla. Try reinstalling CiviCRM on top of your existing installation and see if the file is generated properly.

# Answer
> 1 votes
It does look like Joomla should be excluded from having `civicrm.config.php` generated for it. So you might try **moving** that file away from the directory it's in - keep a backup in case! - and see if Joomla "comes right".

If this fixes the problem for you, the issue should be reported to the CiviCRM bugtracker @ https://issues.civicrm.org/

You might also look back at older CiviCRM downloads (eg Joomla for 4.6.10) and see if the `civicrm.config.php` was recently added to the Joomla zip.

---
Tags: joomla
---


# Question
Title: error: "Found installation Canary" while installing CiviCRM
```
Fatal error: Uncaught CRM_Core_Exception: [0: Found installation canary.
This suggests that something went wrong with tracking installation process.
Please post to forum or JIRA. thrown in
C:\xampp\apps\wordpress\htdocs\wp-content\plugins\civicrm\civicrm\Civi\Core\InstallationCanary.php
 on line 53

```

I am getting above error when I tried to start CIVICRM?

I am not able to go forward.

Can any body guide me?

# Answer
Shashikant,

Were you able to complete the installation mentioned at https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+Wordpress ?

Kurund
> 1 votes

# Answer
Did you visit \[yoursite\]/install.php ?

Cheerio,

John
> 0 votes

---
Tags: wordpress, installation
---