# Question
Title: Is it possible to restrict event registration to members?
I've been trying to figure out how to set up events where only members can register. Is this possible?

What I'm looking for is the ability to:

* specify one or more memberships that can register for an event, and limit registration to those members.
* require authentication as part of registration for events where membership is required OR allow membership signup during registration
* not require authentication if the event registration is not limited to members only.

I'm running CiviCRM on Drupal, and I know I could set the Drupal permission for `CiviEvent: register for events` so that only logged-in users with a given role could register. I would then sync CiviCRM memberships with Drupal roles. But I only want to limit some events, not all, so this approach won't work.

Also, if I had multiple roles (one per membership), those roles would all need the same Register permission, meaning any member could register for any event, even those events should be limited to people holding a specific membership.

I also know that I could publish details of member-only events to just those members. But those members could share the registration URL with non-members, who could then register.

Any suggestions?

# Answer
The way I do this is by using the "Require participant approval?" feature in the event set up. This means that anyone can apply for the event, but then their application is manually reviewed by one of the admins to see if they are a member.

Clearly, this introduces a manual process, but it does mean it's quite secure and it means any anonymous user can apply without having to log in.
> 5 votes

# Answer
This extension allows you to restrict online registration to certain events to logged in members only but still have other events open to the public.

The extension allows you to set a flag to any event so registration is restricted to those that have a current membership.

https://civicrm.org/extensions/member-only-event
> 4 votes

# Answer
Use the Drupal module included in the CiviCRM tarball that synchs CiviCRM members to Drupal roles. Then set Drupal permissions on viewing the Event registration page to appropriate membership roles. For events not restricted to members, set the event page to be viewable by anonymous users.
> 3 votes

---
Tags: civievent, civimember, registration
---


title: Is CiviCRM a viable choice? 4 Questions

text:
# Question
Title: Is CiviCRM a viable choice? 4 Questions
I'm looking for a software for a non-profit organization, which should cover some special functions in addition to the 'normal' CRM functionality and wonder whether CiviCRM is suitable. I've been working in software development for a couple of years, mostly Java, but have no idea about Drupal, PHP, etc. I've installed and looked at CiviCRM, read some documentation, but have no clue if this (see below) can be done with CiviCRM out of the box or maybe with some own develpment.

One can imagine the scenario as follows: A school has modeled students and teachers as contacts. Each student belongs to exactly one class (about 8-14 students per class), lessons take place once a week, the class on a certain theme runs longterm, the students and sometimes the teachers change after a few months. Students can participate sequentially in one of about 20 classes. At each lesson, the presence of students is checked manually by means of a list.

1. Is it possible to model and manage the classes in a UI form like e.g. contacts as own data structures (room, date, theme, ...), building a new structure that does not yet exist in CiviCRM?
2. How best to describe the affiliation of a student/teacher to a class? Is there a possibility except 'Tags'?
3. The registration and deregistration of a student/teacher to a class must be logged. It must be possible to determine at any time which student has been in which class for how long.
4. For the purpose of attendance control of the lessons, a form must be printed out with the names of the students in the lessons, the lesson dates, etc. of a particular period (e.g., a month or quarter). This is filled in manually during the lesson (present yes / no). For this, a database query must determine the participants of the class and submit this list to a print template. Is there an example for this procedure?

Thank you for your comments!

# Answer
We have a site for students and schools/providers. it is all run off Relationships and Activities and I think some of how we approached this could assist your project.

I would make each Class a Contact, then you put a Relationship between the Teacher and the Class, and another one between the Class and the Student. That way a Teacher can change and it only requires one form to be submitted (end old Teacher relationship, create new one)

We built a customisation of CiviReports so a teacher can see all 'their' students (ie the ones in Class X that teacher has relationship to) and can submit the Attendance for all class students on a single form (this uses one Activity per week but could be modified for one Activity per class with 20 yes/no fields for the 'term')

Here are more specific answers:

> Is it possible to model and manage the classes in a UI form like e.g. contacts as own data structures (room, date, theme, ...), building a new structure that does not yet exist in CiviCRM?

I would attempt to do this with Class as an Org sub-type

> How best to describe the affiliation of a student/teacher to a class? Is there a possibility except 'Tags'?

Per my comments above, I would use Relationships (using our extension Permissioned Relationships so you benefit from ACL and 'second degree' relationship ACLs)

> The registration and deregistration of a student/teacher to a class must be logged. It must be possible to determine at any time which student has been in which class for how long.

Do as an Activity - possibly using an approach similar to our customised civireport interface so you can batch record attendance.

> For the purpose of attendance control of the lessons, a form must be printed out with the names of the students in the lessons, the lesson dates, etc. of a particular period (e.g., a month or quarter). This is filled in manually during the lesson (present yes / no). For this, a database query must determine the participants of the class and submit this list to a print template. Is there an example for this procedure?

This could either be done via a Smart Group 'export' or via a Drupal Views csv download.

NOTES

You haven't said anything about whether a Teacher 'should' only see their students, or if it at least would make is simpler for the teacher if they only see students they teach. using Permissioned Relationships delivers this simply but may not be required.

For our design, using Drupal, we build a lot of lists/forms using Views and Webforms so that the normal Teacher doesn't need to actually interact with CiviCRM itself. Everything they need is provided via Menu Blocks, with simple links to their lists of Classes, Students, forms that need submitting, Attendance Reports etc. Happy to explain more offline if that sounds useful. (petednz on chat.civicrm.org)
> 8 votes

---
Tags: evaluating-civicrm
---


title: How to remove Stripe without problems

