# Question
Title: DB Error: unknown error in unknown on line unknown During Member Report Export
CiviCRM v5.65.1 WordPress v6.3.1 Self Hosted with cPanel

The error I get when I go to Find Membership-Select X Members-Export (total number 16): Civi\Core\Exception\DBQueryException: DB Error: unknown error in /home/xxxxx/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 945

* DB\_Error: DB Error: unknown error in unknown on line unknown

Error Info: Code -1 Message DB Error: unknown error

Mode 16

**UserInfo**

CREATE TABLE `civicrm_tmp_d_export_2ee0d31f6054ecb9b46a1e8157fa15b4` ( id int unsigned NOT NULL AUTO\_INCREMENT, `civicrm_primary_id` varchar(64), `contact_type` varchar(64), `external_identifier` varchar(64), `display_name` varchar(128), `organization_name` varchar(128), `contact_sub_type` varchar(255), `first_name` varchar(64), `middle_name` varchar(64), `last_name` varchar(64), `do_not_email` varchar(64), `do_not_phone` varchar(64), `do_not_mail` varchar(64), `do_not_sms` varchar(64), `do_not_trade` varchar(64), `is_opt_out` varchar(64), `legal_identifier` varchar(32), `sort_name` varchar(128), `nick_name` varchar(128), `legal_name` varchar(128), `image_url` longtext, `preferred_communication_method` varchar(255), `preferred_language` varchar(5), `hash` varchar(32), `contact_source` varchar(255), `prefix_id` varchar(255), `suffix_id` varchar(255), `formal_title` varchar(64), `communication_style_id` varchar(255), `email_greeting_id` varchar(64), `postal_greeting_id` varchar(64), `addressee_id` varchar(64), `job_title` varchar(255), `gender_id` varchar(255), `birth_date` varchar(32), `is_deceased` varchar(64), `deceased_date` varchar(32), `household_name` varchar(128), `sic_code` varchar(8), `user_unique_id` varchar(255), `current_employer_id` varchar(64), `contact_is_deleted` varchar(64), `created_date` varchar(32), `modified_date` varchar(32), `addressee` varchar(255), `email_greeting` varchar(255), `postal_greeting` varchar(255), `current_employer` varchar(255), `location_type` varchar(255), `address_id` varchar(64), `street_address` varchar(96), `street_number` varchar(64), `street_number_suffix` varchar(8), `street_name` varchar(64), `street_unit` varchar(16), `supplemental_address_1` varchar(96), `supplemental_address_2` varchar(96), `supplemental_address_3` varchar(96), `city` varchar(64), `postal_code_suffix` varchar(12), `postal_code` varchar(64), `geo_code_1` varchar(32), `geo_code_2` varchar(32), `manual_geo_code` varchar(64), `address_name` varchar(255), `master_id` varchar(128), `county` varchar(64), `state_province` varchar(64), `country` varchar(64), `phone` varchar(32), `phone_ext` varchar(16), `phone_type_id` varchar(64), `phone_type` varchar(255), `email` varchar(254), `on_hold` varchar(64), `is_bulkmail` varchar(64), `signature_text` longtext, `signature_html` longtext, `im_provider` varchar(255), `im` varchar(64), `openid` varchar(255), `world_region` varchar(128), `url` varchar(255), `membership_type` varchar(128), `member_is_test` varchar(64), `member_is_pay_later` varchar(64), `membership_join_date` varchar(32), `membership_start_date` varchar(32), `membership_end_date` varchar(32), `membership_source` varchar(128), `membership_status` varchar(255), `membership_id` varchar(64), `owner_membership_id` varchar(64), `max_related` varchar(64), `membership_recur_id` varchar(64), `member_campaign_id` varchar(64), `member_is_override` varchar(64), `componentpaymentfield_total_amount` varchar(32), `componentpaymentfield_contribution_status` varchar(255), `componentpaymentfield_received_date` varchar(32), `componentpaymentfield_payment_instrument` varchar(255), `componentpaymentfield_transaction_id` varchar(255), PRIMARY KEY ( id ), INDEX index\_street\_address( street\_address ) , INDEX index\_household\_name( household\_name ) , INDEX index\_civicrm\_primary\_id( civicrm\_primary\_id ) ) ENGINE=InnoDB COLLATE utf8mb3\_unicode\_ci \[nativecode=1118 \** Row size too large (\> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.\]

**DebugInfo**

CREATE TABLE `civicrm_tmp_d_export_2ee0d31f6054ecb9b46a1e8157fa15b4` ( id int unsigned NOT NULL AUTO\_INCREMENT, `civicrm_primary_id` varchar(64), `contact_type` varchar(64), `external_identifier` varchar(64), `display_name` varchar(128), `organization_name` varchar(128), `contact_sub_type` varchar(255), `first_name` varchar(64), `middle_name` varchar(64), `last_name` varchar(64), `do_not_email` varchar(64), `do_not_phone` varchar(64), `do_not_mail` varchar(64), `do_not_sms` varchar(64), `do_not_trade` varchar(64), `is_opt_out` varchar(64), `legal_identifier` varchar(32), `sort_name` varchar(128), `nick_name` varchar(128), `legal_name` varchar(128), `image_url` longtext, `preferred_communication_method` varchar(255), `preferred_language` varchar(5), `hash` varchar(32), `contact_source` varchar(255), `prefix_id` varchar(255), `suffix_id` varchar(255), `formal_title` varchar(64), `communication_style_id` varchar(255), `email_greeting_id` varchar(64), `postal_greeting_id` varchar(64), `addressee_id` varchar(64), `job_title` varchar(255), `gender_id` varchar(255), `birth_date` varchar(32), `is_deceased` varchar(64), `deceased_date` varchar(32), `household_name` varchar(128), `sic_code` varchar(8), `user_unique_id` varchar(255), `current_employer_id` varchar(64), `contact_is_deleted` varchar(64), `created_date` varchar(32), `modified_date` varchar(32), `addressee` varchar(255), `email_greeting` varchar(255), `postal_greeting` varchar(255), `current_employer` varchar(255), `location_type` varchar(255), `address_id` varchar(64), `street_address` varchar(96), `street_number` varchar(64), `street_number_suffix` varchar(8), `street_name` varchar(64), `street_unit` varchar(16), `supplemental_address_1` varchar(96), `supplemental_address_2` varchar(96), `supplemental_address_3` varchar(96), `city` varchar(64), `postal_code_suffix` varchar(12), `postal_code` varchar(64), `geo_code_1` varchar(32), `geo_code_2` varchar(32), `manual_geo_code` varchar(64), `address_name` varchar(255), `master_id` varchar(128), `county` varchar(64), `state_province` varchar(64), `country` varchar(64), `phone` varchar(32), `phone_ext` varchar(16), `phone_type_id` varchar(64), `phone_type` varchar(255), `email` varchar(254), `on_hold` varchar(64), `is_bulkmail` varchar(64), `signature_text` longtext, `signature_html` longtext, `im_provider` varchar(255), `im` varchar(64), `openid` varchar(255), `world_region` varchar(128), `url` varchar(255), `membership_type` varchar(128), `member_is_test` varchar(64), `member_is_pay_later` varchar(64), `membership_join_date` varchar(32), `membership_start_date` varchar(32), `membership_end_date` varchar(32), `membership_source` varchar(128), `membership_status` varchar(255), `membership_id` varchar(64), `owner_membership_id` varchar(64), `max_related` varchar(64), `membership_recur_id` varchar(64), `member_campaign_id` varchar(64), `member_is_override` varchar(64), `componentpaymentfield_total_amount` varchar(32), `componentpaymentfield_contribution_status` varchar(255), `componentpaymentfield_received_date` varchar(32), `componentpaymentfield_payment_instrument` varchar(255), `componentpaymentfield_transaction_id` varchar(255), PRIMARY KEY ( id ), INDEX index\_street\_address( street\_address ) , INDEX index\_household\_name( household\_name ) , INDEX index\_civicrm\_primary\_id( civicrm\_primary\_id ) ) ENGINE=InnoDB COLLATE utf8mb3\_unicode\_ci \[nativecode=1118 \** Row size too large (\> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.\]

Exception Trace:

0 CRM\_Core\_Error::exceptionHandler(Object(DB\_Error)) /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php:945 1 PEAR\_Error-\>\__construct('DB Error: unknow…', -1, 16, Array, 'CREATE TABLE `ci…') /home/xxxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB.php:997 2 DB_Error->__construct(-1, 16, Array, 'CREATE TABLE` ci…') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php:575 3 PEAR::\_raiseError(Object(DB\_mysqli), null, -1, 16, Array, 'CREATE TABLE `ci…', 'DB_Error', true) /home/xxxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php:223 4 PEAR->__call('raiseError', Array) /home/xxxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/common.php:1928 5 DB_common->raiseError(-1, null, null, 'CREATE TABLE` ci…', '1118 \** Row size…') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/mysqli.php:943 6 DB\_mysqli-\>mysqliRaiseError() /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/mysqli.php:413 7 DB\_mysqli-\>simpleQuery('CREATE TABLE `ci…') /home/xxxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/common.php:1234 8 DB_common->query('CREATE TABLE` ci…') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:2696 9 DB\_DataObject-\>\_query('CREATE TABLE `ci…') /home/xxxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:1829 10 DB_DataObject->query('CREATE TABLE` ci…') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:487 11 CRM\_Core\_DAO-\>query('CREATE TABLE `ci…', false) /home/xxxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1650 12 CRM_Core_DAO::executeQuery('CREATE TABLE` ci…', Array, true, null, true, false) /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/SQL/TempTable.php:171 13 CRM\_Utils\_SQL\_TempTable-\>createWithColumns(' id int unsigned…') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/ExportProcessor.php:2114 14 CRM\_Export\_BAO\_ExportProcessor-\>createTempTable() /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:173 15 CRM\_Export\_BAO\_Export::exportComponents(true, Array, Array, '\`membership\_join…', null, null, 3, ' civicrm\_members…', null, 0, 0, Array, null) /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Export/Form/Select.php:297 16 CRM\_Export\_Form\_Select-\>postProcess() /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:624 17 CRM\_Core\_Form-\>mainProcess() /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php:144 18 CRM\_Core\_StateMachine-\>perform(Object(CRM\_Member\_Export\_Form\_Select), 'next', 'Next') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:43 19 CRM\_Core\_QuickForm\_Action\_Next-\>perform(Object(CRM\_Member\_Export\_Form\_Select), 'next') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 20 HTML\_QuickForm\_Controller-\>handle(Object(CRM\_Member\_Export\_Form\_Select), 'next') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 21 HTML\_QuickForm\_Page-\>handle('next') /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 22 CRM\_Core\_Controller-\>run(Array, null) /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 23 CRM\_Core\_Invoke::runItem(Array) /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 24 CRM\_Core\_Invoke::\_invoke(Array) /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 25 CRM\_Core\_Invoke::invoke(Array) /home/xxxxxxxxx/public\_html/wp-content/plugins/civicrm/civicrm.php:1199 26 CiviCRM\_For\_WordPress-\>invoke('') /home/xxxxxxxxx/public\_html/wp-includes/class-wp-hook.php:310 27 WP\_Hook-\>apply\_filters('', Array) /home/xxxxxxxxx/public\_html/wp-includes/class-wp-hook.php:334 28 WP\_Hook-\>do\_action(Array) /home/xxxxxxxxx/public\_html/wp-includes/plugin.php:517 29 do\_action('toplevel\_page\_Ci…') /home/xxxxxxxxx/public\_html/wp-admin/admin.php:259 30 {main}

# Answer
I've never actually seen a `utf8mb3` charset in the wild (it's the same as `utf8` but it never calls itself utf8mb3). I would probably:

* do a database backup
* Run the api System.utf8conversion to convert to `utf8mb4`. If the database is large, run it via command line e.g. `cv api3 System.utf8conversion`, otherwise you can also run it in the UI via api3 explorer with Entity=System Action=utf8conversion

utf8mb4 is the default on new installs now and definitely recommended over utf8. And it usually fixes this "row too large" error but even if it doesn't you want to be using utf8mb4.
> 1 votes

---
Tags: wordpress, error, core, pear
---


# Question
Title: Recipient loading failed in mailing after upgrade to 5.65.1
I am running Civicrm on Wordpress 6.3.1 and today I upgraded Civicrm from 5.58.1 to 5.65.1 successfully with no errors. Log output - \[info\] Running task: Finish core DB updates 5.65.1

I did notice some other warnings -

\[warning\] ManagedEntity update policy "unmodified" specified for entity type SearchDisplay which is not an APIv4 ManagedEntity. Falling back to policy "always"

\[warning\] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\Validator::run\]

