# Question
Title: Discounts for multiple price field selections (e.g. select all five options and get $X off)
Is it possible to set up a price set such that selecting multiple options would lower the total price?

Our use case is a summer camp. You can register for a day ($50) or for a week ($190). We need to be able to set a maximum number of participants for each day. So, if we could make a form where you simply select all days in the week to register for an entire week and a $60 discount was applied in that case, this would satisfy our requirements.

Putting in the week as a separate option would make it impossible to have registration limits for each day. The camp has multiple weeks over the summer, so we can't use a registration limit for the whole event to do this.

This is currently set up as a webform, but that comes with other issues, so it would be preferable to find an option that works with price sets and CiviEvent.

# Answer
Maybe you could create the price set with 5 individual day options each at $50 and a 'Full week discount' at -$60 and then add javascript to hide the discount option and set it when all 5 days are selected.

As a javascript approach that is open to someone messing with it and selecting the discount option when they should not so you might want to add a check on the server side as well - depends a bit on your audience.
> 1 votes

# Answer
Probably not the answer you are looking for, but you can use civi discounts extension and have set a discount code. (the code would work for anyone with the code.) Maybe you can set up with webforms a conditional logic that will pop-up a field that will only show the discount code once x amount of days are selected, I don't use Drupal so I don't know if that is an option.
> 0 votes

---
Tags: civievent, price-sets, cividiscount
---


# Question
Title: Contributions with Frozen Financial Type Field
I'm finding that some contributions do not allow financial types to be changed. Normally there is a dropdown that allows a user to select a different financial type, but sometimes the field is frozen (see screenshot). Can someone explain this, or provide a solution?

# Answer
> 1 votes
Are they related to membership or event fees? Maybe coming from here:

https://github.com/civicrm/civicrm-core/blob/5.15.1/CRM/Contribute/Form/Contribution.php#L825

---
Tags: wordpress, contributions
---


title: CiviCRM integration with Eventbrite

text:
# Question
Title: CiviCRM integration with Eventbrite
I would like to create/update events in CiviEvent by using Eventbrite webhooks. One of the requirements is having an endpoint page that will receive data sent by Eventbrite API.

How can I create that endpoint page within CiviCRM?

# Answer
You will need to create extension to have Eventbrite sync with CiviEvents. Here is some guideline on how to approach this

1. Create extension.
2. Add page using civix
3. In run() use CiviCRM api to create entries in civicrm table.

Reference :

Mandrill extension uses same approach i.e to create entries in various civicrm table upon webhook call. This might find you helpful to develop your extension https://github.com/JMAConsulting/biz.jmaconsulting.mte/blob/master/CRM/Mte/Page/callback.php
> 8 votes

# Answer
There is now an extension for EventBrite integration.
> 4 votes

---
Tags: civievent, api, developer
---


# Question
Title: PayPal PSD2 - new European Union directive from 14th September 2019
A couple of clients using PayPal have received an email regarding a new European Union directive.

Some info from the email –

> As a business accepting card payments, your online checkout will need upgrading to comply with a new European Union directive requiring Strong Customer Authentication (SCA). The directive applies from 14 September 2019, but card issuers are working towards SCA by April so that their systems are fully operational by the deadline.
>
> Want to know more?
>
> Find out more about PSD2 and check out our guide to integration - https://www.paypal.com/uk/webapps/mpp/psd2

As I understand it, no changes are required if users are redirected from your website to PayPal (hosted payment integration) but changes are required if you accept card payment on the actual website (Direct or in-line payment processors)

PayPal is one of the core payment processors in CiviCRM and the in-line option is now also compatible with webforms so I’m guessing this will affect many.

How do we move forward to be ready by the deadline as transactions will be declined if no action is taken?

I’m guessing this will also affect other in-line payment processors?

# Answer
Because CiviCRM is open source there is no supplier who you could ask to do this. Basicly it comes down that someone develops the software to work with the new standard.

In Open Source we have a saying that you have to scratch your own itch. Means that if your organisation is dependent on credit card payments and paypal, your organisation has to make sure it keeps working because its your organisation who would suffer.

If you have a developer in your organisation then he or she could do the job. But If you dont have a developer you have to fund a developer to make it working for you.

In this case, there is a likely change that other organisations are also willing to contribute (eg developer resources or funding). But you have to find them and come together.
> 1 votes

# Answer
Looks like we may have a solution –

https://civicrm.org/blog/eileen/announcing-paypal-checkout
> 1 votes

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


# Question
Title: Can't delete or update contributions in CiviCRM 5.13+
So, I can't delete or update contributions from CiviCRM 5.13 or 5.15, either through the UI or the API (v3).

This is the backtrace:

{

```
"error_code": "already exists",
"sql": "DELETE FROM civicrm_activity WHERE source_record_id IN (78772) AND activity_type_id IN ( 6 ) [nativecode=1062 ** Duplicate entry '78823' for key 'id']",
"trace": "#0 /var/www/html/dc/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))\n#1 /var/www/html/dc/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct('DB Error: alrea...', -5, 16, Array, 'DELETE FROM civ...')\n#2 /var/www/html/dc/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-5, 16, Array, 'DELETE FROM civ...')\n#3 /var/www/html/dc/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -5, 16, Array, 'DELETE FROM civ...', 'DB_Error', true)\n#4 /var/www/html/dc/sites/all/modules/civicrm/packages/DB/common.php(1907): PEAR->__call('raiseError', Array)\n#5 /var/www/html/dc/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-5, NULL, NULL, 'DELETE FROM civ...', '1062 ** Duplica...')\n#6 /var/www/html/dc/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()\n#7 /var/www/html/dc/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery('DELETE FROM civ...')\n#8 /var/www/html/dc/sites/all/modules/civicrm/packages/DB/DataObject.php(2415): DB_common->query('DELETE FROM civ...')\n#9 /var/www/html/dc/sites/all/modules/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query('DELETE FROM civ...')\n#10 /var/www/html/dc/sites/all/modules/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query('DELETE FROM civ...')\n#11 /var/www/html/dc/sites/all/modules/civicrm/CRM/Core/DAO.php(1414): CRM_Core_DAO->query('DELETE FROM civ...', true)\n#12 /var/www/html/dc/sites/all/modules/civicrm/CRM/Activity/BAO/Activity.php(186): CRM_Core_DAO::executeQuery('DELETE FROM civ...')\n#13 /var/www/html/dc/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php(1322): CRM_Activity_BAO_Activity::deleteActivity(Array)\n#14 /var/www/html/dc/sites/all/modules/civicrm/api/v3/Contribution.php(234): CRM_Contribute_BAO_Contribution::deleteContribution(78772)\n#15 /var/www/html/dc/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_contribution_delete(Array)\n#16 /var/www/html/dc/sites/all/modules/civicrm/Civi/API/Kernel.php(168): Civi\\API\\Provider\\MagicFunctionProvider->invoke(Array)\n#17 /var/www/html/dc/sites/all/modules/civicrm/Civi/API/Kernel.php(99): Civi\\API\\Kernel->runRequest(Array)\n#18 /var/www/html/dc/sites/all/modules/civicrm/api/api.php(23): Civi\\API\\Kernel->runSafe('Contribution', 'delete', Array, NULL)\n#19 /var/www/html/dc/sites/all/modules/civicrm/CRM/Utils/REST.php(316): civicrm_api('Contribution', 'delete', Array)\n#20 /var/www/html/dc/sites/all/modules/civicrm/CRM/Utils/REST.php(566): CRM_Utils_REST::process(Array, Array)\n#21 /var/www/html/dc/sites/all/modules/civicrm/CRM/Core/Invoke.php(277): CRM_Utils_REST::ajax()\n#22 /var/www/html/dc/sites/all/modules/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem(Array)\n#23 /var/www/html/dc/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke(Array)\n#24 /var/www/html/dc/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke(Array)\n#25 /var/www/html/dc/includes/menu.inc(527): civicrm_invoke('ajax', 'rest')\n#26 /var/www/html/dc/index.php(21): menu_execute_active_handler()\n#27 {main}",
"is_error": 1,
"error_message": "DB Error: already exists",
"debug_information": "DELETE FROM civicrm_activity WHERE source_record_id IN (78772) AND activity_type_id IN ( 6 ) [nativecode=1062 ** Duplicate entry '78823' for key 'id']"

```

}

