# Question
Title: Failed to locate Mosaico graphics driver
I'm using Drupal 7 and CiviCRM version 5.13.4 and I'm having a problem with using Mosaico.

When I try to create new templates, I'm unable to add new images to them. I can't drag and drop any images or add them using the little upload icon.

When I try to do so, I get a 500 Error in the console.

```
 GET https://site.com/civicrm/mosaico/img?method=placeholder&params=300%2C200 500 (Internal Server Error)

```

I also get this error in the top right of the screen:

```
Failed to locate Mosaico graphics driver. Either "mosaico_graphics" is invalid or the autodetection failed.

```

I attempted a google on that error but it appears it's never been reported before which isn't very helpful to me.

Below is a screenshot on how the templates look to me if it's of any use:

Happy to answer any follow up questions! Thanks in advance.

# Answer
In my case, neither of the other answers solved the issue I was having although I'm sure they are also reasons why Mosaico might not be working!

In my case, it was due to a dodgy Drupal module that was injecting whitespace into all the images which caused them to break.

I set up a local copy of the site and enabled each module one by one until the images broke and then when I found the module it broke at, it wasn't hard for me to find the rogue PHP file.

There was two new lines before the opening PHP tag `<?php` and once I had removed this, Mosaico worked as it should normally.
> 3 votes

# Answer
I've just had a seemingly identical problem on upgrade to 5.13.5 (ImageMagick reported as missing when present & up to date).

Disabling Mosaico/Fleximailer/Shoreditch & then re-enabling them seemed to resolve the issue.
> 8 votes

# Answer
If it has been working correctly and then produces this error, clearing the cache is sometimes enough to get it working again: `Administer > System Settings > Cleanup Caches and Update Paths`
> 6 votes

# Answer
Most likely it's missing PHP's ImageMagick OR GD Extension, required for image manipulation.

One quick way to check phpinfo in drupal is to visit url https://example.org/admin/reports/status/php and see if you find imagemagick or GD related info.
> 3 votes

# Answer
I know this is old but I wanted to add another answer to hopefully help others in the future.

ImageMagick has to be installed on the PHP version that the site runs on; if it is installed on 5.x and your site runs on 7.x, it won't pick up the package. This might seem obvious but I feel things like this are often overlooked.

Additionally, if you have it installed on the right version of PHP but it still isn't working and you can't see it on the PHP info page, restarting PHP on the server will allow it to pick up any new packages that have been installed. Another simple but easily overlooked solution.
> 3 votes

---
Tags: drupal, civimail, mosaico
---


# Question
Title: Is it 'better' to use mysql_dsn rather than mysql_ram_disk with buildkit and amp config?
I've successfully set up a `drupal-clean` test build on my Ubuntu 19.04 machine using buildkit, `amp config` and `amp test` and chose `mysql_ram_disk` rather than `mysql_dsn`.

My intent was to have a semi-permanent dev environment.

Did I make the wrong choice? Should I use `mysql_ram_disk` for such an environment?

# Answer
> 3 votes
It's a little bit hard to answer without more info but generally the ram disk isn't going to save your data unless you do something extra, so it's more useful for one-off tests or something where you need speed over permanence, like running unit tests (which it mentions in the readme). I don't use buildkit since I'm on windows but I do switch over to a ramdisk when running tests since it's way faster when it keeps needing to load/reset the database. I wouldn't recommend a ramdisk for setting up a semi-permanent dev environment that you plan to work on regularly, unless you're willing to regularly dump the data somewhere and reload it later, or automate that at startup/shutdown, and risk losing something in the middle.

---
Tags: mysql, civicrm-buildkit
---


# Question
Title: membership not updated with recurring contribution
When the iATS scheduler runs a recurring profile which is linked to a membership, the contribution is not being linked to the membership, and thus the membership end date does not increment. Ideas?

Drupal / CiviCRM 5.x / iATS ext 1.6.2

Update; 8/30 looking for ideas here: https://github.com/iATSPayments/com.iatspayments.civicrm/issues/217

In this issue KarinG states: " iATS extension itself just takes care of the monies; we use repeattransaction API in 4.7 -\> and the fact that the recurring series is attached to a Membership - that should update it."

I think it might be due to an extension or configuration - will report back. Will check the logs.

Second update: could be that I did not select auto-renew on the webform or the field during data-import: https://github.com/colemanw/webform\_civicrm/pull/181

Third Update: After marking auto\_renew = TRUE for the recurring profiles, which are linked to memberships, the scheduled job still does not attach the contribution to the membership or update the end date.

Fourth Update: Updated Webform CiviCRM and created a new test webform, test membership, and set up an ongoing contribution for 1 day membership. Will see if it updates tomorrow and compare. Also, in civicrm\_line\_items the test submission/membership has entity\_table = civicrm\_membership whereas the former case which did not link to membership shows entity\_table = civicrm\_contribution

Fifth Update: I made a new webform, test membership, and test record - and the membership does update now! I also have noticed the newly created one creates an activity record for membership renewal whereas the former one, which is not working, does not.

# Answer
> 1 votes
My research indicates that newly created memberships and recurring contributions are linking and updating perfectly. Only ones made with previous versions of CiviCRM and Webform\_Civicrm are not functioning correctly, and this might have coincided with some problems with data we imported from a Paypal -\> iATS transition. Without being able to nail down specifically why it's not working, I found a workaround -

I'm using this excellent extension - https://github.com/adixon/ca.civicrm.contributionrecur which lets us do implicit membership renewals. For all memberships that are recurring under a certain ID # (the past ones), it's been enabled to run daily to link the recurring contribution to the membership and then extend the end date.

It has also exposed a new way to potentially gain membership/donations and make our membership model even cooler!

# Answer
> 2 votes
Payment Processors do not care what the monies are used for. Once the transaction is completed the payment processor’s job is done.

You’ve either run into an issue with CiviCRM Core or with Webform CiviCRM.

Issues with Memberships not renewing are (unfortunately) not uncommon. Membership renewals are complicated from a logic/code perspective as there are so many different Membership models already in core (rolling/fixed, statuses config). If Membership is important for your org consider an extension that handles the logic for you. Eg -\> if Contribution is Completed -\> add +1y to current Membership start (or end date) - whatever your rules are you have control.

---
Tags: webform-civicrm, iats
---


# Question
Title: eWay Recurring - Which extension is the best?
One of our clients would like to use eWay for recurring payments in CiviCRM. We have installed and are our testing the eWay recurring extension by ChrisChinchilla. However, while researching other options we also came across the eWay recurring by Agileware and Omnipay extension. It seems the Agileware and Omnipay extensions are receiving more support and updates as the last update for the eWay recurring extension was 2016. Does anyone have any recommendations which is the best option to use for autorenewals for memberships and if any are better for PCI compliance?

# Answer
> 1 votes
I think the agileware version is now updated to use for eWAY Rapid API with the Responsive Shared Page method. This method does not ask for any CC details on civicrm and navigates user to eway site for the payment.

We did hit some problems using it on drupal webform, but I think it is already handled https://github.com/agileware/au.com.agileware.ewayrecurring/issues/4

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


title: Error when displaying the CiviCRM Menu

text:
# Question
Title: Error when displaying the CiviCRM Menu
As an admin, when I want to display the CiviCRM Menu instead of the drupal menu (via .../civicrm/dashboard), I often get the following Error Message :

*Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. No API key provided. (HINT: set your API key using "Stripe::setApiKey()". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email support@stripe.com if you have any questions.*

Then, if I insist, just once, I get to the Civi dashboard page with the civicrm Menu and there is no more message, and every-thing works correctly.

Apart from this, I have no problem with payments via Stripe.

CiviCRM 5.13.2 / Drupal 7.67

# Answer
This was due to an unused Payment Processor which had no API key. Deleting this Payment Processor fixed the issue.
> 3 votes

---
Tags: core, stripe
---


title: SMTP Connection stopped working

text:
# Question
Title: SMTP Connection stopped working
Running CiviCRM 5.13.4 on WordPress current version. Everything had been working then we were informed that the site had stopped sending email. I have been trying to re-establish an SMTP connection ever since with no luck.

* I have verified the user name and password for the email address using a desktop client
* I have verified that the ports are open and that the CiviCRM server is not blocked by our firewall.
* I have cloned the site with similar results, except that the clone can connect only connect on port 587, but the production site can not connect at all.
* I have been utterly unable to locate any errors from exim, modsecurity or apache on either the CiviCRM server or the mail server.

The only error I get is:

> Mail Not Sent Sending test email: From: fppta@mailprocessing.org To: jlyons@rboa.com Oops. Your SMTP settings are incorrect. No test mail has been sent. An error occurred when CiviCRM attempted to send an email (via SMTP). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt. The mail library returned the following error message: \> Failed to connect to mail.mailprocessing.org:465 \[SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM \>\> Global Settings \>\> Outbound Email (SMTP). (code: -1, response: )\] This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » System Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are: • Your SMTP Username or Password are incorrect. • Your SMTP Server (machine) name is incorrect. • You need to use a Port other than the default port 25 in your environment. • Your SMTP server is just not responding right now (it is down for some reason). • The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules. Check this page for more information.

Where should I look next?

# Answer
> 1 votes
If the same credentials work on one server and not another, there's a good chance that you have `php-mcrypt` installed on one and not the other. When `php-mcrypt` is installed, CiviCRM encrypts the SMTP password, and assumes that any passwords are encrypted. This can be a problem if your PHP environment changed (in particular, `php-mcrypt` is deprecated and it's very unusual to see it used with PHP 7.2).

The fix is to re-enter the SMTP password and resave. Hopefully this solves your problem!

---
Tags: civimail, smtp
---


# Question
Title: Can I use localhost:7979 for amp test and one or more different builds created with buildkit?
After running `amp config` and `amp test`, I successfully created a `drupal-clean` build using `buildkit` and `civibuild` on `localhost:7979`, and added a bunch of extensions, etc.

I turned off my Ubuntu 19.04 laptop, and booted up the next day. However, at `localhost:7979` I received a lock error message. So I reran `amp test` to check everything, and the test passed. `amp test` also uses `localhost:7979`.

Now, at `localhost:7979` I see

