# Question
Title: "could not find valid value for id" on wordpress 4.8.1
On my civievent, people get the error message " could not find valid value for id" on wordpress 4.8.1

# Answer
I had this problem intermittently for some time when embedding event registration forms using a Wordpress shortcode. It has to do with page caching. CiviCRM parses the shortcode to capture the event ID and adds the id value to the global $\_GET object. If the page is loaded from cache (usually when the back/forward button is pressed) the code that parses the shortcode does not run, and the event ID is not added to $\_GET.

I was able to fix this issue by making a page cache exception with the caching plugin I'm using.

I think this behavior is essentially a bug and CiviCRM should output a hidden form variable with the event ID so that it still gets passed to the "Thank You" page if the registration form is loaded from cache.
> 1 votes

# Answer
I'm getting the same for when participants confirm the registration to an event. Bug stack:

```
CRM_Core_Exception: Could not find valid value for id in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php on line 27

0   CRM_Utils_Request::retrieve('id', 'Positive', Object(CRM_Event_Controller_Registration), true)  /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27
1   CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), true)   /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27
2   CRM_Event_Controller_Registration->__construct('Event Registrati…', true, 'null', null, 'false')    /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314
3   CRM_Core_Invoke::runItem(Array) /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
4   CRM_Core_Invoke::_invoke(Array) /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
5   CRM_Core_Invoke::invoke(Array)  /var/www/wordpress/wp-content/plugins/civicrm/civicrm.php:1199
6   CiviCRM_For_WordPress->invoke() /var/www/wordpress/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380
7   CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))    /var/www/wordpress/wp-includes/class-wp-hook.php:307
8   WP_Hook->apply_filters(null, Array) /var/www/wordpress/wp-includes/class-wp-hook.php:331
9   WP_Hook->do_action(Array)   /var/www/wordpress/wp-includes/plugin.php:522
10  do_action_ref_array('wp', Array)    /var/www/wordpress/wp-includes/class-wp.php:771
11  WP->main('')    /var/www/wordpress/wp-includes/functions.php:1310
12  wp()    /var/www/wordpress/wp-blog-header.php:16
13  require('/var/www/wordpre…')    /var/www/wordpress/index.php:17
14  {main}

```

And the error that the users see is `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.` `Could not find valid value for id`
> 0 votes

---
Tags: wordpress, error
---


# Question
Title: Slow smart group display on a contact after update to 5.46.3 from 5.35.x
When viewing the group tab of a contact, there's a "smart groups" openable tab, which triggers an ajax call to

https://example.org/civicrm/contact/view/smartgroup?cid=youcontactid&snippet=json

After the security update of civicrm last week, two largish (100k+) installs are extremely slow when opening that tab.

One example is a query time of 1000 seconds to see if a contact is in a smart group that looks for all individual contacts with a primary email address.

Has anyone had any similar experiences?

Here's the slow sql:

```
mysqld, Version: 10.3.28-MariaDB-1:10.3.28+maria~focal (mariadb.org binary distribution). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time            Id Command  Argument
# Time: 220324 19:46:19
# User@Host: user @  [10.0.34.4]
# Thread_id: 46884  Schema: civicrm_db  QC_hit: No
# Query_time: 1095.429051  Lock_time: 0.000378  Rows_sent: 1  Rows_examined: 800380665
# Rows_affected: 0  Bytes_sent: 629
use civicrm_db;
SET timestamp=1648151179;
SELECT      grp.id as group_id,
                        grp.title as title,
                        grp.frontend_title as frontend_title,
                        grp.frontend_description as frontend_description,
                        grp.description as description,
                        grp.saved_search_id as saved_search_id
            FROM        civicrm_group_en_US grp
            LEFT JOIN   civicrm_group_contact gc
                ON      gc.group_id = grp.id
            LEFT JOIN     civicrm_group_contact_cache gcc
                ON      gcc.group_id = grp.id
            WHERE       grp.is_hidden = 0
                        AND grp.id IN (298)
                AND     ((grp.saved_search_id is not null AND gcc.contact_id = 99609)
                            OR  (gc.contact_id = 99609
                                AND gc.status = 'Added')

                        ) GROUP BY grp.id;

```

# Answer
> 2 votes
Short answer: yes.

As per Demerit's link to the existing issue, it's related to a recent change in CiviCRM core that tries to be smarter when presenting the unsubscribe form.

For non-obvious reasons, the changes to the sql scale badly.

I've submitted a PR that seems to improve my two sites, testing and comments welcomed.

https://github.com/civicrm/civicrm-core/pull/23051

---
Tags: smartgroups, performance
---


# Question
Title: Payment Form Errors "Your browser session has expired and we are unable to complete your form submission" after upgrade to 5.47.2
We recently upgraded to CiviCRM 5.47.2 and now all of our payment forms are displaying the following error when users submit for payment.

```
Your browser session has expired and we are unable to complete your form submission. We have returned you to the initial step so you can complete and resubmit the form. If you experience continued difficulties, please contact us for assistance.

```

This is on WordPress, CiviCRM 5.47.2. We have never had this issue before and all payment forms seem to trigger the invalidKeyRedirect function. Nothing has changed on any of our payment forms or code outside of the Civi upgrade. Even though this error is displayed the transactions still process causing the user to re-submit the form and creating multiple transactions.

I am not seeing any issues in the error logs as test form submissions show "updated successfully" and "Receipt sent" even though I am getting the error on the page.

I also noticed that on the form submission prior to the upgrade the confirmation url would display "?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&\_qf\_ThankYou\_display=true&qfKey=####" and since the upgrade the thank you and qfKey are not displaying re. "?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&id=10&reset=1"

Any help would be appreciated.

# Answer
For anyone experiencing this issue the fix https://civicrm.stackexchange.com/a/40996/13407 by @bgm seems to have solved the problem. At least so far. Speficially the way we were handling permalinks was causing issue with the CiviCRM confirmation process/url for payment form submissions.

re.

Make sure that the civicrm.settings.php has this bit of code:

```
if (!defined('CIVICRM_CLEANURL')) {
    if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') {
      define('CIVICRM_CLEANURL', 1 );
    }
    elseif ( function_exists('config_get') && config_get('system.core', 'clean_url') != 0) {
      define('CIVICRM_CLEANURL', 1 );
    }
    elseif( function_exists('get_option') && get_option('permalink_structure') != '' ) {
      define('CIVICRM_CLEANURL', 1 );
    }
    else {
      define('CIVICRM_CLEANURL', 0);
    }
  }

```
> 2 votes

---
Tags: wordpress, civicontribute, contributions, forms, session
---


# Question
Title: We want to customize our System Workflow Messages for Contribution Receipts
We want to customize our System Workflow Messages for Contribution Receipts using custom tokens. The tokens need to retrieve an id from a custom field on the Contribution. Using either the `hook_civicrm_tokenValues()` or the new Token Processor events, do not provide us with the Contribution ID.

Is there a trick to using the Token Processor approach, or do we need to use overrides to alter how Core is dispatching the token events?

Thank You!

# Answer
Welcome to CiviCRM Stackexchange.

You can use the below code in your tokenvalue or token processor hook for contribution receipts.

```
$contributionID = CRM_Core_Smarty::singleton()->get_template_vars('contributionID');

```

> Note: To call tokenvalue hook from your extension, the extension needs to have tokens present in the extension.
> 1 votes

# Answer
After trial and error and consulting the source: here is how we retrieved the Contribution ID from the TokenProcessor Context:

```
function handle_evaluate_tokens(\Civi\Token\Event\TokenValueEvent $e) {
  $tp = $e->getTokenProcessor();
  $context_contrib = $tp->getContextValues('contributionId');
  $contribution_id = array_pop($context_contrib); // unbox;
...
}

```
> 0 votes

---
Tags: wordpress
---


title: Wrong time after 5.47 update

text:
# Question
Title: Wrong time after 5.47 update
After the 5.47 update, event time is displaying wrong values in CiviCRM.

Stored in the DB / **this is correct**

The stored timezone is Europe/Zurich / **also correct**

In lists in the backend and in the frontend, these **values are NOT respected**:

CMS timezone-setting and Civi setting are equal/didn't change.

Probably, the daylight saving time has not been respected while implementing the new timezone-feature... as this issue only shows up for events after march 27th.

**What else could be wrong?**

# Answer
Yes I mentioned this on the PR that added timezone support and on the associated lab ticket and also in product maintenance in the chat channel but you're the first person who seems to agree that it matters.

Any existing events that are not in the same daylight savings period as the date you do the upgrade will have a time that is off by an hour (e.g. if you do the upgrade today, then existing events in April/May etc. If you do the upgrade in April, then existing events in November/December, etc.)

There's currently no known automatic fix for it. You need to update those events manually.
> 3 votes

# Answer
Unfortunately, as mentioned in #2122 (comment 68933), there was no communication about this "wrong feature behaviour".
> 0 votes

# Answer
After the change to daylight saving time, every single event is displaying the wrong start-/end-time, unfortunately.

Also the corrected events after the 5.47 upgrade.

Changing DB-columns start\_date and end\_date back to DATETIME solved the issue as a "quickfix", as expected and mentioned HERE
> 0 votes

---
Tags: civievent, timezone
---


# Question
Title: What permissions are needed to edit Mosaico templates?
My guess it that template creation and editing requires Administer CiviCRM - but wanted to check in and see if there was another way.

Thanks!

# Answer
> 3 votes
It looks like the permissions for message templates and system workflow messages do not apply to editing Mosaico Templates.

I could not grant access to mosaico templates without granting the Administer CiviCRM permission.

# Answer
> 1 votes
I guess below permission are required fro user to update the mosaico template

1. CiviCRM: edit message templates
2. CiviCRM: edit system workflow message templates

---
Tags: civimail, permissions, templates
---


# Question
Title: Any Recent Experience with WPEngine and CiviCRM?
Long story short, admins insist on using WPEngine, I explained we would want to explore other options and I can't guarantee it will work flawlessly. I know there are posts from years ago about successfully hosting CiviCRM on Wordpress using WPEngine, but does that still apply in 2022? Any other reasons to be concerned?

# Answer
It might be worth checking if they have PHP Intl available which is a core requirement.

Flywheel, who are owned by WpEngine, don't & have no plans to add it.
> 1 votes

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