\[warning\] Deprecated function CRM\_Utils\_Token::getTokenDetails, use If you hit this in mailing code you should use flexmailer - otherwise use the token processor. CRM\_Core\_Error::deprecatedFunctionWarning CRM\_Utils\_Token::getTokenDetails CRM\_Mailing\_BAO\_MailingJob::deliverGroup CRM\_Mailing\_BAO\_MailingJob::deliver Array ( \[civi.tag\] =\> deprecated )

///////////////////////////////////////////////////////////

I am not sure if my issues below is related to the above warnings.

#1. I was testing mailings after the upgrade I have noticed that the recipient field was empty (but showing the number of recipients {3 in this case} for a previous *draft* email). The error that I am getting is "Loading failed" when trying to select another group of recipients.

#2. I tried a new mailing and I get the same error "Loading failed" and am unable to select any group recipients.

In case #1 above the mail does get sent to the recipients.

I have attached a screen shot.

I am running Flexmailer.

Any help would be appreciated

Many Thanks

# Answer
It sounds like you may have a non-core version of Flexmailer in the mix (like Flexmailer 1.1.1 instead of Flexmailer 5.65). See this past question for instructions to remove.

Per the previous question, the steps are disable Mosaico, then Flexmailer. Delete the Flexmailer directory. Clear the caches. Enable the new Flexmailer, then Mosaico. Perform database upgrades if a message tells you to.
> 1 votes

# Answer
I have the same error since upgrading to 5.64.4 on one site (Joomla not WP). FlexMailer info.xml states it's 5.64.4 so not sure it's the same cause, but definitely the same 'loading failed' error in CiviMail.

The console gives me a 500 error on this URL when trying the lookup: `https://www.---.org/administrator/?option=com_civicrm&task=civicrm/ajax/api4/EntitySet/autocomplete&params={"input":"","page":1,"formName":"crmMailing.479","fieldName":"Mailing.recipients_include"}&_=16951239190`.

This makes it sound similar to this error: https://lab.civicrm.org/dev/core/-/issues/3587 \- but I have other API4 calls working ok, it seems (e.g. contact lookup).
> 0 votes

# Answer
I have had the same problem for the last few months. Flexmailer is up to date. I tried disabling it, but it's showing as "Required", and cv won't let me disable it either. Is this normal?

At the "Loading failed" error, the console shows a 500 error on GET https://domain.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fajax%2Fapi4%2FEntitySet%2Fautocomplete&params=%7B%22input%22%3A%22%22%2C%22page%22%3A1%2C%22formName%22%3A%22crmMailing.628%22%2C%22fieldName%22%3A%22Mailing.recipients\_include%22%7D&\_=1695635330283

Any suggestions as to what could be causing this? Thanks.
> 0 votes

---
Tags: wordpress, upgrade, groups, mailing
---


# Question
Title: How can I use Address Proximity as a search critieria in FormBuilder?
Is it possible to build a search form in FormBuilder that allows for Address Proximity search? If so, what am I missing to make it work?

When building a search form with FormBuilder, I see that "Address Proximity" is available as a field to be added to the form. However, I can't seem to make it work as an actual search criteria. Here's what I'm doing:

First I add the field to the form in the builder:

It's odd that it appears as a label with no field, and perhaps more odd that the settings for this field show a blank value for Type:

(I've tried specifying each of the various Type options, such as Select, Checkbox, etc., but none of them result in form fields that would be useful for proximity searching.)

I save that form and open the page, and still I see just the label with no field (or else some useless-in-this-context field such as a yes/no select, etc., depending on the Type option I manually specified):

For what it's worth, I have verified that geocoding (via Google) is working fine on this site.

# Answer
> 2 votes
The proximity filter uses a specialized field type which hadn't been defined in Afform.

I've posted a Pull-Request to fix this: https://github.com/civicrm/civicrm-core/pull/27631 (should be included in the CiviCRM 5.67 release).

---
Tags: formbuilder
---


title: Split a large mailing list into 2

text:
# Question
Title: Split a large mailing list into 2
I see the "Split Group" extension isn't available anymore. I have a group that I am mailing to that has 74,000 emails. My team would like to split this into 2 mailing lists due to how long it takes us to send this many emails. Any ideas?

# Answer
Simplest is just to do an A/B test, set both to 50% of the total and then pause the second one and restart it whenever you want.

If you really need to split the group, I use SearchKit to create two smart groups, both with members of whatever group you want the email to go to, then also one with Email (Primary) matches pattern something like `^[AC457JMSOWZL]` and the other doesn't match pattern with the same pattern. This is a regular expression that matches any email that starts with one of those characters, so you can adjust the exact pattern to get closer to half, but that's fairly close on our list.

Bit awkward, but it works. Using the email to split the list should avoid double-emailing issues if you have two contacts who share an email, so they won't end up in different groups. You can also exclude the first mailing recipients from the second one, just as a belt and braces approach to make sure you aren't emailing anyone twice.

If it's just the time of day when these are delivered that's the issue, you can also send the mailing and just pause it and restart the next day or whatever you want to do.
> 1 votes

---
Tags: email, groups, mailing
---


# Question
Title: CiviCRM mysteriously erased membership end dates, how do I fix?
I recently uploaded some 2800 members from a spreadsheet. Some did not have membership start dates. I have CiviCRM with Wordpress, latest versions.

I wanted to mark all members with radio buttons for print and for emails, depending on how they want to receive their magazine. So I downloaded all the members, separated them by contact type and prepared to re-upload with the appropriate print and or email radio buttons.

Fortunately, I ran a test on 15 expired household members. 7 of these had no start date, and since the upload requires a start date I simply pasted in their member since date.

Guess what? When I ran the upload on the 15 test members it erased the end date for the 7. So now these 7 expired members are marked as current. And the system won't let me reenter their expiration dates. I get an error message, Member Status. Please enter a status that does NOT represent a current membership status. But of course I can't enter status because the system generates status.

So now I'm stuck. I want to update the radio buttons, which it looks like I can do only for members who already have both a start date and an end date. Maybe.

# Answer
You first want to distinguish "contact" from "membership", those are two different things (where "thing" is sometimes called an "entity"). A membership is a 'related thing' of a contact, think of it like the membership card, not all the information about the contact themselves.

It sounds like you uploaded contact and membership information at the same time, which CiviCRM lets you do, but you don't need to redo that for your update.

Specifically, the 'print vs email' preference is probably something that applies to the contact, not the membership (it's a preference of the person, not of their membership).

If so, just upload (even the same csv file) as contact import and map the print/email field just like you did when uploading it as contacts.
> 2 votes

# Answer
@polly I think the issue may revolve around the use of 1) Lifetime memberships versus 2) Rolling yearly 3) versus Fixed yearly.

The error you report happened when I tried to convert a yearly subscription to a lifetime subscription, and trying to convert it back.

No lifetime membership will accept an end date, period. That is the nature of a lifetime membership, I suppose. In other words, by necessity lifetime membership types have a blank end date. Trying to input otherwise produces the error you saw.

Is this helpful?
> 1 votes

---
Tags: issues, status
---


title: Modify IBAN in CiviSEPA mandate

text:
# Question
Title: Modify IBAN in CiviSEPA mandate
Anybody knows whether there is a way we can modify IBAN numbers for an active mandate? Via bankswitching.be we receive a notice of a changed bank account, but CiviSEPA does not offer a way to modify the IBAN for an existing mandate. I see it is possible via the API, but if possible I would avoi needing to create a different interface. Thank you !

# Answer
CiviSepa allows certain changes to a mandate via the UI (at least if you allow changes in the SEPA-Settings - check /civicrm/admin/setting/sepa?reset=1).

When viewing a SEPA-Mandate you should have a button to change the amount of a mandate. This is (afaik) the only value that will actually change the existing mandate.

There should also be a button to update/change the mandate which will bring up a mask prefilled with the existing mandate's values that allows you to do all kind of changes.

