# Question
Title: How to show help_text on buildQuickForm elements
I'm using buildQuickForm in an extension to allow editing of some custom settings. It's working well, but when I created the custom settings there was a field called, "help\_text". I can't seem to figure out how to display the "help\_text" in the form elements.

I create the settings in a page called givingstatements.setting.php and this is the code from that page

/\* * https://github.com/artfulrobot/uk.artfulrobot.civicrm.autogroup/blob/master/settings/autogroup.setting.php \*/ return array(

```
/*
 * When to show legal statement on giving statements
 */
'givingstatements_show_legal_statement' => array(
    'title' => 'Always show legal statement on giving statements',
    'group_name' => 'givingstatements_show_legal_statement',
    'group' => 'CiviCRM Preferences',
    'name' => 'givingstatements_show_legal_statement',
    'type' => 'String',
    'default' => '0',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => 'Always show legal statement on giving statements.',
    'help_text' => 'If no, legal statement will only appear on statements that are 1 full year',
    'quick_form_type' => 'YesNo', // Without this it will not appear on the settings form.
    //'quick_form_type' => 'Element', // Without this it will not appear on the settings form.
    'html_type' => 'radio',
),

/*
 * Default option for combining giving statements for spouses
 */
'givingstatements_combine_spouse_default' => array(
    'title' => 'Combine giving statements for spouses by default',
    'group_name' => 'givingstatements_combine_spouse_default',
    'group' => 'CiviCRM Preferences',
    'name' => 'givingstatements_combine_spouse_default',
    'type' => 'String',
    'default' => '0',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => 'Combine giving statements for spouses by default.',
    'help_text' => 'User preferences will override this option.',
    'quick_form_type' => 'YesNo', // Without this it will not appear on the settings form.
    //'quick_form_type' => 'Element', // Without this it will not appear on the settings form.
    'html_type' => 'radio',
),

/*
 * Allow individuals without civicontribute access to enter custom date ranges
 */
'givingstatements_custom_date_range_allowed' => array(
    'title' => 'Allow individuals without civicontribute access to enter custom date ranges',
    'group_name' => 'givingstatements_custom_date_range_allowed',
    'group' => 'CiviCRM Preferences',
    'name' => 'givingstatements_custom_date_range_allowed',
    'type' => 'String',
    'default' => '0',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => 'Allow individuals without civicontribute access to enter custom date ranges.',
    'help_text' => 'If set to no, individuals will only be able to select full years.',
    'quick_form_type' => 'YesNo', // Without this it will not appear on the settings form.
    //'quick_form_type' => 'Element', // Without this it will not appear on the settings form.
    'html_type' => 'radio',
),
);

```

My page that creates the form is called Settings.php and the code on that page is this

My tpl page has this code

```
  {foreach from=$elementNames item=elementName}
<div class="crm-section">
  <div class="label">{$form.$elementName.label}</div>
  <div class="content">{$form.$elementName.html}</div>
  <div class="help">({$form.$elementName.help_text})</div>
  <div class="clear"></div>
</div>
{/foreach}

```

But $form.$elementName.help\_text is empty If I do {$form.$elementName|@debug\_print\_var} I get the array and it doesn't contain help\_text, or the contents of help\_text under a different key. It outputs

