# Question
Title: Has anyone successfully setup Mandrill with CiviMail for bulk?
In the past (v. 4.5.x) I tested CiviMail for bulk mailings and had lots of trouble process bounces via the return channel. I know there is a wonderful plugin for transactional emails, but for bulk mailing, Mandrill is very reasonable and provides some great complimentary reports. I expect it *should* work with Mandrill's SMTP functionality directly.

**So before I dive in, I'm simply asking if anyone has gotten this to work and if so, could you please share your config.**

# Answer
I've been doing some testing with the last release of the Mandrill Emails Extension and it's looking pretty quick and simple with the new version to do both transactional and bulk mailing (CiviMail) through Mandrill. Basically you install it, plug in your Login/API credentials (**Administer \> System Settings \> Mandrill Smtp Settings**), and indicate one or both of the types of email you'd like to use Mandrill for: .

To get the report backs on bounces and the like, you use the "Mandrill Post to URL" on that screen to set up a Webhook in your Mandrill account and get notifications for all events except a message being sent:

In the little testing I've been able to do, it seems pretty much plug-and-play in terms of the bounce reporting getting back into CiviCRM.

The updated README is quite thorough, too.
> 4 votes

# Answer
There were a lot of people at CiviCon Denver at the dev ops session using Mandrill for bulk email. I'm not one of them so don't have a config to share, but can confirm that some very experienced providers use it. It was more popular than CiviSMTP or Amazon SES. The only one I recall specifically is CiviDesk, who praised the ability to use sub accounts to track their clients' usage separately. Shoot them an email perhaps?
> 1 votes

# Answer
Have you tried this new extension? https://civicrm.org/extensions/mandrill-email

I tested it. Mandrill processes the bounced emails but Civicrm doesn't pick it up. I might have a settings wrong or missing. Let us know if you find something.
> 0 votes

---
Tags: civimail, integration, smtp, mandrill
---


# Question
Title: How can I tell what the query that is executing when I do an Advanced Search looks like?
When I perform an advanced search I would like to see the query that is created based on the criteria I have chosen in the Advanced Search. Is there a way to see the query that is created?

# Answer
In `civicrm.settings.php`, you can enable:

```
define('CIVICRM_DEBUG_LOG_QUERY', 1);

```

Then run the "Advanced Search" and look at the output in `files/civicrm/ConfigAndLog/CiviCRM*log*`. This will output for several queries; to avoid accumulation of junk data, you should probably disable the `CIVICRM_DEBUG_LOG_QUERY` after running the query.

There's some more discussion of this and other debugging techniques at http://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers
> 6 votes

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


# Question
Title: "Loading Failed" when soft crediting to a Personal Campaign Page
I get a message indicating "Loading failed" when trying to credit a donation to a specific personal campaign page. I can successfully Soft Credit to the owner of the page and add "personal campaign page" as the type, but this isn't the same as crediting to a specific pcp. I was able to recreate this on the demo site - see attached.

Any ideas why in one pop up edit screen one auto fill box works but not the other? I got as far as Contribute \> Form \> PCP.js.tpl but was out of my depth trying to figure out what was wrong.

# Answer
> 1 votes
You're right there was a javascript conflict affecting popup forms on the contribution search page. I've submitted a fix which will show up on the demo site tomorrow and in the next release (4.6.5).

For now, you can work around the problem by right-clicking the "edit" link from the search results screen and opening it in a new tab instead of a popup.

---
Tags: civicontribute, contributions, pcp, personal-campaign-pages
---


title: New codebase version detected

text:
# Question
Title: New codebase version detected
I've installed CiviCRM 4.6.4 on my WordPress site. But on admin.php page, I get a message box warning me that "New codebase version detected. You might want to visit upgrade screen to upgrade the database."

I visit the upgrade screen which invites me to "Use this utility to upgrade your CiviCRM database from 4.4.6 to 4.6.4."

Doing this produces a series of error messages and corrupts the database:

```
[Error: Migrate honoree information to module_data]
Error Field Error Value
Type    DB_Error
Code    -1
Message DB Error: unknown error
Mode    16
UserInfo    ALTER TABLE `civicrm_uf_join` ADD COLUMN `module_data` longtext COMMENT 'Json serialized array of data used by the ufjoin.module' [nativecode=1060 ** Duplicate column name 'module_data']
DebugInfo   ALTER TABLE `civicrm_uf_join` ADD COLUMN `module_data` longtext COMMENT 'Json serialized array of data used by the ufjoin.module' [nativecode=1060 ** Duplicate column name 'module_data']
PEAR_Exception: DB Error: unknown error in unknown on line unknown
- DB_Error: DB Error: unknown error in unknown on line unknown

```

Exception trace

