title: Add county to reports

text:
# Question
Title: Add county to reports
I'm looking for a way to add sorting and/or grouping by county to reports. Specifically, Membership Details and constituent Details. I've tried a bit of monkeying with the PHP but I don't seem to have a good enough grasp of it. I'm running v4.7.6. Thank you.

# Answer
Ah yes unfortunately you will need some PHP edits to make that work; Custom reports in CiviCRM are a good way to start getting into the code base though!

Here's two references for you: https://sf2012.civicrm.org/sites/default/files/slides/CiviCRM%20Reports-Customize%20and%20Extend.pdf

and

https://alastaira.wordpress.com/2011/03/17/civicrm-creating-a-custom-report/
> 1 votes

# Answer
Those two reports work differently.

In most reports, there's an array called `columns` that determines which fields are available. However, to make reports more standard, there's a simple function "getAddressColumns" a report can call if they just need standard address columns. Not all reports can use the standard columns, and not all have been converted over (if it ain't broke etc.), but some have.

Membership Detail report is one of those reports that have been converted - and so it should definitely have the county field. See screenshot.

Constituent Detail does NOT use that function. To add the column:

* Edit `<civicrmroot>/CRM/Report/Form/Contact/Detail.php`.
* In the section `civicrm_address` (around line 143), add the `county_id` field to the array. Copy the style of "state\_province\_id".
* That will let you select the column, but it will show as an ID, not the county name. In the `alterDisplay` function, copy the state\_province\_id handling (around line 887) and change all the references to county\_id from state\_province\_id.

That should at least get your counties displaying! I'll let KarinG's answer suffice for getting your sorting/grouping working.

Finally - you can always use exports instead of reports, and group in your favorite spreadsheet program.
> 1 votes

---
Tags: civireport, county
---


title: Importing Participants

text:
# Question
Title: Importing Participants
I am trying to import multiple participants from a CSV file into Civi as event participants. I am running into an issue when I go to match the required fields. I keep receiving an error because the Participant Status ID doesn't match.

This is a historic event I am trying to enter from another database, so I don't believe we have a match for this field. Is there a way to get around this?

Most of the constituents are already in Civi and have an external identifier from the past database. I now just to update their record to note that they attended the event.

# Answer
"Participant Status ID doesn't match" means the value(s) you are trying to insert into this field do not match the option values defined in CiviCRM.

Both **Particpant status** and **Participant status Id** are in the list of possible fields to import. Although the UI indicates that you need to import **Participant status Id** I think you can import **participant status** instead provide the text you import matches exactly with the defined options.

You could be tring to import values such as 'Registered' or 'Attended' into **Participant status Id** when it is expecting numerical values or you could be trying to import a text value into **Participant status** that is not one of the defined options. (perhaps 'Att' or 'attended' instead of 'Attended')
> 2 votes

# Answer
Is your CSV file actually **comma-delimited**?

If you choose another delimiter (e.g. semicolon or tab), the import might not work. Been stuck with this issue for hours before figuring out that might actually be a bug in CiviCRM.

See: Can't import Event participants
> 1 votes

# Answer
If the file you uploaded did not use commas as the file delimiter, then it's likely you were seeing CRM-19192: Event participants (and possibly other entity) imports do not handle "non-comma CSV".
> 0 votes

---
Tags: civievent, import
---


title: Q: Import Field Separator bug?

text:
# Question
Title: Q: Import Field Separator bug?
After trying to import **event participants** for many hours I discovered a confusing bug with **Import Field Separator**.

During import it is possible to specify which character delimits fields - comma, semicolon, pipe or even tab. In fact **semicolon** does not work and neither does **tab**. They just break the data.

It is particularly confusing because MS Excel by default exports semicolon separated files. Which I did not see the need to convert to comma-separated as CiviCRM was seemingly offering an option to specify semicolon as Import Field Separator.

Tested on CiviCRM v4.7.9. on Wordpress. Also does not work in CiviCRM Sandbox.

# Answer
> 1 votes
This is CRM-19192: CSV values must be comma separated

# Answer
> 0 votes
I just created test data from http://generatedata.com (see below) and tested against the master branch of both Drupal and WordPress. I could not replicate this issue.

Excel has inexcusably poor CSV parsing code - presumably because they have little interest in interoperability. I suspect the issue is with the data rather than the import code.

I suggest downloading and installing a copy of LibreOffice, which is free. Open your CSV there, and check to see if the formatting is correct.

If the formatting is correct, save a COPY of the CSV and try importing that to CiviCRM. If that works (and I expect it will), you can open up the two CSVs side-by-side in a regular text editor (e.g. Notepad, Sublime Text). The difference in how Excel and LibreOffice saved the file should hopefully be obvious.

If the formatting is wrong, that's a good indication that it's Excel that's generated bad formatting. In that case, open the Excel file in LibreOffice and save as a CSV from there.

Here's a snippet of the data I was able to successfully import. You can test to see that CiviCRM is working with semi-colon imports by saving this to a file:

```
first_name;last_name;email;phone
Martha;Benson;ante.dictum.mi@vitae.com;(206) 125-2379
Wesley;Christensen;quam.Pellentesque@egestas.org;(329) 985-3800
Darryl;Garrett;felis.ullamcorper@Duis.net;(749) 385-5900
Ariel;Holt;luctus.sit.amet@nislsemconsequat.ca;(110) 493-9459

```

---
Tags: import, issues
---


# Question
Title: Contribution page receipt (date and time)
My contribution page receipt is showing the wrong date and time.

I submitted the page at 11.30 on 1st August 2016, but the receipt to my email states '8th, 2016 1:01AM'

Update: Further submissions show that '8th, 2016 1:01AM' is always shown. I am using a webform to submit the details.

Everything else is correct, just this. Any ideas please?

CIVICRM 4.5.8 Drupal

Thanks, Andy

# Answer
Been there; seen this - exactly this - but it got resolved - likely during a 4.6 minor version upgrade - before we had a chance to debug it ourselves.

I highly recommend you upgrade from 4.5.x for many other reasons than the receipting.
> 1 votes

---
Tags: civicontribute
---


title: how the members can login to civicrm

text:
# Question
Title: how the members can login to civicrm
after I created the signup and renewal page and configuring it, I found that it is not accessible by people who are not wordpress users, how to solve this, and how the users can enter their profiles without being users in wordpress(in another word to be a user in civicrm and not user in wordpress)?

# Answer
Muhamed - you can allow people to register anonymously, they do not have to be 'members' or users in WP. When people register, their name, email and address information will be used to create new 'contact' records. It is a matter of setting up CiviCRM permissions as you want them.
> 1 votes

# Answer
I guess you should install a plugin to grant permission for the user

Please refer to the below plugin https://civicrm.org/extensions/civicrm-wordpress-member-sync

I guess this helps !!!
> 0 votes

---
Tags: wordpress, civicontribute, civimember, user-account
---


title: Live contribution pages coming up blank

text:
# Question
Title: Live contribution pages coming up blank
I've recently updated our CiviCRM install to v4.7.9 (was 4.7.6 IIRC). Now it seems our contribution pages aren't filling with anything -- the theme parts show, but the main part of the page is empty:  I've looked at the page source, and can see that various CiviCRM script links are in there, but there's no sign of the contribution form fields. Is there something I need to reset to get the fields back, or have I got a bigger problem...?

Versions: Wordpress 4.5.3, Twenty Fourteen theme, CiviCRM 4.7.9

**Edit:** Looks like profile pages are doing the same thing. It's all working in Test Drive/Preview, but not on "live" pages.

# Answer
There have been a few questions on this site relating to:

* CiviCRM not displaying pages under certain WordPress themes, or
* CiviCRM showing only CiviCRM content - without the theme!

In particular I'd recommend checking out this question which, while it describes different symptoms to what you're reporting, may help point you in the right direction.

There is also a question on which WordPress themes are thought to work well.

My suggestion would be to try other "stock" WordPress themes first, and see if the page contents start appearing. If so, then you have a good reference point to analyse the problem. If not, then you might be looking at a CiviCRM bug.

Twenty Fourteen theme is a "core" (if older?) Wordpress theme that CiviCRM is likely to have been tested with. Other WordPress plugins might be a factor still, so if you have the same issue with all themes then look into the possibility that a plugin is interfering.

Some other questions which seem similar or related to issues with CiviCRM in WordPress themes:
> 1 votes

# Answer
Turned out to be my own fault... After I did the upgrade I did a little housecleaning. This WP site is only used for CiviCRM, so I figured I could delete the "Hello World" post. Nope -- that post is needed (or maybe just at least one post, I'm not certain). It was still in the trash, so I restored it, and the contribution pages started working again.

Props and an answer tick to Chris, as he set me down the right path of confirming that it was indeed something up with the theme.
> 1 votes

---
Tags: wordpress, civicontribute
---


# Question
Title: Bulk update relationships to household members
We have household memberships. Ive noticed that some households are missing a relation to a residential community that they reside in. This community is common to those households. I tried to select all those contacts and use a profile to batch update but it wont let me make a profile for relationships to households?

Is there a way to do this.

Ie:

Mary Smith Jane Doe Trevor ward Leon Jones

they all live at Smithtown Residential Resort (this is a relationship called residential community)

I want to select the records then tell Civi all these household contacts belong to the residential community

# Answer
You don't need Batch Update for this - you can use the search action "Add relationship - to household". Note that this is the 4.7 language - 4.6 probably calls it something like "Add relationship to household".
> 0 votes

# Answer
You may want to have a look at an extension we developed called householdmerge. I am not sure if it actually solves your problem and it is still in a beta phase but it may be worth a shot.
> 0 votes

---
Tags: civimember
---


# Question
Title: "No user/contact ID was specified, so the Profile cannot be used in edit mode"
Upgraded to CiviCRM 4.7.9 with WordPress. Now the Profiles only work for a logged in user. Anyone else gets the error message shown above. It's not a members only website, so you shouldn't have to login. Here's one url: http://wiuta.org/petition

I tried deactivating all plugins but CiviCRM, but the problem persisted. I tried creating a new profile, but that didn't work either. My website is broken, please help!

# Answer
Change the shortcode to `create` mode instead of `edit`, Civi expects a contact id if it's in edit mode, ie a logged in user, it would be something like `[civicrm component="profile" gid="xx" mode="create" hijack="0"]` where xx would be the profile id.
> 3 votes

---
Tags: profile
---


# Question
Title: Same custom field name at Contact Form seems to be different for each logged in user
We've tried to alter some custom fields display (namely, make some fields display data only, not editable text field). It seems that all custom fields logic is inside **templates\CRM\Custom\Form\CustomField.tpl file** So, we've tried to do something like this

```
{if $element.data_type neq 'Date' AND $element.element_name eq "custom_358_437"}
{$element.element_value}

```

where **custom\_358\_437** is a field name picked via form html code inspector. All seems fine till another logged in user looks at the same form; it turns that the field gets "random" another name (say, **custom\_15\_415** for other user and **custom\_47\_412** for yet another user), which seems to be pretty odd.

Not sure if it's "by design" (yet not sure why same field name should be changed for each user); if it is so, is there any logic in field name generation (may be current user ID is being used, although it doesn't look like this)? In a broader sense, how do we target custom field for making changes, if not by field name?

# Answer
> 0 votes
Not the exact answer, just a workaround one may find useful: field label stays unchanged even if field name changes, which makes possible element catch by label, e.g.:

```
 AND ($element.label eq "Element label")

```

---
Tags: developer, smarty
---


# Question
Title: Civimail Urls don't load and show Could not load the settings file at:
We have setup CiviCRM to run as part of an installation profile. So instead of the default `sites/all/modules` folder, CiviCRM is installed in `profiles/ourprofile/modules/contrib/civicrm`.

CiviCRM works perfectly and so we have had no issues. However, when testing an email campaign I keep getting this error message

> Could not load the settings file at: (followed) by a path to civicrm.settings.php file.

Nothing loads and the links don't work. I read a few comments on Github that there is a similar issue for multisite on CiviCRM. However, this is a single site and I am not sure what do next as there is not much information on how this can be fixed.

I know the easiest solution is to move CiviCRM to the `sites/all/modules` folder. However, this will make it harder for us to maintain versions for CiviCRM as part of our profile.

Any advice is appreciated. Thanks.

# Answer
You'll see from `civicrm_conf_init()` that CiviCRM assumes the site's `settings.php` and `civicrm.settings.php` have a specific (relative) location to the CiviCRM codebase. When CiviCRM is installed in a profiles folder, this isn't the case, so config discovery fails.

I believe this could be addressed fairly easily (eg via available Drupal functions like `conf_path()` for the config directory and `drupal_get_path()` for the module path), and it would probably make CiviCRM a better "Drupal" citizen if that was the case.

AFAIK the reason CiviCRM doesn't use functions provided by the host CMS when initialising site config is just to handle a few remaining locations where CiviCRM scripts are called directly, without being initialised via the CMS itself.

These are scripts like `extern/ipn.php` (for which `civicrm/payment/ipn/%processor_id` would be preferable: CRM-9779), and other files in that `extern` directory.

While a patch to support locating CiviCRM in the profiles directory alone could be contributed, I'd encourage working towards eliminating remaining scripts in those deprecated locations. Then CiviCRM doesn't have to duplicate the logic of each CMS's config discovery (amongst other benefits), and it'll "play nicer" in that CMS ecosystem.

Some background:
> 1 votes

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


# Question
Title: What is the correct way to work with custom data in the API?
I always seem to struggle to find a concise way of working with custom data via the API. I know that something like...

```
$updateParams = array('version' => 3, 'contact_id' => $contact_id, 'custom_160' => $badges);
$result=civicrm_api('contact', 'update', $updateParams);

```

...works for some but not all entities, so I presume that I'm meant to be using the CustomValue API, but whenever I do, my code looks v. clunky / doesn't work / I resort to SQL in frustration. If anyone has a concise example or two of CustomValue in use that would be most appreciated.

# Answer
As of CiviCRM 4.6, the api explorer is like 1-stop-shopping for browsing, building and testing api calls.

* You can start on the "Examples" tab to see how custom values are generally done:
* If you want more detailed explanation of how it works, try the "Code Docs" tab:
* And finally, the Explorer tab lets you browse available params and will write the php/javascript/rest/cli code for you:
> 8 votes

# Answer
Note that 'update' action is deprecated and replaced by 'create'. If you give the primary fields in the params (usually id but it's entity\_id+custom\_xx in your case), you will automatically get an update.

Also note that there are examples of api uses in https://github.com/civicrm/civicrm-core/tree/master/api/v3/examples. It's very helpful to see what are the possibilities and what are the results we can expect.

Last, you could use civicrm\_api3 instead of civicrm\_api so you don't have to define the version in the params, which i personnaly found awkward.

Having that say, I guess the best way to do what you want would be :

```
$params = array(
  'custom_160' => $badges,
  'entity_id' => $contact_id,
);
try {
  $result = civicrm_api3('CustomValue', 'create', $params);
}
catch (CiviCRM_API3_Exception $e) {
  // Handle error here if you want
);

```

If you are pretty sure of what you are doing and want a concise way, you could do :

```
$params = array('custom_160' => $badges, 'entity_id' => $contact_id);
$result = civicrm_api3('CustomValue', 'create', $params);

```
> 2 votes

# Answer
My first stopping points on how to work with CiviCRM API are usually -

In those directories you'll find examples for *most* API usage.

```
$params = array(
  'first_name' => 'abc3',
  'last_name' => 'xyz3',
  'contact_type' => 'Individual',
  'email' => 'foo@example.com',
  'custom_123' => 'foo',
);
try {
  $result = civicrm_api3('CustomValue', 'create', $params);
}
catch (Exception $e) {
  // uhoh
}

```

Looking up custom field IDs in API calls can require a bit of additional code beforehand.
> 1 votes

# Answer
If you want to get the CustomValue of other entities than Contact, you need to specify the entity\_table. I think it could be good to have this in the api examples because it is indeed not there and very hard to find this info.

Example:

```
$result = civicrm_api3('CustomValue', 'get', array(
  'sequential' => 1,
  'entity_table' => "Participant",
  'entity_id' => 23,
));

```
> 0 votes

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


title: How to uninstall from wordpress

text:
# Question
Title: How to uninstall from wordpress
how do i do a clean uninstall of civicrm from wordpress? I don't have any data that I need to keep. Can I just delete the folder and drop the tables from my database?

Thank you!

# Answer
> 1 votes
If you wish to uninstall Civicrm from your wordpress - then uninstall Civicrm from wordpress plugin list - that should do the work

later you can delete the Database and also CiviCRM folder from your plugin directory.

I guess this helps - Thanks !!!

---
Tags: wordpress
---


# Question
Title: Some contacts are shown as LAST, FIRST; some as FIRST, LAST
On **Constituent Summary page** in **Contact name** column I see contacts listed in two different formats.

1) Last, Name

2) Name Last

