# Question
Title: What is the best practice for tracking total number of attendees?
I have been using activities to track "events" for my Church. These are not events that one would register to attend but rather things like Bible Study, Sunday Worship, etc. I've been double working by creating the activities and then creating drupal nodes for the public calendar. I don't want to have to do that anymore. I tried to find a way to get an Activity feed from Civi (with ability to filter by activity type) so that I could use Feeds in Drupal to import them to nodes but could never find a solution. Events has a feed that works with Feeds and so I'm thinking of moving to using civiEvent to track these. Here's the issue....Most of these "events" we don't track who actually attends but instead only the total number of people in attendance. I thought of creating custom fields to input this on the Events but that then shows that data publicly when the Event is viewed.

Any suggestions on how I can stop double working and still be able to track this information?

# Answer
> 1 votes
You should definitely use CiviEvent. You can still make the events visible via Feeds, just don't turn on online registration for them. To track attendance, create a generic contact named Anonymous Attendee. Create a Price Set that lets you enter a quantity, and make the price $0.

Now you can add a single registration per event (with the actual number of attendees) under this generic contact. You get reports with no custom code or extra effort. Why track attendance if you're not using that info for decision-making purposes, right? In the future, if you ever decide to have people sign up (or sign in), the architecture is already in place.

# Answer
> 3 votes
You can use this extension to hide private fields (eg the number of attendants)

https://civicrm.org/extensions/allow-have-private-custom-fields-event-arent-displayed-info-page

