# Question
Title: Event registration with participant approval: missing e-mail notification when rejected
If I check an events registration option "Require participant approval" and change the participant status from "Pending from approval" to "rejected", no e-mail notification will be sent.

If I check this forms option "Send confirmation" the user is receiving an e-mail but with the wrong template (I guess it's "Events - Registration Confirmation and Receipt (on-line)"). This e-mail should only be send to approved participants and it is really misleading if you change the status to "rejected" or "cancelled".

This whole approvel thing is realy unclear to me and the documentation lacks information. So I'm asking:

1. What do those participant status mean? (e.g. "cancelled" vs "rejected")?
2. How do I reject a participant waiting for approval the right way?
3. Is it possible to notify the participant about the recejection of his registration?
4. If yes, can I send individuell messages with some details about the reason of the rejection?
5. For which mailings are those templates used:
    * Events - Pending Registration Expiration Notice
    * Events - Receipt only
    * Events - Registration Cancellation Notice
    * Events - Registration Confirmation and Receipt (off-line)
    * Events - Registration Confirmation and Receipt (on-line)
    * Events - Registration Confirmation Invite

*PS: I know that I should separete this questions into multiple SO questions but they are closely related.*

# Answer
I don't know of any magic that happens if you use the "Rejected" status. I think it's probably no different than if you created "Flaky" or "In absentia" as statuses: most participant statuses are just there for you to keep track of attendees and cause no special behavior.

Consequently, CiviCRM won't really do anything different whether you are saying someone is "rejected" versus "attended" or "no show" or whatever. In particular, there is no "rejection notice" email template in the System Workflow Templates that would be triggered. (In contrast, there is a "cancellation notice" for canceled registrations.)

Unfortunately, that means that the default registration email is what would automatically go out, just as if you had approved the registration.

I would suggest that you leave the box unchecked and manually send an email to the rejected applicant(s) explaining the situation. I suspect that the reason there is no "rejection notice" template is that few organizations would want to send out generic, antiseptic notices to the effect of

```
Your registration for the Rain-forest Cup has been rejected.

```

Sending an email manually would let you be cordial and detailed. You could send the same message to everyone you cancel (all at once, and they'll receive individual messages), or you could be as specific as you'd like for each rejected participant.

As for the different templates, here goes:

* Events - Pending Registration Expiration Notice: if you run the scheduled job to process pending registrations, and the pending participant expiration field is set on an event, this will let people know they've been dropped by the scheduled job.
* Events - Receipt only: this is what you get if the site has the event registration in cart mode and you register for one or more events.
* Events - Registration Cancellation Notice: automatically sent when the status is "canceled" *and* (I'm pretty sure) the event is in the future.
* Events - Registration Confirmation and Receipt (off-line): generated if you register someone as an admin and check the receipt box.
* Events - Registration Confirmation and Receipt (on-line): generated by regular online event registration.
* Events - Registration Confirmation Invite: if you're on the waitlist, and a spot opens up, when the scheduled job to update participant statuses automatically bumps you to "pending from waitlist" status, this lets you know you're now allowed to go register.
> 4 votes

---
Tags: civievent, email
---


title: How do I install CiviCRM on Backdrop?

text:
# Question
Title: How do I install CiviCRM on Backdrop?
Given that the answer to whether CiviCRM will work with Backdrop is Yes, and that the integration is "functionally complete" -- how do I install CiviCRM on an existing Backdrop site?

It is not included in the wiki instructions yet, and when I download the latest Civi 4.7.x Backdrop tarball from Sourceforge and try to follow the Drupal 7 instructions on **/modules/civicrm/install/** I get an error:

> This installer can only be used for the Drupal version of CiviCRM.

I have been successful in generating a localhost Backdrop version with buildkit but not installing on a site that is not on localhost.

# Answer
> 3 votes
**EDIT:** Since this answer, @herb has expanded on this in the Wiki. See "Installing CiviCRM for Backdrop CMS"

There is now an official version of CiviCRM for Backdrop. Once CiviCRM code is placed in /modules, go to

`http://MYWEBSITE.COM/modules/civicrm/install/index.php?civicrm_install_type=backdrop`

to install. Note the flag to tell the installer that we're installing for Backdrop otherwise it'll not recognize it.

---

The code changes to get the installer working for Backdrop is almost done (it's waiting to be tested and merged in https://github.com/civicrm/civicrm-core/pull/8177). You've got three options:

1. Install manually: run the civicrm.mysql queries on your database (in /modules/civicrm/sql/) and manually build the civicrm.settings.php file (from /modules/civicrm/templates/CRM/common/civicrm.settings.php.template) and put it in your webroot (same level as settings.php).
2. Apply the patches above to tarball you downloaded (plus apply this patch https://github.com/backdrop/backdrop/commit/93ecec4c081002bfc46fec421b5642d496ca3dac to backdrop. Then navigate to example.com/modules/civicrm/install/index.php?civicrm\_install\_type=backdrop to run the Backdrop-specific installer.
3. Or, wait until the next CiviCRM 4.7.x minor release and Backdrop 1.x minor release and it should be working well enough. (Use the same url: example.com/modules/civicrm/install/index.php?civicrm\_install\_type=backdrop)

---
Tags: installation, backdrop
---


title: CiviMail DB Error: no database selected

text:
# Question
Title: CiviMail DB Error: no database selected
Civi 4.6.15 Joomla 3.5.1

Previously I upgraded my civi version to 4.7, and somehow I corrupted my database. I reinstalled a clean 4.6.15 and restored my database from backup.

It seemed to be working. I was able to send a New Mailing by executing "Send Scheduled Mailings" with no issues. 10 minutes later, I attempted to send another email to the same group and the same manual execution, but I'm getting:

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

I can still access contacts, and I can still see the groups.

Any ideas on where to start?

-EDIT 5/8/16-

I ended up exporting contact info, uninstalling Civi, deleting the media folder, deleting all associated database info in my Joomla database, reinstalling Civi (4.7.7), and importing contacts back into the system. Yes, it's an insane Neanderthal way to do it, but I ran out of options.

I just attempted to send an email to about 55 recipients using the CiviMail component (see below). I manually initiated it via the Send Scheduled Mailings in the Scheduled Jobs area.

It hangs then displays the DB error message above.

For some recipients, they receive the email multiple times. Others never see it. The report says there are zero successful deliveries, but it also shows tracked opens:

If I try to send another email, it reinitiates the send on emails that have not been cancelled.

I thought I completed a last resort option of rebuilding everything. Since that didn't work, I don't know what to do. I'm desperate for any suggestions.

# Answer
In all of your database changes, you may have mixed up the database information in one or the other of your `civicrm.settings.php` files. In Joomla there are two:

```
administrator/components/com_civicrm/civicrm.settings.php

```

and

```
components/com_civicrm/civicrm.settings.php

```

They should be *almost* identical: the site URL for the one in `administrator` should be `http://yoursite.org/administrator/` rather than just the base URL of your site.

Both have database connection information; so does your Joomla `configuration.php` file. You need all three to agree on the Joomla database information (the line with `CIVICRM_UF_DSN` in the CiviCRM files), and you need the two CiviCRM files to agree on the CiviCRM database information (the line with `CIVICRM_DSN`).

If you think you've hopelessly ruined your CiviCRM settings files, you can rebuild them from the copy at

```
administrator/components/com_civicrm/civicrm/templates/CRM/common/civicrm.settings.php.template

```

You will want to keep your existing ones handy as a guide (and a fallback in case you cause trouble), and you'll need to replace all the tokens, which appear as `%%tokenname%%` in the file.
> 1 votes

---
Tags: civimail, joomla, database, 4.7, scheduled-job
---


# Question
Title: Why is Civimail sending exactly 30 emails every cron run through Office365 SMTP Relay?
I'm having an issue with CiviMail. When the cron runs to send the scheduled mail it only sends 30 emails at a time. I have it set up to send through Office365 SMTP Relay, so its not the 30 messages a minute limit that Office365 has. I have the batch limit set to unlimited, so its not that either.

I can't find anything in the files that would be limiting it to only 30 messages per cron run.

My mailing list has about 5000 people in it, and I need to be able to send them all quickly. At 30 a minute it takes 3 hours, which isn't going to work. I even set up my cron to run every 20 secs to speed it up to an hour for all the messages. I can speed it up even more if I lower the time between runs, but I shouldn't have to. I should be able to either send them all to Office365 or in large batches and have them send quicker than it is allowing me too.

Any ideas?

# Answer
I'm not familiar with Office365 Relay, a quick search indicates it's for devices to send emails via Office365. It was a quick search so I may be wrong.

Given that you are only able to send 30 emails at a time and that Office365 has a 30 emails/minute limit sounds like it is something to do with Office365 not a CiviCRM setting issue.

You may want to look at a SMTP service, here's a blog post that compares some services that work with CiviCRM.
> 5 votes

# Answer
Sanjay is right to suggest a SMTP service. That said, you mentioned the **Mailer Batch Limit** in **Administer \> CiviMail \> Mailer Settings**. That will limit each cron run to only sending that number of emails. A site might have a batch limit of 200, for example; that would mean that 200 messages go out on each run of the scheduled job.

If you were setting up CiviCRM to stay within Office365's limit of 30 emails per minute, you might want to set that batch limit to 30.

Running cron multiple times a minute may defeat Office365's limit, but there are two risks:

* you may have cron double up on itself (it's not unrealistic for cron to take over 20 seconds)
* you might get summarily dumped by Office365 for violating their terms of service, causing a big disruption
> 0 votes

---
Tags: civimail
---


# Question
Title: Can I apply a CiviDscount discount when embedding a contribution page in a WordPress page?
It took me a while, but I figured out how to get CiviDiscount to work when providing the link directly to the contribution page, however I'm trying to use a shortcode to embed the CiviCRM contribution page into a WordPress page.

The generated shortcode looks like this:

```
[civicrm component="contribution" id="2" mode="live" hijack="0"]

```

I modified it to look like this:

```
[civicrm component="contribution" id="2" mode="live" discount="pkpwpabs7" hijack="0"]

```

I took a guess, but my guess was wrong. Is there a way to do this?

# Answer
CiviCRM only picks out a discrete list of shortcode parameters: see the code here. Adding an additional shortcode parameter will not make CiviCRM recognize it and add it to the rewritten request.

Unfortunately, without rewriting CiviCRM's WordPress integration, you won't be able to get this to work via shortcode. You'll have to use the big long URL instead. If you're trying to generate a friendly URL, you might have to manually set a rewrite.
> 2 votes

---
Tags: wordpress, civicontribute, cividiscount
---


# Question
Title: Can I reference the contact ID of the Current Employer with a Drupal entity token?
I'm trying to create a link to a CiviCRM-integrated Drupal webform that passes the ID of a contact's employer

I'm trying to use

http://somedomain.org/node/9999?cid1=\[current-user:civicrm-contact:employer-id\]

but the token replacement is blank. \[current-user:civicrm-contact:employer-id\] also does not work. However, \[current-user:civicrm-contact:current-employer\] does replace with the *name* of the current employer.

# Answer
> 3 votes
We ended up using Markup field in the webform with some PHP code that made a CiviCRM API call:

```
<?php
$params = array(
  'version' => 3,
  'is_active' => 1,
  'sequential' => 1,
  'contact_id_a' => $_SESSION['CiviCRM']['contact_id'],
  'relationship_type_id' => 4,  // Employee Of
);
$result = civicrm_api('Relationship', 'get', $params);

if ( ! $result['is_error'] ) {
  $employer_id = array_shift($result['values'])['contact_id_b'];
}

if ( $employer_id ) { ?>
    <input onclick="location.href='/link-to-webform?cid1=<?php echo $employer_id ?>';" type="button" value="Manage Contacts" />
<?php }

```

I'm going to file an issue on the module.

---
Tags: webform-civicrm, civicrm-entity
---


# Question
Title: UPDATED State field selector and Profile Search not working
Joomla 2.5.28 CiviCRM 4.7.7 PHP 5.5.30 MySQL 5.6.30

I have a Search Profile that allows a member to search for a local group based on Country and State OR they can search by name.

When the Country is selected, the state field does not populate.

You can see the page here:

https://www.theipca.org/index.php/local-guilds

**Updated 5/10: Search now works thanks to patch recommended by SleighD. When you do a successful search, the State field then works but still does not work on the initial Profile Search page.**

ISSUE BELOW THIS LINE HAS BEEN RESOLVED. STATE FIELD ISSUE PERSISTS.

\*When you search for the local group by name, you get an error page.And you can search for Tallahassee in the Organization Name field. Log file shows the following errors:

```
 May 09 14:21:52  [info] $backTrace = #0
> /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(371):
> CRM_Core_Error::backtrace("backTrace", TRUE)
> #1 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Type.php(424):
> CRM_Core_Error::fatal("One of parameters  (value:
> `Home-state_province`) is not of the type MysqlCol...")
> #2 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Sort.php(124):
> CRM_Utils_Type::validate("`Home-state_province`", "MysqlColumnName")
> #3 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Selector/Controller.php(222):
> CRM_Utils_Sort->__construct((Array:6), NULL)
> #4 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Profile/Page/Listings.php(394):
> CRM_Core_Selector_Controller->__construct(Object(CRM_Profile_Selector_Listings),
> NULL, NULL, 4, Object(CRM_Profile_Page_Listings), 2)
> #5 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Profile/Page/Router.php(124):
> CRM_Profile_Page_Listings->run()
> #6 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(312):
> CRM_Profile_Page_Router->run((Array:2), NULL)
> #7 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86):
> CRM_Core_Invoke::runItem((Array:13))
> #8 /home/ipca/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54):
> CRM_Core_Invoke::_invoke((Array:2))
> #9 /home/ipca/public_html/components/com_civicrm/civicrm.php(90): CRM_Core_Invoke::invoke((Array:2))
> #10 /home/ipca/public_html/components/com_civicrm/civicrm.php(11): civicrm_invoke()
> #11 /home/ipca/public_html/libraries/joomla/application/component/helper.php(380):
> require_once("/home/ipca/public_html/components/com_civicrm/civicrm.php")
> #12 /home/ipca/public_html/libraries/joomla/application/component/helper.php(348):
> JComponentHelper::executeComponent("/home/ipca/public_html/components/com_civicrm/civicrm.php")
> #13 /home/ipca/public_html/includes/application.php(194): JComponentHelper::renderComponent("com_civicrm")
> #14 /home/ipca/public_html/index.php(42): JSite->dispatch()
> #15 {main}
```

Any ideas on how to fix?\*

# Answer
> 2 votes
Not really an answer but I can't comment so....

Possible duplicate. See Update to 4.7.7 broke CiviCRM contact search

And https://issues.civicrm.org/jira/browse/CRM-18510

PATCH HERE: https://gist.github.com/mollux/d1fd488f56d13ded699c5620e603eb13

Tested, fixed my same issue.

---
Tags: profile, search
---


title: Unable to upgrade to 4.7.6

text:
# Question
Title: Unable to upgrade to 4.7.6
Wordpress 4.5 CiviCRM 4.7.6

I have installed the CiviCRM 4.7.6 plugin and get a message that I need to upgrade the database. When I try the upgrade, get a white screen displayed with the single word "error" in the upper left. Then I cannot access any Wordpress functions and have to reload the datbase again.

# Answer
> 2 votes
Ran into something similar. There are some database table alteration between 4.7.5 and 4.7.6 (specifically relating to foreign keys). These edited CiviMail tables. If you have used CiviMail extensively, these tables could be quite large. The `ALTER TABLE` commands can take a very long time causing time outs.

The quickest option is to backup these tables, trucate them, run the CiviCRM 4.7.5 to 4.7.6 upgrade comands, and, finally, reimport the data.

**Affected tables:**

* `civicrm_mailing_event_queue`
* `civicrm_mailing_recipients`

# Answer
> 1 votes
Same thing with Joomla but this is a database issue, not website platform. Seems there is an error with a FOREIGN\_KEY\_CHECK or field during 4.7.5 schema update. See screenshot.

# Answer
> 1 votes
This question is a duplicate of Upgrade Fails 4.7.4 - 4.7.6 in WP 4.5.1. This question was asked first, but it couldn't be diagnosed. The original poster's theme and/or PHP settings are suppressing error output that others like @BruceW had.

I'm going to say that the answer to this question is "use the default theme when troubleshooting upgrade issues" and turn PHP error reporting to maximum. I'll answer the actual issue on the other question, since that one is more likely to be found by others.

---
Tags: wordpress, upgrade
---


title: Upgrade Fails 4.7.4 - 4.7.6 in WP 4.5.1

text:
# Question
Title: Upgrade Fails 4.7.4 - 4.7.6 in WP 4.5.1
We have attempted to upgrade the CiviCRM instance multiple times, but all attempts for that failed with the following error:

> ALTER TABLE `civicrm_mailing_event_queue` DROP FOREIGN KEY `FK_civicrm_mailing_event_queue_email_id` \[nativecode=1091 \** Can't DROP 'FK\_civicrm\_mailing\_event\_queue\_email\_id'; check that column/key exists\]

I have followed multiple suggestions on the Internet of people experiencing similar (if not the same) issues, but this did not help either. For example, I have tried the following recommendation:

> Unable to upgrade to 4.7.6

but it did not resolve the issue. I have also followed the instructions here:

> https://forum.civicrm.org/index.php?topic=29889.0

as well as the official documentation of CiviCRM here:

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

Here's my site profile link. https://mycivi.org/profile/snapshot/8yejn-Wwh0X-pHIht-GVWI3

Any suggestions on how to proceed?

# Answer
> 5 votes
UPDATE: CRM-18526 fixes this issue - it's just been checked in. To bypass this problem, upgrade to CiviCRM 4.7.8 or higher.

John is correct about this being related to CRM-18345. There are two problems with the upgrade code - and the `SET FOREIGN_KEY_CHECKS=0` others posted only solves one of them.

I've posted my analysis here, and I expect that someone will fix this issue. However, if you're experiencing this now and want to upgrade, here's what to do. I'm assuming that folks reading this will feel comfortable editing a file on their server, but aren't generally comfortable playing around with MySQL constraints:

First, restore your database to a state before the backup!

When you upgrade, look at the error.

**Problem 1** Does the SQL statement that failed have the words `DROP FOREIGN KEY` in it? If so, the problem is that you don't have the foreign keys. In this case, it's safe to delete the code that tries to remove the foreign key. Open up the file `<civicrmroot>/CRM/Upgrade/Incremental/sql/4.7.5.mysql.tpl`. Find the command `ALTER TABLE civicrm_mailing_event_queue DROP FOREIGN KEY FK_civicrm_mailing_event_queue_email_id` (or whichever command corresponds to the error you're getting) and delete it. Reload the page and the upgrade will continue. It's very likely that if you don't have one foreign key, you don't have all four - so expect to repeat this three times.

**Problem 2** Does your SQL statement that failed have the words `ADD CONSTRAINT` in it? If so, you've already encountered the problem this code is trying to fix - but the code doesn't work if you've already encountered the issue. To resolve this, add the line `SET FOREIGN KEY CHECKS=0` on the line above the command that's giving you an error, and `SET FOREIGN KEY CHECKS=1` on the line directly below it.

Don't forget - these commands are very similar, so if you think that this solution hasn't solved your problem, make sure you're looking at an identical error and not a very similar one!

# Answer
> 2 votes
This issue is related to this improvement that was made in a recent version: https://issues.civicrm.org/jira/browse/CRM-18345

The update function is deleting foreign key constraints - however it sounds like they were never set up in your database? You can inspect your database and check the status of the foreign keys as a test.

---
Tags: wordpress, upgrade
---


# Question
Title: Database Error When Upgrading 4.6 to 4.7 on Drupal 7
I was running a 4.6 instance of CiviCRM and am attempting to upgrade to 4.7. Every time I initiate an upgrade, things work well until it reaches 4.7alpha stage of the upgrade. Then I get an error that I cannot drop mapping\_id from the civicrm\_action\_schedule table. I've retried this several times with the same result. I checked and both the table and field exist in the original table. Any ideas about how to resolve this?

Here is a screenshot of the error:

\[EDIT: Adding searchable text from someone with the same issue to make this easier to find\]

```
 * ERROR USERINFO: ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_schedule_mapping_id` [nativecode=1091 ** Can't DROP 'FK_civicrm_action_schedule_mapping_id'; check that column/key exists]
 * ERROR DEBUGINFO: ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_schedule_mapping_id` [nativecode=1091 ** Can't DROP 'FK_civicrm_action_schedule_mapping_id'; check that column/key exists]
#0 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#1 /usr/share/drupal7/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#2 /usr/share/drupal7/modules/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: not found", -4, 16, (Array:2), "ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_sch...")
#3 /usr/share/drupal7/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-4, 16, (Array:2), "ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_sch...")
#4 /usr/share/drupal7/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -4, NULL, NULL, "ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_sch...", "DB_Error", TRUE)
#5 /usr/share/drupal7/modules/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-4, NULL, NULL, NULL, "1091 ** Can't DROP 'FK_civicrm_action_schedule_mapping_id'; check that column...")
#6 /usr/share/drupal7/modules/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#7 /usr/share/drupal7/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_sch...")
#8 /usr/share/drupal7/modules/civicrm/CRM/Utils/File.php(332): DB_common->query("ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_sch...")
#9 /usr/share/drupal7/modules/civicrm/CRM/Upgrade/Form.php(196): CRM_Utils_File::sourceSQLFile("mysql://root:asdf@localhost/civicrm?new_link=true", "-- Add new columns for multilingual purpose\nALTER TABLE `civicrm_action_sche...", NULL, TRUE)
#10 /usr/share/drupal7/modules/civicrm/CRM/Upgrade/Form.php(387): CRM_Upgrade_Form->source("-- Add new columns for multilingual purpose\nALTER TABLE `civicrm_action_sche...", TRUE)
#11 /usr/share/drupal7/modules/civicrm/CRM/Upgrade/Form.php(421): CRM_Upgrade_Form->processLocales("/usr/share/drupal7/modules/civicrm/CRM/Upgrade/Incremental/sql/4.7.alpha1.mys...", "4.7.alpha1")
#12 /usr/share/drupal7/modules/civicrm/CRM/Upgrade/Incremental/Base.php(80): CRM_Upgrade_Form->processSQL("4.7.alpha1")
#13 [internal function](): CRM_Upgrade_Incremental_Base::runSql(Object(CRM_Queue_TaskContext), "4.7.alpha1")
#14 /usr/share/drupal7/modules/civicrm/CRM/Queue/Task.php(88): call_user_func_array((Array:2), (Array:2))
#15 /usr/share/drupal7/modules/civicrm/CRM/Queue/Runner.php(214): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#16 /usr/share/drupal7/modules/civicrm/CRM/Queue/Runner.php(168): CRM_Queue_Runner->runNext()
#17 /usr/share/drupal7/modules/civicrm/CRM/Upgrade/Headless.php(67): CRM_Queue_Runner->runAll()
#18 /usr/share/drupal7/modules/civicrm/drupal/drush/civicrm.drush.inc(707): CRM_Upgrade_Headless->run()
#19 [internal function](): drush_civicrm_upgrade_db()
#20 /usr/share/php/drush/includes/command.inc(334): call_user_func_array("drush_civicrm_upgrade_db", (Array:0))
#21 /usr/share/php/drush/includes/command.inc(208): _drush_invoke_hooks("civicrm-upgrade-db", (Array:0), "civicrm")
#22 [internal function](): drush_command()
#23 /usr/share/php/drush/includes/command.inc(175): call_user_func_array("drush_command", (Array:0))
#24 /usr/share/php/drush/drush.php(92): drush_dispatch((Array:27))
#25 /usr/share/php/drush/drush.php(61): _drush_bootstrap_and_dispatch()
#26 /usr/share/php/drush/drush.php(16): drush_main()
#27 {main}
WD php: PEAR_Exception: DB Error: not found in CRM_Core_Error::exceptionHandler() (line 913 of                                      [error]
/usr/share/drupal7/modules/civicrm/CRM/Core/Error.php).
Cannot modify header information - headers already sent by (output started at                                                       [warning]
/usr/share/drupal7/modules/civicrm/CRM/Upgrade/Headless.php:72) bootstrap.inc:1232
PEAR_Exception: DB Error: not found in CRM_Core_Error::exceptionHandler() (line 913 of /usr/share/drupal7/modules/civicrm/CRM/Core/Error.php).
Drush command terminated abnormally due to an unrecoverable error.                                                                  [error]

```

# Answer
> 1 votes
The SQL here isn't trying to drop the field - it's trying to drop the foreign key. So checking for the field isn't sufficient. You can look for foreign keys with:

```
SHOW CREATE TABLE civicrm_action_schedule;

```

This will give you the exact SQL statement needed to create the table as it currently exists, and will show foreign keys.

I have no idea how you ended up without the foreign key on that table. However, there's no harm in removing that statement from the upgrade SQL if that foreign key already doesn't exist. So after unzipping CiviCRM and before you run the database upgrade, edit `<civicrmroot>/CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl` and remove the offending SQL command (it's near the top!).

---
Tags: upgrade
---


# Question
Title: CiviCRM and WordPress User Groups and Permissions
We are trying to set-up user accounts for use on both our WordPress club website and CiviCRM but just can't figure out how to get the permissions piece to work.

The "CiviCRM WordPress Member Sync" plugin has allowed us to create the user accounts and sync between the two systems for about 80-90% of our members, so that is now working. What we can't figure out is how to set the WordPress permissions to be based off of CiviCRM groups (WordPress uses Roles/Responsibilities).

We acquired a few plugins called "Press Permit Core" and "Capability Manager Enhanced" thinking they would help, but it hasn't. It shouldn't be this difficult to manage user groups and security from CiviCRM to WordPress. Any guidance that you can provide is deeply appreciated.

# Answer
> 2 votes
CiviCRM WordPress Member Sync is compatible with both the Members and Groups plugins. The former grants WordPress users the 'restrict\_content' capability when they have a membership, whilst the latter allows capabilities that are generated by CiviCRM WordPress Member Sync to be mapped to user groups. Either that, or you can roll your own functionality by mapping memberships to roles or capabilities.

---
Tags: wordpress, permissions
---


# Question
Title: Can I import contacts from Outlook into CiviCRM?
Is it possible to transfer a contact list from Microsoft 365 Outlook to CiviCRM using a csv. File?

I don't understand this formating business, it's a simple enough question.

# Answer
There is a very good explanation about importing contacts in to civicrm using csv in this chapter of the book. It doesn't matter where those contacts' data originated.

https://book.civicrm.org/user/current/common-workflows/importing-data/
> 2 votes

# Answer
I'm in the process of doing this too. What I found though is that Outlook contacts are all individuals whereas Civi contacts can be either Organisations or Individuals, so unless there is a great level of consistency with naming conventions, they won't all necessarily match up. (Ie, contacts from the same organisation won't necessarily match up) I therefore created two excel spreadsheets, one with the individual contacts, and searched for similar terms to standardise the company names. Then I created a new spreadsheet for the organisations, and have an intern populating it with central phone and email addresses (all my outlook one's were for individual people) it so I can upload it all consistently.
Not finished yet though!
> 2 votes

---
Tags: contacts, import
---


# Question
Title: How do I add a Membership Expiry view-only field to a user profile page in Wordpress?
I want to let members see their membership expiry date. I am running Civi 4.6 with Wordpress 4.4.1. I have tried creating a Membership Details profile with one field "Membership Expiration Date" in it, but whenever I try and view the field, I get "Profile search, view and edit are not supported for Profiles which include fields for more than one record type."

# Answer
> 3 votes
If you want to fetch this information directly, the following code should get you started. It displays the logged-in user's membership expiry date:

```
// get current WP user
$user = wp_get_current_user();

if ( civi_wp()->initialize() ) {

    // get contact ID
    require_once 'CRM/Core/BAO/UFMatch.php';
    $civi_contact_id = CRM_Core_BAO_UFMatch::getContactId( $user->ID );

    // get CiviCRM membership details
    $memberships = civicrm_api( 'Membership', 'get', array(
        'version' => '3',
        'page' => 'CiviCRM',
        'q' => 'civicrm/ajax/rest',
        'sequential' => '1',
        'contact_id' => $civi_contact_id,
    ));

    // show expiry date
    echo $memberships['values'][0]['end_date'];

}

```

Obviously your production code would include error checks after fetching the CiviCRM Contact ID and the Memberships that they may or may not hold. It would also convert the date to a more friendly format.

# Answer
> 1 votes
What other field types have you added to the profile? Can you add a screen shot of the fields you have included? If you have allowed access on the front end to the contact dashboard, you can include expiration date there, without having a separate profile.

# Answer
> 0 votes
Why not just use the User Dashboard and select which elements you want to show?

From the online CiviCRM Book:

When selecting the User Dashboard you get no additional options. To identify what related information you have setup to be displayed within the user dashboard i.e. Contributions, memberships, etc. **navigate to Administer \> Customize Data and Screens \> Display Preferences and select all of the information you would like to have visible to the user.**

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


title: CiviXero - what's the status?

text:
# Question
Title: CiviXero - what's the status?
I'm looking to hear from users of Eileen's excellent CiviXero extension!

1) Do you have any active bugs with CiviXero? Instances of data not being updated in Xero or Civi when they should be?

2) Is there anything that you need CiviXero to do which it currently can't?

3) Any problems associated with high volumes of transactions?

4) Does anyone know 100% for sure that it works with Membership purchases and renewals?

5) Does this work on a "batch" system for insertion and retrieval? (I see nz.co.fuzion.civixero/CRM/Civixero/Job/job.mgd.php, usually for scheduled jobs right?). If so, are there throttling settings (I can't see any in nz.co.fuzion.civixero/settings/Civixero.setting.php)?

Thanks - I really do appreciate all responses!

# Answer
The Issue list for the extension is at https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/issues and is the logical place for 1) bug reports, 2) feature requests, 3) bug reports re: performance, 4) feature requests/bug reports re membership purchases. You can probably also use that issue queue to ask 5) about how it is implemented, or even better, offer to update the documentation if provided with that answer.
> 0 votes

---
Tags: extension, accounting
---


# Question
Title: Up to what version of CiviCRM is secure to upgrade on a Drupal 6 site?
CiviCRM no longer officially supports Drupal 6.x. as of version 4.2 but seems that more than one is running versions above 4.1 with Drupal 6 site.

Up to what CiviCRM version I can upgrade my Drupal 6 site without suffering any incompatibility?

# Answer
Pete is right that even recent versions of CiviCRM (certainly in the 4.6.x series) work with Drupal 6 sites. The "no longer officially supports" issue is that the core team won't go out of their way to make D6-specific fixes.

That said, I have encountered problems with new installations on Drupal 6, but this has been for testing--why else would someone build a new site on Drupal 6?
> 6 votes

# Answer
We have Drupal 6 sites running just fine on the 4.6.x series. I don't know where you read that 'civicrm no longer supports drupal 6" - is it not more the case that Drupal no longer supports Drupal 6 and hence all module information concerning D6 is incorrect
> 5 votes

# Answer
I have been running Civi 4.7.6 on a Drupal 6.38 production site. Seems to be working just fine :-) Am busy installing to security upgrade 4.7.7 now so hold thumbs nothing breaks :-)
> 3 votes

---
Tags: drupal, upgrade, drupal-6
---


# Question
Title: Creating a relationship when filling in a Profile
I love the way the "Employee of" relationship can be created simply by adding the "Current Employer" field to a profile. Is there a corollary for other relationships? I need to be able to track if an event registrant is connected to another external partnering organization. However, I don't retain the membership information for the partnering organizations.

Quick example: Create a "Church Member of" relationship to an Organization/Church while signing up for a training.

(If I missed this in the docs, oops!, please forgive me.) It seems that most are using Drupal WebForms, which is, um, difficult? on WordPress.

# Answer
It's not currently possible to create a relationship on a CiviCRM profile form similar to the Employer one when using WordPress or Joomla.

However, if you create an auto-reference field you can use that to create a link between a participant and another contact.

You can create the field on all contacts, or a contact subtype that covers all those filling in the event registration for trainingeven, or potentially registrants or just the registrants for that event. My guess is that a registrant auto-reference field is less likely to be convenient or what you want.

Don't forget that 1) the auto-reference contacts can be limited to a particular group of contacts, and 2) there are security issues in exposing contact data when using contact reference fields on public forms.
> 2 votes

# Answer
This sounds like it might be a job for CiviRules, which lets you create "if this, then that" type rules with triggers, conditions and actions. It's powerful, but depending on exactly what's required it may need to be extended further. It's also necessary to be careful with configuring it!

(We also have an internal unreleased extension called Keep History that takes custom fields from a contact, and copies them into a relationship. But that was created for a legacy situation where a many-one kind of relationship became many-many so it was necessary to create relationships instead of using contact reference custom fields.)
> 1 votes

---
Tags: civievent, wordpress, profile, relationships, registration
---


# Question
Title: Recommended set up for Individuals -> Member of Organisation -> State Governing Body
This may not be the best forum to ask the following - so let me know if I have this wrong and let me know how best to proceed. (FYI I'm in Australia and using Joomla 3.5.1)

I have been looking around for ages for a tool to manage our member bands individual membership records and history and have tried to get my head around how CiviCRM can help solve the issues with our current MS Access DB (i use that term very loosely) to record details about each band's members and the bands' financial status with the state governing body. Best thing that attracted me to CiviCRM was the auditing of changes :)

our organisation, at a state level, consists of a governing body for the state with member 'bands'. Bands can be 1 of 4 types and an individual can be a member of only one band for each of the types (most members are a member of only 1 or 2 of the band types).

Qu 1: Should I be using 'Organisations' for each of the Bands or should I use Groups.

Qu 2: Memberships are paid (manually) by bands on a yearly basis. Individuals of a band are regarded as 'paid and active' if the band to which they are associated has paid the fee - their are no 'individual' membership fees payable. How would I go about setting up the CiviMembership extension to do this? I have gone so far as creating one Band and an individual who has a relationship to that band - but not sure where to go to next.

Qu 3: We also have several awards for bands and individuals which we wish to track. Should I be using tags, groups or custom field to record this information. We want to be able to record the type of award and the date it was given.

# Answer
It took me a minute to get my head around this because I'm not sure what a "band" is in your context - I haven't seen the word used that way before. However, I realized that I could answer your questions regardless.

Question 1: Bands should be recorded as organizations - possibly as an organization subtype, but if they're the primary type of organization you track, that may be unnecessary. The reason to track them as organizations is...

Question 2: This allows you to use CiviMember to track memberships for individuals based on whether the band is in good standing. You're correct to create a relationship between individual and band. Now - when defining membership types (**Administer menu \> CiviMember \> Membership Types**), you must set the "Relationship Type" to match the relationship type you used to connect the individuals to the bands. This will automatically extend a band's membership to an individual.

Question 3: I would actually argue that if you need to track both type and date, a new activity type "Award" is most appropriate. Groups and tags won't let you record the date the award was given. Custom fields would, but you could only issue one award per individual unless you used multi-record custom fields, which are awkward and best avoided. However, activities actually fits quite nicely and will report well.
> 1 votes

# Answer
1. Record bands as organizations.
2. The bands are members in your organization, and individuals are members of the bands. Make sure to define the contact types for your custom relationship 'Is a member of the band' / 'band includes member' (at Admin \> Custom Data and Screens \> Relationship Types) so that one is an individual and the other is an organization, and set the membership to be inherited through this relationship type when you create the membership type for the bands at Admin \> CiviMember \> Membership Types. Also, on the Title and Settings tab of the Contribution Page you are using to sell memberships, ensure you enable ' Allow individuals to contribute and / or signup for membership on behalf of an organization?'
3. Use a custom 'Award' activity, configured at Admin \> Custom Data and Screens \> Activity Types.
> 0 votes

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


title: Recommended CMS for CiviCRM

text:
# Question
Title: Recommended CMS for CiviCRM
The CiviCRM download page shows that it is available for Drupal, WP & Joomla I came across CiviCRM via the Joomla Extensions directory, but it seems not everything is equal among the CiviCRM installs; in particular no sample data for Joomla. I also had problems with the 4.7.6 build and not until I tried the 4.7.7 did I get anything up and running under Joomla - but the dashboard doesnt load (I'm using WAMP for a dev environment).

What is the most supported CMS from the 3x available as far as CiviCRM is concerned.

# Answer
We use Drupal exclusively for all our projects. Many advantages such as drush; views integration; webform\_civicrm module!

CiviCRM is CMS agnostic - and the community will support all three CMS-es. Most are on Drupal and Wordpress though so to get help - that's your best bet.
> 4 votes

# Answer
Agree with KarinG. I think Drupal is the best supported and most integrated of the three CMS's at the moment. Wordpress is growing rapidly.
> 2 votes

# Answer
This related question gives a good overview of the differences between the three CMSs:

How is CiviCRM different in Drupal, Joomla, and WordPress?
> 2 votes

---
Tags: wordpress, drupal, joomla, installation
---


title: Different forms depending on user roles

text:
# Question
Title: Different forms depending on user roles
I want to customize the "Edit Contact" form depending on roles. What's the best way to do it?

* create different templates. It's possible to distinguish inside a .tpl the user role?
* create a Drupal view
* ....

Thank's a lot

# Answer
You say you want to change 'Edit Contact' - but if you mean, you want a way for a logged in user to be able to be directed 'somewhere' to update their details, then here is one non-coding solution suitable for just a couple of different roles that i hope others can improve on. (The more I wrote this out the more convoluted it seemed

Ingredients: \- one webform using webform\_civicrm module per role \- one View with displays set for each role

Recipe: Set the webforms up so cid1 is the logged in user, and provide the fields you want depending on the role for each webform. With the view make a block per role or use some php sauce so that the link that it provides varies per role. Stack the block(s) to show on /user perhaps. Set the link in the block to send the user to the webform that is relevant to their role.
> 4 votes

# Answer
Try using webform\_civicrm!

1. make different webforms exposing different contact fields
2. you can do that for multiple contacts (i.e. make it into a batch update screen!)

3. set the webform permissions such that different roles can submit the different forms
> 2 votes

# Answer
After some research and test I think to take the solution to work on the template. Something like this:

```
{php}
global $user;
$roles_array = $user->roles;
if (array_key_exists(4,$roles_array)) {
  $this->assign('customtemplate', True);
}
{/php}
{if $customtemplate}
   ....

```

But I dony'know if it will lower levels of security,
> 0 votes

---
Tags: templates, roles, contact-view
---


# Question
Title: Authorize.Net errors after updating to Civi 4.7
I updated from 4.6 to 4.7.7 yesterday and if a guest user comes to our site to register they receive the following errors:

> Notice: Undefined index: user\_name in CRM\_Core\_Payment\_AuthorizeNet-\>\__construct() (line 55 of .../civicrm/CRM/Core/Payment/AuthorizeNet.php). Notice: Undefined index: password in CRM\_Core\_Payment\_AuthorizeNet-\>\__construct() (line 56 of .../civicrm/CRM/Core/Payment/AuthorizeNet.php).

However, if I am logged in to my drupal site, I do not receive these errors. Any idea why this is happening? I went into the Admin \> System \> Payment Processors and there's no place for user\_name or password. I'm guessing they are looking for a drupal username; however we do not require login to register or donate using civi.

We are using Civi 4.7.7 on Drupal 7.x (can't remember which version).

# Answer
**Try this :** This happens only for the payment processor

so please try to delete the payment processor and uninstall the payment processor extension if you have any

Then install the payment processor extension and add a payment processor again

Then clear all your cache and try again
> 1 votes

---
Tags: civicontribute, drupal, 4.7, authorize.net
---


# Question
Title: How to communicate with the users of an extension?
We are discussing about which version(s) to maintain compatibility with, and would like to be able to discuss that with the users of that extension. Is there an easy way to do that?

Eg. civicrm.org has already several ways to display a message to the civicrm users (eg. community message), would it be possible to plug into that and add a special message only visible to those that have a specific extension enabled?

# Answer
> 4 votes
The short answer is no.

Per this blog post, only the core team can control in-app messages. I'd say you'd have to make your appeal directly to them. I'm sure they'd be hesitant (with good reason), but you may be able to make your case.

However, that wouldn't do any good in your case. I've just skimmed CRM/Core/CommunityMessages.php. The `pick` method allows message display to be controlled by the permission of the logged-in user and by the components that are enabled (e.g. CiviMail) - but not by extension.

# Answer
> 2 votes
I have posted a new feature request for this: https://issues.civicrm.org/jira/browse/CRM-18541

---
Tags: extension, developer, compatiblity
---


# Question
Title: How can I create a user automatically when someone submits a CiviCRM-Webform?
When someone submits a CiviCRM-enabled Webform, can I create a user for them automatically in Drupal or Backdrop?

# Answer
# Backdrop

The simplest way would be to use the Webform Registration module, which has been tested to ensure it works with CiviCRM email fields.

# Drupal

This conversation came up on the CiviCRM chat. I have done this for a site previously -- following instructions from @petednz's blog post here. *(Note that blog post also has some exported Rules that you can download to start with and maybe save some time).*

But if you want to start from scratch, here's what you need:

* Webform CiviCRM
* Rules
* CiviCRM Entity

---

1. Create a tag within CiviCRM, something like "Create Drupal User".
2. Set up the form, enable CiviCRM processing, and add a contact in the CiviCRM tab, customizing as you see fit.
3. On the "Tags and Groups" section for this contact, select the tag you created in #1.
4. Go to the Rules page (Configuration \> Workflow \> Rules) and click "Add New Rule"
5. Name the rule and choose the **React on Event** as "CiviCRM Entity Tag has been created"
6. As for **Conditions**, we first want to make sure there is no existing Drupal user for this contact, so we use the "Drupal User Account exists for Contact" and negate it (data selector value will be something like `civicrm-entity-tag:entity-id-contact`).
7. Then we do a data comparison on `civicrm-entity-tag:entity-table` to make sure that it is "civicrm\_contact" (to be sure we are updating the right entity)
8. And as the final condition, another data comparison to make sure the tag that was created is the correct tag which should result in a Drupal user being created. Using the numeric tag ID from the tag you created in #1 (you can find this in the second column of the CiviCRM "Manage tags" section), we can compare to make sure that `civicrm-entity-tag:tag-id` equals this numeric ID.
9. Finally, under **Actions**, we can use the "Create Linked Drupal User Account" action on the data selector `civicrm-entity-tag:entity-id-contact`. There are a few other options within here which you can set related to whether to activate/auto-sign in/send notification email as well.
> 13 votes

# Answer
The blog here, which may have been the source of Laryn's solution, also contained some exported Rules that might still work out of the box. There are variations depending on whether you want to log the person in immediately the form is submitted (which we often do when the webform is the second in a chain of webforms)
> 3 votes

---
Tags: drupal, webform-civicrm, backdrop
---


# Question
Title: How can I change the fields displayed by dataTables?
I want to customize the information provided by templates that are generated via the dataTable plugin. Specifically, I want to alter the RelationshipSelector.tpl to display a contact's title and a couple of custom fields.

The dataTable script in the RelationshipSelector table makes a call to civicrm/ajax/contactrelationships via AJAX. It returns JSON. I noticed that the dataTable plugin elsewhere makes calls to civicrm/ajax/\*.

Is there a way I can alter the JSON that is returned to include my fields?

I'm running a Drupal + Civi 4.6

# Answer
If you look in CRM/Core/xml/Menu/Contact.xml you'll see that the civicrm/ajax/contactrelationships maps to CRM\_Contact\_Page\_AJAX::getContactRelationships, so you can go into CRM/Contact/Page/AJAX.php and change what the getContactRelationships function does.

If you're not familiar with the techniques here to override core files, as opposed to editing the actual core files, you also want to take a look at that.
> 0 votes

---
Tags: relationships, ajax
---


# Question
Title: Why is 4.7.7 CiviMail failing trying to insert a row into civicrm_mailing_recipient?
To reproduce ...

1. Create a mailing that includes contact X as a recipient
2. Delete the email address of X
3. Send mailing

The job fails trying to send an email to X. Each time the job runs it queues emails to send to the same set of contacts (those 'before' X). Job never completes.

I suspect it's a side-effect of https://issues.civicrm.org/jira/browse/CRM-18345

# Answer
> 1 votes
See issue CRM-18543 and PR 8355.

CRM-18345 changed the behaviour of the foreign keys on civicrm\_mailing\_recipient when deleting civicrm\_email or civicrm\_phone. The email\_id and phone\_id columns are made NULL rather than the row being cascade deleted.

This means there can exist rows in civicrm\_mailing\_recipient where both these fields are NULL.

So the Mailing Job software needs to handle rows where BOTH email\_id and phone\_id are NULL.

I've supplied a patch that handles this case by ignoring such rows.

---
Tags: civimail
---


# Question
Title: Multiple Entry Custom Values : Find modified ID?
Whenever custom data is written to the database you can use the module\_custom() hook to determine what most of the parameters written were. However, I've been unable to find the 'id' of the write.

For example lets examine Custom Group Athlete

## Athlete

Field 1 Label: SportPlayed

Field 1 Type: AlphaNumeric

Field 2 Label: DateStarted

Field 2 Type: Date

Field 3 Label: Enjoyment Level

Field 3 Type: Alphanumeric

Field 4 Label: Updated

Field 4 Type: Date

Now,

Lets ignore any calls that this Custom Group should really be an activity.

Lets assume there are no checks on uniqueness of data answered.

Using the $params variable from the custom() hook I can see the particulars about every field that was writen EXCEPT the ID of the entry(Not the entity ID).

Therefore, if I had The following Data

```
Sport Played | Date Started | Enjoyment Level | Updated
-------------------------------------------------------
Baseball     | 1-1-2012     | High            |
Baseball     | 1-1-2012     | Low             |

```

and I changed the first entries Enjoyment Level from High to Low, how could I also change the Updated entry to today's date? Remember that, as I understand, I don't actually know which entries are changing values from the $param field. All I know are the values submitted. **I need some way find the id of the entry which is oddly not included in the $param variable** Does anyone have a way to do this? I understand that if values are roughly unique I could run an SQL query to search for all matching parameters and return the ID but that seems overly complicated.

# Answer
Don't know if this will help, but at least you can try it. :)

The custom() hook is called after the db write on a custom table, so when the field is writen, you can't know which was the change, so you can't have the id (or at least I think so).

Instead of custom() you can try the pre() hook. Check if the Enjoyment Level has changed (use api to read the field in the db and compare with the $param), and if it had, update the Updated field.

Check this links that posibly can help you:

Setting and getting custom field values from within hooks

Hook pre
> 3 votes

---
Tags: custom-fields, hooks, mysql
---


# Question
Title: Social Settings on the bottom of contribute pages
On the bottom of the create page there is a button to turn on social media. Where do I add the links to configure twitter, google, facebook and linkdin?

# Answer
> 2 votes
I believe key here is that what CiviCRM inserts are social media 'shares' - not social media 'links' or 'follow us'.

for social media links we add https://www.drupal.org/project/social\_media\_links (I'm sure in wordpress land there are plugins that work exactly like this drupal module).

Social media links behave as you asked in your question: you must configure which icons you want and add their targets (links to them). These targets typically are your twitter feed; your linkedin page; your etc.

# Answer
> 0 votes
Turning 'on' the social network links provides buttons so that the user can use their FB etc accounts to share the Event/Contribution Page.

I.e if you click on the Tweet it will open up twitter.com, and requires you to login in to your twitter account if the user is not already logged in.

Having said that, I thought I would confirm on demo site but even with the "allow sharing" turned on, no links show on the Event page but it would make sense for it to be suppressed on the demo sites I guess.

---
Tags: social-media
---


# Question
Title: Can you import financial data into Sage accounts?
I am aware that you can export financial data from CiviCRM as an IIF or CSV file. Can this data be imported into Sage accounts software?

Does anyone have any experience of this?

# Answer
> 3 votes
Yes we can import data directly to sage but using custom format

I did take a copy of CSV.php file and created a custom\_export.php and then did the changes

But you can also directly change CSV.php file and do the required changes - In most case sage file will need only minimum fields like which can do by altering the SQL

**Type - Account Ref - Nominal - Reference - Date - Transaction - Net - Vat - Tax code**

If you need more details please let me know - I guess this helps!!!

# Answer
> 2 votes
Looks like you'd export from CiviCRM into CSV and then wrap your data in `<tags>` like e.g. `<SalInvoice>` and `</SalInvoice>`. Also needs to add a line of vendor info, see:

https://partners.sagenorthamerica.com/irj/go/km/docs/sageKM/Simply%20Accounting%20by%20Sage/Assets/dev-import.pdf

Once you get one working by manually inserting tags and vendor info to CSV data from your CiviCRM then you can script it.

---
Tags: export, financial-accounts
---


title: Contributions and Events

text:
# Question
Title: Contributions and Events
I have been trying to find a way on how to divide one fundraising event into three parts - because our event was supporting three different initiatives and we want to know which contact supported which initiative within the event, and how much money they donated for every initiative.

It is also important for us to create a link that includes all the three initiatives because the fundraising is to be continued online - any suggestions on how to do that? The link will then be sent out through a mailing.

Thanks in advance!

# Answer
Rereading - unsure if my other answer helps at all but will leave it for now. Price Sets may be more what you are after. I set one up here which you can see in action here

(note the above links will only be good till the site refreshes- but make a Price Set using "text/numeric", "Price = 1.00" and do not show 'Display Amount' - that will give you 3 fields where a person can enter the amount they want to give to each of the 3 parts - then set your Contribution Page to use the Price Set constructed above)

You can't use Campaigns on a per line item afaik so not sure that other suggestion helps but I think for reporting you can get what you need from eileen@fuzion's Extended Report https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport which offers "Price Set Line Items" reports. HTH
> 1 votes

# Answer
Unsure how much this helps as your refer to Events, but not necessarily CiviEvent.

Anyhow, Campaigns is a civi function that can run across multiple entities. Hence you can create a Campaign for the 'event' and then have multiple CiviEvents, Contribution Pages, CiviMailings etc all related to that Campaign to make it easier to report against
> 0 votes

---
Tags: civievent, contributions, links
---


# Question
Title: Trying to install CiviCRM 4.7.6 under Wordpress get you do not have sufficient permissions to access this site
This is a re-install. I was unable to upgrade a previous version but it had not been used so I deleted all the CiviCRM tables.

I then deleted the civicrm directory under plugins and in the wp root so theoretically, there should be no remnants of civicrm.

I then unzip the .zip file into the plugins directory.

After that, I activate CiviCRM in Wordpress. The first clue that something is wrong is that I get an Initialization Error with messages that say that the table civicrm\_settings does not exist. Of course, it shouldn't exist because this is a new installation.

I then tried to run http:///wp-admin/options-general.php?page=civicrm-install with my site and got the error *You do not have sufficient permissions to access this site*.

The CiviCRM plugin is activated, as I said above.

Is there something else I must clean up before I can install it?

# Answer
> 1 votes
For a clean CiviCRM reinstall under Ubuntu / LAMP / Wordpress to work, the initial clearing of all CiviCRM related files is essential. If there are any vestiges of a prior installation left, the reinstall will certainly fail (either with an Initialization error, or the "You do not have sufficient permissions..." error).

Here are the necessary steps to reinstall (not upgrade) CiviCRM, using the desired / most recent version.

```
1. Review the directory structure to be sure it is as specified.  OK.
    1. Get to the proper directory:
       (for my configuration:  var/www/wordpress/wp-content/plugins/).
    2. Remove all civicrm files and folders:

```

> ```
> sudo rm -R ./civicrm
>
> ```

```
    3. Remove civicrm log and cache files and folders:

```

> ```
> cd ./files
> sudo rm -R ./civicrm
>
> ```

```
    4. Remove the civicrm.settings.php file, if present from prior work.

```

> ```
> cd ../civicrm
> rm civicrm.settings.php
>
> ```

```
    5. Check the wp-content/uploads directory for a civicrm subdirectory and files;
       remove if found:

```

> ```
> cd /var/www/wordpress/wp-content/uploads/
> ls -al
> (check for civicrm directory and files and remove if they exist)
> sudo rm -R ./civicrm
>
> ```

```
2. Use wget to pull down the desire / most recent zip file.  OK.

3. Unzip the file.  OK.

4. Use sudo chown to set file ownership as appropriate.  OK.

5. In your favorite browser, login to Wordpress and check the Wordpress plugins list to see if the CiviCRM plugin shows up (you may have to refresh the window).  OK.

6. It does, click the Activate button.  OK.

7. Activated.  OK.

8. Navigate to:  https://yourwebsite.org/wp-admin/options-general.php?page=civicrm-settings

9. If success, you can now see the installation page.

10. Click the configure CiviCRM button and get the green bar screen! OK.

```

You have now reinstalled CiviCRM. From here, follow the CiviCRM how-to for configuration details.

---
Tags: wordpress, install
---


title: Manage Groups filters broken in 4.7.7?

text:
# Question
Title: Manage Groups filters broken in 4.7.7?
I'm running 4.7.7 in Word Press and none of the filters on the Manage Groups page seem to be working. It's been replicated by other users so it doesn't seem to be an issue related to users and/or local machines. Is this happening to others?

Edit: I've been digging around further, is there a chance that this is related to CRM-18528? I've applied the new code and it seems to be working, although from what I've seen this applies to the Drupal version. Thanks for your help!

# Answer
Thanks for bringing this to a wider audience! I just confirmed the issue on the demo site, which is the first step toward determining if this is a bug for everyone (see Reporting a Bug).

I've confirmed it's not an AJAX error or a problem with how the URL is constructed, which were my first guesses. I'll take a few minutes to poke around in the code, and if the problem's not obvious I'll report it upstream at https://issues.civicrm.org.

UPDATE: The problem's not obvious to me, but I know there are some bugfixes in process for this set of new functionality (CRM-16353)
> 1 votes

---
Tags: groups, 4.7, smartgroups
---


# Question
Title: Civibuild Install - Unable to connect to github.com
I got the following error while running `civibuild install` after few stuff got installed.

```
.
.
.
bower resolved      https://github.com/jquery/jquery-dist.git#2.2.3
bower resolved      https://github.com/jquery/jquery-dist.git#2.2.3
bower progress      jquery-ui#>=1.9 Receiving objects:  61% (427/700), 508.00 KiB | 45.00 KiB/s
bower progress      font-awesome#~4.4 Receiving objects:  76% (869/1141), 1.46 MiB | 25.00 KiB/s
bower progress      jquery-ui#>=1.9 Receiving objects:  66% (462/700), 596.00 KiB | 53.00 KiB/s
bower progress      font-awesome#~4.4 Receiving objects:  83% (948/1141), 1.46 MiB | 25.00 KiB/s
bower progress      jquery-ui#>=1.9 Receiving objects:  69% (483/700), 652.00 KiB | 57.00 KiB/s
bower progress      font-awesome#~4.4 Receiving objects:  83% (954/1141), 1.48 MiB | 18.00 KiB/s
bower progress      jquery-ui#>=1.9 Receiving objects:  70% (490/700), 684.00 KiB | 58.00 KiB/s
bower ECMDERR       Failed to execute "git ls-remote --tags --heads git://github.com/totten/angular-jquery-dialog-service.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.123]: errno=Connection timed out

Additional error details:
fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=Connection timed out

```

I ran `civibuild install` several times several times but it always halt on that particular that step.

# Answer
The problem was `port 22` was blocked in my connection. That's why it was not able to connect to `git://github.com/totten/angular-jquery-dialog-service.git`.
> 0 votes

# Answer
From this line,

> bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/totten/angular-jquery-dialog-service.git", exit code of #128 fatal: unable to connect to github.com: github.com\[0: 192.30.252.123\]: errno=Connection timed out

Check that you have installed git? if not use " sudo apt-get install git" before running the civibuild install command since the command has to fetch from the repository on github.

Also the line

> fatal: unable to connect to github.com: github.com\[0: 192.30.252.128\]: errno=Connection timed out

shows that there is a problem with the connection you can first run " ping google.com" to test for the connection and then run the civibuild command again.
> 1 votes

---
Tags: civicrm-buildkit
---


# Question
Title: full-text search not working consistently; case search in custom field not working
First, I'll explain how I stumbled upon the issue. We need some serious, working search functionality.

I set up a custom field for cases. I set up the custom field to be searchable.

I then created a test case and populated my new field with latin text "Lorem....".

I then tried to find my new case with case search and "lorem" in my custom field. It couldn't find it.

I then tried to find the new case with the new field using "full-text search". It couldn't find it again. I then started testing full-text search. It seems to be hit and miss.

Perhaps it's user error, and in that case, please advise what I'm doing wrong. I would appreciate it.

For the following tests, I'm using "all tables" and yes, I have wildcards enabled. Full-text search doesn't find "lorem" which is in my case custom field. Full-text search doesn't find "john" which is in the name of several contacts (john, johnson...). Full-text search doesn't find "j" which is in many fields in many tables. Full-text search only finds four hits for "a" which are all names of contacts. Full-text search doesn't find "max" which is in at least four contact's names. Full-text search does find three hits for "bob" all within contact's names. Full-text search does find two hits for "sheep" which are all in case descriptions.

Can anyone shed some light on these inconsistent results?

Thanks so much!

# Answer
Try your search using % as a wildcard - like %lorem%
> 0 votes

---
Tags: search, search-results
---


# Question
Title: Recording/ tracking time spent on Events
One of the activities of our organization is providing workshops etc. to the public. In order to facilitate all processes involved I have setup a coupe of events in CiviCRM. Each event represents a certain course, training or workshop. Next I have added participants (contacts) to those events with the role of Attendee. The event/workshop also requires one or more trainers so I added trainers (contacts) with the role of Trainer to the event/workshop. A requirement is that we have an overview/summary of each event showing who is involved in a certain event/workshop (e.g. who is/are the trainer(s), people taking care of logistics, participants, etc).

We would like to track the training time spent for each trainer and also to be able to generate a report listing e.g. the training name, date, training time spent and also the total training time for each trainer per (selectable) period (e.g. from/to date). What would be the best way to record the training times for each trainer? Could or should this be done in the event itself (e.g. custom fields) or should we add activities to each assigned trainer and aggregate activity durations? Any other solutions to accomplish this?

Many thanks in advance for your kind attention.

# Answer
> 2 votes
I would recommend you to create custom field associated along with participant record - where you can also specify the Event type

Once you have created the custom field as per your requirement then try to create a new profile for the participant custom fields

Then you can add the created profile against Event

Also while creating the custom field make it searchable so you can view the column in the report

I guess this helps !!!

# Answer
> 1 votes
I would create custom Activities for both the trainer and participants, for example, Training- Making Sock Puppets, with the Trainer as Assigned for the Activity and the participant as With (i.e., the 'target' of the Activity). Then, every Participant in the training Event who actually attends and completes the training can be updated via Actions as having completed the Activity - depending on the person's Event role (trainer or participant).

UPDATE - There is a way to aggregate Activities - via Grouping and Sorting in Reports - using the Extended Activities report, installed using Eileen's excellent Extended Reports extension at https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport . The extension has been recently updated.

# Answer
> 1 votes
Take a look at CiviVolunteer which has options for recording time involvement. It may not suit your needs but worth understanding what it offers.

---
Tags: civievent, civireport, activities, best-practice
---


# Question
Title: Premoderation for webform submission before contact record change
We've a Webform which picks and updates existing contact's data. Is it possible to add a "check data" step somehow after webform submission has been made but before actual contact record change? There seems to be no corresponded event-condition-action chain in Rules/Webform Rules/CiviRules.

# Answer
> 3 votes
Suggest you look at giving users only the option to create Draft webform submissions (maybe just hide 'submit' via js) - then you take over and do the actual Submission

# Answer
> 2 votes
Webform validation module can run a number of checks on specific fields on your webform - https://www.drupal.org/project/webform\_validation

If you're worried about SPAM submissions install Mollom: https://www.drupal.org/project/mollom \- and configure it to monitor your webform submissions.

---
Tags: webform-civicrm, workflow
---


# Question
Title: email bounce processing not working. site on AWS, using Zoho email
I have created a test user group of 10 users, with 3 users having bogus email addresses that I know will bounce. I send bulk email to this group, and the mailing report shows 10 successful deliveries and 0 bounces.

I am using civi 4.6.16. I go to Administrator/system settings/Scheduled Jobs/Execute Now, and then view the job log. It is showing "Finished execution of Fetch Bounces with result: Success (a:0:{})"

Unsubscribe requests are working fine. The site is hosted on AWS. Email is hosted on Zoho. Zoho email alias is bounce@website.com.

Any ideas?

# Answer
> 3 votes
Is your bounce address set up properly in **Administer menu \> System Settings \> Mail Accounts**? Documentation is available here.

If you're good there, make sure you can log into the bounce processing account with the credentials you've stored. Also, what protocol have you set on that page? Is IMAP an option for you to use? If so, CiviCRM will store emails that it's processed in a subfolder on the server. It makes it easy to look and see whether Civi is doing what you expect.

Finally, if you aren't committed to Zoho, there are many third-party mailers, some of which offer as many as 100,000 messages free/month. Many have an extension for CiviCRM, much easier to set up than traditional bounce processing. Check out this blog post that includes a link to a CiviMail calculator.

---
Tags: civimail, bounce
---


# Question
Title: ACHEFT-Debit possible with webform_civicrm?
Webform CiviCRM module can do credit card payments - but what about ACHEFT-Debit?

# Answer
> 7 votes
That is now possible! For both CAD and USD.

Example of USD Checkout:

---
Tags: civicontribute, drupal, webform-civicrm, iats
---


title: CiviCRM Community Forums

text:
# Question
Title: CiviCRM Community Forums
may I know where to report an issue with "CiviCRM Community Forums" (forum.civicrm.org) pls? I have been able to create an account and start a thread but one day later, impossible to log in again: wrong password they say. The strange thing is my id/pwd is still ok on civicrm.org. Is there a kind a miscommunication betwen the sub domain and the domain? Thank you.

# Answer
> 2 votes
I would register an account on https://chat.civicrm.org (I don't think it shares logins with the rest of civicrm.org but maybe that's changed). Go into the "infrastructure" channel and someone should be able to fix any issues.

---
Tags: logging
---


# Question
Title: Drupal broken after upgrade to CiviCRM 4.6.16
Site was happily working under 4.6.15 - \** Running Drupal 6 \** - Drupal 6 broken after upgrade.

Every time (Tried 3 times now) I try to upgrade in my development environment I get this message:

Fatal error: Cannot redeclare phptemplate\_preprocess\_page() (previously declared in /srv/bindings/619ae4403404445daf26537c92800797/code/sites/all/themes/\*****custom\_theme\_name\_changed\_to\_protect\_id\_of\_website\****/drupal6\_theme\_methods.php:8) in /srv/bindings/619ae4403404445daf26537c92800797/code/themes/garland/template.php on line 42

I've renamed the path above to my custom template to protect the id of the website concerned.

Any ideas anyone? 4.6.16 has security patch(es) so I'm under pressure to upgrade. Thanks!

# Answer
I don't think that error is related to your CiviCRM upgrade, at least not directly. That error message is telling you that a duplicate function exists in your custom theme's `drupal6_theme_methods.php` file and garland's `template.php` file. Neither of those files are in the CiviCRM directory, which is the only code you replaced during the upgrade, right?
> 1 votes

---
Tags: drupal, upgrade
---


title: User Permissions Not Updating

text:
# Question
Title: User Permissions Not Updating
Let me start with I have read numerous posts regarding this issue and have tried the max\_input\_vars = 2500 and I only have 10 groups (nine standard and one added).

I am trying to add the View My Invoices for all Registered users. So selecting that option and changing the permissions to Allow for Registered shows the new setting to be correct but when you hit save/save and close it doesn't actually update. I do get the updates saved message, but again no update.

I have gone into the database and manually added this code {"2":1},"civicrm.view\_my\_invoices": in the Asset table. That will display the Print Invoice button in the users Dashboard, however, when you click it you get a Joomla error page that indicates that you don't have permissions to access this page.

I am hoping someone has suggestions or possibly post their Asset table civicrm Rules entry that is working on their site. Thanks for any suggestions or advice.

# Answer
> 1 votes
Working. New install. Using J!v 3.5.1/CiviCRM 4.7.7. db-prefix\_assets/row name = com\_civicrm; rules={"1":1,"2":1},"civicrm.view\_event\_info":{"1":1,"2":1},"civicrm.view\_event\_participants":{"1":1,"2":1}}

---
Tags: joomla
---


title: Cron failing after 4.6.16 upgrade

text:
# Question
Title: Cron failing after 4.6.16 upgrade
Platform: Wordpress 4.5.2 | PHP version: 5.5.9 | Mysql: 5.6.30 | Running: Ubuntu 14.04.4

Yesterday I successfully upgraded to CiviCRM 4.6.16, no errors during upgrade, everything went smoothly, except the cron job is failing with the next error:

```
PHP Fatal error:
  Allowed memory size of 262144 bytes exhausted (tried to allocate 1920 bytes) in
  /var/www/site/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php
  on line 226

```

PHP memory limit is set to 512M

line 226 at civicrm/bin/cli.class.php

The cron job runs every 5 minutes and looks like this:

```
php /var/www/site/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s site -u user -p password -e Job -a execute

```

If I run the job from the API explorer, it runs successfully with no errors, it also runs successfully if I execute a job with **Execute now** in the **Scheduled jobs** page.

Any input is highly appreciated.

# Answer
> 2 votes
So CLI's memory limit was set to -1 like this:

```
memory_limit = -1 // no memory limit

```

Setting the limit to other than ***no limit*** solved the issue.

I'm not sure why this happened as CLI's memory limit was always set to ***-1*** from the very first day I configured this server 2 years ago.

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


# Question
Title: CiviCRM Rules - Condition for contacts created X days ago
I am using Civicoops Rules extension. In our boarding process I need to create a rule to create actions for contacts which are still in a certain group after 14 days. My idea was to use the daily trigger for groups and add a condition for the field created\_date. How can I do this?

* Should I use SQL as the compare value e.g. DATE\_ADD(CURRENT\_TIMESTAMP, INTERVAL 14 day)
* Should I use PHP as the compare value e.g. strtotime('-14 days');
* Should I create a custom condition as explained here

# Answer
After a small patch to CiviRules PR 70 the solution is to go route 2, but simply use "-2 weeks". In fact any string recognized by strtotime can be used.

* **Trigger:** Daily trigger for group members
* **Condition:** Field value comparision : created\_date \<= -2 weeks
* **Action:** desired action, remove from Group
> 1 votes

# Answer
You may be able to achieve this already out of the box.

Create a rule like this:

* **Trigger:** Contact added to group.
* **Condition:** Contact is in group "the one you want"
* **Action:** the desired action, with 14 days delay. Then check the box for rechecking of conditions. (You may also want to have an action of removing contact from the original group, so that the condition is no longer met, somewhere down the line...)
> 3 votes

# Answer
great to hear you are using CiviRules! Would be nice if you could take route 3 and do a PR so your action can be shared with other users too?
> 2 votes

---
Tags: civirules
---


# Question
Title: Paypal Standard return update not completing
Joomla 3.5.1 CiviCRM 4.7.7 Contribution Page setup with Paypal as payment processor. Page completes, Payment completes in Paypal. Paypal sends confirmation Email. Paypal shows IPN record. Shows status of 200 (OK?) Contribution payment is not updated to completed, membership remains in pending (as expected) and no email from CiviCRM goes out to member. If I add and use the paylater option the email from CiviCRM goes out to the member. First noticed this in March April time frame with an event.

In joomla looking at most recent log in ConfigAndLog under Media/civicrm

```
msg > We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.

#1 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(833): CRM_Core_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...")
#2 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(853): CRM_Core_Controller->invalidKeyCommon()
#3 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/Controller/Contribution.php(74): CRM_Core_Controller->invalidKeyRedirect()
#4 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(312): CRM_Contribute_Controller_Contribution->invalidKey()
#5 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(204): CRM_Core_Controller->key("CRM_Contribute_Controller_Contribution", TRUE, FALSE)
#6 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/Controller/Contribution.php(55): CRM_Core_Controller->__construct("CiviContribute", "null")
#7 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(307): CRM_Contribute_Controller_Contribution->__construct("CiviContribute", TRUE, "null", NULL, "false")
#8 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
#9 /home/isfptaadm/domains/isfpta.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#10 /home/isfptaadm/domains/isfpta.org/public_html/components/com_civicrm/civicrm.php(90): CRM_Core_Invoke::invoke((Array:3))
#11 /home/isfptaadm/domains/isfpta.org/public_html/components/com_civicrm/civicrm.php(11): civicrm_invoke()
#12 /home/isfptaadm/domains/isfpta.org/public_html/libraries/cms/component/helper.php(405): require_once("/home/isfptaadm/domains/isfpta.org/public_html/components/com_civicrm/civicrm...")
#13 /home/isfptaadm/domains/isfpta.org/public_html/libraries/cms/component/helper.php(380): JComponentHelper::executeComponent("/home/isfptaadm/domains/isfpta.org/public_html/components/com_civicrm/civicrm...")
#14 /home/isfptaadm/domains/isfpta.org/public_html/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com_civicrm")
#15 /home/isfptaadm/domains/isfpta.org/public_html/libraries/cms/application/site.php(230): JApplicationSite->dispatch()
#16 /home/isfptaadm/domains/isfpta.org/public_html/libraries/cms/application/cms.php(257): JApplicationSite->doExecute()
#17 /home/isfptaadm/domains/isfpta.org/public_html/index.php(49): JApplicationCms->execute()
#18 {main}

```

# Answer
> 1 votes
If PayPal is saying the IPN went through correctly, it's worth checking to see what the URL PayPal is using for the IPN. Does it match what you're expecting? Can you find your Apache (or nginx) web server logs and correlate them with PayPal? Are they also showing a 200? Or perhaps a redirect of some sort?

---
Tags: contributions, ipn
---


# Question
Title: Totals Row for Tab with Table Custom Data
I have some custom data in a "tab with tables" style. One of the fields is an integer type. I'd like to add a summary at the bottom of the table with totals for this field. Is that possible to do? Any pointers to what hook to use or how I can build it?

# Answer
> 2 votes
Personally I'd do it by adding some javascript code to the page, and just use jQuery to add the totals row.

A super-quick way to do this would be to place the code inside `{literal}<script>` tags in a `.tpl.extra` file.

---
Tags: custom-fields
---


# Question
Title: Multiple contact (sub)types for an individual
I am new to CiviCRM and I am wondering what would be best practice regarding the use of contact (sub)types in our organization.

The situation is following: Type of business: coaching and training.

We provide coaching to clients(contacts) so we assign one or more Coaches to a client at the start of a coaching period. This coach(or coaches) could be an in-house coach or he/she could be external. However, coaches could also be qualified trainers in certain areas of expertise. Trainers can offer workshops/courses/trainings to clients but also to coaches and other trainers.

Is it good practice to assign multiple contact sub-types to individuals who are qualified as a coach and trainer and possibly as supervisor as well? Or would a different approach be a better solution?

Many thanks!

# Answer
> 7 votes
As long as I know it's a good practice to use multiple subtypes in the same contact.

Doing that you can, for example, create different custom fields for each subtype. So your coaches who are also trainers will have the fields for being coaches and in addition the fields for being trainers.

And if in the future, one of your coaches became a traier, you can add him the subtype and automatically will appear the custom fields for it.

So I will recommend it. :)

