# Question
Title: Fatal Error when renewing membership after Upgrading to 4.6.16
Since upgrade, I am not able to renew membership from backend. As soon I press RENEW I am getting this Fatal Error message:

`2016/05/13 11:57:55 [error] 8711#0: *2228 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot pass parameter 2 by reference in /www/demo/sites/all/modules/civicrm/api/v3/utils.php on line 1408" while reading response header from upstream, client: 185.59.126.181, server: demo.com, request: "POST /civicrm/contact/view/membership HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm/demo.com.sock:", host: "demo.com", referrer: "https://demo.com/civicrm/contact/view/membership?action=renew&reset=1&cid=398&id=52&context=membership&selectedChild=member"`

Can anyone help please? how to fix this?

# Answer
Looks like a conflicting extension was causing the problem. ***CiviRules***. Once that is uninstalled everything seems to be working perfectly fine.
> 1 votes

# Answer
@Tapash - I just tried to reproduce this on one of our live 4.6.16 projects and I can not.

From a Contact's Membership I'm successfully able to both:

* more -\> Renew \[no errors; renewed properly\] &
* more -\> Renew-Credit Card \[no errors; made payment; got receipt; renewed properly\]

I've also checked the JIRA issues and I don't see anyone else describing what you're observing. Considering your other Q as well - I'm wondering if perhaps something went wrong during your recent upgrade?

General recipe for this is to restore both code base (files) & databases back to 4.6.14 and then to run the upgrade script \[to 4.6.16\] again. If you can: run it via drush - it may give you some warnings/errors that give you some insight as to what's going on.

> sudo -u apache drush civicrm-upgrade-db
> 1 votes

---
Tags: civimember
---


# Question
Title: Bug in the scheduled update of Membership Statuses?
There seems to be a bug in the scheduled task 'Update Membership Statuses' in 4.4.3. We have just changed the rule for status 'Grace' to allow an extra month for the grace period. If I re-save a membership manually it changes the recently-expired membership back to a status of Grace. So far so good and it proves that the rules are in the correct order. But I would now expect the scheduled task to change the others that have recently Expired back to Grace. *It doesn't.* It reports "Finished execution of Update Membership Statuses with result: Success (Processed 878 membership records. Updated 0 records.)"

Scheduled status updates have worked in the past.

I've looked at 'membership statuses not being updated' and 'Update membership status automatically' and even the very old 'Membership status not updating from pending' but these are all simpler cases.

Clearing the Civi caches didn't help. Is the scheduled task logic different to the immediate logic? CiviCRM is so damn fragile! David

# Answer
> 1 votes
A real fix is still needed but the following procedure appears to provide a reliable workaround:

* Set the Grace period to the new value;
* Disable the status 'Expired';
* Run the task 'Update Membership Statuses' so that memberships within the new Grace period are set to 'Grace'; (but don't just run Cron, as Cron only runs this particular update task once a day.)
* Re-enable the status 'Expired';
* Run the update task a second time to check that memberships that really should have expired do indeed correctly show as 'Expired'.

David

# Answer
> 0 votes
Incidentally I know that there were a lot of bugs in 4.4 with regard to memberships not being transferred along relationships successfully. Have you looked at issues.civicrm.org?

**Recommended solution:** I would recommend updating to 4.4.18. You'll get so many bug fixes, and this may be one of them (I haven't checked). You'll also get important security fixes.

# Answer
> 0 votes
The scheduled job calls the function `CRM_Member_BAO_Membership::updateAllMembershipStatus()` . This starts by getting all memberships that have types that are enabled, and don't have is\_test set. For each:

* it then checks whether the contact is deceased (this seems to dominate over other rules)
* it skips inherited (non-primary) memberships
* it skips status overrides, and the specific statuses Pending, Cancelled and Expired
* it calculates the new status, and if that has changed, saves it.

(Edit: My first answer confused is\_active with is\_current\_member. But it stands that it excludes expired memberships further down.)

---
Tags: civimember, scheduled-job
---


# Question
Title: How do I set up dev environment with buildkit?
I am new to the developer/code side of CiviCRM and attending the Dev training at CiviCON. I saw a post on StackOverflow about installing buildkit but haven't seen it re-posted here. I would appreciate a little more detailed steps on installing buildkit so I am prepared for the training.

I am using a Mac and it has also been recommended to me that I use MAMP. Would I install buildkit inside MAMP?

# Answer
As Kurund pointed out, the general instructions are at https://github.com/civicrm/civicrm-buildkit . Follow those instructions to download the all the tools.

There are a few details that may not be well represented yet in the documentation:

1. As the main developer behind buildkit, I use it mostly in MAMP (and a bit in Debian and Ubuntu).
2. Buildkit runs several things on the command-line, so you need to make sure that the command-line is setup with the right version of `php`. By default, OSX uses its built-in version of `php`, but MAMP's version is generally better. See: http://wiki.civicrm.org/confluence/display/CRMDOC/Setup+Command-Line+PHP
3. I suggest putting buildkit in your home directory (e.g., `git clone https://github.com/civicrm/civicrm-buildkit.git ~/buildkit`). This is where all the *tools* will go. The source-code for CMS+Civi may go somewhere else (more in a moment).
4. After downloading buildkit, you'll need to setup a site with Civi. You can choose among two distinct workflows:

* `gitify`: You install CMS+Civi manually and then run `gitify` to load the bleeding-edge Civi code.
        + *Where*: You can put the code anywhere. In MAMP, `/Applications/MAMP/htdocs` is probably easiest.
        + *Pro*: You can use any tools or processes you want to setup Apache, MySQL, CMS, etc.
        + *Pro*: Your configuration is custom. You control everything directly.
        + *Con*: Your configuration is custom. It's hard for other developers to reproduce, and it doesn't match the official test/demo environments.
        + *Con*: If you need to create multiple sites, you have to do all setup work repeatedly.
        + *Con*: If you want to work with the automated tests or schema, then you'll need to do several extra configuration steps.
        + *Summary*: `gitify` is generally best for light development with a single build.
        + *Next step*: Setup Apache+MySQL as you normally would. Install a CMS (Drupal/WordPress) and CiviCRM using tarballs or zip files. Then, run `gitify` with no arguments. It will display a help screen with some examples.
    * `civibuild`: You run a command like `civibuild create d46 --url http://d46.localhost`; the command automatically configures Apache+MySQL, downloads Drupal, downloads Civi v4.6, and installs them.
        + *Where*: All builds will get placed under buildkit's folder. For example, the "d46" build might be `~/buildkit/build/d46`.
        + *Pro*: Setting up new sites is automated. It's easy to create several different sites using a mix of CMS's and versions.
        + *Pro*: Your configuration is standardized. It matches the official test/demo environments.
        + *Pro*: Each site is automatically configured to run the automated tests.
        + *Con*: Your configuration is standardized. Loading things to match your personal preferences requires more work.
        + *Con*: The upfront configuration can be difficult/unforgiving - buildkit needs access to the internals of Apache and MySQL. Generally, it's based on a philosophy of "fail early, fail hard".
        + *Summary*: `civibuild` is generally best for heavy development.
        + *Next step*: See the detailed tutorials at https://github.com/civicrm/civicrm-buildkit/blob/master/doc/civibuild.md or https://buildkit-ui.civicrm.org/#/welcome .
5. If you go the `civibuild` route, then will need to prep the system by running `amp config`, which will present some questions and instructions for the local system. In a default MAMP configuration, some good values are:

* `db_type`: `mysql_dsn`
    * `mysql_dsn`: `mysql://root:root@127.0.0.1:8889` (or sometimes `:3306`)
    * `perm_type`: `osxAcl` (or `none`)
    * `perm_user`: `www`
    * `hosts_type`: `file`
    * `httpd_type`: `apache`
    * `httpd_restart_command`: `/Applications/MAMP/Library/bin/apachectl graceful`
6. In any workflow, buildkit has better support for Drupal- or WordPress-based dev-sites. There's some experimental code to support Joomla-based dev-sites, but the Civi-Joomla installer is difficult to automate, and it probably won't be resolved until http://forum.civicrm.org/index.php/topic,35050.0.html gets some real attention.
> 15 votes

# Answer
Using MAMP should be fine. You might also have to install git. For detailed instructions on buildkit please check:

> https://github.com/civicrm/civicrm-buildkit
>
> https://buildkit-ui.civicrm.org/#/welcome
> 3 votes

# Answer
Point 6 above perhaps explains why Joomla seems to be getting less support than Drupal or WordPress. I have a local Joomla environment, but it is probably not correctly configured for development. I was trying to improve that environment, but couldn't find instructions as to how to do it in Joomla.
> 0 votes

---
Tags: developer, civicrm-buildkit, mamp
---


title: Add contact info in contribution page

text:
# Question
Title: Add contact info in contribution page
In the contribution form, as the user select the donor, I would like to show some contact info, including both demographic information (eg. email) and custom fields. How can I do it? Thanks

# Answer
I'm not entirely clear on the meaning of "as the user select the donor", but it sounds like you're trying to add some additional fields to a contribution form. This can be done with Profiles, which in CiviCRM amount to a collection of fields, which can be used in a number of ways, including adding them to Contribution page or Event registration form.

