# Question
Title: How can I expose CiviPetition signatures to the public?
I don't see any option to show the results of a petition publicly. How do I set this up?

# Answer
This isn't a function out of the box. If you are in drupal, you can use view to display the list of activities (a petition signature is "simply" an activity of type "petition signature". They are others ways to fetch data out of civi on other CMSes, but might need to write some code.

As a side note: please don't display the full name of the signatories, that might be a risk for them. It happened not so long ago that a right wing group took a list of a progressive petition and started to dox them (find their address and contact details...), contact them...

X+
> 2 votes

---
Tags: civicampaign
---


# Question
Title: CiviCRM Profile Forms: Label and TextBox on the same line
Need your help....I have a form (created via a profile) which contains textboxes with labels...The default view shows the textboxes below their respective labels...Is it possible to show the textboxes right next to the labels?

# Answer
You can add some CSS to your theme to do this; use Firefox Firebug / Firefox Developer Edition or Chrome's Developer Tools to inspect the html and find the class you need to edit - to float the elements side by side.
> 0 votes

---
Tags: profile, forms, css
---


# Question
Title: Multiple values for custom fields in Activities?
Anyone has seen any custom implementation/extension of custom group multiple values for Activities?

Since we are using Activities for many different scenarios, many times the requirement of having multiple values' custom groups for Activities pops out (which now a day is only available for Contacts)

Any lead/tip will be appreciated

# Answer
If someone interested I'm developing a custom extension to extend multi-value custom groups for Activities. Still work in progress: https://github.com/ixiam/com.ixiam.modules.multivalueactivity
> 2 votes

---
Tags: custom-fields, activities, developer
---


# Question
Title: PHP Fatal error Class 'CRM_Extension_ClassLoader' not found in civicrm/civicrm/CRM/Extension/System.php:196
I just upgraded from CiviCRM 4.7.10 to **4.7.24** and I followed the steps on the update page here. When I copied the new version to the plugins folder, I started receiving this error in the admin portion of WordPress when I tried to load any pages of CiviCRM.

```
[20-Sep-2017 20:49:48 UTC] PHP Fatal error:  Uncaught Error: Class 'CRM_Extension_ClassLoader' not found in /home/prairie1/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php:196
Stack trace:
#0 /home/prairie1/public_html/wp-content/plugins/civicrm/civicrm/Civi/Core/Container.php(395): CRM_Extension_System->getClassLoader()
#1 /home/prairie1/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php(112): Civi\Core\Container::boot(true)
#2 /home/prairie1/public_html/wp-content/plugins/civicrm/civicrm.php(672): CRM_Core_Config::singleton()
#3 /home/prairie1/public_html/wp-content/plugins/civicrm/civicrm.php(1121): CiviCRM_For_WordPress->initialize()
#4 /home/prairie1/public_html/wp-content/plugins/civicrm/civicrm.php(969): CiviCRM_For_WordPress->add_core_resources(false)
#5 /home/prairie1/public_html/wp-includes/class-wp-hook.php(298): CiviCRM_For_WordPress->admin_page_load('')
#6 /home/prairie1/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
#7 /home/prairie1/public_html/wp-includes/plugin.ph in /home/prairie1/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 196

```

I made sure that civicrm.settings.php had the following at the end:

```
require_once 'CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();

```

I also started off with php version 5.5 running, but I read that I could try 7 and it was supported, so I switched. It gave me the stack trace where 5.5 did not, but didn't help the error.

Thanks a lot!

# Answer
Sorry, I finally found the solution. It was incredibly simple but hard to find. When I uploaded the new version of civicrm using FileZilla, it said all transfers were successful and 0 failed. However, there were a few files, one being ClassLoader.php, that were 0 in File Size. It marked it as successfully uploaded, but didn't upload any content. I just used FileZilla to upload all files again with the option to only Overwrite if the size was different, and it fixed these errors.
> 1 votes

---
Tags: wordpress, upgrade
---


# Question
Title: What is the contact ID of my own user record?
Often, when giving support, it's helpful to direct people to their own record. Is there a good way to find this? As a dev, I can use the techniques listed here, but I don't see a non-technical way to do this. It doesn't seem to be listed on the User Dashboard, for instance. Any thoughts?

# Answer
> 1 votes
On Drupal -\> go to Hello \[user\] in the Toolbar -\> then hit view contact Record (or view Contact Dashboard):

---
Tags: user-account, user-experience
---


title: Status Error and blank status page

text:
# Question
Title: Status Error and blank status page
On our CiviCRM deployment, running 4.7.23, it says System Status: Error in the footer. When clicking the System Status: Error link, I get a blank page with the following console errors (url redacted):

```
GET https://<redacted_base_url>/[civicrm.files]persist/contribute/dyn/angular-modules.2513685c7e9bf04c4c187f640cffc720.js

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.11/$injector/modulerr?p0=crmApp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.5.11%2F%24injector%2Fnomod%3Fp0%3DcrmApp%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A6%3A426%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A25%3A235%0A%20%20%20%20at%20b%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A24%3A282)%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A25%3A20%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A40%3A17%0A%20%20%20%20at%20q%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A7%3A371)%0A%20%20%20%20at%20g%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A39%3A382)%0A%20%20%20%20at%20fb%20(https%3A%2F%2<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A43%3A381)%0A%20%20%20%20at%20c%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A21%3A19)%0A%20%20%20%20at%20Gc%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A21%3A332)
at angular.js:38
at angular.js:4692
at q (angular.js:325)
at g (angular.js:4653)
at fb (angular.js:4575)
at c (angular.js:1809)
at Gc (angular.js:1830)
at se (angular.js:1715)
at HTMLDocument.<anonymous> (angular.js:32616)
at i (jquery.min.js?ovlk9u:2)

```

\`\`\`

My \[civicrm.files\] variable seems correct:

```
[civicrm.files] /var/www/html/drupal/sites/default/files/civicrm

```

The contents of `/var/www/html/drupal/sites/default/files/civicrm` are:

```
# pwd
/var/www/html/drupal/sites/default/files

# ls -la civicrm/
total 44
drwxr--r--  8 www-data www-data  4096 helmi  5  2016 .
drwxrwxrwx 26 www-data www-data  4096 kesä   8 03:38 ..
drwxr-----  2 www-data www-data  4096 syys   1 04:14 ConfigAndLog
drwxr--r--  2 www-data www-data  4096 syys   6 04:27 custom
drwxr--r--  3 www-data www-data  4096 syys   6 04:27 ext
drwxr--r--  3 www-data www-data  4096 joulu 21  2016 persist
drwxr--r--  3 www-data www-data  4096 syys   6 04:24 templates_c
drwxr--r--  3 www-data www-data 16384 syys   6 04:27 upload