# Answer
> 3 votes
It will mostly work, however, you are on less travelled paths, so you might bump into issues on some "out of the ordinary" actions. For instance, imports or profiles assume(d) a single contact subtype per contact, so you might end up removing subtypes.

I'd suggest you to test creating a few contacts that have several subtypes and try to export import, see if everything works fine.

More generally, are you going to have custom fields for each of these types? do you need to create specific relationships limited to relations between some subtypes?

If not, it might be easier to stick to groups (or mix with tags), these are much more often used (and battlefield tested) and you won't have any problem having a contact with several groups (or tags)

# Answer
> -3 votes
UPDATE: What I wrote below is incorrect - I was not up to date (see comments)

Subtypes can be a great way to structure your data. There are however some limitations that you should know about:

* Each contact (person or organisation) can only be one subtype
* Subtypes cannot be changed later on

This means that if for example a coach is likely to become a supervisor or trainer at some point I would recommend using custom fields/field sets and groups, tags etc. to structure your information and NOT subtypes.

If you use subtypes you would need to create one contact for each subtype which is most likely not what you want.

---
Tags: contacts, sub-types
---


title: API Import extension

text:
# Question
Title: API Import extension
I need to load about 300 pledges from a spreadsheet. The best solution seems to be the API Loader but it is listed as 4.4 we are on 4.6 going to 4.7. Can we get the extension tested for 4.6 and 4.7

