# Question
Title: Contact Tabs links gone away When clicking on Pager Next/Prev/Page Change under My Custom Tab for Contact
Here is my code of .tpl file:

```
<div class="view-content">
<h3>...</h3>
{include file="CRM/common/pager.tpl" location="top"}
{strip}
    <table class="display">
        <thead>
        <tr>
            ...
        </tr>
        </thead>
        <tbody>

        {foreach from=$rows item=row}
            ...
        {/foreach}
        </tbody>
    </table>
{/strip}
{include file="CRM/common/pager.tpl" location="bottom"}
</div>
{include file="CRM/common/jsortable.tpl"}

```

and Code for setting up Pager:

```
/**
 * Setting up $_pager for pagination support
 * Used CRM_Utils_Pager & CRM/common/pager.tpl to handle pagination
 */
public function pager() {
    // Setting up parameters for Pager that we are gonna create
    $params['status'] = ts('Some Entity %%StatusMessage%%');
    $params['csvString'] = NULL;
    $params['buttonTop'] = 'PagerTopButton';
    $params['buttonBottom'] = 'PagerBottomButton';
    $params['rowCount'] = $this->get(CRM_Utils_Pager::PAGE_ROWCOUNT);
    if (!$params['rowCount']) {
        $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
    }

    // Getting all Some Entity by Contact ID. if $_contactId is null then it return value for all Contact.
    $params['total'] = civicrm_api3( 'Entity', 'getcount', array( 'contact_id' => $this->_contactId ) );;

    // Setup Pager object and assign into template so it can be used by CRM/common/pager.tpl
    $this->_pager = new CRM_Utils_Pager($params);
    $this->assign_by_ref('pager', $this->_pager);
}

```

Thanks.

# Answer
> 1 votes
I have found the Problem, Problem was inside pager.tpl

pager.tpl generate some js to handle ajax page loading When pager.tpl location variable != top

That's js look like this without compiled(in pager.tpl):

```
{if $location neq 'top'}
  <script type="text/javascript">
    {literal}
    CRM.$(function($) {
      {/literal}
      var
        $form = $({if empty($form.formClass)}'#crm-main-content-wrapper'{else}'form.{$form.formClass}'{/if}),
        numPages = {$pager->_response.numPages},
        currentPage = {$pager->_response.currentPage},
        perPageCount = {$pager->_perPage},
        currentLocation = {$pager->_response.currentLocation|json_encode},
        spinning = null,
        refreshing = false;
      {literal}
      function refresh(url) {
        if (!refreshing) {
          refreshing = true;
          var options = url ? {url: url} : {};
          $form.off('.crm-pager').closest('.crm-ajax-container, #crm-main-content-wrapper').crmSnippet(options).crmSnippet('refresh');
        }
      }

      ...

      $form
        .on('click.crm-pager', 'a.ui-spinner-button', function(e) {
          var $el = $(this);
          // Update after a short delay to allow multiple clicks
          spinning !== null && window.clearTimeout(spinning);
          spinning = window.setTimeout(function() {
            if ($el.is('.crm-pager a')) {
              page($el.siblings('input[name^=crmPID]').spinner('value'));
            } else {
              changeCount($el.siblings('input.crm-rows-per-page-select').spinner('value'));
            }
          }, 200);
        })
        // Handle sorting, paging and alpha filtering links
        .on('click.crm-pager', 'a.crm-pager-link, #alpha-filter a, th a.sorting, th a.sorting_desc, th a.sorting_asc', function(e) {
          refresh($(this).attr('href'));
          e.preventDefault();
        });
    });
    {/literal}
  </script>

```

`#crm-main-content-wrapper` is the main container of All tabs link and tab content. that's why it's html/content replaced by ajax response html.

# **To fix this what I have done:**

Here is my .tpl file code(after fixed):

```
<form class="Your_Unique_Class_Name">
<div class="view-content">
  <h3>...</h3>
  {include file="CRM/common/pager.tpl" location="top"}
  {strip}
   <table class="display">
    <thead>
    <tr>
        ...
    </tr>
    </thead>
    <tbody>

    {foreach from=$rows item=row}
        ...
    {/foreach}
    </tbody>
    </table>
    {/strip}
    {include file="CRM/common/pager.tpl" location="bottom"}
</div>
{include file="CRM/common/jsortable.tpl"}
</form>

```

and Code for setting up Pager:

```
/**
 * Setting up $_pager for pagination support
 * Used CRM_Utils_Pager & CRM/common/pager.tpl to handle pagination
 */
public function pager() {

    $this->assign( 'form', array( 'formClass' => 'Your_Unique_Class_Name' ) );

    // Setting up parameters for Pager that we are gonna create
    $params['status'] = ts('Some Entity %%StatusMessage%%');
    $params['csvString'] = NULL;
    $params['buttonTop'] = 'PagerTopButton';
    $params['buttonBottom'] = 'PagerBottomButton';
    $params['rowCount'] = $this->get(CRM_Utils_Pager::PAGE_ROWCOUNT);
    if (!$params['rowCount']) {
        $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
    }

    // Getting all Some Entity by Contact ID. if $_contactId is null then it return value for all Contact.
    $params['total'] = civicrm_api3( 'Entity', 'getcount', array( 'contact_id' => $this->_contactId ) );;

    // Setup Pager object and assign into template so it can be used by CRM/common/pager.tpl
    $this->_pager = new CRM_Utils_Pager($params);
    $this->assign_by_ref('pager', $this->_pager);
}

```

It's taken me long hours to find out this problem solution;

I think it will help you so that's why sharing with you!

Thanks

---
Tags: contacts
---


# Question
Title: Can you create an event with Webform-CiviCRM integration?
I know you can *register* for an event - but can you create an event?

In my use case, there are users whose job is to coordinate an event series who don't otherwise need to interact with CiviCRM. It would be great to allow them to create events without interacting with the Civi UI.

# Answer
> 5 votes
I know! The answer is CiviCRM Entity! I've done things like: `civicrm-event/9/edit` and `civicrm-contribution/add` -\> let's try `civicrm-event/add` \- voila:

# Answer
> 3 votes
You can also use webform + CiviCRM Entity + rules + webform rules to do this job. You would need to gather all required fields for the event on the webform, and map the submitted values properties and use a create entity action

# Answer
> 2 votes
No.

IIRC Xavier was working on something like that at one point. But I don't know the status of that project.

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


# Question
Title: Is there a way to create a two part profile?
I am trying to make a profile that based on a previous selected it would either lead you to another part of a profile. Like if you select an option on the first part of the profile and then you could hit another button to take you to the second part of the profile.

# Answer
You would need to use jQuery to handle selection on first profile then show/hide base class of second profile. Also you would need jQuery to handle validation of second profile as the fields may or may not be required based on selection of first profile fields.
> 1 votes

# Answer
If you are using Drupal than i believe you can split the profile into multiple forms by using webform.

HTH

Pradeep
> 1 votes

---
Tags: wordpress, profile
---


title: Using ACL for event registration

