# Question
Title: How to direct users to the case they just created using FormBuilder?
I’m using FormBuilder to create cases. When the form is submitted, I want the user to find themselves in case they just created. I don’t understand well enough the syntax of internal pages’ links or tokens. What should I put as a Post-Submit Page link, or alternatively, is there a documentation or a resource take me through the syntax? Thanks

# Answer
You can build a search with searchkit for all cases of this user, create a display for the search result and publish it as second afform form. This new afform has an URL, which you can use as Post-Submit Page link for the first form. Your user can click on the freshly created case then.
> 0 votes

---
Tags: civicase, tokens, formbuilder, links
---


# Question
Title: How Can I Get SearchKit to Display Upcoming Events
I want to display a list of upcoming events on our site.

Can I do that using searchkit? Whatever I attempt to do seems to fail - for the record - we have atleast 20 upcoming events.

If I remove the is current - I get all the events we ever had - but that is not what we are interested in displaying.

# Answer
> 2 votes
The search you have created in the screenshot shows events which are running currently i.e event start date is \<= today and event end date is null or \>= today

To show upcoming event I would use start date \>= now

---
Tags: civievent, searchkit, display
---


# Question
Title: How do you display searchkit results, tables, lists, on public pages?
Using 5.69 / Wordpress

How can you display a table created in searchkit on a public facing page on a wordpress site?

Thanks!

# Answer
> 2 votes
You must change permissions on the search display and also on the form to allow anonymous access. Instructions are here: https://docs.civicrm.org/user/en/latest/searching/searchkit/example-membership-listing/#step-5-setting-permissions

---
Tags: wordpress, profile, searchkit
---


# Question
Title: Email-to-activity processing - Error message: Process Activities failed
Have installed CiviCRM 4.6.4 on Drupal 7.38 and have explored the various modules to identify how it can be used to help a small UK charity.

I am having issues with email-to-activity. I set it up to hook into an IMAP account via SSL and read a specific folder. This worked perfectly for a few tester emails, so then expanded my testing. When it got an email from a particular account the job started failing with: Error message: Process Activities failed

When this email was removed from the specified folder, it did not fix the issue. Changing folders (and email accounts) worked until the job hits an email that it cannot process and then never works again in that folder.

All my searching has only found two potential solutions. 1 - the password is wrong. This has been dismissed as it works fine until it hits certain emails. 2 - make bounce processing and E2A from the same account - have seen this as a "solution" as well as a recommendation NOT to do this. Either way, it made no difference. I tried looking at the email headers to see if anything jumped out, but didn't seem to be encoding.

I am new to CiviCRM and linux hosting, so while happy to look at detailed logging I may not know how to access/interpret.

Any help or guidance would be appreciated, I can supply a sample email (either sent to an email to be picked up or a .eml attachment) if useful

Many thanks

Dave

```
Debug & traceback:
Jul 20 18:15:02  [info] $Fatal Error Details = Array
(
    [message] => Could not connect to MailStore for XXX@YYY.com@secure.emailsrvr.com

Error message:

An error occured while sending or receiving mail. The IMAP server could not create mailbox 'CRM2.CiviMail.ignored': A0006 NO [ALREADYEXISTS] Mailbox already exists.

    [code] =>
)

Jul 20 18:15:02  [info] $backTrace = #0 sites/all/modules/civicrm/CRM/Core/Error.php(322): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 sites/all/modules/civicrm/CRM/Utils/Mail/EmailProcessor.php(184): CRM_Core_Error::fatal("Could not connect to MailStore for XXX@YYYY.com@secure.emailsrvr.com<...")
#2 sites/all/modules/civicrm/CRM/Utils/Mail/EmailProcessor.php(111): CRM_Utils_Mail_EmailProcessor::_process(FALSE, Object(CRM_Core_DAO_MailSettings))
#3 sites/all/modules/civicrm/api/v3/Job.php(379): CRM_Utils_Mail_EmailProcessor::processActivities()
#4 sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_fetch_activities((Array:1))
#5 sites/all/modules/civicrm/Civi/API/Kernel.php(96): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#6 sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->run("Job", "fetch_activities", (Array:1), NULL)
#7 sites/all/modules/civicrm/CRM/Core/JobManager.php(131): civicrm_api("Job", "fetch_activities", (Array:1))
#8 sites/all/modules/civicrm/CRM/Core/JobManager.php(83): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#9 sites/all/modules/civicrm/bin/cron.php(42): CRM_Core_JobManager->execute()
#10 {main}

```

# Answer
> 4 votes
So after plenty of back and forth, the issue seems to be the fact I am specifying a Source folder in my IMAP account.

When I created a brand new account for testing, found same issue with a folder named CRM. Tried crm in case there was case sensitivity, still the same.

Only when I removed source and let it read from the Inbox directory did it work consistently. It was nothing to do with a specific email, simply the folder being used.

Would love to know if this can be fixed (or even where in the code it is so I can try myself) as meanwhile I will need to maintain an extra email account.

# Answer
> 2 votes
I've found that deleting any emails with attachments prior to running Civi's scheduled allowed the processing to complete normally. While SOME small attachments are ok, generally attachments do not process well with Civi.

# Answer
> 2 votes
If the IMAP account is a Gmail or Google Apps account, it is likely you will have to enable a setting, "Allow access by less secure apps". That solved my authentication errors with a Google Apps account. More info can be found here: https://support.google.com/a/answer/6260879?hl=en

# Answer
> 1 votes
Use of emoji in email can also cause problems - which may be able to be solved with

> drush cvapi System.utf8conversion

# Answer
> 0 votes
The mail2activity feature might have difficulties to process some mails indeed (eg. if they are too big).

When I had this problem, deleting the mail did solve it. Are you sure you are properly deleting the email? imap has a tendency to want to keep the emails even if you delete them (until you purge them, or whatever the name on your mail client)

What I found was working better is to move them to a different folder instead of trashing them, it avoided the problem for me

If you want to dig more into the issue, can you enable the debug and traceback and add them to your question?

---
Tags: civimail, cron-job, scheduling, activity
---


title: new mailing send test no work

text:
# Question
Title: new mailing send test no work
i already set send email config on (civicrm/admin/setting/smtp?reset=1), i can send email to contact list peoples, but i can not send mailing on new mailing page, i try to click "send test" , have error "could not identify any recipients. perhaps your test group is empty, or you tried sending to contacts that do not exist and you have no permission to add contacts.", my email to and from is white list,so i dont know why not working,i need extra setting on civicrm??

# Answer
> 0 votes
You will need to include a group in the Recipients field with at least one contact in it.

---
Tags: civimail
---


title: Finding source of contacts

text:
# Question
Title: Finding source of contacts
In our CiviCRM installation contacts are either created by staff or they are created by a couple of different webforms. The webforms automatically include a Contact Source, and the staff are supposed to also but maybe don't always. Even if they don't though, the staff will show up in the change log for the contact.

Today I came across a number of contact records that have no Contact Source, don't show any staff touching them in the change log, and have no information in the contact other than an email address. Looking through the database, I'm not seeing any additional information, but I might not know exactly where to look. These contacts aren't registered for events, have no relationships, no memberships, nada. Only an email address.

I wouldn't really be concerned about this, but looking at the dates that these were created, there were a couple here and there a few months ago, but then each month since October 2023, there have been over a hundred each month. So it looks like it could be a growing problem.

I can't think of any way that these contact records are being created! Any ideas what to check? Maybe there is some exposed form somewhere?

# Answer
I found the answer: the /civicrm/mailing/subscribe page is allowing anonymous users to submit. I hadn't noticed that there is a "pending" status for the group subscription.
> 2 votes

---
Tags: contacts
---


# Question
Title: An administrator does not receive mailing emails: a new contact is created
An administrator does not receive mailing emails. His e-mail address is strictly the same in his contact form and Joomla! user profile. When testing the mailing, CiviCRM creates a new contact with this address. In the test group in which his contact details are displayed, no recipient appears in the mailing draft. If I test with my address, everything works correctly: I receive the test emails and I am the recipient of the test group.

Joomla! 4.4.1 | CiviCRM 5.57.3

# Answer
Resolution: After sending a test, a contact is created. This contact must then be merged with the J! administrator contact and the problem solved.
> 1 votes

# Answer
This is a long-standing issue, but by sheer chance, I fixed it today: https://github.com/civicrm/civicrm-core/pull/29212

This occurs when you send an email to a contact that has "do not mail", "bulk mail opt out", or "deceased" set. With this patch, those folks simply don't get an email.
> 2 votes

---
Tags: civimail, joomla
---


title: Webform PHP 8.1 strtolower()

text:
# Question
Title: Webform PHP 8.1 strtolower()
Is D7 and Webform compatible with PHP 8.1? After upgrading to the most recent PHP, I'm hitting an error when loading any webforms with civicrm fields (Civi 5.68.0).

```
Deprecated function: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in wf_crm_get_relationship_types() (line 401 of /home/admin/domains/private_html/sites/all/modules/webform_civicrm/includes/utils.inc).

```

Saving the webform node also causes an "unexpected" error.

# Answer
> 0 votes
The D7 version is very old but if you submit a PR to update any deprecations one of the other maintainers or myself would gladly check & merge it.