Also, in search boxes, CiviCRM provides suggestions in these two formats.

How can I get all contacts displayed the same way (e.g. First Last)?

# Answer
Looks like your greetings/display name format has changed at some point in time.

You can run the "Update Greetings" job to force a refresh, I would create a copy of the job and set the relevant force flags so that its not constantly refreshing.

You can get to the Schduled Jobs page from the Admin -\> System settings menu.
> 2 votes

# Answer
I tested this solution and it worked: Is there a way to regenerate the display and sort names?

Basically it requires exporting and re-importing Contact Names and Contact ID. The display and sort names are regenerated automatically.
> 0 votes

---
Tags: contacts
---


# Question
Title: Scheduled reminders have stopped working in v.4.7.8
Just discovered that scheduled reminders have stopped working and appear to have done so since updating CiviCRM to v4.7.8 on 3rd June. The following error message is in the scheduled jobs log: Summary Finished execution of Send Scheduled Reminders with result: Failure, Error message: Cannot build query. Variable "@memberTypeValues" is unknown. Details Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}

Full message: Finished execution of Send Scheduled Reminders with result: Failure, Error message: Cannot build query. Variable "@memberTypeValues" is unknown.

Other points to note:

* Wordpress version 4.5.2
* Other CRON is working
* No extensions are installed
* Scheduled mailings are going out OK