(Array (11) name =\> "givingstatements\_show\_legal\_statement" value =\> "1" type =\> "group" frozen =\> false required =\> true error =\> null label =\> " Always show legal statement ..." separator =\> null html =\> " Array (9) name =\> "givingstatements\_show\_legal\_statement" value =\> "1" type =\> "radio" frozen =\> false required =\> false error =\> null id =\> "CIVICRM\_QFID\_1\_givingstatements\_show\_..." label =\> " " Array (9) name =\> "givingstatements\_show\_legal\_statement" value =\> "0" type =\> "radio" frozen =\> false required =\> false error =\> null id =\> "CIVICRM\_QFID\_0\_givingstatements\_show\_..." label =\> " "

If I go to the CiviCRM api page I can return the help\_text there so I know it's storing it.

# Answer
I don't know if this is the best answer but many of the core settings tpl's have the help text directly in the tpl, e.g. `<span class="description">{ts}Here is the help text{/ts}</span>`. Unless you want your users to be able to edit the help text, that seems like a good enough solution here(?), since your tpl is your own custom file to begin with.

EDIT: An alternative: (Haven't tested this, just as a sketch of proof of concept.)

In buildQuickForm in your loop add a line like this:

`$help_texts[$key] = $result['values'][$key]['help_text'];`

Then after the loop add a line:

`$this->assign('help_texts', $help_texts);`

Then in the tpl inside the loop:

`<div class="help">({$help_texts.$elementName})</div>`
> 2 votes

---
Tags: extension
---


# Question
Title: Is it possible to show CiviMails within our Drupal CMS system?
When CiviMail gives a permanent link to a public mailing it simply creates a raw html page for the email. Eg, on a link like this: civicrm/mailing/view?id=1528, we see the mailing exactly as it was sent out, and the html code of this page is exactly what was sent out in the mailing.

Thus the public view of the email is outside of our CMS, and doesn't benefit from our website's navigation menus, branding or any of the features our CMS provides.

We're using Civi 5.13 and Drupal 7.68... and it would be great if it were possible to put the public view of the mailings inside of Drupal's page construction, rather than outside it.

I can see how this would be possible using Views... but is there a more obvious way that I'm somehow missing?

Thanks for your help.

# Answer
> 1 votes
As you say in the question, you can build a View based on the CiviCRM Mailings tables so eg Body - HTML etc.

Alternatively you could build your mailing body in Drupal, then use a View based on that to drop a 'views token' in to your mailing.

---
Tags: drupal, civimail
---


# Question
Title: Invoices are sent from the host domain instead of the proper From Address
A constituent pointed out that she received an emailed invoice from "\[4-digit-number\]@\[host-domain\]" rather than from our normal organization email address. (We use CiviHosting's shared server.)

I haven't made any changes to the Civi settings, and upon checking, the default From Email Address is set to "office@\[our-domain\]" as expected and the mailer is set to "mail()".

Other emails are sent as expected:

* individual emails
* bulk email
* automatic receipts for online contributions
* automatic registration confirmations for events

I have discovered that when a back-end user triggers "Send Invoice" for a contribution, if one of that user's email addresses is chosen as From Address to use, it is ignored and the host-server address is used. If, however, one of the CiviMail-configured From Addresses is used, it is sent properly.

I just became aware of this last week, and I have a copy of an invoice sent a few weeks before that with the correct From address, so something happened within that window of time to cause a change.

civi 5.9.0, joomla 3.9.5

# Answer
> 2 votes
I think this might be the same type of problem as in Confirmation receipt sent from strange sender address, just maybe a different set of code.

---
Tags: civimail
---


# Question
Title: Token information not pulling through to Mailing Template
Really hoping you can help with this.

We had a security update on Civi yesterday which appears to have caused an issue with how one of our tokens is pulling through to a mailing template.

We used a token of {membership.start\_date} which pulls through a groups membership start date onto the mailing template. The dae itself is held at the following location:

Unfortunately I was not at this company when this was setup so I am unsure how the link between the token and the membership start date has setup and why it has suddenly broken down.

If you could please provide some advise or point me at which settings to look at it would be really great.

Thank you all, Terry

.......................

Update - Error being received below when trying to install the "Fuzion Tokens" extention.

..............................

Further to the above it appears that the tokens are pulled via the Scheduled reminder templates, E.g:

{membership.end\_date} {membership.start\_date} {membership.join\_date}

However when testing these via scheduled reminders and mailing templates the fields are all not pulling through from the membership details now. I have looked though out modules on Drupal and and their is a tokens module present, however I am unsure how to access the details of this / the GUI to view or edit any tokens that have been created for example.

All other tokens continue to work, such as contact tokens, presume that these are Core Civi tokens however.

Really starting to pull my hair out with this now as to why all of a sudden just the membership tokens have stopped working.

Any help would be greatly appreciated.

# Answer
> 0 votes
Basically: Such a token is not available in CiviCRM core, so most probably it was added with an extension. So you might check your extensions, whether there exists something that sounds like %token%.

How old was your installation? If it were very old, the extension might have been written as a drupal module, and maybe something broke with that.

As a solution: You might install the extension "Fuzion Tokens", which includes lots of very helpful tokens, especially the token {latestcurrentmembership.start\_date}. (this "latest current" deals with the case, that technically a contact might have several memberships, and CiviCRM wouldn't know which one to use).

# Answer
> 2 votes
{membership.start\_date} was never supported in token list for sending mailings unless you have any custom extension or module that generates one.

{membership.start\_date} token is supported only in Schedule reminders(for memberships) or printing letters for membership.(i believe). The schedule reminder screen allows you to save the template so that it can be used in future. If you using the same message template to send mailings then the tokens other than contacts won't get replaced unless you have custom code that deals with such tokens.

Civitokens extension does allow some additional token like latest current membership which can be used in mailings however you will need to replace the existing token with the new ones.

The error message you posted seems like your server doesn't have permission for apache user to download/extract the extension from UI. Alternate way is to download the extension and extract into extension directory and install it manually.

HTH

Pradeep

---
Tags: tokens, mailing, templates
---


# Question
Title: How can i override Civicrm /CRM/Utils Files?
Override Civicrm Utils file /sites/all/modules/civicrm/CRM/Utils/ReCAPTCHA.php to /custom\_code/CRM/Utils/ReCAPTCHA.php . it is not working. I have cleared the drupal cache and also cleared /civicrm/admin/setting/updateConfigBackend?reset=1 cache. What thing is missing please guide me how can override civicrm files?

# Answer
> 1 votes
First of all, you should really customize CiviCRM by developing extensions. There is a developer guide that will explain you how this is done: https://docs.civicrm.org/dev/en/latest/

If you do want to override anyway, you should first of all navigate to Administer\>System Settings\>Directories to provide the path to the PHP files, have you done this? If you have it should work but I would still recommend to take the extensions route as this is by far the most used and supported route.

---
Tags: drupal, recaptcha
---


# Question
Title: Is unicode not supported in clickatell SMS extension?
I have CiviCRM 5.13 on Drupal7 with the clickatell v4.1 extension for SMS. Clickatell integration works, I can send test SMS via HTTPS from the browser to test phones. Database and environment is set to UTF-8.

However, if a mass SMS is compiled in https://example.com/civicrm/sms/send?reset=1, or a direct SMS is sent, the non-English characters, like é,á,... are lost or transformed in the SMS body. If the same text is sent over HTTPS/curl directly to Clickatell, there is no such issue.

Is it a CiviCRM issue, or a misconfiguration on my side? How can I track it down?

# Answer
> 4 votes
I suspect the unicode issue arises from the clickatell extension. It uses the `utf8_decode()` function to decode the message text from a UTF-8 string to ISO-8859-1 before posting to Clickatell. Hence Clickatell manages UTF-8 messages, the use of `utf8_decode()` is not necessary, and removing it resolves my issue above.

Replace original code:

```
$postDataArray['text'] = utf8_decode(substr($message, 0, 460)); // max of 460 characters, is probably not multi-lingual
$postDataArray['content'] = utf8_decode(substr($message, 0, 460)); // max of 460 characters, is probably not multi-lingual

```

to this one:

```
$postDataArray['text'] = substr($message, 0, 460); // max of 460 characters, is probably not multi-lingual
$postDataArray['content'] = substr($message, 0, 460); // max of 460 characters, is probably not multi-lingual

```

I'll provide a patch to Clickatell extensions, if this solution gets confirmed by the community.

---
Tags: sms, civisms, clickatell
---


title: Quickform Types Definitions or Examples

text:
# Question
Title: Quickform Types Definitions or Examples
I'm building my first extension with a basic Quickform. I'm trying to figure out the options I have for different field types, but I'm not seeing where the documentation is on definitions of types, especially the extended types. For example, the Developer Docs talk about deprecated types for dates, and they mention using datepicker, but where would I find all the options I have available to me for the datepicker type? In this case, I'd like to have a datepicker without the time part, or set the minimum date. But same goes for other types as well, I'm not seeing the documentation or examples. Where can I get more details on each extended type and/or examples of use?

# Answer
> 1 votes
For most uses of `CRM_Core_Form->add()`, all the arguments you need are in the docblock:

```
  /**
   * Simple easy to use wrapper around addElement.
   *
   * Deal with simple validation rules.
   *
   * @param string $type
   * @param string $name
   * @param string $label
   * @param string|array $attributes (options for select elements)
   * @param bool $required
   * @param array $extra
   *   (attributes for select elements).
   *   For datepicker elements this is consistent with the data
   *   from CRM_Utils_Date::getDatePickerExtra
   *
   * @return HTML_QuickForm_Element
   *   Could be an error object
   */

```

Datepicker is a special case, and is documented separately. I found this by searching `CRM_Core_Form` for "datepicker" and found a reference to this as a comment.

As some unasked for commentary - if you can find any way to NOT use Quickform, I highly recommend it. It's pretty much every Civi dev's least favorite part of Civi, and there's an active effort to replace it. Consider using AJAX/API wherever possible to make your life easier!

# Answer
> 3 votes
I usually find more detailed examples by looking in the CiviCRM code, which is exactly where I found the answer to the " i do not want time" question a while ago :-) As I found it I can share it with you:

```
$this->add('datepicker', 'activity_compare_date', ts('Comparison Date'), array('placeholder' => ts('Compare with')),FALSE, array('time' => FALSE));

```

And yes,it would be ideal if all these examples would be in the developer guide. So I would like to invite you to the next CiviCRM sprint to make this happen :-)

---
Tags: quickform
---


title: Paypal Sandbox - Internal Service Error

text:
# Question
Title: Paypal Sandbox - Internal Service Error
I'm trying to hook up Paypal payments using Paypal Pro.

I'm trying to use the sandbox ( although we have a valid Pro account for live payments ) and I keep getting the 'Internal Service Error' this happens when using the form and also the checkout button.

I've validated the endpoints are correct ( if not it returns another error ) but it seems as if it's a problem with the account itself?

Can anybody point me in the right direction with this? Has anybody set this up themselves?

# Answer
> 1 votes
Website payments pro wasn't active on the account and thus always returned the above error.

---
Tags: paypal, payment
---


# Question
Title: CiviCRM Status/Connection Show 404 Not Found
Site running on PHP 7.2.18, FPM applicated server by nginx.

I have been having an issue with my Status & Connections page loading, i can't seem to figure it out.

My Error Logs show the following:

2019/05/21 11:11:11 \[error\] 16655#0: \*8187 "/var/www/vhosts/test.co.uk/httpdocs/civicrm/a/index.html" is not found (2: No such file or directory), client: 69.323.48.14, server: test.co.uk, request: "GET /civicrm/a/ HTTP/2.0", host: "test.co.uk", referrer: "https://test.co.uk/civicrm/admin/extensions?reset=1"

All the other pages load correctly what i don't understand is why its looking for a index.html?

Thanks,

# Answer
> 3 votes
The issue was due to the fact i was using FPM applicated server by nginx instead of FPM applicated server by Apache.

I am not sure how to find a work around using NGINX but it is working now, thank you to everyone whos tried to help!

Thanks

---
Tags: error, admin
---


# Question
Title: How to create an event with relationship to participant?
We would like to run kids club every month. During Registration we use main participant profile as Child's details. But we also need to have contact details of parents in case of emergency.

I was thinking to create a custom data/profile with relationship but I was not able to find any option to do that.

What is the best way to capture the details of parent so a report can be easily retrieved with child & parent details?

Thanks

# Answer
> 3 votes
You can do this using webform for drupal or caldera for wordpress. The CiviCRM webform/caldera provides ability to add multiple contacts and relationship (and also events) on a single form.

# Answer
> 0 votes
Simplest thing to do would be to have a custom data set on the childs record.

Parent/ next of kin name, phone, email etc

Event profiles won't really let you add a related contact

---
Tags: civievent, relationships, online-registration
---


title: CiviCRM Database Upgrade White Screen

text:
# Question
Title: CiviCRM Database Upgrade White Screen
I have followed the instructions located on the CiviCRM Website to a fault.

https://docs.civicrm.org/sysadmin/en/latest/upgrade/drupal7/

The files are a fresh install and the Status Page tells me to click here to upgrade:

I go to UPGRADE PAGE a blank white page shows. I have checked the error files/logs i cant see anything relating to the upgrade page.

To Confirm the Title of the page is: "Upgrade CiviCRM to Version 5.13.4"

Thanks,

# Answer
> 4 votes
After hours of trying to figure out the issue, i have been able to fix this by changing the Theme in Drupal.

When i made the Theme into a default theme the upgrade page showed with no issues.

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


# Question
Title: How to cure empty config screens in civi?
We are getting two Civi config screens which show a header, but no content. The screen loads but is empty - no options, no fields, no instructions.

One is when wanting to delete a custom field - here's a video of what happens

One is on the Results tab when wanting to set up a Survey -

Any ideas how to cure this?

CiviCRM 5.1.2 Drupal 7.67

# Answer
> 1 votes
This looks like a problem with your compiled templates - try deleting templates\_c. You can do this in-app, or manually.

That said, templates\_c errors are often indicative of a misconfiguration (most commonly, that your cron jobs don't run as the webserver user) so it's likely you'll need to delete manually because the webserver user lacks permission to delete the template in question. If this problem recurs, you'll want to identify its root cause.

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


# Question
Title: Printing reports without showing filters
Is it possible to print reports without the list of filters used displayed at the top? Thank you

# Answer
On the Title and Format tab, insert this in the Report Header just before the closing `</head>` tag near the bottom:

`<style type="text/css">table.statistics-table { display: none; }</style>`
> 2 votes

---
Tags: reports
---


# Question
Title: Currency in webform billing items always dollars
In my installation, under admin/setting/localization, I have enabled multiple currencies. The default is $. The monetary amount display is `%c %a`.

If I create a new contribution page in CiviCRM, I can choose a currency for that page. I've chosen €. Regardless of the setting, it displays $ in the contribution page edit form, but on the preview and live links in CiviCRM, it shows €.

If I create a webform to use that contribution page, the contribution amount widget shows $. Also, in the webform output, the #wf-crm-billing-items table shows the amount in dollars, see below.

I haven't tested, but I expect it will actually charge € from the webform. I also want it to display €.

I have cleared all sort of caches. Is there a setting I am missing or is this a bug ?

---

PS - interesting little snippet I can do in the console on that page :

```
CRM.formatMoney(9.99)
"$ 9.99"
CRM.formatMoney('init', false, '€1,234.56');
undefined
CRM.formatMoney(9.99)
"€9.99"

```

# Answer
So that you can actually do

```
   <script>
    jQuery(document).on('ready',function() {
      CRM.formatMoney('init', false, 'RM1,234.56');
      jQuery('tr[data-amount]').each(function(){
         var $this = jQuery(this);
         var amount = $this.data('amount');
         $this.children('td').eq(1).text(CRM.formatMoney(amount));
      });
    });
    </script>

```

But, not accepting that as an answer.
> 1 votes

---
Tags: civicontribute, webform-civicrm, currency
---


# Question
Title: How to set multiple conditional rule on webform registration?
I am trying to setup an event page on webform with 4 Radio button labeled How many people would like to register - 1, 2 , 3, 4 and 4 contacts field set contact1, contact2, contact3, contact4

What I am trying to achieve, if I select

* Radio 1 - Contact1 field set would show
* Radio 2 - Contact1 & Contact2 would Show
* Radio 3 - Contact1, 2 & 3 show
* Radio 4 - all field set should show.

I am just cant get it to work and keep getting this error and cant go past enabling 2 people.

```
    Conditional errors on page 1:
More than one conditional hides or shows component "Contact2".
More than one conditional hides or shows component "Contact3".

```

Would anyone know how to achieve this? Thanks

# Answer
You are probably pretty close. May just need to reverse your logic. You haven't provided screenshot of your Conditionals. On a site we have this I see this in Conditionals

and  etc
> 3 votes

---
Tags: civievent, webform-civicrm
---


# Question
Title: How can I display message after form submission
I have created CiviCrm profiles. How can I display a message when user submits the profile? First It should display a message (pop or alert) and then redirect to another page.

# Answer
> 2 votes
In the advanced settings of a profile, there is a **Redirect URL** field. Copying from the CiviCRM user guide:

"This applies only to Profiles that are being used as standalone forms; **it will not apply when the Profile is embedded in an event sign-up or contribution form**. The Redirect URL field allows you to send people to a specific web page after they submit their form. For example, you may want to create a web page that thanks people for submitting their information. If this field is left blank, people will be directed to a page which displays the information they've just entered."

At the top of the default redirect page, a generic statement of "Thank you. Your information has been saved." will be displayed, but this is not a pop-up. If you want to change this wording, you could use Administer \> Customize Data and Screens \> **Word Replacements**, but keep in mind that this replacement will be applied globally - i.e. you should ***not*** use this option if you want the wording to be different for each profile submitted.

Hope this helps!

---
Tags: wordpress, profile
---


# Question
Title: Membership fixed period, not working as expected
I want to to create a monthly membership that recurs automatically, but doesn't start until the first of the following month. So if someone signs up January 2nd, they won't be billed until February 1st. Is this possible?

I've setup a membership type with auto-renew required, 1 month duration, fixed period, with fixed period rollover day of 01.

It seems like this should do what I want, and yet when people register, their payment comes through immediately, regardless of what day it is.

# Answer
For fixed membership type plans, the Fixed Period Start Day and Fixed Period Rollover Day apply solely to the membership start and end dates, ***not*** to the payment date. Copying from the explanation provided when clicking on the Membership Type Plan help bubble:

> If membership duration is specified in years, you will be able to specify the exact month and day for memberships to start. If membership duration is specified in months, memberships will start on the 1st of the current month and run for the number of specified months.

So long as your membership start and end dates follow the examples below, then the feature is functioning as programmed.

* If you have a fixed membership type configured for a Duration of 1 **month** and Fixed Period Rollover Day of 2, someone signing up on on May 22 will have the following membership dates:

+ Member Since: May 22
    + Membership Start: May 1
    + Membership End: June 30
* If you have a fixed membership type configured for a Duration of 1 **year** with a Fixed Period Start Day of Jan. 1 and Fixed Period Rollover Day of Nov. 30, someone signing up on on Dec. 1, 2019 will have the following membership dates:

+ Member Since: Dec. 1, 2019
    + Membership Start: Jan. 1, 2020
    + Membership End: Dec. 31, 2020

Note that the Member Since date is always the date that the membership is submitted - this is because the system is not programmed to handle future memberships. The workaround is to create a membership status rule (e.g. called "Future Membership") with a Start Event = Member Since Date and End Event = Membership Start Date and that should ***not*** be considered a current membership .

Regardless of your membership type configuration, payment will be processed on the day that the membership is submitted. If your payment processor allows for the selection of a payment start date for recurring contributions, you should be able to solicit a customization from an **expert** that will allow you to set the desired membership start date for ***monthly*** memberships, and then pass the membership start date as the payment start date of the recurring contribution.

Hope this clarifies things!
> 2 votes

---
Tags: civimember
---


# Question
Title: How can I add conditional profile fields (WordPress)
I would like to have conditional fields, that will be visible when certain conditions are met, for example:

New Customer, IF group is business, show business address field, IF group is individual, show home address, etc..

I am using WordPress 5.2.1 and CiviCRM 5.4.0

# Answer
> 5 votes
Welcome Ashok, you could explore using this extension https://civicrm.org/extensions/profile-conditionals

The other option would be to use the caldera webforms plugin which has an integration with civicrm. Caldera has support for conditionals. https://github.com/mecachisenros/caldera-forms-civicrm

---
Tags: wordpress, profile
---


# Question
Title: Wrong compiled [civicrm.files] variable in Resources URL
My issue is \[civicrm.files\] variable in Resources URL contains full real absolute path on our server '/var/www..' etc.

It constructs as such:

`https://www.website.com/var/www/wp-content/uploads/civicrm/`

All variables in Upload Directories currently set as portable.

I'm using CiviCRM 5.14.3 on Wordpress 5.1

# Answer
This usually happens when your site directory is using symbolic link. To fix the variables you will need to make sure that the docroot specified in apache/ngnix config should match exactly with $civicrm\_root and CIVICRM\_TEMPLATE\_COMPILEDIR in civicrm.settings.php.

Try updating if its different and clear CiviCRM cache.

Cheers

Pradeep
> 1 votes

---
Tags: directory, resource-urls
---


# Question
Title: Increase the import limit (3MB) for Contact import
I have a great quantity of Contact to import in CiviCRM and I absolutely need to increase the actual 3MB limit to, at least, 150 MB, with a view to fit my needs.

Many thanks for the help!

Regards

# Answer
The size limit that is an issue is on your webserver php configuration, usually under /etc/php5 on linux

However and by experience, importing a lot of contacts via the web interface is painful. it will time out, you will need to restart and do the mapping of columns-\>fields, go through the wizard, wonder where it got stuck, see that civi expects "GB" and not "UK" or whatever...

It's much better to write a simple cli script that uses the api to import them, it's going to be easier to run again if needed and way faster.

importing 1.5 million organisations is definitely something you want to do from the cli if you value your time, and care about your mental health.

check out the api explorer, it will generate you the code needed to import a contact

```
$result = civicrm_api3('Contact', 'create', array(
  'sequential' => 1,
  'contact_type' => "Organization",
  'organization_name' => "bla",
  'api.Address.create' => array('country' => "FR", 'city' => "Paris"),
));

```

wrap that with your loop reading your csv and you're good to go ;)
> 5 votes

# Answer
I'm guessing 3Mo in some non-English language means 3MB...

The upload limit is under Administer \> System Settings \> Misc. That cannot be larger than the maximum file size in your php.ini so you will need to increase that as well.

But whatever file sizes you configure there, things are unlikely to work well trying to import a single 150MB file.

Does your 150MB figure relate just to name/address/email/phone information, or is that other data as well?

If it has other data, you will need to prepare separate files for importing basic contact data, contributions, memberships, activities etc so your actual import files will be smaller.

You can import multiple files of each type - it does not need to be a single import.

Importing via the web pages works well enough for small data sets but there are other approaches that you might want to look at it if the data is large. How many contacts do you have?
> 2 votes

# Answer
First, change file upload size to 150 MB in the php.ini file and then, try to increase upload size through the CiviCRM(The upload limit is under Administer \> System Settings \> Misc \> Maximum File Size (in MB)).
> 1 votes

---
Tags: contacts
---


# Question
Title: Mattermost password reset and email verification is broken
I tried to log-in. It would not let me because first I needed to confirm my email address. No email received to do so, not even after several attempts. I decided to reset my password. I do receive that email. The password was reset but I cannot log-in with it. After a second attempt to reset the password I must conclude the system is broken.

I still receive the chat notifications and have reset the password with the same email address, which apparently is not verified. So why does it send notifications to an unverified email address then?

This kind of sucks, don't you agree? How to end my account there? User is null

# Answer
> 3 votes
I was able to login to your account by temporarily changing the email associated with it.

I do see in the logs that the email you had set is invalid. Your email server is responding "User unknown". I see `div@[...]`, could it be a typo for `dev@[...]`?

---
Tags: mattermost
---


# Question
Title: DB upgrade utility stalls at 5.11.alpha1
I was updating from 5.9.0 to 5.13.2 and the DB upgrade utility stalled at 5.11.alpha1. Anyone else have this experience? How can I troubleshoot? (Did not have this problem with our dev site.)

Joomla 3.9.5

This is from ConfigAndLog. Now, what can I do with it? Note error in backtrace line #6:

```
May 07 12:09:00  [info] Running task: Upgrade DB to 5.11.alpha1: SQL

May 07 12:09:01  [info] Running task: Update smart groups where jcalendar fields have been converted to datepicker

May 07 12:11:08  [info] $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.domain_id as `domain_id`, a.name as `name`, a.title as `title`, a.description as `description`, a.payment_processor_type_id as `payment_processor_type_id`, a.is_active as `is_active`, a.is_default as `is_default`, a.is_test as `is_test`, a.user_name as `user_name`, a.password as `password`, a.signature as `signature`, a.url_site as `url_site`, a.url_api as `url_api`, a.url_recur as `url_recur`, a.url_button as `url_button`, a.subject as `subject`, a.class_name as `class_name`, a.billing_mode as `billing_mode`, a.is_recur as `is_recur`, a.payment_type as `payment_type`, a.payment_instrument_id as `payment_instrument_id`, a.accepted_credit_cards as `accepted_credit_cards`
    FROM civicrm_payment_processor a
    WHERE (a.is_active = "1") AND (a.domain_id = "1")
    ORDER BY a.is_default DESC, a.name
[nativecode=1054 ** Unknown column 'a.title' in 'field list']
**array repeats this info in different forms**

May 07 12:11:08  [info] $backTrace = #0 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(952): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /joomla/path/administrator/components/com_civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /joomla/path/administrator/components/com_civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...")
#3 /joomla/path/administrator/components/com_civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...")
#4 /joomla/path/administrator/components/com_civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...", "DB_Error", TRUE)
#5 /joomla/path/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#6 /joomla/path/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...", "1054 ** Unknown column 'a.title' in 'field list'")
#7 /joomla/path/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /joomla/path/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...")
#9 /joomla/path/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...")
#10 /joomla/path/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...")
#11 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query("SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...")
#12 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(1414): CRM_Core_DAO->query("SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...", TRUE)
#13 /joomla/path/administrator/components/com_civicrm/civicrm/Civi/API/SelectQuery.php(144): CRM_Core_DAO::executeQuery("SELECT a.id as `id`, a.domain_id as `domain_id`, a.name as `name`, a.title as...")
#14 /joomla/path/administrator/components/com_civicrm/civicrm/api/v3/utils.php(1253): Civi\API\SelectQuery->run()
#15 /joomla/path/administrator/components/com_civicrm/civicrm/api/v3/PaymentProcessor.php(93): _civicrm_api3_basic_get("CRM_Financial_BAO_PaymentProcessor", (Array:5))
#16 /joomla/path/administrator/components/com_civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_payment_processor_get((Array:5))
#17 /joomla/path/administrator/components/com_civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#18 /joomla/path/administrator/components/com_civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest((Array:9))
#19 /joomla/path/administrator/components/com_civicrm/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("payment_processor", "get", (Array:5))
#20 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Financial/BAO/PaymentProcessor.php(299): civicrm_api3("payment_processor", "get", (Array:5))
#21 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Financial/BAO/PaymentProcessor.php(376): CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors("all")
#22 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Financial/BAO/PaymentProcessor.php(440): CRM_Financial_BAO_PaymentProcessor::getPaymentProcessors((Array:1))
#23 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Config.php(467): CRM_Financial_BAO_PaymentProcessor::hasPaymentProcessorSupporting((Array:1))
#24 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Block.php(370): CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()
#25 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Block.php(290): CRM_Core_Block::setTemplateShortcutValues()
#26 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Block.php(617): CRM_Core_Block::setTemplateValues(1)
#27 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Joomla.php(67): CRM_Core_Block::getContent(1)
#28 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(208): CRM_Core_Joomla::sidebarLeft()
#29 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:12))
#30 /joomla/path/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#31 /joomla/path/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:3))
#32 /joomla/path/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#33 /joomla/path/libraries/src/Component/ComponentHelper.php(402): require_once("/joomla/path/administrator/components/com_civicrm/civicrm.php")
#34 /joomla/path/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/joomla/path/administrator/components/com_civicrm/civicrm.php")
#35 /joomla/path/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
#36 /joomla/path/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#37 /joomla/path/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication->doExecute()
#38 /joomla/path/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#39 {main}

```

(This question is not my problem.)

# Answer
> 1 votes
The field in question was added in CiviCRM 5.13.0. It looks like during your upgrade process, Joomla is trying to show a CiviCRM block in the left sidebar which is expecting to already be upgraded.

I would recommend either temporarily disabling the CiviCRM block(s) in the sidebar, or upgrading to Civi 5.12.4 before upgrading to 5.13.0.

# Answer
> 0 votes
I have the exact same problem. Looking at the error in the log, line 6 of the backtrace, it indicates the "title" field does not exist. I went into the database schema and added the field, thinking that would allow it to continue. However, now when I run the database upgrade I get an error indicating that the database seems to be partially upgraded. Will continue to pursue.

---
Tags: upgrade
---


# Question
Title: Remove CiviCRM and Drupal links / banner on profile form
we have setup an online profile form that new members to our charity can complete. The information then pulls directly into CiviCRM.

When accessing the profile / form online there are drupal and CiviCRM headers / footers and links on there that we would prefer to remove:

Is anybody aware of a way to do this?

Many thanks

.............................................................

Thanks for your help guys it has been extremely useful and and I have now removed the links / logo's in the footer.

Unfortunately however I am still struggling to remove the logo and the "Home" link from the header, as per below:

I have tried unticking the logo option under www.yoursite.com/admin/appearance however this did not seem to make a difference (I am happy for it to be removed from public and private / internal view so any option to get rid of it is fine :)). It would also be great if we can remove the "Home" link. We have our pulbic theme as CiviCRM Seven if that is any help at all.

Finally is there a way to change the background colour of the public profile / site - Currently it is just blank / white so it would be great to add the colour of our main website theme into there.

Thanks again for all your great help, Terry

.....................................

As per the image below the logo option has been unticked but the logo and home link are still present.

# Answer
> 4 votes
Certain things can be turned off from UI but others needs to be hidden by css

1. Since you want to hide this option on public facing forms than you can switch the theme from using CiviCRM Seven to use your default one by navigating to Appearance(/admin/appearance). Scroll down and change the 'CiviCRM Public theme' right at the bottom of the page to use your default theme. (If you have CiviCRM theme module enabled)

If not 1 than

2. Hide Logo from header - You will need to add below css in CiviCRM seven theme styling file to hide the logo

\>

```
body.page-civicrm #branding {
    background-image: none !important;
}

```
3. empowered by CiviCRM - This can be disabled by navigating to CiviCRM \>\> Administrator \>\> System Settings \>\> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.). Change the option for 'Display "empowered by CiviCRM"' to and save the form.

4. Powered By Drupal - Is a Drupal block which can be disabled by navigating to Structure \>\> Blocks. Scroll down and find 'Powered by Drupal' and change the corresponding drop down option to none and save.

HTH

Pradeep

# Answer
> 8 votes
To remove the Drupal footer (This is a block called - Powered by Drupal) –

www.yoursite.com/admin/structure/block/manage/system/powered-by/configure

Under region settings, set all to - None

To remove empowered by CiviCRM –

www.yoursite.com/civicrm/admin/setting/misc?reset=1

Set Display "empowered by CiviCRM" to No

For the header, that’s the logo, which can be changed/removed from the CiviCRM public theme –

www.yoursite.com/admin/appearance

---
Tags: drupal, profile, header-footer
---


# Question
Title: How to keep contacts to a GROUP for a limited period?
We have kids activity event that runs for a year, for example, event name is KIDS CLUB - 2019. Registration is done by webform. We capture parent details as relationship and added to PARENT GROUP. Kids details added as contact & participant, added to KIDS GROUP. That was easy part!

For the next year we would need to create an event called KIDS CLUB - 2020. Some kids and parent may remain same and some new kids will signup. We do not want to send any related email to those parents who has not signed up for 2020.

How can we remove the parents & kids automatically that would not signup for next year? Perhaps some of you can think of an alternative approach to deal with it. Please feel free to suggest. Thanks

# Answer
I think you can create a smart group based on Event type and Registration date this year. This will have contacts who will be registered for an event for 2019 and then will be removed automatically when its 2020.

HTH

Pradeep
> 3 votes

# Answer
You can create a Smart Group of people related to people in a specified group.

So make Group of Participants 2020 (P20).

Make Smart Group of contacts Parents of Participants 2020 (PP20)

You already say you have a group for PP19

Use the Custom Search = Include/Exclude to work out PP19 - PP20.

That should give you a list of Parents of those who participated in 2019 but do not have kids participating in 2020
> 3 votes

# Answer
I'd either remove everyone from the two groups (PARENTS GROUP, KIDS GROUP), or if you want a record of who was in the group last year rename them to have a year suffix and then create two new groups.

Unfortunately it's not possible to search based on participant status of a related contact. A couple of ways around this: Give Parents a participant status in the event - which means you could search on this. Create an activity on webform submission that records that the parent enrolled a child in the event.

If you wanted you could create a drupal view that joined the parent to the child to the event participation - then use drupal bulk actions to add them to a group.
> 2 votes

---
Tags: civievent, webform-civicrm, groups
---


title: no such table when using civicrm

text:
# Question
Title: no such table when using civicrm
CiviCRM 4.6.10 Joomla 3.4.0 getting this error when going to events dashboard or trying to create event.

Sorry but we are not able to provide this at the moment. DB Error: no such table Return to home page.

Is there an sql database dump that will recreate all the civicrm databases including some expired sample data?

# Answer
> 4 votes
Check your browser console log and check civicrm config log file after enabling the debugging and back trace. You will get more detail about this error.

# Answer
> 1 votes
In my case the missing table `jos_content`, which is an old standard name for a primary Joomla table, a name not used since many years (table name prefix is randomized).

I removed the extensions `Content Tokens` and `Fancy Tokens` and the error disappeared. (Probably the culprit was `Content Tokens` since that has CMS-specific tokens for making CMS-information available).

# Answer
> 0 votes
For me, all that I need to do is to Empty/Flush the civicrm\_acl\_contact\_cache table to clear the error, but it keeps coming back. Update: dropping/recreating the civicrm\_acl\_conact\_cache no longer works for me.

# Answer
> 0 votes
Just to confirm that I had the same issue with a corrupted civicrm\_acl\_contact\_cache table.

Dropping the table and re-importing the table structure is working for me.

Think it happen when server ran out of disk space.

---
Tags: database
---


# Question
Title: Events registration via webform + strict accommodation options
I have created 1 event and using a webform to register people. The user can register multiple people using conditions shows/hides contact fields. I would like to include camping options with conditions.

• A large tent which has to house 4 people • Single tents

Camping space is limited. If the user selects 7 people to register, I want them to be able to choose either:

1x large tent 3x single tents Or 7x single tents

If a user registers 3 people then a large tent is not an option, and so on.

Not sure if this is actually possible.

# Answer
via Conditionals you should be able to Hide - Large Tent if number of people is less than 4
> 1 votes

---
Tags: civievent, webform-civicrm
---


# Question
Title: CiviMail mailing sent to an Opt Out email
A contact who is marked as Opt Out is still being sent monthly newsletter. They opted out of all emails 3+ months ago but continue to be on sent emails. They have also unsubscribed from the group.

# Answer
> 2 votes
If you are reusing an old email or even just reusing last months which was a copy of the previous month and so on, check to make sure your include list does not have any previous mailings included.

As oppose to "Members of GroupName" it will be listed as "Recipients of OldMailingName"

Recipients of prior emails don't go through the same Opt Out check as a mailing group would. This feature should not be used to major big or regular mailings.

---
Tags: civimail
---


# Question
Title: CVV is being required in backoffice, even when it shouldn't be
Using CiviCRM 5.7.6 w/ Drupal, I'm getting an issue with my backoffice contribution forms. Specifically, even though the configuration says not to require CVV, and the form itself does not have a (\*) to indicate it's required, I'm still getting an error if I submit the form without a CVV, and the error tells me that I require the CVV.

When I look at the code, the key seems to this piece of code, around line 278 in CRM/Core/Payment/Form.php:

```
  public static function validatePaymentInstrument($payment_processor_id, $values, &$errors, $billing_profile_id) {
$payment = Civi\Payment\System::singleton()->getById($payment_processor_id);
$payment->setBillingProfile($billing_profile_id);
$payment->validatePaymentInstrument($values, $errors);

```

}