```
#   Function    Location
0   CRM_Core_Error::exceptionHandler(Object(DB_Error))  unknown:unknown
1   call_user_func(Array, Object(DB_Error)) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:931
2   PEAR_Error->PEAR_Error('DB Error: unknow…', -1, 16, Array, 'ALTER TABLE `civ…') /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB.php:976
3   DB_Error->DB_Error(-1, 16, Array, 'ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:564
4   PEAR->raiseError(null, -1, null, null, 'ALTER TABLE `civ…', 'DB_Error', true)   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1905
5   DB_common->raiseError(-1, null, null, null, '1060 ** Duplicat…')    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:899
6   DB_mysql->mysqlRaiseError() /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:328
7   DB_mysql->simpleQuery('ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1216
8   DB_common->query('ALTER TABLE `civ…')   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:2442
9   DB_DataObject->_query('ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:1634
10  DB_DataObject->query('ALTER TABLE `civ…')   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:325
11  CRM_Core_DAO->query('ALTER TABLE `civ…', true)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1179
12  CRM_Core_DAO::executeQuery('ALTER TABLE `civ…') /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/php/FourFive.php:265
13  CRM_Upgrade_Incremental_php_FourFive::migrateHonoreeInfo(Object(CRM_Queue_TaskContext)) unknown:unknown
14  call_user_func_array(Array, Array)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php:88
15  CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php:213
16  CRM_Queue_Runner->runNext(true) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
17  CRM_Queue_Page_AJAX::{closure}()    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
18  CRM_Queue_ErrorPolicy->call(Object(Closure))    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
19  CRM_Queue_Page_AJAX::runNext()  unknown:unknown
20  call_user_func(Array)   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:278
21  CRM_Core_Invoke::runItem(Array) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:86
22  CRM_Core_Invoke::_invoke(Array) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:54
23  CRM_Core_Invoke::invoke(Array)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm.php:1189
24  CiviCRM_For_WordPress->invoke('')   unknown:unknown
25  call_user_func_array(Array, Array)  /home/coventry/public_html/wpsite/wp-includes/plugin.php:496
26  do_action('toplevel_page_Ci…')  /home/coventry/public_html/wpsite/wp-admin/admin.php:226
27  {main}

```

Can anyone point me in the direction of working out what's going on?

Many thanks,

David

# Answer
**On a fresh install, this should not be required.** The reply below is suitable for a site which is seeing this error during an expected upgrade.

---

In `CRM/Upgrade/Incremental/php/FourFive.php` (or an included .sql file from there) is an instruction to add a new column to `civicrm_uf_join`

Your DB already contains this column, so CiviCRM runs into trouble when it tries to add it again.

Go back to as pristine a copy of the 4.4 DB as you can, and ensure that column (`civicrm_uf_join.module_data`) does not exist, removing it if it does. Then, re-run the upgrader.

Running upgrades twice on a DB will lead to these sorts of errors, but sometimes applying a patch on a site before upgrade will mean that your DB changes are already applied and need to be eliminated from the following upgrade.
> 3 votes

# Answer
Since this is a brand-new install, there is no need to run upgrades, and attempting to upgrade a 4.6.4 site as if it were 4.4.6 is going to cause errors as you observed.

You could fix this by editing your civicrm\_domain sql table to contain the correct version number (look for "4.4.6" and change it to 4.6.4").

As for what caused the problem, it's a mystery to me.
> 1 votes

---
Tags: wordpress, upgrade
---


# Question
Title: Can I get a notification emailed to me every time a contact with a certain tag is updated?
Our team would like to be notified any time a certain group of contacts are updated. Ideally this notification would contain the most current version of the contact profile, as well as the previous version of the profile so that our team can compare the old information with the updated fields. Is such an automated notification possible? Is there a way we could do this with a scheduled report?

# Answer
> 3 votes
I think meeting all these requirements would involve custom code. Some possible approaches to meet some of the requirements...

(1) In Advanced Search, search for contacts with the relevant tag and under Change Log, modified date yesterday. Save as a smart group. Then set up a Constituent Detail report filtered by this smart group. Have it emailed daily. This will not give you the contacts' previous data.

(2) Enable logging, at Administer -\> System Settings -\> Misc. Use the Contact Logging Report. This does not allow filtering by tag. However this feature could be added, with code customisation.

(3) A custom solution using the civicrm\_pre hook to provide real-time notification of changes. This could include before-and-after values.

(4) A custom solution running under cron, using Civi logging to check for changes and retrieve previous values.

# Answer
> 1 votes
I guess you could use mix of civirules & civi email API extension from here https://github.com/CiviCooP/org.civicoop.civirules and https://github.com/CiviCooP/org.civicoop.emailapi

may need some extra programming work on them, i guess.

---
Tags: civireport, activities
---


# Question
Title: Is it possible to define an activity status to be the equivalent of completed?
Specifically in the UI, activities that are past their date show as red unless their status is completed. I have a few use cases where it would be preferable for the final state of the activity to be a status like 'accepted' or 'denied'. I have not found in place where it is possible to set the status level as equal to Completed, so I am assuming that you would have to either do it with some type of extension or custom code?

# Answer
> 1 votes
The status of an Activity is where it stands on its path from creation to completion (started, in process, awaiting xyz, etc, etc, completed).

In this flow, 'accepted' and 'denied' aren't statuses, because they don't tell us what the next action is (or if there will be another action). We should think of these as outcomes. Assuming the activity is a proposal or similar, what about creating a custom field called Result or Outcome, with 'accepted' or 'denied' as the available options?

# Answer
> 0 votes
As you likely know, you can create custom activity statuses at /civicrm/admin/options?gid=26&reset=1 After adding the two new statuses, I would filter to exclude them from the upcoming Activities Report by going to filter tab on /civicrm/report/instance/3?reset=1 .

---
Tags: activities
---


title: Search contacts with attachments

text:
# Question
Title: Search contacts with attachments
I want to search for all contacts that have an attachment. How do I do this? I have looked under custom and advance searches. as well as searched all help documents for an answer.

# Answer
I figured out how to create a custom search using 'search builder' and it has an option to search for attachments in the drop down.

Issue resolved
> 4 votes

# Answer
That is not possible in the user interface strangely enough as far as I know :-( You can have a look in the tables if you are familiar with the database? The attachment location will be in table civicrm\_file, and the link to the activity will be in table civicrm\_enity\_file. So getting the activities with attachments will be something like:

```
SELECT * FROM civicrm_entity_file WHERE entity_table='civicrm_activity'

```
> 0 votes

---
Tags: search
---


# Question
Title: Uncaught CRM Core_Exception Transaction/Manager.php
```
Joomla 3.4.3
CiviCRM 4.6.4
Apache/2.4.12 (Unix)
5.5.43-MariaDB
PHP 5.4.41

```

Attempt to quickedit existing entry and get "Network Error -- Unable to reach the server. Please refresh this page in your browser and try again."

Attempt standard edit and get "Sorry but we are not able to provide this at the moment -- DB Error unknown error"

Web server error log shows: "PHP Fatal error: Uncaught CRM\_Core\_Exception: \[0: Transaction integrity error: Expected to find active frame\n\n thrown in /var/www/htdocs/beast/administrator/components/com\_civicrm/civicrm/Civi/Core/Transaction/Manager.php on line 107"

No other errors show. Have tried purge cache, Firefox, Chrome, and IE. This problem did not exist with civicrm-4.5.6-joomla.

What should I look for?

# Answer
SOLVED: It was a mariadb error on mysql.proc. mysql\_upgrade neither ran nor threw an error. Aftert mysql\_upgrade, all seems well!
> 4 votes

---
Tags: joomla, php
---


# Question
Title: Is there any way I can know from which page I came from?
I am working on a CiviCRM plugin that will act as a unified solution for social media login.

Once someone clicks the Login button which this plugin adds (eg to an event page), he or she is redirected to a new page for further data exchange (eg login on Twitter, Google+ etc).

Is there a way I can get to know from which the button was clicked?

One way is to store the same while clicking the button or send it to the new page as a GET or POST variable. I just wanted to check if we already storing/getting it up somewhere in CiviCRM.

# Answer
> 1 votes
This sounds similar to a payment processor flow (especially the "button" style processors). In those, you typically pass a "return URL" to the remote site, and they would in turn direct your visitor back to the specified URL.

If the return URL needs to be a separate callback (eg an IPN URL), then you might add additional parameters (`&return=civicrm%2Fevent%3Fid%3D1%26reset%3D1`) to the IPN URL, and the IPN can in turn decode that (`civicrm/event?id=1&reset=1`) and perform a final redirect to land the user on the page they originated from.

# Answer
> 1 votes
Can you use the superglobal? That is, `$_SERVER['HTTP_REFERER']`?

---
Tags: extension, gsoc
---


# Question
Title: Profiles - Pre Field and Post Field Help
I'm working in with civi 4.6.4 in Wordpress, I used to be a Joomla user with a out of date civi and of course there are some changes to how profile fields render.

Previously all the content, pre field help, profile fields and post field help were in one div. Now they are broken into three separate divs, which is totally fine, I can see the advantages!! But the pre-field help and post field help have the same class and id, which is less than helpful. I can not target them separately (i.e. with css or javascript). Would it be too much to ask these be given separate ids in the future? Or has anyone come up with a way to target them separately without having to add code in with the whatever instructions you type?

# Answer
The pre- and post- field help areas will have identifying CSS classes from CiviCRM 4.7.

This was the issue: https://issues.civicrm.org/jira/browse/CRM-16328

And here's the patch / PR if you want to apply it to your current version of CiviCRM: https://github.com/civicrm/civicrm-core/pull/5667
> 2 votes

---
Tags: civievent, profile, custom-fields
---


# Question
Title: Cron job fatal error - scheduled emails won't send. AddThis 5.0.7 issue
I updated AddThis for Wordpress 4.0.7 to AddThis Sharing Buttons 5.0.7 and scheduled emails stopped sending. I determined that the cron job was getting a fatal error.

Job path - "https://www.xxxxxx.org/wordpress/wp-content/plugins/civicrm/civicrm/bin/cron.php

**Fatal error**: Call to a member function getConfigs() on a non-object in **/home/xxxxxx/public\_html/wordpress/wp-content/plugins/addthis/addthis\_addjs\_new.php** on line **57**

Here is a snip from the file that caused the error:

```
    // We haven't added our JS yet. Or at least better not have.
    $this->_js_added = false;

LINE 57:       $this->_options = $addThisConfigs->getConfigs();

    // Version of AddThis code to use
    $this->atversion = $this->_options['atversion'];

```

The cron job was referencing a file in our AddThis plugin folder. It seems to me that file and plugin should have nothing to do with sending email from CiviCRM. I am not well versed in how cron jobs work, so any information you can provide would be appreciated. The day that this plugin was updated to the latest version 5.0.7, which included the file shown in the fatal error above, is the day scheduled jobs stopped sending and the cron job started erroring out. I deleted the updated plugin and reinstalled 4.0.7, the known good version, which did not contain that file. Scheduled emails now send.

# Answer
> 2 votes
I have seen this error before with this plugin. The CiviCRM cron job will fail if while bootstrapping WP a fatal error is encountered.

My only workaround (besides removing the plugin as you did), is to launch the cron job via wp-cli. See http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs and the section on wp-cli. In this case the flag --skip-plugins can be used to stop the addthis plugin from loading.

---
Tags: wordpress, email, cron-job, scheduling
---


# Question
Title: How do I exclude the "click here" from mail header on the generated web page?
Mail sends out with a header that contains **click here to view online** and links to http://www.example.com/civicrm/mailing/view?reset=1&id=77

Within their email client, the link takes them to the appropriate page, however that page includes **click here to view online** which links to http://www.example.com/civicrm/mailing/%22http://www.example.com/civicrm/mailing/view?reset=1&id=77%22.

This incorrect links takes them to a CiviMail search page.

Preferably, I'd like to hide the header and the footer from the generated web page rather than correct the url, but I'd be happy either way.

# Answer
> 2 votes
Try wrapping those items in `<span class="hiddenElement"> </span>`. Civi's css will hide it on your website, but email clients will not.

---
Tags: civimail
---


# Question
Title: How can I send a cc: of an Activity assignment e-mail to another user, as an FYI?
When adding new assigned and scheduled (or completed) Activities, I want to be able to send a cc: of the Activity assignment e-mail to another user, to whom the Activity is not assigned, as well as sending the default e-mail to the assigned user. Is there a way to do this?

# Answer
> 4 votes
Functionally I am always confused about FYI mail. What is it supposed to do? As a receiver I am not supposed to do anything but I am supposed to read it just in case? I tend to just delete them if I can not identify any action, and I also tend to say so.

I assume you want to send the FYI email to a certain relationship contact (manager or something like that) and you have set up the relations in such a way?

If that is the case you might have a play with the CiviRules extension (read the blog at https://civicrm.org/blogs/erikhommel/extension-civirules-now-avaible-download-live-showcase-maf-norge for some background).

CiviRules allows you to setup specific actions (like sending a mail) based on a trigger (activity changed for example) checked against certain conditions (activity type is send email).

You will also need the Send Email API extension, can be found here https://civicrm.org/extensions/e-mail-api. I think this can help you to set up what you want, although you might have to develop (or get someone to develop for you) an additional condition.

---
Tags: civimail, activities
---


# Question
Title: Why would my CiviCRM CSS file not load correctly?
I'm having trouble with my CiviCRM CSS file not loading correctly -- the admin bar becomes a bulleted list of plain text.

Any suggestions?

# Answer
I would guess it is likely an issue with domain name and/or HTTPS conflicts. In your `civicrm.settings.php` file you define a `CIVICRM_UF_BASEURL` which may or may not include the `www` or `https://` on the domain name. For example, it could be:

So my recommendation is to make sure that you forward the other 3 versions to the version you would like to use throughout the site. Then you may want to double check that the URLs set up in the CiviCRM Resource URLs page match (**Administer \> System Settings \> Resource URLs**).
> 5 votes

# Answer
it seems like my main problem was running the site in dev mode (no page cacheing).

I turned on page cache for anon users and also aggregate and compress .js and .css files (/admin/config/development/performance) and my overall site performance has increased dramatically and also seems to have resolved my .css errors.

One tool that helped me tremendously was using firebug to analyze page load times and errors.
> 1 votes

---
Tags: css, resource-urls
---


# Question
Title: How can I prevent spam bots from making submissions to CiviCRM?
I ALREADY had reCaptcha enabled in Civi and on my Profile type, but it seems that spam bots were still making submissions to CiviCRM and creating contacts (and got assigned to a group).

I only recently caught it because I turned on role synching between civi and drupal and saw spam accounts popping up assigned a role other than "authenticated".

After going back through the particular group in question (in civi), I noticed that there were contacts that had Civi IDs but not Drupal (I'm assuming submissions before I turned on role syncing. I didn't load sample data when I installed civi)

I'm not even sure what the URL would be for the form where bots could create a contact record...

# Answer
> 2 votes
If you have a CiviCRM profile assigned to "Drupal User Registration" (as "Name and Address" is by default, I believe), then spam bots that apply for an account on Drupal will also be inserting fields from that profile into their associated CiviCRM contacts.

If you aren't using the account functionality you can turn it off in Drupal (**admin/config/people/accounts**) by allowing *Admin only* account creation. Otherwise you can look into Drupal-specific spam blocking modules such as Honeypot.

There are also some CiviCRM-specific fraud prevention suggestions that may be of interest to you.

**Update:** a recent extension that relates is Form Protection, which "Provides various ways of protecting forms from spam/bots including Honeypot, Flood control, ReCAPTCHA v2 and v3."

---
Tags: contacts, duplicate-contacts, spam
---


# Question
Title: Is there a way to search/export potential duplicates?
I'm about to run dedupe (**Contacts \> Find and Merge Duplicate Contacts**) and I was wondering if there is a way to put all potential duplicates from a certain rule into a group so I could export them as a backup before I start merging.

For example, I was hoping the Advanced Search page would have a field to search by dedupe rule but I don't see that type of option. Am I missing it, or is there another way?

# Answer
There is no direct way that I am aware of, but you can call the dedupe function in the BAO from an extension?
> 1 votes

---
Tags: groups, search, export, duplicate-contacts
---


title: Authorize.net auto email receipts

text:
# Question
Title: Authorize.net auto email receipts
I am using authorize.net as a payment processor. They have automatic receipt emails that go out after a contact makes a contribution. I have disabled them from going out on my account, but they are still going out. They said it was on the Civi side and something was over-riding that setting. Does anyone know how to fix this?

# Answer
I've never had a problem with Authorize.Net receipts going out when I've disabled the appropriate setting in Authorize.Net. I don't have a valid Authorize.Net login to find the exact setting now, but I can confirm that I've seen the behavior you expect on multiple sites.
> 1 votes

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


# Question
Title: Paypal recurring payments failed after merging the contact. How to fix?
2 contacts were crated for the same person due to some typo of the donor while given donation online. one of the contact record had a recurring payment setup. I have merged them both using the menu. But i think i have merged the wrong way around. now paypal is not able to process the payment because there is no contact record by ID 1212 (it was deleted permanently, not available in trash).

Newer contact record ID is 1313. is there a way to change the ID of this new one to 1212 so the payment gets processed?

This is from civi log

```
Jul 04 14:04:05  [info] $POST = Array
(
    [payment_cycle] => Monthly
    [txn_type] => recurring_payment_skipped
    [last_name] => Entc
    [next_payment_date] => 03:00:00 Jul 09, 2015 PDT
    [residence_country] => GB
    [initial_payment_amount] => 0.00
    [rp_invoice_id] => i=e45c4d0dad9c6a9a0693799f8c99d38f&m=contribute&c=1212&r=4&b=17212&p=6
    [currency_code] => GBP
....)

    Jul 04 14:04:05  [info] Could not find contact record: 1212 in IPN request: Array
    (
        [component] => contribute
        [invoice] => e45c4d0dad9c6a9a0693799f8c99d38f
        [txnType] => recurring_payment_skipped
        [paymentStatus] =>
        [amount] =>
        [reasonCode] =>
        [first_name] => Eli
        [last_name] => Entc
......   )

```

# Answer
> 4 votes
Could you create a new contact with just a first and last name (no address, phone, or anything else that might go in a separate table somewhere) and then change that new contact's ID in the database to 1212? Then you could merge again, making sure to keep the new contact and transfer all of the other information over during the merge. (Try on a copy of the database of course)

# Answer
> 3 votes
Glad you found an answer. An alternative solution would be to log into PayPal - you can change the parameters of a recurring payment IPN manually in Paypal. Note that last I checked, they use some Javascript to limit the length of the field where you can change the URL, and they limit it to less than the full permitted length. When I change the URL manually, I often have to use Firebug/developer tools to edit the value rather than manually type into the field.

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


# Question
Title: CiviMail link to view in browser gets error on mobile
End users received a mailing today, our first one on 4.6.3.

Desktop and laptop clients can follow the link, but tablets and cells get errors that the link can't be opened.

Link appears to add email or inbox before the url on those clients.

Worked up until the current version. No changes to header template.

When you click on the link on Android devices they get:

Webpage not available The webpage at email://18975 might be temporarily down or it may have moved permanently to a new web address. Suggestions: • Make sure you have a data connection • Reload this webpage later • Check the address you entered

On IPhone, the link acts as if nothing's been clicked.

When you click on the link on Windows phone you get: This link can't be open from an email message. Link looks like: **inbox:"correct url"** (with quotes)

Links not in the header template work appropriately.

# Answer
I strongly suspect the reason is because of CRM-16549. Please update to CiviCRM 4.6.4 and try again?
> 1 votes

---
Tags: civimail
---


title: CiviEvent Access Code on price set

text:
# Question
Title: CiviEvent Access Code on price set
Civi 4.6.4 / Drupal 7.38

Goal: Require users to input an access code in order to register for an event.

Use Case: Athletes are encouraged to sign up for events before the registration end date, however, there are often exceptions. We currently use access codes to allow for those exceptions. The athlete must contact the coach, who can then provide the code so the athlete can register. Similar to the approval process within Civi, however less of a burden on the coach (he can manage simply via email) and also easier on athlete as they do not have to request, wait, then register and pay.

Our current solution (outside of civi) implements these codes at the equivalent of a civi price set. This seems a logical place, as it can work cohesively with start/end dates (ie. The code is required and shows up only after a "standard" price set expires.

Before I build, has anybody solved (either in a price-set or in another way within Civi?)

Thanks,

--Ken

# Answer
This is an interesting use case! I can see the advantages over the approval workflow.

If I were asked to do this, I'd probably:

* Create a custom field "approval code" on the event;
* Use hook\_civicrm\_buildForm and jQuery to hide the page except for an approval code submission field;
* When the entered code matches the stored value, show the page.

This isn't completely foolproof if you rely too much on client-side jQuery though.

If you decide to go the price-set route, you might want to use CiviDiscount instead. The "discount" code can be the approval code.
> 3 votes

---
Tags: civievent
---


# Question
Title: Need help understanding contacts hierarchy
I am new to Civi (I started working for a company that is using it). I actually started this question in Civi community and was guided here.

Our company currently uses civi to track our corporate membership. We want to import our clients who are schools and districts, as well. Except we have a concern about how to organize schools and districts (Schools come to us as projects from the district level and it is our end goal to use civicase to monitor our projects).

One of our plans is to import schools as individuals and create a Contact Type properly identifying them as schools and import Districts as companies.

Another suggestion made was importing both as companies and properly identifying the Contact Type in this way (ie, schools, districts, corporate)

A third idea was to import schools as companies and districts as a household. But I am not sure how the relationships will work between these.

As someone new to civi, it is difficult to see the advantages and drawbacks of each option. On top of which, occasionally our projects names are different to the school name and we keep record of both.

Any input or advice would be greatly appreciated!

# Answer
There's no reason not to make all of your entities Organizations (using Contact Subtypes), since that's what they are. CiviCRM doesn't have a built-in "contact hierarchy". The hierarchy is implemented through relationships, and you can define your relationships however you like.

I'd read the documentation on contact subtypes and relationships and see if that helps to answer your question as well.
> 2 votes

# Answer
Further to Jon's response, you must be seeing a reason for not making them both organizations, and setting up a relationship between them.

Given the importance of getting this right, I suggest that you try each of your methods and see what works best for you.

The demos are a good starting place, but you may want to create sandbox instances as the demos get cleared out periodically and you'll lose your work. Another disadvantage of the demos is you can't create additional logins to see how a non-admin user will see the system.
> 2 votes

---
Tags: contacts
---


# Question
Title: How do I change the CiviCRM Database name
When setting up a website with CiviCRM I named the database in a extremely generic format. How can I rename it with breaking Civi? I tried to export the date and import it to a new database with a different name and change the civicrm.settings.php file but that did not work.

Any suggestions would be helpful.

# Answer
This is what works for me but not sure if it is necessary based on the following http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location :

1. Edit civicrm.settings.php with new database info
2. Delete all template files in templates\_c/
3. Make sure there are no references to civicrm database in drupal setttings.php
4. Clear database caches and session tables
> 6 votes

---
Tags: civicrm.settings.php
---


# Question
Title: Drupal View filtered with a custom individual data field
I have a Drupal View that I'm using to display in a directory a list of individuals that are employed by a group of organizations. I saw no way to filter a View based on employer names so I created a select list whereas I simply added as select options the organizations whose employees I wanted to display.

At first I created this list to be used for 'All Contact Types' and it worked fine. I built a Drupal webform so people could edit there own information and that's when I found that the fields did not autopopulate with the current information. I assumed this was because the fields were user for all contact types and not for only individuals. I built a new custom data set that is used only for individuals and tried that. The Drupal webform would then show current information when the user logged in.

I then realized that I could no longer filter the View with the new fields. When I used the old fields that were allowed for all contacts the filtering worked and I had individuals show in my directory, however, when I switched to the newly created fields that were limited to individuals I has no contact show in my directory.

I've also run a preview within the View itself and only get results when using the custom field built for contacts. When using the one built for individuals I get no results. Any thoughts? The query is:

> SELECT DISTINCT civicrm\_contact.id AS id, civicrm\_contact.contact\_type AS civicrm\_contact\_contact\_type, civicrm\_contact.display\_name AS civicrm\_contact\_display\_name, civicrm\_contact.organization\_name AS civicrm\_contact\_organization\_name, civicrm\_contact.job\_title AS civicrm\_contact\_job\_title, civicrm\_email.email AS civicrm\_email\_email, civicrm\_phone.phone AS civicrm\_phone\_phone, civicrm\_contact.sort\_name AS civicrm\_contact\_sort\_name FROM {civicrm\_contact} civicrm\_contact LEFT JOIN {civicrm\_value\_testing\_for\_directory\_25} civicrm\_value\_testing\_for\_directory\_25 ON civicrm\_contact.id = civicrm\_value\_testing\_for\_directory\_25.entity\_id LEFT JOIN {civicrm\_email} civicrm\_email ON civicrm\_contact.id = civicrm\_email.contact\_id AND (civicrm\_email.location\_type\_id = '2' AND civicrm\_email.is\_primary = '1') LEFT JOIN {civicrm\_phone} civicrm\_phone ON civicrm\_contact.id = civicrm\_phone.contact\_id AND (civicrm\_phone.location\_type\_id = '2' AND civicrm\_phone.is\_primary = '1') WHERE (( (civicrm\_value\_testing\_for\_directory\_25.nhp\_org\_191 LIKE '%a%' OR civicrm\_value\_testing\_for\_directory\_25.nhp\_org\_191 LIKE '%b%' ) )) ORDER BY civicrm\_contact\_sort\_name ASC LIMIT 20 OFFSET 0

# Answer
> 2 votes
Drupal Views need to know about table updates when they are using separate databases. When you add a custom field, civicrm creates a new table. To expose the new entity, you must edit the settings.php file with the new field. You can just copy/paste from here: https://example.org/civicrm/admin/setting/uf?reset=1 . Ref: https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/

---
Tags: drupal, drupal-views
---


# Question
Title: Trying to Create Rule to Fire When Someone is Added CiviCRM Group
Using Drupal Rules, I'm trying to create a rule that will fire when someone has been added to a CiviCRM group.

Here is a blog post from petednz which describes how to do this when a tag gets added to a CiviCRM contact.

I'm looking for the same thing but with CiviCRM groups, the choice in the Rules' "React on Event" dropdown would look like "CiviCRM Entity Group has been created" but it's not there.

Is this possible? And if so, how?

And to provide a bit more context, I'm creating a Drupal account for the Contact (If they don't have one) and adding the person to a Drupal Organic Groups group.

Thanks.

# Answer
Check out the new CiviRules extension from ErikH and others to do that - see his answer to my question here
> 2 votes

---
Tags: drupal, drupal-rules
---


# Question
Title: How to show civicrm toolbar in drupal also?
I have created some drupal views for civicrm. But the views pages are opening inside the drupal set up, where the civicrm toolbar is not showing. Now, how can i show the civi toolbar in the drupal? To avoid the switching between drupal and civicrm.

# Answer
To answer your question, I wrote a module:

https://www.drupal.org/project/civimenu

The code snippet I posted below probably wouldn't work because of timing issues (by the time the block was being printed it's too late to add the header). Seemed better to package it up into a module. Enjoy.
> 9 votes

# Answer
I don't think there's an easy way to do what you're describing. However, you CAN add a View to the CiviCRM dashboard, which may give you the same result with less effort: Check it out.
> 2 votes

# Answer
The following php code will do it. If you have the php filter enabled in drupal then you could place this in the header of the view, or in a block. Just make sure to only include this code on screens where the nav menu isn't already!

```
civicrm_initialize();
CRM_Core_Resources::singleton()->addCoreResources();
require_once 'CRM/Core/Smarty/plugins/function.crmNavigationMenu.php';
$params = array();
print smarty_function_crmNavigationMenu($params, $params);

```
> 0 votes

---
Tags: civireport, drupal-views, civicrm-entity
---


# Question
Title: Return after login going through contribution flow doens't bring up contribution page
Going through contribution flow reach point where user needs to log in

> If you would like to create an account on this site, check the box below and enter a Username and a password. If you already have an account please login before completing this form.
>
> Please login is a link that takes one to login and then return to contribution page.

Problem is after logging in the url is

`https://www.isfpta.org/index.php?option=com_civicrm&task=civicrm/contribute/transact&Itemid=1726&reset=1&id=13`

If you pull the amp: out after the & it works. Current versions of Joomla 3.36 and civicrm 4.6.3

# Answer
This may well be a bug. It would be helpful if you could recreate it on demo.civicrm.org. See https://civicrm.org/bug-reporting
> 2 votes

# Answer
I have found the same behaviour/error occurs in Event Registration if user logs in and then is (not) redirected back. See my question: Redirect back to Event Registration after login fails
> 0 votes

---
Tags: joomla, contribution-page
---


# Question
Title: How do you allow a user to add their bulk email address?
Trying to find a way to allow users to indicate which of their email addresses should be used for bulk mailings.

Not seeing an option in profile creation.

# Answer
> 3 votes
I believe bulk email uses whichever address is set to "Primary" if no specific bulk address is specified, and there is an option for primary email in profile creation.

Hope that helps!

---
Tags: profile, email
---


title: auto_increment_increment issue CRM-7923

text:
# Question
Title: auto_increment_increment issue CRM-7923
My activation of CiviCRM WordPress plugin was halted by database error message:

> "An auto\_increment\_increment value greater than 1 is not currently supported. Please see issue CRM-7923 for further details and potential workaround."

Have searched for number string 7923 but without any results. Does anyone here remember this issue or the potential database workarounds so that I can raise a focussed support ticket for my hosting supplier, please? It's one of just three red stripes remaining on the plugin installation screen. (One is a permissions issue, the other is about database triggers and may clear itself if I can resolve the auto\_increment\_increment issue. Otherwise, I've got green lines for the rest, which is good to go.)

# Answer
I have never heard of this before, but did track down the issue for you:

CRM-7923: Installation procedure relies on contiguous auto increment ids

Read the thread more closely to be sure, but from a glance it looks like this command may be needed in your hosting environment:

```
cd sites/all/modules/civicrm/sql
sed -i '1i\SET SESSION auto_increment_increment=1;\nSET SESSION auto_increment_offset=1;' *.mysql

```
> 1 votes

---
Tags: wordpress, database, installation, hosting
---


# Question
Title: Fixing Paypal error - Payment Processor Error message 10002: Security error Security header is not valid
I found the solution to my problem before coming here, but wanted to share it so I'm posting my question first and then going to post the answer I discovered.

I setup Paypal pro for payments using my Paypal sandbox account, but was getting the following error:

Payment Processor Error message 10002: Security error Security header is not valid

See my answer for solution

# Answer
What I discovered with the help of a friend who has lots of experience in CIviCRM is that I had set up the payment processor with the default URL for both LIve and TEst but used the SAndbox credentials only. By putting in the sandbox urls as the live urls. it fixed the problem.
> 4 votes

---
Tags: paypal
---


# Question
Title: Redirect back to Event Registration after login fails
I've implemented user accounts during Event registration by enabling the profile's advanced settings to give the user the option to create a Joomla account.

When a user registers for an event, they are correctly offered the chance to sign-up or login:

> If you would like to create an account on this site, check the box below and enter a Username and a password. If you already have an account please login before completing this form.

The 'login' word above is hotlinked to a page which allows the user to login and then CiviCRM should return the user back to the Event Registration page. It does not - after logging in, the user just gets a blank page.

The reason seems to be that the redirect page is malformed; it is:

```
/index.php?option=com_civicrm&task=civicrm/event/register&reset=1&id=60

```

when it should be:

```
/index.php?option=com_civicrm&task=civicrm/event/register&reset=1&id=60

```

The & concatenators in the URL are being incorrectly escaped. Any ideas how to address this?

# Answer
> 1 votes
Fix proposed here to turn off the cleansing of the redirect URL: https://github.com/civicrm/civicrm-core/pull/6183

# Answer
> 0 votes
As suggested on the question related to Contributions above, I have duplicated this error on the demo site.

I created a profile that gives the option to login and, after logging in, the redirection failed due to this invalid URL: http://joomla.demo.civicrm.org/index.php?option=com\_civicrm&task=civicrm/event/register&reset=1&id=8

I think the problem is in the coding of this link (which is used to redirect the user to login): http://joomla.demo.civicrm.org/index.php?option=com\_users&view=login&return=aHR0cDovL2pvb21sYS5kZW1vLmNpdmljcm0ub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2Npdmljcm0mYW1wO3Rhc2s9Y2l2aWNybS9ldmVudC9yZWdpc3RlciZhbXA7cmVzZXQ9MSZhbXA7aWQ9OA%3D%3D

I am going to raise a bug and will post the link here after.

---
Tags: civievent, joomla, user-account
---


title: Multiple groupings of info on an event

text:
# Question
Title: Multiple groupings of info on an event
It's hard to explain it in a headline, but here is what I am trying to do:

We're trying to move our event process fully into CiviCRM instead of doing part of it in Drupal. I know how to add fields to an event, which takes care of like 75% of our need to add fields. But we run into one problem - we need a group of fields that you can use over and over. That would be the details on the hotel. Typically events have at least a few hotels, up to about 5. In Drupal we can just tell the form that we need to utilize a set of fields multiple times; however, as far as I can see you can only do this with fields for Individuals in CiviCRM.

Hopefully I explained this well enough that you can get what I mean. Looking forward to a way to be able to do this.

Thanks!

# Answer
I would probably make 'Hotels' a contact subtype for Organization, and add a repeating custom group to Event with a custom field of the type 'contact reference'? Does that make sense?
> 2 votes

# Answer
In Civicrm you have an option of creating profile which is a collection of fields. For more reference http://book.civicrm.org/user/current/organising-your-data/profiles/

While Event creation you can find an option called online registration just Enable it and you can find Registration Screen where you have an option of adding multiple profile
> 0 votes

---
Tags: civievent
---


# Question
Title: Is it possible to import "Assigned to" data for Activities?
In the "Import Activities" interface in CiviCRM (version 4.6.3, drupal 7), there are many options for fields to import. One critical field that appears to be missing is the "Assigned to" field (sometimes referred to as the "assignee"). I'd like to know if it's possible to import this field when importing activities.

This matter was discussed 2 years ago, in this forum thread:

http://forum.civicrm.org/index.php?topic=29394.0

> Definition of "Assigned to" from the user guide: "The person (usually within your organisation) that will carry out (or has carried out) the activity."

I'm wondering if any progress has been made on this since that forum thread.

# Answer
> 3 votes
I've used this CiviCRM Extension for just that purpose, however, it looks like it's only be released up to 4.4

Might be worth checking if there is a 4.6 version that's not been released

https://civicrm.org/extensions/api-csv-import-gui

---
Tags: activities, import
---


# Question
Title: Summing up donations on the household level
We have the following problem: If we record a donation on the individual level of a person: Let’s say there is the imaginary Byron Terry-Lee and the spouse is Megan Terry-Lee. Both are members of the household Terry-Lee. Byron Terry-Lee donates 10 $, Megan 20 $ and on the occasion of an anniversary both donate together (as a household) 30 $. I’d like to see on the household level the summed up donation for the household (respectively 60 $). Has anyone an idea how to reach that?

Thank you for looking into it.

Best regards

Esther

# Answer
> 3 votes
This is what you're looking for: https://civicrm.org/extensions/aggregate-household-contributions-report

# Answer
> 1 votes
Use Soft Credits to credit the household with a soft credit when the individual donates.

# Answer
> 0 votes
Based on new information in your comments to Tommy and myself, I think what you're looking for is soft credits in combination with an extension that automatically soft credits a household when a member of the household contributes. I've written an extension that does roughly that, which is available on my Github. That said - this is a VERY rough/unfinished version of what you want, and needs work done before it can be used by a non-technical person - I also don't know if it works with newer versions of CiviCRM (it was written for 4.4).

---
Tags: civicontribute
---


# Question
Title: How do I enter new contact from "New Case" form using a contact subtype?
When I click in the Client field, I can start typing the name of an existing contact or I can click on "New Individual," "New Organization," or "New Household."

However, it doesn't list our "Hotline Caller" Individual sub-type, which is the only option I would like to have listed.

# Answer
> 2 votes
Yes you can.

1. Go to **Administer -\> Customize Data & Screens -\> Profiles**
2. Click to the "Reserved Profiles" tab
3. Find the "New Individual" profile and click "Fields" then "Add Field"
4. Field type "Contact" field name "Contact SubType"
5. Save the field with whatever label, help text, etc. you wish.

You will then be able to specify the contact sub-type on any New Individual popup form.

Note: I just tested this and the resulting field uses a rather ugly multiselect widget. I've just posted a fix for this which will get into the next release.

# Answer
> 1 votes
Re-reading your question, it sounds like you want this process to be more automated. You'd like *all* case clients to become "Hotline caller" contacts. May I suggest you write a little custom code to accomplish this? If you implement hook\_civicrm\_post and then use the api to add that contact type to the client whenever a case is saved, then you won't run the risk of your users forgetting to do it manually.

---
Tags: civicase
---


# Question
Title: Which contacts in a mailing group are NOT recipients of a mass mailing?
I have a mailing group with 1396 contacts in it, 8 of whom don't have email addresses and 21 of whom have opted out of bulk email. Therefore there should be 1367 contacts emailed.

However, when I select the group for a mailing, it says "Total recipients: 1,348" which leaves 19 contacts unaccounted for. How do I find out either

* Which contacts are recipients of the mailing, or
* Which contacts are NOT recipients despite (a) being in the group, (b) having an email address, (c) not having opted out of bulk email?

Any help would be appreciated.

Thanks!

# Answer
> 10 votes
The following are all different:

* No bulk emails (User opt out): This is what happens when someone opts out using the link in a bulk mailing. This means they won't be included in any *bulk* mailing. It doesn't affect sending single messages to that contact.
* Do not email: This means we can't/shouldn't email them at all, even singly. Actions \> Send an Email won't be available.
* Deceased: AFAIK works similar to "Do not email".
* On hold: Set by the CiviMail bounce processing. Probably means a bulk mail to them bounced. This means the address is invalid/inaccessible, not necessarily that they don't want us contacting them.
* Unsubscribe: This is a different meaning and a different link to "Opt out". This is not a flag that is visible from the contact summary, but from the groups tab. Bulk emails are sent to groups; unsubscribe causes the contact to be set as 'removed' from the group that caused them to get that email. It does not opt them out of all mail or even all bulk email.
* (One of) their email address(es) should be marked as primary. This should happen automatically but if they don't have a *primary* email address this might cause issues.

# Answer
> 7 votes
Another possible reason for the difference in the count is if you have (allow) multiple contacts to have the same email address and you have duplicate elimination turned on for a mailing. This has happened a number of times with various installs that I have worked with.

I am not aware of any magic solution that provides you a way to easily determine which contacts are not included. I suspect, to identify who was excluded, you might be able to (after the mailing) use either Advanced Search or Search Builder to do a query that compares the group contacts with the Bulk Email activity for the mailing. (Ala, in the group but not the activity.)

# Answer
> 6 votes
In Advanced Search, try searching for contacts in your mailing group with "Email On Hold". See Maintaining Healthy Email Lists.

# Answer
> 5 votes
Two hints:

* A contact can be in a group but have the status removed. This means, he will not receive bulk mailings send to that group but may receive bulk mailings sent to other groups(=different from optout)
* An email-address can be inactive (e.g. CiviCRM sets it to inactive if it was bounced several times)

---
Tags: civimail, groups
---


title: All scheduled jobs disappeared

text:
# Question
Title: All scheduled jobs disappeared
In my multi site installation all my scheduled jobs have disappeared. I don't know when, but most likely after an update.

Is there an easy way of restoring all the standard scheduled jobs that are created when installing CiviCRM?

I use CiviCRM 4.6.4 on Drupal 7 on a Debian Jessie server. The scheduled jobs must have vanished already on 4.5.\*.

# Answer
> 4 votes
All schedule job get saved against civicrm\_job. So, by restoring civicrm\_job table you can get all the schedule jobs back -

If you are looking for just the standard schedule jobs then try to install the same version of civicrm in different instance and copy the table content to your DB

# Answer
> 2 votes
civicrm\_job table has the Domain field in it. This means that the jobs are restricted to being seen only in the Domain that is referenced. This is a 'feature' of using multisite. It is possible to have multiple sites wired in to a single CRM without using Domains but can create issues in terms of user tables. Eg in Drupal you can get around this by using 'single sign on' but whether that is practical depends on the scenario. hope that helps

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


# Question
Title: Reply-to e-mail address using CiviMail in 4.6.3 defaults to system default
We recently upgraded to 4.6.3, and now the reply-to email address in CiviMail e-mails defaults to the system e-mail, not the From sender e-mail address, as previously. I could not duplicate on the demo site (at http://d46.demo.civicrm.org ), perhaps because the demo site is running 4.6.5.

A real bummer, any help fixing appreciated. Was this a 4.6.3 bug that has now been fixed in 4.6.5?

Thanks.

# Answer
This does indeed appear to be a bug in 4.6.3. Upgrading to 4.6.4 will fix the problem.

Note that additional functionality in CiviMail can affect the from: address: Using VERP or the custom reply-to header.
> 4 votes

---
Tags: civimail
---


# Question
Title: How can I assign tag when certain profiles are submitted
Anyone who signs up online for a membership on our site must create a Drupal user account at the same time (advanced setting on profile used for membership sign up). This gives them access to member-only benefits.

We want to make use of the ability for logged in users to complete a membership form on behalf of someone else (for our volunteers who take memberships from people using our helpline).

However, if a volunteer is logged in they can't create a Drupal User account for someone else.

We can create a drupal user for a civicrm contact just by tagging them, but although a profile can be set to automatically add someone to a group, the ability to automatically tag someone doesn't exist. Adding people to a group automatically then tagging them latter on based on that group membership is not ideal.

Can a (post or postProcess?) hook be used to tag the new contact when a profile is submitted on a contribution page being filled in by another logged-in user?

Additional information:

It is a CiviCRM 4.4.16 / Drupal 7 site.

These are paid memberships and we use pricesets due to our pricing structure, so I don't think switching to webforms is an easy option. If we wanted to use webforms I think we would have to more than double the number of memberships types in the system and have some custom code rewritten.

The profile I am referring to is on a contribution page for a paid membership that is specifically designed for volunteers to fill in on behalf of someone else. The profile is the main "Name and Address" profile on the page ie. the one that would usually be set to force someone to create a Drupal user account when they joined.

At the moment that is how the profile is set up - the person filling in the form must create a Drupal user account. If a logged in volunteer tries to access this membership page they are forcibly logged out before they can start to fill in the form, so they are filling it in as if they are the person joining up.

I would like to remove the requirement that they must be logged out to sign up on behalf of a new member. However, I need to have the Drupal User account created at the time the membership is submitted, so just adding "&cid=0" to the membership form URL is not enough.

I have seen Erik's blog on CiviRules and think it may provide a solution, but as always, money is short and I have been put off by "We would recommend organizations to get a CiviCRM partner to assist them at least in the initial configuration and thinking about CiviRules.". I am looking to extend my (very limited) developer skills and thought an extension to implement a hook to do this might not be totally impossible for me.

# Answer
> 2 votes
I found I could do this painlessly using CiviRules. I edited the profile to include automatic assignment to a group, then created a rule to assign a tag to anyone being added to that group.

The CiviRules extension looks like it will be very useful.

# Answer
> 2 votes
You could set up a drupal webform to accomplish this. A webform can do everything a standalone profile form can do, plus a lot more, including tagging.

---
Tags: profile, webform-civicrm, groups, hooks, tags
---


# Question
Title: How to disconnect civi contact record from Drupal user
I created a contact record for some testing using the site admin email address which is associated to the corresponding Drupal user account (user 1).

However it's now causing some problems with certain emails that go out, so I want to delete the contact record but I get an error message that I can't delete myself.

Can I / how do I break the connection between the two so I can safely delete the contact record?

# Answer
> 4 votes
The answer is in the civicrm\_uf\_match table in your Civicrm database. Each Drupal user is connected to its corresponding Civi contact record there.

* The uf\_id column is the Drupal user ID.
* The uf\_name column is the email address associated with the Drupal user and Civi contact record.
* The contact\_id column is the Civi contact record ID.

I don't know the ramifications of deleting the row which contains Drupal user 1, but you could certainly create a new Civi contact record (not yourself), and put that new contact ID in the row with uf\_id 1 (replacing whatever value is in the contact\_id column currently). Once that is done, you could delete your test contact record safely.

Our Drupal user 1 is associated with a contact record named \[myorg\] Tech and the email address is tech@\[myorg\].org. Thus our default address for mailings come from that address with no problems.

Hope that helps!

---
Tags: drupal, contacts
---


# Question
Title: Why are email replies not being forwarded properly?
When I send a bulk email through civiMail i use my email address and have the options to track replies and forward replies but in the report I see that there are 2 people who replied but the emails never got forwarded to me.

# Answer
do you see them as activities for these contacts? if you track replies, they come back to civi and get stored as activities
> 1 votes

---
Tags: civimail
---


# Question
Title: Activity processor on emails - doesn't work if sent to BCC recipients?
I send an email from my Gmail account to say 200 recipients and because I don't want their addresses to be public, I BCC them

I also BCC my Activity processor account.

In Civi, the Activity processor account record appears but none of the other 200 recipients. I'm guessing this is because they were BCC?

If I don't BCC them, they appear on the relevant Civi record.

Is this an error or by design?

# Answer
Neither error or design but by the simple fact that the BCC addresses will never be seen by CiviCRM.

Activity Processor relies upon receiving an email sent to it containing the relevant information. As you are sending using BCC, the 200 or so email addresses will never appear in the email.

You should send the email from inside CiviCRM and then you will get the result you want.
> 5 votes

# Answer
If you're regularly sending something to 200 people BCCed in Gmail, you're just asking for trouble--not just in getting the information into CiviCRM, but also for getting flagged as a spammer.

You must be getting the emails from somewhere--either they're in some list of yours already (which means you ought to use CiviCRM for keeping that list) or you received them from someone else (which means you ought to import them into CiviCRM with a tag or group).

Although it means a change in your workflow, the bulk BCC from Gmail is an unsustainable solution. Using CiviCRM more deeply should help dodge spam problems, and it'll make activity recording automatic.
> 3 votes

---
Tags: civimail
---


# Question
Title: edit contact with ref to address causes fatal error
I recently updateted to civicrm 4.6.4 on drupal 7.38. While entering contact data, I found when a contact has no address by its own, but a referral to another contact's address, edit using the edit button gives a fatal error.

Fatal error: Cannot pass parameter 1 by reference in /var/www/html/drupal/sites/all/modules/civicrm/CRM/Contact/Form/Edit/Address.php on line 363

No further info available like stacktrace,...

How to reproduce: \- create new contact \- save contact \- edit contact (this is working!) \- search for the new created contact. A list is presented with the searched contacts. \- choose edit on the end of the contact line.

inline editing while viewing a contact is still working.

Any ideas?

Johan.

# Answer
John guided me to the solution: civicrm is located in Belgium where adresses should be "street number bus" and second line "postalcode city". I used the civicrm (alpha) extension "org.civicoop.streetformatnl" v1.0 to edit civicrm views. Unfortunately it is no longer compatible. If disabled, everything works fine.

Kind regards, Johan.
> 2 votes

# Answer
Could you check that you updated correctly, and there there are no PHP files overriding the default CRM/Contact/Form/Edit/Address.php file?

There is a description of what this error means here: http://php.net/manual/en/language.references.pass.php

(Googling for the error reveals a few example solutions.)

I've checked line 363 in the 4.6.4 codebase, but I can't see anything that would break it there: https://github.com/civicrm/civicrm-core/blob/4.6.4/CRM/Contact/Form/Edit/Address.php#L363

Can you confirm what line 363 is in your CRM/Contact/Form/Edit/Address.php file?
> 0 votes

---
Tags: contacts
---


# Question
Title: how to change the size of groups for ab testing?
I've started a test with a sample too small to be statistically significant. I would like to re-run the test but with a bigger one.

however, I would want to exclude those that already participated to the initial a or b test. when I clone, I can exclude from previous mailings, but only from the final, not from the a or b tests. is there a way to do that?

# Answer
so what I did was to search the contacts in the original a and b groups, and added them into a new group already-tested, that I then excluded this group from the cloned ab testing.

note that i had to copy paste in the new ab-test, as the re-use feature doesn't properly clone the ab experiment, just one of the version
> 2 votes

---
Tags: civimail, abtesting
---


# Question
Title: VERP is visible in CiviMail sender address
When sending out CiviMail mailings, the unique VERP address is listed as the sender address. As I understand, VERP should be invisible and should instead show the FROM address set in both Administer\>CiviMail\>From Email Addresses and in Administer\>System Settings\>Outbound Email.

We have bluehost, and I know that it doesn't support VERP, so instead we have a catch-all bounce email address (via google app using our domain name), and the bounces seem to work just fine, except that the VERP sender address is visible.

# Answer
> 2 votes
Bluehost appears to restrict outbound emails to the list of email addresses configured on your Bluehost account.

Since dynamically generated VERP address format emails won't exist in this list, Bluehost is unlikely to correctly handle outbound dynamic VERP addresses.

You might get more informed and informative responses if you include a bit more debug information to better describe the issue you're experiencing?

# Answer
> 0 votes
What are you using to send the emails? The smtp server at bluehost? Some mail servers rewrite the message to put the smtp enveloppe as the sender instead of what you put in the from header.

Try to switch from mail() to smtp() or the other way around, it might solve your problem

X+

---
Tags: civimail
---


# Question
Title: CiviCase Will Not Save Settings for Activities
I am using CiviCRM 4.5.5 on Drupal 7.

When I go to the settings page for my Case configuration (Administer -\> CiviCase -\>Case Types) I can add activities to the list of activities and appears to save. No error message is being raised. However if you edit the Case type again you will that none of your changes are there.

I will note that this instance of CiviCRM and CiviCase have been upgraded since somewhere in Civi 3.x.

Thanks in advance for the help.

Thanks, Steve

# Answer
> 2 votes
There are a couple of things to look out for.

If you are creating a new case type, we had to delete the default role that is automatically assigned (case coordinator I believe), save and then re-add the role before it would save.

If you are working form the older xml files to configure cases, I'm not sure that the case ui will work with those. You may have to edit those files manually.

---
Tags: civicase
---


# Question
Title: Considerations when activating WordPress Multisite
I have Civi for WordPress installed on the main domain of our site and have multiple other WordPress installations on various subdomains. To streamline things a bit, I'm preparing to enable WPMS. I was wondering if there are any special considerations I need to make to ensure Civi doesn't get broken somehow. It doesn't need to share data with any of the other sites.

# Answer
You only need to be aware that Civi doesn't fully work with WPMS as yet. You *can* Network Enable it, but the Civi backend will not function as expected on sites other than the main site. There are workarounds, but since you aren't using on sub-sites then you should be fine if you just enable it on the main site.
> 1 votes

---
Tags: wordpress
---


# Question
Title: Should civicrm_post hook receive populated Relationship object following relationship enable/disable in UI?
I'm porting some code using Civi hooks from Civi 4.4 to 4.6 . The code needs to know when a relationship becomes active or inactive, regardless of how that happens, including via the enable/disable links on the Relationships tab.

My implementation for 4.4 used both hook\_civicrm\_post and hook\_civicrm\_enableDisable. In Civi 4.6, hook\_civicrm\_enableDisable has been removed. I've found that hook\_civicrm\_post gets called when the enable/disable links are used but the CRM\_Contact\_DAO\_Relationship object passed in only has the id field populated, all the other fields are blank.

Is this a bug and so should be addressed in core, or intended behaviour and so something I have to work around in my hook implementation?

I'm using CiviCRM 4.6.4 with Drupal 7.

# Answer
> 2 votes
Sorry but it's the intended behavior. Generally pre and post hooks just pass whatever happens to be loaded in that object rather than taking the performance hit of doing a full database load for the sake of a hook which may or may not be implemented and may or may not care.

I recommend not relying on the object being passed to pre/post hooks and doing your own api lookup using the provided id.

---
Tags: hooks, relationships
---


# Question
Title: How to store template_id that new event is derived from
I'm working on an event management framework where I want to have a set of event templates, and create events based off of those templates.

I'm trying to find a way to get at and store which template a newly created event was derived from but I can't quite figure out what to do.

I tried looking at both hook\_civicrm\_postProcess() (which has the template\_id but not the new event's id) and hook\_civicrm\_post() which as the newly created event id, but doesn't tell you what template it was derived from.

Can anyone think of a way to find those two values at the same time so that I can put the data in a custom field on the new event?

# Answer
> 1 votes
This is the reverse of what you're trying to do but might have the intended result:

Instead of populating the custom field *after* event creation, how about adding the custom field to your event template and populating it there?

---
Tags: civievent
---


# Question
Title: For my situation, what accounting package would fit with CiviCRM?
I have civiCRM 4.6 installed on Drupal 7, and I'm looking how this fits together with any reasonably well known accounting package for either international or USA accounting systems. In the latest version of CiviCRM there are some features that support the linking to financial accounts. What accounting packages currently have integration with CiviCRM? Either commercial or open source. Thanks

# Answer
> 4 votes
We built some integration for Xero which is an online accounting system. The code isn't quite 'plug and play' but once set up it does the synch between contacts and transactions in both systems. Read more about Xero here https://www.xero.com/ and a blog about the integration here http://www.fuzion.co.nz/blogs/civicrm-integration-xero

---
Tags: accounting
---


# Question
Title: Suggested Approach for Cart style donations (Donation Pages) for Crowdfunding P2P site
**My Question is: For the current 4.6.4 CiviCRM are there any suggested solutions / recipies to create a crowdfunding / P2P site with shopping cart style options ?** Also, please comment if this is something you are interested in building/funding/etc.

**Goal: Build a P2P Crowdsourcing Application that integrates with CiviCRM** Crowdfunding / Peer2Peer social campaings have been very popular and effective. Civi has critical pieces to running a crowdsorucing platform but an important part is to select multiple causes and add to a cart.
Some great sites out there are:

* Razoo
* CauseVox
* Indiegogo
* Fundly
* Classy
* FirstGiving
* Justgive
* And many many more of all shapes/sizes (I have some lists if anyone needs one.)

I found some 3rd party services that (claim) to integrate with CiviCRM (I'm open to using a 3rd party but these seem to provide data and not workflow integration.):

* justgiving.com
* flipcause.com

CiviCRM is really well suited to provide many "causes" and integrate back-end workflow. For example, **each of the causes being a donation page and leverage the p2p are personal campaign pages.**

I'm working with an organization that wants to integrate Civi workflow and allow the following:

```
1. Create a Grant Application (ie. A Cause)
2. When Grant is approved generate a donation page
3. Populate the donation page with a story and info from the Grant
4. Display pages in CMS
5. Checkout / payment via donation page in CiviCRM.

```

Most of this is nicely built-in to CiviCRM but there are a couple of issues:

1. Checkout is for a single donation page, but want the opportunity to "Shop" for multiple in one checkout. (major)
2. We could be looking at 100s of donation pages which may get tricky to manage without some hierarchy in the backend(minor)
3. Custom relationship between grant and donation page (minor)

There are several solutions for Civicrm Events with built-in shopping cart logic and a new Order API. There are other modules / extensions that require a shopping cart:

More discussions here:

# Answer
> 2 votes
I think Commerce is still your best option. We have moved away from using the module and instead are building Commerce solutions using the Civi Rules module. That way we get full 'cart' features as provided by Commerce and its many contrib modules, plus the integration required for sych'ing contacts etc.

---
Tags: civicontribute, webform-civicrm, contribution-page, civicrm-entity, commerce
---


# Question
Title: Only Administrators can use Contact Reference Fields
I have a contact reference field that works perfectly as Drupal user 1. It does not work for my non admin users. They have all the permissions for CiviCRM but the select list does not retur results to them. They can see the field and see what admin puts in the field.

This Drupal 7 and Civi 4.5.5.

Thanks!

# Answer
You might need to provide more detail re the Permissions, but there are specific permissions for

* CiviCRM: access contact reference field
* CiviCRM: access AJAX API

From memory both are required.
> 4 votes

---
Tags: contacts
---


# Question
Title: How can I get more details about a Scheduled Jobs failure?
I have discovered that I have had the "Disable expired relationships" job producing the following error. Triggering the job manually yields the same result.

How can I find out more information about what is tripping up the system so that I can rectify the problem?

This is a Drupal implementation.

> 2015-07-12 16:20:46 Disable expired relationships
> 0 Summary Finished execution of Disable expired relationships with result: Failure, Error message: Relationship is not valid Details
>
> Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}
>
> Full message: Finished execution of Disable expired relationships with result: Failure, Error message: Relationship is not valid

EDIT: While I had hoped that jumping into error logs would yield more information, the output of the following SQL statement was helpful to jump in and fix some errant data:

```

SELECT
  RELATIONSHIP.id as relationship_id,
  RELATIONSHIP.contact_id_a,
  RELATIONSHIP.contact_id_b,
  RELATIONSHIP.relationship_type_id,
  CONTACT1.contact_type AS contact_type_a,
  RELTYPE.contact_type_a as expected_type_a,
  CONTACT1.contact_sub_type as contact_subtype_a,
  RELTYPE.contact_sub_type_a as expected_sub_type_a,
  CONTACT2.contact_type AS contact_type_b,
  RELTYPE.contact_type_b as expected_type_b,
  CONTACT2.contact_sub_type as contact_subtype_b,
  RELTYPE.contact_sub_type_b as expected_sub_type_b
FROM civicrm_relationship AS RELATIONSHIP
LEFT JOIN civicrm_contact AS CONTACT1
  ON RELATIONSHIP.contact_id_A = CONTACT1.id
LEFT JOIN civicrm_contact AS CONTACT2
  ON RELATIONSHIP.contact_id_B = CONTACT2.id
LEFT JOIN civicrm_relationship_type as RELTYPE
  ON RELATIONSHIP.relationship_type_id = RELTYPE.id

```

I took the export of this into Excel and used the AND function to compare what contact types/subtypes were expected for each contact and what was really sitting in there. When I fixed the data, the cron job ran successfully.

# Answer
I would recommend looking in two other places:

1. The CiviCRM error log. This is to be found (for Drupal) in sites/default/files/civicrm/ConfigAndLog/CiviCRM.(long number).log
2. The PHP error logs. This is different for each server / Control Panel so I'm afraid I can't give more specific directions than that.

Make sure you find the place in the logs which matches the time that you triggered the job, to save you trawling through many lines of text. I would suggest you trigger the job one more time, take note of when you did it, and then look up what happened in those two places at that time.
> 3 votes

# Answer
The message is saying "Relationship is not valid:" you may need to trawl through sql and check you don't have relationship using an incorrect Contact Type
> 2 votes

---
Tags: cron-job
---


# Question
Title: how to test the version-or if a feature is implemented?
when writing extensions, i often try to keep the code compatible with several versions of civi instead of having to maintain different branches.

however, i sometimes would like to use a new feature **if it's available**, for instance, civi 4.6 introduced an option to force rollback that i would like to use, but if i'm using this option and run the code with civi 4.5, it will silently ignore it and won't rollback.

is there a way from the api to test the version that is running, or -my preference- if a specific feature is implemented?

# Answer
> 2 votes
As Coleman suggests, one can do more direct inspections to see if particular entities/actions/fields are supported. This is generally more robust/correct in the long-run, but it can be problematic in some edge-cases. There is a way to get the version number.

In CiviCRM v4.4+, use the System.get API, e.g.

```
drush cvapi system.get
Array
(
    [is_error] => 0
    [version] => 3
    [count] => 1
    [id] => 0
    [values] => Array
        (
            [0] => Array
                (
                    [version] => 4.4.17
                    [uf] => Drupal
                )

        )
)

```

Of course, checking an API is mildly expensive. *If* you need to guard many statements with version checks, then it could add up. To mitigate this:

* If using the API remotely to inspect system state, cache the data for a few minutes.
* If writing server-side PHP code, don't use an API. Instead, call `CRM_Utils_System::version()` and version\_compare().

# Answer
> 1 votes
At a most levels, yes you can query the api for certain features. For example:

```
civicrm_api3('Entity', 'get');

```

will tell you all available entities.

```
civicrm_api3('Contact', 'getactions');

```

will tell you all available actions for e.g. the Contact entity.

```
civicrm_api3('Contact', 'getfields', array('action' => 'create'));

```

will tell you all available fields for e.g. the Contact::create action.

```
civicrm_api3('Contact', 'getoptions', array('field' => 'prefix_id'));

```

will tell you available options for a certain field, e.g. the Contact individual\_prefix.

---

However, your question is about specific option to be passed into the "options" array, which unfortunately is completely undocumented as far as api metadata goes. I'd love for this shortcoming to be addressed, particularly because the api explorer is suffering because of it.

---
Tags: api
---


# Question
Title: Extension: UK Phone Number Validator - permissions
Cool little extension. I am about to trial it on a site. I'm new to extensions so am trying to work out how this is permissioned. On the wiki I see "At this time, permissions for extensions are not influenced by CiviCRM's ACL system so we need to rely on the underlying permissions of the CMS to allow or deny access to an extensions pages." I can't find any info on the specific extension page/post but from the wiki it seems like extensions are usable by anyone with the 'administer CiviCRM' permission and/or 'access Contact Dashboard'. BUT, I'm masquerading as a user with neither of these permissions, and I can still access the admin screen for this extension at mysite.org/civicrm/phonevalidator.

Help appreciated.

# Answer
I think the remark is for the installation of extensions. You are accessing the admin screen WITHIN the extension. You then rely solely on what the developer has checked within the extension, and apparently there is no permission checking in the extension. So you would have to add that if that is required?
> 2 votes

# Answer
I might be necro-ing a thread here, but it got my attention because the person who wrote this extension used to be my manager. The (indeed underlying CMS) permission required to access an extension page would be found in `xml/Menu/phonevalidator.xml` under the extension directory. You might want to investigate `hook_civicrm_permission`, and/or change the permission in said XML file.
> 0 votes

---
Tags: extension, permissions
---


# Question
Title: Exclude certain Activity types on Activities tab
On the Activities tab of contacts, there is the possibility to filter which activity types are displayed.

Is there any way to set this filter by default?

Or another way to exclude Contribution Activities from that tab?

# Answer
I'm not aware of a way of doing this through the user interface. However once a user sets the activity type filter, this should persist for that user, as it gets saved as a user preference. See Save user preferences for filtering Activities tab listings.

To set the default value of the filter, I would try using the buildForm hook.
> 3 votes

# Answer
My Civi did not save the preference (actually it completely ignored this filter) But it turns out it was a bug in my CiviCRM installation. It was fixed by updating to a newer version.
> 1 votes

---
Tags: activities
---


# Question
Title: Exporting membership data including chosen price set
Our charity offers a range of memberships for organisations with the price based on their size. For each type of membership we have a price set including 3 options. So you can be a service provider (small, medium, large); a training provider (small, medium, large) or a supporter organisation (small, medium, large).

We have recently moved over to CIVI want to invoice members who have just joined and those who are due for renewal (yearly).

We want to be able to create invoices using a mailmerge from excel including info like organisation's name, member type (service provider, trainer, support org), member start date, end date, and of course what it will cost them to renew assuming they are still the same price set ie (small, medium, large). We can search memberships to find those who are due for renewal but we can't find out what price set they chose when they joined.

We tried to export data but can't find price set as a field under member data or payments/contributions. I can't even see it when clicking into an individual member's details. The price sets are active as we've tested joining and you need to select the option - it works for PayPal but we can't process PayLater at present. I've noticed when creating profiles it says that contribution and member data cannot be included on the same profile. So wondered if that is part of the problem. Is there a work around?

We're on CIVI 4.5.8

# Answer
> 1 votes
If I am not wrong - you have imported data from your previous system to civicrm and started using price set. But you couldn't find the old price set in the new system because you couldn't view membership amount in the membership record --

This problem is due to data import you have civicrm\_membership but you haven't created civicrm\_membership\_contribution records.

while creating contribution records and line item you will be adding price set Id and price field Id correctly. then this will get picked up in civicrm price set

---
Tags: price-sets
---


# Question
Title: Free event with sessions with max participants
We have a free event that has several sessions with a max participant limit of 15. I've set that up with price sets with $0.00 amounts. It works fine, but because price sets are designed for paid events, there's a bunch of work to hide the pricing information from the user (css to hide the amounts on the registration, confirmation and thank you pages, modify the confirmation email to hide the payment sections and write a hook so Civi doesn't add the $0 contribution which is added, or tell folks to ignore those $0 contributions and delete them at some point.)

Just wanted to make sure there isn't a better way to do this. Any suggestions would be welcome.

# Answer
> 3 votes
I assume you're using price sets because you want to allow people to register for multiple sessions on a single event page? Have you checked out cart-style event registration? It's not maintained by core, but there seems to be a steady flow of people who ask questions about it, so it seems like it's getting use.

With cart-style event registration, each session is its own event, and you can dispense with price sets.

Finally - you did some amazing work on getting price sets to fit your use case! If you could publish your work somewhere, that would surely benefit someone.

# Answer
> 2 votes
If you're using Drupal as your CMS, then yes, the simpler solution is to set up a CiviCRM Webform that allows people to register for one or more session (assuming that you have set up each session as a sep event).

Sorry, this won't work in WP or Joomla.

---
Tags: civievent, session
---


# Question
Title: Contributions- on behalf of existing organisations only?
Our members are all organisations (schools and colleges). Payment is taken outside of Civi after sending an invoice. We're not currently using Contributions. We're looking at a big project to automate/improve our reporting. I'm interested in using a contribution page internally to record payment, most likely using a price set to count how many of certain options they have purchased either with their membership or separately afterwards.

It is important that we only create memberships on existing organisations, but the help for selecting an "On Behalf Of" profile says "The profile must include Organization Name and Email Address". Is there a way of restricting the selection of organisations to existing only, and preferably within certain subtypes or a certain group?

# Answer
> 1 votes
If you are using Drupal you could potentially set this up using webform-civicrm since that allows you to set the Organisation fields to require it to be an existing contact. For Contribution Pages in general, the 'on behalf of' works on principle that an individual is signing up and registering that the membership belongs to the Organisation. I am not sure that maps so easily to a situation where the administrators are doing all the work, which is what i understood from your description.

---
Tags: civimember, contributions, contribution-page
---


# Question
Title: Is there a way to enable or install the full version of CKEditor in CiviCRM 4.6.x?
So is there a way to enable or install the full version of the free and open source CKEditor in CiviCRM 4.6.x ?

Looks like the CKEditor Standard editor (see http://ckeditor.com/demo#standard ) is installed with Civi (see http://d46.demo.civicrm.org/civicrm/a/#/mailing/37 ), but the "full featured" version ( see http://ckeditor.com/demo#full ) has more useful stuff, particularly aligning and centering text.

I've used the full version on the CKEditor demo site just to center text for a CiviMail mailing. That works, but having the full featured version right in CiviMail would be handy.

# Answer
That's a good question. In the current version of Civi there is no UI for adding buttons to the CKEditor toolbar. However I think it would be relatively easy, especially since we now have a pluggable interface for wysiwyg editors, to integrate with the new Toolbar Configurator to allow a CiviCRM admin to drag n drop buttons in the toolbar.

Update: I've implemented a GUI for the configurator in CiviCRM 4.7!
> 9 votes

# Answer
The difference between the "full" and "standard" CKEditor is one of plugins. You can drop additional plugins into the ckeditor plugins folder at: `<civicrmroot>/packages/ckeditor/plugins`. Depending on the plugin, you may also need to edit the config at `<civicrmroot>/packages/ckeditor/config.js`. Detailed instructions are available here.

I've had perfectly good success simply dropping in the latest version of CKEditor (https://issues.civicrm.org/jira/browse/CRM-16053).

UPDATE: I found that newer versions of CKEditor strip out the "meta" tags from the templates unless you edit config.js. Also, be sure to clear all caches (including browser caches) or you may find that your CKEditor toolbar button icons are messed up (because of the wrong offset)
> 11 votes

# Answer
My answer to this question assumes you are using Drupal, the Drupal CkEditor module, have installed CkEditor as a Drupal library, and want to use ICME as your file browser. Also, I'm limiting my answer to the Angular code (eg, New CiviMail). Hopefully it's still useful even if you have a different setup.

The changes that are required are ...

1. alter which CkEditor JS is invoked
2. include another CkEditor JS file so you have a callback for IMCE to hook into
3. alter the file browser so IMCE is invoked rather than CkFinder
4. alter any other CkEditor configuration as required

You can ignore 2), 3), and 4) if ICME or other configuration changes are not needed.

The following patch to 4.6.2 implements 1) and 2). If you don't want to use IMCE then don't add the line referring to 'ckeditor.utils.js'.

