# Question
Title: How can I create a single discount code that will work for multiple CiviEvent?
I installed and configured CiviDiscount extension. When I created a discount code, I have not selected any events. Then I tried to use that code on adding participant to a event and it returns "Invalid Discount Code". On the same code, I selected one event. Then I tried to apply that code on that event registration and its worked.

I want to create a discount code that can be used for all the event registration. Please help.

Thank you!

# Answer
> 1 votes
If you are using the latest version of CiviDiscount Extension, then you should be able to see an option `--any event--` on the Discount Form - `civicrm/cividiscount/discount/add?reset=1`.

If you select this option, you should be able to use the discount code on any event present on the site.

---
Tags: civievent, drupal, cividiscount
---


# Question
Title: How to get rid of past events in the Event field lising (Select Box) on New Event Registration page Page
In the New Event Registration page, Event field gets all the events from very beginning. How can I configure to display only the upcoming events.

# Answer
> 1 votes
Don't think there is a setting in the UI to do this. The event is basically added to the input widget using the `getlist` api of `Event` entity. Adding the following param to the same should be able to list only upcoming events in the input field.

```
'params' => array('start_date' => array('>' => "now")),

```

You should be able to do this via an extension. Or if you want to see the param buildup in core, it is present in Event/Form/Participant.php

Extending the above array to include our param should remove the past events.

```
$eventFieldParams['api']['params']['start_date'] = array('>' => "now");

```

Note that changes made to core would be lost after an upgrade, so it is better to override this file in an extension OR see if any hook can help you in attaining this.

# Answer
> 0 votes
You can set the Event Is\_active Flag to FALSE - you can find this in Event Configure Page

Is this Event Active?

So, the list will ignore any in-active event Events.

I guess this helps!!!

---
Tags: civievent, drupal, registration
---


title: Civi forms in Joomla module (qfKey?)

text:
# Question
Title: Civi forms in Joomla module (qfKey?)
I am trying to put a "mailing list" subscribe form into a Joomla module (having the sign-up be its own page is not very useful).

However, I am running into problems with qfKey. How can I generate a qfKey?

I can copy and paste the generated form html, but submissions can't happen without a valid qfKey in the form post.

Any other/better ways of doing this or is there a simple function I can call to generate a qfKey for mailing list sign up?

Thanks in advance, Joel

# Answer
I don't think you can generate a qfKey - if I understand your question, using an html-snippet of a Profile that is set up with the Groups field may give you what you want.
> 1 votes

---
Tags: joomla, forms, modules
---


title: Can I achieve this?

text:
# Question
Title: Can I achieve this?
For a client that owns a Club (120 members) that has also a restaurant, I need to create an area for the client with these features:

Admin side:

1. The admin should be able to create custom filed for the members (Adress 1, Adress 2, Company, etc. etc.)

"Budget" will be one of this custom field: every member has an amount of money when they join the club. Money they can use for restaurant etc. (Balance)

2. The admin will have a "Add Bill" function where he can add Bills from the restaurant for every member. The amount of the Bill will be then detracted to the Members budget.

Example: The member Kevin White has a budget of 1000 Euros, he goes to the restaurant and spends 20. Actualized budget: 980 Euros.

3. The admin will have a section called "Members" where he can see an overview of the members, and for each member he can see the "Balance".
4. The admin can send via email a report to the members with the Negativ "Balance".
5. The admin can send Info E-Mail to all the members.

Can I achieve this with your plugin?

Or maybe can I build something similar with your Plugin?

Thanks in advance

# Answer
I certainly think you can achieve this with CiviCRM.

However, please do realise that CiviCRM is a full blown CRM with a lot of functionality. What you are describing here sounds suspiciously like a membership in CiviCRM rather than just adding custom fields.

I would certainly recommend reading the CiviCRM user guide: https://docs.civicrm.org/user/en/latest/ and playing with the memberships to see if this suits your needs.
> 1 votes

# Answer
Civi does not have a concept of 'Balance' so you would require some customisation to be able to reduce the amount by the value of the 'spend'.

The rest of what you are asking for sounds straightforward
> 0 votes

---
Tags: civimember
---


title: System workflow message not saving

text:
# Question
Title: System workflow message not saving
I'm trying to edit the system workflow message "Events - Registration Confirmation and Receipt (on-line)". When I edit it and hit save, it just reloads to a blank (new) message template. No changes are saved. The message is currently set to the default version.

I'm on Drupal 7, CiviCRM 4.7.22. It's a copy of our live site, where I can indeed make edits. Is there some kind of file permission I could have missed when I duplicated the site? I have all the error and logging turned on for this site, but I don't see an error on the page or the Drupal log.

Any ideas?

# Answer
Mod\_security. If you run into this issue, contact your host and have them look at their logs. For some reason, our live site wasn't throwing a mod\_security error, but the dev site is. They're whitelisting the issue so that we shouldn't continue to have the problem.
> 1 votes

---
Tags: system-workflow-messages
---


# Question
Title: Relationships not visible after migrating from Wordpress to Drupal
I have migrated a CIVICRm installation from Wordpress to Drupal. Everything is working except the relationship tab under contacts. The tab heading has the number of relationships but no relationships are visible.

Also I can see the relationship in the relationship report.

How do I fix this as there no error being logged

Thanks

# Answer
I had the same issue recently and the resolution was to ensure that the URL you use to access Drupal and CiviCRM must be consistent with what's entered in the CIVICRM\_UF\_BASEURL in civicrm.settings.php and the Resource URL in Administer CiviCRM \>\> Global Settings \>\> Resource URLs.
> 1 votes

# Answer
This looks like an issue with `templates_c`. Try deleting the `templates_c` folder: Where are the "ConfigAndLog" and "templates\_c" directories?
> 1 votes

---
Tags: drupal, relationships, core
---


# Question
Title: Error when upgrading from 4.7.16 to 4.7.20
I want to upgrade my site (Drupal 7.54 to 7.55, then civicrm 4.7.16 to 4.7.20).

No problem on Drupal upgrade.

But for CiviCRM, when I run mysite/drupal/?q=civicrm/upgrade&reset=1 (after having replaced sites/all/civicrm directory content) :

* upgrade to 4.7.17 runs OK
* upgrade to 4.7.18 fails with the following error :

(BTW, civicrm\_case table is empty on my site)

# Answer
> 1 votes
It appears that the foreign key mentioned in the error message doesn't exist for some reason. I would probably go into MySQL and check. If it's not there, just create one with the same name on the `civicrm_case` table. Then try the upgrade again.

A MySQL statement to create the foreign key (from CiviCRM 4.5) is: `ADD CONSTRAINT FK_civicrm_case_case_type_id FOREIGN KEY (case_type_id) REFERENCES civicrm_case_type (id) ON DELETE SET NULL;`

# Answer
> 0 votes
I had the very same problem and I had to fix it by running the following command:

```
ALTER TABLE civicrm_case
ADD CONSTRAINT FK_civicrm_case_case_type_id FOREIGN KEY (case_type_id) REFERENCES civicrm_case_type (id) ON DELETE SET NULL;

```

(taken from `CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl`).

# Answer
> -1 votes
had same issue upgrading from 4.6 to 4.7

running that SQL code in phpmyadmin fixed it. THANKS!!!!

ALTER TABLE civicrm\_case ADD CONSTRAINT FK\_civicrm\_case\_case\_type\_id FOREIGN KEY (case\_type\_id) REFERENCES civicrm\_case\_type (id) ON DELETE SET NULL;

---
Tags: upgrade
---


title: How do I contribute to API development?

text:
# Question
Title: How do I contribute to API development?
I am a CiviCRM user. I am the informal technical support behind a CiviCRM member and the reason that they are a member (Florida Native Plant Society).

I seem to have a continual battle with limitations in the API. I would like to know how I can interact with the people involved in development of the API.

I cannot claim to be a CiviCRM coding expert, but I am php fluent and MySQL fluent. I think my experience with APIs (DonorPerfect and home brew, and getting around the CiviCRM api weirdnesses) might be useful to improving the CiviCRM api.

Shirley Denton Communications Chair, Florida Native Plant Society

# Answer
> 1 votes
I would suggest you sign up for an account with civicrm.org and hence on chat.civicrm.org (unless the latter can be done without the former) and then join the API channel there. Am sure they will love to hear from you. I understand having a tolerance for jokes about 'warm beer' can be helpful.

---
Tags: api
---


# Question
Title: Bulk delete of events - is such a thing possible?
We've had a bit of a mix up and imported the same set of events twice. Most if not all of the duplicates have no participants (but I'm not 100% certain of that)

Is there a way to bulk delete these duplicates? I can't code but I can use sql a bit

I've seen this suggested: "DELETE from civicrm\_event WHERE id=1". is that ok to use on multiple events? Is it ok to use if an event has participants?

thanks

# Answer
> 2 votes
General advice is don't use SQL directly - use the API. You don't have to write code if you use cv or API explorer.

# Answer
> 0 votes
If you know your ID then you would most likely use IN (1,5,7,etc)

---
Tags: civievent, api, sql, delete
---


# Question
Title: How to add a Matcher Plugin in CiviBanking as I get "No Matcher Plugin Found"?
I was able to Import Bank Statement To Civicrm with the help of this CiviBanking : No valid booking date detected. Not imported!

Now my second task is to add Matcher Plugin. In Wiki Docs, I see a list of matchers

> **Default Options** \- creates two default suggestions: manual reconciliation and ignore
>
> **Batch Matcher** \- matches to payment batches
>
> **Contribution Matcher** \- matches to existing contributions **Create**
>
> **Contribution Matcher** \- creates suggestions to create now contribtuions
>
> **Ignore Matcher** \- can be configured to automatically ignore certain transactions
>
> **Membership Matcher Plugin** \- records transactions as membership dues
>
> **Recurring Contribution Matcher Plugin** \- reccords transactions as \> installments of recurring contribtuions
>
> **SEPA Matcher** \- intgrates with the CiviSEPA extension

I see a configuration in json format here : https://github.com/Project60/org.project60.banking/blob/master/configuration\_database/matcher/default/EnglishDefaults.json

```
{
    "generate": 1,
    "auto_exec": false,
    "manual_enabled": true,
    "manual_probability": "50%",
    "manual_show_always": true,
    "manual_title": "Manually processed",
    "manual_message": "Select this <strong>after</strong> you have manually processed this transaction.",
    "manual_contribution": "Please enter the resulting contribution ID here (if applicable):",
    "manual_default_source": "Offline",
    "manual_default_financial_type_id": 1,
    "ignore_enabled": true,
    "ignore_show_always": true,
    "ignore_probability": "0.1",
    "ignore_title": "Not CiviCRM related",
    "ignore_message": "Choose this option if you are positive that this transaction has nothing to do with CiviCRM.",
    "value_propagation": {
        "ba.name_id": "contribution.custom_14",
        "btx.financial_type_id": "contribution.financial_type_id",
        "btx.campaign_id": "contribution.campaign_id"
    },
    "lookup_contact_by_name" : {
        "soft_cap_probability": 0.8,
        "soft_cap_min": 10,
        "hard_cap_probability": 0.4
    }
}

```