However, technically this will end the old mandate and create a new one. I think it was designed that way because changing the IBAN or other details of a mandate (instead of creating a new one, including a new unique mandate reference) is not allowed by the SEPA-standard or at the least considered to be bad practice.
> 1 votes

---
Tags: civisepa
---


# Question
Title: In email report, distinguishing between machine opens / human opens?
In the last few years, since Apple instituted its Privacy tools, many eCRMs have added a feature to exclude automated/machine opens from the true open rate. (For context, starting in 2021, Apple essentially triggers all tracking pixels sent to an email address that uses iOS or Apple Mail, in an effort to reduce behavioral tracking. More here and easily Googleable.)

Anecdotally, I have seen email open rates in the last year that are much higher than ever before (50% vs 20% or so before), which I assume isn't really because my audience is more engaged -- it's likely because of this change in email clients' behavior.

Is there a way to **identify a true open rate using CiviCRM?** I haven't gotten into the weeds about how other CRMs accomplish this, but I imagine it's not terribly challenging to identify which opens are machine opens. If it's not a feature available, maybe there's a way to do it via creative searching/grouping?

# Answer
> 1 votes
If an email client defeats Civi's tracking, then it's probably defeated .

As the article you linked to says:

> it’s looking like open rates may soon be a relic of the past.

Filtering out these machine opens is just another way of admitting defeat, it doesn't actually give you accurate stats, just replaces them with a question mark.

However, Civi does provide link tracking, so if your email includes enticing links for users to click on, you can still track their engagement that way.

---
Tags: civimail, email
---


title: Show Afform in a popup

text:
# Question
Title: Show Afform in a popup
I am trying to embed a link to the case view, which should show an afform in a popup. Using the hook `civicrm_alterContent` I can embed the link using a simple .tpl file with the following content:

```
{crmScope extensionKey='my-test-extension'}
<a id="myCustomLink" class="crm-hover-button action-item popup" href={crmURL p="civicrm/my-searchKit#?id=`$caseId`"}><i class="fa fa-archive" aria-hidden="true"></i> {ts}My custom link{/ts}</a>
<script type="text/javascript">
  {literal}
  CRM.$(function() {
    let myCustomLink = CRM.$('#myCustomLink').detach();
    CRM.$('div.case-control-panel').children('div').eq(1).children('p').first().append(myCustomLink);
  });
  {/literal}
</script>
{/crmScope}

```

The custom link is properly added and a popup shows up showing the afform, however the rendering of the form does not work properly and url-filter do not work. The resulting popup looks as following

An answer in this question does suggest, that this is supposed to work: Why won't CRM.loadForm render url containing civicrm/a/#?

# Answer
I'm not sure the context exactly, but your code looks functional, although you're using a lot of deprecated javascript syntax (`cj` instead of `CRM.$`, `var` instead of `let`, hardcoded href instead of `{crmUrl}`, to be fair a lot of Civi's code still looks like this and hasn't been updated yet, so I can see where you got your inspiration from ).

Anyway, to your 2-part question:

1. "rendering of the form does not work properly" - Based on your screenshot I think bootstrap.css isn't being loaded. You can fix this by calling `Civi::resources()->addBundle('bootstrap3');`.
2. "url-filter do not work" - Well, in your code example I don't see you passing in any url filter, so I wouldn't expect it to work! Try changing your href to something like `"admin.php?page=CiviCRM&q=civicrm/my-test-afform#?Individual1=123"` or whatever filter you need. It should work.
> 1 votes

---
Tags: formbuilder
---


# Question
Title: Uploading file from Drupal webform to Civi file field
Using Drupal 9 webform to upload a file and attach to Civi contact. (This has worked well for D7 and Civi.)

D9 will not render the file upload element unless there is a private folder in Drupal. But then the uploaded file is not attached to Civi contact (using custom file field in Civi) but rather stored in Drupal private folder.

Is there a way to do this with D9 as it has worked for D7?

# Answer
> 2 votes
As mentioned in comment, I was able to get it to work as expected/desired by creating a webform that started with only a Name and the elements to link file to the Civi contacts. Then I recreated the rest of the webform elements and dropped a document element. Again, not sure if the document element was the problem or some other change with the new webform creation.

# Answer
> 1 votes
There is a way, at least if you are using the webform integration based on form processors and CMRF (and not the "built in CiviCRM \<-\> Webform" integration - not sure if it works there).

* Create a form processor input oft the type "file"
* Create a form processor action "Upload file to a custom field"

This allows the form processor to "fetch" any file if provided with an url and store it in CiviCRM. The problem is that drupal stores files in the private file system so the form procressor is not allowed to fetch the file by default.

You can work around that problem by submitting an url that contains an authorization token from Drupal to the form processor:

* Create a corresponding file field in Drupal Webforms
* In Drupal Webform configuration, navigate to the file field's settings for the submission display
* in the dropdown, choose "custom"
* in "Item format custom HTML" enter:

> `<a href="{{ item.url }}?token={{ token }}" target="_blank">{{ item.name }}</a>`

This should pass an url to the form processor which allows it to "fetch" the file. I am not 100% sure if some global webform-settings or Drupal permissions need to be adapted as well but I think not.

All of this can be a bit hard to set up and debug but it should work. Make sure you have the latest releases of all components (Formprocessor, CMRF, Webform...).

---
Tags: webform-civicrm, files, upload
---


# Question
Title: Display Total Membership in Wordpress home page
We are running Wordpress 6.3.1 and Civicrm 5.65.1

We would like to dynamically display the Total Member count on our Wordpress home page. We have different member categories and would like to display this as a total only.

Is there an easy way to do this? Any help would be greatly appreciated.

Thanks

# Answer
> 2 votes
You can create a Search kit to display number for Memberships and use shortcode to display on pages or widget

Search kit import:

```
[
  [
    "SavedSearch",
    "save",
    {
      "records": [
        {
          "name": "Member_count",
          "label": "Member count",
          "form_values": null,
          "mapping_id": null,
          "search_custom_id": null,
          "api_entity": "Membership",
          "api_params": {
            "version": 4,
            "select": [
              "COUNT(id) AS COUNT_id"
            ],
            "orderBy": [],
            "where": [
              [
                "status_id:name",
                "IN",
                [
                  "New",
                  "Current"
                ]
              ]
            ],
            "groupBy": [
              "Membership_MembershipType_membership_type_id_01.member_of_contact_id"
            ],
            "join": [
              [
                "MembershipType AS Membership_MembershipType_membership_type_id_01",
                "LEFT",
                [
                  "membership_type_id",
                  "=",
                  "Membership_MembershipType_membership_type_id_01.id"
                ]
              ]
            ],
            "having": []
          },
          "expires_date": null,
          "description": null
        }
      ],
      "match": [
        "name"
      ]
    }
  ],
  [
    "SearchDisplay",
    "save",
    {
      "records": [
        {
          "name": "Member_count_Grid_1",
          "label": "Member count Grid 1",
          "saved_search_id.name": "Member_count",
          "type": "grid",
          "settings": {
            "colno": "3",
            "limit": 0,
            "sort": [],
            "pager": false,
            "columns": [
              {
                "type": "field",
                "key": "COUNT_id",
                "dataType": "Integer",
                "rewrite": "[COUNT_id] Members"
              }
            ],
            "placeholder": 0
          },
          "acl_bypass": false
        }
      ],
      "match": [
        "name",
        "saved_search_id"
      ]
    }
  ],
  [
    "Afform",
    "save",
    {
      "records": [
        {
          "name": "afsearchMembers",
          "requires": [],
          "title": "Members",
          "description": "",
          "is_dashlet": false,
          "is_public": false,
          "is_token": false,
          "permission": [
            "access AJAX API"
          ],
          "type": "search",
          "entity_type": null,
          "join_entity": null,
          "contact_summary": null,
          "summary_contact_type": null,
          "icon": "fa-list-alt",
          "server_route": "",
          "redirect": null,
          "create_submission": false,
          "navigation": null,
          "layout": "<div af-fieldset=\"\">\n  <crm-search-display-grid search-name=\"Member_count\" display-name=\"Member_count_Grid_1\"></crm-search-display-grid>\n</div>\n"
        }
      ]
    }
  ]
]

```

Shortcode:

```
[civicrm component="afform" name="afsearchMembers"]

```

---
Tags: wordpress, civimember, civireport, database
---


# Question
Title: Is there a better way to handle Smarty template tag errors?
Occasionally our staff users will screw up the tokens in mail; things like {event title} instead of {event.title}

When this happens in a scheduled reminder it causes the reminder to not go out and also seems to cause some other reminders to not go out. Some still go out, but it seems like a bunch don't... I haven't worked that one out yet. They are also really hard to track down. We are alerted that there was an error on the status page, what the failed token is but not what template caused the error. The only way I've figured out how to find them is to go through the civicrm\_action\_schedule table to find the bad token.

My question though is whether there is a way of having the smarty template process fail without stopping the email from going out. That is, I'd rather have the mail go out with "{event title}" than not go out at all. I'm not sure if this is really a Civi thing or. smarty thing though.

# Answer
This behaviour is a choice and could be changed. See the error handler here. If you want to propose a change of this behaviour (which I think would be a good idea, we should log a warning, but not fail completely), you can do that at https://lab.civicrm.org/dev/core/-/issues/new
> 1 votes

---
Tags: smarty
---


# Question
Title: Can I change settings for a custom field set for participants without losing any data?
I have a custom field set that is currently configured to be used for participants. When it was set up it was configured to be targeted to just a couple of events. We now want to make this field set available for any event.

When I go into the settings for the custom field set and click on "Any" in the field labelled "Used for Participants (Event name)" Civi throws up a big warning message:

"Warning: You have chosen to remove one or more subtypes. This will cause any custom data records associated with those subtypes to be removed as long as the contact does not have a contact subtype still selected."

In practice I don't think I am removing anything, and in any event I don't actually understand what this warning means, but I can see why the alert is there.

So my question is: "Can I select the 'Any' option in this field - and by so doing deselect those specific events that were previously selected - without deleting any records?

# Answer
> 2 votes
Yes, you are safe to change the Custom field type to any. There won't be any data loss. To be on safer side please take backup of DB and try.

# Answer
> 0 votes
I would try this on a development installation and see what happens. I would expect that you would keep all data but the message is a bit hazy.