# Question
Title: How can I add activities information in the email sent by civirules?
I have a rule to trigger based on when an activity is added and send an email. I would like to add the content of the activity i.e. activity type, description in the email sent by civirules. Is it something possible to do? Thanks

# Answer
You should be able to use the available tokens in the template you are sending. Alternatively you could create your own tokens that can be filled with the data that is available from CiviRules?
> 0 votes

---
Tags: email, activities, civirules, activity
---


# Question
Title: Where is the current version of CiviCRM stored for D8/D9 instances?
An upgrade of CiviCRM (D9) has resulted in this error/warning

"Your database is marked with an unexpected version number: 5.45.4. The v5.45.3 codebase may not be compatible with your database state. You will need to determine the correct version corresponding to your current database state. You may want to revert to the codebase you were using until you resolve this problem. OR if this is a manual install from git, you might want to fix civicrm-version.php file."

The civicrm-version.php file does not show current or any specific version. Has this location been deprecated for D9? Is there another location that should be reviewed?

This issue (https://lab.civicrm.org/dev/drupal/-/issues/10) suggests that the civicrm-version.php file should include:

Is that still accurate or is there another location?

# Answer
xml/version.xml

In the database it's in civicrm\_domain.

It isn't cms-specific.
> 1 votes

---
Tags: version
---


# Question
Title: How to set Stripe test mode on both Stripe & Webform-CiviCRM
I am attempting to test a webform that renews membership. I have set Stripe dashboard to 'Test mode' but when I submit a test credit card (4242 etc) I get tbe message from Stripe 'Your card was declined. Your request was in live mode, but used a known test card.'. So how do I make a request in test mode? I guess something on the Civi side?

# Answer
On the CiviCRM part of the webform, in the 'Contribution' section there is a field 'Payment Processor Mode' where you can set either 'Test Mode' or 'Live Transactions' (and save this, of course, not forgetting to reset both this and Stripe dashboard when going live).
> 4 votes

# Answer
On the manage contribution pages dont use the bottom right hand links \> test-drive as this actually uses the live keys - so any test cards will fail.

Instead go to manage contribution pages \> title and settings page then use the contribution links button top left and choose online contribution (test-drive). Just soent 1 1/2 hours trying to debug and online with stripe support
> 0 votes

---
Tags: webform-civicrm, stripe, testing
---


# Question
Title: How to connect my wordpress newsletter form to civiCRM?
I need some help with connecting my wordpress newsletter form to civiCRM. I’ve just started using civiCRM and I want to connect the sign up form ( that I aready have in wordpress) with civiCRM, so that when contacts sign up for my newsletter in my page, it gets added in my lists in civicRM.

# Answer
you will need a 'connector' between WordPress and CiviCRM. Depending on if CiviCRM is installed within the Wordpress website or installed seperately, the way to connect will be different. If they are independent then you need a tool such as CiviMcRestFace. The inlay extensions pack can also be an alternative to expose a newsletter subscribe form on an external website and register the contact in CiviCRM.

You might need to change the form builder you use in Wordpress to tools that are compatible with CiviCRM. Actually there are different ways of setting this up.
> 0 votes

---
Tags: wordpress, forms, newsletter, form-snippets
---


# Question
Title: Drupal 9 linking CiviCRM Contribution pages to Webforms
I am fairly new to CiviCRM. We are quite a long way down the road upgrading a D7 site to D9 whilst also restoring a CiviCRM database and upgrading from 5.10.2 to 5.47.1.

In the older D7 site we are able to link to a specific contribution page from within Webforms.

But within D9 we only have the option to answer yes / no to this same option.

Any guidance on how to link Webforms to contribution pages in D9/CiviCRM would be gratefully received.

# Answer
The whole approach to 'using Contribution pages' was done away with in recent webform\_civicrm and the whole configuration is now available within the webform\_civicrm configuration.

Unfortunately it doesn't look like the documentation at

have been updated yet.
> 1 votes

---
Tags: civicontribute, drupal-9
---


title: Events Summary Report

text:
# Question
Title: Events Summary Report
I am trying to run a report of all Events with a start date in the current week, which would show title, start date, and ideally number of participants registered. The nearest I can get is the Income Count Summary Report, but this does not seem to pick up the number of participants, even though the field is selected in Columns. Also, there appears to be no tab for sorting, so the events are sorted in a random order, when date order would be useful. Is there another option I could try for this report? Thank you in advance.

# Answer
Depending on your version of CiviCRM you can probably get what you need with SearchKit:

* search for events with event participants
* where event start date in 'this week'
* add columns to results to include event name, date, participant id (and any other column you may want/need)
* group by event id
* set field transformations to count on 'participant id'
> 4 votes

---
Tags: civireport
---


# Question
Title: How can set the preferred_language in the form processor?
Is it possible in the form-processor extension to set the preferred\_language field when creating contacts? I can't find a way

Thanks!

# Answer
> 1 votes
As far as I can see this is not possible at the moment, but can be added to the create individual action fairly easily. Are you in a position to do that yourself or possibly fund the change?

---
Tags: form-processor
---


# Question
Title: How to import participants with custom field data?
I have a spreadsheet of data from an event we recently held that was hosted on an Aventri website. Have been banging my head on importing this into CiviCRM for a week. I finally figured out how to match people to organizations by doing two separate imports; now I'm trying to figure out how to match custom data from registration questions in the participant import.

I have a column for whether they only registered or actually attended (which I guess maps to Participant Status?), one for newsletter signup, one for donor interest, and a fourth for career status (custom text field). I've created these four fields in a profile and attached it to the event; they show up fine in the list of match fields.

But I don't see how to match the participant data to the contacts; I have last name as an option but that fails for contacts with duplicate last names. (I had to revert my database on that one, first try.) Why isn't there an email match? The only thing I can think of—which I haven't done because this *can't* be the right way—is to export the contacts from CiviCRM and manually put their IDs into the spreadsheet?

What am I missing here? I know I can find the tagged imported contacts and bulk register them for the event; I don't know if this is a step I take before importing the custom data.

# Answer
> 1 votes
Yes, the way to do it is to export all the conatcts with names and Contact ID and then do a look up from this list. You can do that in Excel or alternative so not all manual, but you'll also need to flag up those where the names duplicate and check those manually for the right Contact ID. You will also need to convert fields in your participant import list to the right format for Participant Status etc.

If your custom fields (newsletter signup etc) are for contacts rather than participants (which I think they should be) then you would need a separate contact import (from the same data) for these.

---
Tags: civievent, custom-fields, import, participants
---


# Question
Title: On importing Contacts, I can't match their Organization to the Employer field in CiviCRM
I have imported a new batch of Organizations. I want to import additional Contacts and match their Organization name in the .csv with the Employer field in CiviCRM. I don't see "Employer" as an option for matching fields. I looked all the way down at the bottom of the list of fields and didn't see anything that would help in setting up the relationship. What am I missing

CiviCRM 5.45.0.on WordPress Version 5.9.2

# Answer
> 2 votes
In the step where you match input fields to CiviCRM fields, look in the right hand column for '-related contact info'. Underneath that is the list of relationships you can choose. This set of fields are the last in the list of 'Matching CiviCRM Field' field names.

---
Tags: import, relationships, organization
---


# Question
Title: CiviMail: Using DMARC for multiple from domains
### Assumptions

* CiviCRM is running on **crm.example.org**
* Bounce processing is configured to use **bounce.example.org**
* Mails are send from **example.org**, **mail.example.org** and **example.com**

### Issue

If we were to enable DMARC for example.com it would fail the SPF alignment (strict and relaxed) since the domain **example.com** can't be aligned with **bounce.example.org**. We would additionally need a bounce processing for **bounce.example.org** and thus using this return path. However CiviCRM currently only supports one bounce processor. At least that is my understanding of it.

Here is a usefull illustration for this issue: https://help.zoho.com/portal/en/kb/campaigns/deliverability-guide/domain-authentication/articles/when-spf-or-dkim-alignment-fails#SPF\_alignment

### DKIM Alignment

Adding a DKIM signature per "From Domain" works just fine and it will pass. Either by using a relaxed or strict alignment.
works for: **example.org**, **mail.example.org** and **example.com**

### SPF Alignment

The Return-Path Domain needs to align with the organizational domain of the "From Domain" in case relaxed SPF alignment is used.
works for: **example.org** and **mail.example.org**
fails for: **example.com** It will never pass using a strict SPF alignment.

### DMARC Check

Since the DKIM alignment will work most of the time, the DMARC check would pass. But sometimes mailservers also mess with the mail content and thus make the DKIM alignment fail, resulting in a failed DMARC check and your mail not beeing delivered / ending in spam.
works for: **example.org** and **mail.example.org**
may fail for: **example.com**

### Brainstorming Ideas

1. Extend CiviCRM to use multiple mail accounts for bounce processing and let it chose the matching mail account according to the from domain.
*I have only found https://github.com/JMAConsulting/biz.jmaconsulting.ode that is slightly touching this issue, but does so by preventing from sending with different domains.*
2. Customize the outgoing mailserver to rewrite the return path domain to match the from domain and customize the incoming mailserver to rewrite the modified return path domain back to the original bounce processing domain.
*Can probably be done, but will be quite technical and brittle and we currently don't have control over the mailserver for incoming mails.*
3. Use the CiviCRM multisite feature: It should enable the use of multiple bounce processing accounts: Is it possible to configure CiviMail to send from two different domains?
*The overhead and technical challenges does not seem to be reasonable to me. We only need one instance of CiviCRM.*

Is there something that I'm missing or that I have misunderstood? Any extension heading in the right direction?

# Answer
> 0 votes
I came across this post after noting that Gmail has tightened their policies (now your email has to have an SPF record or a DKIM record to be considered "authenticated"). We still don't need a DMARC record thankfully, but as your question indicates, when we do, many of us wil start having trouble.

In my opinion, the first option seems the most viable. Currently, it seems you can only specify one bounce provider account. I think we would need the following changes:

* Allow multiple bounce providers
* Allow option to select default
* When choosing a bounce provider, first try to match the domain name of the from address strictly, then relaxed (mail.example.com will use example.com), and if still no match, then use the default

---
Tags: civimail, admin, mailserver
---


# Question
Title: In drupal 9 i have try to install Civicrm. But it asking "CiviCRM: Database: Database does not support creation of triggers" how to fix this error?
i am using Drupal 9, Cent os, php 8, Mysql 8. i am try to install the civicrm it's asking "CiviCRM: Database: Database does not support creation of triggers" how to solve this?

# Answer
Ask your hosting provider to give the mysql user account the TRIGGER privilege: See https://docs.civicrm.org/installation/en/latest/general/requirements/#mysql-permissions
> 1 votes

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


# Question
Title: REST API: Unable to decode supplied JSON
REST API works, but I cannot pass *json* parameter to it, getting "Unable to decode supplied JSON".

I am running CiviCRM 4.6.8 on Wordpress.

I have properly identified SITE KEY and API KEY, and I can run REST query with an empty json dictionary as parameter:

`https://foo.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api_key=secret1&key=secret2&json={}`

which gives me 25 contact records in a json data structure.

But when I try to add a json parameter (copied from API Explorer):

`https://foo.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api_key=secret1&key=secret2&json={%22sequential%22:1,%22email%22:%22marcin@akcjademokracja.pl%22}`

..I get the following error:

`{"is_error":1,"0":"error_message","1":"Unable to decode supplied JSON."}`

What am I doing wrong?

# Answer
> 8 votes
I would recommend you to use post instead of get to communicate with the rest api, both because it would allow you to avoid having the keys "in clear" in the get url (and therefore written in the log an so on), but also because you don't have to deal with url encoding of the parameters.

btw, you don't have to put the param in the json most of the time, so you can directly call

https://foo.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api\_key=secret1&key=secret2&sequential=1&email=marcin@akcja.pl&json=1

# Answer
> 0 votes
Strangely, le API explorer says to call the REST API with request attributes in the **json** parameter, like this:

`https://foo.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api_key=secret1&key=secret2&json={%22sequential%22:1,%22email%22:%22marcin@akcjademokracja.pl%22}`

But, as explained in the documentation, the `json` parameters just defines if the result should be json or xml. it just takes values **0** or **1**.

All parameters set in the json example have to be passed in the query string.

In your case, your syntax should be:

`https://foo.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api_key=secret1&key=secret2&sequential=1&email=marcin@akcjademokracja.pl&json=1`

which will return a json response

or:

`https://foo.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api_key=secret1&key=secret2&sequential=1&email=marcin@akcjademokracja.pl`

for an XML response.

By the way, for security reasons, parameters should be passed in POST, especially `api_key` and `key` to prevent them for being store in logs.

# Answer
> 0 votes
I was encountering this error no matter what I did until I started dumping values near where this error is thrown.

I was able to resolve it by adding `stripslashes()` before `json_decode()`.

I created this PR but I don't know if it is correct. That depends on what is adding the escaping to the string.

---
Tags: api, rest
---


# Question
Title: Fresh Install WP & Civi - Undefined Array Key Warnings Everywhere
Latest Civi and WP - PHP 8 - Database is utf8mb4 and utf8mb4\_unicode\_ci

I am getting these Undefined Array Key Warnings everywhere. Did I set up the database incorrectly or could it be something else?

Examples:

Warning: Undefined array key "email" in /home/prinyc/www/www/wp-content/uploads/civicrm/templates\_c/en\_US/%%6F/6F7/6F7BB438%%Contribution.tpl.php on line 42

Warning: Undefined array key "parseStreetAddress" in /home/prinyc/www/www/wp-content/uploads/civicrm/templates\_c/en\_US/%%05/056/056C19FD%%street\_address.tpl.php on line 23

# Answer
> 1 votes
php8 is more noisy so that's part of it. Also your php.ini error\_reporting is probably E\_ALL, and you might even have WP\_DEBUG\_DISPLAY turned on (https://codex.wordpress.org/WP\_DEBUG)

The install itself is probably fine, it's just that civi has tons of old code that needs bringing up to date and it's time-consuming to do that and to get it reviewed, so it happens slowly.

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


# Question
Title: How did all my email addresses get set to On Hold?
On Jan 25 I emailed my constituency (120) and had no bounces. On Feb 3 I sent another email and got 100% bounces (ditto for 2 emails after that). Just realized this today.

Somehow EVERYONE was set to On Hold. Any idea why this might have happened?

# Answer
> 0 votes
This can happen for many reason

* Mailing template which you are sending is too big (too big picture)
* your server might be busy. So, the job didn't reach the mailing server

To confirm the same - Try removing on hold flag from all the contact and try to send a simple text message - it should work

I guess this helps !!!

# Answer
> 0 votes
I'm also experiencing this after webform registration. Recently I noticed that an important proportion of the new members are defined as 'on hold'. I've checked the addresses and all of them look correct. This is a bit strange.

---
Tags: civimail
---


title: Employee of an individual relationship

text:
# Question
Title: Employee of an individual relationship
I want to give my users the ability to create an "employee of" relationship between an individual employee and an individual employer; where someone works for an individual rather than an organisation.

Is there a way to create a relationship that allows selection of either organizations OR individuals or must this be implemented as two separate relationship types?

# Answer
You can set the 'contact type' of a Relationship to be All Contact Types
> 3 votes

# Answer
I tried what @petednz-fuzion suggested (@tanbog I did this in the database setting contact\_type\_b to NULL for the relationship in table civicrm\_relationship\_type). Good news is: I can now add a relationship employer/employee individual to individual. Bad news: As @erikh-civicoop suggested I tested some basic functionality afterwards and the following two issues were enough for me to state that this is probably not the way to meet this need: 1. In the contact summary screen you won't see the employer when it is an idividual and you won't be able to add the relationship from there as you can only search for organizations. 2. In the default report "Current Employers" the empoyer's name will only show content for organizations. So probably a second relationship would be better then...
> 2 votes

# Answer
As @petednz stated you can change the contact types a relationship works for. (System\>Customize Data and Screens\>Relationshiptypes).

There is some core functionality involved in the employer relationship (linked to the employer in the contact summary). I would recommend you test that as well to make sure it behaves as you want. If it throws any issues, you can create a new relationship type for your purposes?
> 1 votes

---
Tags: relationships, ui
---


# Question
Title: when trying to save a new contribution the civi logo just spins and spins
this is the error TypeError: Return value of CRM\_Financial\_BAO\_Order::getDefaultPriceFieldID() must be of the type int, null returned in CRM\_Financial\_BAO\_Order-\>getDefaultPriceFieldID() (line 671 of /www/sites/all/modules/civicrm/CRM/Financial/BAO/Order.php any idea how to fix would be greatly appreciated

# Answer
> 2 votes
This is because your system has a line item with a missing price field or price field value.

Run the below query to find if there are line items with a missing price field or price field value.

```
SELECT COUNT(*) FROM civicrm_line_item
WHERE price_field_id IS NULL OR price_field_value_id IS NULL;

```

If the count is more than 0 after running above query then run the below query

```
SELECT @price_field_id := cpf.id, @price_field_value_id := cpfv.id
FROM civicrm_price_field_value cpfv
  INNER JOIN civicrm_price_field cpf
    ON cpf.id = cpfv.price_field_id
  INNER JOIN civicrm_price_set cps
    ON cps.id = cpf.price_set_id
      AND cps.name = 'default_contribution_amount';

 UPDATE civicrm_line_item
 SET price_field_id = @price_field_id
 WHERE price_field_id IS NULL;

 UPDATE civicrm_line_item
 SET price_field_value_id = @price_field_value_id
 WHERE price_field_value_id IS NULL;

```

---
Tags: civicontribute, error
---


title: 4 minutes to access admin page

text:
# Question
Title: 4 minutes to access admin page
I have a similar issue of the 2017 post first CiviCRM request of each session takes 4 minutes, afterwards works fine

I have a fresh virtual server in a university saas, with wordpress 5.9.2, php 7.4, no extension, civicrm. The first time after logging, if i click on civcrm, i have to wait 4 minutes before i can acces the menus. I tried everything (anothers virtual machines, with or without databases, change php version, etc..). I just found the other post today. No luck, i changed in civicrm.settings.php the CICICRM\_CMSDIR CIVICRM\_CMSDIR', '/home/entetu/htdocs/wp-content/') and no change on my local server, netcat on ports 80 and 443 are open So i need to disable checks but i don't know how to do it. Can somone give me a hand on this, please ?

# Answer
> 0 votes
I turned off Scheduled jobs, but no effect. now, i've got a message : The CiviCRM public extensions directory at https://civicrm.org/extdir/ver=5.47.2|cms=WordPress could not be contacted - please check your webserver can make external HTTP requests. Contact your site administrator for assistance.

In civicrm.settings.php i uncommented // $civicrm\_setting\['domain'\]\['ext\_repo\_url'\] = false; and the access is immediate. So the problem is the extensions.

I work behind a proxy server, so there must be a connection problem to reach the external extensions. I found in https://github.com/civicrm/civicrm-cxn-rpc/blob/master/doc/proxy.md define('CIVICRM\_CXN\_VIA', 'proxy\_address:PORT');

a way to indicate a proxy to civicrm but it didn't work. Any clue for another way to fix proxy with Civicrm ?

---
Tags: wordpress, performance
---


# Question
Title: How do I create a report that displays Contacts created in the last (say) 30 days?
This question was asked in October 2020. The answer was to use Drupal or Data Processor. We're using WordPress and we don't have the expertise to use Data Porcessor. Have there been any work-arounds developed in the past 18 months? I tried creating a Smart Group but the filters for Created Date asks for fixed dates, not relative dates.

CiviCRM 5.45.0 on WordPress 5.9.2

# Answer
Lots of things like this can now be done with SearchKit. If you were searching for those who had died in the last 30 days, you could use this

But if you switch to 'Created Date' you don't get the same options.

The `birth_date` and `deceased_date` fields are of the `date` type but `created_date` and `modified_date` are of type `timestamp` which are handled differently.

There has been a lot of focus recently on dates vs timestamps so I'd suggest creating an issue here requesting that timestamps can be searched with date ranges as dates are.
> 2 votes

---
Tags: civireport, searchkit
---


title: Database Trigger error message

text:
# Question
Title: Database Trigger error message
Trying to install to WordPress and I get; "Could not create a database trigger." I have no idea how to resolve. Thank you!

# Answer
The problem is that the database user doesn't have some higher level privileges required for CiviCRM. Ask your ISP support or database administrator to run the following commands for you as the root MySQL user:

-- Assuming a database called "civicrm" and a user called "civicrm\_user" -- and a MySQL version of 5.1.6+

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, TRIGGER, CREATE ROUTINE, ALTER ROUTINE ON civicrm.\* TO 'civicrm\_user'@'localhost' IDENTIFIED BY 'realpasswordhere';

For more details see: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+MySQL+Permission+Requirements
> 9 votes

# Answer
If you're using binary logging, you may need to add a line to your MySQL or MariaDB configuration (/etc/mysql/my.cnf) to proceed with the installation.

```
log_bin_trust_function_creators = 1

```
> 8 votes

# Answer
you should provide super privilege to the user `GRANT SUPER ON *.* TO 'user'@'%';`

for more information

https://www.educba.com/mysql-super-privilege/
> 0 votes

---
Tags: database, installation
---


title: REnaming activity types

text:
# Question
Title: REnaming activity types
I want to do a bit of light housekeeping on the activity types in CiviCRM.

I have one activity type called "Internal Client Referral Form" which is used in the webform called "Internal Client Referral Form". (Surprisingly enough).

But also gets used in a couple of other places as a generic referral activity.

If I dive in and edit the activity name down to "Referral", is that going to have knock on effects in other parts of Civi?

I get the feeling that this should be straightforward, which makes me think that I'm overlooking something fairly obvious.

# Answer
Do you mean `name` or `label`? The `label` (what is displayed to users, and changeable on the activity type editing form in the UI) is changeable (any non-english site has a different label already). The `name` (civicrm\_option\_value.name in the database) might be used by extensions or custom code, and is used by civicase. It is not recommended to change the `name` \- think of it like a numeric lookup key: If it was "4" instead of a word you wouldn't change it.
> 1 votes

---
Tags: activities
---


# Question
Title: CRM_Core_Error DB Error: extension not found
I'm taking over a project that uses Drupal 7 and CiviCRM (circa v4.3). When I add `civicrm.settings.php` the site crashes and I get this error message:

```
Initialization Error

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

    [code] => -25
    [message] => DB Error: extension not found
    [mode] => 16
    [debug_info] =>  [DB Error: extension not found]
    [type] => DB_Error
    [user_info] =>  [DB Error: extension not found]
    [to_string] => [db_error: message="DB Error: extension not found" code=-25 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [DB Error: extension not found]"]
)

```

The site works until `civicrm.settings.php` is added. In the settings file I've added the `CIVICRM_UF_DSN` and `CIVICRM_DSN` as `mysqli://root:root@127.0.0.1:8001/civi_db?new_link=true`. (I've also tried mysql with the same results). Everything else in the file is copied directly from the staging instance, the above credentials are correct and I can connect to the Docker MySQL DB with other programs.

---

Additional info: the above error message is rendered twice on the page, and I have seen other Civi warnings that make me think Civi may be trying to initialize twice but I don't know why this would be. I'm not sure if that's causing this particular issue if it's not I'd rather troubleshoot it once this is resolved.

It's hard to remember everything I did to set the site up locally since there was a lot of trial and error... At a high level:

The site was copied from the staging server with `scp` I pulled everything down and put it in a Docker php:7.1-apache container\*.

Both the Drupal, and Civi databases were dumped with Mysql dump and then copied into a volume locally.

I deleted the Civi cached files as recommended in the switching servers document.

\*this differs a bit from staging because they are using Nginx. It's not super easy to find old PHP containers with Nginx although at a future point I may need to build a custom container with Nginx.

# Answer
> 2 votes
thanks for you question :-) The error suggests that it misses an extension, this could be because the extension is absent or because the path is not clear. Can you still check what the original extensions were?

