# Question
Title: CiviCRM 4.2.7 (drupal 6) - errors after web host upgrade to PHP 5.5
Recently we switched servers within our webhost. When doing so, the PHP version went to 5.5 from 5.3. We then started to see some errors when making submissions within CiviCRM (most do work, but some functions don't). Based off my reading, I am making an assumption that PHP 5.5 is causing these issues, but I am not a webdev. Other than have PHP downgraded back to 5.3, is there anything to do here to alleviate this? How difficult are CiviCRM upgrades?

Error snippet:

```
#0 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Error.php(148):     CRM_Core_Error::backtrace()

#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))

#2 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func    ((Array:2), Object(DB_Error))

#3 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB.php(971): PEAR_Error-    >PEAR_Error("DB Error: a515ac9c2796ca0e23adbe92c68fc9fc", "a515ac9c2796ca0e23adbe92c68fc9fc", 16,     (Array:2), "INSERT INTO civicrm_contribution (contact_id , contribution_type_id , contrib...")

#4 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error-    >DB_Error("a515ac9c2796ca0e23adbe92c68fc9fc", 16, (Array:2), "INSERT INTO civicrm_contribution     (contact_id , contribution_type_id , contrib...")

#5 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/common.php(1903): PEAR-    >raiseError(NULL, "a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, "INSERT INTO civicrm_contribution     (contact_id , contribution_type_id , contrib...", "DB_Error", TRUE)

#6 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common-    >raiseError("a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, NULL, "1364 ** Field 'total_amount' doesn't     have a default value")

#7 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql-    >mysqlRaiseError()

#8 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/common.php(1216):     DB_mysql->simpleQuery("INSERT INTO civicrm_contribution (contact_id , contribution_type_id ,     contrib...")

#9 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/DataObject.php(2421):     DB_common->query("INSERT INTO civicrm_contribution (contact_id , contribution_type_id , contrib...")

#10 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/DataObject.php(1055):     DB_DataObject->_query("INSERT INTO civicrm_contribution (contact_id , contribution_type_id ,     contrib...")

#11 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/DAO.php(287): DB_DataObject-    >insert()

#12 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php    (153): CRM_Core_DAO->save()

#13 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php    (246): CRM_Contribute_BAO_Contribution::add((Array:30), (Array:1))

#14 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php    (1615): CRM_Contribute_BAO_Contribution::create((Array:30), (Array:1))

#15 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Form.php(246):     CRM_Contribute_Form_Contribution->postProcess()

#16 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php    (151): CRM_Core_Form->mainProcess()

#17 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php    (128): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution),     "upload")

#18     /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php    (203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution), "upload")

#19 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103):     HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution), "upload")

#20 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Controller.php(289):     HTML_QuickForm_Page->handle("upload")

#21 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(296):     CRM_Core_Controller->run()

#22 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(353):     CRM_Contribute_Page_Tab->edit()

#23 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Invoke.php(220):     CRM_Contribute_Page_Tab->run((Array:3), NULL)

#24 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Invoke.php(51):     CRM_Core_Invoke::_invoke((Array:3))

#25 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/drupal/civicrm.module(382):             CRM_Core_Invoke::invoke((Array:3))

#26 [internal function](): civicrm_invoke("contribute", "add")

#27 /home/petsaliv/public_html/office2/includes/menu.inc(350): call_user_func_array("civicrm_invoke",      (Array:2))

#28 /home/petsaliv/public_html/office2/index.php(17): menu_execute_active_handler()

#29 {main}

```

# Answer
> 1 votes
I don't know about the compatibility of CiviCRM 4.2.7 with PHP 5.5.x - http://wiki.civicrm.org/confluence/display/CRMDOC42/Drupal+Installation+Guide+for+CiviCRM+4.2+-+Drupal+6 reports that 4.2.x was tested under PHP 5.3.x, so you may well have issues under 5.5

https://www.drupal.org/requirements confusingly reports the following for Drupal 6: "Drupal core should work with PHP 5.3.x, but PHP 5.3.x and higher may produce errors or unexpected behavior especially for contributed modules and themes.

And https://www.drupal.org/requirements/php indicates that Drupal 6 core should be fine with PHP 5.5, but that some contrib modules may have problems.

I run the Drupal 6 sites that I'm looking after on a Debian Squeeze server with PHP 5.3.3. Some of these sites are using CiviCRM 4.5.x and apart from some very minor issues it works fine with Drupal 6 and with PHP 5.3.3

My advice - having ensured that, with the exception of the CiviCRM issue that you have noted - your Drupal 6 site works without any issues on the new server, you might want to try a test version of the site with the latest 4.4 LTS version of CiviCRM (be sure to use the Drupal 6 flavour) and see how that performs, and if that works try the current 4.6.x version.

At the same time you need to have a plan in place to move away from Drupal 6. A release date for Drupal 8 has now been announced, and in due course that will mean an end to support for Drupal 6.

---
Tags: drupal, php, error
---


title: How can I force delete an event

text:
# Question
Title: How can I force delete an event
I have a few test events I registered a single user for. I then removed the single user from all the events but when I go to delete the event I get a message the event still has participants. There are no participants when I do a search. It appears to be some sort of bug. How do I force delete the event? Is there a way to get rid of it via MySQL if the GUI won't comply?

CiviCRM 4.6.9 Drupal 7.41

Thanks

# Answer
Use the API explorer :

```
$result = civicrm_api3('Event', 'delete', array(
  'sequential' => 1,
  'id' => <your_event_id>,
));

```

This will delete the event along with the related participant.
> 3 votes

# Answer
1. backup your database.
2. `DELETE from civicrm_event WHERE id=1`

You can change 1 to another number, or use a different operator such as id\>1
> 2 votes

# Answer
If you have used the "Test-Drive" mode of the form, there may be test registrations for the event. Those may prevent deleting the event but would don't show up in search unless you untick "yes" on "Participant is a Test?".

Maybe you can delet the event after you removed the test registrations - obviously force deleting should be the last resort :)
> 2 votes

---
Tags: civievent
---


title: editing auto invoice

text:
# Question
Title: editing auto invoice
How do I edit the organization's contact information on an invoice automatically generated when a person signs up for a CiviEvent and chooses to Pay Later (also for event registration confirmation)? The invoice was created by a developer the organization no longer uses, and the organization's address and phone have changed. We currently have Joomla 3.3.1 and CiviCRM 4.4.5

# Answer
> 2 votes
If the organization's information in its Civi contact record is correct, then the next place I would look would be in the message templates (Administer \> Communications \> Message Templates, the templates for receipts are under System Workflow Messages). You should be able to locate the information in those with a find - if you are not familiar with Smarty, however, be careful not to modify the code around the information as you might inadvertently break the template. (It's probably a good idea to save the version currently in use before you start modifying, just in case you need to step back.)

Hope this helps, Lesley

# Answer
> 0 votes
In addition to what Lesley said, you may want to consider updating CiviCRM to Version 4.6.x as it has a nice built-in invoice feature.

As it is a customization (and prpobably no one knows how it works in detail?), if you cannot find the template under workflow messages it may be a good idea to upgrade instead of trying to fix the custom function.

---
Tags: civievent
---


# Question
Title: In CiviCASE how do I restore a deleted case?
If I've deleted a contact and it's related cases how can I restore the data from a backup?

I've restored the records in civicrm\_contact, civicrm\_case, civicrm\_case\_contact, civicrm\_activity, civicrm\_case\_activity and civicrm\_case\_activity\_contact

However, it still isn't showing the activities in the case. It shows the contact and case restored fine. But in the manage cases screen the activity listing is missing with the message 'No data available in table'.

Any ideas?

# Answer
CiviCase normally doesn't delete anything it just marks it deleted. You should be able to use advanced search and search for deleted contacts and restore the contact from there. Ditto Find Cases and check the box for deleted cases.

But if the records were truly deleted then you also need: `civicrm_activity_contact
civicrm_log
and then there's a couple if you want the contact details too - civicrm_email, civicrm_address, civicrm_phone, civicrm_website (might be missing one or two)`

Also if you have custom fields the records in civicrm\_value\_XXX.
> 2 votes

# Answer
Jon-man, can you check if the 'is\_deleted' field in civicrm\_case is set to 0, if the activities are still around in civicrm\_case\_activities and if the activities are still active?
> 1 votes

---
Tags: civicase
---


title: Notice: Undefined index: is_deceased

text:
# Question
Title: Notice: Undefined index: is_deceased
I get this message whenever I edit a contact:

Notice: Undefined index: is\_deceased in CRM\_Contact\_Form\_Contact-\>preProcess() (line 216 of C:\Bitnami\civicrm-4.6.9-1\apps\civicrm\htdocs\sites\all\modules\civicrm\CRM\Contact\Form\Contact.php).

Is this something I should be concerned about?

Thanks, Ian

# Answer
It's nothing to be worried about, though it is a minor bug. The code there happens to look for the value of `$defaults['is_deceased']` without checking to see if the `$defaults` array has a value with the key `is_deceased`. Two things:

1. You might record an issue at https://issues.civicrm.org so it gets fixed.
2. You should probably turn off the error messages if this is a production site. In the Drupal admin menu, go to Configuration, then under Development see Logging and Errors. Select `none` under "Error messages to display" and save the configuration. (This, by the way, is why a notice like this goes unnoticed.)
> 2 votes

---
Tags: contacts, error
---


# Question
Title: Exporting membership type and contribution total amount
An organization sells a variety of membership types. The goal is to generate an exported CSV that will contain name, address, membership type, and amount paid for that membership.

Two types of memberships are the same price, and CiviDiscount is in use regardless. Thus total amount of the membership contribution is not a reliable way to determine which membership type someone has purchased.

Unless I use price sets and the 'extended reports' extension from Eileen, I cannot find a way to export "membership type (membership)" as well as "total amount (contribution)" data in the same CSV export.

But this extended report doesn't contain address. So time to expand that report I guess?

Am I missing an easier solution here?