text:
# Question
Title: How to remove Stripe without problems
A client stopped using Stripe in Civi (they're not using Civi for payments now) and switched to using Stripe only through their website (bad idea). So I disabled the extension, only to receive emails from Stripe saying that the webhook endpoint was failing. Enabling the extension made that problem go away but now I see error messages in the log like this: "*\[message\] =\> Error relating this subscription id (sub\_CdRU43deMhfO6T) to the one in civicrm\_stripe\_subscriptions*" I have no idea what this means so does anyone have a guide about what to do when removing Stripe from Civi? It seems there are things to do that I haven't done.

# Answer
You need to login to the stripe dashboard and disable the webhook. It has nothing to do with the CiviCRM side.
> 5 votes

---
Tags: stripe
---


# Question
Title: Problem caused by an incorrect translation in CiviGRANT
there is a problem in CiviGrant (Italian) translation for CiviCRM 5.0 and later versions (also at the code level?) that seems to cause problems to the application.

Infact, both for CiviContribute and CiviGrant component, both in the main and secondary menu, now the translation is: "CONTRIBUTI" and this:

1. generates confusion, especially in tokens application (and it is semantically no correct).
2. **but above all, it causes a malfunction of the application and the two modules can not be activated at the same time (!!!)**

In CiviCRM 4.7: “Grants” was more correctly translated in: “Contributi/Prestiti” (on, better, in “Finanziamenti”)

However the best translation for “GRANTs” is:

• SOVVENZIONI

**These are the problems:**

1. As reported here **the tab "contributions" often disappears from the summary tab**, especially when it is necessary to act also for other reasons in "dispaly preferences" (for example: to activate and deactivate pop-ups).

It is necessary to use the work-arround that I have suggested (switch from Italian to English and put the flag on "contributions" again, then go back to Italian) to make the contributions tab appear.

**However, in new (Wordpress) CiviCRM 5.5.3 installations** (our other instances are the result of an upgrade) **this work-arround does not work and the "contributions" tab never appears.**

To solve I had to apply a second work-arround: disable the CiviGrant module and edit in *MySQL civicrm\_option\_value* the label from "contributions" to "grants".

In any case, the label disappears but at least I can reactivate it with the first work-arround.
2. **In Advanced Search only the Contributions section (Grants) and not Contributions (real Contributions) appear.**

It is necessary to disable the Contributions component (Grant) in order to see the (real) Contributions section. :(

How do you think we can solve this problem?

Thx&Bye.

# Answer
I know the translation of CiviCRM in different languages is done by community members using Transifex: https://www.transifex.com/civicrm/civicrm/

Personally I have never really looked at this but I would reckon contacting the translation working group (https://civicrm.org/working-groups/translation) on MatterMost here: https://chat.civicrm.org/civicrm/ and offer to make this change will probably be a good step :-)
> 3 votes

---
Tags: civicontribute, civigrant
---


# Question
Title: Feature request: Make Checksum tokens easier to use
Checksum tokens are arguably one of the coolest yet most overlooked features of CiviCRM. It allows you to send targeted emails for donations, membership and event registration in a way that

* increased user response/convenience because the form is pre-filled
* preserves your data by reducing duplicates (when the same person enters another email and/or name)

But checksum is tricky to use, not obvious to the end user, and easily forgotten by users who know about it. Let's make it more visible and easier.

Here are instructions I recently gave to a client who has been using CiviCRM for 9 years, and struggles to understand or use Checksum.

> Note: You can use a token to auto-fill their info on event forms! Where 'XXX' is the id# of the event, copy-paste this registration link.
>
> https://myorg.org/civicrm/event/register?reset=1&id=XXX&{contact.checksum}&cid={contact.contact\_id}
>
> Highlight text such as "Register Now", click the Link icon, and paste in the above link, *after* replacing XXX with the real ID#.

Wow, right? That's a lot to wrap your head around if you're a non-techie, isn't it?

Idea: when entering a link that links to your own CiviCRM (base\_url) that is a registration page, contribution page, or profile, popup a "Would you like to tokenize this link?" dialogue. It then adds the token without the copy paste.

# Answer
These two extensions should assist -

1. https://civicrm.org/extensions/contact-checksum-ui
2. https://civicrm.org/extensions/fancy-tokens

The second extension provides tokens for all active contribution pages and active events with online registration enabled.
> 7 votes

---
Tags: civievent, civimember, contribution-page, tokens, checksum
---


# Question
Title: Two payment processors options on one webform
Different payment processors offer different options that we would like to have available from a single form. Is it possible to have different payment processors engaged from different form options on the same form? So e.g. if you select a recurring payment the form uses GoCardless, and otherwise it uses Paypal?

# Answer
You can use multiple payment processor on a contribution or membership or event registration online forms. However the user will need to manually select which payment processor he would like to choose or you can add custom javascript to hide payment processor selection and set the payment process based on the selection of recurring option or membership they choose. This is same on offline forms as well.

HTH

Pradeep
> 2 votes

---
Tags: webform-civicrm, payment-processor, recurring-contributions
---


# Question
Title: Is there anyway to search on a non-primary email address?
Right now, as far as I can tell and from what I've seen in old issues and current jira issue, searches only search for primary email address. Worried about performance issues.

So it appears there is no way to search any email address that isn't marked as the primary other than writing sql or a custom search.

Maybe I'm missing something and there is a way. If not, to me this is major weakness, but maybe I'm alone in my thinking. The issue has been out there for 6 years and was last put off until after 4.7 so maybe it isn't a big deal for most people.

# Answer
> 4 votes
Under CiviCRM search preferences, there’s an option “Search Primary Details Only” which is defaulted to “Yes”. /civicrm/admin/setting/search?reset=1

Setting this option to “No” will allow you to search on any location type via advanced search.

Tip - Searching for a non-primary email address via the quick search will not display results as you type, however pressing enter once you've typed the email address in the quick search box will produce expected results for non-primary email addresses.

Info on this setting - If enabled, only primary details (eg contact's primary email, phone, etc) will be included in Basic and Advanced Search results. Disabling this feature will allow users to match contacts using any email, phone etc detail.

# Answer
> 4 votes
In Search Builder (Top menu \> Search \> Search Builder), you can specify which type of email address you would like to search for (on the demo: Home, Work, Main, etc.). By linking the searches with "Also include contacts where", you can specify each type to include (see image). It doesn't cover the specific search "emails that are not marked primary," but it will search emails that are not primary along with the primary ones as well.

# Answer
> 4 votes
There's an extension for this that provides a custom search called Any Telephone or Email.

Powerbase, the CiviCRM distribution from Progressive Technology Project, cleverly has a custom Drupal module to display a search block that exposes this custom search at all times.

However, the Powerbase Drupal module also does many other things specific to their install - so a little while back, I stripped out all the code except that necessary to expose this custom search in a block. I've just uploaded it to Github here.

---
Tags: email, search
---


title: How to Modify CiviCRM settings file

text:
# Question
Title: How to Modify CiviCRM settings file
How can I modify the CiviCRM settings file so that the CiviCRM extension directory is set using settings files variables. Thanks!

# Answer
> 1 votes
You can use $civicrm\_setting variable to over-ride your CiviCRM settings. You can find documentation here.

To set extension directory you can use below snippet

```
global $civicrm_setting;
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/var/www/html/trcbtp/drupal/sites/default/civicrm_extensions';

```

You can also use civicrm token variable for dynamic path

```
1. [cms.root]
2. [civicrm.root]
3. [civicrm.files]

```

HTH

Pradeep

---
Tags: settings, files
---


# Question
Title: Unable to CANCEL or DELETE a Scheduled Mailing (Mosaico is installed)
With either a Send Now or Scheduled mailing (Mosaico created) I unable to Cancel or Delete the Mailing in the Find Mailings page.

Using WordPress 4.9.4, CiviCRM 4.7.30 and the following related extensions: Angular Profiles (org.civicrm.angularprofiles) version 4.7.31-1.1.0 FlexMailer (org.civicrm.flexmailer) version 0.2-alpha5 CiviCRM Bootstrap theme (org.civicrm.shoreditch) version 0.1-alpha16 Mosaico (uk.co.vedaconsulting.mosaico) version 2.0-beta3.1512698300

When I click Cancel for the Scheduled mailing on the Find Mailings page, I received the following dialog:

And then the following dialog:

Then it returns me to the Find Mailings page with no change to the mailing. I've tried to refresh the screen also to see if there was a delay.

# April 4/22/2018 Update:

Providing the following additional information to this problem as it might be related. I am also unable to delete a mailing using the DELETE action on the *Draft / Unscheduled Mailings* listing. I AM able to delete the mailing if I click CONTINUE from the listing page and then select DELETE DRAFT when viewing the individual mailing. The link that the DELETE action is posting when on the listing page is:

http://myorganization.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/mailing/browse&action=delete&mid=16&reset=1&confirmed=1

and the page says that the Link has expired:

# Answer
If you use the Events Manger plugin try navigating to `https://yoursite.com/wp-admin/edit.php?post_type=event&page=events-manager-options&action=update&update_action=timezone-backcompat` if you see a description about the timezone settings with a button to **Finalise Upgrade** on that page, it's likely the issue is caused by a non completed update of the Events Manager plugin.

Click on Finalise Upgrade, after the upgrade is completed you should be able to cancel/delete scheduled/unscheduled mailings.
> 2 votes

# Answer
Have you tried enabling pop up forms at Administer -- customize data and screens --- display preferences -- enable popup forms

If it still does not work with pop up forms enabled - have you tried disabling wordpress plugins one at a time to see if there are any conflicts? I was not able to replicate this on two wordpress civicrm sites with a similar setup (using shoreditch alpha 17, but I doubt that makes a difference.)
> 0 votes

# Answer
Fuzion did some work to add some new functionality namely a PAUSE function for mailings - github.com/civicrm/civicrm-core/pull/11803 - needs some more input and testing if anyone is interested
> 0 votes

---
Tags: civimail, mailing, mosaico
---


# Question
Title: Search for cancelled Paypal recurring contributions
We want to see reports on how recurring contributions through Paypal are being lost (e.g. due to cancellation, or card expiry). Using the Search function on civiCRM 4.6.38 I set the parameters as follows:

* "Contribution is Recurring" Yes: returns 208 contacts

then search again with: \- "Contributions Status" is "Cancelled": returns 0

then search again with: \- "Contributions Status" is "Failed": returns 0

We receive reports from Paypal which confirm that recurring contributions are failing, so there should be some way to search for people who's Recurring Contributions stop. Any ideas?

# Answer
There are several things things at play here:

1. Before v 4.7, when recurring contributions failed, an installment was not created - this behavior was changed as of 4.7 as described **HERE**, so this explains why you aren't finding any failed contributions in your system
2. Using basic searches on contributions will result only in the installments (i.e. individual contributions) - not the actual subscription, so unless you edited an installment and marked the status as "Cancelled", this explains why you aren't finding any cancelled recurring contributions in your system - there is a report that will allow you to search on and view the status of the subscription itself in CiviCRM, but not sure as of which version the report was made available - check to see if you have a "Recurring Contributions Report" available to you under Administer \> CiviReport \> Create Reports from Template \> Contribution Reports
3. Even if you do have this report, other than the initial creation of the recurring contribution, no further information is communicated from CiviCRM to PayPal, nor are changes to the recurring subscriptions directly on PayPal reported to CiviCRM - you would need to update the corresponding recurring contribution manually in CiviCRM to reflect the those changes (being sure not to toggle the "Notify PayPal" option when doing so b/c this will return an error since it has already been cancelled on PayPal)
4. There was a point in time where cancellation of a recurring contribution from CiviCRM was not communicated to PayPal, and I'm not sure if this was ever resolved, so to play things safe, if you cancel a recurring subscription in CiviCRM first and toggle the "Notify PayPal" option, log into PayPal to confirm that the corresponding recurring subscription was indeed cancelled
5. You need to login directly to PayPal to make changes to the payment amount, card, frequency, etc. for those to take effect - you are also able (if memory serves me correctly) to make those changes in CiviCRM, but again, these changes are not communicated to the payment processor

Hope this helps! Tamar
> 2 votes

---
Tags: recurring-contributions
---


title: Custom Data and Screens

text:
# Question
Title: Custom Data and Screens
I have created a Custom Data field of the field type Alphanumeric Select with 3 selectable options - I want to be able to edit the options that can be selected, but when I try I get an error

"This option group is reserved for system use. You cannot add or delete options in this list."

What can I do to allow edits to the list

WordPress 5.5.8 and CiviCRM 5.5.1

# Answer
The only way to designate an option group as reserved is to do so directly through the database - there is no option to do this through the UI either when it is created via a multiple-choice custom data field or when added directly via Administer \> System Settings \> Option Groups - there might be a reason that this option group was flagged as reserved, so you might wish to ask whoever is responsible for administering CiviCRM to shed light on the reason and/or ask them to remove the reserved flag altogether so that you can make changes when needed.

Hope this helps, Tamar
> 1 votes

---
Tags: wordpress, permissions
---


# Question
Title: Thousands of new contact records created from CiviMail (Postfix/Gmail?) mis-configuration
I have read documentation, but still am having a hard time understanding how I should change my configuration to fix this issue, esp. without causing other problems. Basically all seems to be working OK including CiviCRM tagging contact email addresses as non-deliverable (on hold). The issue I am having is CiviCRM is creating thousands of contacts each week with an email like civimail+b.4172.482888.045236909fb52f54@watershedmg.org. Each one is connected to a contact called (Mail Delivery System) through an activity. The activity type is "Inbound Email" and the subject is "Undelivered Mail Returned to Sender".

We are using Sendmail() to send bulk emails to our members and supporters, usually these number in the 1000s per week. We have a catchall@ email address that is seemingly working correctly to handle bounces. Here is our Mail Accounts setup.

Should I just delete the "default" email-to-activity entry since we don't use that feature? Is it needed for something other than "email-to-activity"? I seem to recall an email tech contractor telling us it was important for something that I don't recall.

All contact records that are created have civimail+b(...) and not catchall+b(...) even though the created contacts seems to be related to bounce emails coming to catchall@ email with "MAILER-DAEMON@watershedmg.org" as the sending email.

Any help is greatly appreciated.

---

As a side note is it bad to use Sendmail to send 1000s of emails vs mail()? That is how it has been set up for many years and I see now it says it's only kept around for older version of CiviCRM. It seems to be working OK.

(Drupal 7, CiviCRM 5.5.1, Debian 8, PHP 5.6, Postfix)

# Answer
You say: Should I just delete the "default" email-to-activity entry

AFAIk there is no such default. Looking in dmaster.demo.civicrm.org i do not see one

https://dmaster.demo.civicrm.org/civicrm/admin/mailSettings?reset=1

I don't know that you need to delete it but changing the email address it uses should stop the problem.
> 1 votes

---
Tags: civimail
---


title: Where can I edit text on pcp page

text:
# Question
Title: Where can I edit text on pcp page
How do I change this text “This contribution is being made thanks to the effort of \[contact name\], who supports our campaign.You can support it as well - once you complete the donation, you will be able to create your own Personal Campaign Page!”

I’ve searched high and low - every tpl file in contribute/pcp etc Is it hardwired somewhere?

Thanks all.

# Answer
> 2 votes
Lesley,

This is set in php and then assigned to tpl. It's being set from two places CRM/Contribute/Form/Contribution/Main.php and CRM/PCP/BAO/PCP.php. Since its being assigned to tpl through php then its pretty simple and easy to change the text using either preprocess/buildform/postprocess hook by over-riding the tpl variable.

Here are list of lines that uses the variable to print the text

```
templates//CRM/Contribute/Form/Contribution/Main.tpl:177:    {if $pcpSupporterText}
templates//CRM/Contribute/Form/Contribution/Main.tpl:178:    <div class="crm-public-form-item crm-section pcpSupporterText-section">
templates//CRM/Contribute/Form/Contribution/Main.tpl:180:      <div class="content">{$pcpSupporterText}</div>
templates//CRM/Event/Form/Registration/Register.tpl:61:    {if $pcpSupporterText}
templates//CRM/Event/Form/Registration/Register.tpl:62:      <div class="crm-public-form-item crm-section pcpSupporterText-section">
templates//CRM/Event/Form/Registration/Register.tpl:63:        <div class="content">{$pcpSupporterText}</div>

```

If you not familiar with using php then you can JS to replace the text. Here is what i would do

1. Create a Main.extra.tpl under `templates/CRM/Contribute/Form/Contribution/` (custom template directory or extension)
2. Add below snippet in Main.extra

Snippet:

```
{if $pcpSupporterText}
<div class='crm-pcp_supporter_text_replace'>
  <div class='content'>
    {ts}Text to print{/ts}
  </div>
</div>

{literal}
  <script type="text/javascript">
    CRM.$(function($) {
      $("div.pcpSupporterText-section .content").replaceWith($('.crm-pcp_supporter_text_replace .content'));
    });
  </script>
{/literal}

{/if}

```

HTH

Pradeep

# Answer
> 1 votes
Lesley - better to write this in an extension rather than overriding a core file. You can place the below hook in any of your custom extension or create one using civix

As Peter Davis said in the comment, we just made this changes for one of our client using -

```
function example_civicrm_buildForm($formName, &$form) {
  if ($formName == 'CRM_Contribute_Form_Contribution_Main' && !empty($form->_pcpId)) {
    $form->assign('pcpSupporterText', 'your custom pcp text');
  }
}

```

---
Tags: custom-templates, pcp
---


# Question
Title: Civi 5.6.0 - wrong css z-index on Activities page when creating/viewing activity
CiviCRM 5.6.0 Joomla 3.8.12 php 7.0.32

On the activities tab of a contact, when you create or view an activity, the panel which pops up is displayed behind the black CiviCRM menu bar, and also behind the main Joomla menu bar. The same happens with when you view an activity in the Find Activities results page.

Not a big deal, but needs fixing.

Update: it's not only the activities page/tab. It seems to be every page. Wherever there's a pop-up window or a pull-down menu, the black CiviCRM menu is in front of it.

# Answer
> 1 votes
Jern,

This is because of Joomla theme css might be conflicting with CiviCRM css. Try switching the theme to default one if you can replicate the same issue. I tried on my local machine on 5.6.0 and couldn't replicate the issue. Also try to perform CiviCRM cleanup cache if it helps.

Try after reverting the commit in your core file.

---
Tags: activities, css
---


# Question
Title: CiviEvent: possible to trigger an email to event organizer when participant count reaches a certain number?
I'd like to be able to notify organizers when a certain number of participants have registered. I don't want to shut down registration or offer a waiting list to participants, I just need the staff notified via email.

Is there a way to do this out-of-the-box? Could I do this with the CiviRules component? If not, other suggestions on hooks/customizations welcome.

Thanks!

System deets: Joomla 3.8.12, CiviCRM 5.3.1

# Answer
It can be easily done using hooks. Max participant is stored in civicrm\_event table, so you need to fetch the value and then compare it with the count of participants registered in this event. All this check should be done after a participant is created. So, you could use post hook for the same. Sample(not tested) code is shown below -

```
function example_civicrm_post($op, $objectName, $objectId, &$objectRef) {
  if ($op == 'create' && $objectName == 'Participant') {
    //check the count of participant in the event
    $participantCount = civicrm_api3('Participant', 'getcount', [
      'event_id' => $objectRef->event_id,
    ]);

    //Compare it with the max participant value
    $max = civicrm_api3('Event', 'getvalue', [
      'return' => "max_participants",
      'id' => 1,
    ]);

    //If max equals the count, send an email
    if ($max == $participantCount) {
      //send email to xyz@example.com
    }
  }
}

```
> 1 votes

---
Tags: civievent, email, civirules, participants
---


title: Civicase- order results in find case

text:
# Question
Title: Civicase- order results in find case
Following links in Civicase dashboard (4.6.38) normally takes you through to a set of search results in the Find Cases search.

Initially cases are displayed by client name, alphabetically.

There are options to order by most recent activity date, or next scheduled activity date. When used neither of these display as expected. Results list neother in activity type order, or date order.

On closer inspection using the sort arrows by either options sorts the results in case id order.

Just checked and this behaviour is the same in sandbox.

1) Is this a known bug? If not which project should I post it in in the new tracker pages?

2) Anyone got any workarounds?fixes for this?

Cheers

Craig

# Answer
> 1 votes
I think this issue may explain what's causing the issue in how it's ordering (or not ordering) https://issues.civicrm.org/jira/browse/CRM-17708

Not a solution but maybe a little further understanding.

---
Tags: civicase, search
---


title: Multi-value fields in profile

text:
# Question
Title: Multi-value fields in profile
Can someone explain to me step by step, please, how to create the multivalue fields illustrated in the User Guide under the title Multi-value fields in profiles? (It shows work experience list, but I wish to use it for something else. However I do not understand even how to create this work experience list!) Thanks! Mike Somorjay

# Answer
Multi-value fields can only be created on the Contact entity, which may be what's confusing. Here are the steps (with screenshots):

* **Administer menu » Customize Data and Screens » Custom Fields**.
* Click **Add Set of Custom Fields**.
* Set *Used For* to "Contacts".
* Check the box *Does this Custom Field Set allow multiple records?*
> 1 votes

# Answer
Seems to be a duplicate of Edit Multi-Value / Multi-Record Fields in Profiles

It's only possible to add multiple-value field in profile in edit mode (not in create mode), i.e. the contact must already exists in the database and the link should be https://example.org/civicrm/profile/edit?gid=XX&reset=1&id=YY with XX=`profile ID` and YY=`contact ID`.

You might want to add a checksum if you don't want your user to log in.

**EDIT 2018-10-09**: checksum doesn't work because the link to the edit popup doesn't get the checksum

**For reference**, the documentation that is mentioned in the question is :

> https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/#multi-value-fields-in-profiles
> 0 votes

---
Tags: profile
---


# Question
Title: Volunteer Report Throws "DB Error: unknown error"
Seemingly no matter what options I choose on the Volunteer Report it throws the error "DB Error: unknown error" and I don't see anything in the Apache error logs.

What's the best way to troubleshoot this and see the actual error? Thanks.

# Answer
You are looking in the wrong place.

Check your PHP logs on your webserver.

Check the civicrm logs in /civicrm/ConfigAndLog or wherever you have configured that folder.
> 2 votes

---
Tags: civivolunteer, reports
---


# Question
Title: What's the deal with the CiviCRM election? Am I eligible to vote/run?
There's a CiviCRM election I heard about. What's the deal? How do I vote or run for a position?

# Answer
> 3 votes
The current election (October 2018) is to determine the structure of a board to oversee the CiviCRM project. It will determine what the permanent board's mandate is as well as its structure.

You can register to vote until October 18th and/or stand for election until October 15th. This blog post has details.

---
Tags: community
---


# Question
Title: Tags, relationships, or custom fields to record custom data?
Apologies if this isn't the best place to ask, I'm completely new to CiviCRM and could do with some advice on the best way to store custom data.

I'm building a database of churches. For each church I want to record the denomination. Depending on the denomination, there are other details I also want to record. For example, for anglican churches I want to record the diocese, and for some dioceses I want to record further administrative subdivisions that churches belong to. But other denominations don't have those structures, and might have completely different ones. And some churches belong to more than one denomination, so might need the full structure details for two or even three of them.

As far as I can see there are three different ways I could organise that data:

1. Using custom fields. I could create a multiple record fieldset allowing me to record more than one denomination for each church. But then how would I store the different structures for the different denominations?
2. Using tags. I could create tags for every different level of every denomination in the database, so for example a church could be tagged with 'Anglican, Leeds Diocese, Bradford Episcopal Area'. But then the tags would exist for any contact in the database, not just churches, which could lead to a lot of clutter and confusion among users, particularly as the database grows.
3. Using relationships. I could create organisational contacts for denominations and dioceses, and then use a relationship to associate, e.g. X church is a member of Methodism, or Y church is a member of Southwalk Diocese which is a member of Anglicanism. But I think that will also be confusing for users, particularly when adding a church from a new diocese/denomination, and could lead to lots of shadow contacts that only exist for the purpose of categorisation rather than as actual contacts.

I'm leaning towards custom fields, but the only way I can see of getting the result I want would be to have a different contact type for each denomination, and then a fieldset for the relevant structural information on each contact type. Which would mean the denomination would have to be filled in by users in a box headed 'Contact Type' instead of a box headed 'Denomination', and that it would be mixed in with other non-church contact types.

What would be the best practice method?

# Answer
> 1 votes
The best architecture would be to create Organisation sub type and then have relationship with subtype contacts. This would be easy to related contacts such as in your case. Adding relationship will be consistent and easy to add custom ACL.

If you want to use custom fields than you will need to create multi-value custom field of type contact reference for each contact sub type. This field will pull contact(s) from specific contact group which can be smart group or normal group having contacts of specific contact type. In this way you can create hierarchy of relationship using contact type.

But i believe you will need to add some custom code i.e either building custom report or restricting contact CRUD operation for user belonging to specific denomination.

---
Tags: custom-fields, relationships, tags, best-practice, contact-types
---


title: Trouble searching for deleted cases

text:
# Question
Title: Trouble searching for deleted cases
In Civi 5.5.3 (Drupal 7.59) I'm running into an error trying to search for deleted cases. In case search with our without additional parameters set, if I check the "Deleted Cases" box I get an error page (generic HTTP 500 page).

In the system logs I get this:

```
PHP Fatal error:  Undefined class constant 'TASK_DELETE' in /mysite/sites/all/modules/civicrm/CRM/Case/Form/Search.php on line 180, referer: mysite.org/civicrm/case/search?reset=1

```

I'm unable to replicate this on the Demo site because I could only find a 5.3.1 Demo. There is deleted case bug on 5.3.1 but that is a different behavior and has a fix that has already been implemented in 5.5.3 https://lab.civicrm.org/dev/core/commit/2ff620ae263a6c7430730d9b59261ec2b400b063

I need a little help tracking down why the TASK\_DELETE is undefined.

The search works in 4.6.38 and I can see the buildQuickForm function was being re-jiggered in the Search file starting in 4.7. (From 5.0 and up it looks just as it does in 5.5.3)

```
  public function buildQuickForm() {
    parent::buildQuickForm();
    $this->addSortNameField();

    CRM_Case_BAO_Query::buildSearchForm($this);

    $rows = $this->get('rows');
    if (is_array($rows)) {
      if (!$this->_single) {
        $this->addRowSelectors($rows);
      }

      $tasks = CRM_Case_Task::permissionedTaskTitles(CRM_Core_Permission::getPermission());

      if (!empty($this->_formValues['case_deleted'])) {
        unset($tasks[CRM_Case_Task::TASK_DELETE]);
      }
      else {
        unset($tasks[CRM_Case_Task::RESTORE_CASES]);
      }

      $this->addTaskMenu($tasks);
    }

  }

```

In the Case \> Task.php file, I see the TASK\_DELETE

```
class CRM_Case_Task extends CRM_Core_Task {

...

public static function tasks() {
        if (!self::$_tasks) {
          self::$_tasks = array(
            self::TASK_DELETE => array(
              'title' => ts('Delete cases'),
              'class' => 'CRM_Case_Form_Task_Delete',
              'result' => FALSE,
            ),
...

```

Is there some formatting error I'm overlooking? Does anyone else get this error?

# Answer
It's defined in CRM\_Core\_Task, not CRM\_Case\_Task, so that reference in buildQuickForm maybe should be CRM\_Core\_Task::TASK\_DELETE. I'm not sure off the top of my head how php handles static inheritance for constants. It might be a difference with your version of php, since it seems to work on dmaster.demo.civicrm.org.
> 1 votes

---
Tags: civicase, search
---


# Question
Title: Error with CiviVolunteer after upgrading to PHP 7.1
Via permissions page and system status page.

```
Warning: Declaration of CRM_Volunteer_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) in /home/site/public_html/wp-content/uploads/civicrm/ext/org.civicrm.volunteer/CRM/Volunteer/Permission.php on line 0

```

Civi 5.6 Wordpress 4.9.8

# Answer
> 3 votes
CiviVolunteer is not fully tested for 5.x version and might have compatibility issue like you are facing. This issue has been fixed and is probably waiting in PR queue for it to get merged in next release.

You can either download the patch from here or wait for next release.

HTH

Pradeep

---
Tags: php, civivolunteer
---


# Question
Title: Feature request: Make search more forgiving and spaces after comma and non-primary emails
Two longstanding inconvenient issues about the search:

1. it does not locate non-primary emails (see attached)
2. if you fail to place a space between the lastname, firstname it will not return any results

The feedback I get from users (particularly new ones) is that this is quite flummoxing, while experienced users tend to overlook this as "the way it has been" and not see it as a problem.

# Answer
> 1 votes
Answer to first question: There is an extension that allows one to seaech for any telephone or email by location: https://github.com/JMAConsulting/biz.jmaconsulting.search.anyteloremail

My guess is that it should still work even though it is only marked as working for 4.5 and 4.4. Please open an issue in github repo if there is a problem and we will update it. To have this search ability added to core searches, I'd recommend getting agreement after opening a gitlab issue.

---
Tags: search, primary
---


title: Upgrade to 5.4.0 Fields Not Loading

text:
# Question
Title: Upgrade to 5.4.0 Fields Not Loading
I'm on Drupal 7 CiviCRM 5.2.0. I've updated to 5.4.0 and received no errors. However, I started seeing that icons on the civimenu are not showing. When I lookup a contact, everything seems fine, but then my custom fields in each tabs are not showing (even though the count number is still there, e.g., Relationships 5). Very strange.

I also checked the Resource URLs, cleared caches and update paths, cleared Drupal cache, and nothing is working. Is there something I'm missing?

Tracking of All Errors

```
Uncaught SyntaxError: Unexpected token <
view?reset=1&cid=963:1 Refused to execute script from '[domain]/civicrm/contact/undefinedbower_components/jstree/dist/jstree.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
view?reset=1&cid=963:1 Refused to execute script from '[domain]/civicrm/contact/undefinedjs/jquery/jquery.crmAjaxTable.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

$Fatal Error Details = array(3) { ["message"]=> string(23) "DB Error: no such field" ["code"]=> NULL ["exception"]=> object(CiviCRM_API3_Exception)#231 (8) { ["extraParams":"CiviCRM_API3_Exception":private]=> array(6) { ["error_code"]=> string(13) "no such field" ["sql"]=> string(1093) "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.frontend_title as `frontend_title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`, a.limit_listings_group_id as `limit_listings_group_id`, a.post_URL as `post_URL`, a.add_to_group_id as `add_to_group_id`, a.add_captcha as `add_captcha`, a.is_map as `is_map`, a.is_edit_link as `is_edit_link`, a.is_uf_link as `is_uf_link`, a.is_update_dupe as `is_update_dupe`, a.cancel_URL as `cancel_URL`, a.is_cms_user as `is_cms_user`, a.notify as `notify`, a.is_reserved as `is_reserved`, a.name as `name`, a.created_id as `created_id`, a.created_date as `created_date`, a.is_proximity_search as `is_proximity_search`, a.cancel_button_text as `cancel_button_text`, a.submit_button_text as `submit_button_text`, a.add_cancel_button as `add_cancel_button` FROM civicrm_uf_group a WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1") LIMIT 25 OFFSET 0 [nativecode=1054 ** Unknown column 'a.frontend_title' in 'field list']" ["tip"]=> string(62) "add debug=1 to your API call to have more info about the error" ["is_error"]=> int(1) ["error_message"]=> string(23) "DB Error: no such field" ["debug_information"]=> string(1093) "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.frontend_title as `frontend_title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`, a.limit_listings_group_id as `limit_listings_group_id`, a.post_URL as `post_URL`, a.add_to_group_id as `add_to_group_id`, a.add_captcha as `add_captcha`, a.is_map as `is_map`, a.is_edit_link as `is_edit_link`, a.is_uf_link as `is_uf_link`, a.is_update_dupe as `is_update_dupe`, a.cancel_URL as `cancel_URL`, a.is_cms_user as `is_cms_user`, a.notify as `notify`, a.is_reserved as `is_reserved`, a.name as `name`, a.created_id as `created_id`, a.created_date as `created_date`, a.is_proximity_search as `is_proximity_search`, a.cancel_button_text as `cancel_button_text`, a.submit_button_text as `submit_button_text`, a.add_cancel_button as `add_cancel_button` FROM civicrm_uf_group a WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1") LIMIT 25 OFFSET 0 [nativecode=1054 ** Unknown column 'a.frontend_title' in 'field list']" } ["message":protected]=> string(23) "DB Error: no such field" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(64) "/home/jj/public_html/z/dev/sites/all/modules/civicrm/api/api.php" ["line":protected]=> int(45) ["trace":"Exception":private]=> array(10) { [0]=> array(4) { ["file"]=> string(77) "/home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php" ["line"]=> int(3340) ["function"]=> string(12) "civicrm_api3" ["args"]=> array(3) { [0]=> &string(8) "uf_group" [1]=> &string(3) "get" [2]=> &array(2) { ["name"]=> array(1) { ["IN"]=> array(3) { [0]=> string(14) "new_individual" [1]=> string(16) "new_organization" [2]=> string(13) "new_household" } } ["is_active"]=> int(1) } } } [1]=> array(6) { ["file"]=> string(75) "/home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Resources.php" ["line"]=> int(689) ["function"]=> string(14) "getCreateLinks" ["class"]=> string(20) "CRM_Core_BAO_UFGroup" ["type"]=> string(2) "::" ["args"]=> array(0) { } } [2]=> array(4) { ["function"]=> string(20) "outputLocalizationJS" ["class"]=> string(18) "CRM_Core_Resources" ["type"]=> string(2) "::" ["args"]=> array(0) { } } [3]=> array(4) { ["file"]=> string(72) "/home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Invoke.php" ["line"]=> int(275) ["function"]=> string(14) "call_user_func" ["args"]=> array(1) { [0]=> &array(2) { [0]=> string(18) "CRM_Core_Resources" [1]=> string(20) "outputLocalizationJS" } } } [4]=> array(6) { ["file"]=> string(72) "/home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Invoke.php" ["line"]=> int(84) ["function"]=> string(7) "runItem" ["class"]=> string(15) "CRM_Core_Invoke" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &array(12) { ["id"]=> string(3) "112" ["domain_id"]=> string(1) "1" ["path"]=> string(20) "civicrm/ajax/l10n-js" ["access_callback"]=> string(1) "1" ["access_arguments"]=> array(2) { [0]=> array(1) { [0]=> string(14) "access CiviCRM" } [1]=> string(3) "and" } ["page_callback"]=> array(2) { [0]=> string(18) "CRM_Core_Resources" [1]=> string(20) "outputLocalizationJS" } ["breadcrumb"]=> array(1) { [0]=> array(2) { ["title"]=> string(7) "CiviCRM" ["url"]=> string(22) "/z/dev/civicrm?reset=1" } } ["is_ssl"]=> string(1) "0" ["weight"]=> string(1) "1" ["type"]=> string(1) "1" ["page_type"]=> string(1) "0" ["page_arguments"]=> bool(false) } } } [5]=> array(6) { ["file"]=> string(72) "/home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Invoke.php" ["line"]=> int(52) ["function"]=> string(7) "_invoke" ["class"]=> string(15) "CRM_Core_Invoke" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &array(4) { [0]=> string(7) "civicrm" [1]=> string(4) "ajax" [2]=> string(7) "l10n-js" [3]=> string(5) "en_US" } } } [6]=> array(6) { ["file"]=> string(74) "/home/jj/public_html/z/dev/sites/all/modules/civicrm/drupal/civicrm.module" ["line"]=> int(445) ["function"]=> string(6) "invoke" ["class"]=> string(15) "CRM_Core_Invoke" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &array(4) { [0]=> string(7) "civicrm" [1]=> string(4) "ajax" [2]=> string(7) "l10n-js" [3]=> string(5) "en_US" } } } [7]=> array(2) { ["function"]=> string(14) "civicrm_invoke" ["args"]=> array(3) { [0]=> &string(4) "ajax" [1]=> &string(7) "l10n-js" [2]=> &string(5) "en_US" } } [8]=> array(4) { ["file"]=> string(44) "/home/jj/public_html/z/dev/includes/menu.inc" ["line"]=> int(527) ["function"]=> string(20) "call_user_func_array" ["args"]=> array(2) { [0]=> &string(14) "civicrm_invoke" [1]=> &array(3) { [0]=> string(4) "ajax" [1]=> string(7) "l10n-js" [2]=> string(5) "en_US" } } } [9]=> array(4) { ["file"]=> string(36) "/home/jj/public_html/z/dev/index.php" ["line"]=> int(21) ["function"]=> string(27) "menu_execute_active_handler" ["args"]=> array(0) { } } } ["previous":"Exception":private]=> NULL } }

$backTrace = #0 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Error.php(948): CRM_Core_Error::backtrace("backTrace", TRUE) #1 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error)) #2 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error)) #3 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...") #4 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...") #5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, NULL, NULL, "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...", "DB_Error", TRUE) #6 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8)) #7 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7)) #8 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB/common.php(1907): PEAR->raiseError(NULL, -19, NULL, NULL, "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...", "DB_Error", TRUE) #9 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'a.frontend_title' in 'field list'") #10 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError() #11 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...") #12 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB/DataObject.php(2415): DB_common->query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...") #13 /home/jj/public_html/z/dev/sites/all/modules/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...") #14 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/DAO.php(438): DB_DataObject->query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...") #15 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/DAO.php(1394): CRM_Core_DAO->query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...", TRUE) #16 /home/jj/public_html/z/dev/sites/all/modules/civicrm/Civi/API/SelectQuery.php(143): CRM_Core_DAO::executeQuery("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...") #17 /home/jj/public_html/z/dev/sites/all/modules/civicrm/api/v3/utils.php(1254): Civi\API\SelectQuery->run() #18 /home/jj/public_html/z/dev/sites/all/modules/civicrm/api/v3/UFGroup.php(75): _civicrm_api3_basic_get("CRM_Core_BAO_UFGroup", (Array:3)) #19 /home/jj/public_html/z/dev/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_uf_group_get((Array:3)) #20 /home/jj/public_html/z/dev/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9)) #21 /home/jj/public_html/z/dev/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:7)) #22 /home/jj/public_html/z/dev/sites/all/modules/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("uf_group", "get", (Array:3)) #23 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php(3340): civicrm_api3("uf_group", "get", (Array:2)) #24 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Resources.php(689): CRM_Core_BAO_UFGroup::getCreateLinks() #25 [internal function](): CRM_Core_Resources::outputLocalizationJS() #26 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Invoke.php(275): call_user_func((Array:2)) #27 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:12)) #28 /home/jj/public_html/z/dev/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4)) #29 /home/jj/public_html/z/dev/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:4)) #30 [internal function](): civicrm_invoke("ajax", "l10n-js", "en_US") #31 /home/jj/public_html/z/dev/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3)) #32 /home/jj/public_html/z/dev/index.php(21): menu_execute_active_handler() #33 {main

```

# Answer
I finally resolved it by upgrading to 5.6.0, although it was a bit of a journey. First I tried the solution in #6, but I found there were even more fields missing, having done a fresh installation of 5.5.3 and compared the columns in the civicrm\_uf\_group table: title, frontend\_title, help\_pre, help\_post, cancel\_button\_text, submit\_button\_text

I was still getting the error, and the log table was showing that the error was on a view of this table `civicrm_uf_group_en_US` So I assumed that now CiviCRM creates views of tables, which are not affected by changing table structure alone. Not sure if this is a new thing or if only for languages. The site had been configured for only English US, but was selected as if it was a language. Tried to change it to be language neutral. Not sure it made a difference.

Regardless, it seems that upgrading rebuilt the views, and problem solved. Perhaps with hindsight I could have found a way just to modify the view without needing to upgrade.

Hope this helps someone.
> 1 votes

# Answer
Is the site configured for multi-lingual? If so then it might be an error with schema rebuild. Can you try rebuilding the schema using api explorer or drush?

Ref: https://civicrm.stackexchange.com/a/25890/155

Or You will need to manually add the 'frontend\_title' field to the table by running below sql query.

```
ALTER TABLE `civicrm_uf_group` ADD  `frontend_title` VARCHAR(64) NULL DEFAULT NULL COMMENT 'Profile Form Public title';

ALTER TABLE `civicrm_uf_group` ADD  `add_cancel_button` TINYINT(4) NULL DEFAULT '1' COMMENT 'Should a Cancel button be included in this Profile form.';

```
> 6 votes

---
Tags: drupal, upgrade
---


title: CKEditor Spellcheck Error

text:
# Question
Title: CKEditor Spellcheck Error
The spellcheck option in ckeditor is throwing this error when use is attempted. Once the error window appears the screen just freezes unless you go into another menu. I am unsure if the recent update has contributed to this issue.

Wordpress 4.9.4 CiviCRM 4.7.29

Error Message: "WebSpellChecker.net server: The specified customer ID is intended for use with CKEditor only. For more information, please contact us at support@webspellchecker.net or submit a ticket at webspellchecker.net website."

# Answer
I had the same, in both Chrome and Firefox, due to the Referrer-Policy setting of my site. Error was raised with Referrer-Policy: same-origin (or stricter). To resolve it, relax the policy to origin-when-cross-origin for CK Editor.

Apparently, webspellchecker uses the referrer to check if the originating page is CK Editor.
> 1 votes

---
Tags: ckeditor
---


# Question
Title: Webform error for event registration - Invalid argument supplied for foreach()
I am getting this error at the top of a webform (in the civi section):

Warning: Invalid argument supplied for foreach() in wf\_crm\_admin\_form-\>buildParticipantTab() (line 930 of /home/site1/public\_html/sites/all/modules/webform\_civicrm/includes/wf\_crm\_admin\_form.inc).

It happens when a contact is added to an event. I have attached a screen capture.

A new part in the form has appeared. No idea where from. I think this might be causing the issue. See attached for for more information.

# Answer
It turned out to be a problem with Custom Data (civicrm/admin/custom/group). A Set of Custom Fields had been created for participants without any fields added. I removed the group and problem is fixed.
> 3 votes

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


# Question
Title: Is there any information that tells the last action of membership record (edit or renewal)?
I'm going to write a hook to distinguish a saved membership record, how do I know the last action of saved membership record is edit or renewal?

# Answer
CiviCRM keeps track of membership changes in civicrm\_membership\_log table for all changes to membership attributes like start date, end date, status. But it will pretty difficult for you to guess if the membership is actually being renewed or updated unless you perform some more checks with different log entries from civicrm\_membership\_log table.

The other and most easiest/convenient way to know renewal or status change is through Activities. CiviCRM create different activities for membership when a membership is added, renewed and status/type is changed etc(see in attached image list of Activity types for membership). So it will be easy to use post or pre hook on Activity to guess the context.

HTH

Pradeep
> 3 votes

# Answer
CiviCRM keeps log tables that document changes to core tables like `civicrm_membership`. They're all prefixed `log_`, so in this case you could look for the newest row in `log_civicrm_membership` for the relevant `contact_id` and/or `id` (`id` being the membership ID from the core table).

That might contain enough data to help you distinguish between the two cases you describe.
> 0 votes

---
Tags: civimember, hooks
---


# Question
Title: Can ExtendedReports report on CiviDiscount usage?
Can I get a list of Contacts that have used a specific CiviDiscount code? How do I extend - Extended Reports extension?

# Answer
> 1 votes
Yes - you can now! See https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/pull/148

Adding field label from the civicrm\_line\_item table allows admins to search (i.e. filter) for Contacts, Contributions that have had a discount code applied to them - in the standard report environment so Actions (exports) as well as Add to Group are available out of the box.

The screenshot below uses template civicrm/report/price/contributionbased - but any ExtendedReport will now have line label as a field/option for you to specify what discount code you'd like to search for.

---
Tags: civireport
---


# Question
Title: Got an error while installing new UI theme shoreditch for civicrm?
I was trying to install new UI theme i.e.shoreditch for civicrm. While installing it gives an error.

I also tried to change the hostname i.e. localhost to 127.0.0.1 but couldn't work.

# Answer
I am not sure how CiviCRM will understand `drush en` to enable shoreditch extension. Shoreditch extension is under CiviCRM not under Drupal. But there is different drush command to install CiviCRM extensions

1. List CiviCRM extensions

> drush cel

2. Install CiviCRM extension

> drush cei org.civicrm.shoreditch

3. Disabled CiviCRM extension

> drush ced org.civicrm.shoreditch

4. Uninstall CiviCRM extension

> drush ceui org.civicrm.shoreditch

HTH

Pradeep
> 3 votes

---
Tags: civicrm-home, ui
---


# Question
Title: What is the difference between a grey and blue organisation
We have different contact types including individuals and organisation and within the organsiation different types of organisations. But I cannot understand why some organsiation show as a blue building and some as a grey building.

# Answer
> 3 votes
Sylvia,

Welcome to CiviCRM stackexchange. CiviCRM allows you to create contact sub types under each contact types. When adding new contact sub type the form allows you to define the image url which is used to display against contact. If you ignore this field at the time of saving or have no values than CiviCRM uses default image to show against the contact i.e **Grey building**. The **blue color building** is for Organization contact type i.e Organization contact having no sub type.

Hope this clarifies your question

Pradeep

---
Tags: contact-types, organization, sub-types
---


# Question
Title: Volunteer Report Error: Expression #2 of SELECT list is not in GROUP BY clause
I'm trying to run a volunteer report on CiviCRM 5.5.2 on WordPress, and if I go to Reports -\> Contact Reports -\> Volunteer Reports, then click "Refresh Results" (no matter what criteria I seem to choose), I get the following error:

```
[nativecode=1055 ** Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'bitnami_wordpress.civicrm_contact_assignee_civireport.sort_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]

```

The full log entry is pretty long but here's the group by clause (through to the end of the query, right before the error above appears in the log):

```
GROUP BY activity_civireport.id  ORDER BY civicrm_contact_assignee_civireport.sort_name ASC  LIMIT 0, 50

```

In case this sheds any light on things, I'm pretty new to CiviCRM and I set up a project, then starting logging hours, but the people for whom I'm logging hours are NOT on the volunteer roster for the project. Not sure if that matters or not but thought I'd mention it since maybe that's not how you're supposed to do things.

I can provide more details or the full error as needed. Thanks for any ideas anyone has.

# Answer
> 2 votes
As you must be aware CiviVolunteer is not fully tested for 5.5.x version of CiviCRM. The last extension version was released for 5.0. This error usually occur when sql\_mode for mysql is configured for only\_full\_group\_by. I have just submitted a pull request for this fix.

You can either apply the patch from here or turn off only\_full\_group\_by sql mode

HTH

Pradeep

# Answer
> 1 votes
Thanks for the PR pradeep.

I think we will have an official release containing CiviCRM 5.x support bug-fixes this month. There are already some in the master branch on GitHub.

---
Tags: civivolunteer, reports
---


# Question
Title: Email Greeting Updater in scheduled jobs failed
Running Drupal 7 with CiviCRM 5.6.0. Noticed in BCC'd copies of confirmation emails for an event that some records have a blank "Email Greeting" field since the template is addressing {contact.email\_greeting}.

Went into Scheduled Jobs in Settings, and ran "Execute Now" on the email greeting updater and got the following error in the log:

> Settings - Scheduled Jobs Log This screen presents the list of most recent 1,000 scheduled jobs log entries. \> List of log entries for: Greeting updater
>
> Date Job Name Command/Job Status/Additional Information 2018-10-10 15:19:49 Greeting updater Entity: Job Action: update\_greeting Summary Finished execution of Greeting updater with result: Failure, Error message: Mandatory key(s) missing from params array: ct, gt Details
>
> Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}
>
> Full message: Finished execution of Greeting updater with result: Failure, Error message: Mandatory key(s) missing from params array: ct, gt 2018-10-10 15:19:49 Greeting updater Entity: Job Action: update\_greeting Summary Starting execution of Greeting updater Details
>
> Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}
>
> Full message: Starting execution of Greeting updater