Can you explain what you have done to copy the site? There is some background info on changing servers here: https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/

# Answer
> 1 votes
I resolved this with a fresh Civi install, as recommended by @ErikH. The installer alerted me to another issue I was having, MySQL wasn't installed on the server. This was rectified by adding:

```
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql

```

To the `Dockerfile`.

---
Tags: drupal
---


# Question
Title: After upgrade CiviCRM 5.28 to 5.32.2. Cron is Stop When Mailing start
After Upgrade CiviCRM version 5.28 to 5.32.2. Cron stops when mass mailing start. After mass mailing completed Cron is again start. CiviCRM: 5.32.2 Drupal: 7 Php: 7.2.24

# Answer
CiviCRM keeps track of `cron` by looking at the "Upgrade Check" job and requires it to have run within the last hour. If the "Upgrade Check" job is set to "every hour" perhaps your mailing delays that a bit?
> 1 votes

---
Tags: mailing, cron-job, civicrm-home, scheduled-job
---


# Question
Title: "[message] => DB Error: no such table" error after installing civicrm
I drupal version 9.3.5 I have installed CiviCRM 5.47.3 plugin using composer in the centos 8 servers.

After installing CiviCRM on the server CiviCRM plugin is enabled automatically in the admin extension section

But after configuring CiviCRM no page is loading and facing the below 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 'civicrm_cidd.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 'civicrm_cidd.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 'civicrm_cidd.civicrm_setting' doesn't exist]"]
)