```

How should I configure the \[civicrm.files\], so that it can serve the Bower components properly?

# Answer
> 2 votes
I just fixed this issue on a site I was working on. Hopefully it helps you as well. My issue was directory permissions. You need to make sure that all of your directories have permissions set to **755**. My contribute folder was set to 750, which did not allow the directory structure to be loaded beyond that point. Because of that, it's not able to load the **angular-modules.2513685c7e9bf04c4c187f640cffc720.js** file.

An easy way to do this is to use FileZilla and navigate to somewhere you know is ok, maybe your /var/www/html/drupal/sites/default/ directory. Then you can right-click on the **files** folder and choose File Attributes or File Permissions depending on which pane you use, and make sure permissions are set to 755. Now choose **Recurese into subdirectories** and **MAKE SURE** you select **Apply to directories only**, you don't want to apply it to files. Click OK and once it completes, try going to your system status page again and hopefully it works now!

---
Tags: drupal, error, admin, angular, bower
---


title: Creating a copy of an previous event

text:
# Question
Title: Creating a copy of an previous event
I am copying a previous event but the registration page shows the old date and address. I have updated the event in Event Location, but it will not change. How can i change this? Thanks

# Answer
how are you copying/duplicating the old event?

if you have an event that you do often, it's best to make an event template and then you can create new events based on the template and edit the details that change (like date) but the ones that don't get populated automatically
> 1 votes

# Answer
Maybe I'm misreading your question, but the date of the event is updated on the first tab, "Info and Settings" towards the bottom (rather than the "Event Location" tab.)
> 1 votes

---
Tags: civievent
---


# Question
Title: Not allowed to view the pages after upgrade
I have a website where the civicrm plugin stopped working and developed an error. I have since copied the site onto another hosting account I have and have been following these upgrade steps (https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+WordPress#UpgradingCiviCRMforWordPress-verify\_settings) to upgrade the plugin (as it's been a year and a half anyways). I've gotten to step 4 but when visiting the link it says

> Sorry, you are not allowed to access this page.

I saw in the upgrade steps it mentioned if you have issues to activate the plugin in wp-admin/plugins.php but I've never done it that way. Is there a chance anyone can let me know if "activating" it via plugins.php file may work and how might I do that? If it isn't that (as I didn't deactivate the plugin before upgrade) why my Administrator account wouldn't have access to this page? of the civi crm dashboard in wordpress?

I had tried deactivating all the plugins via the wordpress backend but then I was shut out of my site (os there a way with this plugins.php file to activate them all again or do I have to delete and re-do all the steps again of getting another backup and upgrading civi crm?).

Thanks for your help!

# Answer
Just had the same problem, but found the answer on this page:

WordPress - Problems trying to go back to CiviCRM 4.7.17 from 4.7.19

I had previously installed CiviCRM but wanted to remove it and start from scratch, but I hadn't deleted the civicrm folder in /wp-content/uploads/
> 1 votes

---
Tags: wordpress, upgrade
---


# Question
Title: CiviVolunteer - Functions Not Working after Security Update to Civi 4.7.21 on Drupal
We started using the CiviVolunteer extension with success. However, after we upgraded to the security release 4.7.21 some of the CiviVolunteer functions do not work. Or they cannot be accessed from the navigation menu.

We cannot access the following functions; \- New Volunteer Project \- Manage Volunteer Projects \- Search for Volunteer Opportunities

In addition, the CiviVolunteer menu items cannot be seen on the Navigation Menu editor (Administration \> Custom Data and Screens \> Navigation Menu)

# Answer
> 2 votes
Ron. This is a known issue. CiviCRM made some changes to its Angular (a JavaScript library) integration that CiviVolunteer needs to catch up with.

CiviVolunteer is maintained by an independent consultancy, Ginkgo Street Labs. We would like to resolve this problem as soon as possible, but we have a full slate of projects that, as a small business, we need to prioritize ahead of unfunded work. If your organization is able to contribute developer hours or funds toward resolution of this problem, please contact us.

# Answer
> 2 votes
Just for context - the security issue that caused CiviVolunteer to break was https://issues.civicrm.org/jira/browse/CRM-20243 \- we upgraded to a secure version of Angular. Unfortunately our policy with security updates is not to give people advance notice - on the basis that it alerts the black hats more quickly than the white hats - so Gingko were not pre-warned there was a security release going out.

The catch 22 of security releases is that they are the most essential and the most risky updates. Perhaps the risk of regressions when people don't know they are coming is greater than that of the black hats. Although people on the security channel didn't seem to test this either

# Answer
> 1 votes
Ron,

They released another update 4.7.22. Here are details on the fixes in this version: https://github.com/civicrm/civicrm-core/blob/4.7.22/release-notes/4.7.22.md#bugs

I'm not sure if it will fix the CiviVolunteer issues, but maybe you want to give it a shot.

# Answer
> 1 votes
A new version of CiviVolunteer has just been released that addresses this issue. Users running CiviCRM 4.7.21 and higher should upgrade. Details are here:

http://ginkgostreet.com/content/announcing-civivolunteer-222-release-0

Users of CiviCRM 4.7.20 and prior **SHOULD NOT UPGRADE** CiviVolunteer past 4.6-2.2.1. The changes to CiviVolunteer that make it compatible with CiviCRM 4.7.21 and higher are incompatible with earlier releases.

---
Tags: civivolunteer
---


# Question
Title: CiviVolunteer stopped working after upgrading to 4.7-2.2.2
I'm running CiviCRM 4.7.20 and upgraded to the latest version of CiviVolunteer from the extensions directory, and now it doesn't work.

# Answer
The latest version of CiviVolunteer (4.7-2.2.2) is not compatible with versions of CiviCRM before 4.7.21. You should upgrade CiviCRM to at least this version, if possible. Full details are available in the announcement.

If you are not able to upgrade CiviCRM, there are no changes to the database schema in 4.7-2.2.2, so it is possible to downgrade CiviVolunteer to 4.6-2.2.1. Download the code and replace version 4.7-2.2.2 in your extensions directory.
> 1 votes

---
Tags: civivolunteer
---


# Question
Title: Live Paypal transactions showing as Test
I'm very nearly there with setting up PayPal Standard. I'm using WordPress 4.8.2 and CiviCRM 4.7.22 at present.

I have set up a PayPal sandbox account and everything seems to be working nicely with the exception that it is showing up as (test) in CiviCRM - it took me a while to work this out and find it in the contribution search. I am definitely using the live link (if I use the test link, it goes to a different PayPal sandbox account that I have set up for that and that works as expected to produce a test contribution record.

I have tried it with a membership contribution and an event contribution. If I switch to the dummy payment processor (no other changes) it gets treated as a live contribution, so I think it must be something to do with PayPal but can't see how.

Is there some other setting I might have missed? Any suggestions very welcome.

# Answer
> 1 votes
I have noticed this behavior in the past. When using a PayPal sandbox account, CiviCRM transactions are flagged as "test" even when using the sandbox credentials in the "live" processor configuration.

---
Tags: civicontribute, paypal
---


# Question
Title: How to put your CiviCRM Contacts on a Leafleft Map in 5min?
To summarize: someone asked me to post this here - so that he can give it a try!

* put a PIN based on latitude/longitude of the CiviCRM Contact
* put CiviCRM Contact data in the bubble pop-up
* color the PIN based on value of a CiviCRM Custom field

# Answer
> 9 votes
Leaftlet is an open-source JavaScript Library for interactive mobile friendly maps. It only takes a few minutes to put your CiviCRM Contacts on a Leaflet Map if you're using Drupal.

Here are some of my slides from my CiviCON 2016 lightning talk:

**EDIT: Some additional notes based on comments below and some questions emailed to me:**

* To get started with CiviCRM - Drupal integration make sure you have CMS integration set up Administer: civicrm/admin/setting/uf?reset=1
* add a filter to not bother w/ non-geocoded addresses: Filter Criteria: CiviCRM Address: Latitude (not empty)

**EDIT: for this example I used: drush pm-list** --type=Module --no core --status=enabled (and relevant...)

CiviCRM CiviCRM (civicrm) 4.6.18
Other IP Geolocation Views & Maps (ip\_geoloc) 7.x-1.28
Other Leaflet (leaflet) 7.x-1.3
Other Leaflet Markercluster (leaflet\_markercluster) 7.x-1.2
Other Libraries (libraries) 7.x-2.2
Views Views (views) 7.x-3.14

Don't forget Leaflet module requires you to install leaflet library in /libraries (either your sites/all/libraries or your specific site's /libraries).

UPDATE: now requires this patch for ip\_geolocate module -\> https://www.drupal.org/files/issues/ip\_geoloc\_plugin\_style.inc\_.patch

# Answer
> 2 votes
Just to note that this stopped working around CIVICRM 4.7.19.

You need to apply the patch to Drupal IP\_geoloc module here:

https://www.drupal.org/node/2861393

---
Tags: drupal, drupal-views, cms-integration, geocoding, map
---


# Question
Title: HOWTO reliably set default Country on Import?
We are trying to understand why importing contacts from CSV files with Address, City, State, Zip but no Country results in addresses with countries like Uruguay (for some CA residents), Yemen (for some South Dakota residents), and today, for the first time, for a bunch of CA residents, they were assigned "Guinea-Bissau". Although we have different staff doing different imports, the majority (e.g. ~3000 out of ~3060) of our imports DO end up with Country="United States"

In "Adminster \> Localization \> Languages, Currency, Locations" we have Default Country set to "United States". That was set when we first configured Civi long ago.

Is there some other setting that deals with setting the default country on import? Should we solve this by always adding a Home-Country column to CSV imports? That seems cumbersome, but will do if that's the only solution.

BTW, we're running WP 4.8.2 and CiviCRM 4.7.22.

# Answer
I think the problem can happen if you import your 'State' as the Abbreviation. If you look in table civicrm\_state\_province you will see lots of States with Abbreviation CA - and unless you specify the right country it can have unexpected out comes possibly depending on which Countries you have enabled.

I think this jira address the core issue

The workaround for this issue is to ensure that, when importing address data, that a valid country is always specified when there is data in a State/Province field.
> 2 votes

# Answer
For sure this sounds like it should be working - and one could say it's a bug that it does not default to default country - but the workaround: to explicitly add Country in your CSV for import - is so easy -\> I recommend you just do that and get this off your plate.

If you have System Settings -\> Mapping & GeoCoding enabled -\> the GeoCoding may be the culprit here: there are Cities that appear in more than one Country - so feeding it a partial address could lead to 'random' results; I've often realized that when adding a partial address in Google Maps for directions - and the result sent me half way around the world \[as opposed to using my default Country - it should know where I am after all\]; who knew there is Manchester in California, USA; or a Chelsea in Alabama, USA; there is a London in Ontario, Canada;

So best to never run a Contact import without Country or disable the Geocoding -\> Parsing; I have never run an incomplete Address import - my scripts always add Country;
> 1 votes

---
Tags: import, localisation, geocoding, default-settings
---


title: Revisting Family Memberships

text:
# Question
Title: Revisting Family Memberships
I am looking at how we implemented Family Memberships in our 3 year old instance of CiviCRM. It's never worked very well for us, but I am not sure if it's not configured right, we should use another approach or what. Our use case is a professional membership society where sometimes both spouses are members of the profession. They don't think of one or the other of them as the "primary" member. They are equals. So each needs the ability to renew their Family Membership, and when that happens the other spouse's membership should be marked as renewed as well.

Currently we have it set up where membership is granted via related contacts. One is marked as Primary in the database. We have troubles when the non-Primary member wants to do the renewal. It rarely "just works", some editing is necessary.

It seems the alternative is to use Household memberships, and mark each of them as permissioned to manage the Household membership. Will this solve our problem?

Advantages and disadvantages of each approach?

Thanks

# Answer
> 0 votes
It sounds like the ideal solution for you would be if the 'on behalf of' Membership could be made to work for Households. I don't think I have seen anyone tackle this, and it was also discussed in this question

# Answer
> 0 votes
I've set up a household based membership system a couple of times with success. The household contact gets the membership, and individuals inherit the membership via relationship s. We set up a head if household relationship, and member of household relationship, but if you don't need to handle children or other family members then perhaps just one relationship type can beat used. We use the webform civicrm module to build the sign up and renewal forms, it can be done with a little to know custom code, although a bit of code helps make a slick consistent ui/ux. This module is available for Drupal. It can definitely be done!

---
Tags: civimember, relationships, best-practice, households
---


title: Custom Fields not emailing

text:
# Question
Title: Custom Fields not emailing
Using CiviCRM 4.7.22 on Wordpress 4.8.22 We are having a problem with our contribution form submissions. We have a Custom field. When the member submits the form, the information from the custom field is added to the profile in the dashboard, but it shows up as blank in the email receipts to both the member and to the Admins. We need this data to show in the email receipts also. Please see screenshots below for more details.

\*******ADDITIONAL INFORMATION BELOW\******

I noticed that when I add the custom field to the profile it says it is a "Primary" field, but when I go to edit it after adding it, it is no longer a primary field. Why does it change? Could that be what is preventing it from being included in the emails?

This is a "Contact" field, because we need it to appear below the Address area in the member's profile page on civi. It is just a simple membership, not multiple records. I noticed that if I use an "Individual" field instead, it will work properly with the email, but the problem is it puts that field way on the bottom of the member's profile page in civi. This really needs to be close to the address area. So I guess the question is, why does an "Individual" custom field show the data in email receipts, but a "Contact" custom field won't, and how to do we fix that?

\*****NEW IMAGE\*****

# Answer
> 1 votes
The fact that you are seeing Primary suggests this has been added as an Address custom field, and it seems that these new-ish field types have not been fully integrated to receipting.

You have some options

1/ change your field to a standard Contact field and then edit your tpls to have the field show where you want it (this seems the 'right' way to fix this since otherwise you are using an Address field, with its options of Location Types, for a field that should not be offering Location Types)

2/ get the code improved so these fields do show in the receipts either by contributing a patch or funding a Partner to do this on your behalf and help grow this open source project.

---
Tags: custom-fields
---


# Question
Title: events listing "no layouts found" after WP upgrade
After upgrading from 4.7.10 to 4.7.24 having problems displaying events on public pages eg https://leep.ngo/civicrm/?page=CiviCRM&q=civicrm/event/register&reset=1&id=1881 or https://leep.ngo/civicrm/?page=CiviCRM&q=civicrm/event/ical&reset=1&list=1&html=1

Page is correct site template but page is blank - message is "no layouts found"

Was working fine pre-upgrade ALSO works fine if I revert to standard twenty sixteen template. Theme developer is hard to contact and I don't know much about WP but can anyone indicate what the upgrade might have changed cheers

# Answer
> 1 votes
The theme developer fixed it. His explanation:

"We have updated and fixed that issue. The previous script was detecting a URL structure and would display that particular template, it seemed the URL structure had changed"

doesn't mean much to me but maybe will help others

---
Tags: wordpress, civievent
---


# Question
Title: How can I easily import data from external sources like Stripe while dealing with subtle differences in field values?
Here's a specific example. When I export data from Stripe, there is a `Status` column with the value `Paid`. This obviously corresponds to CiviCRM's `Contribution Status` field. **However**, CiviCRM doesn't use the term `Paid`, it uses `Completed`.

If I try to just directly import data from Stripe, CiviCRM complains about invalid status (and other fields with similar issues).

I could easily write a little script to munge CSV files from Stripe into something that makes CiviCRM happy, but I really want to create a process that our staff without deep technical skills can use. Running a command line Perl script is out of the question. I could make a web app to munge the CSV files but now we're getting into very silly amounts of work for something absolutely trivial!

Ideally, CiviCRM would have some sort of notion of munging/mapping for the **values** in the data being imported, as opposed to just mapping the field names.

I didn't see any extensions along these lines but maybe I missed something.

I'd love to learn how others have solved this problem.

# Answer
You are aware that stripe can interface directly with civi? it would save you the trouble to have to import.

As for your question: not to my knowledge, but for your team, wouldn't it simple enough to do a search/replace in excel?
> 1 votes

---
Tags: civicontribute, import
---


title: API URL needs administrator

text:
# Question
Title: API URL needs administrator
I am writing an extension which uses a CRM.api3 call in javascript on the contribution page. However, the link that is generated is lacking the "administrator" part. For example,

The API call to StateProvince generates this: http://localhost:81/example.org/index.php?option=com\_civicrm&task=civicrm/ajax/rest&entity=StateProvince&action=get&json=%7B%22sequential%22%3A1%2C%22id%22%3A%221042%22%7D

That gives a Internal Server Error 500 message.

However if I add "administrator" to the link: http://localhost:81/example.org/administrator/index.php?option=com\_civicrm&task=civicrm/ajax/rest&entity=StateProvince&action=get&json=%7B%22sequential%22%3A1%2C%22id%22%3A%221042%22%7D

it asks the user to log-in and then works fine. How can I allow my extension's javascript to call the StateProvince api Get method without making the user log in?

Below is my code:

```
var myStateInfo = '';
CRM.api3('StateProvince', 'get', { "sequential": 1, "id": myStateId }).done(function(result) {
    myStateInfo = result;
});

