# Question
Title: fatal error: Unknown column 'contribution_source' in 'order clause'
When we use Find Contributions to generate a list of contributions for thank you e-mails, then select the All Records radio button, and then choose Thank You Letters, we see the fatal error below.

I do see code in CRM/Contribute/Form/Task/Batch.php that looks like it's meant to handle an issue like this: https://github.com/civicrm/civicrm-core/blob/67ea385e0e5cd3daed04807c1465605f059b1002/CRM/Contribute/Form/Task/Batch.php#L230

We do *not* get the fatal error when we use the select all *checkbox* instead of the All Records radio button.

I have not yet been able to replicate on the demo. (The CiviHosting Drupal 7 demo is throwing an error right now itself.)

```
$Fatal Error Details = Array (
[callback] => Array ( [0] => CRM_Core_Error [1] => handle )
[code] => -19 [message] => DB Error: no such field [mode] => 16
[debug_info] =>
SELECT civicrm_contribution.id, contact_a.id as contact_id,
civicrm_contribution.id as contribution_id,
civicrm_contribution.contribution_status_id as `contribution_status_id`
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON
civicrm_contribution.contact_id = contact_a.id WHERE ( (
civicrm_contribution.receive_date >= '20161017000000' ) AND (
civicrm_contribution.receive_date <= '20161018235959' ) AND
civicrm_contribution.financial_type_id IN ("5", "1", "4") AND
civicrm_contribution.financial_type_id IN ("1") AND
civicrm_contribution.contribution_status_id IN ("1") AND
civicrm_contribution.thankyou_date IS NULL AND
civicrm_contribution.is_test = 0 ) AND
(contact_a.is_deleted = 0)
GROUP BY civicrm_contribution.id
ORDER BY `contribution_source` desc,
`contact_a`.`id` [
nativecode=1054 ** Unknown column 'contribution_source' in 'order clause']
[type] => DB_Error
[user_info] =>
SELECT civicrm_contribution.id, contact_a.id as contact_id,
civicrm_contribution.id as contribution_id,
civicrm_contribution.contribution_status_id as `contribution_status_id`
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON
civicrm_contribution.contact_id = contact_a.id WHERE ( (
civicrm_contribution.receive_date >= '20161017000000' ) AND (
civicrm_contribution.receive_date <= '20161018235959' ) AND
civicrm_contribution.financial_type_id IN ("5", "1", "4") AND
civicrm_contribution.financial_type_id IN ("1") AND
civicrm_contribution.contribution_status_id IN ("1") AND
civicrm_contribution.thankyou_date IS NULL AND
civicrm_contribution.is_test = 0 ) AND
(contact_a.is_deleted = 0)
GROUP BY civicrm_contribution.id
ORDER BY `contribution_source` desc,
`contact_a`.`id`
[nativecode=1054 ** Unknown column 'contribution_source' in 'order clause'] [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT civicrm_contribution.id, contact_a.id as contact_id, civicrm_contribution.id as contribution_id, civicrm_contribution.contribution_status_id as `contribution_status_id` FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( ( civicrm_contribution.receive_date >= '20161017000000' ) AND ( civicrm_contribution.receive_date <= '20161018235959' ) AND civicrm_contribution.financial_type_id IN ("5", "1", "4") AND civicrm_contribution.financial_type_id IN ("1") AND civicrm_contribution.contribution_status_id IN ("1") AND civicrm_contribution.thankyou_date IS NULL AND civicrm_contribution.is_test = 0 ) AND (contact_a.is_deleted = 0) GROUP BY civicrm_contribution.id ORDER BY `contribution_source` desc, `contact_a`.`id` [nativecode=1054 ** Unknown column 'contribution_source' in 'order clause']"] )

```

# Answer
> 2 votes
Further investigation found that this was failing not only with `contribution_source`, but also for `financial_type` and `contribution_status`.

A fix has been raised to address this issue at https://github.com/civicrm/civicrm-core/pull/9516. It'll be included in 4.7.15.

# Answer
> 0 votes
In contribution you don't have a column called **contribution\_source**. so, please change the column name to **source** also you are not using alise for the column use **civicrm\_contribution.source**

Please try the below SQL: I guess that should work

SELECT civicrm\_contribution.id, contact\_a.id as contact\_id, civicrm\_contribution.id as contribution\_id, civicrm\_contribution.contribution\_status\_id as contribution\_status\_id FROM civicrm\_contact contact\_a LEFT JOIN civicrm\_contribution ON civicrm\_contribution.contact\_id = contact\_a.id WHERE ( ( civicrm\_contribution.receive\_date \>= '20161017000000' ) AND ( civicrm\_contribution.receive\_date \<= '20161018235959' ) AND civicrm\_contribution.financial\_type\_id IN ("5", "1", "4") AND civicrm\_contribution.financial\_type\_id IN ("1") AND civicrm\_contribution.contribution\_status\_id IN ("1") AND civicrm\_contribution.thankyou\_date IS NULL AND civicrm\_contribution.is\_test = 0 ) AND (contact\_a.is\_deleted = 0) GROUP BY civicrm\_contribution.id ORDER BY civicrm\_contribution.source desc, contact\_a.id

I guess this helps !!!

---
Tags: civicontribute
---


# Question
Title: How can I display the participations of events in the user profile?
How can I display on Joomla 3.6.4 with CiviCRM 4.7.13 the tickets purchased by a user on his user profile?

Thank you in advance

# Answer
> 2 votes
have you tried the default contact dashboard provided by CiviCRM? At least in Drupal the URL would be yoursite.org/civicrm/user?reset=1

Contacts can do many things (such as renewing a membership or printing an invoice) from the dashboard, you can edit what contacts are able to see here: yoursite.org/civicrm/admin/setting/preferences/display?reset=1 (above the choice for the WYSIWYG editor).

Make sure users have the correct permissions described here: https://docs.civicrm.org/user/en/stable/initial-set-up/permissions-and-access-control/#giving-users-the-ability-to-view-their-contact-dashboard

---
Tags: civievent, profile, joomla, user
---


# Question
Title: How do I prevent the cursor going up instead of down when I press enter in an e-mail while using an iMac
Our organisation is using CiviCrm 4.4.8. And we use Civicases a lot. Our users that login to our CiviCrm system using an iMac have trouble typing their e-mail (on a case) as each time when they press enter the cursor goes up instead of down. Can any one help us solving this issue, I am sure we are not the only one who has bumped into this issue.

Looking forward to your response.

# Answer
> 1 votes
Under Administer - Customize Data and Screens - Display Preferences, there's a choice for WYSIWYG editor. Try changing it to something else and see if the problem goes away.

---
Tags: email, civicase
---


title: Ampersand Changed to "&" in URL

text:
# Question
Title: Ampersand Changed to "&" in URL
I have a site I am working on and sometimes the URLs are being changed `&id=X` rather than `&id=X`. For example, `https://secure.domain.org/civicrm/event/register?reset=1&id=15` .

I am not sure how this happening. Any help on how to get CiviCRM to recognize either is appreciated.

I am running CiviCRM - 4.6.24 and Drupal - 7.52.

Thanks, Steve

# Answer
> 2 votes
Steve, I'm not sure exactly how this is happening, but it sounds like something about your process is getting confused between HTML and plain text.

If I typed &id=X in a Wysiwyg editor, the HTML source for that would be &id=X (actually, what I wrote over there to the left was "& amp;id=X" but without the space. It was interpreted as HTML and the "& amp;" was rendered as "&" - talk about illustrating the confusion - apparently I needed to use "preformatted" in this wysiwyg editor!)

Is it possible that some of the parameters for your site were cut and pasted from html and it snuck in this way?

Can you elaborate on when this occurs? E.G. is this manifesting in browsers, or in emails sent by CiviMail, or in some other way?

Rick

---
Tags: civievent, civicontribute
---


# Question
Title: Impossible to Run Cron after civicrm-4.7.14-wordpress update
I just update my civicrm-4.7.14-wordpress, and the Cron don't run anymore.

Here is the displayed message in the log :

> \[10-Dec-2016 08:15:01 UTC\] PHP Fatal error: require\_once(): Failed opening required '../civicrm.config.php' (include\_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in path-to-html-root/wp-content/plugins/civicrm/civicrm/bin/cron.php on line 29

Many thanks for the help !

Regards

MG

# Answer
When updating civicrm, I've always found the need to update the permissions in root/wp-content/plugins/civicrm/civicrm/bin/cron.php (or cli.php) to be executable. Hope this solves your problem.
> 1 votes

---
Tags: issues, cron, upgrade, 4.7.14
---


# Question
Title: Civimember: token for membership end date not working
We are having a problem in setting up our Scheduled Reminders for Membership Renewals. The reminders are sent out as scheduled, but the relationship between Contact to Membership (which is through a foreign key in the database) seems to be broken as far as inserting tokens into the renewal email.

For example, adding lines to our Expiration Template like:

Paid thru: {membership.end\_date} Member since: {membership.join\_date}

only replaces the tokens with blank in our email tests.

I found this reference from 2015 in the old CiviCRM Community Forum, but am re-posting here. I can't believe this is an unresolved issue. I use other membership software, like aMember PRO, and this is one of the most basic functions in renewal reminder emails.

If it has been resolved, please point me to a solution. My searches in this Stack Exchange haven't worked for me.

Thanks for any help!

# Answer
I'll call this an answer, only because it worked. I discovered this link after googling around. civicrm.org/extensions/nzcofuzioncivitoken After installing the extension, my Expiration Template now contains:

> Your membership is paid thru: {latestcurrentmembership.allend\_date}
>
> Member since: {latestcurrentmembership.alljoin\_date}

Since this seems a practical necessity for Membership-related Scheduled Reminders, I updated the documentation for Membership \> Renewals to point to this extension for others who wish to associate membership information to the contact in the reminder.
> 2 votes

---
Tags: civimail, civimember, tokens
---


title: automatic payments in installments?

text:
# Question
Title: automatic payments in installments?
We use CiviCRM for an educational program. Currently, parents enroll students in classes, and then have the option to pay automatically on a monthly basis through the use of a monthly membership on auto-renew. The issue is that we do not run programming in the summers, so each of these auto-renew memberships has to be manually shut off by us at the end of the school year.

Is there a way to set auto-renew to expire? Or alternately, is there a way to set up a yearly tuition/membership that is paid in monthly installments, and ends when the full amount has been paid?

# Answer
> 2 votes
On a contribution page, it is possible to set the 'recurring' to 'offer installments: "Give the user a choice of installments (e.g. donate every month for 6 months)? If not, recurring donations will continue indefinitely." That may be one place you could look at doing a minor customisation so that rather than 'offering' the number, you specify it and hide it.

---
Tags: civimember, payment-processor, recurring-contributions, auto-renew
---


# Question
Title: Filtering search results to see only the most recent contribution by each contact
How do I sort contributions in our database by the most recent contribution date? When I try to search this on the database, it brings up all contributions, not just the most recent and I want to target specific members who have not donated recently. Thanks!

# Answer
> 1 votes
Summary Fields Extension may be your friend. It will create calculated fields for 'latest donation' (and many other such fields) and these are then available in eg Adv Search.

Let us know if that helps with what you are after

# Answer
> 0 votes
If I am not wrong you need a SQL Script to list all the contribution in descenting order (Recent transaction) based on a specific membership type ?

If yes, then use this SQL which will give you recent contribution record based on the membership type - so you need to know all the membership type id and replace in the `membership_type_id` in the SQL below

> select * from civicrm\_contribution a
>
> LEFT JOIN civicrm\_membership\_payment b ON a.id = b.contribution\_id
>
> LEFT JOIN civicrm\_membership c ON c.id = b.membership\_id
>
> WHERE a.contribution\_status\_id = 2 and c.membership\_type\_id = 'membership\_type\_id'
>
> ORDER BY a.id DESC

I guess this helps!!!

---
Tags: contributions, sort-order
---


# Question
Title: How to display location of many events on one map
I want to display a map showing many events location. I use Civicrm with Drupal 7. I think that it's possible to get events location in Views, but I don't know how to do this.

Regards.

# Answer
You can get Event location fields in to a View (assuming this is an Event based view) but you then need a mapping solution and whereas in the past I would have recommended Open Layers there has been some disruption to that as a solution with the loss of access to certain map layer providers.
> 1 votes

---
Tags: civievent, drupal-views, map
---


title: Export all data

text:
# Question
Title: Export all data
How do you export all data, for example, all data for organization records, or for person/individual records? I want to compare data from a database we just moved to Civi and make sure data came thru right (I know many didn't - missing or wrong, so I need to check without having to open every single record, one by one and comparing different sections of data. I'd prefer to compare in excel. I see you can filter/build a filter, and export data but you have to choose certain fields. Besides being very timeconsuming/tedious to choose each field,

1) over time the fields change (so you have to recreate the filter), and

2) the address field is making me choose a type (ex. address, home);