```
diff -ur ./Civi/Angular/Page/Main.php /var/www/drupal/sites/all/modules/civicrm/Civi/Angular/Page/Main.php
--- ./Civi/Angular/Page/Main.php    2015-04-16 09:24:10.000000000 +1000
+++ /var/www/drupal/sites/all/modules/civicrm/Civi/Angular/Page/Main.php    2015-05-10 19:23:42.101009438 +1000
@@ -80,7 +80,8 @@
     $this->res->addScriptFile('civicrm', 'bower_components/angular/angular.min.js', 100, 'html-header', FALSE);

     // FIXME: crmUi depends on loading ckeditor, but ckeditor doesn't work with this aggregation.
-    $this->res->addScriptFile('civicrm', 'packages/ckeditor/ckeditor.js', 100, 'page-header', FALSE);
+   drupal_add_js('window.CKEDITOR_BASEPATH = "/sites/all/libraries/ckeditor/"', array('type' => 'inline', 'weight' => -100));
+    $this->res->addScriptFile('civicrm', '../ckeditor/includes/ckeditor.utils.js?', 100, 'footer', FALSE);
+    $this->res->addScriptFile('civicrm', '../../libraries/ckeditor/ckeditor.js?', 100, 'footer', FALSE);

     $headOffset = 0;
     $config = \CRM_Core_Config::singleton();

```