text:
# Question
Title: Using ACL for event registration
I have a use case where there are public and non public events. Public events should be seen by everyone and can be registered for. Non public events should only be seen and registerable for a certain group (members.

With ACLs I deactivated the CMS permissions and added the rights to view / edit an event. I got as far as to create a seperate ACL for each event which grants the appropriate right in order to make an event public / non-public. This process however is very tedious since it required the creation of a seperate ACL for each event. Is there a way to make this more "global" so that events of a certain category (custom field) are public while others are non public?

# Answer
> 1 votes
You could apply the same techniques for event pages that are described for contribution pages here: Are private contribution pages a thing?.

EDIT: Actually that's only a piece of the puzzle, let me give an example (and make it CMS-agnostic). Assuming you want to limit access to members of "Newsletter Subscribers"

```
function hook_civicrm_preProcess($formName, &$form) {

  $redirectPath = 'home';  // set this to the url to redirect to if access is denied

  if ($formName == "CRM_Event_Form_Registration_Register") {
    $contactId = CRM_Core_Session::singleton()->getLoggedInContactID();
    $result = civicrm_api3('Contact', 'get', array(
      'group' => "Newsletter Subscribers",
      'id' => $contactId,
    ));
    if ($result['count'] === 0) {
      CRM_Utils_System::redirect($redirectPath);
    }
  }
}

```

Note: This will hide ALL event registrations. You'll have to find a variable in the `$form` object to use to determine whether this code should run on a particular page and modify the `if` condition.

---
Tags: civievent, permissions, acl, registration
---


# Question
Title: How to remove a contact from a group with Webform?
Judging from various questions here it appears possible to remove a contact from a group using a webform. e.g. See this question. But 'how?' I have added the group to the webform and want to give the user a checkbox so they have the option to be removed from the group. But I'm stumped as to the next step. What component can be configured to link to the group? I've added a 'select options' component but can't see how it can be configured.

# Answer
> 1 votes
* On the CiviCRM tab of webform, add a contact using *Existing contact*
* Set *Enable Groups and Tags* to *Yes*
* In the Groups box, choose *-User Select-*

If you don't want all the groups showing:

* Go to the 'Webform' tab
* Click 'Edit' for the *Groups* component
* Select 'Static Options' and choose which groups to show

When the form is loaded with an existing contact, the checkboxes corresponding to the existing groups should be ticked. Untick and save to remove from the group.

---
Tags: drupal, webform-civicrm, 4.7
---


title: Fixing null sort and display names

text:
# Question
Title: Fixing null sort and display names
In one of the systems we support there are some contacts with NULL display and sort names. This means they don't show up in searches. How do we fix these?

# Answer
> 2 votes
Make sure you back up first.

The display name field for the site concerned only contained first\_name, last\_name and prefixes. I assume in some case you might also want to append suffixes?

trim and replace are used to remove additional whitespace in cases where their was a null first or last name.

```
UPDATE civicrm_contact AS c LEFT JOIN civicrm_option_value AS ov ON c.prefix_id = ov.value AND ov.option_group_id = 6 SET c.display_name = trim(replace(concat(ov.label, " ", c.first_name, " ", c.last_name), "  ", " ")) WHERE c.contact_type = 'Individual' and c.display_name is null and (c.first_name is not null or c.last_name is not null);

```

Check if any contacts have no first or last name - but an email.

```
SELECT e.email FROM civicrm_contact as c LEFT JOIN civicrm_email as e on c.id = e.contact_id and e.is_primary WHERE c.contact_type = 'Individual' and c.display_name is null and c.first_name is null and c.last_name is null and e.email is not null;

```

in this case there was none so no need to do a further update.

The same for organizations

```
UPDATE civicrm_contact as c SET c.display_name = c.organization_name WHERE c.contact_type = 'Organization' and c.display_name is null and organization_name is not null;

```

Then you want to do the sort name

The select

```
SELECT c.id, CASE when c.last_name is not null and c.first_name is not null then concat(c.last_name, ", ", c.first_name) when c.last_name is null and c.first_name is not null then c.first_name when c.last_name is not null and c.first_name is null then c.last_name when c.last_name is null and c.first_name is null then e.email END from civicrm_contact as c left join civicrm_email as e on c.id = e.contact_id and e.is_primary where c.contact_type = 'Individual' and c.sort_name is null and (c.first_name is not null or c.last_name is not null or e.email is not null);

```

and the update

```
 UPDATE civicrm_contact as c set c.sort_name = CASE when c.last_name is not null and c.first_name is not null then concat(c.last_name, ", ", c.first_name) when c.last_name is null and c.first_name is not null then c.first_name when c.last_name is not null and c.first_name is null then c.last_name END where c.contact_type = 'Individual' and c.sort_name is null and (c.first_name is not null or c.last_name is not null);

```

Here I used case to resolve issue with multiple cases with both names, only first name only last name.

And finally organizations

```
SELECT count(c.id) from civicrm_contact as c where c.contact_type = 'Organization' and c.sort_name = null;

```

---
Tags: mysql, sql, civicrm-contact
---


# Question
Title: Does the Gift membership extension work with 4.7?
Does anyone know if Civicrm's Gift Membership extension works with 4.7?

https://civicrm.org/extensions/gift-memberships shows stable releases up to 4.6.

Parenthetically, I'm also aware of Coleman's suggestion of using webforms to create gift memberships here: Webform CiviCRM and Gift Membership. But the Gift Extension provides individual access codes which start the membership when the gift recipient chooses, which is a great feature.

Thanks for any thoughts on this.

# Answer
Fuzion have now updated this extension for us... we have details if anyone is interested. Thanks team.
> 0 votes

# Answer
There is an issue in git here asking this very question but without any answers since Nov 2016 and last commit is nearly 2 years ago. Worth raising the question here since it has a broader audience

UPDATE

changes have been pushed to the main extension repository - https://github.com/relldoesphp/com.aghstrategies.giftmemberships/pull/11.

This will enable users to use the extension on 5.x versions
> 0 votes

---
Tags: civimember, gift-memberships
---


# Question
Title: Calculate a better price for Webform CiviCRM Payment Installments (Annual)
If I set up Webform CiviCRM to sell an annual membership

* 4 installments
* 1 payment a year
* Four years

It seems to work just fine as far as charging them for the first installment and then tracking the rest on the CiviCRM end.

However, the user sees this on the payment page of the webform:

Is there any way to either remove this completely and use Webform to just list their current charge, or a way to parse this into something that will let them know what they are actually paying right now? I don't think putting the number of installments next to the membership name is going to cut it.

CiviCRM 4.7

Is using something like https://www.drupal.org/project/webform\_calculation\_components viable for this?

# Answer
That’s still on the ToDo list. Can you open an issue for this in the Drupal queue? I’ve got a small PR related this that I need to submit - will have a look at how to resolve this as well.
> 2 votes

---
Tags: webform-civicrm
---


title: Wordpress hooks – some don't work

text:
# Question
Title: Wordpress hooks – some don't work
I noticed that some hooks are not firing… I have the following three hooks

```
<?php

add_filter('civicrm_permission', 'civicrm_permission', 10, 1);
function civicrm_permission(&$permissions) {
  PC::debug( $permissions, '$permissions' );
}

add_filter('civicrm_aclGroup', 'civicrm_aclGroup', 10, 5);
function civicrm_aclGroup( $type, $contactID, $tableName, &$allGroups, &$currentGroups ) {
  PC::debug( $type, '$type' );
  PC::debug( $contactID, '$contactID' );
  PC::debug( $tableName, '$tableName' );
  PC::debug( $allGroups, '&$allGroups' );
  PC::debug( $currentGroups, '$currentGroups' );
}

add_filter('civicrm_alterAPIPermissions', 'civicrm_alterAPIPermissions', 10, 1);
function civicrm_alterAPIPermissions(&$permissions) {
  PC::debug( $permissions, '$currentGroups' );
}

?>

```

the middle one (civicrm\_aclGroup) fires, the other two do not. PC::debug is just a logging class. as far as I understood the docs this would be the correct way to target the hooks.

# Answer
> 0 votes
Depends what you do in (or with) CiviCRM as to which hooks fire. So, for example, when I go to "Manage Events", I see the following in my logs:

```
[02-Feb-2018 17:05:56 Europe/London] Array
(
    [method] => civicrm_alterAPIPermissions
    [permissions] => event
    [backtrace] => #0 /path/to/wp-includes/class-wp-hook.php(288): civicrm_alterAPIPermissions('event')
    ... lots of backtrace ...
)

```

If I go to "Configure Event - Rain-forest Cup Youth Soccer Tournament" (I've got a test install with the sample data) then I also see:

```
[02-Feb-2018 17:09:46 Europe/London] Array
(
    [method] => civicrm_aclGroup
    [type] => 4
    [contactID] => 202
    [tableName] => civicrm_uf_group
    [allGroups] => Array
        (
            [10] => Contribution Bulk Entry
            [13] => Honoree Individual
            [11] => Membership Bulk Entry
            [1] => Name and Address
            [6] => New Household
            [4] => New Individual
            [5] => New Organization
            [9] => On Behalf Of Organization
            [3] => Participant Status
            [8] => Shared Address
            [7] => Summary Overlay
            [2] => Supporter Profile
            [12] => Your Registration Info
        )

    [currentGroups] =>
    [backtrace] => #0 /path/to/wp-includes/class-wp-hook.php(286): civicrm_aclGroup(4, '202', 'civicrm_uf_grou...', Array, NULL)
    ... lots of backtrace ...
)

```

If I visit "WordPress Access Control" under Administer -\> Users & Permissions, I get:

```
[02-Feb-2018 17:19:26 Europe/London] Array
(
    [method] => civicrm_permission
    [permissions] => Array
        (
        )

    [backtrace] => #0 /path/to/wp-includes/class-wp-hook.php(286): civicrm_permission(Array)
        ... lots of backtrace ...
)

```

So, in summary: those hooks *do* fire - but only when needed.

---
Tags: wordpress, hooks
---


# Question
Title: After upgrade, I can't generate pdf letters for printing. How can I enable wkhtmlpdf to handle pdf conversion?
Just upgraded CiviCRM. Running 4.7.29 on D7.56. Have installed wkhtmltopdf at /usr/local/bin/wkhtmltopdf I have placed exactly that file path into the settings in the admin for the "alternate" pdf generator. Doesn't seem to work. Get fatal error when I try to generate pdfs for printing. Here is the alert message:

`Fatal error: Call to undefined method CRM_Core_SelectValues::documentFormat() in /home/[site]/public_html/sites/all/modules/civicrm/CRM/Contact/Form/Task/PDFLetterCommon.php on line 186`

Don't think wkhtmlpdf is executing. Is there a test to see if wkhtmlpdf is handling the conversion, as opposed to dompdf? Any suggestions?

# Answer
The fix was to uninstall/reinstall sumfields! However, I had to manually delete row/drop tables (value\_sumfields and custom\_groups) in order to "clean install" sumfields. Still don't know why, but my instance was buggy. The usual uninstall/install procedure in the extensions manager didn't work for me. Talked to Jamie McClelland and he confirmed that I could/should manually make changes to the tables and then reinstall 3.1.1 of sumfields. NOTE: I had originally assumed that the problem had to do with wkhtmltopdf and so started down a bunny trail. For some reason upgrading from 4.7.22 to 4.7.29 AND having sumfields enabled AND using alternate pdf generator caused/revealed the problem on my instance. I will continue to investigate this, but I want to give a big shout out to Aidan at Squiffle and to Jamie at Progressive Tech Project for sticking with me.
> 0 votes

---
Tags: pdf, printing
---


title: Purchase package of event registrations

text:
# Question
Title: Purchase package of event registrations
I'd like to offer Contacts the ability to purchase a package of six event registrations that can be used over the course of a year. Can anyone suggest how that could be accomplished?

# Answer
I've never seen anything like that done. The only thing I can think of off the top of my head:

Create the ability to purchase the package. You could do the page through a contribution page.

Create a discount code (you'd need to install the extension for discounts) that is specifically for them. Make it a 100% discount. Give it 6 uses.

Email them the code. Be sure they understand that it's specifically for them and can only be used 6 times. If they share it, then they're losing registrations they paid for.

Then they can register for an event and use the code to have it fully paid for.

This will take some manual work on your side (creating the code, sending it to them).
> 1 votes

---
Tags: civievent
---


# Question
Title: Where can I edit the content of this field that contains the checkboxes of the mailing lists?
I'm a novice with civi. Please, where can I edit the content of this field that contains the checkboxes of the mailing lists? I need delete one, but I don't find where I can edit the field content.  |||

Regards!!!

# Answer
> 0 votes
It's hard for me to tell 100% for sure since I can't translate the text, but it looks like you're looking for custom fields.

Once you go in there, you should be able to find the field you're looking for.

---
Tags: fields, field-mapping
---


# Question
Title: Ajax error when viewing relationships under IIS and Joomla (HTTP400 - invalid syntax)
This is similar to Ajax Error when trying to view relationships tab, but the analysis is different. It is not solved by increasing the request limits - they are much higher than the GET parameter. The browser debugger yields two entries like: HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax. (XHR)GET - https://jupiter/joomla/administrator/?option=com\_civicrm&task=civicrm/ajax/contactrelationships&context=current&cid=733&draw=1&columns%5B0%5D%5Bdata%5D=relation&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=sort\_name&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=start\_date&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=end\_date&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=true&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=city&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=true&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=state&columns%5B5%5D%5Bname%5D=&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=true&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B6%5D%5Bdata%5D=email&columns%5B6%5D%5Bname%5D=&columns%5B6%5D%5Bsearchable%5D=true&columns%5B6%5D%5Borderable%5D=true&columns%5B6%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B6%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B7%5D%5Bdata%5D=phone&columns%5B7%5D%5Bname%5D=&columns%5B7%5D%5Bsearchable%5D=true&columns%5B7%5D%5Borderable%5D=true&columns%5B7%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B7%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B8%5D%5Bdata%5D=links&columns%5B8%5D%5Bname%5D=&columns%5B8%5D%5Bsearchable%5D=true&columns%5B8%5D%5Borderable%5D=false&columns%5B8%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B8%5D%5Bsearch%5D%5Bregex%5D=false&start=0&length=25&search%5Bvalue%5D=&search%5Bregex%5D=false&\_=1497973438482

This string is so long that it is hard to see where the syntax error might be. Any suggestions, or even suggestions how one might go about debugging this.

# Answer
After months of struggling with this, I think I have solved it: I found this article or others like it: https://stackoverflow.com/questions/8159321/request-exceeds-the-configured-maxquerystringlength-when-using-authorize which gave the parameters to tweak in web.config:

is an example. As it is a private server I haven't spent much time optimising those parameters.
> 1 votes

---
Tags: joomla, javascript, ajax
---


title: One time gift intended to be recurring

text:
# Question
Title: One time gift intended to be recurring
We recently had a donor give a one time gift that they intended to be a recurring gift. Hard to say if they neglected to click the box or if they did and something went awry. Regardless, what we are trying to correct now is that they would like the gift to occur monthly. Can I do something in the UI or in the database to turn this one time gift into a recurring gift, or is it best just to have the donor try again next month? Thanks!

Drupal 7, Civi 4.6 LTS, iATS payment processing

# Answer
> 2 votes
If the donor did **not** initiate the recurring contribution - then the extension did **not** tokenize the credit card - so you’ll need the card credentials from the donor to set up the recurring contribution.

---
Tags: civicontribute, contributions, recurring-contributions, iats
---


title: Event register page style bug

text:
# Question
Title: Event register page style bug
I'm using 4.7.29 CiviCRM with latest Wordpress version.

On my event register page, I've an issue with scroll menu (set with Price set option) :

The option is cut. And it is also when I select an other in the listing.

Can I resolve it myself or it's a general bug ? I've already try severals browser.

Thank you !

# Answer
> 0 votes
I've modify this css line to solve the problem :

```
    .select2-container .select2-choice > .select2-chosen {
    line-height: 15px;
    }

```

---
Tags: civievent, issues
---


title: CiviCRM and GDPR

text:
# Question
Title: CiviCRM and GDPR
To how large degree is CiviCRM GDPR-compliant. One example that I just now thought of is, what if someone calls us and wants all our records of correspondence deleted from our systems. Can I just delete the contact and all activities, memberships records, volunteering etc disappears? Or do I do a lot more than this to ensure I stay GDPR-compliant?

What are the plans to make CiviCRM GDPR-compliant (if such plans exist, or are considered)?

# Answer
> 4 votes
There is work ongoing to ensure that CiviCRM is GDPR-ready. Veda Consulting is leading on this I think, and there's an extension in progress here and some helpful background documentation here.

# Answer
> 2 votes
We've just released a new version which has anonymisation built into it. Please do take a look.

https://github.com/veda-consulting/uk.co.vedaconsulting.gdpr

---
Tags: contacts
---


title: API call for ACL roles no longer works

text:
# Question
Title: API call for ACL roles no longer works
I have an API call to get ACL roles that worked before I upgraded to 4.7.29 (I think I was at 4.7.22). Now, this returns no results:

```
    $entity_id = $group["id"];
    $apiParams = array("entity_id" => $entity_id
            , "entity_table" => "civicrm_group", "is_active" => 1);

    $entity_name = "Acl_Role";
    $result = civicrm_api3_get($entity_name, $apiParams);

```

I'm debugging now, but wondering if anyone can quickly tell me if something changed recently that I need to catch up on?

# Answer
> 1 votes
I am not sure why you are using `civicrm_api3_get`. The standard way for v3 api calling is `civicrm_api3('entityName', 'action', $params)`.

Just try replacing the snippet from above question to below:

```
 $entity_id = $group["id"];
 $apiParams = array(
   "entity_id" => $entity_id,
   "entity_table" => "civicrm_group",
   "is_active" => 1
 );

 $entity_name = "Acl_Role";
 $result = civicrm_api3($entity_name, 'get', $apiParams);

```

HTH

Pradeep

---
Tags: api
---


# Question
Title: How to link profile field with multiple values?
I would like to create a link to a pre-filtered profile search. I have a field (custom\_2) with multiple values. I was able to link using one value (ex id=2) suing this url: .../index.php?option=com\_civicrm&task=civicrm/profile&Itemid=45&\_qf\_Search\_display=true&custom\_2=2

However when I try the following I only get results of the last ID (ex. 1): .../index.php?option=com\_civicrm&task=civicrm/profile&Itemid=145&\_qf\_Search\_display=true&custom\_2=2&custom\_2=1

When using the following URL, I get the results of both values (2 and 1) but I also get an error: .../index.php?option=com\_civicrm&task=civicrm/profile&Itemid=145&\_qf\_Search\_display=true&custom\_2\[\]=2&custom\_2\[\]=1

Error: Warning: strpos() expects parameter 1 to be string, array given in /home1/.../public\_html/administrator/components/com\_civicrm/civicrm/CRM/Profile/Form/Search.php on line 65

Warning: explode() expects parameter 2 to be string, array given in /home1/.../public\_html/administrator/components/com\_civicrm/civicrm/CRM/Profile/Form/Search.php on line 66

Warning: Invalid argument supplied for foreach() in /home1/.../public\_html/administrator/components/com\_civicrm/civicrm/CRM/Profile/Form/Search.php on line 68

I'm not sure what to put in the URL to get rid of the error and get results from multiple value of the same field.

This is CiviCRM 4.7.29 on Joomla 3.8.3

# Answer
> 0 votes
To pre-select multiple select value fields you can provide values with `,` separated.

Example:

```
.../index.php?option=com_civicrm&task=civicrm/profile&Itemid=145&_qf_Search_display=true&custom_2=2,1

```

HTH

Pradeep

---
Tags: profile, search, links
---


title: CiviContribute - fee calculation error

text:
# Question
Title: CiviContribute - fee calculation error
I'm getting the error: 'The sum of fee amount and net amount must be equal to total amount' when I'm trying to manually add a contribution. The calculation is correct.

Any help in resoling it appreciated.

Thanks, Peta

# Answer
There are few issues reported against this validation(CRM-21624). Can you please try after applying the patch or you will need to wait for 4.7.31 release.
> 1 votes

---
Tags: civicontribute
---


# Question
Title: ezcMailParser not able to retrieve bcc from a mail
Trying to process inbound mails that are bcc'd to abc@domain.com (Office 365).

Pasting the code we have at https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L128-L138

```
$parser = new ezcMailParser();
//set property text attachment as file CRM-5408
$parser->options->parseTextAttachmentsAsFiles = TRUE;
foreach ($set->getMessageNumbers() as $nr) {
  if ($this->_debug) {
    print "retrieving message $nr\n";
  }
  $single = $parser->parseMail($this->_transport->fetchByMessageNr($nr));
  $mails[$nr] = $single[0];
}

```

When a mail is bcc'd from a Gmail account to `abc@domain.com` and `Process Inbound Email` job is executed, `$mails` correctly contain the email address in the bcc header.

But, when it is sent from an outlook account or Apple Mail, there is no bcc or any header that contains an information that our mail was bcc'd to `abc@domain.com`.

Does our email parser strips bcc information if the input is from a server other than Gmail?

Update -

If mail is sent from Gmail, headers look like - https://gist.github.com/jitendrapurohit/fa6a115c18b8bcfbb8346f58cd1265c0

From Outlook - https://gist.github.com/jitendrapurohit/176eee759cfc9b3688682ea99b6c3460

# Answer
> 1 votes
In my experience, reading the `Bcc` field is not a reliable source of information, because there is not always available data. Thanks to your question I checked the RFC in response to your question and learned why!

**What's happening**

See https://www.rfc-editor.org/rfc/rfc2822#page-22

> The "Bcc:" field (where the "Bcc" means "Blind Carbon Copy") contains addresses of recipients of the message whose addresses are not to be revealed to other recipients of the message. There are three ways in which the "Bcc:" field is used.
>
> In the first case, when a message containing a "Bcc:" field is prepared to be sent, **the "Bcc:" line is removed even though all of the recipients (including those specified in the "Bcc:" field) are sent a copy of the message**.

When sender and recipient are on different servers, this is the behaviour you'll observe. (Outlook.com =\> Gmail.com result)

> In the second case, recipients specified in the "To:" and "Cc:" lines each are sent a copy of the message with the "Bcc:" line removed as above, but **the recipients on the "Bcc:" line get a separate copy of the message containing a "Bcc:" line**.
>
> (When there are multiple recipient addresses in the "Bcc:" field, some implementations actually send a separate copy of the message to each recipient with a "Bcc:" containing only the address of that particular recipient.)

When sender and recipient are on Outlook.com, this is the behaviour you observe. (Outlook.com =\> Outlook.com result)

> Finally, since a "Bcc:" field may contain no addresses, a "Bcc:" field can be sent without any addresses indicating to the recipients that blind copies were sent to someone.

So - it's not a difference in Outlook vs GMail behaviour, so much as a difference in how MTAs handle internal and external deliveries. I still would not expect to see *other* Bcc recipients appear though.

See also this similar question/answer.

**How to handle this**

My take is: if you're parsing an email and the receiving address is not in To or Cc, it’s a fair bet that it was either Bcc'd or the receiving address is the final recipient of an email alias.

Beyond that, don’t expect to know who’s in the Bcc field - that’s what it’s for.

---
Tags: email, mailserver
---


# Question
Title: Use Mosaico or easy editor to edit email system template
I'm using 4.7.29 CiviCRM with latest Wordpress version.

Is it possible to edit email template (i.e. "Events - Registration Confirmation and Receipt (on-line)") with Mosaico ? Or with another extension ?

Because edit email template seems to be an horrific work... I don't know where begin to edit template, there are too much conditional and informations...

In the event configuration, it should be possible to choose which template to use for which event for registration confirmation.

Thank you !

# Answer
> 0 votes
There is nothing in Civi that provides this, and no Extensions I am aware of that provide this. No it cannot be done using Mosaico.

# Answer
> 0 votes
No, I don't know of any extension that does that - it's all hand editing code. And no, you can't select a template on an event. The template that is there is the receipt for all events. If you want to send an additional email after people register, you can do this using the extension CiviRules.

---
Tags: civievent, civimail, mosaico
---


# Question
Title: Event Max Participant Option Not Respected
the max particapent functionality works via the front-end but if someone is registered manually (say if they pay by cash at the shop) then the shop uses the back-end CiviCRM menu option "register event participent" under Events.

But the problem here is that if I have a priceset option to have a max participent of 1 (a time booking has a max of one person per slot) and that slot is taken, this will not be reflected in the back-end booking under "register event participent". And they will be able to choose any slot option regardless if that slot has already been taken. And thus creating double bookings.

Does anyone know if I am doing something wrong or is this an oversight?

Cheers

# Answer
> 1 votes
As I understand it, the max registrants is for the front-end, not the back-end. Often times when someone is manually registering someone in the back-end, they may need to override settings like the max registrations. So it doesn't take that into consideration. If you need it to be one only, then the person who is doing the registering should book it via the front-end like as if they were a customer (make sure you're not logged in when you do it). That will set them as pending since they didn't pay via your online method. Then you'd edit the record to reflect that they paid.

---
Tags: civievent
---


title: Multilingual Email Greeting

text:
# Question
Title: Multilingual Email Greeting
CiviCRM for WordPress 4.7.15

Problem: Fix the Email Greeting, so it takes advantage of the preferred language and gender fields. I took a look at:

https://wiki.civicrm.org/confluence/display/CRMDOC/Recipe+for+German+Name+and+Greetings+Handling

The page to edit the Email Greeting is hidden under **Administration/System Settings/Option Groups - Email Type Greeting Options**

I came up with the following which works nicely when used in a Smarty Message Template.

```
{capture assign=l}{contact.preferred_language}{/capture}
{capture assign=g}{contact.gender}{/capture}
{if $l="en_CA"}Dear{else}{if $g="Male"}Cher{else}Chère{/if}{/if} {contact.first_name} {contact.last_name}

```

To test it, one selects the new **Email Greeting** from the drop down on the **Contacts Summary** page in the **Communication Preferences** section. Then clicks Save. At this point, the CiviCRM says.

Any suggestions? I'm considering adding 3 Greetings and updating all 2697 records via SQL.

# Answer
> 1 votes
I am a bit of a hurry at the moment - we use a greeting based on the prefix - maybe it helps:

> {capture assign=c}{contact.communication\_style}{/capture}{capture assign=p}{contact.individual\_prefix}{/capture}{if $p=="Frau"}Liebe{else}Lieber{/if}{ }{if $c=="Familiar"}{ }{contact.first\_name}{else}{$p}{ }{contact.formal\_title}{contact.last\_name}{/if}

# Answer
> 1 votes
Meanwhile, we have developed a new extension which may help people struggling with many different and or/complex greetings. The extension (including documentation) can be found here.

---
Tags: wordpress, email, message-templates
---


title: Add CiviRules action

text:
# Question
Title: Add CiviRules action
I am starting to experiment with civirules, and it looks like it's going to help a lot for automated workflows. There are some actions that are missing and am interested in playing to add more.

Using Wordpress 4.92, Civicrm 4.7.27, CiviRules 1.17

Am looking here: https://docs.civicrm.org/civirules/en/latest/create-your-own-action/ but am having a hard time understanding exactly what I need to do to add an additional action.

"It is pretty simple (at least that is what we think) to add your own actions to the CiviRules Engine. You can either do that by adding it to the CiviRules extension or by creating your own extension and including your own action." Well it doesn't seem simple because I can't find a simple way of doing this.

There's some existing action items that would easily serve as templates for what I want to do, so I'd like to add an additional action to the existing CiviRules extension.

I've attempted to code additional mgd.php and .php files in the appropriate folder structure. But when I do this, the class isn't registered in the database - obviously.

"If you didn't create your extension with civix you should add the hook\_civicrm\_managed\_entities to your extension and return the array below." How do I do this exactly if I'm adding to the existing extension and not creating a new one? Where do I put the hook? What's the syntax? I've never worked with hooks before. I've Google searched for hook\_civicrm\_managed\_entities but I'm not sure what this is as it doesn't return anything. Is this the hook\_civicrm\_managed(&$entities) hook that is in https://docs.civicrm.org/dev/en/latest/hooks/hook\_civicrm\_managed/?

I attempted to use create a hook directory as per https://docs.civicrm.org/dev/en/latest/hooks/setup/wordpress/ and use the code that is recommended and that broke my site. The info in this doc seems to imply that it relates to WordPress 4.6, and the link https://civicrm.org/blog/haystack/working-with-civicrm-46-in-wordpress has a comment that says the civicrm\_managed\_entities hook won't work properly with WordPress? "Tim Otten reminded me (thanks Tim) that there's another hook which won't behave as expected in WordPress, which is 'hook\_civicrm\_managed'. Callbacks work fine but, at present, there's no logic for managing the entities in WordPress. Another one for the roadmap, logged here for reference."

Help please!! Step 2 and 3 I can easily do, but Step 1, not so much.

# Answer
> 3 votes
great that you are trying to add your own actions! And great that you are sharing your exerience with the documentation here.

If you added a .mgd.php file you will have to do a '/civicrm/clearcache' to make sure that your class is registered. Did you do that? If not give that a try and that might fix your issue.

---
Tags: wordpress, civirules
---


title: PHP version matters or not?

text:
# Question
Title: PHP version matters or not?
I've been running certain 5.6 for a long while and wondering if I ever should migrate to 7.0 or just leave alone. Installation instructions say 7.0 is recommended but so is 5.6

Anyone have opinions on this?

---Update: I have upgraded my WordPress site to 7.2 without too much trouble. However the Drupal 7 / Civi site when I tried to update, I got 503 errors and had to roll back. I think there are some really tight controls the consulting firm put into place. I kept reading about FastCGI and NGINX and had no idea. I do not know about these and if they are used. I know that FPM is used. I want to update before year end but I am scared. Anyone?

# Answer
A few considerations:

1) You want to be running a version that has security support. See https://secure.php.net/supported-versions.php Both 5.6 & 7.0 have support to Dec 2018. Beyond that, you need 7.1+ (although 7.1 is not currently recommended for use with CiviCRM - https://docs.civicrm.org/sysadmin/en/latest/requirements/)

2) php 7 is faster than 5.6. See http://www.zend.com/en/resources/php7\_infographic Why not run the faster version?