A summary of steps for your use case would be something like this (more information is available in the CiviCRM User and Administrator Guide -- from which I've borrowed heavily -- here: https://book.civicrm.org/user/current/organising-your-data/profiles/):

# 1. Create a profile:

* Go to: Administer \> Customize Data and Screens \> Profiles and click on Add Profile.
* Profile Name: Give the profile a meaningful name.
* Used For: Check the "CiviContribute" check box.
* Order: Leave blank; this setting will be populated automatically and is not relevant for this use case.
* Pre-form Help and Post-form Help: These fields allow you to write text that appears either before or after your Profile to guide people in filling out forms.
* Is this CiviCRM Profile Active?: This box is checked automatically and should be left as such; later on, if you want to take a Profile out of use in your organization, you can edit the Profile and un-check the box.
* Click "Save" to create the profile. This will save your settings and open up a form to add a field to the profile.

# 2. Add fields to the profile:

Now that you have a profile, it needs fields.

* (If you're not already on the "New Profile Field" form) Go to: Go to: Administer \> Customize Data and Screens \> Profiles, and find the profile you've created; click its "Fields" link, which will open the "CiviCRM Profile Fields" page for this profile; click the "Add Field" button on this page, which will open the "New Profile Field" form.
* Set field options as you wish:
* Field Name: Choose the record type where your desired field appears from the - select - dropdown menu. This will bring up a secondary dropdown menu listing all available fields for that record type. Choose the field you want to add to your Profile.
* Field Label: This is the field label that will display on all uses of your Profile. It is prefilled with the default field label. However, the default field labels are often confusing for users of your forms, so you can rewrite them here. For example, the Postal Code field can be renamed Zip Code if your audience is more familiar with that term.
* Required?: Check this box to make this required anytime the Profile is used. This is most useful when you want to make sure that certain information (e.g., First Name, Last Name, Email) is always included in a form submission.
* View Only?: Check this box to allow users to view but not edit this field.
* Visibility: Set to "User and User Admin only". This ensures that other visitors to the form can't view any data from the database.
* Field Pre Help and Field Post Help: These fields allow you to write text that appears in the user interface to guide people in filling out forms. Field pre help appears inline. Field post help will create a small help bubble which when clicked appear in a help overlay.
* Order: You can use this field to control the order in which fields display in the Profile. Lower numbers are displayed ahead of higher numbers. I recommend leaving this as-is, and adjusting field order on the "CiviCRM Profile Fields" page for this profile.
* Active?: Leave this box checks to ensure that the field appears when the Profile is used; you can un-check it later if you wish to prevent a specific field from appearing in the profile.
* Click Save and New to add more fields to the Profile, or Save if you have no more fields to add.

# 3. Add the profile to the Contribution page:

* In the Contribution page configuration, navigate to the "Include Profiles" tab.
* Here you'll find two settings: "Include Profile (top of page)" and "Include Profile (bottom of page)". Select your new profile in either one of these, to have your profile displayed at top or bottom of the contribution page.
* Click "Save" to save the configuration.

After this, you can modify the profile configuration as needed; changes to profile settings, changes to field settings, or addition, removal or disabling of fields, will all be reflected in the contribution page. You can also add one profile to as many contribution pages or event registration forms as you wish.
> 1 votes

---
Tags: contribution-page
---


# Question
Title: Why doesn't the count of '0' change on Search Results when i select some records or 'all on this page'
Am pasting as a question for others who might come across this but have reported on JIRA as it replicates on http://d46.demo.civicrm.org/civicrm

Do any search, then select eg first record, or the checkbox above the first one to get 'all on this page' - and the count of '0' stays same, and hence you can't select any Actions.

# Answer
> 2 votes
A bug had already been filed on JIRA and it is listed as FIXED for 4.6.17

---
Tags: search-results
---


title: Tracking the Processing of New Members

text:
# Question
Title: Tracking the Processing of New Members
As part of our joining process we send out a membership pack to new members. This involves exporting the name and address details to a mail merge to produce a membership card.

What is the best way to track and process these new members? I was hoping to use the membership status but that only works on dates. Would a custom field or a tag or group be the best approach?

Regards

Steve

# Answer
if you are wanting to track who was sent something, then I would create a new Activity Type for 'send member pack' and then via a Search you would be able to add an Activity to any member that you are sending the pack to, and set it to Completed, and hence you know the job has been done.

NOTE: when adding an Activity to lots of contacts via Actions on the Search screen there is a small checkbox that lets you specify whether you are making one Activity that relates to LOTS of contacts, or one Activity for EACH contact. You are welcome to choose, but i would suggest doing the latter option, so you have a single Activity record for each Member.

EDIT: (per frTommy suggestion) You could automate this somewhat by utilizing CiviRules to Schedule an Activity of "Send Member Pack" whenever a Membership is added
> 1 votes

---
Tags: civimember
---


# Question
Title: CiviVolunteer enabled but not showing in navigation
I'm attempting to get CiviVolunteer up & going on our wordpress installation of CiviCRM 4.5.8

It's enabled but not showing in the navigation.

Thanks for any help.

# Answer
> 1 votes
When a new Extension or Component is added you may find there are Permissions that need to be enabled, and that might be why you don't see it in the menu.

Alternatively go to Administer \> Customise \> Navigation Menu, check if it is in that list, if it is, but not showing, right click on it and 'save' and then you should see a new option on the screen that says "Click here to reload the page and see your changes in the menu bar above. " and that might be enough of a nudge.

---
Tags: wordpress, civivolunteer
---


# Question
Title: Is there a "best" forum for suggesting improvements to CiviCRM?
As a developer, when I have an idea for a feature improvement to CiviCRM, and am interested in helping to make that happen (submitting a patch and tests, for example), what's the best place to start a conversation about things like a) whether it's a good idea, b) how it might be made into a better idea, c) whether it's likely to be desirable in core or better as an extension, etc.?

Channels I can think of include these, in no particular order:

**Edit:** I guess I'm wondering if there even is a definitive "best" forum for such discussions.

# Answer
> 1 votes
I think it would be useful to ask a self-serving question in SE and then answer it yourself. I think SE has a more public audience and hence improvements get noticed.

In addition, I would suggest starting off on one of the new chat.civicrm.org channels depending on whether it is 'hey i have this new idea' (maybe town square) or 'i need to insert x in to y while not breaking z' perhaps in the developer chat.

hth

---
Tags: developer
---


title: Can CiviCRM be used in a HIPAA context?

text:
# Question
Title: Can CiviCRM be used in a HIPAA context?
I was talking to somebody over the weekend regarding a site that seemed a perfect match for CiviCRM -- including donations, event registration, contact/relationships, case management. When I mentioned that CiviCRM handled all of these things, their first response was that the case management features would need to be HIPAA compliant.

Has anyone used CiviCRM in a HIPAA context? If so, can you detail any special set up considerations and requirements that are needed?

# Answer
Mostly. See

https://forum.civicrm.org/index.php?topic=7788.0

AND

https://civicrm.org/blog/charlescampbell/civicrm-civicase-ehremr-crisis-response-system

The part about who views records wasn't implemented from within CiviCRM, but depending on the definition of "your personal records" in your context it could just mean page hit tracking from within drupal, since it records the logged in user.
> 2 votes

---
Tags: contacts, civicase
---


# Question
Title: Scheduled reminders for rolling renewals not sending after first renewal
One set of our memberships is a 1-year, rolling product that can be purchased at any time.

We've set up tests for scheduled renewal reminders but it seems to have stopped working:

1. Entity: membership \> individual membership
2. When: \[1\] \[week\] \[before\] \[membership end date\]
3. Enable repetition: yes
4. Repetition: every \[1\] \[day\] until \[1\] \[day\] \[after\] \[membership end date\]
5. 'From name/email' etc. added
6. Limited to Smart Group made up of test contacts

We initially set one of the test contacts up with a membership set to expire in 8 days. At 7 days before we got the first email, and each day after that until we changed the renewal end date to be a further 8 days in the future from that point (to test what would happen for the 2nd year renewal period).

After that, we no longer received any emails. Checked cron jobs etc. and send scheduled reminders is set to run daily.

