# Question
Title: Upgrade to 5.15.alpha1 fails due to "Incorrect key file for table" database error
Trying to carry out an upgrade of civicrm. It fails when trying to upgrade the database to 5.15.alpha1 due to "Incorrect key file for table" when trying to create an index called `index_all`. The table in question is not repairable. It is empty.

Output of SHOW INDEXES

```
mysql> show indexes from civicrm_prevnext_cache;
+------------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table                  | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+------------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| civicrm_prevnext_cache |          0 | PRIMARY  |            1 | id          | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+------------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
1 row in set (0.00 sec)

```

I'd be grateful for any tips on how to fix this.

The log file contains the following:

```
Mar 24 16:26:10  [info] Running task: Upgrade DB to 5.15.alpha1: SQL

Mar 24 16:26:11  [info] Running task: Fix errant deferred revenue settings

Mar 24 16:26:12  [info] Running task: Fix cache key column name in prev next cache

Mar 24 16:26:12  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entity_id2, entity_table, is_selected) [nativecode=1034 ** Incorrect key file for table 'civicrm_prevnext_cache'; try to repair it]
    [type] => DB_Error
    [user_info] => CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entity_id2, entity_table, is_selected) [nativecode=1034 ** Incorrect key file for table 'civicrm_prevnext_cache'; try to repair it]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entity_id2, entity_table, is_selected) [nativecode=1034 ** Incorrect key file for table 'civicrm_prevnext_cache'; try to repair it]"]
)

Mar 24 16:26:12  [debug] $backTrace = #0 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(915): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/civcrm-test/civicrm/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/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/packages/DB.php(997): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...")
#3 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...")
#4 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...", "DB_Error", TRUE)
#5 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
#6 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(935): DB_common->raiseError(-1, NULL, NULL, "CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...", "1034 ** Incorrect key file for table 'civicrm_prevnext_cache'; try to repair it")
#7 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(405): DB_mysqli->mysqliRaiseError()
#8 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...")
#9 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2691): DB_common->query("CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...")
#10 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...")
#11 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(421): DB_DataObject->query("CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...")
#12 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1420): CRM_Core_DAO->query("CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...", TRUE)
#13 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/php/FiveFifteen.php(74): CRM_Core_DAO::executeQuery("CREATE INDEX index_all ON civicrm_prevnext_cache (cachekey, entity_id1, entit...")
#14 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php(74): CRM_Upgrade_Incremental_php_FiveFifteen::fixCacheKeyColumnNamePrevNext(Object(CRM_Queue_TaskContext))
#15 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php(202): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#16 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php(36): CRM_Queue_Runner->runNext(TRUE)
#17 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php(90): CRM_Queue_Page_AJAX::{closure}()
#18 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php(38): CRM_Queue_ErrorPolicy->call(Object(Closure))
#19 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(234): CRM_Queue_Page_AJAX::runNext()
#20 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
#21 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#22 /var/www/html/civcrm-test/civicrm/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:5))
#23 /var/www/html/civcrm-test/civicrm/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress->invoke("")
#24 /var/www/html/civcrm-test/civicrm/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#25 /var/www/html/civcrm-test/civicrm/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
#26 /var/www/html/civcrm-test/civicrm/wp-admin/admin.php(254): do_action("toplevel_page_CiviCRM")
#27 {main}

```

# Answer
In step 5\_15\_alpha1 the field cacheKey must be renamed in cachekey. Is that done.

Try to update the fieldname if it is cacheKey. and then: CREATE INDEX index\_all ON civicrm\_prevnext\_cache (cachekey, entity\_id1, entity\_id2, entity\_table, is\_selected)
> 2 votes

# Answer
If the table is empty, try dropping and recreating it, i.e.

`SHOW CREATE TABLE civicrm_prevnext_cache;`

Then copy the output to the clipboard.

Then `DROP TABLE civicrm_prevnext_cache;`

Then paste from the clipboard.
> 2 votes

---
Tags: upgrade, database
---


# Question
Title: how to download all contacts onto excel spreadsheet?
I want to download all my contacts onto an excel spreadsheet. I also want to include what group they are in, all the invitations and literally all the information I have on there. How do I do that?

# Answer
I believe you install EXPORT TO NATIVE EXCEL or EXPORT TO EXCEL extension and find contacts and select export contact from actions list and export all primary fields or the fields you want to export.

Export contact doc: https://docs.civicrm.org/user/en/latest/common-workflows/exporting-your-contacts/
> 1 votes

---
Tags: export
---


# Question
Title: Alternatives to editing civicrm.settings.php
The drupal hosting system that we are currently using prevents us from making any changes to civicrm.settings.php which I find is sometimes necessary or at least the most sensible solution in certain situations. (One example is to set domain IDs when using Domain Access.) I believe the file is regenerated regularly so changes wouldn't last long anyway. I am hoping that someone who knows what they're doing can suggest an elegant way that I could put any code meant for civicrm.settings.php in another file elsewhere, preferably on the site level for multisite situations.

Thanks!

# Answer
> 1 votes
I'm assuming you're talking about `DEFINE` statements since you mention domain id? Are you able to edit drupal's settings.php? If so you can just put those DEFINEs in there since it loads first and most of the DEFINE settings in civicrm.settings.php check for `if (defined(SETTING_NAME))`.

If you can't edit drupal's settings.php, I haven't tested this but can you write a little drupal module that sets those defines, and in the `system` table set that module's weight to something lower than the weight for civicrm so that it runs first.

If you're talking about various `$civicrm_setting['xxxxx']` entries, then again I haven't tested but the module method might also work but you would set the weight higher than civicrm's weight, so that it loads after.

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


# Question
Title: Custom fields in webform membership renewal
I'm starting out to create a CiviCRM system under Drupal for managing the memberships of a Photobiology Society. I have already imported contacts, organizations, memberships and contributions from the old system.
Now I should carry out the registration phase of the applications or renewals to the society through the Webform integration. No problem for the applications, while for the renewals I would like to present all the data to the old member, INCLUDING the custom ones that I had to create. If I include an "existing contact" field, I'm able to only fill in the standard CiviCRM fields (name, address, email, phone, etc.) and not the custom ones, including the active membership. Can someone help me and above all is it possible to do this?