# Answer
> 1 votes
If by get the extension tested you mean someone else doing it for you, unless you have an incentive (eg. budget), unlikely to happen, at least at the speed you'd like.

If it's about you or someone in your team testing: please do so!

If you are familiar with git, I would suggest you to install the extension using it, it will be easier if you have to modify something, but otherwise, you can just download the zip and put it in your extension folder.

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

---
Tags: civicontribute
---


# Question
Title: why are non admin users having fatal error when accessing CiviCRM and dashboard doesn't load?
I have started experiencing some problems with non admin users, i get Fatal error on the logs when non admin users access civicrm example.com/civicrm and dashboard doesn't load for these users.

Admin users do not have this problem and dashboard loads correctly.

> \[info\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> handle )

```
[code] => 0
[message] =>
[mode] => 16
[debug_info] =>
[type] => PEAR_Error
[user_info] =>
[to_string] => [pear_error: message="" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]

[info] $backTrace = #0 ../sites/all/modules/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
#2 ../sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
#3 ../sites/all/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("", 0, 16, (Array:2), NULL)
#4 ../sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR->raiseError("", 0)
#5 ../sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("ssl://www.excample.com", 443, NULL, NULL, NULL)
#6 ../sites/all/modules/civicrm/CRM/Utils/System.php(1393): HTTP_Request->sendRequest()
#7 ../sites/all/modules/civicrm/CRM/Core/BAO/Dashboard.php(326): CRM_Utils_System::getServerResponse("https://www.excample.com/civicrm/d$
#8 ../sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(606): CRM_Core_BAO_Dashboard::getDashletInfo(5)
#9 [internal function](): CRM_Contact_Page_AJAX::dashboard()
#10 ../sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
#11 ../sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
#12 ../sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))

```

)

