title: Error after fresh installation

text:
# Question
Title: Error after fresh installation
CiviCRM first-time user here, trying to install on a system with the following specs:

* Host: Hostgator shared hosting
* CMS: WordPress 5.7.2
* Database client version: libmysql - 5.6.43
* PHP version: 7.3.28

I downloaded civicrm-5.39.0-wordpress.zip from the CiviCRM website and uploaded using the WordPress plugin-install.php tool. Success.

It loads right into the CiviCRM Installer. There was one warning which appeared to have an optional fix - it suggested something about switching over to utf8mb4. I ignored that because it said the installation should still work. I selected the base option I wanted - no sample data, membership module only.

After the installer ran, I was taken to a screen within WordPress that said there was a critical error and I should check the site admin email inbox. I'm not the site admin, so I checked the error log via File Manager and pulled this out:

```
PHP Warning:  Invalid argument supplied for foreach() in /home3/jmaurer/public_html/wp-content/plugins/civicrm/civicrm/Civi/Core/SettingsBag.php on line 354

```

I refreshed the page with the "critical error" message and this is what was displayed:

```
Initialization Error

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'jmaurer_mcoanew.civicrm_setting' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'jmaurer_mcoanew.civicrm_setting' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'jmaurer_mcoanew.civicrm_setting' doesn't exist]"]

```

I deactivated the plug-in via File Manager so at least the site is back up and running, but I'm at a loss as to what's causing this installation issue. Help!?!?

# Answer
> 4 votes
This has been discussed at chat.civicrm.org so just updating this question with that conversation.

The MySQL requirements for CiviCRM are:

**MySQL 5.7.5+ or MariaDB 10.0.0.2+**

The full CiviCRM hosting requirements can be found Here

Or you can have a conversation with one of the many partners to discuss hosting your CiviCRM. Partners Hosting

# Answer
> 2 votes
I think an answer is needed here that says something like 'it is not recommended to try hosting with low spec shared hosting such as hostgator or bluehost'

Some documentation here

# Answer
> 1 votes
Welcome to Stack Exchange and CiviCRM!

The fact that `civicrm_setting` is missing from your database suggests that something went wrong during installation and the data wasn't loaded into the database at all. If you have access to view the database, check to see if any tables at all are installed. You may also get real-time help at https://chat.civicrm.org if folks are around.

---
Tags: wordpress, error, installation
---


title: CiviCRM not recognizing bounces

text:
# Question
Title: CiviCRM not recognizing bounces
I tried sending emails using mass email which included wrong address. So CiviCRM was supposed to put those bad emails on bounces but it wasn't working. I have already added an mail account for bounce handling in CiviCRM Mail Accounts and have enabled bounce processing for scheduled jobs. How can i solve it ?

# Answer
Assuming that you have correctly added an mail account for bounce handling in CiviCRM Mail Accounts and have enabled bounce processing for scheduled jobs (you said you had so that bit was more to help others who find this answer) then I hope some of below helps

1. ensure the email account accepts ‘plus addressing’
2. go to your bounce inbox and confirm the email is there
3. confirm the email is not in you spam folder in that mail account
4. if it is in spam (or can't be found) then ensure that the email account being used has a rule set up to ensure this does not happen and/or that the settings for the account do not preclude spam from showing in the folders (from memory MS accounts have an 'upstream' setting that can affect access to the Junk folder)
5. check the log for the Fetch Bounce scheduled job
6. ensure the civicrm Mail Account settings are using the correction option for POP v IMAP etc
7. add more info to your Question about what type of mail account it is
> 2 votes

---
Tags: email, bounce, bounce-processing, inbound-email
---


# Question
Title: Price item reordering behaving erratically
Today while adding price items to an existing price set, I find that neither clicking the the reorder arrows nor updating the order text field is saving the item order properly. When you try to reorder an item using the arrows, it either moves to the wrong place or does not move it at all. If you try to change it using the order text field, it does not save or randomly displaces the item that already used that number, instead of shifting it down one. I was able after many attempts to get the correct order by clicking the bottom arrow for each misplaced item, and then moving it up from there.

We are using CiviCRM 5.33.5 on Drupal 7.8.1. A recent change that may be relevant was an upgrade this month of PHP to 7.3.29 from 7.2.18. Any ideas on what is causing this behavior? Thanks!

# Answer
> 3 votes
If you have access to the db then you may want to look in the table. you may find lots of price items with the same weight. altering in the db should be safe and may fix the issue for you

if you do not have access to the db then you may find that you can sort out the problem of multiple items having the same weight value though it may take several rounds of jiggling.

---
Tags: price-sets
---


# Question
Title: On drupal I have installed civicrm module.I want to show civicrm contact on drupal view.I have created a view for it, but it is not displaying contact
on drupal, I have installed CiviCRM, view module. I want to display a CiviCRM contact on drupal view. for that, I have created a view for CiviCRM contact, but on view, it is not showing CiviCRM contact. can anyone help me

# Answer
Have you added CMS integration in your drupal settings.php?
> 2 votes

---
Tags: drupal-views, civicrm-contact
---


# Question
Title: Best (api4) way to chain save a contact so that the email updates, without creating a new one?
Using civicrm api4, what's the best way to chain save a contact so that the email updates, without creating a new one?

For example, I want to update this existing contact:

```
entity: Contact, action: get, version: 4, count: 1
(1) [
  {
    "id": 2,
    "first_name": "Michael",
    "email.email": "cio@agloa.org"
  }
]

```

... to have first\_name: "Mike" and email: "mike@agloa.org". So, I tried:

```
crmApi4('Contact', 'save', {
  records: [{"id":2, "first_name":"Mike"}],
  chain: {"name_me_0":["Email", "save", {"records":[{"contact_id":"$id", "email":"mike@agloa.org"}]}]}
})

```

That correctly updates the first name, but *creates* a new email:

```
entity: Contact, action: get, version: 4, count: 2
(2) [
  {
    "id": 2,
    "first_name": "Mike",
    "email.id": 2,
    "email.email": "cio@agloa.org"
  },
  {
    "id": 2,
    "first_name": "Mike",
    "email.id": 11,
    "email.email": "mike@agloa.org"
  }
]

```

How can I get it to simply update the existing email?

# Answer
> 2 votes
I got what I needed by including the email id (**"id":2**) in the records chain property:

```
crmApi4('Contact', 'save', {
  records: [{"id":2, "first_name":"Mike"}],
  chain: {"name_me_0":["Email", "save", {"records":[{"contact_id":"$id", "email":"mike@agloa.org", "id":2}]}]}
})

```

---
Tags: chaining, apiv4
---


# Question
Title: Turn Off Auto-Renewal For a Specific Member
I was sure I knew how to do this but now I am not finding the solution so I apologize if this is right in front of me. We have memberships that we want people to have auto-renewal for but sometimes we need to turn it off for a specific member. I do not see a way to turn off auto-renew from the admin interface for a single member.

I know it is on for the member because I see this:

This is what I see if I edit the member:

Any help with this is greatly appreciated.

Thanks!

# Answer
If a membership is auto-renew than it should be linked to recurring contribution(See under contribution tab \>\> recurring tab).

To turn off auto-renew for a membership, you can either

1. Cancel the recurring, that should cancel ongoing recurring payment and also membership renewal
2. Run Below query to only turn off membership renewal

Sql:

```
UPDATE civicrm_membership SET contribution_recur_id = NULL WHERE id = 123;

```

HTH

Pradeep
> 2 votes

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


# Question
Title: CiviCRM Break After Upgrade to Drupal 9.2
I upgraded to Drupal 9.2 in my development environment from Drupal 9.0. We had no problems with this upgrade. However, we have moved the upgrade into our production environment and now we are of course had problems ;).

The CiviCRM menu no longer loads and we get "Unable to reach the server. Please refresh this page in your browser and try again."

Looking at DevTools I see that CiviCRM is doing a GET for "civicrm-placeholder-url-path?code=Eq4nyhc3&locale=en\_US&cid=67722" and POST to "/civicrm-placeholder-url-path". Both of these yield 404s.

I have tried cache resets, menu resets, opcache resets, a server restart, but I get the same thing.

I tried upgrading CiviCRM to a newer version but there are composer conflicts that I need to try and work through.

Any help is greatly appreciated.

Thanks!

# Answer
I resolved this by upgrading to CiviCRM 5.39.0. There were a couple of conflicts with libraries with Drupal modules but nothing we could not live without.
> 2 votes

---
Tags: menu, drupal-9
---


# Question
Title: CiviRules for adding tag to contact do not work
I am using CiviCRM 5.39.0 and CiviRules 2.29 (so pretty up to date) but I have no success to implement a rule in CiviRules for adding a tag to some contact when the total amount of his contributions is greater that 0.

After entering the contribution, the system saves the contribution, but when I edit the corresponding rule, I see the rule has not been triggered and the tag is not applied, even after waiting a while.

I tried with a delay and without any delay. The rule is enabled and the cron jobs are running. I am eager to know if I misconfigured something or if this is a bug.

# Answer
This Rule seemed to work fine but perhaps it misses a nuance you need:

* Contribution is added
* Linked Condition(s)
* Condition = Total Contributed Amount
* Description = Total amount all time (with status: Completed) \>= 1
* Linked Action(s) = Add Tag to Contact = Volunteer