```
Error: Expected GET or POST value 'exampleData=foozball' Error: Failed to write /home/joe/.amp/canary/data/DSEGrMDEi4ocNQRuBOo4IbE2e73MaT8M/example.txt Error: Failed to remove /home/joe/.amp/canary/data/DSEGrMDEi4ocNQRuBOo4IbE2e73MaT8M/example.txt

```

I ran `curl http://localhost:7979/index.php` and get the same result as immediately above.

I ran `sudo lsof -i :7979` and get this result:

```
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
apache2 16634     root    7u  IPv4 507012      0t0  TCP localhost:7979 (LISTEN)
apache2 16635 www-data    7u  IPv4 507012      0t0  TCP localhost:7979 (LISTEN)
apache2 16636 www-data    7u  IPv4 507012      0t0  TCP localhost:7979 (LISTEN)
apache2 16637 www-data    7u  IPv4 507012      0t0  TCP localhost:7979 (LISTEN)
apache2 16638 www-data    7u  IPv4 507012      0t0  TCP localhost:7979 (LISTEN)
apache2 16639 www-data    7u  IPv4 507012      0t0  TCP localhost:7979 (LISTEN)
apache2 16716 www-data    7u  IPv4 507012      0t0  TCP localhost:7979 (LISTEN)

```

In the results above, the first process is running as `root`, not `www-data`. Do I just need to kill that process? Something else?

Thanks for any guidance!

# Answer
So I figured out the real problem is that I created a build using `mysql_ram_disk` instead of `mysql_dsn` in `amp config`\- meaning the mysql database is in RAM, and of course disappears when I turn off my laptop :) .
> 2 votes

---
Tags: civicrm-buildkit, civibuild
---


# Question
Title: CiviCRM Groups Sync Plugin for Wordpress - No access to Settings
I installed the CiviCRM Groups Sync Plugin after finding the CiviCRM Member Sync plugin is not currently syncing to the WP Groups.

It was all working and I set up a 'Guests' group in CiviCRM to sync to WP and it created the group 'Guests' in Wordpress. So that worked.

However, I registered as a Guest user via CiviCRM profile (which includes a create WP user account form) and was added to the Civi Guests group but not the WP Guests group.

I was just added to the default 'Registered' Group.

And now I've discovered I cannot access the CiviCRM Groups Sync plugin's Settings page. I get the dreaded '**Sorry, you are not allowed to access this page.**'

This is the page being accessed https://somesite.com/wp-admin/options-general.php?page=civicrm\_groups\_sync\_parent

I'm logged into WP as Administrator.

I'm not seeing any errors in the PHP error log, and have WP DEBUG on but not showing any errors.

Help!

Cheers, Tracy

UPDATE:

UPDATE: Also, this plugin does not really help with removing the user when their Civi Membership lapses. So really the member sync plugin would be ideal as it works with the differing Civi Membership states.

# Answer
> -1 votes
In case anyone else is wondering, the Settings link in the plugin (shown in the screenshot in my original question) is an unused link (at the present).

I will post a separate question on why the Groups sync plugin is only syncing when a contact gets manually added to a Civi Group.

# Answer
> 4 votes
> I registered as a Guest user via CiviCRM profile (which includes a create WP user account form) and ... \[snip\] ... now I've discovered I cannot access the CiviCRM Groups Sync plugin's Settings page

I can't be entirely sure, but I think you may have been confused by the process of registering "as a Guest user via CiviCRM profile". When you do this and create a user account at the same time, CiviCRM will *automatically log you in as that user*. (FWIW that's one reason I don't use this functionality since there's no way to prevent that from happening) If you subsequently browse your WordPress site *as that user*, you'll find (depending on the default user role you have set) that you cannot access parts of it. You'd need to log out of WordPress and log in as your admin user to restore your capabilities.

> Also, this plugin does not really help with removing the user when their Civi Membership lapses. So really the member sync plugin would be ideal as it works with the differing Civi Membership states.

As I said in response to another question of yours on SE, this is on my to-do list. Please be patient and remember that the joy of free software is that it's free. My time, on the other hand, is limited - especially in the summer holidays. Luckily for you, funding has indeed been found and set aside to implement this - when I have the time to do so!

# Answer
> 0 votes
I would check the overall Wordpress permissions for Civi and make sure the permissions are correct. I would also check to see if APIv4 extension is installed. I'm finding a couple of Civi extensions do not function if APIv4 is active.

# Answer
> 0 votes
`Also, this plugin does not really help with removing the user when their Civi Membership lapses. So really the member sync plugin would be ideal as it works with the differing Civi Membership states.`

If you use the Members plugin alongside Christian Wach's CiviCRM Wordpress Member Sync - you could achieve what you are trying to achieve.

---
Tags: wordpress
---


# Question
Title: CiviRules action only after completed payment for new membership
I need to trigger an action after membership is added, but only after the payment has been made (or registered by admin, because I have the option for online payment as well as "offline" money transfer).

If I use "membership is added" trigger, the action is fired even if the user chose the deferred option. I tried to limit it with "membership status" condition, but then it didn't fire at all (I guess the status isn't ready yet at that point).

Is there a way to achive that in CiviRules?

Edit:

A word about my wokflow, which is rather simple: I have different levels of membership (including a free one) and an option to pay online or offline. After a valid membership has been recorded (free, paid online or checked as paid by admin) I use a CiviRules action to create an account in an external (for CRM) system. And that's why I want only valid (active) memberships to trigger that action. I thought it would be a common and simple case :)

# Answer
I'm not quite sure what your workflow is, but I think you will need to use the "Membership is changed" trigger for when the payment is made and the conditions for status changes. If the status goes straight to "new" for the offline route you probably need to use the "Membership is added" trigger with appropriate conditions. You need to map out the logic of it all and it can be a bit complex.
> 3 votes

# Answer
It might well be that this turns out to be a situation that you can not solve with the current set of conditions. It is possible though to develop your own conditions (or have someone develop them for you).

Some conditions would be generic and could be part of the CiviRules extension as it will help other users too, others can be specific for a certain organization and reside in their own specific extension. I work with quite a few organizations that develop their own specific conditions and actions.

Documentation on how to create your own condition and actions can be found here: https://docs.civicrm.org/civirules/en/latest/create-your-own-condition/
> 1 votes

---
Tags: civimember, civirules, payment
---


# Question
Title: Event Contribution page missing trxn_id in template Contribution.tpl
Not sure when this started-the Cancellation or Refund Information block is supposed to contain cancel/refund date, a note and transaction id: the Smarty template has the code: {$form.refund\_trxn\_id.label} {$form.refund\_trxn\_id.html} but it isn't shown - this is also the case in the latest Wordpress Sandbox, if you change a contribution status to cancelled or refunded, the trxn\_id box should be shown. I tried simply clearing templates to force recompile but that doesn't help.

# Answer
It seems to depend on whether there was a transaction id set on the initial contribution. If there was one on the initial contribution then I see the refund trxn id on the refund. If there wasn't one on the initial contribution then I don't see a refund trxn id on the refund. This seems to be the same even in 5.5 as well as the public demo.
> 0 votes

# Answer
Edit templates/CRM/Contribute/Form/Contribution.tpl, lines 201-204: {$form.trxn\_id.label} {$form.trxn\_id.html} (replace $form.refund\_trxn\_id with $form.trxn\_id - the existing trxnID if it exists will be shown initially and can be substituted with a refund trxn id. Save and view to verify)
> 0 votes

---
Tags: civicontribute
---


# Question
Title: Using CIVICRM to manage a Fundraising Dinner
We run a fundraising dinner once a year, approx 400 people, mainly couples. what would be the best way to a: set up an event that we can enter couples as contacts (we have to write to them post dinner) B: is it event or campaign C: report that shows total raised, amount outstanding and amount paid D: report as C but showing names

Thank you and sorry if its simple as new to this

# Answer
It might involve both an event and a campaign. You can set up a campaign with a financial goal, etc. and then create an event for the dinner itself that is tied to that campaign.

If you're using Backdrop or Drupal you can use Webform CiviCRM to set up a registration form that allows entry of both contacts, flexible webform-style payment options, and can also connect them via a relationship. With a core registration form you could allow the user to register multiple people, which could work depending on your pricing structure.

For reports, you can use core reports or custom searches to filter on that event or campaign specifically.
> 2 votes

---
Tags: civievent, civireport
---


title: How to develop a very simple Extension

text:
# Question
Title: How to develop a very simple Extension
I want to develop a very simple Extension which :

* searches the current contact\_id
* then verifies if he is recorded for a given event (event\_id as a parameter)
* then, depending on the result, echoes a message or opens an URL.

I read that, to develop an extension, I first had to :

* install Civix,
* which requires installing first git and composer ... which seems very complicated to me for such a simple program.

Is there a way to write and upload directly the code in the Extension directory, whithout all these prerequisites ?

# Answer
git and composer aren't necessary to install civix. In the README it suggests multiple ways to install civix. The first one is a simple download: https://download.civicrm.org/civix/civix.phar.
> 2 votes

# Answer
Yes, you could also just create a folder with the name of your extension in the extension folder of CiviCRM, and code from there. But that requires you to understand the folder and file structure required for extensions so it will actually be easier with civix. It is not a prerequisite but it helps a lot!
> 1 votes

---
Tags: extension
---


# Question
Title: CiviMobile: Can't log into CiviCRM using CiviMobile
I installed:

* CiviMobile extension in CiviCRM;
* CiviMobile app on Android.

When I try to login using mobile browser, CiviCRM works. Loging in with same credentials in CiviMobile app does not work, it says: Sorry. We were not able connecting your CiviCRM server.

Logging into the demo server works.