# Answer
I just tried this (at Stoob's request) on one report & it seemed to only require a couple of lines -

https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/commit/fb5ba0d47b1c4fea651fcec5760497bf204c5b56

Note that there are several price set reports & this might not be the one you were focussed on but the principle should be the same
> 2 votes

# Answer
I do think expanding the report might be the way forward. If you are developer you could expand on Eileens extension and expand the report code in that extension. That way you also giving back to the community!
> 0 votes

---
Tags: civimember, civireport, price-sets
---


# Question
Title: MultiRecord OptionGroup on campaign page
Out of the box, while CiviCRM offers multirecord optiongroups/values on a contact page, it doesn't allow you to, on a campaign entity.

Why is that? Are there some limitation that I'm missing ? Is this something that can be easily achieved through coding?

Thanks, in advance!

# Answer
The short answer is that it hasn't been built out. It could/would be "achieved through coding", but I don't think it would be done "easily". The issue is that there are a number of places where the assumption is made that there's only one value per field per campaign (or any non-contact entity). You'd need to take care of all of those situations.

If you were to do so, you'd end up hacking core CiviCRM considerably, so you'd have to maintain it from upgrade to upgrade.

For those reasons, it would be best done as an improvement that gets incorporated into a future version of CiviCRM. It would probably require some time and/or money to get it done. You might contact someone on the CiviCRM core team to discuss some options. There are ways you can hire them to build a feature for you, or if you have more time than money, you can write the code and they can help you do it well.
> 1 votes

---
Tags: custom-fields, civicampaign, multi-record
---


# Question
Title: Passing CiviCRM invoice number to Moneris hosted payment page
We use this extension to hook CiviCRM up to Moneris' hosted payment page to process payments: https://github.com/webaccess/com.webaccessglobal.moneriseselect

Could someone help point me in the right direction as to how to pass along the Invoice # to Moneris so that reconciliation between Moneris transactions and CiviCRM contributions can be more straight forward?

Or share some tips on best practices for this kind of reconciliation?

# Answer
Nevermind - we figured out the issue - the client just didn't have his export settings in Moneris correct. He was only querying a couple fields.

Thank you for your help Ramesh!
> 0 votes

# Answer
If that is the case - Looking at the code I can see that in the confirmation page you are redirecting to Moneries Site for entering Card details and then once the payment is processed "Successfull/Failed" it is redirected again to CiviCRM Page.

So at that time please read the order number from the payment details and update that against your contribution - which will be usefully for your client to link both the records - I guess this helps
> 1 votes

---
Tags: civicontribute, payment-processor
---


title: Activity Report in Views

text:
# Question
Title: Activity Report in Views
On Drupal 7, how would you display a list of CiviCRM activities and show the two types of contacts (the activity related to the client and the user who created the activity)?

Views is pretty tricky here. All the primary fields (Activity ID, Status, Type, Activity Date, Text Link) can be added without any problems. Each row in the table represents a unique activity entry. When it came to adding the names of the individuals for the client and person who created the activity, I'm having difficulty with it. I tried adding a relationship to "CiviCRM Activity Contacts: Activity Contact ID"; however, this will duplicate some of the activities in the data.

* Activity Assignees: Will not display the person who created the activity
* Activity Source: Displays the person who created the activity, but unclear how I would add the target contact (the client). Contact A/B doesn't work well.
* Activity Targets: Display the target contact (the client). Added a relationship successfully to display the user (person who created the activity), but one activity now appears in 9 rows.

The only way I can think of displaying a list of unique activities is possibly aggregating (Views "use aggregation"? Table with aggregation options module to group Activity IDs?). Am I thinking about this too much?

# Answer
No aggregation necessary.

Under relationships add two relationships for activity contacts. Select one to be the source and the other to be the target.

Once you've got those relationships, you can add two display name fields. One tied to the source relationship and one tied to the target relationship.

Under filters add activity is deleted false, activity is current revision true.

In the fields section, in the activity ID settings select filter repeats.
> 7 votes

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


# Question
Title: cannot see default civisualize displays in 4.6.10
don't know if i am doing something wrong but just installed civisualize into drupal 7 / civicrm 4.6.10 set up and if i try say /civicrm/dataviz/contacts

i simply get text

Contacts Overview

contacts selected from a total of records Type Source of Contact Gender Day - Contact Created Date - Contact Created

with no visuals

any thoughts would be welcome

---

thanks for the reply am attaching screen grab of the page view where i expected to see visualisation, have not seen any error reports and i did set path to extensions directory when i set previous extensions which appear to work fine

any further ideas more than welcome as this extensin would be really useful to us if we can get it working

# Answer
check if you have any error message, eg about a missing d3 object

your error is most likely that the url for extensions isn't properly configured, so all the javascript needed to get civisualize working properly isn't there.

if you have firebug installed, or other developer extensions, you should see-in the net tab- that it's looking for the needed javascript at the wrong place
> 1 votes

---
Tags: 4.6, civisualize
---


# Question
Title: Relationships not available on household imports
We have an import that we do a few times a year that I set up about 2 years ago. Until today, it's never had an issue. We are using v4.6.3, and the last time we did it we were using a 4.5.x version.

When importing households, we have some custom relationships defined. They are Individual to Household relationships. These relationships do not show up in the selector for the mapping the imported data. Some relationships DO show up; Household member and Head of Household, plus two other relationships in which contact a type is not set.

The relationships that don't show up are useable in all other contexts that I have tried. They are enabled. I have gone so far as to compare the relationship type records in mysql and I see no obvious issues.

I've also searched the Jira to see if there's a known issue but I don't see any.

Suggestions?

# Answer
> 2 votes
We are having the same problem with relationship imports that have custom subtypes. Our subtypes are Individual - Student and Organization - School. The relationship is Student of (Student) - Student for (School).

The relationship does not show up for mapping during import. My testing shows that it's the first part (a) that causes it not to show up. If the (a) is changed to Individual it will show up, all other combinations do not.

I have also verified that this relationship does show up in 4.5.4. This is the only 4.5.x version I could readily test with. I have verified on the demo test as well.

I have created an issue: https://issues.civicrm.org/jira/browse/CRM-17544

---
Tags: import, relationships, households
---


# Question
Title: Membership Types vs Groups vs Organizational Types vs Relationships
Still new to CiviCRM and grateful for opinions and advice. We have several types of relationship with organizations. We do not charge anything for any type of relationship. Relationships are managed in the backend only, hence controlled by staff members who login to backend. Relation types include endorsers, partners, affliates, council, past council, volunteers, etc.

Some groups will be listed and published on the website, so I know to manage them as "groups" since that is the only way to have a public list on a website.

What is the best way to handle the rest? Membership doesn't seem to fit since it requires some financial relationship, although 'zero' is possible. Perhaps this is just a multiselect custom field?

# Answer
> 1 votes
These are not the easiest of questions and we may take different approaches. EG we tend to use Custom Fields a lot more than Tags, others do the reverse.

Sometimes it only becomes clear after you have set things up and used them one way, and therefore it can make sense when trying civi out to try multiple approaches.

As you have spotted, Groups are the solution if people are signing up for eg Mailing lists, but even then it could be that the Group is a Smart Group built off a custom field.

To take a stab at your list examples like Endorsers sound like a Tag.

But a Relationship (civi term) is good when you want to keep track of start/end dates, eg if someone was a Partner in 2012-2014 since the history is recorded.

Similarly when you say 'Council', if you mean eg John was on the Council in 2012, then creating a 'contact' for 'council' and giving John a relationship of eg 'council member' means you can both see current council members, and former ones.

Also which CMS you use can make a difference, for example in Drupal you can use Views to publish members of a council, by constructing a View based on Civi Contacts that uses the drupal and civi concept of a Relationship to show all the contacts who have a current Relationship to the contact that is your council.

Hope that helps a bit

---
Tags: civimember, custom-fields, relationships
---


# Question
Title: Network Error when viewing contact from Joomla front end
I'm looking for some guidance with the following issue:

I have Civicrm setup as a joomla extension. Everything works great, except one minor issue.

When viewing a contact from the joomla frontend, civicrm keeps poping up the following message: "Network Error Unable to reach the server. Please refresh this page in your browser and try again."

If I view a contact from the backend(administrator) there's no such issue.

Though the error is being displayed, it doesn't seem like anything is actually broken as everything shows as it should.

No errors are showing in the browser console and I've followed all steps here: https://forum.civicrm.org/index.php/topic,35850.0.html

Joomla 3.4.5 CIvi 4.6.10 Any help would be greatly appreciated. I apologize if I left out any crucial information. Thanks!

# Answer
> 1 votes
It appears that something is misconfigured in your site. From the frontend, you should only be able to go to "front-facing" pages, such as contribution pages, event forms, and profile forms (and I mean CiviCRM profiles, not the contact records themselves with the tabs and all). Most importantly, contact search should not be available unless you have a profile with searchable fields configured, and you would most likely want to restrict those results to a group.

---
Tags: contacts, joomla, error
---


title: Expected one Contact but found 25

text:
# Question
Title: Expected one Contact but found 25
I'm getting quite a few (30+ on a mailing to ~1,500 subscribers) errors like the following each time we sent out a mass email.

I'm running CiviCRM 4.6.8 and Drupal 7.3.9, but have been seeing these errors for the last 3-4 versions.

```
There was a CiviCRM error at ...
Date: 2015-09-11T08:04:10-04:00

***ERROR***
Array
(
    [message] => There was an error in your request
    [code] =>
)

***LOGGED IN USER***
count:              25
is_error:           1
error_message:      Expected one Contact but found 25

***SERVER***
PHPRC:              /etc/php5/cgi/
PHP_DOCUMENT_ROOT:  /var/www/clients/client5/web8
PATH:               /usr/local/bin:/usr/bin:/bin
PWD:                /var/www/php-fcgi-scripts/web8
SHLVL:              0
PHP_FCGI_MAX_REQUESTS:5000
FCGI_ROLE:          RESPONDER
REDIRECT_SCRIPT_URL:/civicrm/mailing/optout
REDIRECT_SCRIPT_URI:http://www.example.org/civicrm/mailing/optout
REDIRECT_protossl:
REDIRECT_HTTP_AUTHORIZATION:
REDIRECT_STATUS:    200
SCRIPT_URL:         /civicrm/mailing/optout
SCRIPT_URI:         http://www.example.org/civicrm/mailing/optout
protossl:
HTTP_AUTHORIZATION:
HTTP_CONNECTION:    close
HTTP_ACCEPT:        text/html, application/xhtml+xml, */*
HTTP_ACCEPT_ENCODING:deflate
HTTP_ACCEPT_LANGUAGE:en-US
HTTP_HOST:          www.example.org
HTTP_USER_AGENT:    Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
SERVER_SIGNATURE:   Apache/2.2.22 (Ubuntu) Server at www.peatworks.org Port 80

SERVER_SOFTWARE:    Apache/2.2.22 (Ubuntu)
SERVER_NAME:        www.example.org
SERVER_ADDR:        10.10.10.26
SERVER_PORT:        80
REMOTE_ADDR:        83.223.122.17
DOCUMENT_ROOT:      /var/www/example.org/web
SERVER_ADMIN:       webmaster@example.org
SCRIPT_FILENAME:    /var/www/example.org/web/index.php
REMOTE_PORT:        47487
REDIRECT_QUERY_STRING:qid=2118352&h=033856psn51n67or41&jid=85152&reset=1
REDIRECT_URL:       /civicrm/mailing/optout
GATEWAY_INTERFACE:  CGI/1.1
SERVER_PROTOCOL:    HTTP/1.1
REQUEST_METHOD:     GET
QUERY_STRING:       qid=2118352&h=033856psn51n67or41&jid=85152&reset=1
REQUEST_URI:        /civicrm/mailing/optout?qid=2118352&h=033856psn51n67or41&jid=85152&reset=1
SCRIPT_NAME:        /index.php
PHP_SELF:           /index.php
REQUEST_TIME:       1441973050
HTTP_REFERER:

***BACKTRACE***
#0 /var/www/clients/client5/web8/web/sites/default/files/civicrm/extensions/ca.bidon.reporterror/reporterror.php(207): reporterror_civicrm_generatereport("Partnership on Employment and Accessible Technology (PEAT)", (Array:2), NULL)
#1 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Core/Error.php(351): reporterror_civicrm_handler((Array:2))
#2 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Mailing/Form/Optout.php(55): CRM_Core_Error::fatal("There was an error in your request")
#3 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Core/Form.php(455): CRM_Mailing_Form_Optout->preProcess()
#4 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(94): CRM_Core_Form->buildForm()
#5 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Mailing_Form_Optout), "display")
#6 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Mailing_Form_Optout), "display")
#7 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("display")
#8 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
#9 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Mailing_Form_Optout", "Opt-out", NULL)
#10 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
#11 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#12 /var/www/clients/client5/web8/web/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
#13 [internal function](): civicrm_invoke("mailing", "optout")
#14 /var/www/clients/client5/web8/web/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
#15 /var/www/clients/client5/web8/web/index.php(21): menu_execute_active_handler()
#16 {main}

```

I am seeing a few successful optout and unsubscribes for each mailing, but am trying to figure out if the above is a cause for concern.

Comparing the REQUEST\_URI to valid optout and unsubscribe requests, It looks like some of the query parameter values may be getting mangled, but I'm unsure about what these parameters related to.

civicrm/mailing/optout?reset=1&jid=851&qid=19765&h=04b9e8b8620d6650 (works)

civicrm/mailing/optout?qid=2118352&h=033856psn51n67or41&jid=85152&reset=1 (doesn't work)

I'm not sure why the order is different between the two, but noted that jid=851 is consistent across multiple optout links that work correctly. It also seems that each query parameter contains a couple of extra characters when compared to a functioning link.

Any theories about what might be going on here or where the extra characters in the query parameters may be coming from?

Also, if these are legitimate unsubscribe/optout requests, is there a way I can trace the query parameters back to the original user?

# Answer
> 1 votes
The `qid`is the mailing queue ID, which is unique to each combination of recpient and mailing. If you look in the database, you'll be able to work back to see which contact corresponds to the `qid`. If it's the same contact each time, you might consider excluding them or thinking about anything unique about them.

# Answer
> 1 votes
You are on the right track I think.

The error is occurring when the values for `jid`, `qid`, and `h` get validated.

`jid` is the job\_id and I wouldn't expect that the 85152 is a correct value (assuming your current job\_id is only up to 851 or so). Also the change in argument order, while it doesn't affect anything, there is no reason for them to get rearranged. It almost looks like someone is trying to hack your system. (Just a WAG on my part that.)

CiviCRM validates this by looking for matching values in the mail queue and if not found perhaps the error manifests as you are seeing. Thus, the error getting logged.

# Answer
> 0 votes
I had a bit of a look in the code-base & I couldn't find any evidence of the invalid url being constructed - ie. the qid first rather than last. I'm inclined to agree with Dave that the problem is someone either deliberately or accidentally 'trying it on' with urls

---
Tags: civimail, error-page
---


# Question
Title: API chaining like behaviour with import.php
Looking to use import.php function to do a big import.

I'm yet to find some documentation that clearly explains it all. Seen this:

https://civicrm.org/blogs/xavier/api\_batch\_tools

and this http://wiki.civicrm.org/confluence/display/CRMDOC/Imports

But I'm wondering - the way it works, in terms of using a csv that maps to an entity - is it possible in any way to chain entities in the same way the API works? i.e. create contacts with address and email etc in one CSV?

Thanks

J

# Answer
> 2 votes
I use CSV API import quite heavily - but if there's a way to do chaining, I'm unaware of it. I use an ETL tool (Pentaho Kettle) to script migrations, so I handle lookups there.

# Answer
> 0 votes
I assume you would be able to make it do it, but I do not think it works like that out of the box.

---
Tags: import
---


# Question
Title: Export participants with Membership data
If I'm right it used to be possible to export participants as csv with Membership data.

But it is not there any more in 4.4 and 4.6.

Is there a way how that could be done nowadays?

We need participant info and the membership type in one export.

It is also possible that the participant has no membership.

The only solution I do see now is to create smart groups for all membership types and also a smart group for people without membership. Then go to advanced search, select 1 of these groups, select the right event, display results as participants and export the participant fields and repeat this for all the membership types and the no-member group. Then Add all these csv's to one excel with a column for the membership type.

This is cumbersome and misses one key wish: We also would like to export the membership end-date in this csv. Any solution for it?

Oh, it is a Wordpress site, otherwise I would have tried Views

# Answer
> 2 votes
Perhaps a slightly less cumbersome approach might be to create smart groups for the participants in each event for which you want to pull this information (that might be a useful thing to have in any case - for example, if you need to email your participants), and then run a membership report or search for contacts by event participant group. You might even be able to get around the need to create multiple lists by trying the "Contribution and Membership Details" report, searching for people in your group with event fees (if you're charging for the event) and pulling the membership details for those folks.

Lesley

---
Tags: civievent, civimember, export
---


# Question
Title: How to allow anonymous profile editing on Wordpress
We have a Wordpress site with CiviCRM. Only a few administrative users are allowed to login. We need to be able to let anonymous users modify their contact information. Below is info I copied from the wiki. Is it possible to do this with a Wordpress installation? Is the information current? How would the link be created in the email? The scenario is that when a user renews their membership using the online form, they get a confirmation email. The email must have the appropriate link to the secure form used to edit the contact info.

http://wiki.civicrm.org/confluence/display/CRMDOC/Linking+Profiles

> Allow Anonymous (not-logged-in) Users to Edit Their Profile A great feature is to "invite" your non-logged in users the ability to view and edit their contact info via a profile using CiviMail. To do this, insert the following link with appropriate tokens as shown into a CiviMail message: http:///civicrm/profile/edit?reset=1&gid=N&id={contact.contact\_id}&{contact.checksum} ... where N is the ID of the Profile you want them to use for editing. The contact checksum token generates a special link that gives a user access to edit their information in that profile for 7 days from the day you send them the mailing.

# Answer
> 1 votes
the above should all be fine though that looks like a Drupal link. So if you want people to get a confirmation email when they pay for membership that contains a checksum link to a profile then I would suggest using a Scheduled Reminder triggered off a change of Membership status, and include

WordPress: http://www.myorganization.org/?page=CiviCRM&q=civicrm/profile/edit&reset=1&gid=N&{contact.checksum}&id={contact.contact\_id}

where N is the id of the Profile you have set up with the fields of 'contact related' data you want them to edit.

Check your links here

---
Tags: civimember
---


title: CiviContribute Payment Selection

text:
# Question
Title: CiviContribute Payment Selection
Ok, this is a little difficult to explain, but I'm going to try :)

A customer set up a contribution page for payroll deduction, so they would just select the "Pay Later" payment option, but, for some reason, they didn't select anything for the payment option when setting up the "Contribution Amounts" section. No warnings or anything came up that said it was required to select at least one payment option.

They made the contribution page live and sent it the specific organization for their employees to complete. When we went to pull the report, it had everyone that had completed the contribution form, but the amounts they selected weren't showing at all. Is this because no payment option was selected?

Is it possible to make it a requirement for contribution pages that you have to select some kind of payment option? Whether it be CC or Pay Later?

Hopefully this makes some kind of sense ;)

I really appreciate any info on this one because our customer is frustrated (even though they setup the form without checking with us).

Drupal 7 CiviCRM 4.6.8

If you need any screenshots or anything else, just let me know. :)

Thank You!! Nicole

# Answer
> 0 votes
I don't quite understand and am unclear whether you tried this yourself or not. I presume i don't understand, but here are a couple of factors.

1/ You should not be able to set up a Contribution Page with no options for specifying the amount.

**Contribution Amounts section enabled** If you want to enable the 'Contribution Amounts section', you need to either 'Allow Other Amounts' and/or enter at least one row in the 'Fixed Contribution Amounts' table.

2/ You should not be able to set up a Contribution page without offering either Payment Processor or Pay Later

**Sorry but we are not able to provide this at the moment.** A payment processor must be selected for this contribution page (contact the site administrator for assistance).

---
Tags: civicontribute, civireport, payment-processor, contribution-page
---


# Question
Title: Civi 4.4.6 forms not working with WordPress 4.3.1
After upgrading WordPress from 4.2.5 to 4.3.1, Civi Contribution forms return a blank page after submitting (clicking Confirm Contribution).

I would rather not downgrade WP but will if I have to. I don't have the resources to upgrade Civi at this time.

I've seen some similar issues reported here but don't have a solid lead yet. I will keep looking. Any help would be greatly appreciated.

# Answer
> 4 votes
Turns out it was the Jetpack plugin causing the problem and not the WP upgrade. I had installed Jetpack just after upgrading in an attempt to solve a different problem (unrelated to Civi). I should have tried disabling plugins before doing the downgrade, but previously no plugins were causing problems and I'd forgotten about the addition of Jetpack.

---
Tags: civicontribute, wordpress
---


title: Front-end Profile View Issues

text:
# Question
Title: Front-end Profile View Issues
I feel like I've run into these issues before but for the life of me cannot remember the solution.

I have a front-end profile listing, when you go to view the full profile, all the fields are clickable but the actions after the click are inconsistent. For example:

Click on a website URL - goes to the website Click on an email link - goes back to the profile list search results for that email address. Click on a custom field (note type) - goes back to the profile list search results for that field.

Obviously, the problem with the Bio field is the worst, and even though the field is set to NOT be searchable, you're able to click on it and search by it. Setting it to View Only didn't do anything.

Wordpress 4.3x CiviCRM 4.6.10

# Answer
> 1 votes
Since I'm not allowed to comment (what's up with that?), I'll ask for clarification here.