```

# Answer
> 1 votes
You probabky have to give anonymous users the permission "CiviCRM: access AJAX API".

---
Tags: api, extension, permissions, javascript
---


# Question
Title: Tips for synchronizing data from a local branch to the main office
I have two organisations; both are CiviCRM users. One is the main office and in charge of membership management and membership fees. The other is the local branch and organises events and manages the volunteers.

The main office has a superset of the contacts of the local branch. The local branch has more information, for example, event participation and volunteer details.

The configuration of the two CiviCRM instances are very different but makes sense to exchange information. For example change in the email address in the local branch is of interest for the main office. A new member must be reported to the local branch.

Any tips, what is the best way to do this. Maybe someone has created an extension that can be used, as an example?

# Answer
> 1 votes
If you can, try to use the same instance with ACL to limit what the branch can see (eg only their contacts).

If not, you will need to write at least one extension on the main, to automatically create the relevant contacts on the branch civi, and probably another one on the branch to update the contacts on the main.

Synchronising in both direction is tricky, and you might have situation where one is updating the other with older/incorrect data, think about who "owns" the master data and should be considered always right.

I'm aware of a few projects that helps synchronizing different civi install, but I don't think any is ready to be used the way you want - at least without coding -

---
Tags: extension
---


# Question
Title: Visually group custom and standard fields on screen
For the activity type 'petition signed', I want to add a custom field 'event' next to the standard field 'location', because my organization wants to store information about the specific event where a petition signature was obtained and I want to keep the 'location' field clean (= only geographical location).

I can add a custom field, but on the Activity screen, the fields are now visually separated. I want to keep them together for a better user experience. Is this possible in any way?

# Answer
> 2 votes
I found easier to move fields on the client side (using jQuery). you could write a simple extension that:

* adds a custom javascript on the specific page(s) you want to modify
* and that javascript would move the fields to their new location, and presumably hide the custom group "activity metadata"

It's mostly robust, but you would need to check everytime you do an upgrade that the selectors you used are still the same between different civicrm versions

---
Tags: custom-fields
---


title: Error sending mail with Civimail

text:
# Question
Title: Error sending mail with Civimail
I've switched hosts and the new host's smtp server seems to be rejecting the email I'm trying to send to a group. It can me 2 or 2000 people with the same response. Apparently it does not like the auto generated sender email address? Anyone have that issue and go I d a solution? CiviCRM on WordPress. Both very recent versions.

2017-09-22 16:30:04 \[4342\] H=(www.sportingdetectiondogs.ca) \[184.154.247.100\]:33676 I=\[184.154.247.116\]:25 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no SNI="sportingdetectiondogs.ca" F= A=dovecot\_login:civicrm@sportingdetectiondogs.ca rejected RCPT : SITEGROUND: b.304.14831.47c90fe51b65dc14@sportingdetectiondogs.ca is not a valid address: Sender verify failed: Sender verify failed 2017-09-22 16:40:04 \[48178\] H=(www.sportingdetectiondogs.ca) \[184.154.247.100\]:42556 I=\[184.154.247.116\]:25 Warning: SITEGROUND: Message from 184.154.247.100. Normal SMTP auth with civicrm@sportingdetectiondogs.ca system user: sporti62 2017-09-22 16:40:04 \[48178\] H=(www.sportingdetectiondogs.ca) \[184.154.247.100\]:42556 I=\[184.154.247.116\]:25 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no SNI="sportingdetectiondogs.ca" F= A=dovecot\_login:civicrm@sportingdetectiondogs.ca rejected RCPT : SITEGROUND: b.304.14832.46cd2e439db32d78@sportingdetectiondogs.ca is not a valid address: Sender verify failed: Sender verify failed 2017-09-22 18:45:24 \[26529\] H=(www.sportingdetectiondogs.ca) \[77.104.151.189\]:51718 I=\[77.104.151.189\]:465 Warning: SITEGROUND: Message from 77.104.151.189. Normal SMTP auth with civicrm@sportingdetectiondogs.ca system user: sporti62 2017-09-22 18:45:24 \[26529\] 1dvXdM-0006tt-Ja \<= info@sportingdetectiondogs.ca H=(www.sportingdetectiondogs.ca) \[77.104.151.189\]:51718 I=\[77.104.151.189\]:465 P=esmtpsa X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no SNI="usm31.siteground.biz" A=dovecot\_login:civicrm@sportingdetectiondogs.ca S=565 M8S=0 T="Test for SMTP settings" from for support@siteground.com support@support.com \[~\]#

# Answer
two possible sources of the error:

* you have changed something in the configuration of your mail accounts in civi (or didn't finish the config previously), check the documentation, the "localpart" should not be empty but name of your bounce mailbox (eg if your mailbox is bounce@example.org, it should be "bounce+")
* civimail relies on a trick that most servers implement: if you send and email to bla+whatever@example.org, it will automatically be understood as an alias of bla@example.org

It seems that you need to at least fix the localpart, as your new mail server is more strict and better at catching configuration problems
> 1 votes

---
Tags: wordpress, civimail
---


# Question
Title: Upgrade from 4.1.5 to 4.2 (or any new version) fails
I'm upgrading a very old CIVICRM version. I manage to get CIVI from 3.2 drupal 6 to 4.1.5 drupal 7. However when I'm trying to upgrade from 4.1.5 to 4.2 or newer I'm getting several errors. Since this is old version is there anyone that got the same problem? What steps can solve the upgrade procedure?

Best regards Eduardo

# Answer
Enable debug and backtrace, it should make civicrm more verbose about why it fails.

It's a long time ago, but the internet has a good memory, if you can see the exact error message, searching for it should point you to someone else having had the same issue, and hopefully that did find a way to fix it ;)
> 1 votes

# Answer
If you can't easily google-find your specific error mesage for clues & since you're on a very old version (thus very few people are running into this) - Perhaps consider making it an export -\> import into new CiviCRM on your Drupal7; gives you a great opportunity to also clean house;

Migrations from CiviCRM -\> CiviCRM are typically relatively painless (compared to others) as lots of data will already be mapped;
> 0 votes

---
Tags: upgrade
---


# Question
Title: Membership Types Randomly Stopped Working
CiviCRM 4.7.24

We do not use Price Sets, but instead have a selection of Membership types.

Randomly some time today, our membership types got messed up where the our front-end webform is showing membership types that we deleted a long time ago.

When I go into and try editing the Membership Types on the back-end of the webform, those mystery membership types don't even show up.

When I try pick different membership types and Save, the front end does not change at all.

Here is the front end that is showing all of the membership types:

https://lnt.org/civicrm/contribute/transact?reset=1&id=58

It's supposed to only have: $25, $50, $100, $250, $500, and $1,000.

Anyone have any suggestions! I'm not the most technologically savy person out there...

Thanks!

# Answer
I was able to figure it out. In the back-end, I "un-abled" the Membership Section of the Contribution Page (ultimately, shutting down our form for a second), quickly saved, and then quickly Enabled the membership section again and selected the membership levels. Basically, "resetting" the membership section. Some of our donation pages (no membership section enabled) were also messed up -- if we had 4 selections originally, a bunch more were added to the list. Manually deleting/reordering those solved that issue. I'm still not sure why this happened, but this worked for us.
> 1 votes

# Answer
Although you specifically are avoiding Price Sets, sometime ago we also had trouble getting the correct order to display on our membership signup/renew page, no matter how we ordered our Membership Types. Price Sets solved the problem and we now use Price Sets for all Events and other payment options that are displayed to our members. I know that's not the answer you're looking for, but Price Sets also offer some other nice features for displaying a list of prices (descriptions, help, etc.).
> 0 votes

---
Tags: civimember, contribution-page
---


# Question
Title: API usage: How to change the 'participant_note' field in the Participant entry for an event
I need to update the 'participant\_note' field for a few Event Participants via the API. I can't figure out how to do this using the API explorer (it seems the explorer does not recognize 'participant\_note' as a valid field).
Here is an example of a Participant get call

> {
> "contact\_id": "11111",
> "contact\_type": "Individual",
> "contact\_sub\_type": "",
> "sort\_name": "Last, First",
> "display\_name": "First Last",
> "event\_id": "1",
> "event\_title": "Readable Name",
> "event\_start\_date": "2014-01-01 00:00:00",
> "event\_end\_date": "2014-01-01 00:00:00",
> "participant\_id": "1",
> "participant\_fee\_level": "",
> "participant\_fee\_amount": "",
> "participant\_fee\_currency": "",
> "event\_type": "Some Type",
> "participant\_status\_id": "1",
> "participant\_status": "Registered",
> "participant\_role\_id": "1",
> "participant\_role": "Attendee",
> "participant\_register\_date": "2014-01-01 00:00:00",
> "participant\_source": "",
> "participant\_note": "",
> "participant\_is\_pay\_later": "0",
> "participant\_is\_test": "0",
> "participant\_registered\_by\_id": "",
> "participant\_discount\_name": "",
> "participant\_campaign\_id": "",
> "id": "1"
> }

# Answer
> 2 votes
i figured it out:

> entity=Participant
> action=create
> json={
> "sequential":1,
> "id":"", THIS IS PARTICIPANT ID
> "participant\_note":""
> }

# Answer
> 0 votes
Look for it in civicrm\_note (Entry *Note* in the API Explorer) It will be tied back to the Participant Table via civicrm\_note.entity\_table and civicrm\_note.entity\_id.

---
Tags: api
---


title: How to search PCP by date created?

text:
# Question
Title: How to search PCP by date created?
Is there any way to search Personal Campaign Pages by the date that the campaign is created? On /civicrm/admin/pcp page, you can sort by starts and end dates, but these are for the donation/event pages, not the campaign page itself.

So for example, I created a campaign page in February 2016 for an event which is open since July 2014. Is there a way to find all campaign pages that are created in February 2016?

# Answer
Great idea. Unfortunately there is currently no way to do this.

Personal campaign pages don't even *store* the date that they were created.

Enabling database-level logging would allow you to store this type of data, but you would need to build a custom search or report to see it.

I agree this would be a great feature though!
> 1 votes

---
Tags: pcp, personal-campaign-pages
---


# Question
Title: I need to find the Host URL, Site key and API key
I need to find the following details for my CiviCRM account:

* Host URL,
* Site key and
* API key.

Where can I find them?

Thanks so much, Silvia

# Answer
## Host URL

Depending on the *context* of your situation, this is *probably* referring to the domain name of the site where you use CiviCRM. So if you see `https://example.org/civicrm` when using CiviCRM, then the host URL is `example.org`

