title: iATS payment REJECT: 15 response code

text:
# Question
Title: iATS payment REJECT: 15 response code
I am using Drupal 8 with CiviCRM and added iATS for donation. Contribution page is returing REJECT:15 number code. I searched on iATS site to meaning of this reject code and found that it is

REJ:15 General decline code. Please have client call the number on the back of credit card https://content.iatspayments.com/developers-credit-card-reject-codes-north-america

is anybody know the solution for this problem?

Log message

```
$iATS SOAP Response = stdClass Object (
[ProcessCreditCardWithCustomerCodeResult] => stdClass Object ( [any] => <IATSRESPONSE xmlns=""><STATUS>Success</STATUS><ERRORS/><PROCESSRESULT><AUTHORIZATIONRESULT> REJECT: 15 </AUTHORIZATIONRESULT><CUSTOMERCODE>A30312979</CUSTOMERCODE><SETTLEMENTBATCHDATE> 10/10/2021 </SETTLEMENTBATCHDATE><SETTLEMENTDATE> 10/11/2021 </SETTLEMENTDATE><TRANSACTIONID>ADC2D7AC </TRANSACTIONID></PROCESSRESULT></IATSRESPONSE> ) )

```

# Answer
> 1 votes
I found the reason for REJ:15 using iATS test accounts.

Here is the list of amounts and the response if you use test visa 41/

```
1.00 OK: 678594;
2.00 REJ: 15;
3.00 OK: 678594;
4.00 REJ: 15;
5.00 REJ: 15;
6.00 OK: 678594:X;
7.00 OK: 678594:y;
8.00 OK: 678594:A;
9.00 OK: 678594:Z;
10.00 OK: 678594:N;
15.00, if CVV2=1234 OK: 678594:Y; if there is no CVV2: REJ: 19
16.00 REJ: 2;
Other Amount REJ: 15

```

If you use test visa 42/ then you can process any amount between $1 and $2000

REf: https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/README.md

---
Tags: iats
---


# Question
Title: Using CiviCRM to track number of signatures collected for ballot initiative
Anyone have any advice how I might keep track of how many signatures are gathered through our volunteer tabling and events to qualify a ballot measure? We need to collect 5000 wet signatures for a ballot initiative and are using CiviVolunteer running on Wordpress to track all the events we are tabling at and get our volunteers to staff them. I am looking for a way to report and track the outcome of each event by entering the total number of wet signatures gathered so we have a running total in the system.

# Answer
You can add a custom field to the Event - then you can enter the numbers for each event in to that field. Then you should be able to spit out a Report based on Events.

If you don't want the field showing on the event info page, then set custom field not to be 'is public'
> 1 votes

---
Tags: custom-fields, civivolunteer
---


title: Autoresponder capability in CiviCRM?

text:
# Question
Title: Autoresponder capability in CiviCRM?
Newbie here. Checked previous posts on this and last answers over 6 years old.

Is there a way to set up an auto-responder series in CiviMail, e.g. when someone signs up for a newsletter on our website we can arrange for them to receive a series of 4 pre-set emails to "warm them up further" to what our organization is about?

If no feature within CiviCRM has anyone found a solution outside that complements well?

Thanks!

# Answer
> 2 votes
This type of thing can be achieved by using Scheduled Reminders or CiviRules (plus Email API) - the key is obviously the trigger for this. If you are wanting the trigger to be 'added to Group' then I believe CiviRules can do this, but Sch Reminders cannot.

---
Tags: civimail, automation
---


# Question
Title: Error when registering CiviEvent: "Could not find valid value for id"
I have the same issue as the one here: CiviEvent - Error when registering: Could not find valid value for id However the solution mentioned does not work for me. Besides on the demo site http://wpmaster.demo.civicrm.org/ no base page is set and it works. Any help is greatly appreciated.

I'm on WP 4.4.2, civi 4.7.7

The error from the log is below:

```
May 20 10:06:31  [info] $Fatal Error Details = Array
(
    [message] => Could not find valid value for id
    [code] =>
)

May 20 10:06:31  [info] $backTrace = #0 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(371): CRM_Core_Error::backtrace("backTrace", TRUE)

1 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php(120): CRM_Core_Error::fatal("Could not find valid value for id")

2 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php(52): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE)

3 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php(47): CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), TRUE)

4 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(307): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false")

5 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))

6 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))

7 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm.php(1229): CRM_Core_Invoke::invoke((Array:3))

8 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/includes/civicrm.basepage.php(132): CiviCRM_For_WordPress->invoke()

9 [internal function](): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))

10 /nas/content/staging/theexecnet/wp-includes/plugin.php(601): call_user_func_array((Array:2), (Array:1))

11 /nas/content/staging/theexecnet/wp-includes/class-wp.php(692): do_action_ref_array("wp", (Array:1))

12 /nas/content/staging/theexecnet/wp-includes/functions.php(952): WP->main("")

13 /nas/content/staging/theexecnet/wp-blog-header.php(14): wp()

14 /nas/content/staging/theexecnet/index.php(17): require("/nas/content/staging/theexecnet/wp-blog-header.php")

15 {main}

```

# Answer
> 0 votes
use the civicrm events register link after /civicrm/ not after root.

# Answer
> 0 votes
The error message indicates that the `id` parameter (the event ID) is not being found in the URL or the form object that gets carried from step to step through the event registration process. Obviously the event ID is set at one point: the correct event is showing up. However, it's failing later.

WPEngine has very aggressive caching. I haven't tried using CiviCRM there in years, but it used to have serious problems with things like this. Certain aspects of a page would be cached so that certain URL parameters would never have any effect. Basically, WPEngine knows how to cache in ways that retain distinctions between WordPress pages, but it might not know all of the CiviCRM URL parameters to pay attention to.

Absent any other glaring issue with your setup (though you really should set a base page), you might try the site on a more traditional server environment.

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

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

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

---
Tags: civievent, wordpress
---


# Question
Title: CiviVolunteer gives MyISAM vs InnoDB error
I am getting this error when I use the CiviVoluteer extension on Worpress with CiviCRM version 5.39.0. I am hosted with CiviHosting.

> Your database is configured to use the MyISAM database engine. CiviCRM requires InnoDB. You will need to convert any MyISAM tables in your database to InnoDB. Using MyISAM tables will result in data integrity issues.

Everything still seems to be working in CiviCRM. I only get this message with CiviVolunteer enabled. There is a fix that seemed to work for folks MyISAM database but all civicrm\_ tables are INNODB... is this a problem?

but I am wondering to I even need to bother?

# Answer
1. Go to your CiviHosting control panel and start 'phpMyAdmin'.
2. Click on your CiviCRM database (left panel)
3. In the list of tables click on the 'Type' column header to sort by it (easier to see all your MyISAM ones)
4. Click one of the table names that shows as MyISAM
5. Click 'Operations' tab at the top
6. In the 'Table Options' section, change 'Storage Engine' to InnoDB
7. Click Go
8. Repeat as needed

Re: "Do I even need to bother?" CiviCRM goes to some effort to detect and warn you about this. If you know what the data integrity issues are and that they won't affect your db, then don't change it. I don't know those details but it's a quick and easy fix so I follow the advice and change it.
> 2 votes

---
Tags: civivolunteer
---


# Question
Title: Is there a way to modify/customize the fields shown in the Group Contacts Window?
Is there a way to modify/customize the fields shown in the Group Contacts Window? When we're looking at the Contacts in a Group, under \>Contacts \>Manage Groups, is there a way to modify this view/fields shown in this window? For instance:

1. email address is truncated
2. would like to see the Employer of the Contact (Organization linked to Individual Contact)

# Answer
Alternatively, you can build your own using the rapidly-evolving Search Kit.

For example, try this on dmaster.demo.civicrm.org

(screenshot added for posterity)

Results:
> 4 votes

# Answer
If you take one more step, then the solution is easier. When you click on Contacts as you describe you should see an Advanced Search link to the right

OR you could simply initiate your search via Adv Search and choose the required Group via the Groups field.

Then, in order to see different columns, you need to create a Profile that has the fields in it that you want (set the Profile to work for Search), and then via the Adv Search screen use the **Views for Display Contacts** to select your profile

More documentation here: https://docs.civicrm.org/user/en/latest/the-user-interface/searching/#views-for-display-contacts
> 2 votes

---
Tags: contacts, groups, searchkit
---


# Question
Title: Does CiviReport have a concept of "Group By"?
My org wants to know which countries were represented at an event. A simple way to do this is to "group by" country. Does CiviReport have a concept of grouping by a column?

# Answer
Reports for Contributions have grouping and quite a few in the 'Extended Reports' extension (which I guess most would use) as well. The 'Report Plus' extension has grouping also. So CiviCRM certainly has the concept of grouping. In addition the new 'Search Kit' can do grouping - and many other things, it's a really significant addition to CiviCRM.
> 5 votes

# Answer
You can build that with Search Kit

Try this on dmaster.demo.civicrm.org
> 3 votes

# Answer
The "group by" in your question is presumably the sql construct. CiviReport makes heavy use of sql to build it's results and has a 'group by' concept that is essentially an abstraction of that sql concept, though somewhat more flexible.

But of course, it's always more complicated than you think, so the "group by" thing in CiviReport isn't always available, it's only there when it's been setup by whoever writes the civireport "template".

If you are working with a report that doesn't have group by option already visible to you in the UI, it's probably not hard to add it. Look in the developer tab to provide the specific/template you're using for your report and you can probably get some more specific help.
> 1 votes

---
Tags: civireport, groups, reports, custom-reports, searchkit
---


# Question
Title: how to extend a field view in the new contribution screen?
Dear I need to extend the **view** of the Fund (Financial Type) field in the view of the new contribution? How can I do that? Please check the attached photo.

# Answer
> 1 votes
This isn't so much a CiviCRM question as a CSS question, which is answered on Stack Overflow.