1. What results are you expecting for each type?
2. What do you mean by the 'Bio' field? Can you post a link?

---
Tags: wordpress, profile
---


title: CiviCRM settings file does not exist

text:
# Question
Title: CiviCRM settings file does not exist
Drupal 7.32, Attempted install of CiviCRM 4.6.9.

---

I do not yet have direct access to the server or database, that power rests in another's hands. Installation goes off without a hitch, all requirements clear and the 'Modules' overlay confirms CiviCRM is installed. Any attempt to enable CiviCRM produces the error:
> (Currently using CiviCRM settings does not exist CiviCRM settings file does not exist. It should be created by CiviCRM install)

It refuses activation.

# Answer
I'm a little confused here - you say that the Modules overlay confirms it's installed, but any attempt to enable it produces the error. You shouldn't have to enable it anywhere - you run the install page and then it is installed and automatically enabled in Drupal.

So on the modules page is it just listed there, or is it checked to show that it is actually turned on?

I want to make sure where we stand on that before looking at other causes.
> 1 votes

---
Tags: drupal, installation
---


title: individual - location-type work address

text:
# Question
Title: individual - location-type work address
examples

* Individual 1: Thomas Hess, work address bank of switzerland, 8050 Zürich
* Individual 2: Steven Müller, work address bank of switzerland, 8010 Zürich