Is there a problem with 'clearing out' contacts tat have been triggered to (e.g. once they have renewed once they'll never get sent the scheduled reminder again, even once they get to 1 week before membership end date once again)?

(we're using v4.6.9 in case that is relevant.)

# Answer
one way to further test whether this is just an issue resulting from manually changing the End Date would be to set up a membership type that is only on a 10 day cycle (or less if urgent) so you can test it without needing to alter the end date. if that is helpful i can convert to an answer (may do anyway)
> 2 votes

---
Tags: scheduled-reminders
---


# Question
Title: How can I link contacts & activities in a report or export?
My client would like to report or export certain activities for contacts that meet a certain criteria. This doesn't seem possible, which is surprising. Activity search only allows a search of activity data - not contact data so contacts can't be filtered there although contact data can be exported from there. Advanced search allows you search on contact and activity data, but then only allows an export of contact data - so no activity data. It doesn't seem possible to have both contact AND activity data exported after filtering on both. Or have I missed something?

# Answer
When I tried in the demo site, I did an Advanced Search-\>Display Results as Activities and filter by the field you want and search.

If you export the result and check either Export primary fields or Select fields for export, in the csv created will be the contact and activity information. You will see Activities in the lasts columns.

If you tried that and doesn't work it's posible that in your version you can't do that, but I doubt it.
> 3 votes

---
Tags: export, reports, activity, 4.6.12
---


# Question
Title: After upgrade to 4.7.6(and 4.7.7) - Freezes on "estimating" when loading group into Email, when working with groups in general
We have a serious problem after upgrading to 4.7.6 and now to 4.7.7 (without solving the problem) - it is a problem that seems to have been active already in previous version (other people posted about it in 2015), but i can´t find a clue to solve it. See here a post to this topic from somebody from 2015: https://issues.civicrm.org/jira/browse/CRM-16277

It is even impossible to access certain groups (the screen freezes and I manually need to kill the processes /on sleep / in the control panel)

It works when I create a new group with 1 person, but I need to work with groups with approx. 4000 people.

It also seems that sometimes it goes through, but most of the time it freezes and it´s impossible to work.

Please if you have the same problem or know a solution, please let us know.

Attached an excerpt from our slow log file

# Query 1: 0.02 QPS, 0.15x concurrency, ID 0x59955E428CD5C6B0 at byte 18602444

# Scores: V/M = 8.80

# Time range: 2016-05-11 11:19:48 to 23:54:11

# Attribute pct total min max avg 95% stddev median

# ============ === ======= ======= ======= ======= ======= ======= =======

# Count 12 795

# Exec time 42 6812s 188ms 49s 9s 26s 9s 5s

# Lock time 17 5s 2ms 2s 6ms 8ms 63ms 3ms

# Rows sent 0 0 0 0 0 0 0 0

# Rows examine 67 2.30G 8.59k 28.24M 2.96M 27.20M 6.75M 270.35k

# Rows affecte 2 7.43M 0 53.07k 9.57k 44.45k 13.14k 3.35k

# Bytes sent 0 41.69k 0 79 53.70 54.21 8.93 54.21

# Query size 19 782.95k 1006 1009 1008.48 964.41 0 964.41

# String:

# Databases gemeingut\_civicrm

# Hosts localhost

# Last errno 0 (772/97%), 1160 (22/2%), 1213 (1/0%)

# Users gemeingut

# Query\_time distribution

# 1us

# 10us

# 100us

# 1ms

# 10ms

# 100ms

# 1s

# 10s+

# Tables

# SHOW TABLE STATUS FROM `gemeingut_civicrm` LIKE 'civicrm\_contact'

# SHOW CREATE TABLE `gemeingut_civicrm`.`civicrm_contact`

# SHOW TABLE STATUS FROM `gemeingut_civicrm` LIKE 'civicrm\_group\_contact\_cache'

# SHOW CREATE TABLE `gemeingut_civicrm`.`civicrm_group_contact_cache`

# SHOW TABLE STATUS FROM `gemeingut_civicrm` LIKE 'civicrm\_group\_contact'

# SHOW CREATE TABLE `gemeingut_civicrm`.`civicrm_group_contact`

CREATE TEMPORARY TABLE civicrm\_temp\_group\_contact\_cache186 (SELECT 184 as group\_id, contact\_a.id as id FROM civicrm\_contact contact\_a LEFT JOIN civicrm\_group\_contact\_cache `civicrm_group_contact_cache_111` ON contact\_a.id = `civicrm_group_contact_cache_111`.contact\_id LEFT JOIN civicrm\_group\_contact\_cache `civicrm_group_contact_cache_30` ON contact\_a.id = `civicrm_group_contact_cache_30`.contact\_id LEFT JOIN civicrm\_group\_contact\_cache `civicrm_group_contact_cache_8` ON contact\_a.id = `civicrm_group_contact_cache_8`.contact\_id WHERE ( ( `civicrm_group_contact_cache_30`.group\_id = 30 ) OR ( `civicrm_group_contact_cache_111`.group\_id = 111 ) OR ( `civicrm_group_contact_cache_8`.group\_id = 8 ) ) AND (contact\_a.is\_deleted = 0) AND contact\_a.id NOT IN ( SELECT contact\_id FROM civicrm\_group\_contact WHERE civicrm\_group\_contact.status = 'Removed' AND civicrm\_group\_contact.group\_id = 184 ) )

# Converted for EXPLAIN

# EXPLAIN /*!50100 PARTITIONS*/

SELECT 184 as group\_id, contact\_a.id as id FROM civicrm\_contact contact\_a LEFT JOIN civicrm\_group\_contact\_cache `civicrm_group_contact_cache_111` ON contact\_a.id = `civicrm_group_contact_cache_111`.contact\_id LEFT JOIN civicrm\_group\_contact\_cache `civicrm_group_contact_cache_30` ON contact\_a.id = `civicrm_group_contact_cache_30`.contact\_id LEFT JOIN civicrm\_group\_contact\_cache `civicrm_group_contact_cache_8` ON contact\_a.id = `civicrm_group_contact_cache_8`.contact\_id WHERE ( ( `civicrm_group_contact_cache_30`.group\_id = 30 ) OR ( `civicrm_group_contact_cache_111`.group\_id = 111 ) OR ( `civicrm_group_contact_cache_8`.group\_id = 8 ) ) AND (contact\_a.is\_deleted = 0) AND contact\_a.id NOT IN ( SELECT contact\_id FROM civicrm\_group\_contact WHERE civicrm\_group\_contact.status = 'Removed' AND civicrm\_group\_contact.group\_id = 184 ) )

# Answer
> 1 votes
We had similar issues in 4.6.x, see https://issues.civicrm.org/jira/browse/CRM-17213. Let me know if you think this could be related to your problem.

---
Tags: email, error
---


# Question
Title: After updating civi 4.6.15 to 4.6.16 no access to contacts
After succesfull updating civicrm 4.6.15 to 4.6.16 (files are installed database is updated), I find that access to contactdata in the admin side of my joomla 3.5.1 website has gone. I get a white screen, and after going back to the previous page I get an error notive that says: "Invalid Entity Filter"

I flushed the cache but that does not change anything. At the frontend of the website I can change my contactdata and save them and get the usual okay message after that. I cannot open the samen contactdata in the backend. I recreated the site from a backup updated again and got the same results again.

I updated another joomla 3.5.1 site with the same civi version 4.6.15 and that went without any problems.

I set error reporting to maximum in Joomla and do not get any errormessages at all only an empty white screen.

As advised in the comment below I checked the error log inside civicrm.

I got this error-message in a sea of messages:

```
"$Fatal Error Details = array(3) {
  ["message"]=>
  string(21) "Invalid Entity Filter"
  ["code"]=>
  NULL
  ["exception"]=>
  object(CRM_Core_Exception)#448 (10) {
    ["errorData":"CRM_Core_Exception":private]=>
    array(1) {
      ["error_code"]=>
      int(0)
    }
    ["cause":protected]=>
    NULL
    ["_trace":"PEAR_Exception":private]=>
    NULL
    ["message":protected]=>
    string(21) "Invalid Entity Filter"
    ["string":"Exception":private]=>
    string(0) ""
    ["code":protected]=>
    int(0)
    ["file":protected]=>
    string(105) "/home/--deleted--/civi/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/CustomGroup.php"
    ["line":protected]=>
    int(658)
    ["trace":"Exception":private]=>
    array(14) {
      [0]=>
      array(6) {
        ["file"]=>
        string(105) "/home/--deleted--/civi/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/CustomGroup.php"
        ["line"]=>
        int(449)
        ["function"]=>
        string(23) "validateSubTypeByEntity"
        ["class"]=>
        string(24) "CRM_Core_BAO_CustomGroup"
        ["type"]=>
        string(2) "::"
        ["args"]=>
        array(2) {
          [0]=>
          string(10) "Individual"
          [1]=>
          string(14) "Verenigingslid"
        }"

```

So: the code trows an exception. However I do not know why. I am logged in in the backend of joomla as superuser, so I should getaccess to all groups in civicrm, with no private execeptions???

# Answer
I looks like CRM-18567 and CRM-18504

Have a look at Chris Burgess comment, there are couple of commits that seem to fix the issue.

https://github.com/fuzionnz/civicrm-core/commit/a0bcc16171d2f30c4416aeec079bab56c313390a https://github.com/fuzionnz/civicrm-core/commit/d3e9ab21a0f2256197125854fe6312c3fa0c8c8a

I would recommend to create a backup or replicate your installation in a development environment, apply the commits mentioned and check if it solves the issue.
> 2 votes

---
Tags: joomla, error, upgrade
---


# Question
Title: Mail not sent from CiviCRM via SMTP or mail()
I am trying to send email using SMTP settings in the outbound email settings. I have set all the fields according to this post which would be

```
SMTP server address : ssl://smtp.gmail.com
SMTP server port: 465
SMTP username: [username@gmail.com/username@yourtlddomain.com]
SMTP password: [yourpassword]

```

I have also commented out CIVICRM\_MAIL\_LOG in the civicrm.settings.php hence my emails are not sent to a file, for sure. In both mail() and SMTP, the test mail is sent OK according to the popup window (view attached file). But it does not get delivered so it isn't really sent.

I have checked all the related questions. The closest was this CiviCRM not sending mails but the outputs don't match.

\[Edit\] The mails work now. I have implemented the changes suggested by @Siddharth Gupta, below. Also to allow your gmail to send mails you need to change its security to allow access for less secure apps from here

# Answer
> 9 votes
I think I found the issue. If your CiviCRM is installed via buildkit there is a file `~/buildkit/app/civicrm.settings.d/100-mail.php` which sets the `CIVICRM_MAIL_LOG` to `/dev/null`. This doesn't allow Civi to communicate to MTA (Mail Transfer Agent).

The first solution is to comment out

```
//if (!defined('CIVICRM_MAIL_LOG')) {
//  define('CIVICRM_MAIL_LOG', '/dev/null');
//}

```

Further, because this is a dev/testing environment, you may want to log your emails while you send them. In your `civicrm.settings.php` add the following lines.

```
if (!defined('CIVICRM_MAIL_LOG')) {
define( 'CIVICRM_MAIL_LOG', 'log_path/mail.log');
}
define('CIVICRM_MAIL_LOG_AND SEND', true);

```

`CIVICRM_MAIL_LOG_AND SEND` allows CiviCRM to log as well as send the emails.

# Answer
> 2 votes
so using google smtp is fine for tests, but as bgm mentioned, it won't scale for production, as google doesn't allow you to send a lot of emails that way.

if you have the popup, it means that civi could talk to the mail server successfully, so it's probably working and your set up is correct. What might be the issue is between gmail servers and your university final account. Can you try sending the test to a gmail address, eg the one you use as the sender too?

And double check what email account you set as the sender, it might be as well that the sender email address is not your gmail address, so the anti-spams kills the test email somewhere on the way.

# Answer
> 0 votes
In addition to queuing up the mail, you need to ensure that the cron job for sending them is executing. Look under Admin \> System Settings \> Scheduled Jobs, then check when the last time Send Scheduled Mailings ran. You may want to click on View Job Log to see if there are any issues it is having. Note that when debugging it can be convenient to click more \> Execute Now, and then check the job log again.

---
Tags: civimail, gsoc, civicrm.settings.php
---


title: Using CRM to manage walking groups

text:
# Question
Title: Using CRM to manage walking groups
We are looking for a program to manage walking groups. These groups may be part of health education, work-place based, or location based (such as a park). At the very least we want a way for participants to register for a group and receive notification on the event, such as rain cancelations etc. Down the road, we may also want to create profile accounts for participants to track their walking and use it promote competitions. Below is a summary of what we are looking for in a CRM.

* Integrated into existing wordpress website
* Event registration (free and pay capabilities)
* Ability to send out text and email notifications (walking group leader would most likely do this so phone and email information would need to be private)
* Security and privacy of participants (similar to the Remind app)
* Ability to set up social network and log walks into site
* Promote competition with badges/rewards

Would like to know what this application would be able to support from our wishlist above.

# Answer
> 3 votes
With some customization/development, all your wishes can be met by CiviCRM

```
> Integrated into existing wordpress website
> Event registration (free and pay capabilities)

```

Out of the box functionality. Your WP site server needs to good enough to run CiviCRM though. And events are easy to use (free and paid).

```
> Ability to send out text and email notifications (walking group leader would most likely do this so phone and email information would need to be private)
> Security and privacy of participants (similar to the Remind app)

```

Some customization will be needed.

```
> Ability to set up social network and log walks into site

```

Please elaborate on what you mean by set up social networks. Walks can be events or activities, you will need to figure out what works for you

```
> Promote competition with badges/rewards

```

There are probably a few different ways to do this, may require some development depending on what you need. For example voting on answers like on StackExchange is not available in CiviCRM and will require a reasonable amount of effort.

You should consider working with a CiviCRM Partner/Contributor.

---
Tags: wordpress, evaluating-civicrm
---


title: Hanging Searches, Listings

text:
# Question
Title: Hanging Searches, Listings
I'm trying to test CiviCRM to see if it'll be right for our organization, but try as I might, I just can't get contact searches (either through the quicksearch or profile -\> frontend) to return any results. In fact, they just hang, and after a great while (20+ minutes?) will finally timeout.

I've removed all options from search settings, tried appending "force=1" to URLs, turned off SEF entirely, played with Joomla menu link types, all to no avail. The profile search page will load fine, but entering any (or no) data will cause a total hang and never returns. Similarly, hitting "Back to listings" from a contact view, actually clicking on any data in contact view, or running a quick contact search in administration backend all result in a load forever loop.

My error logs make mention of some client denied access errors, so I made my htaccess file allow all, but that didn't seem to have any effect (other than stopping the errors).

Does anyone happen to have any other ideas?

# Answer
> 2 votes
It sounds like you have a problem on your install/instance, perhaps a host issue.

If you are evaluating CiviCRM, you may first want to try the Joomla Demo and/or create a sandbox to test on.

Once you have done the evaluation you can look in to why your instance is giving you problems.

---
Tags: joomla, search, search-results, quicksearch
---


title: Trouble with upgrade to ubuntu xenial

text:
# Question
Title: Trouble with upgrade to ubuntu xenial
I'm trying to get civi to run on Ubuntu xenial and drupal7. I installed the php5 repositories as per: https://askubuntu.com/questions/761713/how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04

I successfully upgraded my database to 4.7.7 but then I get stuck on a screen that shows the following:

localhost Error The website encountered an unexpected error. Please try again later. Error message CiviCRM\_API3\_Exception: DB Error: no such field in civicrm\_api3() (line 45 of /usr/share/drupal7/modules/civicrm/api/api.php).

Not sure if it has something to do with the access\_compat errors I was getting while installing, things like this in my apache 2 error.log \[Tue May 17 14:22:54.236734 2016\] \[access\_compat:error\] \[pid 32145\] \[client 127.0.0.1:35040\] AH01797: client denied by server configuration: /usr/share/drupal7/sites/default/files/civicrm/ConfigAndLog/CiviCRM.63a720ea8e0f63f2f91fb59f72af16dc.log

Any leads appreciated!

# Answer
> 2 votes
I think I may have gotten it. I upgraded to Ubuntu Xenial holding back with apt-mark all packages that matched drupal7, php, mysql and apache. Booted into my new system and all seems ok for now so I have my up to date desktop and a working civicrm setup. Thanks for listening.

---
Tags: upgrade
---


# Question
Title: Membership renewal not updating contributions correctly
When doing back office "offline" membership renewals (cash, cheque, phone) we have recently noticed that when we select "Renew" from the "Active Membership" window the membership dates are updated correctly but the contribution is recorded as 0.00. I just ran a test and created a new member with a cash payment of membership fee and the amount was correctly recorded in contributions at that stage. When I then used "Renew" to renew the membership the corresponding contribution is listed as 0.00. (The amounts in the forms for processing the renewal are correct.)

Rather new to CiviCRM and I apologise if I am missing something obvious, but this has me baffled. Fortunately we are not using CiviCRM for our accounting.

Re:CiviCRM 4.6.15, on Drupal 7

# Answer
> 2 votes
We have resolved this issue and it was related to a deleted Organisation contact still being associated with a membership type.

You might be able to resolve it in the interface by re-saving each membership type, especially where an associated Organisation has been deleted / changed to the same name but a new ID.

I actually made the change in the database so this could be your second option. The 'civicrm\_price\_field' table stores the Organisation ID in the 'name' column, for some reason this hadn't got updated to the new Organisation ID.

---
Tags: civimember, contributions
---


# Question
Title: How do I change the fields shown for participants on the CiviEvent Dashboard?
I'd like to add one of the fields of the contacts in the list of participants shown on the CiviEvent Dashboard.

How would I do that? I'm sure it has something to do with the Smarty templating, so maybe I need a gentle introduction to that...

I'm running CiviCRM 4.7.7 but believe this would be the same for most recent versions.

# Answer
Not easily ... you can create an extension to call hook\_civicrm\_searchColumns to provide the extra data to the template, and then change the CRM/Event/Form/Selector.tpl template to display that data.

Note that will change the event dashboard and also the events tab of a contact and the results of Find Participants.
> 1 votes

---
Tags: civievent, profile, smarty
---


# Question
Title: How to install Extension manually, ignoring certificate warnings?
I tried to install the Stripe extension a short while ago, but the website hosting the extension has an expired SSL certificate, so CiviCRM gave me an error:

```
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

60

```

I've now downloaded the file manually and placed the folder in my Extensions directory, but I still can't install, I get the same error.

Is there a method to install overriding this warning?

# Answer
I had to delete `com.drastikbydesign.stripe.xml` from the `civicrm_extensions/cache` folder, then use the Refresh button on the Extensions page.

Only then did it pick up that the Stripe Extension folder had been copied locally (rather than remote), and let me install manually.
> 1 votes

---
Tags: extension, stripe
---


# Question
Title: How to add a checkbox like "I agree following terms & conditions..."
I would like to add a mandatory checkbox on one of our event registration page. How can I do that please?

# Answer
You can definitively do that with a custom field! Custom Field -\> Used for: Participants -\> choose Field Type: checkbox; make one multiple choice option (Label: 'I agree to the terms and conditions'); or: Label: 'Read, Understood and Accepted'.

Stick this new Custom Field into its own profile (so it can can have its own pre-form and/or post-form 'help' i.e. Terms and Conditions) -\> make it required (in the profile) so users can't proceed without agreeing/checking the box.

Finally -\> stick that profile into your Event Registration page (Event Config -\> in the Online Registration tab).
> 13 votes

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


title: WYSIWYG Editor Messing with URL's

text:
# Question
Title: WYSIWYG Editor Messing with URL's
I'm trying to send out a mailing via CiviMail, and we have a link to the RSVP URL of our CiviCRM event. However, whenever we've sent out the test emails, it seems that the URL is getting messed up by the included WYSIWYG: CKEditor. This is the problem we are experiencing. If you take a URL, say

```
http://example.com/index.php?option=com_civicrm&id=172&lang=en&reset=1&task=civicrm/event/register

```

It gets replaced with the following URL:

```
http://example.com/index.php?option=com_civicrm&id=172&lang=en&reset=1&task=civicrm/event/register

```

Now the difference isn't all that noticeable, but the `&`s get replaced with `&`s. I was able to find a workaround by editing the source of the email and replacing all of the `&`s and not switching back to WYSIWYG view before sending it out. However this a less-than-ideal, band-aid solution. Does anyone have an idea of how to fix this issue?

*note: I tried installing the TinyMCE CiviCRM extension, and that did not solve the problem, the URL's were still getting jumbled.*

# Answer
> 3 votes
I feel your pain. Using wysiwyg editors to write emails is like using salt to heal a bleeding wound. It might have a purpose, but probably not in this context. and in this context, it hurts. A lot.

Anyway, back to your question: are you having the replacement in the href or "only" when you leave the link as part of the text you send?

The latest version of civi should behave correctly, otherwise, you can disable the replacement of the & into & (I've done it, it's not 100% html strict compatible, but seems to work fine with 100% of the real mail clients): here's an explanation on how to do it: Escaping quotes in ckeditor breaks smarty-syntax

and a more generic question about how to disable the wysiwyg editor: How to disable or fix the wysiwyg editor on civimail

# Answer
> 2 votes
From my tests, it seems like this mostly happens when the URL goes through the URL tracking of CiviCRM.

For example, if I send myself a test email from CiviMail, the URL will have a `&` in the URL, but my browser/email reader doesn't mind.

It only becomes a problem when I do a full mailing and track the URL:

```
$ wget -O /dev/null -S "https://example.org/sites/all/modules/civicrm/extern/url.php?u=1234&qid=87654"
  HTTP/1.1 302 Found
  Location: https://example.org/civicrm/event/info?reset=1&id=678

```

In that case, the URL causes a CiviCRM fatal error.

Edit: this is by no means a proper solution, but in the mean time I am using this fix:

```
diff --git a/CRM/Mailing/Event/BAO/TrackableURLOpen.php b/CRM/Mailing/Event/BAO/TrackableURLOpen.php
index 18e3284..0840e3d 100644
--- a/CRM/Mailing/Event/BAO/TrackableURLOpen.php
+++ b/CRM/Mailing/Event/BAO/TrackableURLOpen.php
@@ -90,6 +90,10 @@ class CRM_Mailing_Event_BAO_TrackableURLOpen extends CRM_Mailing_Event_DAO_Track
     $open->time_stamp = date('YmdHis');
     $open->save();

+    $search->url = preg_replace('/&/', '&', $search->url);
+
     return $search->url;
   }

```

# Answer
> 1 votes
There's two things here.

The first is where the link is to. That should not contain the amp;s. You should only be able to see this in the source.

The next is how the link appears. This bit should contain the amp;s to make it HTML friendly.

Links in source view should be of the form:

```
Click <a href="http://linknotcontainingamps.net">http://linkcontainingamps.net</a>

```

Or even

```
Click <a href="http://linknotcontainingamps.net">here</a>

```

# Answer
> 1 votes
CORRECTED: I too am having this problem & it has also been happening with my Civi/Wordpress & Civi/Drupal sites since 4.7 upgrade. Adding a link to an event or contribution page via the link button seems to work fine, but the resultant html code contains escaped ampersands (these don't show when the link is reopened using the link button) that make the link unusable. As noted above, the only workaround seems to be to correct the source and then not use WYSIWYG again - frustrating if you have content corrections to make thereafter.

I have applied the various CKEditor configuration directives suggested in the links above to media/civicrm/persist/crm-ckeditor-config.js with no result. I can confirm that other directives when used here cause corresponding changes in the editor (e.g style or help buttons), but the config.entities directives etc don't affect escape processing.

This doesn't seems to be an issue with CKEditor, as the same link inserted into an Event description works perfectly well, so must be an issue with the Civimail implementation.

---
Tags: civimail, ckeditor
---


title: Why does a 100% discount not work?

text:
# Question
Title: Why does a 100% discount not work?
We recently ran our first civiEvent with online bookings (and quite complex pricing). I installed civiDiscount and configured two coupon codes for groups who should be free - the event organisers and the National Council of the parent organisation. I set the discount level to 100%, and while the coupons were registered as having been used, it did not change the price on the registration form at all. When I set one of the discounts to 99%, it worked as it should. Fortunately, all our payments were offline, but it meant we couldn't report reliable income figures.

From my reading of the documentation, a 100% discount should be possible, so is this in fact a bug?

Richard

# Answer
Richard - I have used 100% discount w/Civi 4.3 + pricesets. I assume you included all your priceset options in your discount code configuration (you said you had complex pricing) since the 99% worked? CiviEvent code checks that prices do not go *below* zero but zero should be fine. You mentioned you're using offline registration ("Register Event Participant") which goes through a different codepath in cividiscount than 'online'.
You or one of your team could set up a test participant, use the 100% discount, and afterwards query the MySQL database table cividiscount\_track, and see if you don't find a row for that participant (cividiscount\_track.entity\_id is a FK on cividiscount\_track, where entity\_id = civicrm\_participant id).
> 5 votes

# Answer
This is likely something to do with your installation. Please try to replicate on a demo server. If you are able to then it would be nice for you to create a bug report.
> 1 votes

# Answer
I did have troubles with 100% discounts on older versions of cividiscount, upgrading to cividiscount 3.2 fixed them for me.
> 1 votes

---
Tags: civievent, cividiscount
---


title: Paid Event - free for members

text:
# Question
Title: Paid Event - free for members
Is there a way to setup a paid event which is free for members? Is CiviDiscount necessary for this?

# Answer
> 1 votes
CiviDiscount can calculate an automatic discount based on criteria such as current membership for individuals.

# Answer
> 0 votes
There are other ways, but using civiDiscount is by far the simplest way (you need to do a bit of coding yourself otherwise as far as I know.) You Just set up a 100% discount to automatically apply to to your event based on a contact having a current membership. I've set it up so that certain event types always have this discount, it is quite straight forward once you see the interface. The "bad" thing about doing it this way is even when a member is signed in they are presented with the price of the event initially, only once they press the register button is the discount applied.

---
Tags: civimember, cividiscount
---


title: Any justification for separate database

text:
# Question
Title: Any justification for separate database
Since the days of CiviCRM as a standalone project are long passed, is there any reason, in 2016, to have a separate database for Drupal and one for CiviCRM? If so, what is the compelling reason? For the record, I only see downsides, not the least of which is backup and restore should disaster strike. I've just taken over the care and feeding of an existing site where separate databases were used in the setup. The customer used the backup\_migrate module to do regular database backups and, you guessed it, only the Drupal DB was actually getting backed up.

Thanks for your insight.

-- Marcel

# Answer
To add to Erik's, here are three advantages to separating the databases:

**1) Upgrades.** When we are working to upgrade Civi, I know that the website side of the house is largely unaffected (not completely unaffected, but mostly), and if something in the upgrade goes awry, I'm only having to deal with the Civi side of things (especially in the event of downtime).

**2) Restoring backups.** Should you need to restore a backup of your website (like we did last year), you are only losing the web changes made since the backup, not the Civi changes as well. The same is also true if you need to restore the Civi backup -- you then don't lose the website changes made since the restoration point.