3) Maintaining support for old versions of php is a drain on development resources and prevents CiviCRM taking advantage of new php features.

So, yes upgrade to 7.0 now (providing you are on the current 4.7.\* release) and expect to keep upgrading.

\[Edit: prompted by Graham's comment.\]

Php requirements links:
> 2 votes

---
Tags: php, core
---


# Question
Title: Cannot access Group admin - missing API key
CMS: Drupal 7.56 (shared hosting at Siteground; cpanel/phpmyadmin access) Civicrm version: 4.6.34 (followng problem follows recent update)

I (admin 1 - all civicrm persmissions) cannot access Contacts \> Manage Groups. Receive the following screen message:

On selecting 'Return to home page' link, the following errors show:

```
Warning: Illegal string offset 'group_name' in CRM_Core_BAO_Setting::getItems() (line 332 of [path edited].../sites/all/modules/civicrm/CRM/Core/BAO/Setting.php).
Notice: Uninitialized string offset: 0 in CRM_Core_BAO_Setting::getItems() (line 332 of [path edited]/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php).
Warning: Illegal string offset 'group_name' in CRM_Core_BAO_Setting::getItems() (line 332 of [path edited]/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php).
Notice: Uninitialized string offset: 0 in CRM_Core_BAO_Setting::getItems() (line 332 of [path edited]/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php).

```

Group contacts can be searched (through Contact \> Find Contacts \> enter group name in search box). Result provides url like: `base_url/civicrm/contact/search?_qf_Basic_display=true&qfKey=9f41ad4096614eb353cac129b335e58a_757` which indicates a valid key existing.

\[Edit\]: having logged out of CiviCRM and returned, receive following message (civi alert message in top right): "Count data for smart groups is not currently calculated. You may click Update Smart Groups to generate it. Be aware this can cause significant server load".

\[Edit 2\]: Drupal error logs show:

$backTrace = #0 /sites/all/modules/civicrm/CRM/Core/Error.php(446): CRM\_Core\_Error::backtrace("backTrace", TRUE) #1 /sites/all/modules/civicrm/CRM/Core/Invoke.php(57): CRM\_Core\_Error::handleUnhandledException(Object(InvalidArgumentException)) #2 /sites/all/modules/civicrm/drupal/civicrm.module(482): CRM\_Core\_Invoke::invoke((Array:2)) #3 internal function: civicrm\_invoke("group") #4 /includes/menu.inc(527): call\_user\_func\_array("civicrm\_invoke", (Array:1)) #5 /index.php(21): menu\_execute\_active\_handler() #6 {main}

And:

```
$Fatal Error Details = Array ( [message] => id (value: 1006'A=0) is not of the type Positive [code] => )

```

Any pointers most gratefully received.

SJ

# Answer
> 3 votes
After putting site into maintenance mode, enabling Debugging and Error handling, it became clear that this was related to the Mailchimp extension. I have disabled the extension and will reconfigure. Manage Groups now fine. Apologies for wasting anyone's time.

---
Tags: drupal, api, groups
---


title: Cron Job returning 404 in Joomla

text:
# Question
Title: Cron Job returning 404 in Joomla
This is a new install CiviCRM 4.7.29 on Joomla! 3.8.3 on Hostgator Shared. The Cron File is returning a 404 Error message. I can access the file itself when I run it from the Cpanel but somehow it is returning this error.

I changed the permissions on the Bin folder and cron.php (755,755) as was suggested in another post but still no success.

I created a specific user/group with the suggested permission just for the cron job. But now I'm testing with the Super Admin.

Any help is appreciated. Thanks

Update: I commented out: 'ini\_set('session.use\_trans\_sid', '0');' in joomla.php file which fixed the error and the Cron Job is now working. (as posted here) However. I'm not sure how this change might affect other functions in Joomla.

# Answer
I commented out: 'ini\_set('session.use\_trans\_sid', '0');' in joomla.php file which fixed the error and the Cron Job is now working. (as posted here) However. I'm not sure how this change might affect other functions in Joomla.
> 1 votes

---
Tags: joomla, cron-job
---


title: Scheduled Reminders not being send

text:
# Question
Title: Scheduled Reminders not being send
I want civi to send an email when our users renew their membership. I have setup the reminder as follows. but I have tested this couple of times by renewing my own membership offline but nothing gets sent.

What is it that im doing wrong

I have set the time to 0 hours after activity date assuming that it will send the email as soon as the renewal.

Any help would be highly appreciated

# Answer
Check under Administer\>System Settings\>Scheduled Jobs and make sure the job is enabled. It should also show when it was last run.

If it is enabled you should make sure you have your cron job setup correctly. More info on that is here: https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/#initiation

Hope this helps!
> 4 votes

---
Tags: civimember, scheduled-reminders, civicrm-home
---


# Question
Title: What can be done to improve loading of Activity searches and tabs on databases with gazillion civicrm_activity_contact rows
Digging in to why one of our larger clients is suffering more from slowness of Activity searches or loading of Activity tab for contacts.

Comparing it to other dbs what stands out for this database is the sheer number of rows in civicrm\_activity\_contact - and while they also have a lot of Activities, they have no where near as many as other databases. A sample of data below where A is the db that is grinding slowly

| db | Activities | Activity Contacts | average contacts per activity |

| A | 626,145 | 22,270,065 | 36 |

| B | 180,000 | 5,680,000 | 32 |

| C | 3,718,634 | 7,722,346 | 2 |

And it is DB 'A' that is seriously slow running Activity related queries.

Most of the Activity Contacts are on 'bulk mail' Activities

The activity search makes use of multiple joins of civicrm\_activity, civicrm\_activity\_contact and civicrm\_contact table. It leads to millions and millions of rows again and again which causes an indefinite loop of the query which never finishes or takes much longer time to complete. A sample query which is executed by hitting the search button on Find Activity form.

```
SELECT count( DISTINCT ( civicrm_activity.id ) ) as rowCount

FROM civicrm_contact contact_a
  LEFT JOIN civicrm_activity_contact ON ( civicrm_activity_contact.contact_id = contact_a.id )

  LEFT JOIN civicrm_activity ON ( civicrm_activity.id = civicrm_activity_contact.activity_id
     AND civicrm_activity.is_deleted = 0 AND civicrm_activity.is_current_revision = 1 )

  INNER JOIN civicrm_contact ON ( civicrm_activity_contact.contact_id = civicrm_contact.id and civicrm_contact.is_deleted != 1 )

  LEFT JOIN civicrm_option_group option_group_activity_type ON (option_group_activity_type.name = 'activity_type')

  LEFT JOIN civicrm_option_value activity_type ON (civicrm_activity.activity_type_id = activity_type.value
      AND option_group_activity_type.id = activity_type.option_group_id )

  LEFT JOIN civicrm_activity_contact ac ON ( ac.activity_id = civicrm_activity_contact.activity_id AND ac.record_type_id = 2)

  INNER JOIN civicrm_contact source_contact ON (ac.contact_id = source_contact.id)

WHERE  (  civicrm_activity_contact.record_type_id = 3
    AND civicrm_activity.is_test = 0
    AND civicrm_activity.status_id IN ("1", "2") )
    AND  ( 1 )
    AND  (activity_type.component_id IS NULL OR activity_type.component_id <> 5)
    AND  (activity_type.component_id IS NULL OR activity_type.component_id <> 7)

```

# Answer
> 2 votes
I do not know why this is so slow but we developed an extension together with Matthew Wire that improves some of those problems. Information can be found here.

---
Tags: activities, performance
---


title: How to deal with ' or (') in CKeditor

