title: How do i force a field to be required

text:
# Question
Title: How do i force a field to be required
When i add a new contribution to a contact, i would like to avoid an empty "Source" field.

I need it to be \*required.

Have anyone already done this ?

thanks

# Answer
There isn't a way to do this in the user interface but you can write a small extension where you either:
> 1 votes

---
Tags: contributions, forms
---


title: How to close a group in CiviSEPA

text:
# Question
Title: How to close a group in CiviSEPA
I hope someone here can help me as I´m totally stuck with this problem.

I succesfully created SEPA Mandates, generated a group, downloaded the XML file and transmitted the file to my bank with a banking software today. However, I´m not able to close the group or mark the payments as "recieved". If I click the button "close and submit" ("Schließen und Senden" in German), it allows me to download the XML file, but otherwise says: "This is a test group and therefore can´t be closed". ("Dies ist eine Testgruppe. Sie kann nicht geschlossen werden.").

I´m unable to find out why that is only a test group and how I´m able to mark those payments as "recieved".

Thanks so much for your help! Angelika

# Answer
> 4 votes
Welcome to Stack Exchange Angelika. The error is most liekly because your SEPA-creditor is marked as a test creditor. You should be able to change that in the creditor's settings.

---
Tags: civisepa
---


# Question
Title: How am I meant to use $mask in hook_civicrm_links?
I don't really understand what the point of the $mask variable that is passed to hook\_civicrm\_links is. Can anyone explain it to me?

PS I understand how to use the other variables and I might not need to use $mask (the examples in the docs don't) but I feel like I might be missing out on something ingenious here.

The docs say:

> $links = the links array to modify in-place
>
> each item in the array may have:
>
> * name: the link text
> * url: the link URL base path (like 'civicrm/contact/view', and fillable from $values)
> * qs: the link URL query parameters to be used by sprintf() with $values (like 'reset=1&cid=%%id%%' when $values\['id'\] is the contact ID)
> * title (optional): the text that appears when hovering over the link
> * extra (optional): additional attributes for the tag (fillable from $values)
> * bit (optional): a binary number that will be fitered by $mask (sending nothing as $links\['bit'\] means the link will always display)
> * ref (optional, recommended): a CSS class to apply to the tag.
> * class (optional): Any other CSS classes to apply to the tag (e.g. no-popup).
>
> $mask = a bitmask that will fiter $links

So I am guessing it is something to do with permissions. A but of human friendly explanation with context and example would be much appreciated :)

# Answer
The way in which `$mask` is used in combination with the `bit` value of each link (e.g. `$link['bit']`) to show or suppress links is defined in the `CRM_Core_Action::filterLinks()` function. Specifically, if the expression `(!$mask || !array_key_exists('bit', $link) || ($mask & $link['bit']))` is true, then the link is included. Otherwise it is removed (`unset()`) from the `$links` array.

In other words, the link is **displayed** if any of the following is true:

* `$mask` is zero;
* the `$link` array does not contain a `'bit'` field;
* the `bitwise and` of `$mask` and `$link['bit']` is nonzero.

Otherwise, the link is removed.

What I have not figured out is where and how the `$mask` value is initialized, and where the existing `$link['bit']` values come from. For example, on the Contact Search Results page, the links include the following bit values. It's hard to see how a bitwise mask could be used to filter out the links with bit values of 7000 and greater. And it appears the bit values are sequentially assigned, so the link action for a given bit value may change depending on the user's permissions. It seems it would be safer to filter on, say, the `$link['url']` value to find and remove or alter particular links.

```
Decimal Hex     Binary                      Link Text
   4    00004   0000 0000 0000 0000 0100    View
   2    00002   0000 0000 0000 0000 0010    Edit
7000    01B58   0000 0001 1011 0101 1000    Delete
7001    01B59   0000 0001 1011 0101 1001    Add Donation
7002    01B5A   0000 0001 1011 0101 1010    Add Pledge
7003    01B5B   0000 0001 1011 0101 1011    Add Membership
7004    01B5C   0000 0001 1011 0101 1100    Add Relationship
7005    01B5D   0000 0001 1011 0101 1101    Record Activity
7006    01B5E   0000 0001 1011 0101 1110    Add Note
7007    01B5F   0000 0001 1011 0101 1111    Send an Email
7008    01B60   0000 0001 1011 0110 0000    Add to Group
7009    01B61   0000 0001 1011 0110 0001    Tag Contact
7010    01B62   0000 0001 1011 0110 0010    Communication Preferences Link

```
> 0 votes

---
Tags: hooks, links
---


# Question
Title: Shared hosting vs VPS with CiviCRM & Wordpress
I would like to start a new civi installation on WP to keep around 1000 contact records. What is the best option, Shared hosting vs VPS? Pros & cons? Any recommended hosting provider? Thanks

# Answer
Shared hosting can work well, but use one that specifically supports CiviCRM.

Typically VPS offers more resources (RAM, CPU etc) but at a higher price. VPS's are not all the same: on unmanaged ones you need to do more sysadmin work but have more flexibility; on managed ones there are more restrictions but more of the work is done for you.

Good shared hosting gives you flexibility while taking care of all the basics.

Have you considered CiviCRM's own Spark offering?

I've had good experiences with shared hosting on CiviHosting
> 1 votes

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


title: Green Box in Profiles

text:
# Question
Title: Green Box in Profiles
I want to remove these green boxes that appear on Civi Profiles automatically. They do not appear in the source code at all. Is there an option to remove or a place in Civi where I can disable and change the appearance of these boxes?

# Answer
> 3 votes
These boxes are intended to hold the "Pre-form help". If you go to **Administer menu » Customize Data and Screens » Profiles**, and click **Settings** next to the affected profile, you'll see the *Pre-form help* option I'm referencing.

One of the following is happening:

* There's some white space in the box. Do a "Select All" on the text of the box and press Delete, and save. See if it's fixed. You can use the **Preview** option under the **More** menu on the Profiles screen.
* If it is NOT fixed, there may be something that's adding space into that box inadvertently. This happened in CiviCRM about 10 years ago, and occasionally happens because of some odd WordPress plugin or similar. If you know how to look at the raw database data, look in the (unintuitively-named) table `civicrm_uf_group` at the `help_pre` field. It should be `NULL`.

---
Tags: profile
---


# Question
Title: Why are cv php:boot calls failing only when running unit tests and not through direct CLI calls?
Starting with a new machine, and a new buildkit instance! Buildkit/bin's contents added to PATH successfully.

When I run cv php:boot --level classloader on the command line, I get:

```
/*BEGINPHP*/
require_once  '/var/www/project/sites/all/modules/civicrm' . "/CRM/Core/ClassLoader.php";\CRM_Core_ClassLoader::singleton()->register();
/*ENDPHP*/

```

But when phpunit tests are through the command line (with any of phpunit5, phpunit6, or phpunit7), the cv command line fails, returning "".

In the test directory's phpunit bootstrap file, replacing $result with what's output above works until the next time cv is called in the process, whereupon it also breaks.

I have set the execute permission on ~/buildkit/bin/cv to be globally executable. But it's the same user running it that cloned the buildkit repo.

Any ideas?

# Answer
> 1 votes
I found the answer: I was using a backup: the CiviCRM unit test framework uses files and services not found without doing a git clone (or buildkit equivalent). The folders you need from a git clone are Tests and Tools.

Leaving this here in case it assists someone who encounters the same problem.

# Answer
> 0 votes
I've found that I have to replace

```
eval(cv('php:boot --level=classloader', 'phpcode'));

```

with

```
eval(`cv php:boot --level=classloader`);

```

I had to make one other change too but it's windows-specific.

---
Tags: civicrm-buildkit, phpunit
---


# Question
Title: CiviCRM Data not showing in Views - Drupal 9, Shared DB
After running into problems setting up Views integration with CiviCRM installed on a separate database, I gave up and started my project over with CiviCRM installed on the same database as Drupal 9. This has solved the privileges problem I was having.

Here's my old question about the Privileges problem (which I'd still love an answer to if anyone has one!)

However, I'm now running into an issue where CiviCRM fields aren't showing up as an option in Views. The documentation seems to suggest that if CiviCRM is installed on the same db as Drupal, this data should show up with no further configuration needed.

> If your CiviCRM and Drupal are located within the same database the 12 steps below are not required.

Help! What am I doing wrong?

**EDIT**: At @KarinG's suggestion I installed and enabled the CiviCRM Entity module, which has fixed the problem where CiviCRM entities weren't showing up as options in Views. However, I now have a problem where those entities are not showing up in the results. I've flushed Drupal's caches many times at this point.

**EDIT**:

No results are returned.

Thank you in advance for all your help! It really feels like there's just some silly box I've left unchecked somewhere.

# Answer
Austin -\> did you install and enable CiviCRM Entity Module?
> 1 votes

---
Tags: drupal-views, drupal-9
---


# Question
Title: Joomla 2 CiviCRM User Sync: synching Community Builder multi-value custom fields?
looking for some suggestions on best practice implementation for synching external data to CiviCRM custom data.

I'm using the Joomla 2 CiviCRM User Sync plugin to sync my Joomla 3.9.24 user registration data from Community Builder to CiviCRM 5.33.2. That works great for basic name/username/email, but I have a couple of custom Community Builder fields I'd also like to sync to the CiviCRM records.