Where do we need to add this configuration in database so that I can see the matcher plugin?

# Answer
> 2 votes
A matcher is added just like an importer on the configuration screen. The configuration screen has different sections. The top one is the importer, then the **matchers**, then post processors and the last one are exporter plugins.

See below for a screenshot:

After you click on Add a matcher you are able to select a matcher type and a configuration for that matcher type.

---
Tags: civibanking
---


title: WiX Front End support

text:
# Question
Title: WiX Front End support
First, is it even possible to have WIX as Front end CMS with CiviCRM back end. For example, I have event page on WIX, and registration goes through APIs to CiviCRM. I *understand* that CiviCRM supports it... but does WIX?

Second, can anybody share the good/bad/ugly experience? There is some new "code" functionality https://www.wix.com/code/home but it doesn't look very promising.

We have awesome web designer who is an expert in WIX. And since it is hosted service, it scares me how much will it take to integrate with CiviCRM (I am most familiar with Drupal version of CiviCRM; but I doubt that it will make any difference).

# Answer
CiviCRM will need to be installed in Drupal, WordPress or Joomla so you can't install in on a Wix site. However if you want to make event registrations available on your Wix site it looks like you should be able to do that - see here. That suggests you can embed external forms in iFrames or access 3rd party web services using Wix Code. Not tried it, but looks like it should be possible. Would make a good blog post if you do it!
> 3 votes

---
Tags: cms-integration
---


# Question
Title: Scripts not running in contribution pages
Contribution page loads slowly and is missing the field for "total amount" . Viewing in console indicates that all scripts fail to load because the path references source path of https://xxxURL.xxx/**components/com\_civicrm/civicrm**/bower\_components/jquery/dist/jquery.min.js?r=GcFU5”. All scripts for the page fail. The problem is obviously that the path should be: **administrator/components/com\_civicrm/civicrm/etc.**

I've looked everywhere I can think of but don't see where that path variable is set. Civicrm.settings.php file is set correctly.

Any thoughts?

# Answer
I couldn't find it as well, so what i did is in css of the template, I hid the label. This was my workaround. .crm-section section-pricesetTotal { color: #ffffff; font-size: 0px; }

You may want to clean up your profile display in the template as well, have the labels and fields on the same line.
> 1 votes

---
Tags: civicontribute, joomla, javascript
---


# Question
Title: How to use Event Calendar Extension with CiviEvents?
Does anyone use the Event Calendar extension? I am using Civi 4.7.29 on Wordpress 4.9.4

Today i installed the Event Calendar extension and WP FullCalendar for the first time. It shows that the install was successful and enabled. However the instructions for this extension say "A "Show Events Calendar" link appears under Events. The settings link is the same as the Show Events Calendar link but with "eventcalendarsettings" instead of "showevents"."

I am looking and I do not see these links anywhere in my menus or manage Events page. Does anyone know where it is? I am not seeing how to get my events to display on Fullcalendar.

# Answer
I put in a **ticket for this on GitHub** \- I also had the same issue - and even when I found the menu manually - it was full of errors.

Still more work needs to be done with this plugin.
> 2 votes

# Answer
Follow the instructions here https://github.com/osseed/com.osseed.eventcalendar/blob/master/README.txt

The latest release is here https://github.com/osseed/com.osseed.eventcalendar/releases/tag/2.0

It will not create the menu items automatically like it is supposed to, so you can create them yourself with the below instructions.

Go to Administrator -\> Customized Data and screen -\> Navigation Menu -\> Add New Item .
Set the title "Calendar Settings" and the URL civicrm/eventCalendarsettings Make the Parent Events. Click save.

Go to Administrator -\> Customized Data and screen -\> Navigation Menu -\> Add New Item . Set the title "Show Calendar" and the url civicrm/showevents. Make the parent Events. Click Save. Now the items are in the civi menu under events.
> 4 votes

---
Tags: wordpress, civievent, extension, calendar
---


title: Webform and Soft Credits

text:
# Question
Title: Webform and Soft Credits
I have been trying to implement soft credits for memberships which are paid using a webform. I have created a webform that allows one or two parents and up to four children to create or renew a membership. Everything works just fine except that the soft credits do not contain any value.

https://drive.google.com/file/d/1bsOkwi64jNniQup12caNSxi1AWQx7gQ0/view?usp=sharing

In the webform I have selected all contacts in the soft credit drop down on the CiviCRM contribution page.

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

Is there something that I need to do to ensure that the soft credits show the relevant amount?

**Results after application of the patch**

After the patch was applied the image below shows the outcome of the patch. The soft credits now contain the total amount of the payment made by the person completing the webform for all contacts involved in the webform. I doubt that this is the intention.

In the example below the user has made a payment for four separate memberships. Two of them have a zero value and the other two have a value of $150. It is my expectation that only two soft credits should be generated and in this instance they would be for the two junior players and show a value of $150 against each contact. This would then obviously follow through onto their individual accounts. This particular user has also paid in four instalments and I am not sure how that might affect the patch.

https://drive.google.com/file/d/13c8ghcsQ8BD8CPbdYVSLFUbz8EvRzusc/view?usp=sharing

Cheers Martin Fuggle

# Answer
> 2 votes
we did merge a PR fairly recently re: soft credits; I tested it extensively and it is working fine - try upgrading to the latest -dev version \[best to do that on a test site - though I have some production sites running -dev at the moment\]. Let us know!

PR: https://github.com/colemanw/webform\_civicrm/pull/68

Awesome - one webform -\> four memberships - paid for by parent -\> in four installments. That soft credits PR was a first pass at that functionality. I'm not surprised not all of these situations are accounted for (yet).

---
Tags: webform-civicrm, soft-credit
---


# Question
Title: Switched "logging" on - now get 'Unable to reach server'?
I just switched logging on for a 4.7.27 install which was working just fine. Now, when clicking on 'Change Log' tab I get the 'Network Error' popup with the message about being unable to reach the server. And there's no response at all. The rest of the system works OK still. I checked all the log\_xxx tables were created, cleared Civi & Drupal caches. I've also looked at the several questions about this error but none seem to apply - this was a site that was working OK and it's only the change log that's affected. This is a Civihosting hosted account, by the way. Ideas?

# Answer
This seems to be a bug as it's also reported by another user. So I raised this issue https://issues.civicrm.org/jira/browse/CRM-21799
> 1 votes

# Answer
Here is the query and error message:

```
INSERT IGNORE INTO civicrm_temp_civireport_logsummary SELECT entity_log_civireport.id as log_civicrm_entity_id, 1, entity_log_civireport.log_action as log_civicrm_entity_log_action, '' as log_civicrm_entity_log_type, entity_log_civireport.log_user_id as log_civicrm_entity_log_user_id, entity_log_civireport.log_date as log_civicrm_entity_log_date, modified_contact_civireport.display_name as log_civicrm_entity_altered_contact, modified_contact_civireport.id as log_civicrm_entity_altered_contact_id, entity_log_civireport.log_conn_id as log_civicrm_entity_log_conn_id, modified_contact_civireport.is_deleted as log_civicrm_entity_is_deleted, altered_by_contact_civireport.display_name as altered_by_contact_display_name
FROM `dcmadmin_civicrm`. entity_log_civireport

INNER JOIN civicrm_contact modified_contact_civireport
        ON (entity_log_civireport.entity_id = modified_contact_civireport.id )
LEFT  JOIN civicrm_contact altered_by_contact_civireport
        ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id) WHERE ( modified_contact_civireport.id = 9304 ) AND (entity_log_civireport.log_action != 'Initialization') GROUP BY entity_log_civireport.log_conn_id, entity_log_civireport.log_user_id, EXTRACT(DAY_MICROSECOND FROM entity_log_civireport.log_date), entity_log_civireport.id;

[nativecode=1146 ** Table 'dcmadmin_civicrm.entity_log_civireport' doesn't exist]

```

This is generated from one of the Ajax calls which is fired when you click on the Change Log tab of a Contact. The URL of that call is:

```
/civicrm/report/instance/108?reset=1&force=1&snippet=json&section=2&altered_contact_id_op=eq&altered_contact_id_value=9304&cid=9304

```

I am not sure what the precise problem is, but those are the details. Given that this site uses CiviCRM 4.7.27 I would recommend that the first step would be to upgrade, if possible.
> 0 votes

---
Tags: drupal, 4.7, logging
---


# Question
Title: Way to automatically install extensions?
Is there a way to automatically install and enable CiviCRM extensions? Is it possible to do this via drush on a Drupal install for example? Or is use if the UI required?

# Answer
The cv cli tool provides the following commands for working with extensions:

```
ext:disable             Disable an extension
ext:download            Download and enable an extension
ext:enable              Enable an extension
ext:uninstall           Uninstall an extension and purge its data
ext:upgrade-db          Apply DB upgrades for any extensions
ext:list                List extensions (local and remote)

```

To see the full list of commands, type `cv` in your console.

Or if you prefer `drush` (Drupal only):

```
civicrm-ext-disable    Disable a CiviCRM extension.
 (ced)
civicrm-ext-install    Install a CiviCRM extension.
 (cei)
civicrm-ext-list       List of CiviCRM extensions enabled.
 (cel)
civicrm-ext-uninstall  Uninstall a CiviCRM extension.
 (ceui)

```
> 11 votes

# Answer
civicrm-buildkit uses

```
drush cvapi extension.install

```

eg

```
drush -y -u admin cvapi extension.install key=org.civicrm.module.cividiscount debug=1

```

Using the Drush commands as Coleman says is probably easier (no `-u admin` at least), but adding this method for completeness.
> 4 votes

# Answer
You can now use eg

```
cv ext:download ca.civicrm.logviewer

```

which would give an output of

```
Using extension feed "https://civicrm.org/extdir/ver=4.7.27|uf=Drupal|status=stable|ready=ready"

Downloading extension "ca.civicrm.logviewer" (https://github.com/adixon/ca.civicrm.logviewer/archive/1.1.zip)

```

and which unzips and renames the extension correctly and enables it. Job done!
> 0 votes

---
Tags: extension
---


# Question
Title: CiviRules - cannot assign a tag inside a tag tree
When I try to add an action to Add a tag that is within a tag tree, none of those "sub-tags" show up. If I have to move all sub-tags that I have up to the top level in order to make this work, this will be a real pain to administer.