Can anyone tell me where I should be looking for errors or are there any known bugs? Many thanks

# Answer
Yesterday, the scheduled reminders started working again! This was after I had disabled and then re-enabled 'Membership Types' in Administer/Civimember and also upgraded to v 4.7.10 Hope this helps anyone having the same problem.
> 1 votes

---
Tags: wordpress, civimember, cron-job, scheduled-reminders
---


# Question
Title: Event Discount Based on Number of Participants Selecting Price Set Option
I'm working on a child care event for a conference. The way the pricing is set up, you have different sessions for child care with a discount applied for two or more children in the same session. So:

* Saturday all day ($30 1 child; $40 2 or more children)
* Saturday morning ($15 1 child; $25 2 or more)
* Saturday afternoon ($15 1 child; $25 2 or more)

I am assuming in order to do this the way it's structured I have to use hooks to modify pricing? I'm assuming civicrm\_buildAmount is the appropriate hook. Any suggestions on how to approach what I'm trying to do. I'm not entirely sure how I would review all price sets for registrants to say (pseudo code):

if ( more than one registrant selects $option\['saturday all day'\]) { $option\['amount'\] = 40/total registrants selecting this option }

Any thoughts are appreciated.

Thanks, Rachel

# Answer
To my knowledge you have started in the right path and that would be the best way to process priceset - yes BuildAmount hook is used for handling the priceset amount

Also I guess you should have already known about discount module if not please refer to the link below - If this works in anyway

refer - https://civicrm.org/extensions/cividiscount

All the best - I guess this helps !!!
> 1 votes

---
Tags: civievent, civicontribute, cividiscount
---


title: On CiviCRM 4.7.7 Error Exporting

text:
# Question
Title: On CiviCRM 4.7.7 Error Exporting
I've moved to a new server with a current version of PHP, have updated WordPress to 4.5.2 and updated CiviCRM to 4.7.7. I still get this error when exporting selected records from an Advanced Search:

Warning: strpos(): Empty needle in /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php on line 709

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public\_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895 "Contact ID","Contact Type","Contact Subtype","Do Not Email","Do Not Phone","Do Not Mail","Do Not Sms","Do Not Trade","No Bulk Emails (User Opt Out)","Legal Identifier","External Identifier","Sort Name","Display Name","Nickname","Legal Name","Image Url","Preferred Communication Method","Preferred Language","Preferred Mail Format","Contact Hash","Contact Source","First Name","Middle Name","Last Name","Individual Prefix","Individual Suffix","Formal Title","Communication Style","Job Title","Gender","Birth Date","Deceased","Deceased Date","Household Name","Organization Name","Sic Code","Unique ID (OpenID)","Current Employer ID","Contact is in Trash","Created Date","Modified Date","Addressee","Email Greeting","Postal Greeting","Current Employer","Location Type","Street Address","Street Number","Street Number Suffix","Street Name","Street Unit","Supplemental Address 1","Supplemental Address 2","City","Postal Code Suffix","Postal Code","Latitude","Longitude","Address Name","Master Address Belongs To","County","State","Country","Phone","Phone Extension","Email","On Hold","Use for Bulk Mail","Signature Text","Signature Html","IM Provider","IM Screen Name","OpenID","World Region","Website","Group(s)","Tag(s)","Note(s)","Phone Type","IM Service Provider"

It then lists each of the records selected in the same format...

# Answer
> 2 votes
This is a bug in CiviCRM. I can replicate the issue on my database using v4.7.

Basically what is happening is that if a sort order isn't defined, the $order variable is NULL which throws off the strpos() function and sends the error message which then triggers the "headers already sent" errors.

See this post about why the $order variable was changed: https://forum.civicrm.org/index.php?topic=36040.0

This post "Empty needle" error when exporting from Advanced Search results provides a quick fix by hiding error messages.

I've submitted an issue to CiviCRM: https://issues.civicrm.org/jira/browse/CRM-19212

---
Tags: export
---


# Question
Title: Radio buttons are before the amounts and on a different line
How do I make the radio button appear on the same line as the amount/label and on the right of the label? I have a simple contribution page - Joomla 3.6.2 and CIVI 4.7.9. The section with amounts to donate starts with a radio button on one line, then the field label is on the next line, then the amount. It makes it confusing as to which button is for which amount.

# Answer
CiviCRM should have those radio elements on the same line by default. My guess then is that the website theme or some other module/extension in place alters this behaviour.

This is really a CSS question, and since you're already not seeing the default appearance of CiviCRM forms (see Drupal, Joomla!, WordPress examples), your question is likely going to be better solved in two steps:

* *"How do I make my site theme display CiviCRM's form styling as expected?"*, then
* *"How do I change the CSS to position the radio buttons to the right of the label?"*

To do that, you'll need to either give the URL of your site (so people can see for themselves) or describe enough about the CSS in place to let people give you an informed reply.

One thing you could try is switching to a default theme for your CMS and verify if the CiviCRM forms appear as expected. Then you have a reference point for what works, and you can start addressing the issue.

Hope that helps!
> 3 votes

---
Tags: civicontribute, forms, fields
---


# Question
Title: How to add case fields to activity report?
Is it possible and what's the best way to add case fields (e.g. case type) to an activity report whilst still ensuring civi can be updated easily?

I'd imagine those aren't default options because not all activities are related to a case.

# Answer
> 0 votes
Search - Custom Searches - Activity Search supports case id at least already, but the display template explicitly doesn't show it, although it uses it to create links.

Doesn't look like it would be difficult to modify Activity Search. You might also be able to modify the Activity CiviReport similarly. For Activity Search, it would be something like:

```
1) In CRM/Contact/Form/Search/Custom/ActivitySearch.php:
(a) Near the top where it defines the columns, add your columns labels as desired.
(b) In function all(), add the case-related fields to the select definition.
(c) In function from(), add a left join on civicrm_case.

2) In templates/CRM/Contact/Form/Search/Custom/ActivitySearch.tpl, display your new columns as desired.

```

---
Tags: civireport, civicase, activity
---


title: How to install a security update

text:
# Question
Title: How to install a security update
I need to upload the recent security update to CiviCrm 4.6.15, but I do not know how to or where to go to do same. I tried under extensions update but it did not work.

# Answer
> 2 votes
The Wiki has good instructions for each CMS:

If you are using Drupal/drush, you may also be interested in this thread.

---
Tags: security-advisory
---


title: Events - upload image

text:
# Question
Title: Events - upload image
Has anyone come across a plugin/extension/hook that adds an upload image ability to events "Info and Settings" tab (or a separate tab)?

# Answer
Is there anything stopping you using Custom Fields to do this? Thats normally how people add extra information they wish to hold about the event. You'd then need to do some work on the display side to use the image.
> 1 votes

---
Tags: wordpress, civievent, images
---


# Question
Title: Bcc not hidden on mail sent by SMTP - is this a bug?
If a contribution page is configured to Bcc receipts to a given address, the Bcc should not be included in emails to any recipient of that receipt.

In my CiviCRM 4.7.9 site, the Bcc header is correctly not included in any receipt emails, if mail is sent with mail(), i.e., if "mail()" is selected at /civicrm/admin/setting/smtp.

However, it IS visible in the email to the donor, if mail is sent with SMTP, i.e., if "SMTP" is selected at /civicrm/admin/setting/smtp.

FWIW, the SMTP provider in this case is sendgrid, but I'm not sure yet whether that's relevant.

Is this a bug in CiviCRM, or is it an issue with Sendgrid?

**Update:** A code change as shown here causes Bcc to behave properly in SMTP (sendgrid) and mail(). Makes me think it's a bug that could be fixed in core.

```
diff --git a/CRM/Utils/Mail.php b/CRM/Utils/Mail.php
index 57453a0..be3f052 100644
--- a/CRM/Utils/Mail.php
+++ b/CRM/Utils/Mail.php
@@ -267,6 +267,7 @@ class CRM_Utils_Mail {
       }
       if (!empty($headers['Bcc'])) {
         $to[] = CRM_Utils_Array::value('Bcc', $headers);
+        unset($headers['Bcc']);
       }
     }
     if (is_object($mailer)) {

```

# Answer
Yes, it's a bug, which is now fixed: https://issues.civicrm.org/jira/browse/CRM-19173
> 2 votes

---
Tags: issues
---


# Question
Title: Wordpress permission issue on a fresh install of CiviCRM
I have just installed CiviCRM and I have a permission issue when accessing the "Configuration checklist" page.

When clicked, this URL redirects me to front-end with message :

> "You do not have permission to access this content."

**Page URL** : http://domain.com/civicrm/?page=CiviCRM&q=civicrm/admin/configtask&reset=1

How come I encounter this issue ? Can it be a server-side configuration problem ?

Thanks for your support.

# Answer
> 1 votes
I have around workaround for this issue - not an answer or fix to the permissions problem though....

If you scroll to the footer of the page and click on the "System Status: error" link.

http://localhost/xxxxxx/wp-admin/admin.php?page=CiviCRM&q=civicrm/a/#/status)