**3) Multi-site installations.** See the documentation here: Multi Site Installations
> 9 votes

# Answer
My standard practice is still to have them separately simply because I prefer the overview as a developer. And obviously you have to make sure the backup is OK, but if they never checked that (or tested it) I would see that as a bigger issue than having it in one database :-)
> 4 votes

# Answer
I use separate database whenever possible, for a few reasons, many of which Allen already covered. In addition, I am often responsible for migrating data to a new CiviCRM installation while a coworker (or another dev shop) is responsible for CMS implementation. This allows me to give frequent updates to the client on a test server without coordinating with another developer.

Also:

* I like to grant the minimal permissions needed on a per-database basis. CiviCRM requires more permissions out of the box than Drupal.
* I haven't really heard a compelling argument in favor of doing it as a single database. It's unfortunate that in your case the CiviCRM database wasn't backed up by backup\_migrate - but backup\_migrate is easy enough to configure to back up both databases.
> 3 votes

# Answer
One more thing further to the answers so far: moving to a different CMS. If, for whatever reason, you want/need to move civiCRM to a different CMS this is quite simple if the databases are separate. I've done it, so don't say it will never happen.
> 1 votes

---
Tags: best-practice, backups, sysadmin
---


# Question
Title: Can civirules be triggered off a custom field of type date for eg Date equals Now
Client is thinking about several date fields for a contact eg, when are they available to start volunteering' and want an alert for it. My presumption was 'oh let's do it with Activities' but actually I wondered if CiviRules could do this.