text:
# Question
Title: How to deal with ' or (') in CKeditor
I am unable to use smarty in CKeditor because it's transforming the ' into & #39; I couldn't find anything useful when click the configure CKEditor Button in display preferences.

# Answer
> 10 votes
You can turn off html encoding for CKeditor through UI (i.e \>= 4.7)

Navigate to Administer \>\> Customize Data and Screens \>\> Display preferences

Scroll down until you see `Configure CkEditor` button. Click on it to view all the settings. Under Advance options add `entities` option as `False`(as shown in image) and save the form.

**Note: You will need to clear your browser cache to reflect the changes(and CiviCRM caches).**

---
Tags: smarty, ckeditor
---


# Question
Title: How to trigger the Refund Notification email
There is a message template called "Additional Payment Receipt or Refund Notification" in the System workflow messages. I have tried to trigger the Refund Notification by adding contributions and then setting their status to be "Refunded" and I thought this would trigger the email notification, but it didn't. I have tried with event registrations too, but got no email. Am I doing something wrong, or did I miss a step? I couldn't find any information about the refund email notification in the CiviCRM guide either. I have tried on 4.6.33 and 4.7.27 installations but doesn't seem to work on any of them.

Let me know please if you have the answer. Thank you!

# Answer
> 2 votes
The Additional Payment Receipt or Refund Notification template is used to send receipt when payment is recorded for `Partially paid` or `Pending refund` or `Pending Pay Later` Contribution.