The following patch implements 3) and 4). If you only want to use IMCE, change the 'filebrowser' lines. The other changes are illustrative. Note that my configuration is that uploads are only done via IMCE so the Upload URLs are empty.

```
diff -ur ./ang/crmUi.js /var/www/drupal/sites/all/modules/civicrm/ang/crmUi.js
--- ./ang/crmUi.js  2015-04-16 09:24:10.000000000 +1000
+++ /var/www/drupal/sites/all/modules/civicrm/ang/crmUi.js  2015-05-11 10:38:38.106365505 +1000
@@ -397,12 +397,31 @@
             _.extend(ck.config, {
               width: '94%',
               height: '400',
-              filebrowserBrowseUrl: CRM.crmUi.browseUrl + '?cms=civicrm&type=files',
-              filebrowserImageBrowseUrl: CRM.crmUi.browseUrl + '?cms=civicrm&type=images',
-              filebrowserFlashBrowseUrl: CRM.crmUi.browseUrl + '?cms=civicrm&type=flash',
-              filebrowserUploadUrl: CRM.crmUi.uploadUrl + '?cms=civicrm&type=files',
-              filebrowserImageUploadUrl: CRM.crmUi.uploadUrl + '?cms=civicrm&type=images',
-              filebrowserFlashUploadUrl: CRM.crmUi.uploadUrl + '?cms=civicrm&type=flash',
+              filebrowserBrowseUrl      : '/imce?app=ckeditor|sendto%40ckeditor_imceSendTo|',
+              filebrowserImageBrowseUrl : '/imce?app=ckeditor|sendto%40ckeditor_imceSendTo|',
+              filebrowserFlashBrowseUrl : '/imce?app=ckeditor|sendto%40ckeditor_imceSendTo|',
+              filebrowserUploadUrl      : '',
+              filebrowserImageUploadUrl : '',
+              filebrowserFlashUploadUrl : '',
+              bodyClass                 : 'cke_editable',
+              contentsCss               : '/sites/all/themes/cbootf/css/editor.css',
+              scayt_autoStartup         : true,
+              scayt_sLang               : 'en_GB',
+              forcePasteAsPlainText     : true,
+              toolbar : [
+                 ['Source'],
+                 ['Cut','Copy','PasteText','-','SpellChecker', 'Scayt'],
+                 ['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
+                 ['Image','Table','HorizontalRule','SpecialChar'],
+                 '/',
+                 ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
+                 ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
+                 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
+                 ['Link','Unlink','Anchor','Linkit','LinkToNode', 'LinkToMenu'],
+                 '/',
+                 ['TextColor','BGColor'],
+                 ['Maximize', 'ShowBlocks']
+              ],
             });
           }

```

