title: file permissions with hosted wordpress

text:
# Question
Title: file permissions with hosted wordpress
I seem to be regularly running into problems with file permissions running on WordPress. The two specific examples are that image browsing and upload didn't work in KCEditor (due to permissions for KCFinder) and the tracked links in bulk mailings were failing. In both cases I got 500 errors from the browser. I found that I needed to change directory permissions to 755 from 775 and file permissions from 664 to 664 in appropriate places. It seems rather random whether directory/file permissions are 775/664 or 755/644.

I think this is due to the way my hosting provider sets up WordPress and does not allow 775/664 permissions and from what I read this will be a common situation with hosting providers that use suexec.

Changing file permissions manually is a work around, but tedious and unreliable. I may be missing some and things not working properly because of this, but not being so obvious. And when it comes to an upgrade I'll have to go through it all again.

Is there a reason why the WordPress CiviCRM is distributed with these file permissions? Is there a reason for the variation in file permissions (and what is the logic)?

If this can't be changed in the distribution, can I safely change all 775 to 755 and all 664 to 644 and how might I do this?

I don't think the versions are relevant, but this applies to CiviCRM 4.7.24 and WordPress 4.9 and also other recent versions earlier this year. The hosting provider is SiteGround.

# Answer
> 2 votes
It depends under which user your hosting provider is running the web server (or the PHP process if using FPM). Sometimes the web server runs as your user, sometimes it runs as a generic www-data/httpd user. If you have ssh access and your user can view processes, you can run:

`ps aux | grep -E '(www|http|apache|php)'`

(many cpanel-type hosting providers might not even let you see the list of processes)

In any case, I think it's safe to default to:

* Any files/directories with php files should be 755/644
* Other directories, where there might be uploads, cache files, logs, should be 775/664. For example: `wp-content/uploads/civicrm/`.

Related questions:

---
Tags: wordpress, permissions, filesystem
---


# Question
Title: Sync custom first and last name fields in Drupal with CiviCRM
We have an online training platform and had created custom first and last name fields to be used on their training certificates. Drupal asks for this information when they register for an account. However, this first and last name is not passed on to CiviCRM until they fill it out again during the subscription process.

How can I synchronize the first and last name fields in CiviCRM with the custom first and last name fields I created in Drupal? Thanks!

CiviCRM 4.7.15, Drupal 7

# Answer
My answer is an alternative that was used in order to accomplish what was needed. Rather than sync Drupal fields with CiviCRM fields, I activated the ability for CiviCRM fields to be used in Drupal views, as well as created custom profiles in CiviCRM to render the fields during the Drupal registration process. Please go ahead an add an answer if it answers the original question.

1. Go to http://yourdomain.com/civicrm/admin/setting/uf?reset=1, replacing "yourdomain.com" with your actual domain. Copy all the code shown.
2. Edit your settings.php file and insert the code after the databases array, so it will look something like this:

```
$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'drupal',
      'username' => 'user',
      'password' => 'password',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

```

/\* Beginning of pasted code from CiviCRM \*/
3. Clear site caches and civicrm caches and you should be able to render CiviCRM fields in your Drupal views.

Source: https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/ (Updated, thanks Aiden)
> 1 votes

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


# Question
Title: How to load the definition of a case type with the CaseType API
I am trying to use the CaseType API to create a case\_type but I can not find any documentation on how to set the **definition** parameter. Any hints or should I just dive into the code?

# Answer
It's probably actually easiest to look at the code. CRM\_Case\_BAO\_CaseType::convertDefinitionToXML() gives the list of array elements to set, e.g.

```
$definition = array(
  'activityTypes' => array(
    'key1' => 'value1',
    'key2' => 'value2',
  ),

  'statuses' => array(
    'blah1',
    'blah2',
  ),
// etc...
);

```
> 1 votes

# Answer
You can use the Api Explorer to fetch an existing case type with definition and inspect it.
> 1 votes

---
Tags: api, civicase
---


# Question
Title: Recurring contributions on paypal pro - undefined index
We have a contribution page with the option to mark the donation as recurring with the ability to specify the term (how many months). This was working well, until recently, we are receiving a big red notice at the top of the page, even though the contribution appears to have registered correctly with CiviCRM as well as with Paypal. Here's the error:

Notice: Undefined index: installments in CRM\_Core\_Payment\_PayPalImpl-\>doDirectPayment() (line 371 of /\[PATH\_TO\_CIVI\]/crm/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).

Any ideas as to what I need to do to make this error/notice go away?

EDIT: I checked line 371 in the file specified and this is the line:

```
 $args['totalbillingcycles'] = $params['installments'];

```

Which exists in the middle of the following If statement starting on line 356:

```
if (CRM_Utils_Array::value('is_recur', $params) == 1) {
      $start_time = strtotime(date('m/d/Y'));
      $start_date = date('Y-m-d\T00:00:00\Z', $start_time);

      $args['PaymentAction'] = 'Sale';
      $args['billingperiod'] = ucwords($params['frequency_unit']);
      $args['billingfrequency'] = $params['frequency_interval'];
      $args['method'] = "CreateRecurringPaymentsProfile";
      $args['profilestartdate'] = $start_date;
      $args['desc'] = "" .
        $params['description'] . ": " .
        $params['amount'] . " Per " .
        $params['frequency_interval'] . " " .
        $params['frequency_unit'];
      $args['amt'] = $params['amount'];
      $args['totalbillingcycles'] = $params['installments'];
      $args['version'] = 56.0;
      $args['PROFILEREFERENCE'] = "" .
        "i=" . $params['invoiceID'] . "&m=" . $component .
        "&c=" . $params['contactID'] . "&r=" . $params['contributionRecurID'] .
        "&b=" . $params['contributionID'] . "&p=" . $params['contributionPageID'];
    }

```

Any thoughts?

# Answer
I'm guessing you aren't using the most recent version of CiviCRM (4.7.27). In the current version of this file, that line has been replaced with:

```
$args['totalbillingcycles'] = CRM_Utils_Array::value('installments', $params);

```

The CRM\_Utils\_Array function is meant to prevent missing indices or variables that aren't even arrays from throwing warnings. (https://issues.civicrm.org/jira/browse/CRM-13288).

I have no idea when the change in the code happened (what version/date).

I suggest you upgrade your CiviCRM. It looks like it would be relatively harmless to update the code manually, in this case.
> 1 votes

---
Tags: recurring-contributions
---


title: CiviMail not finding Recipients

text:
# Question
Title: CiviMail not finding Recipients
I am using Civi 4.7.27 on Wordpress 4.9. Today while trying to compose a new civimail message, I noticed that the recipients field is not automatically finding recipients like it used to. We recently upgraded to the latest version of both civi and wordpress. Is anyone else having this problem? See screen shot for details. I hope someone can tell me what I need to do to resolve it.

Thank you

# Answer
Problem solved. After installing the civi upgrade, I needed to flush the cache by going to Administrater/System Settings/Clean up Caches and Update Paths then click the Clean Up caches button. The issue was resolved immediately after doing that.
> 1 votes

---
Tags: civimail
---


# Question
Title: Why is the Actions button missing from Reports on 4.7.x after upgrade
After upgrading, several sites are missing the Actions on the Reports

# Answer
> 1 votes
In our case this was because the 4.6.x sites were using

* net.ourpowerbase.reports.advancedfundraising

needed to swop to the newer repo of the code ie

* net.ourpowerbase.report.advancedfundraising (without the 's') from

https://github.com/jmcclelland/net.ourpowerbase.report.advancedfundraising/archive/master.zip

# Answer
> 1 votes
I found this on a site we upgrade to 4.7.27 from about 4.7.21 (although possibly it occurred in an earlier upgrade and we didn't notice because we weren't making any changes to the reports). We were using Extended Report extension and upgrading that fixed this for us.

---
Tags: civireport, actions
---


title: How to api access relationship notes?

text:
# Question
Title: How to api access relationship notes?
I tried this in the 4.7.25 demo but the same is valid for 4.6.33.

1. Using the web GUI I added a test description and test note to an existing relationship
2. With API browser I listed relationships with Relationship get to see the content of this relationship.
3. I only see the description listed not the note. Neither does Notes appear in the "Fields to return", nor can it be chosen as a filter Parameter.

Does this mean that Relationship Notes are not supported by the API? If so, how should report this? As a bug? A missing feature?

# Answer
The Note is stored separately, so you can get it via chaining:

```
$result = civicrm_api3('Relationship', 'get', array(
  'sequential' => 1,
  'relationship_type_id' => 6,
  'api.Note.get' => array(
     'entity_table' => "civicrm_relationship",
     'entity_id' => "\$value.id",
  ),
));

```

To do that with the API explorer, use the Chain API Call button and enter the note parameters as JSON: `{'entity_table':'civicrm_relationship', 'entity_id':'$value.id'}`
> 3 votes

---
Tags: api, relationships
---


# Question
Title: System Status page empty and status remains 'critical' after updating from 4.7.8 to 4.7.11 on Drupal 6
This is a Drual 6 site with internationalization enabled for CiviCRM. There are no extensions installed. Site was updated from 4.7.8 to 4.7.11.

After running the db update script, the System Status in the footer has remained "Critical", despite the only red flag prior to the update being that the site needed to be updated.

When visiting the System Status page, it no longer displays any setting statuses, including the usual greens for php version, etc.

After running the db update script for 4.7.11 there were no errors on the update screen - back on the dashboard, however, the widgets failed to load and there was a DB error, but refreshed the page and it went away (and widgets came back) and hasn't come back since. The logs showed the DB error was due to a timezone error (I can paste the log details if desired).