I have taken a look at the following posts and seems to not solve my problem as this fatal error only comes from non admin users. SSL enabled CiviCRM with forever loading dashlets?,

The dashboard does not render

CiviCRM V4.6.10, Drupal 7, PHP 5.6.14-1

# Answer
> 1 votes
This has now been resolved by disabling the CiviCRM news dashlet for the affected users. It seems the error message started when i disabled the community messages on the home dashboard in the civicrm settings file ($civicrm\_setting\['CiviCRM Preferences'\]\['communityMessagesUrl'\] = false;) and started getting the fatal error from those users who had the dashlet enabled. Thank you @Jon for the hint, your sql statement helped me track down the problem.

# Answer
> 1 votes
Based on this line:

```
#8 ../sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(606): CRM_Core_BAO_Dashboard::getDashletInfo(5)

```

I can see that the error is to do with dashlet number 5. Since CiviCRM generally ships with 6 dashboards pre-built, that means that what *I* see as dashlet 5 in the database is the same as you. So I ran:

```
mysql> SELECT id, name, label, permission FROM civicrm_dashboard WHERE id = 5;
+----+----------+-----------+---------------------------------+
| id | name     | label     | permission                      |
+----+----------+-----------+---------------------------------+
|  5 | allCases | All Cases | access all cases and activities |
+----+----------+-----------+---------------------------------+

```