## Site key

This is one value, used globally for your CiviCRM installation and stored in the `civicrm.settings.php` file on your server. (The location of this file will differ depending on what CMS you use.)

Within the file, you'll find a section like this:

```
if (!defined('CIVICRM_SITE_KEY')) {
  define( 'CIVICRM_SITE_KEY', 'J8UdnKcpN93x0mvv');
}

```

So here, your site key would be `J8UdnKcpN93x0mvv`.

## API key

API keys are unique to CiviCRM *contacts*. You'll need to create an API key for a contact if you want to use the API through the REST interface.

If you are setting up an external service to connect to your CiviCRM installation, it's probably worth *creating a new contact record* specifically for this service to interact with your site. Then you can grant specific permissions to this user just like you would do for a real person.
> 7 votes

---
Tags: api
---


# Question
Title: Members still have "new" status, after over a year and a half
Member rules dictate that members are "new" from start date to 3 months after start date. Nearly all the members in our database (4000+) are still marked as new. In fact, everyone is considered new unless they were cancelled by us by hand.

I have changed the rule so that members are only new for one month instead of three. What could be causing this issue? Cron is running. How do I fix and update user status?

The biggest problem with this is that we are a non-profit organization, and users aren't renewing their memberships because they are marked as status "new" even if their memberships expired a long time ago.

CiviCRM 4.7.15 Drupal 7.x

# Answer
> 1 votes
In CiviCRM Scheduled Jobs, the job to check and update membership status was not enabled.

---
Tags: drupal, civimember
---


# Question
Title: Migrating CiviCrm to WordPress CMS from Drupal
The wiki guide doesn't work. I ran into issues concerning moving the civi contacts...ie Drupal users. This is obviously very very crucially needed. I have over 5000 thus I cannot move forward. I was told to write a new question. So here it is. If anyone has tried this and had it fail... Please help

Update: Being that this is complicated and likely several glitches will arise after trying this again... I've opted never to do this. It's too risky and I'll lose historical information back to 2012. I'm unwilling. Seems not many successfully do this or is see much more on Stack exchange

# Answer
Export a csv list from Drupal or phpmyadmin? Then import it into WordPress via a plugin like https://wordpress.org/plugins/import-users-from-csv/ You can disable/delete the plugin after you are done. You will also want to use the plugin https://wordpress.org/plugins/civicrm-wp-member-sync/ to create/sync the users in Civi.
> 2 votes

---
Tags: wordpress, civievent, civimail, drupal, contacts
---


# Question
Title: Login Failed with eWAY Recurring Payment Processor
I have installed the eWay Recurring Payment Processor (version 1.2) in my site and it processes one-off payments fine. However when I processes a recurring payment I get the following error: "9010: Failed to create managed customer - result (faultcode, faultstring) is (soap:Client, Login failed. )".