might do the same for phone field but I stopped creating filter/search and decided to see if it's possible to export all data/fields. I just want to do one easy export. It's been an unexpectedly difficult thing to find out how to do it or if it's possible. I have been searching online posts and Stack Exchange etc. for hours. Thanks so much.

# Answer
In general the solution is to do your 'Search' then use the Export Contacts action, then use the "Select fields for export", and save that so you can use you "Saved Field Mapping".

Documentation on this is here
> 1 votes

# Answer
As Pete says, the documentation should be pretty clear. The usual way we do this when comparing imported data is to find all contacts, then export the data, and use a custom field mapping with fields that directly match your imported data. Save that field mapping and then it's very easy to repeat the data dump and directly compare your original data to the imported in excel. Note when you open and import the csv file in excel you should be sure that date fields are defined properly - otherwise they won't compare or sort properly.
The question of one to many for contact and addresses and phones can trip you up, depending on whether the original data had this one to many relationship. Depending on the complexity of the data, the flat file comparison in excel may not be completely straightforward. You will also note that the fields for organizations, households, and individuals are a bit different from each other. You may want to do three exports, for organizations, households, and individuals to minimize the confusion. And I'm sure that you know that you can edit the excel list, then re-import the contacts from that spreadsheet, being sure to choose "update existing contacts" and then having an unambiguous dedupe rule based on an internal or external id and not things like first/last/email which might be the corrections being made. Make sure to export the field that you plan to base your re- import on.
> 1 votes

---
Tags: export, fields
---


# Question
Title: Where can I find information about CiviCRM?
Hello my name is Joel and I have a series of questions about CiviCRM.

1. Who can implement CiviCRM? Is the developer, the supplier (local?) or regional partner? Do you have a technical service?
2. Which companies have implemented CiviCRM?
3. Advantages and disadvantages of CiviCRM.
4. Your product in what type of sector? In the specific business / industrial sector (vertical) or is it a multisector product?

I hope an answer soon, that is well elaborated since I am interested in this product. Thank you!

# Answer
> 5 votes
Thanks for your interest in CiviCRM.

As Peter says, a good place to start is to read the documentation. I would also suggest that you look at the CiviCRM website if you haven't already done so.

To answer your specific questions:

1. Anyone can implement a CiviCRM system. The software is open source and feely available to download. However, it does require a reasonable degree of technical knowledge to do so. For this reason many organisations choose a partner to do this for them. You will see that there are partners around the world. But, if you want to do it yourself read the Installation guide.
2. CiviCRM is used by more than 10,800 organisations including the Wikimedia Foundation, Amnesty International and the UK Green Party. Take a look at the many case studies to see some examples.
3. I would suggest that you try a web search for comparisons with other CRM systems. Whether it is suitable for your organisation depends on how you would use it. It is difficult to comment on this without more detail about the needs of your organisation.
4. CiviCRM is specifically designed for the needs of non-profit organisations. But there is nothing to stop it being used in other sectors and much of the core functionality would be appropriate for any organisation that is looking to manage contacts.

I hope that helps, but please post again if you have more questions.

# Answer
> 3 votes
You would be advised to read the CiviCRM User and Administrator Guide at https://docs.civicrm.org/user/en/stable/ This book is freely available to read online. It is collaboratively written by the CiviCRM community.

---
Tags: evaluating-civicrm, documentation
---


# Question
Title: Twilio Extension: "The selected contacts have no valid phone, or prefer not to receive SMS, or are deceased."
I am on Drupal 7.51 / CiviCRM 4.7.12

I have just installed Twilio (SMS) Extension, purchased a number (+33... (France) from Twilio), upgraded my account, and configured Twilio Extension accordingly (as per https://wiki.civicrm.org/confluence/display/CRMDOC/Setting+up+a+SMS+Provider+for+CiviSMS) : filling username and password with the LIVE API Credentials specified at https://www.twilio.com/console/account/settings.

When I test it (on a test Group), I get the following Error Message :

The selected contacts have no valid phone, or prefer not to receive SMS, or are deceased.

(I did not configure inbound SMS)

Any suggestion would be welcome

# Answer
> 0 votes
Thanks a lot, Kainuk for your screenshots : the error is on my side : I thought that just the number had to be a mobile number : I did not realize that, moreover, this number had to be defined as a Home **Mobile** phone number.

I have now to change that in my webforms (and then fix this in all the database, but I can manage this directly with phpmyadmin).

Thanks again a lot : I would not have found that by myself.

# Answer
> 1 votes
Just the start of debugging, but maybe it evolves to a complete answer. I focus on the fact that the Send SMS menu does not show on a contact with a valid mobile phone. Can you execute the following script with your test contact\_id (my test contact id = 204)?

```
<pre>
<?php
  $testContactId = 204;
  civicrm_initialize();
  if(CRM_SMS_BAO_Provider::activeProviderCount()){
     echo "SMS provider configured\n";
     $mobileTypeID = CRM_Core_OptionGroup::getValue('phone_type', 'Mobile', 'name');
     echo "Mobile type id =  $mobileTypeID \n";
       print_r(CRM_Contact_BAO_Contact_Location::getPhoneDetails($testContactId, $mobileTypeID));
  } else {
     echo "NO Sms provider configured\n";
 };
?>
</pre>

```

To execute the script save it to a file (for example *test.php*) and run it with

```
drush scr test.php

```

Hopefully, we get a hint if the configuration of the provider is the problem or the details of the test contact.

*Update* When you have only web access the code can be executed on a Drupal instance as follows:

* Enable the Drupal **PHP Filter** module.
* Create a new Article
* Past the script as contents of the article
* Set the filter to **PHP Code**
* Use the preview button for the result.

A word of warning, enabling the PHP Filter is a security risk because it allows the execution of arbitrary PHP code in every Drupal page.

# Answer
> 0 votes
I got the *send SMS* working on my test instance. I post here the screenshots. Maybe it will be of help if you compare?

1. The objective is to show the *Send SMS* menu. That makes it possible to send a single SMS for testing purposes.
2. The test contact must have a phone number of the type mobile, and it must be the *Primary*.
3. No privacy option is set.

This is the configuration of my SMS provider screen. API parameters have no effect, but the checkbox *Is this provider active?* (2) does!.

---
Tags: sms
---


# Question
Title: How do I display a list of civicrm events on a separate wordpress site?
Our CiviCRM site is using Drupal but i have another site on a separate server that uses Wordpress that i want to display the event information with links to the other site for registration. I explored using a view to display RSS feeds and using a feeds plugin on the Wordpress site to propagate the info but that didn't seem like a very easy solution.

# Answer
> 1 votes
The Drupal Views + RSS feed solution sounds reasonable to me! There's lots of great support for generating RSS feeds in Drupal and we've had some good successes with that methodology.

# Answer
> 1 votes
To display Drupal content on a Wordpress site, I've had good success with iFrames. The steps involve:

1. On the Drupal site, create the content that is to be displayed in the wordpress site, as a page -- usually with views, but it doesn't matter.
2. Create a Drupal theme suitable for iframe embedding, e.g. like this https://www.drupal.org/project/entity\_iframe\_theme
3. Use your favourite theme switcher module to use this iframe-friendly theme for your content (views) page.
4. Emebed that page in your wordpress site as an iframe.

---
Tags: wordpress, civievent
---


# Question
Title: CustomGroup Create API Not Passing Param extends_entity_column_id
I am using the API to create a custom group that extends "Participant". I want to set it to be based on Participant (Event Type).

I set the "extends\_entity\_column\_value" and "extends\_entity\_column\_id". However, it does not seem to pass the "extends\_entity\_column\_id" parameter on the call.

Here is the call I am making:

```
$result = civicrm_api3('CustomGroup', 'create', array(
  'debug' => 1,
  'sequential' => 1,
  'title' => "Membership Bible Training",
  'extends' => "Participant",
  'collapse_adv_display' => 1,
  'extends_entity_column_id' => 3,
  'extends_entity_column_value' => 19,
));

```

Here is the result of the call:

```
{

"is_error": 0,
"undefined_fields": [
    "style",
    "is_active",
    "title",
    "collapse_adv_display",
    "extends_entity_column_id",
    "extends_entity_column_value",
    "extends"
],
"version": 3,
"count": 1,
"id": 79,
"values": [
    {
        "id": "79",
        "name": "Membership_Bible_Training",
        "title": "Membership Bible Training",
        "extends": "Participant",
        "extends_entity_column_id": "",
        "extends_entity_column_value": [
            "19"
        ],
        "style": "Inline",
        "collapse_display": "",
        "help_pre": "",
        "help_post": "",
        "weight": "1",
        "is_active": "1",
        "table_name": "civicrm_value_membership_bible_training_79",
        "is_multiple": "",
        "min_multiple": "",
        "max_multiple": "",
        "collapse_adv_display": "1",
        "created_id": "",
        "created_date": "",
        "is_reserved": ""
    }
]

```

}

