title: Upgrading to 5.45.1 get error

text:
# Question
Title: Upgrading to 5.45.1 get error
Upgrading from 5.27.2 to 5.45.1 on Drupal 9.3.2, used civicrm\_drush module, also tried with UI.

Getting following Error:

log file details

```
    [info] Running task: Update legacy prefix id token in greetings (use {contact.prefix_id:label})

    [info] Civi\API\Exception\NotImplementedException: "API (OptionValue, getFields) does not exist (join the API team and implement it!)"
    #0 PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/Api4/Generic/AbstractAction.php(437): Civi\API\Request::create("OptionValue", "getFields", (Array:4))
    #1 PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/Api4/Generic/AbstractGetAction.php(44): Civi\Api4\Generic\AbstractAction->entityFields()
    #2 PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/Api4/Generic/DAOGetAction.php(97): Civi\Api4\Generic\AbstractGetAction->setDefaultWhereClause()
    #3 PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/Api4/Provider/ActionObjectProvider.php(68): Civi\Api4\Generic\DAOGetAction->_run(Object(Civi\Api4\Generic\Result))
    #4 PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
    #5 PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/Api4/Generic/AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
    #6 PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Upgrade/Incremental/MessageTemplates.php(420): Civi\Api4\Generic\AbstractAction->execute()
    #7 PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Upgrade/Incremental/Base.php(320): CRM_Upgrade_Incremental_MessageTemplates->replaceTokenInGreetingOptions("contact.prefix_id", "contact.prefix_id:label")
    #8 PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Queue/Task.php(74): CRM_Upgrade_Incremental_Base::updateGreetingOptions(Object(CRM_Queue_TaskContext), "contact.prefix_id", "contact.prefix_id:label", "5.43.alpha1")
    #9 PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Queue/Runner.php(201): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
    #10 PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Queue/Runner.php(155): CRM_Queue_Runner->runNext()
    #11 PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Upgrade/Headless.php(49): CRM_Queue_Runner->runAll()
    #12 PATH/distro9.test/web/modules/contrib/civicrm_drush/src/Commands/CivicrmDrushCommands.php(435): CRM_Upgrade_Headless->run()
    #13 [internal function](): Drupal\civicrm_drush\Commands\CivicrmDrushCommands->drushCivicrmUpgradeDb((Array:20))
    #14 PATH/distro9.test/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array((Array:2), (Array:1))
    #15 PATH/distro9.test/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback((Array:2), Object(Consolidation\AnnotatedCommand\CommandData))
    #16 PATH/distro9.test/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter((Array:3), (Array:2), Object(Consolidation\AnnotatedCommand\CommandData))
    #17 PATH/distro9.test/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), (Array:3), (Array:2), Object(Consolidation\AnnotatedCommand\CommandData))
    #18 PATH/distro9.test/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #19 PATH/distro9.test/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #20 PATH/distro9.test/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #21 PATH/distro9.test/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

```

same issue with dashboard, look like its related `getFields` action.

---

i thought, lets try upto `5.41.2`, Upgrade went smooth using drush.

While loading civicrm, i am getting `Authorization failed` error. (mostly on dashboard, api4 with permission check).

```
    $Fatal Error Details = array:3 [
      "message" => "Authorization failed"
      "code" => null
      "exception" => Civi\API\Exception\UnauthorizedException {#3157
        -extraParams: array:1 [
          "error_code" => "unauthorized"
        ]
        #message: "Authorization failed"
        #code: 0
        #file: "PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/API/Kernel.php"
        #line: 223
        trace: {
          PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/API/Kernel.php:223 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/API/Kernel.php:147 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/Civi/Api4/Generic/AbstractAction.php:234 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/api/api.php:85 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Core/BAO/Dashboard.php:69 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Contact/Page/DashBoard.php:52 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:313 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:69 { …}
          PATH/distro9.test/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:36 { …}
          PATH/distro9.test/web/modules/contrib/civicrm/src/Civicrm.php:88 {
            Drupal\civicrm\Civicrm->invoke($args)
            › ob_start();
            › $content = \CRM_Core_Invoke::invoke($args);
            › $output = ob_get_clean();
            arguments: {
              $args: array:1 [ …1]
            }
          }

```

e.g. Membership Tab

```
$membershipTypes = \Civi\Api4\MembershipType::get(TRUE)
      ->execute()
      ->indexBy('id')
      ->column('name');

```

Logged in user have 'administrator\` role, and all permission of civicrm are checked.

Also how does `https://distro9.test/civicrm/placeholder-url-path?civicrm-placeholder-url-query=1` url get resolved ? i did not see any class mapping.

# Answer
I noticed this error today, too. What happened?

1. Upgrade Drupal & CiviCRM to newest version
2. Deleted everything in /sites/default/files/civicrm/templates\_c/
3. Cleared Drupal cache
4. But forgot to visit https://yourdomain.tld/civicrm/upgrade.php after all these steps.

Please do a database upgrade (/civicrm/upgrade.php) after you installed new code. I hope this will help you and everybody else with this error message after an upgrade.
> 0 votes

---
Tags: upgrade, permissions
---


# Question
Title: Block custom fields after a single registration?
We currently have a set of **custom fields** specifically for CiviCRM **activities**. We would like to enable the **record lock feature** after registering a single occasion so that the user cannot modify or delete them. Is it possible to make it combinable?

These custom fields are combinable and will be added historically in an activity and should not be modified or deleted.

# Answer
> 1 votes
There is an extension called 'Activity Type ACL' that should do what you want. You could give users 'add' and 'view' permission for an activity type, but not 'edit' or 'delete'. But that would restrict access to the whole activity, not just he custom fields. More on this extension here https://civicrm.org/extensions/activity-type-acl

---
Tags: custom-fields, activities, admin
---


title: DB Error no such table civicrm_queue

text:
# Question
Title: DB Error no such table civicrm_queue
When opening extension manager I get a message that a database-upgrade is required for the extensions (Voor uw extensies is een database-upgrade nodig. Upgrade uitvoeren.) Running the upgrade results in an error: DB Error : no such table Suggestion was to tun the civicrm/upgrade?reset=1 (which I already executed after upgrading), but this now returns an error too: Database check returns an error

From the log:

core:

