# Question
Title: Get a view of upcoming activites for cases
I am using the lastest version of CiviCRM in the latest version of Joomla

I am trying to use CiviCase to manage workflows but I find the interface counter intuitive

I want to see a list of my upcoming activities for all my cases and filter them by today, this week, etc.

The case dashboard shows mycases with upcoming activities and groups all the activities under each case

This is hard to get an overview of your activities for a certain time period

Is there a way to search case activities by scheduled date and show only the activities themselves or is there an extension that shows all your upcoming activities in one widget, stream or calendar

Thanks in advance for helping out a newbie

# Answer
You can use the data processor extension for creating views/reports in CiviCRM.

You can find documentation on how to install extension here

There is not much documentation (yet) but there is an example documentation on how to create a search/report: https://lab.civicrm.org/extensions/dataprocessor/blob/master/docs/how\_to\_create\_search.md
> 1 votes

# Answer
The stock Activity Details Report (Administer - CiviReport - Create New Report) can do this if you adjust the filters tab to include case activities and whatever other criteria you'd like.

Or take a look at the alternate civicase extension: https://github.com/civicrm/org.civicrm.civicase. You might prefer how it works. Although I'm not sure how pretty it looks when used with joomla since it was originally aimed at drupal. There's also a slightly different variation of it at https://github.com/compucorp/uk.co.compucorp.civicase
> 0 votes

---
Tags: joomla, civicase, activities
---


title: Accidental deletion of webform

text:
# Question
Title: Accidental deletion of webform
We accidentally deleted a webform and we'd like to retrieve it. Is there anyway of doing this?

# Answer
> 2 votes
This is more of drupal question rather than CiviCRM. I would restore it from db backup.

1. Create a test instance and import the database from backup
2. Export the webform using node export module from test instance
3. Import the exported file on live using node export module.
4. For importing submissions you can export the submission form test instance and user webform import module to import on live.

---
Tags: webform-civicrm, delete
---


# Question
Title: Warning: Illegal offset type (multiple) when creating new report from template (D8/Civi5.11)
I'm using Drupal 8 / Civi 5.11

I get the following errors on the screen multiple times (one for each Drupal role in my system) when I attempt to create a new report in CiviCRM (CiviCRM-\>Admin-\>CiviReports-\>Create New Report From Template -- using Constituent Summary, for example):

```
Warning: Illegal offset type in CRM_Report_Form_Instance::buildForm() (line 135 of /var/www/site/vendor/civicrm/civicrm-core/CRM/Report/Form/Instance.php).

```

It appears that on line 135, the Drupal roles are being iterated and assumed to be strings. They are, in fact, objects in Drupal 8.

Does anyone know if this is a bug already reported/being work on? I've looked at the issue queue but haven't turned anything up.

Is my system, perhaps, just misconfigured and it's not a bug after all?

# Answer
> 1 votes
Its a bug in CiviCRM and is not handled properly for D8, you can fix this by applying below patch

```
diff --git a/CRM/Report/Form/Instance.php b/CRM/Report/Form/Instance.php
index 8f00408a17..965949e21c 100644
--- a/CRM/Report/Form/Instance.php
+++ b/CRM/Report/Form/Instance.php
@@ -112,7 +112,13 @@ class CRM_Report_Form_Instance {
     if (function_exists('user_roles')) {
       $user_roles_array = user_roles();
       foreach ($user_roles_array as $key => $value) {
-        $user_roles[$value] = $value;
+        if (is_object($value) && is_a($value, 'Drupal\user\Entity\Role')) {
+          $value = $value->label();
+        }
+        else {
+          $key = $value;
+        }
+        $user_roles[$key] = $value;
       }
       $grouprole = $form->addElement('advmultiselect',
         'grouprole',

```

---
Tags: reports, drupal-8
---


# Question
Title: Newsletter sign up form on WordPress with GDPR plugin
I've read the following before posting this:

but I'm still unclear on how we produce exactly we what we want as we are also using the Veda GDPR plugin to track opt ins.

We are planning to add a module to our custom page template asking for email addresses. An example of this page is this - https://vitiligosociety.org/what-causes-vitiligo/ (module will just before the footer)

The custom module we are having designed looks similar to this:

The only difference is the call to action will be to add an email address rather than be redirected to the membership sign up page.

What's the correct way to add the civi forms to this module and also expose the appropriate settings from the Veda GDPR plugin.

Any suggestions much appreciated! Thanks.

PS - We are using the Guttenberg editor.

# Answer
> 2 votes
I just submitted a PR to the GDPR extension which provides a new shortcode to display the GDPR preferences on a page, see https://github.com/veda-consulting/uk.co.vedaconsulting.gdpr/pull/217

That's what we use for providing users with an option of viewing and updating their preferences.

For all other CiviCRM form-related integration on WordPress, we use https://wordpress.org/plugins/cf-civicrm/

---
Tags: wordpress, forms, gdpr, newsletter
---


# Question
Title: How do I expose CiviCRM forms in WordPress?
I recently received an email from someone who had taken over their organization's CiviCRM system that is integrated with WordPress. She was being told by their CiviCRM provider that exposing a CiviCRM form in WordPress required using iFrames, but her web developer said that wouldn't work well with their responsive design. Is there an easier way to expose CiviCRM forms in WordPress?

# Answer
To publish CiviCRM forms in WordPress you need to put a CiviCRM shortcode in some content exposed to site visitors, such as a Post or Page:  Click to select a CiviCRM front-end form or page:  Then select one of the CiviCRM front-end content types. Depending on which one you choose, different options become available:

Note that only active CiviCRM content can be published, so if you don't see a contribution page or event or profile you just created in the dropdown list, go back to CiviCRM and make sure it is active.

For Contribution Pages, navigate to Contributions \> Manage Contributions, beside relevant page click Configure \> Title and Settings, then at bottom of page click to enable Is this Online Contribution Page Active?

For Events, navigate to Events \> Manage Events, beside relevant event click Configure \> Title and Settings, then at bottom of the page click to enable Is this Event Active?

For Profiles, navigate to Administer \> Customize Data and Screens \> Profiles, beside the relevant profile click more \> Enable.
> 4 votes

# Answer
Recommend using Caldera Forms CiviCRM, https://wordpress.org/plugins/cf-civicrm/

This is currently the most flexible and easiest way to implement CiviCRM integrated forms on a WordPress website.
> 2 votes

# Answer
CiviShop has also released a plugin for Gravity Forms integration. It's available on their shop for $79 annually: http://shop.civivip.com/

It's fair to say that it is lacking in documentation at the moment, but its' developer commented on a post on the CiviCRM facebook group promising more soon.
> 0 votes

---
Tags: wordpress, forms
---


# Question
Title: Membership contribution page won't load in Chrome browser
Lately our membership new/renewal form will not load in Chrome (in my case Windows ver 79.0.3945.88). But it has been working correctly in Chrome for several years. I don't know what's changed.

I have just tested that the membership form comes up okay in:

Firefox 71.0 (windows)

Windows Phone 8.1

Safari on iOS 13.

System: civicrm 5.15.1, WordPress 5.3.2

Edit with more info:

When the membership page loads okay, there are no warnings or errors in the civicrm log. But when the membership page stalls, there is the warning in the log:

Jan 06 17:25:33 \[warning\] CiviCRM thinks site is not SSL, redirecting to {url} Array ( \[url\] =\> https://idahonativeplants.org/membership/ )

I think this is a good clue, and the problem only affects Chrome. The bug only appears when you go to the home page, then use the Membership menu item. If you first visit another contribution page on the site, then use the Membership menu the membership form comes up right away. Weird.

# Answer
I solved this by making the site's home page secure https. There seems to be a glitch when Chrome goes from an http page to https, at least on our site.
> 2 votes

# Answer
Working fine for me on chrome Version 79.0.3945.88.

Imagine it's specific to your solution however I've only tested with 5.19, almost certainly something in the console like @Demerit suggested.

Should be aware that was a security release recently so make sure you have your solution secured too :).
> 0 votes

---
Tags: civimember
---


title: Civirules send email

text:
# Question
Title: Civirules send email
Hopefully I am just missing something.
I use CiviCRM Version 5.18.4 for WordPress, and I am not a programmer.