The timezone issue is not appearing in a pop-up as (like I've seen on other sites), it is unknown if the error is the cause of what's breaking the system status page as I have been ignoring the timezone issue since it's not critical. Either way, this does not explain why the system status is now displaying as critical.

Thanks for any suggestions!

Update: issues still present in 4.7.14

# Answer
For some the answer has been to resolve the Timezone error, if it is present - see: http://civicrm.stackexchange.com/questions/14841/error-datetimezone-construct-unknown-or-bad-timezone-7200

If you have stumbled upon this thread more recently - we found a blank status page after a recent upgrade from 4.6.30 to 4.7.27 where there was no timezone error, in fact, no errors at all in the logs. The solution was to change "Asset caching" from "Auto" to "Disable" (/civicrm/admin/setting/debug?reset=1).
> 1 votes

---
Tags: error, upgrade, drupal-6
---


# Question
Title: How can I create custom contribution page (CiviCRM 4.7.25 on Wordpress 4.8?)
I want to create custom contribution page but I don't know how? for creating custom pages is needed any extensions or plugins? the below page is one of the pages that I created I want to delete yellow section and also the membership

# Answer
> 3 votes
Can you please edit your question to add your CMS and CiviCRM version. Depending on your CMS there may be other options for customization.

The yellow section only appears when a user is logged in to the site. It is designed to prevent a user from overwriting their information with another if they are entering a contribution on another person's behalf. I would recommend leaving it there to avoid accidental data changes. You could add some custom CSS to change the look.

As for the form itself and the pricing section you may want to review the information here which is an overview of the contribution pages: https://docs.civicrm.org/user/en/latest/contributions/online-contributions/

Also reviewing the following two sections on profiles & price sets can be helpful.

Profiles: https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/

Price Sets: https://docs.civicrm.org/user/en/latest/events/complex-event-fees/#price-sets

Hope this helps.

# Answer
> 1 votes
Apart from all the usefull advice from KiakwaBT I would like to add that if you want to start customizing CiviCRM and/or adding to CiviCRM I would certainly recommend you to study the developer guide at https://docs.civicrm.org/dev/en/latest/

---
Tags: wordpress, contributions, custom-templates
---


# Question
Title: How do I flag an extension which no longer works?
just to save anyone else some time.. I tried one and couldn't get it to work. I contacted the author and he confirmed it doesn't work and wont be updated.

so to save the next person going down the same route.. can I flag it?

# Answer
Is this an extension that is published in the CiviCRM extension directory? At the moment I do not think you can flag an extension as not working, but it would be nice if the author removed it from the extension directory if he/she agrees it no longer works.

If it is a case of it does not work with version 4.7 but it does work with version 4.6 that will show on the extension page where the supported versions are mentioned. But IMO that is not a 'it does not work', more a 'it does not work with my version'.

I think you should add a little more information about your statement?
> 1 votes

---
Tags: extension
---


# Question
Title: How to automatically add contacts to a group that matches the ACL?
I've got ACLs set up. Certain users can only have access to contacts in a particular group.

The problem is that when this user creates a contact they have to remember to add the contact to that group, otherwise they cease having permission to view/edit that contact the moment it's created.

Obviously this is clearly *their fault*, but realistically it's going to be a real paper cut in the system, leading to frustration and also lots of duplicate contacts as they just try again with a new contact.

I'm thinking of writing some code that either automatically adds contacts created into an appropriate group based on the user's access groups, or some hacky javascript thing that pops up a *"Oh, you've not added them to a group - did you forget?"* confirmation message.

But I suspect this problem's been found before and possibly dealt with a different/better way?

# Answer
As I didn't hear from anyone, I figured I'd just write the extension.

Artful Robot's AutoGroup Extension is here for your delight and delectation.

From the README:

> This extension allows you to choose a set of groups which will be added to new contacts if the logged in contact is also in that group.
>
> e.g. If Staff member Wilma is in the group 'Region: Birmingham' and Wilma adds a new contact, it can automatically add the new contact into 'Region: Birmingham' group.
> 3 votes

---
Tags: 4.7, acl, user-experience
---


# Question
Title: CiviContribute Dashboard Chart Layout does not display
CiviContribute dashboard does not show chart\_layout. Tested on Civi Demo as well as several installations. is there a configuration requirement?

See image

# Answer
> 3 votes
Problem is Flash being blocked. Although it is globally enabled, for some reason it is being blocked. Solved problem with this process to specifically trust site for Flash.

https://support.google.com/chrome/answer/6258784?co=GENIE.Platform%3DDesktop&hl=en

---
Tags: contributions, dashboard, chart
---


title: Search Profile troubles

text:
# Question
Title: Search Profile troubles
Is there a way to create a search profile that just brings up results on a webpage without having to manually start the search on the page?

# Answer
> 3 votes
Add &force=1 to the url. You can also specify the search terms by the field name, e.g. to pre-specify a search on First Name use http://dmaster.demo.civicrm.org/civicrm/profile?gid=1&force=1&first\_name=Errol&reset=1

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


# Question
Title: Error exporting activities: Unknown column 'activity_priority.label' in 'field list'
I upgraded a site last night from 4.7.13 to 4.7.27, and there's now an error when exporting activites. The error is:

Unknown column 'activity\_priority.label' in 'field list'\]"\]

I see where this part of the query is built in the civicrm/CRM/activity/BAO/Query.php file, and indeed there is no activity\_priority table in my database.

I'm unable to reproduce the error in a Civi demo, so I'm wondering if its something specific to my local installation.

Is there supposed to be an activity\_priority table? If so, how would it be created?

If not, any ideas on what would cause this issue?

EDIT: Here is the entire query:

```
SELECT contact_a.id as contact_id, contact_a.contact_type  as `contact_type`, contact_a.contact_sub_type  as `contact_sub_type`, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, contact_a.do_not_email  as `do_not_email`, contact_a.do_not_phone  as `do_not_phone`, contact_a.do_not_mail  as `do_not_mail`, contact_a.do_not_sms  as `do_not_sms`, contact_a.do_not_trade  as `do_not_trade`, contact_a.is_opt_out  as `is_opt_out`, contact_a.legal_identifier  as `legal_identifier`, contact_a.external_identifier  as `external_identifier`, contact_a.nick_name  as `nick_name`, contact_a.legal_name  as `legal_name`, contact_a.image_URL  as `image_URL`, contact_a.preferred_communication_method  as `preferred_communication_method`, contact_a.preferred_language  as `preferred_language`, contact_a.preferred_mail_format  as `preferred_mail_format`, contact_a.hash  as `hash`, contact_a.source  as `contact_source`, contact_a.first_name  as `first_name`, contact_a.middle_name  as `middle_name`, contact_a.last_name  as `last_name`, contact_a.prefix_id  as `prefix_id`, contact_a.suffix_id  as `suffix_id`, contact_a.formal_title  as `formal_title`, contact_a.communication_style_id  as `communication_style_id`, contact_a.job_title  as `job_title`, contact_a.gender_id  as `gender_id`, contact_a.birth_date  as `birth_date`, contact_a.is_deceased  as `is_deceased`, contact_a.deceased_date  as `deceased_date`, contact_a.household_name  as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, contact_a.sic_code  as `sic_code`, contact_a.user_unique_id  as `user_unique_id`, contact_a.employer_id  as `current_employer_id`, contact_a.is_deleted  as `contact_is_deleted`, contact_a.created_date  as `created_date`, contact_a.modified_date  as `modified_date`, contact_a.addressee_id as addressee_id, contact_a.addressee_display as addressee_display, contact_a.addressee_custom as addressee_custom, contact_a.email_greeting_id as email_greeting_id, contact_a.email_greeting_display as email_greeting_display, contact_a.email_greeting_custom as email_greeting_custom, contact_a.postal_greeting_id as postal_greeting_id, contact_a.postal_greeting_display as postal_greeting_display, contact_a.postal_greeting_custom as postal_greeting_custom, IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) as current_employer, civicrm_address.id as address_id, civicrm_location_type.id as location_type_id, civicrm_location_type.name as `location_type`, civicrm_address.street_address as `street_address`, civicrm_address.street_number as `street_number`, civicrm_address.street_number_suffix as `street_number_suffix`, civicrm_address.street_name as `street_name`, civicrm_address.street_unit as `street_unit`, civicrm_address.supplemental_address_1 as `supplemental_address_1`, civicrm_address.supplemental_address_2 as `supplemental_address_2`, civicrm_address.supplemental_address_3 as `supplemental_address_3`, civicrm_address.city as `city`, civicrm_address.postal_code_suffix as `postal_code_suffix`, civicrm_address.postal_code as `postal_code`, civicrm_address.geo_code_1 as `geo_code_1`, civicrm_address.geo_code_2 as `geo_code_2`, civicrm_address.name as `address_name`, civicrm_address.master_id as `master_id`, civicrm_address.county_id as county_id, civicrm_address.state_province_id as state_province_id, civicrm_address.country_id as country_id, civicrm_phone.id as phone_id, civicrm_phone.phone_type_id as phone_type_id, civicrm_phone.phone as `phone`, civicrm_phone.phone_ext as `phone_ext`, civicrm_email.id as email_id, civicrm_email.email as `email`, civicrm_email.on_hold as `on_hold`, civicrm_email.is_bulkmail as `is_bulkmail`, civicrm_email.signature_text as `signature_text`, civicrm_email.signature_html as `signature_html`, civicrm_im.id as im_id, civicrm_im.provider_id as `im_provider`, civicrm_im.provider_id as provider_id, civicrm_im.name as `im`, civicrm_openid.id as openid_id, civicrm_openid.openid as `openid`, civicrm_worldregion.id as worldregion_id, civicrm_worldregion.name as `world_region`, civicrm_website.id as website_id, civicrm_website.url as `url`, civicrm_activity.id as activity_id, activity_type.value as activity_type_id, activity_type.label as activity_type, civicrm_activity.subject as activity_subject, civicrm_activity.activity_date_time as activity_date_time, activity_status.label as activity_status,
  civicrm_activity.status_id as status_id, civicrm_activity.duration as activity_duration, civicrm_activity.location as activity_location, civicrm_activity.details as activity_details, civicrm_activity.source_record_id as source_record_id, civicrm_activity.is_test as activity_is_test, civicrm_activity.campaign_id as activity_campaign_id, civicrm_activity.engagement_level as activity_engagement_level, source_contact.sort_name as source_contact, activity_priority.label as activity_priority,
  civicrm_activity.priority_id as priority_id  FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 ) LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1)  LEFT JOIN civicrm_openid ON ( civicrm_openid.contact_id = contact_a.id AND civicrm_openid.is_primary = 1 ) LEFT JOIN civicrm_location_type ON civicrm_address.location_type_id = civicrm_location_type.id  LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_worldregion ON civicrm_country.region_id = civicrm_worldregion.id  LEFT JOIN civicrm_activity_contact
                  ON ( civicrm_activity_contact.contact_id = contact_a.id )  LEFT JOIN civicrm_activity
                  ON ( civicrm_activity.id = civicrm_activity_contact.activity_id
                  AND civicrm_activity.is_deleted = 0 AND civicrm_activity.is_current_revision = 1 ) INNER JOIN civicrm_contact
                  ON ( civicrm_activity_contact.contact_id = civicrm_contact.id and civicrm_contact.is_deleted != 1 ) LEFT JOIN civicrm_option_group option_group_activity_status ON (option_group_activity_status.name = 'activity_status') LEFT JOIN civicrm_option_value activity_status ON (civicrm_activity.status_id = activity_status.value
                           AND option_group_activity_status.id = activity_status.option_group_id )  LEFT JOIN civicrm_option_group option_group_activity_type ON (option_group_activity_type.name = 'activity_type') LEFT JOIN civicrm_option_value activity_type ON (civicrm_activity.activity_type_id = activity_type.value
                           AND option_group_activity_type.id = activity_type.option_group_id )  LEFT JOIN civicrm_website ON contact_a.id = civicrm_website.contact_id LEFT JOIN civicrm_activity AS parent_id ON civicrm_activity.id = parent_id.parent_id
    LEFT JOIN civicrm_activity_contact ac
                  ON ( ac.activity_id = civicrm_activity_contact.activity_id AND ac.record_type_id = 2)
    INNER JOIN civicrm_contact source_contact ON (ac.contact_id = source_contact.id) WHERE  (  (  (  ( contact_a.sort_name LIKE '%smith%' ) OR  ( civicrm_email.email LIKE '%smith%' )  )  )  )  AND (contact_a.is_deleted = 0) AND  civicrm_activity.id IN ( 25008,25006,25005,25004,25002,25001,24999,24997,24995,24993,24992,24991,24989,24987,24986,24985,24984,24982,24981,24979,24978,24976,24975,24974,24973,24971,24970,24968,24967,24965,24964,24962,24960,24959,24958,24957,24956,24954,24952,24953,24951,24949,24947,25003,25000,24899,24945,24998,24996,24990 )  AND contact_a.is_deleted != 1  GROUP BY civicrm_activity.id  LIMIT 0, 100000;

```