So my guess here is that you have this dashlet, but CiviCase may not be enabled.

Check your Drupal permissions to make sure your users have the "access all cases and activities" permission. If you're not using CiviCase, remove this dashlet from user's dashboards with this SQL command:

```
DELETE FROM civicrm_dashboard_contact WHERE dashboard_id = 5;

```

Also - if CiviCase is disabled, you may be able to temporarily enable it to modify the permissions appropriately.

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


# Question
Title: SOLVED - Cron autorun config help please
I had tried the starter pack and ran into a bunch of problems with it. It was already set up to make cron run automatically. After scrapping the starter pack and just installing Drupal 7 and then CiviCRM, cron doesn't run automatically and I can't find any documentation that makes any sense to a non-unix admin like me for creating some type of configuration or modifying a config file to make this happen. Can someone please point me to instructions that are fairly easy to understand? Gracias.

# Answer
> 1 votes
I'm afraid setting up cron is a bit technical. Perhaps your hosting company could help you get started?

You can find full instructions here: Managing Scheduled Jobs

# Answer
> 0 votes
You can also try Easycron. There is a tiny cost but works quite well with Civicrm https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-civicrm

---
Tags: cron
---


# Question
Title: What are ways to make CiviCRM more user-friendly for people who prefer spreadsheets?
Like many other organizations, I suspect, I work with great, dedicated organizers and other staff who prefer the relative speed and simplicity of creating and updating contact lists in spreadsheets rather than in CiviCRM.