# Answer
> 1 votes
Pinto Vasa, Welcome to CiviCRm SE. Yes its possible to include any CiviCRM custom fields on webform which is available under their respective tab of CiviCRM webform config setting. Those fields will be pre-populated on webform based on logged in user details, will be empty if its a anonymous submission or new submission if logged in. The webform can be used to populate details of specific contact by passing contact id (and checksum if the user doesn't have sufficient permission eg anonymous user or minimal permission authenticated user).

eg http://example.org/renewmembership?cid=202&cs=9f4a2e5d4d57567b6ba4468750ac128d\_1585225559\_168

---
Tags: drupal, civimember, contacts, custom-fields, webform-civicrm
---


# Question
Title: some recurring contributions linked to memberships are not moving on the membership end date
I'm working with @wmortada debugging some recurring contribution membership renewal issues.

We have lots of memberships with recurring contributions but some of the memberships are not updating as expected when the recurring contribution is received.

The memberships that were not updating were not linked to the recurring contributions via the `civicrm_membership.contribution_recur_id` field. So we added recurring contribution the link manually. My assumption was that when a contribution for a recurring contribution linked to a membership in this way is received, it would be linked to the membership. But this is not happening for those where we added the field manually.

As a result (as I understand it) `CRM_Contribute_BAO_Contribution::updateMembershipBasedOnCompletionOfContribution()` is unable to find the related membership and update the membership end date.

We are using @artfulrobot's GoCardless extension for the recurring contribution. `CRM_GoCardless_Page_Webhook::doPaymentsConfirmed()` calls `civicrm_api3('Contribution', 'repeattransaction', $contribution);` passing in params for a contribution linked to the recurring contribution.

Can anyone point me to the code that adds a membership payment for a contribution created by `Contribution.repeattransaction`. Or do I have the wrong end of the stick?

# Answer
You should make sure that you have both membership\_payment records and the contribution\_recur\_id set for both the contribution and the membership. There are *still* too many different code paths that can behave slightly differently - it's an area that's seen a lot of improvement but still has a long way to go.

`CRM_Member_BAO_Membership::recordMembershipContribution()` is an example of a function that creates a membership\_payment.

Note that `completetransaction` should only ever be called for the first contribution. Subsequent payments should call `Contribution.repeattransaction` API.

Also of relevance is `CRM_Contribute_BAO_ContributionRecur::getTemplateContribution()` which controls how the next contribution is created - so if that returns a contribution that is not linked to a membership you won't get a membership renewal.
> 3 votes

# Answer
Unfortunately CiviCRM doesn't look for civicrm\_membership.contribution\_recur\_id t update the membership. I believe for membership to get auto renewed it should have

1. The latest recurring contribution for the membership should be linked via civicrm\_membership\_payment
2. civicrm\_line\_item.contribution\_id should be set for the membership (the latest one)

Since you had added membership to the standalone recurring contribution than you need to make sure that above 2 step is fixed before next subsequent payment is recorded.
> 2 votes

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


# Question
Title: Find Participants - pulling up too many names not related to the class
Find Participants - pulling up the names but when you hit one of the buttons above name to put them in alpha order it pulls up everyone that has taken a class.

I hit FIND PARTICIPANTS

I add pull down the menu to find the specific

# Answer
> 0 votes
I think you are on very old version of CiviCRM, Similar issue was reported 10 months ago and was fixed in 5.14.1

You can either upgrade CiviCRM to latest or apply patch

---
Tags: civievent
---


# Question
Title: Initialization Error on certain drush commands, related to CiviCRM
I am getting the following error whenever I run certain drush commands, however, the CiviCRM seems to be working fine. I have ensured that my my.conf file is set to `max_allowed_packets = 500M`.

An example of drush commands that throw the error follow. Note, I am in the Drupal root, and all commands that generate the error do work unless they are designed to print information into the terminal that I need: `drush fl` `drush cc all` `drush en some_module`

An example of drush commands that do work: `drush pm-list` `drush pm-info some_module` `drush dl some_module`

```
<p>Initialization Error</p><p><pre>Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -24
    [message] => DB Error: connect failed
    [mode] => 16
    [debug_info] =>  [nativecode=No such file or directory]
    [type] => DB_Error
    [user_info] =>  [nativecode=No such file or directory]
    [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=No such file or directory]"]
)
</pre></p><p></p><p>Initialization Error</p><p><pre>Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -24
    [message] => DB Error: connect failed
    [mode] => 16
    [debug_info] =>  [nativecode=No such file or directory]
    [type] => DB_Error
    [user_info] =>  [nativecode=No such file or directory]
    [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=No such file or directory]"]
)
</pre></p><p></p>Drush command terminated abnormally due to an unrecoverable error.

```

My production and test environments do not throw this error, only the local ones.

Here is a drush status. If this is a Drupal issue and not a CiviCRM issue, I can move it to Drupal but the error is distinctly about the CRM.

```
 Drupal version                  :  7.54
 Site URI                        :  http://default
 Database driver                 :  mysql
 Database hostname               :  127.0.0.1
 Database port                   :
 Database username               :  myuser
 Database name                   :  drupal
 Database                        :  Connected
 Drupal bootstrap                :  Successful
 Drupal user                     :
 Default theme                   :  glazed
 Administration theme            :  myadmintheme
 PHP executable                  :  /usr/local/bin/php
 PHP configuration               :  /usr/local/etc/php/7.1/php.ini
 PHP OS                          :  Darwin
 Drush script                    :  /usr/local/Cellar/drush/8.1.15/libexec/drush.php
 Drush version                   :  8.1.15
 Drush temp directory            :  /tmp
 Drush configuration             :
 Drush alias files               :
 Install profile                 :  cms
 Drupal root                     :  /Applications/AMPPS/www/myproject/docroot
 Drupal Settings File            :  sites/default/settings.php
 Site path                       :  sites/default
 File directory path             :  sites/default/files/
 Private file directory path     :  ../files-private
 Temporary file directory path   :  /tmp

```

This is installed locally on a Mac OSX 10.12.5, Drupal 7.54 running with AMPPS.

Edit: AMPPS runs on TCP port 80 by default. I've tried changing the base URL in civicrm.settings.php to `http://localhost:80/[myprojectroot]` to no avail.

# Answer
It looks like the commands that do work (download for instance) do not need to access the database, but those that fail (enable) do need a complete working drupal setup.

It might be because of several reasons, either you have your config installed elsewhere than in sites/default, or you have a different php config for cli and apache, or you do not authenticate properly, or...

can you try running your drush commands with a few extra params:

```
drush -u 1 -r /your/drupal/root civicrm-api job.process_mailing auth=0 -y -l yourdomain.org

```
> 1 votes

# Answer
Thanks for everyone that helped out! It set me on track to the solution, which was to edit the database credentials for Drupal and CiviCRM in the `civicrm.settings.php` file, changing `localhost` to `127.0.0.1`.

`drush status` showed that the hostname was 127.0.0.1:

```
Database hostname               :  127.0.0.1

```

E.G.:

```
if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {
  define( 'CIVICRM_UF_DSN'           , 'mysql://user:password@127.0.01/drupal?new_link=true');
}

```

and

```
if (!defined('CIVICRM_DSN')) {
  if (CIVICRM_UF === 'UnitTests' && isset($GLOBALS['_CV']['TEST_DB_DSN'])) {
    define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']);
  }
  else {
    define('CIVICRM_DSN', 'mysql://user:password@127.0.0.1/civicrm?new_link=true');
  }
}

```
> 1 votes

# Answer
One other issue that causes drush not to list the CiviCRM commands:

* If the user has a my.cnf with the blank password value in the user profile directory in linux of the user that drush is running as, drush will not list the CiviCRM commands.
    + It appears drush may use the user defined in my.cnf first, and does not failover to the user defined in the sites/default settings files.

**Solution:**

When I either added the password back into my.cnf in the profile of the user running the drush command, or renamed the my.cnf file in the user profile directory to something else (since in my case I did not want the root user being able to automatically sign-in to mysql using the credentials in the my.cnf file), then drush worked correctly and listed the CiviCRM commands.
> 1 votes

---
Tags: drupal
---


title: Client Database

text:
# Question
Title: Client Database
It looks like this system has all the functions I need for Donor Management and Fundraising. Does the system also have the capability to house Client Data. For example, we work with families. For each family, I need to be able to document the following pieces for reporting purposes:

* Family Name (last name, first initial)
* Address
* Phone
* Email
* Number of family members
* Ages of all family members, dividing out between adults and children
* Race of all family members
* Gender of all family members, dividing out between adults and children
* Pre-Assessment Scores (3 different assessments)
* Post-Assessment Scores (3 different assessments)

Is this possible for this system?

---

# Answer
Based on the limited information in your question, the answer is Yes, Civi can do all of that. There are "Household" contacts as well as Individuals and you can establish relationships between households and individuals.

For your assessments, you can create custom fields you can create to handle pretty much anything you need.

It sounds like your organization might also benefit from the CiviCase module, so be sure to check that out.

You might want to hire a Civi professional to help you formally evaluate if Civi is right for you and, if so, to get it set up.

One of the best assets that Civi has going for it is this helpful and friendly community.
> 4 votes

---
Tags: custom-fields
---


# Question
Title: How can I automatically add a Capability or additional Role in WordPress based on the data stored in CiviCRM?
*** EDIT *** We have a multi record custom data group with a field called "Status". When this field changes value to "Completed" we want people to see specific pages in WordPress.

I have tried to setup a Smart Group and link this to a Role in Civi using Groups Role Sync, but this plugin does not work with smart groups.

I created a Parent ACL group of the smart group in question, but this is not being populated.

I've also tried creating a CiviRule to add a membership when custom fields are edited and then use the membership sync to role plugin, but CiviRules can't evaluate the values in multi record custom data groups (for understandable reasons).

So.... I was wondering if anyone had any other ideas of how we can automatically add a capability or role in WordPress based on the data in CiviCRM? Maybe someone could share some custom code for a plugin to do this, similair to this answer but for WordPress?

# Answer
> 0 votes
I'm not sure what "Groups Role Sync" is (I suspect it's a Drupal module) but you can use CiviCRM WordPress Member Sync to sync Contacts with Memberships to WordPress Users with Roles or Capabilities. FWIW, the plugin doesn't support Smart Groups either.

---
Tags: wordpress, smartgroups, roles
---


# Question
Title: 'Cases' option missing in Advanced Search - how to correct?
'Cases' are missing in Advanced Search (usually the last search item). The last 2 items I have are 'Mailings' then lastly 'Events'. I can't see any configuration option that sets this, so am puzzled how to fix. This Civi was installed in 2013, don't know whether that's a factor. It's at 5.19.4 and Drupal. Can anyone help - how can 'Cases' be put back in Advanced Search?

# Answer
> 3 votes
Can you go to CiviCRM \>\> Administer \>\> Customize Data and Screens \>\> Display Preferences and see if 'Cases' is ticked in 'Contact Search' option? If not check the box and save the setting.

Thanks

Pradeep

---
Tags: civicase, advanced-search
---


# Question
Title: Can't install CiviCRM on Wordpress (error Database)
I try a several times to install CiviCRM on my Wordpress. But the Check before show problems with the database. I checked everything a several times but no success.

Wordpress is running on a hosting at "Strato" See the screenshot for more informations.

Can anybody help me whats going wrong?

# Answer
Couple of observations:

1. You may need to double-check that you can reach your MySQL database, since CiviCRM apparently can't (it's confusing since it reports that it can't connect, yet various operations can be done)
2. Your MySQL user needs to be able to create triggers. You probably need to contact your host to request this capability.
> 1 votes

# Answer
Thanks for your fast reply.

in the mheanwhile i checked again the DB informations, checked again the wp-config and copy all infos from there.

Result the same.

in the meanwhile i receive also a answer from the hoster. They said at my hosting package i didnt have the rights for the DB. They suggest me of course to rent a virtual server ...or to download the DB and configure local and then upload again.

Can you tell me if this way is possible, what exactly i have to configure at the db?
> 0 votes

---
Tags: wordpress, error, database, install, hosting-providers
---


# Question
Title: What is the preferred way to do Marketing Automation in CiviCRM? CiviMail, Mosaico, Mautic, Forms, Landing Pages etc
This is more of a discussion point rather than a question, and I'm interested to get peoples views on topic. It's brief as I don't want to make it unreadable and please excuse the rushed ramblings and stream of consciousness.

I've been blogging bits and bobs along our journey with CiviCRM and WordPress and I've been drafting something on how one could approach marketing automation with CiviCRM. It's an area I've worked on extensively within the private sector and I've been attempting to deliver a mature solution for the Charity that I Chair where we are running CiviCRM.

Marketing Automation is a broad term that can include many different activities, but I'm focusing on email marketing automation as this has the highest conversion rates in modern digital marketing.