To trigger this you will need to create Pending Paylater Contribution and then under Contribution tab of Contact or Find Contribution results click on `More >> Record Payment` besides the contribution row.

Submit the Payment form by checking `Automatically email a receipt to xxx ??`

HTH

Pradeep

---
Tags: message-templates
---


# Question
Title: Access Control issue in CiviCRM with Groups?
Hoping the CiviCRM expertise here within stackexchange can provide some guidance on a warning I'm seeing...

When an Anonymous individual on our WordPress CiviCRM site has a Group (Mailing List) selected in a Profile they are shown the following Warning message. Each Warning message is shown twice for each Group selected by the user.

***Warning:*** *in\_array() expects parameter 2 to be array, null given in /home/coloradomaker/www/www/wp-content/plugins/civicrm/civicrm/CRM/ACL/API.php on line 218*

Line 218 is the return statement for the groupPermission function.

A full image of the page after submitting my two Group (Mailing List) choices is shown below:

More background:

1. There are two types of pages as the first submenu item under our Get Involved that are setup for an individual to provide their information for subscription to mailing lists: Logged in and not logged in. This warning happens if they are not logged in (Anonymous user). Does not happen if you are an Administrator (both as a WordPress user or in the CiviCRM Administrator group) or as a logged in user (Authenticated)
2. Some of the Groups were originally created as both a Mailing List AND an Access Control List but I removed the designation that they were an ACL group when I saw this warning since we weren't ready to go full into our implementation of the frontend site. Changing the Groups back to a Mailing List only still did not get rid of the Warning.
3. At one point I installed the BuddyPress Group sync but I Deactivated the plugin since I didn't want to use it yet.
4. PHP 5.6, WordPress 4.9.2, CiviCRM 4.7, BuddyPress 2.9.3, BP XProfile WordPress User Sync 0.6.4, BP Groups CiviCRM Sync 0.3.5 (Deactivated)

Thoughts on how to remove the warning or complete the ACL such that there are no warnings?

# Answer
> 1 votes
I can confirm the warning on a vanilla CiviCRM install. Creating an ACL for the mailing list group(s) fixes it, but that doesn't seem right because:

> The anonymous role (public in Joomla!) applies to all visitors to the website who have not logged in. This role will have the lowest level of permissions. The default CiviCRM permissions for this role are \[...\] subscribe and unsubscribe from mailing lists https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/

So in principle this shouldn't be necessary.

The problem actually lies in the `CRM_ACL_BAO_ACL::group()` method because the cache returns `NULL` rather than an empty array. This then gets passed back unchecked to `CRM_ACL_API::groupPermission()` where the warning is issued.

Two options for you then:

* Raise an issue on Jira and get the problem fixed
* Suppress warnings and write them to a log file instead

Doing both would be the responsible way to go :-)

---
Tags: wordpress, groups, acl
---