This will take to the config checklist screen.

Still need an answer to the permissions issue though - where do I set permissions for the config checklist page, and why would they have changed if I have not upgraded anything?

# Answer
> 1 votes
The message "You do not have permission to access this content." is being issued as a result of the logic in `wp-content/plugins/civicrm/includes/civicrm.users.php`. This file is new in 4.6. A variable `$invalidPaths` is being used in an unexpected way.

`public function check_permission( $args ) {
 if ( $args[0] != 'civicrm' ) {
 return FALSE;
 }
 $config = CRM_Core_Config::singleton();
 // set frontend true
 $config->userFrameworkFrontend = TRUE;
 require_once 'CRM/Utils/Array.php';
 // all profile and file urls, as well as user dashboard and tell-a-friend are valid
 $arg1 = CRM_Utils_Array::value(1, $args);
 $invalidPaths = array('admin'); // So what is this for? Denying admin some rights? Why?
 if ( in_array( $arg1, $invalidPaths ) ) {
 return FALSE;
 }
 return TRUE;
 }` I don't know what was intended, but I interpret it to mean "if you're admin you're not authorized" - which is the opposite of what one would normally expect. If you invert the logic or replace the array containing 'admin' with an empty array you get to see your checklist (at your own risk :))

I haven't tested to see if there are any adverse side effects of doing that and I don't know yet if this is an important bug.

# Answer
> 0 votes
if you have recently updated to a newer version of civi, some of the permissions also have to be updated - while I don't remember this being the case for the configuration checklist page, this was the case for mailing templates for our clients.

---
Tags: wordpress, installation, permissions
---


# Question
Title: Why are CiviCRM fields not displaying from a view in a panel in Drupal?
I feel like I am missing something fairly basic, but here goes.

I am trying to display CiviCRM Contact fields from a view that will be displayed in a content pane of a panel, but they just don't appear.

My view has a mix of Drupal and CiviCRM fields. The Drupal fields appear in the panel, but the CiviCRM fields don't. When I display the view as a standalone page, the CiviCRM fields appear along with the Drupal fields.

It would seem, then, that the problem is passing the CiviCRM data to the panel.

Is there a context or relationship that is required in the panel?

I have added CiviCRM fields directly from the 'CiviCRM Contact' tab of the 'add content' wizard in Panels, but they exhibit the same behaviour. The fields don't appear on the front end of the site (or in previews).

I am working with Drupal 7.50 and CiviCRM 4.7.6.

Thanks for your help, Lewis

# Answer
> 3 votes
It turns out the issue was not specific to CiviCRM fields. The issue is in the relationship between Views and Panels, specifically, passing arguments between the two.

The missing piece for us was using the 'Argument input' setting in Views to pass the arguments properly.

Eventually discovered a great post about it here: http://www.metaltoad.com/blog/passing-page-arguments-view-panes

I won't try to reproduce it. Following these steps solved our problem.

Enjoy, Lewis

---
Tags: drupal-views
---


# Question
Title: Any procedure to upgrade Joomla 2.5.28 to Joomla 3.5 with CiviCRM 4.4.4?
I am in the throes of making the upgrade captioned above. If there was a documented procedure or a list of potential issues to help I would be grateful. Maybe I should upgrade CiviCRM to a leter version first??

# Answer
> 1 votes
The first issue to raise is that CiviCRM 4.4 is not necessarily compatible with Joomla 3.5 according to this post: https://civicrm.org/blog/colemanw/announcing-civicrm-445 Since CiviCRM 4.6 apparently *is* compatible with Joomla 2.5, I suggest upgrading Civi first from 4.4 to 4.6. Most CiviCRM documentation has to do with upgrading CiviCRM, rather than upgrading Joomla, so I'm not prepared to give advice on Joomla upgrades specifically.

# Answer
> 0 votes
The point that Stuart (CiviTeacher) made is a good general principle: separate your CiviCRM upgrade from your CMS upgrade. Reduce the number of moving parts.

Specifically regarding Joomla 2.5 to 3.5, there's not too much to worry about from the CiviCRM perspective so long as you're running a CiviCRM version that's compatible with both Joomla versions (like 4.6.x, as Stuart suggested). My coworkers and I have run a number of these without incident.

In practice, you'll probably want to copy your Joomla site, upgrade the copy and upgrade or replace it's extensions, and then make that copy be the new production site. This works great for a CMS, where you can tell everyone, "Hold your edits: I'm upgrading the site." However, with CiviCRM, someone might make a donation out of the blue during the time you're upgrading the site copy.

Plan on copying the CiviCRM tables from the J2.5 site to the J3.5 site just before launch. If CiviCRM is the same version, and you're using the same URL, you'll just need to check the file paths (in the two `civicrm.settings.php` files, and then by visiting Administer - System Settings - Clear Caches and Update Paths) and then clear the contents of `media/civicrm/templates_c` and `media/civicrm/ConfigAndLog`.

But again, the big thing is to keep the CiviCRM part of it as simple as possible by doing a regular CiviCRM upgrade, a Joomla upgrade, and then (if necessary) a regular CiviCRM upgrade to your final intended version. Don't mix CiviCRM changes into the Joomla upgrade work.

---
Tags: joomla, upgrade
---


# Question
Title: How can I create public display of all Activities for Current Day + X weeks in Future (WordPress)?
We use 4.6.14 on WordPress. We're a radio station and we book guests for appearing on-air. Each guest is managed as a **Contact** and their appearances are recorded as a defined **Activity** (e.g., On-Air Appearance). We track each guest's appearance history by looking at **Activities** associated with his contact information. We also run reports for **all on-air appearances** (regardless of **Contact**) so we know ourselves what is on the schedule and what holes we have to fill.

We can do all of the above via CiviCRM internally (hooray)!

***How can we dynamically display the "All appearances" view on our public site so that listeners get a list of upcoming guests?*** CiviEvents has RSS, HTML and iCal feeds that yields something close to what we want, but our appearances seem to be more like Activities than Events -- unfortunately Activities have no built in feeds. Also, my research shows that there may be such views in Drupal-based CiviCRM, but we're heavily in WordPress as a standard.

***Can we write code to poll the Activity data to return what we want? Is there another approach?*** Or is this even possible?

Thanks.

# Answer
> 1 votes
You're looking at writing a custom WordPress plugin along the lines of the CiviEvent Widget plugin. Basically, you'll query the CiviCRM API to get activities (filtered appropriately to your needs) and then render them as a shortcode and/or widget.

So, yes, you can write custom code to do this, even as there is no built-in display for CiviCRM activities.

---
Tags: wordpress, activity, calendar, html
---


title: Show all contacts

text:
# Question
Title: Show all contacts
I am trying to create a navigation menu item (under 'contacts') that displays a list of all contacts.

I found an old thread that suggest to create a new menu item and use the following URL: civicrm/contact/search&force=1&qfKey=0

This generates the following full URL/link:

http://localhost/xxxxxx/wp-admin/admin.php?page=CiviCRM&q=civicrm/contact/search\_force\_1\_qfKey\_0

When I do this however it just loads the CiviCRM admin home page.

Any suggestions please?

# Answer
> 1 votes
Yes that will work, just need one alteration, change the first ampersand to a question mark: `civicrm/contact/search?force=1&qfKey=0`

Just tested it out on http://wpmaster.demo.civicrm.org/ and it works great.

---
Tags: custom-fields, menu
---


# Question
Title: Importing contacts and their relationships
this is really two questions, but may be answered via the first.

Q1: I have a large set of contacts (1400+) in a spreadsheet that already has a column for organisation (or household). ie First name, Last Name, Organisation When I go to import the contacts csv how can I auto-create the organisation contact and have the relationship set up so that an imported contact has the "Member of" relationship. I have looked at https://wiki.civicrm.org/confluence/display/CRMDOC/Importing+Households+and+Household+Members

But i am not 100% clear on the instructions - is it saying to upload the Organisations first, then upload the members of the organisation

Q2: if Q1 is not possible/practical or having imported contacts already that may not have existing relationship data, how can i bulk updated select/filtered contacts to add a relationship in one pass as doing them individually would be a very time consuming and error prone process.

# Answer
> 1 votes
If your csv includes eg First, Last and Organisation, then in the mapping, way way down the bottom, you will see the options to set the organisation field to map to something like 'relationship, employer of' and then choose eg 'organisation name' and that should take care of it.

---
Tags: contacts, relationships
---


title: Dynamic or Cascading Dropdowns - how?

text:
# Question
Title: Dynamic or Cascading Dropdowns - how?
I am trying to create a set of dropdown lists that are dynamically linked so that the values in list 2 are driven by what is selected in list 1.

Example: Consider an address (in Nepal) which has a Country(1), Region (4), Zone(14), District(75), Municipality(133).

I want to be able to select a region, which will then display the zones in that region only - select a zone, which will then display the districts in that particular zone - select a district, and then same with municipality.

Is this possible?

Thanks, Joe.

# Answer
CiviCRM already does this out-of-the-box to 3 levels deep (In the US they are called Country/State/County). Populating the `civicrm_county` table in your database with the Nepalese equivalent of counties will get that 3-level chain-select going.