Any ideas on how I an fix this?

# Answer
> 0 votes
You need to provide the required parameters for this particular job, in this case it's looking for the contact type (ct) and greeting (gt) parameters. The link below has more info on what you're choosing from.

https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/#job\_update\_greeting

---
Tags: email, scheduled-job
---


# Question
Title: How do I search for CiviDiscount code redeemed (to allow an action on those contacts)
We've got CiviDiscount working to apply the appropriate discounts for memberships and events, but would like to be able to add all contacts that have used a discount to a report (for our sponsors) or smart group. When I go to the CiviDiscount page, I can see the list of contacts who've redeemed each code, but would like to be able to search and act on that information. So I guess my question is how can I add a Custom search for codes redeemed?

# Answer
We have made a participants view in Drupal that shows all event participants who have redeemed a code. We can then add them to a group for use in further searches in Civi.

I don't know how you would do this with a smart group, but at least this might get you part of the way.

We'll be doing a similar thing for memberships in due course, if that's possible.

To do this you need: Drupal, Civicrm entity (ours is beta9), and turn on the sub module: civicrm\_entity\_actions as Pete mentions in the comments to the first answer here: How to configure Views VBO action to disable relationships? You also need Views Bulk Operations

The participant view needs to have this relationship: CiviCRM Contributions: Contact Record ID