# Answer
> 0 votes
@graham - do you remember what came of this? I am getting the same scary warning when trying to **add** two new activity types in the settings for an old custom field set. I'm on Civi 5.65.2.

---
Tags: custom-fields, participants
---


title: Upgrade to CiviCRM 5.65.2

text:
# Question
Title: Upgrade to CiviCRM 5.65.2
Upgrade from CiviCRM 5.60 to 5.65.2 with no annunciated errors or warnings, including db updates. I am using Drupal 7.98. Now getting this warnings in civi status:

Warning: Declaration of com\_clickandpledge\_payment\_clickandpledge::doTransferCheckout(&$params, $component) should be compatible with CRM\_Core\_Payment::doTransferCheckout(&$params, $component = 'contribute') in require\_once() (line 52 of /home/resoluter/public\_html/t1/sites/all/modules/civicrm/Civi/Payment/System.php).

I have fixed this type of error before but this time, I am not able to find the offending declaration after extensive searching. How can I find the offender? Thanks

# Answer
> 1 votes
There is a perennial problem with the Joomla upgrader: When it updates a plugin it doesn't clean up old files. So old obsolete files can linger instead of being deleted, causing errors.

I'm not sure if that's the exact cause of this problem, but I wanted to flag if to you as a general preventative measure: always delete a plugin's directory before upgrading the component, because Joomla won't do it for you.

---
Tags: drupal, upgrade
---


title: SMS Text Messaging Stopped Altogether

text:
# Question
Title: SMS Text Messaging Stopped Altogether
We are using CIVICRM 5.463.

We have Twilio SMS set up and it did work great for a period of time but now has stopped working for individual and group texts.

The send outbound SMS cron job is completing successfully.

When you send the message, CIVICRM displays the message that the text was sent successfully.

Yet no texts are being received by anyone. The process ceased to work about 2 weeks ago. No technology changes coincides with this timeframe.

Any ideas where I should look to figure out the issue?

# Answer
This is likely related to the A2P 10DLC requirement effective September 1, 2023. You can check the error log to confirm it is 30034 error in Twilio at Monitor \> Logs \> Error Logs. If the texts are being delivered from CiviCRM to Twilio than it is a Twilio issue.

You can follow the instructions here to registration your brand. This is to combat SMS spam. Essentially, SMS reputation rules are finally catching up with email.

FWIW, Twilio has made this *a lot easier* now that it effects all organizations as it can be done all in the UI and is well-documented than a couple years ago when it was a requirement for political orgs and special use cases and could only be done in CLI.
> 2 votes

---
Tags: sms, twilio
---


# Question
Title: "malformed locale" error when merging document
We're using CiviCase as a project tracker and document generator. It has been working fine, but I had to recently move the site to a new server. The directory structure, domain, database all stayed the same, but it's a new OS install on a new VPS. When we run "Print/Merge Document" on the "Manage Case" page, the task fails with the error "Cannot instantiate malformed locale: EN". There is a little more info in the CiviCRM log, but it doesn't tell me anything more that I can make sense of. I assume there is some issue with the php or system locale, but I can't figure out what.

Any thoughts?

CiviCRM log:

```
Oct 02 16:21:24  [error]
$Fatal Error Details = array:3 [
  "message" => "Cannot instantiate malformed locale: EN"
  "code" => null
  "exception" => CRM_Core_Exception {#11809
    -errorData: array:1 [
      "error_code" => 0
    ]
    #cause: null
    -_trace: null
    #message: "Cannot instantiate malformed locale: EN"
    #code: 0
    #file: "/var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/Locale.php"
    #line: 177
    trace: {
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/Locale.php:177 {
        Civi\Core\Locale::negotiate(string $preferred): Locale
        › if (!preg_match(';^[a-z][a-z]_[A-Z][A-Z]$;', $preferred)) {
        ›   throw new \CRM_Core_Exception("Cannot instantiate malformed locale: $preferred");
        › }
      }
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Subscriber/I18nSubscriber.php:61 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:251 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:73 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php:260 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php:249 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php:157 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/AbstractAction.php:249 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/MessageTemplate.php:484 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/MessageTemplate.php:345 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/MessageTemplate.php:271 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Task/PDFTrait.php:240 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:612 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:98 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:292 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm.php:1199 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-includes/class-wp-hook.php:310 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-includes/class-wp-hook.php:334 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-includes/plugin.php:517 { …}
      /var/www/civi.waccglobal.org/wordpress/wp-admin/admin.php:259 { …}
    }
  }
]

Oct 02 16:21:24  [debug] $backTrace = #0 /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /var/www/civi.waccglobal.org/wordpress/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke((Array:4))
#3 /var/www/civi.waccglobal.org/wordpress/wp-includes/class-wp-hook.php(310): CiviCRM_For_WordPress->invoke("")
#4 /var/www/civi.waccglobal.org/wordpress/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters("", (Array:1))
#5 /var/www/civi.waccglobal.org/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action((Array:1))
#6 /var/www/civi.waccglobal.org/wordpress/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#7 {main}

```

We're running on WordPress 6.3.1 on Debian 12 (bookworm). CiviCRM version 5.63.2. Yes I do need to upgrade. However, experience has shown I should fix errors before doing so.

# Answer
> 1 votes
Ah that does help. It's likely one of the contacts has a malformed preferred\_language on their contact where it has EN instead of en\_SOMETHING.

From https://github.com/civicrm/civicrm-core/blob/c3a9a0894c3702d961d4bcaf61a3404e66c56371/CRM/Core/BAO/MessageTemplate.php#L343

You can run a query on the database like `SELECT id FROM civicrm_contact WHERE preferred_language = 'EN'` to find the contact id.

---
Tags: civicase, printmerge
---


# Question
Title: Does FG Joomla to wordpress plugin import static pages such as About us, Services?
I have been trying to migrate my website from joomla to wordpress using the FG Joomla to wordpress plugin. It only migrate post, categories and media only. Does it also import static pages e.g home, about or services page. I have played around with the behavior settings nothing seems to work. Anyone with ideas on how to solve this issue.

# Answer
> 0 votes
If the pages are managed by native Joomla, they will be imported by the plugin. If they are managed by a third-party plugin, you may need an add-on to import them. You should contact the support team at https://www.fredericgilles.net/support/

---
Tags: wordpress, joomla, migration
---


# Question
Title: I am trying to do a Membership Import from a spreadsheet (.csv file). All imports fail with the message "No matching Contact found for (email add.)"
I am trying to do a Membership Import from a spreadsheet (Members.csv) with the following columnns: Membership Type | MEMBERSHIP # | DATE OF PURCHASE | AMOUNT PAID | FIRST NAME | LAST NAME | Mailing ADDRESS | POSTAL CODE | Summer Residence | Primary phone # | Secondary phone # | EMAIL | Topics of Interest | Notes | RECEIPT NUMBER

I created a 2nd spreadsheet to establish the contact data for each member (ContactList.csv) with the following columns: FIRST NAME | LAST NAME | Primary phone # | Secondary phone # | EMAIL with the same Email address as in the Members.csv file. I added all these contacts using the Contacts \> Import Contacts dialog and the ContactList.csv file.

I then tried the Memberships \> Import Memberships dialog, using the Members.csv file. On selecting "Import Now" I see the following:  On viewing the Import\_Errors.csv file, I see all 47 rows of the table have the "Reason" as
"No matching Contact found for (email address)" Why? The same email address exists in the Contacts table. How can I Import members if there is no way to establish a connection with the Contacts table? I am missing something, but am unsure what. We are running CiviCRM 5.64.3.

Any help will be much appreciated.

Brad Nickerson

# Answer
> 1 votes
Kudos to LarsSG: having "Email (Unsupervised)" in "dedupe rules" works indeed. Contact ID is required in case if all Dedupe Rules fail. In this case, first thing would be to Export existing contacts: not all PRIMARY fields, only Contact ID and Email. Then do some concatenating Excel magic ("vlookup" works too, thanks to peterdnz comment below) and Import results back.

---
Tags: civimember, error, import
---


# Question
Title: Historical Membership Count reports based on Calendar Year
We are using CiviCrm 5.65.1.

We would like to extract historical membership counts for certain time periods in the past say CAlendat Year 2014, 2015 etc.

The typical membership status that we have are New, Current, Grace, Expired, Pending Cancelled, Deceased and Resigned.

New members join and have differing membership expiration dates. One complication is that we have a membership category of "Life" with a membership expiration date of 2100 and in some cases blank.

Question - what would be the easiest way to obtain this count on a historical calendar basis.

# Answer
There are at least two ways of calculating historical membership numbers:

1. The membership dashboard uses the activities that are generated when a membership is created/renewed/expired.
2. The membership churn chart extension uses some sql based on just the membership records.

In the real world, neither of those are always the whole story, it depends on how you manage your memberships (e.g. restarted expired memberships, etc.)

I'd start with the churn chart extension, and take a look at the sql if the numbers look like what you want.
> 1 votes

---
Tags: wordpress, civireport, reports, searchkit
---


title: Can Not Run Reports

text:
# Question
Title: Can Not Run Reports
Nothing has changed, that I know of, since yesterday. Same browser, same everything. All of a sudden today I am unable to run reports and get the following message: " Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.
Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.
Error type: Could not find a valid session key."

I do have cookies enabled. I have cleared my browser cache, made sure cookies are enabled. I have not changed any settings. I could run reports yesterday but am completely unable to do it today. Any suggestions?

# Answer
We finally figured it out.

We use Jupiter X as our WordPress theme, and Jupiter X recently decided to make SellKit required plug in. Once we deactivated that, reports started working again. Hopefully that requirement is only a suggestion.

So I guess SellKit was interfering.

Thanks for your original answer Coleman!
> 2 votes

# Answer
Try clearing caches. Do one or all of the following:

1. In the menubar, go to **Administer -\> System Settings -\> Cleanup Caches & Update Paths** and click the "Cleanup Caches" button.
2. On the command line `cd path/to/civicrm` and then `cv flush`.
3. Delete the contents of the `templates_c` directory.
> 1 votes

---
Tags: error, reports, cookies
---


# Question
Title: How can I add options to the ckeditor5 toolbar? Such as Justification and other standard options
Using Drupal 9 and Civi 5.63.3. Options for justifying text are missing. Various documentation and answers mention a ckeditor config options but not showing

# Answer
you can config as below