I read about CiviRules, and in the documentation, (https://docs.civicrm.org/civirules/en/latest/basic-example-immediate-processing/) the very first,simplest, most basic rule demonstrated uses the action "Send email". So I install CiviRules, and try to do just that. Get to "List of actions..." and no "Send email."

Suddenly, I have to be a developer, to ADD the "Send email" action? And when I look for help here I am led into a maze of suggestions about mgd.php files and adding hook directories and editing tables of the CiviCRM database.

Hey, I just want to send an email to folks when they sign up as contacts. Do I really need to reinvent this? Thanks for helping me understand.

# Answer
You need to also install another extension which is mentioned lower down on the introduction page: https://docs.civicrm.org/civirules/en/latest/#other-useful-extensions-and-modules

You need the Email API: https://civicrm.org/extensions/e-mail-api
> 7 votes

---
Tags: email, civirules
---


title: Log all outbound email

text:
# Question
Title: Log all outbound email
What solutions are people using to track all outbound email from CiviCRM?

BCCing would be one option - a BCC could be added to all outbound email via an extension, I suppose.

Else I'm guessing that some Third Party ESPs might also provide this functionality.

Interested to know what people are doing / if there are any solutions I haven't thought of.

# Answer
> 2 votes
You could look at the Transactional Mail extension which ensures everything going out from eg Sch Reminders, Receipts etc are stored as Activities on the contact

# Answer
> 4 votes
In civicrm.settings.php there's some settings to log it all to a file. See https://docs.civicrm.org/dev/en/latest/tools/debugging/#changing-file-based-settings

```
define('CIVICRM_MAIL_LOG', '/file/path');
define('CIVICRM_MAIL_LOG_AND_SEND', 1);

```

# Answer
> 2 votes
From an admin (non-sysadmin) perspective, the extension invoicehelper has options to automatically cc/bcc specific emails, notably for offline membership/contribution emails.

It does not handle the simple "Send Email" form, however. And one thing I get asked often, is that when viewing emails sent (activities), it should display who was CC'ed/BCC'ed. For example, if a membership invoice was sent to an organization and CC a specific contact, it's an important bit of information for tracking down late payments.

# Answer
> 2 votes
If it's your current MTA, Postfix has an option to BCC all emails to an address: `always_bcc`

More complex solutions can be implemented.

# Answer
> 2 votes
I often use 3rd party mailing services (namely mailgun, mandrill but have used others too). You can pay these services *a lot* to keep all your mail for a while, but the sheer amount of it will always be an issue if you're looking to capture every single mail that goes out.

I have implemented an exim4 configuration that keeps a copy in a local Maildir at times when I've been paranoid and wanted to see exactly what goes out (e.g. check placeholder replacements). This has benefits in that it's on your own server so you can easily do what you want with it: search it, delete it, compress it (or store it on a compressed filesystem, e.g. btrfs offers this option), access it using MUAs or webmail (if you configure it right), store it somewhere affordable - e.g. (Bytemark give you 100GB storage for £2/mo and their cheapest VM is £6/mo).

# Answer
> 1 votes
With a bit of development you could probably put something together using https://lab.civicrm.org/extensions/mailreader as the UI

# Answer
> 0 votes
Another option if it needs to be accessible to staffers is an extension that instead of auto-adding a bcc to all emails, logs them as an activity of some new type. Then either in the same extension or via something like https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl, restrict viewing those activities to admins. It might have similar performance issues as file logging on a busy site.

---
Tags: civimail, email
---


# Question
Title: Is it possible to stop individual users from sending mail?
I have some users who are only able to access reports, and I would like to stop them being able to directly send mails to contacts from CiviCRM.

I found this 10-year-old information on the old forums -- apparently the "view contact" permission inherently includes the ability to send mails to contacts. That post hinted at a "patch" and that maybe the functionality would be added later...does anyone know if this is currently possible? I haven't found a permission that controls email send access.

I'm using Joomla 3.9.13 and CiviCRM 5.18.2.

# Answer
> 2 votes
The 10 years old solution seems to be the best one, have you tried and would it be possible to remove the view all contacts permission to your users that should only use the reports?

Otherwise, it shouldn't be too complicated to alter the UI and remove the send email actions on a custom extension, but that would require some coding

---
Tags: contacts, email
---


# Question
Title: Can pay-later instructions offer html format and plain text versions?
This maybe should be a feature request.

I have complex "pay later" instructions, and I would like to display them in html format (which I can easily do) and provide an alternate version for folks who have chosen to receive plan-text email only.

Now I know I could just not use html tags and everything would look OK for both types of contacts. But if it is possible to "conditionally" include the html format message and the text-only message, that would be swell.

Any thoughts? Thanks!

# Answer
You should be able to apply the strip\_tags modifier to the `{$pay_later_receipt}` tag in your message template(s) in the text-only version. As that page says, you might also consider the `replace` and `replace_regex` modifiers to handle newlines, etc.

Alternatively - modify the template to insert the "Pay Later" instructions directly into the template exactly as you like.
> 1 votes

---
Tags: contribution-page, paylater, html
---


# Question
Title: Payment Page not accessible to anonymous users in Wordpress
\[I have updated some information following Tamara's answer, but it is still not accessible by anonymous users\]

I need people to be able to be able to sign up and pay for membership.

1. I set up a CiviCRM Membership and a Price Set for the membership
2. I created a profile (including custom fields) for the membership registration
3. I ticked the box that says 'Account Creation Required' under **WordPress user account registration option** for the profile **\[Update: one of the profile fields is Email (Primary)\]**
4. . I've set up a CiviCRM Payment Page for membership fees using above profile. **\[UPDATE: I set up some Word Replacements, hence Payment page not Contribution page.\]**
5. I've checked the permissions for Anonymous Users to create, edit, view profiles.
6. CiviCRM: Access all custom data fields checked for Anonymous
7. CiviCRM: access contact reference fields is checked for Anonymous users **\[Update: I'm using address details from Contacts\]**
8. CiviContribute: make online contributions is checked for Anonymous user
9. **\[Update\]** CiviCRM: Profile listings and forms: is checked for Anonymous user
10. I've created a Wordpress page and used the CiviCRM shortcode to add the payment page

When I access that page logged in, it displays no problem. Logged out, it's coming up with the civiCRM alert 'You do not have permission to access this page.'

When this happened before for another civiCRM profile I set up (with no payment), it was because I had not ticked 'Create' within the civiCRM shortcode options for Profiles; as soon as I did that, anonymous users could you see the page and fill in the form and create an account.

However, with a payment page, I'm not seeing an option for 'Create'.

How do a I set up a page where people can sign up for membership, create an account in Wordpress, and pay the fee all at the same time when not logged in?

Any help much appreciated.

The page in question.

Cheers, Tracy

# Answer
> 1 votes
Since you have questions regarding the specific steps you took, I copy and paste all of them below and intersperse with my responses (**IN BOLD CAPS** for clarity):

1. I set up a CiviCRM Membership and a Price Set for the membership **\> GOOD**
2. I created a profile (including custom fields) for the membership registration **\> GOOD**
3. I ticked the box that says 'Account Creation Required' under WordPress user account registration option for the profile \> **YOU MUST INCLUDE A PRIMARY EMAIL ADDRESS FIELD IN THE PROFILE FOR THIS FEATURE TO FUNCTION PROPERLY**
4. I've set up a CiviCRM Payment Page for membership fees using above profile. **\> GOOD**
5. I've checked the permissions for Anonymous Users to create, edit, view profiles...**\> AS INDICATED** **HERE**, **YOU ALSO NEED TO ENABLE THE PERMISSION FOR PROFILE LISTINGS AND FORMS** ...and Access all custom data fields (Not sure this is necessary?) **\> YES, THIS TOO *IS* NECESSARY**
6. CiviCRM: access contact reference fields is checked for Anonymous users **\> UNLESS YOU ARE USING CONTACT REFERENCE FIELDS IN YOUR PROFILE, THIS IS *NOT* NECESSARY**
7. CiviCRM: add contributions of type Campaign Contribution is checked for Anonymous users **\> UNLESS YOU ARE USING THE FINANCIAL TYPE OF CAMPAIGN CONTRIBUTION FOR MEMBERSHIP DUES, THIS IS *NOT* NECESSARY**
8. CiviContribute: make online contributions is checked for Anonymous user **\> GOOD**
9. CiviCRM: access Contact Dashboard is checked for Anonymous user (not sure if necessary?) \> **AS INDICATED** **HERE**, **THIS PERMISSION SHOULD *NOT* BE GIVEN TO ANONYMOUS USER**
10. I've created a Wordpress page and used the CiviCRM shortcode to add the payment page **\> IF YOU HAVE ALL OF THE REQUIRED FIELDS IN PLACE PERMISSIONS ENABLED AND THIS STILL ISN'T WORKING FOR YOU, PERHAPS YOU SHOULD TRY USING ONE OF THE OTHER OPTIONS FOR LINKING YOUR MEMBERSHIP PAGE TO YOUR WEBSITE AS INDICATED HERE**

Hope this helps! Tamar

# Answer
> 1 votes
After ensuring that all the permission settings were correct, I still couldn't see my CiviContribute form unless I was logged in.

But, once I disabled the `Administer|CiviContribute|CiviContribute Component Settings|Enable Access Control by Financial Type` checkbox, I was able to view and use the CiviContribute form anonymously.

---
Tags: wordpress, permissions
---


title: File location for new CiviRules Action

text:
# Question
Title: File location for new CiviRules Action
I have written a new CiviRules Action and added the entry to the database but I don't know where to put the php file. I have read all the documents I can find but I can't find any information about a directory structure for rules addons. I would like to keep it as part of an extension I have written. Any help with the file location would be appreciated.

Thanks

# Answer
> 2 votes
You put it in your own extension, under the CRM folder and subfolders you need to create depending on the class name. See https://docs.civicrm.org/civirules/en/latest/create-your-own-action/#step-2-add-a-class-that-extends-crm\_civirule\_action

```
You can include the class file in the Civirules extension if you want,
but you can also include it in your own extension. This class should extend
CRM_Civirules_Action to be able to add your action to the CiviRules Engine

```

So let's say your class is CRM\_Mynamespace\_CivirulesActions\_Contact\_Subtype, then you'd call the file Subtype.php and put it in your extension in CRM/Mynamespace/CivirulesActions/Contact

---
Tags: civirules
---


# Question
Title: What are the pros and cons of using external xml files for CiviCase configuration?
In CiviCase since 4.5-ish there's been an admin screen for configuring case types. Before that it was done using external xml files, and they will still work. What are the pros and cons of each method?

# Answer
> 3 votes
I decided not to submit this as an official documentation update because here it can be a bit looser with the language and this also allows tweaking it a bit first.

# CONS:

* If you hate xml you might not want to use xml files.
    + > ASIDE: If you're wondering why it wasn't done in some other format, note that at the time xml was widely used and json had only been proposed as an RFC spec and support for json wasn't included in stock php. XML was already used in Civi for the schema templates. Using .ini files is awkward with nested/multivalued settings. Using .php files wouldn't have been portable to non-civi systems which was a grander vision at the time (yes, really).
* Upgrades that require changes to the definition can't be done by the standard civi upgrade if the webserver doesn't have write access to the files.
* None of the "pro" reasons below matter to you and you prefer a GUI.
* If you really like making typos and/or not testing changes before putting on a live site you can bork your site more easily.
* Forgetting to transfer them when you move or duplicate a site. Although if you store them in the custom templates folder which you manage with git/svn then unless those are the only customizations in there you'd be less likely to forget.

# On the PRO side:

* There's all the reasons people use external config files for other software, including:
    + Versioning via git or otherwise, and regular diff'ing tools work.
    + Mass updates easily done with command line tools, e.g. if you want to add a new activity type to all your case types and you have 10 case types it's 50 clicks plus some scrolling in the UI. That's not *terrible*, and you don't usually do it that often, but it's easier to do with text files. Or for example if you want to add a case type that's similar to an existing one, then copying the file and making a few changes is easier.
    + (Partial) Portability between installs. Not just copying a site, but between two otherwise different sites that might want to share some of the same configuration. The original plan was to be able to take your file, plop it into another civi site, and have it automatically work. That was never fully implemented, but it does work with some extra steps. (See a separate discussion about being able to export/import all CiviCRM configuration settings, which would be a more general solution.)
    + More granular permissions on configuration, e.g. prevent junior admin users from making accidentally bad configuration changes.
* Custom settings are (relatively) easy to add and use. For example, in the CaseRoles section you could do like this:

```
<CaseRoles>
  <RelationshipType>
    <name>something</name>
    <mythings>
      <mything>thing1</mything>
      <mything>thing2</mything>
    </mythings>
    ... etc ...

```

In some sections it's even automatically picked up by the api, e.g. when you do an api call to CaseType get, the above comes through as:

```
[caseRoles] => Array
  (
    [0] => Array
      (
        [name] => something
        [mythings] => Array
          (
            [mything] => Array
              (
                [0] => thing1
                [1] => thing2
              )
          )
     )

```

Even if it's in a section where the api doesn't pick it up, since you're doing custom stuff anyway you can load and parse the xml file. (You can still do custom data using database storage, you just need to store the custom data in a different table and reference it separately.)

## Why is there no documentation?

I don't know why the old wiki docs weren't transferred over, but it is still available and mostly still true on the old wiki at e.g. https://wiki.civicrm.org/confluence/display/CRMDOC43/CiviCase+Configuration#CiviCaseConfiguration-Step-by-step.

> The part that is no longer correct is at https://wiki.civicrm.org/confluence/display/CRMDOC43/CiviCase+Configuration#CiviCaseConfiguration-CaseTypes, since case type identifiers are no longer option values and are now in the civicrm\_case\_type table, and unfortunately that link also demonstrates some of the confusion regarding name vs label in the past. Ignore that part. *Pleeeeeeeese* ignore that part.

## Converting xml files to database storage

If you have an existing site already using xml files, this is as simple as visiting administer - civicase - case types and clicking edit on your case type and then clicking save. The files will get converted and will now be ignored.

You should probably then move the file out of the way to avoid confusion over which definition is in effect.

## Preventing converting xml files to database storage

If somebody does the above and didn't mean to, this could be confusing if somebody else later edits the file thinking it still controls the definition. If you want to prevent converting, then in the xml file add `<forkable>0</forkable>` near the top of the file, e.g.

```
<CaseType>
  <name>housing_support</name>`
  <forkable>0</forkable>
  ...

```

## Converting database storage to xml files

1. In your database in the civicrm\_case\_type table in the `definition` field there will be some xml.
2. Copy and paste or otherwise put that data into a file with the same name as the `name` field in that row, e.g. `housing_support.xml`. The file should be in your custom templates directory as described at the above wiki documentation link.
3. Then put NULL into the `definition` field in the database.
4. From then on it will use the configuration in the file.
5. Also see the section above about preventing someone accidentally converting it back to database if you want to prevent that.

## Using xml files from scratch

Ironically, the way history has unfolded probably the easiest way to do this now is to use the UI to create the type and then do the same as converting database to files above.

---
Tags: civicase, configuration
---


# Question
Title: How to install a separated Civi database with Drupal 8?
I am very confused with the evolution of Drupal 8 going away from its ability in Drupal 7 to easily handle multisite.

Is it still possible to share a Civi database with the multisite extension with several Drupal 8 sites?

What about sharing a CiviCRM database between a mix of Drupal 7 and Drupal 8 sites?

More globally, can a Civi database be separated from the Drupal 8 database ?

========= I had read from David Snopek while researching this question that he thought it might work to use an edited version of the file civicrm.settings.php, though hadn't actually tried because of his server policies.

So I tried integrating an additional Drupal 8 site already running with a Drupal 7 site! I edited the civicrm.settings.php in Drupal 7 site in order to adapt it to the path of the Drupal 8 site as follows:

```
$civicrm_root = '/PATH/SITE/public_html/sites/all/modules/civicrm';

```

became this :

```
$civicrm_root = '/PATH/SITE/public_html/vendor/civicrm/civicrm-core';

```

But I this error message was the result:

```
PHP Fatal error:  Call to undefined function variable_get() in /var/data/sites/reveal/public_html/vendor/civicrm/civicrm-core/CRM/Utils/System/Drupal.php on line 790and –-

```

# Answer
> 6 votes
I was able to separate my Drupal 8 database from my CiviCRM database fairly easily, here are my notes I took on how to do it. Note that these steps aren't particularly specific to Drupal 8, and can be used to convert any single-database install into a two-database install.

* Create a new database (e.g. "example\_civi") on the same server.
* Do NOT create a separate MySQL user - just use the same MySQL user Drupal uses.
* Grant permissions to the user. Here's the permissions you need:

```
TABLES, CREATE TEMPORARY TABLES, TRIGGER, CREATE ROUTINE, ALTER ROUTINE,
CREATE VIEW, SHOW VIEW, REFERENCES ON ``.* TO ''@'localhost';

```
* Load a dump that just has CiviCRM tables into the new database. Steps to dump tables by prefix are available. Since you sound like you're potentially upgrading an existing site, you can just copy the existing database instead.
* Drop the CiviCRM tables from the Drupal database. There's a good explanation of how to remove tables by prefix.

On the last step, note that foreign key constraints will cause some tables not to delete. You'll either need to run those steps multiple times or disable FK constraints before dropping the tables.

UPDATE: See also how to enable Views integration on D8 with separated databases.

# Answer
> 3 votes
Jon has also answered the original question of how to install CiviCRM in its own database.

Specifically, if you add the connection information in your settings file (before installing CiviCRM), it uses that, i.e. in settings.php add in:

`$databases['civicrm']['default'] = [
 'database' => 'civicrm',
 'username' => 'mysqluser',
 'password' => 'a-mysql-password',
 'prefix' => '',
 'host' => 'localhost-or-whatever',
 'port' => '',
 'namespace' => 'Drupal\Core\Database\Driver\mysql',
 'driver' => 'mysql'
]`

---
Tags: drupal-8, drupal-multi-site
---


# Question
Title: CiviDiscount - Automatic discounts for number of attendees
I have a site that's using CiviDiscount and the question has come up if advanced filters for automatic discounts can be configured based on number of attendees being registered for an event, irrespective of membership type/status or contact type, etc.

Example

* Single ticket @ £75
* 10 tickets @ £60/ticket

So once 10 participants added, I'd like an automatic discount (let's say 20%) applied.

I want to the extra participants registered so a price set won't work. I know there's potential workarounds in terms of using a price set and using custom fields etc. but thought it's worth asking the question.

Any guidance hugely appreciated.

Many thanks

# Answer
> 2 votes
this can be achieved using an event price set. If you create a price set you can create a ticket option which takes up multiple "seats" at the event. You can create a 10 person ticket option and then set the price of that option.

Note however in that approach you cannot require that all 10 attendees submit separate registration details and you can only collect the details from the first participant who is buying the 10 person ticket.

Best

---
Tags: civievent, cividiscount
---


# Question
Title: Can't find MySQL server on WordPress install with sockets
I am using Local by Flywheel which connects to MySQL with sockets. My socket is:

`/Users/efc/Library/Application Support/Local/run/Qv8NIbiue/mysqld.sock`

The MySQL server is `localhost`, database is `local`, and both username and password are `root` (and this really is a root account, I can even create new databases with SequelPro).

When I try to install CiviCRM 5.21.1 on WordPress 5.3.2 I get the error "Can't find the a MySQL server on 'localhost'.: The server requested authentication method unknown to the client" on the "Does the server exist?" line of the CiviCRM Installer screen. Oddly enough, every other item in "CiviCRM Database Details" is "OK" (green). In other words, even though it *thinks* it can't find the server, it seems to be able to do every other thing OK.

I cannot figure out how to tell CiviCRM what it needs to know to be happy about the MySQL server. How can I make this WordPress install work with sockets?

If I try to put "localhost:/Users/efc/Library/Application Support/Local/run/Qv8NIbiue/mysqld.sock" in the MySQL server field, then "Does server exist" is "OK" but almost everything else goes red.

Note, there are answers to similar questions for folks who have come far enough along in the install process to have a `civicrm.settings.php` file. But at this stage of the WordPress version's bootstrap it has *not* yet successfully installed, there is no settings file. This question is about how to respond to this error so that the WordPress version of CiviCRM can be installed in the first place.

# Answer
Checking out other Stackexchange answers, looks like something along these lines should work

You can set the DSN in the civicrm.settings.php file using this format:

mysqli://user:password@unix(/path/to/socket)/databasename

Use the actual word "unix" in the string to indicate sockets.

For Reference this is the previous answer
> 0 votes

---
Tags: wordpress, mysql, install
---


# Question
Title: Repeating Payments with Authorize.net Problem
I've set up repeating payments (CiviCRM 5.21 with Drupal 7.69) with Authorize.net for a client.

In Civi, the transaction hangs at "Pending".

At Auth.net, everything looks good, the initial payment has been processed with a date set for the next transaction.

Also note that one-off transactions from the site process perfectly with the transactions showing as "completed" in CiviCRM.

Not sure on how to troubleshoot this.

I thought that @Eileen's notification log extention might help. However, the system log table is empty.

I'm not sure what the next step is for troubleshooting.

# Answer
> 3 votes
1) Make sure the Silent post URL is properly configured in Authorize.net. Example: https://YOURSITE.COM/civicrm/payment/ipn/2 (the 2 needs to be replaced with your CiviCRM Payment Processor ID#)

2) It is possible that recurring payments are not processed instantly. It could be that recurring payments are processed in the middle of the night for example and therefore the payment will remain pending until it is processed.

---
Tags: recurring-contributions
---


# Question
Title: How to repair DB tables after faulty past upgrade?
**System**:

WordPress 5.2.5, CiviCRM 5.21.1, PHP 7.2.18

**Background**:

At some point in a previous upgrade - I suspect from 5.19.x - my database tables haven't updated properly. This resulted in my cronjob failing after I attempted to update any extensions: all a bit weird. I rolled back to my earliest backup (5.17.x) and then. following a suggestion from another stackexchange question, turned off verbose logging, then stepped the upgrades from 5.17 -\> 5.18 -\> 5.19 -\> 5.20 -\> 5.21. I also disabled all the extensions before upgrading. I have a feeling what might have happened - looking at the release notes - is that the APIv4 extension was installed, then I disabled it and when the upgrade from 5.19 happened one or more tables weren't altered properly. Looks like maybe APIv4.4 needed to be active when moving from 5.19 to 5.20. But I'm really not sure.

**Problem**:

The new upgrade process seems to have worked and I've tested some stuff with no problems. However, I now **can't turn verbose logging back on**. It seems like this is what was causing the whole original problem: It seems maybe I'm missing the `is_active` column in the `log_civicrm_status_pref` table. Whenever I try to turn verbose logging on, Civi throws an error and won't change it.

I'm now concerned there are more hidden problems with the database, but I have no idea how to go about working out what's wrong or how to fix it. Any advice gratefully received. NOTE: rolling back the whole DB to a backup is not really an option at this point, or at least it's a nuclear option I really don't want to have to do as there are active event pages.

**Error log**:

```
Jan 22 07:33:04  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) DEFAULT '1' COMMENT 'Is this status check active' [nativecode=1265 ** Data truncated for column 'check_info' at row 43891]
    [type] => DB_Error
    [user_info] => ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) DEFAULT '1' COMMENT 'Is this status check active' [nativecode=1265 ** Data truncated for column 'check_info' at row 43891]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) DEFAULT '1' COMMENT 'Is this status check active' [nativecode=1265 ** Data truncated for column 'check_info' at row 43891]"]
)