The view also needs to have an exposed filter of the Participants fee level field. (NB, don't confuse this with the Events Fee level or the Contribution Amount label fields. They won't produce the same results).

Then you can filter your view by keywords from your codes.

Add the field, (CiviCRM Contact, with custom fields) Bulk operations: CiviCRM Contact. Note this will need a relationship to Civicrm Contact. Initially it won't give you the option to add a group, but after saving the field and then re-editing it you will see Add contact to group as an option.

You will have had to previously made a suitable group in Civi.

Et Voila! Now you can bulk add participants who've used your code to your group.

I can send you an export of the view if that's helpful. Good luck!

NB: it might be helpful to know that the Contributions: Amount label field will work fine for this purpose for online event bookings. But bookings taken through the admin interface may not contain the discount code in the Amount label field.
> 1 votes

# Answer
Karin Gerritsen has created an update to the Extended Reports module to allow any discount codes to be exposed in a report, with various actions that can then be run on the search result, which is exactly what I wanted. Previously the Extended reports only worked on discount codes for events, not for memberships. Can ExtendedReports report on CiviDiscount usage?
> 1 votes

# Answer
Andy's solution is related to what you ask, and Eli Lisseck's CiviDiscount report is too - but none of these will give you a custom search, which you need for a smart group.

There's documentation on creating custom searches here. I think that if you write this extension, it'd be great to submit an answer to this question with a link to the Github!
> 0 votes