There are several ways to edit CSS, depending on your CMS. Some WordPress themes allow you to edit it directly from the WP dashboard. You can always edit your Drupal or WP theme's CSS, and you can specify a custom CiviCRM CSS file.

It looks like the CSS you want is:

```
.crm-contribution-form-block-financial_type_id #financial_type_id {
    width: 400px;
}

```

You can also experiment with:

```
#financial_type_id {
    width: 400px;
}

```

The second option should change the width in more locations.

---
Tags: civicontribute, theme
---


# Question
Title: How do I do an advanced search that lists all the employees within organizations that are in a "group"
I want to export a list of all the employees ("employee of") our member organizations that are part of a group. I'm using the advanced search option, but can't figure it out.

Under relationships, I've checked "employee of" and then in the target group, selected the group. But it doesn't work.

Thanks in advance!

# Answer
> 3 votes
Set up a search in Advanced Search as though you were looking for the organizations. Then, at the top, for *Display Results As*, select **Related Contacts** and **Employee of**. Unless it's Employer of? One of those should work :)

---
Tags: advanced-search
---


title: Is there a way to export Group Details?

text:
# Question
Title: Is there a way to export Group Details?
Is there a way to export Group Details? I've tried to look into the custom reports, and various report options, without success. Ultimately, it would be great if you could export group details similar to "actions" on other windows (i.e., Contact Search).

# Answer
This is possible with SearchKit, but you'll need to be on the latest CiviCRM (5.42+) to export.

Here is a URL that contains the search on https://dmaster.demo.civicrm.org, you should be able to modify the URL for your own site. You can add more fields as needed.

You can also just replicate the search from this screenshot: Screenshot:
> 2 votes

# Answer
There isn't an export for this is CiviCRM, but you could select all the table entries on the screen and then paste it into Excel (or something similar), which would give you the information on this screen. Works if you have up to 100 groups and you set to 110 entries per page (or do it in multiple pages. And also expand any groups that are nested before exporting.
> 1 votes

---
Tags: groups, export
---


title: Civi Case DB Error: no such table

text:
# Question
Title: Civi Case DB Error: no such table
Any help please? Issue with Case dashboard and case tab on contact summary. No of this makes any sense to me???? civi 5.13.4

I have deleted all files and SQL database and restored from previous backups - same issues

civibackTrace

```
#0 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace()
#1 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/DB.php(985): PEAR_Error->_constuct("DB Error: no such table", -18, 16, (Array:2), " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#3 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#4 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -18, 16, (Array:2), " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...", "DB_Error", TRUE)
#5 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#6 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-18, NULL, NULL, " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...", "1146 ** Table 'brpcvshome_cvs.civicrm_view_case_activity_upcoming' doesn't exist")
#7 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#9 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#10 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#11 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#12 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(1491): CRM_Core_DAO->query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...", TRUE)
#13 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Case/BAO/Case.php(639): CRM_Core_DAO::singleValueQuery(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#14 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Case/Page/DashBoard.php(87): CRM_Case_BAO_Case::getCases(NULL, (Array:0), "dashboard", TRUE)
#15 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Case/Page/DashBoard.php(116): CRM_Case_Page_DashBoard->preProcess()
#16 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(311): CRM_Case_Page_DashBoard->run((Array:2), NULL)
#17 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))
#18 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:2))
#19 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:2))
#20 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#21 /home/brpcvshome/domains/thecvs.org.uk/public_html/libraries/src/Component/ComponentHelper.php(402): require_once("/home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/c...")
#22 /home/brpcvshome/domains/thecvs.org.uk/public_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/components/c...")
#23 /home/brpcvshome/domains/thecvs.org.uk/public_html/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
#24 /home/brpcvshome/domains/thecvs.org.uk/public_html/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#25 /home/brpcvshome/domains/thecvs.org.uk/public_html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication->doExecute()
#26 /home/brpcvshome/domains/thecvs.org.uk/public_html/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#27 {main}

```

# Answer
The stackbot bumped this so I figured I'd post an answer.

If you are on less than 5.37, as per the comments you can disable then re-enable CiviCase and it will recreate the views.

If you are on 5.37 or higher, the views no longer exist and this won't come up. See https://github.com/civicrm/civicrm-core/pull/19642.
> 1 votes

# Answer
Actually I can see one file name there that I do not think is part of core CiviCRM? This is the table `brpcvshome_cvs.civicrm_view_case_activity_upcoming`.

That is potentially a table that is part of an extension or some local customization. Is your CiviCRM database actually called brpcvshome\_cvs? If not, it might well be that you missed restoring a separate database? And if it is, can you check if that table is actually there?
> 0 votes

---
Tags: civicase
---


# Question
Title: Webform - why are contact details via cid1 disappearing so quickly?
We are picking up 'Contact 1' existing contact details via 'cid1' passed to the webform in the link emailed to users. Despite the checksum timeout set to 21 days (now set to 30) the webform stops picking up the contact after what seems to be only around 7-10 days. I've looked in the database at the settings table and 'checksum\_timeout' entry is set to s:2:"30"; This particular system was set up in 2013 & looking at other systems they are all set to s:1:"7"; or very similar. Is the third character important? i.e. the '2' rather than the '1'? Users can still use autoselect to set 'Contact1' but this should keep working for 21 days. To debug I added the useful 'Contact Checksum UI' extension which shows the message 'The checksum expires after days' whereas for another system it shows 'The checksum expires after 7 days'. So definitely not picking up the checksum expiry correctly. How to fix...?

# Answer
> 2 votes
The fix was to delete the entry in the table 'Settings' for 'checksum\_timeout' and then update the 'Misc' settings which recreated that table entry. I did test this idea first...! Now the 'Contact Checksum UI' has picked the timeout up OK so it's looking like there was something not right about that table entry - although I can't see any difference at all in the old and new table entries.

---
Tags: webform-civicrm, checksum
---


# Question
Title: Bespoke automatic receipt for specific campaign
We want to send a bespoke receipt (schedule reminder) to donors who donate to a specific campaign. We are struggling to work out how to link the schedule reminder to contributions to that campaign - we've looked into CiviRules and think we have the extension (but can't find it anywhere on our UI). Are we missing something? Is there a way to set up the trigger email without CiviRules and if CiviRules is the best method to do this, do you have any advice on how to set it up?

# Answer
> 1 votes
1/ if you have civirules installed then a/ you should see it listed as 'installed' at /civicrm/admin/extensions?reset=1 b/ you should find a CiviRules menu item under Administer (usually gets added at the bottom of the list)

2/ in terms of using it to send out a receipt, if you are wanting to include the amount they you may need an extension such as https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken so that you have 'most recent contribution' value available to insert in to the message (there may be other ways of doing this. just wondering what else might trip you up)

ps i think it would help if you could flesh out in your Q. how bespoke a msg this needs to be, since there is some option in the default receipts to use smarty like IF campaign = goldfish then insert text saying 'thank you for the goldfish food' ELSE 'our goldfish are really hungry'

---
Tags: contributions, activities, civirules, scheduled-reminders, receipts
---


# Question
Title: Do not see CIVIEngage in "Enable CiviCRM Components" to Enable
I recently installed Drupal 9 & CiviCRM 5.42.1 In "Enable CiviCRM Components" I see other modules - CiviCase, Campaign, etc. but do not see CiviEngage, to enable. As I understand, CiviEngage gets installed along with the Core, and all i need to do is to enable it.

Not sure if I missed anything in my installation steps.

regards, --Sujit

# Answer
> 1 votes
that is because CiviEngage is not part of core CiviCRM, see this post: Is CiviEngage a core part of CiviCRM now?

---
Tags: civicampaign, modules
---


# Question
Title: WordPress Version 5.8.1, CiviCRM 5.18 plugin installed, but DB upgrade fails from civi 5.17.5 -> 5.18
I saved a backup and I can revert, but I'd like to go forward with this upgrade. Can anyone please tell me how to fix this? Thanks in advance.

I am upgrading from 5.17.5 (the last patch of 5.17) to 5.18

---

\[Error: Remove Index on domain\_id that might have been randomly added in the same format as FK\] Error Field Error Value Type DB\_Error Code -1 Message DB Error: unknown error Mode 16 UserInfo DROP INDEX FK\_civicrm\_dashboard\_domain\_id ON civicrm\_dashboard \[nativecode=1553 \** Cannot drop index 'FK\_civicrm\_dashboard\_domain\_id': needed in a foreign key constraint\] DebugInfo DROP INDEX FK\_civicrm\_dashboard\_domain\_id ON civicrm\_dashboard \[nativecode=1553 \** Cannot drop index 'FK\_civicrm\_dashboard\_domain\_id': needed in a foreign key constraint\] PEAR\_Exception: DB Error: unknown error in /home/catastrophic/www/civi/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 922

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

# Answer
This is resolved. For anyone else who runs into this stuff, the answer is to check the logs and read the error message and attempt to make the change to the DB manually. Most of the time, it will just be one issue that can be resolved by manually changing the item, then rerunning the civi database upgrade.
> 0 votes

---
Tags: upgrade, database
---


# Question
Title: Is it possible to add the image/logo in the Summary Overlay Profile?
Question says it all. Is this possible to add it?

# Answer
> 2 votes
Yes I just tried it just now. Add the field `Contacts` \- `Image Url` to the profile.

---
Tags: profile
---


# Question
Title: Security aspects of Civicrm SMS API functionality
We are aiming to implement SMS messaging in the UK Research environment

We are concerned about the Information Governance and Data Security aspects of SMS messaging, and are therefore interested in the precise data transmitted and received by the API call from Civicrm.

Would be most grateful if anyone could provide an overview of the SMS functionality within Civicrm, including how to debug GET/POST data.

# Answer
> 0 votes
To use SMS you need to install an extension corresponding to the telco provider providing the service. So it depends on the extension, but in general there's just 4 pieces of data that get sent: authentication credentials, the FROM number, the TO number, and the message.