(The above will be viewable at https://dmaster.demo.civicrm.org/civicrm/civirule/form/rule?reset=1&action=update&id=1 for a few hours till that site gets rebuilt)
> 1 votes

---
Tags: civirules
---


# Question
Title: Random Additional LineItem appearing in a membership sign up form
3 Additional LineItems have just been spotted in one of our membership sign up forms (for organisations) - though they have never been set up (I don't know how such things would be set up), and don't appear on any settings page. The amounts section is no enabled for the contribution page (because it is being used for memberships).

Does anyone have any ideas how this is happening, and how we might remove them?

Frontend

Backend

# Answer
> 1 votes
You may need to run below query to disable the field so that they don't appear on screen. Deleting the field is little risky as you may end up creating screwing financial data.

```
UPDATE civicrm_price_field cpf
INNER JOIN civicrm_price_set_entity cpse
  ON cpse.entity_table = 'civicrm_contribution_page'
    AND cpse.price_set_id = cpf.price_set_id
    AND cpf.html_type <> 'Radio'
    AND cpse.entity_id = 4
SET cpf.is_active = 0;

```

Note: Replace 4 with contribution/membership page id.

---
Tags: civicontribute, civimember, line-items
---


# Question
Title: Looking for a description to add honeypot fields to the "Contact Form"
We have unlike may others no spam problems with contributions, however the spam entry via the contact for got annoying. As well there is no problem with joomla-profile generation as this functionality is disabled.

The "contact form" profile has reCaptcha V2 enabled, however a specific spam bot network seems to be able to emulate human interaction. I say specific as the entries are similar and point to a specific source. I/P blocking does not work as I/P is changing, so I look for other solutions for our NGO.

I found no hint how to add a profile field whose result can be compared with a given value to prevent the form from being sent if false.

I found some honeypot instructions for contribution forms, but are not aware what files need to be modified for the contact form and how such coding may interact with update mechanisms. (over-writing)

So, if you have a tip, I will be glad to follow. Thank you.

# Answer
> 3 votes
I believe you have found this honeypot extension. (According to the documentation this one could be used for protecting the contribution forms.)

As far as i see, it uses hooks for extending the from and validation logic. It implements the build form hook here and the validate form hook here.

If i understand you well, you want to protect the profile forms with the honeypot solution.

The profile form is build in a different way, so that the hooks above can not be used here. Instead of them the build profile and validate profile hooks are triggered, so that you should implement them.

The civihoneypot extension provides a settings page where you can select the forms that you want to protect. I believe this settings form has to be extended also to be able to select profiles. The setting form is constructed here. I think the only thing that needs to be done here is adding a new entityref for uf\_groups (those are the profiles), and the advcheckbox for the select all feature.

I hope it helps you.

# Answer
> 2 votes
In summary (i think) the honeypot extension currently works with Contribution pages. This pull extends it for Membership and Event pages, but does not yet work with standalone Profiles. The extension developers may welcome funding to add such a feature

---
Tags: profile, spam
---


# Question
Title: How to search for people not in any groups
I am trying to find people who are not in any groups (both regular and smartgroups) If I use Search Builder, search for contacts where GROUP is empty or is null it returns people who have no regular groups but who are in smartgroups

If I use Search Kit there is no obvious way to do the search

Would love some ideas as to how to solve this.

# Answer
You could use the Custom search include/exclude? Thats normally the way I would try to find everyone who is not in a group/segment.
> 2 votes

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


# Question
Title: Line wrapping - breaking lines longer than 998 characters - in CiviCRM (CiviMail, Flexmailer, Mosaico)
We've have experienced in some cases on emails sent from CiviCRM the DKIM signatures were getting invalid. We use a self-managed email server for this, and usually DKIM is fine.

After some research I found out the reason why was DKIM broken (and why not always) is that if we send an email with a line containing more than 998 characters - which can happen easily by using email template editors (Mosaico in our case) - first the message is signed by OpenDKIM, then Postfix break lines longer than 998 chars (number of chars can be configured) to conform with SMTP protocol, which doesn't allow more than 1000 chars (998 chars + `\r\n`) in a single line. Then DKIM verification will fail as there are extra characters (line breaks) in the email body.

It would be best if the order could be changed (first line breaking then signing), but as far I as know milter applications (like OpenDKIM) can be plugged into Postfix only to the early stages of processing (`smtpd` or `cleanup`) and line breaking happens at the last stage (`smtp`).

Further testing showed, if I send a mail with this long lines from another email client (Roundcube) to the same server, long lines are already wrapped before signature. Also tested traditional CiviMail and Flexmailer and they gave the same results as with Mosaico.

This led me to think that wrapping long lines should be handled by clients (CiviCRM in this setup). So we wrote a simple extension to handle this (https://github.com/reflexive-communications/civalpa) and the issue seems solved.

My questions would be:

* Has anybody run into this issue? One thing that is very strange for me, I've not found too much material but one which seemed quite relevant (https://www.virtualmin.com/node/37021), and that also suggested line wapping should happen before sending to the SMTP server.
* Lien wrapping should really be handled by clients or is this a configuration issue on the mail-server?

Related versions:

* CiviCRM: 5.29.1
* Mosaico form CiviCRM: 2.5
* Postfix: 3.4.13
* OpenDKIM: 2.11.0

Thanks

UPDATE: there is now an issue in Civi core regarding this.

UPDATE2: it turned out, this is already fixed in core (as a patch). On Drupal 8 you need to enable patching for this to work. (put `"enable-patching": true` to the extra section of `composer.json` and install the `patch` tool.)

# Answer
> 2 votes
According to this comment in the PR it has been fixed since version 5.29. Not in the codebase directly, but with a composer patch to the pear mail\_mime package. It wraps the email content after 750 characters.

---
Tags: civimail, mosaico, flexmailer
---


# Question
Title: "Could not find a valid session key." when making a contribution
Error: "Error type: Could not find a valid session key."

This is similar to a number of other times people have run into this problem, but I've looked through all of those here on StackExchange, have tried those things, and have not found any luck yet.

When donating via a contribution page, receive an HTTP 500 error instead of the thank-you page and thank-you email receipt. The contribution record is logged into the database, but the website can't go to the right page because the session key is invalid. It is going to https://example.org/civicrm/?page=CiviCRM&q=civicrm/contribute/transact

This used to work fine. Recently moved to new server, updated civicrm.settings.php and the Directories and Resource URLs pages appropriately.

Any ideas? Am I missing something really obvious?

I could always go up to Stripe 5.2 and CiviCRM 5.3, but was hoping to be able to fix it in this version.

---

Cookies are enabled in the browser. Have reproduced in 2 browsers and on 2 machines.

Error details:

Feb 05 16:07:33 \[info\] $Fatal Error Details = Array ( \[message\] =\> We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.\<br /\>\<br /\>Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.\<br /\>\<br /\>Error type: Could not find a valid session key. \[code\] =\> )

Feb 05 16:07:33 \[info\] $backTrace = /home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(833): CRM\_Core\_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...")

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(853): CRM\_Core\_Controller-\>invalidKeyCommon()

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Controller/Contribution.php(74): CRM\_Core\_Controller-\>invalidKeyRedirect()

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(312): CRM\_Contribute\_Controller\_Contribution-\>invalidKey()

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(204): CRM\_Core\_Controller-\>key("CRM\_Contribute\_Controller\_Contribution", TRUE, FALSE)

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Controller/Contribution.php(55): CRM\_Core\_Controller-\>\__construct("CiviContribute", "null")

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(304): CRM\_Contribute\_Controller\_Contribution-\>\__construct("CiviContribute", TRUE, "null", NULL, "false")

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

/home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

/home/example/public\_html/wp-content/plugins/civicrm/civicrm.php(1216): CRM\_Core\_Invoke::invoke((Array:3))

/home/example/public\_html/wp-content/plugins/civicrm/includes/civicrm.basepage.php(141): CiviCRM\_For\_WordPress-\>invoke() internal function: CiviCRM\_For\_WordPress\_Basepage-\>basepage\_handler(Object(WP))

/home/example/public\_html/wp-includes/plugin.php(579): call\_user\_func\_array((Array:2), (Array:1))

/home/example/public\_html/wp-includes/class-wp.php(633): do\_action\_ref\_array("wp", (Array:1))

/home/example/public\_html/wp-includes/functions.php(886): WP-\>main("")

/home/example/public\_html/wp-blog-header.php(14): wp()

/home/example/public\_html/index.php(17): require("/home/example/public\_html/wp-blog-header.php") {main}

---

Versions:

```
Wordpress 4.3.6
CiviCRM 4.7.30
Stripe payment processor extension  4.7.3
PHP 5.6

```

---

CIVICRM\_UF\_BASEURL from civicrm.settings.php, Site address, and WP address are identical

Path Variables:

```
[cms.root]      /home/example/public_html
[civicrm.root]  /home/example/public_html/wp-content/plugins/civicrm/civicrm
[civicrm.files] /home/example/public_html/wp-content/uploads/civicrm

```

Resource URLs: (these all look right)

```
CiviCRM Resource URL      [civicrm.root]/
Image Upload URL          [civicrm.files]/persist/contribute/
Extension Resource URL    /wp-content/plugins/files/civicrm/

```

Directories: (these all look right)

```
Temporary Files Directory    [civicrm.files]/upload/
Image Directory              [civicrm.files]/persist/contribute/
Custom Files Directory       [civicrm.files]/custom/
Extensions Directory         /home/example/public_html/wp-content/plugins/files/civicrm/

```

HTTPS is forced. For example, http://www.example.org resolves to https://example.org.

in .htaccess:

```
# Redirect to HTTPS
 RewriteCond %{HTTPS} off
 RewriteCond %{HTTP:X-Forwarded-Proto} !https
 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

<files wp-config.php>
order allow,deny
deny from all
</files>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
<IfModule php5_module>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 256M
   php_value post_max_size 8M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php56"
   php_value upload_max_filesize 2M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

```

---

Thank you for any help or ideas you can provide!

# Answer
> 2 votes
Checked the server logs.

.htaccess had file permissions set to 0664.

Changed those permissions to 0644, and this problem went away.

# Answer
> 3 votes
Many of these "lost session" issues (which stem mainly from `redirect_canonical` correcting CiviCRM's malformed URLs) are solved in more recent versions of CiviCRM. All I can really do is suggest you upgrade. FWIW, you can pick through the PRs that deal with URLs here:

https://github.com/civicrm/civicrm-core/pulls?q=is%3Apr+author%3Achristianwach+is%3Aclosed

However, backporting them to your older version of CiviCRM might be more effort than upgrading.

# Answer
> 2 votes
I was getting similar errors on a Drupal site - turned out it was timing out during PDF creation for the email receipts, disabling PDF generation resolved the issue for now.

# Answer
> 0 votes
Hi @dragonfly I am having the same issue and can't seem to get this to resolve

/home/emptyhometax/www/www/.htaccess

this is what is in my .htaccess at the above path

# BEGIN WordPress

# The directives (lines) between "BEGIN WordPress" and "END WordPress" are

# dynamically generated, and should only be modified via WordPress filters.

# Any changes to the directives between these markers will be overwritten.

RewriteEngine On RewriteRule .\* - \[E=HTTP\_AUTHORIZATION:%{HTTP:Authorization}\] RewriteBase / RewriteRule ^index\\.php$ - \[L\] RewriteCond %{REQUEST\_FILENAME} !-f RewriteCond %{REQUEST\_FILENAME} !-d RewriteRule . /index.php \[L\]

# END WordPress

everything was working fine and now the form wont work. no notable updates to site.

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


# Question
Title: Checksum token in system email "Memberships - Receipt (on-line)" causes critical error
When using a checksum token in a receipt email like this:

> http://example.org/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=IDNUMBER&{contact.checksum}&cid={contact.contact\_id}

A critical error is thrown in wc-logs but no specifics are included in the error message:

> CRITICAL Smarty error: \[in string

Are system emails parsed differently? My plan at the moment is to switch over to CiviRules which work with said tokens.

# Answer
> 1 votes
According to the documentation they should look like

> WordPress (with Clean URLs): http://example.org/civicrm/contribute/transact?reset=1&id=IDNUMBER&{contact.checksum}&cid={contact.contact\_id}

> WordPress (without Clean URLs): http://example.org/?civiwp=CiviCRM&q=civicrm/contribute/transact&reset=1&id=IDNUMBER&{contact.checksum}&cid={contact.contact\_id}

There may be a good reason yours does not but thought I should record this.

---
Tags: email, tokens, smarty, system-workflow-messages
---


# Question
Title: (Fixed) CiviCRM update on Joomla causes existing online registration pages to give 404 errors. What can I do to fix it?
I moved my Joomla based site to another host with better PHP and DB support. Used Akeeba Backup to restore the site, it came up properly. I then upgraded to the latest version of CiviCRM as I now had the proper DB version to do so.

The upgrade looked like it went well, aside from the issue of the old version SQL files that I needed to delete causing a DB update error, and a time out issue. Realized I needed to adjust the PHP settings.

However, when I go and test my online event registration form, it gives me a 404 error, not found. Found out that the CiviCRM menu type was not available. Did some snooping, and realized that the "elements" and "views" directories were not under the /components directory. Decided to do what I was doing previously, and download the 'ALT' version of the CiviCRM Joomla update archive, then move the directories myself, then edit the XML file.

Ran the Joomla installer again, the CiviCRM menu type appeared with all the menu selections. So I went to the event function, opened the event, saved everything, then added that page to the menu.

Tried to access ... 404.

I'm stumped :(

I was getting this error until I found and renamed the file under the media/civicrm/persist directory.

```
Jul 23 19:18:20  [error] Unexpected error while rendering a file in the AssetBuilder: Unrecognized asset name: crm-l10n.js
Array
(
    [exception] => Civi\Core\Exception\UnknownAssetException: "Unrecognized asset name: crm-l10n.js"
#0 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/Civi/Core/AssetBuilder.php(192): Civi\Core\AssetBuilder->render("crm-l10n.js", (Array:10))
#1 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/Civi/Core/AssetBuilder.php(135): Civi\Core\AssetBuilder->build("crm-l10n.js", (Array:10))
#2 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Resources/Common.php(218): Civi\Core\AssetBuilder->getUrl("crm-l10n.js", (Array:10))
#3 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Resources/Common.php(128): CRM_Core_Resources_Common::coreResourceList("html-header")
#4 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/vendor/symfony/dependency-injection/ContainerBuilder.php(1164): CRM_Core_Resources_Common::createFullBundle("coreResources")
#5 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/vendor/symfony/dependency-injection/ContainerBuilder.php(634): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), (Array:0), TRUE, "bundle.coreResources")
#6 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/vendor/symfony/dependency-injection/ContainerBuilder.php(588): Symfony\Component\DependencyInjection\ContainerBuilder->doGet("bundle.coreResources", 1)
#7 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/Civi.php(114): Symfony\Component\DependencyInjection\ContainerBuilder->get("bundle.coreResources")
#8 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Resources.php(214): Civi::service("bundle.coreResources")
#9 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Resources.php(380): CRM_Core_Resources->addBundle("coreResources")
#10 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm.php(102): CRM_Core_Resources->addCoreResources()
#11 /home/usafnu5/public_html/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#12 /home/usafnu5/public_html/libraries/src/Component/ComponentHelper.php(402): require_once("/home/usafnu5/public_html/administrator/components/com_civicrm/civicrm.php")
#13 /home/usafnu5/public_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/home/usafnu5/public_html/administrator/components/com_civicrm/civicrm.php")
#14 /home/usafnu5/public_html/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
#15 /home/usafnu5/public_html/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#16 /home/usafnu5/public_html/libraries/src/Application/CMSApplication.php(203): Joomla\CMS\Application\AdministratorApplication->doExecute()
#17 /home/usafnu5/public_html/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#18 {main}

)

```

Any assistance would be appreciated.

Neil

# Answer
> 0 votes
OK ... I haven't had to do this in a while, but I basically followed the troubleshooting steps in the SysAdmin Guide.

Not sure which did the trick but I rebuilt the triggers, then deleted the templates\_c contents (which I do on upgrades anyway) but also deleted the Config.IDS.ini file, which I didn't do.

Anyway ... now the form appears and processes fine.

---
Tags: joomla, upgrade
---


# Question
Title: Why can't I edit view or edit custom data fields that include multiple choice options?
I'm having problems editing custom fields with multiple choice options. I have created custom fields which display in preview mode.

But the custom fields don't appear when I try to Edit Multiple Choice Options. (The "Add Option" button works on this screen."  What have I done wrong?

Also, my only resources (besides StackExchange)for learning about profiles and custom names is https://docs.civicrm.org/user/. What other sources should I consult before posting questions here? CiviCRM 5.38.0 on Wordpress

# Answer
> 2 votes
Opening the editing link in a new tab or a new window works. Thanks to Pradeep Nayak for the suggestion and to Joe Bedford for pursuing this.

# Answer
> 2 votes
Could you clear CiviCRM cache and try again? Or try to open the options in new tab or window

---
Tags: custom-fields, multiple-choice
---


# Question
Title: Drupal 8 online conferencing that integrates with CiviCRM?
Not precisely a CiviCRM question, but this is something that I suspect other people here have already faced and solved, and I'm hoping to get feedback.

I'm redoing our website for a nonprofit, with an expectation of using Drupal 8 or 9 integrated with CiviCRM. The primary feature I'm looking for in our migration is to integrate online conferencing and a collaborative work environment. (We've looked into using third-party sites for the latter; I'm still willing to run this separately, but most of the options out there have per-user costs, which is unsustainable for us.)

The closest things to what we want as Drupal distributions are Open Atrium (which appears to be deprecated and Drupal 7 only) and Open Social (which I haven't been able to get to play nice with CiviCRM, and has other restrictions I haven't been able to deal with in an unpaid site; paid options are too expensive).

How have other people approached this? Ideally, we want organizational management to be run within CiviCRM, with integration with the online discussion such that new members are automatically provisioned with various permissions, and we can use CiviCRM entities to drive how interactions work across the site. (E.g., if the collaborative site uses Groups, that this integrates with CiviCRM functionality.)

# Answer
> 1 votes
We would approach this using Groups. We have used OG extensively and built additional integration in terms of what drives creation of Groups and Group membership in D7, and are in process of looking at replicating in D9 currently. For example:

Events

* creation of civi event triggers creation of Drupal Group
* registration of participent triggers adding user as member of above Group

Relationships (for example committee members)

* committee Contact in civi is linked to a corresponding Group in Drupal
* a relationship of type X to that committee adds the user to the above Group

and of course CiviCRM already had (not certain is working in D9 yet)

Groups

* a Group in civi is linked to a Group in Drupal
* a contact in that civi group is added as a member of the related Group in Drupal

In all above, removal (eg ending Relationship) triggers removal from the Drupal Group too

---
Tags: drupal, civimember, evaluating-civicrm
---


title: Rename multiple choice option sets

text:
# Question
Title: Rename multiple choice option sets
I'm fairly new to using Civi (building with it on a WordPress site) I'm creating a load of custom fields for several new activities that we need to replicate forms we use. I've created a multiple option set for one of the questions which I want to re-use for the other fields/questions I create. The option set has been labelled as the question I've created, which I can identify it by this when reusing it, but is there a way to rename the multiple choice option sets something more generic to make them more identifiable to other users? or will it always have to be labelled as one of the visible fields?

Example: How often do you use helpdesk service? With mutiple options of none of the time/rarely/some of the time/often/all of the time - the next question might be How often do you use sale service? which I want to use the same multiple choice options but they are showing with the label of How often do you use helpdesk service? Could them options be saved as a set called say "service frequency" to then make it identifiable for all forms that need it?

Thanks

# Answer
> 2 votes
You could create a custom field with the same name that you want for the option\_group, then the option\_group would have your friendly name and you can select this for your existing and new fields. You don't do anything else with the special custom field and you could hide it in a suitably named custom group.

Better than editing the database I think.

# Answer
> 2 votes
You can use the same set of options for two different custom fields, all you need to do is when creating custom field click on 'Reuse an existing set', select the option from the drop down list and save.

---
Tags: custom-fields, activity, multiple-choice
---


# Question
Title: I am trying to create a profile on Contribution Page for membership to include username and password fields for member content on Wordpress site
Trying to create a new profile to add to a Contribution Page for memberships which includes fields for username and password for Wordpress member-only content. I cannot select the User Registration or User Account checkboxes for the new profile. There is also no 'Password' type field in the Add fields screen. I have 'Anyone can register' allowed in Wordpress and have CiviCRM Wordpress Member Sync and CiviCRM Profile Sync installed. What am I missing?

# Answer
> 2 votes
You need to select 'Account creation' option to required or optional under Advance setting of Profile

---
Tags: wordpress, user
---


# Question
Title: Active Contribution Page not available in Insert CiviCRM Content in Wordpress
Atempting to add an active Contribution Page to a public Wordpress page but it is not available in the select field in Insert CiviCRM Content in Wordpress. Is this because I am using a separate database for CiviCRM? Using CiviCRM Worpdress Member Sync and it works properly.

Also, when I use the link for the Contribution page: https://domain.com/civicrm/contribute/transact/?reset=1&id=3 or the shortcode \[civicrm component="contribution" id="3"\]the page displays with the error: "You do not have permission to access this page." The Wordpress page has no content restriction on it.

And, finally a required Username field displays in the Contribution Page form, but no Password or Confirm Password fields. No option to add those on the Contribution Page settings. How do I add the required Password field so it is entered in the Wordpress User account?

# Answer
> 5 votes
Can you check permissions if the user has permission to make online donations?

If Civi is on 5.37 than password field is not available to set on form, the user will get a password reset link when the user is created.

---
Tags: wordpress, civicontribute
---


# Question
Title: CiviCRM has not bootstrapped sufficiently to fire event "hook_civicrm_alter_drupal_entities"
After upgrading CiviCRM to civicrm-asset-plugin 1.1, civicrm-core 5.29.1, civicrm-drupal-8 5.29.1, and civicrm-packages 5.29.1 I started getting "CiviCRM has not bootstrapped sufficiently to fire event "hook\_civicrm\_alter\_drupal\_entities"." In trying to diagnose the problem I upgraded civicrm\_entity to the newest commit (9f69c64).

I upgraded the code with Composer and everything appeared to work correctly. The CiviCRM upgrade was done with CV and the upgrade reported to be done successfully.

I appreciate any help in how to approach this.

Thanks, Josh

# Answer
I encountered an almost identical error today (`PHP Fatal error: Uncaught RuntimeException: CiviCRM has not bootstrapped sufficiently to fire event "hook_civicrm_entityTypes".`). In my case, there were some file permission issues, and resetting the file permissions solved my problem. I believe my PHP user had access to the files but my Apache user did not.
> 1 votes

# Answer
This looks like a change in 5.29. See https://github.com/civicrm/civicrm-core/pull/17831. It's signalling that somehow something isn't working with the way either the civicrm\_entity module is setting the hook now or something about that change isn't working as expected. I'm not sure which.
> 0 votes

# Answer
could you detail the process to rest the the file permissions ? I am having the same issue that is revealed by `drush updb -v`.

`In CiviEventDispatcher.php line 190: [RuntimeException] CiviCRM has not bootstrapped sufficiently to fire event "hook_civicrm_alter_drupal_entities".`

I also thing that it is related to `civicrm_entity` as there is `Exception trace:`  `at /path/vendor/civicrm/civicrm-core/Civi/Core/CiviEventDispatcher.php:190 Civi\Core\CiviEventDispatcher->dispatch() at /path/vendor/civicrm/civicrm-core/CRM/Utils/Hook.php:167 CRM_Utils_Hook->invoke() at /path/web/modules/contrib/civicrm_entity/src/SupportedEntities.php:867 Drupal\civicrm_entity\SupportedEntities::alterEntityInfo() at /path/web/modules/contrib/civicrm_entity/src/SupportedEntities.php:707 Drupal\civicrm_entity\SupportedEntities::getInfo() at /path/web/modules/contrib/civicrm_entity/civicrm_entity.module:54 civicrm_entity_entity_type_build() at /path/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:129`
> 0 votes

---
Tags: drupal-8
---


title: How to import event Attendees

text:
# Question
Title: How to import event Attendees
I'm trying to import a list of names and emails from an event, but I don't see any place in the Field Mappings for "Import Participants" that say anything about Name/Email or any contact information.

How or where do we import contacts from events?

(This is a CiviCRM install on WordPress)

# Answer
Import them as Contacts - on final step of import do 'add to a new group'

Find all Contacts in that Group and then add as participants to your event via the Actions button on the search results.
> 2 votes

---
Tags: wordpress
---


# Question
Title: How do I disable or deactivate a contact or an expired member? The only options I can find are to delete the contact, not disable or deactivate
How do I disable or deactivate a contact or an expired member? The only options I could find are to delete a contact or expired member.

# Answer
There are several answers here

of those the one using Constituents Only is the only 'technical' option, the others are mostly work arounds
> 0 votes

---
Tags: contacts
---


# Question
Title: Fields loaded as read only in civicrm.settings.php
The database was upgraded from 5.37.1 to 5.39.0 by Civihosting. When I went to check the resource urls as suggested I am receiving "Some fields are loaded as 'readonly' as they have been set (overridden) in civicrm.settings.php.

Any suggestions of what I need to change to fix this?

# Answer
> 1 votes
This is set in the civicrm.settings.php file. It's perfectly fine to do overrides: https://docs.civicrm.org/sysadmin/en/latest/customize/settings/#override-settings-in-civicrmsettingsphp.

---
Tags: civicrm.settings.php
---


# Question
Title: Event Registration: Is there a way to lookup organization as user types?
On our event registration pages, we ask applicants for their organization name.

Ideally, when they start typing the organization name, we'd like to present them with a list of organizations in our civiCRM instance, so as to avoid duplicate/typo/variations on organization name.

Is there a way to accomplish this?

CiviCRM 5.39.0 and Joomla Joomla! 3.9.28

# Answer
There are answers here which reference this extension and a blog about it here

(found via google for "civicrm "current employer" autocomplete"

hope that helps
> 1 votes

---
Tags: civievent, organization
---


# Question
Title: Related memberships not being added for a newly created related contact
For one of our sites running drupal Drupal 7.80 and CiviCRM 5.33.5 has organisation based fixed memberships with relationship type set to employer of for the related memberships.

We have noticed that when a new employee is added to one of these organisations, we have to manually create the related membership by clicking on a CREATE button.

We want the related membership to be created automatically without the need to manually click the create button. Is there an option that we've missed out somewhere to help make this happen?

# Answer
> -1 votes
An organizational membership sounds like orgs are signing up for the membership in which case the relationship should be 'employee of' I think.

---
Tags: drupal
---


# Question
Title: See the modifications in Change logs on the source contact
Title says all, in any contact summary I can see what has been done to the target contact (the one I'm looking at) by who has done it (AKA `Changed by`).

What if I want to see what the source of the change has done for other contacts?

In the `Activities` tab (on the source contact's side) I can't see the little improvements like `added group` or `update contact` did by this person on some contacts.

Is there a kind of `Change logs from the source contact side`?

# Answer
1. Turn on logging at Administer - System Settings - Misc.
2. Make some changes to records.
3. Go to Reports - Contact Reports - Contact Logging Report (Summary)
4. Then on the filters tab you can filter by "Altered By".

Note the report is not complete and is very contact-centric and not always good for other objects, so for example changes related to activities don't show up very well. But for contact changes it works.
> 2 votes

---
Tags: contacts
---


title: Router problem. AngularJS on Jooma

text:
# Question
Title: Router problem. AngularJS on Jooma
I'm trying to learn AngularJS with CiviCRM and I am doing the tutorial found here. After completing the tutorial, I navigated to `http://localhost/Joomla/administrator/index.php?option=com_civicrm&task=civicrm/a/about/me`, and saw this error:

When clicking on the error message link, I am redirected to this page. This page explains that the error is probably caused by `ngRoute` not being included. I went ahead and downloaded angular-route using `npm install angular-route`. There were instructions for using npm to download angular-route and use it with CiviCRM here

My problem is that I am not sure how to properly include `ngRoute`, or if that is even the problem. Here is what I think the relevant code is that gets produced using `civix`:

**EditCtrl.js**

**aboutme.js**

I've tried  `angular.module('aboutme', ['ngRoute']')` and `angular.module('myApp', [require('angular-route')]);` in `EditCtrl.js`. For example:

I also tried linking the `angular-route` library in the `EditCtrl.html` file like so:

I couldn't find an `index.html` file to try and add a reference to `ngRoute`.

I'd also like to note that the `aboutme.js` file produced by `civix` is completely different than the code in the tutorial. The tutorial code shows:

The produced `civix` code is already shown above.

Here is my file tree and `package.json` file:

**Any ideas on how to get this tutorial to work?**

# Answer
> 1 votes
I figured it out.

The `aboutme.js` file needs to be:

```
(function(angular, $, _) {
  // Declare a list of dependencies.
  angular.module('aboutme', [
    'crmUi', 'crmUtil', 'ngRoute'
  ]);

})(angular, CRM.$, CRM._);

```

I also had to change the url from `civicrm/a/about/me` to `civicrm/a/#/about/me`. I had tried the `#` earlier, but the code was still incorrect, so it didn't work.

Angular and angular-router happen to already be included in the bower components folder in `administrator/components/com_civicrm/civicrm` , so you don't need to install angular-router with npm or otherwise.

The only other change I made is I removed the redundancy in the requires statement of `aboutme.ang.php` like so:

```
<?php
// This file declares an Angular module which can be autoloaded
// in CiviCRM. See also:
// \https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules/n
return [
  'js' => [
    'ang/aboutme.js',
    'ang/aboutme/*.js',
    'ang/aboutme/*/*.js',
  ],
  'css' => [
    'ang/aboutme.css',
  ],
  'partials' => [
    'ang/aboutme',
  ],
  // removed 'crmUi', 'crmUtil', 'ngRoute' (already in aboutme.js)
  'requires' => [
  ],
  'settings' => [],
];

```

Everything else that civix produced via the command line I left untouched.

---
Tags: joomla, angular
---


# Question
Title: Where are checksums stored in the database?
Where are checksums stored in the database? Is there any considerations to the limitations of how many checksums can be created at once in a mailing? If I send a checksum email to ~250,000 will that work without issue?

# Answer
> 9 votes
The checksum is an md5 hash of the value in the database field `civicrm_contact.hash`, the Contact ID, the current timestamp and the life-span.

Therefore, as long as the contact hash stays the same (it never changes, unless you do it manually), then you can generate as many tokens as necessary.

Once generated, checksums look like `xxxx_yyyy_zzzz`. The first part is the md5 hash, the second part is the timestamp of when it was generated, and the third part is the life-span. That way CiviCRM can easily lookup the contact.hash, and with the `yyyy` and `zzzz`, be able to recalculate/validate the `xxxx` part.

For reference, see `CRM/Contact/BAO/Contact/Utils.php`, the function `generateChecksum`.

---
Tags: database, checksum
---


# Question
Title: How to convert a STOP message sent to an SMS provider into the "Do not SMS" privacy preference in CiviCRM?
Most SMS providers allow you to respond with STOP to indicate that you no longer want to receive SMS messages. If we try to send another message to a phone number that has replied with STOP, it won't go out.

However, it's not clear how this information gets back to CiviCRM, if at all. Does this have to be handled on a per SMS provider basis? Or should we be building a more generic framework to support all SMS providers? Or is there a way I haven't figured out?

For reference - here's how Twilio handles it: https://support.twilio.com/hc/en-us/articles/223134027-Twilio-support-for-opt-out-keywords-SMS-STOP-filtering-

# Answer
> 3 votes
Used CiviRules to do this.

This switches the Do Not SMS flag to ON if they reply STOP:

This switches the Do Not SMS flag to OFF if they reply START:

# Answer
> 2 votes
It's probably possible to do via an extension, e.g. something similar to https://civicrm.org/extensions/auto-reply-twilio-sms

Otherwise there is a generic "inbound" function that handles incoming sms if the provider lets you set up a callback, e.g. twilio setup, and it's implemented in civi via this code and individual sms provider extensions can use it like this.

So it seems possible to implement something generic.

---
Tags: sms, twilio
---


# Question
Title: Handling Customer Card Updates with Stripe Payment Processor
Does the Stripe Payment Processor handle customer credit card updates for recurring contributions? And does it depend on whether I'm using Civicrm 4.6 or 4.7?

I see this page from Stripe: https://stripe.com/docs/recipes/updating-customer-cards

Not sure if it is implemented in the Stripe extension.

# Answer
It is not yet implemented. See: https://lab.civicrm.org/extensions/stripe/-/issues/64
> 1 votes

# Answer
https://civicrm.org/extensions/stripe-payment-processor states

> It handles regular contributions as well as recurring through Stripe's subscription/plan feature.

and

CiviCRM Compatibility = CiviCRM 4.5, CiviCRM 4.6, CiviCRM 4.7
> 0 votes

---
Tags: recurring-contributions, stripe
---


# Question
Title: How can I customize the User Dashboard (Frontend)
I am working on 4.7 on Wordpress 4.6 and I trying to customize the User Dashboard in the Frontend shown for the request myURL.com/civicrm/?page=CiviCRM&q=civicrm%2Fuser&reset=1.

First I looked at the hook civicrm\_dashboard and civicrm\_summary, but those are used for different pages. It seems I can hook into that page with the hook civicrm\_pageRun filtering for the page "CRM\_Contact\_Page\_View\_UserDashBoard".

1. How can I add content or modify content on the page object?
2. Where can I find documentation of the page object?
3. How would I change the HTML Table on the UserDasboard to DIVs to have separate tabs for Contributions, Events, Memberships, etc. ?

# Answer
> 3 votes
If you only want to customize the layout, you can override the Smarty template file. This is usually not recommended in CiviCRM, because it complicates upgrades and maintenance, but this specific template is fairly safe (most templates have too much logic/code in them and change often). You can also include custom JavaScript in templates (between 'literal' tags). It's not very elegant but it works.

The official docs page about customizing templates is surprisingly complicated, but covers the basics: under Administration \> System Settings \> Paths, set a path for custom smarty templates. Then copy the original "tpl" in there. You can also create a custom extension (ex: for all customizations of a site). You will probably need to at some point, for other types of customizations as described below.

It is also possible to modify the contents of the dashboard, such as to include custom sections. I often add links to "My profile" or "My certifications", things like that.

This can be done using the pageRun hook and then matching the `CRM_Contact_Page_View_UserDashBoard` page name.

For example:

```
function myext_civicrm_pageRun(&$page) {
  $pageName = get_class($page);

  if ($pageName == 'CRM_Contact_Page_View_UserDashBoard') {
    CRM_Myext_Utils_DashboardLinks::addLinks($page);
  }
}

```

and the class:

```
class Myext_Utils_DasboardLinks {

  public static function addLinks(&page) {
      $links = [
        [
          'title' => E::ts('Modify your username, password or e-mail address'),
          'url' => ($uid ? url("user/$uid/edit", ['query' => ['destination' => "user/$uid"]]) : ''),
          'icon' => 'fa-user-circle',
        ],
        [
          'title' => E::ts('Update your profile (contact information) and communication preferences'),
          'url' =>CRM_Utils_System::urll("civicrm/profile-update", ['cid' => $dashboard_contact_id]),
          'icon' => 'fa-address-card',
        ];
    ];

    self::addElement([
      'class' => 'crm-dashboard-updates',
      'sectionTitle' => E::ts('Updates'),
      'templatePath' => 'CRM/Myext/Contact/Page/View/UserDashBoard/MyLinks.tpl',
      'links' => $links,
    ]);
  }

  /**
   *
   */
  public static function addElement($element) {
    $smarty = CRM_Core_Smarty::singleton();
    $dashboardElements = $smarty->_tpl_vars['dashboardElements'];
    $dashboardElements[] = $element;
    $smarty->assign('dashboardElements', $dashboardElements);
  }

```

The above is a bad copy-paste of old custom code. You will have to adapt for your requirements.

Finally, there is the issue of re-ordering dashboard items, without rewriting the entire template or custom code. The reorder dashboard extension might help.

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


title: Flexmailer and BAO mailer confusion

text:
# Question
Title: Flexmailer and BAO mailer confusion
I've used Flexmailer as an extension for ages because it was required for Mosaico. It is now in core (as well as the extension, so not sure which one gets used).

But I don't understand when it's used and what the implications of it are.

The settings in **Administer » CiviMail » Flexmailer** say:

> Traditional Mailing Handler
>
> For greater backward-compatibility, process "traditional" mailings with the CiviMail's hard-coded BAO.
>
> For greater forward-compatibility, process "traditional" mailings with Flexmailer's extensible pipeline.

I don't understand what traditional mailings are - perhaps it's everything except Mosaico mailings?

Specificially, if I send:

1. a CiviMail mailing without Mosaico
2. a CiviMail Mosaico mailing
3. a MessageTemplate with the MessageTemplate.send API
4. a MessageTemplate where the template comes via Mosaico message template with the MessageTemplate.send API
5. a MessageTemplate with the Email.send from the Email API extension used by CiviRules and FormProcessor and possibly others
6. a MessageTemplate where the template comes via Mosaico message Template, sent with the email api extension.
7. Some other internally generated message, e.g. the one you might get when an activity is assinged.
8. Emails created from the Send Email (without CiviMail) action, which I presume is the same as when you add a *Send Email* activity(?)
9. Scheduled Reminder emails.

Then

* which system would be used when Flexmailer is set to Auto?
* what would be the implications of having flexmailer forced in the settings?
* any other things I ought to know ;-)

# Answer
Traditional mails are mailings sent with the old WYSIWYG interface that is part of CiviCRM "core", i.e. not Mosaico, the block layout editor, provided by the Mosaico extension.

Quoting a random comment in Flexmailer:

> FlexMailer is \[...\] a heavily reorganized version of the old MailingJob::deliver\*() functions

If I recall correctly, one of the aims of Flexmailer was to deprecate large chunks of CiviMail code that have become a bit messy. Many function in `CRM_Mailing_BAO_Mailing` have been flagged as deprecated as a result. Message Templates are not affected.

Mosaico depends on Flexmailer, but to avoid disruption, CiviCRM lets administrators opt-in to the new flexmailer delivery features, using the setting you mention (Traditional Mailing Handler).

At some point in the future, CiviCRM will default to always using Flexmailer (which is why it is now shipped in core).

So if the setting is set to:

* Automatic: The opt-in will be done when CiviCRM decides to enable it.
* BAO: Force the old behaviour, assuming that when "automatic" switches to Flexmailer, there will be a grace period to allow still using the old code.
* Flexmailer: force traditional mailings to use the new Flexmailer delivery code.

You probably know more about Flexmailer than I do, but it's a good question and it did not have any answers. Feel free to correct me if I got anything wrong!
> 1 votes

---
Tags: flexmailer
---


# Question
Title: CiviCRM translations on staging server not working
We made a copy of the live site for making a staging site. We did the updates and everything is working fine. Except for te translations not working (anymore).

Under 'CiviCRM » Localization » Languages, Currency, Locations' we set Default Language to Dutch (Nederlands). After the updates we saw that in the Civi module folders "l10n" and "sql" where empty. So i copied the files back from the production environment en put them back.

From documentation, this should be it to make it work but everything is still in english. After searching for a full day i don't know where to look anymore. Resource url should be ok and no other errors on the site.

Searching online for this problem does not give much results.

Information:
Drupal V7.69
CiviCRM V5.23.3

Thanks

# Answer
> 1 votes
Are you using "native gettext"? If yes, the staging server might not have the locales enabled on the operating system (ex: `dpkg --configure locales`).

The symbiotic extension might help debug the issue. There are extra status checks for common translation problems. Once enabled, go to Administer \> Administration Console \> System Status.

# Answer
> 0 votes
If you are still busy with this you can better download the latest version of the translation from the download-page CiviCRM: the localization files. The directory sql is only used for new installments, so the l10n-part will do. You can switch the language first to English to force the system to re-translate the menu and set then the language back. I have a working extension (standalone) to update the translation using the sql-file for single language systems, you can then use the latest translations for upgraded CiviCRM installments because great parts of CiviCRM are only translated during the installation and the translation in Transifex is always behind the new versions of CiviCRM. Let me know if you want to try my extension on your development system.

---
Tags: drupal, civicrm-home, translation
---


title: How to manage spark subscription?

text:
# Question
Title: How to manage spark subscription?
We have since 1 year a subscription to Spark, but I don't remember where I can administer the subscription... I would like to check the payments situation of our spark account, etc... With my "admin" user account, I can work on our database, but I don't find how to manage the account/subscription. Thx a lot for your help and sorry for the trivial question...

Marc Aellen

Our database: https://focolarisuisseromande.civicrm.org/

# Answer
> 1 votes
CiviCRM Spark sends a monthly billing email that includes a cancellation link.

It is also possible to login to https://civicrm.org/user (or create a new account) to view your past invoices.

If you have any other questions, feel free to contact us at spark@civicrm.org.

---
Tags: civicrm-spark
---


# Question
Title: Problem local drupal 8/9 install civicrm: folder is not writable (on Windows)
I am a volunteer from a non-profit organization that has problems with the installation of civicrm. We already have civicrm in worpress on an Aruba host (and it works), but we wanted to move to drupal.

I understand that I have to install locally first and then transfer everything to my site (is that right?).

I tried to install CIVICRM locally via XAMPP and Composer on my Windows computer following the documentation (https://docs.civicrm.org/installation/en/latest/drupal8/).

When I get to the "Run the installer" step, I navigate to "Extend" and click on install the "CiviCRM Core" module.

I get the following error: CiviCRM: System: The settings file "C: \ xampp \ htdocs \ drupal \ sites / default \ civicrm.settings.php" cannot be created. Ensure the parent folder is writable.

I tried to change the permissions and check the installation steps, but obviously something is wrong (due to my ignorance :/ )

How can I solve the problem?

Thanks.

# Answer
> 3 votes
On windows use `attrib -r C:\xampp\htdocs\drupal\sites\default` to make it writable.

# Answer
> 0 votes
The above answer of @Dermerit worked.

Just need to fix the `Read-only` property. Before I could find this answer, I endlessly - changed file permission of `Autenticated Users` to Add more Permissions - `Full Control` , `Modify` and `Write`

But, it did not worked, then, I changed the file permissions for Users - added more permission for `User` -

`Full Control` , `Modify` and `Write` \- but again this did not worked. And, when the `\sites\default` folder did not worked, I went above the folders root, tried with them, maybe - somewhere the error could exist with file-permission.

But again did not worked, or - `Configuration`  permission by anonymous Users did not worked either.

As, I was using Apache, for my setup the full working command is -

`attrib -r C:\Apache24\htdocs\domn04\sites\default`

---
Tags: drupal, installation, windows, local
---


# Question
Title: CiviDiscount automatic discounts not being applied after server updates
Following updates to PHP 7.3.29 and MySQL 5.7.34 earlier this month, we discovered that discounts are no longer being automatically applied to event registration forms, public or back-end. The discount codes do work when applied manually. No errors are being logged. We just updated CiviDiscount to 3.8.2 from an older version, but that did not resolve the problem. We are on CiviCRM 5.33.5 on Drupal 7.81. Any ideas what might be causing this? Thanks very much.

# Answer
> 2 votes
I was able to get this working with this reversal of logic in cividiscount.php: This seems to function properly on CiviDiscount 3.7 on our production server:

```
- if ($autodiscount) {
-        break;
+ if (!$autodiscount) {
+        continue;

```

We are still experiencing the puzzling issues mentioned below on our dev server with CiviDiscount 3.8.4. Hopefully someone familiar with the code will be able to work through this and determine what the issue is.

---
Tags: price-sets, cividiscount
---


# Question
Title: How can I export vcards for multiple contacts?
When viewing a single contact, I can select "Actions" Vcard and export a vcard which can then be used in other applications (Outlook, OwnCloud, etc)

I would like to be able to select "Create Vcard" in the drop down list for actions for search results, and get a vcard file of many contacts that could be imported into other apps.

# Answer
> 2 votes
This option does not exist (as yet).I'm not aware of an extension to do this either. Your options include:

a. Write an extension that adds the above functionality

b. Use the api to export the data into a program that can generate multiple vcards and use that

# Answer
> 1 votes
You can use the extension vcard-export. See https://lab.civicrm.org/extensions/vcard-export .

---
Tags: search-results
---


# Question
Title: CRM Core Exception Could not find valid session key form error
I know there are lots of threads on this with no clear solution. Posting again for any new input. Using cicivCRM 5.39.0.

# Answer
> 3 votes
In this case disabling the Yoast SEO Plugin allowed everything to start running without errors.

# Answer
> 0 votes
Loading that page shows a couple of failures getting files from `/wp-content/uploads/civicrm/persist/contribute/dyn` Try clearing your cache and check that directory exists.

---
Tags: wordpress, php
---


# Question
Title: Newbie question - is there a way to have self-signup without gathering any credit card info?
Totally new to civiccrm - we are a small UK makerspace, looking for a membership management system. We thought CCRM might be a good fit, so one of our members has spun up a test server to play round with. It looks great, but I can't seem to find any information about how we would allow self sign-up without gathering the credit card info.

We are a very small org and absolutely cannot handle the complexities of PCI compliance or the accompanying GDPR overhead of keeping that level of PII. That would cost us more in time and money than we pull in per year.

We just need a login + password, email and a "custom" field for standing order reference.

Is this possible?

Thanks in advance.

# Answer
You shouldn't need a payment processor to do a self-signup. But also - you don't need to meet the standards for PCI compliance that you're suggesting if you choose an appropriate payment processor. Use either an "off-site" processor like PayPal Standard, or one that loads Javascript on your page to collect credit card info so that it never touches your server (Stripe, and soon Authorize.net/Accept.js).

To answer your original question:

* If you're not using CiviMember at all, simply create a free-standing profile. This will let you collect data and create an account.
* If you use CiviMember but memberships are free, set up a contribution page with the **Execute real-time monetary transactions** and **Contribution Amounts section enabled** unchecked on the *Amounts* tab, while configuring the *Membership* tab.
* If you use CiviMember but memberships are paid, and you don't want to collect credit card info despite my reassurances, configure the contribution the same as the last scenario, but check the **Pay Later option** box.
> 4 votes

# Answer
Depending on your CMS you might be able to do all of that without the need for CiviCRM.

If you are worried about credit card information then CiviCRM has a number of payment processor options which mean you never see a credit card number, just the transaction ID of your payment processor of choice - check out https://civicrm.org/extensions/stripe-payment-processor as an example that integrates with Stripe.

If you think you still need a CiviCRM solution then Profiles are probably your friend - https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/
> 1 votes

---
Tags: gdpr, pci-compliance
---


title: Custom Data Set - Field Limit

text:
# Question
Title: Custom Data Set - Field Limit
I am using Civi 5.38 on a WordPress site. There have been multiple custom data sets created and used for Activities which have all worked fine apart from the most recent set which needs 70+ fields adding to it. Once we get to adding 65 in the fields it seems to cause a database fault as the screen freezes when trying to add it. If I refresh the page the field then shows in the list but then none of the activities load on the homepage or show in the contact records. Is this a known limitation of custom fields on a set? When checking other forum posts there seems to be people creating upto 90 in a set so not sure what is causing this to fall over if that's the case.

Thanks!

# Answer
> 2 votes
See https://lab.civicrm.org/dev/core/-/issues/1191 and you can also try https://github.com/civicrm/civicrm-core/pull/18968 to see if it solves it for you.

# Answer
> 2 votes
I'm not sure if the issue is what Demerit is suggesting (join limits), or one of database length limits. Your CiviCRM log should give a more detailed error. If you find the error, you can edit your question to include it for better help.

I suspect you're hitting a database length limit. The solution depends on your version of MySQL/MariaDB, but I'm guessing that changing your database row format to DYNAMIC may help.

If you don't have the ability to change this (e.g. you're on a crappy shared host) then consider creating fields with a lower maximum length if you need to fit more - or breaking the custom fields up amongst two groups.

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


# Question
Title: Wordpress: how to debug "Do not delete this page. Page content is generated by CiviCRM."
After upgrading Wordpress to 5.8 and CiviCRM to 5.39.0, the event registration page does not work.

This is the url:

* MY-SITE/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&reset=1&id=120

These are the symptoms:

* the h1 of the page is "CiviCRM"
* the body of the page is "Do not delete this page. Page content is generated by CiviCRM."
* the title tag in the header contains the title of the event
* no profile fields, hence no possibility to register for the event.
* no errors in ConfigAndLog
* no javascript errors in browser web developer tools
* several cache clear had no effect

What could be the cause of this error? What can I do to debug this further?

Thanks!

# Answer
You will need to comment out line 526 from /includes/civicrm.basepage.php

```
remove_filter('the_content', [$this, 'basepage_render']);

```

That should solve it.
> 1 votes

---
Tags: wordpress
---


# Question
Title: Why aren't my headers/footers appearing in CiviMail documents?
CiviMail is not including headers/footers in this newbie's newsletter. I think I've mis-configured something. I am expecting to see a tab in the Define Mailing menu.

The default headers and footers are unchanged from our original installation and set as "default" and enabled in Administer\>CiviMail\>Headers Footers and Automated Mailings. But they aren't included in any mailings. CiviCRM 5.38.0 on Wordpress

# Answer
I just discovered that the options for Headers and Footers appear properly if I used the traditional CiviCRM templates. I should have mentioned that I was using the Mosaico templates which were recommended to me. So I have a work-around.
> 1 votes

---
Tags: civimail
---


# Question
Title: What is your CiviMail throughput/sending speed with sparkpost?
We've just started using sparkpost to deliver our email, the sparkpost control panel provides some really nice stats and insight into mailing performance as well as how your emails are being treated by various ISP's. I'm keen to find out what others are seeing in terms of sending speed with Sparkpost. We're currently getting roughly 20,000 emails/hour but looking to increase this to 100,000, which is one of the main reasons we switch to sparkpost.

I'm also keen to find out what your civimail settings look like here: civicrm/admin/mail?reset=1

Thanks! Peter

# Answer
I use the following settings, basically the default:

* Mailer batch limit: 0
* Mailer job size: 0
* Mailer throttle time: 0
* Database Update Frequency: 10

I use a long-running cron, so it's really just one process running at 100% while sending emails. I don't want to impact too much the rest of the CRM, so I only run one thread/job at the time.

One easy tweak would be to increase the database update frequency to 20. This setting has some risk. If sending emails fails for some reason, and CiviMail tries to re-send those emails at every cron run, then there is a risk of emailing those users repeatedly (well, lets say it delivered 9 emails, but failed on the 10th, the first 9 will be resent again and again).

For Sparkpost, I had found that using the Sparkpost PHP library to send emails was 20-30% faster, compared to what the Sparkpost extension is doing. To be honest, I have not measured it recently, and presumably it also ends up doing "curl" calls, so I would rather not create high expectations. We maintain a fork here, that uses the PHP library: https://civicrm.org/extensions/sparkpost-symbiotic

One of the issues with CiviMail, is that we end up doing an HTTP POST query to Sparkpost for each email. Ideally, we would batch those, and send a few emails at the time (or even, use the Sparkpost templating features, and just upload a list of contacts into a Stored Recipient List, but that would break tokens, add more configurations, and increase lock-in).

Finally, keep in mind that Sparkpost might also throttle delivery on their end, to avoid sending too many emails to the same provider at the same time (which might trigger their anti-spam).
> 3 votes

---
Tags: civimail, sparkpost
---


# Question
Title: Can a Custom Field be added to a Contribution Page or Financial Type?
I have created a Set of Custom Fields called "Tracking" to be used with -any- Contributions. The set includes Custom Fields called "Category" and "Job".

I would like to assign specific Category and Job codes to all payments made via a specific Contribution Page. Can a Contribution Page be edited to add Custom Fields?

Alternatively, can a Financial Type be edited to add Custom Fields?

# Answer
1. Under Administer \> Custom Data and Screens, Create your Custom Fields
2. Under Administer \> Profiles, Create a Profile that has your Custom Fields in it.
3. Under Conrtibutions \> Manage Contribution Pages, select the Page you want it to appear on. Under the Include Profiles tab, add that Profile. You can add it at the top or bottom of the Contribution Page.
> 4 votes

# Answer
This extension will let you create custom fields on Financial Types: https://github.com/pradpnayak/org.civicrm.financialtypecustomfield
> 2 votes

---
Tags: custom-fields, contributions, financial-types
---


title: Bulk update of relationships

text:
# Question
Title: Bulk update of relationships
I've a bunch of contacts with one no more needed relationship that I want to bulk delete.

It's a batch of 500 contacts that have 2 relationships and one is outdated, something like `volunteer for` and `helps for`. I need to suppress one of the two as it is no more needed. This group is easy to identify but I can't find any quick action to do this. I don't want to hard delete the target relationship in database because it is still needed for some other contacts. What I need is to bulk remove this particular relationship from a certain batch of contacts.

Is there a way to do this in the UI? Or with the API?

# Answer
> 2 votes
I'll assume none of them are case relationships which makes it simpler.

Put the contacts in a group (a regular group not smart). Then you could do something like

```
UPDATE civicrm_relationship r
INNER JOIN civicrm_group_contact c ON
 (c.contact_id = r.contact_id_a
  AND r.relationship_type_id = the_relationship_type_id
  AND c.group_id = the_group_id_of_the_group_you_just_made
 )
SET r.end_date = CURDATE()-1;

```

Obviously replace `the_relationship_type_id` and `the_group_id_of_the_group_you_just_made` with the appropriate id numbers.

Depending on how your relationship type is defined you may need to switch contact\_id\_b instead of contact\_id\_a in the query. You can also set is\_active=0 if you want.

Since you just created the group just now you don't have to think about status in that query. You can now get rid of the group.

Note if you have extensions that do things when relationships are changed this will bypass them. This also wouldn't work with employer/employee since there's extra stuff that happens when those change.

There is probably a way to do this with API but it might take some trial and error to get the joins for update.

---
Tags: relationships
---


title: User wallet support in CiviCRM?

text:
# Question
Title: User wallet support in CiviCRM?
Is there any way a user contact can add currency/money in his wallet and try to pay event registration or membership from wallet instead re-entering card details everytime?

Workflow:

1. User adds $20 in his wallet
2. Registers for event for $1 using wallet. That $1 is then removed from their $20 wallet.
3. When it's run out, they can add another $5/10/20 or any amount into their wallet.

Do we already have any extension available to achieve above use case? If not any thoughts on ideal solution for this? Create wallet as payment processor?

Thanks

Pradeep

# Answer
> 1 votes
Thinking out loud, but I think that the idea of using a wallet payment processor is a good lead.

Maybe something along the lines of:

* Record a payment for the user
* Then record a credit note
* Create a payment processor which uses the credit notes.

I have to admit that refunds/credits is something that is sometimes not very well defined in CiviCRM, so I'm not sure how easy this is.

From an accounting point of view, I kind of like the idea of using credits, since you want to make sure that the accounting sync does not record the income twice.

Another option is to use a payment processor that supports card-on-file (such as iATS). It's not worth it for $1 transactions (because of fees), but might be worth it for $5 and more.

Depending on the jurisdiction, you may need to be careful about laws regarding deposits.

---
Tags: payment
---


# Question
Title: Why does VAT keep being added when editing payments
When we issue a membership the payment automatically feeds through the correct pricing. If we then have to go in to edit the membership the price updates by adding VAT on again to the already inclusive total. Has anyone else had this issue and how did you resolve it? We are using Civi 5.8.0.

# Answer
> 1 votes
There was known bug up to CiviCRM 5.36. If editing the payment and there was an error, it re-applied taxes. https://lab.civicrm.org/dev/core/-/issues/778

---
Tags: civicontribute, civimember
---


# Question
Title: Memory Error (500) For SMTP Settings After Upgrading to 5.35.1
After upgrading to 5.35.1 I am getting a memory limit reached error when loading the SMTP settings page. I am not sure if this is related but I am getting a growl error for "Failed to find key by ID or tag" and then a random string.

I have tried getting to the page with and without the CiviCRM Secret Keys set in my settings file. I have cleared the cache. My memory limit is set at an obscene 3000M.

I have this working on my dev server with the same SMTP settings. The dev server has the CiviCRM Secret Keys set. I am using;

```
define('CIVICRM_CRED_KEYS', '::SOME VALUE');

```

Any help or ideas of how to fix this are appreciated.

Thanks, Josh

# Answer
> 1 votes
What I think happened is that added the encryption key after I did the upgrade. I am not sure how I did this. This was then causing the SMTP key not to be able to be read.

I got the idea that maybe I could force blank values into the STMP form. While there I found this code.

```
if (!empty($this->_defaults['smtpPassword'])) {
          $this->_defaults['smtpPassword'] = \Civi::service('crypto.token')->decrypt($this->_defaults['smtpPassword']$
        }

```

I commented this out and the form loaded. I saved without the key in the civicrm.settings.php file and then with the key again.

Now everything works correctly again.

# Answer
> 1 votes
In case others need to resolve this issue with the input of this SQL command `DELETE from civicrm_setting WHERE name = 'mailing_backend';` I could access to the SMTP settings page right after.

---
Tags: civimail, smtp
---


# Question
Title: Error: Failed to find key by ID or tag message
I recently upgraded to 5.39.0 on WP 5.8. When clicking *continue* from an event registration form at the *Confirm Your Registration Information* stage, I consistently get the sent to the url suffix https://example.com/civicrm/event/register/ and have the yellow bar page with the message:

> Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. Failed to find key by ID or tag (:ImagineAKeyHere:)

The participant is successfully registered when looking in the events. Also at other odd times that I have not discerned a pattern a black error box chimes in with

> Failed to find key by ID or tag (:ImagineSameKeyHere:)

The baseURLs for CiviCRM and Wordpress are identical per the respective GUIs.

# Answer
Thank you bgm, you got me on the right trail. It was an email issue. It was angry that it could not email the confirmation for the event to the registrant. The registrations were hitting the db as expected.

Specifically the **civicrm.settings.php** file **CIVCRM\_CRED\_KEYS** entry did not match what was in the database in the **civcrm\_setting** table, **mailing\_backend** row, and **Value** field. To make my life easy, I simply deleted the **Value** field data from the aforementioned in the database and reentered the email config data from the Administer | System Settings | Outbound Email menu. All is well. Thanks again.
> 8 votes

---
Tags: wordpress, civievent, upgrade, error-page
---


title: Finding payments in contributions

text:
# Question
Title: Finding payments in contributions
Relating to 4.7. It is possible for a contribution to be made up of multiple payments.

A contribution can have a Transaction ID, but individual payments can also have a Transaction ID.

However, individual payments can not be found by searching for 'Transaction ID' in the Contributions \> Find Contributions page.

For example: a participant registers for an event, choosing a ticket for £5 and paying online. This creates a contribution with a Transaction ID. We then upgrade the ticket in the back end, to £10. They pay the difference over the phone. We 'Add payment' on the contribution, and record the transaction ID.

Is there any way to search for payments rather than just the parent contributions? If not, perhaps the Find Contributions page should also search (or have an option to search) individual payments too?

For those visually inclined people:

# Answer
> 3 votes
You're asking for the fabled "Line Item Search" feature!

In short - this is a tragedy of the commons. It's cheaper for folks to build a custom search for their particular use case than to fund this feature - and so while several folks have expressed interest in this feature, it's yet to be funded.

If you think you have resources (time or money) to put toward implementing this feature, please contact the CiviCRM core team!

# Answer
> 1 votes
I had a similar requirement and I decided that the easiest option was to use one of the bookkeeping reports and link it to the contribution view.

Specifically, what I did was

1. Review the bookkeeping report (mine was instance 18, yours may be different). I needed to modify it slightly so I could filter by contribution id, but this was 4.4. Any bookkeeping type report that can be filtered by contribution id should work.
2. added a bit of code to my existing custom extension that added a link to the bookkeeping report to the contribution view page, filtering by that contribution id. I used the pageRun hook and calculated the report url with the added query string:

`reset=1&force=1&contribution_id_op=eq&contribution_id_value=196673`

# Answer
> 1 votes
Recent improvements on CiviCRM allow to achieve this anoying challenge. You can find how to solve this question at Searching Payments in Civi Eileen's blog post.

---
Tags: civievent, civicontribute
---


title: Which CiviCase? Compucore or V5?

text:
# Question
Title: Which CiviCase? Compucore or V5?
I am trying to understand which is the 'latest' version of CiviCase to upgrade to, is it:

https://github.com/compucorp/uk.co.compucorp.civicase

or

https://github.com/civicrm/org.civicrm.civicase

Can anyone advise?!

# Answer
> 2 votes
The best answer is probably 'both'. The first one you mention from Compucorp is an enhanced version of the case management in CiviCRM, driven by an extension and a different theme. The second is the latest version released by the CiviCRM team. But be aware that the Compucorp version is possibly/probably based on a slightly older version of the CiviCRM case system and so might not work with the latest Civi release.

# Answer
> 2 votes
To add some points to Andy's answer:

If what you want is new features being added, the CompuCorp one will do that faster.

Note that both of the extensions require the Shoreditch theme which, while reported to work on Wordpress and Drupal 8 with some tweaks, officially is only supported on Drupal 7.

There is also still core CiviCase. Both of the other extensions still rely on it underneath, but provide a different interface.

---
Tags: civicase
---


# Question
Title: Online Contribution CiviCRM Page Setup in WordPress
Hi All I need assistance.

Im am trying to setup a online contribution page in wordpress and I am following the following instructions as per the documentation

The part that says "**Click on the CiviCRM icon next to Upload / Insert**", the "**CiviCRM Icon**" or the "**Upload/ Insert**", I am unable to locate this part or rather I do not see where it is so ultimately I am unable tp complete this task, or am I looking in the wrong place?? I Have also attached the screen shot of the site??

# Answer
Welcome to SE. It looks as if you are using the new Block Editor and the documentation only covers the older Classic Editor. I have the WordPress **Classic Editor** plugin installed precisely to allow me to access CiviCRM elements.

Once you see what the code looks like from doing it this way you would be able to work out what you need to put in with the Block Editor. I don't know if there is a better way with the Block Editor, but I don't need to use it.
> 2 votes

# Answer
Welcome Jayson If you just enter the shortcode \[civicrm component="contribution" id="N" mode="live" hijack="0"\] in your WP page, the contribution page should show up.

When your contribution page is active, you can link people to the page by copying and pasting the following URL:

https://yoursite/civicrm/?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=N

In the 2 above examples, N=the ID of the contribution page that you've set up.
> 1 votes

# Answer
Shortcodes are key to working with modular builders such as the new Wordpress editor. There is an option in the builder to type in text or code. This is where you would add the shortcode which @peterb cited above.
> 1 votes

---
Tags: wordpress, civicontribute, contribution-page
---


# Question
Title: Can I add custom cv subcommands in my extension?
I'm starting to work on our Drupal 7 -\> Drupal 9 upgrade path. I have a lot of custom drush commands (that mostly run CiviCRM code) to help with provisioning and I'm wondering what to do with them. One option would be to re-write them as `cv` subcommands - but I don't think that's possible. Is there a way to do that?

# Answer
Something like `cv php:script --user=admin my_subcommand.php` is kind of the same thing if I understand correctly? You'd just have to put your previous code into a separate php file and adjust.
> 1 votes

# Answer
I may be over-thinking this. I can simply add apiv4 functions to any extension and then they are all available via: `cv api4 Foo.Bar`. I guess you can extend `cv` after all thanks to the API.
> 1 votes

---
Tags: cv
---


# Question
Title: Get CiviCRM working without internet connection
I tried to install CiviCRM on a server with a firewall that blocks outgoing traffic. But the dashboard wouldn't load. Looking at the logs, it appears CiviCRM tries to connect to civicrm.org. Probably to check for updates. Is there a way to disable all outgoing connections in CiviCRM and run CiviCRM without the server having access to the internet?

**Edit:** If I add 127.0.0.1 civicrm.org" to the host file, everything works. It looks like it's fine if a server returns 403 it just crashes when it can't connect to civicrm.org.

## Background Story

I have a client that stores a lot of sensitive information in CiviCRM. Because of all the security issues that come with all the popular CMS, I lobbied hard to separate CiviCRM from the webpage and to put in onto a separate server and to enforce strict rules for incoming and outgoing traffic.

So, I moved the CiviCRM to a fresh WordPress installation and put the whole thing behind a nginx reverse proxy that I configured as an authentication proxy with 2FA. The only exception I made is for /civi. We need public access to that path so that links in mailings will work. This works fine and should greatly reduce the attack surface.

To further improve security, I also want to block all outgoing traffic except for a few whitelisted ip addresses. The goal of this measure is to reduce the risk of malicious code trying to download further code or uploading any data away from the server.

# Answer
> 4 votes
Ok it turns out civicrm will work fine without internet when civicrm.org does not get resolved to an ip address. So in the normal scenario when there is simply no internet connection at all, everything works fine because dns will fail. However when dns gets resolved and the ip is not reachable (due to firewall blocking) civicrm will try to contact civicrm.org indefinitely until php or the webserver times out. I've decided to extend my simple ip whitelisting with dns whitelisting using dnsmasq. So now civicrm gets no longer resolved to an ip and everything works smooth.

A simple workaround if you don't want to setup dns filtering is to add the following to /etc/hosts:

```
127.0.0.1 civicrm.org

```

That way all http requests to civicrm are instead redirected to the local webserver that will respond with a 404 or 403 or a wrong tls certificate.

**Update:** I've wrote a blog post on how to build a whitelist ip/dns filter. Which is what I use for civicrm. You can find it here: https://craftcodecrew.com/building-a-simple-domain-name-based-firewall-for-egress-filtering/.

# Answer
> 1 votes
Civi runs ok without internet. Developer installs run in VMs/offline etc all the time. You can disable the update check at Administer - System Settings - Scheduled Jobs.

---
Tags: security
---


# Question
Title: How to change TO option in Outgoing email setup
Newbie here. I've just installed CiviCRM in a Wordpress site and am currently configuring. When setting up the outbound email, it propagates this "TO" address. This address doesn't exist and I don't know where to change it to a live address. Would someone please point me in the direction of where to change the default "TO" address that appears here?

# Answer
> 1 votes
The email will be the one on the contact record that connects to the user you are logged in as.

---
Tags: wordpress, email, installation, testing
---


# Question
Title: Last two mass emails have failed to go out
The error message says something about configuration and “cron job”. I have never managed our organizations emails so I am clueless about how to fix the problem. Talk to me like a 5 year old. Our tech person is currently out of commission.

# Answer
Without the full error message it is hard to understand what you need to do. I'll try to help with the basics.

Go to Civicrm home page menu item Administrator \> then drop down to \> Administration Console \> configuration checklist \> "From Email Addresses" Click to add from email addresses that you should already have setup and access to through your hosting/domain provider.

Now check your system status: Go to Administrator \> Administration Console \> System Status and verify that you have only green status on "Cron Running OK" with no warnings. If all green go to Administrator \> System Settings \> Scheduled Jobs and verify that your mailing jobs are enabled. I recommend you visit the Civicrm Documentation User Guide and search for Cron Jobs to understand what each one does, but enable at minimum "Send Scheduled and Send Reminders."

Now test and see if you can send the emails with no errors. I hope any of this helps.
> 1 votes

---
Tags: email, cron-job, configuration
---


title: Search kit list display broken

text:
# Question
Title: Search kit list display broken
My Search kit list display does not show a list of searches anymore.

The console says the following:

I am using civicrm 5.40 drupal 7.82 Anyone has a clue on where to start solving this?

# Answer
> 1 votes
I checked and that function definitely does exist. The first things I would try are:

1. Ensure you are using the search\_kit extension in core (in the `civicrm/ext/search_kit` directory). Delete any others e.g. in your site's extension directory, or in `civicrm/ext/search` which is the old path before the extension was renamed).
2. Clear all caches.

# Answer
> 0 votes
Thank you @Andrew for helping me in the right direction. I found a roque saved search that had no connection to a group. I deleted it and the searchkit list display workes again.

---
Tags: civicrm-home, searchkit
---


# Question
Title: How to hide individuals from Directory and only show organizations
I can't get the membership directory on my website to show only organization information. It leaves a line for each individual who signs up on behalf of the company (see image.) It doesn't "show" their info due to proper settings in each field but shows an icon for individual and leaves their info blank and unwanted lines within the directory to filter through.

So far here is what I've done:

1. created an organization profile (adds to smart group for current members)
2. created an individual contact profile form. (adds to smart group for mailing list)
3. created a contribution page that forces the user to register on behalf of organization with the organization profile that I custom created.
4. I've forced user creation for login purposes.
5. I've added the contact profile form to the profiles section in the same contribution page.
6. I've created membership types and used this form for the user to sign up.
7. Created a profile search Joomla menu item to link to the directory using the customized organization profile form I created.

Now how do I get ONLY organization lines to show up and exclude the individuals in this directory? What am I missing? I'm having a hard time figuring this out. I'm sure it is something simple??

# Answer
> 3 votes
Create a smart group having contacts of type Organization, Edit the profile, under Advanced settings choose the smart group for 'Limit listings to a specific Group?' field

HTH

Pradeep

---
Tags: civimember, profile, smartgroups, contact-view, directory
---


title: Group of unsolvable API and core errors

text:
# Question
Title: Group of unsolvable API and core errors
I really would appreciate any advice to dig deeper into the debugging of some errors. The reason may lay in our installation which is grown since late 2015 (I think it was version 4.2) and widely customized. But the errors appear in combination with some newly installed extensions.

1. civi expenses: when I try to add an expense, I get an ajax error `Error: Class name must be a valid object or a string in Civi\Api4\Service\Spec\SpecGatherer->getDAOFields() (Zeile 168 sites/all/modules/civicrm/Civi/Api4/Service/Spec/SpecGatherer.php).`
2. Same when adding a new dataprocessor `Error: Class name must be a valid object or a string in _civicrm_api3_basic_create_fallback() (Zeile 1347 von sites/all/modules/civicrm/api/v3/utils.php).`

In both cases it seems an api call is not registered correctly - v4 in the former and v3 in the latter).

I flushed all caches a thousand times.

The extensions and their db updates are up to date as the core's. The status page does not list any errors. I de- and reinstalled extensions and deinstalled old and unneeded extensions.

I tried to produce some stacktraces with drupal's devel module but w/o success. And I did ask the extensions' author about ideas but no luck as well.

php is 7.2, our civi ist 5.37.2, drupal 7 is latest.

We are desperately willing to buy consulting hours.

# Answer
Turns out ot was a php function call outside class methods in an old extension which used to work before but now caused this weird behaviour.
> 1 votes

---
Tags: extension, core, apiv4
---


title: Public case overview via checksum

text:
# Question
Title: Public case overview via checksum
Does anybody have a clue how to provide a personalized (id & checksum) case overview for clients in civicrm and drupal. I'm stuck with webforms, formprocessor, contact overview and profiles (all no activities and relationships list) and with drupal views (not personalizable by query params). What am I missing?

(I tried to use Data processor as well, but it's not working atm. Would this be the solution?)

# Answer
> 1 votes
This can be done by utilizing Webforms, CiviCoop's Dataprocessor and/or FormProcessor.

---
Tags: civicase
---