# Question
Title: Error 500 when adding or modifying membership
When manually adding without recording a membership payment or modifying a membership I am getting an an error 500. Renewing with payment from front-end and manually adding a membership when recording a payment still works.

The error happens when doing the AJAX call to:

`https://mysite.com/administrator/?option=com_civicrm&task=civicrm/contact/view/membership&action=add&cid=2180&context=membership&snippet=json`

When enabling debugging, the response contains this error:

`0 key(): Argument #1 ($array) must be of type array, null given`

We have noticed this in CiviCRM 5.50.3, but it still occurs after upgrading to 5.53.0. I have also tried with PHP 7.4 and 8.0.

I am currently running on Joomla 3.10.11, CiviCRM 5.53.0 and PHP 8.0.

Edit: I could not get a backtrace because the error seems to have been caught by Joomla, not by CiviCRM. Nothing were in my logs, so I enabled debugging in Joomla to find the following:

```
An error has occurred.

    0 key(): Argument #1 ($array) must be of type array, null given
    /var/www/public_html/administrator/components/com_civicrm/civicrm/CRM/Member/BAO/Membership.php:2031

Call stack
#   Function    Location
1   ()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/BAO/Membership.php:2031
2   key()   JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/BAO/Membership.php:2031
3   CRM_Member_BAO_Membership::setQuickConfigMembershipParameters()     JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/Form.php:444
4   CRM_Member_Form->ensurePriceParamsAreSet()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/Form.php:497
5   CRM_Member_Form->setPriceSetParameters()    JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/Form/Membership.php:1019
6   CRM_Member_Form_Membership->submit()    JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/Form/Membership.php:878
7   CRM_Member_Form_Membership->postProcess()   JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php:573
8   CRM_Core_Form->mainProcess()    JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:152
9   CRM_Core_QuickForm_Action_Upload->realPerform()     JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:119
10  CRM_Core_QuickForm_Action_Upload->perform()     JROOT/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
11  HTML_QuickForm_Controller->handle()     JROOT/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
12  HTML_QuickForm_Page->handle()   JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php:355
13  CRM_Core_Controller->run()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/Page/Tab.php:324
14  CRM_Member_Page_Tab->edit()     JROOT/administrator/components/com_civicrm/civicrm/CRM/Member/Page/Tab.php:394
15  CRM_Member_Page_Tab->run()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:319
16  CRM_Core_Invoke::runItem()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:69
17  CRM_Core_Invoke::_invoke()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:36
18  CRM_Core_Invoke::invoke()   JROOT/administrator/components/com_civicrm/civicrm.php:121
19  civicrm_invoke()    JROOT/administrator/components/com_civicrm/civicrm.php:40
20  require_once()  JROOT/libraries/src/Component/ComponentHelper.php:402
21  Joomla\CMS\Component\ComponentHelper::executeComponent()    JROOT/libraries/src/Component/ComponentHelper.php:377
22  Joomla\CMS\Component\ComponentHelper::renderComponent()     JROOT/libraries/src/Application/AdministratorApplication.php:101
23  Joomla\CMS\Application\AdministratorApplication->dispatch()     JROOT/libraries/src/Application/AdministratorApplication.php:159
24  Joomla\CMS\Application\AdministratorApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:225
25  Joomla\CMS\Application\CMSApplication->execute()    JROOT/administrator/index.php:51

```

Edit 2: If it helps, this was an ancient install that was running Joomla 1.5 and CiviCRM 3.4.8 then progressively upgraded to the current version.

# Answer
> 2 votes
Well I think I resolved my issue.

There was some HTML and JavaScript embedded in the description of one my memberships. I discovered it when inspecting the variables in **JROOT/administrator/components/com\_civicrm/civicrm/CRM/Member/BAO/Membership.php:2031** This info was relayed in the background and I am guessing PHP did not like it. After removing it, the error went away.

Thanks for the pointers Jon G!

---
Tags: civimember, joomla, error-page
---


# Question
Title: Can I delete all the extension.json files in my civicrm/upload/cache folder?
There's a lot of these extensions.json files in sites/default/files/civicrm/upload/cache, some with really old dates, but nothing seems to be newer than June 2022. Can I delete them?

# Answer
Yes if you're on 5.52 or later. (Or even if you're not it's ok - it will just make a new one when it needs.)

Storage was changed to SQL storage in 5.52. See https://github.com/civicrm/civicrm-core/pull/23768. So there won't be any new such files created and you don't need them. You can also delete timestamp.txt.
> 3 votes

---
Tags: extension, cache
---


# Question
Title: Where can I find a (partial) list of 'big charities' based in the UK which already use CiviCRM?
I'm volunteering for a small UK-based charity interested in switching its CRM system (from Insightly to something which addresses more of their requirements). It would be reassuring for them to see a (partial) list of 'big charities' based in the UK which already use CiviCRM. I think I've recently come across such a list but I can't now for the life of me recall where I may have seen it. Does such a list exist online? Thank you.

# Answer
> 4 votes
A google search like

> "civicrm/contribute/transact" site:.uk

will give a lot of results for UK users of civi (of course only those which use a contribution form)

You may also find some useful names at https://civicrm.org/case-studies

# Answer
> 1 votes
That is complicated in the open source world :-) The community only knows about organizations using CiviCRM when they tell us about it. There is no contract that needs signing or anything like that. Anything that does exist online will very likely be incomplete and potentially incorrect.