FYI the message you posted is a deprecation notice, not an error, and shouldn't prevent the module from working.

---
Tags: webform-civicrm
---


# Question
Title: unable to load template for CiviEvent Event Management
Has anyone encountered this error from CiviEvent "Manage Events" -\> "Configure" -\> "Info and Settings"?

```
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.
Unable to load template 'file:CRM/Volunteer/Page/Angular.tpl'

```

We're running CiviCRM 5.69.2 with all extensions up to date.

# Answer
> 1 votes
Upgrade the extension CiviVolunteer and Angular profiles to latest.

---
Tags: civievent, templates, angular
---


title: Skill/training tracking

text:
# Question
Title: Skill/training tracking
We’re evaluating CiviCRM for a tiny, 0 employee nonprofit to manage 100 lay, trained, and skilled volunteers with environmental recovery efforts. Some jobs need specific training or pre-qualifications before volunteering for those roles — such as various levels of boating training, red card/scuba certs, etc.

Using Wordpress, with CiviVolunteer or other plugins, can you set up a skills pathway (series of trainings completed) that are required to be finished before a volunteer would be allowed to sign up for a opportunity?

Or can we mark things like ‘scuba certification required’ on the opportunity and only volunteers who we’ve confirmed credentials and have marked in their profile would see those opportunities? And if so, could this credential be set to expire at some arbitrary future date.

# Answer
CiviCRM can definitely do that sort of thing, with a few different approaches ranging from simple & manual to fully-automated.

It sounds like you are dreaming about the fully-automated option. This can be done with various customizations & extensions like CiviRules, but keep in mind that setting up automation takes technical skill, both to implement the feature and to maintain it over the years-to-come.

A less-sophisticated approach might be more maintainable. Something like:

1. Add a set of custom fields for events that is the "skills required".
2. Create a public directory of upcoming events (easy to do with search kit) and add a filter to the top allowing people to filter the list by skills required.
3. Add a mandatory checkbox to the registration page saying "I affirm I have the required certifications to participate"

If you want to add a *tiny* bit more sophistication you can add some custom fields to the contact records which store a bunch of dates, e.g. "Expiration date of ABC certification" and so on. Then you can quickly find the volunteers you need (also easy in search kit) by searching for people whose expiration date is later than today.
> 2 votes

# Answer
I would recommend to have a look at the CiviCRM Resource Management Extension. It provides an UI to define resources and demands and an algorithm to match those and use them in different ways which may cover your use case.

However, it is a rather coherent extension / framework and you will likely need some customizing beyond the UI - particularly whens using Wordpress and trying to build an online integration.
> 2 votes

---
Tags: wordpress, civivolunteer, civihr, training
---