Jan 22 07:33:04  [debug] $backTrace = #0 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(905): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/DB.php(987): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...")
#3 /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...")
#4 /var/www/html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...", "DB_Error", TRUE)
#5 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
#6 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...", "1265 ** Data truncated for column 'check_info' at row 43891")
#7 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...")
#9 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2416): DB_common->query("ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...")
#10 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...")
#11 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(420): DB_DataObject->query("ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...")
#12 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1419): CRM_Core_DAO->query("ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...", FALSE)
#13 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Logging/Schema.php(450): CRM_Core_DAO::executeQuery("ALTER TABLE `wordpress`.log_civicrm_status_pref ADD   `is_active` tinyint(4) ...", (Array:0), TRUE, NULL, FALSE, FALSE)
#14 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Logging/Schema.php(529): CRM_Logging_Schema->fixSchemaDifferencesFor("civicrm_status_pref", (Array:3))
#15 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Logging/Schema.php(284): CRM_Logging_Schema->fixSchemaDifferencesForAll()
#16 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Logging/Schema.php(269): CRM_Logging_Schema->fixSchemaDifferences(TRUE)
#17 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Logging/Schema.php(103): CRM_Logging_Schema->enableLogging()
#18 [internal function](): CRM_Logging_Schema::onToggle("0", "1", (Array:15), 1)
#19 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/Core/SettingsBag.php(345): call_user_func((Array:2), "0", "1", (Array:15), 1)
#20 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/Core/SettingsBag.php(256): Civi\Core\SettingsBag->setDb("logging", "1")
#21 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/Core/SettingsBag.php(153): Civi\Core\SettingsBag->set("logging", "1")
#22 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Setting.php(194): Civi\Core\SettingsBag->add((Array:21))
#23 /var/www/html/wp-content/plugins/civicrm/civicrm/api/v3/Setting.php(254): CRM_Core_BAO_Setting::setItems((Array:23), (Array:1))
#24 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(85): civicrm_api3_setting_create((Array:23))
#25 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(152): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#26 /var/www/html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(83): Civi\API\Kernel->runRequest((Array:9))
#27 /var/www/html/wp-content/plugins/civicrm/civicrm/api/api.php(86): Civi\API\Kernel->runSafe("setting", "create", (Array:22))
#28 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/SettingTrait.php(339): civicrm_api3("setting", "create", (Array:22))
#29 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Setting.php(106): CRM_Admin_Form_Setting->saveMetadataDefinedSettings((Array:23))
#30 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Setting.php(86): CRM_Admin_Form_Setting->commonProcess((Array:23))
#31 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(479): CRM_Admin_Form_Setting->postProcess()
#32 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(144): CRM_Core_Form->mainProcess()
#33 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(45): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Setting_Miscellaneous), "next", "Next")
#34 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Setting_Miscellaneous), "next")
#35 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Setting_Miscellaneous), "next")
#36 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page->handle("next")
#37 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#38 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(241): CRM_Utils_Wrapper->run("CRM_Admin_Form_Setting_Miscellaneous", "Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)", (Array:0))
#39 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:16))
#40 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
#41 /var/www/html/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:4))
#42 /var/www/html/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
#43 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#44 /var/www/html/wp-includes/plugin.php(465): WP_Hook->do_action((Array:1))
#45 /var/www/html/wp-admin/admin.php(253): do_action("toplevel_page_CiviCRM")
#46 {main}