Community Builder includes a plugin to execute an SQL query via CB action hooks, and that works great for updating CiviCRM fields with simple data types (varchar, integer). But I have one multi-select CB custom field stored as a text field with separators, which needs to go into a Civi multi-select custom field. I know CiviCRM has a special "TEXT\_SEPARATOR" variable that it uses storing multi-value text strings in its database, but I can't figure out 1) what that character is and 2) how I can write it into my SQL.

So: is it even possible to write external SQL to do this? Or is there an API call or other programmatic way I should go about doing these Civi custom field updates?

Thanks!

System deets: Joomla 3.9.24, Community Builder 2.5.0, CiviCRM 5.33.2, Joomla 2 CiviCRM User Sync 2.1.0 (https://civicrm.org/extensions/joomla-2-civicrm-user-synchronization)

# Answer
> 1 votes
For the text separator you can use it in sql as CHAR(1), and can use CONCAT() to combine with other strings.

---
Tags: custom-fields, joomla, sync
---


# Question
Title: File type custom field to only allow images
I have created a file type custom field and discovered that you can upload any type of file on the field so I want to restrict the custom field to only upload image files. Is it possible?

# Answer
You can use validateForm in an extension to restrict it.

You can also vote for this ticket: https://lab.civicrm.org/dev/core/-/issues/2410
> 2 votes

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


title: Saving CiviRules Rules

text:
# Question
Title: Saving CiviRules Rules
https://lab.civicrm.org/extensions/civirules/-/blob/master/README.md has a reference to "SAVE YOUR EXISTING RULES FIRST." I realize that regarded upgrading from 1.x but I'm interested because I ran into a problem upgrading from 2.19 straight to 2.22 and, if possible, would like to back up just the rules before probing further. Is there a way to save / back-up and later restore just the rules?

# Answer
> 2 votes
There is no import/export function as far as I know but.....

your rules will be saved in a few tables:

* **civirule\_rule** will contain your rules
* **civirule\_rule\_action** will contain the combination of actions in your rules
* **civirule\_rule\_condition** will contain the combination of conditions in your rules
* **civirule\_rule\_log** will contain the logs of your executed rules
* **civirule\_rule\_tag** will contain the tags of your rules

You can save these tables before you upgrade and then later restore BUT you would have to make sure that you check the ID's of actions and conditions! So to be on the safe side I would save the tables **civirule\_action** and **civirule\_condition** too so you can compare after the upgrade.

Also, be aware that if you have any delayed rules you have to check the **civicrm\_queue\_item** table and execute the cron job for delayed rules until there are no more items left BEFORE you upgrade.

Alternatively you can either develop an import/export function yourself or fund a CiviCRM expert to create that function in the CiviRules extension?

---
Tags: civirules
---


# Question
Title: All CiviCase Functionality Gone Despite Component Being Enabled
All the CiviCase functionality has gone in our CiviCRM D7 (version 5.34.0) website even though the component is enabled. All the menu items for CiviCase are not there. I have flushed all caches, reset paths and reset menus. I have disabled and re-enabled the component but this all makes no difference. If I go to `/civicrm/civicase` it redirects to `/civicrm/admin`. There don't seem to be any relevant error messages in the CiviCRM log or in the Drupal log. The CiviCase permissions are still present in Drupal.

Can anyone suggest any further troubleshooting I can do?

All other components and everything else is working fine. As far as I know there have been no significant updates to Civi either (no new extensions enabled etc)

# Answer
it sounds like a permission issue - please check they are set for the roles being used.
> 1 votes

---
Tags: civicase
---


title: Recording of refunds for an event

text:
# Question
Title: Recording of refunds for an event
For an upcoming event, I gave a number of our members refunds using Stripe. These refunds were recorded in the personal dashboard of each member, but they still appear as paid attendees for the event, even after receiving their refund, which causes confusion

# Answer
> 1 votes
Welcome to SE! There are many reasons why one might refund an event participant payment which would affect how the event registration is recorded. For example, if you refund because someone cancels you also want to cancel the event registration. If they have paid but they are a speaker you might refund the payment and want to change their role from 'attendee' to 'speaker'.

Conversely, just because someone cancels does not necessarily mean you want to refund the payment.

What is the reason for the refund? How do you want their registrations to show now? If they are not attending you could select those registrations and set the status to 'Cancelled'

---
Tags: stripe, refund
---


# Question
Title: Can I move a report from Contact Reports to My Reports?
I have 5 reports in Contact Reports which I meant to have in My Reports. Is there a way to move these to My Reports?

# Answer
> 1 votes
Go to the report you want to add to your "My Reports." Click on the Access tab at the far right. Check the box beside "Add to my reports? That should do it for you.

---
Tags: civireport
---


# Question
Title: How do I create a view to DISPLAY ALL EVENTS
it looks like the Events Dashboard only shows upcoming events. As I am using Civi to Manage membership and attendance to events, I would like to easily access all past events in order to edit participant lists, etc. HOW DO I DO THIS? And is there a reason why the events dashboard does not offer the choice of showing events? Thanks.

# Answer
Welcome to StackExchange Daniel. You are probably talking about this view: Events \> Dashboard, which indeed only shows upcoming events and recents registrations.

There is another page, Events \> Manage Events, that allows you to search and filter for events or show all events including past ones.

You could of course also create a report to list all (relevant) events and/or participants.
> 2 votes

---
Tags: civievent
---


# Question
Title: hook_civicrm_alterCalculatedMembershipStatus
It seems that hook\_civicrm\_alterCalculatedMembershipStatus is the right place for adding various actions based on Membership change. It looks like there is some issue with $membership array from the calling function.

I v'e started the hook exploration with the code below:

```
mail('my@email', 'title', print_r($membership, true));

```

and get two emails with different arrays (with **6043** part is being changed instantly):

```
[custom_2_6043] =>
[custom_4_6043] =>
[custom_5_6043] =>
[custom_7_6043] =>
[custom_10_6043] =>
[custom_11_6043] =>
[custom_12_6043] =>
[custom_94_6043] => 0
[custom_19_329] =>

```

and

```
[custom] => Array
        (
            [2] => Array
                (
                    [6043] => Array
                        (
                            [id] => 6043
                            [value] =>
                            ...
                        )

                )

            [3] => Array
                (
                    [6043] => Array
                        (
                            [id] => 6043
                            [value] => 0
                            ...
                        )

                )
            ...
            [94] => Array
                (
                    [6043] => Array
                        (
                            [id] => 6043
                            [value] => 0
                            ...
                        )

                )

```

Since we aim to perform an additional action based on a custom field value, it seems a bit tricky to catch custom field by its key without searching by field key in array or as a part of a \[custom\_**KEY**\_6043\] string. Besides, if there are two emails, it might mean the hook is being executed twice.

Am I taking right direction here? What would be the simpliest way of getting

```
if field value is X [then do Y]

```

Please advise.

# Answer
Aidan is right about the intent of the hook that you're using. It's not really the right tool for the job. If "CiviRules is not an option" then you should look at the `civicrm_pre` and `civicrm_post` hooks. You can then use the CiviCRM API to retrieve any relevant Custom Field values for the Membership and take action based on what is returned.

There are plenty of examples of how to inspect a CiviCRM entity before and after it is saved to the database, but you're welcome to have a look at how CiviCRM WordPress Member Sync does what it does. You should probably look at this file in particular.

FWIW, I'd also look at writing to log files rather than emailing yourself with debugging data.
> 2 votes

# Answer
That hook is intended for overriding the effects of the membership status rules ('Current', 'Grace', 'Expired' etc).

If you want to take action based on membership changes, try CiviRules
> 1 votes

---
Tags: wordpress, hooks
---


title: Relabel external ID

text:
# Question
Title: Relabel external ID
is there a way to relabel `external id`? I want to use it but set it for our client in a way they are used to. I've tried Word Replacement but it seemed ineffective.

Any ideas?

# Answer
External ID can be replaced with word replacement but it has to be done directly with the original English chain 'External ID' and not its translation that I wanted to replace again.

Something like 'External ID' \>\> 'Code fédéral'

Thanks to @aydun on Mattermost
> 2 votes

# Answer
You can do this with a buildForm hook if you want to, or by customizing a template (see https://docs.civicrm.org/dev/en/latest/framework/templates/customizing/)

You can also do it with the Contact Layout Editor extension (https://civicrm.org/extensions/contact-layout-editor).
> 1 votes

---
Tags: contacts
---


title: Unknown column 'a.name' in 'field list

text:
# Question
Title: Unknown column 'a.name' in 'field list
CiviCRM 5.35.0 on Joomla 3.9.25

Search (basic, advanced or search builder) when I select a Group returns:

```
 "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: no such field"

```

I'm not sure when this started happening. We update regularly and haven't had any issues installing updates or running the db update function.

Error log has this:

```
    Mar 11 05:12:10  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params`
FROM civicrm_saved_search a
WHERE (`a`.`id` = "71")
 [nativecode=1054 ** Unknown column 'a.name' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params`
FROM civicrm_saved_search a
WHERE (`a`.`id` = "71")
 [nativecode=1054 ** Unknown column 'a.name' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params`
FROM civicrm_saved_search a
WHERE (`a`.`id` = "71")
 [nativecode=1054 ** Unknown column 'a.name' in 'field list']"]
)

```

# Answer
It sounds like the 5.32 upgrade didn't complete properly. See https://github.com/civicrm/civicrm-core/blob/0cc012c6d478a2602db3720117b39fff3799b7f7/CRM/Upgrade/Incremental/php/FiveThirtyTwo.php#L89
> 0 votes

# Answer
It might be that the column that you are trying to get in your saved search no longer exists? It is trying to find a record in the table civicrm\_saved\_search with and id of 71. Can you check if that record exists and what it looks like?
> 0 votes

---
Tags: error
---


# Question
Title: What are all the possible variable fields available in greetings (Email and Postal)?
When defining new email and postal greeting formats in Administer \> Communications \> Email Greeting Formats, I see several available variables like `{contact.first_name}`, `{contact.last_name}`, and so on.

I would be happy to see the list of **all** available variables.

More precisely, when I refer to `{contact.individual_prefix}`, I have access to the field `Label` of the corresponding table, but I want to access the field `Description` of the same table. I would like to know if this is possible, and if I have to install some extension in order to achieve that.

# Answer
You can see a list of the tokens when creating a mail message (e.g. with mailings \> New Mailings). You will see a drop down for the tokens in the top right of the mail body. If you select one you'll see the full token in the message body which you can then use in the greeting format.
> 1 votes

---
Tags: civimail
---


title: Smarty test fails in if-then-else

text:
# Question
Title: Smarty test fails in if-then-else
I have an Email greeting containing a Smarty if-then-else expression:

```
{capture assign=language}{contact.preferred_language}{/capture}{if $language == 'fr_FR'}Bonjour{elif $language == 'nl_NL'}Hallo{else}Hello (should be in '{$language}'){/if}

```

When the preferred language of the contact is `nl_NL`, I expect the expression above would output

```
Hallo

```

but I get

```
Hello (should be in 'nl_NL')

```

This shows that Smarty is activated and the variable `$language` is correctly assigned, but the test is failing.

I would like to know what I am doing wrong.

# Answer
> 1 votes
There is no `{elif}` in smarty. Use `{elseif}`.

---
Tags: smarty, civicontact
---


title: Error in table state_province for Wales

text:
# Question
Title: Error in table state_province for Wales
It seems that a bug must first be reported here before is can be reported as bug. I use version 5.35.0 Joomla, but the error is created in version 5.31.alpha1.

In the table the combination 'abbrevation' and 'country\_id' must be unique. But the abbrevation for Carmarthenshire must be 'CMN' (wikipedia.org ISO\_3166-2:GB) en not 'CRF', that is 'Cardiff'. (See: civicrm\_state\_province.tpl, 5.31.alpha1.mysql.tpl) I found this little copy-error when i tried to import the database with phpmyadmin.

# Answer
I think you're right - good catch. See https://github.com/civicrm/civicrm-core/pull/19802

FYI in my database there isn't a restriction for uniqueness for the abbreviation field - the unique constraint is defined here: https://github.com/civicrm/civicrm-core/blob/da28128b812d4ae53c52abd8073656c61bbc4cc7/xml/schema/Core/StateProvince.xml#L70-L74 and it's `name` and `country_id`.
> 1 votes

---
Tags: upgrade
---


# Question
Title: Compilation error when installing on Drupal8
Following install guide I get fatal error at compilation tasks in `composer require civicrm/civicrm-core:'~5.35'`.

The setup is on Aegir with Drupal 8.9 and drupal/recommended-project composer template, having a relocated document root.

Is this error related to the setup above, or it's CiviCRM related?

Error log:

```
Compiling additional files (For full details, use verbose "-v" mode.)
Compile: Generate CCL wrapper functions
> @php -r 'require_once '\''/var/aegir/platforms/d8.9.13/vendor/autoload.php'\''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::template($GLOBALS["COMPOSER_COMPILE_TASK"]);'
WARNING: Failed to read compilation-task from COMPOSER_COMPILE_TASK. Please use "composer compile".
PHP Fatal error:  Uncaught InvalidArgumentException: Invalid file reference (tpl-file=NULL) in /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks/Template.php:62
Stack trace:
#0 /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks/Template.php(21): CCL\Tasks\Template::assertFileField()
#1 /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks.php(24): CCL\Tasks\Template::compile()
#2 Command line code(1): CCL\Tasks::template()
#3 {main}
  thrown in /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks/Template.php on line 62
Script @php -r 'require_once '\''/var/aegir/platforms/d8.9.13/vendor/autoload.php'\''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::template($GLOBALS["COMPOSER_COMPILE_TASK"]);' handling the shell-runner event returned with error code 255
Subcommand @composer compile  returned with error code 255

Installation failed, reverting ./composer.json to its original content.

In ComposerPassthru.php line 72:

  Subcommand @composer compile  returned with error code 255

```

# Answer
> 3 votes
It turns out this compilation error is related to composer versions:

* Using default composer version of 1.10 on Ubuntu 20.04 produces this fatal error.
* Manually upgrading to composer 2.0 resolves this issue.

---
Tags: drupal-8, composer, aegir
---


# Question
Title: Fatal error while building CiviCRM breadcrumb
I'm running against a fatal error on an number of CiviCRM pages (stacktrace below). There seems to be a problem with a url that is passed to Drupal\Core\Url::fromUserInput() when building the CiviCRM breadcrumb.

My setup: Drupal 9.1.5 (multilingual nl and fr) CiviCRM 5.35.0

Any ideas?

Thanks.

UPDATE: I've updated the stacktrace in response of the answer of Demerit. I've switched to core Bartik theme instead of my custom theme and experience the same error.

```
Er is onverwacht een fout opgetreden. Probeer het later nog eens.

InvalidArgumentException: The user-entered string 'https://nl.example.be.lndo.site/civicrm?reset=1' must begin with a '/', '?', or '#'. in Drupal\Core\Url::fromUserInput() (line 213 of core/lib/Drupal/Core/Url.php).

Drupal\civicrm\CivicrmBreadcrumbBuilder->build(Object) (Line: 83)
Drupal\Core\Breadcrumb\BreadcrumbManager->build(Object) (Line: 72)
Drupal\system\Plugin\Block\SystemBreadcrumbBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 450)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 90)
__TwigTemplate_7936d95d2109e2f3d9c3238b3a2874dfc12656eb43b3c81bb3249b679af13b6d->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 65)
twig_render_template('core/themes/bartik/templates/page.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 450)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 86)
__TwigTemplate_7a63433aced4475eeba9239a5c5c71c161379c0b5254aa839ee30a407195e9cd->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 65)
twig_render_template('core/themes/bartik/templates/classy/layout/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 162)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 163)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

```

# Answer
> 1 votes
I think the problem is in your custom theme:

wig\_render\_template('themes/custom/b4\_piosite/templates/page.html.twig', Array) (Line: 384)

It's doing something that this doesn't like:

Render #pre\_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725

---
Tags: error, drupal-9
---


# Question
Title: Is it possible to create a token in hook_civicrm_tokenValues that retrieves the name of the creator of a non-mass-mailing?
One of our staff team has recently requested a new token be added to civi mailings that allows the name of the sender of the email to be automatically added (for use in the signature at the foot of the email). This would mean that they did not have to regularly change the name at the bottom of their mailing templates when new staff members left or arrived.

I see that **hook\_civicrm\_tokenValues** is the standard hook used to create custom tokens for civi.

I can see that one of the parameters to this function is **$job**.

## Mass Mailings Token

I have successfully managed to create a token that returns the sender of an email for mass mailings, using this variable $job to call the API and retrieve the required info. Here's the API call that retrieves the first and last names of the creator of such a mass mailing:

```
    if (!empty($job)) {

      //Create a token to put in the name of the creator of the mailing

      // given the job id, retrieve the mailing id.
      // given the mailing id, retrieve the contact id of the creator of the mailing.
      // given the contact id, retrieve the first and last name of the creator of the mailing.
      $result = civicrm_api3('MailingJob', 'getsingle', [
        'sequential' => 1,
        'return'     => ["mailing_id.created_id.first_name", "mailing_id.created_id.last_name"],
        'id'         => $job,
      ]);
}

```

## 'Personal' / Activities Mailings Token

However, for mailings that are not mass mailings, this technique does not work, since such mailings appear not to have a job id, and are stored not in the civicrm\_mailings table, but the civicrm\_activities table.

I have examined the incoming contents into the hook\_civicrm\_tokenValues hook. They are $values, $tokens, and $context.

**$tokens** appears to list which tokens are being used in the particular mailing being processed.

**$context** appears to show in what context the hook is being called - in this case 'CRM\_Activity\_BAO\_Activity'.

**$values** appears to show the values that are available to be used to construct tokens. These all appear to be values directly related to the contact being emailed e.g. first name, last name, display name, etc... There do not seem to be any in the list that I could use to call the API (or indeed query the database) to get the contact name of the person sending the email.

Is this simply not possible, or is there a way of doing so?

Ideally, one would be able to access the activity\_id of the activity that the mailing was part of. If that was available, calling the API to retrieve the email creator (using the civicrm\_activities\_contact table) would be trivial.

# Answer
> 3 votes
For the use case where the email is sent from a logged in user, one could use the function `CRM_Core_Session::singleton()->getLoggedInContactID()` to get the logged in contact ID.

This would fall down for those cases where the email is generated by a 'system call', e.g. an email that was triggered by a cron job, but that might not be a deal breaker for your use case..

You could always add a fallback behaviour for those situations where it has not been possible to find a contact by either your method or the above method, e.g. populate the token with 'your friendly membership officer' or provide a default contact id or similar.

---
Tags: email, activities, tokens, hooks
---


# Question
Title: Document merge in CiviCase from scheduled activity in timeline
I've created a case type with a timeline that includes document print/merge activity. Where I am running into issues is with doing the document creation from that timeline generated activity.

When I use the 'Add Activity' drop down in the case manangement I can create a document, use a template, all the things I would expect when using the 'Print/Merge Document' action.

However, when I go to the scheduled activity which was created when the case was created and edit it I can't seeem to do any of those things. I don't have the option to use a document template or create a document the way I can using the drop down 'add activity' option.

Are activities in case standard timelines just notes/reminders and the actual task has to be done using the dropdown or am I missing something? If I'm not missing something and they are just notes/reminders why set up the timeine/sequence instead of just setting the possible activities.

# Answer
> 0 votes
The print/merge activity type is usually a "system" type that gets created when you use the print/merge search results action, or the Export Document button on Manage Case, not an activity you usually create yourself. The fact that it works from the add activity dropdown seems to be because of some sneaky code that was added to make it do the same as the export document button: https://github.com/civicrm/civicrm-core/blob/915e9edd65c7b594372897923734ec52e67f1835/CRM/Case/Form/CaseView.php#L248-L251

---
Tags: wordpress, civicase
---


# Question
Title: For activities of type Email, how do I get the id for the activity just created during hook_civicrm_postProcess?
Normally during hook\_civicrm\_postProcess, you can get the id of the just created activity from `$form->_activityId`. For activities of type Email, I can't see how to get the activity id. Am I just missing something simple?

I don't think I can use hook\_civicrm\_post instead because I want to use information in the form that isn't in the activity object, but the form info isn't available in hook\_civicrm\_post.

# Answer
> 0 votes
As of 5.36 this wouldn't be possible in a way consistent with other activity types anyway, because if there's multiple recipients the system will now create multiple activities, so in 5.36+ the form doesn't correspond to a single activity like with other activity types.

---
Tags: activities
---


# Question
Title: Export CSV of an smart group's contacts via REST API?
How can I make a REST API call to Civi that creates a CSV file with all the Contacts details (name, email, telephone...) from an specified Smart Group?

Thanks.

# Answer
You can't create a csv directly from an API call. But it would be a very simple task to make an API call and then format the results as a csv. One simple option might be to use Google Apps Script to call the API then put the results into a spreadsheet, if you don't want to run this as a standalone script. Or any scripting language you might want to use will have plenty of Google results for creating a csv from an array, which is what the API will return.
> 1 votes

---
Tags: contacts, api, groups, rest
---


# Question
Title: How to add an activity for the contacts generated via a report?
I have a list of contacts from a contribution report, and I would like to add an activity based on the latest result from the report. My first thought was to have a "action link" to update the activity, but don't see it there. Is there any other way to achieve that? Thanks

# Answer
> 2 votes
I would just add all the contacts to a group (you have to create the group first) and then add the activity to all the contacts in the group.

# Answer
> 0 votes
As a workaround you could export as csv and then adjust the csv and then use it as input for Import Activities.

---
Tags: contacts, contributions, activities, reports, activity
---


# Question
Title: Create an external form to launch a search
I wanted to include a custom form on our intranet that would initiate a contact search when submitted, like the quick search does if you enter text and press Enter.

I copied the form but when it came through to the search page a message popped up saying "Because your session timed out, we have reset the search page."

# Answer
> 3 votes
The reason was that my form was missing `qfKey`. This is a CSRF key generated as part of QuickForm forms.

This key must be generated for the particular form in use. By using XDebug in Vim, I was able to find out that the form name must be `CRM_Contact_Controller_Search`, and that it expects a sequence number too.

So my form is generated as follows:

```
<?php
// ...
civicrm_initialize();
$qfKey = htmlspecialchars(CRM_Core_Key::get('CRM_Contact_Controller_Search', 1));
$mySearchForm = <<<HTML

<form action="/civicrm/contact/search/advanced" method="post">
  <div>
    <label>Search name or email
      <input type="text" name="sort_name" accesskey="q" />
    </label>
    <input type="hidden" name="hidden_location" value="1" />
    <input type="hidden" name="hidden_custom" value="1" />
    <input type="hidden" name="qfKey" value="$qfKey"/>
    <input type="hidden" name="_qf_Advanced_refresh" value="Search" />
  </div>
</form>
HTML;

```

Posting here as it took me ages to figure out!

---
Tags: integration
---


# Question
Title: How can I delete a custom field (other than GUI)?
I had a custom field group with a disabled field.

1. When I tried to delete the field (ID=59), the Warning window froze with CRM logo rotating.
2. When I tried to enable the field, it gave Error about DB Constraint Violation, but apparently enabled the field.
3. When I tried to delete the field then, the Warning window froze again with CRM logo rotating.

The screenshot contains combined messages - error from action 2 and warning window from action 3.

How can I fix the issue?

P.S. Editing the field 59 does not work either (also frozen logo after clicking save).

I am running CiviCRM 5 on Drupal 7.

# Answer
There are a few ways to delete a custom field other than the UI:

* Use the API Explorer and then entity CustomField / CustomGroup. That will allow you to delete them, but you will need to know the ID of the CustomField or CustomGroup. You can find that with the API Explorer as well. More info: https://docs.civicrm.org/dev/en/latest/api/#api-explorer
* In the database, but will need to know exactly what you are doing! This is not something to recommend without a sound knowledge of the CiviCRM database. You have to make sure all the tables and data are correct and in sync with each other. There are a few tables involved:
* civicrm\_custom\_group, which holds the details of the custom group. One of the columns is the table\_name, which will hold the name of the table where the actual custom data is
* civicrm\_custom\_field, which holds the details of the custom fields, linked with the column custom\_group\_id. One of the columns is column\_name, which is the name of the column in the actual table with data
> 2 votes

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


title: Cannot install CIVICRM on Drupal 9

text:
# Question
Title: Cannot install CIVICRM on Drupal 9
I am trying to install CIVICRM on Drupal 9 as per instruction found here https://docs.civicrm.org/installation/en/latest/drupal9/

When i enter "composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.29'" getting error as below .. how to resolve this issue ?

\[root@srv public\_html\]# composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.29' Do not run Composer as root/super user! See https://getcomposer.org/root for details Continue as root/super user \[yes\]? yes ./composer.json has been updated Running composer update civicrm/civicrm-core civicrm/civicrm-packages civicrm/civicrm-drupal-8 Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1 \- civicrm/civicrm-core\[5.29.0, ..., 5.35.0\] require pear/validate\_finance\_creditcard dev-master -\> found pear/validate\_finance\_creditcard\[dev-master\] but it does not match your minimum-stability. \- Root composer.json requires civicrm/civicrm-core ~5.29 -\> satisfiable by civicrm/civicrm-core\[5.29.0, ..., 5.35.0\].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Thanks Jaiz

# Answer
> 2 votes
You should replace 5.29 in the instructions with the current version. Right now it's 5.35.

And I thought the docs were updated for this but for drupal 9 you also need to add `"minimum-stability": "dev"` into composer.json.

Also don't run composer as the root user.

# Answer
> 0 votes
This issue we blogged about on Bug in CiviCRM Installer for Drupal 9 and the basic solution is to run this:

```
composer require pear/validate_finance_creditcard:dev-master

```

before you try to install. Then it works.

---
Tags: install, drupal-9
---


# Question
Title: Display custom contact dashboard only to certain Contact subtypes
Drupal 7.78 Civi 5.28.2

I am setting up a custom contact dashboard following Demerit's answer using UserDashBoard.extra.tpl and smarty's crmAPI.

But I only want it to be for contact sub-type = Student. How would I write an IF statement for that?

Here is my best guess but it does not work.

```
    {crmAPI var='result' entity='Contact' action='get' id=$contactId sequential=0}
{foreach from=$result.values item=contact}
  {if $contact.contact_sub_type = 'Student'}

<table class="dashboard-custom"><tr><td><strong>Student Demographics</strong></td></tr>
{crmAPI entity='Contact' action='get' var='result' id=$contactId return="birth_date,gender_id,custom_108,custom_107,custom_109,custom_110" sequential=0}
{foreach from=$result.values item=contact}
  <tr><th>Date of Birth</th><th>Gender</th><th>Student Status</th> <th>Marital Status</th><th>Anniversary</th><th># of Children</th></tr>
  <tr><td>{$contact.birth_date}</td>
  <td>{$contact.gender_id}</td>
  <td>{$contact.custom_108}</td>
  <td>{$contact.custom_107}</td>
  <td>{$contact.custom_110}</td>
  <td>{$contact.custom_109}</td></tr>
{/foreach}
<tr><td><strong>Class Info</strong></td></tr>
{crmAPI var='result' entity='Contact' action='get' id=$contactId return="custom_118,custom_112,custom_113,custom_111"}
{foreach from=$result.values item=contact}
<tr><th>Class of</th><th>Campus</th><th>CG Leader</th> <th>Met Spouse at RI</th></tr>
  <tr><td>{$contact.custom_118}</td>
  <td>{$contact.custom_112}</td>
  <td>{$contact.custom_113}</td>
  <td>{$contact.custom_111}</td></tr>
{/foreach}
</table>
{/if}
{/foreach}

```

Thanks

# Answer
Might just be a typo but you need `==` instead of `=`.

`{if $contact.contact_sub_type == 'Student'}`

But contact\_sub\_type is an array, so you could foreach over it and check if one of the values is Student.
> 1 votes

---
Tags: smarty
---


title: UK Gift Aid tax percentage

text:
# Question
Title: UK Gift Aid tax percentage
We are running civicrm 5.30.0 and UK Gift Aid 3.4.6. Our tax calculation is set to 25% and yet imported contributions or those added on-line all calculate at 33.33%?

I cannot find anywhere else that this figure is set

# Answer
> 1 votes
I was advised by another organisation to set the tax rate to 20% and this is now working correctly showing the correct gift aid amount as calculated at 25%. So this matter is now sorted.

# Answer
> 0 votes
You can find the options to set the tax rate by navigating to Administer \>\> CiviContributue\>\> Giftaid\>\> Giftaid tax rate.

If you have already imported contribution with different rate then you would have to run a data fix from mysql.

Alternatively, Create a profile ONLY with Contribution \>\>\> Eligible for giftaid field

Then, go to Find contribution, search any with wrong amount and select "Update multiple contribution" from action menu. Execute the process and see if that helps. Thanks

---
Tags: gift-aid-extension
---


# Question
Title: Order of membership types on contribution page not correct
Does anyone have any ideas why the order of membership types wouldn't be correct on a contribution page? The order in the contribution page settings matches the order defined in Administration - Membership Types, but the display of the membership types is in a different order on the public facing page. I can make the order change by changing the order of membership types or unselecting some of the membership types on the contribution page, but not so that they are actually in the right order. I also note that trying to change the order in the membership types doesn't work right (sometimes membership types don't move at all, sometimes they move in unpredictable ways).

Any thoughts on why this might be? I cannot reproduce this on the demo site. 5.35 on Drupal 7, here is the contribution page. No default membership type set on the contribution page and we do have some old disabled membership types as well.

# Answer
> 4 votes
Turns out we had almost all of our membership types with order = 1. Using the up and down arrows didn't seem to fix this, but going through one by one multiple times and editing the order values for each membership type did eventually sort this out. You have to edit and save the contribution page to have the change in order show up.

---
Tags: civimember, contribution-page
---


# Question
Title: Can I set a premium for a $20 minimum on a recurring contribution, but $80 for a one-time contribution?
It seems like premiums only work on the minimum amount, without regard for other settings. Is there a way to get around this? I see the EFF has this option, but their contribution page seems not to be generated by CiviCRM anymore.

# Answer
> 3 votes
I just came across this question and we have solved a similar problem a few years ago, i.e. we want to count the total value of recurring contributions (e.g. a $10 recurring should count as much as a $120 one time).

What we do is to rewrite the function used for computing the premium amount. The javascript is in `templates/CRM/Contribute/Form/Contribution/PremiumBlock.tpl` (copied in a custom extension).

Simply adding the following to the function `get_amount` do the trick :

```
var isrecur = $('.is_recur_radio-section input:checked').val();
if (isrecur == 1) amount = amount * 12;

```

I suppose it's possible to add some more complex logic.

The fact that we need to update a core template file is not ideal for maintenance but it's a rather small change so it's easy to keep track of it and re-apply the change when we upgrade CiviCRM.

**EDIT** 2021-03-22

The solution above is not enough: there is validation in `CRM/Contribute/Form/Contribution/Main.php` that require adjustment.

---
Tags: contribution-page, premiums
---


# Question
Title: I have a list of contacts exported in an Excel. Now I want to adding the same activity to all of them
I've exported a list of approx 200 contacts from Civic, including contactname. I'd like to add in one go the same acticity (i.e. delivery of a brochure) to all of them, avoiding to add that activity manually one by one.

Is there a way to massively add the same activity to several contacts? Thanks in advance for your support

# Answer
Welcome to SE Emma:

Make sure that you have contact Id in the exported list. You need this to match accurately to the contact. You then add columns to the spreadsheet for your information for the activities. You probably want to export a trial activity to see what you need and make sure you include all the mandatory fields. You can copy the information to all the contacts. Save as a CSV file. The go to Contacts \>\> Import Activities and follow the wizard.

I strongly recommend some testing, either on a test site of with some dummy contacts that you can delete afterwards. You will need a bit of trial and error to understand the detail. Set the source field to something specific so that you can identify these activities afterwards in case of any problem.

https://docs.civicrm.org/user/en/latest/common-workflows/importing-data-into-civicrm/#import-activities in the documentation will help.
> 3 votes

---
Tags: contacts, activities
---


# Question
Title: Register new account via REST application
I'm trying to register a new user account to my CiviCRM site and also to create a contact in the CiviCRM system for him. I want to do that via the REST API call application that I'm writing in python. After some investigations, I saw that I need to send the request to Drupal system and not to The CiviCRM module.

Can anyone tell me how can I do that REST API call?

My CiviCRM is on Bitnami with AWS instance, with Drupal.

Thanks a lot

# Answer
Since that's straight drupal I would try the drupal docs and if you're still stuck you might get more responses at https://drupal.stackexchange.com.

Another thing you could try but I don't know if it will work is to use civi's api Profile.submit. If you have a profile at admin - customize - profiles which is configured for Drupal User Registration and allows creating users, you might be able to pass in the right parameters to include the account name/email to create the account.
> 0 votes

# Answer
This API doesn't exist in CiviCRM but if you want to stick with CiviCRM API (which is better if you want to keep it CMS agnostic), you could create a new CiviCRM API which is not too complex if you are a developer.

With civix installed, it would require to :

1. create an extension \`civix generate:module thenewextension
2. go in `thenewextension` and generate the api `civix generate:api MyEntity myaction`
3. a new file should be created in `api/v3/MyEntity/myaction.php`
4. in the php, call the CMS agnostic function `$ufID = CRM_Core_BAO_CMSUser::create($params, $mail);` and add the logic you want
5. activate the extension
6. you should be able to see your api and test it in \`https://www.mysite.com/civicrm/api

To call the API using REST, you need to call the url with the correct parameters (or more likely use a python library that will do much of the work for you) : `https://www.mysite.com/sites/all/mdoules/civicrm/extern/rest.php?entity=MyEntity&action=myaction&api_key=(myAPIkey)&key=(mySiteKey)&json={“first_name":"xxx","last_name":"yyy","username":"zzz"}`

* `myAPIkey` must be created on a contact with the api permission in the database -\> civicrm\_contact table (or use a handy extension https://civicrm.org/fr/extensions/api-key)
* `mySiteKey` is in civicrm.settings.php
* `json` contains the parameters of your api call
> 0 votes

---
Tags: api, civicrm-home, user, rest
---


# Question
Title: Why is WP displaying a shortcode to end users upon profile submission?
I have a profile form that logged-in users can fill in. When the form is submitted what should happen, as far as I'm aware, is the profile should get redisplayed along with a message to confirm to the user that their contact information has been submitted.

What is actually happening is that the user is shown the page with just the shortcode displayed - \[civicrm component=”profile” mode=”edit” gid=”28″\] - and no confirmation message.

The URL is https://example.com/application-form/?civiwp=CiviCRM&q=civicrm%2Fprofile%2Fview&reset=1&id=102&gid=28

Nothing in the browser console.

WP: 5.5.3, Civi: 5.31.1.

# Answer
In my experience with using profiles on Wordpress sites, where the profile is presented via a shortcode, is that when the form is submitted the user does not get presented with the default text statement alluded to in the help message about their contact information having been submitted, but is instead just presented with the page again. Worse than this, the profile isn't shown to the user, but they see the shortcode in all its ugly unhelpfulness.

The workaround that I've implemented is to ensure in the profile settings that a redirect URL is set, pointing to a nice thank-you page.
> 1 votes

---
Tags: wordpress, profile
---


# Question
Title: Upgrade fails with Row size too large error
Upgrading CiviCRM from 4.6.26 to 4.7.16 is failing at step `Upgrade DB to 4.7.beta6: SQL` with the following error:

> ALTER TABLE civicrm\_event ADD COLUMN max\_additional\_participants int(10) unsigned DEFAULT 0 COMMENT 'Maximum number of additional participants that can be registered on a single booking' AFTER is\_multiple\_registrations \[nativecode=1118 \** Row size too large (\> 8126). Changing some columns to TEXT or BLOB or using ROW\_FORMAT=DYNAMIC or ROW\_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.\]

Everything I can find says that this is a fairly fundamental MySQL restriction but I can't find any much trace of people hitting it with CiviCRM at all.

The MySQL server version is 5.5.54 which should be supported, and I have tried increasing the InnoDB log file size from 5Mb to 48Mb as some things say that will help but it made no difference.

# Answer
> 1 votes
Ok so the problem is Multi Lingual with CiviCRM adds a per language column to the tables where its needed. In the case of the civi\_event table this is one of the most troublesome as it has quite a lot of columns that are needed in the different languages.

What I've done to get round this in the past is clear out the relevant data from the fields i.e. create a copy of civi\_event as it stands, delete the data in the multilingual description and then try the upgrade again. This was in the earlier versions of MySQL where the rowsize wasn't really controllable.

More recent versions of MySQL have some config options to allow you to setup your MySQL a little differently, I haven't tried the file format options in this thread but we do run table per file regularly.

https://stackoverflow.com/questions/15585602/change-limit-for-mysql-row-size-too-large

Please do let us know how you get on, its a common problem for multi language CiviCRM installs.

# Answer
> 1 votes
I have this issue with an upgrade to 5.35.1 from 5.30.1. In my case, it was due to the fact that the site was originally installed with mariadb 10.1 and later upgraded to 10.2. My solution was to convert the row formats to dynamic as TomH does above.

Here's a little mysql to generate those convert statements:

```
SELECT GROUP_CONCAT(CONCAT('ALTER TABLE `', table_name, '` ROW_FORMAT=DYNAMIC') SEPARATOR ';') AS aquery FROM information_schema.tables where table_schema = 'yourdbname';

```

That will spit out a long statement that you can execute from the mysql command line to convert all your tables.

---
Tags: upgrade
---


# Question
Title: Update core from 5.33.2 to 5.35.1 generates errors when re-enable modules
Re-enabling non-core modules after update spawned hundreds of this error:

WD civicrm: hook\_civicrm\_alter\_drupal\_entity\_labels should be updated to \[warning\] pass an array of parameter names to CRM\_Utils\_Hook::invoke(). Array ( \[civi.tag\] =\> deprecated )

For these modules: civicrm\_contact\_match was enabled successfully. \[ok\] civicrm\_contact\_match defines the following permissions: modify uf match civicrm\_cron was enabled successfully. \[ok\] esoCiviMail was enabled successfully. \[ok\] webform\_civicrm was enabled successfully. \[ok\] civicrmtheme was enabled successfully. \[ok\] civicrm\_contact\_ref was enabled successfully. \[ok\] civicrm\_entity was enabled successfully. \[ok\] civicrm\_entity defines the following permissions: civicrm\_entity.rules.administer, administer CiviCRM Entity

# Answer
> 1 votes
> WD civicrm: hook\_civicrm\_alter\_drupal\_entity\_labels should be updated to \[warning\] pass an array of parameter names to CRM\_Utils\_Hook::invoke(). Array ( \[civi.tag\] =\> deprecated )

For this, i think you need to apply https://github.com/eileenmcnaughton/civicrm\_entity/pull/238 patch in civicrm\_entity module.

---
Tags: upgrade
---


title: Authorize.net E-checks?

text:
# Question
Title: Authorize.net E-checks?
I need to be able to add the ability to do e-checks via Authorize.net. But it appears the only extension that was available for this says it shouldn't be used because it messed with a core CiviCRM file. So how are people doing this?

Edit: The previous answer is not an option. That page is from 2016 and the information is apparently from back when there was an extension. Without an extension connecting CiviCRM and Authorize.net, the solution there won't work. It's just an Authorize.net reseller. They don't provide extensions and such. So we're still looking for a solution. Or an estimate as to the cost to get the old extension working so that we can crowd fund it?

# Answer
> 1 votes
The current Authnet extension supports e-checks and doesn't override core files, and hasn't since April 2019 (version 1.3).

# Answer
> 0 votes
This is not the answer you want - but should help you get the answer you want.

Powerbase via PtP apparently has a solution for echeck via Authorize.net with Dharma Merchant Services

They may have an answer for you.

---
Tags: payment-processor, authorize.net
---


# Question
Title: Insert file into greeting field with Smarty
When the content of the Email Greeting or the Postal Greeting field is getting too long, CiviCRM is no longer able to edit it through the GUI, what happened since I have activated Smarty and inserted large expressions.

I want to have a standard greeting that works for every gender, language and style.

This was working:

```
{capture assign=language}{contact.preferred_language}{/capture}{capture assign=prefix}{contact.individual_prefix}{/capture}{capture assign=style}{contact.communication_style}{/capture}
{if $style == 'Formal'} {if $language == 'fr_FR'}Cher{elseif $language == 'nl_NL'}Geachte{else}Dear{/if}  {$prefix|replace:'De heer':'heer'|replace:'De heren':'heren'|lower} {contact.last_name}{else}{if $language == 'fr_FR'}Bonjour{elseif $language == 'nl_NL'}Dag{else}Dear{/if} {contact.first_name}{/if}

```

but the expression is getting too long when I try to add a test about the gender. As a work around, I decided to put this expression inside a file to be included by Smarty with this expression:

```
{include file='/usr/share/drupal/sites/default/files/my-greeting.tpl'}

```

but this doesn't work: nothing is included. The file `/usr/share/drupal/sites/default/files/my-greeting.tpl` has the correct ownership and permissions.

I would like to understand what I am doing wrong, and if it is possible to use this approach without opening a hole in the security of the system.

# Answer
The length limit of the greetings syntax can be quite tricky, especially when using different languages with gender specific greetings.

Luckily there is the extension More Greetings that provides

* additional greeting fields
* no length limit for syntax
* more possibilities such as using API calls in the syntax
* a basic syntax checker
> 4 votes

# Answer
There's also the Salutations extension, which overlaps quite a bit with "More Greetings".

I have a significantly more feature-complete version of this extension in my Github, but because my version doesn't differentiate between addressee greetings and email/address greetings, it doesn't have a clean uninstall path. One day I'd like to resolve that and merge my changes in.
> 3 votes

# Answer
You should get an error about `Smarty error: (secure mode) accessing ... is not allowed`, although if you're using wordpress those messages just disappear unless you have php debugging turned on. But yes it won't let you use `{include}` that way.

What might work is to make a little smarty plugin, like the `functionXXX` ones in CRM/Core/Smarty/plugins, and then use that, e.g. function.myGreeting.php, and then use it like `{myGreeting lang=$language}`.
> 2 votes

---
Tags: civimail, smarty
---


# Question
Title: How do I change the Form Processor "Edit Action" Form?
I want to change a small thing in the graphical user interface which allows to change a form processor (/civicrm/admin/automation/formprocessor/...). Specifically, I want to change the form that appears when I create or edit an Action.

I want to add a field where users are able to write a default string. This string should be written inside a CiviCRM custom field, if there is no other value. So, this field should work similarly to the `Default Subject` field in the `Configuration` section.

The reason for this: I have an Input field of type `Option Group` that hands an array of products to the Actions. For each available product, I want to create an Action testing if the input array contains this product. If yes, a new Activity should be created, with the custom field `product type` filled with a default string (name of product).

Right now, this custom field is already part of the `Create Action` form, but it has a dropdown menue allowing me to auto-fill the field. But I don't want to choose anything from the dropdown menue (like Input fields, for example). Instead I want to be able to write some default string there.

I didn't find any similar question/thread, and poking around in the code at `/public/sites/default/files/civicrm/ext/form-processor/` doesn't seem to bring me further.

Also, I cannot use the `Retrieval of defaults` tab, because I do not want any Input field filled by default. The default value will only come into the game if the Condition of one Activity (that is, `Array contains...`) is fulfilled.

Where is this form created? Where can I change the field type of specific (custom) fields?

Any hint is appreciated :)

**Edit**: It would also solve the problem to have an array-type input field, and an `Explode List` Action that actually takes an array, and properly and accessibly outputs all of its values (e.g. via indices). I don't really understand why Formprocessor Extension has all different types of option groups, but no *simple* array, and none that actually works with `Explode List`.

# Answer
> 1 votes
I think you're looking for the "Other: Set Value" action. Add the condition on this field, and use that action's output to populate the custom field.

Form Processor works on objects, not strings, so it wouldn't work to have a string that isn't generated by another action or input.

---
Tags: forms, form-processor
---


title: How to setup civicrm to handle bounces?

text:
# Question
Title: How to setup civicrm to handle bounces?
A general question. How do you make bounces to work with civicrm?

Which extensions do you use, and by whom and how do you set up / handle the mail and also the bounces?

Kind regards.

# Answer
Here is the documentation to setup bounces in Civi.

Also there are various third party mail providers available that captures bounces and for most of them extension are available in CiviCRM to record bounces eg Mandril, Sparkpost, Mailchimp etc
> 1 votes

# Answer
Here's a quick recipe on how to set up bounce processing:

1. In your email setup, create an email address that is the 'catch-all' for returned emails. In cPanel this is called 'Default Address' and I call it bounces@xxxxx.yyy. Unrouted email is set to be sent to this address.
2. In Administer/CiviMail/Mail Accounts add this email address and set it for 'bounce processing'
3. In Administer/System Settings/Scheduled Jobs enable the job 'Fetch Bounces' to run (say) hourly.

Then test by sending a bulk email to a non existent email address and watch the job log for the 'Fetch Bounces' job. If it runs normally it should fetch the bounces - if not there will be an error message, usually because it can't open the mail box you set up in the first step.

Good luck.
> 1 votes

---
Tags: mailing, bounce, setup
---


# Question
Title: Why do my buttons keep becoming numbers?
After updates our Civi installation (which is within WordPress in case it matters) often switched all buttons to numbers instead of their labels.

I presume this might have something to do with translation or templating? It tends to go away when I do all the usual post-upgrade things like clearing caches etc, but no amount of fiddling is fixing them this time.

Can anyone suggest what could be related? What can I try? What might cause this?

It's happening to all Civi buttons on the frontend and the backend, but not any non-Civi buttons.

# Answer
I upgraded from 5.28 last night and ran into this same problem. I had an old version of haystack theme installed which was causing the problem (disabling the theme would bring the labels back).

You'll want to disable and uninstall haystack, delete the directory from your wp/uploads/civicrm/ext/ directory and then install the updated theme from here: https://lab.civicrm.org/extensions/haystacktheme

That fixed it for me.
> 2 votes

---
Tags: templates, upgrade
---


# Question
Title: How do I get Views working with CiviCRM and Backdrop?
I followed the instructions for getting Views working with Drupal but it's not working in Backdrop. I see:

```
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_name.civicrm_contact' doesn't exist

```

# Answer
> 4 votes
Getting Views working with Backdrop is essentially the same as getting Views working with Drupal, although there can be one extra step. So first, follow these instructions to get CiviCRM's tables into Views.

Regarding the possible second step, Backdrop by default uses a simplified structure to specify database credentials (more). This will not cause a problem if you are using the same database for CiviCRM and Backdrop and you do not have a second step.

If, however, you have CiviCRM in a separate database, you need to adjust your Backdrop settings.php in one additional way, changing the default/simplified database string...

```
$database = 'mysql://user:pass@localhost/database_name';

```

...to allow multiple databases:

```
$databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'database_name',
  'username' => 'user',
  'password' => 'pass',
  'host' => 'localhost',
);

```

@colemanw's note from the Drupal answer applies here, too: "if your \[Backdrop\] sql user and CiviCRM sql user are different then you need to grant SELECT privileges to the \[Backdrop\] one for the CiviCRM db."

# Answer
> 3 votes
I can't comment on the other answer (I don't have enough reputation), but here are some additional information suggestions:

https://forum.backdropcms.org/forum/backdropcms-views-and-civicrm-integration

I got it working with these two changes:

1. We made this change:

```
OLD:    $database_prefix = array(
NEW:    $databases['default']['default']['prefix']= array(

```
2. We removed the backticks on all the table items we had pasted into the settings.php file:

```
OLD:    'civicrm_view_case_activity_recent'        => '`tcog2_civicrm`.',
NEW:    'civicrm_view_case_activity_recent'        => 'tcog2_civicrm.',

```

---
Tags: drupal-views, backdrop
---


title: Online registration error

text:
# Question
Title: Online registration error
Trying to set up online registration. All events get the following error message: "Error Online registration is not currently available for this event (contact the site administrator for assistance)."

CiviCRM 5.33.2 on Drupal 7

# Answer
> 1 votes
As said by @demerit you will need to enable online registration for the event. You see the option for turning on online registration under 'Online registration' tab of event.

---
Tags: civievent, error, online-registration, drupal-7
---


# Question
Title: Why are my Actions drop downs not working post civicrm security update?
After the CiviCRM security updates - some of our D8 sites are throwing blanks when selecting an Action -\> on e.g. the Search -\> Contacts Results screen.

Select Contacts -\> Select Action -\> Nothing happens

# Answer
Another clue: the CiviCRM -\> Status page `/civicrm/a#/status` was completely blank