check out the documentation, you have to give a specific name (starting with "private" to the group containing the fields you want to be hidden

---
Tags: activities, civievent
---


title: How Do IModify Report Criteria?

text:
# Question
Title: How Do IModify Report Criteria?
I am trying to customize a report (Contribute/Summary) to compute LAST YEAR "to date" totals (so I can compare them with how we are doing so far this year). I have created the new template/php files but am at a loss where to "subtract the one year" from the "current year-to-date field" before the query is done. Any pointers would be greatly appreciated. Thanks!

# Answer
You may want to first check out the Advanced Fundraising Reports extension before you go too far down that road - I think it has the option you want.

Second - I've been working on user-configurable date filters \- I'm hoping to get them into the next version of Civi, so you don't have to modify code to get a new filter.

Third - since you need this now and not later - you'll want to override one or both of these core files: CRM/Core/Form/Date.php CRM/Utils/Date.php (function relativeToAbsolute).
> 1 votes

---
Tags: civireport
---


title: Why can I not add relationships?

text:
# Question
Title: Why can I not add relationships?
Freshly installed on latest Wordpress, I am simply not able to add relationships to contacts.

I have created one contact of type ORGANIZATION and one of type INDIVIDUAL and no matter what I try, I can not create relationships between them. The dropdownbox always gives "Loading failed".

I replicated the install locally in a virtual machine and everything works as expected.

Also, I notice that the local install is faster than the non-local (bluehost shared, memory limit 200M).

# Answer
> 4 votes
You've correctly isolated the problem to your Bluehost server configuration - and also found that their shared hosting may not be up to your needs! You may want to get a VPS (I like Linode and Koumbit), or you may want to find shared hosting that can support CiviCRM (like CiviHosting). Your performance problems will only get worse as you increase the size of your database.

But back to your problem - check out this post to troubleshoot. My guess is that Bluehost has mod\_security or some php.ini setting that's causing an AJAX call to fail. This page will help you identify exactly what's failing. Note that if you're looking to move to another host anyway, this may not be worth your aggravation!

---
Tags: wordpress, relationships
---


# Question
Title: How can I lookup US county from latitude/longitude?
Does there exist an easy way to look up U.S. counties from latitude/longitude? I know about Mathieu's excellent Region Lookup extension, but since one postal code can encompass multiple counties, I'd like something more definitive.

I know that Google Maps lookups can give you county names - has anyone tried pulling that into CiviCRM on geocode lookup?

# Answer
I've never done it, but I think Tyrell's SmartyStreets extension provides it.

One thing to point out, however, for anyone who does it another way: county names repeat a lot, and the ID numbers of counties in CiviCRM are totally arbitrary, unlike states. The way to look up county is to find the state and then find the county name within the state.
> 3 votes

---
Tags: addresses, geocoding, county
---


title: What is Krumo, and why should I care?

text:
# Question
Title: What is Krumo, and why should I care?
What is Krumo, and when enabled, what does it do for a CiviCRM site?

# Answer
> 5 votes
Krumo is part of the Drupal Devel module. If you want to print out debugging statements in Drupal, you can put this line in your code:

```
dsm($myvariable);

```

It will print out the variable info with much more nicely-formatted HTML than just print\_r() or similar.

In CiviCRM, I don't use this - I prefer

require\_once 'CRM/Core/Error.php';

CRM\_Core\_Error::debug('variablename', $variablename).

There are variations on that available here: http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=33129619

Though this page seems to suggest that maybe the variations are deprecated.

---
Tags: debugging
---


# Question
Title: After upgrade to 4.6, should I get "No available releases found warning" in Reports->Available updates?
In the Drupal menu item "Reports-\>Available updates", I get the below. Is this normal or is there something I could / should do to fix this?

civicrm 4.6.0 No available releases found Includes: Enabled: CiviCRM, CiviCRM Contact Reference Field, CiviCRM Theme, CiviEngage, CiviGroup Roles Sync, CiviMember Roles Sync Disabled: CiviCRM OG Sync, CiviCRM Rules Integration

# Answer
> 4 votes
The 'no available releases found' is due to fact that CiviCRM is not distributed through Drupal.org's release infrastructure. The other enabled and disabled modules seem normal. If this doesn't address your concerns could you be more specific about what you are concerned about?

---
Tags: 4.6.0, upgrade
---


# Question
Title: What to do when upgrade to 4.6 failed, but rolling back breaks SMS?
When trying to upgrade to civi 4.6, the process does a partial upgrade and then errors out. Recovering previous version reveals SMS is no longer working. What should I do?

# Answer
Note that when reloading the database, it is a lot safer and cleaner to load the database dump into a newly created database. If you reload into an existing database, newly created tables will still exist, which fools the upgrade scripts
> 3 votes

# Answer
Thanks for adding a bit of detail about the error in your comment. FYI you can edit your question which is even more helpful. And in this case I'm hoping you can provide the exact error on the upgrade when you try to do it from a restored database and restored file system.

When rolling back you should likely carry out steps 9-13 and 16 at http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location. Can you provide more details of the errors you are experiencing after doing that?
> 2 votes

---
Tags: upgrade, sms
---


# Question
Title: Attempting to add a new Contact, why do I get this error message - 'Warning: htmlspecialchars() expects parameter 1 to be string'?
I'm getting this error message when attempting to add a new contact in Civi 4.6:

Warning: htmlspecialchars() expects parameter 1 to be string, object given in krumo::\_array() (line 1071 of /var/www/\[myCivisite.org\]/sites/all/modules/devel/krumo/class.krumo.php)

# Answer
> 1 votes
Eileen fixed the error, see the Jira issue at https://issues.civicrm.org/jira/browse/CRM-16287

---
Tags: debugging, 4.6.0
---


# Question
Title: How do I generate sql/civicrm_generated.mysql using bin/regen.sh file?
I am working on CRM-11369 bug. However, I was facing problems in generating sql/civicrm\_generated.mysql using bin/regen.sh file. The fifth line of bin/regen.sh file is 'source dirname $0/setup.conf'. But there is no setup.conf file in this folder. So I made a copy of bin/setup.conf.txt as bin/setup.conf and filled in the values for CIVISOURCEDIR, DBNAME, DBUSER and DBPASS. I'm still runnning into errors.

I get the following error:

bower *angular-jquery-dialog-service#civicrm resolve https://github.com/totten/angular-jquery-dialog-service.git#civicrm*

bower *retry Request to https://bower.herokuapp.com/packages/angular failed with ECONNRESET, retrying in 1.0s*

It would be great if someone could help me with this.

# Answer
Try:

```
cp bin/setup.conf.txt bin/setup.conf

```

Then edit and fill in appropriate values in the setup.conf file before trying to run regen.sh.
> 1 votes

---
Tags: sql, debugging
---


# Question
Title: Multiple Financial Types on one payment form?
Is there a way to specify multiple financial types on one contribution or registration form? For example, what would be the best way to set up a page that allowed a gala ticket purchase and also allowed sponsorship levels (if desired)? We can set up multiple price sets on a contribution form to allow the separate selection of a ticket and a sponsorship level, but they would all be the same financial type.

In this case, I suppose the best case would be to set up an event for the gala, allow registration including a few custom price sets, but to be able to break those extra (optional) donation/sponsorship items out as the 'Donation' (or 'Sponsorship') financial type rather than 'Event fee'.

Is anything like this possible?

# Answer
If you use price sets then each field, or each option on multiple option fields, can have its own financial type. Currently, event price sets support contributions (FWIW, membership price sets also support contributions, but it's not yet possible to have memberships and event tickets in the same price set).

The trouble you are having is the simplified price sets on the Fees tab all use the same financial type. Note that just above that simplified interface there is a link you can use to convert your existing options into a complex price set: 'Click *here* if you want to configure the Regular Fees below as part of a Price Set, with the added flexibility and complexity that entails.'
> 6 votes

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


# Question
Title: What are best practices around newsletter signup on contribution page, profiles and contact seeing their donation history?
I have a question about what the best way to set something up. I am using Drupal 7 and CiviCRM 4.6.

I have a contribution page, where I want to add people to a newsletter group when they make a donation. I know that there are urls in emails that go out that allow someone to come back and remove themselves from groups, but I would also like to have these users be able to find and edit their profile, see previous donations, etc.

Is there a way to do this just in CiviCRM? Do I have to create Drupal Users? I am currently trying to do everything with CiviCRM profiles, but would it be better to use Drupal webforms? What is your experience and what do you recommend as best practices?

Thanks in advance.

# Answer
You can do this by including a checksum link in your emails that returns the user to their contact dashboard and allow them to edit it.

You can also use a checksum link to a profile to let them update things.

it'd be something like the following

```
http://mydomain.org/civicrm/user?reset=1&cid={contact.contact_id}&{contact.checksum}

```
> 5 votes

---
Tags: profile, best-practice
---


# Question
Title: How to add "ACTION" Column in a custom Search?
I have a custom search extension for contacts. Search result shows by default "VIEW EDIT" option in "ACTION" Column.

How Can I bring the "MORE" option just like the one appears if I use built in Basic search function from Search menu?

Content of my customsearch.php

```
        <?php

class CRM_Guestsearch_Form_Search_Guestsearch extends CRM_Contact_Form_Search_Custom_Base implements CRM_Contact_Form_Search_Interface {

      function __construct(&$formValues) {
        parent::__construct($formValues);
      }

      function buildForm(&$form) {
        CRM_Utils_System::setTitle(ts('Recently Registered Guest (Unassigned)'));

        $form->assign('elements', array('name'));
      }

      function summary() {
        return NULL;
        // return array(
        //   'summary' => 'This is a summary',
        //   'total' => 50.0,
        // );
      }

      function &columns() {
        // return by reference
        $columns = array(
          ts('Contact Type') => 'contact_sub_type',
          ts('Name') => 'sort_name',
          ts('Phone') => 'phone',
          ts('Email') => 'email',
          ts('Date of visit') => CIVICRM_GUESTSEARCH_CUSTOM_COLUMN_NAME,
        );
        return $columns;
      }

      function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {

        return $this->sql($this->select(), $offset, $rowcount, null, $includeContactIDs, NULL);
      }

      function select() {
        return "
          contact_a.id                  as contact_id  ,
          contact_a.contact_sub_type    as contact_sub_type,
          contact_a.sort_name           as sort_name,
          phone.phone ,
          email.email  ,
          date.
        " . CIVICRM_GUESTSEARCH_CUSTOM_COLUMN_NAME;
      }

      function from() {
        return "
          FROM      civicrm_contact contact_a
          LEFT JOIN civicrm_activity_contact a ON (a.contact_id = contact_a.id)
          LEFT JOIN civicrm_phone phone ON (phone.contact_id = contact_a.id)
          LEFT JOIN civicrm_email email ON (email.contact_id = contact_a.id)
          LEFT JOIN " . CIVICRM_GUESTSEARCH_CUSTOM_TABLE_NAME . " date ON (date.entity_id = contact_a.id)
        ";
      }

      function where($includeContactIDs = false) {
        $params = array();

        $where = "contact_a.contact_sub_type = 'Guest' AND activity_id IS NULL ORDER BY date." . CIVICRM_GUESTSEARCH_CUSTOM_COLUMN_NAME . " ASC ";
            return $where;
          }

      function templateFile() {
        return 'CRM/Contact/Form/Search/Custom.tpl';
      }
    }

```

# Answer
The custom search interface does not implement an API for those actions as yet. I dont think those are hookable right now, but I suspect the best first step would be to modify the code (and submit the patch back) to make those actions hookable.

Once that is done, it should be relatively easy, for the custom search interface to expose the hook as an API
> 2 votes

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


# Question
Title: Can I auto update Civi data w/ data from my listserv?
has anyone integrated an email listserv with CiviCRM? It would be nice to

1. have a Civi group of 'advisors' and also a listserv, and when there are changes to subscriptions on the listserv, it is reflected in civi, and
2. to be able to store email messages from the listserv in civi (as activities).

I found this thread on the forum, where the answer is "no" http://forum.civicrm.org/index.php?topic=8681.0 (and I am using Wordpress so there's no option for using Drupal Organic Groups), but it's from 2009 so I thought I'd ask again to see if there have been any changes or work-arounds since then.

Any links to resources, guides, articles on how to sync this kind of data would be really helpful. Thanks!

Thanks! -Kristin

# Answer
Assuming you mean a discussion listserv, not an announcement listserv (which would allow you to use CiviMail, or Mailchimp/Constant Contact with the relevant integration extension), you have the option of Mailman integration. This method of Mailman integration requires that you have shell access on the Mailman server, but it works to sync your users from Civi to Mailman. So if you wanted someone to unsubscribe, they would use a Civi unsubscribe page, and it would remove them from a group, which would in turn cause them to be unsubscribed from the Mailman group.

Ideally this wouldn't require shell access, but unfortunately, most listserv software simply doesn't have an API. Mailman 3.0 will have an API, but that's been in development for many years. I'd considered at one point creating a CiviMailman integration module using PHP-Mailman, but at this rate Mailman 3.0 might be out first!
> 5 votes

# Answer
There was some work done syncing mailman groups to civi groups, documented here:

http://wiki.civicrm.org/confluence/display/CRMDOC/Mailman+synchronization

I faintly recollect someone trying / doing a sympa integration too. Both those integrations were at the group/contact level and not at the mailing archive level
> 1 votes

---
Tags: civimail, api
---


# Question
Title: How can I set up a BCC option for automated messages?
Our administrator wants to receive a copy of the expiration email Civi sends when an event registration has automatically expires (Message templates -\> System workflow messages -\> Events - Pending Registration Expiration Notice).

I am trying to figure out how to do this as a Civi user - not as a developer! I came across this discussion but can't quite understand what the status of this feature is at the moment:

http://forum.civicrm.org/index.php?topic=17872.0

Could someone help? (We are running CiviCRM 4.5.3 on Joomla! 3.3.3)

# Answer
> 1 votes
You could set up a second scheduled reminder for the membership and have it go to the administrator only. You could even customize the message to be more concise and provide information that he or she needs (like the contact's full name and a link to the contact record on the backend) but wouldn't naturally go in the email to the member.

Although this wouldn't be the precise email that the member receives, it'll be driven by the same process, and you can set the same timing for it.

# Answer
> 0 votes
Unfortunately, the thread doesn't indicate this is possible for a non-developer, and it would require some coding. We could do some custom code for you - email me at joe dot murray at jmaconsulting dot biz if you are interested.

---
Tags: civievent
---


# Question
Title: how do I best configure this complex event registration scheme?
My organization will be hosting a large conference in a couple of months. For this event, we need several kinds of participant roles. Some of these roles will have special conditions. I have laid them out below.

We'll need:

* Attendees
    + We'll need "early bird" and late registrations.
* Speakers
    + No fee for speakers
* Staff
    + No fee for staff
* Several vendor tiers
    + Platinum
        - Most expensive tier. Comes with 2 free registrations.
    + Gold
        - Less expensive tier. Comes with 2 free registrations.
    + Silver
        - Less expensive tier. Comes with 1 free registration.
    + Bronze
        - Least expensive tier. Comes with 1 free registration.

We're also offering a banquet during this event. Each registrant needs the option to be able to bring +1 to the banquet for an extra fee.

How can I go about creating this registration scheme?

# Answer
I would approach this roughly as follows:

Early bird registration fees can be handled either through the standard pricing options or using a price set. given that you want to have the additional banquet option using a price set would be the way to go, and simply set the start and end dates for your price fields accordingly.

All of the participant roles that you have defined can be handled in one of two ways: Either register all of these people via the back end so that you have control over whether they pay or not. Or, if you want them to register themselves through the website then set up suitable discount codes (using the CiviDiscount extension) and distribute those codes accordingly.
> 5 votes

# Answer
We have just done something similar using price sets, CiviDiscount and Fancy Participant Listing to pull detailed results per option. We haven't used php or css to do anything to pretty up the booking form or show/hide options etc. If you have the skillset that would be infinitely better. We are using Drupal 6.

Our event is over three days with conference sessions, exhibition, and two gala evenings. We invite Members and Suppliers (exhibitors and sponsors). Members get one sponsored delegate per member institution, suppliers get a mix of freebies dependant on whether they are Platinum, Gold etc.

We found it easier to create three 'events' and registration forms

1. Register to exhibit (book your stand/booth)
2. Register to attend as a supplier delegate
3. Register to attend as an exhibitor delegate

**Attendees:** Options for early bird and standard prices. We opted to show both but you can choose to enable/disable them as appropriate. We issue CiviDiscount codes to cater for the sponsored delegates.

**Speakers, staff and Committee members**: We issue CiviDiscount codes.

**Special arrangements**: We created admin only options accessible by staff and committee volunteers via the backend for the inevitable 'special' arrangement someone needs but you don't want everyone to know about.

**Exhibitors and sponsors**: we use CiviDiscount to provide free or reduced fees.

Fancy Participant Listing is invaluable in helping us pull the data out of Civi into a (somewhat complex) Master Spreadsheet that ties into the event budget, rooming lists, flights info, numbers of delegates per event etc.
> 3 votes

# Answer
I've (finally) had some time to work a bit more on this issue and I've managed to get the registration scheme pretty close to how I'd like for it to work.

I've set it up using price sets. I created 3 radio fields, each one containing:

* Attendee
* Platinum Vendor
* Gold Vendor
* Silver Vendor
* Bronze Vendor

One radio set is for Early bird, one for regular registration, and one for late registration.

I created a single checkbox field for inviting an extra banquet guest, and included a profile containing a "Participant Role" field.

I'm using hook\_civicrm\_buildAmount to insert JavaScript and alter the event prices. I use JS to hide the "Participant Role" field, and change it to the appropriate value when the user selects an option from the price set.

So if a user selects any of the vendor options, JS sets the value of the "Participant Role" field to "Vendor". I also set and hide the "Register Additional Participants" field based on the selected value.

I then use hook\_civicrm\_buildAmount to hide vendor options for additional participants. If the initial user selected either "Platinum" or "Gold" vendor, I set the "Attendee" price to $0.00.

Our administrative assistant will be registering volunteers, speakers, and staff manually.

I've still got a kink or two to work out in terms of flow control, but this will suit my needs.
> 3 votes

# Answer
This is how I would go about it...

**Attendees:** "early bird" and late registrations handled through a price set or just price options. This is standard CiviCRM as mentioned by Graham. No sign-in required.

**Speakers & Staff:** I would assign speakers and staff logins and have them login to access their no-charge registration option. I would use a little PHP/jQuery to customize the event registration page to allow for this. If they are logged in, show the Speakers & Staff rate, if not don't.

**provide the 2 free registrations for sponsors:** It looks to me like this could be dealt with inside of the price set as well. I would create a field for the price set called "sponsorship" or something else that makes sense. I'd probably use radio buttons and create several entries for Gold, Silver, Bronze, etc... and I would set the participant count to 2.

***Note:*** *I haven't tested the 2 free registration part so that might need some tuning up.*
> 2 votes

---
Tags: civievent, registration
---


# Question
Title: How do I search for contacts with no contributions?
Is there a non-code way to search for contacts with no contributions recorded?

(A search in search builder will only result in contact with contributions with null values, which is not the same as no contributions at all.)

It could be a search, or a report, or even an extension. But how do you find contacts with no contributions?

# Answer
> 10 votes
You can do it in two steps:

* Search for all contacts, and put these in a tag (or group).
* Do a second search, for all contacts WITH a donation. And then remove these from you tag (or group) using action `Untag Contact` (or `Remove contact from group`).

# Answer
> 7 votes
Adding the Summary Fields extension is the way to go. Use Advanced Search to find contacts with zero lifetime donations to create a smart group or list of people who have never given. Subsequent donations from those contacts will automatically remove them from the smart group.

If you are interested in finding people who have given at some point, but not since a specific date, you use Advanced Search and Summary Fields to exclude anyone who has a non zero life time contribution, but who's last contribution was before your cutoff. Here's an example of the search entries.

You can get the summary fields extension by installing from Administer \> System Settings \> Manage Extensions, and can find more information about it at https://civicrm.org/extensions/summary-fields

# Answer
> 4 votes
Summary Fields is a very cool extension that can do what you're talking about.

Once you set it up, you can search by many aggregate parameters including "total lifetime contributions".

# Answer
> 4 votes
For contacts with no gifts *ever*, use Search Builder. Include contacts where \>Contribution \> Contribution ID \> Is Null.

For contacts who didn't give within a specific timeframe, I can only come up with one front-end way. It's kludgy but may get the job done. Create a custom text field for contacts, let's call it "Special Use". Create a group that includes all contacts who gave before OR after the timeframe. Use Batch Update via Profile to edit all contacts in this group, setting the text of Special Use to "Exclude". Now use Search Builder to look for contacts where \>Contact \> Special Use \> Is Empty (or Is Null). Not pretty at all, but no code required.

It would be nice if Search Builder had a NOT option, so we could exclude people who meet certain criteria. Or if we could use CiviMail's Include/Exclude group functionality to build our list and save the result as a new group without actually sending the email (like Raiser's Edge users do with the Quick Letters feature). Maybe one day!

# Answer
> 2 votes
I know you said "no code", buuuut... just in case anyone else might be wondering, here's the SQL that would do it (including the date range you mentioned in your comment)

```
select
  contact.id,
  contact.display_name
from civicrm_contact as contact
left join civicrm_contribution as contrib on
  contrib.contact_id = contact.id and
  contrib.receive_date between '2015-01-15' and '2015-02-15'
where
  contrib.id is null;

```

Building a custom search from a query like this is actually one of the easier types of customizations to make.

Or if you're in a pinch, you could use an application like MySQL Workbench to run this code and inspect the results through a nice visual interface.

---
Tags: contributions, civireport, search
---


# Question
Title: Smart group with manually added contacts
A smart group is a result of a search. The contacts in the group change dynamically depending on the criteria.

Though, I have several use cases where i want to be able to force some contacts in the group even if they don't meet the criteria in the search. For example, i want to send a newsletter to people that subscribe but also automatically to members.

It seems to be possible to manually add some people to a smart group like if it were a standard group. But is it a good practice ? Is there any known caveat ?

# Answer
> 8 votes
You should think of a smart group as two parts:

* A static group (and all the tables it involves)
* A query and its associated tables

The final list of contacts is the union of the above two (minus the contacts who have been explicitly removed from the static group)

I think the above design allows a lot of flexibility and power. I think the main issue with smart groups is being smart about when and how to cache the results. Civi does a fairly basic job of this right now and can be improved considerably (IMO)

# Answer
> 4 votes
You can also create a smart group based on other regular groups and other smart groups. This works well unless the smart group criteria is edited.

In general you can go about 4 levels before nesting causes performance issues.

I agree, I avoid adding users directly to smart groups.

# Answer
> 3 votes
I think manually adding contacts to a smart group is confusing, and this is what we experience with some of our customers.

# Answer
> 2 votes
Not sure if it's a good practice but here what i did to avoid manually adding contacts to a smart group.

I have 2 groups :

* one standard group `followers` to manually add contact to the list. This group is a mailing list.
* one smart group `member followers` that contains all active members. This group is a child of the standard `followers` group.

This way, the `followers` group inherit from contacts in the group `member followers`.

---
Tags: best-practice, groups
---


# Question
Title: How do I use the API to access protected custom data in a hook?
I have custom data for events that is not visible to anonymous users (it's for internal use only).

I want to access that data from my implementation of hook\_civicrm\_post().

When I call the API "get" from within the hook, the API doesn't return this custom data, since it's protected.

I guess I want my implementation of the hook to run as if it's a logged in user. How do I do that within the hook, but not in a way that opens up visibility once the hook completes running?

Here's a cut-down sample of my code, where 'custom\_25' is the custom field which is not returned as part of $event ...

```
function xxxxxx_civicrm_post( $op, $objectName, $id, &$params )
{
  if ($objectName == 'Participant') {
    switch ($op) {
      case 'create':
        $event = civicrm_api3('Event', 'get', array(
            'sequential' => 1,
            'return' => 'custom_25',
            'id' => $params->event_id,
        ));
        break;
    }
  }
}

```

# Answer
I followed @xavier's answer, but I'm posting what I did in case it's useful to others.

See the code below. The '25' is a magic number for this Custom Field, and can be found using the CiviCRM API Explorer. The foreach loop finds the right result among those returned (even though I specify Custom Field '25' I get results for other fields).

```
function xxxxxx_civicrm_post( $op, $objectName, $id, &$params )
{
  if ($objectName == 'Participant') {
    switch ($op) {
      case 'create':
        $custom_values = civicrm_api3('CustomValue', 'get', array(
            'sequential' => 1,
            'entity_id' => $params->event_id,
            'entity_table' => 'civicrm_event',
            'id' => 25,
        ));

        $id = null;
        foreach ($custom_values['values'] as $custom_value) {
          if (isset($custom_value['latest'])
              && isset($custom_value['id'])
              && $custom_value['id'] = '25') {
            $id = (int) $custom_value['latest'];
            break;
          }
        }

        if ( ! isset($id) ) {
          break;
        }

        /* Use the $id */
        break;
    }
  }
}

```
> 4 votes

# Answer
By default, any api call in php doesn't take into account the permission (, so not being able to access that custom data might be another issue. Can you publish the code you are using? You mention the post\_hook, so I'm assuming it's in php?

http://wiki.civicrm.org/confluence/display/CRMDOC/API+Security

You should use the CustomValue API to fetch the custom field, it might be an issue with the Event api that doesn't work with custom\_xxx format

http://wiki.civicrm.org/confluence/display/CRMDOC/Using+Custom+Data+with+the+API
> 2 votes

---
Tags: api, hooks, permissions
---


# Question
Title: Is there a checklist for setting up a new organization's website + CRM?
I'm meeting with an organization later this week to begin the process of seeing them up on civiCRM and a Drupal website. Curious any of the people who does this regularly if you have a document that helps you cover all the information you need to obtain in order to get things started? Would you mind sharing it with me so that i can make sure this goes as smoothly as possible?

# Answer
> 5 votes
Palante Tech has been building an internal document for this, but we haven't devoted much time to fleshing it out - it's more a "list of questions we wished we'd remembered to ask" and doesn't get into the important questions, like "What is this for? Who will be using it?" Nevertheless, here is our work-in-progress:

## All projects

* How much traffic does your site currently get, per Google Analytics/Piwik/etc.?
* Where is your site hosted? Are you open/eager to moving your hosting?
* Who currently manages your website?
* Will there need to be multiple levels of permissions? How granular/how many?

## CiviCRM projects

* How many contacts do you anticipate having on day 1? How many contacts do you intend to add per month/year?
* What features of CiviCRM do you intend to use? Donation management, mass e-mails, membership management, etc.? Is a particular use driving the project?
* \[If CiviMail\] What sort of mail volume are you doing in your legacy system?
* What are your legacy data sources? How many Excel/Google Docs/etc.?

# Answer
> 2 votes
Have you reviewed this section in the online User and Admin Guide: http://book.civicrm.org/user/current/getting-prepared/identifying-your-needs/

Seems like a good start at least.

You also might check out this session video from CiviCon: Introduction & Transitioning to CiviCRM

# Answer
> 1 votes
If we had such a thing we would certainly share it, but we do not. I think the needs of starting organizations vary from project to project, although there are certainly some standard tasks. But the devil is in the detail, and that tends to differ from project to project.

---
Tags: best-practice, civicrm-home
---


# Question
Title: Changing CiviCRM Site Key in the civicrm.settings.php file
We have developed a white label Drupal and CiviCRM installation which we plan to use to launch a new server. When changing over I usually change the settings files to match the new database settings. However, I have noticed that the CiviCRM Site key also need to be changed. How can I go about doing this or is this not possible? THanks.

# Answer
> 3 votes
Changing the site key will break a few things. How many of these are important is up to you, but at least: \- every rest interface that connects to the site to read or write (you might not have any) \- any hash (eg. link to update preferences). this might not be an issue if the domain name changes too \- anything that is saved encrypted (eg. the password for the smtp connection).

search the code base for CIVICRM\_SITE\_KEY to have a complete list.

This being said, the easiest is probably simply to change and wait for a while to see if it breaks any of the features YOU use.

The value of the key itself doesn't matter, as long as it's hard to guess and long enough. The setup process generates it that way:

```
md5(uniqid('', TRUE) . $params['baseURL'])

```

so a random hash of 32 characters

---
Tags: civicrm-home
---


# Question
Title: After creating my extension, what is the root for my new tab?
1- I create a plugin with my hook :

function wordpress\_civicrm\_tabs( &$tabs, $contactID ) { // unset the contribition tab, i.e. remove it from the page //unset( $tabs\[1\] );

```
// let's add a new "contribution" tab with a different name and put it last
// this is just a demo, in the real world, you would create a url which would
// return an html snippet etc.

$url = CRM_Utils_System::url('civicrm/order',"reset=1&snippet=json&force=1&cid=$contactID" );
$tabs[] = array( 'id'    => 'orderTab',
                 'url'   => $url,
                 'title' => 'Orders',
                 'weight' => 1 );

```

}

With this function I added a new tab.

2- I enter in Administer/System Settings/Directory the location of my extension ..wp-content\plugins\ccbc\_order\_tab\ccbc.order\

3- I use civix to create my extension ccbc.order and in my folder I create a page:order

4.- My order.xml created in xml/Menu/order.xml it shows:

civicrm/order CRM\_Order\_Page\_Order Order access CiviCRM

5- at the moment my page redirects to CRM/Contact/Dashboard.tpl.

Please can you help, what settings I missed?

Thank You

Nilda

# Answer
It appears you are confused about the difference between a CiviCRM Extension and a WordPress Plugin.

I would recommend you to write a native CiviCRM extension and enable it from the civicrm/administer page (you might need to set up the extension directory path first).

If you generate an extension with civix, it will take care of reading the xml to handle the url of the page you created and all the stuff you'd need to support your custom tab
> 3 votes

# Answer
Have you done a clearcache (/civicrm/clearcache)?
> -1 votes

---
Tags: extension
---


# Question
Title: Does CiviCRM fulfil our charity's requirements?
I work for a very small UK-based homeless charity. We work alongside a similar organisation, and are looking to share information on a cloud based database. I work from home on a Mac, and the other charity work from an office on PCs.

What we want from a database is -

* to be able to each of us access it at any given time from our own machines (mixed OS and location)
* to record basic client information such as name, age, gender etc and also reasons for homelessness, case outcomes, blacklisted clients etc
* to access simple reports for the purposes of these applications

Currently this information is held on an Microsoft Excel spreadsheet.

I also apply for various grants and funding, hence the requirement for reports.

Do you think that Civicrm would meet our requirements?

Thanks

# Answer
Yes. Specifically:

* CiviCRM is a web-app and therefore works equally well on OS X and Windows.
* CiviCRM has a case-management feature which incidentally was originally designed for homelessness services.
* There is a grant tracking feature but this is intended for organizations *giving* grants not receiving them. However CiviCase may be adequate for your grant tracking needs.
* Information like "reason for homelessness" can be stored in custom fields - you can create as many of these as you need.
* You can import records to CiviCRM from spreadsheets (specifically from the .csv format, which Excel can save as)
> 9 votes

# Answer
You might consider avoiding the the server setup and maintenance tasks by using a specialized CiviCRM hosting provider:

https://civicrm.org/providers/hosting
> 4 votes

# Answer
CiviCRM will cover your needs and more.

As a web-based application it is available to any authorised user with a browser and a connection.

I would encourage you to read through the the section of the online user guide at http://book.civicrm.org/user/current/getting-prepared/is-civicrm-for-you/ which you may find helpful.

My only concern here is that CiviCRM - much as I love working with it - may be too powerful/feature-rich/complex for your "very small charity", and that you might end up spending more time and or money than you need to right now.

My advice would be to talk to one of the professional implementers (people like me) - here's a relevant list to get a better assessment of what you need to be able to achieve, and whether the cost benefit of CiviCRM is a good fit for your organisation.
> 3 votes

# Answer
I'm sorry, but I have to be a bit of a downer here. I also work / collaborate with a small NGO called Engineers Without Borders Galicia. I have a college degree in computer engineering so I'm quite tech-savvy.

I'm currently migrating our system also from an excel spreadsheet to CiviCRM, so I'm doing what you plan to do. And here is my experience :

* CiviCRM is, at best , in beta status. I'm sorry to say it, but it's got quite a few bugs. And the support is not exactly big.
* Documentation needs A LOT of improvement. And I really mean A LOT. It's not easy for a CiviCRM newbie and I have found that in many cases it was outdated or it was directly wrong.
* You are going to need a server to put CiviCRM. Bare in mind that it's a fixed cost in money every month. Yeah, it's gonna provide you a much powerful tool than an excel spreadsheet, but it comes at a cost.
* If you have to configure everything in the server (installing apache, mysql, php and then configure all of them) that it's certainly not an easy task. You better know what you are doing or hire someone that knows what he/she is doing.

And finally my conclusion.... GIVE IT A CHANCE. Even with all the criticism I have with CiviCRM I'm not giving up on this project. My organization (and me personally) is a firm believer in free software. If some things are wrong (and they are) free software gives us a chance to improve them. And I'm willing to help.

Please take this criticism as a constructive way of improving.

Iván Lago
> 2 votes

# Answer
CiviCRM has precisely everything that you wrote. You can export your data from Excel in CSV format and import into CiviCRM.

Then all the features you need are built in.
> 1 votes

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


# Question
Title: How do you change the default status message that shows when one submits a profile form?
At the moment it says 'Thank you. Your information has been saved' after one submits a form. I can't work out where to change this.

Any ideas?

# Answer
> 2 votes
This message is hardcoded in CRM/Profile/Form/Edit.php, so you would need to modify that.

# Answer
> 1 votes
You might be able to use the Word Replacements functionality to change this.

---
Tags: profile, forms
---


title: Why can't I export my report to pdf?

text:
# Question
Title: Why can't I export my report to pdf?
I have a problem (well, in fact, more than one Why can't I export a Contact Detail report to CSV?) with civiReport. I can't export my contact report to pdf.

At first, when I clicked I only got a white screen (white screen of dead) and nothing happened. Then I found this...

http://forum.civicrm.org/index.php?topic=24422.0

... so I changed memory limit value both in php.ini and civicrm settings to 512M. I have also increased max execution time , just in case. Nothing happens. It simply waits "loading" until max execution time runs off (and it's 300 seconds).

So I don't know what else I can do. Please, help :( .

Iván Lago

IT Engineer at Engineers Without Borders Galicia

More info:

Server version: Apache/2.2.22 (Debian)

CMS: Drupal 7.36

CiviCRM version:4.6.0

PHP: 5.4.39-0+deb7u2

MySQL: 5.5.41-0+wheezy1

# Answer
There are a number of reasons PDFs from reports can crash. It's usually a matter of running out of memory, but that's not exclusively a hosting problem. If you have a really big report with tons of pages and tons of columns, that can cause problems when a 4- or 5-page report displays easily. Remember: when you view the report, you're only seeing one page's worth; when you're sending it to PDF, you're rendering all the pages at once.

You should probably try installing wkhtmltopdf, which runs a headless WebKit on your server to generate a PDF. CiviCRM has built-in support for it; it's just not the default because it doesn't assume you can install additional software on the server.

Once you've installed it (there's a package for Debian wheezy), just go in CiviCRM to Administer \> System Settings \> Misc and tell it where to find wkhtmltopdf on your system.
> 3 votes

---
Tags: civireport, 4.6.0, php
---


# Question
Title: Is it possible to add contribution note when renewing membership in (one of) the next release?
I ran into this problem for a client who needs to specify, when renewing a membership, the bank name.

So I decided to store this value into contribution note, but when renewing, this field does not appears in the form.

I added this on line 409 of CRM\_Member\_Form\_MembershipRenewal.php

```
   $this->add('text', 'contribution_note', ts('Note'),
    CRM_Core_DAO::getAttribute('CRM_Core_DAO_Note', 'note')
  );

```

And this on line 730 of CRM\_Member\_Form\_MembershipRenewal.php

```
$note = new CRM_Core_DAO_Note();
$note->entity_table = 'civicrm_contribution';
$note->entity_id = $temporaryParams['contribution_id'];
$note->note = $formValues['contribution_note'];
$note->contact_id = $formValues['contact_id'];
$note->modified_date = CRM_Utils_Date::getToday();
$note->privacy = 0;
$note->save();

```

Here is the .tpl modification on line 176

```
<tr id="contributionNote" class="crm-member-membershiprenew-form-block-contribution_note">
<td class="label">{$form.contribution_note.label}</td>
<td>{$form.contribution_note.html}</td>
</tr>

```

# Answer
> 1 votes
I would advise you to avoid changing the core files (php or template). You should write an extension that adds the field (in the buildform hook) and save it whilst processing the form.

However, It might be better to use other ways to save that information. The financial type for instance where you can create several, based on the bank (assuming it's the client bank) or use the check number or source (both existing fields in the contribution) if it's an information about the member's bank.

---
Tags: contributions
---


# Question
Title: Where do I found the "form action" call in TPLs to an Event?
I need to add a target attribute to the "form action" tag of an Event Registration form, because I need the Confirmation to open in a new window.

I'm trying to find the TPL file that inserts the "form action" tag, but I couldn't find it already. So, where is it?

Thanks.

# Answer
Most / All forms inherit the form code from:

templates/CRM/Form/default.tpl

I dont think you should modify that. However, the form tag also emits all attributes attached to the form. So your best bet will be to add an attribute to the form object in the buildForm hook for event registration. There is a method call on the form object to add an attribute:

$form-\>updateAttributes()

lobo
> 2 votes

---
Tags: civievent, custom-templates
---


# Question
Title: How To Migrate CiviCRM From Wordpress To Drupal?
We are using CiviCRM with Wordpress and would like to switch it to Drupal. I have created a fresh Drupal/CiviCRM install and gave CiviCRM it's own database. How do I go about transferring the data from the old Wordpress site to the new Drupal site?

# Answer
> 5 votes
Assuming that a) you gave CiviCRM a separate database under Wordpress, and b) you installed the same version of CiviCRM under Drupal:

* Dump the current CiviCRM database to a .sql file.
* Load that database into Drupal.
* Review "Moving an Existing Installation to a New Server or Location" for relevant details regarding deleting caches etc.
* Delete all the entries out of the `civicrm_uf_match` table in the CiviCRM database (while logged in as user 1).
* Go to **Administer menu \> Users and Permissions \> Synchronize Users to Contacts**.

That should repopulate your `civicrm_uf_match` table and thus connect your Drupal users to contacts. Log out and log in again (in a different browser) to make sure everything looks good - and clear your caches again!

---
Tags: wordpress, drupal
---


# Question
Title: How to change membership type parameters to effect a revised end date
I'm working with an organisation which is changing their membership cycle. Originally the membership type was fixed and annual and we had a start date of April 1. Consequently the vast bulk of the members have a membership end date of March 31.

The organisation now wants to move to a calendar year cycle, still fixed, but with a start date of Jan 1.

I made the change to the membership type, and it appears to be working as expected for new membership sign-ups. Renewing members on the other hand still seem to be getting renewed through to March 31 of the following year, indicating that the renewal process is looking only at the duration and not the start date.

This is creating confusion, as although we are telling members of the change in the membership cycle, they are still getting receipts that show their new end date as March 31 as opposed to December 31.

I can't see how I could alter the membership type so that renewing members get renewed through to December 31.

What's the correct approach in this scenario?

# Answer
Hmmm not too sure about this @Graham, memberships is not entirely my field of expertise. Is this a case of a change at one date (as I suspect) or does the data need to change over the year? If it is a one time change you might try in a test environment to change the data in the civicrm\_membership table and see if that works?
> 1 votes

---
Tags: civimember
---


# Question
Title: How do I configure the duration of the checksum links?
Is there a way to configure the duration of the checksum links used when sending a mail - either globally or using a specific parameter in the token ?

I can't find any documentation on this but i'm pretty sure it's doable.

# Answer
The setting you're looking for is here: **Administer menu \> System Settings \> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)**

The second option is "checksum lifespan".
> 6 votes

---
Tags: civimail, tokens
---


# Question
Title: How can we increase the number of events displayed when creating Joomla menu link?
We host 100+ events per year. We create a Joomla menu link to each event, but only 25 events are available to be selected. Which file contains the limiting variable?

We are using CiviCRM 3.4.5 on Joomla 1.5.2.

# Answer
> 3 votes
Wow, blast from the past! I actually remember this bug: https://issues.civicrm.org/jira/browse/CRM-8620

It should, by default, show only the upcoming events. This may not solve your entire problem, since you may have dozens of upcoming events, but at least the past events shouldn't clutter you up: upgrading to 3.4.8 should help you.

Now, for a thousand reasons, you *really* should migrate to a current Joomla version and upgrade to CiviCRM 4.6.1. That's a tall order at this point, since you've got years of deferred maintenance, but you should at the very least get yourself up to Joomla 1.5.26 and CiviCRM 3.4.8 as soon as possible. The Joomla code is so old that it's on a "legacy" download page. CiviCRM 3.4.8 can be downloaded from SourceForge.

It's vital to keep your system up-to-date. Regardless of what you do about this issue or doing a point-release upgrade of CiviCRM and Joomla, you should make plans now for migrating to a new website (there's no direct upgrade path from Joomla 1.5.x) and moving and upgrading your CiviCRM database there.

---
Tags: civievent, joomla
---


# Question
Title: How do I prepare for Developer Training in Denver?
I am signed up for the developer training in Denver. What do I need to bring to the training? Is there anything I should study before the training?

# Answer
> 2 votes
I'm going to be starting here at the developer wiki - http://wiki.civicrm.org/confluence/display/CRMDOC/Develop

and continuing here - http://wiki.civicrm.org/confluence/display/CRMDOC/GitHub+for+CiviCRM

and I might just buy the book here, though it may be out of date- http://www.amazon.com/Using-CiviCRM-Joseph-Murray/dp/1849512264

# Answer
> 1 votes
You need a wifi enabled laptop. Beyond that, I would see what your instructors recommend. @Joe McLaughlin's suggestions for prepping the machine and doing a bit of github stuff for a core commit are good ideas.

While I appreciate the advertising for our book (thanks, Joe!), it was focussed solely on non-developers, so it's not that relevant to the developers course. FWIW, Brian and I are working on a new revision based on 4.6.

---
Tags: developer
---


# Question
Title: How do I distribute CiviSurvey by email, and then analyze the results?
Can somebody help me to answer these following questions or refer me to some source to find out the answer:

1. I've created a survey by creating the custom fields and custom data. How do I get this survey distributed to people on my database i.e how do I email the survey link to targeted respondents?
2. If the survey can be emailed to them, are their answers automatically recorded on their account/profile?
3. In the report feature we can see answers of individual respondents. But does civiSurvey provide analysis capabilities such as counting percentage of the people choosing a, b, c for a specific question? If yes, where do we get that information?

# Answer
> 5 votes
Although you're putting together a survey, the CiviCRM tool you'll want to use is the Profile. Create a new profile with the custom fields along with any standard ones you want to include.

You'll then want to send an email with an automatically-personalized link to the profile--that way, everyone's responses will go on his or her own contact record without having to log in. The full directions are here (follow the directions for Profile): https://aghstrategies.com/content/how-create-one-click-personalized-links-civicrm-emails

The analysis capabilities in CiviCRM reports are kind of crude, but you'll be able to export the results into a spreadsheet and do any kind of statistics you need.

A note about "surveys": this use case is collecting information into custom fields on the contact record, so that's a natural use for a profile in "edit" mode. There is a feature in CiviCampaign called "survey" that is oriented toward collecting information through phone interviews or door-knocking. You'll have the fields on the contact and/or the activity, and interviewers will fill it in.

---
Tags: civireport, civisurvey, civipetiton
---


# Question
Title: Why can't I export a Contact Detail report to CSV?
I have a problem with civireport. Since I've created and saved one report I can't export it anymore to csv. First, the export to csv was missing. I've tried this...

http://forum.civicrm.org/index.php?topic=22773.0

...but nothing happened. Then I tried this...

http://forum.civicrm.org/index.php?topic=17001.0

...which gave me back the export to csv button, but now, when I click it , I only get a 288 bytes CSV . There's no data at all. I've also found this ...

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

...but as you can see it was closed without fixing.

I really need to get this fixed. My organization NEEDS the export report functionality.

Iván Lago

IT Engineer at Engineers Without Borders Galicia

More info:

Server version: Apache/2.2.22 (Debian)

CMS: Drupal 7.36

CiviCRM version:4.6.0

PHP: 5.4.39-0+deb7u2

MySQL: 5.5.41-0+wheezy1

# Answer
The report you are trying to export (Contact Detail) does not currently support that feature. That particular report presents a variety of information that does not lend itself easily to be represented in a single spreadsheet.

You could use a similar report, such as Contact Summary, and export that.

Or you could use your programming expertise and creativity to find a way to make that report generate an exportable spreadsheet.

CiviCRM is an open-source project and new features come from community contributions of code or funding. The issue you referenced was closed due to lack of participation. Community members such as yourself could change this by stepping up to make it happen.
> 5 votes

# Answer
I have just checked on the demo side. The csv button is not available by design as the report is not a straightforward table design like the summary report. If you want to you can set the class property of the report to TRUE. Find the spot for this bit of code:

```
$this->_csvSupported = FALSE;

```

and change it to

```
$this->_csvSupported = TRUE;

```

That will show up the CSV button, although I reckon the CSV output will not be great.

Looks like the PDF button is a bug, can you check on the issue tracker if it is a known one? issue trackker
> 2 votes

---
Tags: civireport, 4.6.0
---


# Question
Title: CiviMember - How to find members that are in a specified group
Under the Memberships menu, when I try to search for members using "Find Membership" the search options do not allow me to search for members that are within a specific group. I can search per project and other criteria, but it is important for me to have the option to search within a group. Can this be done by some custom hook/coding?

I am currently running CiviCRM 4.5.3 on Wordpress.

# Answer
using advanced search, you can build your own combination of criteria (so you can search contacts on a group AND with specific membership).

By default, it will list the contacts (that belong to that group and have a membership) but (top right corner) you can as well display the result as a list of memberships too
> 2 votes

---
Tags: civicontribute
---


title: Saving Advanced Searches for later use

text:
# Question
Title: Saving Advanced Searches for later use
Can advanced searches be saved for later use and made to appear in the Search menu, so users dont need to enter the search criteria every time? Similar to how custom reports can be created once and added as a menu item under Search?

regards Sudesh

# Answer
> 5 votes
You can save the result of an advanced Search as a Smart Group. If you want a link to that smart group in the menu, you can add a menu option for it with **Administer \> Customize Data and Screens \> Navigation Menu**.

---
Tags: search
---


# Question
Title: How does WP BuddyPress integrate with CiviCRM Members?
I read from Tim Otten on this stack that "WP BuddyPress is a substantial system which has an upcoming Civi integration." Could someone tell me more about it ? I am on the verge to install BuddyPress because it seems easier to use but I want my data to integrate to CiviCRM in any case. Is it possible now or will it be and when ?

# Answer
I believe it's related to this post: https://civicrm.org/blogs/haystack/working-civicrm-46-wordpress that also notes the BuddyPress Groups Sync: https://wordpress.org/plugins/bp-groups-civicrm-sync/
> 5 votes

---
Tags: wordpress, civimember, buddypress
---


# Question
Title: How do I set the time zones in order to correct mismatched Timestamps for MySQL and PHP?
I currently have a warning on Environment settings. Timestamps reported by MySQL and PHP are mismatched.

# Answer
> 6 votes
The warning is because the timezone of the server does not match with the timezone set in MySQL. We had similar warning and after setting the timezone in both Centos & MySQL, the warning is not displayed anymore.

# Additional Info:

This is how we corrected/fixed the timezones, if it helps. The below instructions are for setting timezone to GMT, you need to use your timezone if you want to use the below instructions.

**Setting the timezone in CentOS**

Check the date and timezone

```
[root@my-server ~]# date
Mon Nov 24 10:27:14 CET 2014

```

The above is incorrect. We need to set GMT for Europe/London

Fix the timezone

```
[root@my-server ~]# rm /etc/localtime
[root@my-server ~]# ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

```

Now check the date and timezone again

```
[root@my-server ~]# date
Mon Nov 24 09:30:14 GMT 2014

```

**Setting the timezone in MySQL**

Check the timezone in MySQL

```
mysql> SELECT @@global.time_zone;
+-----------------------------+
| @@global.time_zone          |
+-----------------------------+
| SYSTEM                      |
+-----------------------------+
1 row in set (0.00 sec)

```

Set timezone '+00:00' for GMT

```
mysql> SET GLOBAL time_zone = '+00:00';
Query OK, 0 rows affected (0.00 sec)

```

Now check the timezone again in MysSQL

```
mysql> SELECT @@global.time_zone;
+-----------------------------+
| @@global.time_zone          |
+-----------------------------+
| +00:00                      |
+-----------------------------+
1 row in set (0.00 sec)

```

# Answer
> 3 votes
In my experience with this, you can modify the default timezone setting for your CMS. Not sure how to do this in Joomla, but there are UI options for this in both Wordpress and Drupal so I would imagine that Joomla offers a similar setting.

---
Tags: joomla, error, timezone, timestamp
---


# Question
Title: How to show CiviCRM menu for non admin role using WordPress?
Using WP4.1.1 and Civi4.5.8

How do we display a menu for a non Admin WP role? We created a new role in WP for CiviUsers and would like to display the top Civi menu like Admins get. THANKS.

# Answer
If I am understanding correctly you wanting other roles to access CiviCRM menu, which is linked to the WordPress Access Control and giving that role CiviCRM: access CiviCRM. You would then have to give them the access to whatever other features are needed. These settings are in Administer \> User and Permissions \> Permissions (Access Control) and select WordPress Access Control.
> 3 votes

---
Tags: wordpress
---


title: CiviEvent - changing an event's creator

text:
# Question
Title: CiviEvent - changing an event's creator
I'm adding new users with limited permissions to an existing CiviCRM site (Drupal 7 / CiviCRM 4.4.7). These users will be allowed to create events, but not edit others' events.

However, there are already events in the site, all created by the same account. I would like to be able to change the creator's id for these events, so that they can be assigned to various new user accounts.

My guess is that the field for this in the database is "created\_id" in the "civicrm\_event" table. But is there a way to change an event's organiser from the CiviCRM interface?

# Answer
You're correct about "created\_id", but I'm 99% sure there's no way to update this from the CiviCRM UI. However, you COULD update it from the API Explorer: **Help menu \> Developer \> API Explorer**.
> 3 votes

---
Tags: civievent
---


# Question
Title: Can I use autocomplete to add users in a webform (they might be existing contacts)?
I want to provide a screen for users to add some information about contacts (including custom info). Some of the contacts will be existing contacts, but some will be new. An autocomplete box would be ideal, similar to that used for creating a new contribution. It doesn't appear that this is possible for profiles. Can it be done with Webform-CiviCRM? I am using Drupal.

# Answer
> 6 votes
Yes, it can be done with webforms. Select a 2nd contact in the *CiviCRM tab*, check **Existing Contact** and add any other fields that you want to expose on the form (including the custom info). Click **Save Settings**.

Go to the Webform tab and click on the field that was created for the Existing Contact. There you can set the autocomplete option for the Form Widget (in the **Display** area):

Take note of the permissions setting in the **Filters** area as well so you don't end up exposing a lot of personal information unintentionally.

---
Tags: drupal, profile, webform-civicrm
---


# Question
Title: Payment Processor for Authorize.net Server Integration Method (SIM)?
Has anyone implemented a CiviCRM payment processor that uses the Authorize.net SIM method? (http://developer.authorize.net/api/)

The docs say that CiviCRM does not have support for this.

> At this time, CiviCRM only supports the Advanced Integration Method.

My reason for asking: the SIM method reduces our campus-policy compliance burden compared to the AIM method.

# Answer
> 1 votes
I don't think anyone has submitted a patch to enable SIM support for auth.net. Might be beneficial for you to investigate and see how much work might be involved in adding this to the current auth.net codebase.

---
Tags: payment-processor, authorize.net
---


# Question
Title: Multi-level Organization ACL Permissions
For my first CiviCRM implementation I need to set it up for an organization that has several national branches, each with a number of centres. Contacts belong to a centre and therefore its country.

Role permissions are needed at different levels: \- local managers should be able to view/edit only contacts within their own centre; \- national managers should be able to view/edit only contacts within the same country; \- international managers can access all contacts.

This page of the CiviCRM's wiki is a promising start to give ideas, but it never got completed.

I've made a few attempts using Option Groups, Custom Fields mapped to Smart Groups, but I did not really go anywhere also because the idea of managing about 170 centres in 22 countries that way seems a bit cumbersome.

Can anyone give me ideas on the best approach to handle this ?

# Answer
> 5 votes
While it's more work to set up, I think you'd be very well served by taking advantage of multi-site capabilities of CiviCRM, especially in conjunction with the excellent Multi-site Permissioning extension. That said - I'm very nervous recommending these tools to someone who hasn't set up CiviCRM before! It takes a fair amount of web development know-how to get this all working.

This would get you two-tier permissioning for "free". You need three tiers - local, national, international. I'd probably give each local group their own site - using Domain Access for Drupal or Wordpress multisite. Then I'd handle the national level via ACLs. Hopefully someone might also give good advice on my related question here.

The alternative approach is to write a custom permission extension. This has a performance benefit, and also leads to much easier management. However, this requires a much higher level of skill! I'd say the two shops with proven expertise here are Fuzion and JMA Consulting. If you're a developer yourself, the Multisite Permissioning extension above is a good example to get you started.

# Answer
> 2 votes
I don't know if your local groups correspond to counties (or county equivalents). If so, you might install the local permissions extension we built for the National Democratic Institute. It allows you to grant certain roles permission to view/edit contacts in their county, and others permission over their state, all using the contacts' addresses (avoiding having to create 340+ groups, one for each center's contacts and one for each center's leaders.

---
Tags: groups, acl
---


title: How to do three-tiered multi-site?

text:
# Question
Title: How to do three-tiered multi-site?
I see references in the CiviCRM wiki to "L2" and "L3" multi-site configurations \- but no documentation on how to do L3 multi-site. Can anyone explain the correct configuration for 3-level multisite?

# Answer
> 4 votes
Not sure yet about SE protocol but there are other options than L1 L2 etc especially if there is no requirement to have separate Drupal domains for each component. For example, we have delivered multi-level permissioned solutions using the Related Permissions extension. This can go as many levels deep as required.

For example if Org X has permissioned relationship to Org Y, which has permissioned relationship to Org Z, then any 'officer' with a permissioned relationship to an Org at any point in the hiearachy will only see the Contacts that their Org, or and sub-Orgs have permissioned relationships to.

This is also explained here and a blog is well overdue. Obviously if you need Drupal sites at each tier then yes the L2, L3 model is one to go for.

---
Tags: multisite
---


# Question
Title: CiviCRM does not have full functionality support for refunds and partial payments so what is the current way to tackle this type of situation?
I have applied as a GSoC student to work on a project that would provide Refunds and / or Partial Payments functionality for CiviCRM. I am seeking current solution to do this when needed so I can suggest and develop better solution. What is the manual way to use negative contributions for refunds as according to me this situation could have occurred several times.

Similarly, how are partial payments handled now with work-arounds?

# Answer
Refunds and partial payments are two different things.

Currently for refunds the work-around is to edit the contribution (possibly associated with membership or event ticket purchase) and set amount received to zero (for a full refund).

For partial payments, there was a release of back office functionality in 4.5 for events ie staff could enter partial payments but the gereal public could not. I suppose one work-around for not having this available to the public is setting up a contribution page for a lesser amount, then having staff manually record the partial payments each time they come in against the event purchase, and cancel the contribution. Similarly, for a membership, a separate Contribution page could be set up to receive these payments which could be manually cancelled after a payment for a similar amount has been created manually.
> 4 votes

# Answer
I use a different approach for refunds.

If it is for a membership I "renew" the membership paying a negative amount and then edit the membership end date to show the correct date. This lets us keep track of each individual credit card payment/refund and provides an accurate history of "contributions" linked to the membership.

If it is "just" a contribution I enter a negative contribution.

We aren't running events through CiviCRM at the moment, but if we were I would see if I got the desired result by making a negative contribution and then directly editing the civicrm\_participant\_payment table to add a line linking the payment to the participant id.

By making negative payments we still have an accurate daily records at the line item level for entering into our accounting package.
> 2 votes

# Answer
Four different refund cases and their current handling:

1) Full refund - just going in the contribution & changing it to cancelled.

2) Partial refund when payment was made by Pay-later - going into the contribution & changing the amount. This doesn't work with a credit card payment.

3) Partial refund when payment was made by credit card and refunded by credit card. If necessary, create a new temporary price and go into the event registration and receipt it at this price. It appears to edit the existing entry rather than creating a new one.

4) Partial or full refund when payment was made by credit card & refunded by bank deposit and vice versa. Create a new temporary negative price and create a second registration for the person in the same event with the negative fee.
> 0 votes