So I have 10 individuals of this kind and each works in another office of this bank.

It is confusing to add 10 new organisation only to have a work address. And to add a Work address I need a field for the companie's name but there are only supplemental 1 and 2 field.

How can I add an work address?

# Answer
Let me think a bit on how I would tackle this. I suppose that if I was only interested in the work addresses of Steven and Thomas I would simply add the work address on the Individual contact level. If I am however interested in the employer/employee relationship as well I can see no other option than having each branch as an Organisation. I would probably add a contact\_sub\_type for this, something like 'local organization' with a relationship 'Local Branch of' with the main office so I have the whole pattern clear.
> 2 votes

# Answer
So you can create a single organisation (bank of switzerland, and put the address there), add a relationship between each of your individuals and the organisation AND check "share address" on each individual to automatically use the address of the organisation.

So if the bank of Switzerland decides to move its headquarters to the cayman island for fiscal optimisation, you're covered, Thomas and Steven will automatically have their addresses updated ;)

X+
> 0 votes

---
Tags: contacts, addresses, address-labels, location-type
---


# Question
Title: Is there a payment processor extension for Worldpay or do we need to create one?
Do we have a extension already in the community which allows us to use Worldpay as a payment processor? I have not found one. Do we need to create new payment processor extension for Worldpay?

# Answer
> 4 votes
It looks like there is experimental code available on Github for a Worldpay processor, which might need further development.

You may also want to explore the Omnipay extension. It doesn't list Worldpay on the extension page yet, but there is a driver for Worldpay with Omnipay that may just need some testing and/or minor tweaks to get running with CiviCRM using the Omnipay extension.

# Answer
> 3 votes
This is in production use on several sites https://github.com/circleinteractive/uk.co.circleinteractive.payment.worldpay

# Answer
> 2 votes
New extension Created - Alpha version has been released

Worldpay has two Gateway one

1. secure.worldpay.com
2. online.worldpay.com

So I have created an extension for online.worldpay.com which can be accessed using API In this no more redirection to worldpay site - for more info

https://github.com/rameshrr99/uk.co.nfpservice.onlineworldpay

---
Tags: payment-processor
---


# Question
Title: Cannot create CiviCRM view in Drupal "Error: Base table or view not found: 1146 Table drupal.civicrm
Drupal 7.41 CiviCRM: 4.6.9

Hi, new to CiviCRM and Drupal. Maybe I'm overlooking something but no matter what I try I cannot create a View from Drupal of any Civi data structure. For example, to show whether a logged in user is registered for a CiviEvent, I want to create a view of Civi\_Participant but get the error:

`Base table or view not found: 1146 Table 'drupal.civicrm_participant' doesn't exist`

Check setting.php file (a snippet of which is below). Looks fine. Prefix is set to nothing but that shouldn't be a problem since default is properly set:

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

`/** CiviCRM Views Integration
$databases['default']['default']['prefix']= array(
 'default' => '',
 'civicrm_acl' => '`civicrm`.',
 'civicrm_acl_cache' => '`civicrm`.',
 'civicrm_acl_contact_cache' => '`civicrm`.',
 'civicrm_acl_entity_role' => '`civicrm`.',`

Forgot to grant the drupal user SELECT access to the civicrm database? Don't think so. From mysql command line:

`mysql> SHOW GRANTS for dpal@localhost;
Grants for dpal@localhost |
| GRANT ALL PRIVILEGES ON *.* TO 'dpal'@'localhost' IDENTIFIED BY PASSWORD
| GRANT SELECT ON `civicrm`.* TO 'dpal'@'localhost'`

I tried another example where I tried to select civicrm\_contact and selected the 'Show SQL' option for my view. I get:

`SELECT civicrm_contact.id AS id
FROM
{civicrm_contact} civicrm_contact
LIMIT 10 OFFSET 0`

I'm no SQL pro by any means but how does that query address the database civicrm? Where's the reference to the database? This is why I get the error:

`Table 'drupal.civicrm_contact' doesn't exist`

Views is defaulting to the Drupal database, not the civicrm database even when selecting Show CiviCRM Contact, or CiviCRM Participants or CiviCRM PrettyMuchAnythingElse. How do I fix that?

I tried a query from mysql directly and this works:

`SELECT civicrm_contact.id AS id FROM civicrm.civicrm_contact;`

How do I get drupal to do that? What are those kooky curly brackets. {civicrm\_contact} .... Is that wrong?

Just in case you are wondering, yes, I am being driven crazy by this problem

# Answer
> 0 votes
I noticed something else.

Your code contains:

/\** CiviCRM Views Integration

Where /\* is the START of a php comment, but I see no end of the comment. If it is like that in your settings.php then everything after this is a comment to php, until the next \*/ And that would include your whole $databases\['default'\]\['default'\]\['prefix'\] array;

# Answer
> 4 votes
This is because you don't have `civicrm_participant` as a key in the array defined under CiviCRM Views Integration section. To make sure copy all the tables listed in UF Integration page to `settings.php` file.

1. Navigate to Administer -\> System Settings -\> CMS Database Integration
2. Copy and paste the `$databases['default']['default']['prefix']` array in settings.php file.
3. Save and clear the cache of your site.

More Information at : http://wiki.civicrm.org/confluence/display/CRMDOC/Views3+Integration

# Answer
> 1 votes
In views you can have the SQL be shown.

Are you able to run that sql when you login into the drupal database with the drupal login credentials?

Likely you can not but that would often give more information about what is wrong.

# Answer
> 1 votes
Yes, that was the problem. I forgot the ending \*/

I just donated $25 (about $9000 Canadian) to CiviCRM. My 'dumb' tax. It's like a swear jar. But if I had to contribute to that over the last few days CiviCRM probably would have met their $200,000 goal.

Why do computers do what they're told to do and not what we intended them to do?

Thanks all. All tips provided great help in getting to know more about CiviCRM.

# Answer
> 0 votes
Drupal caches can be the issue here. Trying clearing them then refreshing the View.

# Answer
> 0 votes
Yours looks slightly different than mine and I wonder if that could in any way be causing the issue. I am assuming your database just has a name and isn't formatted like this: username\_databasename which is how my server requires my databases to be called.