# Question
Title: Credit Card Contributions entered by staff listed as complete but never made it to authorizenet
recently taken over support for a very complex drupal 7/Civi 4.7.x site (which I'm happy to say was very well built by the initial team).

One of the issues that we've found reviewing things is that there are a number of contributions that were entered by the staff of the organization that are listed in civi as complete but do not show up anywhere in authorizenet. Other contributions entered by donors themselves were processed and paid but these have fallen into a void -- and these are some large donations.

As you can imagine this is causing a lot of stress. People thought they donated and never got billed; the org thinks it has money that was never processed so actually does not exist.

Has anyone seen anything like this in the past? I can't go back in time and fix the broken donations but what can I do to try to make sure this does not continue to happen?

# Answer
> 1 votes
after a lot of exploration it seems that this turns out to be user error caused by confusion about how CiviCRM multisite works.

The organization has multiple sub-groups, each having its own credit card processor account. The main www site was assumed by staff to be a master that had access to everything, but for the credit card processors it is just another subsite. So staff entering data logged into the main subsite were entering donations for other subsites. Those donations did not vanish, they just went into the wrong bank account.

---
Tags: civicontribute, authorize.net
---


# Question
Title: Fatal error: require_once(): Failed opening required 'CRM/Core/Payment/SDD.php'
When I go to Configuration \>\> System Settings & URL \>\> Clear Cache and Update Paths https://www.example.com/civicm/admin/setting/updateConfigBackend?reset=1 I tried to reset path and I get a WSOD with the following error

```
Fatal error: require_once(): Failed opening required
 'CRM/Core/Payment/SDD.php'
 (include_path='.:/home/hob/www/lyme/sites/all/modules/contrib/civicrm:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/packages:.:/home/hob/www/lyme/sites/all/modules/contrib/civicrm:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/packages:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/tecnickcom:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/phpseclib/phpseclib/phpseclib:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/pear_exception:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/auth_sasl:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/net_socket:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/net_smtp:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/validate_finance_creditcard:.:/usr/local/php56/lib/php')
 in
 /home/hob/www/lyme/sites/all/modules/contrib/civicrm/Civi/Payment/System.php
 on line 59

```

I see a similar error listed out here : CiviCRM 4.7.8 error after upgrade on eWay Recurring

Also when I checked the database for `civicrm_setting` table, I found all the values to be null.

When I looked into **CRM/Core/Payment/** folder, I did not find **SDD.php** is that an issue?

I went to the database and set all the payment processor.is\_active = 0 . I go back and Reset Paths and I get list of errors which are as given below

and last error on this list is this

```
Error loading module file (). Please restore the file or disable the module.

```

# Answer
If you have performed path reset than path of extension must have been updated and the system already have SDD payment processor created therefore it is throwing file not found error.

You can fix this in either of 3 ways:

1. If you have db access then update civicrm\_payment\_processor.is\_active = 0 for SDD payment processor type and then update the extension directory path by navigating to Administer \>\> System Settings \>\> Directories
2. Update the extension directory path in civicrm\_setting table where name = extensionsDir (make sure you serialize the data correctly)
3. Over-ride the extension directory path in civicrm.settings.php

$civicrm\_setting\['Directory Preferences'\]\['extensionsDir'\] = 'xxx/sites/default/files/civicrm/persist/contribute/';

and then update the directory path by navigating to Administer \>\> System Settings \>\> Directories

HTH

Pradeep
> 2 votes

---
Tags: configuration, payment
---


title: Problems getting smarty to work

text:
# Question
Title: Problems getting smarty to work
I'm not sure where to look - I've tried everything that I can think of to get smarty to work in an email template, but it's just not happening.

I'm using CiviCRM 4.7.27 with WordPress 4.9.3.

I've changed the smarty setting in /public\_html/wp-content/uploads/civicrm/civicrm.settings.php:

if (!defined('CIVICRM\_MAIL\_SMARTY')) { define( 'CIVICRM\_MAIL\_SMARTY', 1 ); }

But I can't get a smarty statement to work in a mailing.

If I use a Mosaico template, I get the source code in the email eg {capture assign=newsletter}Yes{/capture} {if $newsletter == Yes} You agreed to receive our emails. {/if}

If I use a new mailing (traditional) using the Sample CiviMail Newsletter template and try to test the mailing, I get an error message: " Sorry an error occurred and your information was not saved"

Tokens work fine.

Any idea re what the problem is?

UPDATE:

Have gotten Traditional mail to output the Smarty code properly. It was all due to some syntax issues. It's hard to test under an administrator account which may not have the same contents as a regular account. The remaining problem is that Mosaico templates don't work. Here's a sample of what comes through:

{capture assign=contactId}18{/capture} {crmAPI var='result' entity='Membership' action='getcount' sequential=0 contact\_id=$contactId membership\_type\_id="Family" active\_only=1} {if $result gt 0} Dear Test and family, {else} Dear Test, {/if}

Thank you for purchasing a 2018 membership!

{capture assign=newsletter}Yes{/capture} {if $newsletter}Because you've indicated you'd like to receive our e-news, you’ll get our newsletter about once a month with info on cycling events and issues, volunteer opportunities, and cycling events and meetings.{/if} {capture assign=interests}5{/capture}

{if $interests}You've also indicated that you're interested in participating in some of our activities. We'll send you information when there's one of your chosen activities planned.{/if}

{capture assign=volunteer}5{/capture} {if $volunteer}Since you also indicated you're interested in voluneering for some of our activities, one of our activity team leaders will contact you when there's an opportunity to volunteer to help out.{/if}

If anyone has any ideas, that would be great.

# Answer
I feel the statement should be something like this

```
{capture assign=newsletter}Yes{/capture}
{if $newsletter eq 'Yes'}
  You agreed to receive our emails.
{/if}

```
> 1 votes

---
Tags: civimail, email, smarty
---


# Question
Title: GDPR and CiviCRM for a small but internationally operating and serving organisation
In our relatively small UK based charity, our CiviCRM database holds personal data of members, donors, event attendees and volunteers from around the UK, Europe, USA and other countries around the world.

Our trained volunteers manage our CRM database by logging on to CiviCRM in the UK, India, USA and other countries around the world.

Could you point me to any suitable resources to determine how an **internationally serving and operating organisation** that holds personal data on people from multiple countries and operates in multiple countries can **get ready for the General Data Protection Regulation (GDPR)** which is coming into effect on 25 May 2018?

# Answer
> 3 votes
There is no individual resource as such that holds the answers to your question. There are currently still a significant amount of unknowns surrounding GDPR. Some of your issues can be resolved technically. By hosting your systems and data in a country like Switzerland which already has a so called "adequacy decision" with the EU and the US. Swiss law by default already sets the benchmark higher for privacy. But there are a number of things you have to do as a bare minimum: Data inventory. KNOW where your data is. HOW is that data used; domestic or commercial data processing? Be able to show how you are using the data and be able proof that that IS how you are using the data. The most important thing is that you are able to show you are TRYING to comply first and foremost. Secondly have a data-breach coping mechanism in place that ensures timely reporting to the correct authority. Hope this is helpful.

# Answer
> 2 votes
While this is only a partial answer to your question, it's worth checking out the CiviCRM GDPR extension, detailed on the CiviCRM blog.

---
Tags: security, gdpr, privacy
---


title: How secure is CiviCRM?

text:
# Question
Title: How secure is CiviCRM?
How does CiviCRM keep our data secure? Is the program web-based? Or is it desktop based? I am interested in downloading and trying CiviCRM for our organization but can't find an information on security features.

Thank you.

# Answer
> 8 votes
CiviCRM does not do anything special to either keep your data secure or insecure. It stores data in a MySQL database like lots of other applications.

The security is more in the way you configure your database server and the way CiviCRM (which is a web application and not a desktop application) can be accessed from outside.

A little more information in the configuration we tend to advise as the most secure (but also as usual most cumbersome and expensive) can be found in this CiviCon session by my community mate Björn Endres: https://www.youtube.com/watch?v=JKNR0bDjB9k

# Answer
> 6 votes
CiviCRM is a web-based tool and has no desktop component. It is thus as secure the server which hosts it, be that a local one or a remote one.

There are occasionally security flaws found in the software, just like any other package. The CiviCRM team then fixes those and releases new versions.

You can find more information about CiviCRM security here:

https://civicrm.org/security

# Answer
> 2 votes
Speaking in a personal capacity.

I have previously found multiple SQL injection issues in Civicrm which allowed any authenticated user to download the whole database of civicrm irrespective of the permissions. These were fixed and are publicly documented.

I re-examined the current 4.x recently and found no SQL injection issues. But the code has no systematic protection against such issues, unlike WordPress which provides its own database interface which is robust. So we are one developer error from reintroducing the same.

The code base appears to have multiple stored XSS issues. These would allow a malicious user to insert JavaScript which would allow a user allowed to manage events say to escalate their permissions to full administrator. Again there is no effective systematic defence to XSS built-in.

The product will try to create a separate database when installed into a WordPress site, which will typically keep the data safe from a SQL injection issue in the WordPress site.

XSS issues in WordPress plugins are common, and the escalation from XSS to controlling PHP on WordPress (when the Civicrm data could be compromised) is well documented. Attack tools like BeEF offer it as a point and click feature. This is not a Civicrm issue but a result of running such a service within a WordPress site.

I suspect similar comments apply to Drupal but I haven’t tested it there.

Not being familiar with the alternatives, and with a lot more to learn about Civicrm, I would advise organisations deploying Civicrm to consult a web applications security expert.

The issues described can be mitigated to an extent (CSP, mod-security etc), but certainly in Europe you face potentially large fines for leaking personal data, and keeping that data in public web applications with a history of issues could present problems. Especially if your organisation might reasonably be a target of focused attacks or is at all controversial.

---
Tags: evaluating-civicrm, security
---


# Question
Title: Changing default text on Thank You Screen
My company uses thank you screens for event registrations. The screen has this text on a green background: "Your registration has been submitted. Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process."

We don't use the built-in 'web page where you can complete the registration process' and really want to replace this text, but I can't see where to do that. Can anyone help?

Related to this, the 'introductory text' field on the thank you screen never seems to work.

Thanks!

# Answer
Quick update: this issue seems to have sorted itself out, possibly with one of the recent CiviCRM updates. Not the most helpful answer for anyone with a similar issue, but this appears to be fixed for me now.
> 1 votes

# Answer
Try Word replacement (more like sentence replacement) in your case. Here is a how to:

https://www.cividesk.com/blog/did-you-know-any-word-or-phrase-civicrm-can-be-replaced-another-one
> 1 votes

# Answer
You can use the `hook_civicrm_postProcess` hook and put the check for target event registration page and form name to be for the thank you screen. `$form` values can be changed using this hook.
> 1 votes

---
Tags: registration
---


title: Views integration broken

text:
# Question
Title: Views integration broken
Since the last two updates I am having severe issues with the views integration with Drupal. The views module hasn't changed, but it doesn't seem to work after the 4.74 and 4.76 updates.

When upgrading to 4.74 I lost all the custom fields in the integration and now with the 4.76 I lost even more fields like event names, dates and contact fields.

Does anyone else have this issue and knows how to fix it?

# Answer
> 1 votes
Have you tried clearing all Drupal caches then running update.php for Drupal? This fixes views for me

# Answer
> 1 votes
In my case I needed civicrm\_entity\_views\_extras and therefore both entity and civicrm\_entity, so disabling is not an option. My civicrm views break as soon as I migrate from production to stage. Clearing all drupal cache (which includes views) is not helping me. The only thing that seems to help is

* Access the failing view
* Specifically clear the views cache (drush cc views)

Apparently it should fail once and only then after cache cleared again, the cache is finally build properly. I will try now to deactivate views cache before migrating to see if that helps.

---
Tags: drupal, drupal-views
---


# Question
Title: How to add logo to Contributions - Receipt (on-line)
I am using Civi 4.7.29 on Wordpress 4.9.1

I need to make our online receipts look nicer. I tried adding a table to the template Contributions - Receipt (on-line) and adding the HTML for the logo image, but nothing changed in the test. How do I add the logo to the receipts and do other styling?

Thank you.

Added Screenshot

# Answer
This issue has been resolved. I am almost too embarrassed to tell you what the problem was.

All this time, I was working on the Contributions Receipts, but doing my tests on a Membership page. As soon as I noticed there was also a Membership receipt it all came clear. So, if anyone else ever runs into this issue, remember if it's a contribution but not a membership, it uses the Contribution Receipt. If it's a membership it uses the membership receipt.

Thank you everyone for trying to help me figure this one out. You did open my eyes to a lot of possibilities.
> 2 votes

---
Tags: message-templates, receipts
---


# Question
Title: CiviCRM API: How to get event by custom multiselect field option?
I have an event with a custom field `custom_1` which is a multi select or checkbox list with two options `Category A` and `Category B`:

```
"custom_1": [
  "category A",
  "category B"
],

```

Now I'm trying to get all events which have at least option `category A`:

```
CRM.api3('Event', 'get', {
  "sequential": 1,
  "custom_1": "category A"
}).done(function(result) {
  // do something
});

```

With this request I just get the events, which have `category A`, but not `category B`:

```
"custom_1": [
  "category A"
],

```

But I need all events with `category A`, regardless if they have another category. So events with this custom field values should also be returned:

```
"custom_1": [
  "category A",
  "category B"
],

```

Is it possible to make an API request like "Get all events which have **at least** one of this custom field options."?

# Answer
I think the feature you need is A 'contains' operation for the api to search multiselect custom values, which is work in progress. See the associated pull request #6612 for discussion of progress - it seems to have stalled but with good work already having been done.
> 2 votes

# Answer
May be try the below - If the below doesn't help then you need to write a sql for the same I guess

```
$result = civicrm_api3('Event', 'get', array(
  'sequential' => 1,
  'return' => array("custom_13"),
  'custom_13' => array('NOT IN' => array(2, 3)),
));

```

try to set unwanted category in "NOT IN" condition

Thanks - I guess this helps!!!
> 0 votes

# Answer
Because #6612 has been closed I'm currently using `LIKE` as a workaround:

```
CRM.api3('Event', 'get', {
  "sequential": 1,
  "custom_1": {"LIKE":"%category A%"}
}).done(function(result) {
  // do something
});

```

which is working fine if the value is not part of another value. E.g filtering by "*category A*" would also list events of "*category A*wesome".
> 0 votes

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


title: CiviDiscount db update error

text:
# Question
Title: CiviDiscount db update error
I'm new to civi and have had it dumped in my lap, so I know little about it. However, when I go to Adminster/System Setting/Extensions, I get a popup that says 'Your extensions require database updates. Please execute the updates' When I click 'execute the updates', the next screen says '\[Error: Upgrade org.civicrm.module.cividiscount to revision 2201\] DB Error: unknown error'

How can I figure out what the problem is?

# Answer
I can only speak in generalities, as I use Drupal instead of WordPress. So some of these things might be in a different spot. You'll need to go to wherever WordPress has its permissions and set them there. It's possible that they have it set up so that all the permissions go through the main site or that they are individual to each site.

Here's where I turn on error handling on my install.

Some options will tell you they are not recommended on a live site. That is because they slow down your site and may show errors to the general public. Usually if I am having issues, I will turn them on temporarily so that I can get the errors to show and then turn it off once I am done.

The extension not being found is likely due to one of two things:

* The site is pointing to the wrong place for extensions.
* Permissions for the files. I get this when I am logged in as root to the server, but the files need to be "owned" by the user assigned to the account.
> 1 votes

---
Tags: cividiscount
---


# Question
Title: How to supply user input to custom visualizations with Civisualize
I'd like to make a custom visualization with Civisualize but the visualization requires the user to first provide some input through several form elements. None of the visualizations that I see within Civisualize allow for any user input. Is this possible with Civisualize?

# Answer
> 1 votes
So the general dc.js way is that you fetch all the data needed, and do the filtering client side.

The usual way of doing the filtering is by clicking on the graphs, but you can as well have buttons on input filters, eg http://www.integritywatch.eu/

This being said, you could as well ajax fetch the data as csv or json, update the crossfilter and redraw the graphs. It might be easier to discuss about a specific example of what you want to do to work the pros and cons of each approach

X+

# Answer
> 0 votes
I had some need to be able to do that: on the first step, you have a list of campaign, and on the second one, you have the visualisation for the specific campaign. The trick is to see them as two different dataviz (list of campaign, detail of a specific campaign) with two diffent .tpl

For the second one, you can put in the url the user input (eg the campaign id), so for instance if your url is example.org/civicrm/dataviz/campaign/42 civisualize automatically assign {id} and you can read it from Campaign.tpl

So to finish the campaign example, you would have two urls example.org/civicrm/dataviz/campaign that uses Campaign.tpl and contains:

```
{crmTitle string="All campaigns"}
{if isset($id)}
Display the details of a campaign
  {include file='dataviz/_campaign_detail.tpl'}
{else}
  {include file='dataviz/_campaign_selector.tpl'}
Display the list of campaigns with urls to /dataviz/campaign/campaign_id
 {/if}

```

---
Tags: civireport, reports, custom-reports, civisualize
---


# Question
Title: CiviCRM mail sent 200% of intended recipients. Why?
It is CiviCRM 4.6.14. The mailing was scheduled via the api as per this stackexchange question.

It appears to have sent all the messages twice. Any ideas why? See report.

# Answer
> 1 votes
We had this bug in specific versions of CiviCRM. My advice is to upgrade to later versions, its very difficult to track down the exact cause. A few JIRA tickets exist around it, you can search but my advice would still be to upgrade to a newer version.

# Answer
> 1 votes
Check under-the-hood. If the "execute query" was double clicked, could that have caused this?

# Answer
> 0 votes
Have encountered the 200% delivery rate on a few mailings in Civi 4.6.33 . Found that there was a duplicate set of mailing jobs (parent + children), which were sent a couple of hours after the first set.

In this case, it appears the issue may be down to mailing approval workflow: log\_civicrm\_mailing indicates that somehow the affected mailings had their approval date changed, suggesting they were re-approved a while after the initial send had completed. The second send then began after this second approval.

This occurred during periods of heavy database load, so it's possibly a user clicked Approve multiple times after not getting an initial response, though that wouldn't explain the delay. In at least one case, the user who created the mailing had permission to approve, so may have hit Approve & Send more than once.

---
Tags: civimail, api
---


title: Where is extension data stored?

text:
# Question
Title: Where is extension data stored?
I am looking to upgrade an extension - for now I have been updating extensions by disabling - then uninstalling the old extension - and then installing and enabling the new extension. While that has worked for the most part, when I was going to upgrade Mosaico, I was worried if by using my typical method - I would lose all the templates I created. With that being said - is there a better way to upgrade the extension - and if I do what I typically do, will I lose any data?

# Answer
Its a bad idea of upgrading as uninstall and install new version of extension. You can upgrade the extension either one of the following two ways:

1. If the extension is listed under CiviCRM extension page with auto-download as true then under CiviCRM extension page of your site you should be able to see an option for updating the extension(if option not available than make sure you have Resource URL set for extension correctly, CURL, WGET, ZIP extension installed on server).
2. You can also upgrade the extension manually by replacing the extension folder/files and then visit CiviCRM extension page in your site and click on refresh button. If the new extension requires db changes than you will be prompted with an option on top right of the browser to run db upgrade. Run the upgrade and its ready for use.

CiviCRM stores extension settings in civicrm\_setting and civicrm\_managed table. But some extension have their own install code to store data in various table, uninstalling the extension will lead to loss of such data as incase of mosaico extension. It is recommended to follow upgrade pattern for upgrading any extension.

**Note: Always take backup of db and files before performing upgrade.**

HTH

Pradeep
> 8 votes

# Answer
based on this https://docs.civicrm.org/sysadmin/en/latest/customize/extensions/#upgrading-extensions you are correct that an uninstall will remove any data related to that extension.

That url also has instructions for how to upgrade extensions via the admin GUI. I usually prefer command line solutions but for Civi extensions I always use the GUI.

Extensions can store data in a bunch of different places, but looking at an old copy of the extension I have accessible, in the sql directory in the mosaico extension, the install file creates two tables civicrm\_mosaico\_msg\_template and civicrm\_mosaico\_template and the uninstall file deletes those tables.
> 1 votes

# Answer
Agreed with first answer. Also, extension data normally stores in civicrm\_extension. You can find information 'is\_active' 0 or 1 whether it is inactive or active.
> 0 votes

---
Tags: civimail, extension, mosaico
---


# Question
Title: Issues with Personal Contribution Pages / Events / Joomla
I have PCP turned on - the person is able to set one up - When someone goes to donate they get the error below - I also get the error even when I am logged in as an admin - so I don't think this is a permission issue with the ACL -

Joomla 3.8.5 Civi 4.7.27

Example page http://bit.ly/lzzebra

CiviCRM-001 - @import url(/administrator/components/com\_civicrm/civicrm/css/civicrm.css); @import url(/administrator/components/com\_civicrm/civicrm/css/crm-i.css); @import url(/administrator/components/com\_civicrm/civicrm/bower\_components/font-awesome/css/font-awesome.min.css); Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. The page you requested is currently unavailable.

Return to home page.

function toggle( element ) { var parent = element.parentNode; var className = parent.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { parent.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { parent.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

# Answer
> 2 votes
So thanks to Brian at ICD who helped troubleshoot this - somehow the PCP that was set up for the event was done in a way that while it was a contribution page - it was pointing to the event ID - This required some updating of the event PCP to point to the correct contribution page instead of the event. I am not sure how it happened - but it is fixed - I check on new event to see if I can select the appropriate contribution page and I can -

---
Tags: joomla, personal-campaign-pages
---


# Question
Title: Civicontribution 'Failed to update contribution in database'
Someone makes an online contribution, the payment goes through, but an error pops up on the screen saying 'Failed to update contribution in database'. If I look at contributions, the status for the contribution is 'Pending (Incomplete transaction)'. The error occurs from a call to completeTransaction() in Confirm.php.

I turned on debugging and got a traceback, but it doesn't tell me any more than I have typed here. How can I find out *why* the update to the database is failing?

# Answer
I feel its related to to CRM-21721. Can you please try after apply the patch?
> 1 votes

---
Tags: civicontribute
---


# Question
Title: Is there a deliberate crippling of CiviCRM in order to generate income for development?
The headline is sensationalistic, I know. But on a more rational level, I'm new to the Civi scene but I've dealt with other open source software and have not yet found any that seems to have such a diverse development ecosystem that waves off bugs without trying to fix. Am I missing something on the intent of this? On the surface it looks like "no we won't fix, here are our rates if you want something". Am I wrong?

Here's my example. I have CiviCRM v4.7.29. If I go to Administer, Customize, Activity Types, there are 19 types that are listed, including 3 that I created. All are enabled. When I go to create an Activity for a Contact, I only see 4. So I go to look this issue up and find a similar issue here. Okay, no problem it shows where to go to report this as a bug here. This is where it gets interesting. Look at the Details of this bug. Bug? Yes. Important? Yes. Status? Won't do. Funding source: Needs funding.

This is not some additional obscure functionality that 1 out of 1000 people might want to use, this is pretty much core functionality. Civi is designed for CRM, and Activities **ARE** CRM. Obviously, someone has to pay for development, whether it be volunteer time or paid development time. So why isn't this considered important enough to put on the to-do list?

Not trying to accuse anyone of shenanigans (my headline was to catch a few eyes), I just would like to know how these decisions are made. Thanks and have a great day.

# Answer
> 2 votes
Likely because not enough people have marked it as a priority. I've been using CiviCRM for over a decade now and there is a *LOT* of work done on it to fix bugs, add features, etc. There are plenty of bugs that I've alerted to that have gotten fixed. Others just don't have enough people who have an issue with it and therefore funding needs to be chipped in to fix it.

And reading the issue that was reported, it appears that they misunderstood the issue since they were saying that it works as designed. Hence the "won't fix".

# Answer
> 2 votes
Slow down, hombre.

> Coleman Watts added a comment - 15/Sep/17 10:14 AM
>
> > I tested and this is working by design. Editing a reserved activity type will not allow you to change the component. But editing a user-created activity type will.

If you look at the History tab, you can see the issue was then marked resolved at 15/Sep/17 10:14 AM *without changing any other values on the issue*. In Coleman's view, what was reported was not a bug, so there is nothing to fix. *Needs Funding* is a default value, unless a source is specified. *Bug* and *Important* are values set by the *original reporter* — not by a core team member, not by a JIRA manager, and not by a community member.

If Coleman made a mistake, or if you think community members should be allowed to edit issue fields, that is a separate issue entirely.

You claim to be familiar with open source projects, but that does not appear to be the case. According the license CiviCRM is released under, there is no mechanism for the original developers to withdraw it or demand payment for it, but neither can you force them to do anything according to your priorities. By the same token, anyone can contribute patches. If anything, the core team regularly begs for people to do so.

---
Tags: activities
---


# Question
Title: Trouble understanding how Profiles and Smart Groups are supposed to work together
Fist off, I think CiviCRM is awesome! As an erstwhile systems software programmer from the nineties who saw the birth of the World Wide Web while working for major corporations and governments it is truly heartwarming to see how far the OpenSource movement has come!

I'm working to set up CiviCRM for a new food Co-op, and I admit that despite reading the User Guide pretty thoroughly I'm struggling to understand how Profiles and Smart Groups are supposed to work together. I've set up profiles for Donors, Volunteers, Newsletter recipients, Members, and Founders (members who also sign up for contributing founders' credit to help open the co-op.)

I'm probably missing something glaringly obvious (note I said *systems* software programmer, user interfaces have a tendency to escape my understanding,) but I guess I'll just describe what I'm trying to do and how, and hopefully some kind soul will speak up and say "Whoa, whoa you're way overthinking this, this is how it's done..."

I am trying to set up smart groups so that our community outreach people can email the various groups as appropriate. On the surface it sounds like I need a Founders SG, a Members SG which is a parent of Founders, a Volunteers SG, and a Newsletter SG which is a parent of Volunteers and Members. That way, an email to the Newsletter group will go to everyone, but an email to the Volunteers SG will only go to volunteers.

However, I've already learnt the hard way that SGs, unless they are defined via clear search criteria, aren't as "authoritative" as they could be. Twice now I've discovered that all my contacts have somehow ended up being members of a SG. This may have something to do with the parental inheritance thing, however if I define a SG with a clear rule, it does seem to stick in a meaningful way. Of course, if I do that, then setting the "add to smart group" field of, say, the Volunteer profile to "Volunteers" will only remain valid until the Volunteer smart group (which selects based on a relinfo::Volunteer = Yes criteria) updates itself, which is to say, not very long.

Also, I can't seem to figure out how to associate profiles with automatically set fields. It feels awkward to create a volunteer signup profile with a "check this box to signup to volunteer" field as opposed to just having a hidden field with the value automatically set.

So my current thinking is, that I need also to also create SG's for Volunteer Signup, Founders Signup, Newsletter Signup, and have the associated profiles add new contacts to those groups. Then I can periodically run a cron job to set the appropriate relinfo:: fields for contacts in the signup groups (thence they will be members of the non-signup groups) and remove them from the signup groups. This already is starting to seem a bit complex, thus my request for input :)

However, because the update job will likely only run once a day, there's a period where someone can have signed up as a volunteer, for instance, and yet not be in the Volunteer SG. Given the slight oddness around group parentage stuff, I'm concerned just making Volunteer the parent of Volunteer Signup will muddy the waters, and that it would be clearer to create Volunteer Email SG, parent of both Volunteers SG and Volunteer Signup SG, etc. for the Newsletter and Founders' Credit SG's Members seemingly isn't as much of a concern because if people submit that profile they are automatically marked as Members, and when people sign up as Founders they also are completing the Members Profile and will thus satisfy that criterion. However, Founders it is the resulting Founders' Credit *contribution* that they would be the basis for adding them to the Founders SG.

So, is this the way it's done, or am I missing something? From my perspective this would be many times easier if I could just silently set fields as part of profiles.

Thanks for your attention :)

# Answer
> 2 votes
Pete has identified the core issue here and given your comment response, I'll try to expand.

You want to add people to a group as a result of them completing a profile. There are two approaches with important differences. You can use either one, but you're trying to use both which leads to confusion!

Method 1) Use a normal group (not smart), and use the profile setting to add contacts to that group when the profile is submitted.

Method 2) Use a smart group for eg Volunteer=Yes, don't use the profile setting.

Which method you want depends on what meaning you give to the group. What should happen if you later change a contact's info so that Volunteer=No ?

* If you want them to stay in the group ("contacts who completed this profile") use a normal group (method 1)
* if you want them to be removed from the group ("contacts with Volunteer=Yes") use a smart group (method 2)

While it is possible to manually add people to a smart group that's usually a bad idea (shooting yourself in the foot is possible but usually bad!). Keep smart groups defined only by criteria. Use normal static groups when you want to manually add/remove. \[As often, there can be exceptions to the rule when you know why you're breaking the rules!\]

# Answer
> 2 votes
Hard to know quite how to unpick what you have posted but the bit that stopped my eyeballs in mid-skim was this

> setting the "add to smart group" field of, say, the Volunteer profile to "Volunteers"

Not sure if you have the concept but a Smart Group IS the results of the Search used to find the people who should be in it, ie it is a set of criteria, not a set of contacts.

By adding contacts to a Smart Group via a Profile means they ARE in the Group, but they are not SMART - ie you are not using the 'criteria' to determine if they are in the Group or not, you are force adding them (which is allowed for Smart Groups but you have to understand the distinction)

Not sure if that helps

---
Tags: profile, smartgroups
---


# Question
Title: Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus
I have a problem that appears to be similar to this post: https://forum.civicrm.org/index.php?topic=34290.msg145436#msg145436

I'm in the middle of setting up an evaluation instance of CiviCRM within my staging WordPress environment. I used FTP to upload all files and folders into a newly created civicrm folder within the wp-conten/plugins folder. It appeared as a plugin and i clicked "activate", which seemed to go well. I followed the link to configure, validated ddatabase information, clicked "Verify and Install" (or whatever it was) and it seems to have run without issue, except that I can't proceed with step 6 of the install instructions. All prerequisites were met.

I have no civicrm.settings.php file to backup (or even view).

When I click on the "CiviCRM" link in the main navigation, I get a page that looks like this:

Note there's an error, but when I click on the error link it doesn't tell me anything. Figuring perhaps I'll just proceed without backing up the file, step 7 talks about performing functions I don't have available to me in this state.

I'm stuck. I've tried this twice, and both times the results are the same (thinking perhaps I missed a step earlier, which is still quite possible, but I don't think so after doing it twice).

Any help would be appreciated.

WordPress Version: 4.4.2 PHP Version: 5.5.9-1ubuntu4.14

Clicking on "Refresh Dashboard Data" first couple of times didn't do anything, but the 3rd time it gave me the following in a red box: System Status: Error Cron Not Running Configure Default Mailbox Complete Setup

The link to "View details and manage alerts" didn't render anything.

# Answer
> 0 votes
Am new to CiviCRM and have installed WP many times on various platforms. I had the same issue installing the latest version (4.7.3) with WP.

First tried installing CivicCRM on an existing test WP site using the existing MySQL DB. Got same error as explained above. Next tried new WP (4.4.2) and different DBs, no luck? Tried to give cli.php write access as mentioned on a forum, no luck. Wasted time trying to chase cron jobs not running error? Actually, this can be handled later and is not critical for installation! Got timestamp mismatch error (again, not critical). Verified MySQL and PHP times, seem to be OK.

Finally, tried to install prior version (4.6.14) and found bunch of errors during the installation step! Turns out that it requires wp-content/plugins/files directory with write permission! This seems to be correct and not reported by new version! Create the directory and installation seems to have worked. Need to spend some time to get familariazed with it next.

Hope this saves some of you some time (cost me 5 hrs and tons of frustration!)

# Answer
> 5 votes
I dug further into the changes that WPE does to the file structure.

It looks like the new magic method of determining the file location using \[civicrm.files\] is failing. See https://github.com/civicrm/civicrm-core/blob/master/Civi/Core/Paths.php

I am able to get both 4.6.13 and 4.7.2 running on WPE by adding the following to my civicrm.settings.php file right after the opening `<?php` tag:

```
global $civicrm_setting;
$civicrm_setting['Directory Preferences']['customTemplateDir'] = '/nas/content/live/kcrist/wp-content/civicrm/templates/';
$civicrm_setting['Directory Preferences']['customPHPPathDir'] = '/nas/content/live/kcrist/wp-content/civicrm/php/';
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/nas/content/live/kcrist/wp-content/civicrm/extensions/';
$civicrm_setting['URL Preferences']['extensionsURL'] = 'http://kcrist.wpengine.com/wp-content/civicrm/extensions/';
$civicrm_setting['URL Preferences']['imageUploadURL'] = 'http://kcrist.wpengine.com/wp-content/uploads/civicrm/persist/contribute/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://kcrist.wpengine.com/wp-content/plugins/civicrm/civicrm/';

```

This is based on the following article https://wiki.civicrm.org/confluence/display/CRMDOC/Override+CiviCRM+Settings

Give this a try and I will create an issue for the \[civicrm.files\] issue. edit- Issue updated https://issues.civicrm.org/jira/browse/CRM-18009

# Answer
> 2 votes
Looks like the menus did not build correctly. I would install this plugin https://wordpress.org/plugins/civicrm-admin-utilities/

You can activate and it allows for a menu rebuild and a cache flush.

The file civicrm.settings.php is in uploads/civicrm

I do see that you are on WP Engine, to be honest , I have not been able to install CiviCRM on WPE.

Try clearing the cache and menu via the plugin. If that fails, I would move the civicrm.settings.php file to plugins/civicrm

We look in both locations for the settings file. It is much better outside the plugins folder, but we can try this.

Please let me know if we make any progress.

# Answer
> 0 votes
OK, so I had similar problem - the CiviCRM menu is perfect for http URLs but as soon as you switch to https, the menu breaks.

In my installation, there appear to be two civicrm.settings.php files:

* one in uploads/civicrm and
* one in plugins/civicrm

They appear to be the same file. Both of them have several URLs that need amending from http to https:

* Lines 80 to 82 under '// Additional settings generated by installer:'
* Line 222, where the CIVICRM\_UF\_BASEURL is defined

In addition, I've changed the WordPress address in the WordPress UI (in Settings \> General)

And fianlly, the CiviCRM Resource URL in the CiviCRM \> Administer \> Resource URLS (http://yoursite.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Furl&reset=1)

Then I cleared the cache and I think I also rebuilt the menus (using the CiviCRM Admin Utilities plugin) and it works!

Took me several attempts to get this working!

---
Tags: wordpress, installation, civicrm.settings.php
---


title: Civi CRM Wordpress Theming

text:
# Question
Title: Civi CRM Wordpress Theming
After having a little demonstration at the FOSDEM i decide to test civiCRM and maybe use it in my startup. Actually i have the vanilla default installation of CIVI on a wordpress.

My actual issue is that the UI/UX is not as good as other SAAS CRM my bizdev want to use. Is there actually a repo of theme for CIVI or need i to make one by my own ?

# Answer
> 3 votes
Try installing Shoreditch and see if you like it better. If you want to customise things further, you could fork Shoreditch and alter it to your liking.

---
Tags: wordpress, theme
---


# Question
Title: Google Checkout disabled but causes Network Error loading Membership tab
Payment processor Google Checkout is disabled, but Civi is still trying to load its file which doesn't exit: PHP Warning: require\_once(CRM/Core/Payment/Google.php): failed to open stream: No such file or directory in /wp-content/plugins/civicrm/civicrm/Civi/Payment/System.php on line 59

Can I safely delete that payment processor without affecting any contributions that used it (there doesn't appear to be any FKs tying them together)? Wouldn't it be better to not check for disabled (not supported anymore) processors?

# Answer
> 2 votes
You will also need to disable the google checkout payment processor. This error is now handled in 4.7.31.

---
Tags: civicontribute, payment-processor
---