Going down more levels than that isn't supported by core forms... you could create some custom fields for it, or you could just skip over some of the levels. For example, choosing from among 14 zones really isn't that hard - why ask the user to choose a region first?
> 0 votes

# Answer
In this particular use case, you may also want to consider modifying the County Lookup extension to pull in some levels of detail with Google Maps data.
> 1 votes

---
Tags: custom-fields, menu
---


# Question
Title: Register Multiple People for Multiple Paid Events With Webform
I am trying to create a CiviCRM Webform where the user can select multiple events to come to for multiple people in the same form. I have it working great that the user fills out the information and clicks the events that they want to attend and their guests.

Each event costs $10. I am trying to add up all of the events selected on the Webform and then have the user checkout with the correct price. For example someone may select 5 total events to attend so they should be charged $50.

Is this something that can be done with Webform without custom development?

Thanks, Steve

# Answer
> 1 votes
Yes you can do this with webform civicrm; check out the screenshots I posted in response to a similar question by Naomi - not too long ago.

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


title: 4.7.9 Civimail Exclude Recipients

text:
# Question
Title: 4.7.9 Civimail Exclude Recipients
In prior versions, you used to be able to 'exclude' certain groups when creating bulk mailings. Where is this function now in 4.7.9 drupal civicrm? I'm not seeing a way to exclude groups now.

# Answer
The include/exclude was amalgamated into a single field, if you drop the recipients list down you should see something like this
> 1 votes

# Answer
I found it. the key is to NOT start typing 'exclude' - Just click the dropdown arrow in the recipient box and then scroll and you'll see the list of groups to exclude.
> 0 votes

---
Tags: civimail
---


# Question
Title: Credit Card Payment after Editing Event Registration with more Choices
Drupal 7 Civi 4.6.15

How do we manage this workflow?

1. Participant registers for event using discount code, pays $0.
2. Calls, wants to add non-free items to registration, we edit the Registration and add them.
3. Registration now says $250 with status payment pending

How do we apply a new credit card charge to this changed registration? On the backend it lets us enter credit card payment details, but doesn't let us charge it, AFAIK.

We are also having similar issue seen here: Having issues with recording new payments for registrations paid with credit cards

If we mark the registration as 'Partially Paid', then try to record payment, Civi error spits out in log

```
Notice: Undefined variable: paymentVal in CRM_Core_BAO_FinancialTrxn::getPartialPaymentWithType()

```

# Answer
Your use case is quite valid, however, the assumption that once a contribution has been marked as completed, there should be no need for further payment processing, and, AFAIK, is meant to preserve data integrity. That said, aside from what Pete suggested, the only other way I can think of would be for you to charge the amount due directly via your payment processor portal (i.e. outside of Civi), and then update the pending contribution to a status of completed and include the transaction ID for good measure. In this way, your event income reporting will remain accurate without having to cancel the participant registration and re-record it.

Hope this helps! Tamar
> 1 votes

# Answer
One option would be to delete their initial registration, then use the public registration form either Incognito or the 'register as other' and submit their new registration with their credit card payment.
> 1 votes

---
Tags: civievent, civicontribute
---


# Question
Title: Having issues with recording new payments for registrations paid with credit cards
I am running CiviCRM (4.6.9) on Joomla (3.4.5), and am having issues changing registrations for events and posting payments due to changes to the registration options for an event.

We have a lot of events with options. We use price sets pretty heavily to cover all of those options. If a user registers for an event, and pays with a credit card all works as it should. However if that same user comes back to us and wants to change their registration, by wanting an additional option like attending a banquet, the status for that event for the user gets changed to Partially Paid. This is where it all break down for us.

If the user chose initially to pay offline (by sending us a check), instead of by credit card, we can at this point open the Event record for editing, and see a Record Payment link right there where we can click, record a new payment that we took offline and everything is perfect.

For the user that paid with a credit card, we don't see that Record Payment link. If we return to the event listing for that user, click on the More link and choose Record Payment, we immediately get an ugly looking error. The error is:

```
An error has occurred.
 0 <div id="crm-container" class="crm-container" lang="en" xml:lang="en"> <style type="text/css" media="screen"> @import url(/administrator/components/com_civicrm/civicrm/css/civicrm.css); @import url(/administrator/components/com_civicrm/civicrm/bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css); </style> <div class="messages status no-popup"> <div class="icon red-icon ui-icon-alert"></div> <span class="status-fatal">Sorry but we are not able to provide this at the moment.</span> <div class="crm-section crm-error-message">No payment information found for this record</div> <p><a href="https://www.uhms.org/administrator/" title="Main Menu">Return to home page.</a></p> </div> </div> <script language="JavaScript"> function toggle( element ) { var className = element.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { element.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } } </script>

```

For watever reason the error is not displaying right. If I look at the jumbled mess of an error I see the following:

```
Sorry but we are not able to provide this at the moment. No payment information found for this record

```

Why does this functionality work fine for events paid offline, but not events paid with credit cards? It also works fine for event registrations that are created through the backend, even if I choose that it is paid with a credit card.

How can I fix this? Or work around this?

Has anyone else run into this?

Any help or guidance would be appreciated. Thank you.

# Answer
> 1 votes
I don't have the same error, but a similar issue with workflow for processing additional cc registrations where we can't "submit a credit card edit to an event registration" to add these items for folks. That would be ideal.

Last year we worked around by either having them run through registration again for only the additional item or submitting a credit card registration for the additional item in the back end, then consolidating the line items in one record, updating the amount paid, forcing the status 'registered' at the top, and deleting the second event registration.

This caused a bunch of problems for example the event report dollar amount was off because when editing event registration line items you can't add in discount codes or edit the event total, only the contribution total. Therefore only the contributions dollar amount with that financial code was correct.

In the end the event ran and the badges printed. Not a great answer but this is what we ad-hoc threw together and wanted to say you aren't the only one who has had this workflow issue for events.

# Answer
> 0 votes
My answer to this would be the same as to your latest question in this regards (Credit Card Payment after Editing Event Registration with more Choices):

Your use case is quite valid, however, the assumption that once a contribution has been marked as completed, there should be no need for further payment processing, and, AFAIK, is meant to preserve data integrity. That said, aside from what Pete suggested, the only other way I can think of would be for you to charge the amount due directly via your payment processor portal (i.e. outside of Civi), and then update the pending contribution to a status of completed and include the transaction ID for good measure. In this way, your event income reporting will remain accurate without having to cancel the participant registration and re-record it.

I do like the thought of an extension that provides more flexibility as Eli suggests, but that request would either need to come with funding if you would like the core team to handle it, or through contributed code from the community.

Hope this helps! Tamar

---
Tags: civievent, joomla
---


# Question
Title: Member only page-login using civicrm database
We have a website, We also use civicrm for our membership and communications. Now we have our 16000 records entered into civi and all correct, can we restrict access to some member content pages(not written inside civi), Essentially we want to create a login for the member only content, have a script check with civi that the membership is still current, maybe check member id and email then allow access to the pages we want members to have access to. We dont want members to signup and pay for membership because the folks we represent dont do credit cards!! We just want a page or area of our website thats restricted to our members rather than the entire webiverse.

Or am I dreaming that it can be done?

# Answer
> 2 votes
## Understanding the parts

There are a few parts to this question - your CRM (CiviCRM, which has your membership list), and your CMS (Drupal, Joomla or WordPress, which has your website pages). Your CMS has *Users* while your CRM has *Contacts*. These may match, but you can also have a Contact without a matching User. The CMS controls access to *Pages*. In order to access restricted pages, the User generally needs to log into the CMS first.

So there are some "dots to join". In your case,

* All your Member Contacts will need a matching User in the CMS
* The CMS needs to restrict access for some Pages to some Users
* There are access criteria for the above (User must connect to Contact which has current Membership)

How you implement this depends on the CMS you're using, and what makes most sense for you. (Including details like the CMS in your question will inform the answers you get.)

## Drupal

There are wiki docs on how to sync Contacts to Users. This page looks a bit old - definitely test this process on a development site.

In Drupal there are multiple ways to slice and dice the content access situation ... sorry! Some options would be Content Access (suited for smaller sites where you have one or two restricted pages), Node View Permissions (restrict by member-only content type), or reviewing a longer list of content access options.

