# Question
Title: How to search activity location without % being added?
In several places, and specifically, the "location" field of an activity, as searched using the Advanced Search, I've noticed that given `hello there` CiviCRM will actually search on `%hello there%`.

Is it possible to make it just search on what was provided?

# Answer
Under admin - customize data and screens - search preferences, there's an option for automatic wildcard.

It seems to still wildcard the end of the search string, but not the beginning.

That admin page explains it:

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

---
Tags: advanced-search
---


# Question
Title: Drupal View query for select fields produces different results that CiviCRM
I have a civicrm custom field for languages spoken like

```
English
French
German
...

```

You can have multiple selections.

SO a contact might select

```
English
French

```

from the listing.

If I do a search for "French" in CiviCRM it returns contacts correctly.

If I do it in Drupal via an exposed filter in a View, it returns no contacts.

If I do a Drupal search for English, it returns the contact.

It seems like it only returns a result if the item being searched is the first in the list - in this case English.

Ive tried allow multiple selection in the View filter and so on, with no result.

I want it to produce the correct results.

Any ideas? Thanks as always.

# Answer
> 1 votes
If you haven't upgraded Civi to 5.28.4 than apply below patch

https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-drupal/pull/617.patch

https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-drupal/pull/618.patch

---
Tags: drupal-views, multiple-choice
---


# Question
Title: Unable to access Registration Screen dropdown Civievnts
This is probably not a Civi issue, but any feedback would be appreciated. I have set up an event. Under Registration Screen, I have the option to Include Profile Top of Page and Include Profile Bottom of the Page. When I select an option in either or both fields and save, I am not able to access either field again. They are both greyed out. After much work with a colleague yesterday, we established this occurs only in Firefox. I have logged into Microsoft Edge and I am able to access the dropdown. I like using Firefox and I don't want to have to change between browsers when using Civi. Is there a way to solve this? Thanks.

# Answer
> 1 votes
Some of the forms on Civicrm won't allow me to access dropdown menus. The menus are greyed out. I thought this was a browser issue as it happens only on Firefox and Chrome, but not on MS Edge. It is caused by the Dashlane password extension. I started Firefox in safe mode, with extensions disabled. The issue goes away. I have removed Dashlane from Firefox and Chrome. Civi is working well.

---
Tags: civievent
---


# Question
Title: Best way to initiate a pay per month membership scheme
I’d like to offer a membership scheme whereby you can pay a yearly payment or monthly recurring payments. Is it possible to do this via the membership options or will I have to set up a recurring contribution?

# Answer
Try by doing this

1. Create a Membership type ABC with monthly rolling with auto renew required option ticked.
2. Create a price set with price field as select or radio with two options

2.a ABC membership type (monthly) - monthly amount - number of terms set to 1

2.b ABC membership type (yearly) - yearly amount - number of terms set to 12
3. Include the price set in membership signup form

Or

1. Create a Membership type ABC with monthly rolling with auto renew required option ticked.
2. Create a Membership type ABC-yearly with yearly rolling with auto renew required option ticked.
3. Include both the membership type in membership page

(Second method will work, but not sure about first method)
> 4 votes

---
Tags: civimember, recurring-contributions
---


# Question
Title: How do I reclassify a contact to be a household when it has been created as an organisation?
Some of our household contacts have been wrongly inputted as organisations and I would like to alter the classification of the contact to make it a household rather than an organisation and vice versa.....

# Answer
Helen, Welcome to CiviCRM stack exchange. The Contact Editor extension provides UI to change contact types.
> 2 votes

---
Tags: contacts, households
---


# Question
Title: Path problem for webhooks and other internal resources
I suddenly have a path problem on one of the sites I look after. I just updated to Civi 5.28.3 and wordpress was already at 5.5. I can't swear that the problem occurred because of the upgrade though.

The problem manifests itself when some URLs are built. I can see it in the webhook paths (missing the host and directory path):

```
Stripe Webhook missing or needs update! Expected webhook path is: ?civiwp=CiviCRM&q=civicrm%2Fpayment%2Fipn%2F4

```

and I have noticed the same behaviour for various placeholders in the Mosaico extension when i use the inspector to look at the code sent to the browser.

I looked at the resource path settings and they all look ok and are a match for the same settings on a working civicrm site I have.

I have done a slow scroll through civicrm.settings.php, but have seen nothing that seems concerning. The site was seemingly working last week before the upgrade. I suppose I could roll back, but I'd rather not if I can simply find where the path is being set and fix that.

Any thoughts?

UPDATE: I have, as suggested followed the threads in the post linked below, but all of my paths report correctly when viewed in the admin settings pages (see above) or when queried on the command line:

```
root@kaos01:/var/www/civi.sitename.org/wordpress# cv path -d [civicrm.files]
/var/www/civi.sitename.org/wordpress/wp-content/uploads/civicrm
root@kaos01:/var/www/civi.sitename.org/wordpress# cv url -d [civicrm.files]
"https://civi.sitename.org/wp-content/uploads/civicrm"

```

I have also explicitly set the civicrm.files path and url variables in civicrm.settings.php

```
$civicrm_paths['civicrm.files']['path'] = '/var/www/civi.sitename.org/wordpress/wp-content/uploads/civicrm';
$civicrm_paths['civicrm.files']['url'] = 'https://civi.sitename.org/wp-content/uploads/civicrm';

```

Certainly, it seems clear that the URL string is missing when needed, but I can't figure out where else to look. I have now discovered the problem on a second site.

FURTHER UPDATE: Though the problem is occurring in multiple places I'm focussing on the STripe plugin as it makes it very visible. The MJWshared extension uses CRM\_Utils\_System::url to assemble the needed webhook url. it seems clear that CRM\_Utils\_System::url is not finding the base part is needs, but it is not clear to me how that function goes about finding the bits it needs.

# Answer
> 1 votes
In the end, I was not able to find the solution. I "solved" it by setting up a new site and migrating the CiviCRM data to that.

# Answer
> 2 votes
This Question is related.

Extensions will read the path and URL so going through the steps in taht question should help.

You will need to update the stripe webhook as well.

---
Tags: wordpress, resource-urls, paths
---


title: Upgrade db failed for 5:29

text:
# Question
Title: Upgrade db failed for 5:29
I can't upgrade my database schema, I encounter error:

Found CiviCRM database version 5.29.alpha1.upgrade. Found CiviCRM code version 5.29.0. Cannot begin upgrade: The database indicates that an incomplete upgrade is pending. If you would like to resume, use --retry or --skip.

Retry or skip parameters doesn't change anything. How can I fix this db problem? I've tried some of the fix suggestions mostly about caches, from previous versions. Not helped.

It runs on Drupal8. Turns out the first problem occurs with:

Dropping SQL triggers... Preparing upgrade... Executing upgrade... .......Error executing task: %s

\[PEAR\_Exception\] DB Error: no such table

# Answer
When I had a similar problem under WordPress moving from 5.25 to 5.28 I discovered that the database couldn't manage the update while logging was enabled. Try disabling it (CiviCRM-\>Administer-\>System Settings-\>Logging) and trying again. You may need to return to a backup first.
> 2 votes

---
Tags: upgrade
---


# Question
Title: Links to a contribution page with checksum and contact ID generate a fatal error
I want to send email to members with a link to the membership renewal page profiled with their data. I create a suitable link including the contact ID and checksum, of the form

https://example.com/civicrm?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2&cid=xxx&cs=1ccf75cf22138bd255525af8c8c05dc4\_1599646931\_168

If I'm logged and the link is for me then it works. If I'm not logged a Fatal Error is generated, and the site (WP) presents the message "The site is experiencing technical difficulties".

Nothing appears in the CiviCRM log, but in the Apache log I see:

> Sep 09 13:56:02 \[Wed Sep 09 12:56:02.301893 2020\] \[php7:error\] \[pid 203\] \[client 172.18.0.1:41254\] PHP Fatal error: Uncaught CRM\_Core\_Exception: \[0: One of parameters (value: ) is not of the type Integer\n\n thrown in /app/data/wp-content/plugins/civicrm/civicrm/CRM/Utils/Type.php on line 470 Sep 09 13:56:02 172.18.0.1 - - \[09/Sep/2020:12:56:01 +0000\] "GET /civicrm?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2&cid=213&cs=1ccf75cf22138bd255525af8c8c05dc4\_1599646931\_168 HTTP/1.1" 500 3081 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0"

Using Civi 5.29 with WP 5.21. I had the same problem using Civi 5.25.0. I'm using a Cloudron LAMP stack, which makes things a little more complicated.

Any pointers most welcome.

# Answer
> 0 votes
I would guess that anonymous users are not able to view and use contribution pages. Confirm and change this at:

Administer-\>Users and Permissions-\>Permissions (Access Control)-\>Wordpress Access Control.

OR

https://yoursite.tld/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1

---
Tags: wordpress, checksum
---


# Question
Title: Report of activities with sums on custom fields
I am quite new to CiviCRM but I have programming skills with Drupal so I am looking for a best practice for our needs - and if programming is needed I would appreciate any links / information / hint how ro so that well in CiviCRM.

We have some custom fields on activities where we store some data like campaigns (this data is stored in three simple text fields where campaign names are saved - it has nothing to do with Civi) and for newsletter unsubscriptions we store the reasons why people unsubscribe (this is stored in Activity details field).

What we now need is a report showing us the sums of Activities gained by campaigns and unsubscription reasons. For that Civi need to sum up the Activities of the current month by the values in the fields.

In short: we need a list of the values stored in a period in a custom field of the activities with the sum of activities which have this value in the corresponding field.

# Answer
I think you can do this with https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport extension
> 2 votes

---
Tags: civireport, activities, reports, custom-reports
---


# Question
Title: Contact Summary Layout Extension - Screen display problem
I have tried to install the Contact Layout extension and get the following issue shown in the attached screen shot. I am using

* Drupal 7.72
* CiviCRM 5.24.3
* Contact Summary Layout 1.7.1
* Angular Profiles 4.6-1.0.2

I wonder if someone might point me in the right direction to get this resolved.

# Answer
I was setting this up in a staging environment which is not up to date with the latest versions of CiviCRM. If you go are running a version of CiviCRM earlier than 5.24 then you need to apply this patch which solves the problem. The issue is not seen in versions of CiviCRM 5.25 and later. (https://patch-diff.githubusercontent.com/raw/civicrm/org.civicrm.contactlayout/pull/79.diff)
> 2 votes

---
Tags: extension, contact-layout-editor
---


# Question
Title: Drupal 8 account creation using email in contribution page
Drupal 8 + CiviCRM. I am using email registration module to register with email address only, not the username. I have added Drupal account creation form in contribution page from CiviCRM profile settings. But the problem is, in the contribution page the account creation form is showing username and password, not based on the email registration I installed in Drupal. So my question is how can I make CiviCRM account creation from contribution page based on email registration module?

Thanks in advance.

# Answer
> 1 votes
Yes, there isn't any such validation. If you have required registration ticked and requires email verification to activate account than add a js to hide the registration field and populate it when email address is entered

---
Tags: drupal, profile, contributions
---


# Question
Title: CiviMail: Email marked as 'Draft and Unscheduled' but outgoing mail log says it's been sent
Civi 5.13.5, Drupal 7.67.

Hey everyone,

A colleague tried to send out a mailing through CiviMail to a smart group that we have been using for a few months now.

She tried to send the email but received this error message (unfortunately she didn't send a screenshot, only this text)

> Error Unrecognized value for setting 'flexmailer\_traditional'

We do have flexmailer currently installed and enabled as I've been trying to get Mosaico to work for months (no success), but we have previously successfully sent out mass mailings on CiviMail while Flexmailer has been enabled, without receiving this error message.

The email is still listed on Mailings \> Draft and Unscheduled Mailings (/civicrm/mailing/browse/unscheduled?reset=1&scheduled=false), with the status marked as 'Unscheduled'. It is not listed on the Mailings \> Scheduled and Sent Mailings page.

Any idea on why this has happened, and how I can fix it and/or ensure that it doesn't happen in the future?

Thanks in advanced!

# Answer
> 4 votes
I've corrected this when it has happened by clearing the cache (Administer\>System Settings\>Cleanup Caches).

---
Tags: civimail, flexmailer
---


# Question
Title: Invalid currency "Arr" when modifying member profile
Why do I get this error message when simply modifying a contact?

Obviously there is no "Arr" currency in Civicrm. This is a new message.

Any thoughts ?

# Answer
This is not really an "answer" but we solved this issue by removing an extra '?' in a contribution amount field in the database. It seems that it comes from importing the contacts but the field was empty in the csv import file. :-/ the mystery is still there but the error message not.
> 1 votes

# Answer
Looks the record has 'Arr' stored in currency field either in contribution or financial transaction table.
> 1 votes

---
Tags: contacts
---


# Question
Title: How can I access an activity's grouping value in CiviCases?
I've only started trying to change some features of an existing CiviCRM database in a testsystem (using CiviCases). So I am still a beginner, I excuse myself if this is a silly question, and any hint will be appreciated :)

I want to include a feature that will exclude all the activities with the grouping value "system" from the case view. Right now, the case view is spammed with activities not relevant to the users (for example, "Case type changed from ... to ..."). The activities are given this grouping value in a table called civicrm\_option\_value.

So I suppose I have to include some filter into the file /civicrm/CRM/Case/Form/CaseView.php, accessing each activity's grouping and testing it for "system". Can you give me any hint how I can access the activities' grouping value?

Thanks in advance, emma

# Answer
In the end, I directly changed the `CRM_Case_BAO_Case::getCaseActivity` function instead of creating an extension.

Specifically, I changed this function's `$where` variable to:

```
    $where = "
            WHERE cca.case_id= %1
              AND ca.is_current_revision = 1
              AND cov.grouping = 'visible'";

```

Here, "cov" is the alias for the table `civicrm_option_value`. The alias is already predefined in the `$from` variable above.

I added the grouping value "visible" manually in the database to those activities that should be visible in the case view.
> 2 votes

# Answer
The function that is responsible to build the list of activities on case is `CRM_Case_BAO_Case::getCaseActivity()`. It is very difficult to alter the function via custom module/plugin/extension.

I would create an extension that would alter the page callback for '`civicrm/ajax/activity`' to custom function (eg `CRM_ExtName_Page_AJAX::getCaseActivity` using hook\_civicrm\_alterMenu hook. Copy `CRM_Activity_Page_AJAX::getCaseActivity()` into your custom php file i.e `CRM_ExtName_Page_AJAX::getCaseActivity()` and change the line below line to your custom function which will basically copy paste of `CRM_Case_BAO_Case::getCaseActivity` function with change the where clause to include your conditions

```
$activities = CRM_Case_BAO_Case::getCaseActivity($caseID, $params, $contactID, $context, $userID);

```

HTH

Pradeep
> 4 votes

# Answer
I've posted almost exactly the same question and got some pretty helpful answers.

Especially the extension mentioned here seems to be really useful (I have not tried it yet, though).
> 1 votes

---
Tags: civicase, activity
---


# Question
Title: Creating Event Participation Certificate in PDF
I've seen posts with something similar but I am a bit lost. What I am trying to do is to add some automation in creating certificates to participants of an event. Our events are training sessions and we issue a certificate to those that attend. Here is what I'm trying to accomplish:

User is registered to attend the event At the conclusion of the event, we confirm registrations to those who actually attended. We update the records to those as "Attended".

Those that "Attended" would then get a certificate e-mailed to them.

Our certificates have a certain format with a border and a paragraph about the program. There is also a signature image on the certificate. Is there a way to have this certificate template in CiviCRM and with "Display Name" as a token and have the certificates generated from the "Attended" list and then e-mail them? It would be similar to PDF receives and PDF letters...just a preformatted certificate.

# Answer
If you’re on Drupal then you can do this with Views Integration -\> here is a tutorial with steps and screenshots on how to create a downloadable Hogwarts Certificate:

How can Members download their own Membership Certificate/Card?

Instead of pulling in Membership data -\> pull in Event/Participant data and status.
> 4 votes

---
Tags: email, pdf
---


# Question
Title: Signature error using AWS SNS/SMS to send SMS message using Civi extension - uk.compucorp.civicrm.amazonsns
AWS Error - Error Sending SMS through Amazon SNS \[SignatureDoesNotMatch\]: - The request signature we calculated does not match the signature you provided.

Using amazonsns extension. Can send individual messages using AWS console but errors when sending individual or mass sms from Civi. AWS user has full permissions for SNS. AWS mentions Version 4 generates signing key derived from signing access key rather than secret access key itself.

Any suggestions for troubleshooting this issue? Is extension generating the signing key using V4?

Thank you.

# Answer
> 1 votes
Found the problem. AWS has an option for a user to have either console usage or programmatic or both.

need to set programmatic use when creating the user and permissions for SNS as needed. Full SNS access permissions seem to work fine.

---
Tags: sms, aws
---


# Question
Title: How is "recent" defined when using recentmenu extension?
the recentmenu extension is a nice feature. How does it define recent? by number - e.g. last 12 items? Or date? this week, etc.

# Answer
> 2 votes
You can set preference by going to Administer \> System Settings \> Misc (Undelete, PDF,.......)

---
Tags: extension, menu
---


# Question
Title: What is required to run CiviCRM on Pantheon?
pantheon.io is a managed hosting service & devops infrastructure with support for Drupal and WordPress.

* What additional considerations are there for hosting CiviCRM on Pantheon?
* Are there any specific configurations or patches required?
* Is there any functionality which differs from hosting CiviCRM on a "standard" LAMP stack?

# Answer
> 11 votes
There are two approaches, use the CiviCRM Starterkit which currently is available as an upstream for Pantheon, or use a fresh CiviCRM install with some patches.

**CiviCRM Starterkit**

The starterkit is a Drupal distribution will get you most of the way since it includes a few patches so CiviCRM will work more smoothly on Pantheon's architecture. In order to use the the starterkit in Pantheon use the option provided when creating a new site from the Pantheon dashboard (and not from the distribution hosted on drupal.org). Unfortunately, the original maintainer is no longer working on CiviCRM projects so has been unable to maintain the distribution.

**CiviCRM with patches**

The other approach is to install CiviCRM manually on top of the default Pantheon upstream for Drupal and apply the patches from the Starterkit which patch CiviCRM core. One can then maintain the appropriate patches so they can be applied to each CiviCRM upgrade, similar to the repo "CiviCRM for Drupal on Pantheon" we've maintained for a client (though there are differences currently in what people are patching).

**Dealing with a dynamic system**

The main change required for CiviCRM to work with Pantheon is get around CiviCRM's approach of hardcoding the absolute paths to all its configuration. Pantheon (and other similar hosts) use environment variables to set the server paths and the database connections. That's because its app bindings will change depending on whether the fallback server kicks in to deal with the load on the site. I've found that this can happen often, especially when a large mailing is being sent out.

First the paths and database connections are set up dynamically in civicrm.settings.php (as described in Kalamuna's post and patched in the Starterkit and the alternative patches). Then one needs to deal with CiviCRM's caching of absolute server paths (at least up to 4.7). For now one can simply bypass the caching of configuration entirely with no discernible downside.

**Using Redis for caching and template storage**

Pantheon uses Redis caching to improve the handling of the Drupal cache (Redis can handle it better than MySQL). In order to get CiviCRM to also use Redis caching as the default for CiviCRM cache one needs to set up a new Redis caching class in CiviCRM and set it as the default in civicrm.settings.php. This has been merged into CiviCRM core for 4.7. (based on this git repo).

To use Redis for storing the compiled Smarty templates follow the approach outlined in this forum post, which for some has made noticeable improvements to the speed at which CiviCRM loads templates in Pantheon. It can be done by either using Drupal caching functionality cache\_get and cache\_set or with CiviCRM to store cache in Redis (patch). You may notice some side-effects with using scripts in extern/\* folder that don't bootstrap the CMS, so you may find these patches.  useful (for PaypalPro).

There are a few other minor patches as part of the Starterkit but these main ones will get you a long way to a stable and efficient CiviCRM on Pantheon.

**Cron**

By default Pantheon runs cron once an hour. In order to run cron more often, which is useful for more granular control of CiviCRM cronjobs (also useful for Drupal's Elysia cron), one needs to use an external cron or ping service.

**Emails and SMTP**

For basic Drupal setups on Pantheon just using their email service for sending basic transactional emails is okay. But it is highly recommended to use an external SMTP service for emails on CiviCRM (and for Drupal). CiviSMTP and Mandrill (with a CiviCRM extension) will work for Civimail and CiviCRM transactional emails.

**Benefits of CiviCRM on Pantheon**

As others have noted, being able to quickly clone the site into a new branch with MultiDev, or even just clone between the default environments, can be a big time saver for small development firms and for freelancers without the knowledge or support of building a similar system.

# Answer
> 4 votes
There are a few gotchas (and probably some I haven't run into). I moved one of my clients with about 40,000 contacts to Pantheon (business level plan) in October, and we've had pretty good success with it after ironing out a few major details.

The biggest problem is Smarty. Since it compiles its templates into the file system (Valhalla), they tend to run slower than molasses in January in Siberia. The solution can be found here:

https://forum.civicrm.org/index.php?topic=35125.0;nowap

The basic premise here is that loading compiled templates from Redis is going to be much, much faster than loading them from the file system. The thing you'll need to watch for with this is anything that uses Smarty now needs to bootstrap Drupal to have access to cache\_set and cache\_get for Redis. In general, you should keep anything PHP based (extensions, core file overrides, etc) in sites/all/something, not sites/default/files/...

The second biggest thing we ran into was a problem with accessing extensions on business level and above plans (since they run multiple appservers). For some reason Civi likes to cache paths, so I had to write some custom code into the extension loader to account for that (and pop it back to the right path when it gets off track).

The final big piece you'll need is Kalamuna's civicrm.settings.php modifications, which can be found here: http://blog.kalamuna.com/news/civicrm-pantheon

They're meant for D6, but I've found they work just fine with D7 (and you can go a step beyond and do the same path overrides for everything they don't, such as extensions).

I can tell you from my experience, which started about a year ago, there are some headaches that come along with this, but the benefits of MultiDev and the security of not having to worry about the platform (at least for me) are worth it in the long run. This has sped up our development cycle significantly, and the reliability and lack of late evening trouble calls have been worth it. We've been running 4.4.x since January, and the number of headaches I've had that are platform related have been steadily dropping once you get through the first big problem above (Smarty).

# Answer
> 3 votes
Patheon also does not provide an ability to tune your database. Its database configuration is more tuned for CMS's like Drupal and Wordpress, and not for CRM's like CiviCRM which can have huge data storage requirements.

Another aspect which I have difficulty with (though ultimately it doesn't matter too much) is the need to maintain the entire Drupal/Wordpress and CiviCRM codebase in Git. It just seems like such a waste when the core files are readily available elsewhere. But again, that's just a personal nit.

# Answer
> 2 votes
1. A bottle of aspirin
2. A lot of patience
3. A budget to migrate the site to another host

I actually can't remember all the issues, but I know that Tommy and Sanjay have had continual trouble with folks on Pantheon. There have been problems running upgrades on their dev sites because they're underpowered. Pantheon doesn't provide any cron except a `drush cron` every hour, so you have to have another server run cron for you if you want a decent frequency. There have been other issues that don't immediately come to mind, but I have yet to see any advantage to using Pantheon.

Fundamentally, it's just overpriced, gussied-up shared hosting. Anyone will do better with a VPS and their dev/staging/production sites set up in regular git repos.

# Answer
> 2 votes
We have a few sites on pantheon running civicrm. We started with the civicrm\_starterkit. There were a few issues to iron out but Pantheon does save you the headache of worrying about hosting, and multi-dev environment goes a long way. Also with the kalabox from kalamuna, local development for pantheon sites is life changing.

We updated the starterkit's civicrm 4.4 to 4.6 without any issues.

# Answer
> 2 votes
I'm currently testing a CiviCRM extension which regenerates cache (updates the file paths) when they change on Pantheon.

What is the best way to override changes to CRM\_Core\_Config?

It's a CiviCRM extension, which I'm happy to share if it works as expected.

# Answer
> 1 votes
Made this module for Drupal, which flushes the CiviCRM cache when the disk path changes:

https://github.com/adam-devapp/drupal-pantheon-civicrm-cache-clear/tree/master/civicrm\_cache\_clear

The path is cached, so there is only the initial database call. If you're site switches servers a lot, it may cause some slowness whilst the cache is regenerated, but works well for my needs and hands off.

The alternative was to submit a path to Smarty to support Redis template caching (smarty), as to stop hacking third party libraries. Currently, the only way to add Redis caching to smarty, is to hack smarty distributed with CiviCRM.

# Answer
> 1 votes
All of the existing documentation assumes you'll be using Drupal 7 with Pantheon, with the exception of my "migrating Drupal 8/CiviCRM to Pantheon" documentation. I couldn't find anything for WordPress.

Fortunately, Herb's answer above covers most of what you need, except you'll need an alternative `civicrm.settings.php`. You can find a civicrm.settings.php for WordPress on Pantheon here.

# Answer
> 1 votes
I worked through how to do this for D8!

https://webform-civicrm.io/installing-drupal-8civicrm-pantheon

---
Tags: hosting, pantheon, hosting-providers
---


# Question
Title: Problem with permissions to edit message templates
I have recently upgraded from CiviCRM 5.24 to 5.27.2 (on Drupal 7.72), and a user reports a new problem with editing message templates, specifically the User Message Templates. She can open the template, select edit, make the changes, but when she tries to save it gets an Authorisation Failure message.

She has the permissions Edit Message Templates, and Edit User-Driven Message Templates, which worked OK before.

Is there some change I need to make to the configuration, or is this a regression bug?

Thanks, Tony

The Error message is:

"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. Authorization failed"

on a white screen. The template text is the following, but get the same error with a single line of text without any formatting at all.:

```
{capture assign=doctype}{activity.scheduled_reminder}{/capture}
{capture assign=renewal}Renewal Reminder{/capture}
{capture assign=lapsed}Membership Lapsed{/capture}

{if $doctype == $renewal} LALG Renewal Reminder{/if}

{if $doctype == $lapsed} LALG Membership Lapsed{/if}

     {contact.first_name} {contact.last_name}
     {contact.street_address}
     {contact.supplemental_address_1}
     {contact.city}   {contact.postal_code}

{contact.email_greeting}

{if $doctype == $renewal}

Your membership will expire on  {latestcurrentmembership.end_date}

Membership Type:  {latestcurrentmembership.type}

You can find all the details as to how to renew your membership  by visiting  the LALG Website

Membership can be renewed online or by downloading a form from the website and taking this with your payment to David's bookshop.

Yours sincerely,

Elaine Fox

Chair

{/if}

{if $doctype == $lapsed}

Your LALG membership has recently expired, and you will no longer receive the monthly newsletter or other membership benefits.

Membership can be renewed online or by downloading a form from the website and taking this with your payment to David's bookshop.  You can find all the details as to how to renew your membership  by visiting  the LALG Website.

Membership Type:  {latestcurrentmembership.type}

Expiry Date:            {latestcurrentmembership.end_date}

Yours sincerely,

Elaine Fox

Chair

{/if}

```

# Answer
> 1 votes
I've identified the source of the problem and suggested a hack to work around the issue.

# Answer
> 0 votes
Also reported as https://lab.civicrm.org/dev/core/-/issues/2008, which has been "Closed ... as https://github.com/civicrm/civicrm-core/pull/18437 is now merged."

---
Tags: permissions, message-templates
---


# Question
Title: Can i used different Database on remote server for civicrm logging?
Is it possible? Used the different database on remote server for civicrm logging. Means: Currently i am using two databases one for drupal and second is using for Civicrm. Both are on different remote server. Now i want to create a third server for civicrm logging database. It is showing error "DB Error: no such database". I already configured in civicrm.settings.php file. define('CIVICRM\_LOGGING\_DSN',mysql://myserverdetail);

# Answer
> 2 votes
Parvez is right that you can use a different DATABASE but if you mean a different HOST then the answer is no. The triggers that are used don't support that.

# Answer
> 2 votes
Yes perfectly possible, we do it all the time. You can set the logging DSN in your settings file (CIVICRM\_LOGGING\_DSN) if its not set then CiviCRM falls back to the CIVICRM\_DSN

Sorry - just read your whole question!

I would check that the user has permissions from the CIVICRM\_DSN to the CIVICRM\_LOGGING\_DSN i.e. if the CiviCRM database user cannot access the logging database then maybe thats causing the issue.

---
Tags: drupal, civicrm.settings.php
---


# Question
Title: Can Civirules differentiate between 'pending' and 'added' group status?
I'm using Civirules to assign tags to members who add themselves to a group via public webform using the Linked Trigger 'Contact is added to group,' but the group requires double opt-in. Civirules doesn't seem to differentiate between group status types, so the tag is immediately applied to all 'pending' members even before the member has confirmed via the link in their email. Is there a way for Civirules to recognize the difference between 'pending' and 'added,' and only apply an action when one's group status is 'added'?

# Answer
You should add a *Field Value Comparison* condition. This lets you only fire the rule if a field has a certain value.

For *Condition Parameters* set the following values:

*Entity*: **GroupContact**
*Field*: **Group Contact Status**
*Operator*: **is equal to**
*Compare value*:**Added**
> 4 votes

# Answer
As a workaround could you create a smart group for everyone added to the group (not pending) and use that for your CiviRule?
> 2 votes

---
Tags: groups, civirules, tags, pending
---


# Question
Title: How to export member type after an advanced search
I am doing an advanced search in our database.

Members Current - Primary and a proximity search for these members to be within 100kms of a postal code.

my problem: when I go to export my results I would like it to show the MEMBER type as well as some basic contact details. I do not know how to add this field and it isn't in any of the fields available for selection "Member Type"

# Answer
Welcome to CiviCRM Stack Exchange Michael ^^

In the upper left corner of the Advanced search you will find a dropdown field called "Display Results As". If you select memberships the search will yield a list of memberships instead of contacts.

You should then be able to select "Export Members" from the action menu and include all membership details including the type.
> 1 votes

---
Tags: search, export
---


# Question
Title: Preparing for move to utfbmb4 should I limit character length?
I'm looking into moving our database to utf8mb4 - as indicated will be required in the future. I've been trying to find information about the possible impact in doing so and I found this post: https://mathiasbynens.be/notes/mysql-utf8mb4

That article indicates the following (it has a nice, thorough explanation if anyone else is interested, this is just the summary of one section):

> The InnoDB storage engine has a maximum index length of 767 bytes, so for utf8 or utf8mb4 columns, you can index a maximum of 255 or 191 characters, respectively. If you currently have utf8 columns with indexes longer than 191 characters, you will need to index a smaller number of characters when using utf8mb4. (Because of this, I had to change some indexed VARCHAR(255) columns to VARCHAR(191).)

So does it make sense that if I need to create any custom text fields in the near future (before making the swap) I should go ahead and limit the database field length to 191 (or less)? I'm looking for someone to verify I have not jumped to the wrong conclusion.

Does this also imply that I should look through my existing data for any fields with data that might be longer than 191 characters - and then adjust? I assume I could not adjust the data but it may be truncated upon conversion to utf8mb4 if it is longer than 191 characters.

# Answer
> 3 votes
If you have a modern (e.g. Debian 10+) server installed fresh, you should be OK. If not, I believe these are the settings you want in your server config (e.g. `/etc/mysql/mariadb.conf.d/50-server.cnf` if you're using MariaDB on Debian)

```
innodb_large_prefix = 1
#https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_format
innodb_file_format = barracuda
# https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_per_table
innodb_file_per_table = 1
# Set default row format to a Barracuda one. COMPRESSED is useful on a
# per-table basis.
innodb_default_row_format = DYNAMIC

```

The large prefix is key here:

> If set to 1, tables that use specific row formats are permitted to have index key prefixes up to 3072 bytes. If not set, the limit is 767 bytes.

The row formats allowed are DYNAMIC and COMPRESSED. (The latter can be very handy if you don't do many writes to a table with a lot of compressible data, e.g. activities, but that's probably a special case.)

**So then you don't have to shorten your text fields.**

# Answer
> 2 votes
It's a good question. I haven't come across any problems like this. I see one varchar(512) custom field in utf8mb4 and the longest value it has at the moment is 383 and both the field and index seem fine, but it wasn't converted it's always been utf8mb4. I do have innodb\_default\_row\_format=dynamic which I remember seeing somewhere that's what tables need.

That article is from 2012 too so some things may have changed.

For indexes, civi only creates an index for custom fields if you check the is\_searchable box, so that could be another way to work around indexes at least if you end up with those troubles.

Also it's not well-advertised but you can test conversion by using api3 system.utf8conversion which will convert your tables. You don't need to manually run alter table statements.

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


# Question
Title: How to make a report with each Financial Type as a column?
I need a report of contributions which has a row for each contribution, and then analysis by showing a column for each financial type, and the total amount of the contribution in the right financial type column. Is there any way of doing this without programming an extension?

I include a screenshot of the kind of thing I need. The columns to right of VAT are financial types, so each payment is broken down into VAT (if applicable) and one or more financial types.

# Answer
> 2 votes
I am not sure you would get the exact requirement you looking for but you can use contribution pivot reports to group the records based on financial type via

1. Extended report

or

2. Report plus

# Answer
> 2 votes
The new search extension (ships with 5.30 but is still hidden & you have to install via the api) gets close - you can see it's giving numbers for financial type & I don't have a friendly theme enabled but the totals are there

---
Tags: civireport
---


title: Wordpress Server Migration

text:
# Question
Title: Wordpress Server Migration
sorry for what is probably a ridiculous question.

Our wordpress site was migrated to a new server by our host, the domain is unchanged. Now several of the CIVICRM features are not working anymore. Such as payment processing for example or signing up to our newsletter. One of the issues for example is our stripe webhook failing as it now can't reach https://example.org.au/?page=CiviCRM&q=civicrm/payment/ipn/3. When I try to go to the live links for contribution pages, it just shows: "Do not delete this page. Page content is generated by CiviCRM."

I've cleared the cache and reset the paths and looked at the civicrm.settings.php files but couldn't find a place where I had to link to a new IP address. I've also looked for a guide on the CiviCRM page but was unable to find clear instructions on what to do.

If someone can point me in the right direction it would be super appreciated, thank you for the help

cheers, David

# Answer
DNS changes can take up to 48 hours to propagate, and the time can vary widely for each computer trying accessing your site due to the many stages of caching involved. Your payment processor might not have received the new DNS records yet, so wait a day or two. Most/all will retry each payment notification for a number of days/weeks, so you will not lose any information if the card was actually charged.
> 0 votes

---
Tags: wordpress, migration
---


# Question
Title: How can I find contacts who have multiple home email addresses when on hold?
I would like to be able to easily check contacts with emails on hold designate other emails as primary, so the contacts continue receiving emails. I can make a profile to show primary and home, billing, other etc email addresses to quickly see which contacts have other email addresses. However, I can't figure out how to easily see if a contact has more than one home email address, as the search view only displays the first one. Is there any way to make this visible in a search view or even searchable?

# Answer
There isn't any UI in vanilla civicrm install that provides a way to find multiple same email address or phone or address for a contact. You can either use Mysql knowledge to get all the duplicate records or create an extension to manage from UI
> 1 votes

# Answer
I found a way to do this with the Data Processor extension, but it isn't pretty.

Use data sources email and contact in group (filter to a group you've created, perhaps with the mail bounce report), with match on contact ID = email contact. Fields: raw field value email, raw field value contact ID, raw field value email location type (optional).

Output a CSV and then you can find duplicate contact IDs with non-matching emails in this spreadsheet.
> 1 votes

---
Tags: email
---


title: Donation Pages Automatically Redirect

text:
# Question
Title: Donation Pages Automatically Redirect
# Issue

Links to donation pages result in automatic redirects to the home page for users other than administrators. Base page loads correctly. ACL is configured to allow contributions from all types of users (anonymous included).

# Configuration

WordPress Version: 5.5.1
PHP Version: 7.3.19
MySQL Version: 5.5.5
Server Software: nginx/1.17.6
Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
Session Save Path:
Session Save Path Exists: No
Session Save Path Writeable: No
Session Max Lifetime: 1440
WP Multisite Mode: No
WP Memory Limit: 40M

Currently Active Theme: Divi: 4.6.3

# Wordpress Plugins

Caldera Forms: 1.9.2 Active
Caldera Forms Stripe: 1.4.7 Active
Caldera Forms Style Customizer (CFSC) for Divi & Extra: 1.0.3 Active
Caldera Forms Users: 1.3.10 Active
CalderaWP License Manager: 1.2.10 Active
CF CiviCRM: 1.0.5 Active
CiviCRM: 5.29.1 Active
Mail Templates For Caldera Forms: 1.0.4 Active
Query Monitor: 3.6.4 Not Active
Really Simple SSL: 3.3.5 Active
WP Mail SMTP: 2.4.0 Active

# CiviCRM Extensions

Access Control by Financial Type for Reports (biz.jmaconsulting.financialaclreport) Enabled 1.1
CiviMobileAPI (com.agiliway.civimobileapi) Enabled 5.3.0
Stripe Payment Processor (com.drastikbydesign.stripe) Enabled 6.4.2
iATS Payments (com.iatspayments.civicrm) Enabled 1.7.2
Event ICS (eventics) Enabled 1.0
Firewall (firewall) Enabled 1.1
CSS/JS minifier for AssetBuilder (minifier) Enabled 1.0
MJWShared (mjwshared) Enabled 0.8.1
FlexMailer (org.civicrm.flexmailer) Enabled 1.1.1
Sweet Alert (sweetalert) Enabled 1.3
Mosaico (uk.co.vedaconsulting.mosaico) Enabled 2.5.1597918155

# Answer
> 3 votes
Since you have the extension **Access Control by Financial Type for Reports** that means you have Access Control by Financial Type enabled. You have to set additional permissions when this is enabled.

> You must grant the add and view permission for each financial type to the anonymous user role for visitors to be able to access your contribution pages.

I submitted this PR to the docs as I had encountered this issue as well.

---
Tags: civicontribute
---


# Question
Title: ExtendedReport extension throws fatal error on WordPress Access Control save settings
With the extension enabled (nz.co.fuzion.extendedreport) the settings in WordPress Access Control cannot be saved.

Disabling this extension allows the settings to be saved.

The error displayed is "API error: is not of type String". This is displayed when enabling the extension or saving WordPress Access Control settings.

This is on Wordpress 5.5.1, with CiviCRM 5.28.1.

This is the trace:

```
Exception: "API error: is not of type String"

#0 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(287): CRM_Core_ManagedEntities->onApiError("ReportTemplate", "create", (Array:8), (Array:3))
#1 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(173): CRM_Core_ManagedEntities->updateExistingEntity(Object(CRM_Core_DAO_Managed), (Array:4))
#2 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(146): CRM_Core_ManagedEntities->reconcileEnabledModule(Object(CRM_Core_Module), (Array:34))
#3 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(127): CRM_Core_ManagedEntities->reconcileEnabledModules()
#4 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(398): CRM_Core_ManagedEntities->reconcile()
#5 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/ACL/Form/WordPress/Permissions.php(179): CRM_Core_Invoke::rebuildMenuAndCaches()
#6 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(504): CRM_ACL_Form_WordPress_Permissions->postProcess()
#7 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(144): CRM_Core_Form->mainProcess()
#8 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(45): CRM_Core_StateMachine->perform(Object(CRM_ACL_Form_WordPress_Permissions), "next", "Next")
#9 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_ACL_Form_WordPress_Permissions), "next")
#10 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_ACL_Form_WordPress_Permissions), "next")
#11 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("next")
#12 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#13 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(285): CRM_Utils_Wrapper->run("CRM_ACL_Form_WordPress_Permissions", "WordPress Access Control", (Array:0))
#14 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#15 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
#16 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-content/plugins/civicrm/civicrm.php(1601): CRM_Core_Invoke::invoke((Array:4))
#17 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress->invoke("")
#18 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters("", (Array:1))
#19 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
#20 /Users/cfrost/vhosts/mysite.dev/httpdocs/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#21 {main}

```

# Answer
Uninstalling and reinstalling the extension fixed an issue with a report template, causing the error.
> 1 votes

---
Tags: wordpress
---


title: Can't i create study result for student

text:
# Question
Title: Can't i create study result for student
i doing customization CiviCRM,

My Charity working for Education(Donor, student, volunteer). One student have 1 study result/year.

example: student study 12 year then student have 12 study result.

Can't i do that. Thanks

# Answer
sorry. i explain now,hehe. i want customize Student profile in Contact. Our students after each academic year will have 1 corresponding academic results.

For example: a student who studied for 10 years will have 10 different results.

* In 2019: student Hai have GPA:5.0 , study result: Pass
* In 2020: student Hai have GPA:6.0 , study result: Pass
* In 2021: student Hai have GPA:7.0 , study result: Pass.

When I customize student profile, I think it only saves 1 study result for 1 student in profile. Currently I want a student to be able to save many study results(1 Student-many result). When I open the student profile, I can see all of that student's academic results over the years. Please see image attached. thanks
> 0 votes

# Answer
You can create a custom field set by going to your CiviCRM menu **Administer \> Customised Data and screen \> Custom Fields**. During the setup process remember to tick “**Does this Custom Field Set allow multiple records?**

You can also choose “**Display style**” for how you want to see this result, as a tab or inline or table. Depending on the option you choose, you will see the results within a contact record.
> 0 votes

# Answer
Thanks so much, i try follow up your susgestion.

i add study test tab & table, but when create new student, i not see it in form.hehe
> 0 votes

---
Tags: custom-fields
---


# Question
Title: How can i check current user is administer in civicrm hook?
I am using the hook\_civicrm\_tabset for rename the tab name. Tab rename code is working properly. But i want to add condition if user is admin then rename the tab name. How can i check user is admin in hook\_civicrm\_tabset hook.

# Answer
> 1 votes
You could use something like `CRM_Core_Permission::check('administer CiviCRM')` which returns true or false depending on if they have that permission.

---
Tags: hooks, civicrm-home
---


# Question
Title: Icons are not populating to be selected for Activity Type Options
Until today I have been able to change or add an icon to an Activity Type. Now when I click on the icon, the Choose Icon box pops up with a search dialog and the option for no icon but I'm not seeing the list of selectable icons underneath.

After noticing the behavior I have:

* Rebooted the server
* Cleared cache locally (Wordpress and CiviCRM cache) and from Cloudflare.
* Upgraded from CiviCRM 5.29.0 to 5.29.1
* Disabled all extensions and reenabled them.
* Disabled all extensions except for Shoreditch and CiviCase v5.

Example screenshot:

It may be important to mention that I am using Wordpress with CiviCase and the CiviCase v5 extension.

Any ideas what could be causing this? It worked perfectly until this morning and I didn't add anything new to the environment. Many thanks!

# Answer
This was caused by an issue with my local disk cache. Clearing the cache from my browser allowed the icons to be displayed again.
> 3 votes

# Answer
There are a bunch of icon changes in civi over a couple releases and shoreditch might not be up to date with all of them. There were similar reports for "more" dropdown icons. You could try the latest master version of shoreditch.
> 0 votes

---
Tags: wordpress, civicase, activities, activity
---


title: Unable to configure CkEditor in 5.29.1

text:
# Question
Title: Unable to configure CkEditor in 5.29.1
In CiviCRM \> Administer CiviCRM \> Display Preferences (/civicrm/admin/setting/preferences/display?reset=1) there's a Configure CKEditor button that does nothing.

CKEditor is stripping out certain style declarations. I want to be able to have simple declaration for adaptive images and the system won't let me.

Any ideas? Thanks in advance for any help...

# Answer
Is there any JS error on browser console? Can you go to editor link directly? (civicrm/admin/ckeditor?reset=1)
> 1 votes

---
Tags: ckeditor
---


# Question
Title: CiviMail Unsubscribe link goes to a generic/undefined Wordpress page
When the recipients of my mailing try to click on the "Unsubscribe" link the user is taken to a generic/undefined page that reads: "CiviCRM Do not delete this page. Page content is generated by CiviCRM." The user is also not marked as having opted-out of all bulk mailings.

The link generated is generated via {action.optOutUrl} which yields "http://besanthill.nfshost.com/civicrm?page=CiviCRM&q=civicrm%2Fmailing%2Foptout&reset=1&jid=244&qid=7847&h=0db2c5d63683bd63", for example.

I've looked at the suggestions on this post but the CMS base page and the permissions appear to be set correctly (that is, "access CiviMail subscribe/unsubscribe pages" is enabled for anonymous.) And ideas?

Thanks in advance, Richard

# Answer
This is now fixed. The solution was to upgrade CiviCRM to the latest version.
> 1 votes

---
Tags: civimail, unsubscribe, opt-out
---


title: Unable to manage CiviCase cases

text:
# Question
Title: Unable to manage CiviCase cases
I've installed CiviCRM, and made sure my Drupal 8 role settings give Admins full permissions for CiviCRM.

I am able to create cases for constituents, but cannot do anything else such as add Activities, Timelines, sort/filter by status, or see whatever is behind the hamburger menu beside the status, access the settings on the Activities tab, etc.

On the Summary tab there is a "Tasks" section but from the documentatio, I don't know what that's for and I don't see any option to add a task.

# Answer
If you are using shoreditch then this might be the problem as currently it's not guaranteed to work on drupal 8.

It is a requirement for the CiviCase extension - but you can use CiviCase component without the extension.
> 1 votes

---
Tags: civicase
---


title: Automated Invoices

text:
# Question
Title: Automated Invoices
I was wondering if there was a way to automate sending invoices. Specifically, I want an invoice to be sent when a membership is expiring in x amount of days.

Currently, I'm thinking about using Message Templates to do this. Consequently, I'd be mimicking an invoice in a Message Template and use tokens to show prices and other info specific to the recipient/member.

Is there any better way to accomplish this?

# Answer
I can offer my experience here. I started off using Scheduled Reminders as an automated invoice and used tokens as you suggest for member specific details for the recipient. However I found that increasingly organisation would not accept an email based invoice and required an invoice in the form of a PDF attachment, even if the email invoice contained all the required info to make it a tax compliant Invoice.

What I did instead was use the Scheduled Reminders to send out a Renewal Notice which contained a checksum link, so the member then renews the membership on our website page and clicks the option for 'Pay Later' and then an invoice as a PDF attachment is sent to them automatically with their renewal confirmation email. Hope that may help, Renaee.
> 3 votes

# Answer
Scheduled reminders should provide you the required functionality.

Administer -\> Communications -\> Schedule Reminder

You should be able to set up the required reminders from there. Hopefully it's pretty self explanatory - however there is more information here:

https://docs.civicrm.org/user/en/latest/email/scheduled-reminders/#using-scheduled-reminders-for-memberships
> 1 votes

---
Tags: extension, email, scheduled-reminders, invoice, automation
---


# Question
Title: Is there a problem with the REST interface on CiviCRM API?
I have the CiviCRM API REST interface working fine for retrieving Case information for individual cases. But I'd like to use the options features options.limit and options.offset so I can retrieve data page by page from CiviCRM in response to a search. But whatever I try, nothing seems to alter the limit and the offset numbers of the retrieved records. Only the first 25 records are returned, ie the default number. Has anyone else had a similar problem?

The json payload looks like this:

```
json={
"return":"id,custom_116,custom_16",
"custom_116":{"IS NOT NULL":1},
"options":{"limit":100,"offset":100}
}

```

This is the REST format suggested by the API explorer (v3).

Am I doing something wrong? The search criterion ("IS NOT NULL") is ignored as above, but searches works correctly when not in object format, eg "custom\_116":"StringToSearch". The limit and offset parameters are also ignored. So it seems likely that the problem is to do with the object format for these parameters. Any ideas? Or is there an alternative way of formatting the query json? Thanks.

CiviCRM 5.9.0 Joomla 3.9.1 php 7.0.31

# Answer
> 2 votes
In the end, I was only able to make it work by using array notation. Some examples below. All these worked in the array notation on the right, but not in the object notation on the left:
**"options": {"limit":"100","offset":"100"}** ---\> **"options\[limit\]": "1","options\[offset\]": "100"**
**"custom\_1": {"IS NOT NULL":"1"}** ---\> **"custom\_1\[IS NOT NULL\]": "1"**
**"custom\_1": {"LIKE": "%stringtosearch%}** ---\> **"custom\_1\[LIKE\]":"%stringtosearch%"**
So in my case my json payload looked like this:

```
json = {
      "return": "id,custom_116,custom_16",
      "custom_16[IS NOT NULL]": "1",
      "custom_15[<>]": "",
      "options[limit]": "50",
      "options[offset]": "50",
      "options[sort]": "id"
    }

```

Next task is to work out how to convert the OR option into array notation:
"options":{"or":\[\["custom\_15","custom\_16"\]\]} ---\> ???

# Answer
> 2 votes
I, too, had problems getting the json parameter to work when using the REST URL generated by API Explorer. I kept receiving the following error:

```
{
"is_error": 1,
"0": "error_message",
"1": "Unable to decode supplied JSON."
}

```

The response about using array syntax didn't work as written, but it did put me on the right track. Here is what I ended up with:

https://mysite.org/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api\_key=apikey&key=sitekey&sequential=1&json=1&last\_name\[LIKE\]=%Wag%&options\[limit\]=100

The array syntax isn't inside the json parameter; rather it's part of its own querystring parameter.

Doing this also worked:

https://mysite.org/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api\_key=apikey&key=sitekey&sequential=1&json=1&last\_name=Wagner&limit=100

However, array syntax was the only way I could get the comparison to work with something other than equality.

---
Tags: api, civicase, rest
---


# Question
Title: Scheduled reminder linked to deleted event is not deleted: bug or feature?
Create an event with a scheduled reminder (e.g. to send a confirmation 1 day before the start). Then delete the event. ==\> the scheduled reminder is not deleted (see Administer \> Communication \> Scheduled reminders)

I would expect the scheduled reminder would be deleted as well. Is this a bug or a feature? What would be your expectation?

# Answer
> 2 votes
I wouldn't say its a bug, rather missing feature. The schedule reminder UI also allows to update the reminder to include more events(for reminder which was configured from events tab) so it is additional discussion to delete the reminder if its only used for deleted event or disable it so that we maintain the log history if incase any reminder was sent for the reminder.

Would appreciate if you can send a PR to core to delete the reminder.

---
Tags: civievent
---


# Question
Title: JPG files uploaded as notes can't be viewed
I've attached some JPG files to notes in contact records, but them I can't open them and if I save them locally then most applications can't open teh saved version and say they aren't in a supported file format, though surprising, Adobe Acrobat will open them (which is not a solution for most users).

I'm using WordPress 5.3, CiviCRM 5.15.1

Any ideas what could be going on?

# Answer
> 3 votes
Eventually I found out what the problem is and it is caused by the child theme that I had created. Another problem elsewhere that had an extra blank line at the start of a news feed and Demerit's comment above suggested this as a solution. When I changed to the base theme all was fine. Going back to functions.php for the child theme I found a blank line outside (though not at the start of the file which is why Demerit's suggestion didn't lead me to the solution before).

# Answer
> 0 votes
Do you have Shoreditch theme installed? This will complicate a few things in WordPress and even the fabulous CiviCRM Admin Utilities WP-Plugin won't fix it.

Try this extension from bgm: https://civicrm.org/extensions/shoreditch-wordpress-workarounds

---
Tags: wordpress, theme, images
---


title: Shoreditch looks different in wordpress

text:
# Question
Title: Shoreditch looks different in wordpress
The contact screen in shoreditch on wordpress looks like this; Different from the screens i find on the extension page. Is there a reason, or am I doing something wrong?

# Answer
> 3 votes
The documentation in Shoreditch states:

> Requirements
>
> * Drupal 7
> * CiviCRM, v5.0+ recommended
> * "CiviCRM Theme" module enabled
> * "Seven" theme set as CiviCRM Administration theme

My understanding is that the layout part is then heavily depending on the Seven theme, which is why it appears so differently in WordPress. Please correct if this is a misunderstanding.

If you use the CiviCRM Admin Utilites plugin, you can enable WP Admin Styles, published blog post with an overview.

# Answer
> 0 votes
Try this extension from bgm: https://civicrm.org/extensions/shoreditch-wordpress-workarounds

It's working better than the CiviCRM Admin Utilities WP-Plugin.

---
Tags: wordpress, extension, shoreditch
---


# Question
Title: How to add extended reports blocks to Contact Layout Editor
I asked a question about the Contact Layout Editor and how to add blocks such as memberships and contributions and have the answer so am posting here.

I struggled to find out how to create a block for Contact Layout editor for this type of listing so sought the help from Coleman.

# Answer
Solution:

Once the ExtendedReport extension has been added, there will be additional reports shown in the CiviReports section. To be able to use one of these as a block, go to Administer -\> CiviReport -\> Create New Report From Template and then find the Extended report you want and click on that report. The next screen it takes you to is the important one. You can make amendments to the report there and you must go to the Display Options tab and select "Make available for contact summary page (requires contact layout editor extension)", then refresh the results and then view the output. Next, you have to use the Actions dropdown to "Save a copy" and call it the name of the block you want to appear in the Contact Layout Editor.

Once you have done this, the block will appear in Contact Layout Editor (you may have to go out and back in to the Contact Layout Editor for this to show) and then you can drag it in as you can the other blocks.
> 3 votes

---
Tags: contacts, custom
---


# Question
Title: How can I send an invoice to a participant, manually, without double sending
workflow: I would like to use event registration with option "pay later". After a check I would like to change the participant status and send an invoice. I dont' find a way to do this automatically, but it is also ok do to this manually. The participant registration and also the invoices should be happen over a year, so I need to know if the participants have already received an invoice, to prevent someone getting the invoice twice.

question:

1. is there a way to send an invoice after changing the participant status?
2. how to filter out participants which have already received an invoice?

thanks for your help David

# Answer
> 1 votes
daveawe12323, welcome to stack exchange civicrm.

There are two ways of sending notification to user

1. Send Event receipt.

When you edit the participant using backend participant form, you should see 'Send confirmation' option. When checked the participant will receive receipt about the event having details of event and payment. But no activity will recorded in the system when a receipt is send.

2. Send Tax invoice

If you have 'Tax and invoicing' enabled, than you can create a invoice on the payment. You can download the invoice and send via email or you can email the invoice from CiviCRM. Both the option will create activity in Civi to track when the invoice was downloaded or emailed.

---
Tags: civievent, invoice, payment, participants, paylater
---


title: Update to 5.29.0 get frozen

text:
# Question
Title: Update to 5.29.0 get frozen
When updating civicrm/civicrm-core (5.28.3 =\> 5.29.0), the process get frozen while

```
[Executed: Upgrade DB to 5.29.alpha1: Fill civicrm_relationship_cache (1 => 5000)]

```

After reinstallation of a backup and removal of all caches, still the update gives a same frozen installation.

===========

Here's what I found in the Civi logs:

```
465 Sep 07 20:44:40 [info] $CRM_Queue_Page_AJAX_runNext_error = PEAR_Exception: "DB Error: constraint violation"

421 Sep 07 20:44:40 [debug] $backTrace = #0 /PATH/vendor/civicrm/civicrm-core/CRM/Core/Error.php(937): CRM_Core_Error::backtrace("backTrace", TRUE)

385 Sep 07 20:44:40 [error] $Fatal Error Details = Array

383 Sep 07 20:44:39 [info] Running task: Upgrade DB to 5.29.alpha1: Fill civicrm_relationship_cache (5001 => 10000)

381 Sep 07 20:44:37 [info] Running task: Upgrade DB to 5.29.alpha1: Fill civicrm_relationship_cache (1 => 5000)

379 Sep 07 20:44:37 [info] Running task: Install eventcart extension

377 Sep 07 20:44:36 [info] Running task: Upgrade DB to 5.29.alpha1: SQL

375 Sep 07 20:44:36 [info] Running task: Upgrade DB to 5.29.alpha1

373 Sep 07 20:44:35 [info] Running task: Begin Upgrade to 5.29.alpha1

371 Sep 07 20:44:35 [info] Running task: Checking extensions

369 Sep 07 20:44:34 [info] Running task: Cleanup old files

```

=========

In Drupal's logs :

Message Warning: Declaration of CRM\_Volunteer\_BAO\_Project::copyValues(&$params, $serializeArrays = false) should be compatible with CRM\_Core\_DAO::copyValues($params) in require\_once() (line 36 of /PATH/web/sites/default/files/civicrm/ext/org.civicrm.volunteer/CRM/Volunteer/BAO/Project.php)

# Answer
> 11 votes
We got this on one of the db upgrades. For us, it was due to few entries in `civicrm_relationship` table which were attached to permanently deleted contact ids. You can follow the below steps to complete the upgrade process.

* Take a separate back up for `civicrm_relationship` table.
* Check invalid entries using -

```
select id
from civicrm_relationship
where contact_id_a not in (select id from civicrm_contact) OR contact_id_b  not in (select id from civicrm_contact)

```
* Delete these rows

```
delete from civicrm_relationship
where contact_id_a not in (select id from civicrm_contact) OR contact_id_b  not in (select id from civicrm_contact)

```

Complete the upgrade process. Hope that works.

# Answer
> 1 votes
I had a similar problem, but only on a Drupal 8 site I upgraded; the others went fine.

I ran the following SQL to create the new table `civicrm_relationship_cache`, then ran `cv upgrade:db --retry` so that CiviCRM would pick up from where it had failed.

```
CREATE TABLE `civicrm_relationship_cache` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Relationship Cache ID',
  `relationship_id` int(10) unsigned NOT NULL COMMENT 'id of the relationship (FK to civicrm_relationship.id)',
  `relationship_type_id` int(10) unsigned NOT NULL COMMENT 'id of the relationship type',
  `orientation` char(3) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The cache record is a permutation of the original relationship record. The orientation indicates whether it is forward (a_b) or reverse (b_a) relationship.',
  `near_contact_id` int(10) unsigned NOT NULL COMMENT 'id of the first contact',
  `near_relation` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'name for relationship of near_contact to far_contact.',
  `far_contact_id` int(10) unsigned NOT NULL COMMENT 'id of the second contact',
  `far_relation` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'name for relationship of far_contact to near_contact.',
  `is_active` tinyint(4) DEFAULT 1 COMMENT 'is the relationship active ?',
  `start_date` date DEFAULT NULL COMMENT 'date when the relationship started',
  `end_date` date DEFAULT NULL COMMENT 'date when the relationship ended',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UI_relationship` (`relationship_id`,`orientation`),
  KEY `index_nearid_nearrelation` (`near_contact_id`,`near_relation`),
  KEY `index_nearid_farrelation` (`near_contact_id`,`far_relation`),
  KEY `index_near_relation` (`near_relation`),
  KEY `FK_civicrm_relationship_cache_relationship_type_id` (`relationship_type_id`),
  KEY `FK_civicrm_relationship_cache_far_contact_id` (`far_contact_id`),
  CONSTRAINT `FK_civicrm_relationship_cache_far_contact_id` FOREIGN KEY (`far_contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_civicrm_relationship_cache_near_contact_id` FOREIGN KEY (`near_contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_civicrm_relationship_cache_relationship_id` FOREIGN KEY (`relationship_id`) REFERENCES `civicrm_relationship` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_civicrm_relationship_cache_relationship_type_id` FOREIGN KEY (`relationship_type_id`) REFERENCES `civicrm_relationship_type` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8191 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

```

# Answer
> 0 votes
@Ichi has a point as I am troubleshooting some issues and have just done exactly what was suggested. You may need to restore your WP DB and CiviCRM DB fro your existing DBs after fresh installs of WP and CiviCRM. A few changes to the WP and possibly CiviCRM table name prefixes in wp\_config.php and then civicrm.settings.php and you should be right to go. Good luck!

---
Tags: upgrade, core
---


# Question
Title: Access Denied when making Contributions with Auto renewal and discount
When making a contribution (i.e. membership payment) I get an Access Denied message from Paypal, where the following conditions apply:

1. An applicable Discount is enabled
2. The user has toggled the Auto-renewal option to ON in the contribution form.

## **Current setup**

WordPress: 5.5.1

CiviCRM: 5.29.0

CiviDiscount: 3.8.1

PayPal account type: Business

## Process Flow

1. Go to MYDOMAIN.COM
2. login
3. Go to the Contribution Form page
4. Fill select membership option AND check the box for "Please renew my memberhip automatically"
5. Click 'Continue', review the confirmation page, and click Continue again
6. If this were doing what it was supposed to I'd be sent to the login form on PayPal, but instead I get this error page:

**Error Message**

```
    **Access Denied.**
    You don't have permission to access "/subscriptions?business=PAYPAL_ACCOUNT_EMAIL¬ify_url=https%3A//MYDOMAIN/FORM_PAGE/%3Fciviwp%3DCiviCRM%26q%3Dcivicrm%252Fpayment%252Fipn%252F3&item_name=MY_PAYPAL_ITEM_NAME&quantity=1&undefined_quantity=0&cancel_return=https%3A//MYDOMAIN/FORM_PAGE/%3Fciviwp%3DCiviCRM%26q%3Dcivicrm%252Fcontribute%252Ftransact%26_qf_Main_display%3D1%26cancel%3D1%26qfKey%3D48952a1caaf16f8b76aafc96ffb778bfdeb8e5aef9da49e3897dc33fbb4540ef_8394%26isRecur%3D1%26recurId%3D11%26contribId%3D1142&no_note=1&no_shipping=1&return=https%3A//MYDOMAIN/FORM_PAGE/%3Fciviwp%3DCiviCRM%26q%3Dcivicrm%252Fcontribute%252Ftransact%26_qf_ThankYou_display%3D1%26qfKey%3D48952a1caaf16f8b76aafc96ffb778bfdeb8e5aef9da49e3897dc33fbb4540ef_8394&rm=2¤cy_code=USD&invoice=940f55d4240395cacee1f76cd374dd8e&lc=US&charset=UTF-8&custom=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22CONTACT_ID%22%2C%22contributionID%22%3A1142%2C%22membershipID%22%3A%22578%22%2C%22contributionRecurID%22%3A11%2C%22contributionPageID%22%3A%224%22%7D&bn=CiviCRM_SP&email=MEMBER_EMAIL&cmd=_xclick-subscriptions&a3=0.25&p3=1&t3=D&src=1&sra=1&modify=0" on this server.

```

I am able to apply a discount to a renewal without the auto-renewal being set. But not with.

I am offering Current members who have been imported to the CiviCRM system the option to restart their renewal process within the system with the incentive of a discount. So I need auto-renewals and a short-term discount in place. Has anyone else run into this problem for auto-renewals of contribution paired with a CiviDiscount?

# Answer
> 1 votes
This seems to be an error on the paypal side.

Check with paypal, if they have blacklisted your IP.

Try doing a contribution with a different router or a separate internet service provider, i.e, a new IP that hasn't contacted paypal yet.

---
Tags: civicontribute, paypal, cividiscount
---


title: no verp, what to do

text:
# Question
Title: no verp, what to do
I am struggling setting up bounce handling with my webhost who can't handle VERP. I have set up a catch-all mail account with filter, and all bounced messages sent my civimail arrive in this account. I can send emails, cronjob(fetch bounces) seems successful, but nothing appears in bounce reports. In the account somehow a new folder appeared called Civimail and has 2 subfolders: ignored and processed The bounce mails don't even have unique ID in their header. They look like this: "delivered-to:contact+INBOX@mydomain.com" What am I missing here? According to this is should work: https://flossmanualsfr.net/civicrm/email-system-configuration/

I only have Cpanel to work with.

# Answer
For current documentation, see https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/

How are you sending your mails out? If you use a service like Mailgun or SparkPost then there are extensions to handle the bounces without needing to configure your own bounce inbox processing.
> 1 votes

---
Tags: civimail
---


title: Why can't I download spark?

text:
# Question
Title: Why can't I download spark?
I entered all my information in the sign-up area and it comes up with the following: The website encountered an unexpected error. Please try again later.

# Answer
Sorry for the inconvenience. We had a small glitch recently and it should be resolved.
> 2 votes

# Answer
Welcome! Assuming you mean CiviCRM Spark not SparkPost then I suggest going to https://chat.civicrm.org/ and posting in the 'spark' channel.
> 0 votes

---
Tags: sparkpost, civicrm-spark
---


# Question
Title: Error "Unknown Error" when uploading a file with CKEditor
In CiviCRM 4.6.5, I'm not able to upload files with CKEditor.

I get the very informative error `Unknown error`

It's seems to be a permission or problem like that when copying the file but without more information, it's difficult to find what it is.

I have found the forum post https://forum.civicrm.org/index.php?topic=26908.0 but my problem is not one of those described.

# Answer
> 5 votes
After digging, i have found that the problem was in the function `packages/kcfinder/core/class/uploader.php :: checkFilePath`

This function forbids an upload if you have a symbolic link in your path.

There is also a related issue in CiviCRM JIRA : https://issues.civicrm.org/jira/browse/CRM-15607

**EDIT:**

Probably not a very good solution but you can patch kcfinder.

In my case it's complicated to remove the symbolic link so I used this as a temporary fix.

Add the following line as the first line of the function checkFilePath to avoid the verification:

```
     protected function checkFilePath($file) {
+        return True;
         $rPath = realpath($file);
         if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN")
             $rPath = str_replace("\\", "/", $rPath);
         return (substr($rPath, 0, strlen($this->typeDir)) === $this->typeDir);
    }

```

# Answer
> 2 votes
I had the same case,

the "clean" solution was to set an absolute path to **Image Directory** and the corresponding absolute URL to **Image Upload URL**

# Answer
> 0 votes
I ve had the same case, the check in php is case sensitive so i convert all strings to lowercase before checking in the line below ( in uploader.php file ) and it works :
return (**strtolower**(substr($rPath, 0, strlen($this-\>typeDir))) === **strtolower**($this-\>typeDir));

---
Tags: issues, ckeditor
---


title: Why is this Activity Search failing?

text:
# Question
Title: Why is this Activity Search failing?
Activity Search is failing every time for this install (Search/Find Activities) no matter what search parameters are used. The problem is the following SQL error:
*SELECT count( DISTINCT ( civicrm\_activity.id ) ) as rowCount FROM civicrm\_contact contact\_a LEFT JOIN civicrm\_activity\_contact ON ( civicrm\_activity\_contact.contact\_id = contact\_a.id ) LEFT JOIN civicrm\_activity ON ( civicrm\_activity.id = civicrm\_activity\_contact.activity\_id AND civicrm\_activity.is\_deleted = 0 AND civicrm\_activity.is\_current\_revision = 1 ) INNER JOIN civicrm\_contact ON ( civicrm\_activity\_contact.contact\_id = civicrm\_contact.id and civicrm\_contact.is\_deleted != 1 ) LEFT JOIN civicrm\_activity\_contact source\_activity ON (source\_activity.activity\_id = civicrm\_activity\_contact.activity\_id AND source\_activity.record\_type\_id = 2) LEFT JOIN civicrm\_contact source\_contact ON (source\_activity.contact\_id = source\_contact.id) WHERE ( civicrm\_activity.activity\_type\_id IN ("110") AND civicrm\_activity.status\_id IN ("1", "2") AND civicrm\_activity.is\_test = 0 ) AND ( ( civicrm\_activity.activity\_type\_id IN (110,135,136,120,1,2,3,116,4,9,12,5,6,19,22,34,40,44,37,38,39,45,41,42,43,52,49,50,46,47,48,51,64,114,115,68,73,74,75,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,99,100,101,102,103,104,105,106,107,108,109,111,113,117,118,119,121,122,123,124,125,126,127,128,130,131,133,134,137,138,139,140,141,142,143) ) ) AND (contact\_a.is\_deleted = 0) AND (civicrm\_activity.activity\_type\_id Array) <br>the error message is 'check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Array)' at line 8\]*'
As you can see this install has a ***lot*** of activity types - could this be the reason? The last 'AND' statement seems to be the problem. This is on 5.28.3 and activity search is working fine on other 5.28.3 systems. Also there seems to be no limit on the number of items in the 'IN' clause in MySQL.

# Answer
> 3 votes
I think this is the same problem as https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl/pull/14

---
Tags: activity, sql
---


# Question
Title: Error "Could not find a valid session key" after contributions are made
Recently in the past we did do a migration from a development site to production and I'm not sure if we were having the issue before migration or not. Every time someone makes a contribution they receive the error:

> Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. 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.
> 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.
> Error type: Could not find a valid session key.

* I've checked resource URL's and they appear to be correct.
* I've scrubbed all trace of the old CMS DB and base dev URL from the civi settings file and replaced them with production
* The base URL in Civi and WordPress are matching besides a final / that civi has on it's base URL (I tried removing this but made no difference to changed it back
* I have looked through everything relating to this issue on the stack exchange and have not found anything that worked

If anyone can help me with this I will be forever in your debt.

EDIT: Okay guys after a billion hours of searching, trying things, and changing things I THINK that I have MOSTLY resolved the issue. I THINK what I did to resolve it is .... I realized that it was linking to development CMS DB (they both use same civi DB but different WordPress CMS DB).

After making this change I was able to make contributions in incognito mode and using another browser.... next I tried chrome (the same browser I've been using all along) and got the error. I cleared all cache in chrome, tried again while not logged into WordPress as admin, and it worked.

Next I logged into WordPress as admin and got the error. Deleted my chrome cache and tried again while logged in as admin and got the error.

Then I deleted all cache files in template\_c directory and while logged into WordPress as administrator I successfully made a contribution! Then I tried a second time and got the error.

So I think it is working for all new users contributing ... but gives me the error if I'm logged into WordPress as administrator, unless I delete the cache in the template\_c directory each time.

Hopefully that makes sense and someone can lead me to the last piece in the puzzle / figure out what is causing this.

# Answer
> 0 votes
This is an issue documented here: https://lab.civicrm.org/dev/core/-/issues/1997 Fixes have been merged into 5.30 branch https://github.com/civicrm/civicrm-core/pull/18525 and https://github.com/civicrm/civicrm-core/pull/18534

So you can apply the patches, or wait until the 5.30 release in early October.

---
Tags: wordpress, contributions, contribution-page, session
---


title: Pay Later not showing

text:
# Question
Title: Pay Later not showing
For some reason after updating to CiviCRM 5.29.1 the "Pay Later" option (which is selected) is no longer working on DarrylWPerry.com/donate

EDIT: if I turn off HTTPS/SSL protections it appears.

# Answer
> 2 votes
The option should appear once you select the amount. If it does than set default one of the option from amounts tab of contribution page

---
Tags: civicontribute, paylater
---


# Question
Title: Membership form submit button goes to 404 not found error
We have a membership form that has been working for several years. For some reason we are now getting a 404 not found error when submitting the form.

The url for the error 404 page is:

https://---.org/membership/?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact

We don't update CiviCRM very often. Wordpress updates itself periodically.

Wordpress 5.5.1 CiviCRM 5.15.1

I've also tried deactivating every plugin, and using a different theme, and the problem still exists.

# Answer
> 2 votes
Since you are on wordpress 5.5 it s mandatory to upgrade civicrm to 5.26 or more (5.28.x preferred) else all your front end civi forms will not work

Ref: https://civicrm.org/blog/kcristiano/civicrm-526-and-wordpress-important-notice

---
Tags: civimember
---


title: Allocate money from Donor to student

text:
# Question
Title: Allocate money from Donor to student
i doing customize CiviCRM 5.29.1 for Wordpress 5.5.1 last version.

i have create 2 contact type individual: Donor, Student

Donor donation money for student. Donation money allocate to student. student have money for study

Ex:

* Donor(Tomy) donation $500 for student(David) in 2019
* Donor(Tomy) donation $500 for student(David) in 2020
* Donor(Tomy) donation $500 for student(David) in 2020
* ....
* Donor(Nancy) donation $200 for student(Olive) in 2019
* Donor(Nancy) donation $400 for student(Olive) in 2020 ...

I want when view student then see all history donation from Donor. and when view Donor then see all history donation for student.

How can do that? i try create new Contribution but i only see contribution from Donor but i not see Contribution allocate to Student.

please help me, sorry my english not good. hihi

i attached new Contribution

+++++++++ Soft Credit have maximum 10 row for each contribution. but Donor donation $10,000 for 100 students.

# Answer
> 1 votes
You can use soft credit section of the contribution form...

Create a contribution for donor but under soft credit section include student contact

Ref: https://docs.civicrm.org/user/en/latest/contributions/soft-credits/

If you need more than 10 soft credit record for payment than implement preprocess hook via civicrm extension or wp plugin to add the number of count, something like

```
function modulename_civicrm_preProcess($formName, &$form) {
  if ($formName == 'CRM_Contribute_Form_Contribution') {
    $form->setVar('_softCreditItemCount', 100);
  }

}

```

or install the extension in civicrm and add below line in end of civicrm.settings.php file

```
$civicrm_setting['CiviCRM Preferences']['contributionsoftcredit_limit'] = 100;

```

---
Tags: civicontribute
---


# Question
Title: How to change or overwrite block reportlets created by ExtendedReports (reportlets)
I can't work out how to change the block/extended report once created, that I then use in the Contact Layout Editor, as overwriting it with the same name just made another block appear with the same name.

# Answer
I think you should see all reports under 'all reports' & be able to go into it & edit it from there
> 1 votes

---
Tags: contacts, civireport
---


# Question
Title: Error after upgrading from v5.22.0 to v5.29.1 in WordPress
I have a WordPress website that is using v5.22.0 of CiviCRM, it was a fresh install and this is my first time trying to upgrade it.

To upgrade to v5.29.1 I followed all steps to the letter: https://docs.civicrm.org/sysadmin/en/latest/upgrade/wordpress/

When I attempt the final step to upgrade the database which is to point your browser to the URL http://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1 (obviously replacing example.org with our domain) I get the error message and there is no Upgrade Now button:

> 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. Your database has already been upgraded to CiviCRM 5.22.0

Am I done? Is there no database upgrade to be done between v5.22.0 and v5.29.1? Everything appears to be working on the front / backend.... did I do it properly?

# Answer
> 1 votes
Just adding an answer - which is actually from the comments - since I think stackexchange doesn't like answers in the comments - anyway - the issue was an extra copy of the codebase

---
Tags: wordpress, upgrade
---


title: Why isn't CiviMail tracking my opens?

text:
# Question
Title: Why isn't CiviMail tracking my opens?
It happened after a recent upgrade to 5.27+, using Drupal 8.

# Answer
> 2 votes
I notice this: https://github.com/civicrm/civicrm-core/pull/17312 added some nice new callbacks, but since it didn't actually remove the old ones, I suspect this is only affecting Drupal 8 installs that don't have the extern/ directory working.

The key is that these emails are going out with the following at the end of the html:

```
<img src="https://blackflysolutions.ca/libraries/civicrm/core/extern/open.php?q=12345" width='1' height='1' alt='' border='0'>

```

In other words - the new callback is not being used when generating the civimail.

After more digging, I found this:

https://github.com/civicrm/org.civicrm.flexmailer/issues/65

Conclusion: update your flexmailer to "master" until there's a new release.

Also: upgrading civicrm to 5.29.1 also fixes it - that release pulls in a new flexmailer.

---
Tags: civimail, drupal-8
---


# Question
Title: CIVI mail - URLs inserted directly into an email template do not direct the user to the correct web page
I inserted a url into a CIVI email template - On testing the email, clicking the link which has not changed it re-directs the user to our site and gives an Error 404 page not found.

**https://www.digital10.io/wp-content/plugins/civicrm/civicrm/extern/url.php?u=366&qid=586** Any experience of this behaviour we are on civi 5.24.5? pending upgrade to 5.29 but having issues, reluctant to do so. We are sending via a Sparkpost plugin.

# Answer
> 1 votes
I have a workaround if you make sure that the URL is not tagged as such then if comes through in the email ok and unchanged, this does not solve the issue if you want to mask the url and provide text to describe the link

# Answer
> 1 votes
If you are running WP 5.5.x or later you need CiviCRM 5.26 or later (5.28 is the security release).

The details are here: https://civicrm.org/blog/kcristiano/civicrm-526-and-wordpress-important-notice

---
Tags: civimail, templates
---


title: Event on several different days

text:
# Question
Title: Event on several different days
I want to create an event in CiviCRM: The event takes place on *8.10., 9.10. and 16.10.* So this is an event with three sessions (not an repeating single event). The participants can not book a session individually, therefore they should only register once and they pay a single fee for all three sessions. In CiviCRM I can only create an event that *starts on 8.10. and lasts until 16.10.* (although there will be no session from 10.10. to 15.10.).

I would like the three listed dates to appear separately in the calendar and on the overview page.

For Drupal I found the plugin *”CiviCRM Multiday Event“* which allows you to do that (https://www.drupal.org/project/civicrm\_multiday\_event). But I’m running CiviCRM 5.25.0 on WordPress 5.4.2.

Does anyone have an idea how I can get there?

Thanks a lot for your help! Michael

# Answer
I don't think what you need is possible using the built-in iCal feed and a single event - not without writing an extension.

However, perhaps @petednz-fuzion can chime in on the status of his yet-to-be-published extension which I think will meet your needs. You could create three events, use the extension to ensure that there's a single registration for all three, then your iCal feed should be accurate.

The manual equivalent of this would be to create three events, but only expose the registration for the first one. When registration closes, use a search to find and add the registrants to the second and third events. This is actually pretty workable when there's only three days in the series - but pretty tedious when there are 12, so hopefully Pete's extension is almost ready to publish :)
> 4 votes

# Answer
As an alternate I feel you can create price sets that shows price field for each date (Label?). And tweak the calendar plugin to use price field to show event on three different dates
> 3 votes

---
Tags: wordpress, dates, repeating-events, date-range
---


# Question
Title: Links for the DialogFlow extension go to Drupal 404 Page
I'm on Drupal 8.

Just installed DialogFlow, but when I go to DialogFlow\>Settings I leave CiviCRM and get a Drupal 404 page- "Page not found".

Any ideas?

# Answer
I've noticed that sometimes in drupal 8 you have to clear *drupal* cache to get newly added civi menu links to be found.
> 3 votes

---
Tags: drupal-8
---


# Question
Title: PHP Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame
We recently moved our database to a new server, but when adding a new contact we now get this error:

This is what our server admin found:

\[20-Sep-2020 21:53:47 Europe/Amsterdam\] PHP Fatal error: Uncaught CRM\_Core\_Exception: \[0: Transaction integrity error: Expected to find active frame

thrown in /home/other/\***/public\_html/wp-content/plugins/civicrm/civicrm/Civi/Core/Transaction/Manager.php on line 93

What should we do to fix this?

# Answer
As far as I can see the error signals that there is an uncompleted transaction somewhere. See https://docs.civicrm.org/dev/en/latest/framework/database/transactions/
> 0 votes

---
Tags: contacts, error
---


# Question
Title: CiviRules not triggering event reached date
The user wants to send a recurring email - twice a week on successive days. So I set up a recurring event and then added a CiviRule with the trigger 'Event date reached'. The event didn't trigger because of the following crash - it doesn't have any participants, could this be the problem?

```
SELECT `p`.*
        FROM `civicrm_participant` `p`
        INNER JOIN `civicrm_event` `e` ON `e`.`id` = `p`.`event_id`
        LEFT JOIN `civirule_rule_log` `rule_log` ON `rule_log`.entity_table = 'civicrm_participant' AND `rule_log`.entity_id = p.id AND `rule_log`.`contact_id` = `p`.`contact_id` AND DATE(`rule_log`.`log_date`) = DATE(NOW())  AND `rule_log`.`rule_id` = %3
        WHERE DATE(`e`.`start_date`) = CURDATE()
        AND `rule_log`.`id` IS NULL
        AND `e`.`event_type_id` = 12
        AND `p`.`contact_id` NOT IN (
          SELECT `rule_log2`.`contact_id`
          FROM `civirule_rule_log` `rule_log2`
          WHERE `rule_log2`.`rule_id` = %3 AND DATE(`rule_log2`.`log_date`) = DATE(NOW()) and `rule_log2`.`entity_table` IS NULL AND `rule_log2`.`entity_id` IS NULL
        ) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%3
        WHERE DATE(`e`.`start_date`) = CURDATE()
        AND `rule...' at line 4]

```

I'd like to understand how to get this working, and also if anyone has a suggestion of an alternative way of achieving this?

# Answer
> 0 votes
I think the issue would indeed be that there are no participants, so therefore no events joined and an empty start\_date. Can you try with a participant?

If the issue persists can you please report it as a bug on the Civirules extension page (https://lab.civicrm.org/extensions?utf8=%E2%9C%93&filter=civirules)? Would fixing it be possible for you?

---
Tags: civirules
---


# Question
Title: PHP Fatal error: Smarty error: [in string: (...)]: syntax error: (secure mode) (...) not allowed in if statement (...)
The CiviCRM doumentation describes, how to use Smarty to customize templates for mails and pdf's:

https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#smarty

E.g.:

```
{capture assign=gift}{contact.custom_16}{/capture}
{if $gift == Yes}
  This membership is a gift from {contact.custom_17}.
{/if}

```

Or:

```
{capture assign=Anredestil}{contact.communication_style}{/capture}
<br/>vielen Dank für
{if $Anredestil eq 'Du'}Deine{else}Ihre{/if}

```

However, in certain conditions (especially but not limited to CiviCRM on Wordpress), this creates fatal errors like:

```
PHP Fatal error:  Smarty error: [in string:<p>{capture assign=Anredestil}Du{/capture}<
br />vielen Dank f&uuml;r {if $Anredestil eq &quot;Du&quot;}Deine{else}Ihre{/if} Spende.</p> line 1]: syntax error: (secure mode) 'quot' not allowed in if statement (Smarty_Compiler.class.php, line 1399) in /html/wordpress/wp-content/plugins/c
ivicrm/civicrm/packages/Smarty/Smarty.class.php on line 1100

```

An obvious solution might be, to deactived the "secure mode" - however, this might create an unsafe situation.

# Answer
> 1 votes
After looking again I think this is ckeditor converting your smarty code to html. See also Escaping quotes in ckeditor breaks smarty-syntax

# Answer
> 0 votes
There is a surprisingly simple solution:

Smarty assumes, that comparison containing a constant string is unsafe. A remedy is, to assign the constant value to a variable, and to perform the comparison between these two variables.

The code example from above could look like:

```
{capture assign=gift}{contact.custom_16}{/capture}
{capture assign=Yes}Yes{/capture}
{if $gift == $Yes}
  This membership is a gift from {contact.custom_17}.
{/if}

```

Good luck!

---
Tags: wordpress, smarty, templates
---