This helped \[it's a cache clear of sorts\]

`Administer -> System Settings -> Asset Caching -> Disable`

brought both Actions as well as the Status page back. Then was able to toggle it back to -\> `Auto`

For one project I also had to re-run `composer civicrm:publish` (some bower assets - only some - most were there) - were just not there post upgrade.

Most sites upgraded just fine. Not sure what was/is different about the three sites I ran into this issue with. I wonder if it's redis... \[I usually blame caching \]
> 2 votes

---
Tags: angular
---


# Question
Title: CiviCRM on Backdrop - Oops incorrect Drupal version
Oracle VM

Linux Mint 20.1 Ulyssa

LAMP through Mint

Backdrop v1.18.1

CiviCRM 5.35.1 for Backdrop

I go to http://localhost and get Backdrop just fine.

I go to http://localhost/modules/civicrm/install/index.php and get "Oops! Incorrect CiviCRM version ... can only be used for Drupal version of CiviCRM".

I downloaded CiviCRM 5.35.1 for Backdrop three times, extracted, placed folder into modules and get that same message.

Clearly it is installed correctly or I wouldn't be getting that message. Perhaps the Backdropcms version and the CiviCRM version are not compatible?

/module/civicrm/README.md says it is good for Drupal, Wordpress and Joomla. but /module/civicrm/install/index.php line 67 says acceptable are "drupal, wordpress, backdrop"

Any help would be appreciated. Thanks in advance.

John in Medford, Oregon

# Answer
> 2 votes
Giving credit to Laryn, but not sure how to do that other than this.

Key point: http://localhost/modules/civicrm/install/index.php?civicrm\_install\_type=backdrop – Laryn - CEDC.org 22 hours ago

---
Tags: backdrop
---


# Question
Title: How to solve [error_message] => Entity declaration references invalid or inactive module name
I get this `[error_message] => Entity declaration references invalid or inactive module name [name_of_extension]`

When trying to run: `cv ext:upgrade-db`

It's an extension I don't recognize - but yeah it does not exist for this site.

It's not in `civicrm_extension` \- it's not not in `civicrm_managed`. Where do I need to look to find this and strip it?

# Answer
Ok - I went the long way around -\> used civix to generate an extension of that name -\> then pulled it into the site's extensions dir -\> and installed it.

Now I can run `cv ext:upgrade-db` and execute much needed extension updates
> 1 votes

---
Tags: extension
---


# Question
Title: Does Drupal 7 "CiviCRM Entity" online event registration generate confirmation email?
I just started using CiviCRM Entity to embed event registration forms in my Drupal 7 web pages. The event registration works, but people who register through this mechanism do not receive registration confirmation emails. If I use the standard CiviCRM full-screen event registration form, then I do get a confirmation email.

Does the Drupal 7 CiviCRM Entity module online event registration support sending confirmation emails?

Thank you.

# Answer
Assuming you used the Price Set Entity field to get the registration form.

The confirmation email was never fleshed out totally.

There are also 2 Rules Events you can react to: "Event Registration" and "Successful CC Transaction" Which then you could use Drupal's stock "Send email" action ...

We do have a Rules action, "Send Contribution API sendconfirmation" .. which does what it says .. for the contribution created, it runs the Contribution API entity, "sendconfirmation" action .. Which is ok unless there is no contribution.

We'd also done some things where we implement hook\_form\_alter() and add a submit handler ..and programmatically send an email on form submission.
> 1 votes

---
Tags: civicrm-entity, online-registration, drupal-7
---


# Question
Title: After upgrade, System Status page is empty, but issues display in popup
I've just upgraded from 4.4 to 4.7.20. Everything seems to be working as expected, except that the "System Status" page is empty. Just blank where there should be the "CiviCRM System Status" widget. However, I know there are some issues because the footer displays "System Status: Error", and when I log in I see a CivicRM system popup messages listing the issues I need to fix.

When I try to load the System Status page, there are no errors in the CiviCRM logs or in the Joomla/PHP logs. The Firebug console gives a warning "Empty string passed to getElementById()." and references \[docroot\]/media/jui/js/jquery.min.js

Seems to be similar to this problem

System Status page empty and status remains 'critical' after updating from 4.7.8 to 4.7.11 on Drupal 6

though I am on Joomla not Drupal. And there doesn't seem to be a resolution in that post.

I also found this post (Status Error and blank status page) but I checked and all my permissions seem to be correct.

Ideas?

# Answer
> 4 votes
Well, I'm not sure this is a long-term solution, but it is a workaround....

In one of the Angular posts (Status page angular load error) I found this:

> another work-around should be going to "Administer =\> System Settings =\> Debugging" and disabling the "Asset Cache"

That's brought my System Status page back, but I don't like the thought of not using a performance enhancement.

# Answer
> 3 votes
There have been many answers relating to this type of 'blank' page and most have been solved by ensuring the various paths set in Resources and Directories are correct.

Many questions on this have been tagged with angular so hopefully you will find the ones i am thinking of in the list at https://civicrm.stackexchange.com/questions/tagged/angular

# Answer
> 1 votes
I'm getting the same error after upgrading to 4.7.25 from 4.7.16 on my WordPress installation. The disabling the Asset Cache workaround fixes it. I guess, for now, I'll just have to disable it whenever I need to check the system status.

# Answer
> 0 votes
Hit this problem on a d8 site.

errors in console eg

Uncaught TypeError: b.module(...).info is not a function Refused to apply style from ... json formatter Uncaught Error: \[$injector:modulerr

and

DevTools failed to load SourceMap: Could not load content for /libraries/civicrm/core/bower\_components/angular/angular.min.js.map: HTTP error: status code 404, net::ERR\_HTTP\_RESPONSE\_CODE\_FAILURE

Solution was: composer civicrm:publish (plus drush cr and civi caches too)

Apparently also covered in Why are my Actions drop downs not working post civicrm security update?

---
Tags: upgrade, error-page, status
---


# Question
Title: Is there a way to pass additional information (e.g. Description) to the PayPal payment-processor?
We are using PayPal as our payment processor and Xero for our accounting. When reconciling the PayPal items generated from CiviCRM we noticed a field called "Description" that is usually empty. Is there any way of passing information to that PayPal field from a CiviContribute form? It would be monumentally helpful when reconcilling if we could pass simple descriptions like "Dues" or "Building Fund" to PayPal that we could then see in Xero (and use reconcilliation rules with). Thanks.

# Answer
> 1 votes
Civi does send description to paypal. You can alter them by implementing hook\_civicrm\_alterPaymentProcessorParams() hook

---
Tags: payment-processor, paypal
---


# Question
Title: Export of custom multiple choice options to CSV files limited to 32 characters
A user is trying to export data from an advanced query on custom fields to a CSV file using the "Export contacts" action. This fails with a backtrace which is attached below. The error message is:

```
#6 /var/www/libertarian/vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-1, NULL, NULL, "\nINSERT INTO civicrm_tmp_d_export_1d387c75256673080ad64346b3c095c7 (`id`, `l...", "1406 ** Data too long for column 'custom_49' at row 13")

```

The `custom_49` field referred to in the error is a select list with a set of multiple choice options, some of which are up to 55 characters long.

The bug is that the temporary table that is being constructed to service the export to CSV is constructing the column as VARCHAR(32) while the text value of the multiple choice options in civicrm\_option\_value is a VARCHAR(512)

### Details

If I select the schema of the table `civicrm_tmp_d_export_1d387c75256673080ad64346b3c095c7` it reports the table structure as:

```
CREATE TABLE `civicrm_tmp_d_export_c3a74c8fb66b720f55e2661dab58716b` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `last_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `first_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `nick_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  `street_address` varchar(96) COLLATE utf8_unicode_ci DEFAULT NULL,
  `city` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(254) COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sort_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  `custom_61` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `custom_50` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `custom_51` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  `custom_68` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `custom_58` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `custom_49` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_street_address` (`street_address`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

```

Indeed it is trying to insert the text value of an option into a temporary table and several of those text options are over 32 characters in length.

```
SELECT label,CHAR_LENGTH(label) as length FROM civicrm.civicrm_option_value WHERE (option_group_id=103) AND (CHAR_LENGTH(label) > 32)

```

returns

```
| label                                                   | length |
|---------------------------------------------------------|--------|
| 003 - Aurora–Oak Ridges–Richmond Hill                   | 37     |
| 005 - Barrie–Springwater–Oro-Medonte                    | 36     |
| 035 - Haliburton–Kawartha Lakes–Brock                   | 37     |
| 039 - Hamilton West–Ancaster–Dundas                     | 35     |
| 040 - Hastings–Lennox and Addington                     | 35     |
| 052 - Leeds–Grenville–Thousand Islands and Rideau Lakes | 55     |
| 061 - Mississauga East–Cooksville                       | 33     |
| 073 - Northumberland–Peterborough South                 | 39     |
| 102 - Stormont–Dundas–South Glengarry                   | 37     |

```

# Answer
> 0 votes
Ahh it's a field of type number, which means it's getting set here: https://github.com/civicrm/civicrm-core/blob/77c3b7089c290880a7599cc77cdbe87fa6958c13/CRM/Export/BAO/ExportProcessor.php#L1498.

So yes if it's an option list then there's a mismatch. You could work around it by defining the field as type string instead and still use numbers as the values. But yes in general it seems like a bug - you could file a ticket at https://lab.civicrm.org/groups/dev/-/issues

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


# Question
Title: Can I create a dynamic graduate student dashboard with CiviCRM?
I just recently heard of CiviCRM. My organization provides graduate students with scholarships for tuition, upkeep, etc. We want to create a platform where a graduate student can create an account and request money to be released for let's say payment of tuition. The request should generate a pdf and after approval update their dashboard with the new amount available to the student. Is this something that can be done with CiviCRM on Wordpress? We're currently using Ultimate member plugin and elementor pro to design the dashboard, with custom fields displaying user data on the dashboard.

# Answer
> 1 votes
See if civigrant suits your needs: https://docs.civicrm.org/user/en/latest/grants/what-is-civigrant/

---
Tags: wordpress, registration, user-dashboard
---


# Question
Title: CiviCRM core now includes Flexmailer: how to remove old flexmailer extension?
I have Flexmailer 1.1.1 installed as a "non-core" extension , but since upgrading to 5.35.1 Flexmailer 1.1.2 is included with core. (This probably came in before 5.35.)

The extensions page shows 1.1.1, implying the newer core version is not in use.

* I thought that if I removed the non-core extension dir Civi would have a hunt around and find the core version, but when I removed that dir, CiviCRM crashed complaining that it can't find it.
* I thought that if I disabled the extension then it might find the new one, but disabling flexmailer requires disabling mosaico, too, since it's a dependency. And disabling that would also require disabling mosaicomsgtpl too. I'm a bit worried that disabling extensions might lose some configuration values along the way, which I might not notice until it's too late?!
* I thought that I could symlink from the old location to the new core location, but again this causes a crash:

```
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Civi\FlexMailer\Services' not found

```
* I thought I remembered that the filepath to an extension was in the db somewhere, but I searched and only found a reference to it in `civicrm_extension` \- that table does not seem to have filepaths in it.

# Answer
Here's how we handled this:

From within your extensions directory:

```
cv dis mosaicomsgtpl mosaico flexmailer
rm -rf org.civicrm.flexmailer
cv flush
cv en flexmailer mosaico mosaicomsgtpl
cv ext:up

```

We've found that Mosaico didn't release it's grip on Flexmailer services properly and interfered with the process of getting it to use the core-ext version!

Since adding this to our upgrade step we haven't had any further issues.

As pointed out by Pete from Fuzion you might not have `mosaicomsgtpl` installed. In that case your steps would look like this:

```
cv dis mosaico flexmailer
rm -rf org.civicrm.flexmailer
cv flush
cv en flexmailer mosaico
cv ext:up

```
> 7 votes

# Answer
Here's how I did it: *Delete the cache files*

From within the site's extensions dir:

```
EXT_DIR=/var/www/mysite.org/sites/default/files/civicrm/ext/
CONFIG_AND_LOG_DIR=/var/www/mysite.org/sites/default/files/civicrm/ConfigAndLog
BACKUP_DIR=~/just-in-case

mkdir -p "$BACKUP_DIR"
mv org.civicrm.flexmailer $BACKUP_DIR/.
cd $CONFIG_AND_LOG_DIR
rm Cache* # Remove cached container/ExtLoader files.
cv flush # runs cleanly
cv ext:upgrade-db

```
> 3 votes

---
Tags: extension, upgrade, flexmailer
---


title: Fiscal Year/Summary Field Issue

text:
# Question
Title: Fiscal Year/Summary Field Issue
I have set the fiscal year under administer-\>Localization-\>Date Formats. However, when looking at Summary Fields, it continues to calculate only calendar year contributions for the Total Contributions this Fiscal Year category. How do I correct?

# Answer
Summary fields creates a collection of custom fields that it populates. It populates them when you first set the extension up, and then it also updates them as new contributions are stored.

I suspect that it doesn't recalculate all the fields when you update your fiscal year, you probably need to ask it explicitly to do that, eg. by resaving the configuration of the extension.
> 1 votes

---
Tags: contributions, summaryfields
---


# Question
Title: Case reports only work properly for originating user - bug or as designed (or both)?
A user has reported that doing an 'Export to CSV' from a case report works OK when she does it, but doesn't work for a user 'B' - even though user 'B' has the correct access (we're using ACLs). Masquerading as user 'B' not only does export to CSV not work, but user 'B' doesn't get access to the report criteria. This is on 5.28.3 but I have a test system at 5.35.1. and it's the same. Other non-case reports work as expected for user 'B'
If I create a case report when masquerading as user 'B' then the report works OK and export to CSV works too. If I then masquerade as user 'C' and access the report that user 'B' created I don't get the report filter and cannot export to CSV.
I can't reproduce this when not using ACLs and also not on the demo site as it's not possible to add users. Is this a known limitation of case reports or a bug? Or am I missing something else? I'm surprised there's no discussion on here about this.

# Answer
As per comments it sounds like the report is set to Add To My Reports on the access tab (making it private to the owner).
> 1 votes

---
Tags: civireport, civicase
---


title: Using Mandrill for mass mailings

text:
# Question
Title: Using Mandrill for mass mailings
Do somebody know if i can use Mandrill as mass mailing, or is there somebody who use Mandrill for mass mailings?

Are there other providers that are compatible with civicrm, for mass mailings?

Kind regards.

# Answer
Yes, you definitely can connect CiviCRM to Mandrill for email delivery, including mass emails. Theres also Sparkpost etc. We did a video on the subject if you're interested. https://youtu.be/lQvl4i86Z6Q
> 4 votes

# Answer
I'm using Amazon SES with all my CiviCRM accounts now. (I used Mandrill ages ago before monthly fees made it impossible. The I used sendgrid until that kept getting blocked emails due to shared IP addresses.) Amazon AWS is not the easiest to setup, and I have never figured out log reports, but it's super fast and reliable. You must request to get out of the sandbox after setup, and can only send from addresses in authorized domains. Use this extension: https://github.com/mecachisenros/aws
> 1 votes

# Answer
You can also find your own SMTP gateway (to send emails with great deliverability) and use Mosaico or traditional mailing within CiviCRM. We use Alinto, a French provider with a reactive customer service and cheap prices.
> 1 votes

---
Tags: mailing, mandrill
---


# Question
Title: Can't send individual emails from contact record
When trying to send an email from an individuals Contact Record I am getting a pop-up with the following error listed.

I can send bulk emails to a test group and when I test the outbound email settings the system is sending me an email saying the settings are correct. I have searched for an answer to this issue but can't find anything related to the error message.

Any assistance would be appreciated

# Answer
Take a look at https://lab.civicrm.org/dev/core/-/issues/2220 \- we never figured out why on some sites it doesn't load the defaults. But you can manually set it with e.g.

`cv ev "Civi::settings()->set('simple_mail_limit', 50);"`
> 4 votes

# Answer
Thanks this helped a lot! I exchanged this line in EmailTrait.php on line 361. Best, Michael
> 0 votes

---
Tags: wordpress, civimail
---


# Question
Title: How to add a new "From" email address in civi mailing - cannot find function following the update
I used to be able to add new "from" email addresses for civi mailing, but I cannot find the location anymore.

# Answer
Welcome to CiviCRM SE. I don't think it has moved. It is under Administer \>\> CiviMail \>\> From Email Addresses.
> 2 votes

---
Tags: civimail
---