Specifically, the validatePaymentInstrument call of the payment object triggers the error because the payment object itself doesn't have the isBackOffice property set. It's not clear to me why it should have that isBackOffice property set unless that object had been created earlier in the code flow and the backoffice property set there.

It also seems to me that this form is the backoffice form, so we could put in a setBackOffice call just before the validate call, but I'm curious why this code seems to have worked in the past.

I'll note also that the error is relatively recent, and it's not clear to me whether it might be code version and/or php version dependent.

# Answer
> 6 votes
This isn't a full answer, but we (Karin actually) discovered that by removing the redis caching configuration from the civicrm settings file, the problem went away.

This is a bit weird, since the problem I was looking at was the static code cache, but it sort of makes sense if the api call that pulls in the payment object could potentially be reading from the more permanent (usually mysql table) cache.

So, my best guess to this issue is that there is some code somewhere that is accessing the CiviCRM cache without using or knowing about the use of Redis.

On it's own, this just means we can't use the Redis cache for CiviCRM, but it suggests that there might be a bigger problem hiding in here.

---
Tags: civicontribute, payment
---


# Question
Title: Is there a way to bulk edit relationship permissions?
I have about 70 organizations that we imported with individuals - that will have permissions to view and update information. Is there a way to make sure they can have that permission when we import or bulk edit that information. Right now I am adding permissions one by one.