# Answer
> 1 votes
I can imagine that it is a pain. Can you please add this issue to the CiviRules repository at https://github.com/CiviCooP/org.civicoop.civirules/issues?

Are you able to solve this yourself (do you have PHP skills)? There is documentation on how to add your own condition here: https://docs.civicrm.org/civirules/en/latest/create-your-own-condition/. Fixing one will follow the same pattern.

If not, the usual community thing comes up:

* if the problem is big for you, it might be worth hiring someone familiar with CiviRules to fix it for you
* if the problem is not big for you wait until it is important to someone else and it is fixed

---
Tags: civirules
---


# Question
Title: Why are locations deleted when an event that uses them is deleted?
If you delete an event and that event is the only one that uses a particular location, then the location is deleted as well.

If you then want to use that location for another event, you have to recreate it - seems a bit unnecessary?

or have I misunderstood something?

# Answer
> 1 votes
well after a bit of experimenting the answer is.. they just are.

Here's a workaround that worked for me.

1 create new location type "location only" 2 make new events of type "location only" and give the title the same as the location you want to manage eg if the location is "Town Hall" then the name of the event will be "Location Town Hall" and the venue will be "Town Hall"

now it doesn't matter what happens with other events that might have used "Town Hall" as their location.. "Town Hall" will survive

# Answer
> 1 votes
Maybe the first question is: why are you deleting events? If they are test events, then the locations are likely to be test ones as well. If they are real events with participants then typically you want to retain the information about the event and its participants and contributions etc.

Since events are rarely deleted this seems like a non-issue. If event locations are the locations where you have held events, it makes sense for the location to be removed if there is no event associated with it. Do you have a particular workflow/set of requirements that involves regularly deleting events?

---
Tags: civievent, location
---


# Question
Title: View bounces when sending through general email (not CiviMail)
Is there a way to view or be informed about bounces sent through CiviCRM other than through the CiviMail component (i.e. send now, transactional emails, etc.)? I discovered that a contact who should have been receiving important emails about an event had an incorrect email address and so wasn't receiving the emails. Neither were we getting notified that there was a problem. I'd like to avoid this!

# Answer
Found my own answer. Our bounces@... address is set up as a catch-all, so bounces (or other badly addressed email) come to it, but CiviMail only processes bounces from emails sent through that component. Other emails are sitting in the inbox of the bounces@ account, waiting to be read, or forwarded through judicious use of a filter.

Leaving this question for posterity.
> 2 votes

# Answer
Philip - there is also this Extension \- **Transactional Mail - Bounce and Tracking Handler** \- that Fuzion made to give better visibility of the non-civi-mail emails which you might find useful
> 2 votes

---
Tags: email
---


# Question
Title: Fresh Installation, with all old data. Current online version CiviCRM 4.6.20. (WordPress)
I am very glad with the nice CiviCRM! This is an perfect online CRM-system!

After a lot years now, i would like to upgrade to the current version. But i am very scared if it would work.. The Current version: CiviCRM 4.6.20. is upgraded from an earlier version, and that was also with a lot of errors..

Does someone know how to do this the best way. There is very much information in the system, if there is something going wrong, it is a very big problem...

What is the best way to install a new version, and get all the data from the old.

Thanks a lot.

With Kind Regards, Mark

# Answer
> 1 votes
We have nursed about 50 sites through such an upgrade, many of which we inherited rather than built

Firstly read the docs: docs.civicrm.org/sysadmin/en/latest/upgrade

1. minimise risk by doing the upgrade on a copy of the site - that way you will be able to identify the problems and come back for more specific advice once you know what issues you have hit.
2. identify any customised files you have on your system and assume they will break - and consider if there are better ways to manage those customisations such as in Extensions
3. if you have budget consider getting a Partner who can step in to do this or at least be available on an 'as required basis' to help mentor, provide emergency support etc.

# Answer
> 1 votes
When I've had a site like that where there were errors with past upgrades, I start with a blank slate and recreate everything. This ensures that your databases are built correctly, have the right tables, etc. But make sure you do it with a COPY of your site and not the live one.

In the past I've used this link as a model, but I haven't been able to find a version for 4.7.x:

https://wiki.civicrm.org/confluence/display/CRMDOC42/Ensuring+Schema+Integrity+on+Upgrades

It gives you a good idea of how to reload everything so that your database should be ok.

# Answer
> 0 votes
You can also likely get support while doing it on chat.civicrm.org

---
Tags: wordpress, upgrade, data-import
---


# Question
Title: Why don't contributions (for membership) paid using PayPal, complete and send receipts?
Using Joomla 3.8.5 and CiviCRM 4.7.29. a membership transaction is entered in CiviCRM and paid via PayPal. The transaction completes in PayPal and an IPN is sent to CiviCRM. CiviCRM displays the thank-you page with transaction details, but in CiviCRM the payment remains in Pending status. The user gets a PayPal payment message, but no CiviCRM receipt. Note Paypal IPN log shows 200.

Checking the CiviCRM log file in the ConfigAndLog folder shows this sequence of events (identifying elements overwritten with XXX):

```
/home/XXX/public_html/libraries/src/Application/CMSApplication.php(303): Joomla\CMS\Application\SiteApplication->doExecute()
#16 /home/XXX/public_html/index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#17 {main}

Feb 25 10:51:54  [info] $IDS Detector Details = Array
(
    [0] => Array
        (
            [name] => cm
            [value] => {"module":"contribute","contactID":"321","contributionID":70,"membershipID":"10","contributionPageID":"1"}
            [page] => /index.php?option=com_civicrm&task=civicrm/contribute/transact&Itemid=527&_qf_ThankYou_display=1&qfKey=ec4624b8d9deeeba55b37c86128bc24d_9754&amt=497.32&cc=CAD&cm=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22321%22%2C%22contributionID%22%3A70%2C%22membershipID%22%3A%2210%22%2C%22contributionPageID%22%3A%221%22%7D&item_name=321-70-Individual%20Adult%20Registration&st=Completed&tx=4VC971156C5483419
            [userid] => XXX
            [session] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX            [ip] => XX.XX.XXX.48
            [reaction] => 0
            [impact] => 43
        )

    [1] => Array
        (
            [name] => IDS_request_uri
            [value] => /index.php?option=com_civicrm&task=civicrm/contribute/transact&Itemid=527&_qf_ThankYou_display=1&qfKey=ec4624b8d9deeeba55b37c86128bc24d_9754&amt=497.32&cc=CAD&cm=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22321%22%2C%22contributionID%22%3A70%2C%22membershipID%22%3A%2210%22%2C%22contributionPageID%22%3A%221%22%7D&item_name=321-70-Individual%20Adult%20Registration&st=Completed&tx=4VC971156C5483419
            [page] => /index.php?option=com_civicrm&task=civicrm/contribute/transact&Itemid=527&_qf_ThankYou_display=1&qfKey=ec4624b8d9deeeba55b37c86128bc24d_9754&amt=497.32&cc=CAD&cm=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22321%22%2C%22contributionID%22%3A70%2C%22membershipID%22%3A%2210%22%2C%22contributionPageID%22%3A%221%22%7D&item_name=321-70-Individual%20Adult%20Registration&st=Completed&tx=4VC971156C5483419
            [userid] => XXX
            [session] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
            [ip] => XX.XX.XXX.48
            [reaction] => 0
            [impact] => 43
        )

)

```

# Answer
> 0 votes
I feel like this one might be fixed in the latest rc (4.7.31) https://download.civicrm.org/latest

---
Tags: civicontribute, civimember, ipn, pending
---


# Question
Title: Is revealing Internal id a security risk?
We are planning on a mail out with recipients returning completed paper forms, then we'll update Civi with the results. This is where we have no email address for users. On the returned form we are planning to print the 'Internal id' of the contact to allow easy update. Is this considered a security exposure? We don't give access to contacts in Civi - only admin staff have a signon so I can't see that there would be a security problem. But best to ask & check!

# Answer
I think it is a pretty common practice - similar to the way your utility bills have their customer number on them
> 2 votes

---
Tags: 4.7, security
---


# Question
Title: how do you include email as field in all the contribution reports in Civi CRM
I am new to Civi and am trying to create reports for a fundraising department. How do you add email (or other columns/fields) to the standard contribution reports.

# Answer
If you are not seeing an option to edit the report columns/ filters etc you might be missing a permission
> 1 votes

# Answer
Look in the Columns tab to see what fields are available for that specific report. If the field you want is there, then just tick the box to include it in the report. However, if the field is not listed then code changes are needed to include it.

Some reports show overlapping sets of information so if the report you are looking at does not contain the field you need, it is worth looking at other reports to see if they can be configured to provide the results you want.

If you are using Drupal then Views provides a lot of flexibility for producing alternatives to Reports.
> 1 votes

---
Tags: reports, fields
---


# Question
Title: Can I make reports export the state/province abbreviation instead of full name?
Similar to this question, I'm interested in having my reports export states/provinces with the abbreviation instead of the full name. The accepted answer in that case was to use an Advanced Search rather than a Report -- but in my case there is no advanced search to get the contacts I need and I'm using a custom report, so I need to figure out how to do this in the CiviReport side.

# Answer
> 1 votes
Take a look at the "Contributions by Organization Report". `CRM/Report/Form/Contribute/OrganizationSummary.php` and the line:

```
$rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant::stateProvinceAbbreviation($value, FALSE);

```

---
Tags: civireport, custom-reports
---


