# Question
Title: DBError and Network Error when saving phone numbers to contacts
In our organization's new civi database, we are unable to add phone numbers to contacts. I've tried keying in the number and importing a contact with a number. (It took me hours to figure out that it was the phone numbers that were breaking the import!)

There are two error messages we get, depending on the context:

In the View Contact view of the data, when I try to save a phone number, we get this error message:

> Network Error
>
> Unable to reach the server. Please refresh this page in your browser and try again.

In the Edit Contact view, or when trying to import a record with a phone number, we get this error message:

> Sorry but we are not able to provide this at the moment.
>
> DB Error: unknown error Return to home page.

Log is below, and seems to suggest it has something to do with stripping non-integer characters from the field. However, adding a phone number without any dashes 5554443333 also produces the error. Any ideas?

> Jul 02 12:28:40 \[info\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> handle )
>
> ```
> [code] => -1
> [message] => DB Error: unknown error
> [mode] => 16
> [debug_info] =>
> CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8)
>   RETURNS VARCHAR(255) CHARACTER SET utf8
>   DETERMINISTIC
>   NO SQL
> BEGIN
>   DECLARE output   VARCHAR(255) CHARACTER SET utf8 DEFAULT '';
>   DECLARE iterator INT          DEFAULT 1;
>   WHILE iterator < (LENGTH(input) + 1) DO
>     IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN
>       SET output = CONCAT(output, SUBSTRING(input, iterator, 1));
>     END IF;
>     SET iterator = iterator + 1;
>   END WHILE;
>   RETURN output;
> END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]
> [type] => DB_Error
> [user_info] =>
> CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8)
>   RETURNS VARCHAR(255) CHARACTER SET utf8
>   DETERMINISTIC
>   NO SQL
> BEGIN
>   DECLARE output   VARCHAR(255) CHARACTER SET utf8 DEFAULT '';
>   DECLARE iterator INT          DEFAULT 1;
>   WHILE iterator < (LENGTH(input) + 1) DO
>     IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN
>       SET output = CONCAT(output, SUBSTRING(input, iterator, 1));
>     END IF;
>     SET iterator = iterator + 1;
>   END WHILE;
>   RETURN output;
> END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]
> [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="
> CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8)
>   RETURNS VARCHAR(255) CHARACTER SET utf8
>   DETERMINISTIC
>   NO SQL
> BEGIN
>   DECLARE output   VARCHAR(255) CHARACTER SET utf8 DEFAULT '';
>   DECLARE iterator INT          DEFAULT 1;
>   WHILE iterator < (LENGTH(input) + 1) DO
>     IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN
>       SET output = CONCAT(output, SUBSTRING(input, iterator, 1));
>     END IF;
>     SET iterator = iterator + 1;
>   END WHILE;
>   RETURN output;
> END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]"]
>
> ```
>
> )

# Answer
> 1 votes
Not sure what the problem was, but it seems to have related to our host. We've switched hosts and the problem is solved.

# Answer
> 2 votes
Your error log says:

> \** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log\_bin\_trust\_function\_creators variable)\]

If you turn off logging at **Administer \> System settings \> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)** can you save phone numbers?

You can find information on the MySQL privileges needed for CiviCRM at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+MySQL+Permission+Requirements

Not all hosting companies provide these privileges without a specific request to do so (and even then some will refuse to do so).

# Answer
> 2 votes
I spent hours trying to fix this probably-same problem. I could edit other contact fields, but phone number always choked.

What finally fixed it for me:

> $ mysql\_upgrade -u root -p

The key clue was a mention of "mysql.proc" in a backtrace, which led to a mysql forum. Apparently, you're supposed to run that command whenever you upgrade mysql.

# Answer
> 1 votes
For Joomla users, the file located at `/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php` requires a semicolon at line 42:

```
const DROP_STRIP_FUNCTION_43 = "DROP FUNCTION IF EXISTS civicrm_strip_non_numeric;";

```

I hope this helps.

# Answer
> 1 votes
I had this same problem, caused when DreamHost upgraded from MySQL 5.7 to 8. Trigger functions aren't supported anymore unless you pay an extra $15/mo for MySQL VPS. For details on my problem see: https://chat.civicrm.org/civicrm/pl/75p1thb8w3fq9gx9rwsirphy6a I'm going to look into CiviHosting.com

---
Tags: contacts, phone
---


# Question
Title: What's the best approach to offering a one-off membership discount when using GoCardless direct debit?
I'm using GoCardless to handle membership payments and it's working well. I now want to implement a one-time discount code to encourage membership sign-ups from a targeted group. The code will provide a substantial discount, but it should only work for the first year, such than when the membership is due for renewal, the normal annual fee applies.

However, my assumption is, that because I'm using the GoCardless Direct Debit extension, when the person signs up using the discount code, a mandate will be created for an annual payment at the discounted price. and therefore at the point of renewal the member will be debited again at the discounted rate. Or am I wrong, and somehow the extension understands that I'm looking at a one-off discount?

I can't be the first to have come across this. what's the optimal approach?

# Answer
> 1 votes
We have built an extension for this to update the amount of the membership type amount that doesn't match the membership amount later down the year. However, there is a limitation on this as the subscription can only be updated 10 times at Go cardless.

---
Tags: gocardless
---


title: Joomla 4 Development

text:
# Question
Title: Joomla 4 Development
I am running Joomla 4 on a test site and am running into several issues. I am not a developer, however, I would like to assist in the development of Joomla 4 and Civicrm. As I come across issues, what is the best way to report them and assist in moving forward?

# Answer
If it's something where you're not sure if it's a bug or how it's supposed to work, then searching here and then posting a question in stackexchange is good. If you think it's a bug and it's specific to joomla you can check if it's already listed at https://lab.civicrm.org/dev/joomla/-/issues and post issues there.

Non-joomla specific questions work the same way, just if posting an issue at lab.civicrm.org you'd use an appropriate group (usually Core): https://lab.civicrm.org/dev

There is also a joomla channel at https://chat.civicrm.org for chat.
> 0 votes

---
Tags: joomla
---


# Question
Title: Error with dummy payment processor and email receipts
I set up a contribution page and trying it out I got an error message

> Payment Processor Error message :Failed to update contribution in database