I ran a test and saw I can use Field value comparison, and set the field to 'is equal to' - but assume that NOW won't work out-of-the-box but happy to be told otherwise.

Assuming not, can you give me a pointer or know if this has been tried and is 'too hard basket'?

EDIT: so a custom field shows 'date i am available to volunteer' for a volunteer which will be sometime in the future. And the Admin want to get a reminder/notification say 5 days before that date is reached.

So I think the Linked Condition is eg Condition = Field value comparison, and Description is Contact.custom\_127 = NOW

And Linked Action would be: Add Activity to Contact. Type: Email. Status:Scheduled. Subject: check availability. Assignee: Peter DavisFZ

BUT if it ends up needing to be an Activity then I can also think about creating it at the outset on the form.

Reason I wondered about CiviRules is that I though "ha, with civicrm entity I can probably trigger a notification directly via Drupal Rules", and then i remembered CiviRules and wanted to find out more of what it could do ;-)

# Answer
You are on the right track with using now in field comparision. See my Question and Answer here.

* **trigger:** *daily trigger for group members*
* **condition:** *field value comparison* for a date, datetime or timestamp field, where you can use any string recognized by the php function strtotime. So you should be able to use now as explained in the PHP documentation. In your case i would use **"+5 days"** as the comparison value.

After saving the condition the description should show Contact.custom\_127 = 2016-05-19 (date when you saved the condition.)

Hint: use the latest CiviRules from Github, as support for timestamps was added a few days ago.
> 3 votes

# Answer
Normally, you need something to happen, so that you have something to react to.

But, there is two options for handling this differently.

**1. Manually:**

Tag a contact. If you have a CiviRule build with the trigger Contact is tagged, you could let CiviRules do anything you want, if you tag the contact.

**2. Daily and automatically**

To cover for the cases where there is no trigger actually happen. Like a contact that has NOT contributed for the last three months. Then the trigger could be "daily group check." (And the conditions of no contributions last three months). This is connected to a cron job, that runs once a day, and then "creates" the trigger action needed for a CiviRule to run.
> 1 votes

---
Tags: civirules, dates
---


# Question
Title: Anyone using CiviCRM for Scholarship Management?
I'm working with a nonprofit's foundation to find a system to manage the foundation and its scholarships. Is anyone using CiviCRM and any extensions for this purpose? Thanks.

# Answer
> 1 votes
Without information from you this answer is just waving in the dark but here goes.

Assuming a Scholarship involves

* an application
* a review/decision
* a notification of outcome
* for succesful, a one-off or series of payments
* perhaps a report at the end

Then I would approach this by using CiviCase and a bunch of custom Activity Types.

In an iDrupal world I would then provide the user with forms using webform\_civicrm to open and update the status of the Case while also creating or updating the relevant Activities.

I would probably also provide a Drupal View of current applicants so admins can easily click through to a prefilled Webform and make the relevant updates.

Webform can also take care of pushing out the success/failure notifications, or that could be triggered via CiviRules or directly via an Activity to let applicants know the outcome.

HTH

---
Tags: joomla, extension, gift-aid-extension
---


# Question
Title: Cannot submit form on CiviCRM 4.7.7, might be related to CRM-18510?
With CiviCRM 4.7.7 on Drupal 6, we are seeing crashes such as:

```
    May 18 11:16:34  [info] $Fatal Error Details = Array
(
    [message] => One of parameters  (value: `1-street_address`) is not of the type MysqlColumnName
    [code] =>
)

May 18 11:16:34  [info] $backTrace = #0 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Core/Error.php(371): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Utils/Type.php(424): CRM_Core_Error::fatal("One of parameters  (value: `1-street_address`) is not of the type MysqlColumn...")
#2 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Utils/Sort.php(124): CRM_Utils_Type::validate("`1-street_address`", "MysqlColumnName")
#3 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php(222): CRM_Utils_Sort->__construct((Array:7), NULL)
#4 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Profile/Page/Listings.php(394): CRM_Core_Selector_Controller->__construct(Object(CRM_Profile_Selector_Listings), NULL, NULL, 4, Object(CRM_Profile$
#5 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Profile/Page/Router.php(124): CRM_Profile_Page_Listings->run()
#6 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Profile_Page_Router->run((Array:2), NULL)
#7 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#8 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
#9 /srv/www/sites/orgdomainname.org/www/sites/all/modules/civicrm/drupal/civicrm.module(345): CRM_Core_Invoke::invoke((Array:2))
#10 [internal function](): civicrm_invoke("profile")
#11 /srv/www/sites/orgdomainname.org/www/includes/menu.inc(350): call_user_func_array("civicrm_invoke", (Array:1))
#12 /srv/www/sites/orgdomainname.org/www/index.php(17): menu_execute_active_handler()
#13 {main}

```

This looks similar to what is reported here:

CRM-18510 "Getting 'One of parameters (value: `Home-street_address`) is not of the type MysqlColumnName' error when Contact Search is used."

However since we are seeing the error when trying to submit forms (CiviMember + CiviContribute + Profile) rather than to search, I am not sure if what is reported with CRM-18510 is actually the same as what we are seeing.

If it is probably the same, please point me to what diff/patch I should test applying to our CiviCRM 4.7.7 on D6 configuration.

I am thankful,

Michael

# Answer
This looks likely to be the same underlying problem as the issue described in CRM-18510. There's a fix referenced there: https://github.com/civicrm/civicrm-core/pull/8317 . If you test this out, do report your findings here and on CRM-18510 . Hope it works for you.

Regards,

Dave
> 1 votes

---
Tags: civicontribute, civimember, profile
---


# Question
Title: Manage Emails Sent When Changing Participant Status
When you change a participants status on the back end an email is sent. Sometimes you may not want an email to be sent to the participant. Is there a way to suppress these emails? Is there a setting I am missing to control when these emails are sent?

Thanks, Steve

# Answer
> 2 votes
I'm afraid the answer to your question is: "No you're not missing a setting." CiviCRM will send out emails for bulk 'registration status' updates automatically with no way to stop it.

For some projects - we'll use a simple Drupal `buildForm hook` for other backend registrations/updates (below) - but this does not help with the bulk actions.

```
function mydrupalmodule_civicrm_buildForm( $formName, &$form ) {
  if ( $formName == 'CRM_Event_Form_Participant' ) {
     // please no - really - yes - no confirmation emails...
    $form->assign('email', '');
    $form->assign('batchEmail', '');
  }
}

```

---
Tags: civievent, email
---


# Question
Title: Inbound Email - Formatting? (emails with HTLM code are ignored)
Can emails with HTML code (images, tables, etc.) be brought into CiviCRM with the inbound email job? Any emails I have with images or tables get ignored by the Process Inbound Emails job.

In addition, can the inbound emails be formatted for better readability? The email text is one long string in the "inbound email" activity detail.

# Answer
It's tricky to get html import right, both because the html we use in the web world and the one in emails is not quite the same (email html is stuck 10 years in the past) ... and because it's tricky to get it safe. being sure that an attacker doesn't use the email as a vector to inject javascript and other dangerous things is complex.

so going full html is probably not going to happen without significant investments, but you mentioned the issue of a single long line.

This one is probably easier to handle in a safe and satisfying way. Do you, or does someone in your team have some dev skills? it wouldn't be too hard to alter the display or the processing to inject
where they are new lines.
> 1 votes

---
Tags: civimail, email, activities
---