# Answer
> 1 votes
Comparing your SQL to the code, there's certainly a bug, but I can't replicate it on my end. The `select` method understands that the priority should be included; the `from` method does not. I don't think this is easily solved without a live debugger.

As a workaround, I'm 95% sure that this error won't occur if you explicitly select the fields to export (instead of exporting "primary fields". It's tedious, but easily tested by just exporting 1-2 fields plus the priority field.

---
Tags: activities, export
---


# Question
Title: Views: Filter results by current logged-in user
I'm trying to create a view to show a list of past events that were attended by the user that's currently logged in.

Could anyone advise on the filter criteria needed to do this?

**Fields**

> Event Title
>
> Event End date

**Filter criteria**

> Status = attended
>
> ???

# Answer
> 5 votes
Found it!

To limit views results to the current user, you want to:

1. **Create a relationship**

> Go to Advanced \> Relationships \> Add 'CiviCRM Contacts: Drupal ID'

2. **Add the filter criteria**

> User: Current (Yes)
>
> On the Relationship dropdown, select Drupal User

---
Tags: drupal-views
---


title: LMS with CiviCRM/drupal integration?

text:
# Question
Title: LMS with CiviCRM/drupal integration?
Looking for recommendations on Learning Management Systems (LMS) that work with drupal/CiviCRM. Thanks.

# Answer
> 1 votes
It's difficult to answer your question without more details about what KIND of integration you're looking for, but I can give two answers:

* If you're looking for a Learning Record Store (LRS), a native Drupal LRS exists, and CiviCRM integration for it exists too.
* Some integration with Moodle exists via CiviMoodle \- you can register someone for a CiviCRM event, and they're signed up for one or more corresponding events in Moodle (with user creation if necessary).
* There's also some custom integration for pulling grades back into CiviCRM from Moodle, but would need some love from a developer to fit someone's situation.

# Answer
> 0 votes
Agree that the question is pretty vague. We have delivered an LMS for a client who does professional development / training that is built purely with Webforms and CiviCRM Activities. Obviously this may not stretch to very complex scenarios, hence it is worth articulating exactly what outcomes you require.

---
Tags: drupal
---


# Question
Title: Version 7.x-4.7.24 I need to send letters to contributors that gives them detailed information on each donation they have made for the year
I looked in several places. One answer said to go to Find Contributions, actions, Thank-you letters for contributors, Group Contributions by contact. When I follow those instructions I do not find a Thank-you letter in my actions. Also, someone said that I may need to add an extension. As I browsed through extensions under administration, system settings, extension, I wasn't sure which to use.

# Answer
> 1 votes
You don't *need* an extension to do end of year receipts - though there are some that can help.

If you're based in Canada, you can generate a CRS-compliant receipt with CDN Tax Receipts, which automates this whole process for you. I believe a German equivalent exists as well.

Otherwise, there are instructions in the documentation called grouped contribution thank-you letters. That will get you a table of contributions.

Note that it seems like some of the display options are a little buggy; I just did some testing and found "horizontal table" to be the one that displayed best. If you really need to get the formatting perfect, you can ask your sysadmin to enable Smarty processing for mail templates. This is explained in the docs.

Note that despite the documentation, you do NOT need the Smarty processing if the only thing you need is a total. Instead you can use the Summary Fields extension. It will give you a token called "Total Contributions this Year". This is the easiest way to add a total to the receipt.

Finally - I can't speak to why you're not seeing a thank-you action. It should appear per my first screenshot below. Please post a new question (with a screenshot) if you're still having trouble with that.

"

# Answer
> 0 votes
This extension https://github.com/eileenmcnaughton/nz.co.fuzion.entitymessages comes with a token that I use {entitymessages.Domain\__thank\_you\_letter\_summary\_block} with a block of donations over the year

---
Tags: civicontribute, receipts
---


title: Civivolunteer on mobile

text:
# Question
Title: Civivolunteer on mobile
I am using Civivolunteer on wordpress. Works good, except on smartphones. The shopping card comes in front of the signup checkbox, so users can't sign up. Anyone having the same problem, or is it because of my wordpress site?

can't scroll right to the checkbox in vertical position

# Answer
> 1 votes
Do you happen to have a screenshot of what it looks like? It sounds like something in your theme or stylesheet is causing this to happen. In my Drupal site, I have styles that are used only on the mobile version of our site so that we could make it even more user-friendly.

---
Tags: wordpress, civivolunteer
---


title: External Profile Support

text:
# Question
Title: External Profile Support
I am receiving a warning when I enter CiviCRM which seems to indicate that I have something called "external profile support" set. Where do I find this option enabled? I have looked but cannot find it. I would appreciate an emailed answer if that is possible.

# Answer
> 1 votes
It's in **Administer menu » System Settings » Misc**, and it's labeled "Accept profile submissions from external sites".

That's a little obtuse, but most system warnings have a link on the System Status page, at **Administer menu » Administration Console » System Status**. See screenshot:

---
Tags: profile, joomla, html
---


# Question
Title: Civcrm Refund - why are amount and fin. type are based on (priceset) rather than line_item?
For non-'test'/Dummy refund (e.g. Authorize), the refund 'contribution' details for a 'contribution' consisting of 2 line\_items (a price and a service fee) are getting assigned the same financial type and total amount (with sign reversed) instead of retaining the line\_item values. For example, a refund for an event where the price-set includes an event\_fee of $20 and service\_fee of $2 should have -$20 for the event\_fee and -$2 for the service\_fee, and the financial-types not changed. In CRM/Contribute/BAO/Contribution.php, both the event\_fee and service\_fee *amount* is set to -$22 and service\_fee *financial type* is changed to 'event\_fee' type. I modified the code in (Civicrm 4.7.23) CRM/Contribute/BAO/Contribution.php. Is there a reason NOT to do this?

# Answer
> 1 votes
Your modification is almost certainly correct.

Line items are an area of the code that was traditionally weak, but have come a long way in the last year. My recommendation is to submit a bug report on issues.civicrm.org, and your patch on Github. The review process means that this question will be answered by the financial experts. Financial improvements are generally reviewed pretty quickly.

---
Tags: civievent, civicontribute
---


# Question
Title: How can Stripe extension create contact sub-type?
We implemented the Stripe extension for online payments and are delighted with it. Using a standard contribution page (not a webform) new contacts are created as the basic contact type of 'Individual'. But... we have sub-typed contact types and would like the contact type created here to be a contact sub-type of 'Individual contact'. This doesn't appear possible using the UI but maybe I missed something. I don't want to use a webform because recurring contributions don't work with Stripe but they do with the standard contribution page. Any ideas on how to select a contact sub-type ?

# Answer
> 1 votes
Depending on your configuration, you can do this with CiviRules.

Your trigger will be *Contribution is added*, and your action will be *Set subtype for contact*.

The question is the "condition". If Stripe is your only payment processor, then you're golden! The condition should be *Contribution is (not) paid by*, and set credit card/debit card as the values.

---
Tags: drupal, 4.7, stripe
---


# Question
Title: Problems making resource URLs portable on CiviCRM
I'm getting a warning for my Wordpress install of CiviCRM, under the title **Resource URLs: Make them portable**:

> Resource URLs may use absolute paths, relative paths, or variables. Absolute paths are more difficult to maintain. To maximize portability, consider using a variable in each URL (eg "\[cms.root\]" or "\[civicrm.files\]").

On the Resource URLs page it brings me to, I have the *CiviCRM Resource URL* as

```
http:// <path to Wordpress install> /wp-content/plugins/civicrm/civicrm

```

The others on this page which are populated are *Image Uplaod URL*

```
[civicrm.files]persist/contribute

```

and *Extension Resource URL*

```
[civicrm.files]/ext/

```

But when I try to change *CiviCRM Resource URL* to

```
[civicrm.root]/

```

which is the recommended portable value from the help button near the top, and then save it, the value is not saved, and reverts to the absolute URL above, and the warning persists.

I have installed CiviCRM 4.7.27 on Wordpress 4.9.1.

# Answer
> 1 votes
One reason that the value may not change is because it's overridden in `civicrm.settings.php`. See the Overriding Settings section of the documentation.

An upcoming version of CiviCRM will make overridden settings clearly non-editable, but for now, check `civicrm.settings.php`.

# Answer
> 3 votes
Starting in 4.7.26 in order to handle the multiple ways that WordPress can be installed on various hosts, we are determining the correct path and setting both the path to the site (front end) and the path to the backend (wp-admin) in civicrm.settings.php.

The resource url status warning will need to be updated to handle this.

---
Tags: wordpress, resource-urls
---


# Question
Title: SQL Error in Contribution Details Report
Can someone help me resolve this error? I have recently started using CiviCRM but the website has been up for years. Thanks for helping. Arthur

Running CiviCRM 4.7.27 with Wordpress 4.8.4

On the Contribution Reports/Contribution Details see the following error in the log when trying to view results.

```
[type] => DB_Error
[user_info] => CREATE TEMPORARY TABLE civireport_contribution_detail_temp2  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_soft_civireport.amount as civicrm_contribution_total_amount_sum, 'Soft Credit' as civicrm_contribution_contribution_or_soft, address_civireport.country_id as civicrm_address_country_id
  FROM  civireport_contribution_detail_temp1 temp1_civireport
  INNER JOIN civicrm_contribution contribution_civireport
    ON temp1_civireport.civicrm_contribution_contribution_id = contribution_civireport.id
  INNER JOIN civicrm_contribution_soft contribution_soft_civireport
    ON contribution_soft_civireport.contribution_id = contribution_civireport.id
  INNER JOIN civicrm_contact      contact_civireport
    ON contact_civireport.id = contribution_soft_civireport.contact_id

  LEFT JOIN civicrm_phone phone_civireport
  ON (contact_civireport.id =
  phone_civireport.contact_id) AND
  phone_civireport.is_primary = 1

             LEFT JOIN civicrm_address address_civireport
                       ON (contact_civireport.id =
                           address_civireport.contact_id) AND
                           address_civireport.is_primary = 1

        LEFT JOIN civicrm_email email_civireport
               ON contact_civireport.id = email_civireport.contact_id AND
                  email_civireport.is_primary = 1

```

WHERE (1) AND ( contribution\_civireport.contribution\_status\_id IN (1) ) GROUP BY contact\_civireport.id, contribution\_civireport.id, email\_civireport.email, phone\_civireport.phone, 'Contribution', address\_civireport.country\_id \[nativecode=1055 \** Expression #9 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'civicrm.contribution\_soft\_civireport.amount' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql\_mode=only\_full\_group\_by\]

# Answer
> 1 votes
Your mysql database has only\_full\_group\_by set. You want to unset it, but probably keep the rest of the sql\_mode values. You can see the current value with `SELECT @@sql_mode`. You probably want to set it in the server's my.cnf file.

So for example if the current value is ONLY\_FULL\_GROUP\_BY,STRICT\_TRANS\_TABLES,NO\_AUTO\_CREATE\_USER,NO\_ENGINE\_SUBSTITUTION

then you want to set it to STRICT\_TRANS\_TABLES,NO\_AUTO\_CREATE\_USER,NO\_ENGINE\_SUBSTITUTION

See https://dev.mysql.com/doc/refman/5.7/en/option-files.html if you're not familiar with the my.cnf startup options file.

---
Tags: civireport
---


# Question
Title: Can Domain Access ensure that a civi 'admin' on domain-B can not login via domain-C and see contacts they should not see?
My recollection maybe wrong on this. Scenario is

* main site A
* subsite B
* subsite C

Subsites B and C are created via Domain Access module and are correctly wired in to civicrm so that a contact created on siteB is added to GroupB and hence the subsite-admin on site B can log in to Civi but only see contacts in Group B.

Excellent.

What I am missing is how to ensure via Roles and Permissions (or something extra) that subsite-admin B cannot login in via subsite C (which they currently can and hence can see contacts in Group C)

I have looked at domain\_roles and domain\_login but neither give me what I expect.

Look forward to having the obvious missing link pointed out to me.

# Answer
> 1 votes
Seems this is possible in a fairly blunt way by using the domain\_bonus\_login\_restrict module which is part of the Domain Bonus module

---
Tags: drupal, multisite, drupal-multi-site
---


title: Uninstall CivicCRM

text:
# Question
Title: Uninstall CivicCRM
I downloaded and extracted CivicCRM for Wordpress, and now cannot do anything with it. I would like to uninstall and start again. Advice I find here has not helped... Why can't I find it in the control panel uninstall list? When I click on uninstall.php document I get a pop-up asking what program I want to use to open it. Many thanks. Steve

# Answer
if you want a clean start, the easiest way is to go into file manager from the control panel and delete all the files. Navigate to .../wp-content/plugin/civicrm and delete all the contents of this directory and then the directory itself.

You should do the same with .../wp-content/upload/civicrm.

I've installed civicrm with its own database so I have deleted that as well, but if you are using the same database as WordPress you can't do that. But if you had a clean install of WordPress you could just unisntall that as well and. In fact just uninstall WordPress is the simplest and cleanest (if the there is nothing else to loose!
> 3 votes

# Answer
I know in Drupal all I can do inside it is turn it off - not uninstall it. When I want to uninstall it from a site, I do so manually - delete the folder where all the CiviCRM files are at, delete the database, delete the folder inside my files folder where all the log files and such are located. I've never used an automated process for it.
> 1 votes

---
Tags: wordpress
---


# Question
Title: Custom field group weight order on contact summary page?
As far as i can tell, the weight of custom field groups is not respected in the order they are displayed on the contact summary page - is that accurate?

I can't find anything obvious that controls that order - if anyone knows otherwise i would appreciate it!

Civi v 4.7.27 and drupal 7

# Answer
The 'order' only controls a field set in respect of other Custom Field sets, it does not relate to Core field sets that show on Summary.

Eg on demo I just made a new field set for Contact. It showed to the right of Constituent Information.

I then edited the order to push my new set to the 'top' and it then showed on the left which Constituent Information then showed on the right.
> 1 votes

---
Tags: custom-fields
---


title: how to add contacts to smart groups

text:
# Question
Title: how to add contacts to smart groups
I have entered about 5000 contacts and i want to add some of these contacts to a smart group. This smart group is a list of our paying members. How to add individuals from the list of contacts to a smart group? i ihave done Contacts\>Manage Groups. Then i select the particular Group (which is called BI Members). This gives me a list of contact who are already members (with the help of a co-worker who left the organization). Then i select "add contacts to BI Members". i enter a name of a contact and it appears in the list. i select and hit add. but the contact is not added to this smart group.

# Answer
> 2 votes
If you want to use a smart group (because it automatically keeps itself updated based on certain criteria) you start by doing a search. In your case, find all people with a membership (**Search \> Advanced Search**). Then you save your search as a smart group by selecting all the results and in Actions \> Create Smart Group. Then give it a name and it will keep itself updated for you. As others mentioned, if you want to add people manually, then you would create a regular group, not a smart group to keep it clean and simple.

# Answer
> 1 votes
Scroll down to the area on adding/removing members manually. This should allow you to do this:

https://docs.civicrm.org/user/en/latest/organising-your-data/smart-groups/

# Answer
> 1 votes
Are you sure the scheduled job to rebuild the smart groups is switched on? THat might help! And as stated before, you should not add members to a smart group manually, that should only be done to a static old-fashioned manual group!

---
Tags: wordpress, smartgroups
---


# Question
Title: How to Export full back up of entire database
I would like to export a full copy of the database contact details - all the details not just the primary. Short of selecting each individual field, how to I collect "all records' report?

# Answer
Exports and backups serve different purposes: 'export' refers to an extract of data to use in another system, 'backup' refers to recovery in the event of system failure, recovery from bad user actions (eg unintended deletes), creating a second copy of the site etc.

If you want a backup, then take a dump of the mysql database with mysqldump or an equivalent provided by your hosting environment. That will include 'all the details' including all activities, events, contributions, memberships etc relating to each contact.

If you want to export data into eg a spreadsheet, then there are a few options:

* I think you were referring to the Export Contacts action from contact search results. If you don't want its selection of primary fields then unfortunately you need to specify each one.
* You could look at using a report (eg Constituent Report (Summary)) that allows you to export as CSV (in the Actions dropdown).
* If the reports don't provide what you need and you are on Drupal, then you could create a View and use eg Views Data Export to create your own CSV.
* If you have command line access you could also look at, and maybe customize, the script at `<civiroot>/bin/csv/export.php`
> 8 votes

---
Tags: contacts, database
---


title: Mailer Limited to 10 Groups

text:
# Question
Title: Mailer Limited to 10 Groups
On a Drupal 7.56 / CiviCRM 4.7.27 site, since the last update, when making a mailer we can only add 10 groups and then it doesn't allow us to add more.

Previously it worked for more than 10 groups.

I see no errors in front end nor back end.

# Answer
> 3 votes
This is a known (fixed) bug, CRM-21468. You can apply the patch manually if you feel comfortable; otherwise, it will be fixed in CiviCRM 4.7.29.

---
Tags: civimail
---


title: Creating tags from fields

text:
# Question
Title: Creating tags from fields
Is it possible to create tags from fields, where someone selecting a certain option tags them with that option. I.E. selecting the volunteer option tags the new contact as volunteer?

# Answer
This is possible with CiviRules. However, I'd argue that in most cases you'd rather use a Smart Group.

If you're committed to using CiviRules though:

* You'll need two rules. One with a trigger of "Any contact is added" and one with "Any contact is changed". If this only applies to individuals, you can substitute the appropriate triggers.
* The condition will be "Field Value Comparison".
* The action will be "Add tag to contact".

Note that you may want another rule to *remove* the tag if the field is changed and the condition no longer applies.
> 4 votes

---
Tags: forms, tags, fields
---


# Question
Title: Problem with free memberships on contribution page (Resolved)
I am working in CiviCRM 4.7.24/Drupal 7.56.

I have a contribution page for member signups. The page is using a price set that we just added a new free member type to. The rest of the member types are not free. The page works fine with the paid member types.

If someone selects the free membership they are forwarded to the billing info page but nothing is showing but the "Back" and "Confirm Contribution" buttons. If "Confirm Contribution" is clicked we get the error "Please review and correct errors before continuing" but there is nothing to review or correct.

Is it possible this is because we have "Execute real-time monetary transactions" selected in the page configuration? Can there be free and paid options together on the same page?

Any suggestions on getting the free membership options to work?

Thanks!

EDIT Nov. 30: I've confirmed the issue is not specific to the free membership but anything free. If the final total is anything other than $0.00 it processes fine (even negative numbers)

# Answer
As posted under Jenni's comment. This problem was due to some customization in the contribution form. Once we put in a test for a zero balance and a conditional response everything is working again.
> 3 votes

---
Tags: civicontribute, civimember, price-sets, configuration
---


# Question
Title: How do I modify properties (container width and column widths) of the New Individual Form/Box
I'd like to know which file(CSS?), and within the file which element/variable etc. I can edit to adjust the properties of the New Individual Container/Form.

I'd like to do 2 things: 1 -Make the Container wider. By default it is 500px, I want to increase it to 60opx. 2 - Adjust the width of the columns to make the 1st one wider so the question is not all jumbled up, to make it a bit more user friendly/readable.

I am hoping someone can tell which file and which element needs to be edited please - I am guessing civicrm.css but the only entry I found that referenced 500px by default didn't do anything when I changed it.

Thanks!

# Answer
> 1 votes
That dialog box has it's dimensions set in a style tag of the html that's generated by javascript (which is why you won't see it in the source of the page or any of the css). There's probably a setting in a config file somewhere that controls it. The class of that div is "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front crm-container ui-draggable ui-resizable ui-dialog-buttons" in case that provides any hints, I'd guess it's from jquery\_ui.

On other hand, you probably don't want to mess with it - I suspect it would just be easier adjust your workflow, and create the new contact first before registering him/her.

If you are determined to fix it, I'd recommend instead you look at "bootstrap" (as in getbootrap.com), which CiviCRM is adopting in various ways. With a bootstrap style of form, it would have a better layout and put the labels above the fields. You could do that just with a bit of css override, or you could go whole hog and look at civihr and the bootstrap interface component of that.

# Answer
> 1 votes
Making the container wider won't necessarily solve your problem. Depending on what theme you are using for your administration, the field labels will wrap even if there is clearly more room available. I suggest you try adding (or modifying) a custom css file and link to it at Home » CiviCRM » Administer CiviCRM » Settings - Resource URLs. We keep ours in \[cms.root\]/sites/default/files/custom\_civicrm.css.

Here are some of the CSS rules with which you may want to experiment:

```
 .crm-container .crm-section .label {
     float: none;
 }
 .ui-dialog label {
     white-space: nowrap;
 }

```

The `float:none` prevents the label from being jammed over to the left. Ironically, this "floats" the label above the field in a nice way. The `white-space: nowrap` forces the entire label to display on a single line, which overrides the `word-wrap: break-word` you might have in another css file.

If `.ui-dialog` ends up being too broad (creating strange effects elsewhere in your CiviCRM system), you might also try `.CRM_Profile_Form_Edit`. This should have the same effect, but will have a much more limited score. There may be other pop-up dialog boxes that have the same word-wrapping problem, and they will likely have different classes. You could copy the CSS for each class you find, or inspect the element using Chrome to find the most broad class that doesn't give you any undesired effects.

---
Tags: contacts, css, column
---


# Question
Title: Contribution form looks different on live site
I'm using civicrm 4.7 on a 3.6.5 joomla site with the LT Charity Template. The field on my contribution page looks different from the page when I do a live preview. I researched the issue and I suspect it's a CSS issue? How do I get it to look like the live preview? What needs to be changed?

Here's the test-drive page but I see the labels are white which means that if they are white on the live site, with it's white background, they would not show.

This is how I want the form to look for the live site like this picture of the profile form using the preview function in civicrm:

# Answer
> 2 votes
I edited the custom CSS in the template with some code to change the form label color to black.

# Answer
> 1 votes
In a similar situation (but in Drupal), I used the following code in \[cms.root\]/sites/default/files/custom\_civicrm.css, which I created and referenced on the Settings - Resource URLs administration page in the Custom CSS URL field:

```
div.crm-container label {
  color: #333333;
  font-weight: normal;
  font-size: 1.2em;
}
.crm-container .crm-section .label {
  float: none;
}

```

The CSS can obviously be changed to override any of the theme's or CiviCRMs standard CSS, which sometimes conflict with one another.

---
Tags: civicontribute, forms, css
---


# Question
Title: CiviCRM CSS doesn't appear to be used when viewing live pages
I'm evaluating CiviCRM in Wordpress. When I view test pages, the layout looks fine. But when I view live pages, it often looks quite different and worse than the test. In some cases, it's completely unusable.

I thought that CiviCRM wrapped its elements in CiviCRM specific DIVs to preserve the CSS...

Not sure what's going wrong, but glad to be pointed in likely directions.

Thanks, Norman

# Answer
> 1 votes
CiviCRM does use the `.crm-container` and other similar classes in its templates, which helps to isolate the CSS styles (sometimes for better, sometimes for worse). The main problem I have found, especially with Bootstrap themes, is Bootstrap taking over the `.label` class, and CiviCRM not using a class name such as `.crm-label`. I've found a relatively easy fix to be using a custom CSS file that is linked from the Settings - Resource URLs administration page. For example, our document is at \[cms.root\]/sites/default/files/custom\_civicrm.css, and contains this code (among other overrides):

```
div.crm-container label {
  color: #333333;
  font-weight: normal;
  font-size: 1.2em;
}

```

As I have discovered other strange interactions between the theme and CiviCRM, I've used Chrome to Inspect the CSS to find the class that is just specific enough to cover all of the style that needs to be fixed.

---
Tags: wordpress, css
---


# Question
Title: How do I disable civicrm.css on public pages in Drupal?
I have the following in my template.php file, in my custom theme:

```
function shriver_css_alter(&$css) {
    unset($css[drupal_get_path('module','civicrm').'/css/civicrm.css']);
}

```

It doesn't work, though. I can disable other stylesheets this way, but not this one. I know I can disable this stylesheet in civicrm settings, but then it is disabled on the back end as well. I only want it to be disabled on the public pages. Since I use a different admin theme than my public one, I thought it made sense to disable it for my public theme only.

Can someone help me to get this to work? Or, if you know a different method, that would be good, too. Thank you.

# Answer
This is the correct way to disable civicrm.css on the front end. Put this in the template.php file of your theme:

function shriver\_css\_alter(&$css) { unset($css\['sites/all/modules/civicrm/css/civicrm.css'\]); }

Manually enter the path to the css. When I used drupal\_get\_path('module','civicrm'), it would output sites/all/modules/civicrm/drupal/css/civicrm.css. Not sure why it added 'drupal' to the path but that was the problem.
> 3 votes

# Answer
You can also use the CiviCRM Theme module in Drupal Administration menus:

Then, the following menu appears at the bottom of the Drupal Appearance menu:
> 1 votes

---
Tags: drupal, css
---


# Question
Title: How does CiviCRM rate compared to other CRMs
I am writing this question as our organisation is starting to explore alternative CRM’s that are available on the market to replace our current existing one which is ChilliDB. Our use of the CRM would be with regards to the following:

* Data storage for over 13,000 stakeholders which will require continuing changes on our end.
* Data audits – will CiviCRM allow for some form of data checking to identify user changes if we have administrative access?
* Integration with some of our current systems.
* Needs to be somewhat customizable with the operations of the organisation.
* Needs to be relatively user friendly
* Strong support on the developers end to assist with issues
* What is the security like? Our data is regulated and confidential. This is an area of concern for us.

Any help to these questions is greatly appreciated.

Cheers guys/girls

# Answer
> 3 votes
I've worked with sites with tens of thousands of records that are constantly being interacted with, changed, etc. So that is no problem.

There is some tracking of changes. What exactly were you looking for?

Whether it can integrate depends on your systems. We'd need more info on what you need to integrate with. Otherwise the answer is maybe.

I've found it to be user friendly, but I've used it for a while. You will likely need a bit of training up front to help you locate everything you need to do. I find that much easier than trying to learn it yourself and much less time consuming as well.

The same thing with customizable. Yes, it is customizable, but it depends on what you want to do. Some customizations may mean a major edit to the software, that an extension needs to be done, etc.

For support, it sounds like what you're talking about is someone you would hire to support the install. There is some support on here, via asking questions and such. But really getting into your site and fixing things, changing things, running updates, etc is going to mean the need to hire someone who knows Civi.

Some of the security relies on you and your server, how often you run updates to the CiviCRM software, etc. There's also user logins that have specific permissions as to what they're allowed to do.

---
Tags: evaluating-civicrm
---


# Question
Title: CiviCRM Wordpress Installer Database Instructions incorrect?
Instructions were here: https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/

I downloaded the zip to my local computer, then ftp uploaded it to my web server. I created the /wp-content/plugins/files/ directory and ensured it is writable.

I'm not using Localization so I skipped that section.

I then enabled the CiviCRM plugin and ran the installer. I filled in the database settings, and it continued on with the Check Requirements and Install CiviCRM which completed successfully.

The part I don't understand is that the installer assigns a database administrator name and password, however the password is starred out \***** so I do not know what it is. I don't get the point of this, how can I possibly maintain or recover the database if I don't have the password credentials???

I thought that after the install it would email me those credentials but it appears to be top secret so that even me, the administrator, cannot know it. How do I obtain this password?

# Answer
> 1 votes
This is the MySQL password and not the WordPress administrator password. If you used the same MySQL database for WordPress and CiviCRM, check `wp-config.php` in the root of your WordPress installation to find the password.

If you used separate databases (or you're not sure), find `civicrm.settings.php`. On a new install, this should be in `<webroot>/wp-content/uploads/civicrm`. Open it in a text editor and look for a line that looks like:

```
define('CIVICRM_DSN', 'mysql://<mysql_user>:<mysql_password>@127.0.0.1:3306/<mysql_database>?new_link=true');

```

The password should be everything after the second colon and before the @ sign.

**Note:** there's a very similar-looking like that starts with: `define( 'CIVICRM_UF_DSN'`. This contains your WordPress connection info and not your CiviCRM connection info.

# Answer
> 0 votes
The database admin should be the one for your actual database - which is created in your hosting account. Unless the WP install is *very* different from Drupal, the database admin information that goes in my installer is what is assigned in my control panel for the database in question.

---
Tags: database
---


title: SMS Message text is incorrect

text:
# Question
Title: SMS Message text is incorrect
I am using the Twilio extension to send SMS Messages from within CiviCRM. The text above the textbox states 'You can insert up to 460 characters'. This is incorrect and should read 'You can insert up to 160 characters'. I am not sure where to change the text. If someone could point me in the right direction I would be most grateful.

# Answer
> 1 votes
Maximum SMS length is defined by the `MAX_SMS_CHAR` constant in

`../sites/all/modules/civicrm/CRM/SMS/Provider.php`.

---
Tags: civisms
---


# Question
Title: Scheduled Reminders generates faulty SQL
CiviCRM 4.7.27 Usually, our CiviCRM guru handles these, but I figured I would ask a wider audience.

When choosing date instead of an interval, the scheduled reminder fails with a DB syntax error. The error is in the " DATE\_SUB(, INTERVAL hour))" part of the SQL.

The first argument to the function is missing and the time component for the interval is missing: (see below in bold). I would imagine this is a bug.. The SQL from the logfile:

Here's the SQL that is created by CiviCRM and fails:

SELECT e.contact\_id as contact\_id, e.id as entity\_id, "civicrm\_membership" as entity\_table, 3 as action\_schedule\_id, MAX as latest\_log\_time FROM civicrm\_membership e INNER JOIN civicrm\_contact c ON c.id = e.contact\_id AND c.is\_deleted = 0 AND c.is\_deceased = 0 INNER JOIN civicrm\_action\_log reminder ON reminder.contact\_id = e.contact\_id AND reminder.entity\_id = e.id AND reminder.entity\_table = 'civicrm\_membership' AND reminder.action\_schedule\_id = 3 WHERE (e.membership\_type\_id IN ("21")) AND (( e.is\_override IS NULL OR e.is\_override = 0 )) AND (e.status\_id IN (5, 2, 9, 10, 4, 8)) AND ("20171108110009" \<= **DATE\_SUB(, INTERVAL hour))** GROUP BY reminder.contact\_id, reminder.entity\_id, reminder.entity\_table HAVING (TIMESTAMPDIFF) \>= TIMESTAMPDIFF))

**NOTE**: There are missing parameters in the DATE\_SUB function, the SQL fails and the scheduled reminder does not go out.

# Answer
My friendly neighborhood Civi expert solved this problem. The issue is with the "repeat" option in the scheduled reminder form.

If you specify, when to repeat without the "Until" piece, it generates faulty SQL. Our expert modified the form so you can't leave that value blank if you click the repeat radio box.
> 3 votes

---
Tags: scheduled-reminders
---


# Question
Title: Why do email drop-downs show "email protected"
Whether when selecting a from email address in CiviMail (or Civi regular email), or selecting (the email of) an existing user in Drupal Webform\_CiviCRM, the email will sometimes be hidden and the message "email protected" will be displayed instead. It seems to happen only when I access the site with a https URL. When I access the site using http, I can see the email. This has been the case on all Civi versions with Drupal 7. Same thing when logged in as user 1

What causes this and how do we get rid of it?

# Answer
I believe this is something external to civicrm. Services like CloudFlare can cause email addressed to be 'protected' and the fact you are saying this happens on https but not http seems to be another pointer in that direction.

You might want to consider this article: https://support.cloudflare.com/hc/en-us/articles/200170016-What-is-Email-Address-Obfuscation- or the one suggested by Michael https://blog.cloudflare.com/introducing-scrapeshield-discover-defend-dete/
> 3 votes

---
Tags: email
---


# Question
Title: Is it possible to create nested multiselect custom field?
The use-case is a business directory. Businesses sign themselves up and provide info about their operation. There are many types of businesses (NAICS), and the options they need to self-identify as are nested in a multiselect format. Is this re-creatable with CiviCRM?

See image.

Thanks!

# Answer
> 5 votes
This is not possible via Custom Fields - this is possible via Tags.

---
Tags: custom-fields, webform-civicrm, directory, organization
---


title: Rebuilding CiviCRM Database

text:
# Question
Title: Rebuilding CiviCRM Database
Greetings CiviCRM Community, I am in need of rebuilding our organization CiviCRM DB. We are getting some odd issues when trying to create activities in CiviCRM. When I traced the error I got the following message below. I'm think we need to rebuild our CiviDB Schema since we have done a few upgrades over the last few months. I wanted to know if there is an updated process for rebuilding the CiviCRM schema. When looking at the documentation on the wiki site it states that this documentation have been archived and the new site does not include the process. Please advise on what we should do.

Additional uncaught exception thrown while handling exception.

Original

`PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => rules_get_cacheevent_watchdog ) in lock_may_be_available() (line 167 of /opt/bitnami/apps/civicrm/htdocs/includes/lock.inc).`

Additional

`PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT ff.* FROM {filter_format} ff WHERE (status = :db_condition_placeholder_0) ORDER BY weight ASC; Array ( [:db_condition_placeholder_0] => 1 ) in filter_formats() (line 434 of /opt/bitnami/apps/civicrm/htdocs/modules/filter/filter.module).`

Uncaught exception thrown in session handler.

`PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {sessions} sessions WHERE ( (sid = :db_condition_placeholder_0) AND (ssid = :db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0] => YeiL-YkRM2JyCIzmbtEZQP5wCjxN2hpMFaxcVuAQj88 [:db_condition_placeholder_1] => ) in _drupal_session_write() (line 209 of /opt/bitnami/apps/civicrm/htdocs/includes/session.inc).`

Uncaught exception thrown in shutdown function.

`PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 15704801665a2824bfaa38b2.28928446 ) in lock_release_all() (line 269 of /opt/bitnami/apps/civicrm/htdocs/includes/lock.inc).`

# Answer
> 2 votes
The missing tables are Drupal tables, and the exceptions are thrown from Drupal modules. So the Drupal database is missing (I do not know if you installed CiviCRM is a separate database). Maybe the connect string in the `settings.php` file is not correct.

---
Tags: database
---


title: Webform Event Fees in Combination

text:
# Question
Title: Webform Event Fees in Combination
I have a webform that users use to register themselves and their family members for events. These events have fees, and in the past I have linked users to a contribution page that they use separately form registration. We just got a better payment processor, so now webform can take fees! If, that is, I can figure out how to make it work.

Right now, I have it working like this:

* User selects events they want to register for
* "Event Fee" field is private so that it is hidden from the user
* There are 2 conditionals in the webform so that if user selects event1, the fee is $15, and if user selects event2, the fee is $20.

Currently, this results in the correct fee if users select any one event, but if they select both, it charges the higher price ($20) for both events, for a total of $40.

So my questions are:

1. Can event fees be combined using conditionals, and if so what settings would you use? or
2. Can webform fees be automatically generated in webform another way?

# Answer
> 4 votes
Ah yes - you can do this without Conditionals! @Coleman showed me at the CiviCON sprint back in Ft Collins - Here's how in screenshots (below):

**NOTE:** the only downside is... that CiviCRM core isn't expecting that this is possible - so if you end up checking a participant record - it thinks you owe someone a refund \[having paid $500 - the event was only $300\]. But if you can make that clear to your admins - they can work with this.

**1. In Webform CiviCRM tab -\> Event Registration:**

**2. In Webform tab -\> hit Edit** on the two participant fees - and add a $ number:

**3. This is what it looks** like for the user (View Webform):

**4. And on the Payment Page of the Webform:**

# Answer
> 2 votes
Posting the settings (or a screenshot) of your conditional statements for the form would be helpful. The end-goal isn't *quite* clear, I will assume you want to charge $35 if a participant selects both events.

My first guess is that you're only using an 'or' condition when you need to also use an 'and' or else both events get set up to $20 whenever event 2 is selected... Try a conditional setup like 'If event 1, set $15', 'If event 2, set $20', if event 1 AND event 2, set $35'.

Depending on the order of operations for conditionals, you may need to be as explicit as something like 'If event 1 NAND (and not) 2, set $15', If event 2 NAND 1, set $20', 'If event 1 AND 2, set $35'.

Someone can correct me, but as far as I know CiviDiscount is not compatible with contributions through webform, as I have not found a way, and there is no mention of webform in the civiDiscount documentation (https://github.com/dlobo/org.civicrm.module.cividiscount)

# Answer
> 1 votes
In case it is of interest I put together some documentation of a complex Webform set up that allows for multiple people to be registered for multiple events independent of each other, eg c1 can register for A and C, c2 can register for A and B, c3 can register for A and B and C.

There are a lot of conditionals involved ;-)

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


# Question
Title: Is it possible to trigger e-mail on specific CiviMember transition?
I'm trying to figure out if it's possible to trigger an e-mail when a membership changes status, for example when going from New -\> Current in memberships.

Is it possible?

# Answer
You could also use the CiviRules extension in combination with the Email API extension. That enables you to add a trigger for a membership change, set the condition to status is ...... and then send a mail.

CiviRules can be found here: https://civicrm.org/extensions/civirules and the Email API here: https://civicrm.org/extensions/e-mail-api

Documentation on CiviRules is here: https://docs.civicrm.org/civirules/en/latest/
> 4 votes

# Answer
Sure it's possible. You'll need to use a couple of hooks to inspect what's going on and act accordingly. Here's the bare bones of what I would do in WordPress:

```
class My_Plugin_Class {

    public $status_id;

    public function __construct() {
        add_action( 'civicrm_pre', array( $this, 'pre_update' ), 10, 4 );
        add_action( 'civicrm_post', array( $this, 'post_update' ), 10, 4 );
    }

    public function pre_update( $op, $objectName, $objectId, $objectRef ) {
        if ( $objectName != 'Membership' ) return;
        if ( ! isset( $objectRef->contact_id ) ) return;

        // save status prior to change
        $this->status_id = $objectRef->status_id;
    }

    public function post_update( $op, $objectName, $objectId, $objectRef ) {
        if ( $objectName != 'Membership' ) return;
        if ( ! isset( $objectRef->contact_id ) ) return;
        if ( $op == 'delete' ) return;

        // make sure the status is actually changing
        if ( $this->status_id == $objectRef->status_id ) return;

        // write code to send your email...

    }

}

```

Drupal/Joomla would need slightly different code, but the principle would remain the same - i.e. inspect the membership status before and after the change and send you email if the change meets your conditions.
> 2 votes

# Answer
You can use Schedule Reminders (under Admin/Communications menu) and the entity you want to trigger the reminder is an Activity called "Change Membership Status". You can then set it to send you an email.

This won't let you specify the type of membership change (eg New -\> Current), but it's very easy to set up and the email could include a link to a report that the user could click on to show recent membership changes.
> 1 votes

---
Tags: civimail, civimember
---


# Question
Title: CiviContribute: change "from" email address for thank-you letters
I'm using CiviCRM 4.7.27 and am trying to change the "from" address used for thank-you emails generated from CiviContribute. The workflow we are using apparently has no option to choose the email sender and the emails are sent with a "from" address of the current CiviCRM user! NOTE: This workflow is not from the "Mailings" menu. The procedure I am using is:

1. Search for contributions from the menu: Contributions -\> Find Contributions
2. Select search options (typically: select "No" for the "Thank-you sent?" option to find all contributions that have not been acknowledged with a thank-you letter). Click "Search"
3. Select all found contributions by clicking the check-box next to each one
4. Select "Thank-you letters, print or email" from the "Actions" menu. This leads to the "Print/Merge Document" screen
5. Select "Send emails where possible. Generate PDFs for contacts who cannot receive email" from the "Print and Email Options" selector. Also select the "thank you letter" template and click "Make thank you letters". NOTE: There is NO option to select the email sender from this page!

Result: email is sent, but the "from" address is the email address of the current CiviCRM user!

Is this a bug or am I missing something? I see that from the "Mailings" menu, I can create a mailing and select the "from" email address. However, there doesn't seem to be a Mailings workflow which allows me to send a tailored thank-you to donors who have not been acknowledged.

# Answer
A quick look at the 'Thank-you Letter for Contributions (PDF)' page suggests that you are not missing something, and that this is not possible at the moment.

I wouldn't call it a bug, I would call it a missing feature, but that is somewhat academic / pendantic :)

If you did want to be able to select a person, as you can when sending other mailings, you would need to add this feature. Either by asking someone to do it for you, or coding it yourself (not sure if you are a coder, Noky).

If you want to go down the first route, you can find a list of people that could help you do this here: https://civicrm.org/partners-contributors
> 0 votes

---
Tags: civicontribute, email
---


# Question
Title: How can you provide a volume discount on event tickets?
I have a paid event and I am allowing users to register multiple participants. If they register more that 8 people then I want to provide a discount. In the way you might allow someone to purchase a table of 8 which costs less than 8 individual tickets to encourage them to bring friends. I want them to register 8 participants rather than using a price set to purchase a "table" because I want to collect information about each contact that is participating.

Is there a way to do this directly in CiviCRM?

I am aware I could probably make it work through webform\_civicrm but would rather do it directly if possible so we do not have to build webforms for each event as well.

CiviCRM version 4.7.27 and using Drupal

# Answer
> 1 votes
The hook hook\_civicrm\_eventDiscount runs at the right place where you could apply discounts based on the number of people in the booking ... but there is a caution in the documentation: **"This hook is outdated - notable, CiviDiscount does not make use of it."** Maybe because of that there is no guidance on how to use it.

You probably want to investigate the implications of it being 'outdated' before you choose to use this and it would be useful if someone could weigh in with some background on the comment - and ideally update the dev docs too!

---
Tags: civievent, participants
---


# Question
Title: Check sums clicks - can they be measured
Can I know how many people clicked on their checksum link to a webform?

I understand it can't work the same as other links as in a 10000 Strong mailing there would be 10000 links. I'm trying to see how many people who click on the webform complete it.

Thanks

# Answer
Since you specifically want to know about checksum links to webforms, you could patch `webform_civicrm` to record something after it calls `CRM_Contact_BAO_Contact_Utils::validChecksum()` to validate the checksum.
> 1 votes

---
Tags: civimail, webform-civicrm
---


# Question
Title: How can I export an Event Income Detail report to CSV/Excel?
We find the Event Income Detail report to be useful. But the Actions menu won't let me export this report into a CSV file for some reason. How can that be enabled?

# Answer
> 1 votes
Reports that provide a simple table are more amenable to export as CSV. The Event Income Detail has different sections to it which does not fit well for a CSV format - what column headings would you use?

Whether a report offers a CSV export option depends on the settings in the code. The Event Income Detail report is provided by `CRM/Report/Form/Event/Income.php` You will see a line there saying

```
$this->_csvSupported = FALSE;

```

If you were to change that to `TRUE` then the export option would be shown, but the rest of the report does not handle producing a CSV so that's not useful! ... unless you use that as the starting point to customise it to produce the output you want.

FWIW, pasting into a spreadsheet works pretty well: run the report, highlight the section of the report that you want, copy then paste into a blank LibreOffice spreadsheet, and you often end up with something usable. That might work with Excel too.

# Answer
> 0 votes
This feature is not available for Event Income Detail report but CiviCRM is an open source project so you would need to programmatically add this new feature.

---
Tags: civireport, export, csv
---


# Question
Title: Are there any tricks to importing contact data if you include a column for 'is_deceased'
Are there any tricks to importing contact data if you include a column for 'is\_deceased'?

I am asking primarily so I can answer and give others a warning!

# Answer
> 4 votes
If you import contacts with an 'is\_deceased' column, then as well as having a 1 for everyone who is deceased, i recommend you use 0 instead of blank/empty for everyone else.

The reason is that some civi code checks whether someone is deceased or not, and a value of NULL creates problems.

This hit us with Scheduled Reminders. Seemed they were not going out to most folks, and jitendra tracked it down to the fact that Scheduled reminders only load contact with "is\_deceased" is set to 0 - and therefore ignores NULL ones.

I expect we will get this patched for this scenario but chances are that other functions might do the same - so best to ensure you have a 0 in your living contacts when you import.

---
Tags: import
---


# Question
Title: CiviCRM 4.7.27 upgrade undefined method CRM_Price_BAO_PriceField::getVisibilityOptionID()
After upgrading to CiviCRM 4.7.27 on WordPress 4.9.1 the civi contribute pages for donations are only rendering for users who are logged into the WordPress backend. Enabling PHP error reporting gives this error: Fatal error: Call to undefined method CRM\_Price\_BAO\_PriceField::getVisibilityOptionID() in /var/www/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1062.

Any suggestions for resolution? I checked the documentation for CRM\_Price\_BAO\_PriceField and could not find the referenced method (edit: I was able to find the method in the github files and on my server (PriceSet.php and PriceField.php), it just doesn't appear on the doc.symbiotic.coop core file information pages)

The current error doesn't seem to be generating a backtrace, you can go to www.parksandtrails.org and click on the 'Donate Now' or 'Join or Renew Now' links to see the error as listed above, but no backtrace when that happens.

# Answer
> 0 votes
My coworker finally found copies of both PriceSet.php and PriceField.php in the customPHP folder from an old customization. Once the new method was added to both files the page began to work normally again.

# Answer
> 0 votes
That method IS present in 4.7.27 - it's at line 892.

If it's not present for you, then either:

* There's something squirrelly in your upgrade process - perhaps some file wasn't actually replaced;
* You've got some extension or PHP override that's overriding the file in question.

---
Tags: upgrade, 4.7
---


# Question
Title: CiviCRM Wordpress Migration: Stumped by the Database
I am attempting to migrate an existing Wordpress CiviCRM installation to a new server, but am having some difficulty with the database part.

The existing installation is Wordpress 3.8.1 and CiviCRM is 4.4.3. The installation on the target server is Wordpress 4.9.1 and CiviCRM 4.7.27.

I used mysqldump to copy the existing database and then transferred to the new server. I used the mysql root login to execute these commands on both servers.

Once I got the database copied to the target installation, it appeared that no database was there when I ran a report in CiviCRM. So I went back to the original wp-config file and noticed there was a different username and password for the original database (not the root one I used to transfer). I then changed the target server's wp-config file to reflect the other password (shown on the old server), but began getting WP login errors, saying the password was incorrect.

I retrieved the old installation's WP password and was able to login (after changing the wp-config file back to root DB credentials. I had to do that before I could bypass a screen that said 'database connection failure'. But anytime I change the new wp-config file to use the same DB username and password as on the old wp-config file, it throws the database connection error.

I figured since it allowed me to transfer the database using the root password, then I could use that in the wp-config file, but I'm not sure if that's right.

Any ideas what might be going on? I feel like I've missed a step or done something incorrectly. Hopefully my situation makes sense. Many thanks to anyone who could point me in the right direction.

# Answer
There is some documentation here that should help: https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/

Are you copying the Wordpress database as well?

You are trying to switch servers and upgrade at the same time. I would strongly suggest you do that in multiple stages: first move to the new server using the same versions of Wordpress and CiviCRM - make sure that is working correctly, and then upgrade.

Switching to a new server involves changes with URL's, directories, passwords etc so get that set of issues resolved first. That is often more tricky than upgrading.

You are also going from 4.4 to 4.7 which is a big leap. Opinions vary as to the best way of doing that: a single upgrade should work, but you may be better to upgrade to the last 4.5, take a backup, upgrade to the latest 4.6, take a backup then go to 4.7. It is extra steps but may save you time in the end if things go wrong.

To your issues with passwords: to dump the databases from the old server, you need the password for the old server. When you load it to the new server, you need the new password. `civicrm.settings.php` needs to have the new passwords but the changes you need to make depend on which option you follow in the guide for copying the codebase (Step 4).

If that looks too daunting there are plenty of people at https://civicrm.org/partners-contributors who would help. (Yes, I'm one of them!)
> 3 votes

---
Tags: wordpress, database, mysql, migration
---


title: Reccuring Notice in Civicrm

text:
# Question
Title: Reccuring Notice in Civicrm
I am getting this recurring error in CiviCRM when I do various task, is this something I should be worried about?

> Notice: Undefined index: path in CRM\_Core\_BAO\_Navigation::getMenuName() (line 474 of /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/BAO/Navigation.php).

# Answer
this is not something to be worried about. It is a warning that somewhere in the code a syntax rule is not correct, but this does not affect the actual processing. You should be worried if you get a yellow message with 'Error', 'Notice' is irritating but nothing to get worried about.
> 1 votes

# Answer
Checking the code, it seems likely that one of your menu items contains an invalid url. Have you made any customizations to the CiviCRM menubar?
> 1 votes

---
Tags: drupal, error
---


# Question
Title: Change thumbnail size on public directory detail page
We have a public directory that contains the contact image. By default the image thumbnail is set to a size of 100px X 100px. We would like this to be larger. Does anyone know where we can change that? I took a look at the css but did not see anything.

We are using WordPress 4.9.1 & CiviCRM 4.7.27.

Thanks

# Answer
> 2 votes
I believe that thumbnail size is set by CSS (at least it is in the backend), the actual contact image should be whatever size you uploaded the image at originally. Perhaps you can adjust the CSS to display those contact images at your desired size.

Based on your page, you could use:

```
.content img {
    width: auto;
    height: auto;
}

```

To set it to it's native size. You could alternatively used specific values (height: 200px; width: auto;) to be a little more uniform across different contact results.

---
Tags: profile, images
---


# Question
Title: CiviCRM Smart Group Based on Contact's Drupal Role
I need all users of a particular Drupal role to be added to a CiviCRM Smart Group. (All Drupal users are currently also CiviCRM contacts.)

The site uses CiviCRM 4.4.21 and Drupal 7.56

# Answer
CiviCRM Group-Role Sync doesn't work with smart groups - but you can make a static group to sync to and make it a child group of the smart group.
> 1 votes

---
Tags: drupal, smartgroups
---


title: Complex event creation

text:
# Question
Title: Complex event creation
Setting up a complex event in either CiviEvent or webform

There are three time slots and 5-6 sessions/time slot. Each of those sessions would have a max participation count that when reached, the system would no longer show it as an option to pick.

Would I have to set up three different price sets and events in order to achieve the max participation rule, or is there a way using a webform that the max participation can be enforced?

# Answer
Welcome to CiviCRM SE!

If I understand your scenario correctly there are three time slots and you want participants to choose a session in each one. You can accomplish this with a single price set and a price field for each time slot using radio buttons for the line items (session options). You can set Max Participants for each line item. Once that is reached the line item option will become unavailable.

The Extended Reports extension has a line item report which is handy for getting counts per session.

Hope this helps.
> 4 votes

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


# Question
Title: EntityTag table not available to drupal view
Creating a view in drupal, when I try to add a field I see all the normal civiCRM fields for contacts, email, etc, but what I want is the entity\_tag table for the contact id which does not appear in the list of available fields.

The table is listed in sites/default/settings.php, but it is not available in the view

# Answer
> -1 votes
I created a view based on civicontact and it seems to work.

Thanks

---
Tags: drupal-views
---


# Question
Title: Case status "status class" - what is it used for?
I can see that the status class (opened or closed) will end case role relationships, but is it used for anything else?

edit for clarification: Each case status has a "status class" - open is "opened" and resolved is "closed" by default. The only effect that changing a case status to resolved/closed that i can see, beyond that status, is that case role relationships are assigned an end date and so are inactive, so i'm wondering if this status class is used anywhere else that i've not noticed.

Reason being - i am considering removing "closed" status class from all status types, so that case role relationships are maintained whatever the status and can be ended manually if necessary instead.

# Answer
> 0 votes
If you remove it, then how would you close a case? It won't recognize the Change Case Status activity as actually closing the case.

If you want relationships to exist outside of a case then you can use regular non-case relationships. That's really the only technical difference between roles and relationships. And relationships can still have start/end dates if you need to record that.

And you can still see regular relationships on the manage case screen, under the Other Relationships accordion.

---
Tags: civicase
---


# Question
Title: How to fix Bookkeeping Transactions Report so it doesn't show redundant transactions (e.g., for changed Payment Method)?
If you change the Payment Method on a contribution, e.g., from "Credit Card" to "Check" for a $10 contribution, CiviCRM will leave the existing transaction record in place, and add two more transactions, so the contribution now shows three transactions:

```
$10.00   Credit Card
-$10.00  Credit Card
$10.00   Check

```

(This started a few versions ago, I guess as a way to help leave an auditable record of financial changes.)

This works fine in the contributions tab because it just adds up all the amounts, and it's still an amount of $10.00.

But in the Bookkeeping Transactions Report, all of these 3 transactions appear in output, and there's no effective way to filter them out. In reality there's just one $10 transaction, but the report shows two for $10.00 and one for -$10.00.

I want to propose a fix so that only the most recent of those is displayed in the report. But "most recent" isn't enough. Sometimes there is more than one transaction on a contribution, e.g., in the case of multiple partial payments, in which case we do want to show all of those separate transactions.

**Question:**

Is there any way, strictly by looking at the data tables, to determine which transactions are "changes" and which are "multiple partial payments"?

# Answer
> 4 votes
So it would be an error in bookkeeping, not a fix, to omit some bookkeeping entries.

For code maintenance and simplicity the implementation creates these transactions whenever there may be required bookkeeping entries.

If an organisation happens to use the same financial account for credit cards and cheques the extra entries do not result in accounting errors so much as noise. By contrast, if an org does use different accounts it would result in accounting errors to filter as proposed.

Although an extension to change the SQL for your use case is likely possible, to carry through on your approach of simplifying the results by summarizing the bookkeeping entries into a tally for each account for each contribution may be done more easily by creating a new report. Or perhaps it could be a special sort of 'group by'.

As you may have noticed in the report code, the data is puled out in two ways depending on how the bookkeeping entries are stored in the database. Entries involving revenue and expense accounts have one side of the entry in the financial item table and the other in the financial trxn table using its to financial account. Entries that only involve asset accounts, like a payment on a pay later transaction, use the from and to account fields in the financial transaction table. (I don't want to rehash the troubled history that led to this schema design, I'm just explaining it.)

Assuming you don't want to see these entries, you could simplistically filter for the most recent entry for each line item for a contribution. If all of your contribution data is simple and there are not edits on other fields this will work. Note that if there are taxes you will need to get the latest of those entries separately for each line item as well.

An alternative to just pulling up the latest entry that would also handle edits to the amount to produce the amounts for the revenue account and tax accounts for each contribution would be to use a group by contrib id, line item id, financial item financial account id and then sum the financial item total field. You'll need to do this separately for the other side of the accounting entries, ie the asset account for the deposit or pay later: group by contrib id, financial trxn to financial account id. And as some bookkeeping entries do not involve a revenue account, you'd need to handle that as well.

Sorry this is not so simple. It would likely take me an hour or two to work up the sql.

An alternative that might be interesting is to check if the financial accounts and amount are the same for a 'change' entry. If so, an extension could avoid writing new bookkeeping entries into the database when, for example, the payment method changed but the same financial account was used for both payment methods. It would have to be an extension, I think, as we found that some people needed the extra entries for other reporting purposes.

Payments can be identified in the database by checking if civicrm\_financial\_trxn.is\_payment is true. There can be single or multiple payments. Note that there can be changes to payments, either single or multiple partial ones, and the above discussion also applies to all of them.

---
Tags: civireport, payment, partial-payments, bookkeeping
---


# Question
Title: Tags for contact in drupal view shown on separate rows
I'm creating a drupal view based on civicontact. The fields are user id, user roles, I link to civicrm\_uf\_match table to get the contact id, then add a field for the tags associated with that contact. The problem is that each tag is shown on a separate row. This does not happen with user roles, the are shown as a single comma delimited text field, which is what I wanted to have happen with the civiCRM tags. What am I doing wrong?

# Answer
You can use the views\_merge\_rows module to render the Tags in to a comma separated list
> 1 votes

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


# Question
Title: Webforms - 'existing contact' does not auto complete
Using the 'Existing Contact' field on Civicrm without being logged into an account, it is impossible to autocomplete the form.

When i am logged in i can enter any existing contacts email and the form auto completes. Am I missing something in permissions?

Thanks.

# Answer
> 1 votes
ON the webform, the component that is the 'existing contact' has a 'permissions' check box - you need to use this to override the controls but note, this is what prevents your database being searchable by the public, so you may be disclosing information that you don't mean to (thx JonG for better wording)

---
Tags: webform-civicrm
---


# Question
Title: dupe_check parameter only works for contacts?
I would like to disable the dupe check on relationships. Is it true that the API parameter parameter 'dupe\_check' works only for contacts or can it be also used in relationship api calls? Here under 4.6.33 'dupe\_check'=\> 0 does not seem to work?

# Answer
The dedupe\_check works only for contacts.
> 1 votes

---
Tags: api, relationships, duplicate-contacts
---


title: How to export with state abbreviations

text:
# Question
Title: How to export with state abbreviations
We are using Civi 4.7.27 on Wordpress 4.9 When doing exports the state is shown as the full name. We really need to be able to export with the 2 letter state abbreviation. How can we set it to do this?

Thank you.

\*****Added Screenshot\***

# Answer
It seems the problem is that you're using CiviReport rather than Advanced Search to perform your export. If you use search and the Export search action, you'll get abbreviated state names.

Since you're exporting contributions, don't forget to set *Display Results As* to **Contributions**. See screenshot:
> 2 votes

---
Tags: export
---


# Question
Title: Why doesn't CiviCase API filter by case status when the client is specified?
This seems like a bug. I encountered it on Joomla with 4.6.8 and reproduced on the demo server.

If I create a case and change the status to "Urgent", then use the API (including API explorer), it seems to filter properly on status\_id and is\_deleted UNTIL I also add contact\_id (Case Client). Then it returns the case regardless of its status. (I didn't test whether it works correctly with is\_deleted).

# Answer
While I can see this is an older issue I have the same problem in Drupal 7.41 and Civi 4.6.10. I found that this is no longer an issue in Drupal 7 Civi 4.7.27 (I just verified on the demo site!) If we aren't able to upgrade in the near future, I'll get around to looking at the log query (hopefully it doesn't come to that ;)
> 2 votes

---
Tags: api, civicase
---


# Question
Title: Can't disable debug/backtrace on WordPress
I was encountering an error sending email so I turned on the backtrace/enabled debugging. No I can't get back to the menu to turn it off. I just have a page of error messages.

Help! Anyone got any ideas?

Thanks Caroline

# Answer
If you have command-line access and wp-cli enabled (with the CiviCRM extension), you can run: `wp civicrm disable-debug`.

If you don't have command-line access, run the following SQL via PHPMyAdmin or similar:

`UPDATE civicrm_setting SET value = 'i:0;' WHERE name = 'backtrace' OR name = 'debug_enabled';`
> 2 votes

---
Tags: wordpress, debugging
---


# Question
Title: Moving wordpress / CiviCRM to another folder
I had mysite.com set up with CiviCRM, we built a new site and then moved mysite.com to another directory and changed the subdomain to old.mysite.com. CiviCRM no longer works and I am having a hard time getting it running. From reading this: Change URL only on WordPress+CiviCRM I changed the CIVICRM\_UF\_BASEURL but I am assuming I need to do more than just that as that didn't work. If anyone could give me some more information that would be awesome.

# Answer
> 1 votes
There's also all these in civicrm.settings.php

`// Additional settings generated by installer:
$civicrm_paths['wp.frontend.base']['url'] = 'http://domain.org/wpcivi/';
$civicrm_paths['wp.backend.base']['url'] = 'http://domain.org/wpcivi/wp-admin/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://domain.org/wpcivi/wp-content/plugins/civicrm/civicrm';` and further down there's `global $civicrm_root;`

and site urls

and double check in admin:

* resource url
* directories
* CMS database integration
* CMS database

---
Tags: wordpress
---