# Question
Title: Embarrassing Offline Recurring Contributions
A bit of an embarrassing situation for us: A recurring credit-card contribution attempted to process last Wednesday (2/21), but our vendor (iATS) did not receive it (I've checked with them, no such record). CiviCRM left the transaction in a Pending:Incomplete Transaction status. The following day(2/22), Civi tried again, and the contribution went through just fine. I thought that was the end of it.

Unfortunately, the contribution processed again each day including this morning (2/27)! The donor notified us, and I took what action I knew to do -- I cancelled the recurring contribution entirely and explained we will of course refund the money. Since iATS still shows no record of the first attempt on 2018-2-21, I also marked the open Pending transaction in Civi as Failed.

**Question 1: That should be the end of it, correct?** Or do I need to do something else?

I'm left trying to figure out what happened, and how to prevent this from happening again.

Curiously, the recurring contribution still had a "Next Scheduled Contribution Date" of `2018-02-21 02:07:31`. Each of the contributions that went through after the initial Pending attempt had a source of `Offline Recurring Contribution`. We've never had that source automatically before.

**Question 2: Why did the Next Scheduled date not update to next month after the first successful attempt went through?** (I'm assuming Civi kept charging the card because the Next Sched date was still showing 2018-2-21).

**Question 3: Why would the card try again if the status of the original Pending attempt was still showing Pending and not Failed?**

In hindsight, I think what I should have done was mark the Pending transaction as Failed as soon as I saw the reattempt go through correctly and then made sure the Next Scheduled Date updated to next month. That would have prevented all this theoretically, ya? Now I know.

Thanks for any help! We're using CiviCRM 4.6 LTS and iATS extension 1.5.3.

# Answer
Advancing next\_scheduled\_date is one of the last things that happens in this sequence. So if anything goes wrong - a post\_contribution hook eg - then the code can not get to the part where the date is advanced.

So look in your ConfigAndLog for clues as to what interfered with the recording/completion of that Contribution in your database.
> 2 votes

---
Tags: civicontribute, recurring-contributions, iats, pending
---


# Question
Title: Payment Processor Error - Can't find valid value for PP
I just installed Drupal 7 and CiviCRM 4.7.30 from the CiviCRM install package. The install worked just fine, but now that I'm trying to 'configure' CiviCRM I've run into errors when setting up Payment Processor or trying to create price sets.

For the Payment Processor, I'm getting CRM\_Financial\_BAO\_FinancialTypeAccount::validateRelationship ... when I debug I get 'could not find valid value for pp'

For the New Price Set issue, I'm getting DB Error: Syntax Error.

I can't find anything on the support wiki, documentation, or WWW that would provide me assistance with these issues. I'm hoping someone in this exchange will be able to guide me. Thank you for your help.

# Answer
I guess you have turned off CiviContribute component.
> 2 votes

---
Tags: error, payment-processor
---


title: Buildkit won't install on Ubuntu

text:
# Question
Title: Buildkit won't install on Ubuntu
I'm trying to install the buildkit tools on a Ubuntu based virtual machine install of a LAMP pre-made vm.
I've tried as root (bad form) and I tried as www-data, which is the same user as apache and has sudo privileges. I don't understand what is blocking me here - why am I getting this error?

```
> npm WARN deprecated bower@1.8.2: ...psst! Your project can stop
> working at any moment because its dependencies can change. Prevent
> this by migrating to Yarn:
> https://bower.io/blog/2017/how-to-migrate-away-from-bower/ npm WARN
> engine protractor@4.0.14: wanted: {"node":">=4.2.x"} (current:
> {"node":"0.10.29","npm":"1.4.21"}) npm WARN deprecated
> graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility
> with current and future versions of Node.js npm WARN deprecated
> minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid
> a RegExp DoS issue npm WARN deprecated connect@2.30.2: connect 2.x
> series is deprecated npm WARN engine node-version@1.1.0: wanted:
> {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm
> WARN engine mime@1.6.0: wanted: {"node":">=4"} (current:
> {"node":"0.10.29","npm":"1.4.21"}) npm WARN optional dep failed,
> continuing fsevents@1.1.3 npm WARN engine request@2.83.0: wanted:
> {"node":">= 4"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm ERR!
> 404 Not Found npm ERR! 404  npm ERR! 404 'types/selenium-webdriver' is
> not in the npm registry. npm ERR! 404 You should bug the author to
> publish it npm ERR! 404 It was specified as a dependency of
> 'protractor' npm ERR! 404  npm ERR! 404 Note that you can also install
> from a npm ERR! 404 tarball, folder, or http url, or git url.
>
> npm ERR! System Linux 3.16.0-5-amd64 npm ERR! command
> "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! cwd
> /var/www/buildkit npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm
> ERR! code E404 npm WARN engine har-validator@5.0.3: wanted:
> {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN
> engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current:
> {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine form-data@2.3.2:
> wanted: {"node":">= 0.12"} (current:
> {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine har-schema@2.0.0:
> wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
> npm WARN engine sntp@2.1.0: wanted: {"node":">=4.0.0"} (current:
> {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine hoek@4.2.1: wanted:
> {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm
> WARN engine cryptiles@3.1.2: wanted: {"node":">=4.0.0"} (current:
> {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine boom@4.3.1: wanted:
> {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm
> WARN engine boom@5.2.0: wanted: {"node":">=4.0.0"} (current:
> {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine co@4.6.0: wanted:
> {"iojs":">= 1.0.0","node":">= 0.12.0"} (current:
> {"node":"0.10.29","npm":"1.4.21"})
>
> > phantomjs-prebuilt@2.1.16 install /var/www/buildkit/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> > node install.js
>
>
> /var/www/buildkit/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
> const Hoek = require('hoek'); ^^^^^ SyntaxError: Use of const in
> strict mode.
>     at Module._compile (module.js:439:25)
>     at Object.Module._extensions..js (module.js:474:10)
>     at Module.load (module.js:356:32)
>     at Function.Module._load (module.js:312:12)
>     at Module.require (module.js:364:17)
>     at require (module.js:380:17)
>     at Object.<anonymous> (/var/www/buildkit/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt/node_modules/request/node_modules/hawk/lib/index.js:5:33)
>     at Module._compile (module.js:456:26)
>     at Object.Module._extensions..js (module.js:474:10)
>     at Module.load (module.js:356:32) npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further
> explanations, please read /usr/share/doc/nodejs/README.Debian   npm
> ERR! Error: ENOENT, lstat
> '/var/www/buildkit/node_modules/karma-phantomjs-launcher/node_modules/lodash/unionBy.js'
> npm ERR! If you need help, you may report this *entire* log, npm ERR!
> including the npm and node versions, at: npm ERR!
> <http://github.com/npm/npm/issues>
>
> npm ERR! System Linux 3.16.0-5-amd64 npm ERR! command
> "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! cwd
> /var/www/buildkit npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm
> ERR! path
> /var/www/buildkit/node_modules/karma-phantomjs-launcher/node_modules/lodash/unionBy.js
> npm ERR! fstream_path
> /var/www/buildkit/node_modules/karma-phantomjs-launcher/node_modules/lodash/unionBy.js
> npm ERR! fstream_type File npm ERR! fstream_class FileWriter npm ERR!
> code ENOENT npm ERR! errno 34 npm ERR! fstream_stack
> /usr/lib/nodejs/fstream/lib/writer.js:284:26 npm ERR! fstream_stack
> Object.oncomplete (evalmachine.<anonymous>:107:15)
>
> > ws@0.4.32 install /var/www/buildkit/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> > (node-gyp rebuild 2> builderror.log) || (exit 0)
>
> make: Entering directory
> '/var/www/buildkit/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
> CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
> SOLINK_MODULE(target) Release/obj.target/bufferutil.node
> SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
> COPY Release/bufferutil.node   CXX(target)
> Release/obj.target/validation/src/validation.o   SOLINK_MODULE(target)
> Release/obj.target/validation.node   SOLINK_MODULE(target)
> Release/obj.target/validation.node: Finished   COPY
> Release/validation.node make: Leaving directory
> '/var/www/buildkit/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
> npm ERR!  npm ERR! Additional logging details can be found in: npm
> ERR!     /var/www/buildkit/npm-debug.log npm ERR! not ok code 0

```

# Answer
Issue was resolved by installing nodejs from nodejs.org. The Ubuntu version doesn't working with the buildkit.
> 2 votes

---
Tags: civicrm-buildkit
---


title: Problem selecting civiMail recipients

text:
# Question
Title: Problem selecting civiMail recipients
I have two instances of civiCRM, both versions 4.7.30, both running under Joomla 3.8.5.

On one instance, I can select the recipient groups and see the items selected... In the other instance, the Recipients box isn't behaving the same -- if I try to select groups, I don't see them in the list box afterwards, and the Recipient count always reports "No Recipients".

Both instances have public mailing lists, with positive Contact counts.

# Answer
our developer resolved this as described here: https://issues.civicrm.org/jira/browse/CRM-21780
> 1 votes

---
Tags: civimail
---


# Question
Title: Group not displayed in "Recipients" field in a mailing after selecting it
**Steps to repro:** When creating a new mailing (or editing a draft mailing) Click into the Recipients field, which reveals a drop-down with list of available groups Click on one

**Expected Result**: The selected group is displayed in the field (as a sort of a button) with an "x" allowing you to remove it from the field

**Actual result**: The field remains empty/blank, but the group has been selected as the number of estimated recipients is correct

Any ideas re what's causing this? Chrome console reveals the following **error** 6 times: *Uncaught TypeError: id.split is not a function* Seems to be coming from the following files: /media/civicrm/persist/contribute/images/dyn/angular-modules.js /administrator/components/com\_civicrm/civicrm/bower\_components/angular/angular.min.js

**Set-up:** Joomla 3.8.3
CiviCRM 4.7.29

Thank you so much for any pointers

# Answer
our awesome developer resolved this as described here: https://issues.civicrm.org/jira/browse/CRM-21780
> 1 votes

---
Tags: civimail, mailing
---


# Question
Title: Can not add Relationship to contact post CiviCRM 4.7.30 upgrade
Although, I had orignally thought the issue was on the "Webform CiviCRM Integration" module end, further testing shows it is likely an issue on the CiviCRM end since when I manually try to create the relationship I end up with a "spinning wheel" and a page refresh gives the following error:

"unknown relationship create error API (EntitySetting, get) does not exist (join the API team and implement it!)"

Any insight?

# Answer
Ensure you have extension nz.co.fuzion.entitysetting enabled as it is a requirement of nz.co.fuzion.relatedpermission
> 2 votes

---
Tags: relationships
---


# Question
Title: If a civicase is reopened why isn't the Case Coordinator (and other roles) reinstated?
Client is wondering why when a Case is reopened it does not regain the Case Roles it had when it was closed.

Seems a fair enough question.

So perhaps the follow on question is - will a patch to fix this be accepted or will others argue this may not be the desired outcome?

# Answer
> 2 votes
A JIRA issue is now filed at https://issues.civicrm.org/jira/browse/CRM-21815 which provides this change into core.

Patch is at https://github.com/civicrm/civicrm-core/pull/11736 which should be a part of 4.7.32 release.

---
Tags: civicase
---


# Question
Title: Can I set permissions to see one type of contribution, but not another?
We have a number of staff who should have access to see event payment information, but who should not see donation information. Is there a way to set permissions via ACL or otherwise based on Financial Type of the contribution?

Civi 4.6.6 -- soon to be 4.7; Drupal 7.41

# Answer
A few years after the question was asked ... the answer is yes!

Financial ACL's were added a while back but the docs have not been updated yet.

* Go to `Administer > CiviContribute > CiviContribute Component Settings`, and tick `Enable Access Control by Financial Type`.
* Go to your CMS permissions to grant access to each financial type by role.

See this blog post for details.
> 7 votes

---
Tags: civicontribute, permissions, acl
---


# Question
Title: CiviMail Reports is not tracking email opens
I am using civi 4.7.29 on Wordpress 4.9.4

I noticed that civimail reports is not tracking the email opens after multiple sends. It is just showing "0". In the screen shot, you can see where it is showing click-throughs but not opens.

The checkboxes for tracking opens and click-through are set.

In the email source, I found this URL https://mysite.org/wp-content/plugins/civicrm/civicrm/extern/open.php?q=66

That URL takes me to 404 Error Page.

The permission are:

open.php 755

civicrm/civicrm/extern/ 777

civicrm/civicrm/ 755

civicrm/ 755

Does anything look wrong here? Thank you.

# Answer
I've experienced something similar on a few sites and it turns out the file/directory permissions are not set right. I'm not sure what causes it, but I have found that I need to recursively reset permissions after updating CiviCRM, or the tracking doesn't work, click through links don't work, you can't upload images from CiviMail, etc.

From just outside the `civicrm` directory, I do this and it seems to solve it:

```
find civicrm -type d -exec chmod 755 {} ";"

find civicrm -type f -exec chmod 644 {} ";"

```

The first one changes permissions on directories and the second on files. You want to avoid having anything set to `777` for sure.
> 4 votes

---
Tags: civimail, civireport, tracked-links
---


# Question
Title: Submit Credit Card Contribution error with valid payment processor
After updating to 4.7.30 there is a new "Submit Credit Card Contribution" button under the Contribution tab on a contact, which would be a very welcomed feature but I receive the following error message.

> **Error**
>
> You will need to configure the live settings for your Payment Processor before \>you can submit a credit card transactions.

I'm using a valid Sagepay Payment Processor (with test and live credentials) that works elsewhere. I created a dummy test payment processor and that brought up the contribution form just fine. I debugged the code a bit and it seems that it's only returning `BackOffice` processors as the processor mode is not set in AbstractEditPayment.php.

Any ideas?

Thanks in advance.

# Answer
Right - correct behaviour is for that button to only show if there is a valid live processor which returns true for supportsBackOffice

UPDATE - Patch has now been submitted to avoid loading of this button for invalid processors.
> 3 votes

---
Tags: drupal, civicontribute, 4.7
---


# Question
Title: How can I use the Omnipay processor to audit missing payments?
I was told that I could use the Omnipay processor to detect missing payments.

I've determined that I need the API action `PaymentProcessor.getmissing`, and I can call this with: `wp cv api PaymentProcessor.getmissing payment_processor_id=7`. However, when I call that (or `wp cv api PaymentProcessor.query payment_processor_id=7`), I get the following error:

`PHP Fatal error: Class CRM_Core_Payment_OmnipayMultiProcessor contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (CRM_Core_Payment::doDirectPayment) in /home/members/healthcarenow/sites/dev.healthcare-now.org/web/wp-content/civicrm/extensions/nz.co.fuzion.omnipaymultiprocessor/CRM/Core/Payment/OmnipayMultiProcessor.php on line 34`

What am I doing wrong? How can I successfully call this API?

# Answer
> 1 votes
What version of CiviCRM are you on? It should work on the latest 4.7 - & it's working for me (I'm using latest of github) - but there might be something more or less forgiving in the config

# Answer
> 0 votes
The below works for me in case that points to anything that might help you

```
drush cvapi PaymentProcessor.getmissing sequential=1 is_recur=1 payment_processor_id=9 start_date_time="2018-01-08" end_date_time="2018-01-09" contribution_status_id=1 lazy_logging=1

```

followed eg by

```
 cvapi PaymentProcessor.retrymissing start_date_time=2017-03-01 end_date_time=2017-04-01 payment_processor_id=9 contribution_status_id=1 is_recur=1

```

Note: grab the latest code of lazy logging doesnt' work for you (output table format)

Warning: the above are in use on site that has multiple a.net processors involved so has extra parameters to cope with that

---
Tags: api, payment-processor, developer, recurring-contributions, omnipay
---


# Question
Title: How do I use cv to run database upgrades from the command line?
I'd like to run the database upgrades from the command line. I know I can do with with `drush civicrm-upgrade-db` but I'd like to know a way to do it in a CMS-agnostic way (that will work for Wordpress and Joomla).

I see there is `cv ext:upgrade-db` which claims to "Apply DB upgrades for any extensions". Is there a corresponding `cv` command for CiviCRM core?

# Answer
The `cv upgrade:db` command from https://github.com/civicrm/cv/pull/2 was recently merged for v0.2.3. This revision hasn't been broadly deployed or tested yet, but it provides a richer upgrade experience:

* By default, there's a progress indicator.
* With `-vvv`, you can get a detailed report/log of the upgrade steps as they execute.
* With `-vvv --dry-run`, you can see a detailed preview of the upgrade steps.
* With `--retry` or `--skip`, you can resume after an upgrade failure.
* With `--quiet`, you can limit output to particularly interesting information.

I've found that `-vvv` and `--dry-run` are helpful when developing patches for the `civicrm-core` upgrade logic, and they may also be helpful with large or temperamental upgrades.

(**Note**: PR #2 also anticipates several more subcommands for identifying/downloading upgrades and for reporting successes and failures. However, these are not live at time of writing)
> 4 votes

# Answer
That would be nice, but I am afraid it is not there (yet). When you lookup the list of cv commands in de source on GitHub, you will not find this command.

However, using the `drush` source code as inspiration you can create a small script

```
<?php
  $codeVer = CRM_Utils_System::version();
  $dbVer = CRM_Core_BAO_Domain::version();
  if (version_compare($codeVer, $dbVer) == 0) {
     echo "You are already upgraded to CiviCRM $codeVer \n";
  } else {
     $upgradeHeadless = new CRM_Upgrade_Headless();
     $result = $upgradeHeadless->run();
     echo "Upgrade outputs:\n" . $result['text'] . "\n";
  }

```

And run it with the `cv scr <script.php>`
> 2 votes

---
Tags: upgrade, drush, cv
---


title: Hidden Smart Group Refresh

text:
# Question
Title: Hidden Smart Group Refresh
I've set up a mailing based on a search. A Hidden Smart Group was created, just like it should. If I schedule that mailing to go out a week from now, will the hidden smart group update and include more recipients based on the search criteria before it goes out or will it only contain those contacts that were a part of the first search? Thanks.

# Answer
> 2 votes
As of today the recipients are fixed once you schedule the mailing.

You can experiment with https://github.com/3sd/civicrm-recalculate-recipients, if you want the recipients to be determined once the mailing is sent.

As per https://lists.civicrm.org/lists/arc/civicrm-dev/2017-12/msg00012.html there are reasons to prefer both variants.

---
Tags: smartgroups
---


title: Additional Fonts CKEditor

text:
# Question
Title: Additional Fonts CKEditor
I want to configure the font drop-down menu of the CKEditor and add additional fonts there.

The Fonts are locally available, and shall be usable for PDFLetters etc. Has anyone made any Progress with that? It seems possible to add fonts to CKEditor..?

I found this thread, but whenever I edit the GUI Preferences, the file `crm-ckeditor-config.js` hasn't been generated. Instead only `/civicrm/persist/crm-ckeditor-default.js` is available.

# Answer
> 5 votes
We had some more luck with the integrated UI configuration of CKeditor, and after some trial and error we came up with the following solution:

In the following documentation I will assume that the fonts, files and configurations will be put in /sites/default/files/civicrm/persist/ and /sites/default/files/civicrm/persist/customfonts. The persist folder can be configured for multiple CMSs, I am using drupal.

The configuration file can be configured via the UI at **/civicrm/admin/ckeditor**. Add the fonts plugin on top if not already done. Under advanced options add a customConfig, and add a custom configuration file. I would use something like /sites/default/files/civicrm/persist/crm-ckeditor-custom.js

This can be copied and extended from the already generated crm-ckeditor-default.js in the same folder. Be aware that if the path is added, "/" characters will be escaped. Sadly multiple times, so be careful when saving the form!

In the custom configuration you can now add CKEditor configuration, according to their API documentation. For the fonts to be added, a fonts.css file needs to be created, with the default @fontface syntax and the added to the configuration like this:

```
config.contentsCss = "/sites/default/files/civicrm/persist/customfonts/fonts.css";

```

And the font names needs to be extended as well:

```
config.font_names = "Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif;Indie Flower/Indie Flower";

```

This is the list of pre-configured fonts, and a new fonts Indie Flower (as an example) is added. The syntax is \[Display name\]/\[Font Name\]

Afterwards the directory could look something like this:

```
 sites/default/files/civicrm/persist
  - crm-ckeditor-custom.js
  - customfonts
    - IndieFlower.woff2
    - IndieFlower.woff
    - IndieFlower.ttf
    - IndieFlower.svg
    - IndieFlower.eot
    - fonts.css

```

Then a message template has to be created (civicrm/admin/messageTemplates/add?action=add&reset=1), and the fonts.css has to be included:

```
<link href="https://my.example.domain/sites/default/files/civicrm/persist/customfonts/fonts.css" rel="stylesheet" />

```

The webserver needs to be configured as well to allow CORS Header, either by a .htaccess file or for nginx:

```
<IfModule mod_headers.c>
  <FilesMatch ".(eot|ttf|otf|woff|svg)">
        Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

location ~ ^/sites/default/files/civicrm/persist/customfonts/.+\.(eot|ttf|woff|woff2|svg)$ {
    add_header Access-Control-Allow-Origin "*";
}

```

Then, when creating an Email or a PDF the template has to be selected, and the text can be created by wysiwyg. Email Clients can then load the fonts, and pdf generators can use the fonts.

# Answer
> 2 votes
I had use the method in one of the forum to add font in ckeditor. I did this by creating an extension and used hook\_civicrm\_coreResourceList().

Ref: https://civicrm.org/blog/colemanw/big-changes-to-wysiwyg-editing-in-47

HTH

Pradeep

---
Tags: 4.7, configuration, ckeditor
---


# Question
Title: Migration of data from CiviCRM Drupal 7 to CiviCRM in WordPress (Version 4.9.4)
We are currently setting up a new website for a client. They old site is using CiviCRM Drupal 7. However the fields in the new site using CiviCRM in WordPress (Version 4.9.4) the fields of the database do not match. Is there a way to solve this backward compatability problem?

It is not allowing us to migrate the historical data to the new WordPress site by importing the data. Has any one an idea how we can resolve this, with out losing the historical data?

# Answer
You can migrate the CiviCRM data between different CMS platforms but there are several steps to go through. See Switching CMS platforms and Moving an Existing Installation to a New Server or Location to understand the issues involved.

Make sure you use the same version of CiviCRM on the Drupal and WordPress sites. You can upgrade later.

Moving other Drupal content to WordPress is a different issue.
> 1 votes

---
Tags: wordpress, drupal, webform-civicrm, migration, compatiblity
---


# Question
Title: Wordpress shortcodes do not display 'insert' button
In Wordpress, it is possible to insert CiviCRM shortcodes for, eg, profiles, directly in the Page/Post editor.

However, when I do this, the 'Insert CiviCRM content' screen displays, but there is no visible button available to insert the code and return to the Wordpress editor.

See screenshot of what I see.

Is this a bug, or is something else preventing the button from appearing?

# Answer
> 2 votes
Probably a typical WP plugin/theme conflict. Try to disable all your plugins except CiviRM and see if you can see the button. If you can see it, then turn them on in small groups, once you find a group, then do those one-by-one to narrow down which one is causing the problem. If you still cannot see it, turn all your plugins back on and change your theme to one of the WP twenty-themes and see if you can see it.

If it is the theme, you can make your shortcode edits and then switch back to the theme you normally use.

# Answer
> 0 votes
I have same problem and my solution is deactivate all plugins. After that turn one by one plugin on. I investigate that my plugin ALO EasyMail Newsletter cause CiviCRM shortcode error.

---
Tags: wordpress, profile
---


# Question
Title: Using Profiles to allow member to view/edit own details only
I am trying to work out how to use a profile to allow a registered member of an organisation/registered user of a Wordpress site, to access/view their own information and edit certain fields.

In theory this appears to be possible, but even though I've used profiles quite a lot over the years, I can't work out how to do this.

Ideally the user would login to the front end of the website (not the backend/dashboard), view their own membership details, view/edit their personal contact details, but not have access to any other details.

The part I don't understand is how the User Contact ID would be populated to the profile in such a way as that contact's information was automatically selected after login.

Or would this all be done more easily using the CiviCRM API and a bit of programming?

# Answer
Maybe this is what you're asking for:

Create a new profile. Call it something friendly for the user like "My Contact Details". Tick it as a "Standalone Form or Directory" Fill it with the fields you want the user to edit.

Pick the page you want them to be accessible and edit it. Use the CiviCRM button to pick the profile or enter in the shortcode yourself.

It should similar to,

```
[civicrm component="profile" gid="123" mode="edit" hijack="0"]

```

When a user is logged in, this will contain the fields you selected to be edited by the user.

Edit: while the anonymous visitor will not see the profile fields until he/she is logged in, I guess it'd be good practice to make the wp page *private* to avoid any slips and keep the design fluid - or use a plugin to limit the page to logged in users.
> 3 votes

---
Tags: wordpress, api, profile
---


# Question
Title: Donations page on mobile phone not formatting properly on Wordpress site
Is there a straightforward way to allow mobile device browsers to properly render and handle a donations/event page?

I am trying to set up donations on a Wordpress CiviCRM installation so that the text does not overlap on mobile devices. The same issue was referenced and fixed for a Drupal installation here

I did install the extension "Simple Donate" but it stripped off information from the donation page. Plus it did not work, I could only look at it in test mode.

# Answer
The public-facing donation and event pages inherit their look and feel from the Wordpress theme. If there's overlapping text, it can't be fixed within CiviCRM; it must be fixed within WordPress. You should be able to confirm this by loading a Wordpress default theme like twentyseventeen on your site (ideally a test version of your site), and the problem shouldn't exist.

As for which part of the theme needs fixing, it's very hard to troubleshoot without seeing the CSS of the page itself, which means posting the URL in question. That said - you'll likely get better answers in the Wordpress Stack Exchange than here.
> 1 votes

# Answer
It's a styling choice.

I've found a lot of Civi's default styling flexibility to be lacking, especially with adaptive window sizes. Thus I've had to make a bunch of adjustments to my child theme to override Civi's default CSS.

For instance, I bet Civi has your "Contribution Amount" has a parent div with the class "label" - being styled thusly:

```
.crm-container .crm-section .label {
    float: left;
    width: 17%;
    text-align: right;
}

```

These explicit styles can interfere with your own style sheets, especially on small screens.

Something I'd like to play with for my own styling wishes is Disabling CiviCRM CSS. Maybe you should give it a shot.
> 0 votes

---
Tags: wordpress, civicontribute, mobile, bootstrap
---


# Question
Title: Can contact images be uploaded other than by editing a contact record?
If I upload a contact image by editing the contact record it works. I can see the contact image, and it has a URL when viewed from the contact record that looks something like: https://example.org/civicrm/file?reset=1&filename=image\_a46992b081c6ccee3e54abcfdd0ba352.jpg&mime-type=image/jpg I can click on it and it appears in a pop-up window. Lovely.

If I upload the exact same image file through a webform such that it becomes the contact image for the same contact it doesn't work. It has the URL https://example.com/civicrm/file?reset=1&filename=custom&mime-type=image/ when viewed from the contact record, and instead of seeing the image I just see the word 'custom'. Clicking on the word 'custom' brings up a little error box that reads "The file is either empty or you do not have permission to retrieve the file", neither of which are true. The database has stored the image URL as https://example.com/sites/default/files/webform/pics/image.jpg

This used to work fine on an earlier version of Civi (4.6.x). I also imported contact records with 4.6.x that had external URLs for contact images and they worked fine - i.e. were viewable from the contact record, but again, now that I've upgraded to 4.7.24 all I see is the word 'custom'.

If I reference the field in a Drupal View, it can display the image without issue.

# Answer
Uploads via Webform are indeed broken in 4.7, but have been fixed with 5.0.

Webform CiviCRM inserts the image\_URL value in the database as the path to the webform upload, e.g. `/sites/default/files/webform/NNNN.ext`. The CiviCRM handler (CRM/Utils/File.php) expected CiviCRM-style image URLs of the form `/civicrm/contact/imagefile?photo=NNNN.ext`, and so mangled the path twice, once on reading it and then when it ran getFileURL on it.

Thus, anything dependent on $imageURL would break for images uploaded through Webform or other external mechanisms.

The issue was reported on Webform CiviCRM Integration as *Contact Image Upload field integration not working with 4.7*, and later addressed in the related GitHub issue *CRM-21778 - Contact image uploaded from drupal webform don't render on the summary page*.

I was able to apply jitendrapurohit's patch from GitHub cleanly to 4.7.31; the fix is contained entirely within CRM/Utils/File.php.
> 3 votes

---
Tags: webform-civicrm, contact-image
---


title: Incorrect Resource URL - New Install

text:
# Question
Title: Incorrect Resource URL - New Install
I am getting a red "Incorrect Resource URL" notice, but I can't see that anything's set incorrectly. I read elsewhere that this should result in the little arrows missing from drop-down menus, but I'm not having that problem.

WordPress install. (New - been working on it over the last week or so. Haven't gone live yet.)

I also read that this may be due to issues with symlinking, so I've used an absolute URL, not a relative one. I can access the exact location via, e.g. FTP, using the path I've put into the "CiviCRM Resource URL" field on the "Settings - Resource URLs" page.

The path I have is: /wp-content/plugins/civicrm/civicrm

Help?

# Answer
We are seeing this same issue and reported it here https://issues.civicrm.org/jira/browse/CRM-21785?jql=text%20~%20%22resource%20url%22. It appears to be a false positive however.
> 2 votes

---
Tags: wordpress, resource-urls
---


# Question
Title: Dealing with CiviCRM contact records of Drupal blocked accounts
Is there a way to automate removing the contact records of Drupal accounts that are blocked such as because of spam? I am using the spambot module to block accounts and remove their spam.

I fear that there are thousands of bogus records in our CiviCRM with no way to confirm their legitimacy.

Drupal 7 and CiviCRM 4.7.27

# Answer
Spitballing as I haven't tried this, but if the `CiviGroup Roles Sync` module allows you to sync a Drupal role into a CiviCRM group, you could:

1. Add all blocked accounts to a (new/temporary) Drupal role.
2. Sync that role to a group in CiviCRM.
3. Load all contacts in that group in the CiviCRM UI and delete/trash them.
4. Delete Drupal users (and temp role) if desired.
> 1 votes

# Answer
We didn't find a great way of dealing with this. I think we found the best approach was to use Drupal Views and VBO and probably civicrm entities so that we could grab the civi records of the users who we wanted to cull, and then delete the civi record and then delete the user record. If I can dig out the View I will share
> 2 votes

# Answer
We also find a lot of spam contacts in civi have a first name which matches the last name. In which case we run this query to find them, export them if need be and let client eyeball them

```
SELECT civicrm_contact.id, civicrm_contact.first_name,
civicrm_contact.last_name, civicrm_email.email
FROM civicrm_contact
LEFT JOIN civicrm_email
ON civicrm_contact.id=civicrm_email.contact_id
WHERE civicrm_contact.first_name = civicrm_contact.last_name
AND first_name NOT LIKE '%test%';

```

Then get them in to Trash (avoiding any exceptions eg 1119, etc) with

```
UPDATE civicrm_contact
SET is_deleted = 1
WHERE civicrm_contact.first_name = civicrm_contact.last_name
AND first_name NOT LIKE '%test%'
AND civicrm_contact.id NOT IN (1199,1231,1279,1322,1334);

```

The use the UI to 'delete permanently' to ensure all Activities are removed etc. Alternatively you could add them to a civi group to review and then use Delete Pemr
> 1 votes

---
Tags: drupal, contacts, cms-integration, spam
---


# Question
Title: Why are all bulk mailings delayed by 5 hours?
Using CiviMail in Civi 4.7.29, any bulk email is delayed by 5 hours. The cron commands are received every 30 minutes, and are acknowledged by Civi on the status page. Have checked that php, joomla and civi are all set to London time zone. These are small test mailings of about six users. Any ideas? Thanks in anticipation. John

# Answer
I would look at the `scheduled_date` on the mailings in your database: `SELECT name,scheduled_date FROM civicrm_mailing;` If the scheduled\_date is off, then it might be that MySQL has a time mismatch - or that specific users in Joomla have a different timezone setting than the default (not sure if this is possible in Joomla, but it can be done in WordPress/Drupal).

If the `scheduled_date` is correct, then I'd check to see that your cron user is running in the same time zone. E.g. if cron is triggered by `root` and not the web server user, I'd expect this sort of issue to creep in.

EDIT: You mention that you're running cron via the "cli.php" tool. That means that PHP is using a different `php.ini` file than when you do web-based PHP, and your timezone might be different. If you have terminal access, check your timezone with `php -i | grep zone`.

Since you're using Siteground, I doubt they allow you to control the `php.ini` timezone. Since that's the case, I would recommend using the HTTP Method of running cron, which will set the timezone based on the web-based timezone.
> 3 votes

---
Tags: joomla, cron, mailing
---


# Question
Title: Need to change default text on Credit Card area
I am using civi 4.7.29 on wordpress 4.9.1 Please see the screen shot. I am using PayPal Payments Pro and I need to remove or change the marked lines. Can you tell me which file to edit? Also I would like to change the color of the Contribute button if possible. If anyone knows where I can do that, please let me know.
Thank you.

# Answer
> 1 votes
Navigate to: Administer =\> customize Data and Screens =\> Word Replacements

This should do the trick.

Also please try the same for "Contribute" it will work but this will replace all the contribute buttons - so please test it

I guess this helps !!!

Thanks

# Answer
> 1 votes
Rather than modify the files - which will break on every CiviCRM upgrade - consider instead hiding them with CSS or Javascript. You can load custom CSS by specifiying the URL in **Administer » System Settings » Resource URLs**. JavaScript injection requires writing an extension.

---
Tags: wordpress, payment-processor, contribution-page
---


# Question
Title: WordPress - user record URL doesn't show for one user. Can't see why?
In the user detail view for a member with a WordPress account there's usually a link to the WordPress user record like so:

Contact ID / User ID : 1354 / **1561**

For one member the user ID doesn't appear and I'm stumped.

* I've deleted and recreated both the Civi and WP records several times.
* dumping the WP user record and toggling membership off/on does recreate the WP record (but doesn't show the link to it)
* We use the profile sync plugin and this is working fine (i.e. name changes sync to wordpress profile and vice versa)

Digging through the template code shows the {$userRecordUrl} variable as the trigger for showing it or not, so I assume this isn't set somehow.

Has anyone seen this behaviour?

The user for whom it *does* work was created some time ago -- perhaps its functionality that is no longer present in 4.7? I can't find any documentation to support that though.

thanks! \- Chris

# Answer
I've seen this happen when there are multiple WordPress accounts using the same email address.

These values are stored in the `civicrm_uf_match` table of the database. If my first suggestion doesn't pan out, you may want to browse that table and look for duplicate values for `contact_id` and `uf_id` (the "WordPress user id") corresponding to this user. Delete the offending record(s) in this table and let CiviCRM recreate them.
> 0 votes

---
Tags: wordpress, civimember, contacts, profile
---


# Question
Title: Best way to copy Contact name to Nickname & Legal name
CiviCRM 4.7.29 / WP 4.9.4

Maybe it's a bit of OCD but I imported about 1000 Organizations and the name imported into Contact name. That left the nickname and legal name fields blank, which drives me nuts. I want them to match the Contact name.

I tried to use Profiles thinking maybe I could specify a variable pointing to each record's Contact name but I couldn't figure out how to make it work.

Is there a way within Civi to update a large number of records to achieve this?

thanks

# Answer
> 1 votes
This chapter of the user guide should help you: https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/#updating-multiple-records-at-the-same-time\_1

Basically you:

1. create a profile with the field you want to view + the ones you want to update
2. Search for the contacts you want to update
3. With the search result actions you select **Batch Update with Profile** and use the profile you created

# Answer
> 1 votes
You could try:

* putting all these contacts to a CSV,
* open in a spreadsheet and duplicate the name column a few times, then
* reimport in CiviCRM with the "Update" option and a dedupe rule that makes sense, this time specifying nickname and legal name matching. (For example, you could set up a dedupe rule for Internal ID to make it easy to match).

# Answer
> -1 votes
I was looking for a way within Civi but I think the easiest way is to do a reimport again, thank you both for the suggestion

---
Tags: contacts
---


# Question
Title: Particular report about contribution on CiviReport
Good morning, I'm writing to ask if it exist a particular report about contributes. I'd like to have a report which contain these columns: Surname/Name, amount and date of the last donation and total contribution, contribution AVG and number of donation for every donor. Over this, I need also the filter in order to research specific group of donator, like campaing, group, contact type, sex,... Does it exist? What I have to do if I need it? Tanks to all... and sorry for my bad english!

# Answer
You may have to use several reports for what you are asking. But the Contribution Summary report has most of what you are asking for.

1. Look at Contributions \> Contribution Reports \> Contributions Summary. This report will give you most of what you are asking for. Under Filter you can set your date range, financial type, and other criteria. Under Grouping if you Group by Name or Contact ID you will probably get the results you are wanting, but try other options. You probably want to uncheck Group by Date. IN the columns tabs you can select what is displayed in the report, Name, state, etc. Check Contribution Amount Stats to see the total # of contributions from each donor, their Contribution $ Aggregate and Average.
2. In the previous report, you can click on a donors name to see their profile. But you may need to use the Contribution Detail Report to dial into specific donors. This would be to see their last contribution.
> 1 votes

# Answer
I would recommend you look at using the Summary Fields extension
> 1 votes

---
Tags: civireport, contributions, reports, donations
---


# Question
Title: "Please go back and complete the CAPTCHA" appearing when registering multiple participants for an Event
We're on CiviCRM 4.7.25 and Drupal. We have the CAPTCHA and ReCAPTCHA modules enabled, and ReCAPTCHA is enabled on a profile we use for event registration.

We're seeing a new error (which never used to happen!) when registering multiple participants.

Behaviour is:

* User is not logged in to Drupal
* User enters details for Participant 1, and completes Captcha
* User enters details for Participant 2. No captcha appears (good!). User tries to proceed to next step and encounters alert "Please go back and complete the CAPTCHA at the bottom of this form"
* User can't progress any further with event registration

The only problem being, there is no captcha!

For now, we have disabled Captcha on this profile, having drawn a blank on other fixes. Any suggestions gratefully received!

# Answer
Looks like a bug- see comments 2 possible workrounds

1) Limit to single participant registration

2) Create new profile w/o captcha and use this as profile for additional participants

Or as you suggest disable captcha for profile entirely
> 5 votes

---
Tags: civievent, recaptcha
---


title: Where is the civicrm database?

text:
# Question
Title: Where is the civicrm database?
I recently took over a website and I have missing tables in the civicrm database (under wordpress). I want look at the civicrm database but I don't know where the database is stored. How can I find the physical civicrm database file so I can download it and run some queries to see what's there? When I go to phpMyAdmin on the server, it only lists the wordpress database.

Below is what I see when I look at phpMyAdmin and this is the only db. I have looked at all of the table names in this db and there are no civicrm tables.

Thanks

# Answer
> 5 votes
You can find the civicrm database listed in the civicrm.settings.php

```
 <wordpress>/wp-content/uploads/civicrm/civicrm.settings.php

```

Apart from that , you have two possibilities

1)Wordpress and Civicrm both use same database

2) Civicrm has separate database