---
Tags: civievent, civicontribute, contributions, civimember, developer
---


# Question
Title: Can "Find Activity" automatically shows result with set parameters without going into selection every time?
For my volunteers I want to create an activity search based on set parameters, i.e. Phone, email. & scheduled. So they do not need to select parameters everytime.

If I enter &force=1 in the url the search automatically executes search function. Is there any shortcut like this for above criteria?

# Answer
> 1 votes
You can do this with an Activity Report. **Reports menu \> Contact reports \> Activity Report**. Set your parameters then save as a new report.

# Answer
> 1 votes
Can you create a new navigation menu item and add &force=1 to the url to that menu item?

I'm not sure what you mean by "set parameters"

---
Tags: search, search-results, activities, custom-search
---


# Question
Title: What is the difference between Tracked Opens and Confirmed Opens
Does anyone know why there would be a difference/what the difference is between the "tracked opens" that you see on an individual mailing report and the "confirmed opens" you see when you run a mailing report through the reports section of CiviCRM?

# Answer
> 7 votes
The Mail Summary Report shows each time the mailing is opened, rather than the number of contacts who have been tracked as opening it (whether once or ten times). Current versions of CiviCRM show the "tracked opens" by counting each recipient no more than once.

Just to throw a wrench into the works, many opens aren't tracked at all. CiviMail (and all mailers that track opens) uses a transparent one-pixel image with a unique URL for each recipient. When someone opens the email, the image gets loaded, and CiviCRM knows the recipient by the URL.