A constant challenge is 'selling' users on the many reasons to use CiviCRM rather than creating a contact list in a spreadsheet, which I then must import. Requiring the use of CiviCRM is easy to say but, depending on the culture of an organization, sometimes difficult to do.

So: what are ways CiviCRM admins and users have used to coach/encourage such spreadsheet-preferring users to use CiviCRM?

One way that I will be promoting is using a Search View (based on a Profile) in Advanced Search with a Group previously created - this gives a 'spreadsheet-like' interface.

Thoughts appreciated!

# Answer
We end up building a lot of Views - and would love to be able to improve EditableViews so that it works more like a spreadsheet which will require ensuring that Labels rather than Values are displayed
> 5 votes

# Answer
With a lot of organizations I've worked with, the folks who want spreadsheets are often less comfortable with computers - but are often quite comfortable with a phone or even an iPad.

It feels counterintuitive to me to get "real" work done on a tablet - but for many folks, this is a killer feature. In many situations, CiviCRM can help make a lot of field workers' jobs more paperless - which means less time typing up attendance sheets into a spreadsheet.
> 3 votes

# Answer
There is a "slickgrid" integration module developed by Eileen, which allows spreadsheet-like data entry for CiviCRM:

https://github.com/eileenmcnaughton/nz.co.fuzion.slickgrid
> 3 votes