# Question
Title: Drupal block not appearing on CiviMail page
I want to add some inline help to the New mailing CiviMail. e.g. show a block on this page civicrm/a/#/mailing/12345

I've created my drupal block, set it to appear in the correct theme and set it to only display on this page: civicrm/a/#/mailing/\*

However for some reason it won't show. I've backtracked and I'm able to get it to show up with this expression: civicrm/\* but as soon as I add civicrm/a/\* it doesn't work, just doesn't display

Any ideas about why this might be?

Thanks Peter

# Answer
> 5 votes
I think this may have something to do with the fragment identifier (#). This is typically used to link to a particular point within a page (an anchor). However, in this case I think it is being used by the JavaScript framework to indicate a particular page view. I guess that Drupal may not be able to process URLs like this.

# Answer
> 4 votes
I think @William is correct - I just tried and I can't get a Block -\> Visibility -\> Pages -\> Show block on specific pages -\> Only the listed pages -\> to show up on a #a URL (tried escaping the # - can't do it). civicrm/a\* works - but then you'd be seeing it on all forms using AngularJS.

That's not good! Let's search JIRA CiviCRM for it - and if needed report it. I did have a client run into using #a on iOS/Safari - workaround at that time for to use Chrome - but this is a bigger issue.

Possible immediate workaround \[I know not ideal\] I suspect that you only have few people who can CiviMail -\> put them into a Drupal Role of their own -\> then:

* use Region settings to only show this block to your staff in the CiviCRM theme
* use visibility settings -\> Roles -\> Show block for specific roles

# Answer
> 3 votes
Agree with Williams' description.

Other possible resolutions:

1. Give some love and patience to planned updates for the form system. Right now, Angular pages are strictly SPA ("single-page architecture" -- "javascript handles the page routing") and they're not very hookable. Current plans for the next iteration provide more hookability and reduce the reliance on SPA. (Somewhat related: https://forum.civicrm.org/index.php?topic=36978.0 )
2. Target the block at the base page `civicrm/a`. In the code for your block, use some Javascript to call `setInterval()` and periodically check `window.location.hash`; hide or display the desired block with `$.hide()` or `$.show()`.

# Answer
> 1 votes
Taking this in a slightly different direction - it reminds me that in general, CiviCRM urls are not very nice when it comes to Drupal, because Drupal doesn't like to pay attention to query strings. I wonder if there is a broader solution that also deals with this issue? I'd imagined that there's a simple Drupal hook that could so some rewriting in and out.

# Answer
> 0 votes
I haven't tried this so don't know if it will work. But, I create URL aliases for my civicrm contribution pages so that when a user goes to those pages it's a nice pretty url instead of the long civicrm url. I wonder if creating a URL alias in Drupal and then using that alias as the URL for the Show only on this page would work?

---
Tags: civimail, drupal
---


# Question
Title: For CiviCampaign - how can I enable any user to see Canvass and other Activities entered by another user via a webform?
We're on Civi 4.6.9, Drupal 7.

I've installed and am using the CiviCampaign component. I like it. I've used the Canvass activity type added by CiviCampaign in a webform, created using the webform-civicrm Drupal module. Here's a screenshot of the webform CiviCRM activity field.

Now, I want to enable any user to see Canvass activities that any other user has entered using the webform.

In Civi, only the Added by: user, the Assigned To: user (if any), the "target" contact and an Admin (me) can see the Activities in the Added by: or Assigned To: user's record.

There are other users who oversee volunteer users entering Canvass activities (the Added by: user), as well as staff and volunteers conducting the canvass (the Assigned to: user) that need to be able to see all the Activities data entered in each contact's Activities list.

I can and have created Groups of the target contacts who have the relevant Canvass activity and any user can see the Contacts in the relevant Group.

I've looked here and elsewhere. I've also tweaked the CiviCampaign permissions. No luck so far.

# Answer
> 1 votes
Turned out that a user can only see Activity Types = Canvass on their Activity Tab if they are given the "administer CiviCampaign" permission.

Also it seems that perhaps because Canvass is an Activity Type related to Entity = CiviCampaign that

* it is not available in a Drupal Views as an Activity Type filter
* it is not available as an Activity Type filter on an Activities report.

Jamie - any thoughts on how to unlock this? anything to do with component\_id being 9 in the civicrm\_option\_value table?

---
Tags: activities, civicampaign
---


# Question
Title: Upgrade from 4.6.10 to 4.6.16 states DB already upgraded to 4.6.10
Using WP 4.5.2 - We followed the steps to upgrade and when we ran step "4. Run the Upgrade script" we get the following error - Can not do this Database is already upgraded to 4.6.10. Everything seems to work ok... but it still shows the version at 4.6.10. Does this mean I have the 4.6.16 code but the DB is still at 4.6.10? How do I get this completed? I feel like I'm stuck in the middle somewhere?

# Answer
> 1 votes
Make sure your old codebase has been sufficiently removed (not just renamed) so that there is no chance it is still referencing old files

---
Tags: upgrade
---


title: Can you customize a contribution page?

text:
# Question
Title: Can you customize a contribution page?
I have a contribution page set up for users to sign up for memberships. There are several ways in which the presentation could be better. To give some examples:

* Users have the option of contributing in addition to membership. This is currently labeled "additional contribution" and I would like to change the title to reflect the fund they are contributing to.
* Users have the option for auto-renewal. This auto-renewal box is currently under the "additional contribution" which makes it appear to the user that they will be billed the additional amount each month as well. I'd like to moveh te box to make it clearer.
* We are using CiviDiscount, and I'd like to change the placement on the page and the language used for this as well.

Is all this customization something that can be done? How would you go about it? I'm in Drupal 7, and if there's a way to do this in webform I'm happy to, but I'm not sure how to include the discounts...thoughts?

# Answer
> 6 votes
We have some examples of how to customize Contribution forms in our iATS Payments extension. Essentially the recipe involves: `buildForm hooks`, custom templates and `JavaScript`. I'll try and explain below how they all tie together:

1. `buildForm` hook

https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/iats.php#L285

Here we check what form we're on (event, contribution, backend, frontend, etc.). For the main contribution page we're:

```
case 'CRM_Contribute_Form_Contribution_Main':
  $fname = 'iats_civicrm_buildForm_Contribution_Frontend';

```
2. `function iats_civicrm_buildForm_Contribution_Frontend(&$form) {`

https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/iats.php#L781

Let's say we have ACHEFT (debit) payment processor and currency is CAD - and we want to customize the contribution form - to use Canadian language for direct debit, display Canadian instructions and help the user fill out the fields by displaying a Canadian cheque image.

```
if (!empty($acheft[$form->_paymentProcessor['id']])){
  iats_acheft_form_customize($form);

```
3. `function iats_acheft_form_customize($form) {`

https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/iats.php#L612

```
$fname = 'iats_acheft_form_customize_'.$currency;

```
4. `function iats_acheft_form_customize_CAD($form) {`

https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/iats.php#L660

Here we addElement-s, addRule-s; setLabel-s:

```
 $form->addElement('text', 'cad_bank_number', ts('Bank Number (3 digits)'));
 $form->addRule('cad_bank_number', ts('%1 must be of length 3.', array(1 => ts('Bank Number'))), 'rangelength', array(3,3));
 $element->setLabel(ts('Bank Number + Transit Number'));

```

and inject the CAD template:

```
CRM_Core_Region::instance('billing-block')->add(array(
    'template' => 'CRM/iATS/BillingBlockDirectDebitExtra_CAD.tpl'
  ));

```
5. In that https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/templates/CRM/iATS/BillingBlockDirectDebitExtra\_CAD.tpl

We load js (to move the fields around):

```
<script type="text/javascript" src="{crmResURL ext=com.iatspayments.civicrm file=js/dd_acheft.js}"></script>

<script type="text/javascript" src="{crmResURL ext=com.iatspayments.civicrm file=js/dd_cad.js}"></script>

```

We inject a CAD Cheque image:

```
<div class="content"><img width=500 height=303 src="{crmResURL ext=com.iatspayments.civicrm file=templates/CRM/iATS/CDN_cheque_500x.jpg}"></div>

```

and render the fields we just created - e.g.:

```
  <div class="crm-section cad-transit-number-section">
  <div class="label">{$form.cad_transit_number.label}</div>
  <div class="content">{$form.cad_transit_number.html}</div>

```

The js files are located here:

```
https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/js/dd_acheft.js
https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/js/dd_cad.js

```

In them you we do quite a few things - like move fields around and run some validations on the bank number and the transit numbers that were entered.

Hopefully these examples will be useful to you! I realize it's probably more than you bargained for! But once you get these techniques under control - you'll be able to gain full control over all your CiviCRM form pages.

End result for this example:

---
Tags: civicontribute, cividiscount, recurring-contributions, theme
---


# Question
Title: Where is "Unique ID (OpenID)" and how is it used?
I am preparing to do an import of a lot of data, and I want to properly map my data into CiviCRM. This is primarily for event participants of various kinds, so I exported the basic participation data to use as a template. There is a column therein called "Unique ID (OpenID)" that I can't locate in the Contact view or anywhere else. Some of our data already in CiviCRM has this populated, some not. It could have been populated via original import and is completely useless. Or not?!? I don't know.

I have tried googling for the answer, and all I come up with are two pages from the manual referencing data export columns that include this for Organizations and for Households, but not individuals.

There is an OpenID field that includes a location selector, but this implies a relational join to another table, not a single column in the Contact record (which is what I am looking for). And for those contacts that have the "Unique ID (OpenID)" column populated in the export, this field is NOT populated on the Contact view page.

So, what gives?

# Answer
OpenID was designed to provided a universal login to all your online accounts. You can read more about it at http://openid.net/get-an-openid/what-is-openid/ . It was created in 2005 around the same time as CiviCRM and I think the standalone version of CiviCRM would let you sign in using OpenID. There are modules/plugins that will let people sign into your CMS with OpenID.

As Karin has commented, if this is not a single step, one-time import of data, then you should use External ID to store the identifier from your other application.
> 5 votes