You can see for example the Twilio one is here: https://github.com/civicrm/org.civicrm.sms.twilio/blob/494728cf13bb65c228429665c158d899cd7e6dc1/org\_civicrm\_sms\_twilio.php#L163-L169.

---
Tags: developer, sms, civisms
---


# Question
Title: Are there any extensions to handle a 1 month free trial for a paid membership in civicrm?
Using civicrm / wordpress

I would have thought there would already be an extension or setting to have a 1 week / 1 month etc free trial when a member signs up as a paid member, but I cannot see this option.

Does anyone know of an extension to handle this or does it need custom development?

# Answer
> 1 votes
I'm not aware of anything that does that but a lot depends how you want things to behave.

What makes this trial month different to normal membership? Do you want them to be able to cancel and get a refund in that month? If so, that depends on how you take payments.

I'd look at adding a month to the membership end date and using the status rules so the first month has a status of 'Trial'.

---
Tags: civimember
---


# Question
Title: Searching for contacts using a list of first/last names
I've got a list of names that I need to find the contact profiles for. I only have the first and last name, is there a way to search for a batch of people and show up as a list view rather than searching one by one? I've tried search builder and custom seacrch but neither of them seem to have the functionality to search for multiple different names.

# Answer
> 3 votes
Welcome to CiviCRM stack exchange. I don't think there is anything built in. If its a lot of people you have in a spreadsheet, I'd export all the conatcts with contact ids to a spreadsheet and than match these the the people on your list. Delete the rest of the conatacts from the spreadsheet. Then import those contacts as an update (not changing anything), adding them to a new group. Then you can use that group to select the people on your list.

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


# Question
Title: Event management screen is not showing all tabs
Is there a setting somewhere that prevents an Admin to see other usual tabs when dealing with events?

# Answer
> 2 votes
That could be caused by https://lab.civicrm.org/extensions/civicrm-advanced-events This extension can hide tabs that are not wanted on the event management pages.

---
Tags: civievent
---


# Question
Title: Weird 1px lines appearing in Mosaico emails in Outlook
I've just spent a while trying to work out what was wrong with my installation of Mosaico. I am getting random 1 pixel lines in the middle of emails and assumed I had done something wrong. I haven't as I've now found https://mosaico.io/email-client-tricks/outlook-2016-weird-1px-horizontal-lines/ and it turns out to be a bug in Outlook that Microsoft have done nothing about since 2016. Its fine with other email clients. I think I just have to live with it. It is not Mosaico specific.

Posting this hear a) to save other people's time b) in case anyone has come up with a workround (unlikely from other github etc posts on the subject.

# Answer
> 1 votes
As petednz suggests I am putting this as an asnwer as anythng better is unlikely...

It turns out to be a bug in Outlook that Microsoft have done nothing about since 2016. Its fine with other email clients. I think I just have to live with it. It is not Mosaico specific.

---
Tags: mosaico
---


# Question
Title: Getting a strange error when visiting some pages on a D9 Civi 5.38 site related to Symfony container and flexmailer tokens
Here's the error I'm seeing:

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

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The "civi\_flexmailer\_required\_tokens" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead. in Symfony\Component\DependencyInjection\Container-\>make() (line 275 of /home/sites/dev/vendor/symfony/dependency-injection/Container.php).

Any pointers most welcome.

# Answer
I wasn't aware that Flexmailer had moved from being a contributed extension to being a core extension, so consequently went ahead and installed the contrib extension as I normally would when getting Mosaico installed. So I ended up with two copies of the extension, which led to the error. To fix it I disabled Mosaico and Flexmailer extensions (need to disable Mosaico as it depends on Flexmailer), uninstalled the Flexmailer extension, deleted the extension files from my contributed extensions directory, then refreshed my extensions listing, installed and enabled Flexmailer (which is now listed as a core extension - i.e. the path to the code shows that it is a core extension), and then re-enabled Mosaico.
> 9 votes

---
Tags: flexmailer, symfony
---


# Question
Title: Mosaico default template - unsubscribe setting
The default Mosaico template has unsubscribe option in header. However the token or destination url is for group unsubscribe rather than the more general opt-out token. I cannot see a way to insert/change the token that is used for the default or to change for an individual template.

Default:

Preferred:

(1) Is there a way to change an individual mailing to opt-out for unsubscribe (the more common requirement than removing from a Group)

(2) Is there a way to change the default?

Thanks

# Answer
This is how I do. You have 2 tokens:

> {action.unsubscribeUrl}

to unsubscribe

and

> {action.optOutUrl}

to opt-out

I placed this code in a block at the end of the e-mail and it does the job.

```
<p style="text-align: center;">Si vous ne souhaitez plus recevoir de message de notre part, cliquez <a title="désabonnement" href="{action.unsubscribeUrl}" target="_blank">ici pour vous désabonner</a> et <a href="{action.optOutUrl}" target="_blank">ici pour vous désinscrire de toutes les campagnes du DOMAIN</a></p>

```

and these are the links I get in the e-mail:

```
https://domain.net/civicrm/mailing/unsubscribe?reset=1&jid=4&qid=6&h=06932199472f700e

https://domain.net/civicrm/mailing/optout?reset=1&jid=4&qid=6&h=06932199472f700e

```
> 2 votes

# Answer
To change the default unsubscribe link in Mosaico to an opt-out requires editing the extension code. I did the following tweak and it worked fine. **Please note** that this is not an ideal solution, and that the change will disappear when you update the Mosaico extension. For a temporary hack it works. This is with Mosaico extension version 2.7.1621893607. Details may vary for other versions. Make sure you backup the original file first and test the change.

Edit file: ~/wordpress/wp-content/uploads/civicrm/extensions/uk.co.vedaconsulting.mosaico/mosaico.php

Change line 339 as follows, from

> '\[unsubscribe\_link\]' =\> '{action.unsubscribeUrl}',

To

> '\[unsubscribe\_link\]' =\> '{action.optOutUrl}',
> 1 votes

---
Tags: civimail, mosaico, opt-out
---


# Question
Title: How can I add a link in main menu to view own contact summary?
For a registered user, he will need on WordPress to navigate through the WP top bar, go to his profile and then click on 'CiviCRM Profile' to access his own contact. The CiviCRM link in Breadcrumb brings to the dashboard but I need them to access their own contact.

I'm looking for a way to make this easier and accessible through the CiviCRM menu bar. I know how to add a custom link but how can I customize the link based on:

https://domain.net/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview&reset=1&cid=\<contact\_id\>

From wordpress using custom php it's easy but once connected, how does it work?

How do I make the \<contact\_id\> variable being replaced in the URL?

# Answer
> 1 votes
One way to do this is:

1. Create an extension.
2. Make up a url like `civicrm/mymenu/contactrecord`.
3. Create a page for your extension that uses your url, e.g. `civix generate:page MyPage civicrm/mymenu/contactrecord`
4. Inside the page run() method, put code that does `CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . CRM_Core_Session::getLoggedInContactID()));`
5. You might want to check if the logged in contact is null first and do something else.

Now anyone can visit /civicrm/mymenu/contactrecord and it will go to their contact record.

---

Lastly, I know you're on wordpress, but for others for drupal there is https://github.com/compucorp/uk.co.compucorp.usermenu which adds a menu with a link but note that it goes to the *drupal user* account, not the civi contact record.

---
Tags: custom
---


# Question
Title: SOLVED - Error on new contribute after upgrade to 5.41.2
After upgrading to 5.41.2 I have a problem when creating a new contribute. Any suggestion in order to manage the error?

error log:

```
Versione di WordPress 5.8.1
Plugin corrente: CiviCRM (versione 5.41.2)
Versione PHP 7.4.23

Dettagli dell'errore
====================
Un errore di E_ERROR è stato causato nella linea 390 del file /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php. Messaggio di errore: Uncaught TypeError: Argument 1 passed to CRM_Financial_BAO_Order::isOverrideLineItemFinancialType() must be of the type int, null given, called in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 817 and defined in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php:390
Stack trace:
#0 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(817): CRM_Financial_BAO_Order->isOverrideLineItemFinancialType(NULL)
#1 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(700): CRM_Financial_BAO_Order->calculateLineItems()
#2 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php(926): CRM_Financial_BAO_Order->getLineItems()
#3 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php(1600): CRM_Contribute_Form_Contribution::formRule(Array, Array, Object(CRM_Contri

```

Other log

```
Notice: Trying to access array offset on value of type bool in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1633

Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 311

Notice: Trying to access array offset on value of type null in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 311

Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 313

Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 331

Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1637

Fatal error: Uncaught TypeError: Argument 1 passed to CRM_Financial_BAO_Order::isOverrideLineItemFinancialType() must be of the type int, null given, called in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 817 and defined in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php:390 Stack trace: #0 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(817): CRM_Financial_BAO_Order->isOverrideLineItemFinancialType(NULL) #1 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(700): CRM_Financial_BAO_Order->calculateLineItems() #2 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php(926): CRM_Financial_BAO_Order->getLineItems() #3 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php(1600): CRM_Contribute_Form_Contribution::formRule(Array, Array, Object(CRM_Contri in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 390

```

# Answer
> 1 votes
After two day of try and error I got the problem: the new version get from the keypad as decimal separator the . instead the , and civicrm doesn't manage it. Also if I put only the integer part of without the decimal part it assume the . I'm not sure if there something different in the new version about regional settings, but I'm happy to have solve it

# Answer
> 0 votes
You have a line item that doesn't have a financial type. Check your financial types and if using price sets check the financial types on them.

---
Tags: civicontribute, contributions
---


title: Events and CDN receipts

text:
# Question
Title: Events and CDN receipts
Is it possible to send CDN receipts automatically upon event registration without replacing the event receipt code with the CDN receipt one ?

# Answer
> 1 votes
There is the "Attach receipts to automated workflow messages" setting in the CDN tax settings.

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