When I contacted eWay regarding this error they gave the response that I was sending the request to an incorrect URL (https://www.eway.com.au/gateway/managedpayment/CreateCustomer). Is anyone else getting this error? If this extension is out of date is there a new one?

# Answer
> 2 votes
We had the same issue when setting up recurring payments for the first time. This is how we resolved it. Note: This is for Australia only.

1. Login to MyeWay and create an API Key and password.
2. In CiviCRM, modify or create an eWay recurring payment processor with the following: **Username:** your usual eWay username (ie. email address).
**Password:** The new API password you just created in Step 1.
**Site URL:** https://www.eway.com.au/gateway\_cvn/xmlpayment.asp
**Recurring Payments URL:** https://www.eway.com.au/gateway/ManagedPaymentService/managedCreditCardPayment.asmx?WSDL

Also to confirm we are using the 1.2 version of the eWay Recurring Payment Processor and it does not require any update to get it working.

---
Tags: recurring-contributions, eway
---


# Question
Title: Fill in custom field of type contact reference field from javascript returns TypeError
I have a custom field, which is a contact reference field.

Based on what the user fills in on the form, I would like to fill in the contact reference field with a specific contact. Leaving the user the choice of keeping that contact, or selecting another one.

The html code of the reference field is:

```
<div class="select2-container crm-form-contact-reference huge crm-ajax-select" id="s2id_custom_21_-1" ...

```

Let's say that based on some values on the form, I want to fill in the contact with ID 188 in that contact reference field.

I should be able to do this with:

```
CRM.$("#s2id_custom_21_-1").select2('val', '188')

```

However, this returns the error "TypeError: row is undefined" in Common.js on line 387.

The error can be reproduced in the CiviCRM demo environment by following these steps:

* go to Administer \> Customize Data and Screens \> Custom Fields
* click on "View and Edit Custom Fields" for the set "Food Preferences" (used for Participants, and linked to the Fall Fundraiser Dinner event)
* add a custom field of type "contact reference"
* then go to Events \> Register Event Participant
* select "Fall Fundraiser Dinner" in event
* then press F12 top open the developer tools of your browser
* in the console type:

CRM.$("#s2id\_contact\_id").select2('val', '188')
* this should fill in "Wattson, Laree" in the contact field, which is good
* find out the id of the custom field on that form (it should be at the bottom of the screen in the "Food preference" section). In my case it was s2id\_custom\_13\_-1
* in the console type:

CRM.$("#s2id\_custom\_13\_-1").select2('val', '188')

==\> you shoud see TypeError: row is undefined \[Learn More\] in the console

Looks like a bug to me. Or am I doing something wrong?

# Answer
The solution is to use 'data' instead of 'val':

CRM.$("#s2id\_custom\_13\_-1").select2('data', { "id": 188, "text":"NAME OF THE CONTACT"} );
> 0 votes

---
Tags: javascript, contact-reference
---


# Question
Title: Can't view contact groups page: "DataTables warning"
We can't view the main groups page -- a popup error appears and no groups are shown. The error is:

```
DataTables warning: table id=DataTables_Table_0 -
Invalid JSON response. For more information about
this error, please see http://datatables.net/tn/1

```

# Answer
In this case, turning on logging (**civicrm/admin/setting/misc?reset=1**) and looking in the CiviCRM log reveals a fatal error related to mapping and geocoding:

> Proximity searching requires you to set a valid geocoding provider

Somebody had tried to set up a proximity group based on zip codes, but the mapping and geocoding settings had not been configured. Configuring the geocoding (**civicrm/admin/setting/mapping?reset=1**) to use Google as the provider fixed the issue.
> 1 votes

---
Tags: groups
---


title: How do I add a video file to an event?

text:
# Question
Title: How do I add a video file to an event?
We are running CiviCRM version 4.7.24 on a Drupal 7 site. My client would like to add an MP4 video to an event page. I tried a simple upload of the video using the image button and I get the warning "Unknown image format/encoding" and the file is not uploaded. Is it possible to use video in CiviCRM event pages? If so, how do I do it?

# Answer
Native CiviCRM -\> try uploading your video to a third party service (like Vimeo or YouTube) and then embed the reference to it in an iFrame \[where you describe/details of the Event\].
> 3 votes

# Answer
I have not tested this but it may be as simple as adding mp4 as a safe file ending here: /civicrm/admin/options/safe\_file\_extension?reset=1
> 0 votes

---
Tags: civievent
---


title: individual contribution no publicity

text:
# Question
Title: individual contribution no publicity
One of our regular donors has put money forward for a campaign and is happy that the amount is broadcast as part of the target but wants to remain anonymous in terms of who has given the donation. I have looked on the system and cannot see a box to ensure that the contribution is not linked to the person. All I could find was marketing and mailing information rather than privacy of giving...

# Answer
> 1 votes
You can make your own custom field on Contribution records: for example a radio button anonymous donation: yes/no

Then when you generate CivCRM reports you can decide to exclude contact who say yes or say no for any given contribution by using Filters.

If you use Drupal/Views you can pull that data into a page view and with Views PHP module you can rewrite the Names if radio = yes to 'Anonymous'.

Legislation in your country will determine whether or not your org must have the real donor's name in your CRM.

---
Tags: wordpress
---


# Question
Title: Separate sites for CiviCRM and public site?
Is there a best practice as to whether CiviCRM should be installed on its own site, separate from the public site or as part of the public site?

I think of our internal users doing mailings etc and it doesn’t “feel right” for them to do this on the CMS for our public-facing site, but at the same time we want to allow self-service contributions and event registrations.

Is there any issue to link across sites (for example link public site to membership form served on CiviCRM)? Or is that just a pain.

I’m afraid to just go ahead and install CiviCRM on our production public site. We use WP fwiw.

Appreciate any advice.

# Answer
> 8 votes
I have a number of clients who use CiviCRM on a subdomain separately from their main content site. It has both pros and cons.

**Pros:**

***1. Security.***

The main issue addresssed here is the risk of security lapses on the main site exposing CiviCRM. The reason a separate site can be more secure is that you will typically have more modules and functionality on your main site where ease of use is the primary goal, whereas with CiviCRM, security is a much higher priority. Keeping the CiviCRM site with fewer 'ease of use' tools and generally fewer functions will almost always make it more secure, at least in principle.

Analogously - you can also provide hassle-free administrative access to designers and content editors without risk of inadvertently exposing CiviCRM.

***2. Performance.***

The primary use case of your main site will typically be anonymous access by visitors, whereas most of your access to CiviCRM will be authenticated. The kind of server setup for those two types of access are frequently at odds, so having them on separate servers can make for better use of machine resources. e.g. you can put your main site on a relatively inexpensive hosting service with heavy caching for anonymous visitors.

**Cons:**

***1. Expertise***

Keeping internal resources to understand how multiple systems works can be a hassle and/or expensive. This is really the key driver of the decision - if you already have reasons to keep your CMS where it is, or to move it to a different CMS than your CiviCRM is on, then a split install is often a good choice.

***2. Maintenance***

The main other cost of the separate installs is maintenance - keeping up two sites instead of one, and updating design elements to keep the visual link between them convincing.

***3. Server costs.***

Usually, two sites is going to cost more than one, but see note 2. above. Specifically - by having the lower-security functionality all together, you can use your budget more effectively, e.g. you can have a managed CiviCRM install and use more off-the-shelf (read cheap/do-it-yourself) tools for your CMS.

I would also note that you don't need fancy machine-level integration as suggested by ErikH - you just need links back and forth, and an internal clarity that the two pieces are only loosely joined.

For clients who are migrating from other solutions (e.g. separate online processsor services, mailing lists and event services), putting all these together on one CiviCRM site that they manage is already a huge step forward in integrating those pieces, and having that functionality relatively loosely linked to the content site is not usually a show stopper, and in some cases a desirable state.

**Examples**

Here are few sites that are hosting CiviCRM on a separate subsite:

1. https://www.awid.org/
2. https://www.wildernesscommittee.org/
3. http://www.fairvote.ca/
4. http://www.patientscanada.ca/
5. http://everdale.org/
6. https://wildsight.ca/
7. https://www.bcndp.ca/
8. https://www.kairoscanada.org/

# Answer
> 2 votes
It depends on your security and privacy requirements. I agree with Pete that for CiviCRM to work most simply, install it on your public facing CMS.

You should realize however, that from a security and privacy viewpoint this is not the most secure option. If that is important to you, you should install CiviCRM on a separate server. However, that does mean that you have to think a little on the communication between your public website and CiviCRM. You can use the REST API to communicate with the CiviCRM server from your public website but is does mean you have to do some coding in your website forms. Again, it depends on your requirements.

Hope this helps!

# Answer
> 1 votes
We have several clients with a WordPress public site and a Drupal based CiviCRM. to keep their hardworking nonprofit website staff happy.

If your website team insists on Wordpress and you need to take advantage of more advanced features of Drupal for things like portals and more complex integrations it can be a good compromise.

# Answer
> 0 votes
For civicrm to work best/most simply, install it on your public facing CMS.

---
Tags: wordpress, installation, best-practice, administer
---


title: Membership cannot be saved

text:
# Question
Title: Membership cannot be saved
> The membership cannot be saved because the status cannot be calculated for start\_date: 20160425 end\_date 20170424 join\_date 20160425 as at 2017-09-25 13:54:10

This error message shows when a user, with recorded start and end dates of membership in expired status tries to renew their membership.

Perhaps status rules need some work or there is an issue with memberships that occurred before upgrading to 4.7.x version of the CRM. Here is a screenshot of the status settings:

Note: I know this may be a duplicate question but I wanted to provide more information than than the other posts to see if we can resolve all of them.

Using CiviCRM 4.7.15 on Drupal 7.x

# Answer
> 1 votes
When you do your Status settings you need to ensure that all the options are set so they are contiguous. This should avoid any problems with dates not fitting in to the expected 'flow'.

# Answer
> 1 votes
The issue went away once I adjusted the membership rules.

I disabled Grace because we want users to renew right away. I changed the expired rule so that the start of the event is the end date and the end of the event is not selected. See screenshot.

---
Tags: drupal, civimember
---


title: DB Error: constraint violation

text:
# Question
Title: DB Error: constraint violation
Help! I just upgraded Civi from 4.7.3 to 4.7.7, but my host timed out during the DB upgrade and it was unable to complete. So I restored a backup of the database and was going to try again, but now every time I do anything with Civi, it gives me a DB Error: constraint violation.

I can't access any of Civi's backend now; it all gives me the same error. And when I try to run the upgrade script, it gives me the error after I click upgrade.

Is there anything I can do? Is my entire Database and my backup worthless now??

# Answer
> 1 votes
Strange, we had an issue on 4.6.24 just now.

The CiviCRM log file stated: -

```
DB Error: constraint violation

```

The debug information should give you the MySQL table name. For some reason, a custom table (civicrm\_value\_tablename\_id) was linked by foreign key (entity\_id) to the wrong table. In my case, it was the civicrm\_event table, whereas it should have been to the civicrm\_participant table.

My solution was to truncate (empty) the civicrm\_value\_tablename\_id table, remove the incorrect foreign key, then add the correct foreign key.

Strange though that I had to do this manually as the CiviCRM custom data set screen showed that the Custom Data set in question is 'Used for' (or extends Participants).

---
Tags: upgrade, backups
---


title: Add Custom CSS to Civi Email

text:
# Question
Title: Add Custom CSS to Civi Email
How can i add some custom css to a message template? I want to add it to the header. Is there a file I can edit?

# Answer
> 2 votes
I just saw, all I need to do is click on the source button in the message editor and paste my code in there as described here

---
Tags: civimail, email, message-templates
---


title: Cannot download CiviVolunteer 4.7-2.2.2

text:
# Question
Title: Cannot download CiviVolunteer 4.7-2.2.2
I am unable to download Civivolunteer 4.7-2.2.2 which is necessary for me because prior versions do not work with the current version of Civicrm. It does not appear in the extensions directory and it is not listed on the civivolunteer page. https://civicrm.org/extensions/civivolunteer

When will 2.2.2 become available for download through the extensions directory? Or is there a direct link to download and install manually?

# Answer
> 1 votes
You can download it from GitHub. Just unzip and place in your extensions directory.

---
Tags: civivolunteer
---


# Question
Title: How to print selected/multiple Contact Profile "Print Summary"?
I have around 1000 contacts and I want to print selected profile summary.
I found a "Print Summary" in Actions of the Contact profile page, but can only seem to print one summary at a time.
Is there a way to print multiple profile summaries at one time in the format the "Print Summary" prints or is a custom report going to be needed to print these summaries? And how to do it?

Thanks in advanced.

CiviCRM Version: 4.7.19
Wordpress Version: 4.7.5

# Answer
This might be quicker/fewer clicks than totally manual printing when you are dealing with dozens or hundreds of contacts. Still not a great option, though.

1. Get a list of all the ContactIDs that you want to print.
2. Merge each CID into the appropriate "Print Summary" URL for your CMS. For Joomla, it is \[domain\]/administrator/?option=com\_civicrm&task=civicrm/contact/view/print&reset=1&print=1&cid=xxxx
3. Put the list of merged URLs into your favorite text editor that creates automatic links, and click on each one.

Not really an answer to how to print multiple at once, but it might be a useful workflow for a non-programmer until a proper solution is devised.
> 1 votes

---
Tags: wordpress
---


# Question
Title: How to use advanced search to search contacts created by logged in user
Basically what I need to do is search for contacts created by the **current logged in user**. I have tried the change log tab but that does not work for me because then it would be contacts created by user ***x*** which is not what I want. I don't know if this is possible. Please help.

I need to create a smart group with this search criteria. My end goal is to use this smart group to give access to all users to view/edit the contacts they themselves created,

# Answer
I don't think this is currently possible with the existing functionality. But you can attain this by custom fields with little customization using extension. What needs to be done is -

* Create a contact custom set from `Administer -> Customise Data & Screens -> Custom Fields`.
* Add a single field. Eg. `Created By`. Make it searchable (Select `Is this Field Searchable?` to `Yes` ).
* Create a simple extension using civix.
* Write post hook and save a value for this field in DB
* Go to Advance Search and search it by using this field.
> 1 votes

# Answer
I solved this the following was I first installed the below extensions on civicrm

1. Entity Settings Helper Extension
2. Related Permissions Module

Then I created a relationship

1. GOTO /civicrm/admin/reltype?reset=1
2. Click on Add Relationship Type and add the relationship. Make sure you check the Always Permission A to B check box

The next step is to create a Drupal module that will add the above created relationship to the new contact and the creator of the contact. We need to just use on hook to get this done. The code has the relationship ID hard coded but it works :)

`/**
 * Implements hook_civicrm_post
 */
function crc_civicrm_creator_relate_civicrm_post($op, $objectName, $objectId, &$objectRef) {
 if (!civicrm_initialize()) {
 return;
 }`