and was taken back to the payment confirmation page, though the contribution appears to be recorded as "complete". It's the first time I've used email receipts on contribution pages (though they have been fine on event pages. Taking out the email receipt gets rid of the error. I was using the dummy payment processor, but if I switch to PayPal then all is fine so I'm guessing its a bug in the dummy payment processor.

I'm on CiviCRM 5.35.1 so an obvious thing to try is the latest version, but I don't have time to test that right now. I can work round it for demonstrating what I want to do by using PayPal and then refunding, but it's annoying.

# Answer
Could you check the Outbound email setting is not set to 'Disable Outbound Email'? And the Environment is production?

In case you don't want emails to go out you could set Outbound email to Redirect to Database
> 2 votes

---
Tags: payment-processor, receipts
---


title: Default value for custom date field

text:
# Question
Title: Default value for custom date field
My CiviCRM 5.56.1 runs on Drupal 7.

I try to set the default value for a custom field which is used for an Action.

I created the field in Admin -\> Customized Data & Screen -\> Custom Fields. The field `custom_76_-1` is shown in the form, and it works, I can change the current value. This is a date field showing a year-value only, and I'd like to set it's default value from current year to 3 years before (eg. in this year from 2022 to 2019). On the UI I can set a fix date, not a relative date.

With Javascript / jQuery I can change the shown value of the year, but not the default value in the form. I tried to set the default value in the form with the code from this https://civicrm.stackexchange.com/a/33474/5877 answer, but it doesn't works for me -- I mean the default value didn't changed. As I understood, custom fields are created from an AJAX call's response, and the `buildForm()` function runs earlier as the AJAX call, which creates the custom field, so the default value can't be set (is this true or do / understand I something wrong?).

Please advice me how can I set the field's default value.

# Answer
```
/**
 * Implements hook_civicrm_buildForm().
 *
 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_buildForm
 *
 */
function extensionname_civicrm_buildForm($formName, $form) {
  if ('CRM_Custom_Form_CustomDataByType' == $formName
    // type == cuctom group belongs to which type i.e Contact, Event, Activity...
    && in_array($form->getVar('_type'), ['Contact'])
  ) {
    foreach ($form->getVar('_groupTree') as $customGroup) {
      // custom group name in which the field you want to set default to.
      if ($customGroup['name'] == 'custom_group_name') {
        foreach ($customGroup['fields'] as $field) {
          // custom field name you want to set default to.
          if ($field['name'] == 'custom_field_name_type_date') {
            $defaults = [
              $field['element_name'] => date('Y', strtotime('-3 years', strtotime(date('Ymd'))))
            ];
            $form->setDefaults($defaults);
            break;
          }
        }
        break;
      }
    }
  }
}

```
> 5 votes

---
Tags: custom-fields, dates
---


# Question
Title: Thank you page does not appear - Could not find valid value for id
After updating to 5.44 I get in my installation (wordpress) "Could not find valid value for id" when the thank you page is called. In Wordpress a "Basepage" is created, the registration also comes through and is entered in the database. Until the beginning of December this always worked. The following error message appears:

```
CRM_Core_Exception: Konnte keinen gültigen Wert für id finden. in ../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php on line 27
Exception trace
#   Function    Location
0   CRM_Utils_Request::retrieve()   ../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27
1   CRM_Event_StateMachine_Registration->__construct()  ../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27
2   CRM_Event_Controller_Registration->__construct()    ../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:308
3   CRM_Core_Invoke::runItem()  ../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
4   CRM_Core_Invoke::_invoke()  ../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
5   CRM_Core_Invoke::invoke()   ../httpdocs/wp-content/plugins/civicrm/civicrm.php:1169
6   CiviCRM_For_WordPress->invoke() ../httpdocs/wp-content/plugins/civicrm/includes/civicrm.basepage.php:366
7   CiviCRM_For_WordPress_Basepage->basepage_handler()  ../httpdocs/wp-includes/class-wp-hook.php:303
8   WP_Hook->apply_filters()    ../httpdocs/wp-includes/class-wp-hook.php:327
9   WP_Hook->do_action()    ../httpdocs/wp-includes/plugin.php:518
10  do_action_ref_array()   ../httpdocs/wp-includes/class-wp.php:763
11  WP->main()  ../httpdocs/wp-includes/functions.php:1291
12  wp()    ../httpdocs/wp-blog-header.php:16
13  require('/var/www/vhosts/…')    ../httpdocs/index.php:17
14  {main}

```

# Answer
> 3 votes
I just experienced the same issue after updating to 5.45.1. This particular site has had CiviCRM installed for a long time. It was never switched to utilize clean URLs. Once I implemented clean URLs the we no longer get the error.

More info on clean URLs can be found here: https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/clean-urls/

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


# Question
Title: 404 Error on registration links (wordpress)
All of our event registration were set up tested and running and all of a sudden all of our event pages go to a 404 error when I try to see the live registration link (from the embedded link on the website and from the "Manage Events" page in CiviCRM when I go to the live link.

I am wondering if it was because I made an edit to the online registration form, which I did this morning, but that hasn't effected the links in the past...

We currently have CiviCRM version 5.37.2, Any guidance appreciated! Thank you!

# Answer
This actually was solved, because I called in a pro It was an issue with the Permalinks through wordpress.
> 0 votes

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


title: Finding CDN Tax receipts sent

text:
# Question
Title: Finding CDN Tax receipts sent
I just ran our receipt job for last year and saw that 13 contributions were marked as ineligible. Unfortunately, unlike an import job, there is no report of what those ineligible contributions are.

I thought I would then do an advanced search and show contributions for which a receipt was not sent. However, the CDN tax receipt extension does not set the receipt sent flag on a contribution -- I do know it's a different kind of receipt to what is meant in CiviCRM.

Then I thought I would generate a list of contacts who had made contributions and compare it to a list of contacts to whom a CDN tax receipt was sent. I then discovered that the CDN tax receipt extension does not create an activity either for creating the receipt or for emailing it to the contact.

How can I determine either:

1. to whom a CDN receipt was sent (or created for)?
2. which contributions were deemed ineligible by CDN Tax Receipt?

# Answer
> 1 votes
Under CiviReport - Contribution Reports, click New Contribution Report. Then there are two templates for receipts issued and not issued.

---
Tags: advanced-search, searchkit, cdn-tax-receipts
---


# Question
Title: Editing RelationshipSelector.tpl section of a UserDashboard
I'm trying to edit the table row content of the "Your Contacts / Organizations" section of the UserDashboard:

It appears that this section of the `UserDashboard` is controlled by the `RelationshipSelector.tpl` file. However, when I go to override the `RelationshipSelector.tpl` file, I notice that only the row in the `<th>` is being handled here and the `<tbody>` is not:

The `<tbody>` is being rendered somewhere and I need to be able to edit the table row inside of it that is of `id="101"`:

**Question:** Where is the `<tbody>` being handled, so I can pull out the "Edit Contact Information" link and delete the rest of the table?

**Note:** It could also be an escaped character issue too, you can see my different attempts at removing the row and table by escaping the id of 100 (#100), which is perceived as CSS.

# Answer
The section is generated using the datatable, and data is called using ajax method.

You could use ajaxsuccess to call after the data is retrieved from ajax.
> 5 votes

---
Tags: css, custom-templates, user-dashboard, jquery
---


# Question
Title: Print/Merge document printed on top of each other
I am trying to create a template for a Donation-Thank-You letter for one of our clients. So far so good and it works and looks fine if you print one letter at a time. Of course, to be efficient, our client would like to be able to print multiple letters at the same time addressed to multiple different contacts. This is where I ran into a road block which I have not been able to find a solution for anywhere: If I select multiple contacts for which I would like to generate a pdf from my template, they get printed on top of each other, I can tell from the names being written over each other.

I discovered that when I remove the rel="stylesheet" attribute from my `<link/>` tag it will print the individual documents but the css is obviously missing since I removed the rel="stylesheet". I have a strong suspicion it has something to do with wkhtmltopdf which renders the template but, like I said, I have not been able to find a solution.

My goal is to be able to print multiple, individual documents for multiple contacts at once and have my css work. Has anyone run in a similar issue and solved it? Or does anyone know what else I could look for?

Edit to add CSS:

```
<style>

{literal}

   @font-face {
     font-family: 'Montserrat';
     src: url('https://test.site.org/Montserrat-Regular.otf') format('opentype');
     font-weight: regular;
   }

   @font-face {
     font-family: 'pt-serif';
     src: url('https://test.site.org/fonts/pt-serif/PTF55F.ttf') format('truetype');
     font-weight: regular;
   }

   * {
     font-size: .97em;
     font-family: pt-serif;
   }

   th {
       font-weight: bold;
   }

   .logo {
       position: absolute;
       right: 100px;
       top:20px;
   }

   .Impressum {
       vertical-align: top;
       position: absolute;
       left: 385px;
       font-family: Montserrat;
       font-size: 0.75em;
       padding-top:120px;
   }

   .invisible {
       display: none;
   }

   .Absender {
         position: absolute;
         top:125px;
         left: 20px;
         font-size: 0.65em;
         font-family: Montserrat;
   }

   .Empfaenger {
       position: absolute;
       top:145px;
       left: 20px;
       vertical-align: top;
       font-size:0.9em;
       width:350px;
       font-family: Montserrat;
   }

   .intro {
       font-size: .97em;
       font-family: pt-serif;
       padding-bottom:12px;
   }

   .Rechnungsdatum {
       position: absolute;
       top:300px;
       right:95px;
       font-size: 0.9em;
       text-align: right;
       width:150px;
       font-family: pt-serif;
   }

   .Rechnungszweck {
       position: absolute;
       top:370px;
       left: 15px;
       font-size: 1.2em;
       width:100%;
       font-family: Montserrat;
   }

   .Content {
       position: absolute;
       top: 390px;
       left: 19px;
       font-size: 0.9em;
       font-family: pt-serif;
   }

   .footer {
       position: fixed;
       left: 0;
       bottom: -50px;
       width: 100%;
       font-family: Montserrat;
       font-size: 0.8em;
   }

   {
       /literal
   }
</style>

```

`<link/>` tag to include the file in my template: `<link rel="stylesheet" href="/contacts.site.org/css/pdf.css" type="text/css" />`

# Answer
> 3 votes
You're correct that it's wkhtmltopdf although I don't necessarily think it's a bug. The `position: absolute` is causing wkthmltopdf to position everything relative to (0,0) on the first page, whereas with dompdf it inserts a new page regardless.

If you use `relative` it works, but depending on what your body content looks like you may have to adjust.

---
Tags: printmerge
---


# Question
Title: What can I do about this error after attempting to install CiviCRM on a Wordpress site: Table 'myprefix_civicrm.civicrm_setting' doesn't exist
My attempt to install CiviCRM on a WordPress site (in a separate database) failed after creating only one table in the database. I didn't record the error, thinking I could just delete the database and the files from the Plugins folder, then run things again. After recreating an empty INNODB database and re-extracting the files into the plugins directory, when I go to Plugins.php and click Activate, I get the following error:

Initialization Error

```
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'myprefix_civicrm.civicrm_setting' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
     [nativecode=1146 ** Table 'myprefix_civicrm.civicrm_setting' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'myprefix_civicrm.civicrm_setting' doesn't exist]"]
)

```

The only way to get rid of it is to rename the Plugins folder Plugins.Hold, then revisit the plugins page. However, as soon as I rename the folder back and click Activate again, I get the same error.

I don't have any caching plugins on the site.

# Answer
> 3 votes
It turns out that the civicrm folder in the wp-content/uploads folder was preventing a clean reinstall. Deleting that folder allowed me to start the install over.

# Answer
> 0 votes
```
 Table 'your-schema.civicrm_setting' doesn't exist
 Table 'civicrm_setting' doesn't exist

```

If you're getting such error, check that your database import was successful and that all the tables were imported ok. Login to your db server and change to your db then do "show tables".

---
Tags: wordpress, error, installation
---


# Question
Title: How do I find duplicate contacts by nickname?
Here's an example of a very common situation I have:

1. Database has a contact like this

* first name: Robert
    * nick name: Bob
    * last name: Smith
    * email: bobsmith@example.com
    * ...
2. Event registration form receives a submission like this

* first name: Bob
    * last name: Smith
    * email: bobsmith@example.com
    * ...
3. A duplicate contact is created because the first name values do not match.

When finding duplicate contacts, is there some way of getting Civi to notice that the *first name* of one contact is identical to the *nick name* of another contact?

As a workaround, I've tried adding the nick name field to public forms, but trust me you don't want to do this. It's funny seeing what people write when prompted for a nick name, but not so funny when you notice postal solicitations addressed to people like "The Dude Smith".

# Answer
> 4 votes
This isn't going to help now, but big-picture, there ought to be an aliasing system for names. This Nickname problem occurs for organizations in an even bigger way, and Legal Name won't match with Organization Name.

What ought to happen is that Nickname should be considered an alias of First Name, and you could have multiple aliases for it. Someone could set up a maiden name as an alias of the last name, for example. On the organization side, aliases for Organization Name could bypass all kinds of relationship chaos that happens when people set their Current Employer.

# Answer
> 3 votes
You can create a view only custom field that you set with a civicrm\_post hook when contacts are created/edited. It has the value of nickname if nickname isn't null, else first\_name. Use that field in your dedupe rule.

# Answer
> 1 votes
You can use a list of nicknames, like this one to find all contacts with a common name. Once you've found a list of "Andrew" first names, loop through each Andrew contact and find all of the "Andy" contacts plus "Andrew's" last name and email or phone number. From here, if you identify a duplicate, you can set the nickname for both contacts to the first name of the duplicate contact ("Andy") then run a Dedupe rule like this: Nickname + (Phone or Email). Here's the script I used to do this:

```
function setContactNicknames() {
    $nicknames = explode("\n", file_get_contents(__DIR__ . '/nicknames.csv'));

    foreach($nicknames as $rootNames) {
        $rootNameFound = null;
        $eachRoot = explode(',', $rootNames);

        foreach($eachRoot as $nickname) {
            if ($rootNameFound) {
                foreach($rootNameFound['values'] as $rootContact) {
                    $nickMatch = null;

                    if ($rootContact['email']) {
                        $nickMatch = civicrm_api3('Contact', 'get', [
                            'sequential' => 1,
                            'first_name' => "{$nickname}",
                            'last_name' => $rootContact['last_name'],
                            'email' => $rootContact['email']
                        ]);
                    }

                    if (!$nickMatch && $rootContact['phone']) {
                        $nickMatch = civicrm_api3('Contact', 'get', [
                            'sequential' => 1,
                            'first_name' => "{$nickname}",
                            'last_name' => $rootContact['last_name'],
                            'phone' => $rootContact['phone']
                        ]);
                    }

                    if ($nickMatch && $nickMatch['count']) {
                        $matchContact = $nickMatch['values'][0];
                        $setNickname = $matchContact['first_name'];

                        if ($rootContact['contact_id'] !== $matchContact['contact_id']) {
                            civicrm_api3('Contact', 'create', [ 'id' => $rootContact['contact_id'], 'nick_name' => $setNickname, ]);
                            civicrm_api3('Contact', 'create', [ 'id' => $matchContact['contact_id'], 'nick_name' => $setNickname, ]);

                            echo $rootContact['first_name'] . ' ' . $rootContact['contact_id'] . ' ';
                            echo $matchContact['first_name'] . ' ' . $matchContact['contact_id'] . ' ';
                        }
                    }
                }

            } else {
                $searchName = civicrm_api3('Contact', 'get', [ 'sequential' => 1, 'first_name' => "{$nickname}", ]);

                if ($searchName['count']) {
                    $rootNameFound = $searchName;
                }
            }
        }
    }
}

```

# Answer
> 0 votes
I'm testing this dedupe rule out. It must match both partial first name (3 characters) and last name and either email or phone.

---
Tags: duplicate-contacts
---


# Question
Title: Donor card blacklisted within webform or CiviCRM?
Drupal 7.87 CiviCRM 5.41.0

We have a donor that has tried to donate and receives a reject code 55

In the logs I see the following "The CiviCRM "contribution transact" API returned the error: "Error REJECT: 55" when called by function "validate" on line 97 of wf\_crm\_webform\_postprocess.inc"

I have called iATSpayments and the card is not blacklisted with them. He called his card and they said it is not even getting to them. He was able to make the donation with a different card.

Is there somewhere with Webform CiviCRM Integration or within CiviCRM that I can check to see if the card is blacklisted within our system?

# Answer
REJ:55 is System Error https://content.iatspayments.com/developers-ach-reject-codes

It could well be that the bank is not reachable at the moment. And another card (bank account) from another bank worked.
> 1 votes

---
Tags: civicontribute, webform-civicrm
---


# Question
Title: API csv Import - Error when importing activities "Invalid value for field (activity_type_id) "
Trying to import new activities using API cvs Import. I'm using the ID from the link to edit a custom activity type, like this www.mysite/civicrm/admin/options/activity\_type?action=update&id=***1028***&reset=1

But keep getting this error, any suggestions?

# Answer
> 3 votes
Import worked fine once I matched the activity name with the activity type ID field.

---
Tags: import
---


title: Handling HEIC/HEIF photos

text:
# Question
Title: Handling HEIC/HEIF photos
If we try to upload an .heic file for a contact image, we get this error: "Image could not be uploaded due to invalid type extension."

Is there a way to enable Civi to accept and display heic/heif images?

# Answer
This is hard-coded at https://github.com/civicrm/civicrm-core/blob/c8a7531ec9785161f4cdc6b1d51e9ff01989db47/CRM/Contact/BAO/Contact.php#L1180

But I'm sure core would be open to updating that list. You could make either a github PR or lab ticket at https://lab.civicrm.org.
> 1 votes

---
Tags: images, contact-image
---


title: BackdropCMS & cron

text:
# Question
Title: BackdropCMS & cron
How to do civicrm cron in BackdropCMS?

when I do in the browser: https://\<domain.com\>/modules/civicrm/bin/cron.php with the proper parameters it gets redirected to: https://\<domain.com\>/modules/civicrm/bin/core/cron.php and then gives a 404

https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/ does not show Backdrop yet.

# Answer
> 3 votes
Ok,

The CLI version works out of the box: /usr/local/bin/php /home/#dir#/public\_html/modules/civicrm/bin/cli.php -s #domain# -u #cronuser# -p #cronpwd# -e Job -a execute

The HTTP version needs a change in BackdropCMS .htaccess

.htaccess has this:

```
# Redirect common PHP files to their new locations.
RewriteCond %{REQUEST_URI} ^(.*)?/(update.php) [OR]
RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR]
RewriteCond %{REQUEST_URI} ^(.*)?/(cron.php)
RewriteCond %{REQUEST_URI} !core
RewriteRule ^ %1/core/%2 [L,QSA,R=301]

```

If you make it this it works:

```
# Redirect common PHP files to their new locations.
RewriteCond %{REQUEST_URI} ^(.*)?/(update.php) [OR]
RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR]
RewriteCond %{REQUEST_URI} ^(.*)?/(cron.php)
RewriteCond %{REQUEST_URI} !core
RewriteCond %{REQUEST_URI} !civicrm
RewriteRule ^ %1/core/%2 [L,QSA,R=301]

```

Going to ask for a change of default .htaccess in BackdropCMS

--

update: This is now part of BackdropCMS core, although made slightly more generic:

```
RewriteCond %{REQUEST_URI} !modules

```

is added to .htaccess

# Answer
> 2 votes
I wrote https://www.drupal.org/project/civicrm\_cron a decade ago to make it easier to run CiviCRM on Pantheon. Pantheon already ran Drupal's cron -\> by getting Drupal to run CiviCRM's cron, Pantheon ran CiviCRM's cron too.

The way the D7 module worked was convoluted. It declared a new menu path within Drupal and then wrap\[ed a call to that URL with the sitekey value in the querystring using drupal\_http\_request.

Basically, Drupal became a proxy for the same URL someone could have added to a crontab or Easycron type service.

In Backdrop, because the path would be within the paths already managed by Backdrop there would be no need to alter the .htaccess file (or how this is managed in NGINX).

New Menu Path is defined at https://git.drupalcode.org/project/civicrm\_cron/-/blob/7.x-2.x/civicrm\_cron.module#L22

Call to that path wrapped in hook\_cron at https://git.drupalcode.org/project/civicrm\_cron/-/blob/7.x-2.x/civicrm\_cron.module#L49

The part that has likely changes in the last 10 years is https://git.drupalcode.org/project/civicrm\_cron/-/blob/7.x-2.x/civicrm\_cron.module#L143

David Snopek simplified this for D8 with just a hook\_cron, but I don't think Backdrop has the equivalent of \Drupal::service('civicrm\_cron.cron\_runner')

https://git.drupalcode.org/project/civicrm\_cron/-/blob/8.x-1.x/civicrm\_cron.module#L143

It doesn't seem too difficult for someone familiar with Backdrop and CiviCRM to find an approach that would work without needed to modify Backdrop's .htaccess files.

---
Tags: cron, backdrop
---


title: symbols next to extension versions

text:
# Question
Title: symbols next to extension versions
I've just done a test updgrade from CiviCRM 5.35.1 to 5.46.2 and notice some new symbols next to the version number for extension on the extension management page. I'm sure the green tick is a good thing but I can't find out what the orange symbol means.

# Answer
It means the author has listed it as alpha. It's a lab beaker, as in "experimental".

The exact criteria are:

* develStage in the extension's info.xml is not "stable", OR
* version in info.xml contains one of alpha/beta/dev

There is also some hover text: "This is a pre-release version. For more details, see the expanded description."
> 3 votes

---
Tags: extension
---


title: Drupal 8/9 htaccess Breaks kcfinder

text:
# Question
Title: Drupal 8/9 htaccess Breaks kcfinder
There are other discussions on this but there does not appear to be a concrete solution. I am hoping that someone can help me with a solution and then I can also document this better.

When I go to add an image to an email with kcfinder *Browse Server* option I get a popup with a 404.

The URL in the popup https://crm.mysite.org/libraries/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=images&CKEditor=crmUiId\_1&CKEditorFuncNum=0&langCode=en appears to be correct.

This has me thinking that the issue is the Drupal htaccess rules.

The files for kcfinder were not in the libraries/civicrm/packages/kcfinder folder by default but I added the files from another Drupal 8 install.

I am not sure there is other information I can provide that would be of use to solve this.

Thanks, Steve

# Answer
> 0 votes
There is an issue called kcfinder libraries is missing files and presently this issue is open with no resolution.

Bottom line: There is a bug in CiviCRM with Drupal 9 and KCFinder.

---
Tags: civimail, kcfinder
---


# Question
Title: Development Environment for Custom Reports?
I'm looking at getting a development environment set up so I can more easily create and test custom reports and templates. Are there any guides on doing this? Would I be better off just setting up a complete wordpress/civi dev evnrionment?

# Answer
> 2 votes
For developer documentation, see https://docs.civicrm.org/dev/en/latest/

To create a development environment, use buildkit

For custom reports, you might want to check existing report extensions before developing your own.

If you want to develop reports, see the CiviReport Reference but I suggest you investigate SearchKit (examples) in preference to developing old-style reports.

---
Tags: developer
---


# Question
Title: CiviEvent rejects all online registrants for a free event
I have set up a free event (type "webinar") with online registration, but Civi automatically rejects anyone registering for the event. It is not related to waitlisting because the behaviour continues when I disable the relevant status categories. Can anyone help?

# Answer
Welcome to CiviCRM SE. Could you please provide some more details about 'rejects anyone registering for the event'?

If users are getting errors on the screen please can you add the error message to your question?

Check in CiviCRM config log to find if any error was recorded during user registration.

Check if the problem is specific to a single event or any event.

In case your system has a module/extension/plugin related to the Event, turn it off and check if the problem resolves.

If you have Civi-rules for Event, turn it off and check if the problem resolves.

HTH

Pradeep
> 2 votes

---
Tags: civievent
---


# Question
Title: Use custom field for participant search in event registration?
We have some custom fields for our members. When manually adding a participant to an event, I’d like to be able to search by those custom fields when searching for a contact. How can I do this?

# Answer
> 3 votes
There isn't any UI config to add filters in 'Refine search' dropdown. However you can add filters via custom extension by implementing entityRefFilters hook.

Alternatively you can use Advance search \>\> Select contact(s) \>\> Event registration (from task actions).

HTH

Pradeep

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


# Question
Title: Checkboxes and radio buttons will not save for display in CIVICRM backend - Joomla
We are running Joomla! version 3.10.6 (the latest stable version). We have in there CiviCRM 5.46.2 (also the latest stable version). There are two issues:

ONE: All checkbox fields do not retain the checkmark after you click on Save and go back to that page. If I edit an event or I change the settings on the "Debugging and Error Handling" page and then go back in and view what I just saved, the checkmarks that I just put in are gone from the display. They appear to be saving in the database, just not on the display.

TWO: With Enable Debugging enabled I see warnings like this:

```
 Notice: Undefined index: localTasks in /home/mysite/www/www/media/civicrm/templates_c/en_US/%%EA/EAA/EAA96A89%%joomla.tpl.php on line 56

```

and this on the sidebar:

```
 Notice: Trying to access array offset on value of type null in /home/mysite/www/www/media/civicrm/templates_c/en_US/%%ED/ED0/ED0373F0%%blocks.tpl.php on line 11

```

We have cleared caches but these warnings remain.

This site is hosted by CiviHosting and runs PHP 7.4

# Answer
> 1 votes
This was a freshly-migrated site. Seems the database export from the other host was faulted. Using Akeeba to migrate the files and the database worked and the problem is fixed.

---
Tags: joomla
---


# Question
Title: Invite Existing Contacts to Create Linked Drupal User Account
I have quite a few existing contacts who do not have Drupal accounts. I want to send out an email to these contacts with an invititation for them to create their own Drupal user account. All their relevant details are stored in Civi (email, first name and last name). I don't want to bulk create them as it will be each individual contact's choice if they want to create an account. If possible, I don't want them to re-enter any of their details. Is there a way I can send out a bulk email which would have a unique link to automatically create an account for that recipient? Or could I send them a link to a form where they just have to enter their (unique) email (and possibly username/password) and submit, and this would create the account? Or maybe a pre-filled form?

It is important that when they create their account, they receive a new account notification email with a login link. It does not matter if they do not choose their username and password, if these can be generated automatically, or it is fine if they enter these when creating their account.

I'm using Civi 5.46 with Drupal 9.3.

# Answer
> 2 votes
you will need to either use Drupal registration form(/user/register) or profile with user registration turned on.

The new account notification should be received if your Drupal user settings have it turned on.

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


# Question
Title: Can I show a profile on contact summary page
I would like to show membership details on the contact summary screen - type, status, start date - using the contact layout editor. I can create a profile for membership, but this isn't available to add, and membership fields can't be added to a block, it seems. As you can have multiple memberships for a contact I can see why it might be tricky. Is it possible to show membership info on the summary screen using the UI?

# Answer
If you install the Extended Reports extension (available from in-app download), you can place Extended Reports as a block using Contact Layout Editor.

See the screenshot below - I'm using the "Extended Report - Membership Price Set Report" template to generate this report. Under the report's **Display Options** tab, I clicked **Make available for contact summary page**.
> 3 votes

# Answer
My old answer is still valid, but the preferred answer in 2022 is to use Search Kit and Form Builder. It's more flexible, and can be used to add almost any data to a block on the summary tab.

### Setup

* Enable Search Kit and Form Builder in **Administer menu » System Settings » Extensions**.

### Search Kit

* Go to **Search menu » Search Kit**.
* Press **New Search** at the top right.
* Set *Search for* to **Contacts** and add **With (required)** \- **Contact Memberships** (screenshot item 1).
* Use the column **Add** button (item 2) to add the columns you'd like. Do *not* filter by contact ID at this time - though you may filter on other criteria in the *Where* section (item 3), e.g. for certain membership types only.
* Choose a name for this search (item 4) and press **Save** (item 5).
* Click the Display **Add** (item 6) and select a **Table**. From here you can customize the column names, add links to the memberships, etc. When you're done, press **Save** again (item 5).

### Form Builder

* Go to **Administer menu » Customize Data and Screens » Form Builder**.
* Click on the **Search Forms** tab.
* Click **New Search Form** and select the search with the name you just saved, using the *Table* display.
* Add a block title, then check the **Add to Contact Summary Page** box, selecting **as block**.
* Select **Filter on Contact** and press **Save**.

You can now enter the Contact Layout Editor (you can add this under **Add New** in the *Extensions* screen if you don't have it already) and drop your new block into a summary tab.
> 4 votes

---
Tags: civimember, contact-summary-editor
---


# Question
Title: Can I store local dev SMTP settings in civicrm.settings.php?
For local development, so that I can test outgoing email safely, I use the Drupal settings.php file to store my MailHog email server settings e.g.

```
$conf['smtp_host'] = 'mail'; //Docker container
$conf['smtp_port'] = '1025'; //MailHog port

```

This way I can refresh the local database and it will immediately work in my local environment.

I cannot see an obvious way of doing this for CiviCRM? Looking at the API explorer, I have experimented with a few things like:

```
$civicrm_setting[mailing_backend]['smtpServer']

```

But does this not seem to work. Can this be done? It would be nice to not have to change my SMTP setting each time.

# Answer
Use something like:

`$civicrm_setting['Mailing Preferences']['mailing_backend']['smtpPort'] = '587';`

I think the group name `'Mailing Preferences'` is obsolete and could be `'domain'`, but the above works.

You could also use the `define('CIVICRM_MAIL_LOG')` which you'll find lower down in civicrm.settings.php to dump all mail raw to a file without sending it.
> 4 votes

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


title: Scheduled mail and reminders to groups

text:
# Question
Title: Scheduled mail and reminders to groups
I'm working on setting up a weekly newsletter in CiviCRM (v 5.45.3 along with Drupal 9.3.6), and the more I look the more confused I am about how to scheduled mail works. It's hard to know what documentation and/or comments are actually current.

As I understand it, when you schedule an email for a group (whether it is a standard group or a Smart group) that email is created for the members of the group *at that moment.* In other words, anyone joining that group later on wouldn't receive the scheduled email. Is that still correct?

If it is, how do Event notifications work? When we create an event, and setup the reminder notifications, no one is a participant yet. So those *must* be added on the fly, right? I just want to make sure that I'm understanding it correctly!

Then when I get to the actual work that I'm trying to do - creating a weekly newsletter that people can subscribe to - I'm kind of lost. It seems like the sort of functionality that would be in CiviCRM already, but I can't see how to have a dynamic group of subscribers that can join and leave (I had planned on doing that through their Drupal profile) that will receive an email each week that I schedule in advance.

I feel like I must be missing something about how this is supposed to work!

# Answer
> 3 votes
The most current and accurate documentation is https://docs.civicrm.org.

You're correct that a mailing's recipient list is calculated at the time the mail is composed, but you can install the Recalculate Recipients extension to change this behavior.

If I understand your question correctly, your needs would be met by installing Recalculate Recipients.

---
Tags: civievent, civimail
---


# Question
Title: Count data for smart groups is not currently calculated
When I go to "manage groups", some of my smart group counts are listed as "unknown" and the notification "Count data for smart groups is not currently calculated" appears.

Does anyone know how to address this issue? I have the smart group cache timeout set to 5 minutes and I have "Rebuild Smart Group Cache" cron job set to always run when the cron runs. The cron task runs every 15 minutes.

I can manually click "Update Smart Group Counts", but the problem is that I have an automatic sync to Mailchimp. So whenever the smart groups fail to count themselves and Mailchimp tries to sync, it thinks everyone in the smart group unsubscribed when really Civicrm lost track of the smart group counts.

Any help would be appreciated.

# Answer
> 1 votes
This Q/A discussion "Should Manage Groups display the Smart Group contact count, or just display it as Unknown" may help including following the links to read the comments for issue CRM-21583.

# Answer
> 1 votes
Why do you use a smart group for syncing with mailchimp? What would happen if someone unsubscribe from mailchimp?

I would advise to use a normal group for a mail group, that way you are sure what would happen if someone unsubscribes (either via Mailchimp or via CiviCRM).

If you need people to be automaticly subscribed to mailgroup you could use CiviRules (https://civicrm.org/extensions/civirules) for that. Documentation on CiviRules could be found at: https://docs.civicrm.org/civirules/en/latest/

# Answer
> 0 votes
We hit a new issue where it appears the Smart Group Cache table's auto increment value was too big for the id field causing smart groups not to rebuild. The AUTO\_INCREMENT was up to 4294978644 which seems to be too large for maria db's unsigned int. Once we reset the auto increment back to 1 the table refilled. There is a discussion here

# Answer
> -1 votes
Hello there I have been reading this thread as I'm having issues with CiviCRM and not allow smart groups to refresh or cache. Keep getting the same error message when exporting or trying to use a smart group. I also get this message when trying to update the smart group cache.

I have tried to input the code in civiCRM.settings as suggested. I have tried to set up another scheduled job to flush and have used all the other scheduled jobs to try and flush the cache. I have tried to change the smart group cache timer in Admin to 0, more than 5 and 35 which is longer than the cron job runs (every half hour, Hosting doesn't allow a shorter time)

error message

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. DB Error: no such field

**Log errors:**

Log Entry for Oct 02 18:42:29 \[debug\] $backTrace = #0 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(915): CRM\_Core\_Error::backtrace("backTrace", TRUE) #1 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM\_Core\_Error::exceptionHandler(Object(DB\_Error)) #2 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(997): PEAR\_Error-\>\__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...") #3 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB\_Error-\>\__construct(-19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...") #4 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR-\>\_raiseError(Object(DB\_mysqli), NULL, -19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...", "DB\_Error", TRUE) #5 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1925): PEAR-\>\__call("raiseError", (Array:7)) #6 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(935): DB\_common-\>raiseError(-19, NULL, NULL, "SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...", "1054 \** Unknown column 'a.api\_entity' in 'field list'") #7 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(405): DB\_mysqli-\>mysqliRaiseError() #8 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1231): DB\_mysqli-\>simpleQuery("SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...") #9 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2696): DB\_common-\>query("SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...") #10 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1829): DB\_DataObject-\>\_query("SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...") #11 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(421): DB\_DataObject-\>query("SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...") #12 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1473): CRM\_Core\_DAO-\>query("SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...", TRUE) #13 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/Api4/Query/Api4SelectQuery.php(136): CRM\_Core\_DAO::executeQuery("SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id`...") #14 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/DAOGetAction.php(76): Civi\Api4\Query\Api4SelectQuery-\>run() #15 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/DAOGetAction.php(67): Civi\Api4\Generic\DAOGetAction-\>getObjects() #16 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(68): Civi\Api4\Generic\DAOGetAction-\>\_run(Object(Civi\Api4\Generic\Result)) #17 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(150): Civi\Api4\Provider\ActionObjectProvider-\>invoke(Object(Civi\Api4\Generic\DAOGetAction)) #18 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/AbstractAction.php(230): Civi\API\Kernel-\>runRequest(Object(Civi\Api4\Generic\DAOGetAction)) #19 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/SavedSearch.php(214): Civi\Api4\Generic\AbstractAction-\>execute() #20 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/GroupContactCache.php(462): CRM\_Contact\_BAO\_SavedSearch::getSearchParams("2") #21 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(3160): CRM\_Contact\_BAO\_GroupContactCache::load(Object(CRM\_Core\_DAO)) #22 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(3061): CRM\_Contact\_BAO\_Query-\>addGroupContactCache((Array:1), "civicrm\_group\_contact\_cache\_5f77668580a43", "contact\_a", "IN") #23 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(1820): CRM\_Contact\_BAO\_Query-\>group((Array:5)) #24 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(2058): CRM\_Contact\_BAO\_Query-\>whereClauseSingle((Array:5), FALSE) #25 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(582): CRM\_Contact\_BAO\_Query-\>whereClause(FALSE) #26 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(529): CRM\_Contact\_BAO\_Query-\>initialize(NULL) #27 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(4578): CRM\_Contact\_BAO\_Query-\>\__construct((Array:1), (Array:1), (Array:165), TRUE, FALSE, 1, TRUE, TRUE, FALSE, NULL, "AND", NULL, "1") #28 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/GroupContactCache.php(210): CRM\_Contact\_BAO\_Query::apiQuery((Array:1), (Array:1), NULL, NULL, 0, 0, FALSE) #29 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/GroupContactCache.php(192): CRM\_Contact\_BAO\_GroupContactCache::add((Array:13)) #30 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(679): CRM\_Contact\_BAO\_GroupContactCache::loadAll((Array:0), 0) #31 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm\_api3\_job\_group\_rebuild((Array:1)) #32 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(150): Civi\API\Provider\MagicFunctionProvider-\>invoke((Array:8)) #33 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel-\>runRequest((Array:8)) #34 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/api/api.php(22): Civi\API\Kernel-\>runSafe("Job", "group\_rebuild", (Array:1)) #35 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(133): civicrm\_api("Job", "group\_rebuild", (Array:1)) #36 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(100): CRM\_Core\_JobManager-\>executeJob(Object(CRM\_Core\_ScheduledJob)) #37 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Job.php(195): CRM\_Core\_JobManager-\>executeJobById(15) #38 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(484): CRM\_Admin\_Form\_Job-\>postProcess() #39 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Submit.php(58): CRM\_Core\_Form-\>mainProcess() #40 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM\_Core\_QuickForm\_Action\_Submit-\>perform(Object(CRM\_Admin\_Form\_Job), "submit") #41 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML\_QuickForm\_Controller-\>handle(Object(CRM\_Admin\_Form\_Job), "submit") #42 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(335): HTML\_QuickForm\_Page-\>handle("submit") #43 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(395): CRM\_Core\_Controller-\>run() #44 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(140): CRM\_Core\_Page\_Basic-\>edit(4, 15) #45 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php(134): CRM\_Core\_Page\_Basic-\>run() #46 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM\_Admin\_Page\_Job-\>run((Array:3), NULL) #47 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM\_Core\_Invoke::runItem((Array:16)) #48 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM\_Core\_Invoke::\_invoke((Array:3)) #49 /home/customer/www/dublinfood.coop/public\_html/wp-content/plugins/civicrm/civicrm.php(1535): CRM\_Core\_Invoke::invoke((Array:3)) #50 /home/customer/www/dublinfood.coop/public\_html/wp-includes/class-wp-hook.php(287): CiviCRM\_For\_WordPress-\>invoke("") #51 /home/customer/www/dublinfood.coop/public\_html/wp-includes/class-wp-hook.php(311): WP\_Hook-\>apply\_filters("", (Array:1)) #52 /home/customer/www/dublinfood.coop/public\_html/wp-includes/plugin.php(478): WP\_Hook-\>do\_action((Array:1)) #53 /home/customer/www/dublinfood.coop/public\_html/wp-admin/admin.php(259): do\_action("toplevel\_page\_CiviCRM") #54 {main}

**Log error**

Log Entry for Oct 02 18:42:29 \[error\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> exceptionHandler )

```
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params`

```

FROM civicrm\_saved\_search a WHERE (`a`.`id` = "2") \[nativecode=1054 \** Unknown column 'a.api\_entity' in 'field list'\] \[type\] =\> DB\_Error \[user\_info\] =\> SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params` FROM civicrm\_saved\_search a WHERE (`a`.`id` = "2") \[nativecode=1054 \** Unknown column 'a.api\_entity' in 'field list'\] \[to\_string\] =\> \[db\_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM\_Core\_Error::exceptionHandler prefix="" info="SELECT `a`.`id` AS `id`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params` FROM civicrm\_saved\_search a WHERE (`a`.`id` = "2") \[nativecode=1054 \** Unknown column 'a.api\_entity' in 'field list'\]"\] )

**CiviCRM is working fine, but cannot access or use already set up smart groups. Has their been a fix that I am not aware of? I can't export any contacts in that group for a mailing to go out!!**

---
Tags: smartgroups, cron, cache, mailchimp
---


# Question
Title: Why am I getting deprecated function warnings?
When I run updates (such as with an updated module) in Drupal (7.87), I get the following CiviCRM (5.46.2) related warning:

*User deprecated function: Deprecated function CRM\_Contribute\_PseudoConstant::pcpStatus, use Function pcpStatus will be removed. in CRM\_Core\_Error::deprecatedFunctionWarning() (line 1044 of /home/example/www/www/sites/all/modules/civicrm/CRM/Core/Error.php).*

These warnings are not specific to this version of CiviCRM; they have been going on for a while. I just kept hoping the next version of CiviCRM would correct it.

I believe the pcp refers to Personal Campaign Pages, but I may be wrong. My site does not have any of those.

Any thoughts welcomed :-)

---

BACKTRACE OUTPUT per comments:

Mar 01 14:19:08 \[debug\] $backTrace = #0 /home/XXXX/www/www/sites/all/modules/civicrm/CRM/Core/Error.php(1038): CRM\_Core\_Error::backtrace("backTrace", TRUE)

#1 /home/XXXX/www/www/sites/all/modules/civicrm/CRM/Contribute/PseudoConstant.php(352): CRM\_Core\_Error::deprecatedFunctionWarning("Function pcpStatus will be removed")

#2 /home/XXXX/www/www/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm\_handler\_filter\_pseudo\_constant.inc(45): CRM\_Contribute\_PseudoConstant::pcpStatus()

#3 /home/XXXX/www/www/sites/all/modules/views/includes/handlers.inc(65): civicrm\_handler\_filter\_pseudo\_constant-\>construct()

#4 /home/XXXX/www/www/sites/all/modules/views/includes/handlers.inc(87): \_views\_create\_handler((Array:8), "handler", "filter")

#5 /home/XXXX/www/www/sites/all/modules/views/views.module(1399): \_views\_prepare\_handler((Array:8), (Array:18), "status", "filter")

#6 /home/XXXX/www/www/sites/all/modules/date/date\_views/includes/date\_views\_fields.inc(59): views\_get\_handler("civicrm\_pcp", "status", "filter")

#7 /home/XXXX/www/www/sites/all/modules/date/date\_views/date\_views.module(156): \_date\_views\_fields("civicrm\_contact")

#8 /home/XXXX/www/www/sites/all/modules/calendar/includes/calendar.views\_template.inc(37): date\_views\_fields("civicrm\_contact")

#9 /home/XXXX/www/www/sites/all/modules/views/views.module(1520): calendar\_views\_templates()

#10 /home/XXXX/www/www/sites/all/modules/views/views\_ui.module(56): views\_get\_all\_templates()

#11 /home/XXXX/www/www/includes/menu.inc(2831): views\_ui\_menu()

#12 /home/XXXX/www/www/includes/menu.inc(2794): menu\_router\_build()

#13 /home/XXXX/www/www/includes/menu.inc(468): menu\_rebuild()

#14 /home/XXXX/www/www/includes/menu.inc(1779): menu\_get\_item()

#15 /home/XXXX/www/www/includes/menu.inc(1794): menu\_get\_custom\_theme(TRUE)

#16 /home/XXXX/www/www/includes/common.inc(5402): menu\_set\_custom\_theme()

#17 /home/XXXX/www/www/includes/bootstrap.inc(2602): \_drupal\_bootstrap\_full()

#18 /home/XXXX/www/www/index.php(20): drupal\_bootstrap(7)

#19 {main}

# Answer
UPDATE: Based on new stack trace it's coming from `home/XXXX/www/www/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc` line 45, which is this:

https://github.com/civicrm/civicrm-drupal/blob/e22d89a50108a2b4da99e971d0fdcdd656edd56c/modules/views/civicrm/civicrm\_handler\_filter\_pseudo\_constant.inc#L45

`$this->_pseudo_constant = call_user_func_array($this->definition['pseudo class'] . "::" . $this->definition['pseudo method'], $pseudo_args);`

So that needs updating in the https://github.com/civicrm/civicrm-drupal repo. It's not clear how easy that would be to do. I would log a ticket at https://lab.civicrm.org/dev/drupal/-/issues/new. (Update: Done: https://lab.civicrm.org/dev/drupal/-/issues/175)

---

It's usually from an extension. You can grep your extensions folder for `CRM_Contribute_PseudoConstant::pcpStatus` and see what comes up. If you're on the latest version of it, then you can file an issue on their extension repo.
> 3 votes

---
Tags: drupal, error, pcp
---


# Question
Title: Error type: Could not find a valid session key. The now familiar error
I suddenly find myself unable to use most Admin functions in 5.43. I'm not completely shut out though. I can still load the Membership Dashboard where it loads Contact names etc., but can't do a simple search for a Contact via Search \> Find Contacts. That keeps throwing me back to the Advanced Search page with no results.

I can clear Caches on the Settings page, but not via Admin \> System Settings which also throws the error.

No recent changes to either wp-config or civicrm.settings

I recently updated WP to 5.9.1. I reverted to 5.8.3, but no change. How do I debug this on a live site? PHP 7.4.3 on Linux hosting with https. I'm at my wits end. All help appreciated.

# Answer
SOLVED — Earlier I had an issue with more than one active session, and the code I had put into my WP theme functions.php to "fix" it, now became the problem itself. // if session status is active then close the session //
> 1 votes

---
Tags: error, session, cookies, domain
---


# Question
Title: Which SQL table stores the FROM Email Addresses?
In Administer \> Communication \> FROM Email Addresses, I have changed the persons name associated with our donations@xyz.org email. However, receipts still have the old name associated with it. I am using a CiviRule to send a Message Template and the selection FROM Email shows the proper name, but it send the old name. Where in the database do I find this information so I can make sure it is properly cleaned up?

# Answer
> 1 votes
Not sure about how civirules stores it but the From addresses are just option values.

`select v.* from civicrm_option_value v inner join civicrm_option_group g on v.option_group_id=g.id and g.name='from_email_address';`

---
Tags: email, receipts
---


# Question
Title: Unable to edit custom fields for contacts in wordpress
I have had a custom application written to search and display using the API, but since this has happened, I have been unable to edit custom fields in the contacts.

I have checked that I can edit the standard fields fine,, I have tried rolling back the database and files to before the changes, I have cleared cache, I have updated CiviCRM and Wordpress. BUT the issue remains.

I work for a charity and this is their support system for helping their members. Any experts have any Ideas. At this point I am willing to try anything you can think of.

# Answer
> 0 votes
I fixed it. The issue was due to permissions and custom roles being given the permission but not the other account.

This issue is now resolved. Thank you all for your help and support

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


# Question
Title: Advance Search - Display as Mailings - No options appear for export
I am trying to get data to see what email donors clicked on. I do an advanced search, display results as mailing, but the options to export are missing. I attached my options in an image, but it appears to do the same no matter what search options are chosen.

D7, Civi 5.42, Shoreditch and Greenwitch

# Answer
> 3 votes
You can not find the clicked email using advance search - But, work around would be:

**STEP 1:** Add all the contact to a group/smart group (if you create a smart group - you don't have to run the same advance search again and again)

**STEP 2:** Go to Menu - Reports -\>Mailing Reports -\>Mail Clickthroughs

**STEP 3:** In the filter select the group which you have created

Finally run the report and now you should see all the email and click through URL too which can now be exported

I guess this helps !!!

---
Tags: advanced-search
---


# Question
Title: How do i open a case when a specific activity is added
How can I create a case with a set case type when a specific activity is added to a contact or a contact is added to a particular group?

1. New contact joins using WordPress integration form.
2. A new contact is added to a New Members group.
3. New Case added called New member and workflow added.

The part in 3 is the new part I would like. I have CiviRules installed, but I can't find anything that would do what I need in that extension.

# Answer
> 3 votes
For wordpress, you might get what you need from the Form Processor extension.

Something like this:

---

---
Tags: civicase, civirules, activity
---


# Question
Title: Recipes for managing contacts who leave companies (Drupal)?
Can anyone point me to best practice or recipes for dealing with staff contacts when they leave a company that is running CiviCRM, especially when the person may have created content in both Drupal and in Civi?

# Answer
The simplest approach would be to block the Drupal account, no other action is required.

If you must delete the Drupal account for a given reason, make sure you select ‘Delete the account and make its content belong to the anonymous user’, otherwise the content created by this user will also be deleted.
> 4 votes

---
Tags: contacts, drupal-7
---


title: "Find Cases" Page Not Found

text:
# Question
Title: "Find Cases" Page Not Found
It suddenly appears that my users get a "Page Not Found" when they click on the "Find Cases" link. It works for me as an admin, but I can't figure out what user permission is responsible for this. Any thoughts? I'm on CiviCRM 5.44.0 and Drupal 7.

Drupal errors show:

Notice: Undefined offset: 5 in CRM\_Case\_Task::getTask() (line 142 of /home/admin/domains/.../public\_html/sites/all/modules/civicrm/CRM/Case/Task.php).

Warning: require\_once(.php): failed to open stream: No such file or directory in require\_once() (line 452 of /home/admin/domains/.../public\_html/sites/all/modules/civicrm/CRM/Core/Controller.php).

# Answer
> 3 votes
It should be that they need either "access my cases and activities" or "access all cases and activities", but "page not found" isn't what I'd expect - I'd expect "access denied".

The undefined offset suggests one of the dropdown actions is missing, and "5" is "Print" (and Print is also the default when something is missing). Do you have some custom code (e.g. hook\_civicrm\_searchTasks) or core overrides that may be causing a problem?

---
Tags: civicase
---


# Question
Title: CiviCase extension not displaying non-case activities in contact summary screen
Ive installed the CiviCase extension - ie the one provided by colemanw, version 5.

Works fine, except on the normal activities tab. Clicking on that loads placeholders for the default listing, which is all activities - but they are not populated.

Selecting an activity type eg meeting populates fine.

Any help would be much appreciated.

Using 5.46.2

# Answer
> 0 votes
I can reproduce and it sounds like maybe the extension hasn't kept up with some core changes? I'd file an issue at https://github.com/civicrm/org.civicrm.civicase/issues

`User deprecated function: Deprecated function Civi\Angular\AngularLoader::setModules, use addModules`

`Uncaught ReferenceError: angular is not defined`

---
Tags: extension, civicase
---


# Question
Title: Blank screen when reusing a previous mail (Mosaico)
When attempting to reuse a mail, things work normally until clicking 'Edit' which results in a mostly blank page - some of the Mosaico page is shown but not the content.

What turns out to be important is that the site recently moved from using http:// to https://

# Answer
> 4 votes
If you change your site's domain, the specific sql that you can run to fix your templates and (separately) your existing messages (e.g. those in progress or in case you want to copy them):

From "olddomain.org" to "newdomain.org":

```
update civicrm_mosaico_template set metadata = replace(metadata,'olddomain.org','newdomain.org');
update civicrm_mailing set template_options = replace(template_options,'olddomain.org','newdomain.org');

```

If your old/new domains share some parts (e.g. you're going from domain.org to www.domain.org) you'll want to be careful not to run it more than once and it may mess up something else.

If you're also changing the protocol (http to https), then it's a bit tricky because the template\_options field is in json notation with "/" escaped. You could do it in a separate step, replacing 'http' with 'https' for example.

There's an open issue here: https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/87 to try and fix it.

# Answer
> 4 votes
Using the browser network tools shows a failure to load the template with a "mixed content" message. The problem is that the template metadata includes the full URL of the template.

The fix is to update the template URL in the Mosaico metadata to use https:// in place of http://

With db access, you can update `template_options` in `civicrm_mailing`.

Alternatively, start from `cv api Mailing.get id=...`

## Update

There is now an API call to update the templates for you. See the docs

```
cv api MosaicoTemplate.replaceurls from_url="http://old.server.org" to_url="https://new.server.org"

```

# Answer
> 0 votes
I had the same issue when creating a new mailing when I migrated a site from Drupal to WordPress, so obviously the path changed. Correcting the path in the Metadata field in the civicrm\_mosaico\_template table fixed it for me. However, to be able to reuse old mailings, I did have to use the method above.

---
Tags: civimail, mosaico
---


# Question
Title: Options for user self service of membership
We are pretty new to paid memberships and I find I don't know how to answer basic use cases.

We have a membership with 3 levels (bronze, silver, gold). The membership is associated with a monthly recurring contribution. The user sets the contribution amount which is done via a price set where the amount is $1 and they can set the quantity.

This is all done via stock CiviCRM; not webform. We do not give users access to the CiviCRM dashboard. We do use Drupal Views if that helps.

Users are asking me:

1. How can I change my membership type? (e.g. Silver to Gold)
2. How can I change my contribution amount?
3. How can I end my membership and contributions?

Is there a page I can send them to where they can change these things?

I apologize if this is super basic. I've done a bunch of searches on here and can't find an answer.

Thank you!

CiviCRM 5.37.2 on Drupal 7.X.

Edit to add: We are using Stripe as a payment processor.

# Answer
To change your membership type, you just need to renew your membership at a new level. Assuming the memberships are both tied to the same organization (check your membership type settings, but this is almost always the case), the renewal will be considered a membership upsell.

The answer for questions 2 and 3 are similar, and are related to your payment processor, which you haven't mentioned.

Most (but not all) processors support what you're requesting. If they do, then the contribution receipt will have the following at the bottom:

```
This membership will be renewed automatically. You can cancel the
auto-renewal option by visiting this web page
https://example.org/civicrm/contribute/unsubscribe?reset=1&mid=12353&cs=6eda08dad7164135b0ac8b112ce6c128_1592902428_inf.

You can update billing details for this automatically renewed membership
by visiting this web page
https://example.org/civicrm/contribute/updatebilling?reset=1&mid=12353&cs=6eda08dad7164135b0ac8b112ce6c128_1592902428_inf.

```

Keep in mind that these links are only good for a limited period of time (7 days by default but can be changed under **Administer menu » System Settings » Misc**). Also, depending on your configuration, users may not be receiving a receipt for every recurring setting. If not, you may need to change that in the database - look for the `is_email_receipt` field in the `civicrm_contribution_recur` table, which defaults to `1` (true) but may have been changed based on your settings.

Note that changing the period the links are good for only affects future links, not links that have already been emailed.
> 3 votes

---
Tags: civimember, recurring-contributions
---


title: Dedupe rules with Form Processor?

text:
# Question
Title: Dedupe rules with Form Processor?
Can I use a Dedupe rule with Form Processor? I haven't found any such option in the Action options. If not, which is the default Dedupe rule used? The automatic one?

# Answer
Another option is to use the Extended Contact Matcher extension (https://github.com/systopia/de.systopia.xcm, documentation: https://docs.civicrm.org/xcm/en/latest/). That will also add an action to Find or Create a contact using the XCM profile. And the Extended Contact Matcher will allow you to use dedupe rules.
> 3 votes

# Answer
(I don't have a reputation to add a comment but want to share this with others who want to know how to update rather than create contacts that exist.)

If you are attempting to update organizations rather than duplicate them, I find the following updates organizations correctly.

1. Select 'Contact: Get organization by name' to get the CID for the organization by setting the Parameter Mapping: Organization Name to the input field that contains my organization name.
2. Select 'Contact: Create or update Organization' to update the values by setting the Parameter Mapping: Contact ID field to the Action you create in step 1. Notice that it says "Leave empty to create a new Organization." Thus, if the action from step 1 finds an organization contact that matches your organization input field, then that action will contain the CID for the organization and be updated. Otherwise, a new record will be created.

As far as options for deduping, the action used in step 1 only uses the organization name. For individual contacts, I found that the 'Contact: Get Individual by name and email' action will let me choose whether the contact has to be an exact match of all three or not. (I use this to get the CID of the individual contact and then 'Contact: Create or update Individual' to update the contact by setting the Parameter Mapping: Contact ID field to the action that contains the individual contact ID.
> 2 votes

---
Tags: form-processor
---


# Question
Title: Create Selection Box by Using WebForms From Data Coming From CiviCRM
I want to create selection box on webforms from data coming from CiviCRM for login users. Is there any way (for example form elements, add-on, settings) to get user data from CiviCRM and use these data inside Webforms.

# Answer
I really appreciate time that you put on this issue. How can I secure data sending from URL? Is there any way to encrypted url string.
> 0 votes

---
Tags: webform-civicrm
---


# Question
Title: Stripe Contributions from an External Site
I'm about to set up Stripe as a Civi payment processor and was wondering, if we have other non-Civi sites that take donations (Stripe charges), will those automatically be imported as Contributions in Civi? I see that Civi sets up a Webhook for charges (charge.succeeded, etc). Will it attempt to bring in all Stripe charges, or only those that are made from a Civi event or contribution form?

I would love to be able to auto import all charges across all our sites/tools, if possible.

# Answer
I'm no expert on the Stripe interface, but I'm sure enough that the answer is 'No', Only contributions that arrived via a CiviCRM screen (event, donation, membership) will be recorded.
> 1 votes

# Answer
In theory, it appears that this would be possible, using the "payout reconciliation" report, here: https://stripe.com/docs/reports/api

Might have to hire someone to implement it though, I'd ask https://civicrm.stackexchange.com/users/4159/matthew-wire who is the maintainer of the extension.
> 1 votes

---
Tags: civicontribute, stripe
---


# Question
Title: Is there a way in bulk email to restrict the from email address to just that user?
We have several people who can send bulk email. Each user can select any of the from's we've added. Really only certain people should be able to send mail from some other user.

It looks like this question has sort of been asked but then it came back as no and it should maybe be a feature request. The question is a couple of years old so maybe something has changed in that time or maybe people have figured out a work around.

# Answer
EDIT: This extension is unmaintained and not recommended. You want the From Email Address Permission extension.
> 3 votes

---
Tags: civimail
---


# Question
Title: I need a complete idiots guide to creating the initial cron setup
I have found the guides for setting up the cron in CiviCRM.

I cant understand anything. I am using Wordpress. can someone please give me a complete step to step for setting this up as I really don't understand it and I need it to clear the cache every 5 minutes

TIA

# Answer
We would need to know more about your hosting arrangements to provide any more detailed help.

Setting up cron can be confusing and it is hard to provide a complete step-by-step guide since there are so many variables. If you have read the docs and the cron questions on SE and still don't have a clue where to start then you may be best finding someone here to help you. It's usually a quick job for anyone familiar with this stuff.

Also, why do you need to clear the cache (which one?) every 5 minutes?
> 2 votes

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


# Question
Title: How can I place an "Add Record" button on a contact tab built with Search Kit?
I've created a Search Kit that shows only activities of a particular type, and I use Form Builder to build a tab on a contact record with this search. This is very helpful, but we want an "Add Record" button at the bottom of the tab. How can I do this?

# Answer
There is no UI to do this, but you can use the *Form Code Editor* extension, which ships with CiviCRM.

* Go to **Administer menu » System Settings » Extensions** and enable the *Form Code Editor* extension.
* Go to https://example.org/civicrm/admin/afform-html. (For Drupal/Backdrop, WP is slightly different).
* Click on the name of the Form Builder form you wish to edit.

You now have an interface to edit the HTML of the Form Builder form directly.

* Get the URL for the page you want to link to, in my case: `https://example.org/civicrm/activity/add?action=add&reset=1&cid=12345&selectedChild=activity&atype=74`.
* Remove the domain name and protocol so it's more portable, and substitute the hard-coded contact ID with the appropriate token. It should then read: `/civicrm/activity/add?action=add&reset=1&cid={{options.contact_id}}&selectedChild=activity&atype=74`
* Use standard HTML to add the link to the page. You can use Bootstrap classes to make things look more like the rest of CiviCRM. In my case, the full HTML I added was:

```
<a class="btn btn-primary" href="/civicrm/activity/add?action=add&reset=1&cid={{options.contact_id}}&selectedChild=activity&atype=74">Add Potential Volunteer Record</a>

```
* Don't forget to **clear your CiviCRM cache**.

When you're done, it will look like this:
> 5 votes

---
Tags: searchkit, formbuilder
---


# Question
Title: Can I use tokens created with hook_civicrm_tokens to alter fields in SearchKit Displays?
I've written a SearchKit search with Contacts and Related Contacts, and wish to combine the names into one field on output. I know I can use the Combine Text field transformation to simply add the fields together, but want to use a locally written mailmerge Token which programmatically alters the result (e.g. merging "Mr John Smith" and "Mrs Jane Smith" - same surname - to become "John & Jane Smith", or if the surnames are different, "John Smith & Jane Austen"). How can I access Mailmerge tokens like this?

# Answer
> 1 votes
Tokens aren't available in Search Kit. You have a couple of choices:

* In CiviCRM 5.47, you can rewrite your Search Kit results using Smarty. So you could recreate your token's logic in Smarty.
* If you have an unused Greeting Type field (e.g. "Email Greeting Type"), create a new greeting type that incorporates your token, and set all your contacts to use that greeting type. Then you can use "Email Greeting Type" in your Search Kit results and get the same logic as your token.

If you don't have a spare greeting type field, the More Greetings or Salutations extensions will provide them.

---
Tags: tokens, searchkit
---


# Question
Title: Event time zone field not showing in entry form
The event time zone field (new in CiviCRM 5.47) doesn't show up in the "new event" form. Impossible to store a new event to the DB, as the event time zone entry is mandatory.

Joomla 3.10.6 / CiviCRM 5.47

**Where to configure the default time zone for events?<br>Why does the respective setting not show up in the event form?**

Thanks a lot for your advice.

# Answer
> 4 votes
Finally found out, what was going on.
**The extension "Advanced Events" is not yet respecting the new timezone setting.**

In order to create/administer events, the extension has to be deactivated (not uninstalled).

Like this, everything works as expected.

---
Tags: civievent, timezone
---


title: Upgrading from 5.32 to 5.47

text:
# Question
Title: Upgrading from 5.32 to 5.47
Are there any issues with going straight from 5.32 to 5.47? Sorry for the direct question, I'm still learning how CiviCRM works.

# Answer
> 4 votes
It should be straightforward. In case you have the Grant component enabled then it would make it complicated as the Grant is now moved into an extension and many of us are facing issues while doing the upgrade.

Having said that you need to backup your site before proceeding with the upgrade.

---
Tags: upgrade
---


# Question
Title: How to allow for people to purchase gifts for others
We are using Civi in wordpress.

We are going to use Civi to host an 'adopt an object' scheme for our Museum. We anticipate that we will get a lot of people buying them as 'gifts' and will need the information of both purchaser and recipient. However, we need to make a distinction between them so we don't send the 'thank you' immediately to the recipient, that we know where the data came from and can manage that at our end.

Is there a way to:

1. Collect individual data for 2 'types' of people and make that distinct in the form.
2. Delay a 'thank you' email to the recipient.

# Answer
We actually solved for a "gift certificate" type need by utilizing the "Honoree" section on the contribution page. Doing so creates a soft credit type contribution on the honoree's contact record so that way you know who purchased it and who's the beneficiary. After that, it's pretty manual, but you can use CiviRules to assign an activity or send an email to someone on staff who can handle the next steps. After doing this manually for a while (as described above), we have now written requirements, and are planning to commission someone to write a CiviCRM extension for us to automate the process a bit.

The receipt goes to the purchaser (not the giftee/honoree), and in it, we include a link to a nice gift certificate they can print, and write in the gift amount, recipient's name, etc. Hoping to automate this part, too.
> 2 votes

# Answer
At this moment, Civi on Wordpress is in the midst of a transition in how to make web forms. Up until now, we have used Caldera Forms with the CF-Civicrm plugin. The combination is very powerful and allows you to capture data on multiple contacts on a single form, with addresses, phone #s, and emails for each person, with groups, tags and relationships. It sounds like it would do what you want here.

The delayed email would require a little extra thought, for example it might be triggered by a scheduled job in Civi.

But the Caldera company was bought out, and they are transitioning users to Ninja Forms by 12/31/2021. There is a Civicrm addon in development, for details see this post, toward the bottom of the page. I'm hopeful that it will allow us to do the same things we do now, but time will tell.

So if you don't need this immediately you may want to start learning Ninja Forms, starting laying out your forms, and add the Civi addon when it becomes available later.
> 0 votes

# Answer
CiviRules allows for delays on sending emails after various triggers
> 0 votes

---
Tags: contributions, contribution-page
---


title: Automated emails for late registrants

text:
# Question
Title: Automated emails for late registrants
We send out the information regarding the event 2 weeks prior; however, folks can sign up until the night before the course. Is there a way to create an automated email that only goes out to registrants who sign up after that email goes out?

Thanks!

# Answer
> 1 votes
I do not think you can do that with the standard event mails nor with scheduled reminders? Or perhaps you can do this with the scheduled reminders when you add all those folks to a special (temporary) group?

Alternatively you might want to try the CiviRules extension (https://civicrm.org/extensions/civirules) although I think your request would require some additional conditions.

# Answer
> 0 votes
You could use the extension "Custom Event Communication" and create a rule for an email there. However you would still need to create the rule manually two weeks before the start date.

---
Tags: civievent, civimail
---


# Question
Title: Can't upgrade Mosaico Extension from 2.8XXXX to 2.9 without Afform but no Afform Ext. Available in Joomla
Unable to upgrade Mosaico Extension. I keep getting an error that I need to upgrade Afform from Civicrm.org. (See picture.) I can't find Afform within the extension browser within civicrm, and either way it is already in my file manager and showing to be installed.

I'm attaching the error message that happens when trying to download and install the extension within Civicrm.

# Answer
As Demerit mentioned, I was looking for the name "Afform" and it is now called "Form Core." The error kept throwing me off asking for the extension "afform." I upgraded the extension Form Core and now everything is working well. Thank you for your help.
> 2 votes

---
Tags: extension, upgrade, error, mosaico, install
---


# Question
Title: Upgrade to 5.47.0 fails on my site with extensive use of CiviGrants
This is a D7 site. It uses CiviGrants and has over 600 of them using lots of custom fields. I am trying to upgrade from 5.46.2 to 5.47.0. When I run the db upgrade using the update url, it freezes right at the end. If I try to run the updates via Drush, I get the error:

> WD php: Error: Class 'CRM\_Grant\_DAO\_Grant' not found in CRM\_Core\_PseudoConstant::get() (line 212 of \[error\] /var/www/dev/web/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php). Error: Class 'CRM\_Grant\_DAO\_Grant' not found in CRM\_Core\_PseudoConstant::get() (line 212 of /var/www/dev/web/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php). Drush command terminated abnormally due to an unrecoverable error.

# Answer
Can you try to apply the patch
> 2 votes

---
Tags: upgrade, civigrant
---


# Question
Title: How to set up site registration on joomla CMS for CiviCRM members only
Proposed senario:

A current member enters their email address on a profile form. If the email address matches a current CiviCRM member then the member is registered in Joomla and an email is sent to their email address with login credentials and a link to the login page.

From what I've read this should be possible. The issue is the available information that I have found is vaugue and does not explain the concept and steps in implementing the process in much detail. I understand that I need to set up Joomla to allow self registration and a profile must be created in CiviCRM that will check the membership status.

Which type of profile and which profile settings need to be activated?

When Joomla is set up for self registration an unwanted registration link is shown on the login page that sends the user to a Joomla registration form that bypasses the CiviCRM profile form. How do I work around that?

A step by step guide and any advice would be very helpful.

Thank you for any help you can provide.

Keith

# Answer
See whether this extension helps. The usage is a bit different in that it uses the standard self-registration process but only allows registration to succeed if the email address is already in CiviCRM. It does not check membership but could do.

CiviAuthenticate might also be useful. It does not restrict registration but does restrict login access to members.
> 1 votes

# Answer
You could hide the registration link via CSS on the login page, and add a module (on the same page) with a "Create a user account here" link, leading to your CiviCRM profile. (Or you could create a template override for this page, but it's a bit more complex, and the above should do, IMHO.)

As for the CiviCRM profile for the registration page, you can create your own, and make sure you include all the key fields, including first name, last name and email (at minimum), and in the 'Advanced Settings' section of the profile setup you check off the "Account creation required" option for the 'Joomla user account creation option?' field.

While we're happy with the above set-up, we are also allowing for user registration via social network accounts (Facebook and Google in our case ... via the JFBConnect component), which bypasses the CiviCRM profile registration form. So, for that we've implemented this extension (https://civicrm.org/extensions/joomla-2-civicrm-user-synchronization), which creates a new contact (if it doesn't exist), or maps the new user to an existing contact (if it does exist).

Feel free to @ me if you'd like to chat more, and I'd be happy to connect.
> 0 votes

---
Tags: profile, joomla, registration
---


title: Q: Custom field for Events lookup

text:
# Question
Title: Q: Custom field for Events lookup
I need to add a custom field, for contacts, to search all events. As part of the organisation, there are meetings created for department heads to discuss appointments to our programme areas. I am creating an "appointment" custom fields set. I want to have a field that allows the user to search for that event and added it the contact record.

Thanks in advance. A.

# Answer
> 1 votes
If you just want to show that these are appointment discussions then you could create an Event Type of 'Appointment Discussion' then people can search by type.

If you want to record more info (eg level of appointment, department etc) you can create custom fields on Events. See the docs for details of how to add them.

You might want to do both - ie create an Event Type and then create the appointment custom fields only on that Event Type so that they don't show on all your other events.

---
Tags: civievent, custom-fields, civicrm-home
---