Now, many email clients don't load some or all images by default. If the image isn't loaded, CiviMail can't tell the email has been opened. This can skew open rates low.

It's still a valuable measure, especially in comparison message-to-message, since presumably you'll have the same mix of image blocking among your recipients. However, know that the number won't include at least a certain portion of people opening your message.

---
Tags: civimail, civireport
---


# Question
Title: Are there any dangers to editing a membership type directly in the database?
We have a membership type that is shared by relationship. However, after the membership type was created, we needed to share it by a new relationship type. I edited the membership type directly in the database to add the new relationship type (since the interface does not allow you to edit that after a membership is created). I simply added the new **relationship\_type\_id** and **relationship\_direction** in the **civicrm\_membership\_type** table for the appropriate row.

It seems to have been working fine, but I am tracking down a bug now and wonder if this edit may be related. (The bug does not seem to happen on the demo site).

Here's the issue: when a relationship is disabled from the Organization or Individual's Relationship tab (ie. using the "**more \> Disable**" command rather than editing the relationship, disabling, and saving) the membership which is shared by relationship is not disabled. When the relationship is rather edited by clicking **Edit**, unchecking **Enabled**, and saving, the membership disappears as expected. (In fact, if I do it the first way, then **Edit** and **Save** without changing anything, the membership disappears, too.)