`if ($objectName == "Individual" && $op == 'create') {
 global $user;
 $userObj = user_load($user->uid);
 // Get the email of the current logged in user
 $emailObj = civicrm_api3('Email', 'get', [
 'sequential' => 1,
 'email' => $userObj->mail,
 ]);
 //Create a relationship between the current user and the created
 // individual contact
 $result = civicrm_api3('Relationship ', 'create', [
 'sequential' => 1,
 'contact_id_a' => $emailObj['values'][0]['contact_id'],
 'contact_id_b' => $objectId,
 'relationship_type_id' => 11,
 ]);
 }
}`

THATS IT. Now enable the module and create your contacts and you will also be able to search view and edit them.
> 1 votes

---
Tags: search, permissions, smartgroups, acl
---


# Question
Title: Custom fields for individual using tab with table causes 404 not found for popup
just recently started with CiviCRM 4.7.23 and Wordpress 4.8.2 and most everything seems to work the way that we are needing it to. However, tried creating some custom fields for individuals to capture employment history and when using either "tab" or "tab with table" I receive a "network error". If I switch to "inline" it shows up fine and I can edit but of course, want to be able to record up to 3 employment records per contact so "tab with tables" would be preferred.

Tried doing a search for this issue and did come across checking the baseurl and civicrm.root in the civicrm.settings.php and all seems to be ok.

Our url is on a subdomain http: //data.metrorelief.org