Note that if you want to change the CkEditor for the non-Angular code, you need to make analogous changes to templates/CRM/common/wysiwyg.tpl and packages/HTML/QuickForm/ckeditor.php.
> 4 votes

# Answer
Adding this answer to note that Coleman and others have done a good thing by adding the ability to get all the bells and whistles of CKEditor into Civi 4.7, see Coleman's blog post, Big Changes to WYSIWYG Editing in 4.7
> 4 votes

---
Tags: civimail, email, ckeditor
---


title: Tokens to SMS Messages

text:
# Question
Title: Tokens to SMS Messages
Can you add tokens to SMS messages? We want to send a link to a form to see if users want to opt in to our SMS messages, but we would like to send a link similar to a website link in an email with the checksum token. Is this possible through Civi SMS?

# Answer
Yes, you could use tokens in sms messages.

Be aware an issue with the required character length on sms, and the fact that tokens would represent different character lengths.
> 4 votes

---
Tags: sms
---


title: How do I create conditional forms?

text:
# Question
Title: How do I create conditional forms?
The charity I work for has two specific scenarios where I need to create conditional activities based on form input.

1) We run a food bank and referring organisations fill in an online form. However, after six food parcels within a three month period, we expect those being referred to book an appointment with one of our client advisors. How can I set the form submission to check how many times a person has been referred and, if they have reached the limit, change the form to book an appointment.