---
Tags: cividiscount
---


# Question
Title: How to grant SELECT access for Drupal user to all CiviCRM Tables
I have 2 databases for Drupal and CiviCRM. How can I grant SELECT access for Drupal user to all CiviCRM tables? I am using AWS RDS Databases. Thanks so much!

# Answer
You will need to perform two operations for this

1. Give Drupal mysql user to access CiviCRM database.
2. Add CiviCRM tables in Drupal's settings.php i.e Navigate to CiviCRM \>\> Administer \>\> System Settings \>\> CMS Database Integration. Copy the content from 'Views integration settings' section to settings.php. Clear Drupal cache.

Pradeep
> 2 votes

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


# Question
Title: Trigger Membership Status Calculation for all memberships manually?
I've had to amended membership statuses and have a large amount of memberships with the wrong status.

Is there a easy way of triggering these to be recalculated across all memberships?

# Answer
There is a CiviCRM schedule job 'Update Membership Statuses' that calculates membership status and updates the membership. You can either execute it manually through browser or turn on and run through cli or cron.
> 2 votes

---
Tags: civimember
---


# Question
Title: Upgrade CiviCRM 3.3.2 to the latest on Drupal 6
I've been trying to upgrade CiviCRM to the latest. This is what I've been planning to do:

Update to the latest availale on drupal 6, then upgrade drupal 6 to 7, update CiviCRM on the latest available on Drupal 7, then upgrade to Drupal 8 and update CiviCRM to the latest version available, then migrate to WordPress.