Notice how "extends\_entity\_column\_id" is empty. Why is this?

# Answer
> 1 votes
I figured it out.

You have to set

```
'extends' => "ParticipantEventType",

```

By doing that it will set the proper value for 'extends\_entity\_column\_id'.

---
Tags: custom-fields, api
---


# Question
Title: CiviCRM Fatal error: Uncaught CRM_Core_Exception: [0: Found installation canary
If you can advise or solve my problem – please answer

I trying to install CiviCRM 4.7.14 for wordpress 4.7 on windows machine, all steps of installation based on official CiviCRM installation guide. After step where i setup database connection and click install i got at left panel icon civicrm how it must be, but after click on this button I got error about non correct path in civicrm.settings.php, after fixing double slashes to single slashes “/” in this file and update page I got next error that I can’t solve

Fatal error: Uncaught CRM\_Core\_Exception: \[0: Found installation canary. This suggests that something went wrong with tracking installation process. Please post to forum or JIRA. thrown in C:\xampp\htdocs\wp-content\plugins\civicrm\civicrm\Civi\Core\InstallationCanary.php on line 53

All requirements are fine and I do not got any warning or errors at step with install.

Thank you in advance

# Answer
> 2 votes
I just did an installation on my Windows Laptop, and it worked. I describe below my configuration. Maybe it leads to a working configuration on your system.

1. I downloaded and installed the *xampp-win32-5.6.28-0-VC11-installer* installer from ApacheFriends. The installation decides for the default home *C:\xampp*.
2. After the installation, the Xampp control panel starts. I start Apache and MySQL.
3. I open the shell to create the databases (I am more at my ease with Unix). I create the databases with the following commands:

```
mysql -u root

create database wp character set utf8;
create database civi character set utf8;
grant all on wp.* to wpuser@localhost identified by 'wppwd';
grant all on civi.* to civiuser@localhost identified by 'civipwd';
flush privileges;

```
4. I install WordPress by unzipping the download in the `C:\xampp\htdocs` directory. I remove all other files (to keep the installation clean).
5. I do the WordPress configuration according to the documentation. (database wp, user wpuser, password wppassword).
6. I unzip the CiviCRM (*civicrm-4.7.14-wordpress.zip*) in the directory `C:\xampp\htdocs\wp-content\plugins`.
7. Now I activate the CiviCRM in the plugins menu and complete the installation with the *Almost Ready* invitation. (database civi, user civiuser, password civipwd).
8. Installation completes without problems.

The `civicrm.settings.php` file is generated in the directory `C:\xampp\htdocs\wp-content\uploads\civicrm`. In the file is a mix of forward slashes and backslashes, but CiviCRM does not seem to bother. For example:

```
$civicrm_root = 'C:\\xampp\\htdocs/wp-content/plugins\\civicrm\\civicrm\\';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
 define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'C:\\xampp\\htdocs/wp-content/uploads\\civicrm\\templates_c\\');
}

```

---
Tags: wordpress, installation
---


# Question
Title: Bulk Update Participant Status via REST API
I am trying to find a way to bulk update participants' status via the REST api. I could only think of using the API chaining method. I tried to do a for loop to update individually but I got random number of successful updates.

Would like to know if there is a better way to do it ? I am calling from an android app using Retrofit2.

thanks, j.

# Answer
> 1 votes
The right place to experiment with possibilities of the API is API Explorer that you can find at *Support -\> Developer - API Explorer* in your local CivCRM instance or on the Demo site.

All the participants of an event can be selected with:

`http://dmaster.demo.civicrm.org/sites/all/modules/civicrm/extern/rest.php?entity=Participant&action=get&api_key=userkey&key=sitekey&json={"sequential":1,"event_id":3}`

The update of status can be accomplished with the create action in combination with an already existing participant\_id. For example:

`http://dmaster.demo.civicrm.org/sites/all/modules/civicrm/extern/rest.php?entity=Participant&action=create&api_key=userkey&key=sitekey&json={"sequential":1,"id":3,"status_id":"Cancelled"}`

moves the status to Cancelled.

Success with your app.

---
Tags: rest
---


# Question
Title: Contact Management - Best practices for couples and households
What are the best practices for storing couples and households? Currently, every contact is an individual and a household is created for couples and families only. This causes two undesirable outcomes.

1) When creating labels, if I select the 'merge all contacts of the same household' option, the children are also included in the label. I just want the parents.

2) When making PDF letters for all my contacts, I only want 1 letter per household but I end up with one for each spouse.

How do you avoid this situation?

# Answer
We have been going over this a lot with my fundraising team, trying to find a happy medium. When generating labels or PDF letters for one per household, be sure to create labels with only households. Then, you can even create a smart group that consists of individuals that are also part of a household and exclude that group from the rest of the "individuals" mailing list so that you don't get labels with both households and the same people individually.

Every time someone proofs the labels for duplicate members of the household, they should mark it up and have someone change the data in the CRM to add them to a household.
> 5 votes

# Answer
It depends on why you're using households. If your only goal with householding is to avoid duplicate paper mailing, then I find that you don't need them at all, you can just use the export option to merge contacts with the same address. I used the household contact type early on but then stopped using them due to confusion and have never found a reason to use them since.
> 0 votes

---
Tags: contacts, households
---


title: Can members pay renew fees early?

text:
# Question
Title: Can members pay renew fees early?
Can members pay their dues early? Basically before the system has them as expired.

# Answer
> 4 votes
If they renew early, it should just extend their membership. (e.g. if it is an annual membership and they have 2 months left when they renew, they should have 14 months on their membership afterwards).

# Answer
> 1 votes
If you are using memberships with fixed dates (e.g. calendar year memberships), then there is a setting "Fixed Period Rollover Day" that will control at which point a membership for the following period can be added.

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


# Question
Title: Editing Recurring Contributions without user login
How do I generate an e-mail with a link to get to the dashboard so the user can edit the credit card details of a recurring contribution, without the user having to have login privileges to get to that dashboard?

Credit cards are expiring or card numbers change, and we need a way for the user to update their cards. Preferably without going through a whole new creation process. The dashboard is there, but they can't access it without having far too much power given to them through the ACL's.

CiviCRM 4.7, Wordpress, Authorize.net