# Answer
You can use the API, or the API CSV import GUI. Either way you'll need to have some way of identifying the relationships that need editing.

While I don't recommend running SQL directly against the database, this is one instance where it will be safe - IF you aren't using inherited ("conferred") relationships.
> 2 votes

---
Tags: permissions, relationships
---


# Question
Title: How to use Contact name if nickname is not present in bulk mail?
I need to send an email with Nickname as first preference, if that not present then use Contact name. Cant figure out what token to use?

I have tried this but seems not rendering correctly in email:

```
{capture assign=nickname}{contact.nick_name}{/capture}
Dear {if $nickname}{contact.nick_name}{else}{contact.sort_name}{/if}

```

OUTPUT:

```
{capture assign=nickname}Tota{/capture} Dear {if $nickname}Tota{else}Mr. Tapash Datta{/if}

```

can anyone help please? Thanks

# Answer
You will need to turn on CIVICRM\_MAIL\_SMARTY in civicrm.settings.php to use smarty templating for conditional and more complex logic.

Cheers

Pradeep
> 3 votes

---
Tags: tokens, smarty
---


# Question
Title: Using checksums to access the civicrm/user dashboard
I was under the impression that adding

`https://civicrm.org/civicrm/user?reset=1&cid={contact.contact_id}&{contact.checksum}`