UPDATE: I can actually reproduce this on the demo server with a non-Employee relationship so I think it may be a bug. I have submitted a bug ticket on JIRA.

# Answer
> 5 votes
Updating via DB should be fine, note that it won't update existing membership records to create inherited memberships.

Issue mentioned related to **Disable** might be a bug. I would suggest filing an issue in bug tracker if you are able to replicate it on the demo.

---
Tags: civimember, relationships
---


# Question
Title: Do volunteers have to be associated with an event?
I can see volunteers related to event management, but what about managing volunteers for organization roles like marketing, accounting, etc. ? Perhaps there is a hack to create a dummy event, but wondering if there is a cleaner approach using the civicrm volunteer module.

# Answer
> 4 votes
In CiviVolunteer 1.x, the answer is "yes". There is an open issue for this. The CiviVolunteer authors just had a successful fundraising drive and raised over $30,000 to build CiviVolunteer 2.0, which should bring this feature in.

# Answer
> 5 votes
We have:

* created "Role" as a contact subtype
* created a contact record for each role a volunteer can fill.
* created a relationship type 'holds role/role is held by'

We then establish the 'holds role/role is held by' relationship between volunteer and role.

This lets us find all volunteers who hold any or a specific role by filtering on relationship when doing an Advanced Search.

You may still want to use the relationship "volunteer" as described by Squishus Tyrannicus as you may have volunteers who are not assigned to a particular role and you will need to be able to find them.