```

I installed CiviCRM by referring to the below link https://docs.civicrm.org/installation/en/latest/drupal8/

PHP version is v8.0.27

any guide is appreciated if need any more details please comment

# Answer
> 0 votes
Verify that your CiviCRM settings file `web/sites/default/civicrm.settings.php` is correct. If you are using a separate CiviCRM database (i.e., not using the same database as drupal), this may need to be adjusted and / or deleted and reinstalled.

Also verify the MySQL user has super priveledges. You should NOT be using root in MySQL, but instead should have a separate user account.

---
Tags: installation
---


# Question
Title: API exception message after upgrade to CiviCRM 5.48.0
After a 'successful' upgrade to 5.48.0 there is an alert and System Status message:

```
Event timezone check failed
API Exception: Invalid field 'event_tz' while checking events for timezones.

```

No other problems are apparent.

Any thoughts on how I can address this?

# Answer
This has come up twice before in chat. You need to completely replace the civi folder with the new code, not just extract files over it.
> 2 votes

---
Tags: civievent, upgrade, timezone
---


# Question
Title: What alternatives to Mosaico do you use or do you have any tips on how to improve design?
So I really like Mosaico, but design wise, imho, it has a bunch of flaws - like how it handles whitespace, image processing, fonts, flexibility (titles can't be hyperlinked), etc. I understand some people use mailchimp and sync contacts back and forth, but I am not sure that is the best approach, data wise for us.

Have you made your mosaico emails beautiful? Do you have tips? What did you do?

Do you use an external email system? If so, what is it?

# Answer
I'm with you, Mailchip is just fantastic but the interchange of contacts is clunky. I've also tried exporting the HTML and that works very well but is time consuming and requires a level of technical understanding. And of course it costs....

Mosaico is so close but all the issues you've identified are there and I haven't been able to find a way around them

So flip flopping between them has been my answer.......
> 2 votes

# Answer
We utilize Mosaico for very simple email communications and use Mailchimp for ones requiring a more advanced design, utilizing the sync extension. Both have some problems of course but overall it has worked out. Also, we use classic civimail for some of the templates we've built in there as well.

There is some information here about adding custom templates: https://civicrm.org/blog/totten/mosaico-extension-v20-beta3-etal

As well as how to do it from Mosaico's perspective: https://github.com/voidlabs/mosaico/blob/master/templates/tutorial/mosaico-tutorial.md

Here's a list of free, responsive email templates: https://www.practicalecommerce.com/free-responsive-email-templates

I'd probably start there and build up a skillset around converting them into Mosaico. But as you said, some foundational assumptions from Mosaico can't easily be changed.

Lastly, I've found that just keeping simple 1 column and short emails with links to things we want people to do (sign up, read our website, etc.) has been more effective than focusing on making email design perfect (for what it's worth).
> 1 votes

# Answer
There's a project to implement MJML (mailjet engine) in CiviCRM in order to add or replace Mosaico. We only use Mosaico and for our clients needs it does the job
> 1 votes

---
Tags: civimail, mosaico
---


# Question
Title: Omnipay extension - process_recurring returns error message
We're running the 3.15 Omnipay extension with CiviCRM 5.46.2 under Wordpress.

Our hourly process\_recurring job is returning an error as shown below and I was unable to find a reason. I set the debug to 1, but didn't see any additional log entries --

```
Entity: Job Action: process_recurring
Summary
Finished execution of ProcessRecurring with result: Failure, Error message: invalid criteria for IN
Details

Parameters raw (from db settings):
debug=1

Parameters parsed (and passed to API method):
a:2:{s:7:"version";i:3;s:5:"debug";s:1:"1";}

Full message:
Finished execution of ProcessRecurring with result: Failure, Error message: invalid criteria for IN