```

# Answer
> 2 votes
It seems you already have `is_active` column added to `civicrm_status_pref` table. This was added in civi 5.19 version.

From the backtrace, it seems the error is shown after civi tries to add the same column in the existing log table of `civicrm_status_pref` which is `log_civicrm_status_pref`.

Try renaming this table to eg `log_civicrm_status_pref_backup` and then enable logging to see if it is enabled without any errors.

If the above is successful, you'll notice a new log table is created with the name `log_civicrm_status_pref`.

If you want to retrieve the existing entries from `log_civicrm_status_pref_backup`. I think you can take a dump of this table without CREATE statement and then re-import it in the database.

---
Tags: api, error, logging
---


# Question
Title: What is the best way to record the primary contact for an organisation?
I'm trying to understand the best way to record that a contact is the primary contact amongst the many related employees of an organisation. Does Civi have an in-built way of handling this?

Option 1 for me was to setup a tag called Primary Contact and provide this tag to the Primary Contact.

Option 2 was to create a custom field with Primary Contact (Yes/No).

Option 3 was to setup a new relationship "Primary contact of".

Which option would be the best to maintain? Any other thoughts?

# Answer
> 5 votes
Option 3 is the clear winner, because neither option 1 nor option 2 have a clear way of indicating which organization they're the primary contact of. As soon as someone is affiliated with two organizations, that means trouble.

The unfortunate part of this is that you can't assign a profile via a relationship. You can do so via Webform-CiviCRM, or via Caldera Forms CiviCRM, and when afform comes out, you'll be able to use that. However, since you also can't create two contacts in one profile, that doesn't generally cause issues.

# Answer
> 2 votes
In case you only want to allow one primary contact at maximum you can go for a contact reference field within the organisation. The drawback would be, that you will not be able the view that information coming from the side of the employee.

# Answer
> 1 votes
We created a new Contact Type based on the Individual called Main Contact. The person icon is a slightly different color, so you can tell on a glance who is and who isn't a Main contact. We also have customized some reports to pull only that type.

Another thing we've done (but may not work in your case) is that the Main Contact is typically the only person who has permission to edit the Company, so they have the asterisk denoting a permissioned relationship.

Edited to add - Options 1 & 2 would probably work for us, but Option 3 would not - memberships are company-based and bestowed by the organization as a result of being "Employee of," so without that the individual wouldn't show up as a member, and many of our site features (and event discounts) are tied to membership.

---
Tags: civimember, contacts, relationships
---


# Question
Title: How to send organization a list of current Employees?
I want to send a scheduled email to our organizational contacts to have them review the list of employees we have on record for their organization (employees inherit a membership status with our organization).

Ideally, I'd like to have a private link that the organization's contact can click that will display all contacts who have a relationship of "Is Employee Of" their organization. This way, they can verify whether our records accurately reflect their current employee listing.

I'm using Joomla 3.14 and civi 5.21.1

Is there a way to create a link like this from civi email? If so, how?

# Answer
You may be able to do it using https://civicrm.org/extensions/data-processor extension to create list of contacts belonging to logged in user contact.
> 1 votes

---
Tags: civimail, civimember
---


title: Create a smart group that excludes

text:
# Question
Title: Create a smart group that excludes
Is there a way to have more exclude options in smart groups? The only exclude I see is from contact preferences. I would like to create a smart group for donors that live in CA BUT do not live in Bakersfield, CA.

# Answer
Search Builder (**Search menu » Search Builder**) gives exclusion options on pretty much any field. See the attached screenshot. You would of course have to add additional criteria relating to who constitutes a donor.
> 1 votes

# Answer
You can use custom search 'Include / Exclude Search' (CiviCRM \>\> Search \>\> Custom Searches \>\> Include / Exclude Search)

1. Create a smart group of donor who stay in CA
2. Create a smart group of donor who stay in Bakersfield, CA
3. Use Include / Exclude Search, to search contact in group #1 and exclude from #2

Thanks

Pradeep
> 1 votes

---
Tags: smartgroups
---


# Question
Title: Why are activities to do with a case hidden from contact records?
I have a case and it has some activities which are assigned to Betty. But when I visit Betty's contact record the activities are not listed there, neither is the case, in fact there seems to be absolutely no trace that this activity has been assigned to them.

The Activity tab for a contact record is useful for getting an overview of a contact's involvement with the organisation, so I don't understand why this would be missing?

Is this the designed behaviour, and if so, why?

(Civi 5.21 / Drupal 7)

# Answer
> 1 votes
As Demerit said it is intentionally not supported by CiviCRM to list Case activities under Activity tabs. We had to implement 2 lines of code via extension to have that available under Activity tab.

```
/**
 * Implements hook_civicrm_config().
 *
 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
 */