Administer -\> Customize Data and Screens -\> Display Preferences

In the page you should see Wysiwing Editor - Select CKEditor - which will give you the option to config

**Ref: Please click the link below - this is from demo site https://dmaster.demo.civicrm.org/civicrm/admin/ckeditor?reset=1**

Please find the screenshot attached

I hope this helps !!!
> 0 votes

---
Tags: ckeditor5
---


# Question
Title: With upgrade to 4.7.17, I get "invalid price fields" warning
Since the upgrade to 4.7.17 (from 4.7.15) I get a popup warning about invalid price fields. The fields are about memberships, but we don't use the membership component. I would like to delete those fields, but I don't see any associated price set and there is no option to delete the fields. At a minimum I would like to hide this warning but I don't see how to do that either. Any suggestions?

```
Invalid Price Fields
the following Price Set Fields use disabled or invalid financial types and need to be fixed if they are to still be used.

Price Set   Price Set Field Action Link
Membership Amount   Membership Amount   View Price Set Fields
Member Signup and Renewal   Membership  View Price Set Fields

```

# Answer
While the hacky way above works in 2023, there is one more possible solution without hacking the DB: please ensure related Membership/Event/Contribution Price Set exists. So if the lost price field is from a Membership Price Set, please create the set, even without fields - the error will be gone.
> 0 votes

# Answer
Found a hacky solution. In phpmyadmin, in the civicrm\_price\_set table, I changed the "is\_reserved" field from 1 to 0. At that point, the price field could be deleted in the UI, and all seems to be well.
> 3 votes

---
Tags: wordpress, price-sets
---


# Question
Title: How to calculate number of days to/from a date
In a SearchKit query I'm looking to add a column that tells me the **number of days from today to/from a date field**. Basically datediff() from today.

* If the date is in the future, say tomorrow, the column would show 1 (positive).
* If the date is in the past, say yesterday, the column would show -1 (negative).

I tried the following options in Field Transformation...

* *"Days to Anniversary"*: doesn't work if the date is more than a year away, and also doesn't work for comparing today to a date in the past (to give the negative number of days).
* *"Days between two dates"*: there doesn't seem to be a way to set today's date as a comparison option;

I'm able to add a column "Current Date" from the Extras section, but I don't see a way to use it in the Field Transformation.

Appreciate any ideas.

# Answer
You can use the field transformation and choose days between two dates.

Code:

```
[
  [
    "SavedSearch",
    "save",
    {
      "records": [
        {
          "name": "testdays",
          "label": "testdays",
          "form_values": null,
          "mapping_id": null,
          "search_custom_id": null,
          "api_entity": "Contact",
          "api_params": {
            "version": 4,
            "select": [
              "id",
              "DATEDIFF(CURDATE(), birth_date) AS DATEDIFF_birth_date_created_date",
              "birth_date"
            ],
            "orderBy": [],
            "where": [
              [
                "contact_type:name",
                "=",
                "Individual"
              ],
              [
                "birth_date",
                "IS NOT EMPTY"
              ]
            ],
            "groupBy": [],
            "join": [],
            "having": []
          },
          "expires_date": null,
          "description": null
        }
      ],
      "match": [
        "name"
      ]
    }
  ]
]

```
> 3 votes

# Answer
I think it would be a good to raise as an issue on https://lab.civicrm.org/dev/core/-/issues/new to discuss making the current date (and other Extra fields) available for use in Field Transformations.

For now, I think you could do this as a re-write using Smarty in a SearchDisplay with your date field and the current date field. See some details here.
> 1 votes

---
Tags: searchkit, dates
---


# Question
Title: Is the previous basic search available in 5.66?
After installing 5.66 on test, the previous basic search (Search/Find Contacts) has been replaced by the new Search Kit basic search, which is good. However as a bug re. ACLs hasn't been fixed (this one) I'd like to temporarily stay with the old search until it is fixed. AFAIK this doesn't seem possible - if you disable/uninstall the new SearchUI extension the old search doesn't function. Is this by design - the old search is removed, or is there some way to get back the old basic search?

# Answer
Currently, replacement of search pages is entirely optional. Disabling the Search UI extension will restore the original searches (you may need to clear caches after doing so).
> 2 votes

# Answer
Yes, the previous search is available in 5.66 - the fact that I can't get it to work must be something to do with the extensions I have installed. I've just installed a new, clean version of 5.66 and the previous search works there & seems to be the default. When I figure out the full answer I will expand this. See Coleman's reply below - I uninstalled SearchUI extensions and now I have the previous search.
> 0 votes

---
Tags: searchkit
---


title: How to remove Grants component

text:
# Question
Title: How to remove Grants component
I have a site with the Grants component that it does not need. I could not find where to disable it.

Is there a way to remove the Grants component?

# Answer
Assuming you are using a recent version of CiviCRM...

The Grants component comes with CiviCRM but you can do the following:

* if you navigate to Administer\>System Settings\>Extensions you should see an extension called CiviGrant. You can disable this extension
* to remove the option Grants from your menu, navigate to Administer\>Customize Data and Screens\>Navivation Menu. Then right-click on the Grants item, you should get a **delete** option. This will just remove the menu item from your menu

Does that answer your question?
> 1 votes

# Answer
Not an answer - a question: the CiviGrant extension is installed and present in the native extensions list in a state where there is only link says 'Install'. There is no Enable and Uninstall links as there is for CiviPledge for example. How then does one remove CiviGrant? There are some reports that CiviGrant must be removed for Mosaico email extension to install properly.
> 0 votes

---
Tags: civigrant
---


title: Add new custom field column

text:
# Question
Title: Add new custom field column
I've created a custom field that saves **"Registration"** in a contact type in CiviCRM. I would like to display this custom field in a new column in the search results. Installing in WordPress allows me to modify the plugin file, but I have had some errors when trying to add the code snippet.

```
$headers['summary'] = array('name' =>

```

# Answer
> 4 votes
If you're talking about the contact basic and advanced search results, you can add the field to a profile and set that to be used at `Administer > Customise Data and Screens > Search Preferences > Default Contact Search Profiles`

---
Tags: wordpress, profile, civicrm.settings.php, admin
---


# Question
Title: How can I update the old Twitter logo on Mosaico to the new X icon?
I need to update the Twitter logo on the socials block on Mosaico, but I can't see where to edit this to the new X logo instead? Any advice?

# Answer
> 3 votes
I put in an issue for the mosaico people to update their logos. However, they are not very friendly or responsive.

Temporarily you can replace the icons in the folder, just keep the same file name - assuming you are using latest mosaico, go here: /civicrm/ext/uk.co.vedaconsulting.mosaico/packages/mosaico/templates/versafix-1/img/icons and keep it 96px

* tw-black-96.png
* tw-bw-96.png
* tw-bwb-96.png
* tw-colors-96.png
* tw-coloured-96.png
* tw-rdbl-96.png
* tw-rdcol-96.png
* tw-rdw-96.png
* tw-sqbw-96.png
* tw-sqbwb-96.png
* tw-sqcolors-96.png
* tw-sqrdbl-96.png
* tw-sqrdcol-96.png
* tw-sqrdw-96.png
* tw-white-96.png

If a dev in the civi community could run the script for us, that would be ideal. Then we could have a common icon set for patching.

Note: As jon indicated, you would have to repatch with every mosaico update.

---
Tags: mosaico
---


title: Email drip campaign with CiviRules

text:
# Question
Title: Email drip campaign with CiviRules
We are interested in creating periodic emails for contacts in specific groups.

* If the contact is in group X, then every month, they should receive the next email in the flow.
* At the end of the set of emails, optionally, the flow should start over.

We typically use Chasse for our drip email campaigns, but Chasse only supports having a user in one journey at a time. This doesn't work for us because our users are often in multiple email campaigns at once based on courses they enroll in.

We are currently considering building these flows in CiviRules. I'm surprised to find there isn't an example of this in the documentation.

Does anyone have example CiviRules implementations for periodic e-mails / e-mail campaigns using CiviRules?

Thank you!

# Answer
Instructions:

* Install the Email API extension (it's available for in-app install)
* In CiviRules, you'll set the trigger to whatever you like (e.g. "Contact is added to group") with the appropriate condition (e.g. "Group is 'New Donors'").
* Create your mailing templates (**Mailing menu » Message Templates**).
* In your CiviRule, add a "Send an Email" action for each email in the campaign, setting the appropriate template for each.
* Finally, when editing the CiviRule, there will be an **Edit Delay** link next to each action. Set these as appropriate for each email (e.g. one with no delay, one in 3 days, one in 10 days).
> 2 votes

# Answer
Reading your first 2 bullets, I was going to suggest Chasse. I think it was a design decision of Chasse not to allow multiple concurrent journeys but if you have a compelling use-case and it does most of what you need then a PR (or fork) would be an option.
> 0 votes

---
Tags: email, civirules
---


title: Unsure how to install Open Sans font

text:
# Question
Title: Unsure how to install Open Sans font
I’m trying to make Mosaico my go-to instead of MailChimp. Our organisation is big on branding conformity and I have to use Open Sans for our newsletters. Is there a simple way to install that font for Mosaico? The existing solutions are confusing me… Thanks!

# Answer
It is easy if you have developer skills as you will need to

1. Add the fonts ttf files on the server
2. clone the mosaic template
3. Include the font in the template

HTH

Pradeep
> 1 votes

---
Tags: mosaico, custom
---


# Question
Title: Best workaround for volunteer database with training journals
I’m hoping to create a volunteer section that will record and report on personal details, work location and training courses status etc. It was suggested that CiviCase would be the best option, creating each course as a case?

# Answer
> 0 votes
Have you tried Civi Event + civivolunteer extension?

---
Tags: civicase, civivolunteer, civihr
---


# Question
Title: Where is the option to add multiple contacts to a group
I used to be able to do a specific search (such as for contributions in a given period) and then add the results of that search to a new group. The online documentation still refers to it-- "Multiple contacts can be added to a group at once by conducting a search, and then selecting Add Contacts to a Group using the More Actions menu."

I do not see the "more actions menu"--am I missing something? I am not an expert, just a common user. Thanks

# Answer
'Adding contact's to group' action only appears on the Contact search. If you were doing a Contribution search using Find Contribution, the option won't be available.

You can use the advanced search(CiviCRM \>\> Search \>\> Advanced Search), add a contribution filter and do a search.

On the result page, you see an action drop-down called 'Group -Add contacts'
> 7 votes

# Answer
This can also be done via Action from a SearchKit table
> 0 votes

---
Tags: groups
---


title: Angular Profiles extension - needed?

text:
# Question
Title: Angular Profiles extension - needed?
Is the Angular Profiles extension needed in CiviCRM 5.64 onwards - apart from the CiviVolunteer extension? I see there's a new release of the extension, but I can't work out whether it's required or not. I don't have the CiviVolunteer extension anymore so I'm guessing not.

# Answer
> 2 votes
No, the Angular Profiles Extension is not required by CiviCRM core or any extensions other than CiviVolunteer that I'm aware of (and probably a future version of CiviVolunteer will not need it either).

---
Tags: angular
---


# Question
Title: Find or create token for field on related contact?
I administer a CiviCRM site for an education NGO.

I'd like to be able to customize emails to let people know the school board and region we think they are in, so they're certain which event they should register for and if the school board is wronmg, to let us know. For each Individual, we know their employer (school board). For each school board, we know their region. I don't really want to directly assign a region to each individual as people change school boards not infrequently and there is a serious risk of this data becoming wrong. I can obviously access tokens for their name and employer, but I see no way to access the region of the employer.

Some searching here on StackExchange turned up an "Related Tokens" extension and civitoken which only includes a few things. I noticed in the extensions area "SearchKit Tokens", but I confess that SearchKit has remained pretty opaque for me. I love the idea, but getting anything like this out of it is beyond me. Is there a SearchKit tutorial somewhere that might get me on the road to a solution? I have failed to find anything more than a bare glimpse or high-level demo. Or is there a SearchKit afficionado who could describe the steps to get this out of SearchKit (and therefore SearchKit Tokens), educating myself in that backwards way?

UPDATE: I installed the Related-Tokens extension after all. It does work, contrary to my initial take. However, the SearchKit token solution given by @aidan below works great and keeps my token list a little simpler.

# Answer
> 3 votes
1. Install the 'SearchKit Tokens' extension.
2. Read the README which has a full example.
3. Go to `Search > SearchKit` then `New Search`
    * For your case, you want to create a search starting with `Contact`
    * In `With`, set the entity to `Contact Related Contact` and set the `Relationship to contact` as `Employer of`, and set `Is Current` to `Yes` (ie search for information about contacts and their current employers)
    * At the bottom if the page, click the `Add` dropdown. Go the end of that list and expand the `Contact Related Contacts`, choose the field you want to use (I've used City, you'll want your Region field). Remove the other fields you don't need.
    * Click `Search` and check it is showing you what you expect.
    * On the left side, under `Compose Search`, click `Add` then `Tokens`.
    * Give your Region field a suitable label eg 'Employer Region'.
    * Give your search a name and `Save`
4. Test by going to a contact, click `Actions` then `Print/Merge Document`. In the `Tokens` box, find your token. Click `Preview`

(Set up on https://dmaster.demo.civicrm.org until it rebuilds!)

---
Tags: relationships, tokens, searchkit
---


# Question
Title: How to preserve the location of custom reports in the navigation menu?
Newbie dev question. I have created custom navigation menus in the CiviCRM UI as a way of categorizing the dozens of custom reports (SearchKit + Afforms) my client requires.

I'm finding, however, that **when I clean up the Civi cache** (Administer \> System Settings \> Cleanup Caches and Update Paths \> Cleanup Caches button) **it ALSO resets the location of all the reports back to the Reports menu.**

* How can I preserve the location of the custom reports in the navigation menu?
* Is there a way to turn OFF the "report reset" or to decouple it from "cache clearing"? The developer documentation here doesn't shed any particular light on this issue.

I have tried creating "subfolders" under the "Reports" menu, but even then the custom reports all get pulled out of the subfolders and dumped back again under the root "Reports" menu.

This is incredibly frustrating.

How am I supposed to organize for the users 80+ custom reports in the top navigation if they get reset every time the cache is cleared?

Should I be going about it differently?

Are there other ways of organizing lists of custom reports (ones I've built in SK and FormBuilder) into one or more "report list pages" for users to access? Since I'm on Drupal I could create pages there to organize and link to the Civi reports, but it seems odd not to be able to do that within Civi.

Thanks!

---

Civicrm 5.65.0 Drupal 10

# Answer
Any menu item you create through FormBuilder is controlled by FormBuilder. So every time you clear the caches, the menu item goes back to wherever it is set in FormBuilder.

Option one is to change the parent and order in FormBuilder for each menu item.

Option two is to remove the menu item added in FormBuilder and add the form as a menu item manually (Navigation Menu \> Add Menu Item and paste in the URL). This is nice as you can now edit the menu as you would normally, but if you delete the form, you'll still have the menu item.

I agree that this is very frustrating and made an issue for this behaviour a while ago. Might be worth chiming in there to add your voice in support of improving this.
> 1 votes

---
Tags: menu, custom-reports, formbuilder, cache, navigation
---


# Question
Title: Cron Job for Scheduled Reminders Failing
This CRON job worked well for a long time and all of a sudden stopped working. No database changes were made. Here is the setup of the job and the result. Any ideas would be appreciated.

Entity: Job Action: send\_reminder Summary Finished execution of Send Scheduled Reminders with result: Failure, Error message: DB Error: syntax error Details

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

Full message: Finished execution of Send Scheduled Reminders with result: Failure, Error message: DB Error: syntax error

# Answer
> 2 votes
I found the issue. One of the scheduled reminders had a date and a conditional parameter in it which CIVI could not handle. Everything back in working order. Thanks for your help.

---
Tags: cron, scheduled-reminders
---


# Question
Title: How to show courses (events) as a table listing in WordPress?
I help a swim club that offers swimming lessons to small children. They use CiviEvents to publish their courses, and the challenge is this: **How can I get a nice list of these courses shown in a WordPress page?**

Ideally, I want a table with columns like these:
`Course name | Start date | Time of day | Weekday | Price | Link to sign up`

Ideally, the 'link to sign up' turns into 'closed' or something when the signup period has passed.

My test setup is newest WP 6.3.2 and newest CiviCRM 5.66.0.

This official documentation is not helpful at all. I am not sure it is current.
This 8-year-old question comes closest but does not help me.

*Edit: I have just found the CiviEvent widget but I am struggling to make it show a nice listing with enough details.*

# Answer
> 2 votes
The current way to achieve this would be with SearchKit. It can allow you to customize your own Upcoming Events screen.

Once you've created the search and embedded it in FormBuilder, you are ready to place it on your WordPress page via the provided ShortCode.

---
Tags: wordpress, civievent
---


# Question
Title: How do you find the detailed status of emails on Civimail bounce processing?
Is there a report somewhere that will tell me how many bounces have occurred of a particular type for an email? So for example, I want to see if johnqpublic@gmail.com has 2 "Syntax" type bounces, so if one more comes in this email will be put on-hold (because the threshold for this type is set to 3 by default). Or if not a report, some pointers toward a DB query that would get at the same data would be very helpful. ATM this process seems a bit of a black box, since I can't see what it is doing or why.

# Answer
> 1 votes
The Bounce Report https://dmaster.demo.civicrm.org/civicrm/report/instance/30?reset=1&output=criteria lets you add Bounce Reason in the columns and as a Filter. Perhaps that is what you are after. Otherwise I expect SearchKit now provides a more tweakable approach

# Answer
> 0 votes
I noticed this was missing and added something to fill the gap in 5.65, but I now notice it is broken. Something must have gone wrong in the process — I will look into it and fix it.

If you click the little list icon beside the on hold date on the contact summary, you are supposed to get a list of the bounces for that email.

---
Tags: civimail, bounce, bounce-processing
---


# Question
Title: Can civicrm_mailing_bounce_pattern patterns be edited or supplemented?
I am thinking it would be useful to refine or add to the bounce patterns that are stored in civicrm\_mailing\_bounce\_pattern to more accurately capture bounce situations. It looks like the "pattern" field is just a literal string (including options separated by | chars) that the system would grep for through incoming messages. I not sure if the subject line is searched or just the body. But is there any downside to going down that road? It looks simple enough but the inner workings of bounce processing are a bit mysterious.

Edit: and it seems like this is a subject where the community could share ideas to contribute back to the devs, since very likely we all get the same bounce messages.

# Answer
> 0 votes
I think it would be great to have more active updates for the bounce patterns based on real current bounces.

I believe the bounce pattern only finds regex matches in the body of the email. It is indeed pretty simple.

If you want to propose some changes or additions, the issue queue would be the place to do that.

---
Tags: civimail, bounce, bounce-processing
---


# Question
Title: How to create a CiviMember 'Members only' area
I have a requirement to create a specific 'Download' area for certain Civi memberships. We are using Drupal 9 with latest CiviCRM (5.66)

The usecase is that members can login and get a tab or some sort of link to a controlled area on the website where they can download various digital assets aimed valid for that particular membership.

I would have thought this was a fairly common requirement but looking through the Extensions directory, nothing is obvious.

Drupal has a Group module that may well fit the bill. So just wondering if anyone has implemented a solution along thesee lines as I am trying to get my head around the design of this.

# Answer
The only thing that works kind of out of the box is a built in dashboard for user who are logged in (/civicrm/user?reset=1). You can configure what to show ther under /civicrm/admin/setting/preferences/display?reset=1 - some features such as downlaoding a receipt for a contribution may be available, too.

Beyond that, options to configure, customize and style this page are very limited to my knowledge - the whole feature seems a bit like from "the old CiviCRM world".

You could also use the (somewhat) core features of Drupal Group and Member Synch as well as the integration features of Drupal views and Drupal Webforms to build something custom.

As those "extended core integration features" sometimes turned out to be a bit limited as well for us, we have recently built self service portals, member login areas etc. with the ever growing toolbox of CiviCRM Extensions and Drupal modules. Unfortunately many of them are not well documented yet but I am going to list a few that may be of interest:

**Remote Tools:** Can assign a "Remote ID" that connects a Drupal User and teh CiviCRM contaact. May allow to show only the logged ind Users, Events, data, memberships etc.

**CMRF/Drupal Webform/CiviCRM Formprocessor:** Allows to create flexible webforms that sends data and files to a CiviCRM-Formprocessor (allowing for very flexible configurable processing options).

**Drupal Views & CMRF:** Allows to create views (also views filtered on relevant data for the currently logged in user e.g. only the logged in Users' Data). The source for the view can be a CiviCRM API which allows for very flexible configurations.

**Self Service Extension:** Can send out a hashed/personalized link to a form that will allow users to change their own data without logging in.

**The Extended Contact Matcher:** Extension that provides very flexible configuration for Matching and updating contacts via the API (required for some of the other extensions listed here).

**Remote Events:** Let's you configure events in CiviCRM, display/use that information in other remote systems and submit registrations for those events back to CiviCRM.

This list could probably go on for quite a bit. To sum up: You can do amazing stuff with those/other extensions as well as genereal CiviCRM Features. However, unless you have a rather simple usecase in mind, designing, setting it up etc. will require a lot of time and effort, particularly when doing it for the first time. Particularly providing downloads for "various digital assets" may require some work.

If you elaborate on your requirements a bit more I may be able to suggest a rough setup which is a bit more specific.
> 0 votes

---
Tags: civimember, drupal-9
---


# Question
Title: Batch erasure of records in a multivalue custom field
i have a multivalue custom field that keeps track of the Year and Class of students. This is a multivalue field as we use it to track the student's class every year. I realise that there are extraneous values that are added for year 2020 and i will like to erase all multivalue field that has Year=2020. The other records in the mutlivalue field should not be affected.

So as an example: Student A has in his multivalue field 3 records: Year 2019 Class B, Year 2020 Class C, Year 2021 Class D. I like to erase the Year 2020 Class C record, and leaving 2 other records in the multivalue field.

I checked that there doesn't seem to be an API or the mass update profile to do this so i was looking through the database schema to find a way to batch erase. it seems like there is a separate table just to keep track of the records for this multivalue field and the schema is just the ID, the contactID, and the values in the field. when i delete a record in the multivalue field, the corresponding row in the table will disappear and the reverse happens when I add a record. It looks promising that if I filter for all records that has 2020 in the field and delete them in the database, that is equivalent to batch erasing all the relevant records in the multivalue field.

So i like to seek confirmation that this will work well and it doesn't seem like there are complications from directly deleting the entries in the table dedicated to the multivalue custom field, the table is prefixed with civicrm\_value\_. Thanks for your advice!

# Answer
You can do this with SearchKit!

**Step 1:**

Go to SearchKit and choose your Student Records custom data group as the main entity to search for.

**Step 2:** Set your search criteria:

**Step 3:** Select all records and delete:
> 2 votes

---
Tags: multi-record, multiple-records
---


# Question
Title: Group by Activity Date in Search Kit (rather than date and time)
Is there a way in Search Kit to group activity results by Activity Date rather than date and time?

I am looking to build a report that will allow someone to compare daily totals (and other details) of activities. Because the Activity Date field is a date and a time, activities from different times throughout the day are not grouped together.

I used Field Transformations to have it display in the results as "(Date Only) Activity Date", but that did not seem to effect Group by.

# Answer
> 1 votes
I think you're looking for the same thing as https://lab.civicrm.org/dev/core/-/issues/2485, which I also ran into. Short answer is not yet.

# Answer
> 0 votes
I believe this would be relatively inexpensive if someone wanted to sponsor this addition to SearchKit. Please contact me about this at https://chat.civicrm.org/civicrm/messages/@coleman

# Answer
> 0 votes
This is now available thanks to https://github.com/civicrm/civicrm-core/pull/23434

---
Tags: activities, searchkit
---


# Question
Title: How to delete all financial contributions via the API?
I want to create an extension to delete all financial contributions from the database. The database only contains simple contributions that are not tied to memberships or events.

The developers guide suggests using the Order API for adding, updating and deleting orders and the underlying financial entities.

However, when I try to delete an order using APIv3 explorer I get an exception 'Only test orders can be deleted'. In APIv4, the Order entity does not seem to exist.

What would be the recommended approach to delete the financial contributions via the API?

# Answer
> 1 votes
You can use the Contribution Delete API to delete the contribution.

---
Tags: civicontribute, api
---


title: Can you add an sms link to an email?

text:
# Question
Title: Can you add an sms link to an email?
So when sending an email, insert link allows for types URL, anchor, email & phone (which is very nifty & opens phone app) Is there any extension which adds link type sms? which would open sms app if user was reading the email on their phone?

# Answer
> 3 votes
You can use something like

```
<a href="sms:;+441234567890?&body=sms-text">this sms</a>

```

Hoping the URL link is not re-written by civi for tracking purpose when sending mass mailing

---
Tags: sms, hyperlinks
---


# Question
Title: Search Builder - Undefined array key 'contact_is_deleted
When I run a search using Search Builder i get the error above - also occure when editing a smart group criteria. Using Advanced search does work.

The PHP is Selector.tpl.php on lines 113 & 114

Wordpress install Version 5.66.0 PHP 8.1 Upgraded on 14/10

# Answer
Search Builder is actually a deprecated part of CiviCRM, as the preferred replacement is Search Kit.

See documentation here: https://docs.civicrm.org/user/en/latest/searching/searchkit/what-is-searchkit/

In general about this sort of Smarty notice: they are notices rather than errors so they are not harmful, but they are annoying and indicate that an error *might* arise when upgrading to a future version of PHP (in previous versions of PHP they were not visible at all). So the CiviCRM community has been working hard to address them. Since Search Builder is deprecated it's sort of a last priority, but you are most welcome to jump in and help out. Using any of those PRs as a guide you could create a PR to fix this particular notice if it bugs you enough .
> 0 votes

---
Tags: search-builder, php8
---


# Question
Title: How to make a FormBuilder form visible to visitors? (not logged-in users)
In this other question, I learned how to create a shortcode for a FormBuilder form that shows a SearchKit search result of events. I then discovered that **WordPress does not render the shortcode form unless you are logged in.**

**What I have:**

* My test setup is newest WP 6.3.2 and newest CiviCRM 5.66.0.
* CiviEvent: several events.
* SearchKit: a search that gives me the results I want.
The result presents no actions, no sorting, just a static table listing.
* Form Builder: a form to hold the results from the search.
The "permissions" field is intentionally blank, but that's not enough to make the form content public.
* WordPress: a page that contains the shortcode with my search.
**This works correctly when I am logged in, but is simply not rendered for public visitors.**

**What I want:**

* The form content should be visible to public visitors (not-logged-in users).

# Answer
> 5 votes
I have an FB form that's submitted by anonymous users. The 'Permission' on the form's settings page is set to 'Generic - Allow all users (including anonymous)' and on each contact page 'Security' is set to 'Form based'. This is a Drupal 7 system but should work for all. Credit to Coleman of course who helped with this..

---
Tags: wordpress, formbuilder
---


title: CIVI CRM Donation Form is not working

text:
# Question
Title: CIVI CRM Donation Form is not working
I am currently using the CIVI CRM plugin in WordPress and have integrated the Donation form on our website at https://pulsevoices.org/energize-pulse. However, when users try to submit the form, it takes a considerably long time to process, and an error message appears, stating: "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." Despite the error, the payment is successfully processed, and users receive the email receipt. The problem is that instead of redirecting users to the thank you page, they are prompted to resubmit the form. You can see a screenshot of the issue here: https://prnt.sc/wUrHtNSWd5VE. We are currently using Stripe as the payment gateway.

I have thoroughly investigated the issue from my end and tried various solutions, but unfortunately, the problem persists. I also checked the settings suggested on this ticket Payment Form Errors "Your browser session has expired and we are unable to complete your form submission" after upgrade to 5.47.2. Even after updating the plugin to the latest version, we continue to face the same outcome. It's worth mentioning that the form works correctly when tested in the Test mode of the payment gateway.

We would greatly appreciate any assistance or suggestions you may have in resolving this matter.

# Answer
> 1 votes
That can happen if you have a mix of http vs https or www.pulsevoices.org vs pulsevoices.org in your configs.

Try submitting a donation while looking at your browser's network tab and see if there are any discrepancies.

# Answer
> 0 votes
Thank you for your suggestion. We have setup the site on a staging server and completely removed civicrm and implemented a fresh install but the same error happens during testing — when users try to submit the form, it takes a considerably long time to process, and an error message appears, stating: "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."

It seems that there is an issue with clean URLs. Initially, the page tries to process the clean URLs but seems eventually it reverts to the old URL: https:pulsevoices.org/energize-pulse?civiwp=CiviCRM&a=civicr oute%2Ftransact&id=13&reset=1

We have already made the updates as suggested in this post: https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/clean-urls/

And we have cleaned up mixed http vs https URLs.

This issue has been occurring since mid-May 2023.

Would appreciate any feedback you can provide. Please and thank you.

---
Tags: donations
---


title: CiviEvent generates invalid link

text:
# Question
Title: CiviEvent generates invalid link
**What I have:**

1. test setup `mysite.com` using newest WP 6.3.2 and newest CiviCRM 5.66.0
2. CiviEvent: several events.
3. SearchKit: a search that gives me the results I want.
One column has a link with the path `civicrm/event/info/?reset=1&id=[id]`
4. Form Builder: a form to hold the results from the search.
5. WordPress: a page that contains the shortcode with my search: `[civicrm component="afform" name="afsearchFoo"]`

**Problem: event link is broken:**

* The link given in step 3 above as `civicrm/event/info/?reset=1&id=10`
**should** become: `https://mysite.com/civicrm/event/info/?reset=1&id=10`
**actually** becomes: `https://mysite.com/courses/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&reset=1&id=10`
* Notice that `/` changed to `%2F`, and
* Notice that the path includes the page slug (`/courses/`) where the shortcode is embedded.

**What I want:**

* The link should not be URLencoded and appended. How do I fix that?

# Answer
> 2 votes
Instead of setting the event link path to the relative path
`civicrm/event/info/?reset=1&id=[id]`, use the absolute path
`https://mysite.com/civicrm/event/info/?reset=1&id=[id]`.

---
Tags: wordpress, civievent
---


# Question
Title: "Warning: Undefined array key" messages on Membership form after upgrade to CiviCRM 5.66.0
We're running CiviCRM 5.66, WordPress 6.3.22, and PHP 8.1.

We had our hosting service (CiviHosting) upgrade us to CiviCRM 5.66.0 on Sunday. We last upgraded about a year ago. Yesterday (Wednesday) a user noticed our Membership sign-up page (a CiviCRM Contribution page) covered in what appeared to be error messages.

By way of example, here's a screen capture of the portion of the form asking for First Name;

> Transcription:
>
> Warning: Undefined array key "options\_per\_line" in /home/antietam/www/dev/wp-content/uploads/civicrm/templates\_c/en\_US/%%5C/5C2/5C26BC2B%%Fields.tpl.php on line 65
>
> First Name *
>
> Warning: Undefined array key "is\_datetime\_field" in /home/antietam/www/dev/wp-content/uploads/civicrm/templates\_c/en\_US/%%5C/5C2/5C26BC2B%%Fields.tpl.php on line 110
>
> Warning: Undefined array key "prefix" in /home/antietam/www/dev/wp-content/uploads/civicrm/templates\_c/en\_US/%%5C/5C2/5C26BC2B%%Fields.tpl.php on line 145

After a little research on similar reports on StackExchange, it's clear these are actually PHP Warnings and (probably) do not actually impact the function of the form.

I could not turn off the errors/warnings by setting error\_reporting in the global php.ini file to "Off" but found that reverting PHP to version 7.4 did clear them from the form.

So now we're running PHP 7.4 on our production site, which seems low risk, but is not sustainable. I recognize we have only masked the problem, not solved it.

We do not have any other Contribution Pages active on the site at the moment, but will turn one on next week to gather registrations for our next Event. That form also is crawling with these warnings in our Development environment (PHP 8.1), but is clean in production (PHP 7.4).

I've left our Dev site at PHP 8.1 if you'd like to see the problem our user saw, here: https://dev.antietaminstitute.org/become-a-member/

My uneducated guess is that there is some code in CivCRM core having to do with Contribution Pages that is incompatible with PHP8, spawning these warnings.

I do not know enough about the CiviCRM core bug list, but hope this is already on it, or could be added if it is, in fact, a previously unreported bug.

I'd be very glad for any insight, recommendations, or other feedback, and happy to answer any questions.

Brian

# Answer
> 2 votes
Those warnings won't prevent anything from working properly with PHP 8.1, they're just warnings about how future versions of PHP will behave. See this previous question for settings to avoid having the warnings show up.

There are a lot of these warnings in PHP 8, but we're slowly cleaning them all up. You can join the effort if you want!

---
Tags: contribution-page, php8
---


title: CiviCRM Cannot Find Class

text:
# Question
Title: CiviCRM Cannot Find Class
I am trying to move CiviCRM and Drupal to a new server. Everything looks to me like it should be right. I know that Drupal can connect to its database and is able to run simple drush commands. However if I try and run cv sql or cv flush I get a fatal error.

Class "ComposerAutoloaderInitDrupal8" not found

The error points to the file Drupal8.php line 414.

I am using the command line because I have multiple problems with the setup that are not allowing Apache to load the page and I am trying troubleshoot. Of course this is probably part of the problem.

I have the following:

PHP: 8.0.30 Drupal: 9.5.11 CiviCRM: 5.64.3 CIVICRM\_ROOT\_PATH: /var/aap/current/vendor

I am not sure what other relevant information I can provide.

Thanks!

# Answer
I'd started from cleaning up "vendors" and running "composer update". If not work, re-install CiviCRM would.
> 0 votes

---
Tags: drupal-9, cli
---


title: Unclear on install instructions - D10?

text:
# Question
Title: Unclear on install instructions - D10?
I've been using CiviCRM on Drupal 7 for many years, and it's time to upgrade my Drupal.

* Drupal 8 went EOL November 2, 2021.
* Drupal 9 goes EOL November 1, 2023, which is in 12 days.

So it looks like Drupal 10 should be the way to go.

I'm starting with a fresh Drupal installation (I have a very minimal website outside of CiviCRM), I don't really need to port any Drupal-level stuff over to the new site.

I went to the relevant installation page https://docs.civicrm.org/installation/en/latest/drupal/ , but the instructions there don't seem to support D10 yet (they ask for pull requests to write such instructions - wish I could help!).

I'm guessing I need to do something like:

```
cd /opt/my-dir
composer remove drush/drush  # Is this still necessary?
composer config extra.enable-patching true
composer config minimum-stability dev
composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.55'  # Should this be drupal-10 now?
composer require 'drush/drush:12.*'

```

Does that all seem correct? CiviCRM 5.55 is my current version.

Once I've done this, what's the best procedure for importing all my data from my current installation? I see https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/ but that also looks quite old, I'm not sure what's best practice.

**UPDATE:** I tried out this technique and I seem to have ended up with CiviCRM 5.66 installed, despite seeing the following in my `composer.json` file:

```
    "require": {
        "civicrm/civicrm-core": "~5.55",
        "civicrm/civicrm-drupal-8": "~5.55",
        "civicrm/civicrm-packages": "~5.55",

```

How can I keep version parity with the site I'm coming from?

# Answer
> 1 votes
Regarding the "update" section: perhaps you want to stick to a specific version of CiviCRM package: using Composer it should be like this (just drop the tilde):

```
 "require": {
    "civicrm/civicrm-core": "5.55",
    "civicrm/civicrm-drupal-8": "5.55",
    "civicrm/civicrm-packages": "5.55",

```

Check for instance this for tech details.

On the separate note: despite of D7 hard EOL announced, I'd stick with it for a bit longer its "expiration date", maybe a few years more. Per my experience, the current state of D8/9/10 and its CiviCRM counterpart doesn't quite worth an upgrade rush, to put it politely.

---
Tags: drupal, installation, migration
---


# Question
Title: How can I set up automated monthly email reports?
I'm aiming to automate the monthly email distribution of a report. Is there a way to achieve this?

# Answer
> 2 votes
On the report, click the Email Delivery tab, fill out the details there and set up a Scheduled Job to send it monthly (you'll find instructions if you click the little ? icon beside Email Delivery Settings).

---
Tags: wordpress, civievent, civicontribute, upgrade
---


title: Can't access SearchKit as non-admin

text:
# Question
Title: Can't access SearchKit as non-admin
I can only access SearchKit as an admin. I have another role with the permissions "administer CiviCRM System", "administer CiviCRM Data", "SearchKit: edit and delete searches" and "FormBuilder: edit and delete forms". When I try to open SearchKit, I get the following error message: "Civi\API\Exception\UnauthorizedException: Authorization failed in /html/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php on line 149". Any ideas why? Thanks in advance.

# Answer
> 0 votes
Does the user have "access CiviCRM backend and API"? That plus "SearchKit: edit and delete searches" works for me.

---
Tags: permissions, searchkit
---


# Question
Title: Matomo (Piwik) and CiviCRM not compatible? _PEAR_call_destructors()
I have found the following error after installing CiviCRM through uploading the ZipFile. I haven't found any thread with this specific incompatibility. Both Plugins, Matomo and CiviCRM work just fine if I deactivate one of them.

I've gotten as far as understanding that these PEAR is being called twice but I don't understand how to solve/nor approach this.

An Error of type E\_COMPILE\_ERROR was found on line 793 of file /kunden/507980\_20457/wp\_2022/wordpress/wordpress/wp-content/plugins/matomo/app/vendor/pear/pear-core-minimal/src/PEAR.php. **Error: Cannot redeclare \_PEAR\_call\_destructors()** (previously declared in /kunden/507980\_20457/wp\_2022/wordpress/wordpress/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php:795)

* CiviCRM Version:5.62.1
* Matomo (formerly known as Piwik) Version: 4.14.2

# Answer
> 0 votes
I'm in the same boat. i have exactly the same problem. I don't know how to code a fix.

I will stick with devil G4 while waiting for an input from the community

# Answer
> 0 votes
We've struggled with similar plugin conflicts between CiviCRM and Tickera. Both are must-have items for my organization. As I understand it, it happens because Wordpress by default includes all plugin code in one giant namespace, and when plugins use common open-source libraries like PEAR then conflicts between multiple copies become possible. I don't have a solution but a few suggestions for things to try.

1. Communicate with the devs of both packages and ask them to modify their code to prevent the conflict. They might be willing, or might not. Worth a shot.
2. Install the plugin Plugin Organizer, and use it prevent one of the conflicting plugins from loading on the other one's pages, and vice versa. PO is notoriously difficult to use, with a funky user interface, but worth the trouble to learn.
3. The most extreme measure is to create a separate URL for CiviCRM access only. You would only do this if you have complete control over who needs to access the admin side of CiviCRM. If your main URL is example.org, you can create a subdomain at crm.example.org, with its own Wordpress database, but sharing the same CiviCRM database. In this second URL you would install no plugins except CiviCRM, so there's no conflicts. This subdomain would not be for the general public, only yourself and org staff. You'd want to carefully think through exactly what goes where - for example you probably want to make sure that Civimail still comes from your main URL.

We ended up using both #2 (to prevent conflicts on public pages) and #3 (to prevent conflicts on the admin side).

Hope that helps.

---
Tags: installation
---


# Question
Title: Upgrade Civicrm entire database to 5.66.0 version
First time attempting to #update CiviCRM to the 5.66.0 version. I am using #WordPress version 6.3.22 and #PHP 8.1. If I have 68,000 individual contacts, most of them with notes in their individual profiles, groups assigned, and #hash tags assigned, how do I restore this valuable information to the updated version of CiviCRM? I understand that I will need to remove the old Civicrm version, and all the databases from the core, clean the cache to permanently remove any old information, and upload all the contacts and their credentials.

I am new to Civicrm and platform technologies, can anyone share any information on how to restore (export) the information from the old version to the new version of Civicrm?

Thank You for any answers!

# Answer
> 2 votes
welcome to the CiviCRM community!

Where did you find instructions saying you must **delete** your CiviCRM database in order to upgrade? That's completely wrong, you definitely shouldn't do that because you will lose data!

CiviCRM upgrades are designed to be a smooth process in which you replace the old CiviCRM code with the new version, and then run the upgrade script which will automatically upgrade your database schema and clear caches for you. No data will be lost in the process, although to be extra safe you can take a snapshot of your database (using mysqldump or similar) before the upgrade.

You can find the latest upgrade instructions for CiviCRM-Wordpress here: https://docs.civicrm.org/sysadmin/en/latest/upgrade/wordpress/

---
Tags: wordpress, upgrade, core, directory
---