(You could also implement your own access restriction using CiviCRM checksums alone, but I think I've given you enough new questions already!)

## Other CMS

This answer doesn't specify how to do this for other CMS (nor does it give specific instructions for Drupal, just a few options). If you can help improve this answer, you're welcome to edit it wiki style, OR add your own solutions for Joomla / WordPress.

---
Tags: civimember
---


# Question
Title: Configuring cron using PHP cli method results in Permission denied
Centos 7 with selinux set to permissive. Using apache as the user and confirmed apache has execute permissions to the folder and file in plugins/civicrm/civicrm/bin/cli.php

The crontab entry -

```
1 * * * * apache /etc/php.ini var/www/domainfolder/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s domain.com -u wpuser-cron -p wordpresspasswordhere -e Job -a execute

```

The error generated is -

```
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/usr/share/httpd>
X-Cron-Env: <LOGNAME=apache>
X-Cron-Env: <USER=apache>
Date: Fri, 12 Aug 2016 15:01:01 -0400 (EDT)
Status: RO

/bin/bash: /etc/php.ini: Permission denied

```

Running it as the user apache definitely seems wrong. I did so just to see that I could get the cron job running properly; then revisit selinux settings to deal with creating a group with the correct permissions and a cron user for this job.

# Answer
> 1 votes
This cron job calls `/etc/php.ini` as the command, but that file is not an executable (it's the default configuration file for PHP).

(The "Permission denied" error is the same as if you asked "run the script README.TXT" - the file doesn't have exec bit set because it's not a program at all.)

Try this -

```
1 * * * * apache /usr/bin/php /var/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s domain.com -u wpuser-cron -p wordpresspasswordhere -e Job -a execute

```

Your PHP path may not actually be `/usr/bin/php`, so check the correct path by typing `which php` at a commandline and use that.

---

> Running it as the user apache definitely seems wrong.

This is OK. It means that CiviCRM when executed from cron and from the web will generate files using the same user - CiviCRM can have issues when it hits file access issues between multiple users, so using a single user for both www and cron is the simplest solution.

---
Tags: php, cron, cli
---


title: Entering fulfilled Premiums manually

text:
# Question
Title: Entering fulfilled Premiums manually
Is there a way to manually record fulfilled premiums for a contact?

We are giving out t-shirts to our donors a bit flexibly - when they have donated a particular sum to the cause or when they have donated volunteer time.

We handle the offering and distribution part ourselves and would just like to track info on actually delivered premiums and calculate when the person is entitled to one (e.g. next premium t-shirt after 1 year of membership).

# Answer
> 1 votes
If you want to track fulfilled premiums by type, fulfillment date and next eligible date without tracking inventory and expense within Civi, you can do so through the use of custom data fields designated for use with contacts and a profile that can be displayed as an additional tab of a contact record. To facilitate reporting, I would suggest using a select input field type for premiums and a date input field type for the date fields.

If you want to track fulfilled premiums awarded with a $0 contribution, the only way I can think of doing this is to create premiums for internal use only with a $0 minimum donation amount that can then be added to a contribution page for internal use only, use the built-in fee section in the amounts tab and include a $0 option, then masquerade as the user to whom the premium is being awarded and then create a $0 contribution with the selected premium.

You might also want to play around with subscription/service premium to see if that would help with managing eligibility for the next premium, include a custom data field for next eligible date, or perhaps make use of a specific membership type to do so.

Hope this helps! Tamar

---
Tags: premiums
---


# Question
Title: Error when creating new contact: "Fatal error: Uncaught CRM_Core_Exception"
When I create a new contact I am getting a "Fatal error: Uncaught CRM\_Core\_Exception". Maybe this will happen when doing other things too, but I haven't run into them yet. This is quite problematic and prevents me from working with this CiviCRM installation, so I would really to have some help fixing this.

It is a clean install of CiviCRM version 4.6.10 on a clean Joomla! 3.4.8 install with PHP 5.5. No errors were given until I tried to create a contact. Re-installation of everything also didn't help at all.

*Full error message:*

```
Sorry but we are not able to provide this at the moment.
DB Error: unknown error

Fatal error: Uncaught CRM_Core_Exception:
[0: Transaction integrity error: Expected to find active frame thrown in
[...]/administrator/components/com_civicrm/civicrm/Civi/Core/Transaction/Manager.php
on line 107

```

# Answer
> 1 votes
I wasn't able to recreate the error on the demo site: http://joomla.demo.civicrm.org/

But the problem you are running into sounds the same as this issue: https://issues.civicrm.org/jira/browse/CRM-16287

Perhaps there is some information there that will help?

# Answer
> 1 votes
Solved... sort of... almost...

Moving the database solved the problem, so the problem seems to be with the database server. How or why is not clear yet and I need to search for that some more, but at least this problem is solved.

If I find anything interesting I will post it here.

# Answer
> 0 votes
Had a similar error message

> Fatal error: Uncaught CRM\_Core\_Exception: \[0: Transaction integrity error: Expected to find active frame thrown in /var/www/example.org/public\_html/sites/all/modules/civicrm/Civi/Core/Transaction/Manager.php on line 107

In our case there was a dedupe session running that was consuming a lot of mysql. Killing the query resulted (or coincided) with being able to add/edit without the error.

---
Tags: contacts, joomla
---


# Question
Title: This page requires cookies to be enabled
Event registration issues, reports from users make it seem to be with some regularity.

Message mentions cookies but I am having trouble tracking this down, does anyone have any pointers about where to look?

CiviCRM log has following:

```
    Aug 13 19:48:17  [info] $Fatal Error Details = Array
(
    [message] => We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.
    [code] =>
)

Aug 13 19:48:17  [info] $backTrace = #0 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(371): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(833): CRM_Core_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...")
#2 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(853): CRM_Core_Controller->invalidKeyCommon()
#3 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php(66): CRM_Core_Controller->invalidKeyRedirect()
#4 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(312): CRM_Event_Controller_Registration->invalidKey()
#5 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(204): CRM_Core_Controller->key("CRM_Event_Controller_Registration", TRUE, FALSE)
#6 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php(45): CRM_Core_Controller->__construct("Event Registration", "null")
#7 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(307): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false")
#8 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
#9 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#10 /var/www/html/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:3))
#11 [internal function](): CiviCRM_For_WordPress->invoke(Object(WP))
#12 /var/www/html/wp-includes/plugin.php(601): call_user_func_array((Array:2), (Array:1))
#13 /var/www/html/wp-includes/class-wp.php(737): do_action_ref_array("wp", (Array:1))
#14 /var/www/html/wp-includes/functions.php(952): WP->main("")
#15 /var/www/html/wp-blog-header.php(16): wp()
#16 /var/www/html/index.php(17): require("/var/www/html/wp-blog-header.php")
#17 {main}

```

Environment:

```
.htaccess ssl redirect
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

CiviCRM Force SSL true

civicrm.settings.php
define( 'CIVICRM_UF_BASEURL'      , 'https://www.domain.com/' );

Wordpress settings
WordPress Address (URL) https://www.domain.com

Site Address (URL) https://www.domain.com

PHP 5.6.19
CiviCRM 4.7.9
Wordpress 4.5.3
Eway Single Currency
w3 Total Cache Version 0.9.4.1

```

# Answer
> 1 votes
Suspect this issue is happening when the site is accessed via `https://example.com` instead of `https://www.example.com`, or when moving from one domain to another midway through a form submission.

See also this similar SE question. This text is in the error message you've pasted:

> Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org

Make sure both WordPress and CiviCRM have a matching URL configured - CiviCRM in `civicrm.settings.php`, WordPress in Settings ⇒ General admin page (ref WP Codex: Changing the Site URL). Ideally, make sure that anyone landing on alternate URLs is redirected immediately to the canonical hostname and protocol.

The `.htaccess` snippet in this question addresses consistent protocol but not hostname.

---
Tags: registration, cookies
---


title: Huge Buttons with Simple Donate

text:
# Question
Title: Huge Buttons with Simple Donate
I tried simple donate extension on my Civi 4.6/Wordpress/Stripe install to mix things up. It seems that the buttons are way too large for some reason. Anyone have a suggestion on fixing?

# Answer
With a default-ish theme, the SimpleDonate extension intends to make the form elements bigger and more clicky. In this case that has not worked out - possibly because of other styles introduced by your theme or other plugins.

However: **those button styles you're seeing are coming from the SimpleDonate extension**. And that's OK - you can address this by overriding with your own theme's CSS. Even just adding a style which cleared the buttons into rows of three would improve what you're seeing.

The liberal use of `!important` in SimpleDonate's CSS may be a sticking point when overriding the extension's builtin styles. If I had to make that CSS work, the first thing I'd do would be replace every instance of `!important` with an appropriate CSS selector (and submit the PR back to SimpleDonate).
> 2 votes

# Answer
Best talk to your WordPress "theme" author, as this is ultimately down to that (though any coder could probably help).

If this is a default theme that ships with WordPress then you should log a bug on the extension's GitHub page here: https://github.com/drastik/com.drastikbydesign.stripe/issues

Hope that helps :)
> 1 votes

---
Tags: simple-donate-form
---


# Question
Title: Use Drupal Views to select Organisation and display contacts with a particular relationship to Organisation
I have been trying to work out how to create a Drupal View to allow end users to select an Organisation and then it displays Contacts given a specific relationship type. eg Select Employer Name (Organisation) - display Employees of Employer Relationship is the built-in Employer of / Employee Of

So far I have created a view with CiviCRM:Contact type and added a few fields, but the only 'relationship' details i can retrieve that is close for the 'employees' side of things is "CiviCRM Relationships: Contact ID B (Contact ID B)". I dont see to have or can find a method to display Contact B's Display Name

Example - Selected organisation is Contact 'A' ID 203 'K&N Brass' and has a relationship to Contact 'B' who's ID=202

```
Contact ID  Display Name    Relationship Type A-to-B    Contact ID B
203         K&N Brass       Band includes member        202

```

Drupal 7.43 CiviCrm 4.7.7 Views: 7.x-3.13

# Answer
To create a Drupal relationship in a View for contacts A - B or B - A you need to add 2x Drupal relationship.

In the case of starting with the Org assuming it as at the B end of the relationship, first you choose the option that says

* CiviCRM Contacts: CiviCRM Relationship (starting from Contact B)

and configure that with the relevant Relationship Type

Then you choose

* CiviCRM Relationships: Contact ID A

and use the relationship you created above to Join contact A via the relationship to contact B.

Then as Laryn says, select a field for DisplayName and tell it to use the second of these relationships (probably only one that shows in that context) and bingo!
> 6 votes

# Answer
Once you have the relationship in place, you should be able to add a new field to the view (e.g. "Display Name") and in the settings for this field, tell it to use that relationship that you've set up.
> 1 votes

# Answer
to all that may come across this

After putting my CiviCRM project on hold for a few months I came back to it having found no other better solutions to my needs and came across this

Drupal Views - Sorting of family members in a contact list

which has images and step-by-step guide and got my view returning what I need for the moment..... next is getting it to display the View on the main site.
> 1 votes

---
Tags: drupal-views
---


# Question
Title: What's stripping the characters from my menu links? (ie. '?' '=' and '&')
Just updated to 4.7.10 on wordpress and any menu link with non alphanumeric characters is stripped and replaced by an underscore.

Example: /civicrm/contact/add?reset=1&ct=Individual

Becomes: civicrm/contact/add\_reset\_1\_ct\_Individual

I've tried clearing caches, rebuilding menus etc. Debugger shows nothing - any ideas?

# Answer
The answer is: bad upgrade from older database schema. Somewhere in the 4.5 alpha upgrade series something went wrong for me. I'm not sure what, exactly, but the answer was to verify the schema and to a clean install. Sad face.
> 2 votes

---
Tags: wordpress, installation, menu, 4.7.10
---


# Question
Title: Why is my dashboard showing 503 errors? Is this a host issue or a civi config issue?
Civi seems to be working normally, but all dashboard items are showing 503 errors (ngnix).

Any ideas of what to check? Hosted on Arvixe.

# Answer
> 1 votes
Some issues with the dashboard have been fixed in the upcoming 4.7.11 release. See CRM-16035: Dashlet refresh can crash server / Replace use of HTTP\_Request and CRM-17663: Dashlet code improvements for details.

There are quite a few existing questions on dashboard issues on this site - you'll find some good answers there I'm sure for dealing with CiviCRM below 4.7.11.

Once 4.7.11 releases, that should resolve your problem.

---
Tags: error, configuration
---


# Question
Title: Do we still need "Drupal Users Table Name" setting on CMS Database Integration screen?
I've got a CiviCRM 4.7.9 install running in a Drupal multisite. I have a ton of databases, named something like this:

* CiviCRM: org\_dev\_crm
* Drupal default site: org\_dev\_cms
* Drupal site 2: org\_dev\_cms\_other
* Drupal database for tables shared across sites: org\_dev\_cms\_shared

The users table is shared across instances in the last database, and Drupal settings.php file contains the following line:

```
$databases['default']['default']['prefix']['users'] = '`org_dev_cms_shared`.';

```

Since the `users` table is in an unusual place, I thought I'd have to tell CiviCRM about it by going to *Administer \> System Settings \> CMS Database Integration*. On a lark, however, I decided to test if this was necessary. I ran the user-to-contact sync (*Administer \> Users and Permissions \> Synchronize Users to Contacts*), and it worked just fine. If there ever was a way to test CiviCRM's ability to access Drupal's user table, I figured this was it.

So, to wrap this up:

* What is this setting used for, if not synching?
* Do we still need this setting, or has CiviCRM learned how to read Drupal config?

# Answer
> 3 votes
**Context**: When reading data from the CMS, one can either read directly from their database (via `DB::connect()` and `SELECT * FROM user ...`) or you can use the CMS's PHP APIs (e.g. `user_load(...)`). In one sense, reading from SQL directly is more robust (no dependency on complicated PHP code); in another sense, reading from a PHP API is more robust (because it handles all the weird edge-cases of jerry-rigged SQL schema that Drupal allows).

**Speculation**: My strong *suspicion* is that early versions of Civi (like 1.x or 2.x) relied heavily on SQL-based integration. (Witness: the installation process and `civicrm.settings.php` prominently solicit `CIVICRM_UF_DSN`), but this doesn't work well in jerry-rigged SQL schema, and it's unpleasant for Civi to be coupled to the CMS SQL, so... it was gradually killed as people fixed bugs.

**Current Reality**: I can only find one function that hits the CMS user table directly via SQL -- `CRM_Utils_System_*::authenticate()`. The details of this are a bit weird and vary by CMS:

* In Joomla, WordPress, and D8, `authenticate()` uses the CMS's PHP APIs. They don't hit SQL directly.
* In D6, `authenticate()` always queries via `DB::connect()` and SQL.
* In D7 and Backdrop, `authenticate()` sometimes queries via `DB::connect()` and SQL. The way it's written... it's hard to tell if it's ever used. From some grepping... if it is used... it's probably the CiviMail-SOAP adapter (`extern/soap.php` and `CRM/Utils/SoapServer.php`).

However, I don't believe this is a hard requirement -- considering that Joomla/WordPress/D8 don't use it. You could probably figure a patch to `CRM_Utils_System_*::authenticate()` and `CRM/Utils/SoapServer.php` which allows us to completely remove `CIVICRM_UF_DSN` and `userFrameworkUsersTableName`. The main cost would be re-testing the SOAP return-channel in each CMS.

# Answer
> 4 votes
There are scripts in `extern/*.php` (like `extern/ipn.php`) which fire up CiviCRM without the CMS bootstrapped. I believe the plan is to replace them with callbacks (like `civicrm/payment/ipn/%id`) which eliminate instances where CiviCRM is bootstrapped without the CMS. (Some links here, but don't think there's a JIRA issue on it?)

So: Perhaps in the few places where CiviCRM doesn't have Drupal bootstrapped, eg *new user create during PayPal IPN on successful event rego*? (I made up this case as a potential place CiviCRM might need it, and not be able to deduce from bootstrapped CMS.)

---
Tags: drupal
---


# Question
Title: CiviCRM Upgrade Wordpress 4.4.5 to 4.7.10 DB Error: no such field
CiviCRM Upgrade Wordpress 4.4.5 to 4.7.10 DB Error: no such field.

Site shows at bottom of screens: Powered by CiviCRM 4.4.5

Trying to upgrade to 4.7.10 and after pressing Upgrade button CiviCRM just hangs with no action. Log file found shows the errors below:

```
Aug 14 10:05:12  [info] $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_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)

WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Individual', 'Contact')
AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)

WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Individual', 'Contact')
AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)

WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Individual', 'Contact')
AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']"]
)

Aug 14 10:05:12  [info] $backTrace = #0 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(227): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: no such field", -19, 16, (Array:2), "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
#4 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-19, 16, (Array:2), "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
#5 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -19, NULL, NULL, "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", "DB_Error", TRUE)
#6 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list'")
#7 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
#9 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2438): DB_common->query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
#10 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1627): DB_DataObject->_query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
#11 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(344): DB_DataObject->query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
#12 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1265): CRM_Core_DAO->query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", TRUE)
#13 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php(526): CRM_Core_DAO::executeQuery("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", (Array:0))
#14 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Finder.php(285): CRM_Core_BAO_CustomGroup::getTree("Individual", NULL, NULL, -1)
#15 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(208): CRM_Dedupe_Finder::formatParams((Array:2), "Individual")
#16 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(118): CRM_Core_BAO_UFMatch::synchronizeUFMatch(Object(WP_User), 2, "garry.hyman@gmail.com", "WordPress", NULL, "Individual", FALSE)
#17 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/includes/civicrm.users.php(177): CRM_Core_BAO_UFMatch::synchronize(Object(WP_User), TRUE, "WordPress", "Individual")
#18 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm.php(1210): CiviCRM_For_WordPress_Users->sync_user(Object(WP_User))
#19 [internal function](): CiviCRM_For_WordPress->invoke("")
#20 /home/cremorne/www/www/prodwp/wp-includes/plugin.php(525): call_user_func_array((Array:2), (Array:1))
#21 /home/cremorne/www/www/prodwp/wp-admin/admin.php(236): do_action("toplevel_page_CiviCRM")
#22 {main}

```

Help Please?

# Answer
Have managed to upgrade to 4.6.9 now. For anyone else who might be doing this perhaps these steps might help:

1. Ran the following.

ALTER TABLE `civicrm_custom_field` ADD COLUMN `in_selector` tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing'; UPDATE civicrm\_custom\_field cf LEFT JOIN civicrm\_custom\_group cg ON cf.custom\_group\_id = cg.id SET cf.in\_selector = 1 WHERE cg.is\_multiple = 1 AND cf.html\_type != 'TextArea'; ALTER TABLE `civicrm_custom_group` CHANGE COLUMN `style` `style` varchar(15) COLLATE utf8\_unicode\_ci DEFAULT NULL COMMENT 'Visual relationship between this form and its parent.';

2. \*** Above good and restarted upgrade, it did things and then stopped with following error: Error: Upgrade DB to 4.5.alpha1: SQL\] Error Field Error Value Type DB\_Error Code -1 Message DB Error: unknown error Mode 16 UserInfo ALTER TABLE `civicrm_custom_field` ADD COLUMN `in_selector` tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing' \[nativecode=1060 \** Duplicate column name 'in\_selector'\] DebugInfo ALTER TABLE `civicrm_custom_field` ADD COLUMN `in_selector` tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing' \[nativecode=1060 \** Duplicate column name 'in\_selector'\]

Commented out code look for CRM-13992 in file /wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl

3. \*** Restarted upgrade and got following error: Error: Upgrade DB to 4.5.alpha1: SQL\] Error Field Error Value Type DB\_Error Code -1 Message DB Error: unknown error Mode 16 UserInfo ALTER TABLE `civicrm_contact` ADD COLUMN `formal_title` varchar(64) COMMENT 'Formal (academic or similar) title in front of name. (Prof., Dr. etc.)' AFTER `suffix_id` \[nativecode=1060 \** Duplicate column name 'formal\_title'\] DebugInfo ALTER TABLE `civicrm_contact` ADD COLUMN `formal_title` varchar(64) COMMENT 'Formal (academic or similar) title in front of name. (Prof., Dr. etc.)' AFTER `suffix_id` \[nativecode=1060 \** Duplicate column name 'formal\_title'\]
4. *** Commented out code and restarted upgrade. Failed a couple of times with duplicates or column not available (previously dropped) so just took this code out of the SQL and restarted upgrade. *** It continued upgrading until the following error was encountered