2) We host a dinner, with a limit of 60 places, where volunteers are expected to bring along someone who isn't linked with the charity. How do I set a condition on the form to check if the registrant is bringing someone who isn't linked to the charity and, if not, place them on a waiting list.

# Answer
If you're running CiviCRM in Drupal you can use the Webform CiviCRM module to provide conditionality to Civi activities
> 2 votes

# Answer
Keith I know you're on WordPress, just adding this as an addition to Sean's answer above for those folks using Drupal, and the Webform CiviCRM module: \- for scenario 1 in the question, a Smart Group could be created based on the criteria and upon form submission a check is run for the condition of iscor is not a member of the group. \- for scenario 2 the condition can be if the second person is or is not an existing contact, or if the second person is already an existing contact, is or is not an existing contributor or past Participant in the same type of Event.
> 2 votes

# Answer
I don't follow how the data is getting in to your system, but, if it is being addd by admin then would something like this get you towards 1/

Create an Activity Type that has 6 x date fields for Parcel Request #1, #2 etc.

So when a new request for parcel comes in, admin checks if contact has an 'open' activity, and if so adds the date to the next available field, and if no open activity exists then they create a new one.

Find some way of making an Activity of this type that is over 3 months old automatically be set to Closed (can CiviRules do that?)

That way you can't be adding a 6th date to an Activity that is over 3 months as it would be closed.