---
Tags: user, user-experience, user-interface
---


# Question
Title: Upgrading to 4.7.7 gives Error "The website encountered an unexpected error. Please try again later."
I am trying to upgrade from 4.6.16 to 4.7.7, although the upgrading process completes, and drupal site works perfectly fine, as soon as I go to civicrm URL i receive this error message. This happened when I tried to upgrade to 4.7.0 too.

`Error: The website encountered an unexpected error. Please try again later.`

I have followed upgrade instruction perfectly, all file permission is fine. Anyone knows where the problem may be?

**Update: Log from civicrm**

```
Feb 04 08:57:46  [info] $Fatal Error Details = Array
(
    [message] => Your database is not configured for version 4.7.1
    [code] =>
)

Feb 04 08:57:46  [info] $backTrace = #0 /www/demo/sites/all/modules/civicrm/CRM/Core/Error.php(366): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(191): CRM_Core_Error::fatal("Your database is not configured for version 4.7.1")
#2 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(81): CRM_Upgrade_Page_Upgrade->runFinish()
#3 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#4 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#5 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
#6 /www/demo/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:2))
#7 [internal function](): civicrm_invoke("upgrade")
#8 /www/demo/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:1))
#9 /www/demo/index.php(21): menu_execute_active_handler()
#10 {main}

```