# Question
Title: Webform CIVICRM Date List and Date/Time doesn't capture year correctly
I'm using CIVICRM Webform on Drupal 9, I'm trying to capture some date fields using Date List and or Date/Time, instead of the regular Date field, because of some strange issues on older browsers, (probably because of HTML5 incompatibility)

The month and the day are captured correctly, but the year is registering 0400, instead of the correct year.

I've tried it for Birth Date and Custom Date Fields, and both are showing 0400 as the year. The format is dd-mm-yyyy

Any assistance would be appreciated.

P.S. The webform result is capturing the correct year, but in CIVICRM it is not.

# Answer
> 2 votes
CiviCRM Custom fields configured as Data Type = Date all get added to Webform build tab as:

```
  civicrm_1_contact_1_cg22_custom_59:
    '#type': date
    '#data_type': Date

```

Ah you're then retyping that to a Date List field in the UI?

Yep - I see the issue. This will require a code fix. This particular field mapping just doesn't exist yet.

I do like the idea of supporting Date List type of fields and would be happy to welcome a code fix/PR or alternatively you can also sponsor this feature and either myself or one of my team can work on it.

AD-hoc: ah it looks like one of our Partner/clients hit the same issue -\> Fuzion has submitted a PR -\> https://github.com/colemanw/webform\_civicrm/pull/635 \- if you can help test/review this then we can get it merged quickly.

---
Tags: webform-civicrm, dates
---


title: The same name distinction in Civicrm

text:
# Question
Title: The same name distinction in Civicrm
i doing customize CiviCRM 5.29.1 for Wordpress 5.5.1 last version.

i have many student the same lastname,midlename,lastname

Ex:

Student 1:Nguyen Hoang Phuong, ID:123456

Student 2:Nguyen Hoang Phuong, ID:123457

Student 3:Nguyen Hoang Phuong, ID:123458

All my student only have ID, not email address. only ID difference

ID is my custom field. can i change email to ID when select student in soft credit? easy for select right student.

see attached

Thanks

# Answer
> 1 votes
If you combine Demerit's and Pete's suggestions.

1. Update Sort Name Format to include the External Identifer token {contact.external\_identifier}
2. Export your current id field entries and re-inport them into the standard External Identifier Field

You can then search by external id in the soft credt option

# Answer
> 0 votes
Under Administer - Customize Data and Screens - Display Preferences, near the bottom, there's a setting for "Individual Sort Name Format". You can add in some tokens here. Not all tokens work so I don't know if there's one for your custom id, but if there isn't you might be able to find another useful field.

Note when you click save it won't automatically update existing contacts. You'd need to edit and re-save those.

---
Tags: civicontribute, civicontact
---


# Question
Title: Menu bar editor: how to add a target="_blank"?
I need to add some external links to the menu bar and I want them to open in a new tab.

I've unsuccessfully tried variations around `https://domain.net/page?target=_blank`

Is this possible through the UI?

# Answer
Creating a custom extension following this doc was the best and quickest solution.
> 1 votes

# Answer
You can't do it because it's controlled by an attribute on the `<a>` tag. It would be possible with some extra jquery you add to all pages that updates the `<a>` so it has `<a target="_blank"...>`.

But just a warning some people don't like it when you decide for them. If they want to open in another window they can right-click and choose that.
> 2 votes

---
Tags: user-experience
---


# Question
Title: Permanently Deleted Contact Records Keep Reappearing
We are using CiviCRM with wordpress and we're trying to do a data cleanse to remove any out of date and spam contacts. None of the records we're trying to delete have financial data attached. We deleted over 500 records in batches using the permanently delete function and with each deletion the message appeared saying these records have been permanently deleted. At the time of deletion the total number of records reflected that these records had been deleted but the next day these records all reappear. Can anyone tell me how to resolve this please?

# Answer
I'm sharing this as I finally found a solution to the question I posted and hopefully it may help someone else who comes across a similar situation. Our organisation is membership based, so when a user sets up a record they are completing a Wordpress form, from which CiviCRM creates a Contact record. At the same time Wordpress creates a Profile which an administrator can access through Users in the menu options. When you look at a Contact record there is a field Contact ID / User ID and each is allocated a number, one of which is a blue link which takes you to the Profile record for that member. To delete a Contact record is very straightforward, but what I didn't realise is that before deleting the Contact record (CiviCRM), you need to delete the Profile record (Wordpress). The system is programmed to create a Contact record to match each Profile record, so if you only delete the Contact record it recreates the Contact record overnight. It's actually very straightforward but it's not covered in the User manual (at least not in the section that relates to deleting Contacts) and has taken me some time to resolve.

Please note, it may work differently for Drupal so it's worth checking if you are using a CMS other than Wordpress.
> 4 votes

# Answer
Are those real contacts? Can you check the created date against the contact? It shows up at the bottom when you view the contact or you can grab from civicrm\_contact.created\_date using mysql.

If the dates are changing than it means those contact are created via Bots. Could check all the forms which are accessible to anonymous user have recaptcha installed these includes user registration, membership signup or event registration etc? Include recaptcha on all your Civi profile forms. Visit the permission page to check if anonymous user is allowed to create contact.
> 1 votes

---
Tags: wordpress, contacts
---


# Question
Title: CiviVolunteer easy way to text a reminder to volunteer with their shift time
Running CiviVoluteer on Wordpress and wanting to send a text via a reminder to a volunteer with their shift date and time. Using the integration set up through Events but when volunteers sign up they are not being registered for event. Therefore sending reminders doesn't work because I only have the choice to i can only choose recipients from "Participant type" (e.g. registered). Also for the text itself there doesn't seem to be tokens for any of the civivolunteer fields besides "Camera Skill Level". i would like to include Volunteer "Project Tile", "Volunteer Role" "Volunteer Opportunity Time". Any guidance on this would be greatly appreciated.

# Answer
That is correct, the event integration does not include automatically creating participant records for volunteers. If you need participant records, you should have them register, instead of using the volunteer sign-up.

If you don't really need the participant record, you can easily achieve the rest of your needs.

Just use Scheduled reminders to send an SMS relative to the volunteer Activity. It is not true that you can only select Participants for the schedued reminders. You can use the activity to trigger the reminder.

Cheers
> 3 votes

---
Tags: civivolunteer
---


# Question
Title: Custom File field in custom group used by CiviCRM entity group not saving
I attached a new custom group to entity type group and added a field of type file. When editing the group settings and fill in a file, it is posted without errors and notification bubble confirms success. But there is no file uploaded.

No error logs even with debugging enabled, file tmp folder is checked and I successfully tried another custom file field attached to entity contact.

Just tried on https://dmaster.demo.civicrm.org/ \- same misbehavior.

Looked at the code and it seems that the posted file info is not getting into the params array. Although the posted name is of correct format `custom_123_21313` the `packages/HTML/QuickForm/Controller.php->exportValues` gets "MAX\_FILE\_SIZE" as key for the custom field. Could it be that https://lab.civicrm.org/dev/core/-/blob/master/CRM/Group/Controller.php 's overridden custom file field preparation causes this error?

Civi and Drupal are current versions.

Core Team, do you have a clue? How may I investigate further? Where is the $\_POST stuff prepared prior to postProcess in `CRM/Group/Form/Edit.php`?

# Answer
This does **not work** and has never.
> 0 votes

---
Tags: custom-fields, files
---


# Question
Title: Unsubscribe Confirmation Page Shows Too Much Information
When users click to unsubscribe from our newsletter, to confirm their unsubscribe they are taken to a page in CiviCRM that shows them all of the groups that the email was sent to.

Is there anyway to change it so that these groups are not visible to them?

# Answer
> 2 votes
Since 5.32 there are new fields in the Group Setting, so as well as the original Title and Description, there are now Public Title and Public Description fields, which, if used, will show to the public when unsubscribing from a mailing, or using the Subscribe page

# Answer
> 1 votes
Write an extension and use hook\_civicrm\_buildForm( $formName, &$form ) where you can change the values for the specify page

please use this link for reference for more details http://wiki.civicrm.org/confluence/display/CRMDOC43/hook\_civicrm\_buildForm

---
Tags: civimail
---


# Question
Title: Weird Thing Happening with Trackable Emails and Multiple Civi Deployments
I work at a University where multiple departments use CiviCRM. For some reason, on one particular department, when I click on their emails that they send from CiviCRM, I get the following error:

`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. There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting`

It is so strange. It does not happen to me when I open the links from the email in incognito, not sure what could be happening. It is also only happening to me and some of my co-workers that also use our deployment of civicrm.

# Answer
Two things: Admins won't see this message because it's coming from IDS (Intrusion Detection System) which is bypassed by default for admins. Then the second thing is I've seen this for email activities where there's a long thread of conversation in the email body and all the nesting confuses IDS.
> 0 votes

---
Tags: civimail, mosaico
---


title: Map firstname-lastname pairs to IDs

text:
# Question
Title: Map firstname-lastname pairs to IDs
I have a long list of donations that I want to import. My first step was to ensure that all the contacts in the list exist in CiviCRM - that's done, and I spent a while deduplicating the records. Next, I imported all the donations that mapped cleanly using email addresses. That worked well.

Now I have a couple hundred donations left where the only identifying information is the contact's First Name and Last Name field. It seems like the right thing to do now is to write a script that determines whether each of my First/Last pairs is unique among all contacts, and if so, pull the Contact ID so that I can put an ID in each line of the import data, and finally import the donations. After this, I think there should only be a handful of donations to add manually.

I was initially trying to write a script like so:

```
if (($handle = fopen($argv[1], "r")) !== FALSE) {
    $header = fgetcsv($handle, 1000);
    fputcsv(STDOUT, $header);
    echo ",contact_id\n";
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $row = array_combine($header, $data);

        $result = civicrm_api4('Contact', 'get', [
            'select' => ['primary_contact_id'],
            'where' => [['first_name', '=', $row['Firstname']],
                        ['last_name', '=', $row['Lastname']]]]);

        if (count($result) != 1) {
            continue;
        }
        row[] = $result[0]['id'];
        fputcsv(STDOUT, $row);
        echo "\n";
    }
    fclose($handle);
}

```