to in a CiviMail would log someone in to the dashboard but it does not seem to be working for me.

This answer also suggests it so maybe I am doing something wrong.

PS I also tried id in place of cid (see below) but it did not work either.

`https://civicrm.org/civicrm/user?reset=1&id={contact.contact_id}&{contact.checksum}`

PS https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/Page/View/UserDashBoard.php does not mention checksums so i am guessing it is not possible...

# Answer
> 3 votes
This works now using the following URL

/civicrm/user?reset=1&id={contact.contact\_id}&{contact.checksum}

# Answer
> 2 votes
Checksums can only be used for visitor facing forms like event registration, membership sign up or profile forms. If you have drupal as frontend you can also use it in the webform module. It is not usable for backend screens.

Also see http://wiki.civicrm.org/confluence/display/CRMDOC/Tokens

# Answer
> 2 votes
I've opened a Gitlab issue for this requirement - https://lab.civicrm.org/dev/core/issues/162.

Also submitted a patch for this against master branch of the core repository - https://github.com/civicrm/civicrm-core/pull/12254

UPDATE - the patch is accepted and should be a part of 5.2.0 version.

---
Tags: checksum, user-dashboard
---


title: Unable to hide PHP 'notice' warning

text:
# Question
Title: Unable to hide PHP 'notice' warning
We are moving our CiviCRM site over from Drupal to Wordpress. We have this fully working on our developer's server (nginx), but on our live server (Apache), we see an error when loading some CiviCRM pages.

Notice: Undefined index: path in /var/www/etcetcetcetc/wp-content/plugins/civicrm/civicrm/Civi/Core/Paths.php on line 200

You can see the error at https://culturalenterprises.org.uk/?page=CiviCRM&q=civicrm%2Fevent%2Finfo&id=285&reset=1

It also appears on some back end screens (attached below).

I have asked our developer to look into what is causing the error in the first place, but I am also completely unable to prevent display of the 'notice' error.

In wp-config.php I have:

```
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

```

In civicrm.settings.php, I have added:

```
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );

```

In php.ini, I have set:

```
display_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

```

And I have also tried disabling all plugins other than CiviCRM in case one of them is overriding these settings.

Debug is off in CiviCRM settings, and it is 'Production' mode.

Is there anything else I can do!?

Thanks

CiviCRM 5.13.4 Wordpress 5.2.1

# Answer
Resolved it - it was an ancient and unused bespoke CiviCRM extension. Disabling it solves the problem.
> 2 votes

---
Tags: php
---


# Question
Title: New release of CiviVolunteer or patch for DB Error: unknown error Return to home page
Is there a new release for CiviVolunteer yet or at least how can I patch the "DB Error: unknown error Return to home page" error.

After doing the modification to both files:

May 07 08:39:13 \[info\] $Fatal Error Details = Array ( \[message\] =\> You do not have permission to access this page. \[code\] =\> )

May 07 08:39:13 \[info\] $backTrace = #0 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

# 1 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php(466): CRM\_Core\_Error::fatal("You do not have permission to access this page.")

# 2 internal function: CRM\_Utils\_System\_Joomla-\>permissionDenied()

# 3 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System.php(74): call\_user\_func\_array((Array:2), (Array:0))

# 4 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::\__callStatic("permissionDenied", (Array:0))

# 5 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::permissionDenied()

# 6 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(310): CRM\_Event\_Page\_EventInfo-\>run((Array:3), NULL)

# 7 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

# 8 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

# 9 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(96): CRM\_Core\_Invoke::invoke((Array:3))

# 10 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(11): civicrm\_invoke()

# 11 /home/twsc/public\_html/libraries/cms/component/helper.php(405): require\_once("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 12 /home/twsc/public\_html/libraries/cms/component/helper.php(380): JComponentHelper::executeComponent("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 13 /home/twsc/public\_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com\_civicrm")

# 14 /home/twsc/public\_html/libraries/cms/application/site.php(230): JApplicationSite-\>dispatch()

# 15 /home/twsc/public\_html/libraries/cms/application/cms.php(261): JApplicationSite-\>doExecute()

# 16 /home/twsc/public\_html/index.php(49): JApplicationCms-\>execute()

# 17 {main}