# Answer
> 4 votes
I almost have this polished, just one little piece that may be beyond what my pea brain can handle. The short of it is that from the affected contact you need to send an e-mail with tokens. (I've put this into a template.) In the body of the e-mail put a link similar to this:

https://yoursite.com/civicrm/?page=CiviCRM&q=civicrm/contribute/updatebilling&reset=1&crid=XX&{contact.checksum}&cid={contact.contact\_id}&context=dashboard

You need to replace the crid=XX with the correct crid for that failed transaction. The only way I've found to get that crid from the front end is through a few steps. 1. Open up the contact of the failed contribution. 2. Click on the "Actions" button, then Right Click on the "Contact Dashboard" and choose "Open in new Tab." This will open up the dashboard in a separate tab, as you'll need the first page later and can't easily get back to it. 3. On the Contact Dashboard page, you'll find a "Recurring Contributions" line. Click the "more" button, then Right Click on the "Change Billing Details" and choose "Open in new Tab." This will open up the "Billing Details" in a new tab. In the address bar, you'll find the "crid=" value buried in the string.

Moving forward, I'm hoping that someone with more skills than I can figure out how to add this crid as a token, and then be able to search for failed contributions and send the template e-mail to multiple contacts at once. To go even a step further, being able to automate this once a failed transaction happens, the system automatically sends out this notice.

# Answer
> 2 votes
adding as a new answer. the link that would need to be sent out would look like

civicrm/contribute/updatebilling?reset=1&crid=XX&{contact.checksum}

since the contact id token is not checked during this process and hence not required.

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


title: Is CiviCRM for us?

text:
# Question
Title: Is CiviCRM for us?
We are a small NGO with three full time office staff and currently a few hundred supporters. Most of our income is from grant makers, we have approx details of approx 250 grant making trusts and foundations on our system.

Our website was previously Wordpress but has been migrated to Squarespace.

We currently take online donations through Virgin Money Giving

None of our office staff are particularly strong with IT.

Is it feasible for us to get CiviCRM and without incurring huge costs for hosting/consultants etc?

Would you recommend it?

Is there an obvious more basic alternative?

We need something through which we can engage with supporters but also track our funding applications to other charities and institutions.

Thanks!

# Answer
> 6 votes
first of all: I think you would be able to run CiviCRM without too much IT expertise or huge (subjective term though) consultancy costs. I would recommend you to contact a local CiviCRM partner and discuss your needs and costs with them. It does largely depend on your own requirements. If you realise you have a tight budget and it means you will adapt your processes to core CiviCRM rather than the other way around you will be able to keep the costs manageable (and that goes for every other bit of software too).

One issue could be your Squarespace website thought if you expect website integration with CiviCRM. CiviCRM runs within either Wordpress, Drupal or Joomla!. So out of the box website integration will not be possible. What might be feasible though (and we have a few customers that do this) is to run your public facing website on Squarespace and run CiviCRM on a (dummy) Drupal/Worpress/Joomla! site, adapt the look and feel and show the CiviCRM pages whenever an event registration or membership renewal has to be done (or something along those lines)

# Answer
> 3 votes
Thanks for your interest in CiviCRM. Without knowing more about your specific circumstances it is difficult to say whether CiviCRM is a good fit in your particular case.

As Erik suggests, I would recommend having a conversation with one or more local partners to discuss whether it would fit your needs. There is usually no charge for an initial conversation and they should be able to give you a ball park figure for implementation and hosting. Hiring a consultant can often be a cost effective investment in the long-term as they can help you to make better use of the system.

Whatever CRM system you choose it is going to involve some costs to your organisation and it is important to be realistic about this. By their nature CRM systems are fairly complex. You should factor in not only the costs of set up, but also staff training, hosting and ongoing support. You should also consider the time you have available to implement the system.

As to alternatives, this is difficult to say without knowing your requirements. If you are based in the UK I would suggest looking at this list of CRM software for charities.

# Answer
> 1 votes
In support of both Erik and William's responses, definitely have an initial conversation with a consultant. What Erik says is key: "If you realise you have a tight budget and it means you will adapt your processes to core CiviCRM rather than the other way around you will be able to keep the costs manageable (and that goes for every other bit of software too)." If your staff is not particularly strong with IT, this is where you may wish to consider investing time in a consultant who will do that initial set up for you and train your users - while it is a powerful system, CiviCRM is not intuitive and will require on-going maintenance that your staff may neither be inclined nor has the time to tackle.

Hope this helps!

# Answer
> 1 votes
The lightweight CiviGrants component in CiviCRM can be fairly easily modified from tracking grants given by your organization to tracking grants being sought by your organization.

CiviCRM does not have native integration with SquareSpace, which makes me think CiviCRM may not be a good fit for you as you want some public facing pages for things like accepting donations and likely signing up for newsletter, etc. If you go with CiviCRM then I'd recommend using a WordPress/CiviCRM installation on a subdomain of your site (eg crm.yourdomain.org) for public facing pages, eg donation pages.

---
Tags: installation, evaluating-civicrm
---


title: Invalid html markup in javascript

text:
# Question
Title: Invalid html markup in javascript
I've been asked to take a look at a civicrm installation on wordpress. They are having trouble getting an event page to work correctly. I found that there are lots of javascript errors being thrown. When I look at the page source of the registration page I see lots of p and /p tags in with the javascript which is causing script errors. e.g.

```
<script type="text/javascript"></p>
<p>var thousandMarker = ',';
var separator      = '.';
var symbol         = '$';
var optionSep      = '|';</p>
<p>cj("#priceset [price]").each(function () {</p>
<p>    var elementType =  cj(this).attr('type');
   if ( this.tagName == 'SELECT' ) {
      elementType = 'select-one';
   }</p>
<p>    switch(elementType) {

```

The first line throws an error of SyntaxError: expected expression, got '\<'

Any idea what could be causing this? I'm not very familiar with wordpress. I reviewed the plugins they have and don't see anything obvious. (They are running wordpress 4.7 and civicrm 4.7.13).

# Answer
> 1 votes
Sounds like some javascript got pasted into a rich text editor ("WYSIWYG"), and the result is linebreaks in the JS are being interpreted as content linebreaks and wrapped in `<p>` container.

Simple fix: edit the content containing the JS, and use the "View Source" button or equivalent to enter the JS in source mode rather than content mode.

More robust approach (less easy to break, etc): add the JS via a custom template (see "Appending jQuery or other code") or from a custom extension.

---
Tags: wordpress, error, html
---


# Question
Title: How can I get the donation amount radio buttons on the same line as the amount?
I've had the same problem with different templates. It is not clear which radio button relates to which amount. See pic.

# Answer
This layout is coming from some theme or plugin on your site.

CiviCRM includes its own CSS which delivers your desired result out of the box, and you can override or replace those CSS files.

In this case, your site theme / some plugin is instructing the browser to lay out the form differently from how CiviCRM does per default. I'd hazard the site shown above is using a CMS theme which includes some directive like

```
input, label {
  width: 100%;
  clear: both;
}

```

You can address this by providing appropriate CSS to achieve the desired layout. Not having seen the site in question, it's hard to be more specific than that.

Anyway, here's a Stack Overflow question on how to sit radio buttons next to their labels which might help you.
> 4 votes

---
Tags: contribution-page, donations
---


# Question
Title: cron setup failing in new Wordpress installaion
New installation of 4.7.14 into a WordPress 4.7 site located in a subdomain (e.g. sub.domain.com) hosted at A2. Everything good except for the "Cron Not Running". Created a new WP user with admin privileges, but still get "ERROR: Invalid username and/or password". Happens when trying to run from the command line as well.

php /home/me/public\_html/sub.domain.com/wp-content/plugins/civicrm/civicrm/bin/cli.php -s sub.domain.com -u WP-user -p WP-password -e Job -a execute

What am I missing?

# Answer
I'm not sure about this but it sounds like a permissions problem and you may need to update the permissions in root/wp-content/plugins/civicrm/civicrm/bin/cli.php to be executable. Hope this solves your problem.
> 1 votes

---
Tags: wordpress, cron, cli
---


# Question
Title: using api.getoptions to retrieve all options for a field (even disabled)
According to the documentation (https://wiki.civicrm.org/confluence/display/CRMDOC/Pseudoconstant+(option+list)+Reference) I should be able to pass a context to an api.getoptions call in order retrieve both enabled and disabled options for a field. However, it doesn't seem to be working. In fact, swapping out different contexts has no apparent effect on what is returned by the api call. Am I missing something?

Sample code:

```
$opts = civicrm_api3('contribution', 'getoptions', array(
  'field' => "custom_5",
  'context' => 'get'
));

```

# Answer
> 1 votes
Looks like you found a bug. Here is a fix:

https://github.com/civicrm/civicrm-core/pull/9540

Could you please review it and leave feedback on github to speed along the merge process?

---
Tags: api
---


title: CiviDiscount Code - Limit to Single Use

text:
# Question
Title: CiviDiscount Code - Limit to Single Use
Can a CiviDiscount coupon be configured to limit it to a single use?

# Answer
> 4 votes
Yes - you can put a "1" in the "Usage limit" field. See screenshot below:

---
Tags: cividiscount
---


# Question
Title: Permission to edit activities but not contacts?
The organisation I'm setting up Civi for does not assign activities to individual people but works in teams.

For example a client might be referred to the housing team to see if they qualify for housing. This activity would be created by a caseworker and edited / completed by a (any) member of the housing team.

This is just one example, there are also other cross-team activities.

The only way I have been able to make this work is by giving all caseworkers edit access to all other caseworkers.

This has not gone down at all well with the caseworkers who do not want their contact details viewable - and editable! - by so many people.

Any advice on how I could make it possible for A to edit an unassigned activity created by B, without giving A the ability to see or edit B's contact information?

# Answer
> 1 votes
The National Urban League funded work to add ACLs to cases, which laid the groundwork for adding ACLs to activities. See here: https://civicrm.stackexchange.com/a/8005/12. So one option would be to develop (or fund the development) of applying ACLs to activities. I'm guessing the core team would be willing to take that on as a Paid Issue Queue item, since they did the groundwork. This would be the most flexible arrangement.

Additionally, CiviDesk has implemented a hook that allows extension authors to escalate permissions via an extension with a new hook, hook\_civicrm\_permission\_check. This code has been written but at this time has not yet merged into upstream CiviCRM. See CRM-19256 to see if that's still true now. If you're able to QA this patch, please update the Jira ticket to say so.

The second approach is much less work to get into everyone's hands, but the first approach would allow non-coders to define their own activity permissions.

# Answer
> 1 votes
Another option might be to look at using Related Permissions extension. User A is a member of Team B, and has a permissioned relationship over the Team and therefore could (maybe) edit Activities that are assigned to the Team, without having access to the other people who have a relationship to the Team.

---
Tags: activities, permissions, acl
---


# Question
Title: Mosaico and 'View in your browser' not working
I am running Mosaico beta 1.0 beta1 with 4.6.22 and 'View in your browser' does nothing. Of course, this is a beta so not surprising. But... is there a way round this? Otherwise quite impressed with Mosaico after a shaky start, but it would be good to have a greater variety of block shapes to add. Anyway, for now the above is the problem that I would love to find a workaround for.

# Answer
In general, bugs with extensions should be reported on the extensions' github page.

In this case, you may be interested to know that there is a new CiviMail/Mosaico extension nearing completion which will supercede the one you are trying out.
> 1 votes

---
Tags: 4.6, mosaico
---


# Question
Title: Tax Label not updating in Price Set using _buildAmount Hook
I have an extension in progress at https://github.com/jboeke/com.avietech.multitax

What I'm hoping to do is combine multiple tax rates into one. The extension properly rejiggers the tax values and actual amount as expected but NOT the visible price or description of the tax (i.e. - price-field-amount) to the right of the quantity input.

As you can see, my tax rate of 6.25% has been applied as expected and the Total Fee(s) reflects (20 * 1.0625). So why do I still see "$ 20 (includes Tax of $ 0)" when the expected value is "$ 21.25 (includes Tax of $ 1.25)"?

**function multitax\_civicrm\_buildAmount** sets, what I believe, are the relevant values:

`$option['tax_rate'] = $totaltaxrate / 100;
$option['tax_amount'] = $option['amount'] * $option['tax_rate'];`

Are there other values I need to set to change the description to accurately reflect the adjusted taxes?

# Answer
I finally found my own answer. This is a known bug for text fields in price sets:

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

Workaround as per the above link:

https://github.com/fuzionnz/civicrm-core/commit/3174c2e183bc8cfab9082353966a994a9a364bbb
> 0 votes

---
Tags: civicontribute, extension, financial-accounts
---


title: Contact Image Size

text:
# Question
Title: Contact Image Size
Is there any way to resize the contact image, restrict the size/dimensions of the contact image upon upload, etc.

Using Drupal 7 and CiviCRM 4.6.x

Thank you.

Currently we have some contact records with a huge uploaded image taking over 1/4 of the screen.

# Answer
The contact summary screen should automatically limit the image size to a maximum of 100px. If this is not working correctly you could add this to your site's css file:

```
.crm-contact_image img {
   max-width: 100px;
}

```
> 3 votes

# Answer
This forum thread from 2015 on using CiviCRM, Views and Imagecache is worth a look.

There are some performance gains in not serving contact images directly from CiviCRM which might be worthwhile, especially if you use CiviCRM images in a frequently viewed place (eg contributor headshots on the front page, like civicrm.org used to).

I guess you could even intercept the contact display image request at webserver level and redirect to a URL serviced by such a method. (But Coleman's CSS is way easier, esp if it's the default for CiviCRM!)
> 1 votes

---
Tags: contacts, contact-image
---


# Question
Title: 4.7.14 Upgrade: CiviMail pages broken - Unknown column 'language' in 'field list'
I recently upgraded from 4.7.11 to 4.7.14 in a Drupal 7 installation. Now I have noticed that when trying to create a new Mailing, the page shows nothing.

This message appears in the log file:

```
nativecode=1054 ** Unknown column 'language' in 'field list'

```

The "INSERT INTO" statement doesn't mention 'language', but the DB error does. Why would that happen?

I checked that database table civicrm\_mailing, and there is a field called "language".

Where else could be 'language' be needed? What else can I do to work out what the problem is?

This is the whole report from the log file:

```
Dec 13 16:01:12  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , unsubscribe_id , resubscribe_id , optout_id , name , mailing_type , from_name , from_email , replyto_email , subject , body_text , body_html , url_tracking , forward_replies , auto_responder , open_tracking , override_verp , created_id , created_date , visibility , dedupe_email ) VALUES ( 1 ,  1 ,  2 ,  7 ,  5 ,  8 ,  6 ,  NULL , 'standalone' , '{name}' , '{email_address}' ,  NULL ,  NULL ,  NULL ,  NULL ,  1 ,  0 ,  0 ,  1 ,  1 ,  1 ,  20161213160112 , 'Public Pages' ,  1 )  [nativecode=1054 ** Unknown column 'language' in 'field list']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , unsubscribe_id , resubscribe_id , optout_id , name , mailing_type , from_name , from_email , replyto_email , subject , body_text , body_html , url_tracking , forward_replies , auto_responder , open_tracking , override_verp , created_id , created_date , visibility , dedupe_email ) VALUES ( 1 ,  1 ,  2 ,  7 ,  5 ,  8 ,  6 ,  NULL , 'standalone' , '{name}' , '{email_address}' ,  NULL ,  NULL ,  NULL ,  NULL ,  1 ,  0 ,  0 ,  1 ,  1 ,  1 ,  20161213160112 , 'Public Pages' ,  1 )  [nativecode=1054 ** Unknown column 'language' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , unsubscribe_id , resubscribe_id , optout_id , name , mailing_type , from_name , from_email , replyto_email , subject , body_text , body_html , url_tracking , forward_replies , auto_responder , open_tracking , override_verp , created_id , created_date , visibility , dedupe_email ) VALUES ( 1 ,  1 ,  2 ,  7 ,  5 ,  8 ,  6 ,  NULL , 'standalone' , '{name}' , '{email_address}' ,  NULL ,  NULL ,  NULL ,  NULL ,  1 ,  0 ,  0 ,  1 ,  1 ,  1 ,  20161213160112 , 'Public Pages' ,  1 )  [nativecode=1054 ** Unknown column 'language' in 'field list']"]
)

```

Here is the backtrace:

```
Dec 13 16:01:12  [info] $backTrace = #0 /home/mysite/sites/all/modules/civicrm/CRM/Core/Error.php(932): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /home/mysite/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error))
#3 /home/mysite/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , u...")
#4 /home/mysite/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , u...")
#5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, NULL, NULL, "INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , u...", "DB_Error", TRUE)
#6 /home/mysite/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8))
#7 /home/mysite/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#8 /home/mysite/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -19, NULL, NULL, "INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , u...", "DB_Error", TRUE)
#9 /home/mysite/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'language' in 'field list'")
#10 /home/mysite/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#11 /home/mysite/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , u...")
#12 /home/mysite/sites/all/modules/civicrm/packages/DB/DataObject.php(2438): DB_common->query("INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , u...")
#13 /home/mysite/sites/all/modules/civicrm/packages/DB/DataObject.php(1060): DB_DataObject->_query("INSERT INTO civicrm_mailing (domain_id , header_id , footer_id , reply_id , u...")
#14 /home/mysite/sites/all/modules/civicrm/CRM/Core/DAO.php(487): DB_DataObject->insert()
#15 /home/mysite/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php(1585): CRM_Core_DAO->save()
#16 /home/mysite/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php(1703): CRM_Mailing_BAO_Mailing::add((Array:33), (Array:0))
#17 [internal function](): CRM_Mailing_BAO_Mailing::create((Array:33))
#18 /home/mysite/sites/all/modules/civicrm/api/v3/utils.php(1279): call_user_func_array((Array:2), (Array:1))
#19 /home/mysite/sites/all/modules/civicrm/api/v3/Mailing.php(67): _civicrm_api3_basic_create("CRM_Mailing_BAO_Mailing", (Array:33))
#20 /home/mysite/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_mailing_create((Array:27))
#21 /home/mysite/sites/all/modules/civicrm/Civi/API/Kernel.php(161): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#22 /home/mysite/sites/all/modules/civicrm/Civi/API/Kernel.php(92): Civi\API\Kernel->runRequest((Array:7))
#23 /home/mysite/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Mailing", "create", (Array:10), NULL)
#24 /home/mysite/sites/all/modules/civicrm/CRM/Utils/REST.php(404): civicrm_api("Mailing", "create", (Array:10))
#25 /home/mysite/sites/all/modules/civicrm/CRM/Utils/REST.php(641): CRM_Utils_REST::process((Array:3), (Array:8))
#26 [internal function](): CRM_Utils_REST::ajax()
#27 /home/mysite/sites/all/modules/civicrm/CRM/Core/Invoke.php(276): call_user_func((Array:2))
#28 /home/mysite/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:12))
#29 /home/mysite/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#30 /home/mysite/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
#31 [internal function](): civicrm_invoke("ajax", "rest")
#32 /home/mysite/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#33 /home/mysite/index.php(22): menu_execute_active_handler()
#34 {main}

```

# Answer
One thing i have found is that if you have the detailed logging turned on under the misc settings, this kind of error can show if the log\_civicrm\_mailing table doesn't have the language column. This can suggest there was something that went wrong in the upgrade.

I would recommend you check to see if there is a log\_civicrm\_mailing table and if that has the language column if not add it as the same as in the civicrm\_mailing table. Then go to http(s):///civicrm/menu/rebuild?reset=1&triggerRebuild=1
> 3 votes

# Answer
It sounds as if you haven't updated the database after upgrading CiviCRM.

CiviCRM 4.7.13 added a new column 'language' to the 'civicrm\_mailing' table.

You can update the database by visiting this URL:

```
http://<your_drupal_home>/civicrm/upgrade?reset=1

```

Full details here: Run the upgrade script

Alternatively if you have drush you can run `drush cvupdb`. See this post for more details: Is it easy to upgrade CiviCRM using drush?
> 2 votes

---
Tags: civimail, drupal, upgrade
---


# Question
Title: Stripe.js token was not passed! (using Webform Integration)
I am on Drupal 7.51 / Civi 4.7.12 / Stripe Extension 4.7.1

I use a Webform to register a membership, and I have integrated a Contribution Page based upon a Stripe Payment Processor (with "Live Transactions" mode).

I get the following message : *A fatal error was triggered: Stripe.js token was not passed! Report this message to the site administrator.*

I see on the Stack Exchange that this already happened in the past, but not clear it was with Webforms.

I also know that not all payment processors are compatible with webforms : is it the case with stripe ?

# Answer
There is a long thread at https://github.com/drastik/com.drastikbydesign.stripe/issues/76 on this issue. It was for earlier versions but might give you some clues. I have a site using Stripe successfully with webforms on Civi 4.6
> 3 votes

# Answer
I could finally fix my problem, following Aidan's suggestion : modify /civi\_extensions/com.drastikbydesign.stripe/stripe.php as per https://github.com/drastik/com.drastikbydesign.stripe/pull/159/files (to "Make civicrm\_stripe js load in webform")

... and it worked

Thanks a lot Aidan (forget my comment)
> 1 votes

---
Tags: webform-civicrm, stripe
---


title: How to prepopulate custom fields

text:
# Question
Title: How to prepopulate custom fields
I would like to prepopulate a set of custom fields (on an activity) with data about the contact it pertains to. (The data I want to pull in is in a set of custom fields on the contact).

My idea was to use `hook_civicrm_buildForm` and look up the data by contact id, retrieve it from the API and place it into the form. But the `$form` array for the custom fields form does not contain the contact id.

Then I thought of using tokens to set default values in the custom fields (either for them all, or even just to set one to the contact id in order to solve the above issue) but I tried {contact.contact\_id} and it came out just like that as a literal. Can tokens be used in custom fields on activities? If not, can you suggest another way of getting my hands on the contact id during the form building process?

# Answer
> 1 votes
I ended up going for a very hacky solution.

The buildForm hook runs twice when you are adding/editing an activity with custom fields. Once for the activity and once for the custom fields. So, during the activity run I am taking the contact ID from the form array and putting it into $\_SESSION. Then on the custom fields run I retrieve it and use it to get the values from the API with which to populate them.

I had tried getting the contact ID from the URL as Sleewok suggested, but it is not in there!

---
Tags: custom-fields, hooks
---


# Question
Title: Can't accesss cv from CiviUnitTestCase::createExternalAPI in buildkit environment
I'm QAing https://github.com/civicrm/civicrm-core/pull/9255 and trying to run a couple of relevant test locally:

```
~/src/civicrm-buildkit/build/qa/sites/all/modules/civicrm$ tools/scripts/phpunit api_v3_JobProcessMailingTest --filter testConcurrency

```

I'm getting the following error output from each time the test uses CiviUnitTestCase::createExternalAPI to call the API:

```
[is_error] => 1
[error_message] => External API returned malformed response.
[trace] => Array
    (
        [code] => 127
        [stdout] =>
        [stderr] => sh: 1: cv: not found

    )

```

cv api Contact.get works as expected from the same directory.

Any ideas on what to do next to debug? I get why the test wants to do things concurrently, but my eyes start glazing over (only a little!) when I start looking at civicrm/Civi/API/ExternalBatch.php and I'm hoping I might have overlooked something 'obvious'.

# Answer
> 2 votes
The error message says `sh: 1: cv not found`, so the symptom here is that the `proc_open()` call is unable to find the executable `cv`.

It looked like the place to check this should be `cv()` function in tests/phpunit/CiviTest/bootstrap.php ... but I wasn't able to get that to work.

Having investigated, I suspect that this may be an issue in `\Civi\API\ExternalBatch`. In that class's constructor,

```
$this->env = $_ENV;

```

At this point in the tests, `$_ENV = ['CIVICRM_UF' => 'UnitTests']`. There is no path here, and the call to `cv` fails. Manually inserting a `PATH` into `$_ENV` here does restore the ability to call `cv`, but then fails with a further "malformed response" error, "Failed to determine INI file path.".

This must be working on tests.civicrm.org, so perhaps it's a configuration issue that affects both our test environments?

---
Tags: civimail, developer, testing
---


# Question
Title: Contribution=Membership+Donation incorrect for CiviCRM 4.7.12 on WordPress 4.6.1
I'm setting up a Signup, Renew, Donate page for both Membership signup/renewal and adding in an optional donation. I first tried setting the Financial Type = Membership. Everything worked fine, except the Membership and Donation were consolidated into one fee, not separate despite checking "Separate Membership Payment" when setting up the page. Also, on the receipt to the member, the two fees are added together, so they can't see how much was a donation (fully tax deductible) and how much was a membership (only partially deductible).

So, I tried setting Financial Type = "Donations" and now everything works correctly in the database regarding both separate donation and membership entries, as well as getting the membership info correct. If an offline payment is selected, the invoice nicely breaks out the membership and donation information - see attached. HOWEVER, for an ONline payment, there is a separate email receipt for both the donation and the membership - see attached. The donation receipt is correct. However, the membership receipt shows TWICE the amount, because the membership is counted BOTH as a membership and now a redundant donation - see attached. If the optional donation is not included, the membership receipt still is double-counted, which will certainly create confusion to members.

Is this a configuration issue that someone else has solved? OR, is it possibly a bug in generating the email receipt. Everything works perfectly except the separate e-mail for the membership. Ideally, the email receipt, like the invoice, would simply show both items with the correct total.

Thanks for any help on this.

The screenshot below shows correct reply on our website. Going into the CiviCRM database, a $17 Contribution is recorded as a donation, and a $30 membership is also recorded and the member's membership status is accurately updated.
(source: sdcbcdream.org)

Below is the corresponding incorrect Membership Receipt in email. Note that the membership fee of $30 is listed also as a contribution, so that the total $60 is exactly DOUBLE.
(source: sdcbcdream.org)

Below we see that the Donation Receipt in email is perfect.
(source: sdcbcdream.org)

Finally, the Invoice below generated for an offline payment (Pay Later) also correctly breaks out the total plus each item. It would be great if a receipt like this could be combine into just one receipt e-mail, although not necessary. We just don't want it to look like the Membership cost was double the actual.
(source: sdcbcdream.org)

# Answer
> 2 votes
This is fixed now in the latest 4.7 - I know this for a fact because I QAed it!

You'll still get two receipts - but the math now adds up.

---
Tags: wordpress, civimember, contributions, receipts
---


# Question
Title: How to get the number of event "actual participants" from the API?
I have an event with a price set which allows multiple registrations on one email. It accurately counts the number of people registered against the maximum allowed. How do I get the number of "actual participants" from the API? This snippet only counts the number of registration records:

{crmAPI var="ParticipantS" entity="Participant" method="getCount" sequential="1" event\_id=$event.id } Count = {$ParticipantS.count}

# Answer
You can total up the participants by looking up the line items.

https://gist.github.com/ginkgomzd/5ca327a0711fdb586529a4936accb244
> 2 votes

# Answer
Probably you should check each individual Participant record for the actual number of participants and count them manually. With manually I mean you can count them with smarty code.
> 1 votes

# Answer
I would also check out and install the excellent Summary Fields extension from Jamie McClelland (see https://civicrm.org/extensions/summary-fields ) which among many other summaries shows counts for Events attended per contact and also see Events -\> Dashboard -\> Event Summary (which might be in core, or might be enabled after installing the Summary Fields extension - not sure which ).
> 0 votes

---
Tags: civievent, api
---


# Question
Title: How do we make sure labels are printing with proper capitalization?
CiviCRM 4.3.8 (upgrading as soon as we can!) Drupal 7.50

We have a situation where, when people fill out the contribution form to make a donation, their name and address information is captured exactly as they type it (such as lack of capitalization or all caps). How to we ensure that when we print address labels, the labels have proper capitalization?

Thanks!

# Answer
> 3 votes
Pete suggests two good extensions - I've personally had good luck with Cividesk Normalize.

# Answer
> 1 votes
Several options but none out of the box that I know of.

1/ Sign up for a provider that does Address Checking

2/ check out the Extensions that could do this for \[First and Last names eg this or this

I think the main problem is that whatever validation rules you can think of, someone will have something that breaks those rules. eg should it be 'de Beer' or 'De Beer' in a street name etc.

---
Tags: drupal, address-labels, 4.3
---


# Question
Title: Should Event Scheduled Reminders be sent if they were due to go out before a person registers
Scenario:

There is a Scheduled Reminder due to go out 10 days and 3 days prior to an Event.

A person registers for the Event 2 days prior to it.

Does CiviCRM send the 10 day prior and the 3 day prior Reminders?

I am asking as a client on a customised (by others) CiviCRM 4.4.x is complaining that these Reminders are being sent out, but they should not.

Hoping that users with 4.6.x or 4.7.x can answer this, otherwise I will set up some tests to confirm.

NOTE: these are Scheduled Reminders that were set up via the tab on the Event config screen not via the Communications \> Scheduled Reminders but assume that should make no difference

# Answer
My experience is that yes, the reminders do go out in the scenario you described. I wish there was a way to turn them off in this scenario but I have not found one.
> 2 votes

# Answer
I thought CiviCRM had a 24hr window when considering whether to send or not. So in your example I would expect the registrant to get the 3 day prior reminder but not the 10 day one as its more than 24hrs outside of the rule. Things might have changed but thats how it was working for us and we checked the overall scheduled reminder select statements at the time.
> 0 votes

---
Tags: civievent, scheduled-reminders
---


# Question
Title: Is there a way of removing 'View' from event reports
Event reports have the word 'View' to the right of the contact name - it's a link to the participant record. It's not a selectable column in the report and the problem is that when the report is converted to a pdf the word 'View' gets merged into the contact name which can make this unreadable. Is there any way of removing this 'View' column from event reports? Or making the pdf format better?

# Answer
This is a bug. In replicating it I saw it was easy to fix, so I did.

See the bug report here: https://issues.civicrm.org/jira/browse/CRM-19782

If you don't want to wait for this to be incorporated, you can patch your CiviCRM using the fix here: https://github.com/civicrm/civicrm-core/pull/9546/files
> 2 votes

# Answer
PR https://github.com/civicrm/civicrm-core/pull/9546 has been merged. Fix will be available in 4.7.16. Thanks for the patch!
> 0 votes

---
Tags: civievent, reports, 4.6
---


# Question
Title: Has Let's Encrypt been put into production with CiviCRM?
https://letsencrypt.org/ is a new ***free, automated*** SSL certificate issuing service that simplifies SSL certificate issuance. Despite being a new CA (Certificate Authority), the certificates are recognized by all major browsers already because they are cross-signed by IdenTrust. The project is intended to facilitate much more pervasive encryption of the Internet - https://www.eff.org/deeplinks/2016/03/new-name-and-roadmap-lets-encrypt-client.

The Electronic Frontiers Foundation and others launched the service to the public in December 2015 (https://www.eff.org/deeplinks/2015/12/lets-encrypt-project-comes-fruition-2015-review), and it recently issued its 1,000,000th certificate (https://www.eff.org/deeplinks/2016/03/new-name-and-roadmap-lets-encrypt-client). Has anyone in the CiviCRM community started using Let's Encrypt in production despite the warning that it is only a beta (https://letsencrypt.readthedocs.org/en/latest/intro.html)? Any problems or gotchas?

# Answer
> 6 votes
Yes - I'm using it on one production site and one pre-production. One has the full letsencrypt client, but it assumes root access. The other uses an alternative client https://github.com/diafygi/letsencrypt-nosudo that doesn't need root and works on shared hosting (but you may need to tweak your .htaccess file for the verification process).

I've not needed to renew certs yet. Although not really a problem, be aware that certs only last 3 months (though I think that's during beta). If you have access to the webserver config, there is an auto-renewal feature but if you need to raise a support ticket on a shared hosting platform, that's less convenient.

# Answer
> 4 votes
I am using a hosting control panel that supports it. Sign up, certificate creation and renewal are hassle free with this panel. You only need a (virtual private) server, and a linux distribution, preferably Debian for better support. According to their comparison chart, Let's encrypt is supported both in Standard and Business edition.

The panel is written in C, has its own web GUI as independent service and works fast with only limited resources. See for more information http://www.liveconfig.com/en/ and http://www.liveconfig.com/en/editions

# Answer
> 3 votes
Our WordPress 4.6.1 + CiviCRM 4.7.12 instance is hosted on Dreamhost. I simply added a free Let's Encrypt SSL certificate to our site from the Dreamhost cpanel, installed the "Really Simple SSL" WordPress plugin, activated, and done. Without the plugin, I was getting mixed-content warnings. Afterwards, in Chrome, the green lock displays in the address bar for every page, front-facing and back-end. The plugin also modified .htaccess to redirect https.

---
Tags: ssl
---


# Question
Title: Cannot bootstrap Civi from standalone script in WP
We have an old script in the bin folder that bootstraps Civi like so:

```
require_once '[whatever]/wp-content/plugins/civicrm/civicrm/civicrm.config.php';
require_once 'CRM/Core/Config.php';

```

But as of 4.7 this no longer works. We get:

```
PHP Fatal error:  Uncaught exception 'Exception' with message 'Failed to locate civicrm.settings.php. Please boot with settingsFile, search, or CIVICRM_SETTINGS; or normalize your directory structure.' in /var/www/vhosts/humanism.org.uk/wp-content/plugins/civicrm/civicrm/civicrm.config.php:125

```

I've tried hardcoding the link as recommended here. This gets me a step further, but it then can't find the CMS root folder. And I'm not sure where to set that. I've also tried creating a settings\_location.php file to no avail.

I've tried to modernise it by using cv as per the wiki, but I get the same problem:

```
Failed to locate civicrm.settings.php. By default, this tool searches the parent directories for a standard CMS (Drupal, WordPress, etal) and standard civicrm.settings.php. Symlinks and multisite configurations may interfere. To customize, set variable CIVICRM_SETTINGS to point to the preferred civicrm.settings.php

```

Civi runs fine otherwise - it's just external scripts that aren't happy.

Any ideas? We're on WordPress, with a standard folder structure: Civi sits in /wp-content/plugins/civicrm.

# Answer
> 1 votes
Sorted. The problem was that the script was being run by the web server cron, rather than civi cron. As such the working directory was my home directory. Hacky fix is:

```
chdir(__DIR__);
eval(`cv php:boot`);

```

Better fix is to make it run via Civi cron.

---
Tags: wordpress, installation
---


title: DB table that exists says it doesn't

text:
# Question
Title: DB table that exists says it doesn't
After upgrading to 4.7.10 from 4.7.9, I'm no longer able to edit/add price sets. I think that the DB changes related to https://issues.civicrm.org/jira/browse/CRM-12252 are biting me. (Multi-lingual is enabled.) I don't recall any problems with the upgrade. However, now the DB error says: \[debug\_info\] =\> UPDATE civicrm\_price\_field\_value\_en\_US SET is\_default = 0 WHERE price\_field\_id = 27 \[nativecode=1054 \** Unknown column 'help\_pre\_en\_US' in 'field list'\]

I can reproduce this same error by editing any field for any record in the civicrm\_price\_field\_value table and the civicrm\_price\_field\_value\_en\_US view via phpMyAdmin. The field does exist, I've recreated the View, and dropped the column and recreated it. Other \_en\_US tables are unaffected. (Yes, I've cleared CiviCRM caches, and run commands in Private windows to try to get away from cache poisoning.)

This is happening after the upgrade, with new data since the pre-upgrade backup on a live server. Rolling back isn't really an option. There must be something that needs to be refreshed, but I can't find it. Any ideas?

Wordpress 4.6 CiviCRM 4.7.10

Another bit of weirdness that points toward a failed DB upgrade: The COMMENT portion of the two new fields is not there, but both fields are decidedly there.

# Answer
> 1 votes
It's not really an answer, but I did fiddle around with things enough to break it into working again. I ended up dumping the DB to a backup, dropping both new columns, civicrm\_price\_field\_value.help\_pre\_en\_US and civicrm\_price\_field\_value.help\_post\_en\_US, then changing the DB version back to 4.7.9. I then re-ran the upgrade and got a "Table already exists" error on another table. Dumped the backup back into the DB, recreated the two columns from above, changed the version back, and now everything seems kosher for the most part. I can add/delete/change price sets and therefore work with Events. Can't edit the broken events, but that's a leftover issue I can work around.

# Answer
> 0 votes
I believe it could be a trigger problem. The way the multilingual works in CiviCRM is that CiviCRM will only work on a language at a time using a sql view (e.g civicrm\_price\_field\_value\_en\_US). When you create a new entity, a trigger ensure that every language is properly initialized by copying the multilingual column data to others languages. If the trigger is not up-to-date, it will fail to do this and can lead to the error you got.

A way to solve that is to rebuild triggers like so : https://yoursite.org/civicrm/menu/rebuild?reset=1&triggerRebuild=1

---
Tags: wordpress, upgrade, database, i18n
---


# Question
Title: Translate Personal Campaign Pages / User interface
I have a multilingual setup (2 languages), and I would like to create Personal Campaign Pages.

But some the user interface texts are not translatable:
\- The thermometer texts are not translatable: "x% towards our goal", "€ xxx raised", "Goal: xxx"
\- The texts about the Honor Roll at the bottom of the contribution page are not translated: "Show my contribution in the honor roll", "include my name and message", "list my contribution anonymously"
\- "Create your own fundraising page" link at the bottom is not translatable
\- Text at the bottom of the contribution page "This contribution is being made thanks to the effort of xxxx, who supports our campaign..."

How can I get these texts translated?

# Answer
> 1 votes
Some of these strings are configurations, others are core-strings in the CiviCRM source code.

* templates/CRM/PCP/Page/PCPInfo.tpl : `<div class="thermometer-pointer"><span class="pcp-percent-raised">{$achieved}%</span> towards our goal</div>`

+ This string is missing the {ts}...{/ts} to expose the string to the translation system.
    + It should also be noted that since this has a variable, the variable should be passed like this: `{ts 1=$achieved}<span class="pcp-percent-raised">{$achieved}%</span> towards our goal.{/ts}` (in some languages, there might be a space before the '%' sign, and we can't assume that the string would always translate as "x% \[rest of string\]".
* the other strings in that file, such as 'Goal', 'raised' are in "ts". Looking at Transifex, the strings seem to be there. In what language was it missing? Did you check in Transifex?
* "Create your own fundraising page" this is a CiviCRM contrib page configuration, but the configuration does not seem to be flagged as a multi-lingual field. This would require a schema change and an upgrade function.
* "This contribution is being made thanks to the effort of xxxx, who supports our campaign..." : looking at the code, this string seems to be mostly hardcoded. However, you can change it using a buildForm hook (change the variable/string assigned to the template).

More information about CiviCRM translation can be found here:
https://wiki.civicrm.org/confluence/display/CRMDOC/Internationalisation+for+Developers

---
Tags: personal-campaign-pages, i18n, translation
---


# Question
Title: Unknown extension after upgrading CiviCRM in Wordpress
Updrading from CiviCRM 4.6.4 to latest (4.7) and using wordpress 4.4.5..

The upgrade process showed no errors, in fact it showed "Done" and began to redirect to a url that never loaded. I clicked on "Civicrm" on the left sidebar of wordpress and nothing. I went to the base url of the wp install and this message appears:

`Sorry but we are not able to provide this at the moment.
Unknown extension: nz.co.fuzion.payflowlink
Return to home page.`

Found this in /wp-content/plugins/files/civicrm/ConfigAndLog `Dec 16 10:59:28 [info]
$Fatal Error Details = array(3) {
 ["message"]=>
 string(43) "Unknown extension: nz.co.fuzion.payflowlink"
 ["code"]=>
 NULL
 ["exception"]=>
 object(CRM_Extension_Exception_MissingException)#978 (10) {
 ["errorData":"CRM_Core_Exception":private]=>
 array(1) {
 ["error_code"]=>
 int(0)
 }
 ["cause":protected]=>
 NULL
 ["_trace":"PEAR_Exception":private]=>
 NULL
 ["message":protected]=>
 string(43) "Unknown extension: nz.co.fuzion.payflowlink"
 ["string":"Exception":private]=>
 string(0) ""
 ["code":protected]=>
 int(0)
 ["file":protected]=>
 string(104) "/Users/me/Sites/donate_new/wp-content/plugins/civicrm/civicrm/CRM/Extension/Container/Collection.php"
 ["line":protected]=>
 int(150)
 ["trace":"Exception":private]=>
 array(30) {
 [0]=>
 array(6) {
 ["file"]=>
 string(104) "/Users/me/Sites/donate_new/wp-content/plugins/civicrm/civicrm/CRM/Extension/Container/Collection.php"
 ["line"]=>
 int(111)
 ["function"]=>
 string(12) "getContainer"
 ["class"]=>
 string(34) "CRM_Extension_Container_Collection"
 ["type"]=>
 string(2) "->"
 ["args"]=>
 array(1) {
 [0]=>
 string(24) "nz.co.fuzion.payflowlink"
 }
 }`

# Answer
> 1 votes
Turn off contributed CiviCRM extensions, (such as PayFlow) before upgrading. Then turn them back on or reinstall them.

From the guide, "Because of the huge number and ever-changing nature of community contributed Wordpress plugins, CiviCRM cannot guarantee compatibility with contributed plugins. A list of know incompatibilities can be found at WordPress plugins/themes incompatible with CiviCRM." Check the compatibility list.

https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress

---
Tags: wordpress, upgrade
---


title: Did Yahoo geocoding stop working?

text:
# Question
Title: Did Yahoo geocoding stop working?
Geocoding used to work fine, but I discovered today that some contacts added within the last week or two hadn't been geocoded. I tried editing the addresses manually, and tried running a scheduled / batch job, but the geocoding still didn't happen.

I changed the geocoding provider from Yahoo to Google, and now it works, which is good enough for me. But I wanted to put this out there in case there's a systemic problem.

# Answer
Norris, I think you might be right. I was just testing some code and dumped out the raw response from the Yahoo geocoder and got this message:

> geo.placefinder table is no longer supported

Might be time to revisit our Yahoo integration.
> 1 votes

---
Tags: geocoding
---


# Question
Title: Unknown DB Error When Trying to Disable the Automatic Wildcard Option
We are trying to disable the automatic wildcard option in Civicrm (Wordpress 4.7.2). However, when we try to disable the option and save we get an error that says “Save Failed: DB Error: Unknown Error”. I tried to disable the automatic wildcard option in the main 4.7.2 Wordpress demo installation of Civicrm and it saved with no error message. We contacted our hosting provider who enabled "Enable Debugging" and "Display Backtrace", and they stated that they could not determine what the issue is without manually debugging the code. They recommend that I ask the Civicrm Stackexchange team for help.

Thanks

# Answer
I started experiencing this also, although I was trying to enable the auto wildcard option, which I had previously turned off.

I think it's a bug, but did have success updating it directly in the database as a workaround. In the civicrm\_setting table there's a value called includeWildCardinVlaue. s:1:"1" means "yes" it's on, s:1:"0" means "no" it's off.

I'm running Civi 4.7.3 in Wordpress 4.4.2 on civihosting.com.

Looks like it might be happening to Drupal users, too. Why can't I save search preferences? Specifically 'Autocomplete Results'
> 2 votes

# Answer
This might be related to this issue "Fatal when creating InnoDB fts indexes": https://issues.civicrm.org/jira/browse/CRM-19610

If your hosting provider doesn't allow the TRIGGER privilege for MySQL, you'll get an error any time you try and save the search preferences. Until this bug is addressed, I think directly updating the database to alter the setting is your only option. If there's an API call that can be made to update that setting, you might be able to use the API Explorer.
> 1 votes

---
Tags: wordpress, search, database, error
---


title: Site calling home to civicrm.org - why?

text:
# Question
Title: Site calling home to civicrm.org - why?
civicrm.org is currently down (no big deal in itself) but it has highlighted the fact that my site is trying to contact it and timing out.

This is causing a huge slowdown when logging in (and at other times) but what concerns me is why it is trying to contact civicrm.org at all?

The error I'm getting is that extensions could not be downloaded, but I'm not trying to download an extension. I suspect this is the stock error message you get if the site tries to contact civicrm.org for any reason and fails.

```
Unable to download extension from https://civicrm.org/extdir/ver=4.7.14|cms=Drupal/single. Error Message: Failed to connect to civicrm.org port 443: Connection timed out

```

It seems the site is calling home for some reason. I have a vague memory of clicking something like "allow site to send stats to civicrm.org" but how would I find that setting again to disable it?

# Answer
> 4 votes
I think that error message is coming from your civicrm install attempting to check for extension updates. It does this as part of its routine status checks.

There is a fixme in the code to handle failures like this more gracefully - it really should be logging the error and not bugging you about it.

---
Tags: drupal, ssl
---


# Question
Title: How to alter the 'Manage Case' display so that it doesn't break with longer activity subjects
When working with cases, the subject field of the activities in the case is commonly set by users. When they enter a subject that is longer than about 30 characters, the display of the entire case, when viewed using the "Manage Case' page (/civicrm/contact/view/case?reset=1&id=X&cid=Y&action=view&context=case&selectedChild=case) is broken, in that the table used to list all of the activities extends to the right of the enclosing div, making the whole thing look messy.

Thinking that maybe I could make some CSS edits to set the `table-layout: fixed;` and use `overflow-wrap` to wrap the subject text in its cell, I found that this didn't work, I think because the table element has a numerical width attribute coded in, which looks to be different depending on which case I'm looking at.

Why is the table being created with a width value being set by Civi? Wouldn't it make more sense for this table to be a fixed width so that it displays reliably within the broader page structure, and instead force the text in the subject cell to wrap?

How to begin changing this?

# Answer
I don't know offhand why there's a hardcoded width, but you could try something like

`div.crm-case-caseview-form-block table.nestedActivitySelector { width: auto; }`

to override the width setting?
> 1 votes

---
Tags: civicase, css
---


# Question
Title: CiviPledge "Next Payment Date" automatically set to Jan. 1, 1970
When I enable pledges on a contribution form, CiviCRM processes the first payment properly, and records the correct "pledge made date".

However, it records the "next payment date/payments start" as Jan. 1, 1970, and subsequent payments in their proper increments (weekly, monthly, etc.) on the proper day of that period.

Obviously, this error doesn't apply to pledges entered manually.

I am running Wordpress 4.6.1 with CiviCRM 4.7.12. Any ideas as to what's behind the timewarp back to the 1970s?

# Answer
After updating to CiviCRM 4.7.14, this issue has disappeared. I am unable to replicate it on the CiviCRM Wordpress demo as well, so I think it must have just been an issue with my version being out of date.
> 1 votes

---
Tags: civicontribute, civipledge
---


# Question
Title: Transaction integrity error when merging
I have a vanilla CiviCRM setup which has been running for quite some time. I'm currently running 4.7.14. When attempting to merge records I get a transaction integrity error (see below for backtrace), which points to some sort of SQL error. Merging has worked in the past. Any ideas what the problem could be?

Thanks!

```
#0 /sites/all/modules/civicrm/CRM/Core/Error.php(187):
CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /sites/all/modules/civicrm/packages/PEAR.php(921):
call_user_func((Array:2), Object(DB_Error))
#3 /sites/all/modules/civicrm/packages/DB.php(985):
PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2),
"UPDATE IGNORE  SET entity_id = 311 WHERE entity_id = 312
[nativecode=1064 ** ...")
#4 /sites/all/modules/civicrm/packages/PEAR.php(575):
DB_Error->__construct(-2, 16, (Array:2), "UPDATE IGNORE  SET entity_id
= 311 WHERE entity_id = 312 [nativecode=1064 ** ...")
#5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL,
-2, NULL, NULL, "UPDATE IGNORE  SET entity_id = 311 WHERE entity_id =
312 [nativecode=1064 ** ...", "DB_Error", TRUE)
#6 /sites/all/modules/civicrm/packages/PEAR.php(224):
call_user_func_array((Array:2), (Array:8))
#7 /sites/all/modules/civicrm/packages/DB/common.php(1905):
PEAR->__call("raiseError", (Array:7))
#8 /sites/all/modules/civicrm/packages/DB/common.php(1905):
PEAR->raiseError(NULL, -2, NULL, NULL, "UPDATE IGNORE  SET entity_id =
311 WHERE entity_id = 312 [nativecode=1064 ** ...", "DB_Error", TRUE)
#9 /sites/all/modules/civicrm/packages/DB/mysqli.php(933):
DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error
in your SQL syntax; check the manual that correspon...")
#10 /sites/all/modules/civicrm/packages/DB/mysqli.php(403):
DB_mysqli->mysqliRaiseError()
#11 /sites/all/modules/civicrm/packages/DB/common.php(1216):
DB_mysqli->simpleQuery("UPDATE IGNORE  SET entity_id = 311 WHERE
entity_id = 312")
#12 /sites/all/modules/civicrm/packages/DB/DataObject.php(2438):
DB_common->query("UPDATE IGNORE  SET entity_id = 311 WHERE entity_id =
312")
#13 /sites/all/modules/civicrm/packages/DB/DataObject.php(1627):
DB_DataObject->_query("UPDATE IGNORE  SET entity_id = 311 WHERE
entity_id = 312")
#14 /sites/all/modules/civicrm/CRM/Core/DAO.php(354):
DB_DataObject->query("UPDATE IGNORE  SET entity_id = 311 WHERE
entity_id = 312")
#15 /sites/all/modules/civicrm/CRM/Core/DAO.php(1297):
CRM_Core_DAO->query("UPDATE IGNORE  SET entity_id = 311 WHERE
entity_id = 312", TRUE)
#16 /sites/all/modules/civicrm/CRM/Dedupe/Merger.php(531):
CRM_Core_DAO::executeQuery("UPDATE IGNORE  SET entity_id = 311 WHERE
entity_id = 312", (Array:0), TRUE, NULL, TRUE)
#17 /sites/all/modules/civicrm/CRM/Dedupe/Merger.php(1486):
CRM_Dedupe_Merger::moveContactBelongings("311", "312")
#18 /sites/all/modules/civicrm/CRM/Contact/Form/Merge.php(328):
CRM_Dedupe_Merger::moveAllBelongings("311", "312", (Array:20))
#19 /sites/all/modules/civicrm/CRM/Core/Form.php(435):
CRM_Contact_Form_Merge->postProcess()
#20 /sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Done.php(75):
CRM_Core_Form->mainProcess()
#21 /sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203):
CRM_Core_QuickForm_Action_Done->perform(Object(CRM_Contact_Form_Merge),
"done")
#22 /sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103):
HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge),
"done")
#23 /sites/all/modules/civicrm/CRM/Core/Controller.php(351):
HTML_QuickForm_Page->handle("done")
#24 /sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113):
CRM_Core_Controller->run()
#25 /sites/all/modules/civicrm/CRM/Core/Invoke.php(284):
CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact",
NULL)
#26 /sites/all/modules/civicrm/CRM/Core/Invoke.php(84):
CRM_Core_Invoke::runItem((Array:13))
#27 /sites/all/modules/civicrm/CRM/Core/Invoke.php(52):
CRM_Core_Invoke::_invoke((Array:3))
#28 /sites/all/modules/civicrm/drupal/civicrm.module(448):
CRM_Core_Invoke::invoke((Array:3))
#29 [internal function](): civicrm_invoke("contact", "merge")
#30 /includes/menu.inc(527):
call_user_func_array("civicrm_invoke", (Array:2))
#31 /index.php(21): menu_execute_active_handler()
#32 {main}

```

# Answer
> 2 votes
I have resolved the issue. It appears there was a null entry in civicrm\_custom\_group associated with the contact table and deleting this fixed the problem

---
Tags: drupal, duplicate-contacts
---


title: modifying angular form (new mailing)

text:
# Question
Title: modifying angular form (new mailing)
I'm wrestling with where and how to best make modifications to the CiviMail new mailing form, built with Angular. There are several other questions addressing this in part, but none address my needs completely.

The customization is pretty simple: include the logged in user's email as an option in the From Address selector and set it as the default.

What I've found is that:

1) I can't simply modify the from address list using the optionValues() hook. There are some oddities with from\_email\_addresses passed to that hook -- not all of the values are passed for modification. And because the select2 widget in the angular form is set to filter on is\_active, any values I add via the hook are ignored (the hook only let's me work with the basic option list; I have no access to other record metadata).

2) Even if I use a php override of the CRM/Mailing/Info.php file and alter the from address values passed to angular, the default value is being set in some mystery way that I've not been able to find. Altering the is\_default value and weight so that my desired option is the default has no impact.

3) In general, it seems very difficult to target angular forms via a hook in order to inject js. Maybe I'm missing something obvious, but the pageRun() hook doesn't seem to give me enough to be able to condition the injection of js adequately.

