# Question
Title: Error when editing (but not creating) event scheduled reminder
We have a team member who helps us set up events. We have just upgraded to CiviCRM 5.68.1 on Drupal 7. This error has cropped up only since our upgrade.

This team member has the following permissions:

* CiviCRM: skip IDS check
* CiviCRM: access CiviCRM backend and API
* CiviEvent: access CiviEvent
* CiviEvent: edit event participants
* CiviEvent: edit all events
* CiviEvent: register for events
* CiviEvent: view event info

Notably, they do not have "Administer CiviCRM" since they should only be in here helping us with event creation and management.

When this user clicks to edit an event reminder, we get the following error in the log:

```
2024-01-15 15:30:56-0800  [debug] $API Request Authorization failed = #0 /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php(151): CRM_Core_Error::backtrace("API Request Authorization failed", TRUE)
#1 /var/www/html/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php(256): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
#2 /var/www/html/sites/all/modules/civicrm/api/api.php(91): Civi\Api4\Generic\AbstractAction->execute()
#3 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php(161): civicrm_api4("ActionSchedule", "get", (Array:1))
#4 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php(77): CRM_Admin_Form->retrieveValues()
#5 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form/ScheduleReminders.php(50): CRM_Admin_Form->preProcess()
#6 /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php(717): CRM_Admin_Form_ScheduleReminders->preProcess()
#7 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#8 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Admin_Form_ScheduleReminders), "display")
#9 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_ScheduleReminders), "display")
#10 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle("display")
#11 /var/www/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#12 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(295): CRM_Utils_Wrapper->run("CRM_Admin_Form_ScheduleReminders", "Schedule Reminders", (Array:0))
#13 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:17))
#14 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
#15 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke((Array:4))
#16 /var/www/html/includes/menu.inc(527): civicrm_invoke("admin", "scheduleReminders", "edit")
#17 /var/www/html/index.php(21): menu_execute_active_handler()
#18 {main}

2024-01-15 15:30:56-0800  [error]
$Fatal Error Details = array:3 [
  "message" => "Authorization failed"
  "code" => null
  "exception" => Civi\API\Exception\UnauthorizedException {#2401
    -errorData: array:1 [
      "error_code" => "unauthorized"
    ]
    #cause: null
    -_trace: null
    #message: "Authorization failed"
    #code: 0
    #file: "/var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php"
    #line: 230
    trace: {
      /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php:230 {
        Civi\API\Kernel->authorize($apiProvider, $apiRequest)
        › if (!$event->isAuthorized()) {
        ›   throw new \Civi\API\Exception\UnauthorizedException("Authorization failed");
        › }
      }
      /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php:147 { …}
      /var/www/html/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php:256 { …}
      /var/www/html/sites/all/modules/civicrm/api/api.php:91 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php:161 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php:77 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form/ScheduleReminders.php:50 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php:717 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php:76 { …}
      /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
      /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php:355 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php:98 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:295 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
      /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
      /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module:472 { …}
      /var/www/html/includes/menu.inc:527 { …}
      /var/www/html/index.php:21 { …}
    }
  }
]

2024-01-15 15:30:56-0800  [debug] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(Civi\API\Exception\UnauthorizedException))
#2 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke((Array:4))
#3 /var/www/html/includes/menu.inc(527): civicrm_invoke("admin", "scheduleReminders", "edit")
#4 /var/www/html/index.php(21): menu_execute_active_handler()
#5 {main}

```

Strangely, they can create new scheduled reminders on events no problem. But they then cannot edit the event scheduled reminder, not even for reminders they themselves created.

I don't see any permissions related to scheduled reminders so I'm not sure what permission to grant them.

This team member was able to create & edit event schedule reminders no problem in our prior version of Civi which...I forget the exact version number but we last upgraded about a year ago.

I tried reproducing this on dmaster but I don't see a way to create a new Drupal user in dmaster with specific permissions.

Is this a bug that I should report against core in gitlab, or something else?

Thank you!

# Answer
> 0 votes
Upgrading CiviCRM from 5.69.3 to 5.69.5 fixed this issue for us.

---
Tags: civievent, scheduled-reminders
---


title: Event List in WP

text:
# Question
Title: Event List in WP
Sorry for the noob question, but using Wordpress 6.4.3 & CiviEvent (5.67.2), how do you show an up-to-date list of upcomming events within wordpress?

I see how I could include the event shortcode into a specific page (I presume to have a pretty url), and also the generated event link with the example.org/civicrm/event/info/... url. I also see a way to download an ics file, exporting existing events, but this doesn't allow pulling new events.

If there were a ical url, I could at least sync that with a google calendar and then show that on the webpage.

Edit-- Thanks, Coleman! Below is an image of event list on front end-- highlighting 2 formatting issues still a bit off:

# Answer
The recommended way to do this is with SearchKit.

Here is documentation about how to create an Upcoming Events list using SearchKit: https://docs.civicrm.org/user/en/latest/searching/searchkit/example-upcoming-events/
> 2 votes

# Answer
an alternative is to use the Event Organiser WP extension with its companion EO CiviCRM from Christian Wach like here https://smc-cse.fr/petit-dejeuner-thematiques/ (dynamic content that might be empty sometimes). It depends on your goal and the way you want to expose your upcoming events. It needs a bit of theming but we've been using it since years and are very happy.
> 1 votes

---
Tags: wordpress, civievent
---


# Question
Title: The contact might be the Membership Organization of a Membership Type
I created two test users and I played around with membership and fees. Now I cannot delete those users because of the reason below.

All transactions and memberships were removed. Membership page shows 0 Members and also membership tab on contacts shows nothing but still I cannot delete. Could you please explain the message below?

*The contact might be the Membership Organization of a Membership Type. You will need to edit the Membership Type and change the Membership Organization before you can delete this contact.*

# Answer
* Go to `Administer > CiviMember > Membership Types`
* for each of the membership types shown, click `Edit`
* Look at the `Membership Organization` field - if that is the org you are trying to delete then you need to either change that field to a different org, or delete the membership type. When you have done that, you should be able to delete the org itself.
> 0 votes

---
Tags: civimember, civicontact
---


# Question
Title: How to troubleshoot broken link for mailing list subscription confirmation
we have routinely used the option for users to register for a mailing list via a mailing group. Also we automatically send out an Email for confirming the registration (double-opt-in). Unfortunately the link in the email is broken, it directs to WEBSITE/civicrm/mailing/confirm/?reset=1&cid=XXX&sid=YYY&h=HASH, which gives a "site not found" error.

I flushed the Cache and reset the paths, but the error remains.

Any ideas on how to go about this?

# Answer
> 1 votes
What solved the problem for me (civiCRM 5.59.2., WP 6.4.3): The WP instance needs to update the permalinks regularly, under: WEBSITE/wp-admin/options-permalink.php

On the way, I found out that you can edit the message for the automatic email for subscription under Administer \> CiviMail \> Header, Footer and Automatic messages; in my case it uses the token {subscribe.url} which is hard coded, and correct. The update of the WP permalinks did the trick.

---
Tags: groups, mailing
---


title: How to use Open Sans font iin Mosaico

text:
# Question
Title: How to use Open Sans font iin Mosaico
I want to migrate to Mosaico from MailChimp but need the Open Sans font. Where might I find the relevant code and in which folder will I find the file to insert the code? Thanks

# Answer
> 0 votes
This previous SE post has some pretty detailed guidance on how to import Google Fonts

---
Tags: mosaico, google
---


title: Mosaico social media buttons

text:
# Question
Title: Mosaico social media buttons
Is it possible to change the social media button options in Mosaico templates? We'd like to be able to direct people towards our Telegram channel, but that isn't a default option. Thanks.

# Answer
Not sure what current version you are on but Telegram is definitely an option in Mosaico 3.2 (not sure when it was introduced)
> 1 votes

---
Tags: mosaico, social-media
---


# Question
Title: Drupal 9/10: How to create Event Location + Events using CiviCRM Entity
I have enabled the CiviCRM Entity module. How can we create an event location and event in CiviCRM using a single form submission?

This functionality was achievable in Drupal 7 using https://skvare.com/blog/civicrm-entity-and-drupal-integration-whats-new-whats-next.

Is there a way to achieve the same in Drupal 8/9/10?

# Answer
> 4 votes
seems doable using https://www.drupal.org/project/inline\_entity\_form.

Steps I followed was:

* Enable `Location Block`, `Address` & `Event` Entities in CiviCRM Entity Settings page.
* Ensure module weight for CiviCRM Entity is lower than `Inline entity form`.

```
drush ev 'module_set_weight("civicrm_entity", -10);'

```
* Rebuild cache (`drush cr`) 2-3 times before proceeding for the next step.
* Structure =\> CiviCRM Entity =\> CiviCRM Location block =\> Manage Form Display
* Enable Address ID field and ensure Widget is set to `Inline entity form`.
* Similarly, enable Location Block ID field and set the widget to `Inline entity form` in Structure =\> CiviCRM Entity =\> CiviCRM Event =\> Manage Form Display
* Visit the form at `/civicrm-event/add` to create events

Note: APIv3 requires contact\_id and location\_type\_id field while creating address in civicrm. The former is not required while creating address for events so can be considered as an api bug.

Ensure these 2 fields are present on the Address entity to avoid any fatal error on the form submission.

---
Tags: civievent, civicrm-entity, drupal-9
---