> $Fatal Error Details = array:3 \[ "message" =\> "Database check geeft een fout, het lijkt er op dat de database deels geüpgraded is. Zet de back-up van de database terug en probeer opnieuw te upgraden." "code" =\> null "exception" =\> CRM\_Core\_Exception {#2069 -errorData: array:1 \[ "error\_code" =\> 0 \] #cause: null -\_trace: null #message: "Database check geeft een fout, het lijkt er op dat de database deels geüpgraded is. Zet de back-up van de database terug en probeer opnieuw te upgraden." #code: 0 #file: "/data/sites/web/vendelennet/www/drupal7/sites/all/modules/civicrm/CRM/Upgrade/Form.php" #line: 349 trace: { /data/sites/web/vendelennet/www/drupal7/sites/all/modules/civicrm/CRM/Upgrade/Form.php:349 { › elseif (stripos($currentVer, 'upgrade')) { › throw new CRM\_Core\_Exception(ts('Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again.')); › } }

extension:

> $Fatal Error Details = array:3 \[ "message" =\> "DB Error: no such table" "code" =\> null "exception" =\> PEAR\_Exception {#1622 #cause: DB\_Error {#1608 +error\_message\_prefix: "" +mode: 16 +level: 1024 +code: -18 +message: "DB Error: no such table" +userinfo: "UPDATE civicrm\_queue SET status = NULL WHERE name = 'ext-upgrade' \[nativecode=1146 \** Table 'ID291638\_crm5vnet.civicrm\_queue' doesn't exist\]" +backtrace: array:20 \[ 0 =\> array:6 \[ "file" =\> "/data/sites/web/vendelennet/www/drupal7/sites/all/modules/civicrm/vendor/pear/db/DB.php" "line" =\> 997 "function" =\> "\__construct" "class" =\> "PEAR\_Error" "type" =\> "-\>" "args" =\> array:5 \[ 0 =\> "DB Error: no such table" 1 =\> -18 2 =\> 16 3 =\> array:2 \[ 0 =\> "CRM\_Core\_Error" 1 =\> "exceptionHandler" \] 4 =\> "UPDATE civicrm\_queue SET status = NULL WHERE name = 'ext-upgrade' \[nativecode=1146 \** Table 'ID291638\_crm5vnet.civicrm\_queue' doesn't exist\]" \] \] 1 =\> array:7 \[ "file" =\> "/data/sites/web/vendelennet/www/drupal7/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php" "line" =\> 575 "function" =\> "\__construct" "class" =\> "DB\_Error" "object" =\> DB\_Error {#1608} "type" =\> "-\>" "args" =\> array:4 \[ 0 =\> -18 1 =\> 16 2 =\> array:2 \[ 0 =\> "CRM\_Core\_Error" 1 =\> "exceptionHandler" \] 3 =\> "UPDATE civicrm\_queue SET status = NULL WHERE name = 'ext-upgrade' \[nativecode=1146 \** Table 'ID291638\_crm5vnet.civicrm\_queue' doesn't exist\]" \] \] 20230827-0021 Not sure if I'm updating this case correctly

Getting there one step at the time... Ran the SQL proposed by Jon, and now it is missing another table:

Is there a way to find which update did not complete succesfully and how to fix all of it? I do not remember any update failing and I can access the information. CiviCRM is at version 5.60 and I want to have it at latest version before migrating the site to Drupal10.

> Aug 27 00:06:55 \[info\] $CRM\_Queue\_ErrorPolicy\_reportException = PEAR\_Exception: "DB Error: no such table"
>
> * ERROR TYPE: DB\_Error
> * ERROR CODE: -18
> * ERROR MESSAGE: DB Error: no such table
> * ERROR MODE: 16
> * ERROR USERINFO: SELECT uj.id FROM civicrm\_queue q INNER JOIN civicrm\_user\_job uj ON q.id = uj.queue\_id WHERE q.name = 'ext-upgrade' \[nativecode=1146 \** Table 'ID291638\_crm5vnet.civicrm\_user\_job' doesn't exist\]
> * ERROR DEBUGINFO: SELECT uj.id FROM civicrm\_queue q INNER JOIN civicrm\_user\_job uj ON q.id = uj.queue\_id WHERE q.name = 'ext-upgrade' \[nativecode=1146 \** Table 'ID291638\_crm5vnet.civicrm\_user\_job' doesn't exist\]

Running Drupal 7.98, CiviCRM 5.60.0, PHP 7.4

# Answer
Add the table

```
 CREATE TABLE `civicrm_queue` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the queue',
  `type` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Type of the queue',
  `runner` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Name of the task runner',
  `batch_limit` int unsigned NOT NULL DEFAULT '1' COMMENT 'Maximum number of items in a batch.',
  `lease_time` int unsigned NOT NULL DEFAULT '3600' COMMENT 'When claiming an item (or batch of items) for work, how long should the item(s) be reserved. (Seconds)',
  `retry_limit` int NOT NULL DEFAULT '0' COMMENT 'Number of permitted retries. Set to zero (0) to disable.',
  `retry_interval` int DEFAULT NULL COMMENT 'Number of seconds to wait before retrying a failed execution.',
  `status` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT 'active' COMMENT 'Execution status',
  `error` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Fallback behavior for unhandled errors',
  `is_template` tinyint NOT NULL DEFAULT '0' COMMENT 'Is this a template configuration (for use by other/future queues)?',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UI_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

```
> 4 votes

# Answer
Your database has gotten out of sync with CiviCRM. This may have happened if you had a failed upgrade, for instance.

Pradeep's answer explained how to fix `civicrm_queue` but it may be more important to discover the underlying reason these tables are missing/incomplete.

You can fix the most recent error with this SQL:

```
ALTER TABLE civicrm_queue_item ADD COLUMN run_count int NOT NULL DEFAULT 0 COMMENT 'Number of times execution has been attempted.';

```

This will add the missing "run\_count" field, which should have been added on upgrade to Civi 5.48.
> 2 votes

# Answer
The `civicrm_queue` table was introduced in 5.47 (see: `CRM/Upgrade/Incremental/sql/5.47.alpha1.mysql.tpl`).

This error can happen when your skip several CiviCRM upgrade versions or your upgrade failed at some point. I had the similar error when jumping from 5.44.0 to 5.69.2 and upgrade process was failing as well.

This table is required in newer versions while running upgrade (e.g. `cv ext:upgrade-db`). So ideally you should do upgrade of CiviCRM Core with small increments first to 5.47 (to create that table in the first place), then do further upgrades.
> 1 votes

---
Tags: upgrade, extension
---


# Question
Title: Can't update extension: "You will not be able to install/upgrade Edit Line Item Extension until you have installed the org.civicrm.afform extension"
My Edit Line Item extension stopped working. It looks like it needs an update, but update fails with the error "You will not be able to install/upgrade Edit Line Item Extension until you have installed the org.civicrm.afform extension".

On the face of it, it seems I have exactly this same problem (Can't upgrade Mosaico Extension from 2.8XXXX to 2.9 without Afform but no Afform Ext. Available in Joomla)

But I do have Form Core installed and up to date (I think? says it's a prerelease version).

Details: Joomla CiviCRM 5.66.1 Edit Line Extension v2.6 (wants upgrade to 2.7) Form Core 5.66.1

Based on other research, it seems Afform/Form Core was an external extensions that became part of core? So maybe this is an out of date dependency problem? Anyway, how do I fix it? Do I simply need to update Civi to the latest?

Thanks as always!

# Answer
Afform is shipped with core and is now automatically enabled. I'd upgrade Civi then try again.
> 2 votes

---
Tags: upgrade, extension, formbuilder, line-items
---


title: Fatal error in MailingEventForward.php

text:
# Question
Title: Fatal error in MailingEventForward.php
I have this error in the cron job log: PHP Fatal error: Duplicate declaration of static variable $fields in .../civicrm/civicrm/CRM/Mailing/Event/BAO/MailingEventForward.php on line 236 This is a CiviCRM on wordpress 5.68.0

# Answer
This will be fixed in 5.70. You can apply this patch: https://github.com/civicrm/civicrm-core/pull/28838/files
> 0 votes

---
Tags: error, cron-job, civicrm-event
---


title: civicrm:publish on pantheon

text:
# Question
Title: civicrm:publish on pantheon
Is there a way to run civicrm:publish manually and not via CLI? I updated to 5.69.2 but have the error in status:

Wrong version of assets in public web directory: expected 5.69.2 but found 5.69.1. Use the command composer civicrm:publish to resolve.

However, I'm on Pantheon and you can't run the command as it errors out due to permission issues. I've tried terminus drush/composer commands to no avail.

# Answer
> 0 votes
You can run it locally or in another dev environment and then all you need to do is upload the files in web/libraries/civicrm to web/libraries/civicrm on the real server.

---
Tags: composer, pantheon
---


# Question
Title: Cannot access Form Builder forms as anonymous user
I'm stumped trying to get Form Builder forms accessible to anonymous users. I've pared back one of the forms to its essentials: it only displays a text box. This works fine when I'm logged into the WordPress site on which CiviCRM is running, but if I access from another Microsoft Edge profile I 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. You do not have permission to access this page." I've included two screenshots below: the first shows the bare bones of the test form and the second shows the error message with debugging/logging turned on. **Any pointers to what I might check would be greatly appreciated.**

These is the list of current permissions turned on for anonymous users:

* CiviCRM: access uploaded files
* CiviCRM: profile create
* CiviCRM: profile edit
* CiviCRM: profile view
* CiviCRM: access all custom data
* CiviCRM: view my invoices
* CiviEvent: register for events
* CiviEvent: view event info
* CiviContribute: make online contributions
* CiviMail: access CiviMail subscribe/unsubscribe pages
* CiviMail: view public CiviMail content
* CiviCampaign: sign CiviCRM Petition

# Answer
The required permissions are specified in the FormBuilder config. Your screenshot shows "Permission: CiviCRM access CiviCRM backend API".

Change that to be something more suitable for this form's usage.
> 3 votes

# Answer
If you want the form to be accessible to anonymous users then you need to select "Allow All Users (Including Anonymous)" from the "Permissions" dropdown.
> 1 votes

# Answer
It turns out that anonymous also needs the permission CiviCRM: access CiviCRM backend and API (described as "Master control for access to the main CiviCRM backend and API. Give to trusted roles only.")

Perhaps there is a more secure way to achieve the same outcome?
> 0 votes

# Answer
One way of achieving this is to set the permission property in the \*.aff.json to be an empty array, e.g.

```
{
  "title": "About you",
  "server_route": "civicrm/about-you",
  "is_public": true,
  "permission": []
}

```

It doesn't look like there is an easy way in the GUI to clear the permissions and I am not sure whether this is recommended practice (I couldn't find it documented), but it does work.
> 0 votes

# Answer
I have the same situation as you. After doing some testing, I found a working solution : set the form permission as "generic / allow all users (including anonymous)" Screenshot in French below.

What I don't know is how secure that is. I feel it is more ok than giving wide permissions at CMS level.

Feedbacks welcome, I am experimenting ;)
> 0 votes

---
Tags: permissions, formbuilder
---


# Question
Title: Bounce processing and X-CiviMail-Bounce possible bug?
I am unable to get bounce processing working on more than one Plesk server, and think I may have found a bug in the CRM/Utils/Mail/IncomingMail.php file.

Line 170 sets a regex string with the following code:

```
$rpXHeaderRegex = '/X-CiviMail-Bounce: ' . $emailLocalPart . '(b)' . $twoDigitString . '([0-9a-f]{16})@' . $emailDomain . '/i';

```

The '(\[0-9a-f\]{16})@' part means that it is looking for a 16 digit string which can contain numbers, and the letters a - f.

It is failing to find the string in my bounced mails though, because the 16 digit parts contain letters other than a - f.

If I change the code to '(\[0-9a-z\]{16})@', so it is looking for letters a - z, then bounce processing works properly.

It seems there is a mismatch between the headers Civi is assigning when it sends the mail, and the headers it is looking for when it receives them back as a bounce.

An example of an X-CiviMail-Bounce header in the bounced email is:

```
X-CiviMail-Bounce: bounces+b.86.404.vnqd0g7cqfjrdqqj@mydomain.com

```

# Answer
> 1 votes
This is fixed in CiviCRM 5.68+: https://github.com/civicrm/civicrm-core/pull/28354

# Answer
> 0 votes
Your analysis sounds good. Can you please open a pull-request on github with that change so it can be reviewed by Civi developers?

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


# Question
Title: Extension Amazon SNS 2.0.0 doesn't work on CiviCRM 5.69.2
I'm sorry to report that there is an error in Extension Amazon SNS 2.0.0 after upgrading to CiviCRM 5.69.2. Unfortunately I can't get an error log but Wordpress gives me an error page when I want to access to the extension administration page. The only way is to rename the extension folder, but then I can't disable it.

With the php error log:

```
[18-Jan-2024 09:53:33 Europe/Rome] PHP Fatal error:  Uncaught Error: Undefined constant GuzzleHttp\ClientInterface::MAJOR_VERSION in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php:116
Stack trace:
#0 /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults()
#3 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(61): GuzzleHttp\Client->__construct()
#4 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(216): CRM_Extension_Browser->getGuzzleClient()
#5 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(194): CRM_Extension_Browser->grabRemoteJson()
#6 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(173): CRM_Extension_Browser->grabCachedJson()
#7 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(138): CRM_Extension_Browser->_discoverRemote()
#8 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(239): CRM_Extension_Browser->getExtensions()
#9 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php(43): CRM_Admin_Page_Extensions->formatRemoteExtensionRows()
#10 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(719): CRM_Admin_Form_Extensions->preProcess()
#11 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#12 /home/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform()
#13 /home/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle()
#14 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle()
#15 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(364): CRM_Core_Controller->run()
#16 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(170): CRM_Core_Page_Basic->edit()
#17 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(110): CRM_Core_Page_Basic->run()
#18 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(322): CRM_Admin_Page_Extensions->run()
#19 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#20 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#21 /home/public_html/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke()
#22 /home/public_html/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke()
#23 /home/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#24 /home/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#25 /home/public_html/wp-admin/admin.php(259): do_action()
#26 {main}
  thrown in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php on line 116
[18-Jan-2024 09:53:38 Europe/Rome] PHP Fatal error:  Uncaught Error: Undefined constant GuzzleHttp\ClientInterface::MAJOR_VERSION in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php:116
Stack trace:
#0 /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults()
#3 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(61): GuzzleHttp\Client->__construct()
#4 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(216): CRM_Extension_Browser->getGuzzleClient()
#5 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(194): CRM_Extension_Browser->grabRemoteJson()
#6 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(173): CRM_Extension_Browser->grabCachedJson()
#7 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(138): CRM_Extension_Browser->_discoverRemote()
#8 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(239): CRM_Extension_Browser->getExtensions()
#9 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(138): CRM_Admin_Page_Extensions->formatRemoteExtensionRows()
#10 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(174): CRM_Admin_Page_Extensions->browse()
#11 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(110): CRM_Core_Page_Basic->run()
#12 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(322): CRM_Admin_Page_Extensions->run()
#13 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#14 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#15 /home/public_html/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke()
#16 /home/public_html/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke()
#17 /home/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#18 /home/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#19 /home/public_html/wp-admin/admin.php(259): do_action()
#20 {main}
  thrown in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php on line 116

```

I tried with composer install in the extension folder and there are nothing to install, update or remove

# Answer
> 1 votes
Without the exact text of the error message, it's difficult to know the exact cause. You may want to check your PHP logs (on a Debian server, this would be `/var/log/php8.1.log` for PHP 8.1).

However, you can most likely resolve the problem by running `composer install` inside the extension folder. Amazon SNS requires the Guzzle library, and was packaged with Guzzle 6. However, you very likely have a plugin that was packaged with Guzzle 7. If you run `composer update` then Amazon SNS should get Guzzle 7 and the problem should go away.

**UPDATE** First - I meant `composer update`, not `composer install` \- hopefully that fixes your problem!

But if not - your logs make clear that you have multiple Guzzles on different versions.

**Find your Guzzles**: Search for a `CHANGELOG.md` file in a `guzzle` folder. Open each changelog and check the version. At least one will be version 6, at least one will be version 7.

**Fix the Guzzle 6 versions**: If you're lucky, the ones with version 6 will have a `composer.json` and you can run `composer update`. If not, you will probably need to open an issue with the author of that plugin/extension/etc.

---
Tags: extension
---


# Question
Title: Error call to undefined function move_uploaded_file() after update from 5.63 to 5.69
I have recently updated CiviCRM on a Joomla site from 5.63.3 to 5.69.2.

Since this update, I have a error when submitting a contribution from frontend in which there is a form with a possibility to upload a file:

*call to undefined function move\_uploaded\_file()*

It works well when no file is submitted.

PHP version is 8.2, I tried also with 8.0, 8.1 & 7.4, and same error.

Any idea how to solve this issue ?

Thanks

# Answer
> 0 votes
That seems very odd because move\_uploaded\_file() is a built-in PHP function.

Are you using shared hosting? Because of security implications, it's quite possible your host has disabled this function. If so, please open a support request with your host.

---
Tags: contributions
---


# Question
Title: CiviCRM 5.69.2 update - now each contact link in relationshsips tab opens a new browser tab - how can we disable _blank
We updated CiviCRM to 5.69.2 and now every time we click a contact under relationships (active), it loads a new browser tab. Some people may like that feature, but it is difficult for us. We don't see how/where to disable it or change it. In our instance, this version now displays a message

*"Permissioned Relationships: This contact can be viewed by the other. This contact can be viewed and edited by the other."*

Also new to us, in relationships tab view, along with an icon dropdown 2 options, edit relationships in formbuilder plus edit contact summary relationships in searchkit.

We've been looking through admin menu, configuration, display preferences, etc. to no avail. Any ideas? Please share.

# Answer
> 2 votes
I see what you mean. That tab was replaced in core (rather than AdminUI). The links are configured to be pop-ups but are loading as new tabs. The same problem is occurring in other places with pop-ups so something has broken. Hopefully that will be fixed very soon.

# Answer
> 2 votes
Thanks for reporting this issue. I've opened a ticket with a fix: https://github.com/civicrm/civicrm-core/pull/29039

Update: PR has been merged & fix will be released with v5.70.

---
Tags: relationships
---


# Question
Title: Can you save sort order in SearchKit? What is Compose Search?
I am creating a mail report and I want to sort by Scheduled Date (decending). When I save the search, all looks good, but when I come back to the search or view results, it defaults to sorting by date in the Ascending instead of depending. I assume by default it only sorts whatever is in the first column?

Also - Compose Search button doesn't seem to do anything - what is it supposed to do?

# Answer
You'll want to add a "display" from the options on the left. In the display you can set the sort order. Then the display, or a form based on it, is what people would access, not the underlying search.

"Compose" is because you might be on a different tab, like the display's tab, and want to get back to the search.
> 3 votes

---
Tags: reports, searchkit
---


title: Front end forms for contacts?

text:
# Question
Title: Front end forms for contacts?
With Caldera forms now no longer an option, what are some best practices for new users to enter contact details into CiviCRM ? Also, what is the best way to show user info on the front end of a website?

# Answer
> 4 votes
You have several options.

The oldest option is profiles (**Administer \> Customize Data and Screens \> Profiles**). These are basic in functionality, but are still my first choice for newsletter signups.

Second is FormBuilder (Enable at **Administer \> System Settings \> Extensions**, then find at **Administer \> Customize Data and Screens \> FormBuilder**). This is the successor to profiles and Caldera Forms. It does many things that both are incapable of, but still has rough edges - e.g. there's no easy way to add a submitter to a group automatically. But it improves significantly with each month.

Third is Caldera Forms. Some CiviCRM developers are maintaining a fork of Caldera Forms that continues to work. I don't have details but someone else can surely respond. Here is a blog post with links to more info.

Fourth is using Form Processor with just about any form building tool. This is the most complex option, but is much more powerful than any of the others. It's also possible to use FormBuilder + Form Processor in this way. I'v

# Answer
> 0 votes
Totally agreed with Jon G. We are using a mix of the solution above depending on what needs to be achieved. Form Processor and Contact Form 7 do work well together. The remaining question is for paid membership which is not yet handled by FormBuilder but might be soon.

---
Tags: wordpress, integration
---


# Question
Title: Best way to go from an Excel list of Contact IDs to a Civi group
I get regular requests to turn an external list of contact IDs into a Civi group. I don't have a nice way of doing this atm.

**Search Builder**

The best approach I have so far is with Search Builder, of all things. I have a little bit of javascript that adds an input and then turns that into a search builder search. This sends the data via POST to the usual search results screen, where you can save it to a group in the normal way. You can do this with tens of thousands of IDs.

But Search Builder is going away, and it'd be nice to do it in a nice Form Builder screen that doesn't need refreshing.

**Search Kit / Form Builder**

Search Kit can't *quite* do it. You can't paste in a comma-separated list of IDs:

(you *can* paste in comma-separated lists for other fields, just not when it's not a lookup field like Contact ID)

I thought about making a custom quickform that links to a Search with the values in the URL - but this hits limits of the max length of URLs. And we regularly have tens of thousands of people.

Any other ideas? Is there any way to send data to Search Kit in the POST?

# Answer
> 3 votes
Can you do import with update flag and on preview screen you can add contacts to group.

or using URL you can do /civicrm/task/add-to-group?reset=1&cids=119,122,137

# Answer
> 1 votes
I see in your comment you're looking for something in the UI, but posting this anyway since might be useful.

Assuming your csv only has one column:

`cv ev '$fp = fopen("mycsv.csv", "r"); while (($id = fgets($fp)) !== FALSE) { civicrm_api3("GroupContact", "create", ["contact_id" => trim($id), "group_id" => 4]); } fclose($fp);'`

Replace "4" with the group id.

---
Tags: searchkit, search-builder
---


# Question
Title: using relationships to create a (smart) group from another group
I have a group of contacts that are organizations. They are institutional members of the organization I'm working for. That part works fine. We are trying to send a renewal email and the normal way to do this seems to be using the "on behalf of" option on the contribution page. All that works as expected. It fails if I arrive with a CID and checksum that makes me the org, but succeeds if I arrive with a CID and checksum that makes me a related contact. All well and good.

I have created an "Primary contact for" relationship for each org so I don't email every single person related to an organization. It seemed a simple enough solution, but I can't find a way to make a smart group that captures the primary contacts of a group of organizations.

I started with Search Builder as it appeals to my brain. I failed as I can't find relationships exposed anywhere in this tool.

I can use Advanced Search to find individuals who are primary contacts, but not just the primary contacts whose organizations are in a particular group or have a particular membership status.

I have attempted to make use of Jon G's SearchKit suggestion, but am still getting stuck with variations of the relationship problem.

I have replicated what he suggested and do get results that seem initially promising, but there are too many to possibly be just the primary contacts for these orgs (there are only 75 primary contacts in total) and indeed the first entry in the list is not a primary contact for anyone.

I then tried to add a filter at right to limit the results to primary contacts only. The right options seemed to be available, but now the results set is empty.

I would appreciate any further thoughts to augment my admittedly poor grasp of SearchKit.

# Answer
I had the exact same need last week! I'm attaching a screenshot from SearchKit, though you probably need something simpler. But crucially:

* *Contact Related Contacts* is what you're looking for (see screenshot item 1). You can specify the relationship type.
* You can create a smart group from the **Add** button (item 2).
* You can see I also am filtering here on organizations whose membership end date is in the past.

What's odd is that I used the CID of the org, and it *did* work. We needed this so the payment was associated with the org, not the primary contact. I used SearchKit Tokens to create a "Organization's CID" and "Organization's Membership Type" token for individuals. We didn't use checksums because these users have to log in to renew. We send them to a FormBuilder page though - which in turn redirected to a contribution page, so maybe that's why it worked.
> 1 votes

---
Tags: relationships, smartgroups
---


title: Report of who hasn't opened a mailing

text:
# Question
Title: Report of who hasn't opened a mailing
On several occasions I've seen users who want to know who did ***not*** open a bulk mailing. While this can be figured out in various ways, it should be possible to produce such a report using Search Kit, which would save time. So far, I've not succeeded. It would help to know which table holds the mailing open counts? Can anyone help?

# Answer
This should work. I've verified it against the Advanced Search method results... Noting the Advanced Search can be really inefficient and thus take a very long time on large mail lists so an SK approach is definitely good to have on hand.

Ref Advanced Search approach:
> 2 votes

# Answer
While Andy's solution might seem like a good one, it's important to know that this isn't really possible. Here's an article from Campaign Monitor that explains why. The problem isn't unique to Campaign Monitor - it affects all mail tools, including CiviMail.

In short - your mail tool doesn't actually know when email is opened, for privacy reasons. What it *does* know is when remote images are loaded. But a) many people don't load remote images (e.g. in Outlook it's the default not to). And b) to better protect privacy, in 2023 Apple changed all their products to load remote images even if the email isn't read. GMail also has their own unique magic.

So in short - you're going to get lots of false positives and false negatives, and shouldn't rely on the "open rate" for anything except as an aggregated value.
> 0 votes

---
Tags: civimail, searchkit
---


# Question
Title: default currency being used instead of page currency on confirmation pages
I administer a site with a default currency of Euros. However, they also do payments for some things in other currencies. It all seems to work fine on contribution pages with both the confirmation page and the receipt (after a Smarty tweak) showing the correct currency.

I've just set up their first event using USD and although the registration page and receipt are correct, the confirmation page shows Euros. Right amounts, but wrong currency. Is this a known problem? I assume there is something hardcoded somewhere in this legacy part of CiviCRM. Thoughts?

# Answer
Demerit's pointer revealed the solution. Probably I should create a pull request to fix the bug, but all I did for the moment was add the following line to civicrm/CRM/Event/Form/Registration.php as indicated in this bug report.

```
$this->assign('currency', $params['currencyID']);

```
> 0 votes

---
Tags: civievent, currency
---


# Question
Title: Copy the contents of Custom Field to external_identfier field for all contacts
Loving civicrm, just getting to grips with it. I've imported a load of contacts but I've made a rookie error and instead of importing my unique ID number for each contact into the 'external\_identifier' field I created my own custom field and imported it there. Unfortunately, I have so many contacts the Surname/First Name are not unique, only the custom unique ID is truly the way to distinguish individual contacts from each other. Is there a way to copy all the data across from my custom unique ID field to 'external\_identifier'? I've tried doing this with a SQL query in phpmyadmin but having no luck.

# Answer
You can do it with the API explorer. Go to **Support -\> Developer -\> API Explorer v4** and enter settings exactly like this, except the three places where I refer to "constituent\_information.my\_id\_field" you need to change it with the *exact* identifier of your custom field (to make sure you got it right, pick it from the "Add Select" list and then you can copy-paste it into the "chain" section):

PS the code in that "chain" section is a lot so here it is for you to copy (this part needs a dollar sign before the name of your field, but the Select section does not):

```
{where: [[id, =, $id]], values: {external_identifier: $constituent_information.my_id_field}}

```
> 2 votes

---
Tags: custom-fields, external-id
---


# Question
Title: Drupal 7 Views broken with upgrade to CiviCRM v5.69.2
We have a Drupal 7 site which is days away from being ready to migrate to Drupal 10.
Mapping the final rollover process in a dev environment, I had planned to upgrade CiviCRM on the D7 site to current, from 5.65.1 to 5.69.2.
The CiviCRM upgrade reported and appeared to be fine, and I opted to implement the recommended Smarty3.

Unfortunately all Drupal Views (eg Custom Formatted lists of events for registration) are now broken.

* When viewed, the Views show no results.
* When edited, all Fields display "Broken/missing handler".
* When attempting to add a new view, no CiviCRM entities are visible.

**Has anyone else encountered this, and any suggestions?**

I'll be rolling back and investigating whether deferring the CiviCRM upgrade until after Drupal is at v10 works better due to entity handling.

---

**Solved:** For reasons that are still a mystery to me, installing the Drupal module civicrm\_entity resolved this. The site has been running for years through many CiviCRM updates and this is the first time it's needed this. It seems to be required for *any* version newer than 5.65.1.

Hopefully this can save someone else a few hours work if they encounter the same thing!

# Answer
Solved: For reasons that are still a mystery to me, installing the Drupal module civicrm\_entity resolved this. The site has been running for years through many CiviCRM updates and this is the first time it's needed this. It seems to be required for any version newer than 5.65.1.

Hopefully this can save someone else a few hours work if they encounter the same thing!
> 2 votes

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


title: CV Does Not Work From Cron

text:
# Question
Title: CV Does Not Work From Cron
I am having an issue in Amazon Linux 2 where I can run cv commands from the command line but I cannot run cv commands from cron.

For example:

```
/usr/bin/php /usr/local/bin/cv  api job.execute --user=cronusersupport --cwd=/var/app/current

```

This command will run perfectly from the command line using the default ec2-user account. Running this command from cron while logged in as the same user will produce:

```
In civicrm.settings.php line 569:

  [Error]
  Failed opening required 'CRM/Core/ClassLoader.php' (include_path='.::/packa
  ges:.:/usr/share/php:/usr/share/pear')

```

I have been logging the output to a file. So my actual crontab looks like this:

```
*/15 * * * * /usr/bin/php /usr/local/bin/cv  api job.execute --user=cronusersupport --cwd=/var/app/current -vvv >> /opt/paao_civi_cron.txt 2>&1

```

I have even tried adding `cd /var/app/current &&` before this command to make sure the command is running from the correct place.

I have checked the verbose output and the last step that works correctly is `[Bootstrap:debug] Load settings file "/var/app/current/web/sites/default/civicrm.settings.php"`.

I have worked with AWS support on this and we tried things like making sure my $PATH was correct, running the command as an sh script, trying to run as the webapp user who owns the files, and I have even added the $civicrm\_root to line 569 of civicrm.settings.php to see if that would work.

I have the following config:

EC2 instance with remote RDS server. The server is running well for HTTP requests and cv commands when not run from cron.

Drupal - 9.5

CiviCRM -5.64.4

CV - 0.3.48

PHP - 8.0.30

If anyone has any ideas I would be very thankful as I am at a loss here.

I have the same setup working on Ubuntu and it is working perfectly.

Thanks!

# Answer
The problem here was $civicrm\_root being set in civicrm.settings.php based on an environment variable, which wasn't set during cron.
> 1 votes

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


# Question
Title: How do you answer the Opt-In question when applying for a 10DLC (10 digit long code) for sending SMS messages in the United States?
In the United States, you now have to apply for a 10DLC (10 digit long code) in order to send text messages from CiviCRM to your contacts.

I recently tried to follow all the instructions to register and I got through all of it except the last step: Registering a campaign.

I was rejected due to: "The campaign submission has been reviewed and it was rejected because of provided Opt-in information"

For the Opt In section of the form I wrote: "End users opt in by providing their cell phone number via an optional field on their membership form that lets them know they will receive text message reminders if they provide their number."

Apparently that is not good enogh. The approval requirements state:

```
Confirmation message must be delivered immediately after the Consumer opts into the program.
Message must contain
    Program or product description
    Customer care contact information
    Opt-out instructions
    Product quantity or recurring messages program disclosure
    “Message and data rates may apply” disclosure

```

In another spot, it says you have to include a link to your sign up page that demonstrates the opt in procedure and includes a link to your privacy policy and your terms of service.

I'm curious to know if anyone else has successfully applied for a 10DLC and if so what you put in your application for the Opt in procedure? It seems we would have to set up a scheduled reminder that can trigger on sign ups and send an SMS to be fully in compliance.

# Answer
> 1 votes
@gutyn - yes! After a lot of trial and error I have received approval. Here is what finally worked:

First, write a privacy policy and publish it on your web site.

Then create a CiviCRM profile form that includes first name, last name, mobile phone number, and the "Do NOT SMS" privacy field check box containing the label: Do NOT send me SMS messages (unchecked by default) and the post field help: If you do NOT want to received SMS messages check this box. If you leave this box UNCHECKED and you provide your cell phone number than you authorize ORGANIZATION XYZ to send SMS announcements about ORGANIZATION XYZ. Messaging data rates may apply. You can opt out by sending STOP at any time.

Be sure a link to your privacy policy is on the profile page (maybe in the footer).

Then, in the campaign application, provide answers along these lines:

* Description: This campaign sends reminders for upcoming educational webinars or membership meetings.
* Sending messages with embedded links?: Yes
* Sending messages with embedded phone numbers?: No
* Message Sample #1: Our webinar on XYZ is starting in 10 minutes and you are registered. You can join by following this link: https://example.net/123.
* Message Sample #2: Our annual membership meeting process is starting next month - please register by followingthis link: https://example.net/abc.
* How do end-users consent to receive messages?: End users opt-in by visiting \[Link to your Profile\] and adding their name and phone number and checking a box to agree to receive text messages from YOUR ORG. Opt in occurs after the form is filled out. See screenshot: LINK TO UPLOADED SCREEN SHOT.
* Opt-in Message: \[No option to opt-in via text message is available.\]

---
Tags: sms, twilio
---


# Question
Title: Wrong path for "Custom Template Directory"?
I use CiviCRM with WordPress. I previously migrated my site from Drupal.

I noticed today that my "Custom Template Directory", shown in Admin-\>Settings-\>Directories, is set to `[cms.root]/sites/all/civicrm_templates`. This path doesn't exist, and it looks like a holdover from Drupal-style paths.

What should this typically be set to in a WordPress installation?

# Answer
> 1 votes
The first question to answer would be did you actually have any custom templates in sites/all/civicrm\_templates and did you copy them over somewhere, since custom templates is an older override mechanism that still works but is a bit discouraged (use extensions instead).

Normally this path in blank in a fresh install, even for drupal.

If you did have files, then it depends where you copied them to, but it sounds like you didn't.

---
Tags: wordpress, custom-templates, paths
---


# Question
Title: Date Format in CiviEvent Widget is not in German Format
The date format in the CiviCrm event list widget switch not to german format. I administer all known format settings to the german settings. But only in the event list widget it shows no effect. Is there an option that I not found? I use wordpress 4.9.1 with Tortuga and CiviCrm 4.7.27

# Answer
> 2 votes
Set default via Administer -\> Localisation -\> Date Formats Date Format: Time Only %H:%M

Events use the activityDateTime, which can be adjusted here: Administer -\> Customise Data and Screens -\> Date Preferences

This will change event descriptions, confirmation mails and such. If you use a CiviEvent calendar, it's view is not corrected though.

# Answer
> 0 votes
Go to /wp-content/plugins/civievent-widget and edit following values written in 'single quotation marks' in civievent-widget.php:

* Change date from '%b %E, %Y' to '%d.%m.%Y' in line 192 (date).
* Change time frome '%l:%M %p' to '%H:%M' in line 196.
* You may like to change the title 'Upcoming Events' in line 173, too.

Please note that the next update of this plugin will override these settings.

---
Tags: civievent, widget
---


# Question
Title: TypeError:Return value of CRM_Contribute_Form_Contribution_Main::getConfiguredAutoRenewOptionForMembershipType() must be of the type int,null returned
***Drupal 7, CiviCRM 5.69.2, PHP 7.4, Smarty 2.***

While trying to access a contribution page at /civicrm/contribute/transact?reset=1&id=9 got an unexpected:

```
> TypeError: Return value of CRM_Contribute_Form_Contribution_Main::getConfiguredAutoRenewOptionForMembershipType()
> must be of the type int, null returned in CRM_Contribute_Form_Contribution_Main->getConfiguredAutoRenewOptionForMembershipType()
> (line 1863 of /srv/www/public_html/sites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Main.php).

```

# Answer
Turns out the "auto-renew" option has been cleaned up for all membership types while the latest upgrade, not sure why. Had to re-enable for each membership type at civicrm/admin/member/membershipType?reset=1
> 0 votes

---
Tags: upgrade, drupal-7
---


# Question
Title: Does CiviDiscount no longer work with new releases?
We are on WordPress 6.4.2 and CiviCRM 5.69.2

We have used the CiviDiscont extension for years. Now it is no longer available to download and install through the extension manager. Also the existing install that we already had appears to be missing. It was never uninstalled or deleted, however clicking the link in the menu just takes us back to the CiviCRM homepage and I cannot find any trace of CiviDiscount anywhere on the CiviCRM install.

# Answer
*Jan 22, 2024, WordPress 6.4.2, Powered by CiviCRM 5.69.2, free and open source AGPLv3 software.*

---

Please check CiviCRM (and the webserver) logs for oddities.
> 0 votes

---
Tags: cividiscount
---


# Question
Title: More friendly dashboard access denied message perhaps?
It is Wordpress page and Civi dashboard inserted via the shortcode`[civicrm component="user-dashboard" hijack="1"]` There are 3 components available at the "Display Preferences": Contributions, Memberships, Events. We've spotted expired Members get the "Sorry, due to an error..." message trying to access the page. How would you made this message more kind and user-friendly? Maybe even for Anonymous users?

**UPD** Thanks to @Coleman we seems to be having an alternative. The new User Dashboard extension is in early development therefore doesn't have a documentation yet, especially regarding permission settings. Currently it still displays the "Access Denied" page if a membership expires.

---

```
 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.
 You do not have permission to access this page.

```

# Answer
You might want to try the new Dashboard extension (`cv en user_dashboard`) which uses SearchKit & FormBuilder & is more customizable.

New Dashboard settings are here /wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsearch#/list?tab=packaged

You may want to unlock the results via "Bypass Permissions" button ( see attached grab ) even if you have all permissions granted.
> 1 votes

---
Tags: wordpress, dashboard, user-account, user-dashboard, user-experience
---


title: Expected one Contribution but found 25

text:
# Question
Title: Expected one Contribution but found 25
I am importing contributions from my donors from a .csv file. I have tested the process using a simple .csv file with one row of data for a payment from a donor I have already added to contacts. The import was successful, matching the contribution to the donor. When I try to repeat this process using a spreadsheet with approximately 40 rows of data (including multiple contributions from some donors) all rows of the spreadsheet fail to import and have the error message 'Expected one Contribution but found 2'. I am using the email address to match to contact.

Any ideas what I am doing wrong?

# Answer
> 4 votes
Since Imran is on CiviCRM Spark, I had a quick look at the issue. I think it was caused by the field mapping, where the import was trying to import the "Contribution Status", but there wasn't a status for "paid out", causing the import to fail.

So I changed the import mapping to ignore the import status (since the file only completed contributions), and it seems to have resolved the issue.

ADD-ON: this also happens when you try import Contributions with status=completed (as opposed to Completed)!

# Answer
> 0 votes
4 years later and different situation... if you use CiviSEPA, this may apply to you: https://github.com/Project60/org.project60.sepapp/issues/17

---
Tags: contributions, import
---


# Question
Title: bouncing emails to virgin emails with bare CR issue
We use CiviCRM version 5.64.4 to send mail on our Drupal site.

We have recently started having lots of email bouncing from btinternet, ntlworld and virgin email addresses. the reason given is:

> Remote host said: 552 5.2.0 Message contains bare CR and is violating 822.bis section 2.3

We have been unable to trace any issues with the code in CiviCRM so far and have contacted virgin about this issue. We have not made any recent changes or updates to CiviCRM.

Any suggestions?

# Answer
While they sound quite different, I believe you are having the same problem as the person who asked this Stack Exchange question.

There's a strict standard for email, but not everyone follows it down to the very last detail. CiviCRM uses "Pear Mail", and I think you're experiencing this bug.

You have a couple of options:

* If you have the choice to downgrade to PHP 7, this Github post suggests that it should fix the problem.
* Pear Mail 2.0, released this week, fixes this problem. CiviCRM incorporated version 2.0 2 days ago. That puts it in the 5.71 release (March 6th, 2024). You could wait and then upgrade.
* If you have a staff member or vendor who manages your CiviCRM, you could ask them to apply the patch right now.

If none of those are viable, please reply in the comments - I can point to this and propose that this fix be moved up into version 5.70 (February 7th, 2024). This isn't guaranteed to be accepted though, since it gives people less time to test the fix.
> 2 votes

# Answer
I am having this issue too - as I think many UK users will have as the email domains that are enforcing this are some of the largest in the country.
> 0 votes

---
Tags: civimail
---


title: SearchKit configuration management

text:
# Question
Title: SearchKit configuration management
We have quite a few SearchKit searches and now associated search forms associated with them. I am trying to understand how CiviCRM manages these files and what the best practice is for configuration management of these items.

The searches themselves along with any assoicated tables, lists etc appear to be stored in the database and thus survive a change in environment. If a form is created from a table or list within that search, CiviCRM then generates two files:

1. afsearchMyNewSearch.aff.json
2. afsearchMyNewSearch.aff.html

(I also seem to have a couple of older afformXXX.aff.son and html and not sure when they were created...)

These files seem to be created with the permissions of 640 with both owner and group being (in our case) www-data for Apache on my external environments (System Test/UAT/Prod)

Experimenting, once created, it looks to me that deleting these files will mean that they are lost forever and not recreated. If I make a change through CiviCRM, the files timestamp changes and all is good.

Trying to deploy a change from a repo causes a permission error if the file already exists on another controlled (i.e. not local) environment, because I did not deploy using the www-data user and we are trying to overwrite a read only file. It also changes the owner to the the deploying user. So this is a case where a change is made in just the form on a local dev environment (i.e. no database change) and we want to deploy this change.

I am trying to understand the best way to manage these forms as they would be time consuming to recreate. I know I can export and import each search plus their associated form/s, so perhaps storing those is a good target config item?

# Answer
Your analysis is correct about where the data is stored:

* SearchKit stores searches and displays in the database
* Afform stores form layout and form config in `.aff.html` and `.aff.json` files, respectively.

When using the CiviCRM API, the differences in storage are invisible. You can call `Civi\Api4\Afform::get()` or `Civi\Api4\SavedSearch::get()`, (or `::save()`, etc.) and it will read and write each from the correct place. The SearchKit "Export" button uses this api so that's why it is able to export everything (search, displays, and forms) into a single json string.

When you say you want the "best way", it depends on what you consider "best". Here are 2 good options:

1. **Best for simplicity:** *Use the SearchKit "Export" button.* This outputs search, displays & forms into one json string you can copy and paste from one site to the other with just a few clicks. If older versions of those items exist on the target site, they will be overwritten.
2. **Best for version-control/distribution:** *Create an extension.* SearchKit & FormBuilder were designed with extension packaging in mind. Use the command-line and type `civix export SavedSearch 123` from your extension's directory to package e.g. the SavedSearch with id 123 plus all associated search displays and Afforms. You can put your extension in a git repository, and even share it in the CiviCRM Extensions Directory.

When someone installs your extension, the searches & forms will immediately appear on their site, with the added benefit that any changes they make in the UI will be non-destructive: the local copy of the edited form doesn't overwrite the file in the extension, and there is a button in the UI to "revert" (which deletes the local file). Similarly the SavedSearch will have a "revert" button to overwrite local changes with the extension's version which is declared in a `.mgd.php` file.
> 6 votes

---
Tags: searchkit, formbuilder
---


# Question
Title: Allow a contact to select Employer using a profile form in Drupal account registration or Standalone
I would like to know how to create a profile that allows a user/contact to select their employer (Organization) while at the same time allow them to fill out standard contact/individual information like First Name and Last Name.

Currently I get an error message that says "Cannot add or update profile field type Organization with combination of Household or Member or Activity" whenever trying to create a profile to do the above.

How can a profile be created to allow for a user to add their contact details AND their employer details

Thanks for the assistance

# Answer
Based on your comments, it sounds like you're looking for the public autocomplete of organisation names extension. Then you must include the "Current Employer" field on the profile.

Note that when using traditional CiviCRM profiles, you can't collect information about the organization itself. You can only allow the individual to specify the employer name. If you need to collect information about the organization, you will need to use either Webform-CiviCRM or FormBuilder.
> 0 votes

---
Tags: drupal, webform-civicrm, profile, forms
---


# Question
Title: CiviEvent iCal download for some users is in Central time when we expect it to be in Eastern time
We're running CiviCRM 5.63.3 on Drupal. Our organization is in Florida which has both Eastern and Central time zones.

I have a longstanding problem - some of our members will register for an event I have created for noon eastern time and when they download the .ics file the event displays in their calendar for noon Central time. The event is set up in Eastern time. Most of our members, including all the members who send me emails about this, are in Eastern time.

Here is the iCal file and the google calendar link.

Here's the live Event Info page for your reference.

Why would this be happening?

# Answer
Our Drupal installation was, unbeknownst to me, set to Central (Chicago) time.

This didn't affect me as a registered user because I had previously set my timezone to Eastern (New York) so the .ics files I uploaded above were in the correct (Eastern/New York) timezone. @justin-freeman-agileware and @kapn are not registered users in our system so they were given .ics files in Central time.

This also explains why this problem was restricted to a limited number of our members, as many of our members were likely interacting with CiviEvent as registered users via tokens we sent them via email.

So, to summarize, people interacting with our Civi install as unregistered users were downloading iCal invites with our default timezone, which was incorrectly set to Central/Chicago time.
> 5 votes

# Answer
@valerie can you amend your question to include the correct timezone for your Event and also what timezone is set in your CMS? CiviCRM will use the CMS timezone when generating these files and if that's incorrect then the output will be incorrect also.

It looks like you have since changed the CMS timezone because the current ICS results differ from your original question.

Original ICS file in GDrive.

```
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
X-WR-TIMEZONE:America/New_York
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:STANDARD
TZOFFSETFROM:-0500
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:20240126T170000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:CiviCRM_EventID_119_0712e127d1846c6226284cfbaab67375@forms.fnps.org
SUMMARY:Mid-Session Briefing 2024
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC
  "-//W3C//DTD HTML 3.2//EN"><html><body><p><img al
 t="" src="https://forms.fnps.org//sites/default/fi
 les/civicrm/persist/contribute/images/yt%20thumb%2
 0comp(1).jpg" style="width: 400px\; height: 225px\
 ;" /></p>\n \n <p>The 60-day Florida Legislative S
 essions began January 9th. Join us for an update o
 n the good and bad bills that are making their way
  through committees.</p>\n \n <p>This presentation
  will be recorded and available later in case you&
 #39\;re not available on Friday at noon EST.</p>\n
  \n <p>Please click the grey &#39\;Register Now&#3
 9\; button below to register.</p></body></html>
DESCRIPTION:\n \n \n \n The 60-day Florida Legislative Session
 s began January 9th. Join us for an update on the
 good and bad bills that are making their way throu
 gh committees.\n \n \n \n This presentation will b
 e recorded and available later in case you're not
 available on Friday at noon EST.\n \n \n \n Please
  click the grey 'Register Now' button below to reg
 ister.\n \n
CATEGORIES:Lunch and Learn
CALSCALE:GREGORIAN
DTSTAMP;TZID=America/New_York:20240126T120000
DTSTART;TZID=America/New_York:20240126T120000
DTEND;TZID=America/New_York:20240126T130000
URL:https://forms.fnps.org/civicrm/event/info?reset=1&id=119
END:VEVENT
END:VCALENDAR

```

Updated ICS file from CiviCRM, https://forms.fnps.org/civicrm/event/info?reset=1&id=119

```
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
X-WR-TIMEZONE:America/Chicago
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:America/Chicago
BEGIN:STANDARD
TZOFFSETFROM:-0600
TZOFFSETTO:-0600
TZNAME:CST
DTSTART:20240126T180000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:CiviCRM_EventID_119_0712e127d1846c6226284cfbaab67375@forms.fnps.org
SUMMARY:Mid-Session Briefing 2024
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC
  "-//W3C//DTD HTML 3.2//EN"><html><body><p><img al
 t="" src="https://forms.fnps.org//sites/default/fi
 les/civicrm/persist/contribute/images/yt%20thumb%2
 0comp(1).jpg" style="width: 400px\; height: 225px\
 ;" /></p>\n \n <p>The 60-day Florida Legislative S
 essions began January 9th. Join us for an update o
 n the good and bad bills that are making their way
  through committees.</p>\n \n <p>This presentation
  will be recorded and available later in case you&
 #39\;re not available on Friday at noon EST.</p>\n
  \n <p>Please click the grey &#39\;Register Now&#3
 9\; button below to register.</p></body></html>
DESCRIPTION:\n \n \n \n The 60-day Florida Legislative Session
 s began January 9th. Join us for an update on the
 good and bad bills that are making their way throu
 gh committees.\n \n \n \n This presentation will b
 e recorded and available later in case you're not
 available on Friday at noon EST.\n \n \n \n Please
  click the grey 'Register Now' button below to reg
 ister.\n \n
CATEGORIES:Lunch and Learn
CALSCALE:GREGORIAN
DTSTAMP;TZID=America/Chicago:20240126T120000
DTSTART;TZID=America/Chicago:20240126T120000
DTEND;TZID=America/Chicago:20240126T130000
URL:https://forms.fnps.org/civicrm/event/info?reset=1&id=119
END:VEVENT
END:VCALENDAR

```
> 1 votes

---
Tags: civievent
---


# Question
Title: Changing information under current relationships tab
I want to change the columns in the relationships tab within each organisation, such as adding each person's job title and removing Start, End and State/Prov. Does anyone know how to do this?

# Answer
I think this is a duplicate of other question such as

which recommends using SearchKit to replace the Relationship Tab
> 0 votes

# Answer
In a recent Civi update the relationship tab was replaced with SearchKit, which makes editing the display a lot easier (though it briefly also caused our relationships tab not to work). The answer then I found in this ticket: Relationships not being displayed

From there, you can edit the searchkit table and form, but what was a lot easier for me was to edit the json before importing to add and remove the columns I wanted.
> 0 votes

---
Tags: relationships, column
---


# Question
Title: view contact no relationship tab and note tab?
in view contact page, i can not see relationship tab and note tab in my project, i try to find reason, i clicked Display Preferences-\> view contact setting, but only relationship tab and note tab no show on my view contact page, i dont know how to fix this bug.

civicrm 5.68 php 8.1

# Answer
We had the same problem and resolved it by importing the SearchKit/Form. The info came from this answer: Relationships not being displayed
> 0 votes

---
Tags: drupal
---


# Question
Title: Cannot access CiviCRM: "Undefined property: CRM_Core_Config"
With CiviCRM 5.69.2 on WordPress 6.4.2 and PHP 8.1, I'm getting the following when trying to access CiviCRM:

> There has been a critical error on this website. Please check your site admin email inbox for instructions.

Following are the logs:

```
PHP Warning: Undefined property: CRM_Core_Config::$extensionsDir in /app/data/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 89, referer: https://example.com/wp-admin/admin.php?page=civi_options

PHP Warning: Undefined property: CRM_Core_Config::$extensionsURL in /app/data/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 90, referer: https://example.com/wp-admin/admin.php?page=civi_options

PHP Warning: Undefined property: CRM_Core_Config::$uploadDir in /app/data/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 92, referer: https://example.com/wp-admin/admin.php?page=civi_options

PHP Fatal error: Uncaught CRM_Core_Exception: [0: Invalid currency ""\n\n thrown in /app/data/wp-content/plugins/civicrm/civicrm/CRM/Utils/Money.php on line 85, referer: https://example.com/wp-admin/admin.php?page=civi_options

```

This is a very small and simple CiviCRM install that was working a few months ago.

Any insight as to next steps?

# Answer
Solved.

Issue was related to `WP_CONTENT_DIR` being defined in `wp-config.php`.

Full details in this thread.
> 1 votes

---
Tags: wordpress, php, access, undefined
---


title: Ownership of a VIP contact

text:
# Question
Title: Ownership of a VIP contact
I would like to know the best way in CiviCRM to assign ownership of VIP contact records to specific staff members. When a contact is flagged as part of our VIP group, how can we designate an owner for their record from our staff?

The idea is for certain staff members to be stewards of these important VIP contacts. Their responsibility would be to periodically review the assigned VIP records to verify that the contact details are current and that VIP status remains warranted. Other staff members can however edit the record.

Would a tag showing which staff member owns oversight of that VIP contact be the way to do it. Is there a better way (that doesnt require creating tags of all staff)?

Any help appreciated.

# Answer
> 6 votes
I would suggest creating a new relationship type: "VIP Steward" -\> "Vip" and you can then add this relationship between staff members and contacts.

---
Tags: contacts
---


title: Duplicate records in UFMatch

text:
# Question
Title: Duplicate records in UFMatch
Wordpress 6.4.2, CiviCRM 5.69.2 Have got the "You have multiple records with the same uf\_id in civicrm\_uf\_match. You need to manually fix this in the database so that uf\_id is unique" but the "Learn More" link (https://docs.civicrm.org/sysadmin/en/latest/upgrade/todo/#todo) leads to a non-existing page.

There are duplicates indeed ( checked using the query below ). But what is the best course of action here?

```
SELECT uf_id, COUNT(*) AS record_count
FROM civicrm_uf_match
GROUP BY uf_id
HAVING COUNT(*) > 1;

```

# Answer
> 1 votes
The following SQL will show you the offending records:-

```
SELECT * FROM www_civicrm.civicrm_uf_match
where uf_id in
(SELECT uf_id FROM www_civicrm.civicrm_uf_match
group by uf_id
having count(*)>1)

```

This should give a list such as:-

```
id, domain_id, uf_id, uf_name, contact_id, language
'667', '1', '180', 'email@example.com', '1234', NULL
'668', '1', '182', 'email@example2.com', '1235', NULL
'669', '1', '180', 'email2@example.com', '1236', NULL
'670', '1', '182', 'email2@example2.com', '1237', NULL

```

So in this case we looked at the User and Contact records (using the Email and Contact ID) to find which one had logged in recently, or made a contribution, event reg, etc.... and removed the ones with older records.

Another option is to update this table with the correct UF\_ID and ContactID if the records are valid.

**Please backup your DB when deleting the offending records via SQL.**

# Answer
> 1 votes
I think the big question is going to be *how* you got duplicate uf\_ids and how to prevent it from happening. How many duplicates are you seeing? The only fix I can think of is to manually remove the duplicates, but manual database changes can be a little risky. If there are just a few of them, then try to identify the "right" one, and delete the other one. If there are loads of them, I'd say look for a pattern and go from there. In any case, it will probably need to be a manual database fix. Sorry this is sort of a vague answer!

---
Tags: database
---


# Question
Title: Has anyone successfully used MembershipExtras 6.0 from Compucorp on with CiviCRM 5.66 or newer on WordPress?
I have noticed that Membership Extras has not been updating as I've updated the rest of my WordPress CiviCRM extensions and so I am running MembershipExtras 2.1 instead of 6.0. But now I'm woefully behind on my upgrades and need to know if the latest Civi for WordPress will support MembershipExtras 6.0. I need to upgrade soon, as the module may be blamed for frequent crashes of my WordPress installation (it seems I frequently have to be on recovery mode). Has anyone successfully used MembershipExtras 6.0 from Compucorp on with CiviCRM 5.66 or newer on WordPress?

In my latest conversation with CompuCorp I'm told that they have a specially patched version of Civi 5.51.3 that will support it, but I am reluctant to downgrade Civi, and am worried about the unpredictability of the results of that. Is there a significant risk to downgrading to an older Civi?

# Answer
> 1 votes
Due to the complex nature of Membership Extras it is designed and tested to work with a specific and patched version of CiviCRM that Compuco host via our Github. Using Membership Extras with an earlier or newer version of CiviCRM may lead to unexpected issues.

In the extension info.xml file, see the “comments” field where we specify the currently supported version of CiviCRM and have a download link to the correct version: See here:

https://github.com/compucorp/uk.co.compucorp.membershipextras/blob/a0f3…

Currently (at the time of writing) this is a patched version of CiviCRM 5.51.3, which can be found here: https://github.com/compucorp/civicrm-core/releases

This patched version maybe earlier than the latest version of CiviCRM but includes all security patches.

I've tried to update all the places that we list the extension to mention this but if you spot anywhere else then do let me know and I'll update!

Another option to get membership extras is to look into CiviPlus (https://www.civi.plus/). CiviPlus is our hosted version of Civi and brings together all the very best features of the amazing CiviCRM platform from all around the community and combines it with our Compuco know-how to give you the best possible CiviCRM experience. Migrating to CiviPlus is easy using our automated CiviCRM migration tool.

---
Tags: civimember
---


# Question
Title: Reply-to field is not visible on new mailing
It is not possible to select reply-to on new mailing screen

# Answer
Yes, it is a known issue with the bootstrap theme reported at https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/628

We were able to fix it by adding the following CSS into our theme css or custom civicrm css

```
.form-group .select2-container.ng-not-empty a {
  min-height:30px;
}

```
> 6 votes

---
Tags: civimail
---


# Question
Title: CiviCRM Navigation Menu not displaying and UI is abnormal
Hi Fellows I am a newbie to drupal and civicrm I have just installed CiviCRM(5.48.1) on Drupal 9(hosted on Azure Linux VM). But I found out my navigation menu is missing and the UI is set a drupal style. I have tried on clearing caches and reset paths as advised by other posts, however it doesn't work. Do you gys have a clue on this? Happy Holidays!

# Answer
Make sure your server has write permissions to /web/sites/default/files/civicrm/persist/contribute
> 0 votes

---
Tags: display
---


title: Ncn-civi-zoom or ZoomZoom?

text:
# Question
Title: Ncn-civi-zoom or ZoomZoom?
Exploring a possibility of Zoom.us integration. There are quite a lot of search results to read, however in 2023, which of the extensions has, in your opinion, smoother integration experience? It looks like both rely on CiviRules but would one of them work without it? Thanks for any input!

# Answer
> 3 votes
I made a little table comparing CiviZoom Alternative and ZoomZoom. Maybe it will help someone else.

# Answer
> 1 votes
Can't say what is 'best', but CiviZoom Alternative works. The older JWT authentication was retired by Zoom in favour of OAuth. You do need CiviRules but it is simple to set up.

---
Tags: civirules, integration, zoom
---


title: Membership price set order is wrong

text:
# Question
Title: Membership price set order is wrong
I'm having an issue all of a sudden with the ordering of Membership price sets on contribution pages. They are being displayed in an odd sequence that is confusing. It was never like this in the past and seemed fine before today. Additionally, making deliberate changes to the ordering has no effect on the output.

I've cleared caches with no discernable effect. I have disabled the new searchkit based admin and search interfaces with no change. I attach screenshots of the profile editor and the output.

CiviCRM 5.68.0 on WordPress 6.4.2

UPDATE: I have tried many things including recreating the price sets in the correct order so I don't have to re-shuffle after the fact. That seemed to work for a time, but now the new versions are having the same problem.

Further, I have attempted to recreate the problem over at https://dmaster.demo.civicrm.org as @petednz - fuzion suggested. The problem does not occur there.

This same site had a relationship cache issue and I wonder if there are other caches that are screwed up and what I might do to reset them?

# Answer
> 3 votes
This is fixed in CiviCRM 5.69+: https://github.com/civicrm/civicrm-core/pull/28842

---
Tags: civicontribute, price-sets
---


title: ACLs and Permission to add to Groups

text:
# Question
Title: ACLs and Permission to add to Groups
I am trying to setup our Civi with a horizontal and vertical permission structure for different departments and roles. By horizontal I mean what's configured in WP Permissions such as access to CiviComponents and their actions so every department can have an "admin" and a "hand" group. By vertical I mean what's controlled by ACLs such that a department has only access to data within the respective groups.

For example the Membership department would have three Groups, "Membership Admin", "Membership Hand" (both of which are access control groups) and "Member". The Admin Group has access to read/write/delete Contacts and extensive access to CiviMember rules but is restricted in ACLs to read/edit only Members of the "Membership Admin", "Membership Hand" and "Member" Groups. The Hand would then have a more restricted ruleset and ACLs to read/edit and "Members" only.

But the unexpected behavior I encountered is that Members of both Admin and Hand groups cannot add nor remove anyone to the Groups visible to them. I can confirm that Groups are visible to them as expected but when I try to remove a Group from a Contact down the chain of access I get an Error "*API permission check failed for GroupContact/delete call; insufficient permission: require access CiviCRM and edit all contacts*". And also the Button to add a contact to a Group is not being shown in the contact-\>groups window. When trying to add contacts via the manage groups menu I get "*Select Group is a required field*" at the last step when trying to confirm the action and the field for the target group is empty.

Is there a way to fix this? I found a couple of posts regarding this behavior here but no solution. And grating "edit all Contacts" is no feasible option as it would grant access to all contacts.

Help is much appreciated!

# Answer
> 1 votes
I found a suitable Plugin: Group Administrators does the Job! Great Plugin

https://civicrm.org/extensions/group-administrators

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


# Question
Title: Anyway to export all data for import into a local instance?
I know we can export contacts and activities but is there anyway to export everything (ex. activity types, custom contact fields, etc) so that I can import everything into a fresh Joomla/Civi install in my local development environment? I don’t have access to the remote database or website files themselves so I was hoping there was a native way to do this or perhaps a plugin or extension?

Thanks, Jason

# Answer
> 1 votes
You can use the CiviCRM Configuration Loader extension which will export / import a good deal of entities including contact types, relationship types, activity types, custom fields, campaign types, membership types, event types, case types, message templates and CiviRules.

Make sure you include the option groups with the custom fields they are a part of.

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


# Question
Title: How do I print the "received date" on an invoice?
I have an urgent problem with invoices. For our finance department, I have to print out all invoices we generated this year. On the invoice, it HAS to display the date the invoice was issued, but instead it displays the date that I print the invoice.

In the template, the line

> {ts}Invoice Date:{/ts} {$invoice\_date}

gives me the CURRENT date, not the date the invoice was issued.

I have looked for other variables I could use, but I had no luck finding anything.

Does anyone have a solution for this?

# Answer
EDIT (petednz) - there is a newer solution in 2024 - see other answer

I came accross the same issue. The invoice date gives the current date and that is in most cases not correct.

We have used the receive date of the contribution in the invoice template as follows.

```
...
{crmAPI var='contribution' entity='Contribution' action='getsingle' id=$id}
...
{ts}Invoice Date:{/ts} {$contribution.receive_date|crmDate:$config->dateformatFull}
...

```

The top line with `{crmApi...}` could be present already in the template. So check whether you can find that line. The `{crmApi...}` line is not defined before the `{$contribution....}`
> 5 votes

# Answer
The best approach in recent versions of CiviCRM is to replace `$invoice_date` with

```
{contribution.receive_date|crmDate:"Full"}

```
> 3 votes

---
Tags: civicontribute, receipts, invoice
---


# Question
Title: Message templates token replacement: is it {if membership_end_date} or {if {membership_end_date}}?
And similarly, would it be `{membership_end_date|crmDate}` or `{{membership_end_date}|crmDate}`?

# Answer
It should be `{if '{membership.end_date}'}` and

```
{membership.end_date|crmDate}

```
> 7 votes

---
Tags: tokens, message-templates, smarty
---


title: Case member to a single case

text:
# Question
Title: Case member to a single case
How can I add more members to a specific case?

Use case: We have group of people working on a case however these groups won't have same members everytime. How can add group of people specific to a case?

Adding members to Case resource results in adding to Case Resource group which is added to all cases. We don't want to go towards adding relationships. Any other ways we can achieve this?

# Answer
> 1 votes
CiviCRM 5.69 allows you to add a Custom field against Case as a multi-select contact reference field.

HTH

Pradeep

# Answer
> 3 votes
You can add people in the Roles section on manage case. Click the Add New Role button or click on the pencil icon on one of the rows to edit an existing one. You can have multiple of the same type.

---
Tags: civicase
---


# Question
Title: Uncaught CRM_Core_Exception: [0: Invalid postal greeting
I recently migrated a CiviCRM database from Drupal to Wordpress, but using the same version of CiviCRM (5.55.2). Now when I try to export contacts to CSV using the web UI, I'm getting this error:

```
Fatal error: Uncaught CRM_Core_Exception: [0: Invalid postal greeting thrown in
 *redacted*/www/wp/wp-content/plugins/civicrm/civicrm/api/api.php on line 135

```

That exception is being thrown here, in `civicrm_api3`:

```
function civicrm_api3(string $entity, string $action, array $params = []) {
  $params['version'] = 3;
  $result = \Civi::service('civi_api_kernel')->runSafe($entity, $action, $params);
  if (is_array($result) && !empty($result['is_error'])) {
    throw new CRM_Core_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result);
  }
  return $result;
}

```

The error happens even before I can select fields for export, so it must be happening when constructing the result object?

Any suggestions for fixing this?

I do plan to upgrade to a newer CiviCRM, but I'm not sure whether I should fix this problem first (bad data?) or attempt upgrades even though this is happening.

**Edit to add**: there's no error being written to `wp-content/uploads/civicrm/ConfigAndLog` when I get this error in the browser. HOWEVER, there's an error there every once in a while, which I think is unrelated but since it's the only problem appearing in the logs I'll include it here:

```
  "message" => "The requested Profile (gid=12) is disabled OR it is not configured
to be used for 'Profile' listings in its Settings OR there is no Profile with
that ID OR you do not have permission to access this profile. Please contact
the site administrator if you need assistance."

```

**Edit again:** It looks like there are actually quite a few more errors that I hadn't noticed before, such as these:

```
Warning: Undefined array key "groups" in *redacted*/wp-content/uploads/civicrm/templates_c/en_US/%%1B/1BD/1BD7DE8F%%Statistics.tpl.php on line 14

Warning: Undefined array key 4182 in *redacted*/wp-content/uploads/civicrm/templates_c/en_US/%%33/33E/33E84618%%Detail.tpl.php on line 185

Warning: Trying to access array offset on value of type null in *redacted*/wp-content/uploads/civicrm/templates_c/en_US/%%33/33E/33E84618%%Detail.tpl.php on line 185

Warning: Undefined array key 4182 in *redacted*/wp-content/uploads/civicrm/templates_c/en_US/%%33/33E/33E84618%%Detail.tpl.php on line 185

Warning: Trying to access array offset on value of type null in *redacted*/wp-content/uploads/civicrm/templates_c/en_US/%%33/33E/33E84618%%Detail.tpl.php on line 185

Warning: Undefined array key 4182 in *redacted*/wp-content/uploads/civicrm/templates_c/en_US/%%33/33E/33E84618%%Detail.tpl.php on line 185

Warning: Trying to access array offset on value of type null in *redacted*/wp-content/uploads/civicrm/templates_c/en_US/%%33/33E/33E84618%%Detail.tpl.php on line 185

```

Does it look like there's some version software mismatch somewhere? I've cleared out the templates cache but they get recreated and still generate this same error.

**Edit the third:**

I added some debugging info to the thrown exception:

```
      if (!in_array($greetingVal, $greetings)) {
        throw new CRM_Core_Exception(ts('Invalid %1 greeting %2 (type %4) in %3',
          [1 => $key, 2 => $greetingVal, 3 => var_export($greetings, true), 4 => gettype($greetingVal)]));
      }

```

Output:

```
Fatal error: Uncaught CRM_Core_Exception: [0:
 Invalid postal greeting 1 (type string) in array (
 1 => 'Dear {contact.first_name}',
 2 => 'Dear {contact.prefix_id:label} {contact.first_name} {contact.last_name}',
 3 => 'Dear {contact.prefix_id:label} {contact.last_name}',
 4 => 'Customized',
 5 => 'Dear {contact.household_name}', ) thrown

```

So it looks like there's a type mismatch, string vs. int - not sure how that happens since `civicrm_contact.postal_greeting_id` is declared in the database as `int(10) unsigned`.

# Answer
> 1 votes
I never figured out what was causing this problem, but the solution seems to have been upgrading from 5.55 to 5.66. I did the upgrade all at once, so I'm not sure which specific version resolved it.

---
Tags: error
---


# Question
Title: Survey Error "Oops. It looks like there is no response option configured."
I have created a campaign and now created my first survey. I added the questions I want answered and then reserved some respondents. When I click on interview respondents, I get the error message "Oops. It looks like there is no response option configured."

What am I missing or what have I done wrong please?

# Answer
Can you make if you have added the options or selected existing options under Results tab of a Survey settings?
> 3 votes

---
Tags: civicampaign
---


title: if in adress labels

text:
# Question
Title: if in adress labels
can I somehow make an if-statement in the adress labels

What I want to do is a diffent label depending on the contact type. Basically something like this (not working)

```
if (contacttype = "organisation") {
   {contact.display_name}
   {contact.street_address}
   {contact.postal_code} {contact.city}
   {contact.country}
}

if (contacttype = "individual) {
   {contact.display_name} > works
   {contact.street_address}
   {contact.postal_code} {contact.city}
   {contact.country}
}

```

The organisation tokens work but with the individual adress I have a problem because I somehow have to get the street of the organisation. I tried {contact.employer\_id.street\_address} but no sucess

thanks for any help werner

# Answer
So I haven't tried this but if it were going to work I think it would look like

```
{if '{contact.contact_type}' == "Organization")}
   {contact.display_name}
   {contact.address_primary.street_address}
   {contact.address_primary.postal_code} {contact.address_primary.city}
   {contact.address_primary.country_id:label}
{/if}

{if '{contact.contact_type}' == "Individual")}
   {contact.display_name} > works
   {contact.employer_id.address_primary.street_address}
   {contact.employer_id.address_primary.postal_code} {contact.employer_id.address_primary.city}
   {contact.employer_id.address_primary.country_id:labe}
{/if}

```
> 1 votes

---
Tags: tokens
---


title: Event registration page formatting

text:
# Question
Title: Event registration page formatting
I'm previewing my event registration on TestDrive and I don't like the formatting at all. Is this something that I can modify in CiviCRM? Or is this a WordPress issue? I want the text to go across the screen. It seems to be funneled down a column instead of across the screen.

***I WANT*** \**Fri Only (13 & Up) (Includes automatic member discount of: 20% Member Discount) \***

***NOT:*** \**Fri Only (13 &
Up) (Includes
automatic
member
discount of:
20% Member
Discount) \***

# Answer
This is controlled by your WordPress theme. If this site is only for CiviCRM, you can try changing your theme to something that looks nicer.

If not, you will need to make CSS edits in your theme.
> 0 votes

# Answer
This is (probably) CiviCRM being a bit retro in how it thinks forms should display.

If your other forms are not doing this, then you'll probably notice that this behavior only happens with a wider screen, and if you shrink down your screen, it behaves in a more modern way with the labels above the form elements.

If you don't want this to happen, you can do some custom edits to your css, or you could also try out my CiviCRM theme here: https://github.com/adixon/toronto

This "theme" can be manually installed as a civicrm extension (not yet available as automated) and then 'enabled' for your front end within CiviCRM itself. All it really does is try to strip out some old-fasioned css that has been plaguing civicrm for a while (e.g. what you experienced, as well as some font-forcing).
> 0 votes

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


# Question
Title: Can this Stripe webhook error message be ignored
Stripe payments are working but this message is a concern. Also shows failures on Stripe developer dashboad.

Is there a way to stop it?

Here is the message from Stripe:

```
Hi there,

We’re still having trouble sending requests in live mode to a webhook endpoint associated with your XYZ account. Stripe sends webhook events to your server to notify you of activity in your Stripe account, such as a completed payout or a newly-created invoice.

The URL of the failing webhook endpoint is: https://nb.abcdef.org/civicrm/payment/ipn/1

```

# Answer
> 0 votes
You can disable the webhooks from the stripe portal and create again from CiviCRM admin status page

---
Tags: stripe
---


# Question
Title: Change output for address Entity Reference
I added a Entity Reference custom field for Address entity.

When I search an address the autocomplete shows the street\_address, postal\_code, city, province and country. But I'd like also to show address\_name and supplemental\_address.

And in form view also:

How can I do this?

PS: I'm using latest version of CiviCRM on WordPress.

# Answer
Disclaimer: There may be newer/simpler ways of doing this now that SearchKit has a "autocomplete" display, but I have not experimented with it yet, and not sure if we can use it to override a EntityReference field.

In a custom extension, you can implement an auto-complete provider that overrides the default behaviour. Here is an example.

1. add the `scan-classes@1.0.0` mixin to the `info.xml` file of your extension:

```
  <mixins>
    [...]
    <mixin>scan-classes@1.0.0</mixin>
  </mixins>

```

Then create the directory for the service, where we will create the PHP file:

```
mkdir -p Civi/Api4/Service/Autocomplete/

```

Now create a file called `Civi/Api4/Service/Autocomplete/MyAddressAutocompleteProvider.php` with the following contents:

```
<?php

namespace Civi\Api4\Service\Autocomplete;

use Civi;
use Civi\Core\Event\GenericHookEvent;
use Civi\Core\HookInterface;

/**
 * @service
 * @internal
 */
class MyAddressAutocompleteProvider extends \Civi\Core\Service\AutoService implements HookInterface {

  /**
   * Provide default SearchDisplay for Address autocompletes
   *
   * @param \Civi\Core\Event\GenericHookEvent $e
   */
  public function on_civi_search_defaultDisplay(GenericHookEvent $event): void {
    if ($event->display['type'] !== 'autocomplete' || $event->savedSearch['api_entity'] !== 'Address') {
      return;
    }
    $event->display['settings'] = [
      'sort' => [
        ['street_address', 'ASC'],
      ],
      'columns' => [
        [
          'type' => 'field',
          'key' => 'street_address',
          'rewrite' => '[street_address], [city]',
          'empty_value' => '[city]',
        ],
        [
          'type' => 'field',
          'key' => 'state_province_id.name',
          'rewrite' => '[postal_code], [state_province_id.name], [country_id.name]',
          'empty_value' => '[country_id.name]',
        ],
        [
          'type' => 'field',
          'key' => 'id',
          'rewrite' => '#[id]',
        ],
      ],
    ];
  }

}

```

You can rename `MyAddressAutocompleteProvider` to something more relevant to your extension name, but avoid calling it just `AddressAutocompleteProvider` because that's what it is called in CiviCRM core.

Notice in my example above, that I added the `[postal_code]` as part of the second line, before the state/province. When fields are added in the rewrite, they are automatically added to the SQL query for autocompletes.

For all of this to work, you will need to flush the CiviCRM cache (either from the admin menu, or `cv flush` on the command line).

This example was based on the official documentation, although some bits were not obvious to me at first.
> 1 votes

---
Tags: entity-reference, entityref
---


# Question
Title: Adding Custom Fields to Open Case Screen
I have created a custom data set of items to open a case that I was hoping would show in the new case screen:

But these fields are not showing up in the open case area nor are they showing in the manage case area. What am I missing?

I did find the other two questions regarding this concept to a degree. But neither really have the answer I need. Thank you!

USE CASE:

Families submit inquiries for youth available for adoption. I want to capture each inquiry form submission as a case with notes on custom questions we ask on inquiry forms. The caseworker would then view these details when they go into the case.

UPDATE:

It is now showing when a case is saved once I make a new one as an inline group. But it is not showing in the Open Case screen when type selected.

# Answer
I think I see the problem. Your screenshot shows the custom field group as having display type of Tab, but only Inline will work. Only Contact custom fields can be displayed as Tab.

Here's what I think you did because I can reproduce it: You started with Contacts, then changed the display type to Tab, then switched the entity (aka the Used For) to Cases. This hides the display type field but it still had Tab behind the scenes.

To fix this, do the same thing again in reverse: Edit the settings for the group, change the entity to Contacts, set the display type to Inline, then set the entity back to Cases. You'll need to select the youth inquiry case type again as well. Then save.
> 1 votes

---
Tags: custom-fields, civicase
---