Any tips would be much appreciated.

# Answer
> 1 votes
What about modifying the option list itself? So pick a hook that fires whenever the new mailing page is loaded (hook pageRun or something) and use the api to check if the current user's email is an option in that list. If not, add it

That gets you halfway there... not sure about setting it as the default. I suppose if you made it the default every time the hook fires, then it would temporarily be the default for whoever is composing a mailing.

---
Tags: angular
---


title: When does a Scheduled Reminder send

text:
# Question
Title: When does a Scheduled Reminder send
If I create a Scheduled Reminder based on an Activity with a specific status and set it to trigger 0 hours after Activity Date Time will it fire immediately when the activity is created or when the next Scheduled Reminder cron job runs?

# Answer
The reminder will be sent when the next background Scheduled Reminder task is executed. I have the exact same situation and the reminder was sent by the Scheduled Reminder task 9 minutes later than the trigger because there was a large number of emails being sent. So you can't bank on it being sent immediately.
> 6 votes

---
Tags: scheduled-reminders
---


# Question
Title: CiviCRM generates broken link to contribution page
When I create a new contribution page and use the `links` sub-menu to go to the live location of the page, it redirects to

https://my.site.org/civicrm?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1

This link doesn't work however. I can manually fix the url by removing the "civicrm" part, like this:

https://my.site.org/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1

My question is: where does this "civicrm" bit before the question mark come from? What kind of configuration error could cause this problem? I already checked the BASEURL setting, it seems correct (the value is https://my.site.org/)

# Answer
This is the WordPress "base page" setting. It's at **Administer menu » System Settings » CMS Database Integration**.

That said - I think the way base pages are working in WordPress is slowly being improved over the last couple of versions. Please let us know what version of CiviCRM you're running; it may be that this is fixed with an upgrade.
> 3 votes

---
Tags: contribution-page
---


# Question
Title: Get actual value instead of ID in Address API for Country and State/Province
When am getting some entity using API, it's returning id reference only not the actual value.

**eg:** $result = civicrm\_api3('Address', 'get', array( 'sequential' =\> 1, 'conatct\_id' =\> 10 )); Output:

```
enter preformatted text here
{
   "is_error":0,
   "version":3,
   "count":1,
   "id":6601,
   "values":[{
      "id":"6601",
      "contact_id":"1",
      "location_type_id":"1",
      "is_primary":"1",
      "is_billing":"0",
      "street_address":"#275, xyz",
      "city":"abcd",
      "state_province_id":"9300",
      "postal_code":"560082",
      "country_id":"1101",
      "geo_code_1":"12.7930129",
      "geo_code_2":"77.5051501",
      "manual_geo_code":"0"
   }]
}

```

In this example, state\_province\_id,country\_id is returned. Is it possible to get state name and country name in the result?

Thanks in advance

# Answer
> 3 votes
This is possible in the "trunk" version of CiviCRM, and will be available in CiviCRM 4.7.15, releasing January 4, 2017. Earlier versions of CiviCRM don't have a StateProvince API.

Using the "Join" feature of the API, you can pull in fields from related tables. See my screenshot for how I would construct an address pulling in actual state/province names (and/or state abbreviations) as well as country:

```
    $result = civicrm_api3('Address', 'get', array(
  'sequential' => 1,
  'return' => array("street_address", "supplemental_address_1", "supplemental_address_2", "city", "state_province_id.name", "state_province_id.abbreviation", "country_id.name"),
));

```

Before 4.7.0, API joins didn't exist - and before 4.7.15 there was no StateProvince API. So in the past, developers would either implement their own StateProvince API or use a hybrid of API and BAO calls.

---
Tags: api, addresses
---


# Question
Title: CiviMail will not add groups to recipients
Drupal 6.7 Civicrm 4.7.2 php 5.5.13 mysql 5.6.(sumpin')

I have looked at so many other threads that had this problem. I checked to make sure all the contacts in the group are not listed as deceased (we are not) and I've made sure that all the groups are mailing lists.

If I go to "manage groups" and choose the small test group I made, I can select all members of that group and "E-mail - schedule/send via Civimail" THEN, and only then can I get the recipients to fill in. BUT if I click on the little wrench to edit options, the dialogue window opens, but the whole screen gets greyed out. At that point, I have to F5, or reload, or choose another menu option ... something to take me away from that screen.

So, I made a larger group, one that I would normally send our newsletter to. About 3500. I selected the members of that group and chose "E-mail - schedule/send via Civimail". They were all added to the recipient box. But no matter what I do, after I type in the newsletter contents, it will NOT SAVE. It also will not preview. Therefore, it won't go to the next screen.

It does show up in Unscheduled mailings, but without any content in the body. I still can't add it.

Can anyone help me troublshoot? I really need to be sending out mailings for our organization, but I can't.

# Answer
> 1 votes
From your comment referencing the forum post, I can see that this is a Javascript error. You should be able to resolve this by following the steps outlined here: Troubleshooting JavaScript in CiviCRM

# Answer
> 0 votes
The easiest way to use Mailings is not via the group contact list and select all contacts, but to go directly to "Mailings" in the top menu bar.

There you select "new Mailing". In that screen you can select the Mailing Group(s) you want.

Does your error occur there too?

---
Tags: civimail
---