Error: Upgrade DB to 4.6.alpha7\] Error Field Error Value Type DB\_Error Code -1 Message DB Error: unknown error Mode 16 UserInfo ALTER TABLE civicrm\_mailing\_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD CONSTRAINT FK\_civicrm\_mailing\_abtest\_created\_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL \[nativecode=1060 \** Duplicate column name 'created\_id'\] DebugInfo ALTER TABLE civicrm\_mailing\_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD CONSTRAINT FK\_civicrm\_mailing\_abtest\_created\_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL \[nativecode=1060 \** Duplicate column name 'created\_id'\]

\*** File location for above error shown below: //wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl

5. Comment out all the code for above and restarted upgrade again. \[Error: Upgrade DB to 4.6.alpha7\] Error Field Error Value Type DB\_Error Code -19 Message DB Error: no such field Mode 16 UserInfo UPDATE civicrm\_mailing\_abtest SET testing\_criteria = 'subject' WHERE testing\_criteria\_id = 1 \[nativecode=1054 \** Unknown column 'testing\_criteria\_id' in 'where clause'\] DebugInfo UPDATE civicrm\_mailing\_abtest SET testing\_criteria = 'subject' WHERE testing\_criteria\_id = 1 \[nativecode=1054 \** Unknown column 'testing\_criteria\_id' in 'where clause'\]