However, I got stuck trying to load the API library, and eventually I found the page https://docs.civicrm.org/dev/en/latest/extensions/advanced/ , which tells me I shouldn't be attempting to write a script like this (but it also says that its own self is out of date...).

So what would be a good way to go about this? I don't anticipate needing to do this exact task again, so I don't need to make it repeatable, but it would be good to learn what the "paved path" is here because I'm sure there will be other tasks to perform at various times.

# Answer
> 2 votes
If you are happy working with the command line, install cv then you can run `cv scr /path/to/your/script.php`

To use your script with cv add `<?php` as the first line.

You'll want `'select' => ['id'],` not `'select' => ['primary_contact_id'],`

Once you get that far, you could just create the contributions directly instead of outputting the id and doing a separate import process. And from there you'll see it is only a few short steps to doing your entire import via the script with all the logic in one place!

---
Tags: api, contributions, php
---


# Question
Title: How does drush:site-install recognize a previous civi installation?
While trying to set up an install script for a composer drupal/civi template, I try to rerun the install process several times. CiviCRM refuses to do that, saying

```
civicrm appears to have already been installed. skipping full installation.

```

I know that. But I've cleared all tables from the database, and I've cleared `web/sites/default/files/civicrm*`. It still says that. What is it seeing ?

The message is generated from `./web/modules/contrib/civicrm/civicrm.install` which reads

```
if ($installed->isSettingInstalled() || $installed->isDatabaseInstalled()) {
    throw new \Exception("CiviCRM appears to have already been installed. Skipping full installation.");
  }

```

.. but what is it looking at ?

# Answer
It also looks for civicrm.settings.php and there's also a civicrm\_install\_canary table.
> 2 votes

---
Tags: installation, drupal-9, 5.10.x
---


# Question
Title: How does one add different client contact types (categories) to the same case?
We have 'Allow Multiple Case Clients' enabled on our CiviCRM instance. Before we upgraded to the current version, we were able to add different contact types (individual and organization) to the same CiviCase. But now we cannot. I verified that this is also not possible on the Sandbox version 5.44.alpha1.

I thought the problem might be with the relationships so as an experiment I set all relationship contact types to 'all contacts' instead of 'individual' or 'organization.' But that didn't resolve the issue.

The Case Add Client miniform restricts the search for adding additional new clients based on the client contact type that already exists on the case. See the attached images.

Is this a purposeful change to disallow mixed client contact types (ind/org) on the same record or is there something else that I need to do to get this to work?

Your help is appreciated.

**UPDATED (based on the fact that this is custom functionality):**

I'd like to alter this behavior by setting the contact type API parameter to "IN":\["Individual","Organization"\] rather than using the variable $contactType.

I thought I might be able to use hook\_civicrm\_buildForm but the CRM\_Case\_Form\_CaseView form includes elements that are hidden and thus do not show up in the $form variable as \_elements.

This is the element in CaseView.tpl that I would like to alter the parameter value:

Are elements of class 'hiddenElement' accessible to hook\_civicrm\_buildForm? Or should I be using a different approach?

Thanks for your help.

# Answer
It looks like it's been this way since 2015. What version did you upgrade from?

https://github.com/civicrm/civicrm-core/pull/6806/commits/e7e572807e8ec866d63584f280a7a78d3d9c738a
> 1 votes

---
Tags: civicase
---


title: Upgrade CiviCRM from 5.04 to 5.42

text:
# Question
Title: Upgrade CiviCRM from 5.04 to 5.42
I need to upgrade an existing CiviCRM 5.0.4 to the latest (5.42).

What approach is recommended?

Thanks in advance.

# Answer
> 0 votes
It may take some trial and error and going in steps. The CMS will also make a difference how you break up the steps. At some point you'll need to upgrade php to 7.x, but for some of the intermediate civi versions you might not want to go past php 7.1 or 7.2.

See also https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/ for some steps you might need to do along the way.

---
Tags: upgrade
---


title: Can't install civiCRM with drupal 9.2.7

text:
# Question
Title: Can't install civiCRM with drupal 9.2.7
I installed the latest Drupal 9 (9.2.7) using composer as follows:

```
composer create-project drupal/recommended-project myDrupal9

```

That gave me the latest/recommended version (9.2.7)

I then tried to install civiCRM using this instructions (only difference is, version installed = Drupal 9.2.7) that failed with the below errors.

```
Installing civicrm/civicrm-core (5.42.1): Extracting archive
Install of dflydev/apache-mime-types failed
Install of adrienrn/php-mimetyper failed
Install of brick/math failed
Install of brick/money failed
Install of cache/tag-interop failed
Install of cache/integration-tests failed
Install of phpseclib/phpseclib failed
Install of civicrm/civicrm-cxn-rpc failed
Install of zetacomponents/base failed
Install of zetacomponents/mail failed

Failed to download civicrm/civicrm-drupal-8 from dist: web/modules/contrib/civicrm does not exist and could not be created.
Now trying to download from source
unzip:  cannot find or open /var/www/html/myDrupal9/vendor/composer/tmp-efb8b42182d07450c2d7ec823e73087a.

This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
unzip:  cannot find or open /var/www/html/myDrupal9/vendor/composer/tmp-1a4503f846ecbbb0aade402b4254eafa.

This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
Install of tplaner/when failed
Failed to extract totten/ca-config: (9) '/usr/bin/unzip' -qq '/var/www/html/myDrupal9/vendor/composer/tmp-2ddb0683b1b57a00b717f6da8788dd9d' -d '/var/www/html/myDrupal9/vendor/composer/49ca8d4b'

```

I also tried using the main install page instructions and no luck with similar errors.

I'm using Drupal 9.2.7 since end of life for 9.1.x series is in few weeks.

Using: composer version 2.

PHP 8.0 and MySQL 8.0.

Anybody got ideas?

# Answer
> 1 votes
Permissions problem on the folders. As per @luke-stewart in the comments running composer with -vvv helps diagnose such problems.

---
Tags: drupal-9
---


# Question
Title: Drupal Views: can I use only date and not time when using a date filter?
Stupid question but I'm still getting into the Drupal side of Civi.

I've made a View to show the participants of events in different programme areas. One of the filters is the start date of the event, that's exposed to allow them to search for specific dates.

However, the filter is using ISO8601 format in that it has HH:MM:SS and using the filter requires users to know the both the date and the time when the event started. Is there a value type that I can use instead so that it only searches for the date and not the time as well?

# Answer
CiviCRM Event start end dates are stored like this:

2021-11-03 13:00:00

i.e. the mysql datetime format.

That field gets exposed into the Drupal views magic and then it's up to views to do stuff with it.

For what you want, you'll either have to find a fancy views filter that can filter datetimes by day, or you may be able to use a hard-coded beginning and end of date times, e.g.

greater than 2021-11-03 00:00:00 and less than or equal to 2021-11-03 23:59:59

Your options will depend on which version of Drupal you're using.
> 2 votes

---
Tags: drupal-views
---


# Question
Title: Allow mail from logged in contact - CiviSpark
We're using civispark with civimail and want to be able to send mail from the logged in user. I have found this setting but I don't seem to have the option to amend it. Administer\>Settings\>Outbound Mail Does anyone know if that is a CiviSpark 'thing' or if I should be looking elsewhere to change it to yes? TIA

# Answer
> 2 votes
CiviCRM Spark have confirmed that this isn't currently possible on that platform.

---
Tags: civimail
---


title: View sent System Workflow Messages

text:
# Question
Title: View sent System Workflow Messages
Is there an easy way to view system workflow messages that have been sent? I want to confirm volunteers are receiving confirmation message.

# Answer
> 1 votes
The Transactional extension adds bounce handling and click tracking, and creates activities for CiviCRM's transactional emails (i.e event registrations, contribution receipts, invoices, scheduled reminders, and so on).

It also creates an Activity for every type of Mail that is sent out, so easier to see what is going on.

# Answer
> 1 votes
You can set CIVICRM\_MAIL\_LOG to the path to a log file and then also set CIVICRM\_MAIL\_LOG\_AND\_SEND in civicrm.settings.php to also have them go out as normal: https://docs.civicrm.org/dev/en/latest/tools/debugging/#changing-file-based-settings

On a busy site the file will grow quickly so don't leave it turned on.

---
Tags: civivolunteer, system-workflow-messages
---


title: How create contact forms in joomla?

text:
# Question
Title: How create contact forms in joomla?
Please tell me if it is possible on joomla to display a form with a text field on the site, so that when it is filled in, a user is created, as well as an incoming message from this user? Using the standard features of civicrm, I managed to create only a form that creates a user, but I cannot attach a text field to this form. Apparently, the standard features do not allow this, or there are some nuances that I do not know about. Here is what I was able to create https://i.stack.imgur.com/kiy5G.png Below you need to add a text field that will contain the text of the letter. I cannot add it. Do not know how. If I add activity / details to the profile, the form stops working.

Original text in russian: Здравствуйте. Скажите пожалуйста ли возможность на joomla, вывести на сайт форму с текстовым полем, так, что бы при её заполнении создавался пользователь, а так же входящее сообщение от этого пользователя? Используя стандартные возможности civicrm, мне удалось создать только форму, которая создаёт пользователя, а вот текстовое поле прикрепить к этой форме мне не удается. Видимо стандартные возможности этого сделать не позволяют, либо есть какие-то нюансы, о которых я не знаю. Вот то, что мне удалось создать https://i.stack.imgur.com/kiy5G.png Ниже нужно добавить текстовое поле, которое будет содержать текст письма. Его я не могу добавить. Не знаю как. Если в профиль добавляю активность/детали, то форма перестает работать.