May 12 23:33:54 \[info\] $Fatal Error Details = Array ( \[message\] =\> You do not have permission to access this page. \[code\] =\> )

May 12 23:33:54 \[info\] $backTrace = #0 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

# 1 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php(466): CRM\_Core\_Error::fatal("You do not have permission to access this page.")

# 2 internal function: CRM\_Utils\_System\_Joomla-\>permissionDenied()

# 3 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System.php(74): call\_user\_func\_array((Array:2), (Array:0))

# 4 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::\__callStatic("permissionDenied", (Array:0))

# 5 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::permissionDenied()

# 6 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(310): CRM\_Event\_Page\_EventInfo-\>run((Array:3), NULL)

# 7 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

# 8 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

# 9 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(96): CRM\_Core\_Invoke::invoke((Array:3))

# 10 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(11): civicrm\_invoke()

# 11 /home/twsc/public\_html/libraries/cms/component/helper.php(405): require\_once("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 12 /home/twsc/public\_html/libraries/cms/component/helper.php(380): JComponentHelper::executeComponent("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 13 /home/twsc/public\_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com\_civicrm")

# 14 /home/twsc/public\_html/libraries/cms/application/site.php(230): JApplicationSite-\>dispatch()

# 15 /home/twsc/public\_html/libraries/cms/application/cms.php(261): JApplicationSite-\>doExecute()

# 16 /home/twsc/public\_html/index.php(49): JApplicationCms-\>execute()

# 17 {main}

May 16 06:09:01 \[info\] $Fatal Error Details = Array ( \[message\] =\> You do not have permission to access this page. \[code\] =\> )

May 16 06:09:01 \[info\] $backTrace = #0 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

# 1 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php(466): CRM\_Core\_Error::fatal("You do not have permission to access this page.")

# 2 internal function: CRM\_Utils\_System\_Joomla-\>permissionDenied()

# 3 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System.php(74): call\_user\_func\_array((Array:2), (Array:0))

# 4 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::\__callStatic("permissionDenied", (Array:0))

# 5 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::permissionDenied()

# 6 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(310): CRM\_Event\_Page\_EventInfo-\>run((Array:3), NULL)

# 7 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

# 8 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

# 9 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(96): CRM\_Core\_Invoke::invoke((Array:3))

# 10 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(11): civicrm\_invoke()

# 11 /home/twsc/public\_html/libraries/cms/component/helper.php(405): require\_once("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 12 /home/twsc/public\_html/libraries/cms/component/helper.php(380): JComponentHelper::executeComponent("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 13 /home/twsc/public\_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com\_civicrm")

# 14 /home/twsc/public\_html/libraries/cms/application/site.php(230): JApplicationSite-\>dispatch()

# 15 /home/twsc/public\_html/libraries/cms/application/cms.php(261): JApplicationSite-\>doExecute()

# 16 /home/twsc/public\_html/index.php(49): JApplicationCms-\>execute()

# 17 {main}

May 17 02:40:13 \[info\] $Fatal Error Details = Array ( \[message\] =\> You do not have permission to access this page. \[code\] =\> )

May 17 02:40:13 \[info\] $backTrace = #0 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

# 1 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php(466): CRM\_Core\_Error::fatal("You do not have permission to access this page.")

# 2 internal function: CRM\_Utils\_System\_Joomla-\>permissionDenied()

# 3 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System.php(74): call\_user\_func\_array((Array:2), (Array:0))

# 4 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::\__callStatic("permissionDenied", (Array:0))

# 5 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::permissionDenied()

# 6 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(310): CRM\_Event\_Page\_EventInfo-\>run((Array:3), NULL)

# 7 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

# 8 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

# 9 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(96): CRM\_Core\_Invoke::invoke((Array:3))

# 10 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(11): civicrm\_invoke()

# 11 /home/twsc/public\_html/libraries/cms/component/helper.php(405): require\_once("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 12 /home/twsc/public\_html/libraries/cms/component/helper.php(380): JComponentHelper::executeComponent("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 13 /home/twsc/public\_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com\_civicrm")

# 14 /home/twsc/public\_html/libraries/cms/application/site.php(230): JApplicationSite-\>dispatch()

# 15 /home/twsc/public\_html/libraries/cms/application/cms.php(261): JApplicationSite-\>doExecute()

# 16 /home/twsc/public\_html/index.php(49): JApplicationCms-\>execute()

# 17 {main}

May 27 00:27:40 \[info\] $Fatal Error Details = Array ( \[message\] =\> You do not have permission to access this page. \[code\] =\> )

May 27 00:27:40 \[info\] $backTrace = #0 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

# 1 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php(466): CRM\_Core\_Error::fatal("You do not have permission to access this page.")

# 2 internal function: CRM\_Utils\_System\_Joomla-\>permissionDenied()

# 3 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System.php(74): call\_user\_func\_array((Array:2), (Array:0))

# 4 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::\__callStatic("permissionDenied", (Array:0))

# 5 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::permissionDenied()

# 6 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(310): CRM\_Event\_Page\_EventInfo-\>run((Array:3), NULL)

# 7 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

# 8 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

# 9 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(96): CRM\_Core\_Invoke::invoke((Array:3))

# 10 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(11): civicrm\_invoke()

# 11 /home/twsc/public\_html/libraries/cms/component/helper.php(394): require\_once("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 12 /home/twsc/public\_html/libraries/cms/component/helper.php(369): JComponentHelper::executeComponent("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 13 /home/twsc/public\_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com\_civicrm")

# 14 /home/twsc/public\_html/libraries/cms/application/site.php(230): JApplicationSite-\>dispatch()

# 15 /home/twsc/public\_html/libraries/cms/application/cms.php(265): JApplicationSite-\>doExecute()

# 16 /home/twsc/public\_html/index.php(49): JApplicationCms-\>execute()

# 17 {main}

May 28 03:55:24 \[info\] $Fatal Error Details = Array ( \[message\] =\> You do not have permission to access this page. \[code\] =\> )

May 28 03:55:24 \[info\] $backTrace = #0 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

# 1 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php(466): CRM\_Core\_Error::fatal("You do not have permission to access this page.")

# 2 internal function: CRM\_Utils\_System\_Joomla-\>permissionDenied()

# 3 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System.php(74): call\_user\_func\_array((Array:2), (Array:0))

# 4 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::\__callStatic("permissionDenied", (Array:0))

# 5 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::permissionDenied()

# 6 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(310): CRM\_Event\_Page\_EventInfo-\>run((Array:3), NULL)

# 7 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

# 8 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

# 9 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(96): CRM\_Core\_Invoke::invoke((Array:3))

# 10 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(11): civicrm\_invoke()

# 11 /home/twsc/public\_html/libraries/cms/component/helper.php(394): require\_once("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 12 /home/twsc/public\_html/libraries/cms/component/helper.php(369): JComponentHelper::executeComponent("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 13 /home/twsc/public\_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com\_civicrm")

# 14 /home/twsc/public\_html/libraries/cms/application/site.php(230): JApplicationSite-\>dispatch()

# 15 /home/twsc/public\_html/libraries/cms/application/cms.php(265): JApplicationSite-\>doExecute()

# 16 /home/twsc/public\_html/index.php(49): JApplicationCms-\>execute()

# 17 {main}

May 30 01:59:07 \[info\] $Fatal Error Details = Array ( \[message\] =\> You do not have permission to access this page. \[code\] =\> )

May 30 01:59:07 \[info\] $backTrace = #0 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(378): CRM\_Core\_Error::backtrace("backTrace", TRUE)

# 1 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php(466): CRM\_Core\_Error::fatal("You do not have permission to access this page.")

# 2 internal function: CRM\_Utils\_System\_Joomla-\>permissionDenied()

# 3 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/System.php(74): call\_user\_func\_array((Array:2), (Array:0))

# 4 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::\__callStatic("permissionDenied", (Array:0))

# 5 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/EventInfo.php(80): CRM\_Utils\_System::permissionDenied()

# 6 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(310): CRM\_Event\_Page\_EventInfo-\>run((Array:3), NULL)

# 7 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:15))

# 8 /home/twsc/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3))

# 9 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(96): CRM\_Core\_Invoke::invoke((Array:3))

# 10 /home/twsc/public\_html/components/com\_civicrm/civicrm.php(11): civicrm\_invoke()

# 11 /home/twsc/public\_html/libraries/cms/component/helper.php(394): require\_once("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 12 /home/twsc/public\_html/libraries/cms/component/helper.php(369): JComponentHelper::executeComponent("/home/twsc/public\_html/components/com\_civicrm/civicrm.php")

# 13 /home/twsc/public\_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com\_civicrm")

# 14 /home/twsc/public\_html/libraries/cms/application/site.php(230): JApplicationSite-\>dispatch()

# 15 /home/twsc/public\_html/libraries/cms/application/cms.php(265): JApplicationSite-\>doExecute()

# 16 /home/twsc/public\_html/index.php(49): JApplicationCms-\>execute()

# 17 {main}

# Answer
> 3 votes
Karen-Ann

This has been fixed by core team, but they haven't done a release. You can apply the patch for the fix from here.

Looks like the DB:error is for 'nativecode=1055 \** Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column'. This is also fixed, can you please apply the patch from here and try again.

Cheers

Pradeep

---
Tags: civivolunteer
---


# Question
Title: PayPal Standard - users getting "Could not find a valid session key"
Occasionally users at our site are getting "Could not find a valid session key" messages when making payments through PayPal Standard. The payment succeeds but this message unsettles users.