# Answer
There could be few reasons: 1. Please check the correct extension is installed. You need to install *CiviMobileAPI* extension (https://civicrm.org/extensions/civimobileapi), not CiviMobile. You can find installation steps here https://civimobile.agiliway.com/#how-to-start.

2. What CMS do you use?
    * If you use Drupal or Joomla then there should be no problem. Please check that you specify proper URL paying attention to http/https and www or without www.
    * if you use WP then there is a bug in core CiviCRM API which prevents API works correctly. Please start reading here for more details https://github.com/civicrm/civicrm-core/pull/12813#issuecomment-428152827
    As an immediate solution, we are preparing API fix patch WP clients. It will include our quick fix and instruction how to install in. Please write us at civicrm@agiliway.com IF you use WP.

If it still does not work then please write us (civicrm@agiliway.com) so we can investigate the problem.

Thank you, Sergiy
> 4 votes

# Answer
I had a similar problem with Drupal - but after updating the extension and the app to the latest version 4.1.1 the app works like a dream :-)
> 1 votes

---
Tags: extension
---


# Question
Title: SOLVED CiviMobile won't login "please install CiviMobile in your CiviCRM"
When I try to use CiviMobile on my phone to login to CiviCRM I get error "Please install CiviMobile extension in your CiviCRM".

* Drupal7.67 / CiviCRM 5.12.2 / php7.2 / Running on Aegir
* Installed CiviMobile 4.0.1 on my Android phone from Play Store and can successfully log in to the demo.
* installed CiviMobileAPI v4.0.2 from the repository and it reflects as installed.
* Installation directory is /data/disk/xxx/static/platforms/platform\_name/sites/collaborate2019.co.za/files/civicrm/ext/com.agiliway.civimobileapi
* CiviCRM/Administer/CiviMobile settings reflects that the extension is up to date
* Login username and password and website URL https://collaborate2019.co.za are correct (when I tried https://collaborate2019.co.za/civicrm it gave me "Server API error")

Any ideas what I can try?

# Answer
The Civimobile team was great. After updating the extension and app to the latest version 4.1.1 the app works like a dream.
> 3 votes

# Answer
our discussion is here https://github.com/agiliway/com.agiliway.civimobileapi/issues/30

Let's continue in github.
> 0 votes

---
Tags: civimobile
---


title: Civicrm Failed upgrade

text:
# Question
Title: Civicrm Failed upgrade
Have Civicrm 5.12.4 and wished to upgrade to 5.14.0

On running database upgrade part failed right at the end with:

> An error has occurred. 0 Class 'CRM\_Sparkpost' not found

When checking sparkpost with Civi menu: Super User-\>Configure CiviCRM-\>System Settings-\>Outbound Email(SparkPost) failed to take me to the SparkPost menu

So, disabled and then re-enabled the SparkPost exstension. Now the SparkPost menu above works.

Although the above seemed to work, CiviCRM still complained about needing an update to 5.14.0, despite it reporting that version at the status line at the bottom.

So, decided to test upgrade again from scratch, using a copy of today's live database - this time disabling SparkPost extension first.

Now the database upgrade just stops immediately with message:

> \[Executed: Cleanup old files
>
> CiviCRM is now broken!

Tried again from scratch without first disabling SparkPost - same problem.

Any ideas?

ubuntu server 16.04.1 php 7.1.30 Joomla 3.9.6 CiviCRM 5.12.4

# Answer
> 0 votes
To confirm this is now fixed in the latest version available of the sparkpost extension available here: https://github.com/cividesk/com.cividesk.email.sparkpost

---
Tags: civicrm-home
---


title: Contact types not updating

text:
# Question
Title: Contact types not updating
When editing or disabling Individual and Organization contact types, the main menu doesn't update the contact type. For example I disabled Student, Parent and Staff for Individual. The options under Contacts \> Individuals \> are still New Student, New Parent, and New Staff.

I have checked this forum and found that there is already one question regarding this subject telling that it is a bug. I have upgraded to the very last version (5.17) and have the demo contacts records charged in the CiviCRM instance I use (under WP).

Any idea ? Thanks in advance

# Answer
> 1 votes
Found that the menu should also be edited in Administer -\> Customize... -\> Navigation Menu then Delete or Disable the inactive menu items Sorry for that but documentation should be clearer ;-)

---
Tags: contacts, configuration
---


# Question
Title: Email processor silently truncating anything after an emoji in inbound emails
A related question is Has anyone used Emojis in CiviMail subject/body? and the answer is to change the database to use utf8mb4 which is going to be standard in CiviCRM in upcoming versions, but using utf8 currently I'm seeing that depending on the database (e.g. mysql vs. mariadb) and version (e.g. mysql 5.5 vs 5.7) it can fail noisily or can fail silently and just truncates anything after the emoji. So this is partly a PSA in case others haven't noticed silent fails.

I was able to run this grep on the sites/default/files/civicrm/custom/CiviMail.processed folder (drupal - adjust as needed) to locate at least some candidates that have been truncated, but I doubt there's a way to then automate updating the activities in civi. If I find one will post back here.

`grep -r "=F[0-7]=[0-9A-F][0-9A-F]=[0-9A-F][0-9A-F]=[0-9A-F][0-9A-F]" sites/default/files/civicrm/custom/CiviMail.processed`

# Answer
> 2 votes
For those looking for a workaround for this issue, we created a tiny extension called Multibite which replaces unsupported multi-byte characters with the Unicode replacement character (or any other character, depending on configuration). We did not want to pollute core with this code as the goal should be to support utf8mb4, after which the extension becomes obsolete.

I should note that we aren't running this in production yet, so it hasn't seen much real-world testing.

---
Tags: email, activities
---


# Question
Title: CiviRules - When does the 'Membership Payment Added' trigger fire?
I am using CiviCRM 5.13.4 and CiviRules 2.9.

I am using CiviRules to send an email to Contacts when they sign up for a Membership, but do so using 'Pay Later', to remind them how to pay etc. The sign-up is via a Webform, but I'm not sure that matters.

The rule is set up to fire on 'Contribution Added', tests for the 'Pending' status and sends the Email - which all works OK. The email uses a Template which contains (custom) tokens which fill in the Membership Type and Price into the text to be sent.

If I test this Template in a static environment, i.e. some time after the payment was made it works correctly, but when triggered by the Rule those Tokens just return empty. I strongly suspect that this is because when the rule fires the Contribution record has been added to the database, but the Line Items which connect it to the Membership information have not yet been created.

When does the 'Membership Payment Added' trigger fire, and would it solve my problem? Or is there another way?

Thank You.

# Answer
I had this issue too with event registrations, I added a five minute delay to the civirule and it seemed to clear up that issue.
> 2 votes