# Answer
> 1 votes
To add a Text Field to a Profile (which you can then use as a Contact Form) you need to go to Custom Fields, add a field set and then add your field. Then go to your profile and add this field. If you want users created then select the option in Advanced settings of the Profile to set this up.

---
Tags: joomla, forms
---


title: Make API queries - two methods failing

text:
# Question
Title: Make API queries - two methods failing
I'm trying to query my data for records with a given firstname/lastname pair (see Map firstname-lastname pairs to IDs for some previous context) using a couple different methods, and failing.

## API4

The first way is using `cv` and some PHP code:

```
<?php

    $result = civicrm_api4('Contact', 'get', [
        'select' => ['id'],
        'where' => [['first_name', '=', 'Ken']],
        'limit' => 2,
    ]);
    echo $result->count(), "\n";

```

invoked via `sudo -u daemon `which cv` scr my_script.php`.

This prints `0`, though there are several records in my database with the first name `'Ken'`.

## REST API

The second way I've tried is to hit the REST API through some Python code, like so:

```
import requests

args = dict(
    entity='Contact',
    action='get',
    json='{"sequential":1,"return":"id","first_name":"Ken"}',
    api_key='my-api-key',
    key='my-site-key'
)

result = requests.get('http://my-site/modules/contrib/civicrm/extern/rest.php', params=args)

```

This gives me:

```
b'Could not load the settings file at: /bitnami/drupal/modules/contrib/civicrm/../..//default/civicrm.settings.php\n'

```

so I'm thinking my REST API might not quite be functional? My settings file is at `/bitnami/drupal/sites/default/civicrm.settings.php`, which is not what it seems to be looking for.

## Question

How can I get one of these methods working?

## Details

I'm using CiviCRM 5.42.1 on Drupal 7.82.

# Answer
For your `cv` call either turn off the permission check or specify a user to run with.

So either:

```
<?php
    $result = civicrm_api4('Contact', 'get', [
        'checkPermissions' => FALSE,
        'select' => ['id'],
        'where' => [['first_name', '=', 'Ken']],
        'limit' => 2,
    ]);
    echo $result->count(), "\n";

```

or

```
sudo -u daemon `which cv` scr -U admin my_script.php

```

where `admin` is a CMS user with appropriate powers.

FYI, with APIv3 `check_permissions` defaults to 0 whereas APIv4 `checkPermissions` defaults to True.
> 2 votes

---
Tags: api, rest, apiv4
---


# Question
Title: how to get a list of activities with their details from some created activity new fields
I need to get a report of activities listed with some extra fields I created for the activity layout. Ex:

Type of activity: MEASUREMENTS.

I created 2 new fields called "high" and "weight" assigned to that type of activity. Now, I need to get a list of every activity recorded, with the "high" and weight" for every activity listed in the report.

Any ideas, guys.

# Answer
For those custom fields make sure the "is this field searchable" box is checked.

Then under reports - contact reports there's one called activity detail. In there you'll see a section to include your fields in the report.
> 1 votes

---
Tags: activities, reports
---


title: error on membership in backoffice

text:
# Question
Title: error on membership in backoffice
When I try to add a membership from the back office as an admin on CiviCRM 5.42.1 on WP 5.5.6, I'm getting this error 500 I don't know how to interpret.

Where could I dig in?

EDIT 1: Trying through API V3 worked like a charm, is this a front end issue (js / AJAX)?

```
***ERROR***
message:            invalid criteria for IN
code:
exception:          CiviCRM_API3_Exception Object
(
[extraParams:CiviCRM_API3_Exception:private] => Array
    (
        [is_error] => 1
        [error_message] => invalid criteria for IN
        [error_code] => undefined
    )

[message:protected] => invalid criteria for IN
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /home/domain/domain/wp-content/plugins/civicrm/civicrm/api/api.php
[line:protected] => 134
[trace:Exception:private] => Array
    (
        [0] => Array
            (
                [file] => /home/domain/domain/wp-content/plugins/civicrm/civicrm/CRM/Member/Form/Membership.php
                [line] => 1834
                [function] => civicrm_api3
                [args] => Array
                    (
                        [0] => Membership
                        [1] => get
                        [2] => Array
                            (
                                [id] => Array
                                    (
                                        [IN] => Array
                                            (
                                            )

                                    )

                                [version] => 3
                            )

                    )

            )

        [1] => Array
            (
                [file] => /home/domain/domain/wp-content/plugins/civicrm/civicrm/CRM/Member/Form/Membership.php
                [line] => 1523
                [function] => getCreatedMemberships
                [class] => CRM_Member_Form_Membership
                [type] => ->
                [args] => Array
                    (
                    )

            )

        [2] => Array
            (
                [file] => /home/domain/domain/wp-content/plugins/civicr...

```

# Answer
> 1 votes
Recreating the equivalent memberships and then updating them with SQL was the solution

```
UPDATE `contact_membership` SET `membership.id` = 'Y' WHERE `membership.id` = 'X'

```

# Answer
> 2 votes
The top (0) entry of your trace says that it's trying to run an civicrm api command without enough arguments. It's trying to get memberships matching some collection of ids, but the code isn't providing anything to match.

The next entry shows you how it go there - it's trying to get the memberships that it has just created.

My guess is that the error is actually happening earlier than this trace shows - i.e. a membership is not getting created, but the code is then trying to work with whatever membership it assumes has been created, and is failing.

There are a few issues here:

1. Figuring out why the membership wasn't created - likely there is an earlier warning in the error log. It might be related to a core error or an extension error, or even a WP-Civi integration issue.
2. Figuring out why the code kept going after it failed earlier. That's for bonus points.

---
Tags: civimember
---


# Question
Title: Disabling CiviContribute causes problems
I am experiencing another problem with Price Sets and Financial Types after upgrading from 5.42.1 to 5.43.0. These seems to be due to enabling and disabling CiviContribute in the past.

The latest problem is not being able to update a membership:

`TypeError: Argument 1 passed to CRM_Financial_BAO_Order::setPriceSetID() must be of the type int, null given, called in /home/covsa/domains/a.covs.nl/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/Order.php on line 902 in CRM_Financial_BAO_Order->setPriceSetID() (regel 465 van /home/covsa/domains/a.covs.nl/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/Order.php).`

Trying to create a new price set:

`SELECT id, entity_id FROM` civicrm\_entity\_financial\_account `WHERE ( account_relationship = AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id' at line 4]`

Now if I enable CiviContribute, the problems vanish.

What should I do?

* try to solve these leftovers;
* enable CiviContribute but prohibit users to use it.

# Answer
> 3 votes
I think there are a couple things in civi that unintentionally depend on civicontribute. Easier to hide/remove menu items than fight it.

---
Tags: civicontribute, civimember, price-sets, financial-types
---


# Question
Title: Searching and smart group for multiple event types
I created a smart group through advanced search maybe 1 year ago for all contacts that had participated in an Event Type A or B or C. If I remember correctly it was very simple because the "Event Type" field in Advanced Search allowed multiple types to be selected. We now want to include Event Type D but when I go to edit the advanced search, it only allows a single type to be selected. Has the select widget for Event Type in Advance Search been changed to single select? Any ideas on how to now do a search for multiple event types?

# Answer
> 1 votes
Using the API3 interface I was able to see the information I needed to work though this problem. See the comments.

# Answer
> 1 votes
Note that there has been a request since 2017 to request this functionality at Multiselect for Event Type in Advanced Search.

# Answer
> 1 votes
With the new search interface SearchKit now it's possible to get this type of smart group in an alternative and easy way to advanced search.

---
Tags: advanced-search
---


# Question
Title: Modify Amount of Pending Contribution (Price Set)
Seems like if a donor makes a pay later commitment using a price set, we cannot manually go in and change the amount. Is that intended? Instead of the editable donation amount, I just see this.

# Answer
> 2 votes
It is possible that the Line Item editor extension, which provides editing option for line items in Contributions, may be what you are after

---
Tags: civicontribute
---


# Question
Title: It is possible to receive an alert when we have an action planified?
I would like to receive a notification when I plan a future action in Civicase ? For exemple, if I plan to call a prospect next monday, is it possible to have at 9 am an alert on the following monday telling me that I have to do this specific call ? It is possible ? It is possible to receive the alterts on Slack or Google Agenda ? Should I had an extension ? Thank you for your answer

# Answer
Have you tried scheduled reminders? It can be based on activities. See https://docs.civicrm.org/user/en/latest/email/scheduled-reminders/
> 1 votes

# Answer
Another option for sending reminders where Scheduled Reminders do not apply is via CiviRules
> 1 votes

---
Tags: extension, civicase
---


title: How can new members create a password?

text:
# Question
Title: How can new members create a password?
How can I enable new users who register on my Wordpress/CiviCRM site to create a password (for a member login)?

# Answer
As Pete suggests, check the following if a profile is in use:

For the Civi profile under 'Advanced settings' tick either:

WordPress user account registration option?

* Give option, but not required
* Account creation required

In Wordpress under 'Settings' - 'General' you have to ensure that ' Anyone can register' is also enabled.

Once that's done you should be able to preview/test the sign up form (thought the create account options only show if not already logged in or using a private browsing window).
> 0 votes

---
Tags: wordpress
---


# Question
Title: Receiving errors when running reports. "Sorry but we are not able to provide this at the moment."
Drupal 7.41 CiviCRM 4.6.6

We are using an older version of CiviCRM and are randomly starting to get "Sorry but we are not able to provide this at the moment." when running certain reports.

I enabled backtrace and debugging. Below are the results.

Any help would be appreciated. This happens randomly but is happening more and more often now.

backTrace