function activitydashboard_civicrm_config(&$config) {
  CRM_Core_Component::getEnabledComponents();
  Civi::$statics['CRM_Core_Component']['info']['CiviCase']->info['showActivitiesInCore'] = 1;
}

```

If you implement above code than you may also need to apply fix from PR which fixes an error in core.

Thanks

Pradeep

# Answer
> 1 votes
That is how it was intended. Let me see if I can find the original spec for more info.

UPDATE: Haven't found it yet but did find https://issues.civicrm.org/jira/browse/CRM-3829 and also a reference that it is "in the spec" https://forum.civicrm.org/index.php%3Ftopic=6895.0.html

I know the reason is somewhere, but it has come up several times. Regardless of the original reason it seems to be one of the many things in Civi that 50% of people want it one way and 50% another.

I haven't tested this but I wonder what happens if you change `showActivitiesInCore` to `1` in CRM/Case/Info.php...

ANOTHER UPDATE: As I'm looking at the PR I'm reminded that the CiviCase project at the time was also being used as a sandbox for this new thing called jQuery (the rest of civi used dojo), and so part of the reason besides business reasons might have been technical, as in "let's keep this separate so we can play with it without touching the rest of core". There's also some actions like "File on Case" that require some attention when the activity can live on both sides. I also remember at one time, but it seems fixed now, that there were multiple link formats to get to editing an activity, and if you used a non-case one the activity would get "downgraded" to a regular activity and get disconnected from the case.

---
Tags: civicase
---


# Question
Title: Permissions help with using action.forward token in an email
I want to add a forward to a friend at the bottom of an email. When recipient clicks they see the "enter up to 5 email address" page however if they are a non-authenticated user they get a Undefined property error and a not authorized error. The email is sent correctly.  Is there a way to send them to a public page and does anyone know what the Undefined property error is. Thanks

Civi 5.2.1 . on Drupal 7

# Answer
> 0 votes
Make sure you have 'access CiviMail subscribe/unsubscribe pages' permission set for anonymous user.

---
Tags: civimail, permissions, tokens, acl
---


# Question
Title: Extra Decimal Places on Fuzion Token 'Latest Membership Fee'
Sending a Civimail built with Mosaico utilizing Fuzion Token 1.5 {latestcurrentmembership.allfee}

The amount should be $69.00 on a test record but the email reads: 69.000000000

Any suggestions? Was this the fix? Doesn't seem to be working here? https://lab.civicrm.org/dev/core/commit/8008a9fb36d3bae6bbe077540c7e22fddb3dabef

Update: classical Civimail does it too. Our localization settings are English, USD. Monetary Amount Display: %c %a

# Answer
> 2 votes
Can you try applying the patch from here? If it worked please comment the PR your test result for it to get merged.

---
Tags: civimail, tokens
---


# Question
Title: Managing internal Purchase Order forms/requests in CiviCRM
I did a quick search, but only found the reverse about allowing registrations to accept incoming PO numbers. We are looking to implement Purchase Order Forms internally, and wondering if anyone else has done so? Cases seems like a pretty logical place to do this, but I'd love to hear about other potential possibilities. Or if it's a terrible idea, give me some why's. Shouldn't matter, but this is a WordPress install.

# Answer
> 0 votes
I have done this a long time ago but it was very specific to the org's workflow. It involved a custom activity type, some autoupdating of a pdf template, and then an internal approval -\> email -\> offline vendor signature -\> email/fax -\> inbound civi email processor.

I'm not sure if cases would add anything unless there's more going on too.

You've said wordpress but possibly drupal webform plus this online signatures addon could be useful, i.e. the PO is a webform, and then it gets signed online by the vendor and stored in civi.

---
Tags: wordpress
---


# Question
Title: Why can't certain Civimail Mailings be reused?
About half of the mailings we send are missing the "reuse" option in the action links on the "Scheduled and Sent Mailings" screen. Is this because they are sent to a search results rather than to a mailing group?

# Answer
> 8 votes
The Re-Use link does not appear if either:

1. The user does not have at least one of the permissions (Create mailing OR access civimail)

or:

2. If the mailing was created from Find Search \>\> Email - schedule/send via CiviMail (which creates hidden smart group) and have Unsubscribe Group field set.

Thanks

Pradeep

---
Tags: civimail
---


# Question
Title: How can our users request an email with the contact.checksum links?
I am using CiviCRM 5.18.4 with WordPress 5.3.2.

We considered having our contacts all become WordPress Users, but decided to go the route of allowing folks to view and update their own contacts, or register for events, using {contact.checksum} to access their own data.

This works well when I initiate the process by sending them an email, but I want folks to be able to edit their own data on their own timeframe, without waiting for an email from me. So I created a "RequestedLinks" group, and a CiviRule set to send an email with customized links whenever a user joins that group (and then immediately remove them from the group. So far so good.

But how do I create a profile or form to let them trigger that rule? I want folks to enter an email address, without prompting, and submit that form. So I created a one-field profile. But do I display that profile in "Create" or "Edit" mode? Neither does what I want.

Once again, I feel I am struggling to invent something that is probably very easy... So thanks in advance.

# Answer
The create mode should do what you want - have you ticked "Standalone Form or Directory" in the profile settings?

In case that does not work, we are currently developing an extension that probably does what you need. Unfortunately it is still in development and not yet documented but you can find the code here: https://github.com/systopia/de.systopia.selfservice
> 1 votes

---
Tags: civirules, checksum
---


title: How to generate group unsubscribe link

text:
# Question
Title: How to generate group unsubscribe link
We're using Google Groups Sync to synchronize our members in CiviCRM with groups in Google Groups. However, if the user unsubscribes from the list using the Google Groups link, Google Groups Sync will automatically re-add them during the next sync cycle.

The solution, I believe, is to include the unsubscribe link CiviCRM would generate if the e-mail originated from CiviMail, but I can't work out how to generate that link.

Is it possible to generate an unsubscribe link manually, or generic enough to include in the footer of Google Groups messages?

# Answer
> 3 votes
I know I asked this question quite some time ago, but I thought I'd share the solution we landed on.

We found and tested two solutions that worked well. The first was using Tags:

* Allow users to manage their tags
* Create tags for the groups members can opt-in/out of
* Create smart groups based on the membership status and tags
* Sync the Google Group to the smart group for the associated tag

The second approach was very similar, but instead of using tags, we used a set of custom fields as checkboxes for each of the groups. We settled on this approach, because it allowed us more control over what was shown to the user and freed up tags for other uses.

# Answer
> 1 votes
I'm not familiar with Google Group Sync, but if the message is not coming from CiviCRM, I'm not seeing how you would include an individualized CiviCRM checksum (generated by a CiviCRM token) for each contact. As you say a generic link to allow anyone to unsubscribe is needed.

An option would be to include a link to a profile that allows people to manage their groups. Since this is a profile that works for anyone, no token is required. But the user would need to log in.

If contacts don't have user accounts or you don't want them to have to login, you could write an extension for the user to request a new link - similar to Pete's idea here: Can an expired checksum provide any warning to the user when they get to the site?

---
Tags: civimail, unsubscribe
---


# Question
Title: Can I save bulk update screens for future use?
I'm not sure if my title is 100% clear, but here's the situation I'm facing.

We have custom fields that once a year we have to manually update for all current members. A smart group was created to find all current (paid) members and a profile that shows the username and the two custom fields we need to update. To initiate the bulk update, we do the following:

* Click on Manage Groups
* Click on the Contacts link of the group in question
* Select all entries
* From the Actions drop down list, select Update multiple Contacts
* On the next screen, select the profile for updating the appropriate fields
* Click Continue

Now, we can update the necessary fields, click Update Contacts and we're done.

Is there a way to save that bulk update screen for later re-use. Ideally, I'd like to be able to save it for easy access from the menu much like a report. Not only would it be quicker to access, but also simpler when training someone else to make these updates. Basically, it should remember the Smart Group and Profile used to create it.

# Answer
> 1 votes
You can use the search action designer extension to design your own bulk update actions.

---
Tags: profile, smartgroups
---


# Question
Title: Drop down labels on front end CiviCRM forms not accessible (With solution!)
Front end CiviCRM (5.21 and older) forms have drop down select list labels which are not accessible. When using a screenreader such as jaws, the reader reads the selected value of the control instead of the label.

This is counter to the way that the rest of the input controls work. The value *should be* read when clicking the control. Tabbing to it should read the label.

**WARNING: latest version of select2 (4.0.2) breaks admin toolbar. Patch the one included with CiviCRM**

# Answer
Solution is to either patch the ../web/libraries/civicrm/bower\_components/select2/select2.js and select2.min.js files

or

**WARNING: select2 4.0.12 is *not* compatible with CiviCRM 5.21. The admin toolbar will disappear if you do the following. Use the patches. Do not bower install select2! ;-):**

Move the select2 folder out of bower\_components and run:

$ bower install select2

to get latest version of select2 (4.0.12 as of this writing) , which *is* accessible. I've not fully tested the latest version of select2, but it seems to be behaving on our stage server.

**Patching existing select2 is the only option** until regression testing is done by the CiviCRM folks, **unless you want to patch latest version of select2 to fix toolbar issue**.

**Do this!:** patches (if you want to keep current version of select2)...

select2.js.patch:

```
--- select2.js.original 2020-01-24 13:55:52.164674038 +0000
+++ select2.js  2020-01-24 13:56:20.955011734 +0000
@@ -2269,7 +2269,7 @@

             // add aria associations
             selection.find(".select2-chosen").attr("id", "select2-chosen-"+idSuffix);