# Question
Title: Menu display corruption on New installation CiviCRM 5.71.1 for Wordpress After SSL Cert installed
**Issue resolved** Graham and Jon G pointed me to the solution. When the SSL cert was installed after CiviCrm, there was a mix of HTTP and HTTPS references in the relevant PHP files. I installed the SSL cert to the Domain prior to activation CiviCrm, and it is functioning without issue and SSL is enabled. Thank you!

Initially the system status menu and and all others appear correctly but on second look at the CiviCRM from Wordpress dashboard the menus are displayed as text only with links that work, but *menus are corrupted* in same way. (believe same issue on previous install CiviCRM 5.70, but now need to verify this)

The Civi menu selection is not available in the header of the page. I have cleared cache thru Admin tools and browsers. Located civicrm.settings.php in ~/wp-content/uploads/civicrm and verified 'wp.frontend.base', 'wp.backend.base' URLs and 'domain' 'userFrameworkResourceURL' contain the correct IP.

My use of CiviCRM until now has been Spark hosted; I'm setting up an AWS instance with Bitnami/Automattic AMI. I have setup this instance from scratch several times, same result. I must be missing something obvious. No other plugins activated, or other plugins activated, same result as well.

I just located this old question: Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus, which gave me two clues. The addition of the SSL Cert, and a secondary civicrm.settings.php, that may not have been correctly updated. I'm going to try install again to verify impact of the SSL Cert on the issue (I just can't remember its install's relation to the menus).

**Update**: Reinstall to verify state of menus before SSL Cert; issue still exists.

**update #2**: Failed to resolve issue. Reverted to CiviCRM 5.71.0 and there is not any issue with the menus. I will now be exceptionally careful to note each change from SSL cert to plug-in activations and report back if issue recurs in this version.

**Update 3:** Installed new instance of the Bitnami Wordpress and installed CiviCRM 5.71.0. All was well until I installed the "Let's Encrypt" SSL Cert, which broke the CiviCrm menus. I'm now going to work without the SSL and later attempt install of SSL cert differently.

# Answer
Without more info it's hard to say, but you very likely have a CORS issue. This happens when not all of your assets (images, fonts, etc.) are loaded from the same URL as the one you visit. "Same URL" includes not just the domain, but the protocol (e.g. `http://`, `https://`) and port number.

In all likelihood, you were loading some assets (either fonts or Javascript) over HTTP. You can confirm this by opening your browser's Developer Tools (press "F12" on your keyboard) and viewing the Network tab. But the easiest solution to this is to force all HTTP requests over HTTPS.
> 0 votes

---
Tags: wordpress, aws
---


title: CiviCalendar: Show DB Error

text:
# Question
Title: CiviCalendar: Show DB Error
I have install CiviCalendar. However, the calendar can not shown in the CiviCRM dashboard. Moreover, when I click Contacts-\> Contact calendar sharing, System show the below error: "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. Could not find valid value for cid Return to home page"

My WordPress Version is 6.4.3; CiviCRM Version is 5.70.2; Calendar Extention Version is 3.5.4

Thanks in advance

# Answer
> 0 votes
This may not be the answer you want (but may help others). There is a solution underway for a calendar display based on Search Kit but see Aidan's comment below.

https://lab.civicrm.org/ayduns/calendarskdisplay

---
Tags: calendar
---


# Question
Title: Smart groups break when database is restored
When we clone our production instance to staging, we restore the database with updated host information prior to restoring the database.

Querying a smart group returns all contacts in database, not just those in the smart group. Running the **Rebuild Smart Group Cache** scheduled job does not do anything.

Here Eileen says How do the Rebuild Smart Group Cache scheduled job and the Smart group cache timeout setting interact?

> Note I DO recommend running the job that flushes expired groups by scheduled job - just not the one that rebuild them all, even the ones you don't really need

Where is that job?

# Answer
I don't see any such job, nor do I recall such a thing.

But: the contacts that are in smart groups are cached in `civicrm_group_contact_cache` so you should be able to clear that using the CiviCRM "cleanup caches" option (under Administer -\> System settings).
> 1 votes

# Answer
We are encountering the same problem. Whenever cloning the system (Drupal 7.98, CiviCRM 5.65.1) from production to staging, all smart groups are non-functional. Instead, all contacts of a certain kind become members of all smart groups. We need to manually correct it each time, which is quite some hassle. Emptying the cache does not fix that. The Drupal protocol shows the following message:

> https://xxx/civicrm/group?reset=1&update\_smart\_groups=1
>
> Warning: Invalid argument supplied for foreach() in CRM\_Contact\_BAO\_SavedSearch::getFormValues() (Zeile 65 von /xxx/httpdocs/staging/public/sites/all/modules/civicrm/CRM/Contact/BAO/SavedSearch.php).

Anybody has a hint how to fix that?
> 0 votes

---
Tags: smartgroups
---


# Question
Title: Error-Message after update Smarty v2 => Smarty v3 (CiciCRM 5.71.1, Joomla)
following the instructions on the CiviCRM status page, I have added this code in civicrm.settings.php to update on Sparty v2 to v3:

```
define('CIVICRM_SMARTY_AUTOLOAD_PATH',
'/var/www/vhosts/mywebsite.com/httpdocs/www.mywebsite.com/administrator/components/com_civicrm/civicrm/packages/smarty3/vendor/autoload.php');

```

Afterwards I get this error message:

```
rtrim(): Argument #1 ($string) must be of type string, array given
Call stack
#   Function    Location
1   ()  JROOT/administrator/components/com_civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/Smarty.class.php:1416
2   rtrim() JROOT/administrator/components/com_civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/Smarty.class.php:1416
3   Smarty->_normalizeTemplateConfig()  JROOT/administrator/components/com_civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/Smarty.class.php:812
4   Smarty->getTemplateDir()    JROOT/administrator/components/com_civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/Smarty.class.php:1347
5   Smarty->__get() JROOT/media/civicrm/ext/mosaicotweaks/mosaicotweaks.civix.php:99
6   _mosaicotweaks_civix_civicrm_config()   JROOT/media/civicrm/ext/mosaicotweaks/mosaicotweaks.php:12
7   mosaicotweaks_civicrm_config()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php:276
8   CRM_Utils_Hook->runHooks()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php:194
9   CRM_Utils_Hook->commonInvoke()  JROOT/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook/Joomla.php:86
10  CRM_Utils_Hook_Joomla->invokeViaUF()    JROOT/administrator/components/com_civicrm/civicrm/Civi/Core/CiviEventDispatcher.php:314
11  Civi\Core\CiviEventDispatcher::delegateToUF()   JROOT/administrator/components/com_civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:251
12  Symfony\Component\EventDispatcher\EventDispatcher->callListeners()  JROOT/administrator/components/com_civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:73
13  Symfony\Component\EventDispatcher\EventDispatcher->dispatch()   JROOT/administrator/components/com_civicrm/civicrm/Civi/Core/CiviEventDispatcher.php:263
14  Civi\Core\CiviEventDispatcher->dispatch()   JROOT/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php:168
15  CRM_Utils_Hook->invoke()    JROOT/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php:1494
16  CRM_Utils_Hook::config()    JROOT/administrator/components/com_civicrm/civicrm/CRM/Core/Config.php:107
17  CRM_Core_Config::singleton()    JROOT/administrator/components/com_civicrm/civicrm.php:66
18  civicrm_initialize()    JROOT/administrator/components/com_civicrm/civicrm.php:87
19  civicrm_invoke()    JROOT/administrator/components/com_civicrm/civicrm.php:40
20  require_once()  JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
21  Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()  JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
22  Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
23  Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
24  Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
25  Joomla\CMS\Application\AdministratorApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:293
26  Joomla\CMS\Application\CMSApplication->execute()    JROOT/administrator/includes/app.php:61
27  require_once()  JROOT/administrator/index.php:32

```

Unfortunately, I have not found an answer while searching here in the forum and also via Google. Do you have any tips for me?

If I comment out the code in civicrm.settings.php again, everything works.

Hier ein paar Infos zu unserer Konfiguration:

* Joomla 4.4.3,
* CiviCRM 5.71.1
* Ubuntu-Server
* PHP 8.2.16
* Action Provider 1.140
* AuthX 5.71.1
* CiviCampaign 5.71.1
* CiviCase 5.71.1 (deactivated)
* CiviContribute 5.71.1
* CiviEvent 5.71.1
* CiviMail 5.71.1
* CiviMember 5.71.1
* CiviReport 5.71.1
* CiviGrant 5.71.1 (deactivated)
* CKEditor4 5.71.1
* TinyMCE 1.5
* CiviMobileAPI 6.3.0 (deactivated)
* iATS Payments 1.8.0
* CiviMobile 3.0 (deactivated)
* Contribution cancel actions 5.71.1 (deactivated)
* Form Processor 2.0.5
* Custom search framework 5.71.1
* Mosaico Tweaks 1.4
* Form Core 5.71.1
* FlexMailer 5.71.1
* SearchKit 5.71.1
* Mosaico 3.5.1709296836

Do you need any further information?

Thank you, Zenon

# Answer
> 0 votes
Its a known issue for Mosaico Tweak extension. I have raised a PR for the fix.

You can apply the patch or download from my forked version until the PR is merged and released.

---
Tags: joomla, smarty, smarty3
---


title: Hosting for CIVICRM -

text:
# Question
Title: Hosting for CIVICRM -
Our live CIVICRM environment is CiviCRM 5.67.1, Joomla 4.4.2, PHP 8.1, hosted on Siteground. Looking to move from Siteground dedicated hosting - too many issues and super slow. Looking for advice from the community as to the best performing hosting service for Joomla and CIVICRM