If wordpress and civicrm has same database , you can search in wordpress database tables which have prefix civicrm\_\*

# Answer
> 2 votes
If you are sure you are in the correct database for your wordpress your civi is installed on, you should see this.

\****EDIT\****

Go to wp-content/uploads/civicrm/civicrm.settings.php

Look for this line

```
if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {

```

define( 'CIVICRM\_UF\_DSN' , 'mysql://**YOUR CIVI DATABASE LOCATION SHOULD BE RIGHT HERE**');

---
Tags: database
---


# Question
Title: Newsletters only display plain text, not HTML
I'm having a strange problem here: basically, whenever we send a newsletter, only the plain-text part appears. I have checked with the SMTP gateway and the emails it is sending out are the same as the ones CiviCRM is sending. Additionally, when I click the "Preview as HTML" button, a new window appears which is blank except for the text "(null)".

Nothing really has changed except I think a routine upgrade (to 4.7.29). We also emptied the templates\_c directory a few weeks ago because it was over 8GB+ in size. In any case I've tried refreshing caches (using URL, dashboard button and drush methods), and loading, modifying and re-saving the newsletter template.

Additionally, I can no longer see contributions on a contact's dashboard (though the number of contributions is correctly displayed). I don't suppose that's related..?

# Answer
We believe it was a problem with file permissions in sites/default/files/civicrm/templates\_c applied after the last security update.
> 0 votes