UPDATE 2: Log when visited the upgrade url after the error message. Now i have Tried with 4.7.7, but still no luck.

```
 backTrace

#0 /www/demo/sites/all/modules/civicrm/CRM/Core/Error.php(367): CRM_Core_Error::backtrace()
#1 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(98): CRM_Core_Error::fatal("Your database has already been upgraded to CiviCRM 4.7.7")
#2 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(73): CRM_Upgrade_Page_Upgrade->runIntro()
#3 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#4 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#5 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
#6 /www/demo/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:2))
#7 [internal function](): civicrm_invoke("upgrade")
#8 /www/demo/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:1))
#9 /www/demo/index.php(21): menu_execute_active_handler()
#10 {main}

```

PHP Error message is quiet large one so its on pastebin http://pastebin.com/wTZyNEf6

# Answer
Looks like I had couple of conflicting extensions that were causing the problem. one is UK Postcode look up and other is CiviRules. Once that is uninstalled, upgrade went smoothly.
> 1 votes

# Answer
This looks like step 11 failed. What happens when you visit: * Point your web browser to the following URL (you should already be logged in to Drupal with administrator-level permissions):

```
*- If "clean URLs" are enabled
http://<your_drupal_home>/civicrm/upgrade?reset=1

*- If "clean URLs" are NOT enabled
http://<your_drupal_home>/?q=civicrm/upgrade&reset=1

```

Do you see errors after this?

(Sorry, I mixed posts in my head and missed the Drupal piece. First version was for WordPress.)
> 2 votes

---
Tags: upgrade, error
---