Then you could build a trigger to run if that critical 6th date field actually gets data put in to it, maybe a post process hook on the Activity, which triggers a new Activity of type "make an appointment" that gets assigned to your manager.

(pete stops waving hands around wildly)
> 1 votes

---
Tags: civievent, wordpress, contacts, custom-fields
---


title: Corrupted smart group?

text:
# Question
Title: Corrupted smart group?
I noticed that a smart group I created a while back was not displaying the correct records (some were missing).

I rebuilt the cache, but to no avail.

In addition, when I did an advanced search with the same criteria, it did display the correct records.

The only difference I can notice in criteria is an extra "…AND…":

Old smart group:

```
...AND...
Status = Regular Attender OR Active Member

```

New advanced search:

```
Status = Regular Attender OR Active Member

```

One more data point: when I edit the old smart group criteria and remove all criteria, it only returns a subset of our database – not all records (which, I believe, it should).

Is the old smart group corrupted? What are the next steps in troubleshooting?

We're on CiviCRM 4.6.4 and Drupal 7.38.

# Answer
> 5 votes
I would first check that contacts haven't been manually added to or removed from the smart group. To do this you'll probably need access to the database in order to interrogate the tables. Even though they are smart groups you can still manually add and remove contacts from them and that might be why your seeing unexpected results.

The second test would be to create a new smart group based on the criteria you want and see if you get the result

---
Tags: smartgroups
---