---
Tags: message-templates, templates, newsletter, caching
---


# Question
Title: Effect of address change on current employer
I need your opinion on a standard CiviCRM behavior:

When you add or change the address of an individual AND you check "Use another contact's address", AND that target contact is an organization, then the current employer is changed + the "employee of" relationship. Regardless of the location type.

This makes sense for location type "work". But why does this happen for all location types?

Wouldn't it better to limit this functionality to location type "work"? Or add a checkbox on location types, so users can specify on which location types they expect that behavior?

# Answer
> 2 votes
@AlainB I totally agree that this should not happen for all location types. Do I understand correctly that:

* I change the address of John Doe
* I tick the 'use another contact's address'
* I then select organization CompanyB

and then companyB automatically becomes the employer of John Doe?

That sounds like unwanted behaviour to me, I would not expect the employer to change automatically even if I changed the work address.

# Answer
> 2 votes
It looks like a relic from an earlier era and an opportunity to simplify one tiny corner of the codebase. Maybe we could just document a CiviRules recipe to re-implement the current behaviour and remove it entirely.

---
Tags: contacts, addresses
---


# Question
Title: Is it possible to configure CiviMail to send from two different domains?
My use case is a 501c3 organization with an associated 501c4 (sorry this only makes sense to US folks!). They have all the same contacts but need to keep c3 emails separate from c4 emails--most important, sent from different domains. It is possible to do this from a single Civi instance (i.e., have the addresses available to send emails be on two different email domains)?