```

# Answer
> 0 votes
Having exactly the same problem. Running Omnipay 3.15, Drupal 7.89 and CiviCRM 5.47.1. Temporarily disabled the process\_recurring job. Not a long term fix!

---
Tags: omnipay
---


# Question
Title: RESOLVED: "Review your contribution" returns a 404 after it worked before on CiviContribute Member Contribution page
This was the base page setting that got corrupted or confused somehow. Making a new one and setting that as the base page in the CRM Settings page resolved my issues.

I'm setting up a new site (https://members.marylandtesla.com). CiviCRM 5.48.0, WordPress 5.9.3, CentOS 9 Stream, PHP 8.0.13.

Had a CiviContribute Member Contribution Page (click on the 'become a member' link to see it) that worked, but it didn't ask what WordPress login was desired and didn't mail the user their credentials when the contribution was processed (note, I'm still using a dummy payment processor for now). Then I remembered I had to go into my Profile used on that page to the Advanced Settings, so I did that, and it's now asking for a WP login to check availability.

I don't think I changed anything else in the meantime, but the Review your contribution link now gives a 404 instead of the actual contribution review page. Tried rolling back the Profile change to no avail, so clearly something else changed.

Searched the web, and found this question was already asked and answered here ("HTTP Error 404.0 - Not Found" error on Contribution page). But I made sure the CMS Database Integration WordPress base page was not blank and is the default civicrm. Tried to change WP Permalink setting but man that caused chaos, so I changed it back to its default.

I also set the redirect URL under the profile to a Thank You page from another answer here.

Turns out this is not just for contribution reviewing. Event registration does the same thing.

Anyone have any ideas as to what I am doing wrong here? Wish I could remember what else may have been changed between "it worked" and "it doesn't." Thanks.

Michael

# Answer
> 1 votes
Once again just asking the question gave me some more ideas on how to resolve it. Base page got confused, added a brand new one and set the base page to that and it works again.

---
Tags: wordpress, civicontribute, profile, contribution-page
---


# Question
Title: How can I find CiviCases that have no Case Contact via the CiviCRM UI
Title kind of says it. I found some Cases with no Case Contact in the db. Tried Find Case and Case Reports etc but not sure I can see a way, even when knowing the Case ID, that I can find the problem Case (and hopefully also 'fix' it)

I know I can probably resolve this in the db, but ideally I shouldn't have to.

If i know the Case ID then perhaps API Explorer will let me assign a new Case Contact. But first I need to be able to tell there are some problem Cases.

# Answer
select c.id from civicrm\_case c left join civicrm\_case\_contact cc on cc.case\_id = c.id where cc.contact\_id is null

then

insert into civicrm\_case\_contact (case\_id, contact\_id) values (1,2)

where 1 and 2 are the real numbers

---

OR it is possible with search kit:
> 1 votes

---
Tags: civicase
---


# Question
Title: Is there some script for updating civicrm for wordpress?
I wonder if anybody over there wrote some script (`bash` or `php`) for updating CiviCRM for WordPress with very few (or no) human interventions. I am willing to contribute.

# Answer
You could look at 'wp civicrm upgrade' using wp-cli It has some issues that I keep meaning to investigate, but it's a start.
> 2 votes

---
Tags: civicrm-home
---


# Question
Title: webform_civicrm on Drupal 9 issue with case type
I am asking this question before I raise an issue in the hope that this a simple config problem - my simple testing has shown such fragility, it must be my end!

I've started the journey to port our CiviCRM on Drupal 7 to Drupal 9. All has gone really well (the porting guides are great) - everything basically 'works' and yesterday I got to looking at the forms. Reading, it seemed like the best approach was to just recreate the existing Drupal webforms that were integrated using webform\_civicrm - this way you learn the new Webform approach and clear out the stuff the you do not need.

I created the simplest of forms by duping the template Contact form and then trying to add an 'existing contact' and a single Case to it - it immediately crashed:

`The website encountered an unexpected error. Please try again later.`

The log message was:

`CiviCRM_API3_Exception: Expected one RelationshipType but found 0 in civicrm_api3() (line 135 of /var/www/html/vendor/civicrm/civicrm-core/api/api.php).`

I've played around, using no template, using another template etc and also get other crashes at various points:

`Drupal\Component\Plugin\Exception\PluginException: Plugin (webform_location_places) instance class "Drupal\webform\Plugin\WebformElement\WebformLocationPlaces" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of /var/www/html/web/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).`

This sort of stuff is in the logs:

`Notice: Undefined index: #form_key in Drupal\webform_civicrm\Plugin\WebformElement\CivicrmContact->wf_crm_contact_fields() (line 464 of /var/www/html/web/modules/contrib/webform_civicrm/src/Plugin/WebformElement/CivicrmContact.php)`

The thing is I'm not trying (yet!) to do anything tricky. On Drupal 7 I use Webform extensively to create and update cases and activities and have never seen these types of crashes. Just want to know if there is any fragility I should be aware of, or an approach where you must do X first then Y if using the integration?

Drupal 9.3.9 with CiviCRM 5.48

In the composer file (I believe as recommended):

"drupal/webform":"^6.2@beta" with "drupal/webform\_civicrm": "^6.2.0" and "wikimedia/composer-merge-plugin": "^2.0"

Many thanks

# Answer
> 1 votes
OK - it was data related. I had a case type that had an additional role defined but for some reason was not visible on the UI. When I used the API explorer to view all details of the case type, there was an additional 'caseRole' defined, but it was not visible. I have no idea how the data came to be in that state, but I am guessing that when the list of case types is generated on the form, it goes looking for the relationships, cannot find it and this causes the issue.

# Answer
> 0 votes
Our automated testing builds D9 x 5 versions of CiviCRM on every push/PR/merge -\> here are the details of the build:

https://github.com/colemanw/webform\_civicrm/blob/6.x/.github/workflows/main.yml

Note automated tests include Existing Contact element lookups. So your D9/CiviCRM set up is either missing something or something is running interference.

Have a good look at that main.yml file to spot any differences with your composer config/set up.

---
Tags: webform-civicrm, forms
---


# Question
Title: Make a SearchKit viewable with minimal permissions
I have a SearchKit that is based on the Participants table. I created a table display that allows the user to see basic information on the participants (name, home city/state, participant status). This tool was designed to be used by a staff member to use when checking in participants. The staff member would view participants for a specific event (set by URL parameters) and then change the status of the participants as they arrived. This works well most of the time.

We will be having an event where a volunteer will be checking in the participants. I am trying to create a role that allows minimal access to view this report. Unfortunately, the only way I've been able to make this visible is giving the following permissions: **view all contacts, administer CiviCRM, access CiviCRM backend and API,** and **access CiviEvent**. Is there a way view/use a SearchKit display without this high of permissions? I'm also open to other ideas of checking in participants by a non-staff.

CiviCRM 5.41.2 Drupal 7

# Answer
Yes. You can do this by embedding your Search Display in an Afform, and controlling the permissions from there. To do so you want to disable permission checks on the Search Display:

And on the Afform you want to set the permission appropriate for your volunteers to be able to access the form:

To set url args for your search display, click on the tab for your display on the Afform, and select the field(s) you want to filter by. You can then select the name of the url argument:

Note that this is javascript-based so the argument goes after a hash sign like `http://example.org/civicrm/my-afform/#/?financial_type_id=3`
> 5 votes

---
Tags: civievent, drupal, searchkit
---


# Question
Title: Uploaded a bunch of contacts and many were assigned foreign countries
I uploaded a bunch of contacts with addresses but without country specified. We have mostly United States contacts. Oddly CiviCRM assigned many of them Hungary as their country. Other countries also were assigned - El Salvador, Suriname, Slovakia, Soloman Islands, Nicaragua, and Uruguay also got assigned to some contacts, but for the most part it was Hungary.

We did not have a default country setup in localization.

Any idea why? Civi 5.48 / Wordpress

# Answer
If you upload contacts without a country, CiviCRM will try its best to find a matching state and will assign it whatever country that state has. If you use abbreviations, it will assign it the first country that has a state with that abbreviation.

Always be sure to include country when importing contacts with addresses.
> 2 votes

---
Tags: import, data-import
---


# Question
Title: How can I include two types of contribution in a single report
I have Contacts with 2 types of Contributions.

A) Contribution with CONTRIBUTION SOURCE = keyword

B) Contribution with CONTRIBUTION NOTE = keyword

**How can I include both types of CONTRIBUTIONS in a single Report?**

As far as I have checked, I can't search for both, because it is logical AND (I'd need OR for that).

P.S. Alternatively, I'd like to open CONTRIBUTIONS where SOURCE and NOTE is side by side and I can manually adjust SOURCE until it is uniform (contains keyword).

# Answer
SearchKit is your friend! It can do 'or' in the search.

See this :
> 3 votes

# Answer
This may be what you're looking for: https://civicrm.org/blog/titania/civicrm%E2%80%99s-powerful-custom-reporting-helps-create-targeted-groups-for-year-end

You can create two separate groups for each type. Then, include both on the include / exclude custom search page. **Search -\> Custom Search -\> Include / Exclude**

You can create include / exclude searches and save the results as a "super smart group".

**EDIT:**

You can alternatively use the "Advanced Search" feature to display results as ***contributions***, and use the ***contributions*** table to specify specific contribution record criteria (Including Source).

Don't forget to select **"OR"** as your search operator.

You can then select all contibution records and export them, selecting the fields you want to export.

This may not have every single thing you need, but you can always find other criteria to help narrow down your search. And maybe get you a bit closer?
> 1 votes