Working with two relationships can be difficult however, so instead you could create a individual subtype called "Volunteer" or even a "volunteer" tag to help you find all volunteers, even those without roles.

# Answer
> 2 votes
You might consider not using the CiviVolunteer extension but just storing volunteer attributes (role, skills, interests, etc.) on the contact record. If you need to record specific days volunteered, use activities to store details and record volunteer time.

The advantage of this is that you're storing attributes in a natural place for searching and reporting, and using activities mimics the way CiviVolunteer puts volunteer time in activities so you'll be able to do apples-to-apples comparison with time recorded at an event.

# Answer
> 1 votes
I think what you're looking for is a Relationship.

There's a "Volunteer" relationship by default when you install CiviCRM. To set up a contact as a volunteer with an organization, visit the contact that you would like to assign as a volunteer. Click on **Relationships** at the top of the page and then click **Add Relationship**. A modal window will pop up. In that window, you'll want to select **Volunteer for** under the "relationship type" field. Select the organization that the contact is a volunteer for under "Contact(s)" and fill in the rest of the information as desired.

If you need to assign volunteers to specific organizational roles (accounting, etc.) you can create a custom field and attach it to the volunteer relationship.

# Answer
> 0 votes
A lot of this will depend on how you manage volunteers and how you are collecting the information you need about them. It may be useful to know 'when' someone offered their skills. In which case you could use Activities with a bunch of custom fields to collect their 'offers'.