Because all the contacts are the same they REALLY don't want to maintain two Civi instances. (Note we are in the eval stage so this is not a Q about how to do it; at this point I am really just looking to know whether it's possible.)

# Answer
# The short answer: Yes

Yes, at **Administer \> Communications \> FROM Email Addresses**, you can add any number of email addresses, and they're not restricted to any particular domain.

-- that technically answers your question, which was specifically about CiviMail (the bulk mailing component of CiviCRM). You can also specify custom "From" email addresses for Scheduled Reminders.

# The longer answer: Yes, and you may need multisite

However, for transactional/system emails (automated emails such as subscribe and unsubscribe confirmations), in a normal, single-site CiviCRM instance you can have just one "From" address. This is set at **Administer \> Communications \> Organization Address and Contact Info**.

I suspect the best solution for your use case may be CiviCRM in multi-site mode. This way you can have different transactional email addresses for each domain. So, for example, when a contact subscribes to a mailing list on your c3 site, the confirmation message will come from the c3 domain.

In multi-site, contacts can be shared between your two domains (but they don't have to be). This sounds like what you want, but it may lead to behavior that could be surprising in some cases. For example, when a contact clicks an "opt-out" link on one of your c3 emails (not just unsubscribing from the current list, but from all of your email communications), their opt-out will apply to your c4 mailings too.
> 3 votes

# Answer
If multi-site is overkill for your situation, you could also conceivably write a small extension using the alterMailParams hook to control the sender on transactional emails. However, this raises the question of how to tell which automated email should go out on a given transaction.
> 0 votes

---
Tags: civimail
---


# Question
Title: CiviCRM won't install (blank screen on initial configuration, GoDaddy shared hosting)
I successfully installed CiviCRM using FTP on the backend of my wordpress site hosted by godaddy. when I go to click on configure CiviCRM the next screen comes up blank

What am I doing wrong? I did install Charity theme from ThemeForest. But I went in and deactivated all of the plugins...

# Answer
> 2 votes
Unless something has changed, I have never been able to get Civi to work properly on cheaper shared hosting like GoDaddy. Just not enough resources and such given to each account.

# Answer
> 0 votes
Ill always take an opportunity to say **CiviCRM can and will work just fine with shared hosts!** However not all shared hosts are created equal. Two that support CiviCRM requirements include:

* CiviHosting - Supporting Partner of CiviCRM

Each of these hosts have met my needs on a variety of sites. GoDaddy I believe uses CPanel - in CPanel - choose "Select PHP Version" - make sure the right version of PHP is selected (should be 7.1), if not, make sure you select the correct version as current. Then make sure all the options needed are selected. Finally switch to php options and make sure all those settings are correct too. The requirements for CiviCRM can be found here:

https://docs.civicrm.org/sysadmin/en/latest/requirements/

I should add, shared hosting does have its limits - depending on your needs, your organization may need something more substantial

**Updated 03/22/2019**: Removed TMDhosting as they are no longer a supporting partner, removed stablehost, as I can no longer recommend their services. Removed NameCheap - does not fully support CiviCRM - ran into a lot of issues.

---
Tags: wordpress
---


# Question
Title: Request for help getting Stripe Payment Processor working in CiviCRM/Wordpress
I'm testing Stripe for payment processing in CiviCRM.

I have the latest Stripe Payment Processor extension (4.7.3)

And I'm running Wordpress 4.9.4/CiviCRM 4.7.27

I have a user side payment page that when I put in all the test data, and press the "Confirm Contribution" button, nothing happens, except the button changes to "Submitted".

I can't see any errors in the CiviCRM depug log in wp-content/uploads/civicrm/ConfigAndLog

As far as I know, I'm using the correct API settings for test mode in Stripe.

My Stripe API version is 2018-02-06. And because this is a new Stripe account, I can't select an older API to see if that works.

This same non-activity happens whether i'm on the user side, or on the CiviCRM Admin side.

I don't know where to look to find errors, because all the usual places I would look don't seem to be showing errors...

Thanks for any help, Norman

# Answer
> 1 votes
Soooo....

I found the problem. My API key had managed to get spaces in it, presumably when I copied it from the Stripe interface. I didn't see the spaces because the text is obfuscated like a password.

The fact it had spaces was causing a Javascript error. Which didn't come up ANYWHERE in the interface, until I had the Chrome developer tools open. And I suddenly noticed the error on the console.

Ultimately, it would be really helpful if such errors were reported to the user. Possibly only when CiviCRM debug mode is on.

But not displaying those errors meant I wasted a whole bunch of time trying to track the problem down... :-(

Cheers, Norman

---
Tags: stripe, payment
---


# Question
Title: Can't use activity table in join query for update
In our set-up we have custom fields associated to activities, the value of which is computed periodically by scheduled job. The job executes a query that reads something like:

`UPDATE civicrm_value_something sth
 JOIN (
 SELECT
 a.id, someexpression() as value
 FROM civicrm_activity a
 JOIN sometables
 WHERE somecondition
 ) r ON r.id = sth.entity_id
SET sth.somefield = r.value;`

This was working fine until today when we migrated from 4.7.24 to 4.7.30, which introduces some new triggers on `civicrm_activity` table. The problem is that MySQL does not support executing triggers that update a table used (even just for read) in the statement that cause the trigger. So the query fails with this error:

> \[nativecode=1442 \** Can't update table 'civicrm\_activity' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.\]

The only solution I can see is to split the query and store the result of the sub-query in a temporary table. This is not desirable because it is less convenient, less performant (if the subquery fits in memory) and less atomic.

Has someone faced a similar problem and come up with a good solution?

# Answer
An option is to disable the trigger, run your upgrade and re-create it at the end.
> 1 votes

---
Tags: activities, mysql
---


# Question
Title: Unable to Change Selections on Event Registration, Error: "Expected one Contribution but found 0"
We just updated to 4.7.30 and the latest Drupal 7 version. Now, when viewing participant records that include a contribution record, the following error is in the Fees section:

*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. Expected one Contribution but found 0*

As far as we can tell, participants are able to register just fine since the update. In the Selections section, the appropriate selections are there, but if we click the Change Selections link, we get the error: *Network Error: Unable to reach the server. Please refresh this page in your browser and try again.* Refreshing does not help.

We are still able to edit the contribution records that are displayed on the participant record. We can register new participants manually and the error does not appear. The error also seems limited to events...does not appear in membership.

We have no Civi Extensions on this site.

# Answer
> 1 votes
This seems to be resolved with the commit from March 2, 2018 here: https://github.com/civicrm/civicrm-core/commit/b512c92fe8bbe9a8ef71ae9ba5adbcfe7500d81c

With that change applied, we longer receive the error and everything works as expected.

---
Tags: civievent
---


title: Forward/Copy SMS to CiviCRM

text:
# Question
Title: Forward/Copy SMS to CiviCRM
I have a question about SMS, which a client has asked me about.

**The problem**

The staff member sends an SMS to a client via mobile The client responds by SMS (their mobile) to the staff member. Currently, the staff member then keys this into their database.

**The challenge**

Can we find a way for CiviCRM to file the SMS against the client’s record ?

I have thought about forwarding messages to an inbound processor, but the message would get filed against the staff member, not the client who sent it.

Anyone had this kind of problem before?

# Answer
I don't think that your standard SMS gateways are going to be able to cater to this. You could certainly set something up where CiviCRM forward SMS it receives from a gateway to specific people with contact details attached, i.e. someone texts central number. CiviCRM forwards that text to a specified mobile with the originating number prepended but that doesn't help for inbound SMS.

You might be able to acheive this with Telerivet, which allows you to 'turn any phone into an SMS provider'.

If the user was OK with downloading the telerivet app to their phone, it would allow them to forward any SMS sent and received to CiviCRM. I suspect that you can limit the numbers that have SMS forwarded to certain groups / contacts within the phone but you would want to do a bit of research on that.

Not 100% that this would work but might be worth exploring. It would certainly involve a bit of playing around and experimentation, but might deliver what they need.
> 1 votes

---
Tags: sms, civisms
---


# Question
Title: How to allow contributions from non-members
This has got to be easy, but I am stumped.

I have set up several contribution pages. They work just fine as long as the donor is logged in to civi.

However, if the donor is not logged in, the system takes their credit card information on the form but when you press the contribute button, it blanks the form and does not continue on with the contribution process.

I **assume** that Civi allows unregistered users to contribute.

I am using Civi 4.6.9 on Drupal

# Answer
> 2 votes
Within the Profile settings you want to make sure that you have not set **Account creation required** which can be found in the advanced settings: **Administer \> Customize Data & Screens \> Profile**.

By default, *for whatever bizarre reason*, the Supporter profile has **Account creation required** set as default. It took me a good hour to find that one!

# Answer
> 1 votes
Can you check the logs and post any messages?

Also double check the Drupal permissions so an anonymous user has "CiviContribute: make online contributions" permission.

---
Tags: civicontribute, drupal
---


# Question
Title: Can you import data from Excel or WORD directly into CiviCRM?
We have donor lists in Excel--can that data be imported to CIVICRM?

# Answer
> 5 votes
Yes! CiviCRM can import CSV files (Excel can save/export into that format).

For more information, see Importing Data into CiviCRM.

Please note this encouragement on that page:

> For more details on how to think about your data before importing into CiviCRM, please read the section on "Organizing your data", especially "Mapping your data into CiviCRM".

---
Tags: import
---


# Question
Title: How to add a secondary Case Role that has access to Activities they are not 'on', eg ones that existed before they were added
We want to add a secondary case role that is similar to Case Manager with slightly less permissions (eg cannot change/add case roles, can't delete case etc). We have a relationship that can be added as a case role in the case settings. People that have this new case role also have a drupal role. Their permissions are currently "access my cases and activities" , "view all activities. However when they look at a case they are the new Case Role for they can see all the activities listed for the case, but don't have the option to go and 'view' the activity's details (unless they are a contact listed on the activity). We want them to be able to view the activity details for the case.

When we find the relevant url that would give a Case Manager access to the activity, and test that url as this other user then we get "do not have permission to access this page" - eg url of type /civicrm/case/activity/view?cid=XXXX&aid=YYY

Thoughts?

# Answer
> 1 votes
I'd say this is coming from CRM\_Case\_BAO\_Case::checkPermission(), around line 2659 where it says

```
//user has only access to my cases and activity. [sic]
//here object specific permmions come in picture.

```

It seems like this is part of the definition of "my cases and activities", where you have to be either the reporter, with contact/target, or assignee of the activity to be able to view it.

So to get the arrangement you're looking for you either have to give them access to all cases and activities, or something more complicated involving code is needed.

---
Tags: civicase, activities, permissions, roles
---


title: Event with team registration

text:
# Question
Title: Event with team registration
How do I create a fee for a team event without each team member being charged? ie one team costs $100 not $100 per person.

# Answer
If you are OK with it being on the honor system (you can always check to be sure each team has a paying member), then create 2 Fee Labels 1) Team $100 2)Team Member $0. The teams will have to be sure that one member checks the Team Fee and the rest check Team Member.

It might make it easier if you check the box "Register Multiple Participants" It is under the Online Registration tab of the Event Setup. Then one team member can register the entire team and be sure that they pay the $100 only/at least once.

Note: This is on the honor system since all team members can select the $0 option. But you can check to be sure that they have paid before the event.
> 1 votes

# Answer
If you are on Drupal or Backdrop, you can set this up using the `webform_civicrm` module. The webform can take team info and multiple team members info simultaneously and only charge the fee one time while also registering all contacts for the same event (that is a setting in the `webform_civicrm` interface).

At the same time, you can add relationship links in the webform to link all the contacts with a custom relationship (for example, "Team Member of/Team Member is" or something along those lines).
> 1 votes

---
Tags: civievent
---