-            this.focusser.attr("aria-labelledby", "select2-chosen-"+idSuffix);
+            this.focusser.attr("aria-labelledby", "s2id_autogen"+idSuffix);
             this.results.attr("id", "select2-results-"+idSuffix);
             this.search.attr("aria-owns", "select2-results-"+idSuffix);

```

select2.min.js.patch:

```
--- select2.min.js.original 2020-01-24 13:53:46.859556059 +0000
+++ select2.min.js  2020-01-24 13:54:48.440139669 +0000
@@ -124,7 +124,7 @@
         null!==s&&this.container.css("width",s)}}),A=k(R,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html("<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>   <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span></a><label for='' class='select2-offscreen'></label><input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' /><div class='select2-drop select2-display-none'>   <div class='select2-search'>       <label for='' class='select2-offscreen'></label>       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'       aria-autocomplete='list' />   </div>   <ul class='select2-results' role='listbox'>   </ul></div>")
         return t},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var t,s,i
         this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),t=this.search.get(0),t.createTextRange?(s=t.createTextRange(),s.collapse(!1),s.select()):t.setSelectionRange&&(i=this.search.val().length,t.setSelectionRange(i,i))),this.prefillNextSearchTerm(),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),P.call(this,"selection","focusser")},initContainer:function(){var i,n,o=this.container,a=this.dropdown,r=L()
-        this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=i=o.find(".select2-choice"),this.focusser=o.find(".select2-focusser"),i.find(".select2-chosen").attr("id","select2-chosen-"+r),this.focusser.attr("aria-labelledby","select2-chosen-"+r),this.results.attr("id","select2-results-"+r),this.search.attr("aria-owns","select2-results-"+r),this.focusser.attr("id","s2id_autogen"+r),n=e("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.on("focus.select2",this.bind(function(){this.focus()})),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"))
+        this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=i=o.find(".select2-choice"),this.focusser=o.find(".select2-focusser"),i.find(".select2-chosen").attr("id","select2-chosen-"+r),this.focusser.attr("aria-labelledby","s2id_autogen"+r),this.results.attr("id","select2-results-"+r),this.search.attr("aria-owns","select2-results-"+r),this.focusser.attr("id","s2id_autogen"+r),n=e("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.on("focus.select2",this.bind(function(){this.focus()})),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"))
         var l=this.opts.element.attr("title")
         this.opts.element.attr("title",l||n.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&229!=e.keyCode){if(e.which===U.PAGE_UP||e.which===U.PAGE_DOWN)return g(e),t
             switch(e.which){case U.UP:case U.DOWN:return this.moveHighlight(e.which===U.UP?-1:1),g(e),t

```

Hope someone finds this useful :-)

Neil Davis

Developer

National Federation of the Blind
> 5 votes

---
Tags: drupal, select2, accessibility
---


title: Locked out of CiviCRM admin

text:
# Question
Title: Locked out of CiviCRM admin
Wordpress 5.3.2 CiviCRM 5.21.0

I've recently upgraded to CiviCRM 5.21.0 successfully and everything was working fine.

Whilst tidying up the site, I inadvertently and stupidly changed the CiviCRM Resource URL to the site URL (not the full path) instead of \[civicrm.root\]/ I now cannot get into CiviCRM admin through Wordpress admin so am unable to change the resource URL back to how it was.

Does anyone know a way of resettting things through FTP or phpMyAdmin please?

The settings in civicrm-settings.php seem OK. I've tried reinstalling CiviCRM but still cannot get into Admin.

Many thanks.

# Answer
> 3 votes
The easiest way would probably be to override this value in civicrm.settings.php. There should be a commented out line something like:

```
// $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = '....';

```

You can uncomment this line by removing the leading '//' and edit the url. Make a backup of civicrm.settings.php first.

If you wanted to make a change in the database you can do this by editing the value of civicrm\_setting for the row with name "userFrameworkResourceURL".

I'd recommend backing up the database or at least that table first.

If you have logging enabled via (Admin -\> System Settings -\> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.) )

You could find the previous value for this in the log\_civicrm\_setting table.

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


title: Is there a table element in mosaico?

text:
# Question
Title: Is there a table element in mosaico?
Still getting to grips with Mosaico layouts. Is there an option to build/ style a table in the templates?

Someone has pasted in a table from an external source and doesn't want to edit font sizes in html.

# Answer
There are no table elements/blocks that you can add currently. You could try editing the source of a text block an adding manually however it sounds like this isn't ideal in this instance.

To add a table element you'd need to customise the html template itself.

If this was something you wanted to do you could use this extension which adds some additional template elements as a starting point.

https://lab.civicrm.org/MikeyMJCO/mjcomosaico
> 2 votes

---
Tags: civimail, mosaico
---


# Question
Title: How to automatically create a user account when someone donates?
My idea is something like this:

1. When someone gives a donation, an account with specific permission gets created.
2. User gets notification of the account creation via the contribution receipt or a separate email
3. When they login, it should redirect them to user dashboard

Is this something possible to achieve? I am on drupal 7. CiviCRM 5.20

Any alternative idea or suggestion would be very helpful.

# Answer
Yes, this is possible by using a profile - see the 'Advanced Settings' of the profile used in the contribution page and you'll see (towards the bottom) the settings re creating a drupal account. When they have set a password and logged in to Civi the dashboard is the default.
> 3 votes

---
Tags: civicontribute, user-account, user-dashboard
---


title: Registration Button

text:
# Question
Title: Registration Button
Good morning,

I am trying to move the Registration Button in our event registration page to somewhere more noticable. Also, I'd like for the button to be bigger.

Can someone help me please? Evelyn Re' evelyn@nccyber.org

# Answer
> 1 votes
I noticed on your website the chapter meeting announcement and see that it's linking to an Event Info page on CiviCRM Spark.

Since your website already has all of the relevant information, I recommend linking directly to the Event Registration page.

---
Tags: registration
---


# Question
Title: images in emails not displayed in Gmail clients (browser or mobile)
For months/years we have been battling Google support on fixing an issue we're seeing so I'm wondering if others have come across the same thing.

Images in emails sent by CiviCRM (CiviMail or just via "send email") do not display in Gmail clients (both browser-based and mobile, e.g. Android app).

They do display perfectly when the very same email is being viewed in any other non-Gmail client (yes, even Outlook gets this right).

The images are publicly/globally available, but Google replaces the image URL with a proxy URL of sorts. E.g. they turn this: https://www.evergreenmtb.org/media/civicrm/persist/contribute/images/images/newsletter-header-evergreen-kittitas.jpg

to this (which gets you a 404 error when accessed directly): https://ci5.googleusercontent.com/proxy/e-K9WkNS0vJgrFL\_anW3XB4jzMkNZsp-DOm7d04zIaqOY-o-UXAQF9o3FvrKJAGi2VD\_fjUnyJ2xg\_ywd8kBe7n22rJoBTzD2HaFilJOKK9zab8GkvkCKodIpv4s7aNA2BwPIoQER03tyR\_vZZ4qFiFwO6B2uYSDF1Pjioo-zB6Hg6No6qsx=s0-d-e1-ft#https://www.evergreenmtb.org/media/civicrm/persist/contribute/images/images/newsletter-header-evergreen-kittitas.jpg

Display images "always" option is selected in Gmail settings, the sender is saved as a contact, etc.

I sent Google a gazillion examples, including email source files, HAR files, you name it, but to-date no dice.

Any thoughts? Thanks!

# Answer
> 3 votes
thanks for the hint; solved this by whitelisting the following domains in WHM in the "Add IP to Firewall" section:

```
ci3.googleusercontent.com
ci4.googleusercontent.com
ci5.googleusercontent.com
ci6.googleusercontent.com

```

# Answer
> 2 votes
I sent an email containing your image URL from my Civi site to a gmail account and observed the same issue, while images from my site work as expected. See this possible solution -- "one of our security firewalls blocked Google Image Proxy from accessing our images"

# Answer
> 1 votes
Si esta usando el Cpanel deshabilite la opción "Protección de enlace directo"

Edit - Google translation: If you are using the Cpanel disable the "Direct link protection" option

---
Tags: civimail, email
---


title: Current employer not exporting to CSV

text:
# Question
Title: Current employer not exporting to CSV
I have tagged a group of contacts and am exporting them to a CSV file. When I do this, of the 30 contacts only about 25 show the current employer in the CSV file. I checked the remaining five and they have a current employer listed in the contact record, but it does not export. How can I fix this? Thank you.

# Answer
CiviCRM populates current employer based on what is stored in civicrm\_contact.current\_employer rather employee/employer of relationship. While adding employee/employer of relationship relationship the form provide is\_current employee option, if ticked civicrm\_contact.current\_employer is stored with organization name and also same field is used in add/edit contact form.

For some reason the data for 5 contacts didn't had civicrm\_contact.current\_employer saved properly, resaving them might populated the field correctly.
> 3 votes

---
Tags: export, fields, csv
---


# Question
Title: Base table not found for civicrm_contribution_page #201
On latest version of 8.x-3.x branch i get following error when try to add a view for contribution page

SQLSTATE\[42S02\]: Base table or view not found: 1146 Table 'civicrmdb.civicrm\_contribution\_page' doesn't exist: SELECT civicrm\_contribution\_page.id AS id FROM {civicrm\_contribution\_page} civicrm\_contribution\_page LIMIT 11 OFFSET 0; Array ( )

views for Contact, Contribution, Event works fine but not incase of Contribution page, Payment processor, campaign etc.

Can we create list of contribution pages/campaigns/payment processors using civicrm\_entity + civicrm views d8?

# Answer
This happens when you have separate database for civicrm tables. Below patch in civicrm\_entity module fixes problem for `'Base table or view not found:'`

```
diff --git a/src/CivicrmEntityViewsData.php b/src/CivicrmEntityViewsData.php
index 51db201..ffbb31d 100644
--- a/src/CivicrmEntityViewsData.php
+++ b/src/CivicrmEntityViewsData.php
@@ -17,6 +17,8 @@ class CivicrmEntityViewsData extends EntityViewsData {
     $base_table = $this->entityType->getBaseTable() ?: $this->entityType->id();
     $base_field = $this->entityType->getKey('id');

+    $database = _civicrm_get_db_config()['key'];
+
     // Setup base information of the views data.
     $data[$base_table]['table']['group'] = sprintf('%s (CiviCRM Entity)', $this->entityType->getLabel());
     $data[$base_table]['table']['provider'] = $this->entityType->getProvider();
@@ -27,6 +29,7 @@ class CivicrmEntityViewsData extends EntityViewsData {
       'field' => $base_field,
       'title' => $this->entityType->getLabel(),
       'cache_contexts' => $this->entityType->getListCacheContexts(),
+      'database' => $database,
     ];
     $data[$base_table]['table']['entity revision'] = FALSE;
     if ($label_key = $this->entityType->getKey('label')) {

```
> 2 votes

---
Tags: drupal-views, civicrm-entity, drupal-8
---


# Question
Title: Auto-filled Drupal Webform That Creates New Contact
Is it possible to make a Drupal Webform which always creates a new contact but uses Existing Contact for prefilling?

The use-case is that the data needs to be updated but supervised by another human. So what I in effect need is for my drupal webform to create a duplicate based on the existing contact. Duplicates are then to be merged by a supervised deduplication process.

How would I go about doing this? Would it be a matter of inserting some code before the form is processed or is the entire Existing Contact framework more complicated then that? Or is there an easier way to achieve this?

# Answer
> 1 votes
Check out I3Val Input Validation (https://github.com/systopia/be.aivl.i3val/blob/master/docs/index.md) as this allows backend validation before changes go into Civi. It may save people having to complete information again that hasn't changed and from an admin perspective unlikely more work than having to check and then dedupe.

---
Tags: drupal, webform-civicrm
---


# Question
Title: What information does log_civicrm_group keep? How is it useful?
Do you use the log\_civicrm\_group logs? Our log file is now about 300MB - quite crazy. Are records of removal and adding contacts to groups stored here? Thats information we would like to keep. How do you use log\_civicrm\_group?

Latest Wordpress / Civi.

# Answer
> 3 votes
There had been an issue recently where way more 'changes' where logged than intended: https://lab.civicrm.org/dev/core/issues/449.

Can you verify that it is still growing way too fast since running on a patched version?

The information you are looking for is stored in the table `civicrm_subscription_history` aswell as `civicrm_group_contact` for current status.

With `log_civicrm_group` you could track how the title, description or hierarchy of a group change over time.

---
Tags: database, groups, mysql, logs
---


# Question
Title: How to generate a report excluding recurring contributions?
Is there any way to get a report, ideally something like the Contribution Summary report, which allows you to filter by recurring or non-recurring contribution?

It would be quite useful to be able to get a report of all the donors who gave more than $XXX last year, but exclude recurring contributions. There are reports that will show only recurring donations, but I can't seem to find anything in reports that allows me to exclude recurring donations (obviously, this is easily done in contribution search, but that doesn't let me find aggregate contributions over the year).

If this isn't currently possible, is it as simple as looking for donations with an empty or not-empty recurring contribution ID?

# Answer
ReportPlus (https://civicrm.org/extensions/reportplus) is worth looking at.

The included template report for 'Contribution Matrix Plus' definitely has a filter for 'Contribution is Recurring? - Any, Yes, No' already and I suspect some of the other templates will do too.
> 4 votes

# Answer
Eileen's Extended Reports extension has contribution reports that may help. In the latest version ('master' branch, not yet officially released), Jon added a display field "Recurring Donation?" that can be selected under the 'Columns' tab. At first glance, it doesn't seem to be possible to filter using that option, but you could export all the results and then filter using your favourite spreadsheet software.

The Donation Summary report does not have a column/filter available, but looking at Jon's patch here, it should be relatively easy to add?

In other words, a non-recurring contribution has an empty "recurring contribution ID", but it would be great to improve reports in general.
> 3 votes

# Answer
There are no such report that filters based on if contribution is recurring or not. As said by bgm if you are developer than you can use hook\_civicrm\_alterReportVar() hook or send a PR to core to add contribution recur filter on contribution report. Since you are using Drupal CMS you can create your own report using Views module. The views integration provide lots of filtering and fields selection and also you can export the results by installing relevant modules.

An example of simple view which displays contribution id having recurring.

```
$view = new view();
$view->name = 'contr';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'civicrm_contribution';
$view->human_name = 'contr';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'contr';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: CiviCRM Contributions: Contribution ID */
$handler->display->display_options['fields']['id']['id'] = 'id';
$handler->display->display_options['fields']['id']['table'] = 'civicrm_contribution';
$handler->display->display_options['fields']['id']['field'] = 'id';
/* Filter criterion: CiviCRM  Recurring Contributions: Recurring Contribution ID */
$handler->display->display_options['filters']['id']['id'] = 'id';
$handler->display->display_options['filters']['id']['table'] = 'civicrm_contribution_recur';
$handler->display->display_options['filters']['id']['field'] = 'id';
$handler->display->display_options['filters']['id']['operator'] = 'not empty';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'contr';
$translatables['contr'] = array(
  t('Master'),
  t('contr'),
  t('more'),
  t('Apply'),
  t('Reset'),
  t('Sort by'),
  t('Asc'),
  t('Desc'),
  t('Items per page'),
  t('- All -'),
  t('Offset'),
  t('« first'),
  t('‹ previous'),
  t('next ›'),
  t('last »'),
  t('Contribution ID'),
  t('.'),
  t(','),
  t('Page'),
);

```

Thanks

Pradeep
> 2 votes

---
Tags: civicontribute, civireport, contributions, recurring-contributions, reports
---


title: Sending civiMail through Amazon SES

text:
# Question
Title: Sending civiMail through Amazon SES
I'm using civiCRM 5.21.0 and Wordpress 5.3.2 I'm trying to send civiMail bulk email sending through Amazon SES. I configured and activated SMTP credentials in civiCRM settings. The test mail works fine (email sent throuhg Aamazon SES); I can also send individual mails effectively.
I used a gsuite email adresse as bounced email. From the log, Fetch Bounces cron jobs apparently works. When I'm trying to use CiviMail to send bulk mails (and mosaico as a template builder), they're not sent (although the corresponding cron job is triggered correctly). Looking in ConfigAndLog I read the following error:

```
[error] Ignoring exception thrown by nullHandler: 10001, Failed to connect to ssl://email-smtp.us-east-1.amazonaws.com:465 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )]

```

Thanks for your help!!

Here is the debug log :

```
[debug] $backTrace = #0 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(919): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::nullHandler(Object(PEAR_Error))
#2 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(577): PEAR_Error->__construct("Failed to connect to ssl://email-smtp.us-east-1.amazonaws.com:465 [SMTP: Fail...", 10001, 16, (Array:2), NULL)
#3 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(236): PEAR::_raiseError(NULL, "Failed to connect to ssl://email-smtp.us-east-1.amazonaws.com:465 [SMTP: Fail...", 10001)
#4 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/pear/mail/Mail/smtp.php(397): PEAR::__callStatic("raiseError", (Array:2))
#5 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/pear/mail/Mail/smtp.php(279): Mail_smtp->getSMTPObject()
#6 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/pear/mail/Mail/smtp.php(266): Mail_smtp->send_or_fail("<laurent.arnoult@parlemonde.org>", (Array:11), "--=_5b439487a1c6a51ee03f531590ef1bb1\nContent-Transfer-Encoding: 8bit\nConten...")
#7 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/Listener/DefaultSender.php(58): Mail_smtp->send("<laurent.arnoult@parlemonde.org>", (Array:11), "--=_5b439487a1c6a51ee03f531590ef1bb1\nContent-Transfer-Encoding: 8bit\nConten...")
#8 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(184): Civi\FlexMailer\Listener\DefaultSender->onSend(Object(Civi\FlexMailer\Event\SendBatchEvent), "civi.flexmailer.send", Object(Civi\Core\CiviEventDispatcher))
#9 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:1), "civi.flexmailer.send", Object(Civi\FlexMailer\Event\SendBatchEvent))
#10 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("civi.flexmailer.send", Object(Civi\FlexMailer\Event\SendBatchEvent))
#11 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/FlexMailer.php(222): Civi\Core\CiviEventDispatcher->dispatch("civi.flexmailer.send", Object(Civi\FlexMailer\Event\SendBatchEvent))
#12 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/FlexMailer.php(159): Civi\FlexMailer\FlexMailer->fireSendBatch((Array:1))
#13 [internal function](): Civi\FlexMailer\FlexMailer->Civi\FlexMailer\{closure}((Array:1))
#14 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/Event/WalkBatchesEvent.php(55): call_user_func(Object(Closure), (Array:1))
#15 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/Listener/DefaultBatcher.php(71): Civi\FlexMailer\Event\WalkBatchesEvent->visit((Array:1))
#16 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(184): Civi\FlexMailer\Listener\DefaultBatcher->onWalk(Object(Civi\FlexMailer\Event\WalkBatchesEvent), "civi.flexmailer.walk", Object(Civi\Core\CiviEventDispatcher))
#17 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:1), "civi.flexmailer.walk", Object(Civi\FlexMailer\Event\WalkBatchesEvent))
#18 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("civi.flexmailer.walk", Object(Civi\FlexMailer\Event\WalkBatchesEvent))
#19 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/FlexMailer.php(196): Civi\Core\CiviEventDispatcher->dispatch("civi.flexmailer.walk", Object(Civi\FlexMailer\Event\WalkBatchesEvent))
#20 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/FlexMailer.php(161): Civi\FlexMailer\FlexMailer->fireWalkBatches(Object(Closure))
#21 /home/parlemon/www/wp-content/uploads/civicrm/ext/org.civicrm.flexmailer/src/FlexMailer.php(122): Civi\FlexMailer\FlexMailer->run()
#22 [internal function](): Civi\FlexMailer\FlexMailer::createAndRun(Object(CRM_Mailing_BAO_MailingJob), Object(Mail_smtp), NULL)
#23 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/Core/Resolver.php(119): call_user_func_array((Array:2), (Array:3))
#24 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/CRM/Mailing/BAO/MailingJob.php(180): Civi\Core\Resolver->call("\Civi\FlexMailer\FlexMailer::createAndRun", (Array:3))
#25 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/CRM/Mailing/BAO/Mailing.php(2784): CRM_Mailing_BAO_MailingJob::runJobs(NULL, NULL)
#26 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(345): CRM_Mailing_BAO_Mailing::processQueue()
#27 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(85): civicrm_api3_job_process_mailing((Array:1))
#28 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(152): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#29 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(83): Civi\API\Kernel->runRequest((Array:9))
#30 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("job", "process_mailing", (Array:1), NULL)
#31 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(133): civicrm_api("job", "process_mailing", (Array:1))
#32 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(66): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#33 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(118): CRM_Core_JobManager->execute(FALSE)
#34 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(85): civicrm_api3_job_execute((Array:2))
#35 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(152): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#36 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(83): Civi\API\Kernel->runRequest((Array:9))
#37 /home/parlemon/www/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("job", "execute", (Array:2), NULL)
#38 /home/parlemon/www/wp-content/plugins/civicrm/wp-cli/civicrm.php(202): civicrm_api("job", "execute", (Array:2))
#39 /home/parlemon/www/wp-content/plugins/civicrm/wp-cli/civicrm.php(153): CiviCRM_Command->api()
#40 [internal function](): CiviCRM_Command->__invoke((Array:2), (Array:0))
#41 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(98): call_user_func((Array:2), (Array:3), (Array:0))
#42 [internal function](): WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}((Array:3), (Array:0))
#43 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(451): call_user_func(Object(Closure), (Array:3), (Array:0))
#44 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(371): WP_CLI\Dispatcher\Subcommand->invoke((Array:3), (Array:0), (Array:0))
#45 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(394): WP_CLI\Runner->run_command((Array:4), (Array:0))
#46 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1160): WP_CLI\Runner->run_command_and_exit()
#47 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#48 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(74): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#49 phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#50 phar:///home/parlemon/bin/wp/php/boot-phar.php(11): include("phar:///home/parlemon/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php")
#51 /home/parlemon/bin/wp(4): include("phar:///home/parlemon/bin/wp/php/boot-phar.php")

```

# Answer
Let me recommend you this great extension (compatible with Mosaico, just empty CiviCRM cache before creating a new mailing). Worked for me! Allow you to handle bounces, AND track clicks & open mails through Amazon AWS. :-)
> 1 votes

---
Tags: civimail, mosaico, amazon
---


# Question
Title: Recording activities - case or contact summary page?
Is it better practice to record activities in the case rather than on the contact summary? If so, why?

# Answer
Kate, Welcome to CiviCRM stack exchange. About your question, it depends upon your business logic. If you want the activity to be part of the case than you should create them inside a case since the New Activity form from the Contact summary page doesn't provide ability to add activity to case. You can but obvious move the activity later after creating by using Move to case link or Move to case from task action.

If you don't want activity to be part of the case than you should use option from Contact Summary screen.

Thanks

Pradeep
> 2 votes

# Answer
If the activity relates to the Case, then create it there but otherwise just on the Contact.

For example, if you have a case for managing volunteer onboarding, then a meeting relating to onboarding would be a case activity but a phone call about a donation would be a simple contact activity.
> 2 votes

---
Tags: activities
---


title: CiviCRM WordPress doesn't work suddenly

text:
# Question
Title: CiviCRM WordPress doesn't work suddenly
Not sure where I went wrong.

I recently installed the CiviCRM WordPress plugin.

I also installed a number of other plugins, but one of them that was installed after Civi was an SSO one.

I wouldn't think this would negatively affect anything, especially Civi, but apparently it did!

I've tried deactivating the SSO plugin, and seeing if Civi would work, and to no avail.

I even tried deactivating, deleting, and re-installing the Civi plugin 3 times. Still nothing.

As shown in the image, I get the following bit of text on the screen when I go to the CiviCRM tab in my dashboard:

**Configure Your Dashboard Refresh Dashboard Data Welcome to your Home Dashboard Your dashboard provides a one-screen view of the data that's most important to you. Graphical or tabular data is pulled from the reports you select, and is displayed in 'dashlets' (sections of the dashboard)**.

Have absolutely no idea what I'm doing wrong. I really would rather not do a fresh install of WordPress... I already have quite a bit of other things set up, custom styling on my front end, etc.

# Answer
> 4 votes
FIXED!

My issue was with the resource URL.

Update the following file: **example.org/wp-content/uploads/civicrm/civicrm.settings.php**

Approx. line 82: **$civicrm\_setting\['URL Preferences'\]\['userFrameworkResourceURL'\] = 'https://example.org/wp-content/plugins/civicrm/civicrm';**

I had put an SSL certificate on via my host (SiteGround), just before this issue started happening, which was messing it up.

All the paths need to have **https:** in them.

Shoutout to Jon G for his help and patience!

# Answer
> 3 votes
Almost every time I've seen CiviCRM fail to load a portion of the screen, it's been a permission issue on the templates\_c folder.

I can give the standard fix if you have command line access: Navigate into the `templates_c` folder and run `chown -R <name of web user> .` However, every control panel has a different way of handling this - and if the permissions got screwed up, then there's probably a deeper underlying issue (e.g. cron is running as the wrong user).

If you're not sure how to change the owner of `templates_c`, simply delete it - next time you reload the CiviCRM page, it will be regenerated (correctly). You'll still want to check for a bad cron setup, but it's a good way to quickly see if the issue is indeed a cached template issue.

---
Tags: wordpress, cms-integration, integration, siteground, sso
---


title: Is PHP 7.4 fully supported?

text:
# Question
Title: Is PHP 7.4 fully supported?
We've just updated to PHP7.4 and it seems to be working ok, but without extensive testing it is hard to know.

PHP 7.4 is not even listed on the requirements and compatibility page.

# Answer
> 2 votes
Not yet officially. If you want to track progress you can subscribe to the ticket at https://lab.civicrm.org/dev/core/issues/1496 and its subtickets.

If you find some issue feel free to report it in a ticket there.

The money\_format issue might be something you could look at. If you're testing I'd look closely at how money amounts are formatted on the screen and in receipts - that kind of thing.

---
Tags: php7
---


title: Bulk Un-checking

text:
# Question
Title: Bulk Un-checking
I wanted to know if there is a way to un-check a section in individual contacts in a bulk size way rather than going into each individual contact and un-checking the section i need un-checked.

# Answer
> 1 votes
You can create profile with the fields you want to updated and then use bulk update action from search action to update multiple records.

Doc: https://www.cividesk.com/blog/post/batch-update-using-profiles

Thanks

Pradeep

---
Tags: import
---