I can tell you about 2 of my customers in the UK that use CiviCRM: Article19 (https://www.article19.org/) and NIHR BioResource (https://bioresource.nihr.ac.uk/). But please note that they might use other parts of CiviCRM than your organization might be aiming for?

There is also this more general information: https://civicrm.org/blog/cividesk/how-many-organizations-use-civicrm-where-how

---
Tags: evaluating-civicrm
---


title: Wrong currency on contribution page

text:
# Question
Title: Wrong currency on contribution page
I am using CiviCRM version: 5.46.3 and DruPal version: is 7

There was a similar question: question 26123

In CiviCRM - Administer - Localisation - languages, currency, location: we have GBP as the default currency

When I set up a Contribution Page to show AUD$, this amount is shown on the first screen where the credit card payment is set up by the User. However, in the contribution confirmation screen, the payment/contribution is shown in GBP (not AUD$).

If I change the default currency to AUD$ in: CiviCRM - Administer - Localisation - 'languages, currency, location' then the contribution confirmation screen shows as AUD$.

The available currencies in: CiviCRM - Administer - Localisation - languages, currency, location include GBP and AUD$.

We need to be able to use GBP or AUD$.

Do you have a solution for this?

# Answer
Had the same problem with AUD and NZD currencies configured with v5.50.4 and Wordpress 6.02.

We didn't have the Formatting Locale set to match the default country (Australia).

When this option was not set invoices showed the currency prefix for line items e.g. A$100

The fix was to assign the Formatting Locale to match the default currency (i.e. country) in Settings - Localization. Once that was done the currency prefix was removed from invoices.
> 0 votes

---
Tags: contribution-page, confirmation, currency
---


title: 'cv' script with arguments

text:
# Question
Title: 'cv' script with arguments
Is it possible to pass command-line arguments to a script that's being run with `cv`? If I try the obvious thing and just pass the argument after the script name, I get this:

```
$ sudo -u daemon `which cv` scr find_contact_id.php foo

  [Symfony\Component\Console\Exception\RuntimeException]
  Too many arguments, expected arguments "command" "script".

php:script [--level LEVEL] [-t|--test] [-U|--user USER] [--] <script>

```

No difference if I put a `--` after the script name to try to separate arguments. If I quote `"find_contact_id.php foo"` as the script, it says:

```
$ sudo -u daemon `which cv` scr "find_contact_id.php foo"
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /bitnami/drupal/sites/default/files/civicrm/ext/org.wikimedia.contacteditor/contacteditor.civix.php on line 246
Deprecated: Array and string offset access syntax with curly braces is deprecated in /bitnami/drupal/sites/default/files/civicrm/ext/org.wikimedia.contacteditor/contacteditor.civix.php on line 246
Failed to locate script: find_contact_id.php foo

```

Is there a way to do this?

My `cv` version info:

```
$ sudo -u daemon `which cv` --version
cv v0.3.27

```

**Update:** `cv` ticket "Feature request: command line arguments" posted at https://github.com/civicrm/cv/issues/133 .

# Answer
> 1 votes
I don't think you can directly pass arguments to `cv` scripts, but you can work around it:

`$ env CV_ARGS="arg1 arg2 arg3" cv scr my_script.php`

my\_script.php:

```
<?php

$my_args = getenv("CV_ARGS");

var_dump($my_args);

```

---
Tags: cv
---


# Question
Title: How do I change the default URLs to contribution or event registration pages?
Is there a way to customize the default URLs on public-facing contribution pages or event info/registration pages to make them match the site URL schema better?

For example, a default event page URL could be something like this:

But it would be wonderful to be able to set that page to be something like this:

In some CMS setups, this would also allow better control over sidebar content that should show up only on certain contribution pages or event pages.

# Answer
CiviCRM itself provides no mechanism for customizing any URL aliases, or for generating them automatically. This is handled in the CMS or at the webserver level through URL Rewrite on IIS, mod\_rewrite on Apache, ModRewrite in Lighttpd, and so on.

By the book, manual aliases or redirects for contribution pages or any other CiviCRM pages are to be handled at the CMS or webserver levels.

### Drupal

The recommended route is to use the **Redirect module**, which allows you to manually set up 3xx redirects.

The **core Path module in Drupal does not support query strings**, unfortunately (this is a frequently requested feature). Aliases are designed to work with internal Drupal system paths, which CiviCRM paths are not. If you want to use aliases instead of redirects, you'll need to use a workaround, some of which are suggested in the referenced thread:

Instead of using the CiviCRM-generated contributon or registration forms, you could use also Webform CiviCRM Integration to create a webform for it. Since the webform is a Drupal node, it will work with pathauto and should work with all other Drupal modules and APIs related to path aliasing.

On one of my sites, we don't display the contribution page directly, but use **Drupal Views** to provide a more custom layout. This neatly solves the issue because you aren't using a CiviCRM path at all, and only need to send, for instance, the event ID: https://example.net/myview/3 . Since this is a valid system path, it can not only be aliased but used in menus, and thus become https://example.net/fundraiser easily.

For example, we might set up two views: one listing upcoming events, and one to display details of an individual event. In the first view, we retrieve the event ID but hide it from display, outputting in the path to the second view. Thus, /myview/\[event\_id\] gets populated as /myview/3. In the second view, the event\_id is set up as a Contextual Filter (known in D6 as Arguments), and then we can pick and choose what fields or event information to display.

There isn't any mechanism to set up the redirects or aliases automatically. CiviCRM does not implement the Pathauto api, and exposes no Rules Events related to contribution pages or event creation to Rules.

### Joomla

In Joomla, the suggested solution is to create a menu link for the contribution page and define the **"pretty" URL** in the alias field; naturally, Search Engine Friendly URLs must be enabled in GlobalSettings.
> 14 votes

# Answer
In Drupal 7, the book is a bit out of date, as URL aliases work now.

1. Navigate to Configuration \> Search and metadata \> URL aliases \> Add alias (this leaves you at /admin/config/search/path).
2. Enter the CiviCRM url (without the domain part) in Existing system path, eg civicrm/contribute/transact?reset=1&id=1
3. Enter the desired alias in Path alias, eg donate
4. Click Save.
> 5 votes

# Answer
For **WordPress** there are a couple of options:

1. Embed the form into a standard WordPress page with a shortcode. You can then use the WP URL of your choosing, in the standard WP way.
2. Install a plugin such as Redirect Editor.
> 4 votes

# Answer
You would do this at the CMS level, or with Apache mod\_rewrite. In Drupal, you can go to `/admin/config/search/path` and create a new alias to `civicrm/event/info?reset=1&id=3`
> 1 votes

# Answer
It takes some manual work, but for some important Civi links and events etc., I've just been putting them in my .htaccess file in root of my linux/Apache setup. Here's an example.

```
Redirect 301 /contribute https://watershedmg.org/civicrm/contribute/transact?reset=1&id=5
Redirect 301 /Contribute https://watershedmg.org/civicrm/contribute/transact?reset=1&id=5
Redirect 301 /happyrain https://watershedmg.org/civicrm/event/info?reset=1&id=533

```
> 1 votes

# Answer
# Backdrop

Backdrop has many of the same potential solutions as described Drupal 7, but also a few that are unique to Backdrop:

* CiviCRM Fields: Insert CiviCRM Contribution pages or Event Registration pages into fields which are attached to entities as usual (Nodes, Terms, Users)
* CiviCRM Blocks: Same as above but insert via blocks in a layout instead of an individual field. (Great for inserting on multiple pages at once, for example in an entire section of the website).
* Layout conditions that consider query parameters: This one is a feature request with a functional PR, but will allow you to specify visibility conditions based on query parameters, which gets to the original question of how to control sidebar or other content on the page based on which CiviCRM page is being viewed.
> 0 votes

---
Tags: civicontribute, civievent, urls
---


# Question
Title: CiviCase notes available only to self and manager, not other workers?
Am I able to have case workers that can create a confidential note in a case, and these notes would not be available to any other workers (only the manager).

And also it needs to prevent with View/Edit Contact access from seeing this information as well.

Thanks

# Answer
You could try https://lab.civicrm.org/extensions/activitytypeacl but I don't remember exactly how it works with cases.

Or there's no UI for it currently but the same notes that can be attached to contacts/contributions can theoretically be attached to cases or activities, and then you could use hook\_civicrm\_notePrivacy.
> 0 votes

---
Tags: wordpress, civicase, acl
---


title: Attaching private documents to contact

text:
# Question
Title: Attaching private documents to contact
Is it possible to create a custom File field for contacts, but somehow limit the view to only certain types of users?

Use case would be attaching an employment contract containing private information such as salary. A user that has the ability to view/edit contacts, should not be able to see this File, but only an HR manager.

Thanks

# Answer
> 1 votes
You can control access to specific custom fields with ACLs.

# Answer
> 1 votes
Have you tried documents extension?

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


# Question
Title: Can 'Quick Search' be removed for certain users?
Users don't want Quick Search to be available for certain users. Quick Search isn't available in the Navigation Menu, as one possibility was to use a permission to remove access. We use ACLs and these users are in an ACL group. Is it possible to remove Quick Search for a group of users? (Civi is at 5.51.3).

# Answer
> 1 votes
Not from UI you can hide it, but via adding JS to remove the section is possible for certain user roles based on permission

---
Tags: drupal, quicksearch
---


# Question
Title: "update smart group counts" button missing from manage groups
Wp 6.01 civi 5.51.1 as below. Standard Admin theme or Radstock

# Answer
> 0 votes
There isn't any condition to hide the 'Update Smart Group Counts' link if you can access the Find groups search criteria field. Probably there must be some css or jQuery that is implemented via extension/module/plugin/theme to hide/remove the option. Can you check in inspect element if its hidden?

---
Tags: smartgroups
---


title: CDN Tax Receipts - do not issue

text:
# Question
Title: CDN Tax Receipts - do not issue
I'm trying to figure out the logic for issuing a tax receipt. Can someone tell me - if the contact record has no address and no email, will the system still generate a tax receipt?

Also - there are times when I need to not issue a receipt for a financial type that normally does get a receipt. for example a 3rd party fundraiser that I would put in our "general donation" financial type, is there a way to mark this single contribution to not issue a tax receipts?

TIA

# Answer
Yes, a PDF receipt will still be generated even if there is no address.

Yes, you can set the non-deductible amount to the full amount of the donation under Additional Details and then no tax receipt will be issued. Alternatively, if this happens a lot, it might be simpler to set up a separate financial type for Non-deductible general donations, which is a little less error prone.
> 1 votes

---
Tags: cdn-tax-receipts
---


# Question
Title: API Explorer DB error: Field 'entity_table' doesn't have a default value
I am using the CiviCRM API Explorer v3 and try to create a LineItem. The following fields appear as obligatory fields for that: 'entity\_id', 'qty', 'unit\_price', 'line\_total'

But when I try to create a LineItem with those fields, I get the following error:

```
    {
    "code": -1,
    "error_message": "DB Error: unknown error",
    "mode": 16,
    "debug_info": "INSERT INTO `civicrm_line_item` (`entity_id` , `label` , `qty` , `unit_price` , `line_total` ) VALUES ( ... , 'line item' ,  1.00 ,  ... ,  ... )  [nativecode=1364 ** Field 'entity_table' doesn't have a default value]",
    "type": "DB_Error",
    "user_info": "INSERT INTO `civicrm_line_item` (`entity_id` , `label` , `qty` , `unit_price` , `line_total` ) VALUES ( ... , 'line item' ,  1.00 ,  ... ,  ... )  [nativecode=1364 ** Field 'entity_table' doesn't have a default value]",
    "to_string": "[db_error: message=\"DB Error: unknown error\" code=-1 mode=callback callback=CRM_Utils_REST::fatal prefix=\"\" info=\"INSERT INTO `civicrm_line_item` (`entity_id` , `label` , `qty` , `unit_price` , `line_total` ) VALUES ( ... , 'line item' ,  1.00 ,  ... ,  ... )  [nativecode=1364 ** Field 'entity_table' doesn't have a default value]\"]",
    "is_error": 1
}

```

When I add the field "Line Item Entity Type" (in the code: "entity\_table") to the API call, it works. Does anybody know why this field is not marked as obligatory in API Explorer v3?

# Answer
The entity table is mandatory for creating line items, unfortunately, in the API spec for line items, the Entity table is not marked as mandatory.

In the recent version of Civi it is also mandatory to have a price field and price field value for the line item else it would create 500 errors in some scenarios.
> 2 votes

---
Tags: api, line-items
---


# Question
Title: csv-import-helper extension not listed for installation
On my CiviCRM site (currently CiviCRM 5.42.1 on Drupal 7.82 & PHP 7.4.24 - I'm trying to get an upgrade process together for this site), the `/admin/extensions` page doesn't seem to list the `csv-import-helper` extension (https://civicrm.org/extensions/csv-import-helper). I see maybe 50 or so extensions listed in the "Add New" tab, but `csv-import-helper` isn't one of them.

The extension looks like it would save us \*tons\* of work. How can I figure out what's causing it to not be available?

# Answer
Only reviewed extensions appear there. See https://docs.civicrm.org/dev/en/latest/extensions/publish/#automated-distribution.

It doesn't mean you shouldn't install it, just that nobody's reviewed it as per the above and you need to install it manually using the download from the https://civicrm.org/extensions/csv-import-helper page.

Sidenote: You're on 5.42, and the latest version of that extension says 5.49, so even if it were visible you wouldn't see that latest version.
> 1 votes

---
Tags: extension, csv
---


# Question
Title: CiviCRM - CiviContribute does not respect the invoice number prefix set in the CiviContribute Component Settings
I have been using the CiviContribute for a short while and it's quite good, but there is something that I could never make work.
Note: I use Civi on Wordpress.
In the Admin \> Civicontribute \> CiviContribute Component Settings, you can set the "Invoice Prefix" to whatever text you want, but when you go to the actual contribution in the dashboard and click View, the Invoice Number has the default prefix "INV\_1".
Another example is: I used in the invoice template the {contribution.invoice\_number} token and the same behavior, default prefix...
Does anyone have any experience with this or know a fix? Thanks a lot!

# Answer
> 4 votes
Welcome to CiviCRM SE.

The invoice number is stored for contribution at the time of creation. If you update the invoice prefix in contribute component settings it will not change the invoice number for the already created contribution but for the new ones it will use the new prefix.

You will need to do a bulk update on invoice numbers using mysql script or using api4 for the already created contributions.

HTH

Pradeep

---
Tags: civicontribute
---


title: Change CiviCRM extension (module) names

text:
# Question
Title: Change CiviCRM extension (module) names
I want to change the Case extension/module name from Case to Tasks in CiviCRM and not sure if it is possible. Having worked with SuiteCRM, I know this can be done but not sure where in Civi this is/can done?

Any thoughts?

Thanks

# Answer
Can use word replacements in Civi?
> 3 votes

---
Tags: civicase
---


# Question
Title: Is it possible to get point-in-time membership data?
My client needs to know:

* How many members did we have on date x
* Who were the members on date x

Using "Find memberships" it appears that, though the UI allows it, combining the membership status filter with any of the date filters will return misleading/wrong results. It seems that the query there is using whatever value is in the membership status field at the time you run the report to evaluate against the filter. (Is there a way to tell what query CiviCRM is running?)

How can I best deliver this historical information to my client.

The site in question is running CiviCRM 4.4.14 with Drupal 7.36.

# Answer
> 8 votes
Since the status is based upon the start and end date and changes with the cron job, can you just leave the status off and select the date range. Anyone who had a start date before the date in question and an end date after that date should have been a member on that date.

So... Select custom date range for start.
For From leave blank (the beginning of time).
For To: put the date in question.

Select custom date range for end.
For From put the date in question plus one day.
For To: leave blank.

# Answer
> 3 votes
Paul-Tahoe's answer is the correct one for your use case. If you need point-in-time queries generally, consider putting Civi data in a data warehouse that supports OLAP cubes. Parvez Saleh at Veda has implemented this and can probably speak to best practices.

# Answer
> 1 votes
In Drupal you can use Views and Aggregation to spit out a count of Memberships on any particular date, pretty much as per Paul's description, you set the Join Date to be 'before' and the End Date to be 'after'

# Answer
> 1 votes
The nz.co.fuzion.historicmembershipdata extension offers this feature

# Answer
> 1 votes
And another solution to check out using the CiviCRM Data Processor Extension

# Answer
> 1 votes
I opened a proposal to add a new feature for SearchKit to handle a generic "entity active period" that I think covers the scope of this question. See SearchKit: Add ability to search and filter by active periods

---
Tags: civimember, civireport
---


# Question
Title: How to configure dashboard for new users
We have a number of new contacts (about 40) who will be having a signon to Civi and for whom we want their dashboard to show a certain report- and not the 2 default items that a new user currently sees. Display Preferences has some general categories for users, but what we need is a specific dashboard setup for a new user. Is there a way of configuring this for new users? I guess we could add the new users, login as them and then set this up manually but configuring would be much better, if that's possible. Civi is at 5.53 and it's Drupal 7.

# Answer
Default Dashlets extension does this, though I can't vouch for it at all and it doesn't look much used or recently updated.

You can also update this directly in the database.

It would be great if there was a simpler way to add default dashlets for new users or to copy dashlets from one user to another.
> 1 votes

# Answer
Have you tried Searchkit + formbuilder to create dashlets or dashboard?

There is also a new feature added in form builder i.e layout worth trying as well
> 0 votes

---
Tags: dashboard, user-dashboard
---


title: BCC not reaching recipient

text:
# Question
Title: BCC not reaching recipient
For confirmation emails, does the CC have to be filled in for the BCC to work? I have instances where the BCC did not reach the recipients, but I had not entered a CC address, so I'm wondering if that is the cause. If not, what would be the cause?

# Answer
> 1 votes
A BCC doesn't need a CC to work - I just tested it. My first thought is that the problem might be that the receiving email server discarded it as spam. Where my clients use email I install Mailjet to make sure that emails get delivered. There are other email delivery engines as well, so you have a choice.

---
Tags: email, confirmation
---


# Question
Title: Is it possible to open a case for a (smart) group of contacts?
I've defined a smart group and I've defined a case type. And now I'd like to open this case type for all contacts in a smart group. Is this possible? The alternative would be to click into each contact in the smart group, one at a time, go to actions and select add case. This would be overly time-consuming and monotonous for a smart group containing a large number of contacts, e.g., a smart group populated by users who have downloaded content from CMS and now require some follow-up. Thank you.

# Answer
You could use CiviRules with a Daily trigger for group members (and then just get rid of the rule afterwards if you don't want this to add cases for new group members). If you do, you could add a condition to check for the case and only add it if it isn't already there.
> 3 votes

# Answer
I don't remember if it works with cases but you could use https://civicrm.org/extensions/api-csv-import-gui to import a csv file. You just need to export the contact ids from your smart group first and then use that in your import file.
> 1 votes

---
Tags: civicase
---


# Question
Title: Civisualize is not installing. Shows critical error message only. How to fix this issue in civicrm WordPress?
Civisualize is not installing. Shows critical error message only. How to fix this issue in civicrm WordPress?

Tried to solve this a lot. But no proper solution is found till now. Please reply if any knows more about fixing this issue?

# Answer
Similar problem here, civi 5.50.3 wordpress 6.0.2 on bluehost, tried to install civisualize 6.0 and it crashes wordpress: "There has been a critical error on this web site. Please check your site admin email inbox for instructions" Will try to find out if there is anything in the logs. Nothing in the admin email inbox. Checked the error log found this entry: "PHP fatal error: array and string offset access syntax with curly braces is no longer supported in /wp-content/uploads/civicrm/ext/eu.tttp.civisualize/civisualize.civix.php on line 247" - after editing line 247 and changing curly braces to square braces the module installs. Don't yet know if it will actually work but will try it.
> 1 votes

# Answer
Are you running PHP 8? If so I think you may have hit this issue: PHP Fatal error on php 8+

I'm guessing you have downloaded version 6 of this extension from the extension directory. Unfortunately this is quite out of date now (June 2020).

You can get the latest code from the master branch in GitHub. Try that to see if it fixes your issue.
> 1 votes

---
Tags: wordpress, extension, installation, civisualize
---


# Question
Title: can users confirm their mailing list subscription by replying to the confirmation email?
Sorry in advance if this is an obvious question, but I'm not finding it in the documentation.

I've been testing the mailing list subscription function, and see that the default confirmation says "To confirm this subscription, reply to this email or click here." Clicking the link works to confirm subscription, but replying to the confirmation (the reply-to address formatted like civicrmc.NN.NN.NNN@mydomain.org) doesn't work.

Where are these messages supposed to be handled? It doesn't seem to be bounce or email-to-activity processing (https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/#configuring-inbound-email-processing). My bounce processing is set up and working.

Is the message template incorrect? Or am I missing a configuration somewhere?

Thanks!

# Answer
This is handled by bounce processing (with the default mail account) and it should work. Is it possible that you just haven't waited long enough for your bounce processing cron job to run, which might be once an hour or so?
> 0 votes

---
Tags: civimail, mailing, inbound-email
---


title: guzzlehttp error

text:
# Question
Title: guzzlehttp error
CiviCRM and Xero for Woocommerce plugins on Wordpress (latest versions of all) are not playing nicely. When trying to load the latter plugin, this exception is generated:

```
2022-01-19T00:22:04+00:00 CRITICAL Uncaught Error: Call to undefined function GuzzleHttp\choose_handler() in /var/www/ap/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/HandlerStack.php:42
Stack trace:
#0 /var/www/ap/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create()
#1 /var/www/ap/wp-content/plugins/civicrm/civicrm/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(132): GuzzleHttp\Client->__construct()
#2 /var/www/ap/wp-content/plugins/civicrm/civicrm/vendor/league/oauth2-client/src/Provider/GenericProvider.php(99): League\OAuth2\Client\Provider\AbstractProvider->__construct()
#3 /var/www/ap/wp-content/plugins/woocommerce-xero/includes/class-wc-xr-oauth20-storage.php(208): League\OAuth2\Client\Provider\GenericProvider->__construct()
#4 /var/www/ap/wp-content/plugins/woocommerce-xero/includes/class-wc-xr-oauth20-storage.php(46): WC_XR_OAuth20_Storage_Class::create_provider()
#5 /var/www/ap/wp-content/plugins/woocommerce-xero/includes/class-wc-xr-oauth20. in /var/www/ap/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/HandlerStack.php on line 42

```

Is there any way for a relative non-techie to work out which plugin is causing the issue? Woocommerce Xero crashes when trying to oauth with Xero... looks like maybe both civi & this plugin are trying to oauth, but as it's a totally new out of the box civi installation I can't work out why civi would be doing that

# Answer
> 3 votes
For what it's worth, I stumbled on this error because the site had an old version of the plugin "google-listings-and-ads" (I haven't yet tested with the latest version).

I found it by running:

```
grep -r Guzzle wp-content/plugins/  | cut -f 3 -d '/' | sort | uniq

```

and then deactivating the plugins one by one.

# Answer
> 1 votes
I think I understand now that no one tool is any more 'at fault' than the other - I have found another plugin for Xero/Woo which claims to have resolved this, so I'll investigate that instead.

---
Tags: wordpress
---


title: Drupal user link to contact

text:
# Question
Title: Drupal user link to contact
Fairly basic, where is the link between the drupal user and the contact stored ? I have drupal user accounts which have linked to the incorrect civicrm contact. The reason is that we have cases in civicrm where multiple

# Answer
> 2 votes
Your question cut off at the end but it sounds like you're looking for the civicrm\_uf\_match table.

# Answer
> 2 votes
If the contact is linked to an incorrect record maybe it is better to check other contacts as or rebuild the whole contact link

Below are the steps to rebuild the whole contact link

1. Backup the CiviCRM database
2. Log in to the site as admin.
3. Take the site offline
4. Navigate to CiviCRM \>\> Contacts \>\> Find and Merge Duplicate Contacts
5. Set the Individual Unsupervised rule to Email only if not set(note down the current unsupervised rule since will need to revert back after the process)
6. Log out from the website
7. Run MySQL command under Civi DB,

```
TRUNCATE civicrm_uf_match;

```
8. Login back into the system.
9. Navigate to CiviCRM \>\> Administer \>\> Users and Permissions \>\> Synchronize Users to Contacts
10. Run the synchronization.
11. Revert back the Individual Unsupervised rule.

# Answer
> 1 votes
if you have duplicate contacts in civicrm, one of which is connected to the drupal user, and you need to merge the records and have the drupal user connect to a different civi contact then you can do so via the merge records screen - of course this results in one record being put in trash.

i agree with Demerit that sometimes you just need to do the correction in the civicrm\_uf\_match table, but for some situations it can be solved via the UI.

You can also make changes via the API Explorer.

"The reason is that we have cases in civicrm where multiple" is why i thought that merging might be all that you need

---
Tags: drupal
---


title: Upgrade to 5.54 failed

text:
# Question
Title: Upgrade to 5.54 failed
Grouping by month in 5.54's Search Kit is something I noticed & would like, so I launched the upgrade on my test system to 5.54. However the upgrade from 5.53.0 to 5.54 failed as follows:

"SELECT `a`.`id` AS `id` FROM civicrm\_user\_job a WHERE (`a`.`expires_date` \< "20221010092632") AND (`a`.`is_template` = "0") \[nativecode=1054 \** Unknown column 'a.is\_template' in 'where clause'\]"

PEAR\_Exception: DB Error: no such field in /home/acivior1/public\_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 944

* DB\_Error: DB Error: no such field in unknown on line unknown

Sure enough, table civicrm\_user\_job doesn't have column is\_template. This is a Drupal 7 system. Looking at another 5.53 system - it does have this column. After restoring back to 5.53 table civicrm\_user\_job does **not** have this column. The test system was only create many a year back whereas the system with the column was created 9 years ago...

# Answer
Note the column was added on June 9 to 5.51 (https://github.com/civicrm/civicrm-core/pull/23679), and then 5.51 became the RC on June 10, so depending on how your test site evolved it's very likely you would have missed that upgrade step since it was added in so late. You probably also want to check civicrm\_queue.
> 2 votes

---
Tags: drupal, upgrade
---


# Question
Title: Drupal 9 and CiviCRM 5.53, but jQuery is still 1.12.4
I am using Drupal 9 and have successfully updated to 5.53 per security advisory however libraries/civicrm/core/bower\_components/jquery/dist/jquery.min.js is still showing v1.12.4

Why is this, and how do I fix this? Do I change composer? Must I replace jQuery version manually?

# Answer
> 0 votes
Thanks for your link to the PR. It mitigate the vulnerability

---
Tags: drupal, jquery
---


# Question
Title: Contribution import fails with <Invalid field 'email'> error
Update: This is a confirmed bug, with issue filed on gitlab.

---

After a CiviCRM update across quite a few versions (from somewhere around 5.39 to 5.51), I've started to get failures when I try to import contribution records. The import task starts OK, but the Queue Runner gives me this error: `[Error: Processed 5 rows out of 16] Invalid field 'email'` (full error log below) This happens with every set of five rows, and I'm not even importing an email field. Confusingly, at the end of the import task, the notice says "Import has completed successfully... Total Rows Imported - 16 - Total number of primary records created or modified during the import." This is inaccurate, as no records are created or modified.

Aside from the fact that I played fast and loose with upgrading best practices and should be more careful in the future, what's my best approach at this point? Is there a way to check to make sure all of my database upgrades completed accurately, or a way to run the db upgrade utility again? Maybe this isn't a db problem. I have no idea where to start.

Civi 5.51.0, Joomla 3.10.6

```
[info] $CRM_Queue_Page_AJAX_runNext_error = API_Exception: "Invalid field 'email'"
#0 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Query/Api4SelectQuery.php(613): Civi\Api4\Query\Api4SelectQuery->getField("email", TRUE)
#1 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Query/Api4SelectQuery.php(455): Civi\Api4\Query\Api4SelectQuery->getExpression("email", (Array:2))
#2 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Query/Api4SelectQuery.php(425): Civi\Api4\Query\Api4SelectQuery->composeClause((Array:4), "WHERE", 0)
#3 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Query/Api4SelectQuery.php(298): Civi\Api4\Query\Api4SelectQuery->treeWalkClauses((Array:4), "WHERE")
#4 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Query/Api4SelectQuery.php(150): Civi\Api4\Query\Api4SelectQuery->buildWhereClause()
#5 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Query/Api4SelectQuery.php(165): Civi\Api4\Query\Api4SelectQuery->getSql()
#6 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Generic/DAOGetAction.php(114): Civi\Api4\Query\Api4SelectQuery->run()
#7 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Generic/DAOGetAction.php(101): Civi\Api4\Generic\DAOGetAction->getObjects(Object(Civi\Api4\Generic\Result))
#8 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(69): Civi\Api4\Generic\DAOGetAction->_run(Object(Civi\Api4\Generic\Result))
#9 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/API/Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
#10 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/Civi/Api4/Generic/AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
#11 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Contribute/Import/Parser/Contribution.php(910): Civi\Api4\Generic\AbstractAction->execute()
#12 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Contribute/Import/Parser/Contribution.php(721): CRM_Contribute_Import_Parser_Contribution->lookupMatchingContact((Array:2))
#13 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Contribute/Import/Parser/Contribution.php(317): CRM_Contribute_Import_Parser_Contribution->deprecatedFormatParams((Array:12), (Array:21))
#14 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Import/Parser.php(1917): CRM_Contribute_Import_Parser_Contribution->import((Array:36))
#15 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Queue/Task.php(95): CRM_Import_Parser::runJob(Object(CRM_Queue_TaskContext), 11, 5, 0)
#16 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Queue/Runner.php(257): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#17 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Queue/Page/AJAX.php(36): CRM_Queue_Runner->runNext(TRUE)
#18 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Queue/ErrorPolicy.php(89): CRM_Queue_Page_AJAX::{closure}()
#19 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Queue/Page/AJAX.php(38): CRM_Queue_ErrorPolicy->call(Object(Closure))
#20 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(285): CRM_Queue_Page_AJAX::runNext()
#21 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:17))
#22 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
#23 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:4))
#24 /home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#25 /home/xxxxxx/www/www/libraries/src/Component/ComponentHelper.php(402): require_once("/home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm.php")
#26 /home/xxxxxx/www/www/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/home/xxxxxx/www/www/administrator/components/com_civicrm/civicrm.php")
#27 /home/xxxxxx/www/www/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
#28 /home/xxxxxx/www/www/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#29 /home/xxxxxx/www/www/libraries/src/Application/CMSApplication.php(225): Joomla\CMS\Application\AdministratorApplication->doExecute()
#30 /home/xxxxxx/www/www/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#31 {main}

```

# Answer
> 1 votes
5.54 is out now - can you check against it? There have been relevant code changes

---
Tags: error, import
---


title: Contribution page in test-drive mode

text:
# Question
Title: Contribution page in test-drive mode
I have checked the box that says "contribution page is active" and it's enabled, but end users are still seeing the message that the page is running in test-drive mode! How do I fix this?

Page in question: https://www.autismontario.com/civicrm/contribute/transact?reset=1&id=21

I tried unchecking the active box, saving, then re-checking it, saving. On my mobile the test-drive mode seems to be gone, but on my laptop (even after clearing cache) the test-drive mode is still showing,

# Answer
> 3 votes
The link you've provided above works fine: it isn't in test-drive mode). Test-drive mode isn't a setting so that the contribution page only allows test contributions, it's just a slightly different link to access the page, so that you can test drive it (`&action=preview` is added to the URL). The same page can be used in test drive mode and normal mode at the same time, depending on the URL you use to access it.

So, the link that end users are using must be a test drive mode URL. If you can change that link, just use the live page URL for the contribution page. If you can't change the link (e.g. if you sent it out in a mailing), you might be able to set up a temporary redirect in your CMS from the test drive mode URL to the live page URL.

---
Tags: contribution-page
---


title: Mailings - DB Error: syntax error

text:
# Question
Title: Mailings - DB Error: syntax error
I'm testing out Civicrm. Started with Wordpress then copied the database into Drupal 7

When trying to send a mailing to a group, the send test email issues

**Error in call to Mailing\_send\_test : DB Error: syntax error**

And trying to submit the mailing gives **DB Error: syntax error**

From the logs I can see

```
 [code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => INSERT IGNORE INTO civicrm_tmp_e_gccache_e014dbed46046aa1c0657ac431a08f53 (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
[type] => DB_Error
[user_info] => INSERT IGNORE INTO civicrm_tmp_e_gccache_e014dbed46046aa1c0657ac431a08f53 (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT IGNORE INTO civicrm_tmp_e_gccache_e014dbed46046aa1c0657ac431a08f53 (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]"]

```

Edit - looks like this is the same issue as Smart Group DB error

Answer given was - It has been reported here https://github.com/civicrm/civicrm-core/pull/17622 and it should be fixed by the CiviCRM 5.26.2.

# Answer
> 2 votes
Tested the fix from https://github.com/civicrm/civicrm-core/pull/17622 & can confirm it's now working as expected.

# Answer
> 0 votes
We just experienced this with the newest version October 2022 /54. In relation to smart groups and the search function. Also when exporting contacts. Is the patch from 2020 safe?

'***ERROR*** message: DB Error: syntax error code:
exception: PEAR\_Exception Object ( \[cause:protected\] =\> DB\_Error Object ( \[error\_message\_prefix\] =\> \[mode\] =\> 16 \[level\] =\> 1024 \[code\] =\> -2 \[message\] =\> DB Error: syntax error \[userinfo\] =\> INSERT IGNORE INTO civicrm\_tmp\_e\_gccache\_1e5c7912afe5baa5f381309ac26f4b75 (group\_id, contact\_id) SELECT 486 AS group\_id, contact\_a.id as id FROM civicrm\_contact contact\_a WHERE ( ( contact\_a.created\_date \>= '20191001000000' ) ) AND (contact\_a.is\_deleted = 0) AND contact\_a.id NOT IN ( SELECT contact\_id FROM civicrm\_group\_contact WHERE civicrm\_group\_contact.status = 'Removed' AND civicrm\_group\_contact.group\_id = 486 ) \[nativecode=1064 \** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';= '20191001000000' ) ) AND (contact\_a.is\_deleted = 0) AND contact\_a.id NOT IN' at line 1\] \[backtrace\] =\> Array ( \[0\] =\> Array ( \[file\] =\> /srv/www/html/wordpress/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB.php \[line\] =\> 997 \[function\] =\> \__construct \[class\] =\> PEAR\_Error \[type\] =\> -\> \[args\] =\> Array ( \[0\] =\> DB Error: syntax error \[1\] =\> -2 \[2\] =\> 16 \[3\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> exceptionHandler )

```
                               [4] => INSERT IGNORE INT...

```

***LAST ERROR*** Array ( \[type\] =\> 16384 \[message\] =\> Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead. \[file\] =\> /srv/www/html/wordpress/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php \[line\] =\> 58 ) '

---
Tags: drupal, mailing
---


# Question
Title: Change "SIC Code" Field To "NAICS Code" In Organization/Contact
So, the SIC Code appeared as an issue early on dealing with EU folks, but I never found anything other than some postings in the old wiki. I am in the US and while Public companies sometimes deal with SIC, the standard is NAICS. I want to change the name of the "SIC Code" to NAICS Code. A bit of background is that NAICS replaced SIC in 1997 for the US, Canada, and Mexico and is the general type of trade like a carpenter. It has 6 digits. I know the "SIC Code" field is set to 8 digits. Not a big deal, but would be **GREAT** to be able to change the length of the field as well! The PSC is a federal supply code. The PSC is a hierarchy set up by the US government. All of our Membership are associated in the trades industries. I can set that up as a custom field. I would also like to be able to search by NAICS if I can change the name of the field. Thanks!

# Answer
> 3 votes
You could do 'word replacements' under 'customize data and screens'.

---
Tags: wordpress, contacts, core, fields
---


# Question
Title: Schedule a Recurring Email to Everyone in a Group
Is it possible to send an email to a group once a week? I can see that scheduled reminders can be sent based on an entity but I'd like to send an email invite to all our members that haven't already booked into our events.

I have set upa a group that contains only those members who haven't signed up for the event - this is a mailing list.

I don't really have any trigger for it as such but need it to go weekly for a few weeks.

Civi crm 5.53 - wordpress.

# Answer
This past question covers some options.

Scheduled reminders are not necessarily easy to work with and can be a little anxiety-inducing, in my experience. Another option would be CiviRules. There is a Daily trigger for group members, but no weekly trigger. It would be easy to add a weekly trigger to the extension with very little code (or pay someone to add it).
> 1 votes

---
Tags: civirules, mailing
---


# Question
Title: Is it 'Search Kit', 'SearchKit', 'Search-Kit', 'search kit'? 'Form Builder', 'FormBuilder', 'Form-Builder', 'afform'?
Questions and answers here on StackExchange and in the CiviCRM UI and documentation refer to these tools in various ways.

What is the preferred way to refer to them?

# Answer
We are standardising on camelcase format, so the preferred names are:

* **SearchKit**

and

* **FormBuilder**

References to these in the CiviCRM interface and documentation are being updated where necessary.

('Afform' was the original working name for FormBuilder.)
> 4 votes

---
Tags: searchkit, formbuilder
---


# Question
Title: Transfer a D7 view sql query to a D9 view
We are converting a number of D7 views (for reports) to D9 version. Is it possible to copy the sql query from a D7 view to use in a D9 view. The fields in Civi are the same.

# Answer
> 1 votes
Now that the Drupal Views Migration has been released it would be worth trying that, especially if you have several.

In terms of your actual question, I think the answer is No.

We have just started converting some d7 Views to D9 and as expected the 'relationship' (as in Views 'join') needs some manual intervention, especially for fields like Email, Address, Phone where those had been hard-coded in the d7 Views integration. But apart from that they came through in better shape than I expected.

---
Tags: drupal-views, sql, drupal-9
---


# Question
Title: APIv4 Base URL for external applications
I am trying to write an external app with python, that should make a call to the CiviCRM's APIv4 to get a list of contacts & relationships.

I am using CiviCRM's with Wordpress and debian 11.

Wordpress is installed under /var/www/wordpress

I am having problems to find the correct base URL to make calls to the APIv4.

I got it working with v3 using `http://192.168.100.168:8166/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Relationship&key={site_key}&json=1&debug=1&version=3&api_key={myApiKey}&action=get`

If I try, like is said in the docs, to call `http://192.168.100.168:8166/civicrm/ajax/api4/Relationship/get` I get a `404 NotFound` error.

Thats what I see in the REST tab in API Explorer 4

How should I call the APIv4?

# Answer
How about http://192.168.100.168:8166/?civiwp=CiviCRM&q=civicrm/ajax/api4/Relationship/get

You can check the REST tab in API4 explorer for correct url
> 2 votes

---
Tags: wordpress, api, apiv4
---


# Question
Title: online forms for membership and contribution
My organisation does not like the forms generated by civicrm for on-line contribution and membership. Is it possible and practical to change their format?

Thank you

# Answer
If you are using Drupal CMS then you can use Webform \+ Webform CiviCRM to build

On Wordpress you can use Caldera + Caldera CiviCRM plugin
> 1 votes

# Answer
It depends what you don't like about them, but adding a little custom css may help.
> 1 votes

# Answer
Looking to the future of CiviCRM, you can create native forms in CiviCRM using FormBuilder. Currently this is a work in progress. It works for some simple use cases but has limitations - most importantly no ability to take payments yet. This is in active development so keep an eye on it (or you could help to sponsor it to speed up development).

In the meantime there are some more technical options that are worth considering:

The first gives you complete control to create a form in JavaScript that can be hosted on your CiviCRM site or an external site. The second provides a framework to process the responses from external forms.
> 1 votes

---
Tags: contributions
---


# Question
Title: Contributions with Stripe returning user to contribution profile from with "Your browser session has expired . . . " Error
We are using CiviCRM 5.54.0 on WordPress 6.0.2

Hello, I know this problem has been mentioned several times on this forum, but none of the posted solutions are working for me.
I became aware of the problem last wee prior to upgrading to the latest CiviCRM version. I upgraded hoping it would fix it. It only happens when using Stripe to complete the transaction. It does not happen when using PayPal Standard.

After filling out and submitting the contribution profile form with Stripe, the user is then redirected back to that same form with the error highlighted; **"Your browser session has expired and we are unable to complete your form submission. We have returned you to the initial step so you can complete and resubmit the form. If you experience continued difficulties, please contact us for assistance."**

The email receipt is delivered and the transaction is completed on the backend, but they are not redirected to the Thank You page like they should be. This gives the user the impression that their payment did not go through and they will try again, thus being double-charged.

I enabled all the debuggers, including the one provided with the Stripe extension. Literally nothing is showing up in the logs related to this issue. I checked this forum for a solution and I can confirm that a Basepage is configured. We are not using a caching plugin and never were using one. The profile forms are embedded in a Wordpress page as you can see below.

!\[enter image description here

The civicrm.settings.php files does have that clean URL script in in like one person suggested.

And the permalinks are set to POST NAME.

I am really lost to what is going on here. What am I missing? I am being pressured to resolve this as soon as possible because our members are submitting payment multiple times.I hope someone here can help.

Thank you

# Answer
> 4 votes
May be your civicrm.settings.php is missing permalink\_structure check?

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

```

---
Tags: wordpress, civicontribute, stripe
---


title: Does Form Builder handle relationships?

text:
# Question
Title: Does Form Builder handle relationships?
Using Form Builder I want to add an individual and an organisation and so the individual would have the relationship 'contact for' the organisation. I can't see a way of doing that - is it possible?

# Answer
> 4 votes
Yes. Create a form and add an Individual, an Organization and a Relationship.

On the Relationship tab, use the Values section:

* click 'Add value' and select 'Contact A'
* click in the search box and choose 'Individual1' in the pop-up
* click 'Add value' and select 'Contact B'
* click in the search box and choose 'Organization1' in the pop-up
* click 'Add value' and select 'Relationship Type'
* in the pop-up, select 'Key contact of'

This works on https://dmaster.demo.civicrm.org (5.56.alpha1) but may not on older versions.

== Edit ==

If your version supports relationships they should show on the pop-up when you hit '+' as here:

---
Tags: formbuilder
---


# Question
Title: Can filter values be passed in via the URL to Form Builder Search Forms?
I see that Submission forms allow arguments to be passed in via the URL. Can the same be done for filters on Search Forms?

Eg if I show Activities in a table that can be filtered by Assigned To contact, can I craft a URL that shows the Activities for the specified contact?

# Answer
Yes, in the table display add a filter for the argument you want to allow to be passed in. Set the value to be read from the URL and specify the field tag you want to use. Then append **`#/?field=value`** to the URL.

You can see an example of this in the core 'CiviCRM Administration UI' extension.

The table configuration includes:

This enables the Custom Field Group id to be specified in the URL like this: `https://dmaster.demo.civicrm.org/civicrm/admin/custom/group/fields#/?gid=3`

(As always with FormBuilder/SearchKit, these features may only work in a newer version than your system uses. This screenshot is from dmaster running 5.56.alpha1)
> 6 votes

---
Tags: searchkit, formbuilder
---


title: How to aggregate petition signers

text:
# Question
Title: How to aggregate petition signers
WP 6 Civi 5.51

We'd like to "Find contacts who have signed x number of petitions" It seems to me that built in petitions, activities, custom field/profiles cannot provide this.

Contributions is a possibility with financial type = petition signature as there are a range of aggregate searches. However contribution pages/forms don't lend themselves to this because of $amounts etc, unless I am missing something?

The new form builder might solve the $label issue but doesn't seem to offer contribution fields.

Caldera defunct, Ninja no contribs, Gravity no contribs.

Anything I've missed?

# Answer
In SearchKit, you can search by Contact with required Activity or Contribution, group by Contact ID and then use the Count field transformation on the Activity or Contribution ID, then add Having Count \> N.
> 2 votes

---
Tags: forms, petition
---


# Question
Title: Can front end forms display recent entries?
Eg petition form page shows "Sue from Swindon just signed" Contribution shows "Tim from Tottenham just donated $20"

# Answer
SearchKit is your friend! (... assuming your front-end is on the same site as Civi. I don't think we have a good way to send SearchKit results to a remote site yet.)

In SearchKit, create a search:

Then create a List display and use the 'Rewrite text' option to add your additional text:

which generates:

Note that leading/trailing spaces in the rewrite box are stripped, so use ` ` to add a space at the start of the city and amount rewrites and tick 'Allow HTML'

(Currently saved on https://dmaster.demo.civicrm.org/ as 'Recent' until it gets rebuilt)
> 4 votes

# Answer
If you are using Drupal, you can create a block using drupal views and add the block to the form.

In WordPress combination of dataprocessor and shortcode in page may also work
> 1 votes

# Answer
Not out of the box, but this is certainly something you could add on, perhaps with CiviCRM Entity in Drupal, directly from the API or in an extension.
> 0 votes

---
Tags: forms, searchkit
---


# Question
Title: Advice on implementing workflow, involving opening new case for contact created by profile
I would like to implement the following workflow: a "potential church volunteer (PCC)" fills in his or her details in a profile hyper-linked to from a WordPress website. This creates a contact in CiviCRM (hosted on a different server) and opens a "case" with a series of activities which must be applied to the contact over time (some immediately, some in 1 week, and so on).

So far, I've implemented this by setting up the profile so that it assigns new contacts to the group "PCC Unopened Case". This then requires a member of staff to go into CiviCRM, move the contact to a new group "PCC Opened Case", remove them from the original group, and open an already built case called "PCC Workflow" for that contact. That's a rather manual solution, and the charity I'm volunteering for doesn't love it. I'm aware of CiviRules, though I've not used it because it's currently not supported on the Spark-hosted solution I'm trialling. (By the way, the support provided by Spark is really outstanding.) Is there another less manual -- perhaps even standard pattern -- for implementing such a process (submit details -\> open case -\> follow through on activities). Many thanks, Patrick.

# Answer
If I read that correctly, your WordPress site just has a link to the form on CiviCRM? (ie the form is not directly on the website?) If so, that gives you a few more options.

Your simplest option would be to create your form using the FormBuilder core extension instead of using a profile and have it create the case. That should be available on Spark.

Alternatively using your profile approach, you could ask about CiviRules. Spark is intended as kind of 'starter edition' and doesn't allow arbitrary extensions. However, the exact set of extensions evolves and it is worth asking whether it would be possible to add that. (Given what CiviRules can do, I think that is unlikely - but no harm asking.)

Another option would be the Form Processor extension, but again that may not be available on Spark.

There are various ways this could be implemented, but it's certainly possible. Ask if you need further help.
> 2 votes

# Answer
In very recent CiviCRM versions (around 5.54?), Form Builder can now open cases. I have not personally tested it, but was told it works. CiviCRM Spark is currently on CiviCRM 5.55.

So instead of using a profile, a form created with Form Builder should be able to open the case correctly for you.

CiviRules might help for things such as sending notifications automatically.

And finally, SearchKit can replace what traditionally Views did, and is supported by CiviCRM out of the box (and CiviCRM Spark).
> 1 votes

---
Tags: profile, civicase, civicrm-spark
---


# Question
Title: CiviCalendar: Array and string offset access syntax with curly braces is deprecated
I'm trying to prepare a site for migration to a new host, and the copy of the site I've set up on the new host is generating masses of warnings that I'm not seeing on the current production environment.

In Drupal's recent log messages I see line after line of:

```
Deprecated function: Array and string offset access syntax with curly braces is deprecated in require_once() (line 3 of /home/username/public_html/sites/default/files/civicrm/ext/com.agiliway.civicalendar/calendar.php).

```

Then I also have a file called error\_log that has appeared in the Drupal root with the following at five minute increments (that is, every time cron runs):

```
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/username/public_html/sites/default/files/civicrm/ext/com.agiliway.civicalendar/calendar.civix.php on line 257

```

Drupal 7.92, CiviCRM 5.54.0, CiviCalendar 3.5.1. The old host was still on PHP 7.3, whereas this one is 7.4, so I'm assuming it's to do with that, but is there a fix?

# Answer
There's a PR at https://github.com/agiliway/com.agiliway.civicalendar/pull/27. You can try it and if it works for you then comment on that PR and hopefully it will get merged and they'll make a new release.
> 1 votes

---
Tags: php, calendar
---


title: Use CiviCRM and FluentSMTP

text:
# Question
Title: Use CiviCRM and FluentSMTP
I would like to use CiviCRM with FluentSMTP (WordPress installation). The goal is to reliably send out emails from CiviCRM that are not blocked by email providers or sent straight to junk. I have setup FluentSMTP and my understanding is that it intercepts all mail sent using wp\_mail and uses the connectors setup to push that mail out. If I test send from FluentSMTP, it works perfectly. Going to send mail from CiviCRM seems to bypass FluentSMTP. I cannot setup using SMTP directly in CiviCRM since my webhost block SMTP traffic out. I have to use an API (hence why I am trying to use FluentSMTP).

How can I go about this?

# Answer
The short answer is: you'd need to write a CiviCRM extension. There are some similar extensions that you could use for a model/inspiration.

BUT ...

Usually, php applications (like Drupal or Wordpress) rely on php mail handling to send out mail, which is why you need FluentSMTP to hook in to other services to send out mail from wordpress if your standard outgoing mail is normally blocked by your provider.

CiviCRM though, is already quite sophisticated, so you don't need to use FluentSMTP to intercept the php mail calls since CiviCRM doesn't use the php mail() function. Instead, you can set up civicrm to send out with most of the same methods/services that fluentSMTP does, ie. using sendgrid, sparkpost, mailgun, or one of those other services that shall not be named, by installing an eponymous extension.

Try looking here: https://civicrm.org/extensions

Longer answer: you probably don't want to bother, use one of the existing CiviCRM extensions for sending out mail via the same (or a different) service you're using with FluentSMTP.
> 1 votes

---
Tags: email
---


title: Add Bulk Notes to Contacts

text:
# Question
Title: Add Bulk Notes to Contacts
I have about 200 contacts that I need to add a bulk note to. I can add bulk activities using CiviRules, but I can't find a way to add a bulk note.

Does anyone have any ideas or know of an extension that would do this?

# Answer
You can do this by creating a profile with a note field, Update multiple contacts from Actions in search results and then copying the note to each contact with the little copy button beside the Note heading (this is assuming you're trying to add the same note to each contact).
> 2 votes

# Answer
Contact import can do this. You just need to first export a list of their contact ids, then add a column with your note.

On the import screen choose Update for duplicates (the rule is irrelevant - can leave blank). On the mapping screen choose ContactID and Note.
> 0 votes

---
Tags: contacts, extension
---


# Question
Title: Cannot get cron going in WordPress using wp-cli
I’m trying to get cron going using wp-cli

WordPress: 6.0.3 civiCRM: 5.52.0 PHP: 7.4.32

I think I found the path to wp-cli.

$ wp —info yields: WP\_CLI phar path: /home/customer/www/mywebsite.org/public\_html/wp-content/plugins/civicrm

But executing wp throws a syntax error at the path:

$ wp --user=MyName --url=https://mywebsite.org —-path=home/customer/www/mywebsite.org/public\_html/wp-content/plugins/civicrm api job.execute auth=0

Error: '—-path=home/customer/www/mywebsite.org/public\_html/wp-content/plugins/civicrm' is not a registered wp command. See 'wp help' for available commands.

What am I doing wrong?

# Answer
> 1 votes
Seems a bit strange to me that you've got WP-CLI installed in the CiviCRM plugin directory. I'd suggest moving it somewhere outside your `public_html` directory.

When you've done that and got it working, try this for cron:

```
wp --user=MyName --url=https://mywebsite.org --path=/home/customer/www/mywebsite.org/public_html civicrm api job.execute auth=0

```

The `--path` is the path to the WordPress directory rather than the path to the CiviCRM plugin directory. Plus I think you have something other than `--path` there.

---
Tags: wordpress, cron
---


# Question
Title: CiviEvent - Fatal error when registering: Could not find valid value for id
I have a simple and largely up to date Wordpress 6.02/Civi 5.53 site running registrations for a single paid event. I'm taking payments using the Stripe extension. It couldn't get much more straightforward.

However I'm seeing an error "Could not find valid value for id" that is stopping some people from registering.

I've checked through other posts here on this issue, including:

CiviEvent - Error when registering: Could not find valid value for id

and

"Could not find valid value for id" after event registration on WordPress 5.9.1 and CiviCRM 5.47.2

and I can't see anything wrong with my set-up. Clean URLs, base page, permalinks are all good. I'm not using a shortcode for the event registration form.

It looks like the majority of registrations are working fine, but I've had a few people get in touch reporting the error.

Here's what gets logged:

```
$Fatal Error Details = array:3 [
  "message" => "Could not find valid value for id"
  "code" => null
  "exception" => CRM_Core_Exception {#6388
    -errorData: array:1 [
      "error_code" => 0
    ]
    #cause: null
    -_trace: null
    #message: "Could not find valid value for id"
    #code: 0
    #file: "/home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php"
    #line: 98
    trace: {
      /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php:98 {
        ?~@? if (!isset($value) && $abort) {
        ?~@?   throw new CRM_Core_Exception(ts('Could not find valid value for %1', [1 => $name]));
        ?~@? }
      }
      /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27 { ?~@?}
      /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27 { ?~@?}
      /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314 { ?~@?}
      /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { ?~@?}
      /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { ?~@?}
      /home/wf/sites/default/wp-content/plugins/civicrm/civicrm.php:1199 { ?~@?}
      /home/wf/sites/default/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { ?~@?}
      /home/wf/sites/default/wp-includes/class-wp-hook.php:307 { ?~@?}
      /home/wf/sites/default/wp-includes/class-wp-hook.php:331 { ?~@?}
      /home/wf/sites/default/wp-includes/plugin.php:524 { ?~@?}
      /home/wf/sites/default/wp-includes/class-wp.php:787 { ?~@?}
      /home/wf/sites/default/wp-includes/functions.php:1330 { ?~@?}
      /home/wf/sites/default/wp-blog-header.php:16 { ?~@?}
      /home/wf/sites/default/index.php:17 { ?~@?}
    }
  }
]

```

I'm now at a loss as to how to begin resolving this.

# Answer
> 1 votes
Can you check your civicrm.settings.php have exact below code for clean url?

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

```

---
Tags: civievent
---


# Question
Title: Class "IntlDateFormatter" not found after install
Just did a clean install of Joomla 4.23 with Civi 5.54.0 running on PhP 8.0 via xampp. Install went fine including databasee upgrade but can't get to CiviCRM dashboard. Error message is 'Class "IntlDateFormatter" not found" and button sends me back to Joomla dashboard. My understanding is that Joomla 4.x works with Civi 5.54 and both are compatible with PhP 8.0. Am I missing a compatibility issue? What else could it be? Thanks, Kate

# Answer
You need php `intl` enabled. See https://docs.civicrm.org/installation/en/latest/general/requirements/#required-for-civicrm-core.
> 2 votes

---
Tags: joomla, php, install
---


# Question
Title: 'View in browser' link in Mosiaco template does not work when used with CiviRules or scheduled reminders
I'm finding that whereas the ‘View in browser’ link in a Mosaico template will work when the template is applied to a mailing created via Mailings-\>New mailing, it will *not* work when the template is applied to a mailing triggered by CiviRules, or a when used by a scheduled reminder.

So:

1. I create a Mosaico template with a 'preheader block' containing a 'View in your browser' link - this link is pre-defined in the preheader and I don't change it in any way
2. I create a new mailing with Mailings-\>New mailing, specify this template, then click on ‘send test' under ‘Send test email to:’ in first screen ‘Define Mailing’ of New Mailing dialogue. When the email is received, the 'View in your browser' link works as expected
3. I create a CiviRule, with Action 'Send Email', using this template. When the email is received, the 'View in your browser' link does not work - on inspection, the \<a\> tag has no href attribute
4. I create a scheduled reminder using this template and again when the email is received the link does not work, in the same way

Anyone know what the problem is here?

# Answer
It seems from your post that you might be using the extension that transfers Mosaico templates for use in non-bulk mail scenarios, is this correct? In any case, the way that Civi stores bulk emails versus regular emails, and the way access is permissioned for each (viewing bulk emails versus viewing activities), suggests to me that the view in browser option only works for bulk emails. If you're able to remove it from your template for regular email and reminder usage, that might be best.
> 4 votes

---
Tags: mosaico
---


# Question
Title: Form Builder form creating duplicate contact when logging activity (volunteer hours)
I created a Form Builder form, with "accessible on front-end of website" ticked, "generic: allow all users" permission set; "contact source" = "log volunteer hours" on Individual 1; and "added by" = "Individual 1", "activity type" = "Volunteer", and "activity status" = "completed" on Activity 1. The security for both Individual 1 and Activity 1 is "form-based", and "allowed actions" include both create and update.

I'd like to use this form to submit a volunteer's hours (duration) as activity against existing contact. Right now, the form creates a new contact with the entered activity information every time it's submitted, but this isn't the right behaviour as it creates duplicate contacts (a different one for each activity logged). Have I got some of the Form Builder form parameters incorrect, which is causing this behaviour?

# Answer
> 1 votes
I have a partial solution. If I add an "Existing Contact" field to the top of the form and the constituent selects their name using this additional control, then when the form is submitted it *doesn't* create a duplicate contact but rather the activity (e.g., "visit nursing home" for \[duration\] "2" \[hours\]) is appended to the list of activities for the constituent in question. The remaining issue is that any constituent can now use this control to look up other members in the database. Ideally, I'd like the control to only show contacts within a certain group, e.g., "Volunteers". Then I could password protect the WordPress page with this control allowing only volunteers to access it.

---
Tags: formbuilder
---


# Question
Title: CiviMember - end_date not updating after automatic renewal
I am having an issue with auto renew memberships. Civicrm 5.52.2 / Wordpress 6.0.3

The payment is going through just fine. And the statuses (after a Cron run) update just fine but the end\_date does not update to reflect the renewal period. Is it a cron I'm missing ?

Please assist, and can you please let me know the name of the function/location responsible for updating the end\_date so I can debug this further ?

# Answer
The end date should update immediately, when the payment is processed and a contribution is created in CiviCRM. This doesn't require a cron job.

I suggest you check to see that the contributions are correctly linked to the membership (via the membership payment table). If you view the membership it should show the related contributions and recurring contributions. If they aren't linked correctly this will mean that the membership doesn't update when a new payment is received.
> 1 votes

---
Tags: civimember, auto-renew
---


# Question
Title: Installation fault on Wordpress hosted site
Tried installing on a WP server. Versions: WordPress version 6.0.3 Active theme: Twenty Twenty-One (version 1.6) Current plugin: CiviCRM (version 4.6) PHP version 7.4.32 Zend Engine v3.4.0, Zend OPcache v7.4.32 (what's a Zend..?)

Installation location is /home//crm/wp-content/plugins; I don't have root access: this is a shared server, but I do have proper bash access as a user via cPanel terminal. Installation crashes at the point I go to wp-admin settings and click on "civiCRM installer".

The diagnostics are "There has been a critical error on this website. Please check your site admin email inbox for instructions." and An error of type E\_PARSE was caused in line 1 of the file /home//crm/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(207) : eval()'d code. Error message: syntax error, unexpected 'clone' (T\_CLONE), expecting '('

Bug?

This looks similar to Installation on local wordpress server but using much more recent versions.

In that trouble ticket the user did some digging into what the database itself was doing. I don't have that knowledge.

Any ideas?

# Answer
That's a very old version of CiviCRM that is probably not be compatible with PHP 7.4 or WordPress 6. CiviCRM 4.6 was released in 2015 so is very old and no longer supported.

As Christian suggests, I'd recommend that you install the latest version of CiviCRM (currently 5.54) from: https://civicrm.org/download
> 1 votes

---
Tags: wordpress, installation, failure
---


# Question
Title: Importing checkbox data--error "'1' is not a valid option for field"
I have a custom checkbox field, with a value list associated with it. When I try to import into the field, I get an error "'1' is not a valid option for field." "1" is definitely not the data in my .csv file (and as I am testing imports I pulled the values in there directly from the value list so I know they are valid for the field). The error messages for all of the entries say that "1" is not a valid option (though each entry has different data in the field).

I searched the old Civi forums and didn't see an answer to this there either.

# Answer
> 1 votes
I found this similar to Error on activity import: "'1' is not a valid option for field custom\_42". Can I find which field this is referring to through the admin interface?

# Answer
> 1 votes
Check your custom fields label and value and value must be same as in your .csv file. Label could be anything but value must match csv file value(if value in csv file 1, 2,3 then you option value for custom field must be 1,2,3).

# Answer
> 1 votes
I just want to add that we had this issue today but it took us several attempts to find the cause. It turns out that if you have a custom field where there isn't an option with the value '1' (in our case, we had several options but they started at 3), this can also cause the same error message.

---
Tags: import
---


# Question
Title: Composer install of ESR (Extended Security Release)?
How do I manage a CiviCRM ESR (Extended Security Release) install on a Drupal 8/9 composer installation?

I've subscribed to the CiviCRM ESR service and I'm trying to install an ESR version on my Drupal 9, which manages the CiviCRM code with composer, so I don't want to download the tarball.

# Answer
After you've subscribed to the ESR service, you'll get access to a private group on the civicrm gitlab install, with the instructions here:

https://lab.civicrm.org/esr/examples

There are actually three ways to do it provided, but the recommended method (which now works with Composer 2 in spite of the warning) uses the private composer packages provided by civicrm's gitlab installation, which can be accessed by your composer magic with the use of a gitlab authentication token that you can generate if you have access to that repo.

https://lab.civicrm.org/dev/release/-/issues/8
> 2 votes

---
Tags: drupal, drupal-8, drupal-9, esr
---


title: Drupal/Civi Groups and Memberships

text:
# Question
Title: Drupal/Civi Groups and Memberships
I've just taken over a Drupal 7 site running Civi. I'm very Drupal literate but new to Civi. Since moving the site to a new host everything appears to work but users' groups and memberships don't appear to be showing in Drupal. I can browse a user in Civi and see they are an active member and belong to certain groups but in Drupal under the user account it says no active memberships/doesn't belong to any groups. This is only since moving the site. As I'm new to Civi I don't know where to start.

Can anyone advise where I should look for this?

Thanks,

# Answer
> 0 votes
> under the user account it says no active memberships/doesn't belong to any groups

This would not show in a vanilla set it, therefore it would mean either that a View is being used to add civicontact-based Views blocks showing on the user page, or that some custom module is at work. If this 'was' working and now isn't, then in the case of the former (ie Drupal Views) then

a/ are civi and drupal tables in same DB or not

b/ if not, have the civi tables been added to the settings.php file so Drupal Views knows where to find them

---
Tags: drupal, civimember, user-account, civigroup
---


# Question
Title: How can we prevent contact record overwrites once and for all?
I've been working with CiviCRM in Drupal for about 12 years and this issue never seems to go away entirely.

Someone, typically the president of an organization (just to make things more interesting) will register themselves and their spouse/partner for an event and one way or another they will overwrite their own record with their spouses name and add the email address of their spouse to their record.

Our registration profile is First Name, Last Name, Email Address and it is used for registering the first person and their guests.

**NOTE:** *We are allowing non-logged in people to register for events (not my decision).*

**My unsupervised rule for Individuals is:**

* Email: 15
* First name: 5
* Last name: 10
* Weight Threshold: 30

On my profile for event registration I have first name, last name and the email is set to "other" so as to prevent them overwriting the primary email address. I would have thought this would prevent overwriting but just this morning the president of an organization I support, managed to overwrite his contact record with his wife's name which of course shows up on any listing he's supposed to be on.

In order to try to combat this, I have unchecked the *"Same email address"* field for multiple registrations and I've added a new profile for guests which has First Name, Last Name as mandatory fields but the email field is not mandatory.

Other than making it mandatory for members to be logged in to register, I'm not sure what else we can do to prevent this from occurring.

Anyone else have ideas or solutions?

Cheers, Andrew

# Answer
> 2 votes
It sounds like you might want to try out the No Overwrite extension, which makes the contact's name read-only on forms. We've been using it for quite a while - it really helps cut down on this kind of problem.

We also use Former Communications Data to at least keep records of past emails if they are overwritten (though this extension is not infallible).

---
Tags: civievent, duplicate-contacts, online-registration, drupal-7
---