Running the same SQL query mentioned in the backtrace in phpMyAdmin returns a single record (not sure why it's returning a Duplicate entry error in the backtrace).

I've got a backup of the same system running on version 5.11, separately but on the same server, which is completely fine - no issues at all. Tried turning off various extensions but to no avail. Fairly sure that it's to do with the server configuration, but really struggling to pin down where the issue lies.

Any advice would be very welcome. Thanks.

# Answer
> 4 votes
Is this your production or test environment?

You could try to switch off logging, save and remove the logging tables, try to delete your contribution and see if it now works. At the end switch logging back on.....

Not sure if this is the root but potentially worth a try. (The already exists might be pointing at an entry in the log table?)

---
Tags: contributions, activity
---


# Question
Title: Attachment URLs incomplete on remote server only
I'm working locally on my Mac with the latest version of CiviCRM on latest WordPress, served by MAMP. Using the API, I create an attachment to a contact, and those attachments successfully display after being retrieved through the API. The URL comes back as `http://localhost/civicrm?page=CiviCRM&q=civicrm%2Ffile&reset=1&id=15&eid=29&fcs=...`

However, when I upload the code and database records to the remote server for testing, the one thing that doesn't work are my attachments. The URLs come back from the API missing a slash: `http://remotedomain.comcivicrm?page=CiviCRM&q=civicrm%2Ffile&reset=1&id=15&eid=29&fcs=...` Notice the missing slash after the \`.com?

I've double checked the configuration in civicrm.settings.php. Both localhost and remotedomain.com have a / in the URL base. I checked the various settings in the admin interface, but nothing looks amiss.

What could be causing this issue?

# Answer
> 1 votes
Can you check

1. Check if base url in civicrm.settings.php file is set 'http://remotedomain.com/'.
2. Try setting home and siteurl in wp\_options table to 'http://remotedomain.com/' (not needed for normal install).

Cheers

Pradeep

---
Tags: api, attachments
---


title: Steps to move from paypal to Stripe?

text:
# Question
Title: Steps to move from paypal to Stripe?
If I move from paypal to stripe, what steps or information I need to take into consideration in terms of recurring contribution? And how to initiate the moving existing recurring contribution profiles?

# Answer
You would need to reach out to Paypal and Stripe directly to ask them about how to initiate the process of transferring your recurring giving. I would suggest inventorying your existing recurring records in Paypal first, to see how complex the data is; in a recent transition to Stripe, we encountered some challenges with constituents who had multiple payment profiles. The more clarification you can get from Stripe about what will be required, I think the more smoothly this will go for you. (Typically the processors would need to transfer the payment details directly.)

Hope this helps, Lesley
> 3 votes

---
Tags: payment-processor, paypal, recurring-contributions, stripe
---


# Question
Title: SQL upgrade fails on 5.14.2 to 5.15.0 on Joomla
In upgrading from civi 5.14.2 to 5.15.0, the SQL update fails. In civi log, I get:

Jul 08 09:48:13 \[info\] Running task: Cleanup old files Jul 08 09:48:13 \[info\] Running task: Checking extensions Jul 08 09:48:14 \[info\] Running task: Begin Upgrade to 5.15.alpha1 Jul 08 09:48:15 \[info\] Running task: Upgrade DB to 5.15.alpha1 Jul 08 09:48:15 \[info\] Running task: Upgrade DB to 5.15.alpha1: SQL Jul 08 09:48:16 \[info\] Running task: Fix errant deferred revenue settings

And then sql update dies and nothing else in log.

Relevant environment settings:

Database Version 5.5.5-10.0.38-MariaDB Database Connection Collation utf8mb4\_general\_ci PHP Version 7.2.19

Any suggestions?

Here's the error log from civiCRM:

https://drive.google.com/file/d/1y4NWik-4fVWjflifgOIGsSXiU3NN0S2O/view?usp=sharing

And this is the on-screen error:

And here's a video walkthrough of the upgrade process, including which steps fail during the DB update:

https://drive.google.com/file/d/15MonHfW2TW\_RbfhvbY2FIdB2Uao7poSH/view?usp=drivesdk

# Answer
I see from your video that you're failing on the 5.15.alpha1 SQL, and on.

The first one has two SQL statements. Essentially, the statuses for a contribution ("Pending", "Complete", etc.) and for recurring contributions have been the same - but moving forward they'll each have their own list. The two SQL statements create an option group along with values to support this.

Run this SQL: `select id, name from civicrm_option_group WHERE name = 'contribution_recur_status';`

You should get back one result. If you have no results, that's a problem:

```
+-----+---------------------------+
| id  | name                      |
+-----+---------------------------+
| 138 | contribution_recur_status |
+-----+---------------------------+

```

Then run this SQL: `select cov.id, cov.option_group_id, cov.name, cov.label, cov.value from civicrm_option_value cov JOIN civicrm_option_group cog ON cov.option_group_id = cog.id WHERE cog.name = 'contribution_recur_status';`

You should get back some number of results - I get 12, you may have more:

```
+------+-----------------+----------------+----------------+-------+
| id   | option_group_id | name           | label          | value |
+------+-----------------+----------------+----------------+-------+
| 1884 |             138 | Completed      | Completed      | 1     |
| 1885 |             138 | Pending        | Pending        | 2     |
| 1886 |             138 | Cancelled      | Cancelled      | 3     |
| 1887 |             138 | Failed         | Failed         | 4     |
| 1888 |             138 | In Progress    | In Progress    | 5     |
| 1889 |             138 | Overdue        | Overdue        | 6     |
| 1890 |             138 | Refunded       | Refunded       | 7     |
| 1891 |             138 | Partially paid | Partially paid | 8     |
| 1892 |             138 | Pending refund | Pending refund | 9     |
| 1893 |             138 | Chargeback     | Chargeback     | 10    |
| 1899 |             138 | Processing     | Processing     | 11    |
| 1900 |             138 | Failing        | Failing        | 12    |
+------+-----------------+----------------+----------------+-------+

```

You're also failing on "Fix cache key column name in prev next cache". That's trying to run this SQL, so also run this command manually: `ALTER TABLE civicrm_prevnext_cache CHANGE COLUMN cacheKey cachekey VARCHAR(255) COMMENT 'Unique path name for cache element of the searched item';`
> 1 votes

---
Tags: upgrade
---


# Question
Title: Meaningless error report when importing multi-value custom fields
I'm trying to import some multi-value custom field and I am getting what is clearly a badly formed error message. I've eliminated most of my errors by careful perusal of my import data and correcting a couple of typos. But I can't find the last one.

It gives me a link to an error CSV to export (like normal contact import) but it contains what looks like code to me. This is what it gives me in 2x6 cells of the CSV. There is also a bit of html showing as text (line break and "warning" in bold, but I can't workout how to show these in SE)

```

**Warning**:  Declaration of CRM_Custom_Import_Parser::run($fileName  $separator  &$mapper    $skipColumnHeader = false

```

What does this mean???

Note that the documentation calls it multi-value, but the tag I have found is multi-record which describes it better.

# Answer
> 1 votes
It means the custom import inherits some code from the contact import, but in a way that isn't strictly valid (the parameters for the run() method are different than the parent). It would need fixing in core, and looks non-trivial, but it's a warning so the import should still run. Does it still run properly?

---
Tags: import, multi-record
---


# Question
Title: Is there a way to show second country at top of list of countries (after the default country) in CiviEvent?
I have United States set as the default country for the country field for CiviEvent registrations.

Is there a way to show Canada first on the list of the rest of the countries?

We have the most people registering for events from United States, but a fair number of people from Canada as well. At least one person told me it is doable but didn't have any pointers to where to make the changes.

The site uses WordPress, and CiviCRM 4.6 but hopefully within a month or so up to the latest version (waiting for OK to proceed).

# Answer
> 2 votes
Do you have participants from anywhere other than US/Canada? If it's just US/Canada you can restrict the country list to just those two (or some handful) under Admin - Localization - Languages, near the bottom of the page.

If you really do want all 200+ countries in the list, you can do a hack like this if you have access to mysql:

`update civicrm_country set name=' Canada' where name='Canada';`

(note the blank space in front - this will make it float to the top)

This might get overwritten on a future upgrade if Canada changes its name, but that seems unlikely. Still, this isn't a recommended hack, just if you're desperate.

---
Tags: civievent
---


title: "Use (create mode)" button is missing

text:
# Question
Title: "Use (create mode)" button is missing
WordPress 5.2.2, Civi 5.15.1

I just created a custom profile containing custom Membership fields, and want to get its URL so I can add it to the Navigation Menu. However, the Use button does not appear on the profile's field list page. In the past I have created other custom profiles containing all Contact fields, and never encountered this problem. Is there something special about Membership profiles, or am I doing something wrong?

# Answer
> 1 votes
Yes it's intentional that there are no links if there's mixed record types in a profile.

It's been like that for a LONG time:

https://issues.civicrm.org/jira/browse/CRM-1974

Also for reference: https://github.com/civicrm/civicrm-core/blob/5.15.1/CRM/UF/Page/Group.php#L353

UPDATE: Based on the comments, I think this is what is desired:

1. Create a profile that has just the membership fields.
2. On the manage contribution pages, on the profile tab for your membership contribution page, include the profile either at top or bottom.
3. When the person goes to buy their membership using your contribution page they'll see the custom fields from your profile.

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


# Question
Title: Using CiviRules to send email when setting up a Direct Debit
We noticed there was a delay of about 6 days when a new member signs up using GoCardless before their membership is current and they receive the usual 'Thank you' email so we've only set up a Rule to send an email to let them know that there will be a delay while the Direct Debit is set up

So currently, it's based on:

* When membership is added
* And membership status is pending
* Contact has recurring payments

However, we have existing members who are just now taking advantage of the Direct Debits function and their membership is not 'added' and their status is still 'current' if they're renewing before the end date.

Is there a way that I can trigger an email for these people?

The only thing possibly to include would be the contribution status (Pending incomplete transaction) but this is still likely to pick up incorrect people since it's used for a variety of scenarios.

# Answer
> 2 votes
If your existing members are getting a new recurring contribution you could potentially check for a new recurring contribution instead of a new membership? I think that would solve the issue.

If you try and it does not you might try something like:

* a first rule to check for relevant new memberships and add them to a group
* a second rule that adds them to a group when the contact gets a new recurring contribution AND is not already member of the group
* send the email when a contact is added to the group (and potentially remove them from the group if you think that would make sense).

---
Tags: civicontribute, civimember, recurring-contributions, civirules
---


# Question
Title: Advanced Search returns no results for a valid contact id
I tried to use Advanced Search and specified a contact id which I know is in the database. There are no other filters yet I get no results.

```
No matches found for:
Contact ID = 54862

Suggestions:
check your spelling
try a different spelling or use fewer letters
if you are searching within a Group or for Tagged contacts, try 'any group' or 'any tag'
add a New Individual, Organization or Household
make sure you have enough privileges in the access control system

```

# Answer
> 1 votes
It turns out the contact had been deleted and was in the trash.

---
Tags: advanced-search
---


title: NEWBIE: Is CiviCRM RIGHT FOR US

text:
# Question
Title: NEWBIE: Is CiviCRM RIGHT FOR US
I have a nonprofit organization who wants to manage their members and create a paperless membership management environment. Some of the specific, out of the box needs are:

1. The ability to manage roles and functions within the organization, such as executive board members, officers, chairpersons, committee assignments, etc.
2. Pay dues with installment options and late fees
3. Customizable member profile options
4. Manage events
5. Manage yearly obligations

The interface would be for internal use only, sort of an intranet. There would be no outside membership subscriptions. We are currently on a Joomla platform. Can CiviCRM interface. Is this a good choice?

# Answer
> 2 votes
It's an excellent choice for you. I've run Civi on both WordPress and Joomla and it does everything you are asking and more. Right now, I have at least a half dozen sites under my care on both Joomla and Wordpress. Depending on the size of your organization, Joomla may be the perfect, especially if the client is already accustomed to using Joomla. The ACL will probably be a little more familiar than in a WordPress environment.

# Answer
> 1 votes
I think CiviCRM decision is very well. Your scenario is almost textbook solution of what CiviCRM is designed for. On the CMS level, I wouldn't insist on Wordpress.

In my experience it plays quite well by the cases with few users and/or users with similar permissions. But when you need a more complex user administration process it needs plugins and stuff (which is OK for the many admins actually but I love to keep it simple).

I would actually suggest Drupal for user management abilities but Joomla looks promising as well. And it seems that people in the organization already familiar with its management, so it'd be a good choice.

---
Tags: joomla, evaluating-civicrm
---


# Question
Title: Import contacts: can't get past the "Choose Data Source" screen
I am trying to import contacts into our database from a CSV file. On the first import screen, "Choose Data Source", I have set the data source to CSV, picked the file, ticked "first row contains column headers", set contact type to Individual, dup to Update, picked the rule I want to use, set comma separator and the date format.

However, when I click Continue, the same page reloads and everything I had set is cleared. I am not taken to the next step and I do not see any error message.

Any advice?

Thanks very much, Richard

# Answer
> 3 votes
I figured it out. The CSV file was malformed. I rebuilt it and it worked perfectly. Richard

---
Tags: contacts, import
---


title: Set number of free events for members

text:
# Question
Title: Set number of free events for members
I'm creating a wordpress site for a gym. The gym memberships are tiered. Platinum members can access as many classes as they like as part of their membership. They are easy to handle with CiviDisount - I just give those members 100% discount on event (class) bookings. Other membership tiers are harder for me to figure out. The gold membership includes 12 classes a month. How do I limit the number of events a member can access based on their membership? Can I even do this is Civi?

# Answer
> 1 votes
I can not think of a way to limit the number of events based on a membership out of the box.

I would certainly add a custom field to a membership which I would then populate automatically based on the membership type with the CiviRules extension (more information here: https://docs.civicrm.org/civirules/en/latest/).

What CMS are you using?

---
Tags: civievent, civimember
---


# Question
Title: Approach to dynamically filled custom field using member since date
I've been thinking about how to best approach this and I'm stumped as to how to best go about it.

I want to add a custom field to a profile that is rendered on the Contact Summary page. I would like to fill it dynamically with the value of the individual's earliest Member Since value.

**NOTE:** *I say the earliest Member Since value because a bug in Civi has changed all Member Since values of currently active membership records to the date of the start of that membership record when they are renewed which ignores the concept that the individual may have had an earlier membership of a different type. The solution is to loop through all memberships and grab the oldest value to populate the custom field with it.*

I'm well versed in building custom extensions and working in custom code. This is for a Drupal 7 / CiviCRM site. Any ideas or direction?

# Answer
> 0 votes
How immediately do you need this field's value to be set? If it can be delayed, I'd probably do this as a cron script that loops through all that aren't set yet and then sets its value.

I'm assuming also you're familiar with the "View only" checkbox at the bottom of the custom field definition form - that would be how I'd create this field.

# Answer
> 0 votes
Thinking out loud......

* create an extension with perhaps an API that accepts a contact\_id as a param and returns the oldest membership start date
* assuming you know in advance what the member since should be you could use the buildForm hook to change the value (using the API or doing the calculation in a a specific class)
* alternatively add a little jQuery (using the CRM\_Core\_Region, see https://docs.civicrm.org/dev/en/latest/framework/region/) to the form that replaces the core value with the "correct" value using the API request?

---
Tags: civimember, custom-fields, profile
---


title: Get URL of custom image field

text:
# Question
Title: Get URL of custom image field
I would like to display pictures which are defined as custom "File" fields within an event. I currently to this by generating URLs having the following format:

```
MY_URL?q=civicrm/file&reset=1&id=FILE_ID&eid=EVENT_ID

```

There's another question that has been answered and can be seen here.

Using this worked, until CiviCRM recently introduced a security patch (i'm on version 5.10.3). Now, the picture urls have some sort of hash attached to them (the url contains `fcs=...`). Since that update, I can't display the pictures anymore.

Is there a standard, API way of getting images defined in custom fields? I know there's an Attachment API, but when I try to retrieve my file I get the following error:

```
{

"error_code": 0,
"entity": "Attachment",
"action": "get",
"is_error": 1,
"error_message": "Failed to run permission check: Unrecognized target entity table (civicrm_event)"
}

```

# Answer
Check how this bug was fixed elsewhere https://github.com/veda-consulting/uk.co.vedaconsulting.pcpteams/pull/216
> 2 votes

# Answer
The file hash is mandatory because of CIVI-SA-2019-01. Now you have to use the attachments url, which is available via the API. To bypass the permission check, you have to add the parameter `check_permissions` with value `0` (available since 5.12).

Keep in mind, that you should only use this parameter on trusted API calls!

```
 $result = civicrm_api3('Attachment', 'getvalue', [
  'return' => "url",
  'id' => 42, // attachment/file id
  'check_permissions' => 0
]);

```
> 1 votes

---
Tags: civievent, api, php, urls
---


title: How do I edit mailing recipients?

text:
# Question
Title: How do I edit mailing recipients?
I need to update the recipient list of a scheduled mailing.

How do I do this?

# Answer
There's no way to do that through the UI. You're probably better off cancelling the mailing and recreating it.

If you're comfortable and familiar with the database you could edit the civicrm\_mailing\_recipients table for the relevant mailing, but that would be pretty fragile/risky.
> 1 votes

# Answer
You can include and/or exclude groups as recipients of a mailing. When creating a group if you choose mailing option, it will be listed among others in autocomplete.

You can't (afaik) edit the recipient list per mailing by choosing individuals from a group.
> 0 votes

---
Tags: mailing
---


title: Importing Contacts into multiple groups

text:
# Question
Title: Importing Contacts into multiple groups
I am trying to work out how to import contacts into multiple groups. The list of contacts to import has some contacts listed in multiple groups. I've been unable to work out how.

EG Fred Smith is in Group 1, 2 and 3. Joe Smith is in Group 1 and 2 Mary Smith is only in Group 1.

Any advice would be appreciated.

Thanks Scott

# Answer
An alternative approach, esp if you have comma separated options for the Groups (ie all groups are in a single cell) would be to make a Custom Field with options that match your Group Names, import like that, then search for each option and via Actions 'add to group'.

Or (as Pradeep suggests in comment below) Custom field of type text and then using Search builder perform Like %Group Name% for each option and via Actions 'add to group'
> 8 votes

# Answer
The way I have done this is a variation on above and is quick, particularly if you have a separate column for each group. I also created a separate temporary custom field to ensure it didn't say there was nothing to import.

For each group select the records in that group and save as a new CSV. Do an import, using fill and putting anything in the temporary field. Add these contacts to the group. Repeat for all groups.
> 2 votes

# Answer
Did you had a look at the manual on importing data into CiviCRM? https://docs.civicrm.org/user/en/latest/common-workflows/importing-data-into-civicrm/

I am not sure whether importing of contacts in multiple groups works in CiviCRM.

If it doesn't you could try to create different import files, one for each group because at the end of each import you could add the contacts to a specific group. During the import CiviCRM tries minimize the creation of duplicate contacts.

So you get a file group1 with Fred and Joe. a file group2 with only Fred, and a file group3 with Joe.
> 1 votes

---
Tags: import, groups, data-import
---


title: Add transaction fee

text:
# Question
Title: Add transaction fee
How do we take transaction fees into account when setting up a price on Civi?

We have prices for what we charge for memberships and training, but how do we set a percentage for transaction fee for our various price sets?

# Answer
> 4 votes
Have you checked out https://civicrm.org/extensions/percentage-price-field ? Great extension

# Answer
> 2 votes
If you’re on Drupal you can use Webform CiviCRM module and Webform Calculator module -\> to calculate transaction fees based on other fields, authorization fee and percentage -\> If you go this route let me know and I’ll post an updated link to a version of Webform Calculator module code with some fixes.

---
Tags: payment-processor, payment, eway
---


# Question
Title: Sparkpost service no longer free - any recommendations?
We have just been informed by Sparkpost that their free service which gave us up to 100k/mo emails with a max of 25k/day will be discontinued. We use the CiviDesk Sparkpost extension 1.3 on CiviCRM 5.12.4 under WordPress 5.2.2. The new Sparkpost pricing plans are shown at https://www.sparkpost.com/pricing/us/. We are borderline between the 50K/mo Starter plan (almost all months average ~25k/mo but we have peaks that go slightly over) and the 100K/mo Premier plan. These 2 plans are respectively priced at $30/mo and $75/mo US$. My main question concerns whether the webhooks that the CiviDesk extension uses work without change regardless of which plan chosen. Is anyone else in a similar boat and considering changing their mail service? We've only used Sparkpost from the get-go and would entertain comparably priced services that other CiviCRM sites recommend. Thanks to anyone for any advice.

# Answer
Two weeks ago I would suggest Mailgun but the plugin supplied for webhook settings seems to be updated to work for new CiviCRM versions.

But if you somehow make it work (and so integrate the service with Civi successfully) the service itself is quite successful for most of the mail providers.

Here comes the last two weeks... Yahoo (and AOL) domains keep rejecting the newsletter I sent because I was sharing an IP with some bad players. People at Mailgun are quite helpful and respond very quickly. They've changed the IP assigned to our account and the mails were accepted, but in another bulk sending, we had the problem all over again.

So I was tired of trying out providers and set up a postfix myself, I'm sending my mails with my own server. It needs maintenance and a bit experience to set it up but I think it was worth the effort. I can compare better in few months when new mailings will be sent.

The ironic part is, Yahoo has a program for bulk mailers and I had to enroll to that in order to have some positive reputation for my server and it was not based on IP address. So maybe I could try to add my domain to the program while I was using Mailgun and it could change something but I was already done a lot in server side, so this worked for me...

Hope it helps...
> 1 votes

# Answer
My recommendation is that you pay for SMTP services with a dedicated IP address. Your domain being blacklisted and marked as SPAM would end up far more costly.
> 1 votes

# Answer
Have you looked into amazon ses? It's not free but afaik by far the lowest price. A couple of steps to set up (and more complicated than others) but works well.
> 1 votes

---
Tags: civimail, sparkpost
---


# Question
Title: Edit Line Item error: Tax for amounts above 999.00 = NaN.N
I'm using the Edit Line Item Extension ver2.1 (biz.jmaconsulting.lineitemedit) on Civi 5.13.4 and the latest Drupal 7. I have a paid event where bookings are made via webform-civicrm.

If I edit a lineitem where the cost (unit price multiplied by quantity) exceeds 999.00, the tax amount calculates to NaN.N. I can submit the change but the tax amount is zero. If I add a new line item where the amount exceeds 999.00 the tax amount again reflects as NaN.N, and I cannot save the change. Any ideas? Many thanks, Davy

# Answer
Fixed by https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/pull/42 Thanks for the help of Monish Deb and Joe Murray.
> 2 votes

---
Tags: drupal, civicontribute, line-items
---


# Question
Title: Deduplicate by name AND surname (or vice versa)?
I'm just starting to use CiviCRM. So I realize that this could be a very dumb question.

I'm trying to deduplicate contacts by name AND surname. When I create a new deduplicating rule using name and surname, it looks like it gets all the contacts with the same name OR surname.

For example, if I have

* Mario Rossi
* Mario Verdi
* Mario Bianchi
* Mario Neri

they are all shown as duplicates...but they are not.

Is there a way to create a rule which addresses just contacts with same name AND surname (or vice versa)?

Thank you in advance.

# Answer
> 3 votes
Welcome to CiviCRM SE. Eileen's answer is definitely the right place to start, but you might want to look at a related question that I asked about the built-in (reserved) de-duplicate rules, as they aren't entirely clear from the documentation. It says "NAME" in the description, but actually uses the fields "First Name" and "Last Name" (You have used different terminology. It took me a while to work out how it worked.

See Reserved de-dupe rules

Update: Remembering odd behaviour with my previous issues, I looked again and have found that the de-dupe rules appear to be cached. So if you create a rule, adjust it and try with the new version, the old version is still used. I missed this before because I was checking the database and the rule is updated properly there. If you go to Administer \>\> System \>\> Cleanup Caches and Update Paths and select Cleanup Caches then try the de-dupe rule again it works as expected. If you were experimenting, then I expect this is the problem.

Alternatively if you delete the rule and add the new version it will also work.

A note on the page where you edit de-dupe rules to tell you to clear the cache would be very helpful. Let me know if this solves your problem and I'll report it as a bug/enhancement.

# Answer
> 2 votes
I think this blog does a reasonable job of describing it https://civicrm.org/blog/spidersilk/understanding-civicrm-dedupe-rules

Here are the official docs

https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/

* but we could do with pulling some in from the docs

Basically you need to check your weights - if you have them both set to '5' & the threshold is 10 then you need both for a dupe. If the threshold is 5 then either/or

---
Tags: duplicate-contacts
---


# Question
Title: SSL-encypted Database connection for CiviCRM?
I am in the middle of deploying a CiviCRM instance and have decided for scalability and security reasons to separate my web server and database server. I have a set of self-signed certificates installed on both the database server and the web server and Wordpress is using SSL. While CiviCRM is able to connect to the database server, I cannot get it to use SSL, which is a concern since I do not control the data center where both machines reside.

Has anyone dealt successfully with this?

I attempted to alter the URI for the database connection in civicrm.settings.php from:

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

```

to:

```
if (!defined('CIVICRM_DSN')) {
  if (CIVICRM_UF === 'UnitTests' && isset($GLOBALS['_CV']['TEST_DB_DSN'])) {
    define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']);
  }
  else {
    define('CIVICRM_DSN', 'mysql://USERNAME:PASSWORD@DBHOSTNAME/DATABASENAME?new_link=true&useSSL=true&ssl-ca=(/etc/mysql/ssl/cacert.pem)&ssl-cert=(/etc/mysql/ssl/client-cert.pem)&ssl-key=(/etc/mysql/ssl/client-key.pem)');
  }
}

```

This did not enable SSL, but instead caused me to receive the following error when loading any page:

```
Initialization Error

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -24
    [message] => DB Error: connect failed
    [mode] => 16
    [debug_info] =>  [nativecode=No such file or directory]
    [type] => DB_Error
    [user_info] =>  [nativecode=No such file or directory]
    [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=No such file or directory]"]

```

I checked if this was a permission error (though I suspected not since wordpress was using SSL) by running 'chmod 666' on all of the key files, but continued to recieve the above error.

Anyway, if anyone has any tips or insight into this it would be greatly appreciated. If it helps, I'm running Ubuntu 18.04 w/ PHP 7.2 and the latest version of CiviCRM on Nginx.

**Update**

I've found a (temporary) solution by making the following edits:

Altered civicrm.settings.php, changing 'mysql' to 'mysqli' in the DSN definitions:

```
if (!defined('CIVICRM_DSN')) {
  if (CIVICRM_UF === 'UnitTests' && isset($GLOBALS['_CV']['TEST_DB_DSN'])) {
    define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']);
  }
  else {
    define('CIVICRM_DSN', 'mysqli://USERNAME:PASSWORD@DBHOSTNAME/DATABASENAME?new_link=true');
  }
}

```

Edited civicrm/civicrm/packages/DB/common.php, changing

```
var $options = array(
    'result_buffering' => 500,
    'persistent' => false,
    'ssl' => false,
    'debug' => 0,
    'seqname_format' => '%s_seq',
    'autofree' => false,
    'portability' => DB_PORTABILITY_NONE,
    'optimize' => 'performance',  // Deprecated.  Use 'portability'.
);

```

to

```
var $options = array(
    'result_buffering' => 500,
    'persistent' => false,
    'ssl' => true,
    'debug' => 0,
    'seqname_format' => '%s_seq',
    'autofree' => false,
    'portability' => DB_PORTABILITY_NONE,
    'optimize' => 'performance',  // Deprecated.  Use 'portability'.
);

```

Edited civicrm/civicrm/packages/DB/mysqli.php, changing

```
    if ($this->connection = @mysqli_real_connect(
            $init,
            $dsn['hostspec'],
            $dsn['username'],
            $dsn['password'],
            $dsn['database'],
            $dsn['port'],
            $dsn['socket'],))
    {

```

to

```
    if ($this->connection = @mysqli_real_connect(
            $init,
            $dsn['hostspec'],
            $dsn['username'],
            $dsn['password'],
            $dsn['database'],
            $dsn['port'],
            $dsn['socket'],
            MYSQLI_CLIENT_SSL))
    {

```

This works as far as forcing SSL for the database connection (confirmed by enforcing SSL on the server side and via tcpdump). However, it's quite kludgy to say the least and will have to be redone after each update if common.php or mysqli.php are modified. If anyone more familiar with CiviCRM internals has a more elegant solution, I'd love to hear it.

# Answer
You don't actually have to replace mysql with mysqli since core already has a "hack" that will do this for you if the php mysqli extension is loaded. https://github.com/civicrm/civicrm-packages/blob/5.15.1/DB.php#L747

For the ssl, it seems reasonable to propose an update to that same function that lets you set the ssl option, either as part of CIVICRM\_DSN or a separate CIVICRM\_XXX setting in civicrm.settings.php. You can file a proposal at https://lab.civicrm.org/dev/core/issues
> 2 votes

---
Tags: php, mysql, ssl, mariadb
---


# Question
Title: FAX. Is it difficult to hook up Twilio programmable faxing to CiviCRM?
I would like to be able to use Twilio programmable faxing directly from within CiviCRM. Many of my contacts only have fax numbers (no email addresses).

I tried to put FAX in the tag section below, but, apparently my account isn't mature enough to use the "F" word.

Has anyone successfully hooked up Twilio programmable fax to CiviCRM. The Internet is silent on the subject.

# Answer
> 1 votes
I'm guessing Twilio is one of the cheapest and you're already set up with them, but if you'd consider RingCentral at about 1.7c/page which is reasonable then you can still keep Twilio for other things and just use RingCentral's email-to-fax plan.

So you'd add an email address on your contact records something like `1234567890@rcfax.com`, and then use it the same way you'd use any other email address, attaching the pdf or whatever.

https://www.ringcentral.com/plansandpricing/ringcentralfax.html

https://support.ringcentral.com/s/article/6643?language=en\_US

There are others besides ringcentral, but that's one I'm familiar with.

UPDATE: One workaround for tracking successful transmissions using the above is to use a dedicated sending address like 'fax-notifications@myorg.org', and then set up the email processor for inbound email processing on this address (see https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/#autofiling-email-activities-via-emailprocessor). Then when ringcentral (or whatever) sends the transmission receipt it will get automatically filed into CiviCRM. It won't get filed on the specific contact without some extra programming, but it would at least get filed in CiviCRM.

---
Tags: civimail, civimember
---


# Question
Title: How to change WordPress permalink settings without killing CiviCRM
I'm not 100% sure if I'm framing this question correctly but here goes...

When first setting up Civi and WP, I remember setting permalinks as **/post-name** so that /civicrm pages worked correctly.

We've been redesigning the WP front-end and for content structure purposes we'd like to move permalinks to **/category/post-name** instead.

Is it possible to do this without killing CiviCRM page links?

Thanks!

# Answer
> 1 votes
My current permalink settings are just that (though it might have been set to that before we installed civi but I do not think so). I do not think it would brake the site since civicrm is a page and not a post but I may be wrong.

---
Tags: wordpress
---


# Question
Title: Create contact by external form fails (using contact form in wordpress with plugins, civi runs on drupal)
I've followed this blog post to create a setup for my visitors to subscribe from a wordpress website to a newsletter in CiviCRM. CiviCRM setup is working (I have tested via API Explorer, it works as expected). I have installed Contact Form 7 and it's civicrm supporting plugins to a Wordpress (as described in the post).

I've set the plugin with keys (API and Site) that I've tested. I created a form, filled it and it sent a request to my site and returned a 403 error: "POST /civicrm/sites/all/modules/civicrm/extern/rest.php?json=1&entity=FormProcessor&action=create\_subscriber HTTP/1.1" 403

The keys are working but I can't check if they're sent correctly. To see what is being sent in the POST request, I've looked to my browser console, but there was no POST request to my civi installation.

I ran out of ideas to check. What can I be missing?

# Answer
> 1 votes
Have you tried the extension for remote forms? I use it and it has a very nice and clean look (you can customize the css as well if you'd like) It's not like cf so you can't add random fields but for a basic profile it would work great. https://github.com/progressivetech/net.ourpowerbase.remoteform

---
Tags: contacts, forms
---


# Question
Title: Possible bug? "Enable Double Opt-in for Profile Group(s) field" displays twice
Seems that **Enable Double Opt-in for Profile Group(s) field** option has two identical copies in CiviMail Component Settings.

Also present on test server. https://demo.circle-interactive.co.uk/

# Answer
> 4 votes
Yes this happened since 5.8. I have submitted a PR for this issue. You can either apply patch or wait for 5.18 release.

> **Note:** Since this change involves update to settings file, you will need to clear civicrm cache after applying patch.

Cheers

Pradeep

---
Tags: civimail, issues, bug-reporting
---


# Question
Title: Authorize.net is upgrading to CyberSource SCA. Will our payment gateway still work?
Auth.net tell us that they are upgrading our account to CyberSource and that this entails moving to Strong Customer Authentication (SCA).

Looking at their information on this, https://www.cybersource.com/en-EMEA/psd2/upgrade/, it seems likely this will have substantial impact on the code of the Auth.net payment processor. I'm not at all sure about this... but wanting to ask the question just to be sure!

I think Auth.net plan to make this change in the next month or two, so if changes to code are necessary then this will need to take place soon!

I've phoned Auth.net support, but they are very hazy about whether code changes will be required. They 'think' 'maybe not'... Hmmm!

They said that they are merging with CyberSource and that they are therefore merging the best of their software with the best of CyberSource's software. Furthermore, they said they are receiving developers bit by bit, and currently the information is trickling out to them day by day.

We are on civicrm and drupal latest, based in the UK.

Does anyone have any details about this?

# Answer
> 2 votes
We updated the AuthorizeNet processor here: https://github.com/mattwire/com.donordepot.authnetecheck for both echeck and credit card.

However, it looks like AuthNet will not be supporting SCA (so you'll be fine for non EU payments) but will need to switch to Cybersource to accept EU payments via credit card. It looks like Cybersource is supported by the Omnipay processor https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor

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


title: How can I disable a reserved profile?

text:
# Question
Title: How can I disable a reserved profile?
I have a profile that was created by some user and and went into "Reserved Profile" List. The bots are attacking the profile and creating contacts, since the form is public facing and no captcha was added. The form also does not give a option to disable or delete or settings. Can anyone suggest how do I remove this form completely? If can be done using mysql which table and values should be altered?

Thanks

# Answer
You can use api explorer(civicrm/api) to disable the reserved profile

or if you have access to database then run sql to update the profile

UPDATE civicrm\_uf\_group SET is\_active = 0 WHERE id = 10;
> 5 votes

# Answer
You can actually still edit it and uncheck the active box you just have to hack the url to use the id, e.g.

https://site-url/civicrm/admin/uf/group/update?action=update&id=22&context=group

Then the active checkbox is near the bottom.
> 5 votes

---
Tags: profile
---


# Question
Title: How to stop Mailing Queue from civirules?
By mistake I have turned on a settings in civirules that it keep sending email repeatedly. I have removed the criteria from civirules but it seems mails are still being sent through "Scheduled mail Job". Is there a way to stop any future emails ran by "delayed action"?

# Answer
Rules run by delayed action should be in the `civicrm_queue_item` table. Please be sure not to delete any other rows that may be in there!
> 3 votes

---
Tags: mailing, civirules, scheduled-job
---


# Question
Title: Duplicated membership options after updated to 5.15.1
After updating to 5.15.1 I find that our membership contribution page has duplicated a couple of membership types and added "-old" to the type name. This is ridiculous confusing to the users. I don't find a way to fix this using the contributions forms, the "-old" options do not appear so I can delete, and I don't know which database table holds this information. I would just delete rows from the database to fix this so the duplicated membership types are deleted.

Edit: okay I found the civicrm\_membership\_type table. There are no types with a "-old" extension! What is going on? Perhaps I should delete and recreate the contribution page. What then happens to the financial ledgers? Will I destroy data? You can see the problem on this page https://idahonativeplants.org/?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=7

# Answer
> 0 votes
It might not be a membership type but just a price list - if you go to Contributions - Manage Contribution Pages and then on the far right of the table click on Configure, one of the choices is Contribution Amounts. You might see these "-old" ones listed in there. Or if it is a real membership, it might be a price set which you'd see in the same place but on the Membership Settings instead of Contribution Amounts.

---
Tags: civimember
---


# Question
Title: Fresh install, Civicrm Wordpress, bricks admin
I'm having trouble installing CiviCRM. I can activate the plugin, enter the database credentials (tested via command line, and the app does connect and create the tables and what not). I hit the install button, and it does some work, then shows me a type of confirmation screen for a few seconds, but then redirects to

/wp-admin/options-general.php?page=civicrm-install

And in the browser says: "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

The error stack trace at bottom of this post. Snippets here:

Looks like the fatal error is "Uncaught Error: Call to undefined function set\_current\_screen()"

but the cause underlying it is more related to #4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB.php(984): PEAR\_Error-\>\__construct('DB Error: synta...', -2, 16, Array, '\nSELECT v.labe...')\n

which is at a higher level run by `CiviCRM_For_WordPress->initialize()\n
CiviCRM_For_WordPress->register_hooks_clean_urls()\n
CiviCRM_For_WordPress->register_hooks_common()\n`

And, I see the browser error on any wp-admin page I go to. So it kinda bricks the whole admin.

When I go to the public facing wordpress homepage, I get simpler error in the error log:

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught CRM\_Core\_Exception: \[0: Transaction integrity error: Expected to find active frame\n\n thrown in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/Civi/Core/Transaction/Manager.php on line 107'

I can reset the world by dropping the civicrm specific database, creating an empty database in its place, and deleting the wp-content/uploads/civicrm folder. That lets me get back into the wordpress admin.

`Apache2: Server version: Apache/2.4.39 (Unix)
php-fpm: PHP 7.3.5
mysql: Ver 8.0.16
wordpress: 5.2.1
os: ubuntu
civicrm: civicrm-5.13.4`

`Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function set_current_screen() in /opt/bitnami/apps/wordpress/htdocs/wp-admin/admin-header.php:31
 \nStack trace:\n
 #0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php(269): require_once()\n
 #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(218): CRM_Utils_System_Base->theme('__construct('DB Error: synta...', -2, 16, Array, '\\nSELECT v.labe...')\n
 #5 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-2, 16, Array, '\nSELECT v.labe...')\n
 #6 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, Array, '\nSELECT v.labe...', 'DB_Error', true)\n
 #7 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call('raiseError', Array)\n
 #8 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-2, NULL, NULL, '\nSELECT v.labe...', '1064 ** You hav...')\n
 #9 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()\n
 #10 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery('\nSELECT v.labe...')\n
 #11 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query('\nSELECT v.labe...')\n
 #12 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query('\nSELECT v.labe...')\n
 #13 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query('\nSELECT v.labe...')\n
 #14 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1414): CRM_Core_DAO->query('\nSELECT v.labe...', true)\n
 #15 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/OptionGroup.php(169): CRM_Core_DAO::executeQuery('\nSELECT v.labe...', Array)\n
 #16 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/PseudoConstant.php(291): CRM_Core_OptionGroup::values('languages', false, false, false, NULL, 'label', true, false, 'name', 'weight')\n
 #17 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(3513): CRM_Core_PseudoConstant::get('CRM_Contact_BAO...', 'preferred_langu...', Array, NULL)\n
 #18 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/I18n.php(195): CRM_Contact_BAO_Contact::buildOptions('preferred_langu...')\n
 #19 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/I18n.php(266): CRM_Core_I18n::languages()\n
 #20 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty.php(154): CRM_Core_I18n::uiLanguages()\n
 #21 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty.php(172): CRM_Core_Smarty->initialize()\n
 #22 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(188): CRM_Core_Smarty::singleton()\n
 #23 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))\n
 #24 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB.php(984): PEAR_Error->__construct('DB Error: synta...', -2, 16, Array, '\nSELECT v.valu...')\n
 #25 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-2, 16, Array, '\nSELECT v.valu...')\n
 #26 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, Array, '\nSELECT v.valu...', 'DB_Error', true)\n
 #27 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call('raiseError', Array)\n
 #28 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-2, NULL, NULL, '\nSELECT v.valu...', '1064 ** You hav...')\n
 #29 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()\n
 #30 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery('\nSELECT v.valu...')\n
 #31 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query('\nSELECT v.valu...')\n
 #32 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query('\nSELECT v.valu...')\n
 #33 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query('\nSELECT v.valu...')\n
 #34 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1414): CRM_Core_DAO->query('\nSELECT v.valu...', true)\n
 #35 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/OptionGroup.php(169): CRM_Core_DAO::executeQuery('\nSELECT v.valu...', Array)\n
 #36 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php(1107): CRM_Core_OptionGroup::values('addressee', NULL, NULL, NULL, ' AND is_default...', 'value')\n
 #37 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(480): CRM_Contact_BAO_Contact_Utils::defaultGreeting('Individual', 'addressee')\n
 #38 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(286): CRM_Contact_BAO_Contact::ensureGreetingParamsAreSet(Array)\n
 #39 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(2007): CRM_Contact_BAO_Contact::create(Array)\n
 #40 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(299): CRM_Contact_BAO_Contact::createProfileContact(Array, Array)\n
 #41 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(119): CRM_Core_BAO_UFMatch::synchronizeUFMatch(Object(WP_User), 1, 'user@example.co...', 'WordPress', NULL, 'Individual', false)\n
 #42 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm.php(915): CRM_Core_BAO_UFMatch::synchronize(Object(WP_User), false, 'WordPress', 'Individual')\n
 #43 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm.php(632): CiviCRM_For_WordPress->initialize()\n
 #44 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm.php(614): CiviCRM_For_WordPress->register_hooks_clean_urls()\n
 #45 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm.php(520): CiviCRM_For_WordPress->register_hooks_common()\n
 #46 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->register_hooks('')\n
 #47 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)\n
 #48 /opt/bitnami/apps/wordpress/htdocs/wp-includes/plugin.php(465): WP_Hook->do_action(Array)\n
 #49 /opt/bitnami/apps/wordpress/htdocs/wp-settings.php(525): do_action('init')\n#50 /opt/bitnami/apps/wordpress/htdocs/wp`

# Answer
Neither PHP 7.3 nor MySQL 8.0 are currently supported. Looking at system requirements I see a minimum but not maximum version of MySQL; that needs correcting. PHP 7.3 generally works but it's not part of the automated testing matrix as of now.
> 1 votes

# Answer
I also see this error, using WP 5.2.2/MySQL 5.6 (recommended)/PHP 7.2 (recommended)/Apache 2.4/ on Windows 10, going back to Civicrm 5.5 (5.05) where updates to the Option Groups Admin UI were made(https://github.com/civicrm/civicrm-core/blob/5.5/release-notes/5.5.0.md) In the stack trace above you see refs to option group language members. Civicrm 5.40 does not have this problem.
As noted above, if you comment-out/remove Civicrm DSN in civicrm\_settings, you can get back into WP admin to disable Civi plugin. On Windows 7 with MySQL 5.5 this error does not show up, I can install Civicrm 5.15 no problem.
> 2 votes

---
Tags: wordpress, install
---


title: Contact Search Results Address Type

text:
# Question
Title: Contact Search Results Address Type
When I do Search-\>Find Contacts and get the standard list of contacts, it looks like the address displayed is not the contact's primary address, but simply the first address that was created for the contact. I've looked in the code to try to find where this query is located, but I can't find it. Shouldn't the search results screen display the primary address, primary email, and primary phone?

I know I can create a custom profile to change the search results screen, but I would think that the default screen should display the primary contact information by default.

# Answer
MikeLab, Welcome to CiviCRM SE.

The address to be displayed on search result (primary or non-primary) is based on the setting 'Search Primary Details Only'.

You can change the value of this setting by navigating to CiviCRM \>\> Administrator \>\> Customize Data and Screens \>\> Search Preferences.

If you set 'Search Primary Details Only' to yes then it search address or phone or email on primary, if no then it will search on all address or phone or email. The same logic also works on listing.

HTH

Pradeep
> 5 votes

# Answer
A client recently pointed this out to me, and I started to trace it down, but couldn't replicate it in my simple tests, so I just gave them a custom profile. However, I found the place in the code the query is generated:

* `CRM_Contact_BAO_Query` is where all the magic happens. In the `initialize()` method there's this line: `$this->_fromClause = self::fromClause($this->_tables, NULL, NULL, $this->_primaryLocation, $this->_mode, $apiEntity);`
* After that line runs, `$this->_fromClause` is set. In my testing, that includes `LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 )`. This is the correct behavior, not what we're seeing.
* I tried figuring out how to trigger it NOT getting the `is_primary = 1` bit. This is where I ran out of steam. I'm 90% sure it's in `getEntitySpecificJoins()`, but it could be related to `getPrimaryCondition()`.
> 1 votes

---
Tags: search-results
---


title: Integration with Weebly?

text:
# Question
Title: Integration with Weebly?
We have been using CiviCRM for many years now. However, our organization has decided to move to Weebly for content management.

How can we continue using CiviCRM, and possibly integrate some aspects like forms/profiles with Weebly?

# Answer
The short answer is no.

The long answer is that Weebly is a proprietary system - you would not be able to integrate CiviCRM. However, you could use clunky iFrames and there is work in progress to have some CiviCRM forms embedded on external sites.

Some small organizations may use a proprietary system for their website and host civiCRM with wordpress or drupal on a sub domain - that could be an option too.

What is your current version of CiviCRM and what is your current CMS as those are factors.
> 3 votes

---
Tags: cms-integration
---


title: Processed as Activity: Cron job output

text:
# Question
Title: Processed as Activity: Cron job output
Recently we have had our cron email us anytime there is an output as typically that only occurs when there is an email. `Processed as Activity: Cron job output` \- I have the same cron running on other installations and I do not get this output - is this normal?

# Answer
> 0 votes
Do you have the inbound email processor configured? It has that as output. And it sounds like you are sending cron logs to the email processor.

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


title: Event Template Start Date

text:
# Question
Title: Event Template Start Date
I created an event template years ago, and when I use this template to create a new event, it auto populates the start date with a very old date. If I edit this event template, the start and end dates aren't shown as something that can be modified.

Where is the auto populated start date coming from and how do I change it? Ideally it would show today's date so that I don't have to scroll through months and years to get to a future date.

We are running CiviCRM 5.8.2 on Drupal.

# Answer
> 2 votes
I just did some testing on mine - it works the same way. It appears that "templates" are actually created and saved just like an actual event. So you'll find the data in the civicrm\_event table just like all your other events. It looks like it saves it with a start date that is the same as the date you inputted the template (because date is a required field, but you aren't given the option to input one). The only way I can find thus far to change this is to go into your database, find that template, and edit the date. I just manually changed one of my templates via PHPMyAdmin and sure enough when I go to use it, that date is now the one selected. So at least then you wouldn't need to scroll so far back?

I wonder if someone has an edit they've done to make the date field available when creating a template.

# Answer
> 1 votes
The behaviour has changed in more recent versions of CiviCRM to not save the start date in event templates. However, since this does not fix older templates, I submitted a change request to always ignore the start/end date from templates. Unless it gets blocked, the change should be integrated in CiviCRM 5.17 or 5.18.

---
Tags: civievent, templates, civicrm-event
---


title: Does CiviMobileAPI generate any logs?

text:
# Question
Title: Does CiviMobileAPI generate any logs?
I enabled CiviMobileAPI extension and Civi CRM Api Fix plug in (I'm using Wordpress) but can't login in the CiviMobile app (iOS). It keeps showing the Server API Error (Unknown error) message.

I wonder if there are any logs that can help investigate what can be causing this issue.

WordPress 5.2.2 with Primer theme CiviCRM 5.15.1 Civi CRM Api Fix. plugin 1.0.0 CiviMobileAPI extension 4.0

CiviMobile iOS app 4.0

Thanks!

# Answer
> 1 votes
Have you made sure the directory for the extension is com.agiliway.civimobileapi and not com.agiliway.civimobileapi-master (or anything else after civimobileapi).? The directory has to be correct. Also do you have the new civicrm api fix? Or the old one?

---
Tags: wordpress, api, mobile
---


title: No Address on Member Badge

text:
# Question
Title: No Address on Member Badge
I am trying to print a member badge ID but the address is not showing. I have it in the system but not displaying on the badge.

# Answer
> 1 votes
Welcome to Stack Exchange!

By default, the postal address doesn't appear on the badges. You need to go to **Administer menu » CiviEvent » Event Name Badge Layouts** to customize what's displayed.

---
Tags: civimember
---


# Question
Title: What might cause contribution amounts to multiply by 100 instead of recording values with a decimal place
I'm working on a site where whenever a contribution is entered into civi with a decimal, it's multipled by 100. It's a lot like this old issue, except the site has not to my knowledge ever been localized and has always used USD.

In the localization settings if I change the decimal value to a comma and the thousands separator to a period and enter a contribution of $5,00 the contribution amount is 5. When I swap it back to the U.S. dollar defaults, entering 5.00 is a contribution amount of 500. I can't replicate on any other site, but I can replicate when loading the civicrm database into a clean codebase and clean wordpress site. I've tested replacing the civicrm\_setting table as this seemed like it may have been the culprit but that didn't help. Any clues to where else I could look for something problematic in the database?

Site is on 5.10.3 currently, it's an older install and no one remembers when this problem started.

# Answer
> 5 votes
I managed to solve this.

I looked at what adding a contribution touches in the database. I ruled out differences in the settings table, but then when I looked at `civicrm_currency` I found that in this database, some characters were not present, even though the encoding would support them. so for instance the `civicrm_currency` record `(6,'INR','₨','356','Indian Rupee')` in another database was `(6,'INR','','356','Indian Rupee')` in this one.

It's not quite clicking with me *why* the U.S. dollar amounts were being translated -- that record was not different at all. But swapping out the currency table with one from a different site resolved my issue.

---
Tags: wordpress, civicontribute, currency
---


# Question
Title: How to include smarty script with mosaico email
I used to use a name personalisation in civimail with smarty script...

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

```

I was testing if this script would render in mosaico 2.x, it seems doesn't work. Is there any workaround? Thanks

# Answer
> 3 votes
As a workaround for the specific example in your post, you can create a custom token. This post explains how using hook\_civicrm\_tokens and hook\_civicrm\_tokenValues

# Answer
> 2 votes
I looked into it a while back. Seems mosaico is not compatible with smarty.

---
Tags: mosaico, smarty
---


# Question
Title: CiviCRM profile "used for" options are not allowing a CiviContribute option on wordpress
I'm running CiviCRM Version 5.13.5 on WordPress 5.2.2

When I set up on staging, I used CiviCRM Version 5.13.4, and the various Profile options were available, including : Used For Standalone Form or Directory Search Views \[ x \] User Registration \[ x \] User Account \[ x \] soft\_credit \[ x \] CiviContribute \[ x \] on\_behalf

However, now that I'm setting up on live with Version 5.13.5, my only available options are: Used For Standalone Form or Directory Search Views \[ x \] User Registration \[ x \] User Account

Any help for why the Contribution options are missing?

# Answer
Yeah it seems a little weird. It seems to get those options to show you need to first create a contribution page and check the options related to those. So:

For soft\_credit, you need to have an existing contribution page with the `Honoree Section Enabled` checked.

For on\_behalf, you need to have an existing contribution page with the `Allow individuals to contribute and / or signup for membership on behalf of an organization` checked.

For civicontribute to show, you need to have an existing contribution page where the profiles tab has already been set to use a profile.

But in any case they seem to be just visual indicators that indicate that you have a page that uses it.
> 1 votes

---
Tags: wordpress, profile
---


title: Stripe "No such token: Stripe Token"

text:
# Question
Title: Stripe "No such token: Stripe Token"
Having problems getting Stripe working.

Joomla: 3.9.4 CiviCRM: 5.11 (is this a problem?) Stripe extension: 5.3.2 Stripe API: 2019-2-19

Getting this result on the contribute page:

> Failed to create Stripe Customer: Payment Response: Type: invalid\_request\_error Code: resource\_missing Message: No such token: Stripe Token

Stripe shows this:

> Request POST body { "description": "My test name (CiviCRM)",
> "card": "Stripe Token", "email": "tester@jonssweb.net",
> "metadata": { "civicrm\_contact\_id": "15" } }
>
> Response body { "error": { "code": "resource\_missing", "doc\_url": "https://stripe.com/docs/error-codes/resource-missing", "message": "No such token: Stripe Token", "param": "card", "type": "invalid\_request\_error" } }

I've been scouring the forums for ideas to try and have checked my API keys many, many times. We have Stripe working fine with Wild Apricot. Any ideas would be appreciated. Thank you!

# Answer
Turned out to be a problem with my Resource URL paths. Changed from the relative CiviCRM URL variables to absolute paths.
> 3 votes

# Answer
Same issue here, running under Drupal. Resolution was also a Resource URL. The page not found error was for: sites/default/files/civicrm/**ext**/com.drastikbydesign.stripe/js/civicrm\_stripe.js

Civicrm\>Administer \> System Settings \> Resource URLs

Changed Extension Resource URL from \[civicrm.files\]/**ext**/ to \[civicrm.files\]/**custom\_ext**/
> 0 votes

---
Tags: stripe
---


# Question
Title: Changing Display Path to /civicrm on frontend
I have just done a new install of CiviCRM 5.15.1 on Wordpress 5.2.2, and before going any further, is it possible to change the mydomain.com/civicrm path to civi pages to something else? Say, mydomain.com/members.

Or will this muck everything up for future updates?

Thanks for your advice.

Cheers, Tracy

# Answer
> 2 votes
Welcome to CiviCRM Stackexchange. Ofcourse you change the path to point to your own alias.

You will need to create a blank page in wordpress with member url or update the url alias of default CiviCRM page.

Make sure you use the same alias to define 'WordPress Base Page' in CiviCRM CMS integration(CiviCRM \>\> Administer \>\> System Settings \>\> CMS Database Integration)

Thanks

Pradeep

---
Tags: wordpress
---


title: Assigning case roles via webform?

text:
# Question
Title: Assigning case roles via webform?
I have inherited a Drupal + CiviCRM 4.7 site which uses CiviCase to track applicants for an award. The applicant is the case client, and each case (nomination) has up to three judges assigned, who are supposed to submit scores on the case itself.

On the existing Case Type "Nomination" I have created the Case Role "Judge \[for\]" to link the judge and the applicant.

Right now, these assignments are handled manually, and I would like to set up a Webform CiviCRM interface for it; I cannot, however, find a way to add these role assignments. The webform has four contacts (for the applicant and each of up to three judges), but there is no way to set up the Judge role, only Case Client and Case Creator.

I tried setting this up in Rules using relationships, but it creates general relationships, not case relationships, and so the Judges do not have permission to view and modify the case.

Did I miss a step?

# Answer
> 4 votes
I think its an issue with Webform module itself where it doesn't show relationship if you have relationship type label and name different.

Developer from Circle-Interactive submitted a fix for this today. Can try applying patch if it displays the relationship type on case tab of the webform?

Thanks

Pradeep

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


# Question
Title: Webform CiviCRM - Update Recurring Payment Profile
Let's say in 2018 someone uses the webform and creates a membership and a recurring payment - ongoing - for $5 at a certain membership level.

Let's say in 2019, they want to upgrade their membership level. They login and use the same form to choose the next level up and want to pay $10 ongoing. Great. They submit the form.

What happens to the first profile? Does the recurring profile get upgraded or disabled?

# Answer
I believe a new recurring profile is created leaving the old one intact. We had similar issue where people upgraded from and to auto-renew membership from online and they had 2 recurring in progress i.e payment was deducted twice unless we had to manually cancel the subscription in payment processor for the old one.
> 1 votes

---
Tags: webform-civicrm, recurring-contributions
---


# Question
Title: How do you separate wordpress and civicrm tables?
When we first installed CiviCRM - the installer was super eager to install using the existing WordPress database. We were just testing out CiviCRM at the time, so it was not a big deal - however we ended up sticking with CiviCRM and now we are migrating to a new server. Before we migrate to the new server - we think now is a good time to separate the CiviCRM tables from the wordpress tables. Based on the stack mentioned above, I plan on doing the following:

1. Enter site into "maintenance mode". i.e. temporarily close to public.
2. Create a new civicrm database
3. Export the civicrm tables from the original wordpress DB.
4. Import the civicrm tables into the new civicrm database
5. Edit wp-content/uploads/civicrm/civicrm.settings.php to point to the new civicrm-only DB.
6. Test
7. Drop the civicrm tables from the original wordpress database.
8. Celebrate?

Is there something else I should be aware of?

# Answer
> 1 votes
Maybe if you have some plugin that uses $wpdb to access civi tables. For example there are several workarounds to try to get the functionality of drupal views that isn't in wordpress, and if they're written as native wordpress plugins and not civicrm extensions maybe they would use $wpdb.

# Answer
> 1 votes
First, I think this is a comprehensive list, though Demerit obviously uses some integration tricks I don't, and others may as well.

Second, for concrete instructions on how to do steps 2-4 and 7, they're the same as the Drupal 8 database separation steps that are documented here on Stack Exchange.

---
Tags: wordpress, mysql, sql
---


# Question
Title: Keyboard shortcut to access contact Quick Search?
Is there a way to activate the contact Quick Search form field at the top of each page, with a keyboard shortcut rather than moving the mouse cursor?

# Answer
> 6 votes
This shortcut and others can be found by clicking on the "Access Keys" help icon at the bottom of many CiviCRM pages.

# Answer
> 5 votes
The form field is assigned "q" as its HTML accesskey. I don't know about other browsers, but you can activate it in Firefox by pressing alt+shift+q (Windows/Linux), or on Mac: either control+option+q or control+alt+q.

---
Tags: dashboard, ui
---


title: How to amend CiviCRM Event URL

text:
# Question
Title: How to amend CiviCRM Event URL
I have CiviCRM installed on Drupal. I am using CiviEvents, when i click a link to view the event the url is displayed as:

info%3Fid%3D8%26reset%3D1

Is there anyway i can clean this up? Would prefer if i can have it like:

info/id/8 or info?reset=1&id=8

I have installed the module "Query Parameters To URL" for Drupal and have tried setting Path Aliases but no luck...

Any Ideas?

Thanks,

Moe

# Answer
This is a known issue for a quiet a long time and has been no progress on it. Alternate way of doing this would be to use global text (or use the event title field) and rewrite the output as a link and generate the link as civicrm/event/info?reset=1&id=\[id\].

HTH

Pradeep
> 2 votes

---
Tags: civievent, urls
---


# Question
Title: How to restrict Profile Edit/Create Visibility?
I have Profile which I need to provide access to only user who are Active Members, So I have restricted Listings to Active Members only but when I go to the

> civicrm/profile/edit?gid=20&reset=1
>
> civicrm/profile/create?gid=20&reset=1 It still displays the profile page. How can I make sure edit and create profile is displayed only if its an active member ?

When I login with a member who is not a member and access the url of create/edit profile, it provides me the option to create or edit, how can I prevent that using civicrm settings ?

# Answer
First of all you will need to update the CMS permission to remove view/edit data using profile. Configure ACL from CiviCRM UI to restrict group of contacts to update their contact using profile.

Note: I guess changing the permission will result in profile not available for any user if they dont have access to. If you want to restrict specfic profile and enable all others them i think you can use profile hooks to return access denied.
> 1 votes

---
Tags: drupal, profile
---


title: How do i delete past events?

text:
# Question
Title: How do i delete past events?
I have some events that are over some by years, which are not showing up on my manage events. I am trying to clean up the data but I can't even find my past events.

I also need to delete the Price sets but it won't let me do that because it's attached to the event.

I do need to keep the participants information.

# Answer
> 1 votes
Unfortunately you can't delete the event if it has participant. If you delete them the its participants will be deleted automatically. Even its not advisable to delete price set if it was ever used to record participant ticket, contribution or membership. If you delete them you will loose all financial data associated with it or the system might behave weirdly if you ever try to update the participant or contribution or membership.

If you want this price set not to be displayed on screen then you can set is\_quick\_config = 1(TRUE/Yes) either running sql or from api explorer.

Cheers

Pradeep

---
Tags: civievent
---


# Question
Title: Cases - Send Copy of an Activity, Add Individual Phone and Email
When a person is assigned any activity, the information goes as a form. However, I would also like to include the phone number and email address of the person from whom the event was created. How can I do that.

> administrator/?option=com\_civicrm&task=civicrm/admin/messageTemplates/add&action=update&id=1&reset=1

```
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title></title>
</head>
<body>

{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}

<center>
 <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">

  <!-- BEGIN HEADER -->
  <!-- You can add table row(s) here with logo or other header elements -->
  <!-- END HEADER -->

  <!-- BEGIN CONTENT -->

  <tr>
   <td>
    <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
     <tr>
      <th {$headerStyle}>
       {ts}Activity Summary{/ts} - {$activityTypeName}
      </th>
     </tr>
     {if $isCaseActivity}
      <tr>
       <td {$labelStyle}>
        {ts}Your Case Role(s){/ts}
       </td>
       <td {$valueStyle}>
        {$contact.role}
       </td>
      </tr>
      {if $manageCaseURL}
       <tr>
       <td colspan="2" {$valueStyle}>
     <a href="{$manageCaseURL}" title="{ts}Manage Case{/ts}">{ts}Manage Case{/ts}</a>
       </td>
       </tr>
      {/if}
     {/if}
     {if $editActURL}
     <tr>
       <td colspan="2" {$valueStyle}>
   <a href="{$editActURL}" title="{ts}Edit activity{/ts}">{ts}Edit activity{/ts}</a>
       </td>
     </tr>
     {/if}
     {if $viewActURL}
     <tr>
       <td colspan="2" {$valueStyle}>
   <a href="{$viewActURL}" title="{ts}View activity{/ts}">{ts}View activity{/ts}</a>
       </td>
     </tr>
     {/if}
     {foreach from=$activity.fields item=field}
      <tr>
       <td {$labelStyle}>
        {$field.label}{if $field.category}({$field.category}){/if}
       </td>
       <td {$valueStyle}>
        {if $field.type eq 'Date'}
         {$field.value|crmDate:$config->dateformatDatetime}
        {else}
         {$field.value}
        {/if}
       </td>
      </tr>
     {/foreach}

     {foreach from=$activity.customGroups key=customGroupName item=customGroup}
      <tr>
       <th {$headerStyle}>
        {$customGroupName}
       </th>
      </tr>
      {foreach from=$customGroup item=field}
       <tr>
        <td {$labelStyle}>
         {$field.label}
        </td>
        <td {$valueStyle}>
         {if $field.type eq 'Date'}
          {$field.value|crmDate:$config->dateformatDatetime}
         {else}
          {$field.value}
         {/if}
        </td>
       </tr>
      {/foreach}
     {/foreach}
    </table>
   </td>
  </tr>
 </table>
</center>

</body>
</html>

```

# Answer
Fatith, As per your requirement this is not straight forward and needs some custom coding or need good knowledge about using smarty api since the created id is stored as source contact id for an activity and data of source contact id is directly not available in smarty or as a token.

Here is possible solution for this

1. Create token and token values using CiviCRM hooks, then add tokens in message template
2. Like @demerit said use smarty to get contact details of the person who created the activity. Below snippet should work in your case. You need to add the below code in desired place in message template.

snippet:

```
{if $contact.activity_id}
  {crmAPI var='activityResult' entity='Activity' action='getsingle' return="source_contact_id" id=$contact.activity_id}
  {crmAPI var='contactResult' entity='Contact' action='getsingle' return="phone,email" id=$activityResult.source_contact_id}
  <tr>
    <td>Phone Number</td>
    <td>{$contactResult.phone}</td>
  </tr>
  <tr>
    <td>Email</td>
    <td>{$contactResult.email}</td>
  </tr>
{/if}

```

HTH

Pradeep
> 2 votes

# Answer
You can edit the message template at admin - Civimail- message templates on the system workflow tab and use the api to look up the current user's info, as described at https://docs.civicrm.org/dev/en/latest/api/interfaces/#smarty-api-interface

e.g. `{crmAPI entity='contact' action="get" ...`
> 1 votes

---
Tags: joomla, email, phone
---


# Question
Title: How do I add the timezone field to a profile?
Timezone is one of the fields in the address table. I'd like to add it to a data entry profile but it's not listed in any of the dropdown menus. How can I add it to the profile even if it's not in the dropdown?

# Answer
> 2 votes
This is not supported by CiviCRM but you can do a small change in your existing CiviCRM file as shown below and clear civicrm cache, the profile form should then should allow you to add timezone field of address.

```
diff --git a/CRM/Core/DAO/Address.php b/CRM/Core/DAO/Address.php
index b1e00a83dc..ee9bf2d945 100644
--- a/CRM/Core/DAO/Address.php
+++ b/CRM/Core/DAO/Address.php
@@ -731,6 +731,7 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO {
           'table_name' => 'civicrm_address',
           'entity' => 'Address',
           'bao' => 'CRM_Core_BAO_Address',
+          'import' => TRUE,
           'localizable' => 0,
           'html' => [
             'type' => 'Text',

```

---
Tags: profile
---


title: Civimobile API 4.0 QR code question

text:
# Question
Title: Civimobile API 4.0 QR code question
Can anybody tell me what this means? When creating a new event with the new release of City Mobile API, it gives you the option to turn on QR code generation for that event. However, it has a strange warning note that's really confusing, it reads like this:

When generating QR Code tokens, use this Event If enabled, the QR Code for this event will be used (you can only have one event enabled at a time, enabling this event will disable all other events).

When I read this, it sounds like if I enable QR code generation for one event all of my other events will also be disabled (is that QR code generation disabled, or the event itself will be disabled and not active).

I guess I'm just really confused by this new feature and there isn't any documentation talking about its behavior. It would seem strange to me that you can only have one event at a time generating QR codes considering most organizations would have multiple events scheduled and open for registration at one time.

Anyone have any thoughts on this?

# Answer
> 0 votes
Thanks for everyone taking a look at this.. I contacted the development team and they responded with some good news..

> Oh, thanks for your feedback!!! Yes, you are right, the message you saw – incorrect. I’ll ask our developers to change the message. The main thing you (and other users of CiviCRM/Events + QR code) need to know that you can activate this option “QR Code” for the event only once when creating the event. It wouldn’t be available later when you would like to edit event and etc. That was the main information that users need to know. So, activating “QR Code” option for one event does not influence other events. At the same time, many events can use the “QR Code” option.
>
> Thanks, Maryana

So, I guess they just have to correct their description.. but, it's nice to know that we will have the ability to us QR codes for multiple events at the same time!!

# Answer
> 1 votes
This option is not related to CiviMobile. Rather becomes available once you install QR code check in extension https://github.com/progressivetech/net.ourpowerbase.qrcodecheckin

And yes, you are reading it correctly, only a single qr can be available at a time. This is limitation of this extension, unless someone codes it in a different way. But please see a discussion why it can’t be done with existing extension https://github.com/progressivetech/net.ourpowerbase.qrcodecheckin/issues/6

---
Tags: civievent
---


# Question
Title: You have requested a non-existent service "mosaico_graphics"
I am using version 5.2.2 of Wordpress and CiviCRM 5.13.5. Since I did a backup last week, I am getting this message when I go into Civi.

*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 have requested a non-existent service "mosaico\_graphics".*

Then I click CiviCRM again, and all is well.

However, today I tried to create a new mailing, and I get the same message. Unfortunately, I can't just click New Mailings and move on.

In either case, I am not trying to use mosaico.

(By the way, mosaico has not been working for some time, but I've been able to do a workaround.)

Thanks.

# Answer
> 3 votes
As it turns out, adding FlexMailer did the trick. Administer: System Settings: Extensions Add New FlexMailer

---
Tags: mosaico
---


title: Fatal Error Activating CiviCRM

text:
# Question
Title: Fatal Error Activating CiviCRM
We had this issue activating CiviCRM

```
Warning: require_once(CRM/Core/ClassLoader.php): failed to open stream: No such file or directory in /home/capitaleventscom/public_html/wp-content/uploads/civicrm/civicrm.settings.php on line 462

Fatal error: require_once(): Failed opening required 'CRM/Core/ClassLoader.php' (include_path='.:/home/capitalevents/public_html/wp-content/plugins/civicrm/civicrm/:/home/capitalevents/public_html/wp-content/plugins/civicrm/civicrm//packages:.:/usr/local/php56/pear') in /home/capitaleventscom/public_html/wp-content/uploads/civicrm/civicrm.settings.php on line 462

```

then followed by this when using a fresh download:

```
Could not extract file from archive. civicrm/civicrm/packages/kcfinder/themes/dark/img/files/big/..png

```

Any ideas?

# Answer
> 1 votes
A warning like Cannot redeclare class CRM\_Core\_ClassLoader can indicate that all is not good in the civicrm.settings.php file, such as incorrect paths. not quite the same warning you have but may be a useful pointer

# Answer
> 1 votes
In the civicrm.settings.php file which should be located in `wp-content\uploads\civicrm`, search for $civicrm\_root variable and check if it is directing to the directory where you installed CiviCRM plugin. That should fix the problem.

# Answer
> 1 votes
I had the same problem, but found it was due to having an old copy of the directory *civicrm* in the wp-content/uploads folder. When I deleted this whole folder the plugin activated normally.

# Answer
> 0 votes
To solve the 2nd error related to "civicrm/civicrm/packages/kcfinder/themes/dark/img/files/big/..png" simply unzip downloaded civicrm file on local machine; look for the file "..png" and delete it. There should be 4 of them - one each in dark/default themes in big/small directories.

After deleting these files, create a zip with remaining file and upload to your wordpress using Install Plugin page.

---
Tags: wordpress
---


title: What do you use for captcha?

text:
# Question
Title: What do you use for captcha?
Do you use captcha on your forms? If so, do you use Google Recaptcha or something else?

We don't want to get spam, but we also don't want to create a hurdle for people filling out the forms.

What's your recommendation?

Thanks in advance!

# Answer
> 5 votes
I like CiviHoneypot.

I don't know why the author says to use ReCaptcha first. I find ReCaptcha too invasive and I've successfully used CiviHoneypot to solve carder attacks.

---
Tags: recaptcha
---


title: Fatal Error on Advance search

text:
# Question
Title: Fatal Error on Advance search
When running a CRM advanced search. If we try Adv Search\>Display results as'Realted contacts' and choose and Rel type. The hit search we get the DB error.

CiviCRM: 5.13.4

# Answer
> 3 votes
I think this is now fixed in 5.14. You can try applying patch from here or upgrade CiviCRM to 5.15.1.

Thanks

Pradeep

# Answer
> 1 votes
The error establishing a database connection error basically means that for some reason or another the PHP code was unable to connect to your MySQL database to retrieve the information it needs to fully build that page.Here are how to solve it： https://docsbay.net/how-to-fix-error-establishing-a-database-connection-error

---
Tags: advanced-search
---


title: Edit birth date

text:
# Question
Title: Edit birth date
I have setup a webform to register people to an event, which we need to collect DOB. I have included the Birth Date field in the CiviCRM webform.

One person can register multiple people. If they do not know the DOB for other people I have told them that can be updated later by an admin user. I cannot see where can this be changed is the Civi admin area. Apologies if I am missing the obvious. Thanks

# Answer
Assuming you have a default layout, then there is a Date of Birth field on a contact's summary tab.
> 4 votes

---
Tags: webform-civicrm, dashboard, dates
---


title: Edit HTML pages

text:
# Question
Title: Edit HTML pages
I've got a little problem on CiviCrm. Do you know where can I find and edit the html file.

I know for the CSS but not for Html.

thank you for you help!

Ilena

# Answer
If I understand the question correctly, you want to edit the HTML. Mostly that is not a good approach. If you tell us more about what you want to achieve we can provide a different solution.
> 0 votes

---
Tags: drupal, civicontribute, html
---


title: Check in/Check out system QR codes

text:
# Question
Title: Check in/Check out system QR codes
I have been searching if anyone has described how to achieve something similar to what we would like to do: We currently use a manual sign in sheet for our members (use of this sheet is sadly not consistent). We are hoping to find a way to have our members scan a QR code themselves as they come through the door and to do the same on the way out while creating a record.

Ideally, it would also run a test to see if a specific membership is currently up to date and send a payment request to them if not(however this is not vital). Does anyone know of a group that has done something similar or can point us in the right direction?

thank you for your help, best regards, JD

# Answer
The QR Code Checkin Extension does (some of) that: https://civicrm.org/extensions/qr-code-checkin ?
> 1 votes

---
Tags: wordpress, civimember, civivolunteer, civihr
---


# Question
Title: Action "send mail" not available for new contact
Activity type id=8 (send mail) is shown for all contacts. We made a new contact today, and "send mail" did not shown up in the activity drop down.

We don't have any idea where to look first, because the list of activity types is ok, and the new contact has the same subtype as all the others.

# Answer
> 1 votes
The email field was forgotten...

---
Tags: activity, sendmail
---