# Question
Title: How can I show a list of events with summaries and either a register link or message saying they are full?
We are collecting registrations for a conference and have a number of optional workshops on one of the afternoons. I want to create a summary page of available workshops for participants with a link to register or a message if the workshop is full.

Using Drupal 7 as CMS.

# Answer
As with many problems with Drupal integration civcrm\_entity is the answer.

Install the latest civicrm\_entity module for Drupal in the usual way (Recommend using Drush if you can).You'll also need to enable the civicrm\_entity\_views\_extras sub module.

We'll be using drupal views to display the results so if you have your Drupal and Civi in different databases then make sure you have civicrm cms integration configured. Go to Civicrm home and choose `Administer->System Settings->CMS database integration`. This will bring up a page of PHP code to paste into your current drupal settings.php to allow drupal views to fetch civicrm data. You might need to change permissions on settings.php and it's enclosing folder to edit the file, remember to change them back.

Now, create a new view to show "civicrm events", click "Create a page" and choose "unformatted list of fields" as Display format.

This will show all events in the system. For our purpose we only wanted to show events on a certain afternoon, so we added a "filter criteria" to only show events starting in the correct timeframe. Worked for us but you may need to find other filtering techniques for other purposes.

Add fields for all the information you want to display. Title, description etc.

The field that does the magic is called "Civicrm Events:event is full" this will return a 0 if there are spots left or 1 if the event is full.

So now your view knows when an event is full, to change what is displayed to the user you'll need another module—views conditional—install that and reload the view editor.

Add a views conditional field below all other fields and set it up so it checks if the event is full field and returns either the "registration link" or a custom message.

This should now be working, but you're still seeing the "Registration link text field" and "event is full" field above your conditional output. Click to change the settings of each one to "exclude from display" and check that "registration link text" is linking to where you want it. The setting sometimes seems to reset when I save the view.
> 4 votes

---
Tags: civievent, drupal-views, registration, civicrm-entity
---


# Question
Title: How to add a 'Confirm Email Address' to an event registration form
I want to add a 'Confirm Email' field in an event's registration form, that is not saved as an extra field, but just acts as a validation function to the event's form submission.

Aside from writing custom JavaScript to do this as a hook, is there an easy way in CiviEvent?

# Answer
> 3 votes
If you’re on Drupal create your event registration with webform\_civicrm module and you can do just that

Here’s an example:

---
Tags: civievent, registration
---


# Question
Title: Set the Webform-CiviCRM Contribution Amount to a parameter value
A client is using webform-CiviCRM for a contribution page. Due to pro-rating and other factors, each contributor needs to pay a unique amount - and thus the webform has the exposed "Contribution Amount" element that can accept an amount from a user.

How can I pre-fill this Contribution Amount using a custom field value? The webform Default Value can't be set to a token for a custom field that has the amount (returns "This is a CiviCRM currency field. Default value must be a number.", even if the field is an integer or a number.

It might also be possible to attach the $ amount to the URL as a parameter?

# Answer
> 3 votes
Just adding to this -\> this is now possible (since today: many thanks for Fuzion for re-asking this question and helping to see it through!); we had to relax a form\_error that was preventing tokens to be injected in the default field for contribution\_total\_amount;

You can now do:

```
/webform-civicrm-example?civicrm_1_contribution_1_contribution_total_amount=120

```

and if you have configured your Contribution Amount -\> default as:

```
[current-page:query:civicrm_1_contribution_1_contribution_total_amount]

```

Then it will fetch that $120 -\> and give you:

# Answer
> 2 votes
You can try to add the value in a URL to prefill it (if that is what you are asking). If the URL is: `/paymentform`

I think you could then send a URL such as `/paymentform?amount=25` with a default value in the amount field of `[current-page:query:amount]`

*Aside:* If you are sending these URLs from a CiviMail mailing (or sending an email to a contact through CiviCRM) and have the amount information in a custom field, you could prefill the `amount` value in the URL via a token for that custom field value.

---
Tags: webform-civicrm, contributions
---


# Question
Title: Install error when generating a new extension module
I'm trying to generate a new extension module following instructions from the docs: https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-module However, when I run the proposed command to generate the skeletal extension

$ civix generate:module "com.example.myextension" --license=AGPL-3.0

I get the following:

```
Initalize module com.example.myextension
Write com.example.myextension/info.xml
Write com.example.myextension/myextension.php
Write com.example.myextension/myextension.civix.php
Write com.example.myextension/LICENSE.txt
Write com.example.myextension/README.md
Write com.example.myextension/images/screenshot.png

Refresh extension list for "http://localhost/compucorp/"
Enable extension (com.example.myextension) in "http://localhost/compucorp/"? [Y/n] Y
Enable extension (com.example.myextension) in "http://localhost/compucorp/"
Install error: Unknown extension: com.example.myextension

```

The extensions directory is created on the root of the CMS (Drupal), and the new extension directory com.example.myextension is created successfully and seems to have right permissions. What can be the problem?

I tried refreshing extensions list from the user interface of CiviCRM and the newly created extension does not appear on the list.

Thanks!

# Answer
Check the `Extensions Directory` specified at `Administer > System Settings > Directories`. Your extension needs to be in that directory. If not, either move your code or change the setting.
> 1 votes

# Answer
You should run `civix generate:module "com.example.myextension` in directory where all the other CiviCRM modules reside - `/your_drupal_project_root/sites/all/modules/civicrm/ext` for Drupal 7 + CiviCRM 4.7. After that do `cd com.example.myextension` and there generate all the pages, menus etc for your extension. In other CMSes the full path may vary, but anyway it must be `civicrm/ext`.
> 1 votes

---
Tags: drupal, extension, civix
---


# Question
Title: Setting up CiviCRM with Multisite Wordpress
Thanks in advance for any help or insights, I have an existing WordPress multisite install and we would like to have CiviCRM installed on all three sites but sharing the same database. I have followed the civimultisite documentation and the checklist posted here, but as soon as I hit the \[install\] on the 2nd site, I get this error: *"Found installation Canary” while installing CiviCRM"*. I have edited the civi settings php file adding the domains of the other 2 site per the documentation but no joy yet, any help will be deeply appreciated!

# Answer
i do this with a WPMU and civiCRM and it work fine. I m french, i dont speak english but i do a tutorial in french, i can give you this doc, my mail is pikerez@laposte.net. Goodbye
> -1 votes

---
Tags: multisite
---


title: Does CiviCRM have servers in Canada?

text:
# Question
Title: Does CiviCRM have servers in Canada?
Does CiviCRM have servers in Canada and is it possible to only store your information on them?

# Answer
CiviCRM is unlike other online CRMs in that you can host it yourself, rather than rely on the corporation that writes the software to host it. So you can host it wherever you like. This is a major selling point for jurisdiction-sensitive organizations!

If you don't want to host it yourself but would prefer your vendor handle it for you, that's also an option. Karin's answer is a good example of a Canadian provider who can host your CiviCRM site on Canadian servers.
> 9 votes

# Answer
As CiviCRM partners/IT Consultants in Canada we understand the importance of this and run all our CiviCRM projects for all our clients on private/dedicated servers in Canada (in data-centers in Toronto and in Montreal);

We've even had requests from US organizations to host with us up North here :-)
> 3 votes

# Answer
@Jon G's answer is good. Most CiviCRM installations use a VPS (virtual private server) and you can arrange for this yourself with Canadian hosting providers. The RAM, CPU and disk requirements will vary based on how much data you have and how many users; ask for advice here on StackExchange if you need help.

I tend to recommend hosting with Canadian-owned providers in Canadian data centres to be extra safe.

I would add that some of our Canadian clients choose to take advantage of the lower prices of servers in the US.
> 1 votes

---
Tags: evaluating-civicrm
---


title: Different Contributions if a member

text:
# Question
Title: Different Contributions if a member
Is it possible to configure a contribution page or amount to be different if the person is a member?

For example, members pay $20 and non-members pay $25 as a contribution (its a separate registration fee, not a member fee in that sense).

Thanks Norm

# Answer
Yep - you can use CiviCRM Discount extensions for that; however - for registration fees -\> you would need to use CiviEvent. Discounts don't work on Contributions/Donations;
> 1 votes

---
Tags: civicontribute, civimember
---


# Question
Title: How to exclude a specific link from a Mailing's statistics
I send a newsletter via CiviMail and in it there is a style link to load a Google font. This link gets many hits in the Mailing report, but has no relevance for me. Is there a way to exclude this specific link from the Mailing statistics report?

# Answer
> 2 votes
I didn't know you could use webfonts remotely in emails (or, it hadn't occurred to me). Here are some ways you could approach this - pick one! (Or more.)

## Modify the recorded data

The "visit" records are stored in DB table `civicrm_mailing_event_trackable_url_open` and the URLs themselves are in `civicrm_mailing_trackable_url`. By removing matching entries from `civicrm_mailing_event_trackable_url_open` you'll zero those numbers off the top of your report.

Don't remove the entries in `civicrm_mailing_trackable_url` or the redirects to webfonts will stop working, breaking the font in future views.

## Modify the recorded data (automated)

Once you have the query for the above, you could add a "cleanup" job to remove clicks where the URL matches (say) `/.*(css|woff)$/`. This would mean your reports stay clean - but cleanup jobs are a "code smell" IMO, so it's not a great solution.

## Change the email - embed the font

You could potentially base64 encode the webfont into the email (this should increase the number of people seeing it in the correct font). That would remove the remote request entirely, but it won't work for an email that has flown!

## Change the email - don't use a font

It's an option ... obviously you went to some effort to put a font in, but I'll include this for completeness :)

## Exclude `.(woff|css)` URLs from your reports