---
Tags: extension, civivolunteer
---


# Question
Title: How can I integrate (optional) membership sign-up on a CiviEvent registration form?
I'm creating a paid event that has free/discounted tickets for members. The idea is to encourage visitors to become members when signing up for the event. I feel like this is a common usage scenario, but don't see how this be done without sending people off to a separate membership registration form.

# Answer
> 3 votes
There's an extension my colleague built for a client of ours that handles this: https://github.com/aghstrategies/com.aghstrategies.eventmembershipsignup

It should work for you. Unfortunately, we just haven't had the time to get it documented as much as I'd like (or to list it in the extensions directory). If you end up implementing this, please drop me a note at andrew -at- aghstrategies.com. I'd love to hear what suggestions you have, since it is on my to-do list to get it listed and write the documentation needed.

# Answer
> 0 votes
My company expects to create a new order API by June for 4.7 that will facilitate this, but we don't yet have funding to change pricesets so there is a single type for all three current areas.

---
Tags: civievent, civimember
---


# Question
Title: How do I create contribution pages that record pledges and contributions to households?
I'm using CiviCRM 4.5.8 and am setting it up to handle a three year fundraising campaign for our church.

Our church almost exclusively records donations for Households and not for individuals.

How can I create a Contribution Page that allows a person to make Pledges and Contributions that will be linked to their Household?

I am not afraid of custom coding and am currently planning to write a script that automatically shifts all individual pledges to their related household, but if I do that, I still want the contribution page to work for that person to actually make contributions.

Ideally, I'd just use a template override to inject the contact\_id of the user's household if there is one or to use the individual contact\_id otherwise, but I need some help on how to do that.

I already am comfortable working with template overrides, but I'm asking if anyone knows which template needs to be overridden to get the contact\_id in the correct place.

EDIT: SOLUTION CODE

```
/**
 * Implements hook_civicrm_post
 */
function householdcontributions_civicrm_post($op, $objectName, $objectId, &$objectRef) {
    // the _post hook is called AFTER the object has been written to the database
    // because of that, we need to change the contact_id to the household_contact_id
    // and save
    if($op == 'create' && $objectName == 'Contribution') {

        $current_contact_id = $objectRef->contact_id;
        $real_id = $current_contact_id;

        // look for a household associated with this contact
        $result = civicrm_api3('Relationship', 'get', array(
          'sequential' => 1,
          'relationship_type_id' => 7,
          'contact_id_a' => $current_contact_id
        ));

        // override the contact_id with the newly discovered household id
        if ($result['count'] == 1)
        {
            $household_id = $result['values'][0]['contact_id_b'];
            // $objectRef->contact_id = $household['values'][0]['contact_id_b'];
            $result = civicrm_api3('Contribution', 'create', array(
              'sequential' => 1,
              'id' => $objectId,
              'contact_id' => $household_id,
            ));
        }
    }
}

```

# Answer
> 1 votes
I don't know if a template override can do this, but an extension may be a good option. You'll need logic to filter on specific contribution pages or other business rules, but here's the basic idea of hooking into the post process action and moving the contribution from the current contact to the household. Another option to consider may be to automatically credit households for donor gifts so that you can give credit to the household but properly track the donor for tax purposes.

```
/**
 * Implementation of hook_civicrm_post
 */
function myextension_civicrm_post($op, $objectName, $objectId, &$objectRef) {
  if($op == 'create' && $objectName == 'Contribution') {

    $current_contact_id = $objectRef['contact_id'];

    $household_id = civicrm_api3('Relationship', 'get', array(
      'sequential' => 1,
      'relationship_type_id' => 8,
      'contact_id_a' => $current_contact_id
    ));

    $result = civicrm_api3('Contribution', 'create', array(
      'sequential' => 1,
      'id' => $objectId,
      'contact_id' => $household_id['contact_id_b'],
    ));
  }
}

```

# Answer
> 2 votes
I do something very similar with my church. the actual donation is credited to the individual who made it with a soft credit going to the household. This allows us to do reporting by either household or individual.

---
Tags: contributions, custom-templates, contribution-page, households, pledges
---


# Question
Title: How to I access the A/B testing features after upgrading to 4.6?
When I upgrade to CiviCRM 4.6, I don't see anything about the A/B testing features within CiviMail. How do I access these features?

# Answer
> 3 votes
The A/B testing features come with two menu items. For me, they weren't showing up for some reason, even after rebuilding the menu by visiting `civicrm/menu/rebuild&reset=1`

I don't understand why this worked, but I did the following:

1. Go to "Admin" \> "Customize Data and Screens" \> "Navigation Menu"
2. Expand the Mailings item and you should see "New A/B test" and "Manage A/B tests" at the bottom.
3. For each of these two items, take the following steps:

1. Right click on the menu item and choose "Edit"
    2. Change the `#` character in the URL field to something else like `foo`.
    3. Save. Then edit again, and change back to `#`

# Answer
> 2 votes
This is due to a typo in the upgrade script. I filed a bug and a patch: https://github.com/civicrm/civicrm-core/pull/5652

This fix should be in Civi 4.6.3. Sean's fix will work, but the permissions will be slightly off - but will be fixed on upgrade to 4.6.3. This SQL statement will fix the problem with correct permissions:

```
UPDATE civicrm_navigation SET permission = 'access CiviMail', permission_operator = '' WHERE name = 'New A/B Test' OR name = 'Manage A/B Tests';

```

---
Tags: civimail
---


# Question
Title: Installing extensions with civicrm-buildkit
When using civicrm-buildkit, it automatically configures an extension directory with something like:

```
/home/jon/local/civicrm-buildkit/build/d46/sites/default/ext

```

However, there are no extensions in that directory, though there are clearly extensions installed in the built site. Moreover, extensions added to the extensions directory don't appear. What's the preferred method to get extensions installed on a site built with civicrm-buildkit?

# Answer
As a bit of background, it may help to check out "What's a build?" and "What are the basic build techniques?".

There are a few directions one can take on that topic:

* Install an extension once, locally, for a single build.
* Modify the *build-document* of an existing build-type so that the extension will always be installed in the future. (For example, if you modify the build-document for `wp-demo`, then the extension would be installed on `wp45.demo.civicrm.org`, `wp46.demo.civicrm.org`, etc. every night when the demo sites are rebuilt.)
* Create a custom *build-type* with a custom *build-document* using your own curated list of extensions/modules.

Installing once is easiest -- you can use basically any extension-management practice that you'd use normally (with or without civibuild). The web-based manager or `drush cvapi` will be fine.

To modify a build-document, you would create or edit files in app/config -- you'll need to create steps for *download* and *install*. For example, in drupal-demo:

Digging into those files, you can see how it handles the CiviVolunteer extension. (Search for "volunteer".)

To create a new build-document, you should copy one of the existing build-types. The best starting points are (IMHO) `drupal-demo` (which uses `drush` with `drush-make`), `wp-demo` (which uses `wp-cli` and `git`), and `wmff` (which uses `git submodules`).

When editing a build-document, the development-feedback-loop (edit=\>run=\>validate=\>repeat) can be a bit slow. To mitigate that, buildkit includes caches and nuanced rebuild commands.
> 3 votes

# Answer
If your aim it to automatically install an extension, you will need to change a few files. I did it with Tim last time I was in SF for civisualize, search for "civisualize" to find them.

If the aim is simply to add an extension, I simply symlink it into the ext folder and run:

drush -y cvapi extension.install key=org.whatever.yourext debug=1
> 1 votes

---
Tags: extension, developer, civicrm-buildkit
---


# Question
Title: Webform-CiviCRM and the "my billing address is the same" checkbox
On a core contribution page, if you add an address profile at the top of the page, a checkbox appears allowing the user to indicate that their billing address is the same:

On a Webform-CiviCRM form, my understanding is that the payment page is always a separate page and this box is not automatic. Is there any way to include a checkbox like this?

# Answer
This feature has not been implemented in Webform-CiviCRM. If you do see that box in a webform, it's a mistake (and the fix is to remove profiles from the contribution page you are using for the webform).

Implementation of this feature would require writing some javascript to fill those fields from available data, and some php code to store the data across potentially multiple pages. The best place to put it might be in `wf_crm_webform_preprocess::addResources`.