#0 /var/www/html/Dash/modules/civicrm/CRM/Core/Error.php(182): CRM\_Core\_Error::backtrace() #1 internal function: CRM\_Core\_Error::handle(Object(DB\_Error)) #2 /var/www/html/Dash/modules/civicrm/packages/PEAR.php(931): call\_user\_func((Array:2), Object(DB\_Error)) #3 /var/www/html/Dash/modules/civicrm/packages/DB.php(976): PEAR\_Error-\>PEAR\_Error("DB Error: unknown error", -1, 16, (Array:2), "SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...") #4 /var/www/html/Dash/modules/civicrm/packages/PEAR.php(564): DB\_Error-\>DB\_Error(-1, 16, (Array:2), "SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...") #5 /var/www/html/Dash/modules/civicrm/packages/DB/common.php(1905): PEAR-\>raiseError(NULL, -1, NULL, NULL, "SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...", "DB\_Error", TRUE) #6 /var/www/html/Dash/modules/civicrm/packages/DB/mysql.php(899): DB\_common-\>raiseError(-1, NULL, NULL, NULL, "126 \** Incorrect key file for table '/tmp/#sql\_705\_0.MYI'; try to repair it") #7 /var/www/html/Dash/modules/civicrm/packages/DB/mysql.php(328): DB\_mysql-\>mysqlRaiseError() #8 /var/www/html/Dash/modules/civicrm/packages/DB/common.php(1216): DB\_mysql-\>simpleQuery("SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...") #9 /var/www/html/Dash/modules/civicrm/packages/DB/DataObject.php(2442): DB\_common-\>query("SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...") #10 /var/www/html/Dash/modules/civicrm/packages/DB/DataObject.php(1634): DB\_DataObject-\>\_query("SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...") #11 /var/www/html/Dash/modules/civicrm/CRM/Core/DAO.php(325): DB\_DataObject-\>query("SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...") #12 /var/www/html/Dash/modules/civicrm/CRM/Core/DAO.php(1179): CRM\_Core\_DAO-\>query("SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...", TRUE) #13 /var/www/html/Dash/modules/civicrm/CRM/Report/Form.php(2776): CRM\_Core\_DAO::executeQuery("SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...") #14 /var/www/html/Dash/modules/civicrm/CRM/Report/Form/Activity.php(763): CRM\_Report\_Form-\>buildRows("SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARA...", (Array:0)) #15 /var/www/html/Dash/modules/civicrm/CRM/Report/Form.php(753): CRM\_Report\_Form\_Activity-\>postProcess() #16 /var/www/html/Dash/modules/civicrm/CRM/Core/Form.php(455): CRM\_Report\_Form-\>preProcess() #17 /var/www/html/Dash/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(94): CRM\_Core\_Form-\>buildForm() #18 /var/www/html/Dash/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM\_Core\_QuickForm\_Action\_Display-\>perform(Object(CRM\_Report\_Form\_Activity), "display") #19 /var/www/html/Dash/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML\_QuickForm\_Controller-\>handle(Object(CRM\_Report\_Form\_Activity), "display") #20 /var/www/html/Dash/modules/civicrm/CRM/Core/Controller.php(353): HTML\_QuickForm\_Page-\>handle("display") #21 /var/www/html/Dash/modules/civicrm/CRM/Utils/Wrapper.php(115): CRM\_Core\_Controller-\>run() #22 /var/www/html/Dash/modules/civicrm/CRM/Report/Page/Instance.php(101): CRM\_Utils\_Wrapper-\>run("CRM\_Report\_Form\_Activity", NULL, NULL) #23 /var/www/html/Dash/modules/civicrm/CRM/Core/Invoke.php(312): CRM\_Report\_Page\_Instance-\>run((Array:4), NULL) #24 /var/www/html/Dash/modules/civicrm/CRM/Core/Invoke.php(86): CRM\_Core\_Invoke::runItem((Array:14)) #25 /var/www/html/Dash/modules/civicrm/CRM/Core/Invoke.php(54): CRM\_Core\_Invoke::\_invoke((Array:4)) #26 /var/www/html/Dash/modules/civicrm/drupal/civicrm.module(489): CRM\_Core\_Invoke::invoke((Array:4)) #27 internal function: civicrm\_invoke("report", "instance", "42") #28 /var/www/html/Dash/includes/menu.inc(527): call\_user\_func\_array("civicrm\_invoke", (Array:3)) #29 /var/www/html/Dash/index.php(21): menu\_execute\_active\_handler() #30 {main} Sorry but we are not able to provide this at the moment. DB Error: unknown error Error Details Database Error Code: Incorrect key file for table '/tmp/#sql\_705\_0.MYI'; try to repair it, 126 Additional Details: Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> handle )

```
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => SELECT SQL_CALC_FOUND_ROWS GROUP_CONCAT(civicrm_contact_contact_target SEPARATOR ';') as civicrm_contact_contact_target, GROUP_CONCAT(civicrm_contact_contact_source_id SEPARATOR ';') as civicrm_contact_contact_source_id, GROUP_CONCAT(civicrm_contact_contact_assignee_id SEPARATOR ';') as civicrm_contact_contact_assignee_id, GROUP_CONCAT(civicrm_contact_contact_target_id SEPARATOR ';') as civicrm_contact_contact_target_id, civicrm_activity_id, civicrm_activity_source_record_id, civicrm_activity_activity_type_id, civicrm_activity_activity_subject, civicrm_activity_activity_date_time, civicrm_activity_status_id, civicrm_address_state_province_id, civicrm_value_practice_profile_4_custom_22, civicrm_value_activity_wrap_up_1_custom_3, civicrm_value_activity_wrap_up_1_custom_5, civicrm_value_activity_wrap_up_1_custom_7

```

FROM civireport\_activity\_temp\_target tar GROUP BY civicrm\_activity\_id ORDER BY civicrm\_activity\_activity\_date\_time ASC, option\_value\_civireport ASC LIMIT 0, 50 \[nativecode=126 \** Incorrect key file for table '/tmp/#sql\_705\_0.MYI'; try to repair it\] \[type\] =\> DB\_Error \[user\_info\] =\> SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARATOR ';') as civicrm\_contact\_contact\_target, GROUP\_CONCAT(civicrm\_contact\_contact\_source\_id SEPARATOR ';') as civicrm\_contact\_contact\_source\_id, GROUP\_CONCAT(civicrm\_contact\_contact\_assignee\_id SEPARATOR ';') as civicrm\_contact\_contact\_assignee\_id, GROUP\_CONCAT(civicrm\_contact\_contact\_target\_id SEPARATOR ';') as civicrm\_contact\_contact\_target\_id, civicrm\_activity\_id, civicrm\_activity\_source\_record\_id, civicrm\_activity\_activity\_type\_id, civicrm\_activity\_activity\_subject, civicrm\_activity\_activity\_date\_time, civicrm\_activity\_status\_id, civicrm\_address\_state\_province\_id, civicrm\_value\_practice\_profile\_4\_custom\_22, civicrm\_value\_activity\_wrap\_up\_1\_custom\_3, civicrm\_value\_activity\_wrap\_up\_1\_custom\_5, civicrm\_value\_activity\_wrap\_up\_1\_custom\_7 FROM civireport\_activity\_temp\_target tar GROUP BY civicrm\_activity\_id ORDER BY civicrm\_activity\_activity\_date\_time ASC, option\_value\_civireport ASC LIMIT 0, 50 \[nativecode=126 \** Incorrect key file for table '/tmp/#sql\_705\_0.MYI'; try to repair it\] \[to\_string\] =\> \[db\_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM\_Core\_Error::handle prefix="" info="SELECT SQL\_CALC\_FOUND\_ROWS GROUP\_CONCAT(civicrm\_contact\_contact\_target SEPARATOR ';') as civicrm\_contact\_contact\_target, GROUP\_CONCAT(civicrm\_contact\_contact\_source\_id SEPARATOR ';') as civicrm\_contact\_contact\_source\_id, GROUP\_CONCAT(civicrm\_contact\_contact\_assignee\_id SEPARATOR ';') as civicrm\_contact\_contact\_assignee\_id, GROUP\_CONCAT(civicrm\_contact\_contact\_target\_id SEPARATOR ';') as civicrm\_contact\_contact\_target\_id, civicrm\_activity\_id, civicrm\_activity\_source\_record\_id, civicrm\_activity\_activity\_type\_id, civicrm\_activity\_activity\_subject, civicrm\_activity\_activity\_date\_time, civicrm\_activity\_status\_id, civicrm\_address\_state\_province\_id, civicrm\_value\_practice\_profile\_4\_custom\_22, civicrm\_value\_activity\_wrap\_up\_1\_custom\_3, civicrm\_value\_activity\_wrap\_up\_1\_custom\_5, civicrm\_value\_activity\_wrap\_up\_1\_custom\_7 FROM civireport\_activity\_temp\_target tar GROUP BY civicrm\_activity\_id ORDER BY civicrm\_activity\_activity\_date\_time ASC, option\_value\_civireport ASC LIMIT 0, 50 \[nativecode=126 \** Incorrect key file for table '/tmp/#sql\_705\_0.MYI'; try to repair it\]"\] ) Return to home page.

# Answer
Just a directory filling up. Deleted some unused files and the error went away.
> 1 votes

---
Tags: civireport, civicrm-home
---


# Question
Title: Can you Make a Report, that provides the Number of Employees (relationships) for every Employer?
The report would simply be a listing of employers and the number of employees or current relationships that employer has.

| Employer | \# of Employees |
| --- | --- |
| Apple | 2456 |
| Google | 3845 |
| CiviCRM | 4 |
| Taco Bell | 5500 |

It's the same number we would get from going to an organizations, clicking on relationships and seeing the number of current relationships.

This is what I see in Search Kit: (civi 5.42.1)