# Answer
To map data between CiviCRM and a legacy application - we use External ID (which is unique and available in all CiviCRM import screens - whether you're importing Contacts or Contributions or Memberships, etc.). External ID is in the View Contact screen (bottom left in 4.6.x) and is is in the `civicrm_contact` table: `external_identifier`
> 1 votes

---
Tags: civievent, contacts, import, export
---


# Question
Title: Custom date field throwing DB constraint error "cannot be null"
I have a date field associated with a particular case type. When I try to create a new case, it is failing because the dates are empty. However, when I created the custom data, I did not make them required. There is one custom field that seems to work but it submits the empty field as '' (an empty string) as opposed to null.

Why is there a not null constraint on those fields, and ok to fix this by manually setting all those columns to allow null values?

We are using Drupal 7, CiviCRM 4.7.4

# Answer
I guess that shouldn't be a problem in set the column to null in the DB because those are custom field

I did manage to do the same testing against lower version in 4.6.15 and mysql version 5.6.25 - Which works as excepted

I guess this may be a issue with mysql version or in the code so just check with the lower version or wait till the next release and if you have the same issue then please raise an issue

I guess this helps !!
> 1 votes

---
Tags: civicase
---


title: Maximum rcpt groups count in civimail

text:
# Question
Title: Maximum rcpt groups count in civimail
When trying to compose an email via CiviMail addressing many groups it seems the interface smashes some groups when adding new ones. Our users can't see a reproducible pattern.

So my question is: Are there any limits regardarding the count of groups in the selector or the estimated recipients count?

Or do you have any other ideas what could cause this behaviour?

# Answer
> 1 votes
Does not appear to happen since upgrading to 4.7.7.

---
Tags: civimail
---


# Question
Title: How to define a Custom Membership Status?
Our membership is monthly rolling. Now We would like to give a member to be in ***Grace period of 12 months*** if they have paid at least for 12 months.

Although I have changed the membership rules to following...

I have also ran the scheduled job after changing the settings, but nothing seems to be changed in terms of status of existing members. Can anyone help please?

EDIT: I have changed the Expired rules to 12 months too, but for example for the person who paid in August 2015 it shows **EXPIRED**, where it should have been **GRACE**

# Answer
> 2 votes
If I understand you, there may be a problem that you are using 'monthly' rolling (i take it you mean 1 month rolling). Does that mean someone needs to have paid for 12 membership cycles? If so there is no way that civicrm currently handles setting Grace to be 12 months based on them having purchased 12 membership cycles. But perhaps that isn't the point.

A more common approach would be as follows, in case this provides some hints to you:

* set a rolling 12 month (1 year) membership
* set Grace to be 12 months starting from End Date and count is as 'current'
* set Expired to start 12 months after End Date
* make sure Grace is above Expired in your order of Member Status.

---
Tags: civimember
---


# Question
Title: How do I override the default date range of JQuery date widget?
CiviCRM 4.7.3 Currently hard coded to show 10 years in the past, and 9 years in the future.

I would like to override this and set the year range from 1965 to the current date, as described in the docs:-

http://api.jqueryui.com/datepicker/#option-yearRange

# Answer
> 2 votes
Have you tried adjusting the settings at **Administer \> Customize Data and Screens \> Date Preferences**. to achieve what you want?

# Answer
> 2 votes
I think the answer may be that this is working in 4.7.7 - set your date range in the Custom Field - Edit screen \[I want to go back 30 years\]:

Custom Date SE field:

And this is indeed giving me a dropdown going back 30 years (I can select 1986):

---
Tags: dates, date-preferences
---


# Question
Title: Unable to run CRON for scheduled jobs in Drupal 7.43 and Civicrm 4.7.7
I have tried running a cron job in drupal 7.43 and civicrm 4.7.7 with no success. I have a scheduled job: Home » CiviCRM » Administer CiviCRM » Scheduled Jobs (Send Scheduled Mailings) with setting Run frequency "Every time cron job is run" (BTW the job runs if I use Execute now)(I have also set at 1 hour intervals) In Drupal; Home » Administration » Configuration » System \> CRON it is set to run every hour and does so. I also can run it from the external URL. When I run the Drupal CRON it has no effect on the Civicrm scheduled job and Civicrm complains each time I log in to Civicrm; "Cron Not Running - Last cron run at May 16th, 2016 4:48 PM." which is the last time I executed it manually (Execute now). I am doing this as administrator with all permissions.

# Answer
> 1 votes
You need to set a cron command on the server.

https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

Something like

```
*/15 * * * * wget -O - -q -t 1 'http://mysite.org/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=site-key'

```

If you have set it, what is the exact cron command for CiviCRM you have set on the server (cpanel, directadmin ....)? (You can leave out the pwd)

---
Tags: civimail, cron, scheduled-job
---


title: Wat moet ik downloaden?

text:
# Question
Title: Wat moet ik downloaden?
Als newbe zie ik even door het bos de bomen niet meer. Ik ga een praktijk opstarten met diensten en ik zoek een CRM waar ik per klant niet alleen hun gegevens kan bewaren, maar ook verslagen van behandelingen enz... Ik kreeg CiviCRM als tip aangeraden. Ik heb me ingeschreven, en wilde gaan downloaden, maar zie dat er verschillende versie's zijn. Ik weet niet goed welke versie het beste past bij wat ik nodig heb, omdat ik zo snel niet kan vinden waar welke downloadknop voor dient. Iemand die kan helpen?

# Answer
CiviCRM werkt achter een website.

Om CiviCRM te gebruiken begin je met het installeren van de website. Er zijn 3 website systemen waar CiviCRM mee samenwerkt:

* WordPress
* Drupal
* Joomla

WordPress is een veelgebruikt systeem en redelijk makkelijk te installeren.

CiviCRM zelf is wel lastiger dan het installeren van 1 van die 3 systemen. Je hebt redelijk wat technische kennis nodig.

Laat maar weten of het lukt of dat je hulp nodig hebt.
> 1 votes

---
Tags: installation
---


title: Menus do not load on some pages

text:
# Question
Title: Menus do not load on some pages
I am attempting to correct an issue that has plagued me since setting up CiviCRM. The issue remains for me, even after upgrades. The issue is that on some pages within CiviCRM, the menu doesn't fully load, and ultimately renders a page useless. It occurs when I am going to the Civimail component and some other features. It isn't consistent. Here are two screenshots. The first shows the normal menu that appears on most pages. The second image is the image with the broken menu:

# Answer
Sometimes it is worth visiting /civicrm/admin/menu?reset=1 and right clicking on any menu item, and then click Edit and Save so that you then get the message

> Click here (/civicrm/admin/menu?reset=1) to reload the page and see your changes in the menu bar above.

Otherwise you can just visit that url directly. This may not help with your situation since it seems to be less consistent. But it may help others looking around for such advice
> 1 votes

# Answer
I've clicked around on the demo site (joomla.demo.civicrm.org) but I haven't been able to recreate the issue, sorry.

It could be a CSS/JS issue. Is there any custom CSS that could be interfering, or do you see any JS errors in the console when you encounter this problem?
> 0 votes

---
Tags: joomla, menu
---


title: Reordering Fields Appended With jQuery

text:
# Question
Title: Reordering Fields Appended With jQuery
I have appended a field to honoree-name-email-section and it works great. However it appends to the bottom of the fields. I would like to append a field an have it be shown at the top of the list. Is there a way to do this?

Thanks!

# Answer
Here's an example of moving #mycustomfields ahead of a .core-class:

```
function Refresh() {
  cj(function ($) {
    'use strict';
      /* move my custom fields up where they belong */
      $('.core-class').prepend($('#mycustomfields'));
  });
}

```

Open up an inspector tool for your browser to find the # or the . you'd like to move around using JavaScript. In Firefox I like Firebug: http://getfirebug.com/

In the example above I'm moving an entire div with id=mycustomfields.

@Josh ended up using: 'cj('#editrow-custom\_25').insertBefore('.editrow\_prefix\_id-section');'

Many ways to re-order change things up in jQuery!
> 2 votes

---
Tags: civicontribute
---


title: How to disable caching?

text:
# Question
Title: How to disable caching?
I am working on an issue regarding Date Formats (`Localization > Date Formats`) and it took me a while to realize it is caching due to which changes in `Localization.settings.php` file were not being reflected. Even after the realization, after every small change I have to clear the cache manually. I used *drush* (`$ drush cc civicrm`) to do it which takes about a minute everytime and it is hectic.

So, how can I disable caching?

# Answer
Caching methods can be enabled or disabled in your CiviCRM settings file (eg: civicrm.settings.php).

The setting you're looking for is: CIVICRM\_DB\_CACHE\_CLASS

To disable caching, change the value to 'NoCache'. Other possible settings are documented above the setting in the file.

There is a page about caching in the documentation here: https://wiki.civicrm.org/confluence/display/CRMDOC/Cache+Reference
> 1 votes

---
Tags: date-preferences, caching
---


# Question
Title: CiviEvent - How to Template Profile Fields and Price Set Questions In Custom Groups
Is there any way to edit a CiviEvent template where I can take price set fields and put them in groupings with specific profile fields (from included profile)?

Reasoning - we are collecting data, which would go into Profile fields. We are also collecting Fees that correspond to those profile fields.

I want it to be grouped like

```
Profile Field 1 a
Profile Field 1 b
Price Set field 1

Profile field 2 a
Profile Field 2 b
Price Set field 2

```

Currently I am using jQuery .insertBefore and .prependTo to accomplish this, but it just seems ugly?

Thank you!

Sometimes questions should be right next to the Price Set option on the form - hence our need.

# Answer
> 2 votes
I think jQuery is the best way to achieve this at the moment, rather than trying to customise the template, or load a custom template for an individual event. Doing this in jQuery also keeps the logic separated out.

If it's critical that the questions appear in this order, then you can use the introductory message and some creative CSS / JS to hide the entire booking form unless JS is enabled. This is the approach we sometimes take.

---
Tags: civievent, profile, templates
---


# Question
Title: How can I set up the default CiviCRM error page/message inside the site template?
On occasion, CiviCRM produces an error page like this (for example, when someone tries to visit a contribution page that has since been disabled):

How can I make sure that this shows up in the site's theme instead of a blank white, unfriendly, actually-rather-scary page?

**BONUS FOLLOWUP:** would it be possible to set up a redirect setting for specific disabled pages, to forward them to a live page, or a more descriptive message?

# Answer
As of 4.7 there is no more 'Fatal Error Template' setting. See https://issues.civicrm.org/jira/browse/CRM-16478

You can instead use the standard approach to overriding template files as described here: http://wiki.civicrm.org/confluence/display/CRMDOC/Theming+CiviCRM

The custom template directory can be set in: CiviCRM \> Administer \> System settings \> Directories.

If your custom directory was called 'customtemplates' then to override the fatal template you would upload your new template file to: ...customtemplates/CRM/common/fatal.tpl
> 2 votes

# Answer
you can override (not recommended):

templates/CRM/common/fatal.tpl

or set your custom error template here:

http://d46.demo.civicrm.org/civicrm/admin/setting/debug?reset=1

You can also specify a different error handler in that setting
> 4 votes

# Answer
Another (simpler) option that comes from a slightly different angle -- set up a Page Redirect using Eileen's extension so the user doesn't see the error message at all. This extension redirects all traffic from disabled contribution pages to a default contribution page (which you specify). So if you have a disabled customized donate page that you used temporarily, you can redirect anyone who comes to that page to the default live donate page, for example.

How to use:

1. Install as usual for CiviCRM Extensions
2. Visit **civicrm/admin/setting/customredirect** and enter the ID of the contribution page you'd like to redirect to.
> 3 votes

---
Tags: error-page, theme
---


title: Multiple author for an extension module

text:
# Question
Title: Multiple author for an extension module
Is it possible to have multiple author for a module extension? I'm extending last year's GSoC project. So, I need to have two author names for the module.

# Answer
> 1 votes
You can have several maintainers, as for the authorship, it's a single one indeed (top of my head) and it's customary to keep the initial one and explain the documentation (eg. README.md) that you are taking over.

Does it solve your problem?

---
Tags: extension, gsoc, modules
---


# Question
Title: Why am I seeing two identical payments associated with one contribution in 4.7.x?
"Is this an issue with iATS payments Extension?"

# Answer
> 1 votes
**No it's not** an issue with the iATS Payments Extension.

I got this question - and have reproduced it using 4.7.7 and iATS Payments Extension \[note the transaction IDs are identical\]:

But I also get this on the http://dmaster.demo.civicrm.org/civicrm/contribute?reset=1 \[today May23 at 9:40MT\] - again: note the transaction IDs are identical:

I will file a JIRA issue for this - Please note that iATS Extension is officially still on the 4.6.x (LTS = Long Term Release).

---
Tags: civicontribute, lts, iats
---


# Question
Title: What is the CiviCRM LTS Version, and should I use it or the latest stable release?
On the CiviCRM download page there is an LTS version underneath the current one. What's the difference, and which should I use?

# Answer
LTS stands for Long Term Stable version. It is intended for use on more conservative sites that are more concerned with having a stable CiviCRM environment than with having access to the latest features in CiviCRM. You should decide which type of site yours is.

The LTS version contains all fixes for security vulnerabilities that affect the software, and many but not all of the bug fixes that are available in the stable version. As mentioned, it does not contain the new features made available in more recent versions.

The LTS version tends to be one or two minor versions behind the latest stable version. So a little while after 4.5 was released as the latest stable version, the LTS version switched from 4.2 to 4.4, skipping 4.3. Similarly, in late 2015 likely after 4.7 came out, 4.6 became the LTS version, skipping 4.5. Now that it is April 2016, the expectation is that 4.7 could become the next Long Term Stable release after 4.6, in anticipation of significant changes in 5.0. But the final decision on this won't likely be made until late 2016 / early 2017.

The benefits of using the LTS (long term stable) release are:

* There are fewer unknown bugs in the software since it has been used extensively for a long time.
* Upgrading within one release branch like 4.2 or 4.4 is less likely to require extra effort or cause problems than upgrades from 4.2 to 4.3, or 4.4 to 4.5.

Downsides to using LTS include:

* Not having access to the features available in more recent versions of CiviCRM.
* Not having access to extensions or releases of extensions that are only available for more recent versions of CiviCRM.
* Not having access to some bug fixes that are included in more recent versions of CiviCRM (usually ones that are not important or that require a lot of work to backport).
> 13 votes

# Answer
We advise our customers to stay on the LTS versions of CiviCRM unless they have a functional need for the latest and greatest. This is in line with the detailed explanation that Joe Murray entered (thanks Joe).
> 7 votes

# Answer
The current trend (although this may change in the future) is for even-numbered versions to get long term support (LTS) while odd numbered versions don't.

If you are installing CiviCRM for the first time, I recommend always going with the latest version and not LTS. This is because there is a cost to upgrading, and starting off on a higher version # means fewer upgrades are in your immediate future.

Once you have been running CiviCRM for a while and newer versions are released, you'll need to decide when to upgrade. There are at least 3 approaches:

1. **Cutting Edge:** always upgrade to the latest release to gain the benefits of new features (and possibly face new bugs).
2. **Conservative:** always stay on the LTS version, upgrading only when a new LTS is announced and the current one is retired.
3. **Middle-of-the-road:** when a new .0 version is announced (e.g. 4.6.0) sit back and wait a few weeks until the majority of bugs are found and fixed, then upgrade when it is at .3 or .4.
> 5 votes

# Answer
At Cividesk we recommend going with the LTS. That may be because we help maintain the LTS ;). All security fixes are backported to the LTS and it tends to be more stable than the newest release. As @Coleman points out the newest release does get more stable over time so this is something to consider as well.
> 1 votes