# Answer
> 2 votes
I have had various problems with shared hosting recently, so your question resonates with me. I'm currently planning on moving an install to Civihosting.com, after mailing problems. I've used them before and I know others recommend them. One thing for sure, not all shared hosting sites can run CiviCRM.

# Answer
> 1 votes
Here's where you can find official list of CiviCRM partner/experts:

https://civicrm.org/civicrm/experts

If you put in "hosting" as the service and "joomla" as the CMS it looks like there are 7 options.

---
Tags: hosting-providers
---


title: CiviCRM 5.69.x Smarty3 errors

text:
# Question
Title: CiviCRM 5.69.x Smarty3 errors
When updating to ESR 5.69.x, we are running into errors with Smarty3 when updating the smarty path in civicrm.settings.php:

define('CIVICRM\_SMARTY3\_AUTOLOAD\_PATH', '/var/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/autoload.php');

$Fatal Error Details = array:3 \[ "message" =\> "undefined extension class 'Smarty\_Internal\_Runtime\_Get\_Plugin\_Filepath'" "code" =\> null "exception" =\> SmartyException {#8284 #message: "undefined extension class 'Smarty\_Internal\_Runtime\_Get\_Plugin\_Filepath'" ...

We are still trying to diagnose why this is happening, but we have upgraded some clients with no issues, and other clients with varying degrees of issues (donations, registrations, contact creations, etc.). Has anyone else encountered this issue when upgrading to 5.69.x?

System: Drupal 7.99 CiviCRM 5.69.5 PHP 8.1

Full backtrace:

$Fatal Error Details = array:3 \[ "message" =\> "undefined extension class 'Smarty\_Internal\_Runtime\_Get\_Plugin\_Filepath'" "code" =\> null "exception" =\> SmartyException {#8284 #message: "undefined extension class 'Smarty\_Internal\_Runtime\_Get\_Plugin\_Filepath'" #code: 0 #file: "/var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_undefined.php" #line: 62 trace: { /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_undefined.php:62 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_extension\_handler.php:133 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_data.php:290 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/Smarty/plugins/modifier.date\_format.php:11 { include\_once › */ › require\_once $smarty-\>\_get\_plugin\_filepath('shared', 'make\_timestamp'); › /** arguments: { $name: "\_get\_plugin\_filepath" $args: array:2 \[ …2\] } } /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_method\_loadplugin.php:90 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/Smarty.class.php:1065 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatecompilerbase.php:841 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_compile\_private\_modifier.php:94 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatecompilerbase.php:768 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatecompilerbase.php:1501 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatecompilerbase.php:565 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templateparser.php:2880 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templateparser.php:3481 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templateparser.php:3573 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_smartytemplatecompiler.php:128 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatecompilerbase.php:481 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatecompilerbase.php:402 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_resource\_recompiled.php:52 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_template\_compiled.php:136 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_template\_compiled.php:105 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_template.php:216 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatebase.php:232 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatebase.php:116 { …} /var/www/wwwadmin/data/www/example.com/sites/default/files/civicrm/templates\_c/en\_US/c3/de/cf/c3decff7ccfa9fdba7d3be9cc10e1d06f1108c3b\_0.string.{eval var=$smartySingleUseString|smarty:nodefaults}.php:30 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_template\_resource\_base.php:123 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_template\_compiled.php:114 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_template.php:216 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatebase.php:232 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty\_internal\_templatebase.php:116 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Utils/String.php:1040 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/Civi/Token/TokenCompatSubscriber.php:108 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:251 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:73 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php:263 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/Civi/Token/TokenProcessor.php:397 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/Civi/Token/TokenRow.php:327 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/TokenSmarty.php:67 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/BAO/MessageTemplate.php:374 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/BAO/MessageTemplate.php:422 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Event/BAO/Event.php:1254 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php:895 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/Form.php:625 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/StateMachine.php:144 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php:43 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/Controller.php:355 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/Invoke.php:322 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …} /var/www/wwwadmin/data/www/example.com/sites/all/modules/civicrm/drupal/civicrm.module:472 { …} /var/www/wwwadmin/data/www/example.com/includes/menu.inc:527 { …} /var/www/wwwadmin/data/www/example.com/index.php:21 { …} } } \]

# Answer
> 2 votes
Looks like you have your **Events - Registration Confirmation and Receipt (on-line)** message template customised which is causing the smarty issue

---
Tags: smarty3
---


# Question
Title: D10 4.0-beta1: How far from production-ready?
I'm considering recommending, in a short timeframe, some sort of CRM that integrates as natively as possible with Drupal. Salesforce is probably overkill for our needs. CiviCRM, and most CRMs, could probably meet it, to the extent they integrate. Monday is currently in use but likely able to redirected from if appropriate. So my question is:

How ready for a production site is the current D10 version today? How big or small, how numerous are the blockers to it moving out of beta today, next month, or two months from now? What is any sort of reasonable time horizon for this shift to being fully reliable and ready? Are the remaining blocks small enough that a reasonably senior Drupal dev could erase them in short order, or are they more complicated and require CiviCRM-specific expertise? I know these questions are super broad, but that is intentionally so because it's a quick decision turnaround based on as best-informed speculation as you all can discern / suggest.

# Answer
> 1 votes
I'm not sure what you mean by "4.0-beta1" but drupal 10 + civicrm is production ready. https://docs.civicrm.org/installation/en/latest/general/requirements/

And take these stats with a grain of salt but most of the sites listed here as "drupal 8" are actually drupal 10, or at least drupal 9: http://stats.civicrm.org/?tab=sites. The stats don't distinguish between 8/9/10.

In terms of additional tight integration note also there are two highly used modules:

---
Tags: drupal, cms-integration
---


# Question
Title: How to set duration and some custom fields for inbound email activity
When processing inbound email to activities, and automatically they are filed to correct case with the specified case id, how to set the value of duration for these inbound email activities? Where should I make any change to realize this setting of duration when the system files inbound email activities to case, on the programming level? I know I could key in duration if creating a new activity in the contact, but I want the system to be able to give a value for duration for every inbound email activities automatically.

# Answer
> 1 votes
You would need to write some code in an extension and use this hook: https://docs.civicrm.org/dev/en/latest/hooks/hook\_civicrm\_emailProcessor/

The params will contain the activity id.

---
Tags: civicase, activities, inbound-email
---


title: Upgrade to 5.70.2 fails with DB error

text:
# Question
Title: Upgrade to 5.70.2 fails with DB error
Upgrading CiviCRM to 5.70.2 from 5.64.0 fails with the below error. Any pointers are appreciated.

```
DB Error: constraint violation
  sql
  user info
        ALTER TABLE `civicrm_mailing_event_queue`
        ADD CONSTRAINT `FK_civicrm_mailing_event_queue_job_id`
        FOREIGN KEY (`job_id`)
        REFERENCES `civicrm_mailing_job`(`id`) ON DELETE SET NULL
       [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`mif10_civicrm`.`#sql-4f687h_5fuvo`, CONSTRAINT `FK_civicrm_ma
  iling_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE SET NULL)]
  debug info DB Error: constraint violation
  debug info
        ALTER TABLE `civicrm_mailing_event_queue`
        ADD CONSTRAINT `FK_civicrm_mailing_event_queue_job_id`
        FOREIGN KEY (`job_id`)
        REFERENCES `civicrm_mailing_job`(`id`) ON DELETE SET NULL
       [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`mif10_civicrm`.`#sql-4f687h_5fuvo`, CONSTRAINT `FK_civicrm_ma
  iling_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE SET NULL)]

```

# Answer
> 4 votes
There are orphan data in civicrm\_mailing\_event\_queue table. Below query should return you the count

```
SELECT COUNT(*)
FROM civicrm_mailing_event_queue q
  LEFT JOIN civicrm_mailing_job j
      ON j.id = q.job_id
WHERE j.id IS NULL;

```

To delete you can use

```
DELETE q.*
FROM civicrm_mailing_event_queue q
  LEFT JOIN civicrm_mailing_job j
    ON j.id = q.job_id
WHERE j.id IS NULL;

```

HTH

Pradeep

---
Tags: upgrade
---


# Question
Title: CIVICRMSEPA Error sepasettings.tpl not found after new installation
I have reinstalled Civicrm and the extension Civicrmsepa. When calling the Civicrm settings I get an error message that the sepasettings.tpl is not found.

Now I can't do chmod on the data & uoload files in www-data at my web host. I think this is the problem.

Can someone tell me how I can solve this.

Many thanks and best regards

# Answer
Its a known issue for Smarty3, I have pushed a PR for the https://github.com/Project60/org.project60.sepa/pull/701

You can apply the patch or comment CIVICRM\_SMARTY3\_AUTOLOAD\_PATH line in your civicrm.settings.php

```
cd org.project60.sepa
curl -0 https://patch-diff.githubusercontent.com/raw/Project60/org.project60.sepa/pull/701.patch > 701.patch
patch < 701.patch

```
> 2 votes

# Answer
I have tried to apply the patch, but I get a error message. Could you help me again? Even if I'm not the fittest person on the console.

Greetings Günter
> 1 votes

---
Tags: extension, error-page, civisepa
---


# Question
Title: Looking for Experienced & Knowledgeable CIVICRM Freelancer
Looking for referrals for a knowledgeable, experienced CIVICRM expert (not a consulting company) that freelances and that I could keep on retainer to assist with CIVICRM technical and application issues as they arise. We use Joomla 4 as our CMS and are on CIVICRM 5.67.1.

# Answer
> 1 votes
If you are wanting to avoid large consulting companies, note that there are very few of those in the Civi ecosystem. Most of the people listed at https://civicrm.org/civicrm/experts are individuals or small teams, and they are all very knowledgable. Since you are using Joomla, you might want to narrow your search to those who have experience with that platform.

---
Tags: joomla, php, mysql, developer, issues
---


title: Log and Event Management

text:
# Question
Title: Log and Event Management
Our live CIVICRM environment is CiviCRM 5.67.1, Joomla 4.4.2, PHP 8.1, hosted on Siteground.

The logs in our environment are very large and growing. Is there a process that we can use to manage the size of the system and job log? Other than not having access to the history, is there any harm in deleting the records in the log files?

Additionally, is there an archiving process for past events?

Looking for reasons why the system is so slow.

# Answer
In what the archiving for past events is concerned, please find my answer under: Is it possible to archive civi events?

The logs can be deleted if you don't need them anymore.

Eileen wrote a good article about that: https://civicrm.org/blog/eileen/who-did-what-when

What's the URL of your site?
Do you run CiviMobile API on this installation?

\*** EDIT \***
Deactivate CiviMobile API under extensions when editing/adding events. Then, the overall performance will be fine. There is a performance issue with CiviMobile API: https://lab.civicrm.org/extensions/civimobileapi/-/issues/73

Or you could use the fix described here: https://lab.civicrm.org/extensions/civimobileapi/-/merge\_requests/78/diffs
> 1 votes

---
Tags: logs, civicrm-event
---


# Question
Title: Send Scheduled Mailings Failure / CiviCRM Spark - Failing Job
No scheduled mailings are sent, logs reporting:

```
Entity: Job Action: process_mailing
Summary" Finished execution of Send Scheduled Mailings with result: Failure, Error message: Array ( [content] => Array ( [email_rfc822] => MIME-Version: 1.0 Subject: Thank you for attending Apereo's February's MicroCon (...)

```

Other errors include:

```
CiviCRM Spark - Failing Job
Scheduled Job Send Scheduled Mailings is failing. Error was: Finished execution of Send Scheduled Mailings with result: Failure, Error message: Array ( [content] => Array ( [email_rfc822] => MIME-Version: 1.0 Subject: Thank you for attending Apereo's February's MicroCon (...)

```

Issues began after implementing Sparkpost.

Running CiviCRM v5.68.1 with SparkPost integration v1.8.0

Any advice on where to start appriciated.

# Answer
> 0 votes
According to SparkPost support, the errors indicate possible email\_rfc822 content issues. SparkPost suggested confirming if the email\_rfc822 attribute is set in the content object of our transmission (i.e., within CiviCRM).

Documentation re. email\_rfc822 attribute was provided: https://developers.sparkpost.com/api/transmissions/#transmissions-post-send-rfc822-content

As the configuration was reviewed, it was discovered that a very silly but obscure config error on the server was the issue; when cron runs, it was ignoring some configurations and trying to use SparkPost's server.

---
Tags: scheduled-job, sparkpost, civicrm-spark
---


# Question
Title: How can I send an invoice for only some contribution pages?
I have five different contribution pages for different purposes. For one of them it makes sense to automatically issue an invoice, but not for the others. What's the best way to automatically issue an invoice for all transactions going through this one contribution page, but not any of the others?

# Answer
> 3 votes
With little bit of custom coding via an extension it is possible to exclude invoice on certain conditions

---
Tags: contributions, invoice
---


# Question
Title: Custom fields for event are not saving data
I want to use two custom fields for an event named `Friend Day`. One field is a dropdown the other is a Contact Reference.

I created a set of custom fields to be used for Participants where Event Name = `Friend Day`

When I register a participant for a `Friend Day` event, the custom fields display, and I can enter data into them and save the record. However, when I open the record the custom fields are blank. They did not save. The regular participant fields for the event do save.

I get no errors. Any suggestions appreciated on how to get the custom fields to save.

# Answer
Just noting I couldn't reproduce this on master (there are relevant recent code changes which may have fixed it) - are you able to try on https://dmaster.demo.civicrm.org/
> 1 votes

# Answer
I was reported this issue 3 weeks ago here trusting that it would be related to the issue. But I have applied the PR without success. Therefore I think it is another regression.
> 0 votes

---
Tags: civievent, custom-fields
---


# Question
Title: How do I show count of all participants and count of participants that meet a criteria (searchkit)
I'm trying to build a table that shows something like this:

> EventTitle | EventStart | Total Participants | Count of Participants with CustomField=Y

Using searchkit, I can get this easily:

> EventTitle | EventStart | Total Participants

and I can also get this easily:

> EventTitle | EventStart | Count of Participants with CustomField=Y

But I can't seem to think of a way to both filter on participants who have that custom field but also list all participants. In the filter tab it seems like I can either filter on these users or not.

Is there a way to accomplish this?

# Answer
> 1 votes
That should be doable with 2 joins.

* **Search for:** Events
* **With (optional):** Participants
* **With (optional):** Contacts IF custom field = x

Counting the first join should give you all participants, and counting the second should give you just the ones with the custom field.

---
Tags: searchkit
---


# Question
Title: How to find and edit the email that sends to users when unblocking their account in Drupal?
I'm new to CiviCRM + Drupal, and a lot of knowledge of the platform never got passed on in my organization.

Right now, when someone signs up through our CiviCRM, they are de facto blocked in Drupal. Upon being unblocked, they are sent an email that looks like this:

Here's the unblock feature in Drupal "People's" tab I'm talking about:

When a user originally signs up through our Civi (before they're unblocked), they get a confirmation email that was customized by our organization, so it is a feature that at one point was able to be edited.

Any suggestions on how I can search this email and edit it?

# Answer
> 1 votes
It's under Config - People - Account Settings. See https://www.drupal.org/docs/user\_guide/en/config-user.html

---
Tags: drupal, email
---


# Question
Title: Event Registration Error Could not find valid value for id
I've done a fresh install of WP with CiviCrm as the ONLY plugin.

Is there any solution for the "Could not find valid value for id" problem when using Wordpress 6.4.3 and Civi 5.71.1

Where should I look for url issues. I do have a cms database base page set as CiviCRM.

# Answer
> 2 votes
Here's the results of my testing to finally get this working.

For Wordpress - on the Dashboard goto Settings-\>Permalinks On my system, the radio button was set on the last item which had /%postname% (NOTE ... and this was the solution) - there was no trailing Slash (/) - so I added the trailing slash and IT WORKS Now.

---
Tags: wordpress, civievent
---


# Question
Title: CiviEvent Widget: Event Title Not Showing on Event Info Page
I am using the CiviEvent Widget in the sidebar of my website. Normally, clicking on an event's title in the sidebar brings up the event's info page just fine; same with clicking on the Register button for that event. However, if I happen to be sitting on a page with a Civi form on it (like an email list signup or donation page), when I click on that same event's title in the sidebar it brings up the event's info page but **without** the title!

I'm using Wordpress 4.9.9 and Civi 4.7.29. I use the CiviCRM Admin Utilities plugin to disable the Default CiviCRM stylesheet and the CiviCRM Menu stylesheet, and style ourselves the civi-generated pages. But when I Inspect that event page missing the title, I don't even see it there in the html to display. This in-development website is at test.californianational.party

Does anyone have any ideas on how to go about solving this, especially from AGH Strategies or Christian Wach? Thanks!

# Answer
This is a bug in CiviEvent Widget - though an understandable one.

The widget uses `CRM_Utils_System::url()` to construct URLs to the CiviEvents but -- when the widget is viewed on a page/post where there is a CiviCRM shortcode present -- the `url()` method returns public-facing URLs using the permalink of the page/post instead of the WordPress "basepage". FWIW, the reason for this is that the CiviCRM forms treat the post where the shortcode is embedded "as if" it were the basepage.

The solution would be for CiviEvent Widget to construct URLs that *always* point to the WordPress basepage, whose "slug" (which is its `$post->post_name`) is available via `$config->wpBasePage`. Something like this in its code:

```
$config = CRM_Core_Config::singleton();
$slug = $config->wpBasePage;
$post = get_page_by_path( $slug );
$basepage_url = get_permalink( $post->ID );

```

Indeed, I see that the plugin already accesses the basepage slug so it's almost there.
> 4 votes

# Answer
When I try an event page the two ways (one from the events listing under Get Involved, one from going thru the donate page's sidebar), the URLs for the same pages are different.

One has: http://test.californianational.party/civicrm/?page=CiviCRM&q=civicrm/event/info&reset=1&id=161

The other has: http://test.californianational.party/donate2/?page=CiviCRM&q=civicrm/event/info&reset=1&id=161

This is for the exact same page (id=161). When this happens, that entire page header portion is being dropped. It feels like a difference in templates/themes is being pulled because of the page URLs being different?
> 2 votes

# Answer
I changed line 322 to

```
$row .= '<a href="mydomain.com/civicrm/event/info/?reset=1&id=' . $event['event_id'] . '">' . $event_type . ': ' . $title . '</a>';

```

and it works. it's not the best way to do it, but...
> 0 votes

---
Tags: wordpress, civievent, admin, plugin, widget
---


# Question
Title: What values are required in order to send outbound mail via SMTP?
I'm trying to get outbound mail set up. With CiviCRM 5.70.1 on PHP8.1, if I configure it to send via mail() then the test message works successfully, but I can see that my transactional emails, a membership receipt email is the one i'm interested in, is getting sent but is malformed (it's like bits of the metadata in the email are missing, resulting in a badly messed up message that is barely readable). I've seen the same thing on a different install, and that was resolved by sending out via SMTP instead, and in that case I get good results by configuring the SMTP settings to use to 'localhost' as my SMTP server on port 25 with no authentication. That's on a server currently running on PHP 7.4 and slightly older version of CiviCRM.

Using the exact same settings on my 5.70.1 install, I get a fatal error. Looking in the logs I see in the CiviCRM log just this:

`[error] not connected`

and in my apache error log I see:

```
Got error 'PHP message: PHP Warning:  Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /home/rp/sites/live/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning:  Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning:  Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning:  Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning:  Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function fsockopen() in /wp-content/plugins/civicrm/civicrm/vendor/pear/net_socket/Net/Socket.php:165

```

Clearly CiviCRM is not happy with what I'm providing by way of settings. But it doesn't seem to matter what I put in the SMTP settings fields - I get the same fatal error regardless. Wondering if this is a bug in 5.70.1?

# Answer
> 1 votes
Transpires that the user under which the site runs had fsockopen listed as one of the PHP disable\_functions. Removing that constraint solved the problem.

---
Tags: smtp, outbound-email
---


title: help me with new membership

text:
# Question
Title: help me with new membership
Hello everyone I am a new user of civicrm, I wanted to ask you about a problem I am experiencing. When I have to create a new membership starting from an existing contact I get this kind of error "You either do not have all the permissions needed for this page, or the membership types haven't been fully configured." what can I do to fix it? Thanks to anyone who can give me help and advice.

# Answer
> 3 votes
You may not have configured the membership type correctly, make sure the visibility is public. This is under CiviCRM's **Administer menu » CiviMember » Membership Types**.

---
Tags: civimember
---


title: CDNTaxReceipts extend $pdf_variables[]

text:
# Question
Title: CDNTaxReceipts extend $pdf_variables[]
CDNTaxReceipts is a Tax Receipts extension for CiviCRM. This extension is a way to generate pdf including recipient's personal data. Those Data are listed in an array `$pdf_variables` declared in `cdntaxreceipts_generateFormattedReceipt()`.

Is there any proper way to extend `$pdf_variables[]` ? I would like to add a `custom_field` entry.

# Answer
If you look a few lines down from there it calls hook\_cdntaxreceipts\_writeReceipt where you can do something custom. There is also hook\_cdntaxreceipts\_alter\_receipt as described in the readme.
> 1 votes

---
Tags: extension, hooks, cdn-tax-receipts
---


title: Address fields in FormBuilder

text:
# Question
Title: Address fields in FormBuilder
I have a FormBuilder form with an individual and an organization. I would like to add address fields for the organization. Is that possible?

# Answer
> 1 votes
Address fields are added by the "Contact Address(es)" block, rather than as individual fields:

Blocks aren't heavily used yet in FormBuilder, but they allow you to save a set of fields together to be reused.

---
Tags: addresses, formbuilder
---


# Question
Title: Add event triggers doesn't work (Civirules)
I'm struggling with civirules. The purpuse is to create rules with add event as (triggers ) and add activity to contact as (action).

But when I've added an event the rule doesn't work.

How can i solve it ?

# Answer
I will repeat the suggestion from Mick Kahn as an answer. The event in itself is not linked with a contact. The link between event and contact is with participant. So the trigger **Event is Added** will never do anything with a contact, there is no link to any contact. That is done with participant, the trigger **Event is added** is triggered when an event is created, not when someone registers. If you want to add an activity to a contact that registers for an event you will need the trigger **Event participant is added** is that is a link between a contact and an event.
> 2 votes

# Answer
Just select "Event participant is added" as trigger and "Add activity to contact".
Did you probably **set a delay on the action** or set the **activity date** in the future?
> 0 votes

---
Tags: civievent, civirules
---


# Question
Title: Error: API (SearchDisplay, save) does not exist
I upgraded CiviCRM (from 5.53 to 5.58) after disabling non native CiviCRM extensions and when I want to enable these extensions again, I get an error message I don't understand:

> 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. API (SearchDisplay, save) does not exist (join the API team and implement it!)

These extensions are belgianpostcodes, moregreetings and formercommunicationsdata. For the moment, only belgianpostcodes is enabled.

Everything seems to work, but the error message keeps appearing each time I go to the CiviCRM Extensions page: `wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fextensions&reset=1`

I would like to get rid of the message, and obviously any error behind this message.

# Answer
> 3 votes
Looks like you have an extension(SearchKit) missing to be installed which is not required by CiviCRM

Can you visit Admin status page `/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fa%2F#/status` to check if there is any error message for require to install extension

---
Tags: upgrade, extension, api
---


# Question
Title: How to see which admin unblocked a user in Civi / Drupal?
I'm new to Civi / Drupal. In Drupal, there's the option to unblock users. Do you guys know how we would be able to check and see which admin unblocked any given user?

This could be in the contact record, as an email notification to us, etc.

Thank you!

# Answer
> 3 votes
May be installing https://www.drupal.org/project/user\_activity\_log module would provide some details

---
Tags: drupal
---


# Question
Title: With the Job Report Sender can multiple reports be sent from the same job, e.g. instanaceId=1, instancesId=2, instanceId= 4
We have a bunch of reports we want send to different people once a week. The generic description of the the Report Sender sounds like we only need a new different Report Sender job if the frequency is different and that it can sent multiple reports.

"Report sender (Weekly) Generates and sends out reports via email API Entity: Job API Action: mail\_report"

So do we just put each instanceId for each report on a new line in the parameters? What if we have other parameters for each report? Is it smart enough to notice a new instanceId new set of parameters? Or...?

Or do we need a separate job for each individual report and the generic description is misleading?

Maybe this is somewhere in the documentation that I did't find. There is a stackexchange that sounds like you need a different Report Sender for each report (instanceId) but it's old and it's not clear what they did.

# Answer
> 4 votes
You will need to create a Schedule job for each report separately.

---
Tags: reports, scheduled-job
---


# Question
Title: How to get a feedback statistic using civicrm custom field?
I have created a set of custom fields with 5 questions. It has 5 radio button rating 1 to 5. Then the questions were used in a profile to receive feedback from customers for the services they are receiving.

I am struggling to get a meaningful report/statistics for all the questions individually or collectively. I have tried searchkit but cant get the count of total of each question.

Has anyone tried this before? Any help would be appreciated.

Thanks

# Answer
> 3 votes
You can use SUM function in fields to get the total number per record, but you will need to group by record id

---
Tags: custom-fields, profile, reports, searchkit, feedback
---


# Question
Title: Why are irrelevant membership types being displayed for all of my members?
Since updating to 5.71 I see that on the membership tab of the contact record I see the current membership, and below that any pending or expired memberships. All good. However I'm now also presented with a listing of other membership types, with the text:

"The following Membership Types are associated with this organization. Click Members for a listing of all contacts who have memberships of that type. Click Edit to modify the settings for that type."

This looks like spurious rubbish. The listed membership types (in my case it is listing all of the available membership types configured in my Civi install) are nothing to do with the contact record that I'm viewing.

Clicking the 'Members' link provided presents me a listing of contact that are unrelated to the original contact. I'm assuming that this is either a bug or a 'feature' that was developed for a use case that has no relevance for me.

Why is this information being shown? What can do to disable this 'feature'?

# Answer
This comes from the `Admin UI` extension.

The text -

> "The following Membership Types are associated with this organization. Click Members for a listing of all contacts who have memberships of that type. Click Edit to modify the settings for that type."

is only displayed for Organisation contact types, not individual ones.

And this was meant to display only if the membership type belongs to the viewed contact id. But I can confirm its a bug and it currently displays for every organisation. I've created a PR to fix this at https://github.com/civicrm/civicrm-core/pull/29775
> 4 votes

---
Tags: civimember
---


# Question
Title: How can I use the billing block and the invoicing feature to facilitate invoicing a third party?
Here's my use case, which I'm guessing might be quite common:

End user visits the site and registers for an event/membership, etc., but rather than pay themselves using their own card/Paypal a/c, etc., they want to optionally provide a purchase order reference and get an invoice that is made out to their employer (or similar), so that the employer can pay the bill.

It feels like the billing block and the invoicing feature are close to being able to meet a need like this, but there doesn't yet seem to be any obvious way to make the required alterations.

What I'm seeing as default behaviour is that the invoice does use the billing address, but not the billing name (it seems to ignore this and use the contact's name instead - which makes me wonder why there is an option to enter a billing name at all, especially as there's no apparent UI to edit it or indeed do anything with it.

And then there's the billing block itself. If I could use a profile of my choosing for the billing block, then I could include the fields I want, such as employer's name, purchase order reference and/or other custom fields, etc. I see there's this Billing Block Adjustment extension (https://civicrm.org/extensions/billing-block-adjustment), which might possibly do the trick. Anyone using that have any advice about what it can provide?

And then, assuming I can get all of that doing what I want, there's the issue of getting the right fields into the invoice layout, which I assume is doable using tokens or similar?

Am I going in the right direction with this, or is there a better way?

# Answer
Time flies ;) Maybe this will help you and others? I use this billing block (Smarty). It includes the employer, what is needed often.

{capture assign=display\_name}{contact.employer\_id.display\_name}{/capture}{capture assign=adresstype}{contact.location\_type\_id}{/capture} {if $adresstype eq 2} {$display\_name}
{/if} {capture assign=addressee}{contact.addressee}{/capture}{if $addressee} {$addressee}
{/if} {capture assign=supplemental\_address\_1}{contact.supplemental\_address\_1}{/capture}{if $supplemental\_address\_1} {$supplemental\_address\_1}
{/if} {contact.street\_address}
{contact.postal\_code}{ }{contact.city}
{capture assign=country}{contact.country}{/capture}{if $country ne 'Deutschland'} {$country}{/if}
> 1 votes

---
Tags: invoice, billingblock
---


title: Form for billing information

text:
# Question
Title: Form for billing information
How to remove the "Second name" field in the billing form, I can not find the path to reach this form and modify it. Thanks

# Answer
> 1 votes
Unfortunately you cannot control billing block fields through UI. There is no such settings since this fields are mandatory for some(infact many) payment processors. This fields are hard coded at https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L869

You can use buildform hook to remove the second name field.

> Note: You might get error from some payment processor if second name is empty

HTH

Pradeep

# Answer
> 0 votes
You can hide the field with CSS, can't you?

Or comment this out in CRM/Core/BillingBlock.tpl:

```
  if ($('#middle_name').length)
    input_ids['#middle_name'] = '#billing_middle_name';

```

---
Tags: forms, billingblock
---


# Question
Title: Conditionally link radio options to other questions?
I've created a **public profile** with some **custom fields**. This is the page in question: https://crm.ingenium.org.mx/solicitud-de-admision/. I would like to **link the radio button options** of the last question and have **other questions appear depending on the selection** (Same as in a Microsoft Form or Google Form) This is possible?

# Answer
> 3 votes
If you are needing to stick with profiles which are now the "legacy / old-school" way to do forms, then you will need to utilize profile conditionals. At some point profiles will be set aside and replaced entirely with Form Builder.

But it doesn't look like your form requires any functionality exclusive to profiles, so I would recommend a conversion to Form Builder which provides conditionals as of Civi 5.69.

Note: Payments is one of the features not available in Form Builder which is still an MIH in progress.

---
Tags: custom-fields, profile, forms, formbuilder, fields
---


# Question
Title: How display event for anonymous user with Rendered Entity
In drupal a have added a field event to display a event in a web page. When I'm connected I see my Event field. The problem is when a anymous see my page he don't view my rendered entity.

If I change the format of my field to 'label', I can select the option 'Show entity labels regardless of user access' and with this configuration everybody can see my field. Where can I find the same option with the "Rendered Entity" format?

I use CiviCRM 4.6, Drupal 7 with modules CiviCRM Entity, Entity Reference and Display Suite.

Thanks

# Answer
So out of the box, CiviCRM Entity enforces that user has a role with 'view event info' permission to see the rendered entity.

In your case, you could probably just grant anonymous users that permission

This can be modified by implementing hook\_civicrm\_entity\_supported\_info() in a custom module, where you can change what permissions are necessary to view entities, or you can specifiy a custom access callback handler

See civicrm\_entity.api.php

See https://skvare.com/blog/civicrm-entity-customizing-and-adding-entity-types

Add the functions below to a custom module, replacing YOURMODULE with your module name.

The first implements hook\_civicrm\_entity\_supported\_info(). There you set a custom access callback for the event entity. In the callback, check for the view operation, if the event is\_public property is not empty, meaning is 1, then check the user has 'view event info' permission. Any other operations and events will enforce 'administer CiviCRM' permission .. you could use another permission, like 'edit all events', or whatever.

UPDATE:

```
function YOURMODULE_civicrm_entity_supported_info(&$supported_info) {
  $supported_info['civicrm_event']['permissions']['access callback'] = 'YOURMODULE_custom_event_access_callback';
}

function YOURMODULE_custom_event_access_callback($op, $entity_type, $entity, $account, $permissions) {
  // if $op is view and event is public, check if the user has 'view event info' permissions
  if($op == 'view' && !empty($entity->is_public)) {
    // see https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_access/7.x
    return user_access('view event info', $account);
  }
  // For all other ops and non-public events, check for 'administer CiviCRM' permission
  else {
    return user_access('administer CiviCRM', $account);
  }
}

```
> 1 votes

# Answer
For Drupal 9/10, you need to add an event handler, something like

```
function mymodule_entity_type_build(&$entity_info) {
  if (isset($entity_info['civicrm_event'])) {
    $entity_info['civicrm_event']->setHandlerClass('access', 'Drupal\mymodule\Access\EventAccessControlHandler');
  }
}

```

And add a new handler class at `src/Access/EventAccessControlHandler.php`

```
<?php

namespace Drupal\mymodule\Access;

use Drupal\civicrm_entity\CivicrmEntityAccessHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Access\AccessResult;

class EventAccessControlHandler extends CivicrmEntityAccessHandler {

  /**
   * {@inheritdoc}
   */
  protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
    //Custom logic to grant access

    return parent::checkAccess($entity, $operation, $account);
  }

}

```
> 0 votes

---
Tags: drupal, civicrm-entity, entity-reference
---


# Question
Title: Is it safe to assign "Edit all events" to non-admin users?
Drupal gives me only one choice in its listing of CiviCRM permissions to assign to a Drupal role related to the editing of CiviEvents, namely "**Edit all events**". I'm nervous assigning this permission and would rather restrict the permission to "**Edit *own* events**."

Other CiviCRM functions show the normal sequence of permissions which include ones like "Edit own manual batches." Is it safe to assign "Edit all events" to non-admin users?

# Answer
> 2 votes
It depends on the context and the definition of non-admin users.

If, for example, your context is a small organisation with a small number of users I would say it is safe to do so. You could generally agree with each other that everybody is responsible for the events they have created which is usually the case anyway.

But if you have hunderds of users who might edit other events the it might be something which is not really helpfull for your situation. Then you might think about other solutions for creating and managing events because manage own events is missing from the permission settings.

# Answer
> 2 votes
It really depends on your specific circumstance. Do you trust the users that will be editing these events? If not, then No.

If your website has open registration, certainly don't assign that permission to the default Drupal role. It would be helpful to know more about your use case.

If you NEED an "edit own events" permission, it wouldn't be too difficult to create that permission with just a little PHP.

# Answer
> 2 votes
For Drupal 9/10, you need to add an event handler, something like

```
function mymodule_entity_type_build(&$entity_info) {
  if (isset($entity_info['civicrm_event'])) {
    $entity_info['civicrm_event']->setHandlerClass('access', 'Drupal\mymodule\Access\EventAccessControlHandler');
  }
}

```

And add a new handler class at `src/Access/EventAccessControlHandler.php`

```
<?php

namespace Drupal\mymodule\Access;

use Drupal\civicrm_entity\CivicrmEntityAccessHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Access\AccessResult;

class EventAccessControlHandler extends CivicrmEntityAccessHandler {

  /**
   * {@inheritdoc}
   */
  protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
    $eventId = $entity->id();

    // Check if this event is created by the logged in user.
    $isOwner = \Civi\Api4\Event::get(FALSE)
      ->addWhere('created_id', '=', 'user_contact_id')
      ->addWhere('id', '=', $eventId)
      ->execute()
      ->count();
    if (!empty($isOwner)) {
      $permissions = ['edit my events']; // New custom permission added in permissions.yml
      return AccessResult::allowedIfHasPermissions($account, $permissions, 'OR');
    }

    return parent::checkAccess($entity, $operation, $account);
  }

}

```

---
Tags: civievent, drupal, permissions
---


title: 5.71.1 for Wordpress doesn't download

text:
# Question
Title: 5.71.1 for Wordpress doesn't download
I'm on Civi 5.50.1 on two different sites and should really upgrade. As Civi gets more complex, my fear of upgrading goes up. Seems like more problems every time. Anyway, problem right off the bat. It won't let me download 5.71.1-wordpress.zip. It starts the download and just sits there. 5.71.0 downloads just fine.

UPDATE: I upgraded to 5.71.0. It went fine, but I can't send email blasts now. CiviMail Components Settings is showing an error:  Line 37: echo smarty\_function\_help(array('id'=\>$\_smarty\_tpl-\>tpl\_vars\['fieldSpec'\]-\>value\['help'\]\['id'\],'file'=\>$\_smarty\_tpl-\>tpl\_vars\['fieldSpec'\]-\>value\['help'\]\['file'\]),$\_smarty\_tpl);

Thanks for any help...

# Answer
The inability to download 5.71.1 seemed to be a one-day glitch. Regarding the upgrade, I ended up having to start over. Upgraded to 5.70.2, but still having problems ;-(
> 1 votes

---
Tags: wordpress, upgrade
---


# Question
Title: Populate a Contribution form custom field from a URL parameter
I know I can do it using `civicrm_buildForm` but I don't know:

* How to get the custom field
* How to set the value to this field

# Answer
You can do something like below you can use API4 to get the exact machine names

civicrm/api4#/explorer/CustomField/get?select=%5B"id"%5D&where=%5B%5B"name","%3D",""%5D,%5B"custom\_group\_id:name","%3D",""%5D%5D&limit=0&checkPermissions=0&\_index="0"

```
function extname_civicrm_buildForm($formName, &$form) {
  if ($formName == 'CRM_Contribute_Form_Contribution_Main') {
    if (isset($_GET['custom_59'])) {
      $customFieldId = \Civi\Api4\CustomField::get(FALSE)
        ->addSelect('id')
        ->addWhere('name', '=', 'is_eligible')
        ->addWhere('custom_group_id:name', '=', 'gift_aid')
        ->execute()
        ->first()['id'] ?? NULL;
      if (!empty($customFieldId)) {
        $form->setDefaults([
          'custom_' . $customFieldId => $_GET['custom_59'],
        ]);
      }
    }
  }
}

```
> 4 votes

---
Tags: wordpress, contribution-page, hooks
---


# Question
Title: Why is my report including the column names before every row?
I am using CiviCRM 5.71.1 with Wordpress. I created a report using the Constituent Report (Detail) template. The issue is that the report repeats the column names before every row of data. Why is it doing this and how can I fix it so that the column names do not repeat?

Thanks in advance for any help.

# Answer
> 0 votes
OK, I used the Constituent Report (Summary) template instead and that gave me the results I needed. I guess I got confused by the names of the templates, assuming that a "Summary" would not give me the individual results.

---
Tags: wordpress, civireport
---


# Question
Title: Recurring contributions - line items - quantity set equal to amount, should be 1
I think I've found a bug with recurring contributions in 5.71.1. Reproducible in sandbox running 5.73.alpha1.

1. Create a recurring contribution for $15
2. View the contribution created

Should see line item that says Quantity = 1, Amount = $15.

But I see Quantity = 15, Amount = $15.

# Answer
I had reproduced this issue on a sandbox, but after prompting by @jitendra-fuzion I'm now unable to reproduce this on either the sandbox I used or the Demo Jitendra suggested. The issue must be with my local configuration.
> 0 votes

---
Tags: recurring-contributions, line-items
---


# Question
Title: In a data export how can I only include the country name if not the local country?
I'm exporting address data to a CSV file that will subsequently be used to produce postal mailing labels by a third party mailing house. I want to suppress the inclusion of the country name, but only for records where the country is not my local country.

I've noted that the Fuzion Tokens extension can do this when, for example, producing mailing labels directly from Civi, but that's not my workflow.

Feels like the sort of thing Searchkit should be able to do?

# Answer
> 3 votes
You can use Smarty in Search kit using 'Rewrite text' and use the below snippet

```
{if [address_primary.country_id] neq 1228}
 [address_primary.country_id:label]
{/if}

```

The above code will not display the Country name if it's not 1228(US). You will need to replace the 'address\_primary.country\_id' with actual token generated from the searckit.

HTH

Pradeep

---
Tags: export, searchkit
---


# Question
Title: Accordions labels on New contact, Adv search and View contact are hidden
Since CiviCRM upgraded to 5.71 the accordion labels are not displaying making our users difficult to use. All the extensions are on the latest version, do not see any error messages on the browser console. Any help really appreciated

# Answer
> 5 votes
Looks like you have Shoreditch extension installed on your website. There have been lots of changes happened recently in CiviCRM for accordions, the extension maintainer will need to fix the styling code.

Alternatively, you can use The island theme which is a forked version of Shoreditch extension and is maintained actively. The accordion is fixed in the latest code which is yet to released but you could apply the patch to make it work of latest available version

```
wget https://lab.civicrm.org/extensions/theisland/-/archive/2.3.1/theisland-2.3.1.zip

unzip theisland-2.3.1.zip

cd theisland-2.3.1/css

rm custom-civicrm.css

wget https://lab.civicrm.org/extensions/theisland/-/raw/main/css/custom-civicrm.css

```

---
Tags: contact-view
---


title: Deprecated permission message

text:
# Question
Title: Deprecated permission message
Have been seeing this message recently quite a lot in our drupal log. Anything we need to worry about?

```
[PHP User Deprecation] Permission 'administer CiviDiscount' should be declared with 'label' and 'description' keys. See                                                                 [notice]
https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/ Caller: CRM_Core_Permission::assembleBasicPermissions Error.php:1129 [4.61 sec, 94.5 MB]

```

# Answer
Its a warning message for now but soon it will be a fatal error or permission won't respected if not handled as per coding standards.

The above warning is from Civi Discount extension and it has been fixed recently.

You can either apply the patch or wait for a release.

HTH

Pradeep
> 2 votes

---
Tags: deprecated
---


# Question
Title: How do I update CiviCRM on wordpress? ( currently on 5.38.0 )
I am using a very outdated version of CiviCRM ( 5.38.0 ) and I'm totally clueless with how to update it.

It says system status is critical and that I should upgrade to latest version (5.71.1 ), but it just links me to download a zip folder from their website and I have no idea what to do form there as I'm finding the instructions too complicated. Can you help me in simple, easy to follow instruction?

It also says cron is not running and i'm unsure how to run it...

# Answer
> 0 votes
You can find details of how to upgrade in the SysAdmin guide:

https://docs.civicrm.org/sysadmin/en/latest/upgrade/wordpress/

---
Tags: wordpress, upgrade
---


# Question
Title: Adding Contacts to Group from an Activity Report doesn't work on Joomla! 4?
I see the possibility of adding contacts to a group from an activity report. After posting the list, I select the group from the drop-down menu on the right, I have to confirm by clicking Next and then a confirmation message appears at the top right. But when I display the band, I see no added contact.

I activate the debug mode but I cannot see any error message. Where can I find system logs or something?

I use CiviCRM 5.71.1 with Joomla!4

Secondary question: in a CiviCRM instance with Joomla! 4, I see this possibility of adding contacts to a group from an activity report. In another instance, I don't see it. How to activate it?

Thanks in advance for any help.

# Answer
You can find details about where to find the system logs in the SysAdmin guide:

https://docs.civicrm.org/sysadmin/en/latest/troubleshooting/#review-the-civicrm-log
> 0 votes

---
Tags: joomla, civireport, activities
---


# Question
Title: How to I curtail bots from bypassing the reCAPTCHA test we use on the sign-up page for our newsletter?
We have a Profile that collects email addresses from new users and (after the user receives our confirmation email and confirms their email address to us) the Profile adds the user to a Group which we use for our newsletter distribution. reCAPTCHA v2 is enabled on the Profile but CiviCRM is creating a lot (hundreds) of bogus new Contacts every day. (The new Contacts are not added to the Group because they don't respond to our confirmation email.) How to we stop/curtail bots from bypassing the reCAPTCHA test? CiviCRM 5.66.0, WordPress 6.4.3

# Answer
Try installing the Form Protection extension, which gives you additional measures to prevent abuse/bots, including Honeypot, Flood control, & ReCAPTCHA v3.
> 1 votes

---
Tags: profile
---


# Question
Title: Send email through Google Workspace with Oauth
## Summary

Is Oauth authentication method supported to use Google as smtp server for outbound Civimail ? With recent Google announcement, I fear our Civimail setup will be broken in September 2024

## Detailed reasons for the question

1. As per this google announcement, starting next June 2024, Oauth method will be mandatory to use Google as smtp server for Civicrm :

*Google Workspace will no longer support the sign-in method for third-party apps or devices that require users to share their Google username and password. This antiquated sign-in method, known as Less Secure Apps (LSAs), puts users at an additional risk since it requires sharing Google Account credentials with third-party apps and devices that can make it easier for bad actors to gain unauthorized access to your account. Instead, you’ll need to use the option to Sign-In with Google \[..\]. Sign-in with Google leverages industry standard and more secure **OAuth** method of authentication*

2. We use our Google Workspace account as smtp relay in civicrm
3. We have Oauth client extension enabled. Demerit wrote there in August 2021 : *"In Civi at the current time OAUTH is only available for fetching mail/bounces, not sending mail"*

# Answer
At the bottom of that article it says another alternative is https://support.google.com/mail/answer/185833. Oauth would be better, but you can use app passwords in the meantime.
> 1 votes

---
Tags: civimail, smtp, google, oauth
---


# Question
Title: Memberships - Receipt (on-line): multiple "amount" rows under Membership Fee
The "Memberships - Receipt (on-line)" template, the code below causes 3 "amount" rows and a Membership Type label doesn't seem to be shown, also there is no "Membership Type" token available for the template. A bug perhaps?

*CiviCRM 5.70.2 - 5.71.1, Wordpress.*

```
      {foreach from=$lineItems item=line}
      <tr>
        <td {$labelStyle}>
          {if $line.membership_type_id}
            {ts 1="{membership.membership_type_id:label}"}%1 Membership{/ts}
          {else}
            {ts}Contribution Amount{/ts}
          {/if}
        </td>
        <td {$valueStyle}>
          {$line.line_total_inclusive|crmMoney:'{contribution.currency}'}
        </td>
      </tr>
    {/foreach}

```

# Answer
Had to make a few template changes. Line 80:

```
 {foreach from=$lineItems item=line}
      <tr>
        <td {$labelStyle}>
         {if {membership.membership_type_id}}
               {ts 1=$line.label} %1 {/ts}
          {else}
            {ts}Contribution Amount{/ts}
          {/if}
        </td>
        <td {$valueStyle}>
          {$line.line_total_inclusive|crmMoney:'{contribution.currency}'}
        </td>
      </tr>
    {/foreach}

```

Line 168:

```
{ts}Total Amount{/ts}

```

Now it looks right (changes highlighted in green) - both membership Type label and an Optional Donation label, plus, the "Amount" becomes the "Total Amount".

Would've supposed a patch, but the template here https://lab.civicrm.org/dev/core/-/blob/master/xml/templates/message\_templates/membership\_online\_receipt\_html.tpl?ref\_type=heads has totally different code so, perhaps, is not the right place.
> 0 votes

---
Tags: civimember, message-templates, receipts
---


# Question
Title: How do I automatically check the autorenewal option by default on a membership contribution page?
We're running on Drupal 7.69 and Civi 5.13.x.

Is there a way to have the option to autorenew ticked by default through configuration?

See image below:

# Answer
> 2 votes
For a site using CiviCRM profiles you can opt to use Joinery's Profile Conditionals extension and adapt the conditions to which you want this behavior to occur.

For it be checked with any price field selected, an example is below:

```
<?php

$civicrm_setting['com.joineryhq.profcond']['com.joineryhq.profcond']['contribution']['all'] = array(
          '01_auto_renew_is_checked' => array(
            'conditions' => array(
              'all_of' => array(
                array(
                  'selector' => 'input[name="price_7"]',
                    'op' => 'is_checked',
                    ),
                  ),
                ),
                'states' => array (
                  'pass' => array (
                    'selectors'  => array(
                      'input#auto_renew[type="checkbox"]' => array (
                        'properties' => array('checked' => TRUE),
                      ),
                    ),
                  ),
                  'fail' => array (
                    'selectors'  => array(
                      'input#auto_renew[type="checkbox"]' => array (
                        'properties' => array('checked' => FALSE),
                      ),
                    ),
                  ),
                ),
              ),
            );

```

Change out the price field (price\_7) with yours. There are many ways to change the conditions based on your use case, you can find instructions on those options here.

I put this in it's own `profcond.settings.php` file in case you make a syntax error and want to quickly deactivate the conditionals to prevent it from breaking CiviCRM. Add `include __DIR__ . '/profcond.settings.php';` to `civicrm.settings.php` file for this setup.

Also noting that recently there was a change in core that displays / unchecks the "Please renew my membership automatically" option when selecting a price option so using the "onload" option exclusively no longer works (tested 5.65 where that last worked).

# Answer
> 1 votes
Unless things have changed I believe this requires a customisation. We did one a while back. I will check what effort is involved in getting it extracted in to an extension if there is not one 'out there'.

---
Tags: civicontribute, contribution-page, recurring-contributions, auto-renew, condition
---


title: Fatal error after upgrade

text:
# Question
Title: Fatal error after upgrade
I had a working instance of Civicrm on my Joomla 3 site. Now I updated to Joomla 4. I don't think I should have had to update Civicrm, but I was getting a 500 error for Civicrm. Therefore I followed the usual update procedures going from 5.63 to 5.71.1.

The database update generated a 500 and turning error reporting on I am getting

```
Warning: file_put_contents(xxxx/media/civicrm/templates_c/CachedExtLoader.bba06b40bfffc98f82be5c6c2465da63.php): Failed to open stream: No such file or directory in xxx/administrator/components/com_civicrm/civicrm/CRM/Extension/ClassLoader.php on line 86

Fatal error: Declaration of Civi\Api4\CaseContact::getEntityTitle($plural = false) must be compatible with Civi\Api4\Generic\AbstractEntity::getEntityTitle(bool $plural = false): string in /xxxx/administrator/components/com_civicrm/civicrm/Civi/Api4/CaseContact.php on line 26

```

(as well as a bunch of deprecation messages).

The only thing I see on the upgrade instructions is the possibility of deleted files. Does anyone else have a clue?

I am on php 8.2.16 which is also a change with the update to Joomla 4.

# Answer
A ton of files were moved into core extensions in 5.64. It sounds like you still have the originals in the original places. I would replace your civi folder with a fresh copy.
> 1 votes

---
Tags: upgrade, joomla
---


title: guzzle and symfony errors - WordPress

text:
# Question
Title: guzzle and symfony errors - WordPress
I've been getting a persistent guzzle error since Civi version 5.5x, and I now realise there's also some weird permission error and am wondering if this is related.

I'm on the latest versions of WordPress and CiviCRM, running PHP8.1 (though I only just upgraded PHP, hoping it would fix this - these errors appeared on PHP7.4). All extensions are up to date.

The Guzzle error appears in the system status console:

> **Guzzle client error**: Could not load a clean page to check

I have checked previous questions about guzzle. I upgraded to composer version 2 and ran `composer require guzzlehttp/guzzle:'^7'` but this has not resolved the problem.

I also noticed today an issue that may or may not be related. When I run `wp theme list` it throws a PHP error:

```
PHP Warning:  file_put_contents(/var/www/html/wp-content/uploads/civicrm/templates_c/CachedExtLoader.b16e0079d1aac6538c9e131b852f3532.php): Failed to open stream: Permission denied in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 87
Warning: file_put_contents(/var/www/html/wp-content/uploads/civicrm/templates_c/CachedExtLoader.b16e0079d1aac6538c9e131b852f3532.php): Failed to open stream: Permission denied in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 87
PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "/tmp/CachedCiviContainer.b16e0079d1aac6538c9e131b852f3532.phpa71jfv" to "/var/www/html/wp-content/uploads/civicrm/templates_c/CachedCiviContainer.b16e0079d1aac6538c9e131b852f3532.php". in /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php:290
Stack trace:
#0 /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php(696): Symfony\Component\Filesystem\Filesystem->rename()
#1 /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/config/ResourceCheckerConfigCache.php(124): Symfony\Component\Filesystem\Filesystem->dumpFile()
#2 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/Core/Container.php(84): Symfony\Component\Config\ResourceCheckerConfigCache->write()
#3 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/Core/Container.php(684): Civi\Core\Container->loadContainer()
#4 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php(87): Civi\Core\Container::boot()
#5 /var/www/html/wp-content/plugins/civicrm/includes/civicrm.admin.php(434): CRM_Core_Config::singleton()
#6 /var/www/html/wp-content/plugins/civicrm/civicrm.php(972): CiviCRM_For_WordPress_Admin->initialize()
#7 /var/www/html/wp-content/plugins/civicrm/civicrm.php(794): CiviCRM_For_WordPress->initialize()
#8 /var/www/html/wp-content/plugins/civicrm/civicrm.php(767): CiviCRM_For_WordPress->register_hooks_clean_urls()
#9 /var/www/html/wp-content/plugins/civicrm/civicrm.php(651): CiviCRM_For_WordPress->register_hooks_common()
#10 /var/www/html/wp-includes/class-wp-hook.php(310): CiviCRM_For_WordPress->register_hooks()
#11 /var/www/html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#12 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action()
#13 /var/www/html/wp-settings.php(632): do_action()
#14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1349): require('...')
#15 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1267): WP_CLI\Runner->load_wordpress()
#16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#17 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process()
#18 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#19 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#20 /usr/local/bin/wp(4): include('...')
#21 {main}
  thrown in /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php on line 290
Fatal error: Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "/tmp/CachedCiviContainer.b16e0079d1aac6538c9e131b852f3532.phpa71jfv" to "/var/www/html/wp-content/uploads/civicrm/templates_c/CachedCiviContainer.b16e0079d1aac6538c9e131b852f3532.php". in /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php:290
Stack trace:
#0 /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php(696): Symfony\Component\Filesystem\Filesystem->rename()
#1 /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/config/ResourceCheckerConfigCache.php(124): Symfony\Component\Filesystem\Filesystem->dumpFile()
#2 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/Core/Container.php(84): Symfony\Component\Config\ResourceCheckerConfigCache->write()
#3 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/Core/Container.php(684): Civi\Core\Container->loadContainer()
#4 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php(87): Civi\Core\Container::boot()
#5 /var/www/html/wp-content/plugins/civicrm/includes/civicrm.admin.php(434): CRM_Core_Config::singleton()
#6 /var/www/html/wp-content/plugins/civicrm/civicrm.php(972): CiviCRM_For_WordPress_Admin->initialize()
#7 /var/www/html/wp-content/plugins/civicrm/civicrm.php(794): CiviCRM_For_WordPress->initialize()
#8 /var/www/html/wp-content/plugins/civicrm/civicrm.php(767): CiviCRM_For_WordPress->register_hooks_clean_urls()
#9 /var/www/html/wp-content/plugins/civicrm/civicrm.php(651): CiviCRM_For_WordPress->register_hooks_common()
#10 /var/www/html/wp-includes/class-wp-hook.php(310): CiviCRM_For_WordPress->register_hooks()
#11 /var/www/html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#12 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action()
#13 /var/www/html/wp-settings.php(632): do_action()
#14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1349): require('...')
#15 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1267): WP_CLI\Runner->load_wordpress()
#16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#17 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process()
#18 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#19 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#20 /usr/local/bin/wp(4): include('...')
#21 {main}
  thrown in /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php on line 290
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

```

This looks like a permissions error but as far as I can tell everything is correct: `www-data` owns everything, with `rw-r--r--` on all files and `rwxr-xr-x` on all directories in the path.

Any help with troubleshooting this would be greatly appreciated.

# Answer
You have a plugin or CiviCRM extension using a newer version of the Guzzle package. I had a similar issue with LMS plugin so I replaced the guzzle package in CiviCRM with a newer version.
> 1 votes

# Answer
Same issue on recent version of CiviCRM

```
No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle7-adapter".

```

Looking in the ext/ folder I get this result

```
[root@domain]# grep -r Guzzle  | cut -f 3 -d '/' | sort | uniq
composer
geocoder-php
intervention
php-http
phpunit
psr7": "Used with Guzzle PSR-7 Factories",
Ses
Uplang
Utils

```
> 0 votes

---
Tags: wordpress, composer, php8, symfony, guzzle
---