# Answer
You can find both sets of Contacts via SearchBuilder (which is not visible in menu on recent versions but can still be accessed via /civicrm/contact/search/builder?reset=1

Not sure if that gets you close enough to what you need
> 0 votes

---
Tags: civicontribute, civireport, searchkit
---


# Question
Title: Return one line per contact in searchkit
I'n building a report of contact demographics using searchkit for event participants

Starting with the Contact entity, joining participant and event entities and initially filtering by event type and then event end date.

All working fine and as expected, and for contacts that have attended more than one event in a quarter it is returning multiple rows for each contact.

What is the simplest way to set the search to return one row per contact? (I'd be able to do this in drupal views, so that's there as a fall back.)

# Answer
> 2 votes
After selecting the entities to search the Group By option~~

Allows you to choose any of the included entities to group results by

Contact ID- to return one line per contact Activity ID- to return one line per activity- etc

---
Tags: searchkit
---


# Question
Title: Is it possible to report on deleted activities/
Is it possible to run a report on deleted activities? There's an is\_deleted flag in the civicrm\_activity table which isn't exposed by search kit and I can't find any is\_deleted flags set to anything other than zero. And deleted activities do disappear from the above table. Would a logging table hold the deleted activities? it doesn't look like it, after trying out a delete on another site. Civi is at 5.47.4 & Drupal 7.

# Answer
> 2 votes
civicrm\_activity.is\_deleted is only used by civicase. Regular activities disappear. If you have logging at administer - system settings - misc turned on then log\_civicrm\_activity will have them where log\_action = delete.

---
Tags: activity, deleted
---


# Question
Title: Is there a Job board to post quote requests?
Can we post requests for quotes on this forum? Or should we just directly contact the FIND AN EXPERT on the civicrm.org site?

Thanks

# Answer
> 2 votes
You can contact the experts. You can also post in chat at https://chat.civicrm.org.

There is https://civicrm.org/jobs \- it seems more intended for hiring staff but there's a choice on the job form for "project-based".

---
Tags: wordpress
---


# Question
Title: Is it possible to "unmerge" two contacts?
Two contacts in my system were accidentally merged. Is it possible to unmerge them and restore all of their respective data to the original states?

# Answer
> 3 votes
If you have logging turned on at Administer - System Settings - Misc then the change log tab on the contact will have a "revert these changes" button if you drilldown on the "Contact Merge" entry, but (a) I'm not sure how well supported it is, and (b) if time has passed and many other changes have happened it may not do what you really want.

---
Tags: custom-fields, import, duplicate-contacts, data-import
---


# Question
Title: How do I troubleshoot/fix search error (when search is successful)?
I am searching **Contributions** by **Contribution Note** with **Search Builder**.

---

## When no matches are found, it properly says so.

## However, when the search matches result, there is "DB Error: No such field"

# How do I troubleshoot / fix this?

# Answer
This might be the same problem as https://lab.civicrm.org/dev/core/-/issues/3113
> 0 votes

---
Tags: search-results, search-builder
---


# Question
Title: Class 'NumberFormatter' not found causing a fatal PHP error
Running PHP 7.3 on WordPress 5.9.3 (latest). But on a very old Debian install. So old that I cannot install php-intl. So I get the message that CiviCRM will fail over to a less accurate method of formatting currency.
This cropped up because I finally was updating CiviCRM to the latest version as well as getting all extensions up to date. Now, however, trying to check any reports or individual contributions the browser generates a 'Cannot connect to the server' message and the apache error.log shows similar to:

```
PHP Fatal error:  Uncaught Error: Class 'NumberFormatter' not found in /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/Format.php:173\nStack trace:\n#0 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/Format.php(49): Civi\\Core\\Format->getMoneyFormatter('USD', 'en_US')\n#1 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty/plugins/modifier.crmMoney.php(31): Civi\\Core\\Format->money('45.00', 'USD')\n#2 /usr/share/wordpress/wp-content/plugins/files/civicrm/templates_c/en_US/%%3D/3D4/3D44E36C%%Selector.tpl.php(15): smarty_modifier_crmMoney('45.00', 'USD')\n#3 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php(1914): include('/usr/share/word...')\n#4 /usr/share/wordpress/wp-content/plugins/files/civicrm/templates_c/en_US/%%5E/5EA/5EA30681%%Tab.tpl.php(82): Smarty->_smarty_include(Array)\n#5 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php(1914): include('/usr/share/word...')\n#6 /usr/share/wordpress/wp-conten in /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/Format.php on line 173, referer: http://192.168.1.10/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview&reset=1&cid=23549

```

The plan is to move to a new server soon, but I wasn't quite ready to jump there yet. It seems likely that the missing php-intl extension is the culprit for this, but I'm not totally sure nor am I sure of what to do about it (the code repository for php7.3 has since been taken down). Any thoughts? Thanks!

# Answer
If your site only needs english then as a temporary workaround you could try:

1. On the command line go into the civicrm folder, where the composer.json file is.
2. Type `composer require symfony/polyfill-intl-icu`
3. See if that works. It installs drop-in replacement functions for some of the intl functions.

You can undo it with `composer remove symfony/polyfill-intl-icu`
> 0 votes

---
Tags: wordpress, php7
---


# Question
Title: Attempt Upgrade from 4.7 to 5.48 and database upgrade fails
I'm new to CiviCRM and am working for a client who's 4.7.x CiviCRM has issues where I'm unable to access tabs and I get an error when switching to some tabs in the menu system, so I'm trying to upgrade.

I've got 5.48.0 uploaded via FTP to the server. I've tarred the old version in the same directory so it doesn't conflict and I have a backup. (I also have backups in the backups panel in Siteground, so good there).

I deleted the old version, unpacked the new version, and deleted the cache files as instructed. When I go to click for the database upgrade, it fails.

I also no longer see all my data tables on the main Dashboard page, either.

Should I change the version of PHP before I try to run the database upgrade function?

# Answer
> 1 votes
You need at least php 7.2 to run civi 5.48. Even then it may be a big jump and if that doesn't work you may need to upgrade to intermediate versions in smaller jumps.

---
Tags: wordpress, upgrade, database
---


# Question
Title: CiviCRM + Forms: Which is best? Gravity Forms/Ninja Forms/Contact Form 7 or Civi's own Profiles?
Trying to set up a form where I collect 1000's of people data that saves directly into Civi's contacts, collecting their data and memberships. We want to collect data and take payments for memberships on the form.

Which form (Gravity Forms/Ninja Forms/Contact Form 7 or Civi's own Profiles) is the best to capture and save this type of data?

It seems we have GF integrated onto WP, but not with Civi - I'm reading it still looks like GF is not integrated with Civi, is this true? I see Caldera Forms is set to shut down, and be absorbed by Ninja Forms - does Ninja Forms integrate with Civi? Is it a free plugin? How easy is it to intergrade the two? Contact Form 7 or Civi's own Profiles and both seem like clunky and time consuming options.

Any help with this would be appreciated by anyone!

# Answer
> 2 votes
Don't forget the Form Builder extension now shipping with CiviCRM.

# Answer
> 1 votes
There is no 'one and only super simple solution' to your need.

We use a mix of these tools (caldera, form processor + contact form 7...) depending on what we need to achieve.

For example, do you 'just' collect informations that are related to the contact entity or do you also need to create relationships, activities or do you need to create user accounts in WP or both of these with also some payments for contributions and memberships using gateways like Stripe or Paypal?

Answering to these questions will help you to approach the implementation of the form.

# Answer
> 0 votes
According to Ninja Form folk civicrm data will be integrated - most recent posting is here but not ready yet.

# Answer
> 0 votes
AFAIK there is actually an integration of GF with CiviCRM but this might well be a paid extension. Depending on your security approach I would recommend using a solution where you can keep your CiviCRM installation separate from your public website. And if that is or might become a concern for you it would rule out using CiviCRM's profiles as they stand at the moment.

And you might want to check out the Form Processor extension (https://civicrm.org/extensions/form-processor).

# Answer
> 0 votes
This may not be the code-free solution you are looking for but, https://github.com/ginkgostreet/org.civicrm.fieldmetadata is great for custom coded forms. It allows you to use CiviCRM Profiles as your form builder. It's not just limited to Profiles. You can also use it to retrieve metadata about price sets to build forms handling payments.

All it does is provide API's to retrieve descriptions of "field collections", but also provides widgets for forms built in AngularJS. I recently did a project in VueJS and it was straightforward to use the AngularJS code as a guide to re-implement the display widgets. A less-trivial example is the "Chain Select" - e.g. the auto-updating State dropdown that changes when Country is updated.

I've never tried it, but it might pair nicely with the form processor-extension.

# Answer
> 0 votes
Using the Form Processor extension, you can receive data from any form into CiviCRM. While it's not as full-featured as a "true" integration - e.g. your multiple-choice answers are not kept in sync - it gives you a lot more freedom in your form building choice.

I've written a WPForms-CiviCRM and Google Form-CiviCRM integration for use with Form Processor.

---
Tags: wordpress, civicontribute, civimember, profile, forms
---


title: Can't see a Spark Menu

text:
# Question
Title: Can't see a Spark Menu
This might be a dumb question, but we have just signed up for a trial of CiviCRM Spark

skidawayaudubon.civicrm.org

I log in as administrator and see the familiar CiviCRM Home screen with Resources on the left and News on the right but I have no top menu across the top (no search, contacts, contributions, events, mailings, etc..) So I can't access any functionality - I am the initial admin user so I should have permissions. What have I failed to configure? This is 5.48.beta2 release and I'm using Chrome Browser on Windows 10

Thanks!

# Answer
I have my top menu now displaying. The issue seems to be that two of the three choices for display of this top menu don't work, and the default setting is for one of those. I switched to the only choice that does work, by using the pulldown on display preferences under settings:

civicrm \> admin \> setting \> preferences \> display

Scroll down and find the pulldown for "menubar position"

The only choice that would display (for me) the civicrm top menu was "Above Content Area". None of the other choices produce a visible menu.

I've now realized this Spark version uses a slimmed down Drupal Install (used for Access Control only?) and the top black stripe that I see is the ***Drupal*** menu (showing "Manage Users" and "CiviCRM" as the only menu items), then below that is the breadcrumb trail (provided by the Drupal theme).

When I choose "Above Content Area", I finally see the CiviCRM menu displayed.

It works, and I now understand why the other two options "replace website menu" and "below website menu" make sense (if they weren't broken). If they said "replace Drupal menu" and "below Drupal menu" I would understand the choice better. I also understand why the typical Spark user has no need to (and in fact probably should not!) know that Drupal is involved as the access control "shell". If they aren't familiar with it, they would be more confused.

By the way, the exchange on this topic is found on https://chat.civicrm.org/civicrm/channels/spark and I am re-posting it here since this is the place I originally searched for an answer and I didn't want to leave this question hanging.
> 1 votes

---
Tags: civicrm-spark
---


# Question
Title: CiviEvent Confirmation Email Displaying Profiles Not Used In Event
We have created some custom fields/profiles to use with certain CiviEvent registrations. These profiles only display in the event registration when they are selected in the event setup - as expected. However, these profiles appear in the confirmation email despite not being selected for use in the registration. See image below - the highlighted area shows the proflies/custom fields that should NOT appear because they were not used in the event creation. How do I stop them being sent with the confirmation when they are not used?

Thanks, Eric CiviCRM 5.4.1 WP 4.9.8

# Answer
> 1 votes
Eric, Disabling those fields should remove them from the confirmation email. If you can't disable them (maybe they are from another active event), you can edit the Event Registration Confirmation and Receipt message and target the Event using $event.id (as in {if $event.id != "40"}do such and such{/if} ). Administer \> CiviMail \> Message Templates - System Workflow Messages Good luck!

# Answer
> 1 votes
To tag on to Greg's response: if disabling the fields and/or modifying the Smarty receipt template won't work for you, check to ensure that the data sets in which those fields reside are specific to the types of events for which you want to use them. I've seen a lot of clients over the years set up participant fields for all events and then get frustrated later because they 1) appear in emails and 2) make back-end registration a bit of a pain.

# Answer
> 1 votes
We have run into this situation as recently as April 2022, but only in the case that an administrator registers someone for an event from the "back end".

If the user (logged in or not) registers for the event, they get the correct email with only the profile fields used in the registration process.

Also, if the administrator pulls up an incognito browser window and registers as if they were the person they want to register, they receive the expected email.

---
Tags: civievent, custom-fields, profile, email, confirmation
---


# Question
Title: In a contribution, we have form , after user submits and when we manually add the payment, it's not changing status to new from pending in membership
We have created a contribution form in civicrm, after user submits and when we manually add the payment, it's not changing status to new from pending in membership, earlier it was working well, we have facing the problem since we have migrated to the new server, we have setup crm in Wordpress. We are unable to figure out what could have gone wrong as we have checked all the settings but they are exactly same as previous servers settings. we have also imported the same database form previous server and exported in new.

Edited:

So We have created an contribution form in civicrm. the flow goes as follows:

User fills the application form,

Once the application form submitted then admin verifies, changes the membership status to verified form pending manually,

User gets the verified email and does the offline payment(it's clients requirement to do offline payment).

Once the payment is verified then admin adds the payment details in contribution payment section.

Once the contribution status is completed then membership should assign and status should be automatically set to the new : this step was earlier working fine in old server but in current server it's not updating the status and also membership is not getting assigned to the user...everything else is working fine also the status is reverting back to the pending instead of new.

We are using wordpress version 5.9.3, Civicrm: Version 5.29.1 server php version 7.4

# Answer
Possibly your WordPress install doesn't have a cron job running to automatically kick off scheduled jobs. Check this by going to:

administer \> system settings \> scheduled jobs

Scroll down to find the item:

Update Membership Statuses (Daily)

In the third column you will see the last time this was run - if it's not recent then this isn't being executed regularly.

You can use the "more" item at the far right and choose "execute now" and see if that causes it to update the way you would expect.
> 0 votes

---
Tags: wordpress, civimember, status
---


# Question
Title: How can I create a form using profiles or form builder that exposes groups?
I want to make a simple quick add contact form that includes tags and groups. I seem to be able to add everything but groups using profiles. Well I can add groups to a profile but nothing shows up on the actual profile. Then I tried doing the same thing in form builder, but there doesn't seem to be an option for groups and tags.

Any suggestions?

Civi 5.48 - Wordpress

# Answer
You might want to try the GDPR extension https://github.com/veda-consulting-company/uk.co.vedaconsulting.gdpr
> 1 votes

---
Tags: profile, forms
---


# Question
Title: How do you use Mosaico templates with Pretty Workflow Messages?
How do you use Mosaico templates with Pretty Workflow Messages? Using latest Civi w/ Wordpress.

https://lab.civicrm.org/extensions/prettyworkflowmessages/ Says it works with mosaico, but none of my mosaico templates appear as options on the admin page.

# Answer
For now - this is my workaround:

* Install Mosaico Message Templates
* Go to Message Templates, since the edit option is disabled, copy the link to edit one of the other templates and edit the ID in the URL to another number (usually larger, mine was only 6 away), until you discover the template you want to edit.
* Do not make edits there, instead copy the message body, go back to message templates, create a new template and then paste the message body into the new template.
* add your tokens, make any changes you need, save and then you should be good to go!

There must be an easier way, but at-least this worked for me. When I just tried to do it using the template that mosaico message templates generates, i would get smarty errors.
> 2 votes

# Answer
Thank you.

Yes, currently Pretty workflow messages have dependency on `Mosaico Message Templates` if you are using Mosaico based branding template.

I have updated the readme to reflect the same.
> 1 votes

---
Tags: email, mosaico, system-workflow-messages
---


title: Export Contributions with Membership ID

text:
# Question
Title: Export Contributions with Membership ID
I am attempting to export Memberships and Contributions. When I export Memberships, there is no field to export associated Contribution records/IDs. When I export Contributions, there is not field to export the associated Membership (if it was a membership).

Currently, the only unique ID on the Contributions is the Contact ID - but a Contact can have multiple contributions (i.e. membership purchase, renewal, event sign up, etc.)

How can I export the related/associated Membership ID for a Contribution?

Alternatively, I thought it could work to export the Memberships if they included the Contribution amount. But that is also not an option on the Membership export, only Recurring Contribution ID.

# Answer
This is straightforward with Search Kit. Below is a search you can import into Search Kit. I've only added Contribution ID and Membership ID to the columns, but you can add whatever other fields you like.

I'm also adding a screenshot in case your CiviCRM version isn't new enough to support Search Kit imports:

```
[
  [
    "SavedSearch",
    "save",
    {
      "records": [
        {
          "name": "Contributions_with_Memberships",
          "label": "Contributions with Memberships",
          "form_values": null,
          "search_custom_id": null,
          "api_entity": "Contribution",
          "api_params": {
            "version": 4,
            "select": [
              "id",
              "Contribution_LineItem_contribution_id_01_LineItem_Membership_entity_id_01.id"
            ],
            "orderBy": [],
            "where": [],
            "groupBy": [],
            "join": [
              [
                "LineItem AS Contribution_LineItem_contribution_id_01",
                "INNER",
                [
                  "id",
                  "=",
                  "Contribution_LineItem_contribution_id_01.contribution_id"
                ]
              ],
              [
                "Membership AS Contribution_LineItem_contribution_id_01_LineItem_Membership_entity_id_01",
                "INNER",
                [
                  "Contribution_LineItem_contribution_id_01.entity_id",
                  "=",
                  "Contribution_LineItem_contribution_id_01_LineItem_Membership_entity_id_01.id"
                ],
                [
                  "Contribution_LineItem_contribution_id_01.entity_table",
                  "=",
                  "'civicrm_membership'"
                ]
              ]
            ],
            "having": []
          },
          "expires_date": null,
          "description": null,
          "mapping_id": null
        }
      ],
      "match": [
        "name"
      ]
    }
  ]
]

```
> 1 votes

# Answer
Depending on exactly what you want, you may be able to use the Contributions and Membership report, filtering on Finance type for membership and then exporting as CSV. But you'd need to do a bit of work in it as the contact info isn't shown on every line.
> 0 votes

---
Tags: civimember, contributions, export
---


# Question
Title: How to access specific field content in WordPress pages?
CiviCRM 5.48.0, WordPress 5.9.3, PHP 7.4.29.

I'm trying to create a link based on content in the user's profile (custom field for VIN, link is to do a recall search on that VIN, but the possibilities here are pretty much endless). My first idea was to just insert some PHP snippet using the Insert PHP Code snippet WordPress plugin ... but any PHP function to get CiviCRM user context has eluded me so far. Doesn't seem to be part of what wp\_get\_current\_user() returns either.

Then I had an idea to maybe just have a simple transform on the field... but that's eluded me as well.

Thought I found a possible way with the wp-civicrm-ux extension but that killed the site when I tried to install it (didn't spend any time figuring out why, wasn't sure if it would even solve my problem).

So, is there any way to access CiviCRM field content within WordPress to do custom manipulation of that data?

Thanks.

Michael

# Answer
You can use CiviCRM Profile Sync for this if you have ACF installed - or better still ACF Pro for greater compatibility and more Field Types.

It takes a bit of setting up, but what happens is that you sync a CiviCRM Contact Type with a WordPress Custom Post Type (or User) and then sync CiviCRM Custom Fields with ACF Custom Fields attached to the Post Type (or User). These can then be rendered in your theme using the standard ACF functions.

More info can be found in the documentation.
> 1 votes

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


# Question
Title: Error when upgrading civicrm for wordpress with wp-cli
In order to upgrade CiviCRM for WordPress from the command line on a remote server, I just installed wp-cli following the instructions at https://wp-cli.org/.

When I execute:

```
wp civicrm upgrade --zipfile ../Downloads/civicrm-5.48.0-wordpress.zip

```

I get a warning and an error:

```
Warning: file_get_contents(/home/myhome/www/wp-content/plugins/civicrm/wp-cli//civicrm.settings.php): failed to open stream: No such file or directory in /home/myhome/www/wp-content/plugins/civicrm/wp-cli/civicrm.php on line 946

The upgrade process involves -
1. Backing up current CiviCRM code as => /home/myhome/www/../backup/plugins/20220412055134/civicrm
2. Backing up database as => /home/myhome/www/../backup/plugins/20220412055134/civicrm.sql
3. Unpacking tarfile to => /home/myhome/www/wp-content/plugins/
4. Executing civicrm/upgrade?reset=1 just as a browser would.

Do you really want to continue? [y/n] y

Success: 1. Code backed up.
mysqldump: Got error: 2002: "Can't connect to MySQL server on 'myftpuser-001.privatesql' (115)" when trying to connect

```

I wonder if someone could give me an idea of a workaround for this problem.

# Answer
Following up on the comment from Kevin Cristiano above, the WP-CLI commands for `upgrade` and `restore` seem to be broken in versions of CiviCRM since the `civicrm.settings.php` file was moved out of the CiviCRM plugin directory. Let's track progress on the issue you opened and leave this here as a signpost for others.
> 1 votes

---
Tags: wordpress, cli
---


# Question
Title: How can we offer (and track) multiple premiums for a single contribution?
We are a small museum that is converting an existing membership program to CiviCRM. Our current membership program offers, say, 10 free admissions/year with the purchase of a Gold Membership and 5 free admissions with the a Silver Membership. I know how to set up the CiviCRM Price Sets for the different membership types. What type of field could I use to track **and report** the number free admissions used by each member? The entry of the free admissions could be done by staff at the back end as each free admission is used. (CiviCRM 5.48.0 on WordPress 5.9.3)

# Answer
> 0 votes
for a really manual set up, if you set up a number field (Free Entries Remaining) on the specific Membership Types, and set it to start as Default = 5 (for Silver) or 10 (for Gold), then each time a member uses a freebie your admin drop the value by 1

---
Tags: civicontribute, premiums
---


# Question
Title: How to style public profiles, forms, and registration pages?
We use wordpress and CiviCRM. Profiles on registration forms and the likes seem to be formatted weirdly. Most forms I see used on the interwebs are stacked, meaning label is above field which makes for great responsive forms.

Using wordpress, should we create a custom stylesheet for CiviCRM, should we inject some custom CSS? What is the best approach?

Here is how profiles appear on mobile on our website in mobile:

# Answer
There is a wordpress plugin called "CiviCRM Admin Utilities". There you can graphically prevent the native civicrm stylesheets from loading (civicrm.css, civicrmNavigation.css, and possibly custom civicrm stylesheets you defined yourself).

Then your site's theme css will mostly take over styling, which should be the best option for site uniformity. In most themes the label should then appear above the input field. Most likely you need to put some finishing touches by defining "additional css" in your wordpress theme (last item in the "Customize" menu in any wordpress theme when visiting the site while logged in). These changes will but survive theme updates, but you have to copy & maybe adapt the additional css when changing themes.

Alternatively, you can define a custom stylesheet for civicrm from scratch to match with your site:

1. create .css document
2. load it up to your server
3. add the path in administration --\> system settings --\> ressource URLs

For large styling efforts, you should probably deactivate the native civicrm.css document - this can be done in the ressource URL page as well.
> 3 votes

---
Tags: profile, css
---


# Question
Title: Payment failed When Using Payments With Webform CiviCRM
I am trying process a payment with Authorize.net but I tried PayPal too. I using a Drupal (9.3.9) site with Webform (6.1.3) integrated with CiviCRM Webform (6.2.0). In both cases I get "Payment failed".

Is there documentation for configuring payment with CiviCRM Webform? That might be all I need.

I have a Participant Fee from my event that the person is registering for.

I am not sure what else to share that would be helpful in figuring out why this is not working.

Thanks, Josh

# Answer
There is documentation here:

If these don't get you up and running, a few other thoughts:

* What is your CiviCRM version?
* Have you tested payment separately from webform, using a standard CiviCRM event registration or contribution page? This would help pin down whether the issue lies with the payment processor setup or the webform integration.
* Does your configuration differ from what's shown in the docs?
* Are there any error messages in the logs? (See Where are the "ConfigAndLog" and "templates\_c" directories?)
> 3 votes

---
Tags: webform-civicrm, authorize.net
---


# Question
Title: Can you Change the Default Participant Search Profile?
I know you can change the default contact search profile but can you change the default participant search profile?

# Answer
> 3 votes
I believe configurable search profiles are only available for Advanced Search, and then only when results are displayed as Contacts. From the inline help for Advanced Search:

> Views For Display Contacts
>
> If you are displaying the search results as contacts, you can modify the columns displayed by creating a Profile containing a different set of contact fields and then selecting that Profile here. For example you may want to include columns for Gender and Date of Birth, while eliminating Country. (Learn more...)

Documentation:

---
Tags: civievent, search, custom-search, participants
---


# Question
Title: Cronjob for CiviCRM with drush 10: The "-u" option does not exist
According to this documentation https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#drush I defined the following crontab:

```
* * * * * /var/www/path_to_civi_project/vendor/drush/drush/drush -u cronuser -r /var/www/path_to_civi_project/httpdocs -l https://www.public-url.org/ civicrm:api job.execute auth=0 -y

```

This leads to an error:

```
The "-u" option does not exist.

```

When I remove this option the Mailings Scheduler fails:

```
Finished execution of Mailings scheduler with result: Failure, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM

```

As the -u option seems to be removed from newer drush versions I wonder how I get the cronjob working. Do I need cv? Can I add cv with composer?

# Answer
> 3 votes
I don't know if there still is a way to use drush but I got the cronjob working with cv:

```
composer require civicrm/cv

```

And then the crontab is:

```
* * * * * /var/www/path_to_civi_project/vendor/civicrm/cv/bin/cv api job.execute --user=cronuser --cwd=/var/www/path_to_civi_project/httpdocs

```

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


# Question
Title: Troubleshooting "invalid criteria for IN"
I have a site that is spinning whenever I try to create a membership in the CiviCRM interface. The server logs don't have any particular errors, but the CiviCRM backtrace shows the following:

```
$Fatal Error Details = array:3 [
  "message" => "invalid criteria for IN"
  "code" => null
  "exception" => CiviCRM_API3_Exception {#1048
    -extraParams: array:3 [
      "is_error" => 1
      "error_message" => "invalid criteria for IN"
      "error_code" => "undefined"
    ]
    #message: "invalid criteria for IN"
    #code: 0
    #file: "/app/modules/civicrm/api/api.php"
    #line: 135
    trace: {
      /app/modules/civicrm/api/api.php:135 {
        › if (is_array($result) && !empty($result['is_error'])) {
        ›   throw new CiviCRM_API3_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result);
        › }
      }
      /app/modules/civicrm/CRM/Member/Form/Membership.php:1836 { …}
      /app/modules/civicrm/CRM/Member/Form/Membership.php:1525 { …}
      /app/modules/civicrm/CRM/Member/Form/Membership.php:1319 { …}
      /app/modules/civicrm/CRM/Member/Form/Membership.php:882 { …}
      /app/modules/civicrm/CRM/Core/Form.php:573 { …}
      /app/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:152 { …}
      /app/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:119 { …}
      /app/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
      /app/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
      /app/modules/civicrm/CRM/Core/Controller.php:355 { …}
      /app/modules/civicrm/CRM/Member/Page/Tab.php:324 { …}
      /app/modules/civicrm/CRM/Member/Page/Tab.php:394 { …}
      /app/modules/civicrm/CRM/Core/Invoke.php:319 { …}
      /app/modules/civicrm/CRM/Core/Invoke.php:69 { …}
      /app/modules/civicrm/CRM/Core/Invoke.php:36 { …}
      /app/modules/civicrm/backdrop/civicrm.module:547 { …}
      /app/core/includes/menu.inc:584 { …}
      /app/core/modules/layout/layout.module:621 { …}
      /app/core/includes/menu.inc:531 { …}
      /app/index.php:21 { …}
    }
  }
]

```

I'm having trouble figuring out the best way to troubleshoot this one. It's CiviCRM 5.47.3 on Backdrop (but I've tested a separate Backdrop site and it works fine, so it's something particular to this site/setup/server... I just need to figure out what that something is).

Update: it is only happening on membership types that are complimentary, admin-only "1 lifetime" memberships. The standard annual membership seems to work as expected.

Any advice would be appreciated!

# Answer
> 2 votes
In the end (since @Demerit helped isolate that these errors only occurred on some admin-only lifetime memberships) I ended up deleting those membership types completely and recreating (and re-importing the relatively few who had those memberships). That seems to have solved the strangeness. Those types were set up before I started helping on this site but in the UI they looked identical to the ones I set up new... so I'm not sure what the actual issue was.

# Answer
> 2 votes
Looking at the code lines in the stacktrace, it's possible your price set or membership setup does not end up generating any line items related to memberships. Check the price sets and membership types setup.

---
Tags: civimember, backdrop
---


# Question
Title: Missing data when exporting activities from search results
After upgrading to CiviCRM 5.43 we've noticed that some fields are blank when performing an export after searching for activities. This is something we do regularly and was working fine before the upgrade.

# Answer
> 6 votes
The answer is to ensure that you select 'With' when you perform the search. Doing this ensures that related contact data is available when you export the resulting data.

Prior to CiviCRM 5.43, 'With' was selected by default. From CiviCRM 5.43 onwards, 'With' is not selected so you need to select in while doing the search.

The change was made in this PR: #21595

# Answer
> 3 votes
I have also found a bug in regard to this where the Display Mapping only shows the Assignee whatever option you choose. The export is correct however. Tested on DMaster Demo 5.50 alpha

I have created an issue Issues Log

---
Tags: activities, export
---


# Question
Title: What does the CiviCRM Administration UI or civicrm_admin_ui actually do?
As the title says - what does this do? I know it says it replaces legacy pages with configurable search display forms - but what is considered legacy, what are these pages?

Also - personal annoyance - i hate seeing http://FIXME anywhere. These fields should be required for ui published extensions.

# Answer
At the moment it's just Custom Groups and Custom Fields. But I expect this extension to be short-lived as an extension - soon every page in civi will be a search kit. I'm joking a little bit but depending on who you talk to "legacy" means any page that isn't based on afform/search-kit.
> 1 votes

---
Tags: extension, admin, formbuilder
---


# Question
Title: On sending test for mailing, I get : "Could not identify any recipients. Perhaps your test group is empty..."
I'm setting up civicrm-5.47.2-wordpress with wordpress-5.9.2 on Ubuntu 20.04 running Cyberpanel 2.1, on AWS Lightsail with AWS SES SMTP credentials in CiviCRM Outbound email where 'Save & Send Test Email' works. I can also send individual email to contacts.

But when I create a draft mailing and use 'Send test email to:' or 'Send test email to group', it tells me it is sent, but then I get the "Could not identify any recipients. Perhaps your test group is empty..." message. It also marks those contacts as 'On hold'. (But I can unset the 'On hold' and email individually from CiviCRM.)

There are no clues in ConfigAndLog.

I can't seem to debug this issue. Need some help please.

# Answer
> 1 votes
After setting Enable Debugging, ConfigAndLog showed this error :

> code: 554, response: Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: b.52.83.fa04b192f1638ba4@mydomain.com

SOLUTION (in my case) was to make sure that my bounce account bounce@mydomain.com had the same domain-part setting as my SES-verified domain (mydomain.ca). SES was rejecting mydomain.com (not verified). To clarify, the bounce account is elsewhere, but the "Email address domain (the part after @)" is set to mydomain.ca which is a verified domain in SES.

After making this change, the "Could not identify any recipients. Perhaps your test group is empty..." message vanished and a test mailing was received by all 17 contacts in the Test group.

---
Tags: wordpress, civimail, mailing, amazon-ses, aws
---


# Question
Title: How can I get Shoreditch theming in Backdrop?
I've noticed some of the styling doesn't come through on Backdrop when Shoreditch is installed. For example, when viewing a contact, the tabs do not stack on the left, as they do on Drupal 7.

# Answer
> 1 votes
I found that Backdrop does not add as many classes to the `<body>` by default, and adding this to the CiviCRM administrative theme's `template.php` goes a long way towards getting things styled as expected:

```
/**
 * Implements theme_preprocess_page().
 *
 */
function MYADMINTHEME_preprocess_page(&$variables) {
  $path = current_path();
  $path_parts = explode('/', $path);
  $segment = 'page-';
  foreach ($path_parts as $path_part) {
    $segment .= $path_part;
    $variables['classes'][] = $segment;
    $segment .= '-';
  }
}

```

Follow here:

---
Tags: backdrop, shoreditch
---