civicrm.root shows to be /home/metrorel/data.metrorelief.org/wp-content/plugins/civicrm/civicrm/ (I replaced /home/metrorel/ with http:// but that caused blank screens on CiviCRM admin section)

baseurl shows to be http://data.metrorelief.org/

I tried removing all plugins and I don't have any extensions in CiviCRM. I also tried different browsers and refreshing but no luck. When I turned on debugging and backtrace and turn on the console I receive the following:

Any help would be appreciated, thanks!

# Answer
> 1 votes
Try switching your theme to WP Twenty Seventeen or something basic like that. I tested "Tabs with Tables" on my install (Civi 4.7.23, WP 4.8.2) and in the Civi Sandbox (Civi 4.7.26, WP 4.8.1) and they both worked. If it works with the different theme, the simple fix is to temporarily switch themes when you need to edit these. Hopefully that is not very often. I have a conflict with my theme in a similar area.

---
Tags: wordpress, custom-fields, error
---


# Question
Title: If I create a Scheduled Reminder for Event feedback, eg 16 hours after, should I expect it to go out to all past events?
We set up a Scheduled Reminder with a link to a webform for event feedback. It is set to go out 16 hours after the event.

We did not expect it to go out to all past events (hundreds of events with thousands of participants over many years)

A/ is this a bug that can/should be fixed

B/ should there be a warning when setting up Scheduled Reminders that these may go out to a much wider audience than expected

C/ is there some way we could have worked around this if we had known it was likely?

# Answer
Seems this is a core bug and Fuzion are working on a fix for this JIRA issue
> 1 votes

# Answer
We had the same issue - making a new post-event feedback email live via Scheduled Reminders unexpectedly triggered emails to hundreds of past attendees of events from years ago.

Until the issue is fixed, one workaround is to set-up a Smart Group that adds attendees to new events of this type that occur only after a certain date. Then in Scheduled Reminders, use the "Limit to" field to only send out to contacts in this Smart Group.
> 2 votes

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


# Question
Title: Percentage Price Field extension not working for Additional Participants?
It seems like the Percentage Price Field extension mentioned in post Adding a dynamic “cover processing fees” checkbox to CiviCRM contribution form is ideal for my needs, except for one problem: payment type exclusions are not followed in the Additional Participant template, and the percentage is always added to additional participant form totals regardless of the payment type chosen on the first registration page.

How to reproduce: -- Create an event where one person can register multiple participants at once -- Configure a percentage price field in a price set to add 3.5%, "Hide checkbox and force to "yes" is checked (to suppress the optional checkbox), and "Disable for payment methods" is selected for "Pay Later". -- Go to the event registration page and say you are registering 2 people. -- the first registration page works fine; the user is given a payment option choice, and the percentage is added only if they choose a payment processor, not for Pay Later -- Click continue to load the additional participant form. The total always adds 3.5 percent regardless of the choice made on the first form.

Is there a way for the payment method choice made on the first form to persist to the additional participant registration forms?

Appreciate help from anyone who's had experience with this extension.

# Answer
> 1 votes
I heard back from the developer directly on GitHub who said this feature might be included in the future.

---
Tags: civievent, extension, percentage-price-field
---


# Question
Title: Joomla 3.8 & CiviCRM 4.7.x - front-end error 500 when logged in
I upgraded Joomla to 3.8 on a test site and CiviCRM (4.7.24) seemed to work fine. I've now replicated the upgrade on a live server (a different config'd machine but both PHP 5.6.31) and while it seemed ok at first, after logging in as admin, certain Profile Edit & all Contribution CiviCRM pages give an Error 500 (the default Name and Address profile doesn't work - but a custom profile does). Dashboard seems to load fine.

I've checked another Joomla 3.8/Civi 4.6.31 site and am getting the same problem. As I've got a working 3.8/Civi am going to try and figure what's different between the installs, but meantime, thought I'd post in case anyone has something similar or any ideas.

# Answer
It turns out this was down to the distribution of BSD on the broken servers was standard USA but PHP needed the PECL international library (https://pecl.php.net/package/intl).

Apparently without it, the collator in Array.php is returning a null rather than an exception and causing the error. But only in Joomla 3.8 it seems.

Dave at Digijuice suggested that ammending Array.php at line 534 as follows could fix the problem - which I include in case of use to anyone, but not sure if the problem is common enough to submit this as a change/issue?

```
public static function asort($array = array()) {
  $lcMessages = CRM_Utils_System::getUFLocale();

  if ($lcMessages && $lcMessages != 'en_US' && class_exists('Collator')) {
    $collator = new Collator($lcMessages . '.utf8');
      If($collator!==NULL) {
        $collator->asort($array); }
         else {
           asort($array);
         }
       }
    else {
      // This calls PHP's built-in asort().
      asort($array);
    }
return $array;
}

```
> 3 votes

---
Tags: joomla, upgrade
---


# Question
Title: How do I add/change columns in CiviReports?
How can I add more fields in columns Tab in Constituent Summary or how can I change the Fields names in columns Tab in Constituent Summary? Also every time that I export my report as a CSV file I get the columns in specific order how can I change the order to the one that I want? Thanks

# Answer
The short answer is "You can't unless you're a programmer". This is a feature that was never added to CiviReport. However, you have many alternatives.
> 7 votes

# Answer
You can add new columns if they are custom fields that you have created. You just need to ensure that the fields are defined as "Searchable" otherwise the fields won't be available in the columns tab.

To check if your custom fields are "Searchable" :

* menu Administer -\> Customize data and screen -\> custom fields
* choose the custom fields set -\> click on View and Edit Custom Fields
* you should set in the column Searchable? the value Yes (in my screenshot, all fields are not searchable so they won't be available for the reports)
> 2 votes

---
Tags: civireport
---


title: Search results - detail pane

text:
# Question
Title: Search results - detail pane
I realise this probably requires custom development, but curious if anyone has considered a two pane search results, where the left pane is the listing and the right pane a detailed contact record. The aim is to improve/speed up navigation for user looking at records.

# Answer
If you mouse over the icon on the left of each result row a popup comes up with more details on the contact. This does help isolating the correct record when reviewing results.
> 1 votes

---
Tags: search
---


title: CiviMail shows empty recipient list

text:
# Question
Title: CiviMail shows empty recipient list
CiviCRM 4.7.24 on Drupal

Since updating to 4.7.24, no groups appear in the recipient list

# Answer
> 1 votes
I'm not sure this was a real problem. I cleared all Drupal caches and then it worked.

---
Tags: civimail, groups
---


# Question
Title: Call to undefined function _civicrm_api3_basic_get when using CiviRepeat module
I am using civicrm 4.7.17

When I go to the page sitename/admin/config/civicrm/civirepeat, I get the error

Call to undefined function \_civicrm\_api3\_basic\_get in Event.php on line 133

I figured out that the Event.php file is located in the civicrm/api/v3 folder and the function \_civicrm\_api3\_basic\_get is defined in the file utils.php in the same folder.

Why do I get the error even though the function has been defined.

# Answer
> 1 votes
Civirepeat seems like a pretty old module that's no longer supported.

https://forum.civicrm.org/index.php?topic=3329.msg76694#msg76694

Maybe if you explain your reasons for using the module it can be done using existing features as the above forum link suggests.

---
Tags: civievent, civicontribute, civimember, api
---


title: Cron job for Multisite in WordPress

text:
# Question
Title: Cron job for Multisite in WordPress
I have a multisite WordPress setup with CiviCRM 4.7.23 and I am unable to create a successful cron job. I tried CLI with all parameters (including -s) and with no parameters but each time I get no output and CiviCRM says cron was not executed.

I tried the URL method

https://mysite.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXX

and same thing.

I tried, just for fun, the cli file via a browser and I got

> cli.php can only be run from command line.

which is at least correct. :)

The site in question is hosted on CiviHosting and the setup there is known to support both CLI and URL cron jobs for single-site setups.

# Answer
I manage one WordPress multisite instance, so I looked how cron is configured.

We use wp-cli with the CiviCRM extension to trigger cron.

Cron jobs look like:

```
11,26,41,56 * * * * /full/path/to/wp-cli --user=civicrmcron --url=https://sitenumber7.org/ --require=/full/path/to/wp-cli/civicrm.php --path=/path/to/wordpress/webroot civicrm api --timezone=America/New_York job.execute auth=0 > /dev/null
12,27,42,57 * * * * /full/path/to/wp-cli --user=civicrmcron --url=https://sitenumber8.org/ --require=/full/path/to/wp-cli/civicrm.php --path=/path/to/wordpress/webroot civicrm api --timezone=America/Los_Angeles job.execute auth=0 > /dev/null

```

Note that if your multisite instances are in a subdirectory, rather than a different domain, you can set the URL accordingly and it still works.

Also note: Some WordPress plugins can interfere with cron! That's not multi-site specific, but you can exclude plugins from loading with wp-cli either by specifying on the command line or creating a config file.
> 2 votes

---
Tags: wordpress, cron, multisite
---


# Question
Title: Current state of Household Membership signup (Wordpress)
I'm currently working on a new install of CiviCRM to manage our co-operative membership. Membership is paid annually per household - each householder additionally makes an initial one-off £1 investment of share capital which confers voting rights in the coop.

I've done a LOT of reading around household membership and I'm aware that it's an underdeveloped area in Civi - sadly we're not in a position to cover the 200-400 hours of work that Lobo suggests would be required make it work as desired.

There seem to be a few people who've crafted successful work-arounds either with organisational subgroups or using Drupal webform integration to create complex sign-up pages. However, I've also seen a number of people years later bemoaning having taken the 'household route' initially.

As I'm at the beginning of the process and some of the forum discussions are a number of years old, I'm looking for a steer on the current developments and best practice. In particular:

* Is there a recommended route for allowing online self management of family groups?
* Our preferred CMS is wordpress, does the active development of Caldera Forms integration suggest a potential route, or will we have to adopt Drupal for complex webforms?

Many thanks for any pointers.

# Answer
This question has a lot of moving parts, not all of which are clear to me here. It may be best as separate questions. I'll try to answer the parts I see.

* It sounds like you need to track the members of a household each as a separate contact. This is best with Webform-CiviCRM. However, Caldera Forms will do most of this. You can create several contacts, and create relationships between them. However, you can't take payment on the same screen (not a big deal). I'm not sure how it handles pre-populating related contacts for managing households later - you'll have to experiment. Worst case, you could sponsor the Caldera Forms devs for a lot less than 200-400 hours for that feature.
* You do NOT need to use the Household contact type if it's not important to you! You can do this with a "primary contact" who has a relationship to the other family members. This is up to you. I prefer to not use households, personally.
* You use the Relationship Type feature of CiviMember to allow family members to inherit the membership via relationship to the household (or primary contact).
> 1 votes

---
Tags: civimember, webform-civicrm, relationships, households
---


# Question
Title: Fatal error when accessing Civicrm administrator page
I am unable to access the Civi administrator section on a website using Joomla 3.7.5, Civi 4.7.23 and running on PhP 7.0. Joomla portion works fine, but when I access Components/Civicrm from the Joomla backend, I get a blank page with no error messages (although Joomla debugging is turned on). Using Firefox Developer edition's debugger the response is "Page has no sources".

I then created a new Joomla user with superuser privileges. Logged in and got the following message (screenshot attached).

Since I can't login to change settings to display all errors and turn on backtrace, how do I troubleshoot? Any help would be appreciated.

Thanks, Kate

```
Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame thrown in /home/sherida1/public_html/jgs-live/administrator/components/com_civicrm/civicrm/Civi/Core/Transaction/Manager.php on line 107

```

# Answer
You have two options for troubleshooting:

* Debug and backtrace info should also be in your CiviCRM logs, stored in the ConfigAndLog directory.
* You can enable debug and backtrace by adding these three lines to `civicrm.settings.php`:

global $civicrm\_settings; $civicrm\_setting\['Developer Preferences'\]\['debug\_enabled'\] = TRUE; $civicrm\_setting\['Developer Preferences'\]\['backtrace'\] = TRUE;
> 1 votes

---
Tags: joomla, core, php7
---


# Question
Title: Hosting CiviCRM and Wordpress on WPengine
I'm just starting a new implementation project with a client who uses WordPress and hosts currently with WPengine.com A quick search threw up some interesting comments here from @andrew-hunt that don't bode well.

Does anyone have direct experience (good or bad) of running CiviCRM 4.6.x on WPengine's platform? Should I be advising my client that we need to find an alternative hosting provider?

# Answer
> 2 votes
I have a couple of test sites running on WP Engine. Mostly to fix an issue that came uo in CiviCRM 4.7.x. I have installed and configured 4.6 on WP Engine. My only issue had been they used to have many sites on php 5.3.3 but I am mostly seeing 5.5 these days. I know CiviCRM has some issues with HHVM, so you would need to verify that your client site is not running that. I have not used WP Engine in production yet.

# Answer
> 2 votes
I would not recommend it. We found that the WPEngine platform and Civi weren't going to work the way we need them too. We tried this under their P1 plan. In sum, just too many restrictions, which is totally understandable for WPEngine to make WP work so well there.

\*Max Execution time for imports and other server setting restrictions (if you are on shared hosting plan then this would be limited to 60s.)

\*Had issues getting cron jobs setup

\*System status page did not show

\*Weird behavior with not showing some Civi content for ACL users on some pages. Had to give permission in User Role Editor WP page and post access as workaround.

Have to let their platform specialize in what they are good at. I've absolutely loved the WPEngine platform; nothing better for WP. But just not for Civi.

We ended up keeping our CMS multisite at WPEngine and using Civihosting for a WP + CiviCRM multisite mirroring each other.

---
Tags: wordpress, hosting, hosting-providers
---


# Question
Title: CiviCRM events pay later error - Undefined index: event
I'm getting an error on submitting events where "pay later" is selected as payment method. The page times out - if I select a different payment method the next page loads OK.

This is the error I'm getting

> Notice: Undefined index: event in CRM\_Core\_Payment\_ProcessorForm::preProcess() (line 78 of xxxxxxxx/sites/all/modules/civicrm/CRM/Core/Payment/ProcessorForm.php).

Has anybody else experienced this?

# Answer
Welcome to civicrm stackexhange!

Your first step is to try replicate this on - http://dmaster.demo.civicrm.org

Configure things just like you have in your own civicrm.

And if you find you get the same error then amend your question with details/screenshots so that we can reproduce next.
> 1 votes

# Answer
I can't reproduce this on the civi sandbox. But I don't now why 'event' is not defined. I have these logs in drupal : Référent http://xxxx/index.php?q=civicrm/contact/view/participant&reset=1&id=2825&cid=6632&action=update&context=participant&selectedChild=event Message Notice : Undefined index: event dans preProcess() (ligne 78 de /xxx/xxx/xxx/sites/all/modules/civicrm/CRM/Core/Payment/ProcessorForm.php). As workaround I've just updated line 78 : if (empty($currency) *&& !empty($form-\>\_values\['event'\])*) {
> 0 votes

---
Tags: civievent, paylater
---


# Question
Title: Allow duplicate contacts with the same email
On Civi 4.7.22 and Wordpress 4.8.22

Here is the Scenario: Jane Doe uses her email address to signup her son Joe Doe at 123 Red Road Then Jane at 321 Blue St. decides to become a member herself, using the same email address she used to signup her son.

Instead of creating separate accounts for Jane and Joe, Jane's information overwrites Joe's information and suddenly Joe doesn't exist to us anymore. What rules do I need to change to allow the same email address to be applied to different members?

I checked the box in the profile settings to allow duplicate contact to be created. That did not make any difference. Even when I check "Issue warning and do not save" it still goes through and overwrites the information of the first person.

This is a scenario that happens often in our organization, so I hope there is a solution to this.

# Answer
You will want to adjust your Deduping and Merging settings (top menu \> Contacts \> Find and Merge Duplicate Contacts). See https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/ for info.

If you're using the default rule that comes when Civi is installed, any contact with the same email will get merged automatically as you're experiencing. It wasn't good for us either because we have so many families and couples who share email addresses.

You will want to 'soften' your Unsupervised rule (the above link has instructions on how to adjust the rules). We changed our Unsupervised rule to take names and birth dates into consideration as well (see image below). We do get the occasional duplicate contact (Robert Smith with rsmith@example.com is technically not a duplicate of Bob Smith with rsmith@example.com according to our rule), but we'd much rather have easy merges to do than the much more difficult task of 'un-merging' two contacts.
> 6 votes

---
Tags: duplicate-contacts
---


title: Using Maps in CiviEvents

text:
# Question
Title: Using Maps in CiviEvents
I am using Civi 4.7.22 on WordPress 4.8.22 The Civi Tutorial says that Google no longer requires an API to use maps in civi. I am creating an event complete with an address location. All boxes to display the map are checked. Google Maps is select in Mapping and Geocoding. Yet the map is not displaying on the event page. Am I missing something?

Thank you.

# Answer
> 0 votes
Problem solved. Latitude and Longitude must be enabled. If you attempt to create the event before latitude and longitude are enabled you will have to start over after it is enabled.

# Answer
> 0 votes
It might be worth checking your browser console (right-click, inspect, console in Chrome) to see if the Google Maps API is returning a useful error / message when loading the event page.

---
Tags: civievent, map
---


title: Using event.balance token

text:
# Question
Title: Using event.balance token
I'm having trouble getting the event.balance token to display properly in emails. I've tried {event.balance} (which breaks Smarty so it doesn't send the email) and {$event.balance} (which is returned with \[blank\]). Is there some smarty capture or other declaration that I need to do?

My test participant shows $300 paid of $1000 total fee, so I am expecting the token to resolve to "$700.00"

Civi 4.7.21 Joomla 3.7.5

# Answer
This Fuzion extension would be worth checking out, and if it doesn't provide the required token, could have a PR with the required code, which might be better than a standalone extension for this problem
> 2 votes

# Answer
First, tokens do not contain $ sign so it should be `{event.balance}` but :

1. you should use the token dropdown list to insert the code when possible to avoid problems
2. the only way to use event tokens is in schedule reminders apparently - it could be good to have them when doing letters from the participant search but it doesn't seems to be implemented yet
> 0 votes

---
Tags: civievent, tokens, partial-payments
---


# Question
Title: CiviVolunteer 2.2 - problem with missing profile
I installed the latest Civivolunteer 2.2 with 4.7.24. First time, not an upgrade. When I click the 'Volunteers' tab in an event I get the error message 'The requested profile (gid=36) is disabled OR...' (etc etc). I tried uninstalling, clearing all caches and re-installing but still a problem. The profile with gid of 36 does not exist. If I could figure out how to create a profile with gid of 36 I would but can't see where they are stored in the db - another user fixed the problem this way. How can I fix this?

# Answer
> 1 votes
Profiles are in the table civicrm\_uf\_group, and the table civicrm\_uf\_field contains the relevant fields for the profile. This does not answer your main question, but may help you workaround.

---
Tags: civievent, 4.7, civivolunteer
---


# Question
Title: How to get new or updated CiviCRM entities (Memberships) indexed by Drupal Search API?
Based of the terrific guidance provided in this blog post we have built a faceted directory of our business members using CiviCRM Entity, Search API, and Facet API.

To accomplish this, we have created an index of the CiviCRM Membership entity which we connect to the member's contact info and some custom fields through Search API's "Related Fields" functionality. This approach is described in the comments to the aforementioned blog post.

The directory is functioning, but we have experienced a couple of issues

1. New CiviCRM Memberships aren't getting indexed; and
2. Updated CiviCRM Memberships aren't getting marked as requiring re-indexing.

If we manually re-index the entire index, the changes to the updated CiviCRM Memberships get picked up, but the new CiviCRM Memberships still don't get indexed. In order to get the new CiviCRM Memberships indexed, we have to disable the index and then re-enable it. In the short term, these workarounds work, but would like to figure out what the issue is.

Also, in attempting to set up Rules to re-index items when "related fields" are updated (as described in the Search API documentation), we've noticed that we're not able to access the CiviCRM Membership entity to apply Search API's re-indexing action.

So, would be grateful to hear if anyone has run into similar problems (and hopefully any solutions), or if anyone has thoughts on where to start looking for a solution.

# Answer
> 1 votes
The module Civicrm Entity Search API which comes with CiviCRM Entity now supports this, as of 2.0-beta10. Russ took my comment and contributed back to the project. Thanks Russ!

---
Tags: civimember, search, drupal-views, civicrm-entity
---


# Question
Title: New install on WP 4.7.4, CiviCRM 4.7.18, System Status: Error
I am a newbie to CiviCRM. I have installed CiviCRM 4.7.18 on WordPress4.7.4 and it failed.

The db password for CiviCRM and wp admin password does not contain any special character.

Everything on installation page was green with green checks.

After I pressed "check requirements and install", I did see successful installation message then the page redirects to

`/wp-admin/?page=CiviCRM&q=civicrm&reset=1`

And I see the following:

> *CiviCRM Home*
>
> System Status: Error
>
> Cron Not Running
>
> Configure Default Mailbox
>
> Complete Setup
>
> View details and manage alerts
>
> Configure Your Dashboard Refresh Dashboard Data
>
> Welcome to your Home Dashboard
>
> Your dashboard provides a one-screen view of the data that's most important to you. Graphical or tabular data is pulled from the reports you select, and is displayed in 'dashlets' (sections of the dashboard).
>
> Access Keys:
>
> Powered by CiviCRM 4.7.18. CiviCRM is openly available under the GNU AGPL License.
>
> Download CiviCRM. View issues and report bugs. Online documentation."

Using my backup I made before installing CiviCrm I have tried again this time I changed permission for civicrm and files folder to 777 from 755, thought that was the problem.

> Create the /wp-content/plugins/files/ directory and ensure it is writable. CiviCRM uses this directory for temporary and uploaded files. (Source: https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress#InstallingCiviCRMforWordPress-2.WordPressInstalled)

Since I have a backup I can restore to and also delete and re-create sql db/user, I do not mind going at it again, but I think I might be missing something and it's better to know what and try again with the possible solution.

Any help/suggestion is appreciated.

Thanks,

Usman

# Answer
> 1 votes
I would recommend to get the CiviCRM package from sourceforge, the link is here:

Also please make sure to follow the installation instruction detailed here for installing CiviCRM in wordpress CMS.

I installed WP 4.7.4 and civi 4.7.18 on local and it got installed smoothly, yes it do gives notifications that you mentioned but that's expected:

1. Cron Not Running

Configuring cron on your server is necessary for running scheduled jobs such as sending mail and scheduled reminders.

2. Timestamp Mismatch
3. Configure Default Mailbox

A default mailbox must be configured for email bounce processing.

4. Complete Setup

Please enter your organization's name, primary address, and default FROM Email Address (for system-generated emails).

# Answer
> 0 votes
Hello Usman and Patrick - you managed to finish the install so your databases should be in place. Usman does your URL say just "/wp-admin/?page=CiviCRM&q=civicrm&reset=1" ? It should be preceded by your domain, masjidusman.ca, right? Make sure you have url-rewriting enabled - you should have a 'hidden' ascii file, .htaccess in your WP home folder and it should have something like RewriteEngine On RewriteBase /yourDomain/ ... in it. Make sure in your wp-content/plugins/civicrm/civicrm\_settings.php file the baseURL says that, too. Your files folder perm doesn't need to be 777, 644 is ok. You both can try clearing cache files (/files/template\_c) where all the compiled Smarty templates are. And check if your extension, templates\_c etc. are under files/civicrm - they could be under plugins/uploads. Then if you finally can see the dashboard menu, check Directories and Resource Urls. And, finally, Patrick re the timestamp mismatch, check the timezone set in your php.ini file, you can google it. If your install is on linux which most likely it is, you should be able to configure/use just 'mail' or sendmail in Administration SMTP Mail settings.

---
Tags: wordpress, error, install
---


# Question
Title: Link to User record, via View Contact -> Actions -> User Record gives Page Not Found (404). Is this a bug?
We are running CiviCRM 4.7.23 + Drupal 7.56.

If we try and access one of our Drupal User Records via the CiviCRM Contact record (View Contact -\> Actions -\> User Record) we get a 404 "Page not found" error from Drupal.

In trying to debug this, we've noticed that the URL generated by the "User Record" link in CiviCRM is like this:

```
http://oursite.org/user/XXXX&cid=YYY

```

Where XXXX is the Drupal User ID and YYY is the CiviCRM Contact ID. If I strip off the &cid=YYY part from the URL, the link works and takes me to the correct User Record.

So, is this a bug, or is our site misconfigured somehow?

# Answer
I just tested on a site. Clicking the link as described above i get sent to

user/2&cid=39941

and that page shows.

BUT

if instead I just click on the Contact ID / User ID | 39941 / 2 that sits just under Tags on the Contact Summary screen

I get sent to

user/2 and that sounds like it might work in your set up

Does your Summary Screen not show that? (ie I wonder why you are not using that rather than going via Actions which is an extra click)

I can't explain why the link with &cid=YYY is failing for you
> 3 votes

# Answer
I can confirm that on all sites I have access to that this is an issue. I poked around the code and can not figure out why the cid is being appended to the url I'm going to submit this as a bug
> 1 votes

# Answer
I just found this error in two client sites and testing in CiviHosting demo by selecting user record for demo contact has the same error. it looks like the url is missing a / before the &. When the missing / is added to the url it goes to the correct page.
> 0 votes

---
Tags: drupal, user-account
---


# Question
Title: How can I allow a participant to enrol for an event more than once?
At our nightshelter we have some volunteers that perform more than one role - e.g. as a van driver and also as kitchen staff. To capture volunteer hours we sign volunteers in to the nightshelter event (using a webform), and would like to sign volunteers like these in twice - once for each role. Using a matching rule in the webform that allows duplicates I hoped this would be possible, but only one signin is allowed. Is there a way to allow a participant to be signed in to an event twice, with different roles? Using 4.7.24 with Drupal

# Answer
> 1 votes
Do you already have multiple roles supported for your events?, i.e via an extension like: https://civicrm.org/extensions/event-registration-based-participant-roles

A solution that would not necessarily be graceful would be to create multiple events (one for each role) and use the form to hit the different events based on the role.

---
Tags: civievent, duplicate-contacts
---


# Question
Title: HOWTO remove inherited membership when corresponding relationship is disabled or deleted?
We are testing out ideas to create a script to disable a relationship for a list of contacts, as that doesn't seem to be an option under Actions from a Search output list.

To get a feel for what we want to do, we have a script that generates an SQL query to disable the relationship for a list of contact\_id's. Works fine.

However, this relationship is also tied to an inherited membership. That membership is not deleted, so we wanted to construct a parallel SQL query to delete the corresponding membership.

Can someone explain the database structure that allows us to link the two? In the civicrm\_membership record, we see the membership\_type\_id that would tell us which record(s) are possibilities for the ones to delete. However, our members may have more than one corresponding inherited membership with the same relationship\_type\_id, because it is common for members to belong to two or more organizations, so they may have 2 or more memberships that are distinct and inherited.

A side fact is that the UI action on an individual view to disable or delete the relationship does ALSO remove the membership, so we know it is possible! We are essentially trying to automate this action for a list of contacts.

Another odd fact is that, if we delete the relationship, but still have the dormant membership, if we add the relationship back, then we have TWO memberships in the database, each related to the same organization. Their civicrm\_membership records are identical. (If we do it again, we of course now have 3 ;) ) I was hoping there would be a column which would be NULL except for inherited memberships, where the column would contain the corresponding contact\_id for the relationship. The membership END DATE provides a "weak" clue, but it is possible that 2 parent organizations could have the same END DATE.

I noticed a JIRA issue that is similar, https://issues.civicrm.org/jira/browse/CRM-16087. But that was evidently solved.

I also ran the Scheduled Job to Update Membership Status, hoping it would remove inherited memberships when the corresponding relationship is disabled or deleted, but that didn't seem to have effect.

Any help in understanding the full linkage for inherited memberships within the database is appreciated. We've been running CiviCRM for about a year now and are finally digging into some of the internals. Our ultimate goal is to provide an addition to the core or an extension so that the Action of disabling a relationship (and removing any inherited memberships based on that relation) is an available Action when viewing any list of contacts in Civi. It is too painful to disable a list of hundreds manually via the UI, although it works.

running Civi 4.7.22 on WP 4.8.2

# Answer
> 1 votes
As you are discovering, the interactions between these various features are complicated. It is far preferable / safer / easier / more likely to work to use the API to disable these relationships rather than trying to do it via SQL.

If you disable a relationship via the API and it does not handle the inherited membership then that is a bug ... but I have just tried it via API explorer and it works as expected.

```
$result = civicrm_api3('Relationship', 'create', array(
  'sequential' => 1,
  'id' => 49,
  'is_active' => 0,
));

```

If you want to do this as a script you could use the snippet above with cv

If you want to go a step further and add it as a search action then the existing 'Add relationship' actions provide a starting point.

# Answer
> 1 votes
After trolling around some more, the field I was looking for IS in the membership table, owner\_membership\_id. That is non-nil for inherited memberships. You can follow that key to the parent organization's membership record, and then from there, determine whether that is the organization for which the membership should be deleted. For maintaining history, you can just cancel the individual's inherited membership instead of deleting so it will show up under past, inactive memberships. If done properly, there will never be more than one inherited, active membership for a related (individual, organization) pair unles the organization subscribes to multiple memberships at once.

---
Tags: civimember, relationships
---