# Answer
The MembershipPayment Added trigger should fire on the post hook, which might in some cases (notably the memberships and cases) mean the data is not complete yet (see this issue: https://lab.civicrm.org/extensions/civirules/issues/21).
> 1 votes

---
Tags: civimember, civirules
---


# Question
Title: Strange Text Appearing in Contact Address Area
My CiviCRM installation is showing weird text around the address area of each contact entry.

The weird text disappears when I try to edit the address, but when I finish the edits the weird text appears again.

I have no idea what could be causing this issue. I have the latest version of CiviCRM and Wordpress installed.

# Answer
I began to import the database in pieces to a new installation to see if I could pinpoint where the issue might be coming up in the database. I found that the problem was with the civicm\_setting table. There was a row added for address formatting that had the weird characters in it. I deleted the row and the problem disappeared.
> 2 votes

# Answer
Maybe you have some hidden characters in your address - this can for example happen during an import?! You could try cutting the text and then paste it without formatting again using CTRL+SHIFT+V.
> 1 votes

---
Tags: wordpress, contacts, database, addresses
---


# Question
Title: Summaryfields Extension - 'Largest Contribution' includes Test contributions
Summary Fields v. 4.0.2 CiviCRM v. 5.16.3 Drupal 7

Our solution is clear - remove the test transactions. Also, end users won't have any test contributions so it won't be a problem for reporting for them.

However, Summary Fields seem to be including contributions that are marked as test - for instance, test event registrations. On the contribution tab, they are clearly marked as "Financial Type (test)".

# Answer
The developers fixed it in the master branch, if anyone comes across this: https://github.com/progressivetech/net.ourpowerbase.sumfields/issues/63
> 3 votes

---
Tags: summaryfields
---


title: Formatting profile forms

text:
# Question
Title: Formatting profile forms
I'm looking for advice on formatting how my profile and event registration forms are displayed. In particular the positions of labels, pre/post form help etc. Is there a general guide to changing how these are displayed?

Cheers.

# Answer
These can be controlled by CSS. CSS is a generic skill for positioning elements on web pages, and CSS-specific questions are out of scope for this Stack Exchange, but there are many CSS tutorials on the Internet. To add custom CSS to CiviCRM, you can upload a file and designate it via **Administer menu \> System Settings \> Resource URLs** and fill in the **Custom CSS URL**. Your CMS should also have a way to include custom CSS, which is also an option.
> 2 votes

---
Tags: profile, forms
---


# Question
Title: Only configuration works — Fatal memory error on Drupal8 install
I'm trying to set up civicrm on a working drupal8 install and after the composer commands and a few of the suggested tweaks (like path setting), it *seems* to work ok. I can access the backend configuration and set everything.

However trying to view the main civi backend (/civicrm), php bails out:

> PHP Fatal error: Allowed memory size of 1048576000 bytes exhausted (tried to allocate 1036009472 bytes)

As you can see, I already tried with an absurdly high (1G) limit to no avail. -1 instead causes a 503, which I imagine is from the host killing it or something similarly gruesome.

Civi 5.17.4 works on the same server in a joomla3 install from which I wanted to port away, but checking if a brand new civi works on its own first seemed like a good idea. Any suggestions?

Thanks @Demerit, it appears the internal log is of some use, though I'm afraid to ask how a failed SQL query can leak into oblivion. `civicrm_dashboard_contact` is currently empty.

```
Sep 14 18:14:40  [info] $backTrace = #0 webroot/vendor/civicrm/civicrm-core/CRM/Core/Error.php(952): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 webroot/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 webroot/vendor/civicrm/civicrm-core/packages/DB.php(987): PEAR_Error->__construct("DB Error: constraint violation", -3, 16, (Array:2), "INSERT INTO civicrm_dashboard_contact (dashboard_id , column_no , is_active )...")
#3 webroot/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-3, 16, (Array:2), "INSERT INTO civicrm_dashboard_contact (dashboard_id , column_no , is_active )...")
#4 webroot/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -3, 16, (Array:2), "INSERT INTO civicrm_dashboard_contact (dashboard_id , column_no , is_active )...", "DB_Error", TRUE)
#5 webroot/vendor/civicrm/civicrm-core/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
#6 webroot/vendor/civicrm/civicrm-core/packages/DB/mysqli.php(933): DB_common->raiseError(-3, NULL, NULL, "INSERT INTO civicrm_dashboard_contact (dashboard_id , column_no , is_active )...", "1452 ** Cannot add or update a child row: a foreign key constraint fails (`eb...")
#7 webroot/vendor/civicrm/civicrm-core/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 webroot/vendor/civicrm/civicrm-core/packages/DB/common.php(1229): DB_mysqli->simpleQuery("INSERT INTO civicrm_dashboard_contact (dashboard_id , column_no , is_active )...")
#9 webroot/vendor/civicrm/civicrm-core/packages/DB/DataObject.php(2415): DB_common->query("INSERT INTO civicrm_dashboard_contact (dashboard_id , column_no , is_active )...")
#10 webroot/vendor/civicrm/civicrm-core/packages/DB/DataObject.php(1040): DB_DataObject->_query("INSERT INTO civicrm_dashboard_contact (dashboard_id , column_no , is_active )...")
#11 webroot/vendor/civicrm/civicrm-core/CRM/Core/DAO.php(572): DB_DataObject->insert()
#12 webroot/vendor/civicrm/civicrm-core/api/v3/utils.php(1363): CRM_Core_DAO->save()
#13 webroot/vendor/civicrm/civicrm-core/api/v3/utils.php(1305): _civicrm_api3_basic_create_fallback("CRM_Contact_BAO_DashboardContact", (Array:5))
#14 webroot/vendor/civicrm/civicrm-core/api/v3/DashboardContact.php(54): _civicrm_api3_basic_create("CRM_Contact_BAO_DashboardContact", (Array:5), "DashboardContact")
#15 webroot/vendor/civicrm/civicrm-core/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_dashboard_contact_create((Array:5))
#16 webroot/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#17 webroot/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest((Array:9))
#18 webroot/vendor/civicrm/civicrm-core/api/api.php(44): Civi\API\Kernel->runSafe("dashboard_contact", "create", (Array:5))
#19 webroot/vendor/civicrm/civicrm-core/CRM/Core/BAO/Dashboard.php(211): civicrm_api3("dashboard_contact", "create", (Array:5))
#20 webroot/vendor/civicrm/civicrm-core/CRM/Core/BAO/Dashboard.php(147): CRM_Core_BAO_Dashboard::initializeDashlets()
#21 webroot/vendor/civicrm/civicrm-core/CRM/Core/BAO/Dashboard.php(159): CRM_Core_BAO_Dashboard::getContactDashlets()
#22 webroot/vendor/civicrm/civicrm-core/CRM/Contact/Page/DashBoard.php(47): CRM_Core_BAO_Dashboard::getContactDashletsForJS()
#23 webroot/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(290): CRM_Contact_Page_DashBoard->run((Array:1), NULL)
#24 webroot/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#25 webroot/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:1))
#26 webroot/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke((Array:1))
#27 webroot/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(75): Drupal\civicrm\Civicrm->invoke((Array:1))
#28 [internal function](): Drupal\civicrm\Controller\CivicrmController->main((Array:1), "")
#29 webroot/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array((Array:2), (Array:2))
#30 webroot/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#31 webroot/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#32 webroot/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext((Array:2), (Array:2))
#33 webroot/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#34 webroot/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#35 webroot/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#36 webroot/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#37 webroot/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#38 webroot/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#39 webroot/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#40 webroot/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#41 webroot/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#42 webroot/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#43 webroot/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#44 {main}

```

Disabling default dashlet addition gets me the dashboard, however there is still no civi menu or sidebar, so it remains useless.

# Answer
Found the underlying issue:

* you definitely need to do a CMS contact sync immediately after install
* your CMS user also needs an email set or she will not get imported in the sync \<-- this was key

Civi just doesn't think you're the admin that you are otherwise.
> 2 votes

---
Tags: php, drupal-8
---


# Question
Title: Error when updating Stripe: Trait 'CRM_Core_Payment_MJWTrait' not found
I have just updated Stripe to version 6

It requires a Data Base update

But when I run this update, I get : \[Error: Upgrade com.drastikbydesign.stripe to revision 5023\] Error 1: Trait 'CRM\_Core\_Payment\_MJWTrait' not found in /home/bapaparoisse/www/www/sites/default/files/civicrm/ext/com.drastikbydesign.stripe/CRM/Core/Payment/Stripe.php, line 13

# Answer
> 3 votes
There's a new requirement listed in the Stripe CiviCRM documentation for version 6.0. You also need the MJWShared extension.

---
Tags: stripe
---


# Question
Title: I am receiving a "Network Error: Unable to reach the server" error when I try to edit a contact via "edit address" button
When I use the "Show Javascript" console, the following error line has appeared: "Failed to load resource: the server responded with a status of 403 (Forbidden)" followed by this url: "http://www.domainname.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fajax%2Finline"

Running CiviCRM 5.17.3 via Wordpress

ConfigAndLog reveals nothing.

# Answer
Given that it's a 403 error, I would check to see if WordFence (or similar "security" plugin for WordPress) is the cause by temporarily disabling it (ideally on a test site). If you're using Apache, it may be a rogue .htaccess file causing the problem.
> 3 votes

---
Tags: contacts
---


title: No CiviCRM Menus on WordPress

text:
# Question
Title: No CiviCRM Menus on WordPress
I just installed CiviCRM v5.16.2-wordpress on a WordPress site running WP 5.2.2 Everything seems to be working but I do not have any menus on the top bar. I can get to the Administer CiviCRM screen and have tried different menubar positions under Display Preferences, but still nothing. I am sure I have messed up some setting, but am brand new and have no clue. Thanks for any help.

**UPDATE 8-22-2019**

Jon G. I followed your suggestions.

I cleared the cache and received this message:

Still no menus.

Checked the Resource URL setting and it is correct.

Tried a different theme, no luck.

Went to the Developer's Tools in my Firefox browser and saw mostly 200s and one 404. Here is a screenshot of that 404 error

Looking at the error details, I went to the location of the file in my hosting File Manager and the file is there (along with several others)

Suggestions for what else I can try? Thanks.

**UPDATE: 8-23-2019**

Well, I've been trying different things. I went into Debugging from the Adminster CiviCRM screen, turned on debugging and switched to Development mode. When I saved those changes, the menubar appeared. If I switch back to Production mode they disappear.

# Answer
I would try clearing caches (click **Cleanup Caches and Update Paths** on the admin menu). I would also check your Resource URL to make sure it's correct (click **Resource URLs** on the admin menu).

I would also try using one of the built-in themes (e.g. "twentynineteen") to rule out a badly-behaving theme.

Finally, I would try bringing up your browser's Developer Tools (press "F12"), heading to the **Network** tab, and reloading the page. If you see any *404*, *403*, *500* errors - really, anything besides a *200* \- please update your question with those details. Also note that you'll want to do a hard refresh of the page in between the first two steps - that's **Ctrl-Shift-R** on Windows/Linux, and **Cmd-Shift-R** on a Mac.

**UPDATE:** Looking at the request URL in your screenshot, that looks pretty squirelly. I very much doubt thaat's the correct URL. That says to me that there's probably something wrong with your Resource URL. Is it possible that you're using a symlink ("alias") in your file path? If so, try to fix any paths defined either in **Administer » System Settings » Directories** or in `civicrm.settings.php` to use the equivalent non-symlinked path.
> 5 votes

# Answer
OK, I am not sure what is actually causing the problem, but I believe it is related to file and resource paths. The site that I installed CiviCRM on is a subdomain. I use that site as a Sandbox to test things before going to the main site. I installed CiviCRM on the main WP site at our domain and the menus appear fine. On the Sandbox site, since I can put the site into Development mode and the menus appear, I am not going to spend anymore time on getting to the root of the issue.

Thanks for the suggestions.
> 2 votes

# Answer
I 'fixed' this on my sandbox WordPress installation by:

1. Uninstalling CiviCRM.
2. Doing a fresh install of the latest CiviCRM version.
3. Installing my extensions.
4. Restoring a copy of my production database.
5. Upgrading the database.
6. Clearing the Caches and rebuilding the menus.
> 2 votes

---
Tags: wordpress, menu
---


# Question
Title: CiviCRM on Debian 10 gives warning about PHP MySQL Driver (libmysqlclient)
Recently moved my CiviCRM install to a server running Debain 10 which brings:

* php7.3
* MariaDB 10.3.17

Everything seems to be working fine, except that in the system checks I'm now seeing this error/warning:

> **PHP MySQL Driver (libmysqlclient)**
>
> It is recommended, though not yet required, to upgrade your PHP MySQL driver (libmysqlclient) to \>= 5.5.3 for utf8mb4 support.

The check seems to get its info from mysqli\_get\_client\_info which on my server emits the following:

```
mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23

```

This is surprising - 5.0?! What to do?

# Answer
> 2 votes
Thanks to @Dermerit, the answer seems to be to upgrade!

This code change: https://github.com/civicrm/civicrm-core/pull/14864/files

Seems to have removed the erroneous warning.

---
Tags: php, mysql, webserver, system-status
---


# Question
Title: How to suppress translation of months (or all fields) in receipts?
My platform: CiviCRM 5.16.3 on Drupal 7.6.7 PHP 7.2 CentOS 7. Drupal language is English. CiviCRM l10n installed and selected my own languange zh\_TW Chinese(Taiwan).

At receipt print-outs CiviCRM does all the translation it could, but I want the English version of dates e.g. Sep by %b, not my local language. (Because English dates are more universally understood.) In particular, how can I suppress translation at particular Smarty tag e.g. {$receive\_date}?

If translation cannot be suppressed for some fields can I suppress translation for the whole printout?

I cannot find any trace of Month names translation in Drupal or CiviCRM localization files.

Thank you for your help.

Best Regards.

# Answer
Welcome to CiviCRM SE KLeeHK! I am not sure if you can suppress the translation of *particular* Smarty tags e.g. {$receive\_date} or change the date format of only this occurence. The receipts can be edited under "System Workflow Message Template which you can find under "https://yoururl.com/civicrm/admin/messageTemplates?reset=1"

However, you can globally change your date formats under "https://yoururl.com/civicrm/admin/setting/date?reset=1".

I hope that helps.
> 3 votes

---
Tags: receipts, smarty, localisation, dates
---


title: Civix: command not found

text:
# Question
Title: Civix: command not found
I have downloaded, then uploaded civix.phar to my www/www directory (where Drupal is installed).

Now, if I run civix civicrm:ping (from this www/www directory), the answer is :

-bash civix: command not found

(I also tried civix.phar civicrm:ping : I get the same answer) (I also tried from other directories : I get the same answer)

I am not a linux expert ; what am I missing ? (permission is 775)

# Answer
Use either `php civix.phar` or `./civix.phar` or first update your PATH:

`set PATH=$PATH:/path/to/folder/where/you/downloaded/it`
> 0 votes

# Answer
It was a php configuration issue, now solved by my hoster ; I must use php civix.phar command, and it works now.
> 0 votes

---
Tags: drupal, civix
---


# Question
Title: CIVICRM Update to 5.13.5 triggers 'CiviCRM requires PHP 7.0.0' on PHP56
I am trying to move a CIVICRM installation up to the 'last' PHP56 supported release which I believe its 5.13.5 however it triggers the PHP7 check expected from 5.14 onwards?

So after running: drush civicrm-upgrade-db I get:

> CiviCRM requires PHP 7.0.0+. Drush is running PHP 5.6.40.

Is this expected on 5.13.5?? Any help appreciated.

No mention of a PHP7 requirement on the patch notes: https://github.com/civicrm/civicrm-core/blob/master/release-notes/5.13.5.md#synopsis

# Answer
> 1 votes
Had to move just to 5.13.4 as that is the last 'supported' version. 5.13.5 doesn't but no information is given to suggest it's incompatible on patch notes.

Will test and move it up from this version :).

---
Tags: upgrade
---


# Question
Title: how to remove blank rows in constituent summary report?
Civi 5.15.1, Wordpress 5.2.3

When I run a Constituent Summary report having selected the default columns (none) and default filter (deceased=No), I get a page and a half of squished, blank rows at the beginning. Some filters remove them, other filters don't. Not sure what other info may be relevant. Does anyone know the cause and solution, or could advise how to troubleshoot? I'd prefer not to have to figure out a workaround using the Search functionality. Thanks!

# Answer
Selecting the Contact ID and Date Modified columns unsquished the rows, so I was able to delete the offending Contact IDs from civicrm\_contact using phpMyAdmin, without triggering any FK violations. The report now looks normal, though I'd still be curious to know how 85 null contacts got added (all at once). Has anyone come across this before?
> 2 votes

---
Tags: reports
---


title: how to retrieve non-grouped contacts?

text:
# Question
Title: how to retrieve non-grouped contacts?
Civi 5.15.1, Wordpress 5.2.3

I'm trying to get a list of all contacts who are not in any group (Smart or otherwise). I've done this two ways, with the same result: the first is by filtering the Constituent Summary report, and the second is using the Search Builder.

In either case, when I set the Group(s) filter to 'Is Empty', I get this message: "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred."

And when I set the Group(s) filter to 'Is Null' (available via Search Builder only, not the report), the resulting list includes contacts who are in Smart Groups, whom I want to exclude.

I'd prefer not to use the Import Contacts workaround provided by Nicholai here: How to find contacts with no group?

And @Xavier's extension based on it does not seem to be available anymore (https://civicrm.org/extensions/lonesome-find-contacts-without-group).

Does anyone have any other ideas? Thanks!

# Answer
If this is a one off exercise, you can use the advanced search to select all the contacts are in any group (just keep adding all your groups to the group selection box) and create a new group "in any group". Then use the include/exclude custom search to exclude all the contacts on the "in any group" group. Then you can add them to a "not in any group" group.

Actually you could probably do it straight from include/exclude custom search.
> 4 votes

---
Tags: groups, smartgroups
---


title: What are the cookies used by CiviCRM?

text:
# Question
Title: What are the cookies used by CiviCRM?
Given the need in the EU to provide information about the cookies that a given site uses, is there any information available at CiviCRM (and maybe its extensions ecosystem) about the cookies that CiviCRM uses?

# Answer
I can't answer on behalf of CiviCRM LLC but I can say that the only cookie I see is the session cookie which just stores a session id. However the session object on the server that matches that id has many things in it, but in any case the purpose within the code is usually to provide functionality, such as the recent history list in the sidebar, or even just basic access control.

What a system administrator might also do with the cookie would be specific to the site.
> 2 votes

# Answer
Google "Cookie Checker" There are several sites out there that offer GDPR cookie compliance. They generally offer a free test for your domain that will tell you if you are using cookies.
> 1 votes

---
Tags: gdpr, privacy, cookies
---


# Question
Title: What data fields are available to me at receipt template
My CiviCRM 5.16. When I try to add fields to receipt template, I discovered that I could add {$line.contribution\_id} which shows the record ID of the contribution. But adding {$line.creditnote\_id} (which is also a field in table civicrm\_contribution) shows nothing.

How can I know (or change) the data fields that are available for me to show on the receipts?

Thank you.

# Answer
In the message template, put this in the `<body>` section of the html format section and then send yourself a contribution receipt.

```
{assign_debug_info}
<table id="table_assigned_vars">
    {section name=vars loop=$_debug_keys}
        <tr class="{cycle values="odd,even"}">
            <th>{ldelim}${$_debug_keys[vars]|escape:'html'}{rdelim}</th>
            <td>{$_debug_vals[vars]|@debug_print_var}</td></tr>
    {/section}
</table>

```

This does basically the same thing as using `{debug}` in regular smarty templates to see the variables in the UI.
> 3 votes

---
Tags: civicontribute, receipts, templates, fields
---


# Question
Title: cron on drupal8: can't handle separate paths for vendor and library
The Sysadmin guide lists several methods to run the internal cron. On the previous site we used the http method, but now on drupal8 neither this nor calling cli.php works.

It seems a bit obvious, since some files by design remain in vendor/ and the rest are in the web visible \[civicrm.files\] path. JonG has a related note in his install instructions, but the PR wasn't merged, plus it seems to just tackle the composer plugin. I tried with the file anyway, but it didn't help much. It silences the error for `bin/csv/export.php`, but it still doesn't work. Nothing changed for cli.php and the http method still returns a unix return status of 8.

Any ideas? How do you run it on your drupal8 site?

# Answer
> 2 votes
I use `cv` to run cron on D8, e.g.:

```
12,27,42,57 * * * * /usr/local/bin/cv --cwd=/var/www/crm.mysite.org/web --user=admin --quiet api job.execute

```

# Answer
> 1 votes
It turns out `cv` is the only way to go on drupal8. Drush 9 is not supported yet and the web invocations don't work due to the split paths of the civi install.

If it only works for you when invoked directly and not from cron, check its output. I was hitting a somewhat buggy php test. You have to make sure php runs in cli mode.

EDIT: Official docs updated.

---
Tags: cron, drupal-8
---


# Question
Title: In CiviCRM 5.13.5 the new menu appears below the actual page or form
in CiviCRM 5.13.5 I get the CiviCRM menu below my main form/page even though I have specified that the menu should replace the website menu. (see screenshot)

# Answer
Fixed it by enabling clean url's in my local Drupal installation.
> 2 votes

---
Tags: menu, global-menu
---


title: CiviRules Menu Not Displaying

text:
# Question
Title: CiviRules Menu Not Displaying
After installing CiviRules on CiviCRM 5.11, the Rules menu does not display. We are running Drupal 7.67. Have flushed cache, etc.

# Answer
Are you also using a newer CiviRules. It used to have its own top level menu, but its now under Administer.
> 2 votes

---
Tags: civirules
---


# Question
Title: Priceset fields do not appear on CiviEvent form (field notes do) | Backdrop
Apologies if I am missing something fundamental here - I'm pretty sure I am, but just can't work it out: I have an event registration form for public. As admin user logged in, form appears fine. As public (no user login/private window) profile fields appear OK. However, priceset fields only show the field notes; field label, input field and price field do not appear.

Details of event form: \- Additional delegate registration in addition to self enabled; \- Simple profile with personal contact information and employer field from Organization \- Relatively detailed Priceset with field notes - all fields enabled for public \- usual Drupal/Backdrop civi permissions enabled for public event forms (profile create, custom data, register for events, view event info, view event participants) \- No payment processor (pay later only - invoices enabled).

CiviCRM 5.17.4 Backdrop 1.14 tested in Firefox and Chrome - same issue. environment: shared hosting (WebhostUK - Linux Business Cloud Webhosting)

Edit: adding screenshot

# Answer
> 2 votes
As had no data to speak of in db, dropped tables in Civi db and reinstalled CiviCRM. Replicated form and works as expected.

---
Tags: civievent, price-sets, backdrop
---


# Question
Title: Importing contacts and adding to a group also adds contacts with imported relationships to the same group
I'm importing a CSV of contacts with a relationship to other contacts and adding the new contacts to a group. To my surprise, the group ended up with more contacts than I had imported. I saw that all the contacts who had their contact id in the relationship column were also added to the group.

Bug that should be reported? Strange, but expected behaviour?

Specifically, in this case, the relationship was employee of and the employer contacts were of a different type.

# Answer
> 1 votes
This is strange behavior, but it's been the case for at least nine years and probably longer. I think that until the import is overhauled (work that is slowly but surely happening) we shouldn't change behavior out from under folks.

---
Tags: import, groups, relationships
---


# Question
Title: What is 'advanced report configuration' and when will it work?
I was updating a report when I noticed a link to 'advanced report configuration' (this was on release 5.13.5). Following that link I got a screen similar to the contact layout editor - but I couldn't make anything work. After an upgrade to 5.17.4 this link has disappeared. It looked very useful & interesting, allowing columns to have the title changed plus other stuff. I guess I stumbled on something that's not ready yet - or is this an extension I've missed? If not - any ideas when this will be implemented?

# Answer
> 5 votes
This is part of Extended Reports, and appears on some (not all) extended reports. Notably, it allows you to change the order of columns in your report. This works for me.

---
Tags: reports, 5.13
---


title: Event Report filter not working

text:
# Question
Title: Event Report filter not working
I am trying to create an event report but I am not able to filter a specific event in the Event filter, it shows as "None found" even when there are active events present and there is no error in the browser console. Kindly help me to fix the issue.

# Answer
It can be a good idea to clear all CiviCRM caches. You can do that using the url https://www.yourdomain.com/civicrm/menu/rebuild.

Regarding the logs, you can turn on logging and debugging in CiviCRM (https://www.yourdomain.com/civicrm/admin/setting/debug?reset=1) and then have a look at the log available in Drupal's UI first: https://www.yourdomain.com/admin/reports/dblog
> 0 votes

---
Tags: civievent, civireport
---


# Question
Title: Which version of Angular/AngularJS does CiviCRM use?
I'm working on learning Angular/AngularJS for use with CiviCRM and confused about which version I should be learning. How can I see which version CiviCRM is using?

# Answer
### How to check your Angular version

1. Go to the default Angular *base page* for your site at `http://example.org/civicrm/a`
2. Open a browser console
3. Evaluate `angular.version` within the console:

### Notes about Angular versions
> 3 votes

# Answer
With even version 5 of civicrm it is still using angular 1.5. I checked it on the demo site https://demo.circle-interactive.co.uk/civicrm/a

on the console i ran:

> angular.version, and it returned this :- {full: "1.5.11", major: 1, minor: 5, dot: 11, codeName: "princely-quest"}
> 2 votes

---
Tags: developer, angular
---


# Question
Title: Can you send an immediate thank you to a recurring donation?
I set up a recurring donation using authorize.net, have the IPN url configured, etc. However, when someone completes a recurring contribution they do not get an email right now, or even 10-15 minutes later.

I'm assuming that the email is generated by the IPN event from authorize.net, but they don't attempt the transaction until around 6am. (My first test had a bad URL for the callback).

Is there a way to acknowledge that the contribution commitment has been made with a somewhat immediate thank you email that can also spell out how future receipts will be delivered?

# Answer
> 3 votes
Alternatively you can use Civirules to send an automated email: https://docs.civicrm.org/civirules/en/latest/

# Answer
> 1 votes
You can set Schedule reminder to send emails for status Pending.

Cheers

Pradeep

---
Tags: recurring-contributions
---


# Question
Title: What's the correct way to log debug info to log?
The "current" wiki says to use `CRM_Core_Error::debug` and says, "Most runtime errors are logged here, as well as data that you explicitly write to log using the CRM\_Core\_Error::debug log=true parameter." However, if you set `$log = true`, that just does an echo.

An older version of the docs says to use `debug_var` \- and this works correctly, but seems duplicative, and isn't mentioned in the current docs.

Should the documentation be changed? Or should the code be refactored?

# Answer
> 2 votes
I use

```
Civi::log()->debug('my message')

```

to write to the log file.

# Answer
> 1 votes
There are two good questions here:

1. How to write debug info out while trying to debug something specific.
2. What kind of debug info to write out when writing an extension to help others who will be debugging stuff in your code later.

The first one is probably best handled with the debugging facilities you're used to, from whatever CMS you're using. I like Drupal's dpm() function in the devel module for easy industrial strength debugging.

The second one is probably what you're asking, and I'm glad you did because I don't know the right answer either. My own code is selfishly just checking the civicrm settings for user framework logging and debug settings and using drupal watchdog when it sees them on.

# Answer
> 1 votes
Had the same question in 2019 and from reading the source the answer is now `CRM_Core_Error::`debug\_log\_message().

---
Tags: developer, debugging
---


title: How to authenticate user in Spark

text:
# Question
Title: How to authenticate user in Spark
I'm using the spark version of civicrm and can set up CiviCRM contacts to be administrators, but am having trouble with user authentication (allowing users to log in).

The spark version runs under Drupal and I've read through the Drupal directions, and maybe it's me, but the drupal interface doesn't seem to be particularly transparent.

Does anyone know how to allow authentication, or even if this is possible?

# Answer
> 4 votes
Here is how to add new user accounts\* in the Spark interface (if you don't want to use the URL that Noah provides above).

**Step 1: Click the down arrow icon at the upper right of your screen.**

This will expose another menu.

**Step 2: Click "Manage Users" on that menu.**

This will take you to the the screen where you can add new users.

\*It might be helpful to review the difference between CiviCRM contacts and user accounts.

---
Tags: civicrm-spark
---


# Question
Title: Why is the billing name missing from the contributions email receipt?
Emails being generated from new members are now missing 'billingName'. I'm not sure when this happened, we are on 5.11.

The presentation of the output is

```
Billing Name and Address
<blank>
<billing address.

```

The form has billing\_first\_name and billing\_last\_name.

The template web/sites/all/modules/civicrm/xml/templates/message\_templates/contribution\_online\_receipt\_html.tpl

has

```
{elseif $amount GT 0}
   <tr>
    <th {$headerStyle}>
     {ts}Billing Name and Address{/ts}
    </th>
   </tr>
   <tr>
    <td colspan="2" {$valueStyle}>
     {$billingName}<br />
     {$address|nl2br}<br />
     {$email}
    </td>
   </tr>
  {/if}

```

# Answer
> 4 votes
The answer posted by Interlated can be problematic and display incorrect name if the contact doing the contribution has different name specific for billing fields. For Eg -

* A contribution page is created with profile = "Name and Address".
* When the page is visited online, the profile + billing profile is loaded on the form.
* User unchecks the option `My billing address is the same as above` and enters a different name and address for billing fields.

The `{contact.display_name}` will load the original contact name in the mail receipt instead of the expected billing name.

We've also come across this problem and saw some receipt missing the billing fields. This seems to be due to `name` field in `civicrm_address` table being set to NULL due to some reason.

Not yet sure how to replicate this, but below patch have fixed the problem for us.

```
diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php
index af3dbd233d..31f69c9996 100644
--- a/CRM/Core/BAO/Address.php
+++ b/CRM/Core/BAO/Address.php
@@ -504,6 +504,10 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address {
       $values = [];
       CRM_Core_DAO::storeValues($address, $values);

+      //Fill name of contact if empty.
+      if (empty($address->name) && !empty($address->contact_id)) {
+        $address->name = CRM_Contact_BAO_Contact::displayName($address->contact_id);
+      }
       // add state and country information: CRM-369
       if (!empty($address->location_type_id)) {
         $values['location_type'] = CRM_Utils_Array::value($address->location_type_id, $locationTypes);

```

# Answer
> 1 votes
The solution was to change the token from

```
{$billingName}

```

to

```
{contact.display_name}

```

Following

1. Administer \> communications \> message templates civicrm/admin/messageTemplates
2. System workflow messages
3. Memberships - Receipt (on-line). Change{$billingName} to {contact.display\_name} via the tokens picker

Run the membership test-run link.

---
Tags: civicontribute, receipts
---


# Question
Title: Webform- Existing contact- Contact ID option not returning results
I'm trying to build a webform to allow users to add contact details using the contact id, from existing contact

But the lookup doesn't seem to be working on the form itself, I enter a contact id of the corret contact type, and the fields refuse to fill.

Does the contact id option not act as a look up? Have I misconfigured something?

D= 7.65 Civi= 5.13.4

# Answer
> 3 votes
It’s not an autocomplete; it’s a lookup. So enter the contactid and then click elsewhere to leave the field.

When I implemented this I did so for Individuals and though theoretically it should probably mostly work for Households - I’ve never tested it as we don’t use Households with any of our clients.

---
Tags: webform-civicrm
---


title: Private content for event participant?

text:
# Question
Title: Private content for event participant?
My scenario is quite simple to explain :

When a person register on an event (paid or free), we would like to give him an direct access to private content (by email or by direct redirect) (like documents to download or links ..).

how do you achieve something like that in WP ?

---

Actually i'm thinking of using CIVI custom field in events, then checking in the single event template for the "participant" status.. OR do you think there's another smarter way ?

# Answer
I would use the CiviRules extension, you could structure it something like - if registered participant of 'X' event, send email of 'X' template.

With this you could just create an email template for each event within Civi with the links you would like them to access and it would automatically send to anyone who registers for the event.
> 3 votes

# Answer
I do this with our community, but we use Drupal and create an "organic group" for each event. We did some investigating of what it would take to migrate off Drupal and onto Wordpress, and group functionality was one of the difficult points.

In Wordpress, the closest I have found to this is the Group plugin. You could create a group for each event. Then you create a page or post for the event, and assign access to that page/post to the group.

You could write some small script to add users to a Group every time they register for an event. I would be inclined to do this via a nightly script, but you could also use CiviRules to automate creating the group every time a new event is created, and adding users every time they register.

If you name your event page/post as the event ID, you could even automate sending them an e-mail when they register to let them know the URL of the page. In fact, you could even automate creating the page and assigning access to the group.

Frankly you could automate the entire thing:

* When new event is created:
    + Create new WP group, using event ID in the group name
    + Create new WP page/post, using event ID in the page name
    + Assign access to new page/post to group
* When user registers
    + Add them to group
    + Send them welcome email with private page URL

Someone who is familiar with coding using the Wordpress APIs should be able to do this without too much trouble. Coding this into a CiviRules rule or two would also be pretty easy.

(Having talked about scripts, I currently do the activities of setting up a new group and adding users who have registered to the group manually. Depending on your scale, it is not too time consuming.)
> 2 votes

# Answer
Another route to consider - add some custom fields to your Event entity, then you can put the url in to those fields, then you can set up a Sch Reminder that is using a token for the custom field, and bingo, each participant gets sent the links to the right document. Very light/easy solution. but i may still not have quite grasped the requirement :-)

(note you may have to theme (?) so those fields don't show on eg the Event Info page)
> 2 votes

# Answer
Welcome empiguet. I do not use WP so much and I may not quite follow your workflow but I think you would need to do something as follows \- if person registers then add to Smart Group \- if in Smart Group, then set specific WP role (this may need an extra extension, i don't know if WP offers it, i do know Drupal does so an equivalent may exist) \- set up WP user role permissions so person who registers for event can access 'private' content to which you would add your documents.

If you only want them to get specific emails, then \- make a smart group of participants \- use this as target for mailings using CiviMail
> 1 votes

---
Tags: wordpress, civievent, acl, participants, files
---


title: Make changes to lots of events

text:
# Question
Title: Make changes to lots of events
I recently created some custom fields and some new event types for events. Now I need to edit each event to change the event type, as well as populate those custom fields, for 5 years worth of events. I just need to edit 3 fields: the event type and 2 new custom event fields.

I tried making a custom profile so I could do an export/import, but I guess custom profiles are not supported for events.

A search of stackexchange suggests there is really no way to bulk edit event information.

Would it be horrifying if I made the edits manually in the database? Any other suggestions on options to edit event data in bulk?

Thank you!

# Answer
> 4 votes
You could do this using chaining in the API, either by script or with the API Explorer.

Eg:

```
$result = civicrm_api3('Event', 'get', [
  'sequential' => 1,
  'options' => ['limit' => 0],
  'event_type_id' => "Fundraiser",
  'api.Event.create' => ['id' => "\$value.id", 'event_type_id' => "Meeting"],
]);

```

Or in words: find all the events of type Fundraiser. For each one, use the 'create' API call with the id of the found event and set the type to Meeting.

To run this in API Explorer you need to enter the chained part as json:

# Answer
> 3 votes
One option would be to test if this API import solution can get the data where you need it

https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport

(but yes otherwise I would be heading down the update in the db route)

---
Tags: civievent
---


# Question
Title: SOLVED!! DB Error: no such table ERROR searching erroneous ACL table
I have read other related questions but I do not see a match with my mistake. Civicrm version 4.7.31 Drupal 7.67 MySQL 5.6.42 PHP7.1 After migrating from civicrm 4.5.8 and php5.6 everything works fine except for some things related to ACL permissions and smart groups the one that worries me most is that when I want to send an email with civimail, users have permission to see certain smart groups (the smart groups do not work correctly for me as well as in civicrm 4.5.8) and I select this group to send the mail to the recipients or they are empty or looking for them, if this way and everything I click on test mail I get the error: Error in call to Mailing\_send\_test: Error in call to MailingJob\_create: DB Error: no such table I also have to say that if the smart group is the child of another, it does not appear in searches, nor in civimail, nor by default when listing in managing groups. If I put no parent then if it is displayed and let me select it to use it correctly but not when using it in civimail.

```
The error in the log is this:

Sep 19 15:33:42 [info] $ Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)
SELECT *
FROM acl
WHERE (aclContactCache.user_id = 43137 AND contact_a.is_deleted = 0)
 [nativecode = 1146 ** Table 'pequo_civicrm.acl' doesn't exist]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)
SELECT *
FROM acl
WHERE (aclContactCache.user_id = 43137 AND contact_a.is_deleted = 0)
 [nativecode = 1146 ** Table 'pequo_civicrm.acl' doesn't exist]
    [to_string] => [db_error: message = "DB Error: no such table" code = -18 mode = callback callback = CRM_Core_Error :: exceptionHandler prefix = "" info = "INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)
SELECT *
FROM acl
WHERE (aclContactCache.user_id = 43137 AND contact_a.is_deleted = 0)
 [nativecode = 1146 ** Table 'pequo_civicrm.acl' doesn't exist] "]
)

#0 /public_html/sites/all/modules/civicrm/CRM/Core/Error.php(948): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /public_html/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /public_html/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...")
#3 /public_html/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), "INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...")
#4 /public_html/sites/all/modules/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -18, 16, (Array:2), "INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...", "DB_Error", TRUE)
#5 /public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#6 /public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-18, NULL, NULL, "INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...", "1146 ** Table 'pequo_civicrm.acl' doesn't exist")
#7 /public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...")
#9 /public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2446): DB_common->query("INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...")
#10 /public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1635): DB_DataObject->_query("INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...")
#11 /public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(392): DB_DataObject->query("INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...")
#12 /public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1348): CRM_Core_DAO->query("INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...", TRUE)
#13 /public_html/sites/all/modules/civicrm/CRM/Utils/SQL/Select.php(655): CRM_Core_DAO::executeQuery("INSERT INTO civicrm_mailing_recipients (mailing_id, contact_id, email_id)\nSE...", (Array:0), TRUE, NULL, FALSE, TRUE, FALSE)
#14 /public_html/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php(357): CRM_Utils_SQL_Select->execute()
#15 /public_html/sites/all/modules/civicrm/CRM/Mailing/BAO/MailingJob.php(73): CRM_Mailing_BAO_Mailing::getRecipients("5580")
#16 /public_html/sites/all/modules/civicrm/api/v3/utils.php(1288): CRM_Mailing_BAO_MailingJob::create((Array:12))
#17 /public_html/sites/all/modules/civicrm/api/v3/MailingJob.php(44): _civicrm_api3_basic_create("CRM_Mailing_BAO_MailingJob", (Array:12))
#18 /public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_mailing_job_create((Array:12))
#19 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#20 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#21 /public_html/sites/all/modules/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("MailingJob", "create", (Array:12))
#22 /public_html/sites/all/modules/civicrm/api/v3/Mailing.php(626): civicrm_api3("MailingJob", "create", (Array:12))
#23 /public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_mailing_send_test((Array:10))
#24 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#25 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#26 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(77): Civi\API\Kernel->runSafe("mailing", "send_test", (Array:10), NULL)
#27 /public_html/sites/all/modules/civicrm/Civi/API/Subscriber/ChainSubscriber.php(211): Civi\API\Kernel->run("mailing", "send_test", (Array:10))
#28 /public_html/sites/all/modules/civicrm/Civi/API/Subscriber/ChainSubscriber.php(73): Civi\API\Subscriber\ChainSubscriber->callNestedApi(Object(Civi\API\Kernel), (Array:35), (Array:5), "create", "Mailing", 3)
#29 [internal function](): Civi\API\Subscriber\ChainSubscriber->onApiRespond(Object(Civi\API\Event\RespondEvent), "civi.api.respond", Object(Civi\Core\CiviEventDispatcher))
#30 /public_html/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func((Array:2), Object(Civi\API\Event\RespondEvent), "civi.api.respond", Object(Civi\Core\CiviEventDispatcher))
#31 /public_html/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:4), "civi.api.respond", Object(Civi\API\Event\RespondEvent))
#32 /public_html/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php(167): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("civi.api.respond", Object(Civi\API\Event\RespondEvent))
#33 /public_html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch("civi.api.respond", Object(Civi\API\Event\RespondEvent))
#34 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(276): Civi\Core\CiviEventDispatcher->dispatch("civi.api.respond", Object(Civi\API\Event\RespondEvent))
#35 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(171): Civi\API\Kernel->respond(Object(Civi\API\Provider\MagicFunctionProvider), (Array:9), (Array:5))
#36 /public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#37 /public_html/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Mailing", "create", (Array:35), NULL)
#38 /public_html/sites/all/modules/civicrm/CRM/Utils/REST.php(311): civicrm_api("Mailing", "create", (Array:35))
#39 /public_html/sites/all/modules/civicrm/CRM/Utils/REST.php(548): CRM_Utils_REST::process((Array:3), (Array:35))
#40 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(275): CRM_Utils_REST::ajax()
#41 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:12))
#42 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#43 /public_html/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3))
#44 /public_html/includes/menu.inc(527): civicrm_invoke("ajax", "rest")
#45 /public_html/index.php(21): menu_execute_active_handler()
#46 {main}

```

He says that the table is missing pequo\_civicrm.acl I think the right thing would be for the table to be called so pequo\_civicrm.civicrm\_acl I have reviewed the civicrm\_acl table with the backup before updating to 4.7.31 and it is exactly the same, with its primary keys and others the same or that seems. I have tried to recreate new user with new acl permissions, smart group and a whole test configuration and it also fails

It is not a multilanguage site and I have searched for many days what could be the cause of this error and that I believe creates the other user errors + acl permissions + smart groups

**UPDATE:I upgrade to 5.0 in dev installation without errors and no work too**
**UPDATE 2: testing permissions in drupal if view contacts is assigned, override ACL permissions and work, but isn't the desired configuration, because show al information no designed and all groups**
**LAST UPDATE:Testing in dev system and upgrading to 5.0.0 no work too, soo I update to 5.5.0 and works again**

**Thanks to all for your help**

# Answer
> 0 votes
Try changing the file `CRM/Mailing/BAO/Mailing.php` on line 336 from:

```
      $query = $query->from('acl', $aclFrom);

```

to:

```
      $query = $query->from('aclContactCache', $aclFrom);

```

---
Tags: database, permissions, smartgroups, acl, user
---


# Question
Title: Active Event Type not appearing in CiviRules
Drupal 7.67, Civi 5.13.5

I'm currently adding some CiviRules to automatically tag users based on what event they sign up to / attend. However one of the event types isn't showing up in the CiviRule dropdown box on the "Conditions" screen. This event is marked as active. I haven't yet added any other Conditions for this CiviRule.

Any clue how to fix this?

Screenshots below -

My list of Event Types. I want to have a CiviRule that adds a tag when people attend a "Youth Event".

"Youth" doesn't appear in the drop-down:

Or when I search for it:

I haven't added any other Conditions for this CiviRule.

Thanks in advance for your help!

# Answer
This is a bug I spotted last week and submitted a fix for. Some of the new conditions in CiviRules 2.9 (including this one) are limited to just the first 10 options. If you know how to apply a patch, my fix is here. If not, this will get fixed in CiviRules 2.10.
> 2 votes

# Answer
Did it used to be "Youth" and you changed it at some point to "Youth Event"? Try changing it back to "Youth" just to see if that fixes it.
> 0 votes

---
Tags: civirules
---


# Question
Title: Users with Subscriber role in Wordpress cannot see & access CiviCRM
Users connected with the "subscriber" role in WordPress do not see CiviCRM nor access to it (404 error). It works well with WP admin role. I believe I have configured correctly the permissions in Administer -\> Users & Permissions -\> WordPress Access Control. Any ideas? Many thanks

# Answer
After having tested all the possibilities by checking and unchecking all the options marked in the WordPress Access Control pane, I found that the box "CiviCRM: access CiviCRM backend and API" must be be ticked. Otherwise you dont have access to CiviCRM. Strange because it is told to give this to trusted roles only. The well done documentation is unfortunately lacking on this subject.
> 1 votes

---
Tags: wordpress, configuration, roles
---


title: Organisational search option

text:
# Question
Title: Organisational search option
I have three types of organisations: a. institution, b. supplier, c. corporate member. I am creating different menus for manipulating each one of these (requirement of our users). I would like to offer a menu item that it called "Search for an institution" that when you press it, it has filtered the big list of organisations and displays only institutions. (the same for the other two categories).

How would I go about achieving something like this?

Thanks in advance

Aris

# Answer
Like Jon said auto filtering the search using url param is in progress. But a work around for this until its available is to

1. Create a smart group using advance search for each contact type.
2. Grab search id (civicrm\_group.saved\_search\_id) of the smart group either from database or api.
3. Replace the id in the url for ssID `civicrm/contact/search/advanced?reset=1&ssID=1&force=1` and add it in your menu item.

Thanks

Pradeep
> 8 votes

# Answer
Create the organizations as contact subtypes of the Organization type: **Administer menu » Customize Data and Screens » Contact Types**. Now you can easily filter on them during search.

If you're talking about pre-filtering the search by institution, that's a feature that's in progress - you can pre-filter by some fields but not others (they need to be converted one at a time). However, it's not fewer clicks to do this, so I think it's just easiest to show folks how to search by only one organization type when desired.
> 5 votes

---
Tags: custom-search
---


# Question
Title: Upgrade to civicrm 5.17.4 fails with PHP 7.1 Uncaught Error: [] operator not supported for strings
Testing an upgrade from 5.13.4 to 5.17.4 on wordpress, I get a fatal error. This is on PHP 7.1.32.

```
PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/SmartGroups.php:105
Stack trace:
#0 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/SmartGroups.php(48): CRM_Upgrade_Incremental_SmartGroups->datePickerConversion(Array)
#1 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/Base.php(233): CRM_Upgrade_Incremental_SmartGroups->updateGroups(Array)
#2 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php(88): CRM_Upgrade_Incremental_Base::updateSmartGroups(Object(CRM_Queue_TaskContext), Array)
#3 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php(217): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#4 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php(52): CRM_Queue_Runner->runNext(true)
#5 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/ in /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/SmartGroups.php on line 105

```

This appears to be a well known issue with PHP 7.1. See for example this issue.

# Answer
Proper define of the array will sort you out, Please check out this Post, this issue is seen with many places after upgrade php.
> 0 votes

---
Tags: wordpress, upgrade, php7
---


# Question
Title: Civi 5.x not recognizing PHP 7.1 in Drush
This is the second site I've noticed this on - in both cases, the site is running PHP 7.1.32, as reported on the Drupal system status page.

Error message:

CiviCRM requires PHP 7.0.0+. The web server is running PHP 5.6.40. Drush command terminated abnormally due to an unrecoverable error.

The Drush commands seem to execute, though. The commands have nothing to do with Civi, BTW - these are standard install/enable Drush commands.

See related issue at:

Errors in functions.php after installing 5.16.2 on Drupal 7

Any guidance appreciated...

# Answer
That sounds like your command line version of php is different to the one being used by your webserver.

See eg https://drupal.stackexchange.com/questions/44967/the-php-version-is-not-correctly-detected
> 3 votes

# Answer
I hit this on a few servers and it was driving me insane. Demerit's comment pointed me to the answer. long ago, someone had added alias drush='/usr/bin/php5 /usr/local/bin/drush' to /etc/bash.bashrc I commented that out and all works as expected
> 1 votes

---
Tags: php, drush
---


# Question
Title: How to change the suffix of my contact to a UK style?
How to change the suffix of my contact with a UK style?

# Answer
Are you referring to the suffixes drop down, Jr. Sn etc? if so…

You have full control of the list of suffixes:

*From the CiviCRM menu*

**Administer \> Customize Data and Screens \> Dropdown Options \> Individual Suffixes**

`/civicrm/admin/options/individual_suffix?reset=1`

From here, you can add, update and edit any of the options.
> 2 votes

---
Tags: contacts
---


title: CiviCRM in a Multi-Tenant Setup

text:
# Question
Title: CiviCRM in a Multi-Tenant Setup
Can CiviCRM support a multi-tenant setup, If so what is the best configuration for it? Which CMS tends to work better for these kinds of setups: Drupal, Joomla or WordPress?

# Answer
It's certainly possible to use CiviCRM as you describe, and I administer a couple of instances that do exactly this. I know it's possible with WordPress and with Drupal; not sure about Joomla or Backdrop.

However, in each case where I administer such a setup, either a) there's a need to share data, or b) the architecture decision wasn't my own. In the case where I designed a CiviCRM multi-client architecture (about 25 instances) I opted to have 25 separate instances sharing a git repository (these days I would consider a Docker image instead). If data sharing isn't necessary, and it's just a way to keep the code in sync, I don't think a multi-site approach is warranted.
> 2 votes

---
Tags: wordpress, drupal, joomla, multisite
---


# Question
Title: Access denied after contribution (thank you page denied)
I let my users register on my wordpress website using a contribution page on CiviCRM. It used to work fine but last time I tried to register a new user, instead of the thank you page, I get this access denied message :

" Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. You do not have permission to access this page. Return to home page."

After hours of investigation, I finally found out the problem came after I changed the default role for new subscribers to a custom role I had added from my function.php called "Pending". If I turn it back to "Subcribers" then it works fine again.

Do you have any idea how I could grant access to this page to users with "Pending" role ??

Thanks a lot !

Here is the log :

```
Sep 22 19:33:21  [info] $Fatal Error Details = Array
(
    [message] => You do not have permission to access this page.
    [code] =>
)

    Sep 22 19:33:21  [info] $backTrace = #0 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(385): CRM_Core_Error::backtrace("backTrace", TRUE)
    #1 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php(397): CRM_Core_Error::fatal("You do not have permission to access this page.")
    #2 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(76): CRM_Utils_System_WordPress->permissionDenied()
    #3 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(231): CRM_Utils_System::__callStatic("permissionDenied", (Array:0))
    #4 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))
    #5 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
    #6 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm.php(1392): CRM_Core_Invoke::invoke((Array:3))
    #7 /home/gemmemedxe/www/wp-content/plugins/civicrm/includes/civicrm.basepage.php(365): CiviCRM_For_WordPress->invoke()
    #8 /home/gemmemedxe/www/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
    #9 /home/gemmemedxe/www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, (Array:1))
    #10 /home/gemmemedxe/www/wp-includes/plugin.php(531): WP_Hook->do_action((Array:1))
    #11 /home/gemmemedxe/www/wp-includes/class-wp.php(750): do_action_ref_array("wp", (Array:1))
    #12 /home/gemmemedxe/www/wp-includes/functions.php(1105): WP->main("")
    #13 /home/gemmemedxe/www/wp-blog-header.php(16): wp()
    #14 /home/gemmemedxe/www/index.php(17): require("/home/gemmemedxe/www/wp-blog-header.php")
    #15 {main}

```

# Answer
Ok, thanks a lot Demerit but I could not get what I should do in there and finally found the solution.

So the trick was with the capabilities. I installed user role editor and found out that by default, a subscriber is granted way more capabilities than just "read", which are :

```
access_all_custom_data
access_civimail_subscribe_unsubscribe_pages
access_uploaded_files
make_online_contributions
profile_create
profile_edit
profile_listings
profile_view
read
register_for_events
sign_civicrm_petition
view_event_info
view_public_civimail_content

```

So basicaly if your custom roles are not granted those capabilities, users will get denied the access to some civi page at some point.

So in wordpress I just went Users \> User role Editor and updated my custom roles with the right capabilities.

Hope it helps !
> 1 votes

# Answer
Go to https://your-site/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1

You can also get there from under administer - users and permissions - permissions, and then on that page there's the link to wordpress access control.
> 0 votes

---
Tags: contribution-page, registration, roles
---


# Question
Title: Smarty only generating nulls from API calls
Using the Explorer, I built up the smarty code I need for a template to pull in address information on a contact for use in an email:

```
{crmAPI var='result' entity='Address' action='get' contact_id=203}
{foreach from=$result.values item=address}
  {$address.some_field}
{/foreach}

```

and it produces the desired output in the Explorer when executed.

In an email though, the expected output never renders, and when I add the smarty expression `{result|@debug_print_var}`, I get `null` for the value of the variable in the message.

The fact that I'm getting `null` suggests to me that smarty is in fact running, but I can't for the life of me figure out why it can't seem to make an API call. Thoughts?

Thanks for the help!

N.B.: I'm running CiviCRM 5.17.4 on Drupal 7.67 and Ubuntu 16.04.

**Update**

With the following email code:

```
{capture assign=contact_id}{contact.contact_id}{/capture}

id: {contact.contact_id}

smarty id: {$contact_id}

{crmAPI var='result' entity='Contact' action='get' id=203}

{$result|@debug_print_var}

```

This is the email that renders when sending to contact # 203:

```
id: 203

smarty id: 203

null

```

# Answer
So, for posterity's sake, I wanted to share the answer I figured out.

When I looked at the Source view of the email in CiviCRM, I realized that the code had pasted as

```

<p>id: {contact.contact_id}</p>

<p>smarty id: {$contact_id}</p>

<p>{crmAPI var='result' entity='Contact' action='get' id=203}</p>

<p>{$result|@debug_print_var}</p>

```

instead of

```
{capture assign=contact_id}{contact.contact_id}{/capture}

id: {contact.contact_id}

smarty id: {$contact_id}

{crmAPI var='result' entity='Contact' action='get' id=203}

{$result|@debug_print_var}

```

When I composed the code correctly in the Source view rather than the HTML view, everything worked as expected!
> 4 votes

---
Tags: civimail, api, smarty
---