# Answer
You can with SearchKit... Try this link on dmaster (Note all the configuration is in the link so it won't get wiped out by a dmaster refresh.)
> 2 votes

---
Tags: civireport, relationships, custom-reports, searchkit
---


# Question
Title: CiviCRM 5.37 > CiviCRM 5.43 upgrade, drush cvupdb, ALTER TABLE civicrm_note CHANGE COLUMN note_date Invalid use of NULL value
Not much ( not at all ) regarding this found via https://lab.civicrm.org/groups/dev/-/issues.

```
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => ALTER TABLE civicrm_note CHANGE COLUMN
`note_date` `note_date` timestamp NOT NULL DEFAULT
current_timestamp() COMMENT 'Date attached to the note'
[nativecode=1138 ** Invalid use of NULL value]
[type] => DB_Error
[user_info] => ALTER TABLE civicrm_note CHANGE COLUMN `note_date`
`note_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT
'Date attached to the note' [nativecode=1138 ** Invalid use of NULL
value]
[to_string] => [db_error: message="DB Error: unknown error"
code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler
prefix="" info="ALTER TABLE civicrm_note CHANGE COLUMN `note_date`
`note_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT
 Date attached to the note' [nativecode=1138 ** Invalid use of NULL
 value]"]
 )

PEAR_Exception: "DB Error: unknown error"
* ERROR TYPE: DB_Error
* ERROR CODE: -1
* ERROR MESSAGE: DB Error: unknown error
* ERROR MODE: 16
* ERROR USERINFO: ALTER TABLE civicrm_note CHANGE COLUMN `note_date` `note_date`
timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date attached to the note'
[nativecode=1138 ** Invalid use of NULL value]
* ERROR DEBUGINFO: ALTER TABLE civicrm_note CHANGE COLUMN `note_date` `note_date`
timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date attached to the note'
[nativecode=1138 ** Invalid use of NULL value]
#0 /var/www/drupal/sites/all/modules/civicrm/vendor/pear/pear-core-
minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#1 /var/www/drupal/sites/all/modules/civicrm/vendor/pear/db/DB.php(998): PEAR_Error-
>__construct("DB Error: unknown error", -1, 16, (Array:2), "ALTER TABLE civicrm_note
CHANGE COLUMN `note_date` `note_date` timestamp NOT ...")

```

# Answer
Issue caused by empty timestamps in 'civicrm\_note' according to **this**
The fix: run MySQL query before upgrade or if/when upgrade stuck. In my case, this page http://example.org/civicrm/upgrade?reset=1 throws the MySQl error but after running the query below and refreshing the http://example.org/civicrm/upgrade?reset=1 it all went well.

```
UPDATE  `civicrm_note`
SET `note_date`  = CURRENT_TIMESTAMP
WHERE `note_date`  IS NULL;

```
> 2 votes

---
Tags: upgrade
---


title: Error: Can't Access CiviCRM Extensions

text:
# Question
Title: Error: Can't Access CiviCRM Extensions
Following upgrade to 4.7.14 we are seeing two errors in lightboxes when opening Civi:

> Unable to download extension from https://civicrm.org/extdir/ver=4.7.14|cms=Drupal/single. Error Message: SSL connect error
>
> The CiviCRM public extensions directory at https://civicrm.org/extdir/ver=4.7.14|cms=Drupal could not be contacted - please check your webserver can make external HTTP requests or contact CiviCRM team on CiviCRM forum.

I have used wget on the server to check that it can access the address, which it can, and the SSL certificate for civicrm.org seems predictably valid! Has anyone else seen this error?

# Answer
> 2 votes
For anyone else this might help - I ran a Cleanup Caches via /civicrm/admin/setting/updateConfigBackend?reset=1

and the site started working fine again.

# Answer
> 1 votes
Problem resolved itself / cleared without further action - guess it was a server or connectivity issue.

---
Tags: extension
---


# Question
Title: Retreive balance (amount due) via api or as a field in drupal views
I am wondering if it would be possible / difficult to retrieve the balance of a contribution through the api (3 or 4) and / or if it could be exposed as a field in drupal views or standard civicrm reports.

# Answer
I just found this issue. This does not answer my question fully but is related https://lab.civicrm.org/dev/core/-/issues/2890
> 0 votes

---
Tags: civicontribute
---


# Question
Title: can't search by first name last name; WordPress dashboard
I would like to enable the basic intuitive functionality to search by first and last name in all search tools.

Currently on our new install, with no other plugins enabled, I get "no matches found" if I search for firstname space lastname.

Here is what I'm finding when I do these searches for a contact that does exist and does have a case associated with him.

Search for joe, good results
Search for johnston, good results
**Search for joe johnston, "no matches found"
Search for Joe Johnston, "no matches found"
** Search for johnston joe, good results
Search for Johnston Joe, good results

I've found the same results using all of the below search locations which makes sense.
search \> find contact
advanced search
cases \> find cases
cases \> open a case

The quick search does display my contact as an option when I enter "joe".

I would greatly appreciate any suggestions to get this working. It's a basic functionality that I assume can be enabled??

I also tested this on the demo site for Lou Adams and got the same results. It seems to be the default functionality.

Thanks so much for your help.

# Answer
First check that you have Automatic Wildcards enabled, navigate to **Administer -\> Customize Data and Screens -\> Search Preferences**, is the first option.

> If enabled, wildcards are automatically added to the beginning AND end of the search term when users search for contacts by Name. EXAMPLE: Searching for 'ada' will return any contact whose name includes those letters - e.g. 'Adams, Janet', 'Nadal, Jorge', etc. If disabled, a wildcard is added to the end of the search term only. EXAMPLE: Searching for 'ada' will return any contact whose last name begins with those letters - e.g. 'Adams, Janet' but NOT 'Nadal, Jorge'. Disabling this feature will speed up search significantly for larger databases, but users must manually enter wildcards ('%' or '\_') to the beginning of the search term if they want to find all records which contain those letters. EXAMPLE: '%ada' will return 'Nadal, Jorge'.

Check your display and sort name, navigate to **Administer-\>Customize Data and Screens-\>Display Preferences** at the bottom you have two fields, which by default should look something like this:

Individual Display name format: `{contact.last_name}{, }{contact.first_name}`

Individual sort name format: `{contact.last_name}{, }{contact.first_name}`

If you want to search **always by first name** you can change the sort name format to `{contact.first_name}{ }{contact.last_name}`, now this will only apply for new contacts and **not for the existing ones**, you will have to update the `sort_name` for the existing contacts, there was a discussion in the forum about this.

If you search for "Adams," in the demo site you'll see that the result will be "Adams, Lou", as far as I'm concerned, this is expected behaviour.

**Edit**

Forgot to mention that you can use wildcards like: `%joe%`, that should include Joe Johnston and Johnston Joe if there is a existing contact by that name.
> 3 votes

# Answer
I know this is very old, but here's a solution for future reference:

I've developed an extension that allows to search for **sort\_name OR display\_name** which would solve this issue in most configurations.

https://civicrm.org/extensions/search-display-name

It's not extensively tested, so if you do run into issues let me know on github.

---

There is another extension that allows for the same result although differently:

https://github.com/artfulrobot/alternativenamesearch

It patches the core to split the search terms and search for them individually.
> 2 votes

---
Tags: wordpress, search
---


# Question
Title: Individual Emails missing "Message-Id: header"
I'm testing our emails with Mail-Tester.com and it's showing that when sending individual email messages to Contacts, the emails are missing a "Message-Id: header".

How can I change this? It doesn't appear to happen when sending bulk email, just individual emails.

# Answer
Under administer - civimail - civimail component settings there is an option for "Enable CiviMail to generate Message-ID header"
> 2 votes

---
Tags: civimail, email
---


# Question
Title: What is the purpose of the "Collection Reminder Send Flag" tab in CiviContribute?
I see a "Collection Reminder Send Flag" tab in CiviContribute when capturing a new contribution. What is the purpose of this tab and why can't I select any of the options?

# Answer
You have a custom field and in its configuration you have the "View only" checkbox checked. You probably also have or had some custom code that sends out reminders and then sets the value of the field.

It is probably from https://github.com/compucorp/uk.co.compucorp.manualdirectdebit
> 1 votes

---
Tags: civicontribute
---


# Question
Title: Is there Constant Contact integration for CiviCRM in Joomla?
I am implementing CiviCRM on a Joomla site and would like to integrate the contacts to Constant Contact. Is there an extension or integration that I can use to integrate Constant Contact with my Joomla CiviCRM instance?

# Answer
This extension was flagged as an option in this other Q+A
> 1 votes

---
Tags: joomla
---


title: Tokens in Mass Mail Attachements

text:
# Question
Title: Tokens in Mass Mail Attachements
How can I use tokens in Mass Mail attachements? For example, I would like to add .docx or .pdf as attachement that already contains tokens in text and then let CiviCRM replace them for each contact while sending it?

I know this functionality is implemented in Print/Mail merge, but I don't know if I do it that way, how can I send them via email that created document instead of downloading it to my computer...

Thank you in advance, Aleksandar

# Answer
> 1 votes
I don't know of a way to do this. When I had a similar need I mail-merged in Word, then generated PDFs with the relevant Contact ID in the filename. I then uploaded all these and used a token to link to the relevant PDF for each contact.

Not super elegant, but worked. Admittedly I was in a hurry and didn't research fully. Hopefully others may know of something better.

I think I had to use the Merge Tools extension to generate the PDFs with merge-fields in the filename.

# Answer
> 0 votes
I cannot think of a way CiviCRM can do this, basically you are asking the mailing software to open a Word Doc template, insert tokens, save it and then send it onwards. Also your bandwidth is going to be quite high if you are sending attachments out to all.

In Drupal you could create a Webform template with all of those custom data sets and style it anyway you want. Then you would just need a link in your email to that webform that would autofill the data required.

---
Tags: civimail, tokens, attachments, printmerge
---


title: Multi-Factor Authentification?

text:
# Question
Title: Multi-Factor Authentification?
I am in the process of looking at the features of CiviCRM and have come across a security question.

Does CiviCRM have multi-factor authentification (MFA)?

I tried looking into the website and public posts, but have not found an answer yet.

# Answer
CiviCRM doesn't because it doesn't control logins. Whatever CMS you're using will have something for it (e.g. Drupal/Wordpress/Joomla).
> 4 votes

---
Tags: security
---