You could add an extension which excludes these types of URLs from display in the reports. This feels like a bad approach (you still end up tracking those URLs, slowing down the email, and filling your DB with data you don't need - but then hide the data from your report). But it's possible and might be less work than getting a fix into core, so again ... for completeness.

## Modify CiviCRM - only track clickable URLs

It seems like CiviCRM is tracking any URL pattern, which suggests civicrm looked for something like `/['"]https?://(.*)['"]/` \- but could perhaps only be looking for *links*. You could gather some data on this to file a feature request.

* Does CiviCRM add link tracking to all URLs in emails, or just some?
* Does CiviCRM add link tracking to `<link href="style.css" rel="http://example.org/style.css">` but not `<style type="text/css">@import http://example.org/style.css</style>`? (Maybe it's the href= that confuses Civi?)
* ... ask lots of questions, propose an improvement, consider other use cases, help make it happen!

---
Tags: civimail
---


# Question
Title: How do I install the "Birthday by Month" extension in CiviCRM 4.7.31
I am a newbie and here's my first question - how do I install the Birthday by Month extension in my CiviCRM? It is not showing up in my list of available extensions. I am on CiviCRM 4.7.31

# Answer
> 1 votes
So that means it's not officially tagged as compatible with 4.7.x - and/or not reviewed (requirement for automated distribution);

# Answer
> 0 votes
Birthday by Month extension has not been updated to work with latest CiviCRM versions and if you look at the source code here, it's only compatible with 4.2.

On a general note, extensions can be installed via CiviCRM Manage Extensions page, but that list is limited to native (CMS-independent) extensions and subjected to reviews. However, you can manually install an extension by copying the source files to the respective extensions directory (dependent on your directory settings).

Please refer CiviCRM documentations for further information https://docs.civicrm.org/sysadmin/en/latest/customize/extensions/

# Answer
> 0 votes
If you want an extension that will list birthdays in 4.7 then 'Systopia birthdays' works. It can be found here I've used it in 4.7.30 so it should be OK

---
Tags: extension
---


# Question
Title: Easiest way to redirect an event registration confirmation to another page
After event registration, on the confirmation page, we simply want a new window to open or for the page itself to redirect after 5 seconds to another page. What is the best way to do it?

# Answer
Depending on the exact flow you need you may find this Fuzion extension offers what you need as it provides fields eg on an Event where you can specify the page to redirect to after submission.

Note it has a dependency on another Extension
> 2 votes

---
Tags: civievent, redirect
---


# Question
Title: Create User Account profile creates error Undefined index: location_type_id in CRM_Dedupe_BAO_Rule
Drupal 7.59 Civi 4.7.27 Webform 4.17 Webform CiviCRM Integration 4.20

We are in the process of switching over from WordPress to Drupal for our CMS.

With the /user/register, when you click Create Account it does create a Drupal User and a Civi Contact. However you get the following error message.

Notice: Undefined index: location\_type\_id in CRM\_Dedupe\_BAO\_Rule-\>sql() (line 96 of \*/sites/all/modules/civicrm/CRM/Dedupe/BAO/Rule.php).

Where do I edit this form to change the location type (I am assuming it is the address that is mislabled)?

# Answer
Since you talk about /user/register (which is not a drupal webform but a core drupal form) then this should be a Civi Profile and that is where you would edit the Location Type.

Your screenshot shows you have a Profile called "Name and Home Address" -

have a look for 'edit' on one of the fields in the Profile eg 'Street' and there you should be able to specify the location type of 'street'
> 1 votes

---
Tags: profile, user-account
---


# Question
Title: Activity Permission - Prevent User to View Other User Activity - CiviCRM
I'm asking about activity permission in CiviCRM. I've tried to search by default functionality to prevent user to view other user activity but i guess there is no feature to do this.

This is the case that I want. Example : There are 5 users in CiviCRM : Barnie, JohnDoe, Michelle, Danielle & Felix. User JohnDoe create new activity type "Phone Call" with contact user Danielle and assign to user Barnie.

What I want is : While user Felix login into system, while he find activities, that phone call activities above will not showed to him.

Can you show me where is the code to execute query to prevent current user to view activity(s) that's not related to him/her?

# Answer
I think this will require a custom extension to extend the ACLs such that the only folk who can see an Activity are those who are an Activity Contact (or who have View all Activities permission).

AFAIK this sort of permissioning is currently only provided through CiviCase but you have already indicated you want this as a new feature for Activities.

Search existing Extensions in case someone already developed this.

If you want assistance to build such an extension I suggest you try one (but only one) of the following so no one growls about cross-posting

or if you want professional support you can find Partners such as Fuzion listed here.

Another approach, if you were using Drupal, and were interested in keeping most folk outside civicrm and have them interact mostly through Views and Webforms would be to build a View which would limit the Activities displayed to the Current User to those where they are a 'contact' on the Activity.

We do this quite a lot for clients who have lots of users but few who really need to get deep inside civicrm and bounce folk between using Views to find info and then Webforms to add/update.

Hope that helps.
> 0 votes

---
Tags: activities, evaluating-civicrm, activity
---


title: Mosaico Left Aligns All Text

text:
# Question
Title: Mosaico Left Aligns All Text
Using Drupal, Civi 7.30, Mosaico 2.0 Beta 3

Whenever we center align text - its shows up as such in Mosaico, but then will left align in html preview and when actually sending email. Also shows up in source as correctly aligned in mosaico, but not when sent.

Any idea why this is?

Issue on GitHub

# Answer
> 3 votes
If you select your text and put it into a DIV block and then choose the alignment it should be fine. I have found the the paragraph block does not hold the alignment.

Hope this helps

# Answer
> 1 votes
The only way I have been able to center is by choosing a block that is a section title. I usually have to reduce the font size. I too would love to center something when using the 166 x 90 3 in one block. Have not figured how to get it to hold the centering under each picture.

---
Tags: civimail, mosaico
---


# Question
Title: Divide recurring contributions between financial types
I am working on the following scenario. The organization wants to offer anyone that signs up to contribute monthly gets a membership for $100. So if they sign up to donate $50/month the first $100 is the membership dues (non-deductible) and the remaining $500 for that year is considered a donation (deductible).

I have setup the contribution form with a membership type that renews monthly and auto renew is required. That takes care of the payments.

Anyone have an idea on how to record the donations after the initial $100 as a donation that is deductible? It is important to provide the donor a statement at the end of the year for tax purposes.

Any thoughts would be great!

The site is in WordPress 4.9.5 with CiviCRM 5.0.

# Answer
You might want to configure a price set with two line items, one for the membership and one for the donation. You want them to be monthly recurring, so that after 12 months they've paid for the $100 membership: you'll come close with $8.33 /month.

Alternatively, you can create an extension to do this. We'd be happy to help with that.
> 1 votes

---
Tags: civimember, taxes, donations
---


# Question
Title: Log table: nativecode=1118 ** Row size too large. You have to change some columns to TEXT or BLOBs
Pretty strange, since column mentioned is already of type TEXT. Full error message:

```
 [debug_info] => ALTER TABLE `civicrm_logs`.log_civicrm_value_grants_external_application_45
MODIFY  `project_outline_673` varchar(4000) COLLATE utf8_unicode_ci DEFAULT NULL
[nativecode=1118 ** Row size too large. The maximum row size for the used
table type, not counting BLOBs, is 65535.
You have to change some columns to TEXT or BLOBs]

```

Appears after each security update right at **drush cc** step. No visible harm (excluding, may be, Change Log records at Contact Tab, which are in a very base format now,mean only name and date, no further details, but not sure if it's relevant).

# Answer
> 0 votes
It turned it is an issue related to custom fields length settings and how CiviCRM works with MySQL at log tables creation. Simple put, CiviCRM takes custom field length and passes it to MySQL.

CiviCRM throws an exception in case if existing data length exceeds custom field length than. Field length change in MySQL won't work since CiviCRM overrides this at each update.

We've fixed this by increase custom field length via Civicrm UI. Debug message (or kind of an extended explanation of what happens) would be nicer instead of MySQL *Row size too large* message though, since it is not exactly a MySQL issue, but is something caused by CiviCRM settings.

# Answer
> 0 votes
The column mentioned is of type varchar, which is different from text.

Varchar data is stored differently than text (which gets a level of indirection so it's not filling up the individual row data).

Sounds like you're creating a lot of custom field data.

# Answer
> 0 votes
I've run into the same error and to Alan's point above, yes we were creating a lot of custom fields (in our case we feel warranted.) Our solution was to lessen the database length from the standard 255 in alphanumeric fields where we knew the maximum number of characters that would be stored. In that manner we had enough room in the row to add a few more alphanumeric (varchar) fields.

# Answer
> 0 votes
Also worth noting that this problem can affect sites that use multilanguage since iirc the translated versions of some entities are recorded in the row and hence adds to total row size

---
Tags: mysql, logs, logging
---


# Question
Title: Managing & reporting Loans or Microloans to org from individuals?
Our organization accepts loans of $1000 or more from individuals and repays them incrementally with interest. What would it take to integrate the management, tracking and repayment of these loans with our existing WordPress-deployed CiviCRM system and data?

A few things to keep in mind:

* Each loan should be tied to either an Individual or to an Organization
* After our org (manually) accepts a loan offer, lender should be able to transfer funds to our merchant account via credit card or bank card
* Payments (by check) to lender would be entered manually by user
* Basic columns should include user\_unique\_id, Loan ID, Interest rate, Term, Creation date, Principle and Current balance
* Each Loan ID should be tied to a record of payments that includes date, check number and any other transaction-specific data for each payment

Is anyone else using Civi to manage incoming loans, and if so, how're you doing this? Or, is anyone interested in developing a new extension (i.e. Loans Component)? What might that cost?

# Answer
You can add Custom Contribution fields (on a per 'Contribution Type' if necessary) hence if you need fields that show Interest Rate etc you can do this via the UI.

I am unclear if you need the user\_unique\_id since the civi 'internal id' might do the required. Ditto for 'creation date' etc as these might be data that core civicrm handles anyway.
> 1 votes

---
Tags: wordpress, extension
---


# Question
Title: Participant's Notes is not available in Reports
I use Civi 4.7.27 on Drupal.

In the edit event registration dialog for a participant, there is a field for 'Notes' about this participant.

How can one add this 'Notes' field in a participants report? It does not appear in the 'Columns' tab of the report.

# Answer
The approach we take in most installs is to add a participant custom field called something like 'registration notes'. This field can also double as a special request field that we use on front end registrations if you like. Then in reports you can have the user's requests and internal notes in the same column.
> 2 votes

# Answer
Yes - that field is not there in stock CiviCRM; When I run into this I usually install Fuzion's Extended Reports extension. When the field is still not there in any of the Extended Report templates, then I add a field/PR for that Extension.

Here's an example of when I wanted to add in a handy link to the participant record and also add in the Source field: https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/pull/55
> 1 votes

---
Tags: civievent, civireport
---


# Question
Title: CiviMail is only sending to half the recipients
We had a mailing go out to 231 recipients, and it completed within the same minute it started. Looking at the report today, it shows that only 131 were successfully sent, the others all show as "unknown." I looked into /var/log/mail.log and can confirm that I don't see any lines of trying to send mail for those contacts that show as unknown. I also see records in the civicrm\_mailing\_event\_queue table for what I believe are the same contact\_ids that are unknown. Not sure that is related.

CiviCRM is set up to use the standard php mail() function.

I'm at a loss of even where to look for the issue. It just seems like CiviMail stop trying to send or something. Is there somewhere I can look to find some error? Some kind of limit we reached?

# Answer
Some pointers on how to debug this a bit further. Links are to the CiviCRM demo site - visit http://dmaster.demo.civicrm.org/ and log in. (WordPress / Joomla URLs will differ.)

# Check output of "Send Scheduled Mailings" scheduled task.

This is the task which delivers CiviMail messages. It's executed from cron regularly, and there's a log visible at the URL above ("View job log" for "Send scheduled mailings"). Check if there's any output there. (If there are no job log messages, it's not getting executed!)

# Check your `cron` setup

CiviCRM and CiviMail depend on `cron` \- scheduled jobs triggered by the system. A single CiviMail may take several `cron` runs to deliver all the emails. This task should be executed by the system somehow. The task will be run in the console and may generate output (success or failure). It should be executed as the webserver user for filesystem permissions, and ideally set up to capture output so you can investigate if it's not working as expected.

# Investigate your mailserver logs

Use `tail` / `grep` etc to observe the mailserver logs and see which addresses get messages queued for them. It sounds like you've already established that the missing messages never get there, but worth including in this list.

# Get support
> 1 votes

# Answer
I'd also recommend looking at from a slightly naive point of view - i.e. what was special about this mailing from your other mailings? and secondly, see if you can identify which of the recipients didn't get it and find out if there is a pattern. You can do this with fancy advanced search stuff, for example.

Another useful log that Chris didn't mention is the CiviCRM error log, which sometimes has useful entries. Actually, I'd look in this first (either manually or using https://civicrm.org/extensions/civicrm-log-viewer).

I agree it does look to be an unexpected error that CiviCRM isn't handling properly.
> 0 votes

---
Tags: civimail
---


# Question
Title: DB Error: no such field On Event Registration
We are getting a DB Error: no such field error when registering for a paid event. Here is the debug info which indicated a problem with an unknown column in the contributions table I think. I have looked and that field is in the table. We are using CiviCRM 4.7.30 on Joomla 3.8.7

Database Error Code: Unknown column 'invoice\_number' in 'field list', 1054 Additional Details:

Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> handle )

```
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => INSERT INTO civicrm_contribution (contact_id , financial_type_id , payment_instrument_id , receive_date , total_amount , fee_amount , net_amount , invoice_id , currency , source , amount_level , is_test , is_pay_later , contribution_status_id , check_number , tax_amount ) VALUES ( 17049 ,  6 ,  1 ,  20180501090413 ,  50 ,  0 ,  50 , '5e4ba6329f63217b6b65a068eafabfe1' , 'USD' , 'Online Event Registration: Childrens Camp (1st - 7th Grades) 2018 Counselor and Staff Application' , 'Application Fee - 1' ,  0 ,  0 ,  2 ,  NULL ,  0 )  [nativecode=1054 ** Unknown column 'invoice_number' in 'field list']
[type] => DB_Error
[user_info] => INSERT INTO civicrm_contribution (contact_id , financial_type_id , payment_instrument_id , receive_date , total_amount , fee_amount , net_amount , invoice_id , currency , source , amount_level , is_test , is_pay_later , contribution_status_id , check_number , tax_amount ) VALUES ( 17049 ,  6 ,  1 ,  20180501090413 ,  50 ,  0 ,  50 , '5e4ba6329f63217b6b65a068eafabfe1' , 'USD' , 'Online Event Registration: Childrens Camp (1st - 7th Grades) 2018 Counselor and Staff Application' , 'Application Fee - 1' ,  0 ,  0 ,  2 ,  NULL ,  0 )  [nativecode=1054 ** Unknown column 'invoice_number' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contribution (contact_id , financial_type_id , payment_instrument_id , receive_date , total_amount , fee_amount , net_amount , invoice_id , currency , source , amount_level , is_test , is_pay_later , contribution_status_id , check_number , tax_amount ) VALUES ( 17049 ,  6 ,  1 ,  20180501090413 ,  50 ,  0 ,  50 , '5e4ba6329f63217b6b65a068eafabfe1' , 'USD' , 'Online Event Registration: Childrens Camp (1st - 7th Grades) 2018 Counselor and Staff Application' , 'Application Fee - 1' ,  0 ,  0 ,  2 ,  NULL ,  0 )  [nativecode=1054 ** Unknown column 'invoice_number' in 'field list']"]

```

)

# Answer
This is because of a missing field in the contribution log table. See the following question and answer for next steps: How can I deal with a missing or corrupt binary ("advanced") log table?

So if you don't care about existing logs, you should just be able to turn logging off then back on, otherwise that post gives some more advice.

For either step, I'd suggest **backing up your database first** just in case something gets more corrupted.
> 1 votes

# Answer
Invoice number is a field that was added some releases earlier than the version you are on - perhaps you need to run the upgrade script by hitting civicrm/upgrade url - although I'm not quite sure how to construct that url in Joomla!
> 0 votes

---
Tags: civievent, civicontribute, joomla
---


# Question
Title: Memberships not recorded since mid April 2018 (using Webform)
Civi 4.7.27

I use extensively Webform Integration to register Memberships.

Since mid April (precisely April 21st, but I don't remember when I did some Module Updates), memberships have not been recorded anymore, though no error message is displayed and Webform Mails are sent (and received).

Some information before further investigation :

* My memberships have no associated Contribution and are for Life
* They have some associated multi-valued Custom Fields
* When they contain a new Contact, the new Contact is not created either
* I have the same problem on a Test Civi 5.0.0 configuration

I will report this as a bug to https://www.drupal.org/node/add/project-issue/webform\_civicrm, and keep this informed if I find other informations.

# Answer
After further investigation it appears that :

The problem occurs when you define a Membership custom multi-valued field, even if you specify it as "non required", both in its definition and in the Webform :

If you don't specify at least one value in the Webform, the membership will not be recorded : this means that you have to define this field as required in the webform if you don't want to have the problem.

From my point of view, this is only a partial answer : this issue should be answered :

* either, at least, by a message which tells that the membership will not be recorded, due to ...
* or by recording the membership, even with this field empty,
* or by locking this field as required in the webform,
* or ...

I will edit my bug report in this way at https://www.drupal.org/project/webform\_civicrm/issues/2968720#comment-12598952.

Here under (suggested by Karin and Pete) some screenshots to explain how the field was specified to produce this failure :
> 2 votes

# Answer
ok let’s figure this out:

* add the webform\_civicrm module version + civicrm version to your question
* check if there are any drupal database updates to be executed
* use (install if you don’t have it yet) node\_clone module to clone your webform
* on the cloned form: remove the multi-value fileds - check if the form works without them
* use (install if you don’t have it yet) https://civicrm.org/extensions/civicrm-log-viewer to view any configandlog file entries;

Let us know what clues you can dig up.
> 2 votes

---
Tags: civimember, webform-civicrm
---


# Question
Title: Error: Sorry but we are not able to provide this at the moment
We are using CiviCRM 4.6.9, and Drupal (where do I find version #??)

Suddenly a few days ago the following message began appearing:

The screenshot is from my dashboard; the message also appears when attempting to view or edit most contact records. Most but not all, and I haven't found any pattern.

As far as I know, we have not recently updated Drupal or Civi.

Why are we suddenly getting this message? What can I do?

More information: the problem has gone away all by itself, so I still don't know what really happened. And that's OK by me for now.

Thanks for the helpful answers - I found the file with backtrace, and also found where to turn debugging & backtrace on and off for next time. So a helpful learning experience.

# Answer
You will get more details in civicrm log file (\*/file/civicrm/ConfigAndLog). Also the main reason of this type error is, we are using few fields that are disabled. check custom fields status that are using for contact.
> 1 votes

# Answer
Had this issue and resolved it by disabling the *only\_full\_group\_by* setting

```
mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

```
> 1 votes

---
Tags: error
---


title: Email On Hold? options

text:
# Question
Title: Email On Hold? options
It looks like there are two options for indicating that an email address in on hold. Is there a way to add another option? If so, how would I go about doing that?

# Answer
If you want to record the person indicating their opting-in or opting-out then you could consider using an Activity for this purpose.
> 0 votes

---
Tags: contacts, email
---


# Question
Title: Registration confirmation email uses wrong From email address
I use Civi 4.7.27 on Drupal.

When using the back-end form to register a contact to an event, and checking the 'Send Confirmation' checkbox, then the 'Receipt From' email address shown is not the one I want.

I tried to change the general Civi's default 'From Address' to the one that I want, but this did not affect this address.

Where is this email address defined to be the default one for sending registration confirmation emails from?

Clarification - when a user registers by himself using the online registration form, he does receive the confirmation email from the correct address, as it is defined in the 'Online Registration' tab of the event configuration page. The problem only happens for manual back-end registrations.

# Answer
> 1 votes
The email address which is used by default as the 'Receipt From' address, in the 'Register Participant' back-end form is the FIRST email address (with the highest order) defined in the 'FROM Email Addresses' list. NOT the one that is marked as default.

Moving the address I wanted to use by default, to be the first one on the list - solved the problem.

---
Tags: civievent
---


# Question
Title: Why can't I add more CiviCase fields to my Profile?
I have created a new Profile to prompt the user to complete a new Case within CiviCase. However, when adding fields to the Profile, it only offers the 'Case Subject' field from CiviCase. What have I missed about the other fields (which are all unmodified, such as the Case Date) that will allow other fields to be added? David

(4.7.9 on Wordpress, so I can't use Webforms)

# Answer
> 1 votes
(EDITED) When you set up a civicrm profile using lateset civicrm you can add Case fields and they all seem to be available. The below shows Profile with Case Subject and Case Status added and other fields still to add.

# Answer
> 1 votes
We have upgraded to CiviCRM 5.0.1 and, magically, all the missing CiviCase fields became available for selection in the Profile, just as in Pete's screenshot. Thank you for showing how it should look.

# Answer
> 0 votes
EDIT: I may have misunderstood your question. See my comment below petednz's answer below, but it doesn't help you it just confirms there are more fields visible on the public demo.

It only displays the fields from the profile used for drupal user registration. E.g. the built-in name and address profile.

---
Tags: wordpress, profile, civicase
---


# Question
Title: User Sync error when new user registers on behalf of a business
I am using wordpress 4.9.5, CiviCRM 5.0.2 and CiviCRM WordPress Member Sync 0.3.5. When a new user signs up, and selects register on behalf of an organization. The user role does not sync, stays at the base level. If the user does not select this option, the sync works as configured.

I have double checked mappings, and they are all correct.

# Answer
When someone contributes on behalf of an organisation, the membership is applied to the *organisation*, not to the *individual*. By default, CiviCRM WordPress Member Sync (perhaps incorrectly) creates a user for the organisation and then applies the appropriate role based on the membership in question. You can override this behaviour (i.e. cancel creating the organisation user) by using the `civi_wp_member_sync_auto_create_wp_user` filter:

https://github.com/christianwach/civicrm-wp-member-sync/blob/master/civi-wp-ms-users.php#L603-L612
> 2 votes

---
Tags: wordpress
---


# Question
Title: How to setup Cron in Civicrm- local server
-job.execute works, cron runs when i click Execute Now
-individual and group test mail works properly
-curl is running
-joomla 3.8.7
-apache 24
-php 7.2.4
-civicrm 5.0.1

Here's the problem:
-I could not find a solution, I know how to make a schedule job in window to run cron.php, but cron needs the CMS's username and password, so I did as Bobs suggested
-But there was an error saying No such file or directory
-Then i notice there is duplication in directory in Joomla.php, I guess this is the cause (because civicrm\_root contains absolute path and defines.php has another) but i dont know how to fix it

```
 /**
  * Setup the base path related constant.
  * @return mixed
  */
 public function getBasePath() {
   global $civicrm_root;
   $joomlaPath = explode('/administrator', $civicrm_root);
   $joomlaBase = $joomlaPath[0];
   return $joomlaBase;
 }

```

update:
-Did as Bobs suggest, to change civicrm.setting.php civicrm\_root's directory slashes, it works! but new problem spawns
`Warning: require_once(\libraries/import.legacy.php): failed to open stream: No such file or directory in C:\Apache24\htdocs\joomla\administrator\includes\framework.php on line 15`

`Fatal error: require_once(): Failed opening required '\libraries/import.legacy.php' (include_path='.;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\packages;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/tecnickcom;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/phpseclib/phpseclib/phpseclib;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/pear_exception;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/auth_sasl;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/net_socket;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/net_smtp;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/validate_finance_creditcard;.;C: in C:\Apache24\htdocs\joomla\administrator\includes\framework.php on line 15`

i tried to change some lines in administrator/includes/defines.php or duplicate joomla/libraries to joomla/administrator, then it said
`No configuration file found and no installation code available. Exiting...`
my goodness i just want this cron works, why so complicated :(

Conclusion: -seems like compatibility problem with joomla 3.8.7 and civicrm 5.0.1, please check comments below for references

# Answer
There is no cron command in Windows. Instead, use Task Scheduler to create scheduled tasks that call wget, curl, or php.
> 1 votes

---
Tags: api, cron-job, cron, civicrm-home, directory
---


# Question
Title: CiviEvent price set custom validation rules
I want to create an event that uses a complex price set, and I want custom validation rules that express relationships among the fields in the price set. For example, if I have a checkbox "Entire Retreat" for participants to say they're registering for the whole event, it should be an error for them also to check the boxes for any individual part of the event. Is there a general-purpose way to configure rules about the entire price set?

# Answer
You can limit the price options the user sees with some JavaScript in a custom template. This can allow you to control the user options based on the selections. For example:

If the user clicks 'Full Registration' it triggers JavaScript to only show the relevant options. So if meals are included in the user doesn't see the individual meal prices.

You need to do some planning particularly with required fields. If there is a field that you need to be required that relates to individual items you need to have an option for when it is included in the full registration. This will avoid errors.

More information on custom templates can be found here: https://docs.civicrm.org/sysadmin/en/latest/setup/directories/#custom-templates

Hope this helps.
> 0 votes

---
Tags: civievent, price-sets
---


title: gdpr compliance

text:
# Question
Title: gdpr compliance
We note that you have added an extension to enable users to ensure we are GDPR compliant

What i am wondering is do you have anything about your OWN data compliance, i.e. a data processing agreement and information about how you use or store the data, where is this processed? In the EEA? Or outside of the EEA?

Anything else you think that is pertinent that will help us satisfy the requirements we have to meet as users that we use GDPR compliant tools/resources/suppliers.

Many thanks

Lisa

# Answer
> 3 votes
CiviCRM is not a company that processes data or store data so I am not sure what you are talking about? I am not sure what you mean by 'your OWN data' in t that respect? I am a CiviCRM community member not an employee of CiviCRM.

CiviCRM itself is NOT a 'cloud' application. The communiy provides source code in a software package. You can install that on any server of your choice and THAT is where your data resides. CiviCRM itself does not process any data from customers.

The global CiviCRM community does have its own website where data of participants at CiviCons and CiviCamps, and active community members is stored. That is community based and maintained, there is not one organization specifically responsible for that data. I assume the data of that community site resides in the USA (and GDPR does not apply).

CiviCRM is not a supplier in the sense that it is an organisation that delivers you services at an agreed price. You as an organization download the codebase of CiviCRM.

If you want to know the license agreement that you agree to when you download CiviCRM you can find it here: https://civicrm.org/license.

If this does not answer your questions then please explain what you are looking for in more detail?

# Answer
> 1 votes
I think its important to provide some general information about your setup before we can fully understand what you need to take into account. As Erik has highlighted, you may be using CiviCRM with your own or website hosting or you may have subscribed to an online service which provides you with a running copy of CiviCRM.

The reason its important to understand the distinction is because the agreements which need to be in place will differ in both situations.

If your organisation has arranged the hosting and is technically looking after your CiviCRM installation then your organisation is the data processor. You'll also need to check the hosting agreement to be sure if the data crosses boundaries, what the hosting provider does with the data, any sharing or selling etc.

If you've entered into an agreement for a software as a service implementation of CiviCRM, where you do not have a contract with the hosting provider, you should seek an agreement with the service provider to clarify all of the GDPR specific issues. Pretty much as above, you need to be clear with your supporters what is or isn't happening with their data and how you'll be using it.

The agreement differ because you probably have less control over how your data is shared in a software as a service platform, for instance they may be using services for address cleansing or servers in the USA without your knowledge.

You'll be best served thinking of GDPR in two distinct areas

* Data, where its held, how its handled
* Communications and marketing with your contacts including permission to hold their data and agree to your data/privacy policy

If you split up your compliance into these components it becomes much easier to see where your missing information and what agreements you'll need to have put in place.

Hope that makes some sense!

---
Tags: gdpr
---


# Question
Title: "Membership status cannot be calculated for <dates>" Renewal Error!
I am on Joomla 3.8.7 and civiCRM 4.7.31. Recently, Two members received the following error message when trying to renew their memberships:

> "The membership cannot be saved because the status cannot be calculated for start\_date: 20170101 and end\_date: 20171231 join\_date: 20170306 as at 2018-05-04 22:00:50"

Over 100 members have successfully renewed their memberships this year so I'm not sure why this is happening.

Can someone help?

# Answer
> 2 votes
Using the CiviCRM menu, if you navigate to Administer \> CiviMember \> Membership Status Rules (`civicrm/admin/member/membershipStatus`) you should see a list of membership status rules. These dictate the "workflow" of a membership, and they need to chain together correctly. For example, on the sample site I have handy the rules are:

* *New* \- ends +3 months from "member since" start date (configuration pictured below).
* *Current* (rest of membership - doesn't have start/end config in my sample site, but is the "default" state)
* *Grace* \- starts end of membership, ends +1 month from that date
* *Expired* \- starts +1 month from end of membership
* *Pending*, *Cancelled*, *Deceased* \- not part of the automatic process.

Here's what "New" looks like.

I suggest you inspect the dates those members are trying to renew and work out where in this workflow they would fall given the rules on your site (expired or grace presumably, since you seem to have a fixed year membership and it's now May in the next year). It may be that a membership state has been removed from the workflow and this leaves a gap, or that the timeline has been adjusted for one but not another.

Just a guess, that's where I'd look first!

---
Tags: civicontribute, civimember
---


# Question
Title: Which accounting software is compatible?
I was wondering what accounting packages, if any are compatable with CiviCRM. I'm in Australia also if that helps.

# Answer
> 3 votes
There is a batch export in csv that works for many packages, a .iif that works for QuickBooks desktop, an extension that integrates with QuickBooks online Australia, and an extension that supports Microsoft Dynamics.

# Answer
> 2 votes
We have built an integration package with Xero which is available and explained here. Xero is available in Australia.

The integration means that both Contacts and Transactions can be pushed or pulled to civicrm, and the civi Financial Types can be set to match the Chart of Accounts in civicrm.

---
Tags: accounting
---


title: Unable to do "replace" in API Explorer

text:
# Question
Title: Unable to do "replace" in API Explorer
CiviCRM 4.7.29, Wordpress 4.9.5

I am unable to do a replace in the API explorer. I can do a "get" however. The situation is that a parent registered for an event, but forgot to change the number of registrants under his registration from 1 (him) to 3 (him + 2 kids). They were under 12 yrs so I just manually entered them. However, the kids now show as Registered\_by\_ID = null, and I want them to be the ID of the parent.

(NOTE: Am not a developer, just a volunteer with middle level of experience.)

When I do a "get", I can find his 2 kids by participant ID. Next, in API Explorer I use Entity = Participant, Action = Replace, and I would expect that the interface would allow me to choose the Participant I want to perform the action on, followed by a field on which I want to change from one value to another. Instead, it allows me to choose 1 field and 1 value and says it is going to update the database, so I chose no. How do I know what participants this is going to change since it doesn't let me choose who? How does it know what value from -\> to I want to change?

I checked the examples here but Registered\_by\_ID is not listed. Does that mean a replace won't work on that ?

In the end, I'm open to suggestions of either how to get the API explorer to do what I want (change the Registered\_by\_ID from null to the parent's ID), or else if there's some other obscure way (ie Profiles?).

Thank you.

# Answer
I figured out one way using profiles.

**CREATE A PROFILE**

1. The first 4 steps that you'll only need to do once starts with going to Administer, Customize Data & Screens, Profiles. Click Add Profile.
2. Give it a name such as "Update Child Participant Details", add a description if you like, check "Used for" + "Standalone Form or Directory", check "Is this Profile Active". Under Advanced Settings change "Limit Listings to a specific group" to "Attendees". Leave the rest as is. Click Save.
3. It will now ask for a Profile Field, select Participants, Registered by ID. Check "Required" (since presumably this is the whole reason you want to create this in the first place). Leave the remaining fields as they are. If you want to update another field for the child (ie dietary restrictions, etc) then click "Save and New", else click "Save" to finish. NOTE: You cannot mix fields from other records, they all have to be from "Participants". If you try to use one from "Contacts" for instance, it will give you an error in later steps.
4. Click Preview (all fields) and your Registered by ID field and any others you created should appear. Click Done with Preview. You will only have to do this once, this completes the Profile steps.

**CREATE A PARTICIPANT ID REPORT**

1. You will only need to create this report once. Go to Events, Reports, Attendee List.
2. Checkmark Columns, add Participant ID, Registered by Participant ID, Event, Status, Role, Fee Level and Participant Fee, then click View Results. Your report should now show the parents along with their children (everyone who registered). The Fee level field should presumably identify the parents from the children assuming the fee structure is different (ie under 12 free).
3. Click on Title and Format, change the name to something more appropriate such as "Attendee List with IDs", then on the same screen under Actions, select "Save a copy" (not Save or it will overwrite the original), parent menu can be Events, Event Reports. This is where you'll find this report later.
4. Now that you've created your report showing the children with Registered\_by\_ID = null (blank), you will now know which child's record to edit. Keep this browser tab open to refer to, and open a second browser tab or window.

**USING THE PROFILE AND REPORT TO EDIT THE CHILD RECORD**

1. In the new browser tab or window, open CiviCRM and go to Events, Dashboard.
2. If you only have 1 event showing, you should see all your attendees below. If you have more than 1 event, click on "Registered" to the right of your event. You should now see all your attendees below.
3. With the Civi Report you left open in the previous browser tab or window, you can find the name(s) of the parent and their children. You'll be focusing on the children that do not have an ID number in the field Registered\_by\_ID because we will want to change this from null to their parent's ID. Make a note of the child(ren) and parent.
4. Switch back to your 2nd browser tab or window. Click the box next to the name(s) of the child(ren) that you want to associate with the parent that registered them.
5. Click on "Actions", and choose "Update Multiple Participants" which should be at the bottom of that list. Give Civi a moment, then you should see a page called "Update Multiple Participants" with a Select Profile dropdown. Choose the Profile you created in the first steps and click Continue.
6. The child(ren) should appear now, though unfortunately this screen does not list their participant IDs nor their parents. This is why you'll want to switch back to the other browser tab or window, obtain their parent's participant ID, and enter it into the "Registered by ID" box beside their child(ren)'s names on the 2nd browser tab or window. If you created any other fields in the profile (ie Dietary restrictions) then they will also appear here too. Click the "Update Participant(s)" button to finish.
> 1 votes

# Answer
Usually using the api instead of update/get you want to issue a create with the relevant ID field filled in. The api call will then update the relevant record. For participant you would want to supply the participant id.

However I'd not recommend you use the API in this manner :)
> 1 votes

---
Tags: api, fields
---


# Question
Title: Different subsets of a selection custom field
I have a select custom field for 'Accommodation' showing the options available for participants in events' registration form. To simplify, lets say there are 10 different accommodation options, 'option 1' until 'option 10'. It gets complicated when each of the different events (around 100 different events) have a different subset of those options, and not all 10 options are available for each event. So event A has options 1,2,3, event B has 2,3,5,7, and event C has all 10 options available.

I created a custom field for each subset of options, but came to a point of having almost 20 different custom fields called accommodation, and then trying to draw up a report of all participants from all events, showing which accommodation option they chose - is just a big mess with 20 custom fields that do not intersect.

My question is how to have only one custom field with all 10 options, but then to somehow specify for each event which out of the 10 options should be displayed and available for choice, for that particular event.

# Answer
> 0 votes
I did it with javascript:

CRM/Event/Form/Registration/Register.tpl (custom\_209 is the custom field attached to the event configuration page, to show which accommodation options should be valid for this event, out of the field 209 which has ALL possibilities) -

```
<div style="display:none;" id="event_accommodation">
    {crmAPI var='result' entity='Event' action='getsingle' return='custom_209' id=$event.id}
    {foreach from=$result.custom_209 item=value key=field}{$value},{/foreach}
</div>

```

And then in a custom .js file in the registration form itself:

```
const ID_HIDDEN_DIV_EVENT_ACCOMMODATION_VALID_OPTIONS = 'event_accommodation'; // This is set in the CRM/Event/Form/Registration/Register.tpl

function hideInvalidAccommodationOptions()
{
    if (jQuery("input[name='" + CUSTOM_FILED_EVENT_ACCOMMODATION + "']").length == 0)
    {
        // There is not accommodation field in this form. Could be an online course or a different type of seminar.
        return;
    }

    var validAccOptionsString = jQuery('#' + ID_HIDDEN_DIV_EVENT_ACCOMMODATION_VALID_OPTIONS).text().trim();

    if (validAccOptionsString.length == 0)
    {
        // No accommodation specification were set for this event
        return;
    }

    // Remove the last comma (,) from the string
    validAccOptionsString = validAccOptionsString.slice(0,-1);

    var validAccOptionsArr = validAccOptionsString.split(',');
    var accOptionsInputElementsArr = jQuery("input[name='" + CUSTOM_FILED_EVENT_ACCOMMODATION + "']");

    // Iterate through all possible accommodation input elements
    jQuery.each(accOptionsInputElementsArr, function(i, accOptionInputElement)
    {
        var $accOptionInput = jQuery(accOptionInputElement);

        // If the input element's value is not found in the specified event accommodation options
        if (jQuery.inArray($accOptionInput.attr("value"), validAccOptionsArr) == -1)
        {
            // Go up twice in the DOM from the input, to the td, to the tr, and remove the whole tr from the DOM.
            $accOptionInput.parent().parent().remove();
        }
    });
}

```

# Answer
> 0 votes
To do this via webform\_civicrm

Download and enable webform\_civicrm and read the documentation.

Google for some answers on SE or our blog at fuzion.co.nz/blog for some explanations about doing Events via webform\_civicrm eg

https://www.fuzion.co.nz/blogs/registering-multiple-people-multiple-events

https://civicrm.stackexchange.com/questions/tagged/webform-civicrm

How can I create early bird fees with Webform CiviCRM?

Calculated member fees

---
Tags: civievent, custom-fields
---


title: How to duplicate a case

text:
# Question
Title: How to duplicate a case
We often have batches of six to eight related cases which have much of the same content (relationships, custom fields, activities). I would like to generate new cases by cloning an existing case multiple times. Before I embark on writing a new extension, has anyone already done something like this?

# Answer
> 3 votes
Another alternative might be to use the CiviRules extension, and develop your own action that prepopulates cases upon creation?

Check for https://civicrm.org/extensions/civirules the extension and https://docs.civicrm.org/civirules/en/latest/create-your-own-introduction/ for documentation on developing your own actions.

---
Tags: civicase
---


title: Cannot redeclare civicrm_enable()

text:
# Question
Title: Cannot redeclare civicrm_enable()
I am trying to migrate a Drupal+CiviCRM from an old server to a new one.

I copied the files and database, updated civicrm.settings.php and settings.php, cleared the cache and made a drush up + drush updb, both ran fine.

As the new server uses PHP 7.0, I downloaded civicrm-4.7.31 drupal and l10n files to replace the version 4.4.19 that was used. However, I still have a white screen when going to the homepage.

In /var/log/nginx/error.log, I can find this error:

```
2018/04/30 17:54:16 [error] 20389#20389: *845 FastCGI sent in stderr:
"PHP message: PHP Fatal error:  Cannot redeclare civicrm_enable()
(previously declared in
<civicrm_root_path>/sites/all/modules/civicrm/drupal/civicrm.module:781)
in
<civicrm_root_path>/sites/all/modules/civicrm/drupal/civicrm.install
on line 40" while reading response header from upstream, client:
XXX.XXX.XXX.XXX, server: XXXX, request: "GET / HTTP/1.1", upstream:
"fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXX"

```

Edit: I already saw this post but that didn't help me fix my issue. I have only one copy of CiviCRM under my module directory. I tried the "drush vset civicrm\_class\_loader ''" command and now I have a new error message:

```
"2018/05/03 10:36:07 [error] 7010#7010: *2972 FastCGI sent in stderr:
"PHP message: PHP Fatal error: require_once(): Failed opening required
'CRM/Core/ClassLoader.php'
(include_path='.:<civicrm_old_root_path>/sites/all/modules/civicrm:<civicrm_old_root_path>/sites/all/modules/civicrm/packages:.:/usr/share/php')
> in <civicrm_root_path>/sites/default/civicrm.settings.php on line 280"
> while reading response header from upstream [...]"

```

With being the root path on the previous server, so it must be cached somewhere, but I cannot find where. This error disappears after a drush cc.

# Answer
I tried an intermediary update with the 4.6.36 with PHP 5 and, while I still have some update errors (I will open separate tickets if I cannot find the solution by myself), I do no longer have this one.
> 1 votes

# Answer
As answered by @davejenx here ("Cannot redeclare class CRM\_Core\_ClassLoader" in backup site) this could be your issue.

> It sounds as though there is either a cached path to ClassLoader.php somewhere or there are two copies of the CiviCRM code under your modules directories. Various scenarios and solutions are discussed in this forum post: svn installation says "Cannot redeclare class CRM\_Core\_ClassLoader" Please post back here rather than on the forum, though.
>
> If you're sure that there aren't multiple copies of CiviCRM under /home/mydomain/www/backup/ then the most likely fix is to clear the Drupal variable civicrm\_class\_loader, e.g. using drush:
>
> `drush vset civicrm_class_loader ''`
>
> There's a good chance the fatal error will prevent the use of drush. In that case, you can delete the row from Drupal's variable table where name = 'civicrm\_class\_loader'. It's possible the variables are cached in addition -- you may need to clear Drupal's cache tables manually. (A targeted approach -- in Drupal 6, anyway -- is to delete the row from Drupal's cache table where cid = 'variables'.)
> 2 votes

---
Tags: drupal, migration
---


# Question
Title: Insert custom date field from Drupal Webform
I'm trying to set up a Drupal Webform that will (among other things), automatically update a custom date field in the connected CiviCRM contact record. The date field in the webform is hidden, and I'm using Drupal Tokens to generate the date/time when the form is submitted; in the webform results I see the correctly generated date and time, but it isn't then passed to the custom date field in the contact record. (I've tried this with both date & time and date being recorded in the CiviCRM custom field, and with different date tokens generated by the webform - none seem to work).

I'm assuming that the webform is generating a date format that can't be interpreted by the custom field, but I can't see a way to match them up.

Other custom fields filled in via the webform are being populated correctly (I haven't tested this extensively).

I'm using Drupal 7.59 and CiviCRM 5.0.2

# Answer
We're using dates in this example (custom fields on the grant entity) - I just checked - these dates are working properly:

So try this: set the date field to NOW -\> using the method I described here: How can I create early bird fees with Webform CiviCRM? -\> for your Date fields;

Let me know if that works.
> 1 votes

---
Tags: contacts, custom-fields, webform-civicrm
---


title: Extensions for 5.0+

text:
# Question
Title: Extensions for 5.0+
I am trying to understand the ramifications of updating to CiviCRM 5.0. Will extensions for 4.7 continue to work in 5.0? Will this continue in the long run?

For example iATS, ExtendedReprt, CiviDiscount, CiviVolunteer, Webform CiviCRM, and CiviCRM Entity.

Thanks, Josh

# Answer
The 4.7 -\> 5.0 increment is a normal monthly release. There shouldn't be any reason that extensions should break. The shift from 4.7 to 5.x is about changing how version numbers increment, not a major shift in how Civicrm core codebase works.

For more on the version number change there is a blogpost here https://civicrm.org/blog/dev-team/v50-the-littlest-biggest-increment

And you can dig into more about what exactly has changed here.

https://github.com/civicrm/civicrm-core/blob/master/release-notes.md
> 6 votes

---
Tags: extension
---


title: Display CIVICRM Contact Dasboard

text:
# Question
Title: Display CIVICRM Contact Dasboard
Drupal 7.59 Civi 4.7.27

In Blocks there is a default CiviCRM Contact Dashboard. #block-civicrm-3 I have assigned it to Content. It displays for Admin but not for any other roles. I want it to display for role Donor. In the block config I have Roles checked to display Admin & Donor.

Under Civi \> Administer \> Users \> Permissions \> Drupal Access Control I checked for Donor: CiviCRM: view my contact & CiviCRM: access Contact Dashboard

But the Donor role still cannot see the link to access their dashboard. When signed in as a donor I can go to /civicrm/user and see the dashboard. It is just not displaying this default block that has the link.

Any ideas what is keeping this from displaying?

# Answer
> 0 votes
I created a new block with with the link civicrm/user and assigned it to role Donor and it shows up. Not sure why the default one does not show up, all the settings are the same.

# Answer
> 1 votes
The default contact dashboard block is only visible on civicrm pages or form. If the user has access CiviCRM permission than on /civicrm it should display the block or you can change the setting by editing the block to include it on all the pages.

Hth

Pradeep

---
Tags: dashboard
---


title: Canceling Membership Renewal Email

text:
# Question
Title: Canceling Membership Renewal Email
Two questions I'm hoping someone can help me answer:

1) How do I make sure that our system does NOT send out emails to people who have a monthly recurring membership?

2) How do I make edits to rules of how membership renewal emails are sent?

# Answer
> 2 votes
Membership renewal notices are controlled by Scheduled Reminders. You can set these up here under 'Administer\>Communications\>Scheduled Reminders'.

The documentation is here: https://docs.civicrm.org/user/en/latest/email/scheduled-reminders/#using-scheduled-reminders-for-memberships

With regards to your monthly recurring members you can choose to not send renewal reminders to that particular member type. There is also the following option 'Renewal Reminder (no-auto-renew memberships only)'.

You want to make sure you have the scheduled job 'Send Scheduled Reminders' enabled ('Administer\>System Settings\>Scheduled Jobs') and a cron job setup to run your scheduled jobs. You can find more info here: https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/

Hope this helps.

---
Tags: civimember
---


# Question
Title: CiviMail error due to a word in the mailing - why?
I was contacted by someone who was having trouble saving a mailing, get this error in CiviMail:

I ended up comparing the version that saved with the version she had pasted in (which had some content additions) and then line by line (word by word) deleting the newly added text to try to identify a problem. It turns out it was the word "Reunion". I would delete the word and drafts would save, test emails could be sent... I would type the word back and the error would recur.

I've tried this on another install and had no problem using the word reunion so I am totally stumped as to how this could possibly occur. Any ideas?

# Answer
I recently had a similar problem (with Moodle, not CiviCRM, on a shared host) giving errors when a particular word was in the content that was being submitted by the user. It turned out to be triggering a mod\_security rule, resulting in a 403 error. Whitelisting that rule resolved the problem.

*Edit (by Laryn)*: Here's the mod\_security rule (#300016, "Generic SQL injection protection") that was triggered in this case:
> 2 votes

---
Tags: civimail
---


# Question
Title: How to get the sharing icons to display in mosaico?
I've got the problem described in https://civicrm.org/blog/totten/mosaico-extension-v20-beta3-etal

The image location is

`/files/civicrm/extensions/uk.co.vedaconsulting.mosaico/packages/mosaico/templates/versafix-1/img/social_def/facebook_ok.png`

The HTML has it relative to templates

```
<img src="https://dmo.ecolsoc.org.au/templates/versafix-1/img/social_def/google+_ok.png" alt="Google+" border="0" class="socialIcon" style="border: 0px; display: inline-block; vertical-align: top; padding-bottom: 0px; border-radius: 100%;">

```

am I missing a .htaccess or extension variable?

# Answer
It sounds like the same issue as here perhaps: https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/160

If you read the detail, the problem has been fixed for new templates, but old templates created before the fix will still fail most likely
> 3 votes

---
Tags: mosaico
---


title: Countries with Multiple World Regions

text:
# Question
Title: Countries with Multiple World Regions
Is it possible to have a country with more than one world region? I like the functionality of the world region search but I would like for some regions to be smaller (North America vs. South America) but also have them grouped together as in the current world region (America South, Central, North and Caribbean).

One way of getting around this situation is to create a group of contacts in each county and then creating a regional group that includes all of the appropriate country groups. I'm hoping that there is a different way to accomplish this same task. Thanks.

# Answer
You can also have a look at the area extension (https://civicrm.org/extensions/areas) In the area extension you can define custom areas and automaticly assign them to a contact based on his address data.

For example if you have the area Benelux, which consists of the countries Belgium, Netherlands and Luxemburg. You configure the area Benelux to be applicable when the country of the contact is either Belgium, Netherlands or Luxemburg.

Below a screenshot of the contact card and areas for east coast and washington dc.

See the extension page for more examples.
> 2 votes

# Answer
You can add new regions to the `civicrm_worldregion` table, and reassign countries to the new regions with edits to the `civicrm_country` table.

If you'd like two levels of regions, there isn't a great answer. You can do groups, like you suggested - if you do, I like using smart groups based on latitude/longitude to automatically group folks.

Another option is to use the new feature of "custom fields on any entity" to add a custom field to the Country entity. However, you'd need to write code to expose that custom field to search.
> 0 votes

---
Tags: contacts, location
---


# Question
Title: Is the GDPR extension compatible with civicrm 4.6?
Anyone tried adding the GDPR extension to a 4.6 site?

Cheers

Craig

# Answer
We've just released a new version, 2.1, which is 4.6 compatible. The only difference is that in 4.6 installs the Forget Me function will not clear out IM messages as the API in CiviCRM crashes out.
> 2 votes

# Answer
4.6 also needs a core override to get the T&C tab working in Contributions (and (at the time of writing) the latest version). it's find-able in the git repo issues
> 1 votes

---
Tags: 4.6, gdpr
---


# Question
Title: CiviCRM WordPress shortcode embedded within a tab shortcode does not load
I have a CiviCRM profile that I am using in order to allow a logged-in user to edit his/her address information. In addition, I want to display the user dashboard.

Normally, one would e.g. create a WordPress page and include the corresponding shortcodes like the following:

```
[civicrm component="user-dashboard" hijack="0"]

[civicrm component="profile" gid="32" mode="edit" hijack="0"]

```

What I would like to achieve is to display the shortcodes within a tabbed environment, so for example by using the tabs component from Shortcodes Ultimate. An example can be found below:

```
[su_tabs vertical="yes"]

[su_tab title="Dashboard" disabled="no" anchor="" url="" target="blank" class=""]

[civicrm component="user-dashboard" hijack="0"]

[/su_tab]

[su_tab title="Address Form" disabled="no" anchor="" url="" target="blank" class=""]

[civicrm component="profile" gid="32" mode="edit" hijack="0"]

[/su_tab]

[/su_tabs]

```

My problem is: The first tab loads the user dashboard correctly. The second tab does not load anything. My question to the community is if anyone has had any experience with CiviCRM shortcodes embedded within any other shortcode?

Thanks!

# Answer
CiviCRM can only be "invoked" once per page load, so multiple shortcodes on a page won't be functional. Instead they should display as "teasers" with links to the functional CiviCRM content on your WordPress basepage.

In short, you can't have functional CiviCRM forms unless they are they are the only content on a page.

There are a couple of ways you *could* do this, however:

* use the Caldera Forms CiviCRM plugin to embed two forms in your tabbed page
* pull in the content of the second tab in via an AJAX request

Personally, I'd ask myself whether implementing tabs is worth the extra development time.
> 3 votes

---
Tags: wordpress, profile, user-dashboard
---


title: Anonymous surveys

text:
# Question
Title: Anonymous surveys
I get that 'normally' you'd want to verify survey respondents by email, but there are instances where that's not possible / desirable. Is it possible to set up an anonymous survey on CiviCRM that would function?

I have a situation where I'd like to survey children's thoughts on some services we're offering. They are all under 13yrs.

They're all using laptops in a coding club (provided by us), so an online survey seems obvious. I could use GoogleDocs or Typeforms, but I'm using CiviCRM so wondered about using the built in survey / petition functions.

I could set up a dummy 'Anon' account and use that to collect the data, but would that then work from an analysis perspective? I'd have hundreds of responses (as activities), but against a single individual.

Or should I stick to Typeforms & dump the csv into excel?

Using WP 4.9.5 / Civi 4.7.31

# Answer
While you could certainly use CiviCRM in the method you're describing, I'm not sure it's a great fit. CRMs are inherently about tracking constituent info; this data must be separate from your constituents. And while CiviCRM's webforms are adequate, it's certainly not such a great feature that I'd try to work against the software.

I think a third-party tool, or something like Caldera Forms for WordPress is a better option.
> 2 votes

---
Tags: civipetiton, civisurvey
---


title: Not receiving Telerivet SMS to CiviCRM

text:
# Question
Title: Not receiving Telerivet SMS to CiviCRM
I've followed all the instructions according to this documentation but when I test the incoming SMS', I do not see the SMS's coming into CiviCRM.

Below are the settings I have set up in Telerivet and then copied to Civi

This is the Webhook settings

And here I would expect to see the option to send an SMS

I also would like to see where the incoming SMS would come into. According to the video, a report can be set up to show all the incoming SMS's but I cannot seem to create the same report.

# Answer
For sending sms, the contact should have Phone number of phone type as '**Mobile**' and Primary as true. The option will be visible once you set required phone type.

The incoming message will be shown under Activity tab of Contact of Activity type as **Inbound SMS**. You can also check using Activity search with filter Activity type as **Inbound SMS**. You can also create Activity report with with filter Activity type as **Inbound SMS** and have it available on dashboard.

HTH

Pradeep
> 2 votes

# Answer
Pradeep has covered a couple of the issues already, but for the sake of completeness:

> here I would expect to see the option to send an SMS

Ensure that the contact has a phone of type 'mobile'

> I also would like to see where the incoming SMS would come into

An Activity report filtered by activity type Incoming SMS should do the trick

> This is the Webhook settings https://crm.helderberghospice.org.za/civicrm/sms/callback

I tested that URL and it came back with "Page not found". It looks like you are using Wordpress, in which case the form of callback URL is different. Based on this answer and your existing callback, I suspect that your webhook should be:

https://crm.helderberghospice.org.za/?page=CiviCRM&q=civicrm%2Fsms%2Fcallback&provider=org.ndi.sms.telerivet
> 1 votes

---
Tags: sms
---


# Question
Title: In Rules Fetch Contact Entity from Tag Creation
I am trying to fetch the contact entity in a rule which triggers when a specific tag is added to that contact. I seem to be able to load and fetch the Drupal user for the contact but not the actual contact entity itself.

Is there a way for me to fetch the contact entity when a certain tag is added?

I want to fetch the contact entity so I can then delete it, using entity delete action in rules.

Ultimately I am using Webform for this which will add the tag which triggers the rule.

I know this sounds a bit dangerous but I hope to put some safeguards in place to prevent anyone with access to the webform deleting any contacts!

**EDIT to Clarify:**

I am trying to build the ability to delete a contact in CiviCRM using a webform in Drupal.

The way I wanted to do it, was that a CiviCRM contact with a Drupal user account logs into Drupal where they can see a list of all employees for the same organisation that they are employed by (I have done this part). I then want to give the logged in contact the ability to delete other employees of the organisation that they can see listed.

I have already managed to give logged in users the ability to create new contacts for their organisation with an option to create a Drupal account for the new contact as well.

I added the ability for logged in users to create new contacts, as well as a Drupal account, by following the very clear and helpful steps given in *How can I create a Drupal user when someone submits a CiviCRM-Webform?*

This method above, involved adding a tag to a contact which then triggers the add Drupal account rule. I was thinking to use the same method of adding a tag to a contact to trigger the delete contact rule. however, I can't seem to fetch the contact as an entity within the rule in order to delete the entity.

I am using Drupal 7.58 with CiviCRM 4.7.28.

# Answer
> 0 votes
You'll need the module CiviCRM Entity installed. https://drupal.org/project/civicrm\_entity You will also need the Webform Rules module https://drupal.org/project/webform\_rules

What you could do is add a checkbox for each contact that can be deleted to the webform, could just be a regular Webform component.

Then respond to the submission of that webform with a Rule.

In the submission data, there will be a value for the checkbox you add. If it is checked, then load the contact by cid, it will also be there in the submission data.

With CiviCRM Entity, CiviCRM entities like contact, become proper Drupal entity types, in this case civicrm\_contact is the entity type. You can then use the regular "Delete an entity" Rules action.

Before you delete the contact, you will have to load it first. There is a Rules action, "Fetch entity by id", use this, and pass it the contact id you get from the webform submission data.

# Answer
> 0 votes
The other way would be to add the ability to a webform to set a contact to 'in trash' - assuming of course you really want them deleted rather than just have the relationship curtailed.

---
Tags: drupal, webform-civicrm, drupal-rules
---


# Question
Title: After upgrade to 5.0.2 from 4.7.30 getting "DB Error: No such field" on queries
Since updating my CiviCRM 4.7.30 on WordPress 4.9.5, I am getting "DB Error: No such field" when doing queries through Advanced Search or Search Builder. Some of the problems where when I was trying to use a Profile to view an Advanced Search and others were related to fields that I was trying to search by (my assumption is that they are fields that need lookups, but I haven't been able to narrow this down yet). Below is an example Search Builder query that I tried and the resulting error that was in the CiviCRM log file located in the /wp-content/uploads/civicrm/ConfigAndLog directory.

The query was to find Organizations that were Not In two designated groups shown in the image below:

Not sure if it helps but when I used the Back Key to get back to review my previous query the query screen looked like the following:

The related error in the CiviCRM log file was:

```
> Apr 27 10:25:32  [info] $Fatal Error Details = Array (
>     [callback] => Array
>         (
>             [0] => CRM_Core_Error
>             [1] => handle
>         )
>
>     [code] => -19
>     [message] => DB Error: no such field
>     [mode] => 16
>     [debug_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type
> as `contact_sub_type`, contact_a.sort_name as `sort_name`,
>             CONCAT_WS(',',
>             GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
>             GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
>           )
>           as groups   FROM civicrm_contact contact_a  LEFT JOIN civicrm_group_contact `civicrm_group_contact-43,47` ON (contact_a.id =
> `civicrm_group_contact-43,47`.contact_id AND
> `civicrm_group_contact-43,47`.status IN ('Added'))  WHERE  (  (  ( (
> `civicrm_group_contact-43,47`.group_id NOT IN ( 43,47 )  ) )  AND
> contact_a.contact_type = 'organization' )  )  AND
> (contact_a.is_deleted = 0)   GROUP BY contact_a.id  ORDER BY
> UPPER(LEFT(contact_a.sort_name, 1)) asc  [nativecode=1054 ** Unknown
> column 'civicrm_group_contact.status' in 'field list']
>     [type] => DB_Error
>     [user_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type
> as `contact_sub_type`, contact_a.sort_name as `sort_name`,
>             CONCAT_WS(',',
>             GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
>             GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
>           )
>           as groups   FROM civicrm_contact contact_a  LEFT JOIN civicrm_group_contact `civicrm_group_contact-43,47` ON (contact_a.id =
> `civicrm_group_contact-43,47`.contact_id AND
> `civicrm_group_contact-43,47`.status IN ('Added'))  WHERE  (  (  ( (
> `civicrm_group_contact-43,47`.group_id NOT IN ( 43,47 )  ) )  AND
> contact_a.contact_type = 'organization' )  )  AND
> (contact_a.is_deleted = 0)   GROUP BY contact_a.id  ORDER BY
> UPPER(LEFT(contact_a.sort_name, 1)) asc  [nativecode=1054 ** Unknown
> column 'civicrm_group_contact.status' in 'field list']
>     [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix=""
> info="SELECT contact_a.id as contact_id, contact_a.contact_type as
> `contact_type`, contact_a.contact_sub_type as `contact_sub_type`,
> contact_a.sort_name as `sort_name`,
>             CONCAT_WS(',',
>             GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
>             GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
>           )
>           as groups   FROM civicrm_contact contact_a  LEFT JOIN civicrm_group_contact `civicrm_group_contact-43,47` ON (contact_a.id =
> `civicrm_group_contact-43,47`.contact_id AND
> `civicrm_group_contact-43,47`.status IN ('Added'))  WHERE  (  (  ( (
> `civicrm_group_contact-43,47`.group_id NOT IN ( 43,47 )  ) )  AND
> contact_a.contact_type = 'organization' )  )  AND
> (contact_a.is_deleted = 0)   GROUP BY contact_a.id  ORDER BY
> UPPER(LEFT(contact_a.sort_name, 1)) asc  [nativecode=1054 ** Unknown
> column 'civicrm_group_contact.status' in 'field list']"] )
>
>
> Apr 27 10:25:32  [info] $backTrace = #0
> /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(232):
> CRM_Core_Error::backtrace("backTrace", TRUE)
> #1 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921):
> CRM_Core_Error::handle(Object(DB_Error))
> #2 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/DB.php(985):
> PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2),
> "SELECT contact_a.id as contact_id, contact_a.contact_type as
> `contact_type`, ...")
> #3 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575):
> DB_Error->__construct(-19, 16, (Array:2), "SELECT contact_a.id as
> contact_id, contact_a.contact_type as `contact_type`, ...")
> #4 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223):
> PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT
> contact_a.id as contact_id, contact_a.contact_type as `contact_type`,
> ...", "DB_Error", TRUE)
> #5 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905):
> PEAR->__call("raiseError", (Array:7))
> #6 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933):
> DB_common->raiseError(-19, NULL, NULL, "SELECT contact_a.id as
> contact_id, contact_a.contact_type as `contact_type`, ...", "1054 **
> Unknown column 'civicrm_group_contact.status' in 'field list'")
> #7 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403):
> DB_mysqli->mysqliRaiseError()
> #8 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216):
> DB_mysqli->simpleQuery("SELECT contact_a.id as contact_id,
> contact_a.contact_type as `contact_type`, ...")
> #9 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2446):
> DB_common->query("SELECT contact_a.id as contact_id,
> contact_a.contact_type as `contact_type`, ...")
> #10 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1635):
> DB_DataObject->_query("SELECT contact_a.id as contact_id,
> contact_a.contact_type as `contact_type`, ...")
> #11 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(392):
> DB_DataObject->query("SELECT contact_a.id as contact_id,
> contact_a.contact_type as `contact_type`, ...")
> #12 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1348):
> CRM_Core_DAO->query("SELECT contact_a.id as contact_id,
> contact_a.contact_type as `contact_type`, ...", TRUE)
> #13 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(4942):
> CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id,
> contact_a.contact_type as `contact_type`, ...")
> #14 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Selector.php(1181):
> CRM_Contact_BAO_Query->searchQuery(NULL, NULL, NULL, FALSE, FALSE,
> TRUE)
> #15 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/PagerAToZ.php(108):
> CRM_Contact_Selector->alphabetQuery()
> #16 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/PagerAToZ.php(136):
> CRM_Utils_PagerAToZ::getDynamicCharacters(Object(CRM_Contact_Selector),
> FALSE)
> #17 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/PagerAToZ.php(52):
> CRM_Utils_PagerAToZ::createLinks(Object(CRM_Contact_Selector), NULL,
> FALSE)
> #18 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Search.php(839):
> CRM_Utils_PagerAToZ::getAToZBar(Object(CRM_Contact_Selector), NULL)
> #19 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Search/Builder.php(414):
> CRM_Contact_Form_Search->postProcess()
> #20 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(447):
> CRM_Contact_Form_Search_Builder->postProcess()
> #21 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75):
> CRM_Core_Form->mainProcess()
> #22 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203):
> CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Builder),
> "refresh")
> #23 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103):
> HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Builder), "refresh")
> #24 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351):
> HTML_QuickForm_Page->handle("refresh")
> #25 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(309):
> CRM_Core_Controller->run((Array:4), (Array:0))
> #26 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84):
> CRM_Core_Invoke::runItem((Array:13))
> #27 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52):
> CRM_Core_Invoke::_invoke((Array:4))
> #28 /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm.php(1246):
> CRM_Core_Invoke::invoke((Array:4))
> #29 /home/coloradomaker/www/www/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
> #30 /home/coloradomaker/www/www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
> #31 /home/coloradomaker/www/www/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
> #32 /home/coloradomaker/www/www/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")

```

# Answer
> 2 votes
It should be fixed in the latest rc (5.2) https://download.civicrm.org/latest

From ChaosBuster: Was able to install the latest at this time, 5.1.2, and I am now able to query with the Search Builder for groups for the situation that was mentioned above.

# Answer
> 1 votes
This may be a bug in 5.0.0. The Drupal Demo site (and our 5.0.0 + Drupal 7 site) fails with a similar message if you try to do a search builder search for Contacts \> group = or \<\>. In our site, the error message also involves 'civicrm\_group\_contact.status' as an unknown field. Naturally, I can't see the log in the demo site, but the error reported on screen is the same.

I don't know how to post a bug... but hope this might help raise one! (I tried going to the issue tracker, but it's been moved to git hub and I couldn't spot how to report a bug there.)

# Answer
> 0 votes
If logging is enabled, try disabling logging and re-enabling logging. I had a somewhat similar error, but it's different enough that it may not be the same issue.

# Answer
> 0 votes
This may be related to my issue too \- in the meantime, i found (due to the great answer Jon gave) that doing search -\> custom search -\> include / exclude search - I was able to get the results I wanted.

---
Tags: upgrade, database, search-builder, 5.0
---


# Question
Title: How can I completely remove previous improperly uninstalled CiviVolunteer?
I'm trying to install the CiviVolunteer extension (Drupal 7, Civi 5), but am getting this error message in response:

Field: `name` must be unique. An conflicting entity already exists - id: 186

It looks like the developer had previously installed and enabled the extension, but then manually deleted it, without also removing the CiviVolunteer data from the database.

Any suggestions for how to clean up the leftover CiviVolunteer data, or another way that I can reinstall the extension?

* UPDATE -

No luck with executing the mysql commands (cannot find tables), and unable to reinstall the CiviVolunteer extension (which is ultimately what I'm after). Receiving the same error message as above, and this screen when I return to the extensions page:

# Answer
> 2 votes
This is going to sound weird, but what you need to do is add the extension files back into the extensions directory. Then refresh the extensions page so that it doesn't show that it is missing.

If you don't want to keep it or get an error still, after that, then next enable it again and let us know if you get an error message and what it is. From there, you can disable and uninstall it again and remove the extension files.

# Answer
> 3 votes
You could try having a look at the volunteer\_uninstall.sql file?

https://github.com/civicrm/org.civicrm.volunteer/blob/master/sql/volunteer\_uninstall.sql

# Answer
> 3 votes
OK. Had to manually delete all CiviVolunteer tables, values, etc. from the database, clear caches, completely remove the extension, and then download and install through the admin. Decidedly unsexy, but worked.

---
Tags: database, mysql, civivolunteer
---


title: How to Dedupe Records

text:
# Question
Title: How to Dedupe Records
I have one member who signed up 3 years in a row online. Every year he used a different variation of his name. How can I unify these files using the deduping mechanism?

# Answer
> 3 votes
There is detailed documentation here https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/

If you have your contacts in a Search result, then you can click on them both, and under ACTIONS find Merge Contacts which will take you to a page with url like

civicrm/contact/merge?reset=1&cid=112&oid=144

so the other option is to just paste that in to your url, change the to ids (ie the cid and the oid) and that will give you the screen with the two contacts ready to merge.

At that point you will have a 'flip' button if you want to merge the other way round.

Then repeat for the remaining two.

Note merging records with Membership data does not 'merge' that data, it can 'add' the membership records from one to the other - but you may need to manually adjust the start or end dates if you want to end up with just a single member record.

Also, for future, you should read up about Dedupe Rules and see if you can set this up to help avoid this situation. the other thing to note is if you are sending renewal reminders (manually or via Scheduled Reminders) and use a checksum then it helps avoid this situation as the link temporarily logs the contact in so there is no option to create a duplicate.

hope that helps.

---
Tags: duplicate-contacts, filesystem
---


title: Profile Directory in Wordpress

text:
# Question
Title: Profile Directory in Wordpress
I am seeing unusual behavior when trying to insert a profile as a directory on the front end of WP.

https://my.url.org/state-chairs/?page=CiviCRM&q=civicrm/profile&force=1&gid=21

https://my.url.org/states/?page=CiviCRM&q=civicrm/profile&force=1&gid=19

They should be showing two different data sets but are only showing the same data? I checked that the profile has the proper group selected.

Also it says as an admin I do not have permission to access this page: https://my.url.org/states/ When I visit there it says:

> Permission Denied You do not have permission to view this contact record. Contact the site administrator if you need assistance.

I am running CiviCRM 4.7.27 on WP 4.9.1. This is a multisite.

# Answer
> 2 votes
Ah, that moment when you bump into a question you figured out but I forgot I even posted it here.

There may be other methods but you should use the native CiviCRM profile link which you can find at Administer \> Profiles \> more \> Use- Listings Mode. This looks like: https://example.org/civicrm/?page=CiviCRM..." format or whatever you set your base page at.

The issue seems to be if you try and use a shortcode for this directory style listing and not use the CiviCRM base page. So, you can create a clean URL to redirect to the native CiviCRM profile link. Perhaps this is considered a workaround but it works :)

---
Tags: wordpress, profile
---


title: How to install wkhtmltopdf Libraries?

text:
# Question
Title: How to install wkhtmltopdf Libraries?
Drupal 7.59 / Civi 4.7.27

I use Views extensively, and would like to add https://www.drupal.org/project/views\_data\_export\_pdf module.

As per the Module documentation, a prerequisite is the installation of wkhtmltopdf Library (https://wkhtmltopdf.org/), which should result in the following structure :

* sites/all/libraries/phpwkhtmltopdf
* sites/all/libraries/phpwkhtmltopdf/scr
* sites/all/libraries/phpwkhtmltopdf/scr/Pdf.php

But I don't find those files in the wkhtmltox-0.12.4\_linux-generic-amd64.tar.xz dowload, especially no Pdf.php

I am not a programmer, and thus not familiar with Libraries installation : any help would be welcome

# Answer
> 0 votes
As Pete says, not really a Civi question ... but since it is here:

I think there is a typo in the installation instructions at https://www.drupal.org/project/views\_data\_export\_pdf

The first step reads:

> Place WkHtmlToPdf library under ...

but should be:

> Place phpwkhtmltopdf library under ...

phpwkhtmltopdf provides the php files you listed, not WkHtmlToPdf

Note also that 'scr' in the file list should be 'src'

---
Tags: drupal-views
---