The sequence of requests for a contribution is ...

1. POST /civicrm/contribute/transact (submit payment details)
2. GET /civicrm/contribute/transact?\_qf\_Confirm\_display=true&qfKey=XXXXX
3. POST /civicrm/contribute/transact (confirm payment details)
4. POST /civicrm/payment/ipn/NNN (PayPal IPN callback)
5. POST /civicrm/contribute/transact?\_qf\_ThankYou\_display=1&qfKey=XXXXX

On the occasions when this fails the 5th step says "Could not find a valid session key". I'm unable to reproduce this on the PayPal Sandbox.

I'm running CiviCRM 5.10.4 (with security patches) on Drupal 7.67.

See this question for an update and a solution.

# Answer
Ken West,

I guess your cron job 'Clean-up Temporary Data and Files' must be running when your site is busy. The session key is not an usual error. CiviCRM stores sessions variables into its database int the form of cache. When 'Clean-up Temporary Data and Files' schedule job is executed or CiviCRM cache is cleared manually the cache table is truncated. So when the user leaves CiviCRM and goes to Paypal standard for making payment and come backs to CiviCRM once payment is done and between these process CiviCRM cache is cleared than CiviCRM won't get the session key of the user from the cache table and you will end up the error message of session key invalid on screen.

Try if you can replicate using below step 1. Open 2 browsers(normal user and admin). 2. 1st browser - Do a donation, Click on confirm. 3. Once the user is on paypal screen(don't proceed with payment), from browser 2 clear civicrm cache. 4. From browser 1 proceed with payment in paypal

Solution: Try running the 'Clean-up Temporary Data and Files' schedule job once is a day when your site is not busy.

Cheers

Pradeep
> 4 votes

---
Tags: paypal
---


title: Default Activity Subject

text:
# Question
Title: Default Activity Subject
Is it possible to set a default subject for specific Activity types?

We would like to set a default text on the “subject” of each activity that can be created for a case.

# Answer
> 1 votes
Hi @Vijailakshmi AFAIK you can not set a default for an activity type subject without coding. If you do have some PHP skills it is fairly easy though :-) Let us know and we will detail what needs to be done.

---
Tags: civicase
---


# Question
Title: Updating Memo/Rich Text Editor Fields with the API
I have in my CiviCRM a custom field which is a memo field with a text editor. If I update the contents of this field through the user interface contents is saved correctly as html. E.g. `<p>Hello world</p>`

However when I use the api (for example through the api explorer) the html gets malformed. Entering the same html results in the following: `><Hello world>/p<`

How do I update the contents of a custom field which should html code?

Update: I disocvered there is an API Wrapper in place which encodes the html input. This wrapper gets executed for every api call. See https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/API/HTMLInputCoder.php#L147

Thanks, Jaap Jansma

# Answer
I created a contact custom field with data type "Note" and field type "RichTextEditor" and then ran this API call:

```
CRM.api3('Contact', 'create', {
  "contact_type": "Individual",
  "id": 180,
  "custom_15": "<p><strong>foobar</strong></p>"
});

```

The value was stored as-is, and shows correctly in the UI.

This part of `CRM_Utils_API_HTMLInputCoder` should ensure that custom fields of type `RichTextEditor` are excluded.

One scenario in which this might not work: Let's say you have another API wrapper that renames a parameter from, say, `food_preference` to `custom_22`. If the renaming API wrapper runs *after* `CRM_Utils_API_HTMLInputCoder` (not sure what the order is there, I'd guess core ones run first), `food_preference` would already be encoded before it gets to your wrapper.
> 4 votes

---
Tags: api, html
---


title: Civimail URLs not working

text:
# Question
Title: Civimail URLs not working
I've just sent a newsletter and had replies telling me the links to content on our website aren't working. I've checked and they're not, they're going to CiviCRM in the Wordpress plugins folder, and then different URLs that look something like: "url.php?u=60&qid=1389" (its different depending on the original URL). When you click one of these links in a draft email they go to a blank page.

Anyone had something similar? Any known fixes?

Thanks

# Answer
You will need to check the resource URL and directory settings. If the resource url for CiviCRM is not set properly then the url build while mailing is send will be wrong.

When you have mailing with track url enabled than CiviCRM rewrites the url to 'url.php?u=60&qid=1389' so that it can track the click. But when you click on the url from email it gets in CiviCRM and then based on url params it redirects to correct url.

Thanks

Pradeep
> 2 votes

---
Tags: civimail
---


# Question
Title: Error Saving Membership Transactions After Upgrading To 5.13.4
I am getting the following error on screen when trying to save a membership with a contribution after upgrading to 5.13.4.

We had this problem with all contributions at first but that appears to have resolved itself.