$databases\['default'\]\['default'\]\['prefix'\]= array( 'default' =\> '', 'civicrm\_acl' =\> '`databasename`.',

Notice that mine doesn't have a space and it has extra punctuation before the name of the database begins.

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


title: The dashboard does not render

text:
# Question
Title: The dashboard does not render
The dashboard when I log in to CiviCRM does not render, it just continues to say "loading". I have tried:

* refreshing dashboard
* reconfiguring dashboard
* going to another page and coming back to dashboard.

I can't see any obvious errors in the javascript console in Firefox (firebug) or Chromium. There are no errors in the apache logs either.

CiviCRM 4.6.4, Wordpress 4.2.1, Apache 2.4, PHP 5.6.9-1, Mariadb 10.0, Debian Wheezy/Sid hybrid

# Answer
> 6 votes
A few things may cause issues like this.

## Webserver cannot make HTTP(s) requests to itself

If CiviCRM / PHP cannot make a request to the CiviCRM site itself, it will be unable to retrieve the dashboard data. This can happen for multiple reasons:

* Webserver is behind a proxy and proxy does not permit requests from internal network
* Webserver has DNS which won't deliver request to the webserver
* Webserver is not permitted to make HTTP requests
* Webserver fails SSL negotiation (PHP5.6 requires a valid certificate chain installed, see note below)

## Misconfigured base URL / access URL

CiviCRM requires a single configured canonical base URL, and it *might* be that if this doesn't match the URL you're using then CiviCRM won't handle the dashboard requests correctly. Check that the value defined for `CIVICRM_UF_BASEURL` in your `civicrm.settings.php` corresponds to the URL you're using - including both schema (`http://` or `https://`) and hostname (`example.org` or `www.example.org`).

Because this can cause various issues, I recommend setting up an automatic redirect to prevent visitors viewing the site via the "wrong" URL (which will appear to work fine, except when it doesn't). See your webserver's documentation for how to do this - I think both Drupal and WordPress `.htaccess` files contain example rewrite snippets?

## PHP5.6 and SSL sites

A few reports are surfacing of the changed default in PHP v5.6 affecting sites ability to connect to themselves (and to CiviCRM.org). In addition to having your SSL certificate correctly installed, PHP requires a correctly installed certificate chain to connect to SSL sites (including the local site). If your CA chain is outdated on the webserver, this may lead to failed dashboard and other issues when communicating with remote sites using SSL (payment processors, CiviCRM.org, and local requests such as dashboard widgets and API over HTTP).

# Answer
> 2 votes
This can also happen if you have an authorised CiviCRM user who does not have a contact record i.e. you haven't sync'd users to contacts. I've only seen this where Drupal was the CMS, but it was 100% reproducible.

# Answer
> 1 votes
I faced this issue and had to reinstall (not duplicate) the wordpress site using the following procedure: 1. exported content using wordpress export 2. copied theme folder and uploads 3. clean install of wordpress 4. install civicrm 5. enabled theme 6. import of content

This was not due to active plugins. Something must of become corrupted in WordPress.

# Answer
> 1 votes
Just FYI, I had a problem where my dashlets would not load after upgrading from Apache 2.2 to 2.4. We have https with a certificate from Comodo and the problem was that our security certificate was no longer installed correctly after the upgrade, somehow causing Civi not to be able to load the dashboard.

Browsers were still recognizing the certificate, so at first I didn't know there was a problem with the certificate. I needed to move the chain/bundle certificates over to the main SSLCertificateFile file (chain file certificates were deprecated in Apache 2.4). As soon as I fixed the certificate and reloaded Apache, back came the dashboard!

---
Tags: dashboard
---


# Question
Title: Add extra field to group contact - relation
Is it possible to add an extra field to the group contact relation ?

I have contacts grouped but in these groups they all have different functions.

**For example**:

```
User 1 connected to Group 1 - Function of user 1 in group 1 is "chairman"
User 1 connected to Group 2 - Function of user 1 in group 2 is "secretary"

```

# Answer
I fixed it!

On the custom fields page I've added a set of fields connected to "group". I named these fields "chairman, secretary,etc.". I choose the contact reference fieldtype. So i can choose which user is chairman, etc. All this info (group, groupmember, function) I can display in a view in Drupal.
> 0 votes

# Answer
If i understand correctly, in your example, you have 2 organizations contact called "Group 1" and "Group 2" and one individual contact called "User 1".

In that case, I can think of several way of doing what you want :

1. create different relationship type "Chairman", "Secretary", ... and use the proper relationship between the contacts. This way, you will see in the tab Relationship all the information you need
2. Have one type of relationship (e.g. Employee) and add the function in the description. The description is visible in the Relationship tab so it will give you a quick way to see the function but it is less obvious in a user experience point of view that description = function
3. Create a custom field "Function" on the Relationship type that you want. The drawback is that your custom field won't be visible from the Relationship tab without clicking on the "View" link for a particuliar relationship.
> 2 votes

# Answer
What you could do is use a organization contact type for the groups and then define relationships. E.g. group 1 is then a contact and chairman is a relationship between group 1 and an individual
> 1 votes

---
Tags: contacts, groups
---


# Question
Title: Strict warning: Non-static method CRM_Core_BAO_UFGroup::profileDisplay()
As administrator I get the following error message:

```
Strict warning: Non-static method  CRM_Core_BAO_UFGroup::profileDisplay() should not be called statically in CRM_Core_BAO_UFGroup::profileDisplay() (line 2790 of <host>/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php).

```

I know I can suppress such error / warning messages via Drupal and/or amending civicrm setting somewhere. But it is annoying that these messages are there at each transaction. Is there a fix?

Thank you.

David

# Answer
Can you check if you are on the latest version civi?

To fix your notice, you/a developer need to correct civicrm source code, ie. modify CRM/Core/BAO/UFGroup.php so it doesn't call statically the method, or change the method so it's a static one.

the change in itself is a one line of code, but checking what else is calling that profileDisplay method and if it's always static or some are using it "normally" needs a bit of analysis.

Once you have done that analysis and tested it locally (in a civicrm installed from git), you need to fork civicrm-core, commit your change on your repository and do a pull request

It's hopefully pretty clear in the wiki... and not as complicated as it might sound, come on IRC if you get blocked on your way: http://wiki.civicrm.org/confluence/display/CRMDOC/Contributing+to+CiviCRM+using+GitHub
> 2 votes

# Answer
If you are hitting this on the latest 4.6 you should log an issue in JIRA. It looks like this

public function profileDisplay($gid, $values, $template) {

needs to be changed to

public static function profileDisplay($gid, $values, $template) {

ie https://github.com/eileenmcnaughton/civicrm-core/commit/768f4db1f6f150e0dde0700561be378587fa8a3d

I don't see any evidence of this being called from more than one place- but try a quick grep to confirm
> 2 votes

---
Tags: profile
---


# Question
Title: customize search field in Contact Reference Field
In "New Membership" I need to search the contacts by External ID instead of default "name or email". Is there any smart solution for this?

# Answer
First, it can't be done without coding and it may not be an easy task.

I can think of 2 possibilities :

1. Change search api

When you do a search, the api that should be called is Contact.getlist, so the first step is to see if the api is able to do what you want. It seems to be possible to change the search from "name or email" to "external\_identifier" but i can't find a way to do "name or email or external\_identifier".

```
$result = civicrm_api3('Contact', 'getlist', array(
  'sequential' => 1,
  'input' => 4398,   // the text searched
  'search_field' => "external_identifier",
));

```

The problem i see is, if you change the default api behavior, it will be changed everywhere. I don't think you have the context here.

If you find your way, you will then have to implement the hook\_civicrm\_apiWrappers to change the api call as needed.

2. Change the ui

Replace the default CiviCRM search by a custom one that will call a custom api
> 1 votes

---
Tags: civimember, contact-reference
---


# Question
Title: Why aren't State options non-default countries (outside UK) showing for billing address on the contribution page of a webform?
Drupal 7.39 CiviCRM 4.5.8 Webform Integration 7.x-4.11

I've got a webform to capture membership info and payments.

To share the address with related contacts, Contact 1's address is captured twice, once in a main details section and again on the final contribution page.

When entering the first address the country and state fields work fine. If a non-uk address is selected the expected state/province fields are available to select. (The organisation already has a number of overseas members).

United Kingdom is the default country in localization settings.

On the contribution section, the uk states appear as default. If Uk is deselected and another country chosen the state field displays only the UK options.

When accessing the related contribution page directly the address fields behave as expected. States list populates dynamically from the chosen country.

The contribution page is configured specifically for use with the webform so no profiles are included the profile tab.

I've tried deselecting uk as default and leaving that for the user to choose. But that meant no states at all were displayed in the state box on the webform.

State/Province is configured as a required field on the webform contribution page so leaving it set to none means payments can't be configured.

As it stands the form can be used for domestic membership sign ups, but cannot be used by prospective overseas members.

Has anyone seen anything like this before? Any pointers to settings I need to amend?

Thank you!

# Answer
I had this problem too on the main Civi911.com checkout form, and then I was all the more sheepish when it turns out the issue was reported by my coworker Tyrell for one of our clients! It's a bug in 7.x-4.11 and earlier: https://www.drupal.org/node/2516936

If you upgrade, the state/province in the billing address should update along with the country.
> 3 votes

---
Tags: webform-civicrm, contribution-page, addresses, localisation
---


# Question
Title: Is there a function that will execute multiple SQL statements?
I'm writing an extension that needs to make a bunch of temporary tables and copy data around. I think CRM\_Core\_DAO::executeQuery() only executes one semicolon-delimited statement at a time. Is there a function somewhere that'll let me run them all in one go?

# Answer
> 3 votes
Yes, there is such a function; but you shouldn't use it.

Make each query separately and check the result.

Avoid functions which make multiple SQL queries in one action, as they make it harder for your application logic to handle unexpected cases.

* `CRM_Core_DAO::executeQuery()` executes a single query against the DB - *use this.*
* `CRM_Utils_File::sourceSQLFile()` does what your question asks - *but don't use this.*

**Why not `CRM_Utils_File::sourceSQLFile()`?**

The pattern of loading a `.sql` file in as a single set of queries via `CRM_Utils_File::sourceSQLFile();` has issues IMO. It's one of the brittle points where I've most commonly seen sites (especially customised ones) fail on upgrades.

The cause for this is that it's a context switch in your code - when you load multiple queries in via `sourceSQLFile()`, you lose the ability to respond to a failure in any given one. Whether it's the first query which fails, or the second to last, `sourceSQLFile` is going to do no more than echo back a failure message OR `die()` \- it doesn't return a result or throw an exception.

Code using this approach has to do extra work to handle failures - or assume they never happen, which is what this function IMO encourages. Looks like there are other things to be wary of there (eg no warning if `$fileName` doesn't exist).

**Why is calling each query separately, eg via `CRM_Core_DAO::executeQuery()`, better?**

In contrast, calling each query via `CRM_Core_DAO::executeQuery()` (or its future replacement) means your code can check the result of each query, and based on that information proceed with further queries OR handle the case of a failure in that executed query.

I think you'll be better served by taking a more diligent approach and calling each SQL query with context to handle the result each time.

# Answer
> 0 votes
Please create Extension using civix (civix generate:module)

After creating an Extension just Add a database upgrader / Installer / uninstaller

me@civisys:/var/www/extensions/com.example.myextension$ civix generate:upgrader

In this process you can find a SQL folder in the Extension just add all your SQL query against this folder with file ending with \_install.sql

each SQL line should end with semi-colon

Now uninstall you extension and then install it again all SQL would have been executed

Please refer the below link for more Explanation http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension

---
Tags: sql
---


title: DKIM - configuration question - HOW?

text:
# Question
Title: DKIM - configuration question - HOW?
I'm trying to setup DKIM. Where does the private key get input? I've searched docs, and not finding anything. Using my hosting companies mail().

All good on SPF setup, creating keys, setting in DNS, but... can't find where to put the DKIM private key.

Thanks in advance!

Clark Hodge - Chase the Music

# Answer
> 5 votes
You probably have to ask your hosting provider to do this.

CiviCRM doesn't have an interface to provide DKIM keys; OpenDKIM runs as a separate process alongside the MTA on your hosting environment.

Your key will most likely end up in `/etc/opendkim`, but that really depends on your hosting environment. DigitalOcean have a pretty straightforward DKIM HOWTO for Debian, if you have control of your server.

---
Tags: civimail, wordpress
---


# Question
Title: accessing CiviCRM dashboard link for first time fails
Virgin Wordpress Install - The install seemed to go fine - all green.
Clicking the CiviCRM link in the dashboard link gives DB Error: unknown error

# Answer
> 1 votes
I did a re-install. Curiously, when I downloaded the instal again, there were more files. Anyway, I have now moved the problem on to getting a white screen. I guess that's progress. Will close this question.

# Answer
> 0 votes
There's no way to know what the problem is without enabling debugging. Go to http://yoursite.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/debug&reset=1 and see if you can turn on enable debugging. That will display the actual query and MySQL error when you get this again.

---
Tags: wordpress
---


title: Getting error message upon installation

text:
# Question
Title: Getting error message upon installation
Getting this error message just as I am trying to set things up should I be worried?

`0

 Sorry but we are not able to provide this at the moment.
CiviCRM 4.6.10 requires MySQL trigger privileges.

Return to home page.

 < script language="JavaScript"> function toggle( element ) { var className = element.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { element.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }< /script>`

# Answer
> 1 votes
I don't know why all that HTML markup was displaying for you--that's a bit of a bug. However, the real error message is in there: **CiviCRM 4.6.10 requires MySQL trigger privileges.**

The MySQL user that CiviCRM and Joomla use for connecting to the database needs to have the ability to create triggers. You or whoever maintains your server will need to grant that permission to your database user before you proceed.

---
Tags: database, mysql, installation
---


# Question
Title: How can I find contribution pages or membership pages where Profiles are used?
I can see a list of all custom profiles It says

Name: **Membership Details**
Type: **Membership::: : : : : : : : Teaching Member-EATA**
ID: **13**
Used For: **Standalone Form or Directory**

When I click on **Find Members** link from civicrm menu i.e. https://www.example.com/civicrm/member/search?reset=1

In the image(of Find Members link given above) below I can see CTA Member,Teaching Member,Teaching member EATA as profile fields in member search link given above. But I need to find where is this profile used in like a contribution page id 24 or something else Is there anyway I can to find out ?

# Answer
If you have access to your db then you can look for the field in the civicrm\_uf\_field and look for the uf\_group\_id, then look in the civicrm\_uf\_group table to see which Profile it is used for, and then look in the civicrm\_uf\_join table to see where those uf\_group\_id are used. EG you may see that uf\_group\_id xx is used for civicrm\_contribution\_page that has entity\_id yy
> 1 votes

---
Tags: civimember, profile
---


# Question
Title: How can I stop civicrm_metatag_metatags_view_alter() altering non-CiviCRM URLs
The purpose of function civicrm\_metatag\_metatags\_view\_alter() is to ensure the metatag URLs include the query parameters. The problem is that it acts on non-CiviCRM pages.

'Metatag' is a Drupal module for adding tags to the rendered HTML, and this function is in drupal/civicrm.module.

**Proposed solution**

civicrm\_metatag\_metatags\_view\_alter() should be modified to only work on CiviCRM pages. With all kudos going to @Chris-Burgess I've created an issue CRM-17594 and PR https://github.com/civicrm/civicrm-drupal/pull/328 to resolve this.

**My question: How do I check that a URL is a CiviCRM URL?**

As discussed below, the answer is to check if arg(0) equals 'civicrm'.

**Description of problem**

I get the following PHP Notice ...

> Notice: Array to string conversion in \_civicrm\_get\_url\_parameters\_as\_url\_string() (line 295 of .../sites/all/modules/civicrm/drupal/civicrm.module).

A page where this occurs is http://citybibleforum.org/library?&title=&field\_speakers\_tid=&field\_topics\_tid=&field\_bible\_reference\_value=&field\_episode\_date\_value%5Bmin%5D=2011-08-12&field\_episode\_date\_value%5Bmax%5D=2012-08-12&field\_is\_audio\_value=All&field\_is\_text\_value=All&field\_is\_video\_value=All&page=46

The parameters causing the notice are ...

> field\_episode\_date\_value\[min\]=2011-08-12&field\_episode\_date\_value\[max\]=2012-08-12

# Answer
> 0 votes
I'd recommend a check to test that the Drupal path (eg `current_path()`) commences with `civicrm`. This is untested, but I think you want something like the following -

```
/**
 * Alter metatags before being cached.
 *
 * This hook is invoked prior to the meta tags for a given page are cached.
 *
 * @param array $output
 *   Metatags to be displayed.
 * @param string $instance
 *  Context.
 */
function civicrm_metatag_metatags_view_alter(&$output, $instance) {
  if (arg(0) == 'civicrm') {
    $linkUrls = array('og:url', 'canonical', 'shortlink');
    foreach ($linkUrls as $url) {
      if (isset($output[$url]['#attached']['drupal_add_html_head'][0][0]['#value'])) {
        $output[$url]['#attached']['drupal_add_html_head'][0][0]['#value'] .= _civicrm_get_url_parameters_as_url_string();
      }
    }
  }
}

```

I don't really like the look of the fixed `[0][0]` in that code either?

If you're submitting a fix, you should check out CRM-16495: Metatag canonicals are broken, q is multiplied which looks like it fixes the error message you're experiencing also. That fix is committed to 4.7 now.

I think your proposed solution is correct, CiviCRM shouldn't be messing with metatags if it hasn't been involved in the page generation.

---
Tags: drupal
---


title: Custom fields in CiviGrants

text:
# Question
Title: Custom fields in CiviGrants
I have just added some custom fields to grants but they dont show in reports - what have I missed? How do I get them to show up and be available in reports?

Cheers - Phil

# Answer
> 3 votes
Did you make the custom fields 'searchable'?

Because then they should pop up in your report. I tried it on the civi demo (http://d46.demo.civicrm.org/civicrm/report/instance/29?reset=1) and there they showed up.

---
Tags: civireport
---


# Question
Title: How do you display cross-contact searches?
I am trying to create a CSV using both Individual contact and Organisation contact information and I am having difficulty trying to achieve this.

As it's most basic it is to print postal labels containing:

* The Individual with a specific relationship (there is only one per Organisation)
* The Organisation display name
* The Organisation address

The way that I thought most logical to do this is:

1. Open the Smart Group with all the organisations (filtered by the organisations membership status)
2. "Select All" and "Export Contacts"
3. Include field "Individual" \> "Relationship (under related info for)
4. Include the Organisation fields

The exported file leaves the individual field blank though.

I am using Civi 4.4.14 and Drupal 7.39

# Answer
Try creating a smart group of the indiviuals - you should be able to search for all individuals with that particular relationship. You can then export the contact info.

When exporting, you'll need to select 'Individual' \> Relatonship (e.g. 'Employee of')' \> Organisation details for each of the address fields

Actually, thinking about it, that might be the problem with your attempt - try selecting the export field 'Organisation' \> Relationship (e.g. 'Employer of') \> Individual details.
> 1 votes

---
Tags: relationships, export
---


title: CiviGrants - view an extra field

text:
# Question
Title: CiviGrants - view an extra field
Quick question - How do I get the rationale field to show up under the Grants tab for a contact? Can this be done without access to the "backend code"?

Cheers - Phil

# Answer
> 1 votes
Short answer: no - you would need at least a little bit of code to achieve this.

---
Tags: civigrant
---


# Question
Title: PayPal Pro - how to remove link to paypal
I have civicrm 4.6.10 installed under drupal 7.41 and we paid extra for PayPal Pro to avoid linking to paypal (i.e. leave the site). How do I remove the button that lets you link to PayPal? The rest works fine.

# Answer
> 3 votes
My understanding is that part of your agreement with PayPal is to offer the option to pay with PayPal. While you could use jQuery to hide the button or alter CiviCRM's code to remove it from display, you've promised PayPal that you won't.

There are stories (urban legends or actual instances, I'm not sure) of PayPal going after folks who hide the Pay with PayPal button.

Even if you don't care about that, CiviCRM will never remove the button so long as it's required by the agreement, so any code you write will have to be maintained as you upgrade. This is a real cost that you should weigh against this.

Separately, we have clients who swear that many of their donors *prefer* to use PayPal, so that's another reason to leave it as-is.

# Answer
> 0 votes
I tried a Simple answer -

The button image is the last entry at the bottom of your paypal pro payment processor setup page and I removed the button url image that would display on the link for the user to access paypal. The setting lets you enter the button image to use (select one from Papal's list of image urls). If not there, then no button is displayed but the link is still available and now it has a fuzzy description - and all the credit card images disappeared. I expected it to do "nothing".

I'm going to look for a way to hide the button/link.

Any other suggestions?

---
Tags: drupal, paypal
---


# Question
Title: Upgrade from 4.3.1 to 4.6.9 (Joomla) = fails; DB upgrade freezes
It reports (on DB upgrade screen): "\[Executed: Finish Upgrade DB to 4.3.8\]"

We let it run for over over an hour; stayed stuck.

A previous attempt got stuck at v.4.4.3.

(This upgrade is being attempted first on a DEV install, too.)

We've read ***many*** forum posts about this issue, here and on CiviCRM.org forums.

There is urgency about this problem (why, of course there is!). We can't/won't attempt the update on the LIVE site until we have confidence—unless someone can authoritatively link this problem to a migrated install, etc.

Thanks in advance for help and advice!

# Answer
Are you upgrading directly from 4.3.1 to 4.6.9?

If not, it might be worth trying a more incremental upgrade (e.g. 4.3.1 to 4.3.7, then 4.3.7 to 4.3.8 in case there's a sticking point there, then 4.3.8 to 4.3.11, 4.3.11 to 4.4, and so on - it's tedious, but may stop the upgrade from stalling, or give you an error message you can follow up.
> 1 votes

---
Tags: joomla, upgrade, database
---


# Question
Title: Database constraint error on enabling CiviCase
I'm running civicrm 4.4.20 on the latest Joomla 3.4.5. When I try to enable CiviCase I get an database constraint error (see below).

```
[code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] =>
      INSERT INTO `CIVICRM_OPTION_VALUE` (
        `option_group_id`, `label`, `value`, `name`,
        `grouping`, `filter`, `is_default`, `weight`,
        `description`, `is_optgroup`, `is_reserved`, `is_active`
      ) (
        SELECT
          @option_group_id_case_type, 'Housing Support', @max_val + 1, 'housing_support',
          NULL, 0, 0, @max_wt + 1,
          'Help homeless individuals obtain temporary and long-term housing', 0, 0, 1
         FROM   DUAL
         WHERE  NOT EXISTS (SELECT command.plist infoShowed
                            FROM   `CIVICRM_OPTION_VALUE`
                            WHERE  `name` = 'housing_support')
      )
    [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`xxx_joomla`.`civicrm_option_value`, CONSTRAINT `FK_civicrm_option_value_option_group_id` FOREIGN KEY (`option_group_id`) REFERENCES `civicrm_option_group` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error

```

# Answer
> 1 votes
Resolved. I found the code that was inserting the sample data. It was first pulling from option\_group where name=case\_type. For some reason my database did not have this row - so the subsequent line inserting into option\_value with the retrieved id of the option\_group row failed.

I manually inserted a row into option\_group with name of case\_type. (I used "Case Type" for both title and description and set the is\_active column and is\_reserved column to 1 and is\_locked to 0.

This got rid of the error.

---
Tags: civicase, database
---


# Question
Title: CiviReport Participant Sort by Event Start Date
I am trying to create a report that lists the participants for upcoming events (each day for the next 14 days), sorted by event start date as the section header. Event Start Date is not listed in the Column dropdown.

Event Start Date -Event type --Participant Name 1 --Participant Name 2

Next Day Start Date -Event type --Participant Name 1 --Participant Name 3

I saw this thread that gives me hope, but it doesn't specifically say how it was fixed. I've scoured the web trying to find a solution, but have come up with nothing else.

# Answer
> 1 votes
Yeah, it's pretty silly that event start date isn't available as a header. It's actually a really small change in the code, but it does require editing the code to add the field as an sorting option.

I made a change that will hopefully be included in the next 4.6 release, but you can add it by editing the appropriate file. In your CiviCRM codebase (found at sites/all/modules/civicrm in Drupal, administrator/components/com\_civicrm/civicrm in Joomla, or wp-content/plugins/civicrm/civicrm in WordPress), edit the file at `CRM/Report/Form/Event/ParticipantListing.php` to apply the changes you see here: https://github.com/civicrm/civicrm-core/pull/7221/files after line 299.

---
Tags: civireport, joomla
---


# Question
Title: Disable automatic activity email to assignee
Is there a way to disable the activity summary email that is automatically sent out to the activity assignee?

Thanks

# Answer
Go to Administer -\> Customize Data and Screens -\> Display Preferences

Uncheck the "Notify Activity Assignees" box
> 6 votes

---
Tags: activities
---


title: "Content-ID" in email attachments

text:
# Question
Title: "Content-ID" in email attachments
I need to add image(no public) in a email. Initially I tried "Inline Embedding" but gmail, ... block the images, now I'm trying to add with "CID Embedded Images"

Exist some way to add the Content-ID in the attached files.

`$params["attachments"][] = array(
 'fullPath' => $output,
 'Content-ID' => 'attachementsignature' //Something like that
 );`

Info "Inline Embedding", "CID Embedded Images" in https://sendgrid.com/blog/embedding-images-emails-facts/

# Answer
> 1 votes
@Sudesh After apply the patch, I used a token, because i needed a custom field in the image, maybe works for you(the answer don't fit in comment :S)

The cid require a mail format for example foo@ba.org

```
hook_civicrm_tokenValues( &$values, $cids, $job = null, $tokens = array(), $context = null ) {
...
 $values[$key]["xxx.app_signature"] = '<img alt="Embedded Image" src="cid:foo@ba.org" >' . '<tagimagetoken>' . $config->customFileUploadDir . $result_image["uri"] . '</tagimagetoken>';

```

And later replace the token with correct value in the mail hook

```
hook_civicrm_alterMailParams(&$params, $context) {
  $regex = "/<\s*tagimagetoken[^>]*>([^<]*)<\s*\/\s*tagimagetoken\s*>/";
  preg_match_all($regex, $params["html"], $output);
  if(isset($output[1][0])) {
    $params["html"] = preg_replace ( $regex , "" ,  $params["html"]);
    $params["attachments"][] =  array(
      'fullPath' => $output[1][0],
      'content_id' => "foo@ba.org",
      'c_type' => "image/png",
      'is_file' => TRUE,
      'is_image' => TRUE,
    );
  }
}

```

And in the email put the token

# Answer
> 0 votes
In package Mail exist the method "addHTMLImage" https://github.com/civicrm/civicrm-packages/blob/master/Mail/mime.php#L332

The patch fix in the actions contact "Send a email"(not in component civimail).https://github.com/rubofvil/civicrm-core/commit/aa11061457da792f6678786ede446422fc450e36

I'm sending the parameters in the hook\_civicrm\_alterMailParams

```
$params["attachments"][] =  array(
  'fullPath' => $output[1][0],
  'content_id' => "attachmentsignature",
  'c_type' => "image/png",
  'is_file' => TRUE,
  'is_image' => TRUE,
);

```

Next Issue: With the patch CiviMail put in content-id the email in some point. The image it's attached inline but with incorrect content-id.

---
Tags: civimail
---


# Question
Title: (How) Is it possible to add text-links to a report?
This is to create a dashlet - hence links do make sense!

I know how to add a column to an existing template and create a new report template from scratch.

In each case my limitation is that I am reliant on database fields.

In the dashlet template that comes with CiviCRM I see this:

```
{sClass:'crm-contact-activity-links', bSortable:false},

```

But I don't know how to use this in a report.

I am editing a copy of the Activity Report template (safely copied to my custom php folder)

# Answer
In this case of altering an existing template - find the function that controls how the activities are displayed and setting the $viewLinks variable to True - as shown below.

```
public function alterDisplay(&$rows) {
    $entryFound = FALSE;
    $activityType = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE);
    $activityStatus = CRM_Core_PseudoConstant::activityStatus();
    $viewLinks = TRUE;
    $context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'report');
    $actUrl = '';

```
> 2 votes

---
Tags: civireport
---


# Question
Title: How can I suppress parts of the date in a report
I am modifying the activity report for use in a dashlet.

The activity date ('civicm\_activity\_activity\_date\_time') is currently displayed as November 18th, 2015 2:00 PM

I can change the format of a date using CRM\_UTILS\_DATE::customFormat, but since this is a report of this current week's activities, what I really want to do is shorten it all by suppressing the month and the year altogether - (and even converting the date to a day)

Is there a CiviCRM way to do this?

# Answer
> 1 votes
I would just revert to either to `DateTime()` or `date('D', strtotime($dateField))`

---
Tags: custom-reports
---


# Question
Title: Is it safe / wize to empty civicrm_log table
Pretty similar to this question, we've moved LOG\_tables to another database; however, there is civicrm\_log table among "main" tables still (not sure why, since it keeps log records and, in theory, belongs to LOG\_tables group). Size of civicrm\_log table in our case grows pretty fast (80M at time i'm writing this), second biggest table in the db. We may need these records in a future, but moving table out of current setup makes it inaccessible for civi searches / reports. Keeping it makes simple database backup (via phpmyadmin) somehow troublesome. So, in case deletion will be chosen, is it safe to flush it?

# Answer
> 1 votes
Nothing stopping you flushing it but you will lose transitional information and any log data unless you also have audit logging switched on. You could keep a backup of it in a separate database if you need to stop it becoming a problem.

---
Tags: database, logs
---


# Question
Title: Hiking Club Membership and Hike Recording
We're a small hiking club in South Africa, around 150 members. Our old software is no longer adequate and we're looking for something that will handle our membership as well as our portfolio of hikes. Our current software generates reports that re what hikes members have done, distance covered etc.

Is CiviCRM the right solution or a bit of overkill?

# Answer
I think CiviCRM would work well for your needs. Obviously, you wouldn't need to use every feature. In combination with a Drupal, Joomla, or WordPress site, you could have a signup form for new members and events for each hike. In Drupal, you could use Views to display upcoming hikes, or in WordPress, you could use the CiviEvent Widget plugin (shameless self-promotion).

It's simple to see what hikes someone has participated in, either on their contact record or in flexible reports. It's also straightforward to give multiple leaders access to administer the system--unlike other systems that charge extra for each administrator.

One note: in CiviCRM, the word "member" is used for someone who pays dues to get a membership that has a fixed term. (There are free memberships and lifetime memberships, but those are generally used alongside paid and/or time-limited alternatives.) Many organizations consider "members" to simply be people on the mailing list. If that's how you all use the term, you can simply ignore or turn off the CiviMember features.
> 2 votes

# Answer
That is almost impossible to answer :-) CiviCRM is certainly used by smaller organizations too, and there is no reason why it should be total overkill if you have 150 members. It depends on what your processes are and what your information requirements are,and as you have not listed them it is hard to give an adequate answer.

You could certainly ad custom fields to CiviCRM for each member for the kind of information you do sketch, and could get that information in a report.
> 0 votes

---
Tags: evaluating-civicrm
---


# Question
Title: Is the text-link field broken in D7 views integration?
When creating a view in Drupal 7 to display CiviCRM activities (v 4.6) there is a text-link field available.

On selecting this field it can be configured to perform contact actions or activity actions (view, edit, delete) and set the link text as well as label.

I'd expect this to provide one of the text links we are all familiar with from the CiviCRM interface - however, when configured for activities, the result is that no data is displayed at all. There is no error message, the content is no longer displayed.

This happens regardless of the display settings (table, grid, calendar etc) for the view.

Is this field known to be broken, or should I persevere?

I have come across a similar problem before although this is marked as fixed in 4.6:

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

# Answer
I think the fix is in 4.7 - I have the same problem in 4.6.10.

There is a workaround - you can set any of the other fields as a link to the activity.

In your chosen field (I used the Activity Subject), go to 'Rewrite results' and select 'Output this field as a link'. In the Link path field, add:

civicrm/activity?action=view&reset=1&id=\[id\]&cid=!1

Then apply the change and save your view. This gives a link to the activity - if you want an edit link, try:

civicrm/activity/add?reset=1&atype=&action=update&reset=1&id=\[id\]&cid=!1&context=activity

Views will replace \[id\] with the activity ID and !1 with the contact ID

(If you want a text link separate from the other fields, add a Global custom text field and set it to rewrite as a link)
> 2 votes

---
Tags: drupal-views
---


title: Do CiviCRM Extensions Cost Anything?

text:
# Question
Title: Do CiviCRM Extensions Cost Anything?
Do the CiviCRM extensions cost money or are they free?

Sorry, very new to all of this. Trying to compare open source with something like Salesforce. So with Salesforce they have a kind of app store where you can buy things made with salesforce CRM?

Thank you in advance, Chloe

# Answer
> 10 votes
Like CiviCRM, its extensions are currently without any upfront or ongoing licensing fees. People are free to offer paid extensions, but I am not aware of them.

You are free to use, modify and share the code. If you benefit from Free and Open Source Software (FOSS), you are encouraged to contribute back to the community.

# Answer
> 5 votes
Not a direct answer to your question, but an important thing to remember, is that nothing is completely 'free'. Specifically, every piece of code you add to your installation has a cost to you in installing, configuring, testing, maintenance and machine cycles.

The extension architecture is a fabulous way for the CiviCRM community to share their code, but there's no guarantees with it, so you need to make sure you know what you're doing before enabling too many of them.

# Answer
> 4 votes
You can find a list of many extensions here \- you should be able to install and use most of them more or less "out of the box".

In addition there is a bunch of extensions that are not in the extension directory for various reasons (too specific, not yet stable enough...) which are usually also free.

Especially if you want to use those but also if you have complex requirements/workflows you may require some customization or support in order to efficiently use extension. This may require some funding but I don't think it would be different with another system such as salesforce.

---
Tags: extension
---


title: Testing event registration

text:
# Question
Title: Testing event registration
I've created an event and I'd like to test my registration forms. I go to Event Manager and select the "Test drive" link. The registration page won't display. I get error "The event you requested is currently unavailable (contact the site administrator for assistance)." I suspect it is because the event is disabled. However, if I enable the event, users can see it. That sort of makes the ability to test it useless. Am I doing something wrong here? Is there a way to test a disabled event registration? Thans.

# Answer
Currently the event needs to be active to use the test drive.

If you have an event listing page, you can uncheck Public event. That way users only see the event if you create a link to it. You should be safe in temporarily making it active for testing.
> 1 votes

---
Tags: civievent, registration
---


# Question
Title: Change Drupal username when auto creating using tags
I'm using Pete's great way of creating Drupal users by adding a tag, but was wondering (as Michael McAndrew did in the comments on that page) how a different username could be auto-created, e.g. email address or even firstnamelastname. (Presumably the Rule would fail if a duplicate username occurred?)

And bonus question: on the same page Coleman mentioned potentially using Rules to remove the tag and clean up, but I can't work out which action this would be under. Any pointers?

# Answer
There's an unreviewed patch to the CiviCRM Entity module that tackles this.

To clean up and remove a tag, you can easily set up CiviRules to just delete a tag as soon as it's created.
> 1 votes

---
Tags: civicrm-entity, tags, drupal-rules, user
---


# Question
Title: Why do the contribution page amount labels now appear before the amounts?
All of a sudden in 4.6, contribution pages using the regular "fixed contribution options" (i.e. not using a price set) display the options as:

* **Donor** \- $25.00
* **Supporter** \- $50.00
* **Champion** \- $100.00

and so forth. This is a sudden change that a client pointed out--the options used to appear as:

* **$25.00** Donor
* **$50.00** Supporter
* **$100.00** Champion

Both are reasonable, but does anyone know why it changed after working this way for years?

# Answer
I can't find the exact issue or commit at the moment, but these changes were made to standardise the order the of the label and the price. Depending on the type of field used, the price and label were sometimes in a different order.

For example, in 4.4:

And in 4.6:

As a sidenote, I think we decided on the order 'Label - Price' because you would normally look at what you wanted to buy, and then how much it is. That made the most sense I think, when choosing ticket options for an event for example.
> 3 votes

---
Tags: contribution-page
---


title: civicrm theming

text:
# Question
Title: civicrm theming
I am trying to alter the layout/theme setings of the petition. I am using a petition with a profile. The petition questions are put in a very narrow left hand column and the answers in a wide column on the right. I can't work out where I would put or alter the CSS to make the questions just sit above the questions. I have attached an image. Any help on tracking down the correct file woudl be appreciated!

# Answer
There is a file `css/civicrm.css` within your CiviCRM codebase, and that's what determines the layout here, but you should not edit that.

Instead, you have two good options for writing CSS that overrides the default CiviCRM CSS:

* **Edit your site's theme.** Theme CSS will take effect within CiviCRM forms.
* **Create a custom CSS file.** Put your file somewhere that won't get overwritten upon upgrade, and set the path to it in the "Custom css URL" field at Administer - System Settings - Resource URLs.
> 4 votes

---
Tags: civicampaign, css
---


title: CiviEvent Overwriting Contact Info

text:
# Question
Title: CiviEvent Overwriting Contact Info
I am using a Civi install that was originally part of a Drupal installation. A month ago I switched over to using Wordpress and migrared the Civi install to Wordpress.

Since then, something weird has been happening with event registrations in CiviCRM.

Previously, under Drupal, if two people registered using the same email, it would create separate contacts for each person. Or, if someone registered using an email that was already in the database, it would do the dedupe search and either count it as the person if the first name, last name, and email matched, or else it would make a new contact if they didn't match perfectly.

Now, however, it automatically overwrites any previous entries when someone registers using an email that is already in the database. This is fine when it's clearly the same person, but for some reason, it is now overwriting even when a single part of the name is the same. So, for example, Bob Smith smith@company.com registers. Then Mike Smith mike@college.edu registers. Looking at the registrations, I now have 2 registrations for Mike Smith, and there is no registration for Bob Smith. Even just the same last name has caused the first name and email to be overwritten.

I am using the same default dedupe rule, but for some reason it is acting differently now. Does anyone understand what is going on, or how I can fix this so it behaves the way it used to?

# Answer
Is it possible that you upgraded at the same time as you switched to WordPress? Specifically, **in 4.4 and earlier**, events would match participants on **email address only** unless you checked the box to allow multiple registrations with the same email. This was **regardless of any dedupe rules** you might have set up.

**In 4.5 and later**, an event will default to matching on the **unsupervised dedupe rule**, and you can choose an alternative rule on a per-event basis. My suspicion is that your rule allows for false positive matches, and you haven't noticed the issue until the events started actually using the rule.

You might create a brand new individual unsupervised rule with the email address field, leave length blank, 10 as the weight, and a threshold of 10. This will replicate the original situation of matching on email only.
> 4 votes

---
Tags: civievent, contacts
---


# Question
Title: How to disable email notifications when confirming a donation in CiviCRM admin view?
When a admin user sets a contributors record on `civicrm/contribute?reset=1` from pending to completed an email is sent out.

Is it possible to turn off this email function for this email only.

# Answer
You mean the receipt?

There is a checkbox "Send Receipt?" when you modify an individual contributione. If you uncheck it, it shouldn't send the email.
> 2 votes

# Answer
As Xavier says you need to uncheck the Send Receipt? box. If you want the box to be unchecked by default, you could create an extension or use an existing one, as explained here, and implement the hook\_civicrm\_buildForm to set the is\_email\_receipt value to false:

```
function myextension_civicrm_buildForm( $formName, &$form ) {
  if ("CRM_Contribute_Form_Contribution" == $formName) {
    $defaults = array ("is_email_receipt" => false);
    $form->setDefaults($defaults);
  }
}

```

I've added the example extension on github here, feel free to use it.
> 1 votes

# Answer
You can use `DO NOT EMAIL` flag for the contact for whom you don't want to send the email just before updating the status of the contribution.

You can find this in-

1. Open `Edit Contact Summary page` for the contact `civicrm/contact/add?reset=1&action=update&cid=<contact_id>`
2. Expand `Communication Preferences` tab.
3. Enable `Do Not Email` checkbox in the `Privacy` section.

Save this contact. Do remember to turn this flag off after completing your status update. Thx!
> 0 votes

---
Tags: civicontribute, email, recurring-contributions
---


# Question
Title: Why are Activity Imports failing with error message "source contact id not valid"?
I'm running a monthly activity import into a site (4.4.13) \[I realise it's due an upgrade to LTS\]

We have a standard csv tempalte, and existing field mapping. And have been using the same method consistently for over 12 months.

Today on running the first batch all were rejected with the error message "source\_contact\_id is not valid : 2"

The source contact field is not included in the import csv and has previously been automatically picked up from logged in user id ("2").

User 2 is the site admin account and has full permissions.

The csv includes an External ID field which we use to create the "With Contact"

I've tried including The source contact id as a field- failed with same message

I've tried replacing the External ID for the with contact with the External ID with the source contact.- failed with same message

Does anybody have any ideas what may be causing this?

**Update 18 Nov**

Found a working solution to the above- not sure of this counts as an answer or an extension of the question.

Ran an activity import against a dummy contact and the first few columns of the import ran fine. Then through a process of trial and error worked out that one column (out of 200) was causing the process to stall.

Still no idea where the source contact invalid error message is coming from- but was consistent across all failed attempts.

Setting the offending column to do not import allows the full file to import.

There are two fields in the activity custom data that share a field name (and multi-choice field labels). Don't know if the import mapping points to the same field twice.

# Answer
> 0 votes
The issue we were having was with two fields in the import field mapping having the same name.

Amending the field labels through Admin\>custom data to allowed us to able to link the data to the right location.

-As I said both fields shared values and labels so it's not clear why this was a problem. Or at least, became a problem between this month's import and last months.

---
Tags: activities, import, error
---


title: Internal Server Error

text:
# Question
Title: Internal Server Error
I've been working with CiviCRM for almost a year now. One problem we have is we frequently see the Internal Server Error 500 white screen of death. In particular, we cannot use the contact de-dupe tools. When we try to use them, the page runs for about a minute, then we get the error 500. Does anybody know how to diagnose what is actually failing when the error 500 happens? We are running CiviCRM 4.6.9 within Drupal 7 on Windows Server. Thanks for your help!

# Answer
Generally, look for these logs:

* CiviCRM's log (`sites/*/files/civicrm/ConfigAndLog/`)
* HTTPD error log
* PHP error log

Unfortunately, the locations of these differ by environment, and I don't know an answer for Windows Server.

Posted a similar (but broader) question: Where should one look for logs when debugging a new problem?
> 2 votes

---
Tags: drupal, error
---