I wanted to update progessively within all the versions and this is what I did to update to 3.3.3:

1) Login as admin. 2) Set `define('CIVICRM_UF','Drupal');` to `define( 'CIVICRM_UF','Drupal6');` 3) Delete the old Civi files on site/all/modules and put the 3.3.3 files. 4) Delete the files on template\_c 5) Try to access to `/update`

In the last step I get an error that don't let my continue with my activities:

Any idea of what's happening? Is there a better way to approach my goal?

Thanks!

# Answer
> 3 votes
From CiviCRM 3.3.2 to 5.x latest is a huge task. Lots of things that can go wrong in the process. And if anyone has ever made any schema edits to your CiviCRM database tables upgrading could be very painful.

Have you considered installing a fresh 5.x and then doing an export out of 3.3.2 -\> import into 5.x of the data you want to carry forward?

It will be much easier if you treat this like the same as any migration from a legacy CRM to CiviCRM 5.x;

CiviCRM 3.3.2 was released on Jan 04 2011 - it qualifies as legacy :-)

# Answer
> 2 votes
Cesar,

I had similar requirement to upgrade 3.3.1 to 4.7.31 few months back. Here is what i did

1. Performed Incremental upgrade for CiviCRM on drupal 6

* 3.3.1 to last version of 4.0
    * 4.0 to last version of 4.2
    * 4.2 to last version of 4.5
    * 4.5 to last version of 4.7
2. Installed CiviCRM 4.7.31 on upgraded drupal 7.
3. Replaced the db for CiviCRM from #1 into #2
4. Performed CiviCRM clean up cache
5. Did menu rebuild /civicrm/menu/rebuild?reset=1&triggerRebuild=1
6. Clear drupal cache

> ```
> Note: After every incremental upgrade please take backup so that it will be easy to revert back if any stage of upgrade fails.
>
> ```

HTH

Pradeep

# Answer
> 1 votes
The mention of changing `CIVICRM_UF` from `Drupal` to `Drupal6` suggests to me that you're downloading the "Drupal" (i.e. Drupal 7) package of CiviCRM. Instead, download the Drupal 6 version. These are available from Sourceforge.

---
Tags: drupal, upgrade, drupal-6
---


title: Upgrade Civi first, or Drupal first?

text:
# Question
Title: Upgrade Civi first, or Drupal first?
I have a Civi 4.4.4 install on a Drupal 7.37 and I want to upgrade both: the Drupal to 7.59 (which I think is the latest in D7?) and Civi to the latest 5.6.0 if possible. I am totally new to both of these products, but I've upgraded Wordpress before, if that experience will help me at all :P

I just saw a very recently updated post in this forum in which some people describe the process of making long-distance upgrades, going back and forth between upgrading Civi and upgrading Drupal to intermediate versions, alternating, and it sounds like it would be pure hell.

My question here is: should I do Drupal first, or Civi first? I realized that I'd better ask because whatever my intuition is might be wrong. I'm really hoping there will only be one upgrade each, since the "distance" is not that far off. Help is much appreciated.

# Answer
Kotodharma,

Welcome to stack exchange. Its a huge pain to upgrade CiviCRM from 4.4 to 5.6. If your site has lots of customization then the upgrade might tend to break at some point if you're not lucky enough. Upgrading Drupal or CiviCRM first doesn't matter. But yes while upgrading CiviCRM I would suggest you to perform incremental upgrade so that if anything breaks you don't need to start it all over again. Here is what i would suggest

1. Upgrade to last version of 4.5
2. Upgrade to last version of 4.6
3. Upgrade to last version of 4.7
4. Upgrade to 5.6.0

> **Note:** Take backup at every stage so that you can revert it back if upgrade fails.

HTH

Pradeep
> 3 votes

# Answer
While Pradeep is correct that a customized site is difficult to upgrade from 4.6 without work - a non-upgraded site should upgrade fairly smoothly.

I don't think it's of much concern which system you upgrade first, but keep in mind PHP versions. CiviCRM requirements state that only PHP 5.5 and 5.6 are compatible with both 4.6 and 5.6. Be sure not to upgrade past a version that your PHP supports.
> 1 votes