Fatal error: Uncaught CRM\_Core\_Exception: \[0: Transaction integrity error: Expected to find active frame thrown in /home/customer/public\_html/sites/all/modules/civicrm/Civi/Core/Transaction/Manager.php on line 107

When looking in the logs I see the full backtrace before that this is listed as the `[to_string]`.

`nativecode=1442 **Can't update table 'civicrm_contact' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.`

Here is the backtrace:

```
#1 /home/customer/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/customer/public_html/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
#3 /home/customer/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
#4 /home/customer/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...", "DB_Error", TRUE)
#5 /home/customer/public_html/sites/all/modules/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#6 /home/customer/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...", "1442 ** Can't update table'civicrm_contact' in stored function/trigger becau...")
#7 /home/customer/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/customer/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
#9 /home/customer/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2415): DB_common->query("INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
#10 /home/customer/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1040): DB_DataObject->_query("INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
#11 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(572): DB_DataObject->insert()
#12 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php(231): CRM_Core_DAO->save()
#13 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(957): CRM_Contribute_BAO_Contribution::add((Array:30))
#14 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(1771): CRM_Contribute_Form_Contribution_Confirm::processFormContribution(Object(CRM_Contribute_Form_Contribution_Confirm), (Array:66),(Array:62), (Array:30), Object(CRM_Financial_DAO_FinancialType), TRUE, 5, NULL)
#15 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(1487): CRM_Contribute_Form_Contribution_Confirm->processSecondaryFinancialTransaction("69090",Object(CRM_Contribute_Form_Contribution_Confirm), (Array:62), FALSE, (Array:1), "1.000000000", "2")
#16 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(1392): CRM_Contribute_Form_Contribution_Confirm->postProcessMembership((Array:60), "69090",Object(CRM_Contribute_Form_Contribution_Confirm), (Array:52), (Array:0), (Array:0), (Array:13), (Array:1), FALSE, NULL, TRUE, "2", (Array:1), FALSE)
#17 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2415): CRM_Contribute_Form_Contribution_Confirm->processMembership((Array:60), "69090", (Array:0), (Array:0), (Array:52), (Array:1))
#18 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2290): CRM_Contribute_Form_Contribution_Confirm->doMembershipProcessing("69090", (Array:60), (Array:52), (Array:1))
#19 /home/customer/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(709): CRM_Contribute_Form_Contribution_Confirm->processFormSubmission("69090")
#20 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(490): CRM_Contribute_Form_Contribution_Confirm->postProcess()
#21 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#22 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next", "Next")
#23 /home/customer/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next")
#24 /home/customer/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Confirm), "next")
#25 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(349): HTML_QuickForm_Page->handle("next")
#26 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(311): CRM_Core_Controller->run((Array:3), NULL)
#27 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))
#28 /home/customer/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#29 /home/customer/public_html/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:3))
#30 /home/customer/public_html/includes/menu.inc(527): civicrm_invoke("contribute", "transact")
#31 /home/customer/public_html/index.php(21): menu_execute_active_handler()
#32 {main}

```

There was a similar issue that was resolved for version 4.4.2 - https://issues.civicrm.org/jira/browse/CRM-13587.

I tested the site without our custom extensions enabled and they do not impact the problem. The following extensions are enabled.

* Birthday Report
* CiviDiscount
* Extended Report
* Summary Fields
* Report Error

Any help or ideas is greatly appreciated.

Thanks, Steve

# Answer
> 4 votes
After reading many posts and looking through the ideas I got here I deleted the triggers for the contributions table and rebuilt the triggers (https://docs.civicrm.org/sysadmin/en/latest/troubleshooting/#trigger-rebuild) for the table. This appears to have worked like a charm.

-Steve

---
Tags: civimember, contributions
---


# Question
Title: Questions regarding offline contribution receipt
After checking the box, send receipt after entering in an offline contribution, where do I see the copy of the receipt that was sent?

After importing contributions, do we have to click Send Receipt manually for each contribution that was uploaded in order to send a receipt?

Thanks.

Roshani

# Answer
> 2 votes
I don't think a copy of the receipt is stored in Civi - If you need to send a copy again you need to manually edit the record - set the send email flag and save the same that should resend a copy

Also for imported data/any contribution - you can use find contribution and select all the contribution and select the option of "Receipts Print or Email" this will send email for all selected contributions

I guess this helps !!!

# Answer
> 1 votes
It's possible with Transactional mail extension, can be found here https://github.com/fuzionnz/nz.co.fuzion.transactional

It creates the activity of all the email that was sent.

---
Tags: civicontribute
---


title: Print Contribution Receipt Offline

text:
# Question
Title: Print Contribution Receipt Offline
Some donor wants a receipt of their contribution printed. I could not find any option other than printer icon on the top right. But that gives a very barebone format. What is the best way to go about it, please? Thanks

# Answer
> 4 votes
You can make pdf and then print it.

1. Go to **CiviCRM Menu** -\> **Contribution** -\> **Find contribution**
2. Click on search button.
3. Select any contributions which you need
4. On the top of table is located **"actions"** dropdown. Chose **"Receipts - print or email"**.
5. Then You will redirected on **"Print Contribution Receipts"** page. Click on **"PDF Receipts"** select pdf template. And then click on **"Process receipt"**. After that it generates pdf.

If you don't have any pdf template, you can create in **"\[your domain name\]/index.php?q=civicrm/admin/pdfFormats&reset=1"** page. Be caerful, don't set big value for margin param(try to set "1").

---
Tags: contributions, receipts, printing
---


# Question
Title: civiReport with financial type and line item financial types
Is there a report that displays both the overarching financial type and the individual line item financial types for contributions?

civiCRM Contribution and paid event pages require a financial type to be set. We often use complex pricing options with price sets with multiple financial types.

I am looking for a report or search that shows both the overarching financial type (from the page) and the individual line items (from the price set). Find Contributions and Contribution Detail report only display the overarching financial type. Bookkeeping transaction report displays only the line item.

Does a report/search exist that displays both?

# Answer
There is no such report provided by CiviCRM by default. But there is an extension called 'Extended Report' which provides report with additional columns and filters.

The report 'Extended Report - Contributions with Price Set data' or 'Extended Report - Price Set Line Items' from the extension may be the one you looking for.

Cheers

Pradeep
> 5 votes

---
Tags: civireport, financial-types
---


# Question
Title: Check Processing - How does your organization do it?
There are quite a few checks that come into our office even though we have credit cards as an option. My question to other organizations would be "How do you handle a check once your organization receives it?" I am just looking for feedback on the best workflow with civicrm.

Currently my organization has an invoice that is generated and emailed to the person after they submit the contribution page with the pay later option. That person sends a check for the amount due with the invoice and then a staff member goes to that persons contact record and updates the pending payment to completed.

Additionally during the end of the fiscal year we have a lot of payments coming through so we use the import payments page and upload csv files to add payments to users records using their external id. This however creates a new payment and does not update the pending pay later check on that users record.

I would love to hear recommendations and feedback on how other organizations process checks? Is there an easier way?

# Answer
> 2 votes
On a day-to-day basis, you can save yourself a few clicks by using Contributions \> Find Contributions. Also, instead of Editing the contribution and updating the status, you would be better off using "Record Payment" by clicking on the black arrow to the left of the contribution amount:

On a similar note, when you have multiple contributions to update, streamline the payment recording process by selecting the relevant records from your search and then using the "Update pending contribution status" action:

This action opens up a data entry screen that will allow you to enter the same payment details when using the "Record Payment".

---
Tags: payment, paylater, payment-method
---


# Question
Title: CiviCRM menu bar corrupted after installing Shoreditch
I'm trying out the Shoreditch theme (originally for Mosaico, but it's so much more useable I'd prefer to keep it on by default if possible). I see weird white blocks at each end of the CiviCRM menu bar.

Is this a bug in the current version of Shoreditch, or have I done something wrong?

# Answer
> 6 votes
There has been some work going on to support shoreditch for CiviCRM 5.13. The temporary solution(until a new release is available) is to make the Menu colour to white by navigating to CiviCRM \>\> Administer \>\> Customize Data and Screens \>\> Display Preferences. Update the form by changing the 'Menu Color' to white

Cheers

Pradeep

---
Tags: extension, theme, shoreditch
---


title: Insert and Get New ID in Extension

text:
# Question
Title: Insert and Get New ID in Extension
Within a new extension, in a form's postProcess function, I am inserting into a non-Civi table (separate mysql database/table). What is the proper way to execute a MySQL insert statement and retrieve the new id from that insert using CRM\_Core\_DAO? I use executeQuery for selects, and can use it to run the insert as well, but not sure that's the best way and not sure how to get the id back.

# Answer
> 5 votes
You could do something like `CRM_Core_DAO::executeQuery("SELECT LAST_INSERT_ID()");`. If your needs are simple that seems like the easiest.

Probably to do it "right", you would use `civix generate:entity`. See https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-entity

Then you could do things in an object-y way, like:

`$myclass = new MyClass();
$myclass->field1 = 'foo';
$myclass->field2 = 'bar';
$myclass->save();
// Then the inserted id is automatically in $myclass->id (assuming your auto_increment field is called 'id'`

---
Tags: extension, database
---


# Question
Title: Custom dropdown for specific relationship type
When creating a new relationship is it possible to create a dropdown that only displays when you have selected a specific relationship type.

For instance: Add custom relationship “Representation” Represented by \[individual\] Representative of \[individual\]

Add custom dropdown “Representative Type” \- Publicist \- Manager \- Agent

When you go to add a relationship currently the Representation dropdown displays on all relationship types. I.e. “child of” displays representative type, clearly unnecessary. Is it possible to only display that dropdown when Representation is selected from the relationship type dropdown?

Thank you for your time and consideration,

Tim

# Answer
You can create custom group of fields for a specific relationship with your custom relationship type filter. This custom field will only be visible when you select relationship type from the drop down

Cheers

Pradeep
> 5 votes

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


# Question
Title: Neither Advanced Search nor Search Builder offer option to save as Smart Group
The documentation says I should be able to save a search as a Smart Group, but I don't see an option anywhere to do so. I've used both Advanced Search and Search Builder. Neither results screen offers anything to click or select to save.

On WordPress 5.2.1 and CiviCRM 5.13.4.

# Answer
> 3 votes
In the documentation here https://docs.civicrm.org/user/en/latest/organising-your-data/smart-groups/#creating-smart-groups at step 6 it says it's a choice in the actions dropdown. If you don't see that option, check that you have `CiviCRM:edit groups` permission.

---
Tags: smartgroups, search-builder, advanced-search
---


# Question
Title: Signing up for an event returns 500 error
I am using CiviCRM version 5.13.4 on Drupal 7. PHP version is 7.1.

When trying to sign up for an event, once the continue button is clicked to confirm the registration, the page loads for a minute or two and then returns a 500 Internal Server Error.

The person does get signed up for the event but they don't receive a confirmation email which is causing issues as they try and register multiple times which creates duplicate bookings.

Before clicking the continue button, this warning appears:

```
Warning: A non-numeric value encountered in CRM_Event_Form_Registration_Confirm->buildQuickForm() (line 264 of /public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php)

```

We are also getting this notice a lot although I'm not certain it's related:

```
Notice: Undefined offset: 0 in CRM_Grant_BAO_Query::where() (line 116 of /public_html/sites/all/modules/civicrm/CRM/Grant/BAO/Query.php).

```

My guess is the first warning is the one to take notice of so I've put a little bit of the code below that may be of use which includes line 264 for reference (the middle line in the snippet):

```
/*CRM-16320 */
      $individual[$k]['totalAmtWithTax'] = $this->_amount[$k]['amount'];
      $individual[$k]['totalTaxAmt'] = $individualTaxAmount + $v['tax_amount'];
      $this->_totalAmount = $this->_totalAmount + $this->_amount[$k]['amount'];
      if (!empty($v['is_primary'])) {
        $this->set('primaryParticipantAmount', $this->_amount[$k]['amount']);

```

Any advice would be greatly appreciated, feel free to ask any follow up questions for clarification!

# Answer
> 2 votes
So after much digging, I found it was due to Civi trying and failing to send an PDF receipt.

After disabling this in Administer \> System Settings \> Misc (civicrm/admin/setting/misc?reset=1), the error resolved, the 500 Internal Server Error disappeared and the emails started sending with the email receipt instead of the PDF.

Attach PDF copy to receipts: No

---
Tags: civievent, drupal
---


# Question
Title: Is there a limit to how many activity types we should create?
We use Schedule Reminders to set up email series for a very wide range of interest groups. With conditional funnels using smart groups, like Mailchimp conditional campaigns.

The easiest way to initiate these Schedule Reminders is from activity types, but we've hesitated to make an activity type for every new event or campaign since we'd soon have many hundreds. Instead we make activity types that cover generic topics and then use groups to limit which people will receive schedule reminders. It's a bit of a dangerous method - if you forget to limit a schedule reminder to a group you could send out emails to many people who haven't asked for them!

So... would there actually be any impact in terms of performance if we were to have many hundreds - perhaps eventually a thousand or more - activity types?

Thanks for your thoughts!

# Answer
> 1 votes
Although I am not sure what the exact impact on performance would be, it does not sound as a good idea. An activity can already be linked to a campaign, to make specific types for each campaign or event sounds like a bit of a nightmare.

Have you considered using the CiviRules extension (https://civicrm.org/extensions/civirules and documentation on https://docs.civicrm.org/civirules/en/latest/) for sending these emails? I reckon that might make life a little easier than creating hundreds of activity types, specific for each campaing or event.

---
Tags: activities, scheduled-reminders
---


# Question
Title: What does this civirule error message mean? Not a valid action, action class is missing
I'm trying to add a rule that will send an email after a profile form is completed. The trigger is Added to a Group. The condition is the group created by the profile form. When I try and select send e-mail for the action, I get this error message. "Not a valid action, action class is missing" Using WordPress.

# Answer
It looks like the Send Email action is not present, did you install the Email API extension (https://civicrm.org/extensions/e-mail-api)? This enables the Send Email action.

If you did, can you check if the action is actually in your database? The table is civirule\_action.
> 1 votes

---
Tags: civirules
---