I classify email marketing automation as the following activities that are 'software-enabled':

* Building marketing campaigns that can be delivered across multiple 'channels' (but primarily email).
* Lead generation, segmentation and tracking
* Landing Page creation with form integration to collect lead details
* Drap & Drop email design for different types of emails inc but not limited to newsletters, announcements, product launch, transactional etc
* Create automated workflows, triggers and email sending
* Hosting of downloadable assets such as eBooks, Whitepapers
* Creation of a marketing funnel/sales pipeline that links up with some kind of 'sales process'

I'm hoping someone can correct me if I'm wrong, but there doesn't seem to be a 'community standard' way to approach this for Civi. It can be solved in a number of different ways, all with tradeoffs:

**Solutions that are CiviCRM native or extension based**

* **CiviMail**: Standard email functionality
* **Mosaico**: Email template builder
* **Chassé and/or CiviRules**: Email journey workflow builder
* **CiviCRM profiles/Drupal Webforms/Caldera forms**: Collection of lead data

My personal experience has been that although these tools work well as single-point solutions (eg Mosaico works fantastically for email template design), building a functional marketing automation flow with different components working with each requires development and a reasonable financial investment. For example:

1. Create a landing page with a working form in WP with Caldera Forms and register all the 'lead' details in CiviCRM as part of one's marketing funnel
2. This triggers an asset an eBook download hosted on cloud storage such as Google Drive
3. Then trigger a 5-part email welcome series workflow using Chassê and account for the different scenarios of the user/lead downloading it (eg are they already an existing member or donor)
    4. Trying to visualise and report and account for potential errors on those different stages

**3rd party apps with integrations**

* **MailChimp**: Handles pretty much all marketing automation needs and has group syncing functionality with a CiviCRM extension but as your email list grows, so does your cost.

**3rd party apps without integrations**

* **Mautic**: Handles pretty much all complex marketing automation needs with a good UI. It's free and open-source with an established dev community and is owned by Acquia (who also own Drupal). Mautic does have weak points most notably it lacks the ease of use template builder that Mosaico and MailChimp have.

Mautic does seem like an obvious strong partner for CiviCRM, and a google search shows that at one point an integration did exist? It doesn't look like it does anymore.

Is anyone using Mautic with CiviCRM?

This definitely isn't an exhaustive list, just what I've come across so far. I'd love for anyone to jump in and tell me what other options I've missed and maybe would consider partnering with me to produce a 'how-to guide' on the different approaches.

In the wider market, depending on the price point, there seems to be either all integrated solutions for the enterprise that wrap the CRM and Marketing Automation together (Salesforce Marketing Cloud, Dynamics 365 or tools like Hubspot) or in midmarket business, cheaper independent point solution tools have API integrations eg Mailchimp(marketing automation) integrates with PipeDrive(CRM).

You could say CiviCRM is following a similar vein with both native and integrated solutions but I'd like to pose a few questions of whether there should be a greater community focus on a strategy for these tools and rather than going off in different development directions...

The two functions CRM and Marketing Automation should be part of any organisations digital strategy and I think this should be part of The Community Council conversations, and would ultimately add to the CiviCRM value proposition and increase adoption of new customers.

* Should there be such a focus on point solutions that work well independently, but are costly for organisations that begin to have more mature marketing requirements?
* Could there be a 'roadmap' or 'matrix' that exists that helps end users decide on which marketing solution to use based on their requirements?
* Should there at least be a greater focus on an MIH for Mautic integration? or at least an initial assessment through what is achievable maybe via GSoC?
* Should there be an investment into more general extensibility like Zapier or Piesync?

This is one persons perspective so I'm interested to hear how others feel and their experience.

Thanks!

# Answer
I've been directed by some kind folks in the community to move this to a GitLab issue for wider discussion:

https://lab.civicrm.org/support/marketing-automation/-/issues/1

Please add any future comments here :)
> 2 votes

# Answer
Interesting dicussion....I find I have trouble understanding words like "Marketing Automation" as they seem to turn into buzz words where everyone can have their own interpretation of the term and thinking they understand each other :-)

So maybe a starting point should be finding out what kind of marketing automation is required? So far I have mainly used CiviRules for:

* automated segregation (group membership)
* email workflow (automated thank you, petition journey, first year donor journey
* automatically creating activities for specific purposes (returned postal mail, difference in personal data from website activity, suspicious donations etc.
* change data based on case activity
* maintain specific status information based on case activity.

There is quite a variety there, what would be considered Marketing Automation?
> 1 votes

---
Tags: email, mosaico, templates, mailchimp, automation
---


# Question
Title: Problem with CiviRules 2.13 Field Value Comparison
I am running on CiviCRM 5.21.1, and have just upgraded CiviRules from 2.11 to 2.13.

I have several Rules which test for the Type of a Contact by using e.g. "Field Value Comparison Contact.contact\_type=Individual"

After the upgrade this rule does not fire, and the Condition appears on the Rules Management screen as "Field Value Comparison Contact.contact\_type=". If I try to recreate the condition I get the same result, and I can see no other way of making this test.

I will have to stay on CiviRules 2.11 until this is fixed.

Tony

# Answer
Try after applying patch from here on latest version of rules.
> 4 votes

# Answer
I also raised this as a formal Issue and got the response here https://lab.civicrm.org/extensions/civirules/-/issues/70. There is a fix, and the issue is now closed.
> 1 votes

---
Tags: civirules, issues, condition
---


# Question
Title: Mosaico mail template URL's don't function properly
I'm using Mosaico to create a mail template. I have 4 different tokens in the email (2 web links and 2 Mailto: addresses). When the test email comes through everything looks good but the live segments all open the same webpage for some reason. Any ideas?

# Answer
Paul, welcome to CiviCRM stackechange. when you have clickthrough enabled for the mailing CiviCRM replaces those url into trackable url so that Civi can track clicks for mailing. Check you Resource url setting (Administer \>\> System Settings \>\> Resource url .. click on '?' under the help area), Make sure \[civicrm.path\] is set correctly. Try sending the same email by replacing the path for CiviCRM resource url field.
> 1 votes

---
Tags: mailing, mosaico, urls
---


# Question
Title: Advice for moving from Access to CiviCRM
Our client has asked us to move them from a legacy MS Access based membership system to CiviCRM (on Drupal). Their existing system encompasses many years of memberships, accounts, academic records etc.

This will be the first time we will be importing a full system. Can anyone point us to any best practice advice or guidance?

# Answer
Export the records from MS Access into a csv file and than import it into CiviCRM using CiviCRM UI import like Contact, Contribution, Membership etc. You map those contact using external identifier for reference.
> 2 votes

---
Tags: import, export
---


# Question
Title: I have created a custom field but only admin users can see it
Have created an inline custom field. Only admin staff can see it. All users should be able to see the view.

# Answer
> 1 votes
Karen, welcome to CiviCRM StackExchange.

Check user permission by navigating to CiviCRM \>\> Administer \>\> Users and Permissions \>\> Permissions (Access Control). Click on Drupal/Wordpress/Joomla Access control link(name is based on CMS you using).

Check for 'CiviCRM: access all custom data' permission for the user role. If uncheck, check the option under the role and save the permission. This will enable access to all custom field in your system for that user role. If you want to restrict specific custom group being visible to user than you will need to add ACl for the custom group to perform CRUD operation.

---
Tags: custom-fields
---


# Question
Title: Missing option to create WP User from contact
I'm not sure if I've lost the option because of a role or permission change. It used to be here:

and also in the bulk edit options for Contact search results.

I've made sure that "Anyone can register" is checked in the WP sites general settings. I am using CiviCRM WordPress Member Sync and CiviCRM WordPress Profile Sync (Christian Wach ftw)

I've also made sure that the contacts have email addresses, and current memberships (if relevant).

What am I missing? It used to be here.

# Answer
> 4 votes
This is a duplicate of this post WordPress: Creating new WP Users from Civi Contacts

On line 22 set it to true https://github.com/christianwach/civicrm-wp-profile-sync/blob/master/civicrm-wp-profile-sync.php#L22

`define( 'CIVICRM_WP_PROFILE_SYNC_BULK', true );`

The confusion is that you need to do a search action from either Advanced Search or Search Builder, not the actions button in the contact summary screen.

---
Tags: user-account
---


title: "Send Test" buttons greyed out inactive

text:
# Question
Title: "Send Test" buttons greyed out inactive
When "SEND TEST" buttons are greyed out there is no notification as to what is missing from required fields to be NOT NULL. By default if "Opt-Out" token is not included in the message the "Opt-Out" response is left NULL but is still a required field that cannot be left empty. Choosing the only default brings all the buttons active. Please advise?

# Answer
* There shouldn't be any connection between the "Opt-Out"/"Unsubscribe" token and the field "Responses: Opt-Out Message". Both are required.
* If the "Opt-Out" token (or "Unsubscribe" token) is missing, then you should get a very loud error message. (The token is generally provided as part of a header, footer, or message template, so that you don't have to put it in explicitly.)
* The field "Responses: Opt-Out Message" should be filled in by default. If it's not, then perhaps someone removed the default. Try navigating to "Mailings =\> Headers, Footers, and Automated Messages". Edit one of the "OptOut" messages and set it as default.
> 2 votes

# Answer
I found a couple more situations that the greyed out button can appear which may be less than obvious

* if there is no Resubscribe Msg set on the Response tab (no alert is currently provided
* if you put in a Subject, but then decide to switch to using a Template that has no Subject then the one you added gets wiped
> 0 votes

---
Tags: civimail, joomla, 4.6.2
---


# Question
Title: Mailing - "Send Test" button not a button
When trying to send a test mailing, the preview and test email box appears to be improperly drawn and the "Send Test" button doesn't appear to work. I tried upgrading CiviCRM (from 4.6.2 to 4.6.4) but the problem persists.

CiviCRM 4.6.4, Wordpress 4.2.1, Apache 2.4, PHP 5.6.9-1, Mariadb 10.0, Debian Wheezy/Sid hybrid

I notice this was an issue in the beta forums previously http://forum.civicrm.org/index.php/topic,33598.msg142461.html#msg142461

Any ideas how to fix it?

# Answer
> 3 votes
They are disabled. Notice that the "Next" button is also disabled. This means that you have not completed all required fields for your mailing. Please review that you have:

* A subject
* Recipients
* Content
* Required 'opt out' tokens

# Answer
> 0 votes
They're disabled because you haven't completed all the required actions yet.

Have you remembered to include the the mandatory address and opt-out tokens in the body of your email?

You need to include:

```
{domain.address}

```

And at least one of the following:

```
{action.optOutUrl}

{action.unsubscribeUrl}

```

The other thing to check is that you have a mailing list selected. It's silly but CiviMail requires one even when you're just sending a test to a single email, so it's worth having a generic 'test' mailing list set up for this purpose (that you can then replace with the 'real' mailing list before you send).

# Answer
> 0 votes
I found a few more situations that the greyed out button can appear which may be less than obvious

* if there is no Resubscribe Msg set on the Response tab (no alert is currently provided
* if you put in a Subject, but then decide to switch to using a Template that has no Subject set

---
Tags: civimail
---


title: Customize Civi's UI on WordPress?

text:
# Question
Title: Customize Civi's UI on WordPress?
Is there a way to customize the actual UI of Civi?

I'm sorry, but it's the ugliest thing I've seen in *years*.

I understand if not, but... it's gross.

Using WordPress (current version), multisite network.

# Answer
This alternate theme for wordpress is available: https://lab.civicrm.org/extensions/haystacktheme

You can also add your own css by writing a little extension that adds your own css file: https://docs.civicrm.org/dev/en/latest/framework/resources/#css-stylesheets
> 1 votes

# Answer
The CiviCRM Admin Utilities plugin offers an alternative theme for CiviCRM (on which the "Haystack Theme" Extension is based) that makes it look like a native WordPress plugin. FWIW it also offers many other useful options - particularly if you're on WordPress Multisite.
> 1 votes

---
Tags: ui
---


title: Resource URL problem

text:
# Question
Title: Resource URL problem
I'm having some problems with the CiviCRM Resource URL setting that I can't get my head around. Set as `[civicrm.root]/` the System Status screen displays the error 'The Resource URL is not set correctly'. Set as `[cms.root]/sites/all/modules/civicrm/` everything seems to work fine (until I try to upgrade). But surely both should resolve to the same place?

In the File System Paths section of civicrm.settings.php I have the following:

```
$civicrm_root = '/var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
  define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/sites/c/beta.example.net/public_html/sites/default/files/civicrm/templates_c/');
}

```

And in the Site URLs section I have:

```
if (!defined('CIVICRM_UF_BASEURL')) {
  define( 'CIVICRM_UF_BASEURL'      , 'https://example.net/');
}

```

Trying to load the with the `[civicrm.root]/` setting results in a load of javascript errors, of which the following is an example:

```
[Error] Failed to load resource: The request timed out. (logo_sm.png, line 0) https://var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm/i/logo_sm.png

```

That looks as though $civicrm\_root is set incorrectly, but it seems to be right in accordance with the examples given in the comments. What am I missing?

**Edit:** If I go to the CiviCRM Resources URLs page and click on ? I see the variables listed as:

```
[cms.root]  https://example.net/
[civicrm.root]  https://example.net//var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm/
[civicrm.files] https://example.net/sites/default/files/civicrm/

```

But if I got to the Directories page and do the same, I see

```
[cms.root]  /var/sites/j/example.net/public_html
[civicrm.root]  /var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm
[civicrm.files] /var/sites/c/beta.example.net/public_html/sites/default/files/civicrm

```

Where are these getting calculated from that means they're producing different results? Particularly that random one with the /j/ in the middle, which I've never seen before anywhere!

# Answer
> 3 votes
In your civicrm.setting.php update the $civicrm\_root and template\_c path to use `/var/sites/j/example.net/public_html` instead of `/var/sites/c/beta.example.net/public_html/`

Thanks

Pradeep

---
Tags: civicrm.settings.php, resource-urls
---


title: Mailing List Activity Report

text:
# Question
Title: Mailing List Activity Report
I wonder if there's a way to get a report on a mailing list's subscription activity, showing signups and unsubscriptions. I don't see this option on the activity report and none of the Mailing report templates come close. I know that the information is available by looking at contact records.

# Answer
> 1 votes
Its not available by default by you install one of the below extension to have these feature availaible

Mailing Subscriptions Report

Group Growth

Subscription History

Thanks

Pradeep

---
Tags: civimail, civireport
---


# Question
Title: how do I make the FROM box on a bulk email show the same list as a single email?
I toggled the yes/no box "Allow mail from logged in contact" to yes, but it doesn't affect the "new mailing" screen which is really the most important one for me. Can I change this somehow? Is there another yes/no somewhere? If not can I put in a feature request for it?

# Answer
I guess the "Allow mail from logged in contact" option is for sending Email Activity or Contribution receipt but not bulk emails. Might be because if the bulk emails are not send using site domain address than it end ups in users spam box.

Its a good idea to raise for a feature request on https://lab.civicrm.org/ or you can implement an extension to include logged in users id.
> 1 votes

---
Tags: civimail
---


# Question
Title: CiviEvent book multiple event at a single checkout
EDITED: We are using Eventcalender extension to display all events on one page.

For example Yoga Classes happens every week on Monday. Now for an attendee who would like to book 1st week, then 5th, 9th, 15th, 22nd and some more weeks of the year has to keep registering for each week. It could be frustrating for attendee to come back every-time & enter same details to register. We thought of creating repeating events. but that does not allow to register to select multiple events at single checkout. Is there any option where CiviEvent would act like a checkout? A good example of my idea is sagenda.com. If not, how can I get an alternative checkout function like this? Or am I missing something in existing CiviEvent? Please suggest. Thanks

# Answer
> 1 votes
There was work on an Event Cart function for CiviEvent, but it was never completed. However, there are folks who use it. I would expect to put in some developer time if you want to use it.

Enable it at **Administer » CiviEvent » CiviEvent Component Settings** by checking **Use Shopping Cart Style Event Registration**.

There are some guides to using it from Cividesk and in the CiviCRM cookbook, as well as some older documentation.

# Answer
> 3 votes
Just so you know, there's two extensions currently under development for CiviCRM, and specifically that integrate with CiviCRM's Event Cart feature, that might meet some of your needs. They're under active development, and you can check them out on CiviCRM's GitLab.

boxoffice: Provides a lighter workflow for the CiviCRM Event Cart. Designed for a ticket box office (ex: where you do not need the names of other participants).

eventpack: Provides a way to bundle events together (at a discounted price) in the CiviCRM Event Cart (and the Boxoffice extension).

# Answer
> 0 votes
We did some analysis of Event Cart (April 2019) and advice was that it was going to be a lot of work, so we instead invested more effort in making Webform\_civicrm work for multiple folk signing up for multiple events

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


# Question
Title: Create a Google Map showing positions for every contact in a group
we need to create a web page which shows a Google Map of an area, having pins of all contacts in that area.

1. is there an extension that could manage the dataset creation?
2. If not, what are the SQL tables and fields we need to consider to create it?

TIA

# Answer
> 3 votes
This should be possible out of the box. CiviCRM has mapping capabilities documented here https://docs.civicrm.org/user/en/latest/initial-set-up/mapping/

There is an extension using open source v google mapping if you want: https://github.com/eileenmcnaughton/org.wikimedia.geocoder

Once you have your mapping working, then you should be able to do a Search and use the Action 'Map Contacts' (or something similar)

For Drupal you can also use Views and Leaflet which may give you more options

Hope above helps

And as Demerit mentions (just to try and get all the good bits in one answer) - Go to Search - Custom Search - Proximity Search, then from the results action dropdown choose map contacts

# Answer
> 2 votes
Go to Search - Custom Search - Proximity Search, then from the results action dropdown choose map contacts.

# Answer
> 2 votes
For Wordpress, you can create a regular or smart group and use CiviCRM Directory to display those records in a directory.

It's basic alpha stage plugin so it depends on how much functionality you need. It will display all the core fields correctly. For custom fields it has an issue with not being able to retrieve them all from Civi in the edit screen.

---
Tags: database, geocoding
---


# Question
Title: WordPress Site Health contains critical errors unless CiviCRM is disabled
I uninstalled all WordPress Plugins (except CiviCRM). Then, I uninstalled all CiviCRM Extensions and Components.

Only when I disable the CiviCRM plugin does this error disappear:

WordPress 5.4

CiviCRM 5.22.1 / 5.23.4

---

```
The REST API encountered an error
The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

The REST API request failed due to an error.
Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed)

Your site could not complete a loopback request
Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed)
```

# Answer
Based on Mr. Burns' comforting response above, and Mr. Earnhardt's instruction on how to selectively remove tests, I added the following code to the functions.php file in my WordPress theme:

```
function prefix_remove_rest_availability( $tests ) {
    unset( $tests['direct']['rest_availability'] );
    return $tests;
}
add_filter( 'site_status_tests', 'prefix_remove_rest_availability' );

function prefix_remove_loopback_requests( $tests ) {
    unset( $tests['async']['loopback_requests'] );
    return $tests;
}
add_filter( 'site_status_tests', 'prefix_remove_loopback_requests' );

```

Thank you, Gentlemen! Fixed!
> 6 votes

# Answer
Do not worry, the Health Check loopbacks and REST API checks are inaccurate. Nothing is actually wrong. You can install Disable Health Check.
> 5 votes

---
Tags: wordpress, error
---


title: Report of groups and number of members

text:
# Question
Title: Report of groups and number of members
I would like to have a report that lists:

* the name of each group
* the description of each group
* the number of members in each group

How can I do that?

# Answer
This is maybe a silly answer but works:

1. Visit this url, replacing example.com with your site. http://example.com/civicrm/ajax/grouplist?snippet=4&draw=1&columns%5B0%5D%5Bdata%5D=title&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=count&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=created\_by&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=description&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=false&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=group\_type&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=true&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=visibility&columns%5B5%5D%5Bname%5D=&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=true&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B6%5D%5Bdata%5D=links&columns%5B6%5D%5Bname%5D=&columns%5B6%5D%5Bsearchable%5D=true&columns%5B6%5D%5Borderable%5D=false&columns%5B6%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B6%5D%5Bsearch%5D%5Bregex%5D=false&order%5B0%5D%5Bcolumn%5D=0&order%5B0%5D%5Bdir%5D=asc&start=0&length=25&search%5Bvalue%5D=&search%5Bregex%5D=false&title=&created\_by=&group\_type=&visibility=&status=1&component\_mode=1&showOrgInfo=&parentsOnly=1&\_=1585333964030
2. That gives you effectively the same output as the table you see when you go to Contacts - Manage Groups.
3. In chrome copy the output to the clipboard. In firefox you need to click the raw data tab first, then copy to the clipboard.
4. Go to https://www.convertcsv.com/json-to-csv.htm
5. Paste in the box.
6. Scroll a little bit down and you'll see a Download Result button. That will give you a .csv file which opens in excel.

Unfortunately you can't just copy and paste the table at Manage Groups directly into excel because where it appears on the screen isn't where it actually is in the DOM, so when you try to select the browser is confused and you get a whole bunch of other stuff. Otherwise that would be a simpler answer, although it works in Chrome, but not Firefox.
> 2 votes

# Answer
If you just want to see that information, rather than it being in a report, then go to `Contacts > Manage Groups` Click the button `Update Smart Group Counts` to refresh the count data.
> 2 votes

---
Tags: groups, reports
---


# Question
Title: import mapping dont save for custom fields on contact subtypes
As the title. If I create custom field set against a contact subtype, then import fields from a csv (saving the mapping for later use), none of the mapped fields are saved for the custom fieldset.

i.e.: on dmaster i can:

* create a new custom field set **contact subtype custom fields**:

+ for use on individual \> Volunteer
* add field: **contact subtype field**
* find (or create) a volunteer, and enter something into the new custom field
* export the contact (select fields **Contact\_id** & **contact subtype field** (& down load the file)
* import the file, mapping the fields correctly

+ downloaded file
    + update contacts
    + contact type = individual \> subtype: Volunteer
    + continue
* set mapping to correctly map to the custom field **contact subtype field**
    + save mapping as... 'map 1'
    + continue
* continue with import
* done
* change the **contact subtype field** label in the csv to **foobar**
* import the csv - loading the saved mapping 'map 1'

mapping does not load + notice is thrown up onscreen:

```
Notice: Undefined index: in CRM_Import_ImportProcessor->loadSavedMapping() (line 451 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Import/ImportProcessor.php).

```

anyone else suffer with this problem or have any ideas?

there's an issue logged here that has a fix, and is most likely related, but I'm not sure if this is a separate issue.

Thanks in advance :)

# Answer
> 2 votes
I have submitted a PR for this issue. Can you please try applying patch from here?

Thanks

Pradeep

---
Tags: custom-fields, import, data-import, field-mapping
---


# Question
Title: CiviCRM API explorer menu is not visibile on Wordpress
I installed CiviCRM 5.23.4 on Wordpress 5.4 and the `Support` menu is not visible. How do I enable and use the API explorer? If I go to `/wp-admin/admin.php?page=CiviCRM&q=civicrm/ajax/doc/api#explorer` I have an empty page (only the title is visible). Thanks

# Answer
> 1 votes
Try clearing your CiviCRM cache CiviCRM \>\> Administer \>\> System Settings \>\> Cleanup Caches and Update Paths.

Check if the Support menu is enabled in CiviCRM \>\> Administer \>\> Customize Data and Screens \>\> Navigation Menu

The api3 explorer link is

/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fapi3#explorer

---
Tags: wordpress, api
---


# Question
Title: Is smart group cache set to 0 OK for this situation?
Using ACLs I have setup a group of users to have edit access to a smart group of contacts. The smart group is based upon the contact type. The problem is when one of these users creates a contact of this type, the contact is created OK but then an error message pops up to say they don't have access to the contact. They do have contact after a minute or so - the smart group cache is set to 1. When I set the smart group cache to 0 then they have immediate access. This client only has 12 smart groups. Smart group cache set to 0 solves the problem, but I'm not sure this is a good idea. Are there any other solutions for this situation? - which can't be that uncommon.

# Answer
In your situation its reasonable to set cache time to 0 since your smart group is very less and hopefully those smart group criteria are not complexed.
> 2 votes

# Answer
A different approach would be to replace the smart group by a static group and use CiviRules to add the new contacts into the group.
> 2 votes

---
Tags: smartgroups, acl
---


# Question
Title: Get Admin email notifications for system status changes
Is there a way that I can be notified via email anytime the system status changes? (Or changes to something other than 'ok'.)

# Answer
> 2 votes
There is nothing such available at the moment as i am aware of which can be configured inside CiviCRM but can be developed by writing a small extension using hooks to implement schedule job.

But this can be implemented if you have nagios/icinga monitoring your server. You can install CIVICRM MONITORING FOR NAGIOS extension and configure nagios/icinga to send email.

# Answer
> 1 votes
Here's a one liner you can put in a cron script. You might want to make the call to `mail` more robust or flesh the whole thing out a bit, but the gist is you can call api System.check and examine the severity level and if it's higher than 1 for any check then send you an email.

`cv ev --user=admin "$checks = civicrm_api3('System', 'check', [])['values']; foreach($checks as $check) {if ($check['severity_id'] > 1) { mail('admin@example.com', 'oh oh', print_r($checks, true)); break; }};"`

Replace `--user=admin` with a CMS username that has administer civicrm permission.

---
Tags: email, admin, system-status
---


title: Contribution Receipt Comment

text:
# Question
Title: Contribution Receipt Comment
When CiviCRM sends an email Recurring Donation Receipt below the Zip Code field there is a Comment field. What mySqlTable stores the string that shows in the Comment associated with a recurring donation?

# Answer
By downloading the database as one file, and searching with notepad++ I found the comment in table: `civicrm_note`
> 1 votes

---
Tags: civicontribute, recurring-contributions
---


# Question
Title: How can I see the available tokens for message templates?
For a page in the browser, we can put &smartyDebug=1 in the URL to see variables in scope for the top level template. How can we do this for message templates?

# Answer
use **{debug output=html}**

To have a nice formatting in html email
> 6 votes

# Answer
Insert **{debug}** into a message template then perform the relevant action (ie make an online contribution if you modified **Contributions - Receipt (on-line)**). The email sent will contain a list of all the smarty variables assigned to that template
> 7 votes

# Answer
You can insert the `{debug}` Smarty token into your template: http://forum.civicrm.org/index.php/topic,14845.msg63471.html#msg63471
> 4 votes

---
Tags: templates, smarty, message-templates
---


# Question
Title: Why do I suddenly get unkown error when try to log in through Civimobile?
I used to be able to log in into my Joomla based CiviCRM with Civimobile, but last week I logged out on Android, and can't log back in. It finds the site, I think, but when typing in credentials it says "unknown error". It might be some permission related problem but don't know where check and change these for Civimobile. Turned off firewall, reinstalled both the app and the extension, didn't help. I need help here I think.

# Answer
The solution was to click "logout from mobile" under my contact summary page/mobile tab;-) It recreated the API that started working.
> 1 votes

# Answer
Can you check resource URL in civicrm settings php? It might be because the civicrm path is not set correctly
> 0 votes

---
Tags: civimobile
---


title: Unable to upgrade from version 5.22.1

text:
# Question
Title: Unable to upgrade from version 5.22.1
I've been trying to update CiviCRM from version 5.22.1. I've tried several of the different versions that have been released over the last week, each to no avail.

I have put the site in maintenance mode, removed the old version, and unpacked the new version in /sites/all/modules/ just as I always do. The problems start when I try to upgrade the database.

I visit the upgrade page at /civicrm/upgrade?reset=1 as normal:

I see a couple of warnings, but they've been around for a while without causing a problem. I'm not really sure why, as I've not customised any message templates. Had been assuming maybe it was to do with Mosaico.

After I click 'Upgrade now', though, the site appears to freeze for a while, and then displays this:

After that, Drupal still loads fine, but CiviCRM won't display anything but this:

If I roll back /sites/all/modules/civicrm/ to the backup of 5.22.1 everything works fine.

**Edit:** I've found this in the log:

```
Mar 27 12:15:33  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]
    [type] => DB_Error
    [user_info] => CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]"]
)

Mar 27 12:15:33  [debug] $backTrace = #0 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 <drupal_root>/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 <drupal_root>/sites/all/modules/civicrm/packages/DB.php(998): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#3 <drupal_root>/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#4 <drupal_root>/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...", "DB_Error", TRUE)
#5 <drupal_root>/sites/all/modules/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
#6 <drupal_root>/sites/all/modules/civicrm/packages/DB/mysqli.php(935): DB_common->raiseError(-1, NULL, NULL, "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...", "1359 ** Trigger already exists")
#7 <drupal_root>/sites/all/modules/civicrm/packages/DB/mysqli.php(405): DB_mysqli->mysqliRaiseError()
#8 <drupal_root>/sites/all/modules/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#9 <drupal_root>/sites/all/modules/civicrm/packages/DB/DataObject.php(2691): DB_common->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#10 <drupal_root>/sites/all/modules/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#11 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO.php(421): DB_DataObject->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#12 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO.php(2160): CRM_Core_DAO->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#13 <drupal_root>/sites/all/modules/civicrm/CRM/Upgrade/Form.php(470): CRM_Core_DAO::checkTriggerViewPermission(FALSE, TRUE)
#14 <drupal_root>/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(81): CRM_Upgrade_Form->checkUpgradeableVersion("5.22.1", "5.23.4")
#15 <drupal_root>/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(57): CRM_Upgrade_Page_Upgrade->runIntro()
#16 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Invoke.php(268): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#17 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
#18 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
#19 <drupal_root>/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:2))
#20 <drupal_root>/includes/menu.inc(527): civicrm_invoke("upgrade")
#21 <drupal_root>/index.php(21): menu_execute_active_handler()
#22 {main}

```

**Further Update:** I tried to rerun the upgrade again and got a ton of errors in the browser console:

```
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery-ui/jquery-ui.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/lodash-compat/lodash.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.mousewheel.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/select2/select2.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.form.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.timeentry.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.blockUI.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/datatables/media/js/jquery.dataTables.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery-validation/dist/jquery.validate.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.ui.datepicker.validation.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] ReferenceError: Can't find variable: _
    Global Code (Common.js:5)
[Error] ReferenceError: Can't find variable: _
    Global Code (crm.ajax.js:632)
[Error] TypeError: undefined is not an object (evaluating '_.noop')
    (anonymous function) (crm.wysiwyg.js:21)
    Global Code (crm.wysiwyg.js:72)
[Error] TypeError: undefined is not an object (evaluating '$.datepicker._defaults')
    (anonymous function) (en_GB:11)
    Global Code (en_GB:113)
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.tableHeader.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.notify.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery-ui/ui/i18n/datepicker-en-GB.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] ReferenceError: Can't find variable: _
    Global Code (noconflict.js:3)
[Error] Error: Bootstrap requires jQuery
    Global Code (bootstrap.min.js:6)
[Error] TypeError: undefined is not an object (evaluating '$.fn')
    (anonymous function) (superfish.js:11)
    Global Code (superfish.js:11:2766)
[Error] TypeError: undefined is not an object (evaluating 'a.fn')
    (anonymous function) (mobilemenu.js:1:1885)
    Global Code (mobilemenu.js:1:2045)
[Error] TypeError: jQuery is not a function. (In 'jQuery(window)', 'jQuery' is undefined)
    Global Code (custom.js:1)
[Error] TypeError: undefined is not an object (evaluating 'jQuery.extend')
    Global Code (upgrade:77)
[Error] TypeError: undefined is not an object (evaluating 'jQuery.support')
    (anonymous function) (drupal.js:584)
    l (jquery.min.js:2:17002)
    fireWith (jquery.min.js:2:17785)
    ready (jquery.min.js:2:12516)
    A (jquery.min.js:2:9915)

```

**Yet further edit:** On further investigation, all those .js files that are reporting the incorrect Content-Type seem to be trying to load from a bad path. It looks like instead of prefixing the path with the base URL, it's trying to load from the $civicrm\_root as defined in civicrm.settings.php. e.g. instead of trying to load

https://example.net/sites/all/modules/civicrm/bower\_components/datatables/media/css/jquery.dataTables.min.css

it's trying to get

https://example.net//var/sites/example.net/public\_html/sites/all/modules/civicrm/bower\_components/datatables/media/css/jquery.dataTables.min.css

The guidance in the File System Paths section of civicrm.settings.php says that $civicrm\_root should be the absolute system path, so it looks to me like it is defined correctly. So I'm not sure why it's loading from the wrong place?

**Another Edit, March 31st:** I had a play around with $civicrm\_root and looking at the results it produces in those javascript errors. It's clear that is where the incorrect path is coming from. But it definitely looks like it's set as per the instructions. If I set it so as that it fixes those errors and reaches the missing files with valid paths (e.g. `$civicrm_root = '/sites/all/modules/civicrm`';) then CiviCRM won't even load. I just get this:

What else might be affecting that path besides $civicrm\_root?

# Answer
> 1 votes
I've finally managed to upgrade to 5.24.0 after fixing the resource URLs problem. Thanks to Pradeep for answering that question, and thus also solving this one.

# Answer
> 0 votes
Just as a remark. It looks as my question "Strange error when updating 5.23.0 Joomla". Is your site on Windows?

---
Tags: upgrade
---


# Question
Title: How to allow users in ACL group to add & remove contacts in groups
I'm implementing ACLs for a client. Users can only have view or edit to a group when adding permissions, so then don't have the ability to add or remove a contact from that group. In fact, I've found there are ways to add and delete a contact to/from a group - but the more usual methods result in the message *"API permission check failed for GroupContact/delete call; insufficient permission: require access CiviCRM and edit all contacts*"
This is a Drupal system & they have 'edit groups' permissions. Giving the permission 'edit all contacts' then opens up all contacts to a user, which is obviously incorrect.
Is this a limitation of ACLs? Or is there some way around this problem?

# Answer
Can you try apply patch from here ? If the patch works for you than it would be worth adding your test result on PR to speed up the merge process.
> 1 votes

---
Tags: groups, acl
---


title: no bounce in bounce mailbox

text:
# Question
Title: no bounce in bounce mailbox
I don't know why I never receive my bounced mails in my bounce mail account, that I have set up at Civimail settings.

I do see it in Cpanel mail tracker that it has bounced and the sender looks like this:

b.48.56.909e941cf2aa78a6@example.com

or

crmbounce+id.23452345@example.com

The documentation says that "If the mail service for this mail account features VERP-handling you should use that" So how do I find out if my mail account features this? How do I enable VERP and how do I configure mailing to use VERP or not? If there is no VERP than how to handle bounce messages?

My setting looks like this Name: bounce mail server: mymail.example.com username: crmbounce@example.com password: double checked it, its ok localpart: crmbounce+11:07 2020. 04. 03. email domain: example.com return-path: empty Protocol: tried both POP3 and IMAP and maildir Source: emtpy Use SSL: checked Used for: Bounce

# Answer
> 0 votes
the first thing you need to test is that if the "+" notation works. Assuming your email is andreas@example.com, try sending to andreas+testing@example.com (from another email)

if you do receive the emails, you're golden and your mailserver isn't braindead (aka "not exchange or 360")

you then simply need to set up your localpart to "crmbounce+" (not sure if it's what you have already)

if you do not receive the email (and/or if the sender receive a bounce email saying that andreas+testing@example.com isn't a valid email), you might find a workaround with a catchall email, but I'd recommend you to take it as a hint that your mail server isn't made for mass mailing and set up a mail provider that is able to send mass emails and that has a working interface with civicrm (amazon ses, mailjet...)

X+

---
Tags: bounce
---


# Question
Title: Cron ERROR: Invalid username and/or password (Wordpress)
Our cron has worked without issue then all of a sudden it stopped and provided the error: Civi 5.23.3 WP 5.3

When the cron runs - I get the following: ERROR: Invalid username and/or password

My cron is as follows: `/usr/local/bin/php.cli -q /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/bin/cli.php -u username -p password -e Job -a execute`

# Answer
> 1 votes
Turns out the issue was with captcha on our site. The plugin Captcha by BestWebSoft and all other captcha's that I have tested, including Wordfence captcha cause cron error. I found a captcha plugin that allowed me to restrict registration but not login pages in the mean time.

---
Tags: wordpress, cron, cron-job
---


title: Upgrade to 5.24 failed

text:
# Question
Title: Upgrade to 5.24 failed
I tried upgrading to 5.24 and it hung half way through the upgrade - while upgrading to 5.24alpha1. Here's all that was in the log - it then died. I've gone back to 5.23.4 (Drupal). Ideas?

Apr 02 09:21:30 \[info\] Running task: Cleanup old files
Apr 02 09:21:31 \[info\] Running task: Checking extensions
Apr 02 09:21:31 \[info\] Running task: Begin Upgrade to 5.24.alpha1
Apr 02 09:21:32 \[info\] Running task: Upgrade DB to 5.24.alpha1
Apr 02 09:21:33 \[info\] Running task: Upgrade DB to 5.24.alpha1: SQL
Apr 02 09:21:34 \[info\] Running task: Install sequential creditnote extension

# Answer
I was able to reproduce a similar symptom in a wp-demo configuration. Specifically, the upgrader activates the new, core-internal extension (`sequentialcreditnotes`), and the activation fired off a general system-flush, and the general system-flush raised an error while handling some data from another extension (`civivolunteer`). The problem only occurred with the web-based upgrade UI (and not with the CLI-based upgrader).

CiviCRM 5.24.1 has a fix for that case.
> 4 votes

# Answer
On WordPress version, tried to upgrade from 5.21.2 to 5.24.0 twice and had the same issue. Freezes on: Executed: Upgrade DB to 5.24.alpha1: SQL Had to restore previous day's back up to bring database back. No error messages, just the freezing.
> 0 votes

---
Tags: upgrade
---


# Question
Title: Migrate CiviCRM from Joomla to Wordpress
I don't even know where to start. I have been tasked with migrating an older version of CiviCRM (3.4.8) on Joomla 1.5 to a newer version of CiviCRM on Wordpress. I got a fresh install of CiviCRM done on Wordpress 4.4, but I'm not sure where to go from here. I'm not familiar with Joomla (this is not my website), so please be very specific. I need everything (users, customizations, whatever else) moved over without having to delete anything on the current site.

# Answer
> 5 votes
In case it helps anyone, this is what I did:

Initial set-up:
\- a working Joomla site, with Civicrm and Joomla tables in the same database
\- a separate installation of Wordpress on the same server (articles and static content already imported from the Joomla site and redirects set up as required)

Aim: migrate the Joomla Civicrm tables and data to the Wordpress installation. In this case we chose to do it without moving the Civicrm tables, for simplicity.

Result: Wordpress tables and Civicrm tables are in two separate databases

1. Backup Joomla Civicrm tables or the whole database.
2. Make a note of:
* Civicrm version number in Joomla Civicrm
    * what components and extensions you have installed in Joomla Civicrm
    * any user permissions in Joomla Civicrm (if you use permissions).
3. Install Civicrm in Wordpress (check version is same as Joomla Civicrm).
4. Install/remove Civicrm components to match the Joomla Civicrm.
5. Install any Civicrm extensions (check versions) to match Joomla Civicrm.
6. Export data (should be just one row) from Wordpress Civicrm table civicrm\_uf\_match. Disable foreign key checks just in case.
7. In the Joomla Civicrm database, make a copy of table civicrm\_uf\_match (in case you need to revert to Joomla).
8. In the Joomla Civicrm database, truncate the table civicrm\_uf\_match and import the data exported from Wordpress Civicrm table. Preferably disable foreigh key checks.
9. Edit the Wordpress civicrm.settings.php file (by default it's in wp-content/uploads). Change CIVICRM\_UF\_DSN and CIVICRM\_DSN to point to the Joomla database.
10. I also edited the row 'userFrameworkUsersTableName' in the table civicrm\_setting, to change joomla-table-prefix\_users to wp-table-prefix\_users, but I don't know if this is necessary.
11. You should now be able to access the 'old' Civicrm tables through Wordpress.
12. Civicrm-\>Administer-\>Users and permissions-\>Synchronise Users to Contacts

That's it. There's a bit of tidying up to do (see below), but at this stage you can still easily revert to Joomla if necessary by replacing the table civicrm\_uf\_match with the copy, and by reversing steps 9 and 10.

13. Tidy up: manually set up Civicrm user permissions to correspond to the old Joomla setup. Add any missing users. I had already used the FG Migrate Joomla to Wordpress plugin to migrate users and articles from Joomla.
14. Tidy up: drop all the Joomla tables (and any other non-civicrm tables) from the Joomla database.
15. Tidy up: drop the civicrm tables from the Wordpress database.

Comments/corrections welcome.

# Answer
> 2 votes
For the question about Joomla (users and permission), ask the wordpress or joomla communities.

For the migration of civicrm itself, it should be fairly easy: just copy the civicrm database (or the tables civicrm\_\* if they are in the same database than the joomla site)

Check on civicrm.settings.php see if you have a mention of joomla and replace it by wordpress and you should be almost there

You might have to manually change how the drupal users are mapped to the civicrm contacts, unless you do manage to keep the same ids for joomla and civi

# Answer
> 0 votes
Re: civicrm.settings.php mentioned above, since you installed from WP, you shouldn't need to worry about Joomla there. What version of CiviCRM did you install in WP, the latest? If so, the schema has changed a good bit from 3.4.8! It might be best if you can update/upgrade CiviCRM to * (whatever version you are asked to use) in (a copy of) the Joomla site, and only afterwards, move your CiviCRM database into the WP- civicrm one. The upgrade can take some time, and present its own challenge. There's a table in CiviCRM syncing WP defined users and CiviCRM users, civicrm\_uf\_match. The users should exist as 'contacts' in civicrm, and the email address is the uf\_name, or identifier, used to match users in WP and CiviCRM. If you have already created users or data in the 'new' CiviCRM database with WP, save that database and, after you do the upgrade, try changing the connection info/credentials in the WP install to point to it. Go to 'CiviCRM' from WP (it looks like another plugin) and the user data *should* automatically get synced, you can verify by looking at the uf\_match table.

---
Tags: wordpress, joomla, import
---


# Question
Title: How to import organizations with active relationships
I have two kind of organizations: A and B with a relationship type of A owns B, B is owned by A.

When importing my file, I can set that B1, B2, B3 belong to A1 and this appears in the summary but the reality of the relationship is not active (A can't view/control B and/or B can't view/control A)

This is an example where I set this manually

I checked the relationships and I can't force this parameter.

Can I and how do I set this in the .csv file ? I installed the API CSV importer extension but this means I need to upload two times.

Have I missed something? regards, Guillaume

# Answer
> 0 votes
Thanks to @petednz-fuzion, solution was very simple:

1. install the Related permissions extension which is already included in CiviCRM extensions and that you can add from : domain.com/civicrm/admin/extensions?reset=1
2. Set the parameters the way you need at: domain.com/civicrm/admin/reltype?reset=1
3. Select the relationship type you need to set
4. Scroll down to Related Permissions Settings and set them the way you fits your situation best

---
Tags: relationships
---


# Question
Title: Activities not displaying and weird json message
civi 5.9.13 WP 5.2.2 civi In a contract screen activities tab no activities are listed error popup says "DataTables warning: table id=DataTables\_Table\_0 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1" EEK! I've recently deleted various mysql data related to civivolunteer - hope this didnt break anything

PS I tried the fix here: DataTables Warning: Cannot view Activities after upgrade to 4.7.28 didn't work

# Answer
> 1 votes
Answering my own question. On checking logs it was in fact missing civivolunteer custom fields. restored them from backup and all good now.

Is this bad behaviour for an extension?

---
Tags: activities, json
---


# Question
Title: What's the best way to update ambiguous relationship types?
On some older sites we are now getting warnings relating to ambiguities in relationship set ups.

What is the best way to change the relationship settings without affecting existing relationships?

The relationship in the image is specified as the case manager in some case types, and I think that this is causing problems with the cases. (Clients are showing as their own case manager after the role has been assigned). But I have editted relationship settings before and broken cases.

Is there a way to update settings for a relationship type that won't break existing relationship of that type, or any related cases?

D7.69 C20.2

# Answer
Some general information is at https://docs.civicrm.org/user/en/latest/case-management/what-you-need-to-know/#system-status-warnings but in an established install like yours you might need to poke around a bit and it will be specific to that install.

First, make a backup and do any fixing on a copy first just in case.

Then for your install it sounds like this should work:

In the database do `UPDATE civicrm_relationship_type SET name_a_b = 'csw1a' WHERE id=78;`. The string is arbitrary just needs to be different from the other one.

Then it depends whether you're using xml files or database storage.

If xml files, make sure the case type has `csw1` in the CaseRoles section for the role (without the "a"). It's probably ok already.

If database storage, edit the case type in the admin screens and you might see a blank row in the roles section. If so then delete that row and re-add it again, checking the case manager box if that was checked before. You want the "Case support worker is" choice.

Then, if you have any customizations or extensions that reference it you may need to update those.

If you have any relationships of that type that actually are backwards, i.e. in civicrm\_relationship the contact\_id\_a and contact\_id\_b are reversed, then you'll need to reverse those.

For anyone else seeing these warnings note that there are multiple variations and the above is specific to what was reported in the question. It's not the right solution for every situation. Also for astute readers you'll note that what you put in the xml is backwards from what you choose on the admin screens, and this is also true of what gets stored for the case type xml in the database even when using the admin screens.
> 3 votes

---
Tags: civicase, relationships
---


# Question
Title: Custom fields not showing in import and export filter
I have two sets of custom fields related to two sub-types of the same type (organization). Both profiles are active and I can see the custom fields in the contact summaries and in the advance search tool.

If I want to import a file and try to map fields choosing the proper sub-type, in one case I have the custom fields proposed and in the other case not.

The field mapper also shows the right relationships related to each sub-type.

I compared parameters for the custom fields and I can't see any difference.

Is this to be set somewhere else deep into CiviCRM?

best regards, Guillaume

EDIT 1: the required custom fields are searchable:

EDIT 2: I can see the same difference when I try to export contacts and select the custom fields.

EDIT 3: I also encounter this with custom fields for Individual type.

# Answer
> 1 votes
Deleting the custom fields sets and creating them again solved this issue. :-{

---
Tags: custom-fields, import
---


# Question
Title: Displaying Custom Contact Fields In Contact Dashboard
What would be the best way to display custom contact fields in the contact dashboard (civicrm/user).

We're using custom fields to store waiver/agreement statuses and would like users to be able to get a quick view of all waivers from the dashboard.

# Answer
If you are using Drupal, one option is to create a View as a Block and then set the Block to show at the Contact Dashboard page.

WP may have a similar solution based on using a CiviCRM Profile and having that set up (via some WP approach I do not know) to show at the Contact Dashboard path
> 3 votes

# Answer
You can put a file called UserDashBoard.extra.tpl in your extension in the templates/CRM/Contact/Page/View folder, and then put your html in it and use smarty's crmAPI to retrieve the data based on the value of `$contactId` which will contain the user contact id.
> 2 votes

# Answer
Might be too late to help you but this may be the answer you're looking for: https://civicrm.org/extensions/contact-layout-editor

That extension lets you entirely customize the display on the "summary" tab for contacts. Beyond the options that it offers, if you can't get it to display exactly what you want in your case you can also code your own custom blocks to add to the layout.

EDIT: Sorry, I see that you're interested in a different page /civicrm/user. My answer would apply for anyone who wants to edit /civicrm/contact/view.
> 0 votes

---
Tags: user-dashboard
---


# Question
Title: Is this Wordpress Critical Error after Upgrade to 5.24.1 serious?
Upgrading from 5.23.3 to 5.24.1 - I got a critical error after the upgrade. this is what I can find from the wordpress log around the time I ran the upgrade. (wordpress 5.3) The upgrade was successful - not sure if I need to respond to these errors.

```
[06-Apr-2020 18:42:36 America/New_York] PHP Notice:  Undefined index: CRM_Upgrade in /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Queue/Service.php on line 120
[06-Apr-2020 18:43:33 America/New_York] PHP Fatal error:  Uncaught Error: Class 'CRM_Civirules_Utils_Upgrader' not found in /home/tarabnyc/www/www/wp-content/uploads/civicrm/ext/org.civicoop.civirules/civirules.php:106
Stack trace:
#0 /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook.php(286): civirules_civicrm_managed(Array)
#1 /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook/WordPress.php(139): CRM_Utils_Hook->runHooks(Array, 'civicrm_managed', 1, Array, NULL, NULL, NULL, NULL, NULL)
#2 /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(86): CRM_Utils_Hook_WordPress->invokeViaUF(1, Array, NULL, NULL, NULL, NULL, NULL, 'civicrm_managed')
#3 /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(184): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\GenericHookEvent), 'hook_civicrm_ma...', Object(Civi\Core\CiviEventDispatcher))
#4 /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event in /home/tarabnyc/www/www/wp-content/uploads/civicrm/ext/org.civicoop.civirules/civirules.php on line 106

```

# Answer
> 1 votes
This is a regression bug since 5.22.1. Just submitted PR to core, can you please try upgrading after applying patch? If the patch works it would be helpful to add your QA results on PR to help the PR to get merged in next release.

Thanks

Pradeep

---
Tags: wordpress, upgrade, error
---


# Question
Title: After Upgrading to 5.23.0 New Cases Missing Custom Field Data from Webform Submission
I have a Drupal webform which creates a new case in Civi. After upgrading from 5.22.1 to 5.23.0 all the custom field data in the case is missing after submitting the webform. There are no error messages either in Civi or in Drupal.

I have duplicated the issue to make sure it was the upgrade that was causing the problem.

I am using Drupal 7.67 with the latest version of Webform\_CiviCRM.

# Answer
> 2 votes
This is a core bug, have logged an issue and provided temporary fix for it on the ticket.

---
Tags: webform-civicrm, core
---


title: Menu Problem with CiviCRM 5.13.2

text:
# Question
Title: Menu Problem with CiviCRM 5.13.2
Anyone else getting there menu at the bottom after updating to CiviCRM 5.13.2? Any ideas?

Drupal: 7.66 PHP: 5.6.40 MYSQL: 5.5.62

Thanks

# Answer
> 2 votes
Erik I had this in my civicrm.settings.php file. After I changed it fixed the layout

# Answer
> 1 votes
We have seen cases where an update causes theming problems (which then makes a lot of weirdness happen on screen as there is effectively no theme functioning so it looks v wrong). In those cases it involved Garland, and the simple solution was to access the Garland settings and simple resave them

# Answer
> 1 votes
For Drupal 7.67 Civi 5.13.4, we fixed this issue by changing the Image Upload URL under Resource URLs to a relative path.

# Answer
> 1 votes
I have fixed it on my local sandbox by enabling the Drupal clean url's.

# Answer
> 1 votes
I have fixed this issue by doing the following: 1. clearing the sites/default/files/civicrm/templates\_c 2. Corrected Resource URL 3. and also go to administer - system settings - cleanup caches & Reset paths

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


# Question
Title: Import Contribution - last step no longer goes to 'Summary / Error' report
We recently updated to CiviCRM 5.23.1

In the prior version when running it would run through the 4 documented stages 1. Upload Data 2. Match fields 3. Preview 4. Summary

But in 5.23.1 the summary stage no longer displays

As Summary is still staged as Step 4 - this looks like a bug - is this the case, and is there a fix to it?

# Answer
> 3 votes
How large is your import? It seems to happen on larger imports and this has occurred on and off in Civi for some time in my experience. Something is causing it to hang.

You can still get to the summary page by replacing *Preview* with *Summary* in the URL. That will show you any records that could not be imported, etc. You can also look at MySQL and check that the import is done if the temporary table (civicrm\_import\_job...) is no longer there. If the table is still there, search status = NEW to find records not imported.

Yes, this is a workaround but it will get you on your way for the time-being.

---
Tags: contributions, import
---


# Question
Title: Getting recurring contributions with Authorize.net that predate CiviCRM instance to register in CiviCRM
I have a client who used authorize.net for contributions before switching to using civicrm several years ago. They have continued to use authorize.net as their payment processor with CiviCRM, however contributions made before CiviCRM was being used have needed to be manually imported. Is there a method in existence to get recurring contributions that are processing through authorize.net to register with CiviCRM? Thanks in advance!

# Answer
> 1 votes
This would be incredibly difficult to do, because you would need to create recurring contribution records with the correct IDs matching those that Authorize.net is sending.

In this situation, I usually use the Offline Recurring extension. Please download from the link above; the original authors no longer maintain the extension, and this branch on my copy is the only version with no known bugs.

Create offline recurring contribution subscriptions to match those that exist outside of Civi. The missing contributions will be added to CiviCRM, but it's up to an end user to manually mark failed payments.

---
Tags: civicontribute, recurring-contributions, authorize.net
---


# Question
Title: Integrating iATS forms through CiviCRM (Drupal) onto website Wordpress
We have installed the iATS plugin to our CiviCRM (on Drupal) and we would like to create an embedded donation form onto our Wordpress website. We don't want to use the CiviCRM public pages because moving donors away from our website will mean fewer people go through with their donations.

I'd like to know if anyone else has encountered this problem, and if they'd be able to share some insight into how best to move forward?

Thank you!

# Answer
You can embed the Drupal site's form (any form, whether from Civi or Drupal) into your wordpress site using an iframe.

Here's an example of exactly that: https://patientscanada.ca/donate/

There are three steps to make this work:

1. Create an alternative theme on the Drupal site that is suitable for embedding in an iframe. There's a Drupal theme here: https://www.drupal.org/project/entity\_iframe\_theme that will take you most of the way. I can share what I've used if you want.
2. Use theme\_key or similar module to display the appropriate path using that theme.
3. Configure your settings.php to allow the wp site to iframe your drupal pages (by default, Drupal will not allow itself to be used in an iframe, as a security precaution).
> 4 votes

# Answer
It sounds like you don't want to use CiviCRM public pages because it would visually take people away from your main website.

An option could be to theme your CiviCRM public pages so that this transition is absolutely seamless -\> here's an example of a CiviCRM public page we're drafting at the moment (with iATS Payments processor but that's not the point) - this organization's main website (which lives on another server elsewhere) theme-wise looks just like it. We themed the public pages of their separate CiviCRM instance to look like their main website.
> 3 votes

# Answer
Hi and welcome to CiviCRM Stack Exchange:-)

There are many CiviCRM installations that send data from their public website to their CiviCRM on another server. That should not be a problem in itself. You could use the Form Processor extension (check https://civicrm.org/extensions/form-processor). And you could use CiviProxy (see https://docs.civicrm.org/civiproxy/en/latest/) to minimize the security impact.

However, you do need to think a little bit about the architecture you want to set up. I am not sure what you want to achieve, and if the iATS plugin is what you need. I have answered based on your request to have donation form on your Wordpress website that sends data to CiviCRM. You should perhaps expand a little on the exact steps you want to make so other with more knowledge about iATS can help you with those details.

Good luck!
> 0 votes

---
Tags: wordpress, drupal, forms, iats, iatspayments
---


# Question
Title: How do I fix the "Incorrect Resource URL" alert?
I've just a done a clean install by the book of CiviCRM 5.24 on Drupal 7. The installation went smoothly. Now I'm seeing an alert about the Resource URL being incorrect (it isn't). I seem to recall that this was an issue a year or so ago. Is this a regression that has crept in to the latest version, or am I doing something wrong? I have other D7/Civi installs on the same server, all with earlier versions of CiviCRM, and none of them are exhibiting this behaviour.

# Answer
> 1 votes
The Resource URL lookup uses the PHP setting curl.cainfo to look up a certificate file, e.g. CACert.pem to validate the server certificate. I found the problem went away when I added the server certificate to that file.

See Installing drupal 8 using civicrm-setup leads to "incorrect resource url" system status check errors

---
Tags: resource-urls
---