Note that if the user is logged-in then the billing fields will already be pre-filled.
> 5 votes

---
Tags: civicontribute, drupal, webform-civicrm
---


# Question
Title: How to configure Membership Status Rules so expired members can renew?
My dilemma is not being sure I have set the membership status rules correctly. One enigma is the Start/End event adjustments. An example of explanatory text goes:

> Optional adjustment period added or subtracted from the End Event.

Using the plus \[+\] or minus \[-\] sign does not get retained when saved, so how is an integer interpreted without a sign, in those adjustments?

The primary problem I've been alerted to is difficulty with renewing any expired memberships. Despite this helpful prompt . . .

> Renewing will add the normal membership period to the End Date of the previous period for members whose status is Current or Grace. For Expired memberships, renewing will create a membership period commencing from the 'Date Renewal Entered'. This date can be adjusted including being set to the day after the previous End Date - if continuous membership is required.

. . . it seems that I have set something up incorrectly, as, when folks try to process an expired (after-grace-period-has-ended) member's renewal, the response is:

> Sorry but we are not able to provide this at the moment. Oops, it looks like there is no valid membership status corresponding to the membership start and end dates for this membership. Contact the site administrator for assistance.

It seems they can't get to the point where the dates can be changed to effect continuous membership for tardy payers. I.e:

> For Expired memberships, renewing will create a membership period commencing from the 'Date Renewal Entered'. *This date can be adjusted including being set to the day after the previous End Date - if continuous membership is required.*

What have I done wrong and how do I fix it, please?

v4.4 running on WordPress

## EDIT (as requested)

The organisation only asked for three types: current, grace and expired. The present rules are:

Status......Start Event......End Event......Member

Current.....start date.......end date...........Yes....(weight 1)

Grace.......end date.........end date..........Yes....(end event adj 12 months, weight 2)

Expired.....end date..................................No....(end event adj 13 months, weight 3)

Not sure how my attempt as columnar layout will fare, so I apologise if it's hard to read/follow.

The requested grace period was one month. I recently changed that to 12 months, in an effort to get over the problem described in my first posting. Despite heeding the advice and looking at the WP demo, (during which nothing bit me in the eye), I do think I have a mental block with this conundrum. (aka user incompetence)

# Answer
> 3 votes
I think there are 2 separate issues here. I'll try to tackle each.

> Using the plus \[+\] or minus \[-\] sign does not get retained when saved

I just tested on Civi 4.4, and a minus sign is saved, a plus sign is not. An unsigned integer is considered positive here. If this isn't what you're seeing, try to replicate your situation on the demo site.

> Oops, it looks like there is no valid membership status corresponding to the membership start and end dates for this membership.

CiviMember works by evaluating the membership status rules in order. The rules may overlap - for instance, a "current" member can be start date to end date, and a "new" member can be start date to (start date + 1 month) - in that case, whichever rule comes first takes priority. However, you can NOT have a gap where no status applies. That's what causes this error.

Given your particulars, my guess is that your users are trying to create an "upcoming" membership - where the join/start dates are in the future. Unless you create a membership status that covers that (e.g. "upcoming is (start date - 1 month) to start date"), you'll get this error.

If this doesn't answer your question, please edit it with concrete numbers - what your membership status rules are, and what the join, start and end dates are for a membership that causes this error.

UPDATE: I know this is months old - but I just saw your update. The "Grace" period ends 12 months after the end date - but expired doesn't take effect until 13 months after the end date. You'll see the error you're seeing for anyone whose membership ended between 12 and 13 months ago. Set your "Expired" to take effect 12 months after the end date, to match the end of the Grace period.

# Answer
> 1 votes
I agree with Jon G's diagnosis.

You can fix the status rules by returning them to their default state and then changing them carefully one by one.

Use the status rules from d45.demo.civicrm.org or wp45.demo.civicrm.org as your guide if you don't have a pristine v4.4 install available to you. I'm pretty sure these default status rules haven't changed in several versions.

Please edit your question with more details of what statuses you want.

---
Tags: civimember
---


# Question
Title: What do I do to fix Civi Bounce Reasons that appear in strange (chinese?) character set?
Here are bounce reasons - any ideas on where these might be coming from? it happens consistently.

```
Contact ID  Bounce Reason   Bounce Type
21  潙牵洠獥慳敧琠桴潦汬睯湩敲楣楰湥獴挠湡潮⁴敢搠汥癩牥摥਺ †樠桯慮湲汯楤獮慀汯挮浯ਊ敒潭整猠牥敶⁲敲畴湲摥琠敨映汯潬楷杮攠牲牯਺ †㔠〵䴠楡扬硯甠慮慶汩扡敬桔    Syntax  j
58  潙牵洠獥慳敧琠桴潦汬睯湩敲楣楰湥獴挠湡潮⁴敢搠汥癩牥摥਺ †搠祯楫楩祀桡潯挮浯ਊ敒潭整猠牥敶⁲敲畴湲摥琠敨映汯潬楷杮攠牲牯਺ †㐠ㄲ匠牥楶散渠瑯愠慶汩扡敬汣獯湩    Syntax
294 潙牵洠獥慳敧琠桴潦汬睯湩敲楣楰湥獴挠湡潮⁴敢搠汥癩牥摥਺ †樠㑷楬歮䁳慹潨⹯潣੭刊浥瑯敳癲牥爠瑥牵敮桴潦汬睯湩牥潲㩲ਊ††㈴‱敓癲捩潮⁴癡楡慬汢ⱥ挠潬楳    Syntax
448 潙牵洠獥慳敧琠桴潦汬睯湩敲楣楰湥獴挠湡潮⁴敢搠汥癩牥摥਺ †猠慰獴晪祀桡潯挮浯ਊ敒潭整猠牥敶⁲敲畴湲摥琠敨映汯潬楷杮攠牲牯਺ †㐠ㄲ匠牥楶散渠瑯愠慶汩扡敬汣獯湩    Syntax

```

# Answer
> 1 votes
Here is a scattershot of potentially useful ideas:

1. If you look at the contacts' primary emails do they appear as though they may be hosted on Chinese servers?
2. I believe the bounce reason may come from the response, but the bounce type comes from inside CiviCRM. Perhaps there is an attempt to hack mail transport agents with this??
3. Alternatively, perhaps there is a problem with character encoding in the mail headers or on your site more generally. Is this a multilingual site? Does your database have utf8\_unicode character encoding as its default, or more importantly for all of its varchar text fields when you look at the table structures in phpMyAdmin? Have you moved the database between servers and perhaps not handled character encodings properly during export and import?

if none of this is useful, you might want to get on irc and ask bgm for help with this as he is the lead on internationalisation matters and he also happens to know a bit about email infrastructure.

# Answer
> 1 votes
Looking at the link to Yahoo's explanation of your error it seems that they are no longer accepting email from your server because they think you might be a spammer. I strongly advise you to check if your server has been blacklisted and to follow instructions on how to get your server removed from each blacklist service it is on. More broadly, have you ensured that all addresses you are emailing have opted in to receiving the mail you have sent (ie you haven't just started emailing a stale old list uploaded from another source)?

If you have trouble getting this resolved you might want to consider using one of the extensions that integrate with a mail delivery service like Mandrill, MailChimp, or Constant Contact. They provide whitelisting services.

---
Tags: civimail, i18n
---


# Question
Title: How do I rebuild the training demo sites?
After ssh'ing in: $ ssh joemurray@www-training.civicrm.osuosl.org I was going to restore the first 3 of 25 training sites using:

civibuild restore PARM\_SITES="01 02 03"

as per the documentation for buildkit at https://github.com/civicrm/civicrm-buildkit/blob/master/doc/civibuild.md#rebuilds and a tip from Tim about the parameter.

However, the civibuild command wasn't available in my path and I couldn't find the file either. I was expecting it to be available on this server. Has it been renamed?

# Answer
> 3 votes
The demo sites are built as a scheduled job in Jenkins. Authenticated users in Jenkins can start builds from the gui. Please contact the core team via email (totten or dave or coleman or kurund, at civicrm.org) if you need a login to that site.

---
Tags: civicrm-buildkit
---


# Question
Title: How to Fix Missing Organization Profile Dropdown in Contribution Form Settings
I'm working on my first install of CiviCRM. So far it's been a fairly smooth process. I'm at the point of creating a form to register members (as we are a 501c6). I created a contribution form, and I want to require that users contribute on behalf of an organization - as this is a registration for membership.

However, the dropdown menu to select which profile to use isn't there. I see where it should be, but it doesn't show up. This is my first form of this type, so it's entirely possible I just missed something simple, but I've tried everything I can think of. I've even disabled the CSS in case that was somehow hiding the dropdown.

At this point, I can't move forward with the registration is it requires me to put in an Org Profile but does not give me any way to select one.

Anybody experienced this problem before? Anything I can do to fix it? Because I'm stumped on this one.

Thanks in advance!

P.S. I just posted this on the old forums, but saw that they were deprecated, so I moved it over here.

# Answer
> 2 votes
The "on behalf of" functionality uses the "On Behalf of Organization" profile which is a default/reserved profile. You should be able to find it by clicking on the *Reserved Profiles* tab in **civicrm/admin/uf/group** (or under **Administer \> Customize Data and Screens \> Profiles**):

# Answer
> 1 votes
It looks like there isn't an Organization profile available. There should be the default reserved profile "On Behalf of Organization", but you can also create your own profile and use it. It has to be an Organization profile, with no individual fields in it. Either copy a reserved profile and edit it, or start your own. Be sure to use only Organization and Contact fields (CiviCRM won't let you add Individual ones once you have an Organization field in there), and then you can select the profile.

# Answer
> 1 votes
It appears from the screenshot that your site is experiencing javascript errors. You'll find an explanation of this and possible solutions here:

Troubleshooting popups, autocompletes, or other javascript problems.

---
Tags: civicontribute, profile
---


# Question
Title: Getting volunteer role in to email template
We are using CiviVolunteer, and trying to setup a email template in that need to display volunteer role. I think volunteer role is in activity record type. It does not show up in the token list in email template. I can get all the custom fields I have created in the volunteer signup profile. Looking for a way to get volunteer role as token, please help

Thanks Naheed

# Answer
If you need something in a token that isn't a default token, you may need to create a custom token. Here's an earlier post with some example code. (You would switch out the logic that searches for the Drupal username with some logic that pulls the Volunteer Role from CiviCRM and inserts it into the token.)
> 1 votes

---
Tags: joomla, civivolunteer
---