# Answer
If you are still running Drupal 7.37 be aware that it is completely insecure.

I don't know much about older version of Civicrm but if you have any personal data accessible via that Drupal site you should either take that offline or upgrade it immediately.

Across our drupal sites we see people attempting to exploit the documented vulnerabilities on a daily basis.

I would update Drupal first, see if that functions correctly then look at the process of getting Civicrm up to date. Get up to latest 4.7 ASAP.

If your Drupal site uses media then you need to update that ASAP also.
> 0 votes

---
Tags: drupal, upgrade
---


title: Change donation to another donor

text:
# Question
Title: Change donation to another donor
We have accidentally attributed a credit card donation to the wrong person. How can we change the donation to the correct donor? Do we have to delete the donation on one record and add it to the other? Thanks!

# Answer
> 2 votes
There is an extension called Move Contribution that will allow you to move the contribution, however, it does not appear to have been updated since Aug. 2016 and last compatible version was 4.7, so there is a chance that the extension will not work with whatever version of Civi you are on.

In the absence of the above, and assuming that the correct credit card was charged but just recorded on the wrong contact, the correct way to manage this is to:

1. Navigate to the original contribution and click the Edit hyperlink
2. Change the Contribution Status to "Cancelled" (financial transactions should never be deleted, especially where electronic ones are concerned)
3. Since transaction IDs must be unique, make note of the transaction ID, then add a "-C" in the original contribution's transaction ID field
4. (OPTIONAL): If your version tracks the information, make note of the card type and last 4 digits of the card
5. Click the Save button
6. Navigate to the correct contact record's contribution tab and click Add Cash/Check... Contribution
7. Record the contribution details, selecting the payment method of credit card
8. Enter the original transaction ID you noted in item 3 above and any additional card details as desired
9. Click the Save button

If the incorrect credit card was charged, then you will need to issue a refund directly through the payment processor, change the original contribution status to "Refunded" in CiviCRM, and then process the correct credit card on the correct contact record accordingly.

Hope this helps!

Tamar

# Answer
> 1 votes
Welcome to StackExchange, Nadya. In case the extension recommended by Tamar does not work out, you could check out this one called rebook which we developed a while ago.

Unfortunately, it has not been tested with the current version either bit you may give it a try. As always when tying out something new, use a testing environment if possible.

---
Tags: civicontribute, contributions
---


# Question
Title: I got this error after I override the civicrm.settings.php
I got this error after I add this line $civicrm\_setting\['Directory Preferences'\]\['customFileUploadDir'\] = '/var/www/testing/sites/default/files/civicrm/upload'; on civicrm.settings.php

# Answer
> 1 votes
Make sure the path has required permission for apache to write a file in it. This errors are usually occur due to permission issues.

---
Tags: settings
---


# Question
Title: CiviEvent: Transaction integrity error: Expected to find active frame
**System**

```
CiviCRM 4.6.6
Wordpress 4.2.2

```

**Goal**

I want to be able to register for a CiviEvent with the default Civi-form.

**Problem**

When registering for a CiviEvent I get this message:

And this error is logged:

```
PHP Fatal error:  Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame
thrown in .../wp-content/plugins/civicrm/civicrm/Civi/Core/Transaction/Manager.php on line 107

```

The code in **Manager.php** that throws the error is:

```
if (!isset($this->frames[0]) || $this->frames[0]->isEmpty()) {
      throw new \CRM_Core_Exception('Transaction integrity error: Expected to find active frame');
}

```

Despite this error, the registration actually was successful, it's just that I don't get redirected to the success-page. Does someone have any idea about what's going wrong?

For completeness, a backtrace from the point of the thrown exception.

```
0 - Manager.php - Line: 106 - dnn_backtrace () - .../wp-content/plugins/civicrm/civicrm/Civi/Core/Transaction/Manager.php

1 - Transaction.php - Line: 142 - dec () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/Transaction.php

2 - Transaction.php - Line: 129 - commit () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/Transaction.php

3 - TransactionSubscriber.php - Line: 158 - __destruct () - .../wp-content/plugins/civicrm/civicrm/Civi/API/Subscriber/TransactionSubscriber.php

4 - - Line: - onApiRespond () -

5 - EventDispatcher.php - Line: 164 - call_user_func () - .../wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php

6 - EventDispatcher.php - Line: 53 - doDispatch () - .../wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php

7 - Kernel.php - Line: 221 - dispatch () - .../wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php

8 - Kernel.php - Line: 98 - respond () - .../wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php

9 - api.php - Line: 23 - run () - .../wp-content/plugins/civicrm/civicrm/api/api.php

10 - Relationship.php - Line: 939 - civicrm_api () - .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Relationship.php

11 - Utils.php - Line: 385 - setIsActive () - .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php

12 - Utils.php - Line: 350 - currentEmployerRelatedMembership () - .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php

13 - Contact.php - Line: 247 - createCurrentEmployerRelationship () - .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php

14 - Contact.php - Line: 328 - add () - .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php

15 - Contact.php - Line: 1894 - create () - .../wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php

16 - Confirm.php - Line: 1206 - createProfileContact () - .../wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php

17 - Register.php - Line: 1300 - updateContactFields () - .../wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Register.php

18 - Register.php - Line: 1222 - processRegistration () - .../wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Register.php

19 - Form.php - Line: 345 - postProcess () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php

20 - Upload.php - Line: 166 - mainProcess () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php

21 - Upload.php - Line: 133 - realPerform () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php

22 - Controller.php - Line: 203 - perform () - .../wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php

23 - Page.php - Line: 103 - handle () - .../wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php

24 - Controller.php - Line: 353 - handle () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php

25 - Invoke.php - Line: 312 - run () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php

26 - Invoke.php - Line: 86 - runItem () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php

27 - Invoke.php - Line: 54 - _invoke () - .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php

28 - civicrm.php - Line: 1189 - invoke () - .../wp-content/plugins/civicrm/civicrm.php

29 - civicrm.basepage.php - Line: 134 - invoke () - .../wp-content/plugins/civicrm/includes/civicrm.basepage.php

30 - - Line: - basepage_handler () -

31 - plugin.php - Line: 571 - call_user_func_array () - .../wp-includes/plugin.php

32 - class-wp.php - Line: 622 - do_action_ref_array () - .../wp-includes/class-wp.php

33 - functions.php - Line: 877 - main () - .../wp-includes/functions.php

34 - wp-blog-header.php - Line: 14 - wp () - .../wp-blog-header.php

35 - index.php - Line: 19 - require () - .../index.php

```

# Answer
Do you have any extensions enabled? I once ran into this Error message and my notes say that disabling certain/specific extensions that this client had installed fixed it.

If not extensions - look for Custom php code overrides.

I also recommend you look to upgrade your 4.6.x - if you get payments for Events working - you're a couple of security upgrades behind.

As a slight side note: the "transaction integrity error" means it's a database problem, as does the "DB: syntax error". If you look in your civicrm log (e.g. using this extension: https://civicrm.org/extensions/civicrm-log-viewer) the you should be able to see the specific sql that caused the problem and it might help narrow down where to fix things.

Also, your backtrace suggests it was something reacting to the setting of the employer-employee relationship, likely related to the permissioning that goes along with that.
> 1 votes

# Answer
I just ran into this error on CiviCRM 5.3. From the stack-trace, it is a different scenario, but since this is a top-hit for this generic error message... I thought I would post it.

I had a working event registration page. I added a new custom field to contacts and proceeded to ad it to the profile used on the registration page. Actually, I ran into the problem whether the custom field was added to the Contact or to the Participant record. The outcome was the same... this exception is thrown.

Looking in ConfigAndLog and the stack-trace, revealed that the problem arose when Civi was trying to create a LocBlock. I have no idea why the changes I made triggered this erroneous code-path. There were no loc-block fields on the profile (or anywhere on this free-event registration). However, the Exception gods were appeased when I added a phone number field to the profile as well.

Hopefully this work-around helps someone... and maybe someone brave enough will go hunting for the bug.

Tying it back to the original post, one could theorize that a required field for the Relationship was not being specified. It looks like the customization was looking for a related membership. Probably something was going awry with locating that membership. So, if you are getting this error on a form using profiles, look for fields that are implicitly required and are missing from your profile.
> 0 votes

---
Tags: wordpress, civievent, payment-processor, registration
---


# Question
Title: Membership/Contribution does not get updated
I’ve been using CiviCRM for half a year now and I think it’s great. There is just one thing that does not work quite right: When I add a membership/contribution to a user, both get recorded in the database but they don’t show up immediately. I have to wait a day or so for them to display correctly. I attached 3 screenshots: When I click on Summary, the „Contributions“ and „Memberships“ registers show that Contributions/Memberships have been added. But as soon as I click on them, they get greyed out and don’t show anything. Interesting enough, if I change other member details (name, address, etc.), the changes are shown immediately. I already tried clearing Joomla’s and CiviCRM’s caches but no success.

Does anybody know why this is happening?

Thank you very much in advance!

cejavila

PS: I was on 4.7.29 and am now on 5.1.2 (thought the update might help, but nope)

# Answer
> 1 votes
We are having a similar issue, and while this isn't a great answer, the temporary solution has been to install browser add-ons (either in Firefox or Chrome) that clean the cache with one click. On Firefox, I'm using Clear Cache, which also refreshes the page. On Chrome, I'm using Clean Master, and have to manually refresh the page afterwards. Cleaning the Joomla and Civi caches don't seem to make a difference - only the browser cache. Unfortunately, any time we make any changes that we want to see immediately, we have to repeat this process. That includes to discount codes, events, memberships, contributions, etc. It's annoying and hopefully if enough people are also experiencing it and report the problem we can get a permanent resolution.

---
Tags: civicontribute, civimember
---


# Question
Title: Is there a way to have a "from and to" field , need this for business hours "to and from"
I want to record the working hours from my prospects, so I need a flexible to and from field, like:

9-5, 8-5 etc...

I could do drop down selects, but I would rather have it custom, so a double drop down selection field, a little like the date field but only for hours , no date, month etc...

# Answer
> 3 votes
This is not currently available in CiviCRM to have time range custom field. The alternate solution would be to create two date time field To and From and using buildForm hook and PageRun hook and/or JS hide the date field on forms and view.

HTH

Pradeep

# Answer
> 2 votes
A more basic solution would be two integer, number or text 'select' fields ie with 8.00, 8.30, 9.00 etc

but it depends whether the data is based on hour, half hour, or by the minute