# Question
Title: TypeError in_array - Angular Manager::resolveDefaultModules - civicrm version 5.69.2
Just updated to CiviCRM 5.96.2 in a drupal 7 environment and got this error all of a sudden on only one of our domains (we're using multi-domain). Once it started i could access Civi at all using the affect domain. Very wierd. Anyone else experienced this issue?

> TypeError: in\_array(): Argument #2 ($haystack) must be of type array, null given in in\_array() (line 194 of .../civicrm/Civi/Angular/Manager.php).

This is the code causing the issue. Essentially $module\['basePage'\] is null for one of the modules being looped through. I've temporarily stopped the error for occuring by adding an if is\_array($modules\['basePage'\]) on the value being passed.

```
  public function resolveDefaultModules($basePage) {
    $modules = $this->getModules();
    $result = [];
    foreach ($modules as $moduleName => $module) {
      if (in_array($basePage, $module['basePages']) || in_array('*', $module['basePages'])) {
        $result[] = $moduleName;
      }
    }
    return $result;
  }

```

# Answer
An issue has been filed for this: https://lab.civicrm.org/dev/core/-/issues/4969 with further discussion and some proposed fixes.
> 2 votes

---
Tags: drupal
---


title: Receive error regarding licensing

text:
# Question
Title: Receive error regarding licensing
I get this, instead of the admin page, please advise.

// http://civicrm.org/licensing //

# Answer
CiviCRM doesn't require any license validation to run, the text you are seeing is just a standard part of the normal page footer. You are just noticing it now because the rest of the page appears to be broken.

Based on your comment, "clumsy upgrade" might be the issue. To fix this you do not need to delete anything from your database or lose any data. Simply delete the civicrm code and replace it with a fresh copy. Your data will not be lost, as replacing the code is standard upgrade procedure.

Refer to the CiviCRM on Wordpress Upgrade Guide for more details. Don't forget to do the database upgrade step at the end.
> 2 votes

---
Tags: error
---


# Question
Title: editing an activity, shows contact id instead of name, console has "string literal contains an unescaped line break"
CiviCRM 5.66.0, Wordpress 6.4.2, php 8.1.12

From a contact's list of activities, or a search list of activities, clicking on the edit link of an activity generates an edit popup that does not populate the contact fields with names, but instead with the (correct) contact id.

The behaviour does not occur when opening the edit in a new window, or when using the link to create a new activity, i.e. it's specific to the popup aspect.

In the browser console, I can see:

```
Uncaught SyntaxError: '' string literal contains an unescaped line break
    jQuery 14
    refresh https://crm.kbia.ca/wp-content/plugins/civicrm/civicrm/js/crm.ajax.js?r=G3vOeen_US:329
    jQuery 5
jquery.min.js:73:10
    jQuery 14
    refresh https://crm.kbia.ca/wp-content/plugins/civicrm/civicrm/js/crm.ajax.js?r=G3vOeen_US:329
    jQuery 5

```

# Answer
> 1 votes
At this point, my best guess is that it was due to an update to the divi theme. Specifically, a site development copy isn't exhibiting the behaviour, and that's the difference I can see most readily. Not conclusive.

---
Tags: wordpress, activities, ajax
---


# Question
Title: How do you display searchkit results, tables, lists, on members-only pages within WordPress?
I have created a searchkit query and results of our membership listing that I want to allow all the new and current members to be able to access.

I tried a searchkit display page (with a URL like "example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fsearch#/display/Membership\_Directory/Membership\_Directory\_List\_1"), but I can't figure out how to allow members to access that page.

I tried the same searchkit results showing in formbuilder, but I can't get it to show the results, even if I back the "Permission" to "Generic: Allow all users (including anynous)".

How do I show the results on a page within the WordPress site (using an embed code? or as a CiviCRM AFForm?) that is restricted to viewing by only current members? What rights do they need? What am I missing?

**March 20, 2024 Update** Based on comment feedback below, here is a clarification of what happens in a WordPress page using the shortcode for the AFForm.

The permission in the FormBuilder is set to anonymous:

The short code I'm using in the WordPress page is set to the form name:

```
[civicrm component="afform" name="afsearchMembershipDirectory" hijack="0"]

```

The site renders this in the HTML source:

```
<div class="wpb_wrapper">
  <div class="crm-container" id="bootstrap-theme">
    <crm-angular-js modules="afsearchMembershipDirectory">
       <afsearch-membership-directory></afsearch-membership-directory>
    </crm-angular-js>
  </div>
</div>

```

But the browser console shows errors like this and never displays anything:

```
Uncaught SyntaxError: expected expression, got '<'

```

# Answer
> 2 votes
2 options:

1. **As a CiviCRM path:** Set a path for your form in the FormBuilder UI, and be sure to check the "Accessible on front-end of website" box to make it available to non-CiviCRM users. For testing purposes you can allow all users to view the form although you may be able to refine that permission if you have a specific permission granted to members.
2. **As a WordPress page with shortcode:** Create a normal wordpress page or post and give your members appropriate access to view it. Embed your FormBuilder form onto that page with a shortcode, which is in the format:

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

```

---
Tags: wordpress, searchkit, search-results, formbuilder
---


# Question
Title: How to export a large contacts number via cv or bin/csv/export.php
Both methods seems to have a restriction on a number of contacts processed (25?)

* cv api Contact.get options={"limit":0}
* php export.php -e Contact \> ~/ex.csv

I remember doing some php equilibristics back in the years to get the result and wondering if, maybe, there is hidden parameter ( like "--all" or something ) to get ALL contacts out from the db in 2024?

# Answer
> 1 votes
As per comments you can use `cv ev` instead of `cv api` to avoid having to figure out the cli syntax for limit.

`cv ev '$r = civicrm_api3("Contact", "get", ["options" => ["limit" => 0]]); $fpr = fopen("./res.csv", "w"); foreach ($r["values"] as $rk=>$rv) {fputcsv($fpr, $rv);} fclose($fpr); echo "done";'`

It also occurs to me that core's export.php could probably be updated to default to `"options" => ["limit" => 0]`. Why would anyone ever not want that? At https://github.com/civicrm/civicrm-core/blob/888e65374f208e6d79ff8adc68d0adfa05575277/bin/cli.class.php#L53

---
Tags: import
---


title: Civi CRM on Joomla 5

text:
# Question
Title: Civi CRM on Joomla 5
any idea when civi crm compatible with Joomla 5. Tried a test installation but it does not install on Joomla 5 and throw error during installation

# Answer
> 0 votes
CiviCRM is "compatible" with Joomla 5. I run it on a Joomla 5.0.2-installation without problems.

Please make sure you have the Joomla compatibility plugin activated, as described here https://manual.joomla.org/migrations/44-50/compat-plugin/

What error did you get during the installation?

---
Tags: joomla
---


# Question
Title: Full Drupal migrate from 7 to 10, site using CiviCRM
I manage a website based on Drupal 7 where we use CiviCRM

I would like to migrate to Drupal 10, but I have a lot of doubts about this procedure...

Can you recommend any materials that reliably describe and help in such a process, courses, training or instructions?

# Answer
> 1 votes
Civi by itself doesn't care too much if it's drupal 7 or 10.

You will need php 8.1+. Some extensions may not be ready yet for php 8.1, but by now most should be ok.

Most of what you need to address will be on the drupal side. Some of your existing drupal modules or themes may not work with drupal 10, or will have a different module as a replacement.

You will need to manually recreate any drupal views or webforms.

# Answer
> 0 votes
Are you using the Drupal website or any of the integrations with Drupal? If not, and it is just a container to run Civi then consider switching to WordPress - many small orgs find that easier than Drupal 10.

---
Tags: migration
---


# Question
Title: Error "Property 'currency' has not been set." when using 'Submit Credit Card Event Registration' in Civi backend
When staff attempt to use the Civi backend option:

'Contact \> Events \> Submit Credit Card Event Registration'

Entering a credit card into the embedded Stripe field and clicking 'Save' results in the error:

$Fatal Error Details = array:3 \[ "message" =\> "Property 'currency' has not been set." "code" =\> null "exception" =\> BadMethodCallException {#1883 #message: "Property 'currency' has not been set."

* Full error log is below.
* Frontend event registration payments for these same events function correctly, no errors. Issue is isolated to backend Stripe payments for events.
* Issue is isolated to backend Event Registration payments only. Using 'Contact \> Contributions \> New C/C Contribution' for a donation works correctly, no errors.
* Option for 'Send Confirmation and Receipt' is un-checked/disabled.
* In Stripe, an "Uncaptured" payment is created.
* No Contribution record of any Status is created in Civi.
* 'Civi \> Admin \> Localization' has 'Default Currency' set to 'USD'
* 'Individual Event config \> Fees' has 'Currency' set to 'USD'
* These events all have available participant capacity.

**Site details:**

* CiviCRM 5.69.2
* Stripe Payment Processor 6.10.2
* Payment Shared 1.2.20
* Joomla 4.4.2 Stable

**Full error log:**

2024-02-07 08:49:20-0800 \[error\] $Fatal Error Details = array:3 \[ "message" =\> "Property 'currency' has not been set." "code" =\> null "exception" =\> BadMethodCallException {#1883 #message: "Property 'currency' has not been set." #code: 0 #file: "/home/USER/public\_html/administrator/components/com\_civicrm/civicrm/Civi/Payment/PropertyBag.php" #line: 322 trace: { /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/Civi/Payment/PropertyBag.php:322 { Civi\Payment\PropertyBag-\>get($prop, $label) › } › throw new \BadMethodCallException("Property '$prop' has not been set."); › } } /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/Civi/Payment/PropertyBag.php:796 { …} /home/USER/public\_html/media/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php:259 { …} /home/USER/public\_html/media/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php:613 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Form/Participant.php:953 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Form/Participant.php:808 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Form.php:625 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller.php:355 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/Tab.php:100 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/Tab.php:158 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:322 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:69 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:36 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm.php:121 { …} /home/USER/public\_html/administrator/components/com\_civicrm/civicrm.php:40 { …} /home/USER/public\_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 { …} /home/USER/public\_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 { …} /home/USER/public\_html/libraries/src/Component/ComponentHelper.php:361 { …} /home/USER/public\_html/libraries/src/Application/AdministratorApplication.php:143 { …} /home/USER/public\_html/libraries/src/Application/AdministratorApplication.php:186 { …} /home/USER/public\_html/libraries/src/Application/CMSApplication.php:293 { …} /home/USER/public\_html/administrator/includes/app.php:61 { …} /home/USER/public\_html/administrator/index.php:32 { …} } } \]

# Answer
> 0 votes
A proposed fix has just been written. Can you please check and give feedback on https://github.com/civicrm/civicrm-core/pull/29313

---
Tags: civievent, stripe, currency
---


# Question
Title: Can't install CiviCRM extension with fresh install of Joomla
When I attempt to install CiviCRM (5.69.2) in my Jooma (5.0.2) instance I receive the following error:

```
Compile Error: Declaration of Psr\Log\NullLogger::log($level, $message, array $context = []) must be compatible with Psr\Log\AbstractLogger::log($level, Stringable|string $message, array $context = []): void

```

I'm on PHP version 8.2.4.

Any help is appreciated!

Thanks, Jason

# Answer
> 0 votes
Sounds like there's a conflict between the copy of `psr/log` bundled with Civi and one already being used on your site. Can you give more details about which version exactly is present on your site and whether it's part of Joomla core or a Joomla plugin?

# Answer
> 0 votes
NO, it's a CiviCRM error in com\_civicrm/admin/civicrm/vendor/psr/log/Psr/Log/NullLogger.php, there line 26 must be changed form `public function log($level, $message, array $context = array())` to `public function log($level, $message, array $context = []): void`.

Replace () through \[\], add the `: void` then CiviCRM installs without errors and works like a charm.

I tested this and can confirm this works.

---
Tags: installation
---


title: "NEW" Errors on Drupal 10

text:
# Question
Title: "NEW" Errors on Drupal 10
Who corrects and supports the core code??

Downloading CIVICRM code for Drupal 10.2.2 failed on enabling the module which errored out on a $var error - should be {$var} in DB.php - so after running rector - at least 8 times to clear many, many patch errors, I got left with

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/PEAR/Registry.php" file, due to: "Syntax error, unexpected T\_NEW322, Syntax error, unexpected T\_NEW1450, Syntax error, unexpected T\_NEW1458". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/PEAR/Config.php" file, due to: "Syntax error, unexpected T\_NEW650, Syntax error, unexpected T\_NEW697, Syntax error, unexpected T\_NEW757, Syntax error, unexpected T\_NEW786, Syntax error, unexpected T\_NEW914, Syntax error, unexpected T\_NEW1577, Syntax error, unexpected T\_NEW1607, Syntax error, unexpected T\_NEW2038, Syntax error, unexpected T\_NEW2091". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/rules-custom.php" file, due to: "Syntax error, unexpected T\_NEW74". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/rules-builtin.php" file, due to: "Syntax error, unexpected T\_NEW14". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/SmartyStatic\_example.php" file, due to: "Syntax error, unexpected T\_NEW102, Syntax error, unexpected T\_NEW106". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/SmartyDynamic\_example.php" file, due to: "Syntax error, unexpected T\_NEW81, Syntax error, unexpected T\_NEW93". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/QuickHtml\_example.php" file, due to: "Syntax error, unexpected T\_NEW24, Syntax error, unexpected T\_NEW26". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/ITStatic\_example.php" file, due to: "Syntax error, unexpected T\_NEW103, Syntax error, unexpected T\_NEW106". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/ITDynamic\_example2.php" file, due to: "Syntax error, unexpected T\_NEW108, Syntax error, unexpected T\_NEW113". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/ITDynamic\_example.php" file, due to: "Syntax error, unexpected T\_NEW78, Syntax error, unexpected T\_NEW84". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/FlexyStatic\_example.php" file, due to: "Syntax error, unexpected T\_NEW132". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/renderers/FlexyDynamic\_example.php" file, due to: "Syntax error, unexpected T\_NEW75, Syntax error, unexpected T\_NEW93". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/groups.php" file, due to: "Syntax error, unexpected T\_NEW15". On line: 82

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/*ORIGINAL*/html2text/class.html2text.inc" file, due to: "System error: "Functional test class html2text should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/formrule.php" file, due to: "Syntax error, unexpected T\_NEW62". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/filters.php" file, due to: "Syntax error, unexpected T\_NEW21". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/docs/elements.php" file, due to: "Syntax error, unexpected T\_NEW16". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/QuickForm/hierselect.php" file, due to: "Syntax error, unexpected T\_NEW171, Syntax error, unexpected T\_NEW226, Syntax error, unexpected T\_NEW297, Syntax error, unexpected T\_NEW475". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/QuickForm/group.php" file, due to: "Syntax error, unexpected T\_NEW302". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/QuickForm/date.php" file, due to: "Syntax error, unexpected T\_NEW426, Syntax error, unexpected T\_NEW514". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/QuickForm/RuleRegistry.php" file, due to: "Syntax error, unexpected T\_NEW128". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/QuickForm/Controller.php" file, due to: "Syntax error, unexpected T\_NEW213". On line: 82

\[ERROR\] Could not process "vendor/civicrm/civicrm-packages/*ORIGINAL*/HTML/QuickForm.php" file, due to: "Syntax error, unexpected T\_NEW601, Syntax error, unexpected T\_NEW1715, Syntax error, unexpected T\_NEW1872". On line: 82

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/HTML/QuickForm.php" file, due to: "System error: "Functional test class HTML\_QuickForm should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/HTML/QuickForm/Controller.php" file, due to: "System error: "Functional test class HTML\_QuickForm\_Controller should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/HTML/QuickForm/RuleRegistry.php" file, due to: "System error: "Functional test class HTML\_QuickForm\_RuleRegistry should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/HTML/QuickForm/date.php" file, due to: "System error: "Functional test class HTML\_QuickForm\_date should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/HTML/QuickForm/group.php" file, due to: "System error: "Functional test class HTML\_QuickForm\_group should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/HTML/QuickForm/hierselect.php" file, due to: "System error: "Functional test class HTML\_QuickForm\_hierselect should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

\[ERROR\] Could not process "/var/www/bigbay4b/public\_html/vendor/civicrm/civicrm-packages/PHPgettext/gettext.inc" file, due to: "System error: "Functional test class domain should have had a defaultTheme property but one not found." Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 94

Operating system CentOS Linux 7.9.2009 Perl version 5.016003 Path to Perl /usr/bin/perl Python version 3.6.8 Path to Python /bin/python3 BIND version 9.11 Postfix version 2.10.1 Mail injection command /usr/lib/sendmail -t Apache version 2.4.51 PHP 8.2.15 (cli) (built: Jan 16 2024 12:19:32) (NTS gcc x86\_64) Copyright (c) The PHP Group Zend Engine v4.2.15, Copyright (c) Zend Technologies with Zend OPcache v8.2.15, Copyright (c), by Zend Technologies Logrotate version 3.8.6 MariaDB version 10.3.32 ProFTPD version 1.35 SpamAssassin version 3.4.0 ClamAV version 0.103.4

Installed download using " composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.70' -W "

# Answer
CiviCRM is a community-maintained project, though there is a core team of maintainers.

However, there seem to be two conflated issues here:

* Rector is returning errors.
* Drupal is erroring out.

Most of the errors you're posting are in the `ORIGINAL` folder. There are parts of CiviCRM that predate Composer and git. When outside libraries needed to be patched, the unpatched libraries were kept in an `ORIGINAL` folder. Those libraries should neither be referenced nor be web-accessible, so these errors don't affect current use.

They also don't appear in the CiviCRM tarballs - it's worth considering whether they should be in Composer, or in the project at all now. But they're a red herring, and there is an active effort to get all packages into Composer management.

As for the error you're experiencing - I suspect this is a PHP version issue. Please edit your question to include more information about the environment you're working in, and ensure it matches the CiviCRM system requirements for the version of CiviCRM you're trying to install.
> 2 votes

---
Tags: civicrm-home
---


title: Bulk Delete Repeating Events

text:
# Question
Title: Bulk Delete Repeating Events
Created an Event, and had it repeating twice a week. As a result it created about 100 Events, all occurrences of that event happening twice a week for the entire year.

How do I bulk delete these repeating events? Changing the Repeating frequency doesn't delete already created events. I can see that I can remove each event one at a time, but that's a lot.

Hopefully someone can help solve this. Thanks in advance!

# Answer
Navigate to **events \>\>\> event templates,** find the template you used to create the child items. In the templates-table, you see a href showing the number of child items linked to the parent event. Or just open the parent event and click on the **tab "manage linked events"**.

There you have the possibility to **select them all/multiple child items and chose "delete events" from the actions dropdown-menu above.**
> 1 votes

---
Tags: civievent, repeating-events
---


# Question
Title: Is it the end of the road for CiviCRM under Windows?
We run CiviCRM under Drupal and Windows/IIS. Having upgraded our test environment to 5.69.2, we found we could not register for events, as we got errors along the lines of:

```
unable to write file <Drupal Root>\web\sites\default\files\civicrm\templates_c\en_GB\2e\76\18\2e76180b35db0da6edad2430223cfbf8b09021fc_0.string.string:{eval var=$smartySingleUseString|smarty:nodefaults}.php

```

This is, I believe, due to characters such as : being illegal under Windows. I've been trying to discover where the file name is being generated. Using a regular expression to tidy up the file name before attempting to create it (rename a temporary file) around line 69 of \<Drupal root\>\vendor\civicrm\civicrm-packages\smarty3\vendor\smarty\smarty\libs\sysplugins\smarty\_internal\_runtime\_writefile.php just gave other errors. I see the same issue when running a development environment under 5.71.alpha1.

So, is it time to move to Linux for all CiviCRM users?

# Answer
> 1 votes
Changing `string:` to `eval:` on line 1040 in `<drupal root>\vendor\civicrm\civicrm-core\CRM\Utils\String.php` and making sure CIVICRM\_CRED\_KEYS started with aes-cbk rather than jwt-hs256 solved the problem.

# Answer
> 1 votes
Just noting that this is patched in the latest CiviCRM release (5.69.5+) by @demerit with the fix he suggested above. In addition there was a separate issue relating to the text version of the offline event template - we now ship 5.69.5 with a blank text version of the offline event template and we have removed almost all the text versions in 5.70 - if there is no blank version a text version is generated at the point of send from the rendered html.

However, people who have customised the text version will not automatically have their customised version updated - if you want to manually update rather than delete your text version there is discussion on the gitlab https://lab.civicrm.org/dev/core/-/issues/4951 as to which lines specifically cause problems

---
Tags: smarty, templates, windows
---


# Question
Title: Fatal error - unable to register for events with Smarty3 enabled
I've just taken a live site to CiviCRM 5.69.2 (as well as from Drupal 7 to 10!), and have determined that registrations fail completely with Smarty3 enabled.

Clearly this has passed testing elsewhere, and there must be something with my configuration that is different allowing this error to surface.

Any suggestions on a/ things I can check in case it's something I've caused, and b/ best place for reporting otherwise?

**Error:**

```

$Fatal Error Details = array:3 [
  "message" => "undefined extension class 'Smarty_Internal_Runtime_Get_Plugin_Filepath'"
  "code" => null
  "exception" => SmartyException {#7419
    #message: "undefined extension class 'Smarty_Internal_Runtime_Get_Plugin_Filepath'"
    #code: 0
    #file: "/var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_undefined.php"
    #line: 62
    trace: {
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_undefined.php:62 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php:133 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_data.php:290 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/Smarty/plugins/modifier.date_format.php:11 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_loadplugin.php:90 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/Smarty.class.php:1065 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:841 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php:94 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:768 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:1501 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:565 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php:2880 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php:3481 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php:3573 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php:128 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:481 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:402 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_resource_recompiled.php:52 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:136 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:105 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:232 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116 { …}
      /var/www/vhosts/example.org/web/sites/default/files/civicrm/templates_c/en_US/70/54/ae/7054aef50ee3601a36396e267f9f56cf3548556e_0.string.{eval var=$smartySingleUseString|smarty:nodefaults}.php:30 {
        content_65aec52c58d215_10826603(Smarty_Internal_Template $_smarty_tpl)
        › ob_start();
        › $_template = new Smarty_Internal_Template('eval:'.smarty_modifier_smarty($_smarty_tpl->tpl_vars['smartySingleUseString']->value,'nodefaults'), $_smarty_tpl->smarty, $_smarty_tpl);echo $_template->fetch();
        › $_block_repeat=false;
      }
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:232 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Utils/String.php:1040 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/Civi/Token/TokenCompatSubscriber.php:108 { …}
      /var/www/vhosts/example.org/vendor/symfony/event-dispatcher/EventDispatcher.php:220 { …}
      /var/www/vhosts/example.org/vendor/symfony/event-dispatcher/EventDispatcher.php:56 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/Civi/Core/CiviEventDispatcher.php:263 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/Civi/Token/TokenProcessor.php:397 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/Civi/Token/TokenRow.php:327 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/TokenSmarty.php:67 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/BAO/MessageTemplate.php:374 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/BAO/MessageTemplate.php:422 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Event/BAO/Event.php:1254 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Event/Form/Registration/Confirm.php:895 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/Form.php:625 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/StateMachine.php:144 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Next.php:43 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/HTML/QuickForm/Controller.php:203 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-packages/HTML/QuickForm/Page.php:103 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/Controller.php:355 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:322 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:69 { …}
      /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:36 { …}
      /var/www/vhosts/example.org/web/modules/contrib/civicrm/src/Civicrm.php:88 { …}
      /var/www/vhosts/example.org/web/modules/contrib/civicrm/src/Controller/CivicrmController.php:83 { …}
      Drupal\civicrm\Controller\CivicrmController->main() {}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:123 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/Render/Renderer.php:627 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:124 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:97 { …}
      /var/www/vhosts/example.org/vendor/symfony/http-kernel/HttpKernel.php:181 { …}
      /var/www/vhosts/example.org/vendor/symfony/http-kernel/HttpKernel.php:76 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/Session.php:58 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php:48 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php:28 { …}
      /var/www/vhosts/example.org/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php:32 { …}
      /var/www/vhosts/example.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php:106 { …}
      /var/www/vhosts/example.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php:85 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php:48 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php:51 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php:36 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php:51 { …}
      /var/www/vhosts/example.org/web/core/lib/Drupal/Core/DrupalKernel.php:704 { …}
      /var/www/vhosts/example.org/web/index.php:19 { …}
    }
  }
]

```

**Backtrace:**

```
$backTrace = #0 /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/vhosts/example.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(SmartyException))
#2 /var/www/vhosts/example.org/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke((Array:3))
#3 /var/www/vhosts/example.org/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(83): Drupal\civicrm\Civicrm->invoke((Array:3))
#4 [internal function](): Drupal\civicrm\Controller\CivicrmController->main((Array:3), "")
#5 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array((Array:2), (Array:2))
#6 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#7 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#8 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext((Array:2), (Array:2))
#9 /var/www/vhosts/example.org/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#10 /var/www/vhosts/example.org/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#11 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#12 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#13 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#14 /var/www/vhosts/example.org/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#15 /var/www/vhosts/example.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#16 /var/www/vhosts/example.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#17 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#18 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#19 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#20 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#21 /var/www/vhosts/example.org/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#22 /var/www/vhosts/example.org/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#23 {main}

```

# Answer
The stacktrace says it's trying to load a smarty2 plugin. I'd guess your event registration email message template has `|date_format` in it. Consider updating it to `|crmDate` if possible, since `|date_format` is deprecated in php 8 anyway.
> 4 votes

# Answer
Note that 5.69.5 now has a blank text version of the offline event template. We have removed almost all the text versions in 5.70 - if there is no blank version a text version is generated at the point of send from the rendered html. However, people who have customised the text version will not automatically have their customised version updated
> 3 votes

---
Tags: registration, smarty3
---


title: QuickForm Error w/ CiviCRM 5.33.0

text:
# Question
Title: QuickForm Error w/ CiviCRM 5.33.0
Right after the update to CiviCRM 5.33.0, many pages (as *civicrm/case/add* or *civicrm/mailing/browse/scheduled?*) throws the following error - `QuickForm Error: the rule does not exist as a registered rule` Is there a quick fix for this QuickForm ?

There is some details in the logs w/ a xssString :

```
[debug] $backTrace = #0 /PATH/vendor/civicrm/civicrm-core/CRM/Core/Error.php(205): CRM_Core_Error::backtrace("backTrace", TRUE)

#1 /PATH/vendor/pear/pear-core-minimal/src/PEAR.php(944): CRM_Core_Error::handle(Object(HTML_QuickForm_Error))
#2 /PATH/vendor/civicrm/civicrm-core/packages/HTML/QuickForm.php(2107): PEAR_Error->__construct("the rule does not exist as a registered rule", -2, 16, (Array:2), "Rule 'xssString' is not registered in HTML_QuickForm::addRule()")
#3 /PATH/vendor/pear/pear-core-minimal/src/PEAR.php(575): HTML_QuickForm_Error->__construct(-2, 16, (Array:2), "Rule 'xssString' is not registered in HTML_QuickForm::addRule()")
#4 /PATH/vendor/pear/pear-core-minimal/src/PEAR.php(236): PEAR::_raiseError(NULL, NULL, -2, 16, (Array:2), "Rule 'xssString' is not registered in HTML_QuickForm::addRule()", "HTML_QuickForm_Error", TRUE)
#5 /PATH/vendor/civicrm/civicrm-core/packages/HTML/QuickForm.php(1109): PEAR::__callStatic("raiseError", (Array:7))
#6 /PATH/vendor/civicrm/civicrm-core/packages/HTML/QuickForm.php(689): HTML_QuickForm->addRule("title", "Illegal characters in input (potential scripting attack)", "xssString")

```

\`

# Answer
@ichi that rule shouldn't be existing anymore because it was removed in 5.33 https://github.com/civicrm/civicrm-packages/commit/148eb5483caa1059d031f11aaf32b391bead1c66 I would suggest applying that patch onto your system and that should fix the problem
> 3 votes

# Answer
This error may occur, If you have added any formRule in a custom form in any of your extension(s) .

For example:

> $this-\>addFormRule(array('CRM\_Myextension\_Form\_Myform', 'myFormRule'));

If you have any line(s) like above in your custom form then you need to change that as below:

> $this-\>addFormRule(array($this, 'formRule'));
> 0 votes

---
Tags: quickform, 5.33.0
---


# Question
Title: cron breaks after upgrade 5.69.4 - php 8.2 (deprecated for ${var} in dp.php)
on our staging environment we upgraded to Drupal 10.2.0 - CiviCRM 5.69.4 - PHP 8.2.15

On the Plesk server for the domain there is a scheduled (cron) job created as: script path = httpdocs/vendor/bin/cv arguments = api job.execute --user=cronuser --cwd=/var/www/vhosts/staging.\***.**/httpdocs --quiet Use PHP version = 8.2.15 on run we got errors in website logging:

> mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 474, referer: https://staging.x.x/admin/reports/status Apache error mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 547, referer: https://staging.x.x/admin/reports/status Apache error mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 549, referer: https://staging.x.x/admin/reports/status Apache error mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 552, referer: https://staging.x.x/admin/reports/status Apache error

As a workarround I tried decreasing the Jobs PHP version to 8.1.27, but this results in: PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version "\>= 8.2.0"

Task "httpdocs/vendor/bin/cv" completed with error in 0 seconds, output:

> PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version "\>= 8.2.0". You are running 8.1.27. in /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform\_check.php on line 28 Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version "\>= 8.2.0". You are running 8.1.27. in /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform\_check.php on line 28

# Answer
> 2 votes
The `{$var}` thing is fixed in civi 5.71 but is unimportant. The important line is `Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.27`

You have something in your composer.json or installed that requires php 8.2 but you're using 8.1.

---
Tags: drupal, cron-job, php8, deprecated
---


# Question
Title: In CiviEvent, can the answer to one question reveal additional questions?
We are setting up conference registration using CiviEvent and are wondering if the answer to one question reveal additional questions. For instance, in our old system, you could select "on-site" or "off-site" accommodations and related questions would then be revealed. So this is really a dependency question—can one question showing be dependent upon the selection the user makes for another question. Please take into consideration that we are CiviEvent newbies!

# Answer
This feature is called "conditional visibility". Standard CiviEvent registration does not have this feature. There are several ways to accomplish this, but unfortunately most aren't really newbie-friendly.

The Profile Conditionals extension adds this feature but it's difficult to configure - you have to configure it by hand in `civicrm.settings.php`.

FormBuilder will be the successor to the current CiviEvent pages when complete. It has conditionals in the CiviCRM 5.69+. However, it doesn't currently process payments, so is only suitable (for now) on free events.

If you're on Drupal or Backdrop, the Webform module has conditionals, and with Webform-CiviCRM, will do what you need. This is my recommendation if you use one of those CMSes.

WordPress has the "Caldera Forms" plugin with CiviCRM integration. I don't know the current status of it - there was a meeting yesterday I didn't attend. Hopefully if you're on WordPress someone can speak to whether that's feasible.
> 7 votes

---
Tags: civievent, registration
---


title: Upgrade the translations

text:
# Question
Title: Upgrade the translations
Since Drupal 10 the documentation on updating the translations have changed: https://docs.civicrm.org/installation/en/latest/drupal/#i18n

What exactly do I have to do to deploy a language other than english for an existing installation? Do I need the `cv core:install` command at all or are there other ways to tell the database there is a new language?

# Answer
> 2 votes
1. Grab the localisation (l10n) files and unpack the l10n and sql subfolders into vendor/civicrm/civicrm-core/

You'll find the l10n files on the CiviCRM Download page or from https://download.civicrm.org/civicrm-VERSION-l10n.tar.gz where VERSION is a recent version of CiviCRM.

**Example:**

```
cd /var/www/html/drupal10/
wget https://download.civicrm.org/civicrm-5.27.2-l10n.tar.gz
tar -zxvf civicrm-5.27.2-l10n.tar.gz
cd civicrm/
cp -R l10n/ ../vendor/civicrm/civicrm-core/
cp -R sql/ ../vendor/civicrm/civicrm-core/
cd ..
rm -rf civicrm/

```
2. If you've done this correctly, you should end up with vendor/civicrm/civicrm-core/l10n and vendor/civicrm/civicrm-core/sql/

You can remove any languages you don't need by deleting them before copying the l10n and sql folders.

# Answer
> 0 votes
It looks like I simply don't need any database upgrade. Just downloading the latest language file from https://download.civicrm.org/civicrm-l10n-core/mo/de\_DE/civicrm.mo and putting it into a l10n folder inside the Drupal private files directory does it for me. Not sure if the SQL files are required anymore.

The documentation ist a bit unclear to me about translation upgrading. Any clearification is welcome.

---
Tags: localisation, l10n
---


title: Financials ACLs status error

text:
# Question
Title: Financials ACLs status error
The extention "Financials ACLs" throws an error on the system status page because it is missing CiviContribute. I never installed this extention on purpose and I don't find it inside the extention management. The error says:

```
There is one extension error:
"Financial ACLs" (financialacls) has a missing dependency on "CiviContribute" (civi_contribute)
To resolve any errors, go to Manage Extensions.

```

What's wrong here?

# Answer
> 2 votes
Its a bug in Civi where the extension gets installed forcefully even though the Contribution extension is enabled or not. You will not be able to see the extension in the extension page but uou can disable the extension by running below SQL

```
UPDATE civicrm_extension
SET is_active = 0
WHERE full_name = 'financialacls';

TRUNCATE civicrm_cache;

```

---
Tags: civicontribute
---


# Question
Title: fatal error in "Smarty" after 5.69.2 upgrade
After upgrading CiviCRM to 5.69.2 (along with several extensions), I'm occasionally getting the following error:

> Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in /home//www/www/wp-content/plugins/civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smartycompilerexception.php on line 8

Looks like a bug in the PHP code.

Anybody else see this? Any ideas?

# Answer
> 0 votes
Just a quick update on status - the Smarty2 to Smarty3 transition is still optional although at some point, once people are not hitting issues, it will be required. So if you are hitting issues then you should report them in gitlab and if you don't have time to dig into it then just switch back in the interim. We have not yet determined which release will hard-switch to Smarty3 but the absolute earliest that would be is 5.73

We have also been testing Smarty4 and from CiviCRM 5.71 Smarty 2,3 and 4 will all work. Smarty 4 seems to solve a few things and the only additional challenges from it appear to be some notices if php functions that are not registered are used.

---
Tags: php, smarty, issues
---


# Question
Title: Print custom field group from multiple records
Currently we have a **group of custom fields** "Date" and "Medical Note" that are displayed in the table tab and that **allow multiple records**.

We need **all these fields to be printable in a PDF document** and also other basic contact fields (Name, date of birth). We were thinking of doing this with *"Tokens"* in a **custom template**, however we were unable to add "Tokens" to the custom fields that allow multiple registrations.

**Is there any option or plugin to print all these custom fields (multiple records) in a single custom PDF document?**

# Answer
May be you could build a Search kit with the same table and use Searchkit token extension
> 1 votes

# Answer
You can build a SearchKit search for these fields (multiple-record custom fields are treated as their own searchable entity in SearchKit), then click on "Download Spreadsheet" and choose the PDF format.
> 0 votes

---
Tags: custom-fields, civireport, tokens, pdf, admin
---


# Question
Title: Development site is connecting to production database (DB Error: insufficient permissions)
I updated CiviCRM on Drupal 7 to the latest version (5.70.0) in Production. I then copied the production environment into a development URL on the same server, and updated /sites/default/civicrm.settings.php as well as /sites/default/settings.php to point the Sandbox to the development database.

`CIVICRM_UF_DSN`, `CIVICRM_DSN`, `$civicrm_root`, and `CIVICRM_TEMPLATE_COMPILEDIR` all now point to the development database.

The development site loads fine a web browser, and when I update data from Drupal, that data gets updated in the Dev database with no problem. But when I try to update something in CiviCRM, such as enable or disable an extension, create a new contact, or even when I go to manually run the cron job against the development environment, I get the following error:

> DB Error: insufficient permissions

Then when I go to check the log, I see something like the following, which is clearly using the Production (not the Dev) database user:

> \[nativecode=1142 \** TRIGGER command denied to user 'production-user'@'localhost' for table 'civicrm\_contact'\]"\`

I have cleared caches several times, having deleted files in `/sites/default/files/civicrm/templates_c`. I have grepped the entire Development codebase for the `production-user`, and it is nowhere to be seen.

I have tried to rebuild the triggers by going to `civicrm/menu/rebuild?reset=1&triggerRebuild=1`, but that produces the same error. I have also tried to rebuild the menu & clear the cache from the web UI, but that also produces the same error.

How can I track down why the Development copy of this website is still somehow trying to use the Production database user (and is it still somehow trying to connect to the prod database too)?

# Answer
> 0 votes
You will need to export the database without triggers and import them back and rebuild the trigger

```
mysqldump -umysqlusername -p --skip-triggers dbname > dbname.mysql

drop database dbname;

create database dbname;

mysql -umysqlusername -p dbname < dbname.mysql

```

---
Tags: database
---


# Question
Title: additional details accordion doesnt expand for new contribution
wp 6.1 civicrm 5.59.3 php 8

also error message "Warning: Undefined array key "buildRecurBlock" in /home/customer/www/4nature.org/public\_html/wp-content/uploads/civicrm/templates\_c/en\_US/%%60/60A/60A6E1C6%%Payment.tpl.php on line 5"

"additional details" accordion expands for existing contributions but not for new contribution. have cleared cache and templates\_c

screen changes slightly in that line appears under "additional details" but no fields

# Answer
Switching back to PHP 7.4 fixed it. Having said that I have another site where it is working with PHP 8
> 1 votes

# Answer
I have the same error on civicrm 5.70 in contribution page. Warning: Undefined array key "buildRecurBlock" in C:\xampp\htdocs\PQCRM\wp-content\uploads\civicrm\templates\_c\en\_US%%60\60A\60A6E1C6%%Payment.tpl.php on line 5

Warning: Undefined array key "buildRecurBlock" in C:\xampp\htdocs\PQCRM\wp-content\uploads\civicrm\templates\_c\en\_US%%6F\6F7\6F7BB438%%Contribution.tpl.php on line 125.
> 0 votes

---
Tags: civicontribute
---


# Question
Title: Linking a form to log as an activity on an individual's profile
I am trying to create a new form to log health and safety accidents linked to an individual that will work as an online accident book that reports can be pulled from. I would like to link the form to existing individuals so that it is stored on their profile as an activity. I have created an activity type for this.

How to I link the form to an individual? On form builder I have opted for existing individual but seem to be missing a step. Have you used Civi for accident reporting and would you recommend an alternative way to log?

Thank you!

# Answer
Welcome to SE! From the FormBuilder main page, click the arrow next to `New Submission Form` and select `Activity` to create a new form.

* Click on the `Activity 1` tab
* It should show `Added by` `Select Current User` \- that makes sense: the person to be recorded as the creator of the activity is the current user when the form is filled in.
* In the `Activity Type` box, select the activity type you created for Accident Reports.
* You probably want to drag the `Details` field on the right pane so users can describe what happened, and may also add `Assigned to` in the `Values` section and add the name of your Health & Safety person so they receive an email when a new accident report is submitted.
* You also want to record who is involved in the accident: (I think this is the bit you're missing)
    + A) You could assume that the person filling in the report was involved, so:
        - Under the `Values` section where it says `Add value`, click that and select `With Contacts`.
        - Click in the new `With Contacts` box and then on `Select Current User`
        - This won't show in the form the end-user sees but will set the fields on the CiviCRM activity.
    + B) Alternatively, you can let the person filling in the form select the people involved:
        - Click on `With Contacts` under the list of `Activity Fields` and drag it on to the right pane near `Subject`
        - The user filling in the form can then select multiple people (including themselves) who were involved in the accident.

Note that you don't need an `Individual` tab on the form if you only select existing contacts.
> 5 votes

---
Tags: forms, formbuilder
---


title: Can't connect to separate database

text:
# Question
Title: Can't connect to separate database
Trying a new install of CiviCRM 5.3.9 using a separate Wordpress database. Wordpress, MySQL and PHP are confirmed required versions. Path is definitely correct using mysql://USER:PASSWORD@localhost:3306/DB but throws errors when I click Apply.

* Error Database CiviCRM InnoDB support Could not determine if MySQL has InnoDB support. Assuming none.
* Error Database CiviCRM MySQL AutoIncrementIncrement Could not connect to database
* Error Database CiviCRM MySQL Lock Tables Could not connect to database
* Error Database CiviCRM MySQL Temp Tables Could not connect to database
* Error Database CiviCRM MySQL Trigger Could not connect to database
* Error Database CiviCRM MySQL connection Access denied for user ''@'localhost' (using password: NO)
* Error Database CiviCRM MySQL utf8mb4 Support Could not connect to database
* Error Database CiviCRM Mysql thread stack Could not connect to database
* Error Database db.database The property "db.database" is not well-formed.
* Error Database db.username The property "db.username" is not well-formed.
* Warning Database CiviCRM MySQL Version Cannot determine the version of MySQL installed. Please ensure at least version 5.6.5 is installed.
* Warning Database db.password The property "db.password" is blank. This may be correct in some controlled environments; it could also be a mistake or a symptom of an insecure configuration.

The password is entered correctly in the path. I had a previous install that used exactly the same path to a separate database that worked fine for some time, then stopped working. Is there something wrong with the CiviCRM install? Can anyone suggest why the connection is failing?

# Answer
> 0 votes
CiviCRM doesn't like database user passwords with special characters - especially "#". Change password.

---
Tags: wordpress, database, installation
---


# Question
Title: Sending emails to group promoting a event using CiviMail
I have have created some events, and I would like to send an email to a group to promote each of them individually, and link to information regarding the event. Event tokens are not available in Civimail, since it would have no idea which event you meant.

Has anyone found a semi-automated way to get the info for an event to prefill a message template? I was wondering if using Smarty might work and I could add the event id as a variable, but that's way beyond me at the moment.

I'm not looking to send a scheduled email when the event is created, because it would likely trigger before all details are entered.

One option I have considered using Fancy Tokens to list the events for the next x months. I might need to tweak it though as I'm using Drupal with civicrm\_entity to display the event information. But I would prefer to send an email per event, as over time we might have groups specific to event types.

# Answer
> 1 votes
If you send to *Participants* of an event (rather than *Contacts*) then tokens about the event are available. So if you had an invite list you could look at creating a new not-counted participant status of 'invited', register them as 'invited' and then mail them with event tokens available. But I don't know how well that fits your scenario.

You can create your own tokens using SearchKit which might be useful here since they don't need to be in a Participant context. If you create a SK for 'next conference event' you can probably create `next_conference_event_title`, `next_conference_event_date` etc using the SearchKit Tokens extension (not tested).

---
Tags: civievent, civimail
---


# Question
Title: Subscribe contacts to newsletter in bulk
We've been using a separate tool for newsletters, but I'd like to move those subscriptions into Civi - basically, add users to a mailing group in bulk. There are several thousand of them. I'd prefer not to send them all an opt-in link since they already opted in to the existing newsletter.

What's the best way to accomplish this? All the contacts are already in Civi. I can grab a list of the contact IDs, so I think I could probably handle this just on the database side, but I feel like using the API or SearchKit might be a better approach... I just am not sure how to actually *do* that.

# Answer
You can achieve this with Search Builder by making use of the ‘In’ operator and comma separating the IDs.

From the CiviCRM menu - Search \> Search Builder or /civicrm/contact/search/builder?reset=1

From the results, you can add to group from the actions drop down menu -
> 1 votes

---
Tags: groups, newsletter, subscribe
---


title: Scheduling repeat newsletters

text:
# Question
Title: Scheduling repeat newsletters
There are some older related questions, but I thought I'd ask in case the situation was different.

Some related questions:

My situation: I made a token to display all classes created in the past two weeks. I want to include that token in an email sent out weekly to members of the "New Classes" group.

I had assumed that it would just be a matter of scheduling the email, but the standard email form only allows for sending once. So no dice there unless someone is manually setting it up weekly.

Next option I looked at was a Scheduled Reminder. That seems like it *might* work, but it is awkward since the reminders are built around something happening: an activity, a registration, an expiration. I'm not sure what "something" would make the most sense to try.

Third option I'm looking at is the one from the last link using the CiviRules DailyGroupMembership trigger. Again, I think it might work, but it doesn't seem quite right either.

Is there a better route to take for this that I'm overlooking?

(Environment is Civi 5.63 with Drupal 9)

# Answer
> 1 votes
This took a while to come up with a solution for and work out the logic on, so I wanted to share in case it helps anyone. As Lars suggested above the answer was with CiviRules, but it required some extra steps.

* I have two groups: "Subscribers" and "Sent".
* I have a rule that triggers daily for all members of Subscribers that are not also members of Sent.
* That rule sends an email with the specified template, and it adds contacts to the Sent group.
* I have a second rule that triggers daily for all members of the Sent group.
* That rule's action has a delay until Sunday at Midnight (technically, I have it at 12:01), and its action is only to remove the contact from the Sent group.

The thing that took me a long time to work out was where the delay's needed to be to make it flow correctly. In other configurations I ended up with varying numbers of emails.

# Answer
> 0 votes
I think Scheduled Reminders are the way to go. You can set up a repeating reminder that goes out once per week, per your requirement. When setting up the reminder you can choose "Contacts" as the base entity, you can limit it to the group of your choice, and for the date field you can simply choose a fixed date (e.g. today) as the start date, and the reminders will thus be scheduled to send once per week starting today.

---
Tags: email, scheduled-reminders, newsletter
---


title: KCFinder sometimes won't upload images

text:
# Question
Title: KCFinder sometimes won't upload images
Following on from many many months of difficulties with KCFinder being incredibly slow, and other posts, we now have a situation where KCFinder 'sometimes' refuses to upload images.

We haven't yet found a pattern as to when it does and doesn't upload images. We can always upload the images directly to the folder by ftp.

We have over 1,000 pictures in the folder, so it's quite likely that's the cause! :-(

But how can we gain control of the situation? It's hard to simply delete images since they may have been used in recent emails.

I've tried looking in /var/log/apache2/error\_log, the Civicrm log and Drupal log, and none show any issues. We're using Drupal latest and Civicrm 5.24.4. Thanks for any help you can give us!

# Answer
Sounds like a combination of a slow-ish server/network, too many images and possibly some configuration bits.

The KCfinder runs in a little popup window that makes it extra difficult to diagnose, and tries to load thumbnails of all your existing images so you can select one. All that work is overloading both your network and your server (and maybe even your browser, though unlikely).

You may be able to customize kcfinder so that it's not generating quite so many thumbnails, and/or fix your server so that it doesn't have to do it each time (i.e. with some caching, though that's a bit tricky, e.g. ensure you have mod\_expires enabled with apache).

You're right that you're somewhat painted into a corner, and a more powerful server might be the easiest solution.

Alternatively, you could set up a separate directory for old images and move over ones that are more than a month old.

Going forward, you may also want to make sure you're not uploading really large images, i.e. scale them on your own machine before uploading them.
> 0 votes

# Answer
KCFinder is crappy sometimes. May I advice you to use Summernote editor instead of CKEditor (version 4 is EOL)? Summernote replaces KCFinder with elFinder: https://civicrm.org/extensions/summernote (please follow all installation notes).

Why am I asking you to do this? Because you can trim your problem down to a "slowish server" or a "crappy KCFinder". Depending on the outcome you may decide your next steps.
> 0 votes

---
Tags: ckeditor, images
---


# Question
Title: Retrieving Contact information with API4 Inside the module
I am developing a simple module that hooks into Membership Create, and then uses the information of the related contact to perform some other functions, like initiating a NextCloud account with the same email address and display name. There is a Contribution page in place, using a profile for members, and after the form is submitted the rest roles...

All is working well. Membership is created. Contact is created. The hook gets triggered after the Membership create. I can also get the associated contact ID with:

```
$contactId = $objectRef->contact_id;

```

But then when I use the API4 to retrieve contact details nothing is returned. Here is the code I received from Support\>Developer\>API4 Explorer:

```
    $contacts = \Civi\Api4\Contact::get(TRUE)
  ->addSelect('display_name', 'email_primary.email')
  ->addWhere('id', '=', $contactId)
  ->setLimit(1)
  ->execute();
foreach ($contacts as $contact) {
  // do something
}

```

The returned $contacts array is empty, even though it is present in the backend and $contactId has a value.

I made sure the membership group can be listed by public, but I dont think that should be an issue. Where else shall I look into? Any help is appreciated.

# Answer
> 3 votes
Try changing `\Civi\Api4\Contact::get(TRUE)` to `\Civi\Api4\Contact::get(FALSE)`

The `TRUE`/`FALSE` parameter is a short-hand for `checkPermissions`. The default in Api4 is that permissions **are** checked but you can disable that. Obviously if you're going to disable permissions you need to consider who is running the code, what info it returns and how it is used.

If your membership sign-up is used without logging in (anonymous users) then they won't have access to use the API, but you still want this to run so bypassing permissions checking is appropriate.

---
Tags: civicrm-entity, apiv4, civicontact
---


# Question
Title: Profile on contribution page doesn't show membership custom fields
On a very simple Drupal 10.1 + CiviCRM 5.69.2 site.

Add a custom fieldset for memberships (e.g. with a simple text field).

Include the custom field from that fieldset in a profile.

That field does not show up when that profile is included on the contribution page \[I tried a few permutations of putting it in it's own profile, including in a profile which includes other contact fields that do show up, etc.\]

Oddly, I thought it was showing up and now it isn't - not sure if that's due to a CiviCRM upgrade in the meantime or something else.

BUT, I was not able to reproduce this behaviour on the demo site:

https://d10-master.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2

i.e. it's working there.

# Answer
I think the answer is that I turned on the 'on behalf of' option. When I do that on the demo site, I get this message:

> Allow individuals to contribute and / or signup for membership on behalf of an organization? You should move the membership related fields configured in 'Includes Profile (top of page)' to the 'On Behalf' profile for this Contribution Page

The demo site is running a few versions later, so I suspect this is a known issue that has been resolved in recent versions.

For my site, I believe that even though I turned off the on-behalf-of, there's something left behind that prevents the membership fields from being exposed.

When I add the membership fields to the on-behalf-of profile they do show up on my site, so that does appear to be the origin of the issue and sort-of-work-around.

In other words, because at some point I enabled the on-behalf-of-organization feature on the contribution page (and then disabled it later), I still have to put my custom membership fields in the on-behalf-of profile, and they don't show up otherwise.
> 1 votes

---
Tags: civimember, custom-fields, profile
---


# Question
Title: How can I use the membership payment table in searchkit?
I want to create a search using searchkit that identifies contributions (payments) with memberships, which are connected using the civicrm\_membership\_payment table.

I actually want to list the contributions of a type Membership Payment that are NOT connected to a membership.

# Answer
You could use Contribution -\> Left Join line items where entity\_table = civicrm\_membership

Where contribution FT= ABC and line\_item.id IS NULL
> 2 votes

# Answer
It looks like the API was missing to allow Contributions to join with Memberships. Here is a PR to add it, which allows you to do this in SearchKit:
> 2 votes

# Answer
As per @mattwire's comment in @Coleman's PR, the Right Way to identify a membership payment is via the line item, when the entity\_table is "civicrm\_membership" and then the membership is the entity\_id.

i.e. for my purposes: join the contribution table to the line items, and find contributions that have no civicrm\_membership entries.
> 1 votes

---
Tags: civicontribute, civimember, searchkit
---


# Question
Title: Giving membership via relationship to specific contact
I have a parent account which can possess multiple memberships. There can be multiple children which inherit one of these membership. I want to be able to choose which child inherits which membership. I know it's possible via the GUI, but is there a way of doing this programmatically? I tried looking at the API browser, but couldn't find anything.

Thank you!

# Answer
> 1 votes
I think you're talking about the feature whereby you can limit the number of contacts that inherit a relationship, and then create/delete the related memberships when viewing the owner membership:

The code behind 'create' is https://github.com/civicrm/civicrm-core/blob/5.71/CRM/Member/Form/MembershipView.php#L109-L128 which basically copies a load of parameters from the owner (parent) membership and creates a new one including the `owner_membership_id`. APIv4 `Membership.create()` lets you specify `owner_membership_id` so it looks like you should be able to do what you want.

So far as I know, this feature is not used much so test your create and delete code carefully.

Since it involves a lot of copying from the owner membership it would be nicer to wrap those up as API actions with their own tests to protect their functionality. I don't know what happens if for example the owner and inherited memberships have different start and end dates. If you create via the UI, the code sets those to be the same but if you do different things via the API you could run into strange effects.

---
Tags: civimember, relationships
---


title: API4 - get a custom field by its ID?

text:
# Question
Title: API4 - get a custom field by its ID?
What is API4 analogue of API3 `"return": ["custom_666"],`

The below doesn't work:

* `CRM.api4('Contact', 'get', {select: ["contact_type", "custom.666"],`
* `CRM.api4('Contact', 'get', { select: ["contact_type", "custom_666"],`

`select: ["contact_type", "custom.*"],` returns a list of **machine field group.machine field name** which is a bit tricky to search through in the Explorer, since there are some 200 of the and because long strings are being cut off by API4 explorer so sometimes it is only a part of **custom group machine name** is visible.

Wouldn't be nice to put a field ID at a 1st place, so it is not `"Individual_Informations_g_n_rates.Adhesion_suspend_demand_d_infos_compliment_"`

but rather

`"[666]Individual_Informations_g_n_rates.Adhesion_suspend_demand_d_infos_compliment_"`
?

# Answer
> 2 votes
For portability reasons, APIv4 does not use the "custom\_id" identifier but instead uses "CustomGroupName.CustomFieldName" as the field key.

This is because when you migrate one site to another auto-increment ids in the database (including ids of custom fields) are not guaranteed to be consistent.

> Wouldn't be nice to put a field ID at a 1st place

No, that would not be portable as the name would include field id. Names can be relied upon as stable between different sites, ids cannot. It's also not human-readable (unless you have memorized the ids of all 666 of your custom fields, the number is meaningless and makes your code hard to understand).

To directly answer your question, the analogue of this:

```
civicrm_api3('Contact', 'get', [
  'return' => ['custom_123'],
]) ;

```

Is this:

```
civicrm_api4('Contact', 'get', [
  'select' => ['CustomGroupName.CustomFieldName'],
]);

```

You can also conveniently return all values from a custom group (not possible in api3) like this:

```
civicrm_api4('Contact', 'get', [
  'select' => ['CustomGroupName.*'],
]);

```

---
Tags: api4
---


# Question
Title: Can I modify the Field Label name once the custom field has existing records?
Can I modify the Custom Field Label Name once the custom field has existing records?

Will it cause any errors in the database, or are there any concerns that I should be aware of?

# Answer
> 3 votes
It is not a problem to change the label in the UI.

(But avoid changing the `name` field directly in mysql/phpmyadmin. It is different from `label` in the database and may cause problems depending on what created the field.)

---
Tags: custom-fields, database
---


title: Migrate from Drupal to Standalone

text:
# Question
Title: Migrate from Drupal to Standalone
I'm starting to test out Civi Standalone (something we've been waiting for, glad it's moving forward!) and I wanted to see how we might be able to migrate our data from a Drupal instance to the standalone instance.

I'm not sure if it's as simple as a mysqldump from the Drupal instance and loading to the standalone, as I believe standalone includes tables/data of the user accounts to log in.

Is there a way to migrate to a standalone instance? How do we migrate users? Also, where are the users in Standalone even stored (which db tables)?

# Answer
> 2 votes
The Standalone extension repurposes the `civicrm_uf_match` table (which on CMS-based instances of CiviCRM stores a link to the CMS user record) to store username, password, etc. To stay consistent the tablename is still `civicrm_uf_match` but it get's labeled "Users".

Installing the standalone extension will delete and rebuild this table with the extra columns. If you have existing users to migrate you can then insert them into the table post-install. Every other table is the same, so migrating from another site should be as straightforward as a sql dump.

---
Tags: standalone
---


title: Saved rules not showing

text:
# Question
Title: Saved rules not showing
I have activated the CiviRules extension and created a workflow. It says it saved however the screen is empty when I go to Manage CiviRules. No filters selected it's just a general search. I checked both enabled and disabled but the list is blank. Does anyone know how this might be able to be fixed?

UPDATE: I did confirm the rules are showing in the database.

UPDATE 2: There are javascript errors on the page but they do not seem relevant?

# Answer
> 2 votes
Ug stupid me didn't try the classic 'turn it off and on again approach'. I tried your searchkit idea @Demerit but that didn't work. So I instead disabled, uninstalled, and reinstalled, and now showing saved rules.

Thank you everyone for your support!!

---
Tags: civirules, issues, bug-reporting
---


title: joomla package not installing

text:
# Question
Title: joomla package not installing
I am trying to install the CiviCRM package for Joomla. I have 4.4 and I am installing the latest version of CiviCRM for Joomla. pHp 8.1. Hosting on GoDaddy.

I receive the below error both when uploading from temp (after extracting zip), as well as upload/install of zip. I have scoured the internet but cannot find anyone asking about this/fixing it. Anyone see this before?

Full code cut off from image:

0 Failed opening required '/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm.settings.php' (include_path='.:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/packages:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/tecnickcom:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/pear_exception:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/auth_sasl:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/console_getopt:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/pear-core-minimal/src:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/db:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/log:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/mail:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/mail_mime:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/net_socket:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/net_smtp:/home/knohnwbd6ym6/public_html/administrator/components/com_civicrm/civicrm/vendor/pear/validate_finance_creditcard:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php')```

# Answer
So found civicrm.settings.php in a trashed version and was able to copy it over and seems to have gone through. woo!
> 1 votes

---
Tags: joomla, error, installation
---


title: Best practices for idle contacts

text:
# Question
Title: Best practices for idle contacts
What is the best practice for contacts that are considered idle?

We have a number of contacts who gave once 10+ years ago but never since. We'd like to clean things up so that we don't waste resources chasing these old and idle contacts. Is there a best method for designating them? For example:

We can create a group, but then we need to remember to exclude that group in future mailings.

We can delete them, but that loses the data about their contributions from years back.

We could flag them as "do not mail" but that's usually only for people who have opted out.

How are other groups addressing this?

# Answer
> 0 votes
It sounds like your expectation is that *all* contacts are active donors/subscribers unless otherwise excluded. But I think a more common approach to CiviCRM is for a contact to have no particular role unless somehow *included*. So a contact might just be someone who used to be on staff, or is the brother of one of your donors, or just someone who's phone number you collected a long time ago. These people are not automatically anything. You only take action on them if e.g.

* They sign up to receive mailings (a CiviCRM group)
* They are flagged as a donor of interest (e.g. via a LYBUNT report)
* They are part of a smart group you define (e.g. of recent donors in a geographical area)

---
Tags: contacts
---


# Question
Title: templates_c cache files not being deleted
This is a problem I've had for three or four years, but never solved. I send a monthly mailing to about 50k contacts using CiviMail. Each mailing is scheduled using the standard CiviCRM job scheduling. All works fine except that during the sending, the templates\_c/en\_GB folder grows to about 30GB or more, and has to be emptied manually (either from the command line or using the the CiviCRM Clean Up Caches page) to stop the server from running out of disk space. The files and directories which are being created under templates\_c/en\_GB/ all seem to have plausible permissions (read and write for the Apache user, read only for everyone else), so I don't understand why they're not being cleared.

Can anyone suggest anywhere to start looking for a solution? Thanks.

This happens with the following set-up, but I have had the problem for a long time, with all previous versions as well.

CiviCRM 4.7.19
Joomla 3.7.2
php 7.0.19
MySQL 5.6.36

# Answer
> 2 votes
Investigating this one too. The 'Clean-up Temporary Data and Files' doesn't clean the tplCache by default (oddly). You can make it do so by adding it to the command parameters:

# Answer
> 4 votes
Cache files are cleared by a scheduled job, which isn't enabled by default.

* Go to **Administer menu » System Settings » Scheduled Jobs**.
* Find the row labeled *Clean-up Temporary Data and Files*.
* On that row, click **more menu » Enable**.

# Answer
> 0 votes
For the workaround, you can try to go to `/civicrm?directoryCleanup=1`.

> `&directoryCleanup=1` empties template cache in `civicrm/templates_c`.

Read more: https://docs.civicrm.org/dev/en/latest/tools/debugging/#using-url-parameters.

# Answer
> -3 votes
Try changing the templates\_c folder permissions to 777 recursively so that every sub directory would have 777 permission also.

---
Tags: civimail, permissions, cache, deleted
---