---
Tags: lts
---


# Question
Title: regen.sh - Call to undefined function db_query()
So I was following this doc to add a new setting which asked me to run `bin/regen.sh` script. But running the script failed with the following error:

```
PHP Fatal error:  Call to undefined function db_query() in /opt/buildkit/build/mytestbuild/sites/all/modules/civicrm/CRM/Utils/System/DrupalBase.php on line 303

```

Now I cannot access CiviCRM at all. I get the following message. Drupal works fine though.

```
The website encountered an unexpected error. Please try again later.
Error message
CRM_Core_Exception: Found installation canary. This suggests that something went wrong with tracking installation process. Please post to forum or JIRA. in Civi\Core\InstallationCanary::check() (line 53 of /opt/buildkit/build/mytestbuild/sites/all/modules/civicrm/Civi/Core/InstallationCanary.php).

```

# Answer
> 1 votes
There seem to be two concerns here - how to get `mytestbuild` working again - and how to get `regen.sh` to work.

# Get `mytestbuild` working

The quickfix is to drop the table `civicrm_install_canary`.

The more general fix is to put your codebase to a pristine state (e.g. no local changes/patches; check out the official upstream branch; `git scan status` may help). Then you can create a pristine DB using one of these commands:

* `civibuild restore mytestbuild` \- This is faster -- it loads a SQL snapshot from the last time you ran `civibuild`.
* `civibuild reinstall mytestbuild` \- This is slower -- it drops the Drupal+Civi databases, deletes any config files, and recreates them.

# Get `regen.sh` working

This appears to be a regression affecting `regen.sh`. To determine this, I did a few things:

1. Checkout the latest code from `master` and run regen.sh. See the same problem.
2. Clear out uncommitted changes (e.g. `git checkout -- sql/civicrm_generated.mysql`)
3. Repeat above, but checkout tag `4.7.0` instead of branch `master`. (When jumping among different versions, I usually use `./bin/givi checkout <TAG>` because that checks out corresponding tags in `packages/`, `drupal/`, etc. The need to )

After spot-checking a few tags, I determined the problem arose somewhere after 4.7.0 and before 4.7.2. Since the context involves `bin/` and the error involves `CRM/Utils/System`, we can make an educated guess that there was a change in one of those folders and skim the log:

```
git log 4.7.0..4.7.2 bin/
git log 4.7.0..4.7.2 CRM/Utils/System
git log -p 4.7.0..4.7.2 bin/
git log -p 4.7.0..4.7.2 CRM/Utils/System

```

I'm pretty sure that the regression occurred due to https://github.com/civicrm/civicrm-core/commit/40d5632a25086d7c963538f2b6daf2a2546e16a6 ; undoing that patch allows `regen.sh` to run, but you'd need to read/think a bit more figure out a proper fix.

---
Tags: database, settings
---


title: Is CiviCRM HIPPA compliant?

text:
# Question
Title: Is CiviCRM HIPPA compliant?
We are a non-profit mental health organization and require our records to be secure.

# Answer
There was quite a discussion about this here which is worth your perusing. It suggests that the question won't be 'is civicrm HIPPA compliant' but 'is my configuration and usage of civicrm HIPPA compliant'.
> 1 votes

# Answer
And in addition to what Pete wrote - you will want to ensure your server configuration/firewall/SSL etc is all set up securely too - and locked down such that only very few hands have access to your codebase.
> 1 votes

---
Tags: security
---


# Question
Title: how would I send a monthly email automatically
I'm looking for suggestions on how to accomplish the following:

Send a regularly scheduled email (monthly or weekly or whatever I choose) based on a specific message template to a specific group without having to go in and schedule it every time.

I'm thinking something like a Weekly Inspirational Quote email or Daily Bible Verse email. The content would change but the basic layout of the email would be the same.

# Answer
You could use the CiviRules extension to accomplish this in combination with the Email API extension. Both extensions can be found in the extension directory.

In CiviRules the DailyGroupMembership trigger does what you want, it only does it on a daily basis rather than once a month. You might either come up with some CiviRule conditions to make it run only once a month or even better, adapt the DailyGroup trigger to allow a selection of day/week/month.

Some examples of CiviRules can be found here: https://wiki.civicrm.org/confluence/display/CRMDOC/CiviRules+Cookbook
> 3 votes

---
Tags: civimail, email
---


# Question
Title: How to sell membership on event page and apply the membership discount? (Autodiscount)
Is it possible to have a CiviEvent page that offers a membership, and if you select that membership, receive a discount on certain price set options in the same form?

I found this: https://github.com/aghstrategies/com.aghstrategies.eventmembershipsignup

However it remains unclear if it will do the above.

Things I've considered:

1. Webform CiviCRM. Can't use it because it does not support complex price sets and loses the abilities of Civi to change/update registrations.
2. Drupal Commerce / Rules - same as above.
3. Having people sign up for Membership using Contribution Page, pay, then go to Event page, pay. Two payments, too many steps.

Thank you for your help.

Reasoning: we want to encourage people to join as a Member to receive a discount from our event and have it done on one form. Currently there is no easy pathway for this AFAIK.

# Answer
The Event Membership Signup extension is designed for this purpose--to give a discounted price for the membership/event combo--but it won't help in certain complex scenarios.

If your event fee is $100, and your membership fee is $50, and you want to give a $20 combo discount, there are two ways to do it. You could add a new price field with a single checkbox option for $30 membership, or you could add a new option to your existing event price field offering a registration and membership together for $130.

On the other hand, you cannot (without custom code) say that selecting the membership option gives 20% off on each of a bunch of possible add-on items. The discount comes from the price you assign to the option that gives you the membership, so the discount can't be variable.
> 6 votes

# Answer
The info.xml of the extension you linked to strongly suggests it will do what you want. You specify that certain price options include a membership. If that doesn't work, you're going to need to write an extension to handle this. Memberships aren't available on event pages without an extension.
> 2 votes

# Answer
I have done a lot of this kind of discount in the past using jquery. My approach would be to add the discounted prices in the event price set with the undiscounted ones as a multiple radio option and have jquery hide them onload. I would then add a trigger to either the role selection or an additional price set item that will unhide the appropriate event price.
> 0 votes

# Answer
We have done this with Drupal Commerce and Rules... it gives you lots of flexibility but does involve a significant amount of work.
> 0 votes

---
Tags: civievent, civimember
---