---
Tags: forms, fields, dates
---


# Question
Title: Unable to use discount codes when registering in admin area
For an upcoming paid event, we need to register speakers, guests, etc. for free. In attempting to register those people in the admin area, we are unable to use a comp discount code that is for 100% off. Each time we enter the code, it accepts it and changes the total to $0, but upon save we get the error message "Please select at least one option from price set," even though an option was selected prior to submitting.

The discount codes work fine when used on the front-end, but these are courtesy registrations and we want to bypass the confirmation message, since those details have been handled separately.

I was able to work around the issue by creating a new price set for the event that makes use of admin-only options to remove the cost for speakers, however; the issue still remains that the discount codes don't work on the back-end. This has happened on other events in the past, which we by-passed by logging-in as the member and registering via the website front-end. Has anyone else experienced this, and are there troubleshooting steps I can take to find a resolution?

We are running CiviCRM 5.6.0 on Joomla 3.8.13

Updated to add a screenshot of the discount code.

# Answer
> 0 votes
As the error states, if you use the built-in fees section or a price set with a required price field option (of which you should always have at least one), you will not be able to submit the registration without selecting an option, even if it is a $0 option after applying a discount.

That said, no need to create a separate price set (especially when you are offering only one fee option) - all you need to do is select the $0 option after applying the discount code (or save yourself a click by making the fee option the default), then click the Save button - this will record the registration with a $0 contribution.

If you add a click and remove the "Record payment?" flag that is checkmarked by default when registering someone from the back-office, that will still result in a registration with a status of "Registered" but without the $0 contribution.

Hope this helps, Tamar

---
Tags: joomla, cividiscount
---


# Question
Title: Creating a custom payment method with conditional field
So I understand that you can assign a payment processor any payment method - however - I am trying to create payment methods that replicate the behavior of Credit Card and Check. For example - when manually adding Check or Credit Card contributions - you will then get a field for check number or last 4 digits of the card respectively.

If I make a payment method called *credit card - other*, I would want those credit card fields to also populate.

Is this hard coded?

# Answer
> 4 votes
Themak, Nice question. This are hardcoded in core file but you can create your own field for each payment method using buildform hook. Here is the snippet on how to do that

```
function custom_civicrm_buildForm($formName, &$form) {
  if ($formName == 'CRM_Financial_Form_Payment' && !empty($form->paymentInstrumentID)) {
    if ($form->paymentInstrumentID == CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'payment_instrument_id', 'Test')) {
      $form->assign('paymentFields', array('source'));
      $form->add('text', 'source', ts('Source'));
    }
  }
}

```

> **Note:** The above snippet is not fully tested i have just created blindly, but i am 100% sure it should work

---
Tags: civicontribute, payment
---


# Question
Title: Gift Aid extensions compatible with 5.6.0?
Are the Gift Aid extensions compatible with 5.6.0? I'm planning to upgrade a client soon - they are on 5.1.2.

# Answer
> 1 votes
Andy,

If it works for 5.1.2 than definitely it should work for 5.6 since there is no major changes in financial bit of code cleanup and fixes. However its a good practice to test on the staging environment before going live.

HTH

Pradeep

---
Tags: 5.0, gift-aid-extension
---


# Question
Title: Multiple custom field sets in one contact tab (not the main one)?
Drupal 7.59, CiviCRM 5.5.1, Shoreditch alpha24.

Within a contact you can display a custom field set as an additional tab (or on main tab). On the main tab you can have groups of fields, including custom ones. Is it possible to organise several custom field sets into an extra tab? Then each set of fields could be collapsible/expandable, neatly organised etc, rather than having a mess of fields in a tab.

Ideally not heavy on coding, not looking to heavily modify CRM at all just hoping there was a simple way I hadn't found. I could achieve with view/profile, but that would need extra work while I currently envisage users using CRM natively.

# Answer
Unfortunately there is no way to show all the custom fields in a single tab. However you can show all the custom fields on the Summary tab for that you will need to update each custom group to use 'Inline' for 'Display Style'. There is an extension released for 5.5 which developed by Coleman called 'CONTACT LAYOUT EDITOR' which allows you to rearrange the contact summary screen, Move the most important information to the top, Remove unnecessary stuff from the screen.

HTH

Pradeep
> 1 votes

---
Tags: contacts, custom-fields
---


# Question
Title: Why can't I create a payment processor in multisite?
I have a multisite setup with a payment processor defined in one site. When I try to create one in the other site, it does not save and I get this error: "Expected one PaymentProcessor but found 2".

# Answer
> 3 votes
Are you using the same payment processor naming for both? You must give it a unique name.

---
Tags: drupal, payment-processor, multisite, 5.1.0
---


title: Civibuild Vagrant - drupal-case build?

text:
# Question
Title: Civibuild Vagrant - drupal-case build?
Hey all Just found the Civibuildkit using Vagrant - made my day as they have a build that was useful for me to test and work on for my site.

My question is: Is there some one out there that can help me figure out how to create (load) the drupal-case (which is Drupal8 with the latest Civicrm build) without sample data.

I have tried to go through the files to figure it out, but if someone can point me in the right direction it would be great.

# Answer
**Update:** BuildKit currently cannot build Drupal 8 sites because of the composer requirement.

To build a Drupal 8 Clean site with CiviBuild you would use the command:

**Note:** *CiviBuild cannot currently build Drupal 8 sites with the demo data.*

`civibuild create d8-master` or `civibuild create <NAME> --type drupal8-clean`

**Note:** This will create a Civi 'master' site using the latest bleeding edge CiviCRM code. To build using a specific CiviCRM version use `--civi-ver` e.g. `--civi-ver 5.6.0`

The full command to create a **Drupal 8**, **CiviCRM 5.6.0** without demo data and named **d8c560** with the URL **http://d8c560.test** is:

`civibuild create d8c560 --type drupal8-clean --civi-ver 5.6.0 --url http://d8c560.test`

The build you refer to `dcase` or `==type drupal-case` builds a Drupal 7 site for testing the CiviCase v5 extension.

### CiviBuild Docs

The CiviBuild documentation is worth reading:
https://docs.civicrm.org/dev/en/latest/tools/civibuild/#build-types

### CiviCase v5

Information on CiviCase v5 (it's awesome!) and the associated dcase build is here:
https://github.com/civicrm/org.civicrm.civicase
> 1 votes

---
Tags: civicase, civibuild
---


# Question
Title: MyISAM engine error but the DB is all InnoDB
On my install CiviCRM runs in a separate database that is entirely InnoDB, but Civi throws up the MyISAM engine error anyway. The rest of wordpress lives in a DB that is InnoDB by default, although the tables are a mix of the two types, but I don't see why that matters. So why am I getting the MyISAM Engine error in Civi?

Versions: CiviCRM 4.7.11, wordpress 4.6.1, PHP 5.6.24, MySQL 5.0.11

# Answer
> 1 votes
This issue was fixed in CiviCRM 4.7.12 with this commit: https://github.com/civicrm/civicrm-core/commit/2475b5509e9638fa2e9863256348c5415f362b72

Cheers, Olivier;

# Answer
> 0 votes
I've seen this warning pop up a couple of times in the last month. My CiviCRM database is InnoDB but I notice Wordpress is MyISAM. Clearing Civi's cache clears the message. I believe Wordpress can be converted to InnoDB, so I will investigate that.

Wordpress 4.9.8, CiviCRM 5.6.0, MySQL 5.7.23, PHP 7.1.22

---
Tags: wordpress, database
---


# Question
Title: Including Participant ID in Event Registration Email
I am attempting to include the Participant ID in the email sent to the participant upon successful event registration. I have searched documentation and previous questions/answers, but no luck so far. I was able to get the Participant ID on the Thank you Screen using info from a previous question -- involved changes to DisplayProfile.tpl But it is not included in the confirmation email. There were some older (2010/2011) questions that referenced using the email workflow templates, but they were not specific enough for me as to where to put the {ParticipantID} token.

# Answer
Susan, Welcome to CiviCRM stack exchange. Its possible to add Participant ID in email sent when a user registers online. You need to update the message template to include the `{$participantID}` token which prints the participant ID when rendered.

To update the message template navigate to CiviCRM \>\> Mailings \>\> Message Templates. Locate 'Events - Registration Confirmation and Receipt (on-line)' under 'System Workflow Messages'. Click Edit. Modify the message template to include the `{$participantID}` token either in subject, html or text field.

HTH

Pradeep
> 6 votes

---
Tags: civievent, online-registration
---


# Question
Title: Can commercial organisations use CiviCRM
Your website states that you are a CRM system for non-profits. As an open source setup, can commercial entities and freelancers use your platform?

# Answer
> 3 votes
Yes it can be used by whoever wishes to make use of it. It is largely used by NGOs but there are many commercial entities using it for their own requirements.

# Answer
> 0 votes
As @petednz stated commercial organizations can use CiviCRM. You will find where most of the commercial CRM's are focused on the customer/supplier relationships, accounts and leads CiviCRM is based on individuals, organizations and households and their relationships.

---
Tags: user-account
---


# Question
Title: CiviEvent: selecting "Pay later" option causes the browser to show "are you sure you want to leave this site"? message
I have an odd problem with my CiviEvent registration.

When a user fills out a registration form and selects the "Pay later" payment option, on clicking "Continue" the browser throws an "are you sure you want to leave this page" message. (Everything works if the user then clicks "OK", it's just confusing to the user to see a message "you may lose any changes on this page".) If they choose the online payment option and fill out the billing information, "Continue" properly takes them to the next confirmation page.

The only other question I've found that discusses this is

How do I suppress the "are you sure you want to leave this page" popup from contribution page

and it seems I can disable the message by manipulating the onbeforeunload JS function (which I will try) but I'd really like to know what the core problem is instead of just putting a band-aid on it :-)

System deets: Joomla 3.8.12, CiviCRM 5.3.1

# Answer
I believe you are you using Stripe payment processor extension as one of the payment gateway. There is a known issue reported by a user facing similar problem and have been issues for other users also. As mentioned in info.xml Stripe extension supports till 5.0 and might have not tested fully for 5.3. The only solution I would give is to upgrade stripe if you haven't to 5.0 or from https://lab.civicrm.org/extensions/stripe or wait until some one from Maintainer fixes the problem.

> You can try if its a stripe problem by disabling the extension and submitting the form.

Pradeep
> 1 votes

---
Tags: civievent, registration, paylater
---