Found code in upgrade directories and after careful checking commented out relevant pieces as already in place. Restarted and

*** Worked and displayed successful upgrade to 4.6.9 screen.**  *However, clicked on CiviCRM icon in Wordpress and it displayed an empty screen.*  **Do the following:**  *1. Delete files with cached settings. In Wordpress as follows: /wp-content/plugins/files/civicrm/templates\_c/* /wp-content/plugins/files/civicrm/ConfigAndLog/Config.IDS.ini

\*** 2. Enter the following URL in your browser to review and update directory paths and base URLs. See CiviCRM Menu: Administer \>\> System Settings \>\> Cleanup Caches and Update Paths (Reference: https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location) For Wordpress sites: http:///wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/updateConfigBackend&reset=1
> 2 votes

# Answer
I hope you have backups?

It's often better to do such a big upgrade in parts. Go from 4.4.5 to 4.4.21. Then go to 4.6.20 (4.5 can be skipped, have done upgrades from 4.4 to 4.6 quite often). Then go to 4.7.10.
> 1 votes

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


# Question
Title: How are CiviCase Case ID numbers generated?
I've assumed that CiviCRM simply allocates the next available Case ID number when a new case is created. Certainly it has always looked that way. However, on one site I work with where cases are used extensively, we are seeing case numbering that suggests something else is happening:

Case ID numbers started at 1 and run pretty consistently up to 86, then a jump to 164, then a second jump from 167 to 249, then straight to 332, then from 372 to 617, from 620 to 747, and from 766 to 1059. (Taken from the civicrm\_case table in the DB).

On another site, with a comparable number of cases, the case IDs run from 1 up to about 255 (last time I checked) without a break.

I'm concerned that the non-sequential numbering might be indicative of a problem.

What might be happening to make CiviCase create non-sequential case ID numbers?

# Answer
> 2 votes
I am not 100% sure, but there are some peculiarities within the case process. One of them is that the complete set of data is saved at the end of the overall case transaction, and for CiviCRM purposes it is a rather long transaction. And if there is either an error or a cancel somewhere during the whole sequence it might be that a record was created in civicrm\_case (allocating an ID) which is then removed later on, but the ID is gone.

If you look at the table it does mention that ID is auto increment, meaning it is sequencing. As a test you might want to try creating a case but then not completing the open case activity and see if it allocated a case ID (if you catch my drift...) We certainly encountered some un-characteristic stuff when creating custom extensions for CiviCase :-)

---
Tags: civicase
---


# Question
Title: Advanced Search: Proximity search fails; returns "We could not geocode the destination address."
Side Note: This worked before upgrading from 4.7.8 to 4.7.10.

When we go to Advanced Search (ourdomain/civicrm/contact/search/advanced): Address Fields, enter a Postal Code and a range (ex: Find contacts within 25 miles), and click "Search," CiviCRM returns an error like:

No matches found for: Proximity search to a distance of 20 miles from 78660, UNITED STATES: We could not geocode the destination address.

I went to the sandbox (http://dmaster.demo.civicrm.org/civicrm/contact/search/advanced ) to check/test this, but the sandbox does not offer the option to search by proximity to a Postal Code. The sandbox is running 4.7.11

Thoughts? Thanks!

# Answer
Proximity search worked fine for me in 4.7.11 and 4.7.10. Proximity search is available on the demo if you select a geocoding provider (**Administer menu » System Settings » Mapping and Geocoding**).

I'd advise checking/changing your system's geocoding settings. If that doesn't work, please update the question with the settings that aren't working, this is likely specific to your settings.
> 3 votes

---
Tags: search
---


# Question
Title: How to associate drupal content types with civicrm new group?
I have created the 10 contents(Article content type) in the Drupal.

And now, I want to associate these contents with new group in CiviCRM.

Please tell me how to associate these things ?

# Answer
You may also want to look at Organic Groups, which you can also sync with civicrm, so a contact in a civicrm group is a member of an Organic Group, or vice versa. Then you can use OG as containers for your content. Probably not worth it if you only have a few pages of information.
> 1 votes

# Answer
If I understand you correctly, you want to limit who can view content that you have added in Drupal.

To control access to Drupal content you need to create a role in Drupal and assign the correct permissions to this group.

More details here: Users, roles and permissions

If you want to link the access to these articles with a specific group within CiviCRM you will have to synchronise the CiviCRM group with the Drupal role. You can do this using the CiviGroup Roles Sync module.

More details here: CiviGroup Roles Sync
> 0 votes

---
Tags: drupal, groups, acl
---


# Question
Title: How can I modify the existing report template?
we use the \[source\] and \[external ID\] heavily. They are standard civi fields however they do not appear on the report template (detail or summary versions).

Pointers on where to go to update the standard template much appreciated!

# Answer
> 2 votes
These two fields would be generally useful to many CiviCRM users, so I'd recommend adding them to the core report just before https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Form/Contact/Detail.php#L85.

Here are some instructions on using GitHub to contribute to core CiviCRM: https://wiki.civicrm.org/confluence/display/CRMDOC/Contributing+to+CiviCRM+using+GitHub

You can get the names of the fields at https://github.com/civicrm/civicrm-core/blob/master/xml/schema/Contact/Contact.xml#L162 and https://github.com/civicrm/civicrm-core/blob/master/xml/schema/Contact/Contact.xml#L359.

Just adding the field definitions should be sufficient to add them as data columns...a bit more work is required to make them available as order by fields. Once you have tested the changes, please submit a PR. You can ask me for help reviewing the contribution by mentioning @JoeMurray in a comment on the PR. Good luck!

# Answer
> 1 votes
You can achive this by two ways

Easy and Best way of doing this. Is to create two custom fields against contact (source and external ID) - write a hooks to copy all the value stored again original source and external ID into the custom field which gets included to the report by default

Other way of doing is to override the core file and also including the soruce and external ID to the list (if you need more help in this please let me know) - also you can raise a ticket regarding the issue so this gets included to the next release

I guess this helps !!!

# Answer
> 1 votes
I would create a customized version of the report and add the fields to the list of available fields. There is an instruction on how to achieve this on https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference

---
Tags: templates, reports
---