# Question
Title: Where is the 'Require Participant Approval' checkbox on the 'Online Registration tab'?
I am trying to set up an event that requires participant approval. I have read the guidance and have ensured that the participant statuses, 'Awaiting approval' and 'pending from approval' are enabled.

The guidance then goes on to say, 'You can then check the **Require Participant Approval** checkbox on the online registration tab', but I can't see this checkbox on the tab.

Am I missing something? Thanks Anna

Civi 4.6.5

# Answer
> 2 votes
You need to enable 'Rejected' participant status as well.

"Require participant approval?" checkbox will appear only after you enable the following participant Statuses

* Awaiting Approval
* Pending from approval
* Rejected

Looks like the book/docs is not updated.

---
Tags: civievent
---


# Question
Title: How to get php $_SESSION variable inside a template
I am setting `$_SESSION` variable inside a payment response file and need this to display on Thank you page. Somehow nothing seems to work so far.

Tried following things:

```
$_SESSION['test'] = 'Hello World'; // Inside payment response file

```

Need this in `confirm.tpl` file. Tried

```
{$session->get('test') // does not work
{$smarty.session.test} // does not work

```

Tried so many other things but nothing seems to work. Also, it's not working for any other variable like `$_SERVER`, `$_POST` etc.

Any ideas?

# Answer
> 3 votes
```
    Try following:

    // php code;
        $_SESSION['test'] = 'Hello World';

    // assign 'Hello World' to .tpl
        $this->assign('test', $_SESSION['test']);

    // use '{$test}' following in .tpl file to display on Thank you page, For e.g
       <tr>
         <td>{$test}</td> // this will print 'Hello World' on page
       </tr>

```

---
Tags: civicontribute, templates, smarty
---


title: Adding label # 4013

text:
# Question
Title: Adding label # 4013
I need to add a label format for a pin feed printer to be able to print membership address for the labels. How do i find the correct entries to add this label avery #4013?

# Answer
You can add a new Label via the link available at this settings page
> 3 votes

---
Tags: civimail
---


# Question
Title: CiviDiscount big red box error appears at the top of an event that uses discounts
When you go to the registration page of an event that uses a discount code from CiviDiscount, this error appears several times in a big red error box at the top. If you scroll down far enough the actual registration form does appear. We have recently upgraded from an earlier version of Civi to 4.6.9, and from Joomla to Drupal. We have upgraded the CiviDiscount extension to 3.1 after doing the upgrade and migration.

This error message is repeated:

Warning: array\_keys() expects parameter 1 to be array, null given in CRM\_CiviDiscount\_DiscountCalculator-\>filterDiscountsByContact() (line 108 of /home/registrationrig/www/www/sites/default/files/civicrm/extensions/org.civicrm.module.cividiscount/CRM/CiviDiscount/DiscountCalculator.php). Warning: Invalid argument supplied for foreach() in CRM\_CiviDiscount\_DiscountCalculator-\>filterDiscountsByContact() (line 108 of /home/registrationrig/www/www/sites/default/files/civicrm/extensions/org.civicrm.module.cividiscount/CRM/CiviDiscount/DiscountCalculator.php).

# Answer
Beside having that big ugly message at the top, does it work properly?

This is a WARNING, that can either be a missing validation of something from the developer, and could safely be ignored, or showing you the root of the problem.

You mention moving from joomla to drupal, the issue might be that the link between a user (in the CMS) and her contact (in the CRM) aren't properly linked anymore. Is this warning displayed when you are authenticated or to an anonymous user?

Anyway, if the discount works as expected, a quick workaround is to change the php configuration so it doesn't display NOTICE or WARNING online (I disable displaying them in production, mostly because they tend to be too verbose and disclose information like the path where I installed civi for instance that I'd rather keep private, for security reason)

yo can change that by changing the default value or add a error\_reporting line on your civicrm\_settings.php http://php.net/manual/en/function.error-reporting.php

X+
> 1 votes

---
Tags: cividiscount
---


# Question
Title: How to register participant for all repeating/recurring events - CiviCRM 4.6
I've been looking at the docs but can't find an obvious way to register someone onto all occurrences of a repeating/recurring event.

e.g. On a ten week course, I want to register them on one page, and not have to register them 10 times

# Answer
At the moment recurring events don't support registering a participant onto all/some occurrences through the registration process. Its a feature thats been requested a few times and we're looking for funding to make it happen. Please get in touch if your interested.
> 2 votes

# Answer
If an event lasts 10 weeks, and only a single registration is required, you don't need to set it up as a parent event plus 9 recurrences. A single event registration will do and just show the start and end dates on the Information and Settings pages.

If you need to have the attendee register for each week individually, I'd use the Import Participants feature to mass register them for all events.
> -1 votes

---
Tags: civievent, 4.6
---


# Question
Title: I've inherited old CiviCRM data from a Drupal install - how do I get upgraded and running in Wordpress?
I am running Wordpress 4.2.1, with CiviCRM 4.5.6. Everything works for my fresh install of CiviCRM.

Now, I am chair of a political organization, and I got the old data for my county from an ex-member who ran CiviCRM under Drupal, but I don't know what version of CiviCRM he used a few years back (I think it was around 2011). I have imported the data into mysql as dbname "civicrm\_original" and the current running config is "civicrm".

I tried to swap out the data connection string to use the "civicrm\_original" database then ran the command: `http://<your_wordpress_home>wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1`

but then CiviCRM wouldn't run and it had errors like crazy, like fields not in tables and other tables not existing. So now i switched back the dataconnection to "civicrm" and we are running again, just not with all the old data.

1) how can I find out what version that database was? 2) how can I update the imported database to work with my current config?

I would be willing to update to the latest version of CiviCRM if need be. or, would it be easier to copy the data over to the new database? I know the contacts table has new fields that aren't in my "original" db.

# Answer
> 4 votes
For the move from Drupal to WP I wouldn't try what your going to do, our approach would normally be to setup a fresh install of CiviCRM on the WP site. Then move over the relevant tables from the old CiviCRM into the new one. Theres a wiki page which explains the process.

Moving CiviCRM

# Answer
> 4 votes
If you look in the database, check the `civicrm_domain` table and see if there is a value in the `version` field. (If there is more than one record in this table, you are dealing with a multi-site).

Just guessing, but one problem you may run into is that the original database wasn't on Wordpress. Do you know what CMS it was running on?

(e.g. Drupal upgrades support all the way back to v2.2, but Wordpress upgrades start with v4.1.)

So one approach would be to set up Drupal on a development server, upgrade CiviCRM on this Drupal installation, and then move the updated CiviCRM database to Wordpress as outlined in this StackExchange Q&A.

---
Tags: wordpress, drupal, upgrade
---


# Question
Title: Why are contacts not receiving emails when do not email not checked?
I have a group of elected officials that I regularly email with updates. When I try to contact them, I get the error "Email will NOT be sent to 4 contacts - (no email address on file, or communication preferences specify DO NOT EMAIL, or contact is deceased)." However, when I search for contacts matching one or more of those flags + belong to the group I get no results. I figured out which four contacts it is, and there is an email on their profile, the email is not being held, the DO NOT EMAIL box is not checked, and the contact is not marked deceased. Is there something else I may be missing? It's pretty important to us to get our messaging to these officials as they hold serious sway over our operations.

This is occurring when viewing the group and clicking "send email to contacts," I have not checked the mass mailing tool.

I'm using civi 4.6.9 on Wordpress 4.1

# Answer
You may have zombies. I use this term not because it's almost Halloween, but because imports can leave you with undead contacts, and this may be a variation of that.

Boolean (yes/no) fields in CiviCRM have the value 1 or 0, but it's possible in the database for the field to have a null value. When you create a contact manually, the Is Deceased, Do Not Mail, etc. fields are set to 0, but if you run an import with one of those fields and only mark the dead or no-mail people with 1s, the rest will have the value as null.

When viewing a contact, it will only display deceased or do not mail if those values are 1. When sending email, it will only send if those values are 0. Hence, you have this mysterious issue.

I suspect you may have imported elected officials, included Do Not Email, but neglected to fill the zeroes where it's okay to email. Xavier's solution should work: by editing and re-editing the field, you can reset the value. It gets tedious for a bunch of contacts, though.

In the database you can execute the following query to fix this:

```
UPDATE civicrm_contact SET do_not_email = 0 WHERE do_not_email IS NULL;

```

Repeat for `is_deceased` and any others like that you want. You can also find these contacts in the Search Builder and use Batch Update Via Profile on the results, using a profile with Do Not Email in it.
> 5 votes

# Answer
Can you try sending one of the for a single email from their contact record and see if you have the same error message? Just to be 100% sure you have identified one of the broken records.

Can you then edit (not the edit in place fancy version) the full everything on one page one, try to check the on hold and do not mail, check that the email they have is marked as primary+bulk mail (if they have several, try to change the primary one), save, and revert your change then save again

I know it's a bit "can you reboot your computer" type of answer, but sometimes (eg when modifying the contacts via my own custom code or via some extension) some of the underlying data behind the contact record got mingled (eg not having any email marked as primary), and edit and save via the contact record helps to put it in good shape again.

X+
> 1 votes

---
Tags: email
---


# Question
Title: MySQL Master-Master Replication on 2 servers
For our installation in a "Third World Country" we need 2 replicated Master-Master Mysql-Servers:

* one in a European data center to serve the public website and allow access from mobile devices to CiviCRM
* one local server to serve the office staff (as the internet line of the office often does not work and the staff cannot depend on the server in the data center)

We run 2 "master-master-replicated" MySQL-Server

* one with auto\_increment\_offset = 1
* the other with auto\_increment\_offset = 2
* both with auto\_increment\_increment = 2

in my.cnf so that one server uses odd ids and the other one even ids when inserting record. This works perfectly in other PHP/Mysql based software we are using. We do not have a problem with the replication of our running servers.

When installing CiviCRM we received the message

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

https://issues.civicrm.org/jira/browse/CRM-7923 not really is helpful with that issue - it explains how to undergo the configuration of replicated servers which does not help in our case as we need the master-master replication with CiviCRM. This pages also shows that this topic seems to exist since several years without any change.

We googled a lot and did not find any solution for this important feature to use CiviCRM on 2 (or even more) replicated master database servers.

So I address the following questions:

1. why CiciCRM only supports id increments of 1 when inserting records? Which technical reason defines this limit?
2. are there any modules to change this handicap? if not:
3. where in the code, where is the point to change this behavior? We have a team of PHP developers to work on this problem if we would know where to start
4. is there - may be - a plan to change this problem in the near future e.g. in 4.7?
5. what other recommendation do you have for our organizational need of 2 servers - without setting up CiviCRM on 2 database servers with "master-master replication"?

Kind regards and thanks a lot for your answer!

# Answer
> 2 votes
This is an interesting approach!

As you rightly noted, that bug report was wrong a long while ago and didn't get traction.

As you mentioned you have developers able to help, I would suggest you do a quick evaluation to identify if the install procedure (without installing sample data) breaks still with an autoincrement \>1

Obviously, in a separate install that you might end up trashing.

in your install/index.php line 1007 or so alter requireMySQLAutoIncrementIncrementOne so it's first line is

```
return; // bypass the test, the sky might fall, but at least we'll know how exactly.

```

I think the general plan for inclusion of a new feature is: if you do the work of identifying the issue and code the fix(or fund the work if needed), it's likely to be accepted ;)

Assuming that it doesn't have any impact for "normal" users that have an increment of 1, I personally would want to try (or at least master-slave for a starting point)

---
Tags: mysql
---


# Question
Title: Why is Joomla demo site showing it is using 4.6.0?
Following up on this question I checked and confirm that the joomla demo site shows it is on 4.6.0 and has 'security releases' available

# Answer
> 4 votes
For background: The demo, training, test, and many local-dev systems for Drupal+CiviCRM and WordPress+CiviCRM are based on a common set of scripts, and they all install clean copies of Civi from git (using branches or version-tags). The demo sites are automatically rebuilt every night using the scripts. This keeps the sites up-to-date.

For Joomla: Installing a good, clean system for Joomla+CiviCRM from git is very difficult -- I and others have tried to automate it a few times and always given up. (Somewhere in my email history, there's a *note-to-self* about how hard this is. Alas, the language is too strong for publication.)

IMHO, there are two ways one can proceed with automating Joomla installation:

At any rate... Without an automated installer, the Joomla demo site grows out-of-date periodically.

---
Tags: joomla, demo-site
---


title: Additional info required on mail tokens

text:
# Question
Title: Additional info required on mail tokens
Was wondering if anyone could help. We need some mail tokens adding for membership details and event details so we can send out mass mails with personalised information in.

This isn't in civicrm as standard, wonder how other people have got around this?

# Answer
I am not sure if you are asking similar question to this one but my answer is the same so hopefully it helps you move forward.

Eileen did an extension that added some membership tokens to deal with contacts having multiple membership and which do work from 'contact'

{latestcurrentmembership.end\_date}

{latestcurrentmembership.allend\_date}

please let us know how you get on with it
> 2 votes

# Answer
In addition to Peter's great recommendation, check out Jamie McClelland's Summary Fields extension here for some of the info you may want to be adding as tokens to e-mails.
> 2 votes

# Answer
Scott,

If you are looking to create a token with specific event or membership information related to the contact, you'll need to write some custom code.

Here's a blog Coleman wrote on how to create your own tokens. https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit

You can probably ask Coleman directly if you go to CiviCON in London next week. :) https://london2015.civicrm.org/
> 1 votes

---
Tags: civimember, tokens, 4.6
---


# Question
Title: How to collect user and billing email address at same time?
I have a scenario where I am creating a membership form for minors, which is filled in by their parents. Therefore, I need to collect a 'billing' e-mail address which is different from the minor's e-mail address.

When I create a profile with an additional 'billing e-mail address' field in, it doesn't actually show up in the form.

Any ideas what I'm doing on? (using Civi for Wordpress)

# Answer
> 3 votes
At the moment contribution pages don't allow additional email addresses (they get stripped out). There is an open issue in JIRA but I believe it needs funding.

# Answer
> 1 votes
I realize it's not an option for you because you're on Wordpress, but for others who may encounter this issue, this is an excellent use case for the Webform CiviCRM Integration module for CiviCRM users on Drupal.

---
Tags: civicontribute, profile, email
---


# Question
Title: Why are commits to 7.x-master not included in latest versions of CiviCRM?
I had two pull requests committed to 7.x-master on GitHub over the past year.

When I view the two files that were changed by my pull requests, the changes are present in the master branch.

They do not appear to be included in latest download and I end up having to manually add them.

I was under the assumption that commits to master would be included in future releases. Is that not the case?

# Answer
> 1 votes
While Github is used for the code collaboration, co-ordination of which issues are fixed in which release is done on over CiviCRM's JIRA install.

In order to better ensure your PR was included in the next `4.6.x`, you could open an issue there and tag with appropriate versions (eg `4.6.10` for fix version), then reference the JIRA ticket in the Github PR.

---
Tags: upgrade
---


# Question
Title: Contributions made via Charitable gift funds
My organization sometimes receives gifts from Donor Advised Gift Funds. We need to thank the individuals who are in the contacts table but also need to mention the source of the gift as being the Donor Advised fund. What is the best way to enter a contribution received in this way?

# Answer
This is specifically why soft credit types were introduced. Record the donation as coming from the fund and add a soft credit for the individual. Donor advised fund is one of the types available by default.
> 1 votes

# Answer
Try to Create an Financial type using the same name "Donor Advised Fund"

So you can select all the contribution using financial type Id "Donor Advised Fund" and you can send an email designed for them
> 0 votes

---
Tags: contributions
---


# Question
Title: Is there a way to make the contact preview easier to read?
Here is what I am seeing with both Chrome and Firefox on CiviCRM 4.6.4 with Joomla 3.4.1. It's hard to read and a bit jumbled. Is this a bug or can it be adjusted somewhere?

# Answer
Here is the issue https://issues.civicrm.org/jira/browse/CRM-17484. This may help you to resolve issue.
> 2 votes

---
Tags: contacts
---


title: Entering Matching gifts

text:
# Question
Title: Entering Matching gifts
My organization receives gifts which are then sometimes matched by an employer. As it stands now, we are entering the original contribution with no indication of a potential or forthcoming match. Then when we receive a match, we enter a second contribution for that individual and we fill in the Matched From and Matched Amount fields. Is this the proper way to enter these transactions? I had thought that entering these fields in the original contribution would add the matched amount to the total for that individual but it doesn't which is why we enter the second contribution with those fields. Assuming that this is the right way to do this, how can I generate a report which lists an individual's contributions and shows which are matching gifts? Related, what report uses the Matching Funds fields?

# Answer
> 1 votes
This isn't really the correct way to record matched gifts. Matched gifts should be hard credited (recorded against) the donor and not the fundraiser so to speak. It sounds as though your recording them against the fundraiser and therefore you could end up claiming tax/gift aid incorrectly. The way we would normally do this would be to record the second contribution against the Employer that carried out the matched giving. At this point you could create the soft credit to the employee. This way you'd see both original gift against the fundraiser and the soft credit for the matched gift also. You'd also get a good idea of the value of employers by virtue of recording the hard credit against them.

Hope that helps!

---
Tags: contributions
---


title: Upgrade Civi 4.0 to secure version

text:
# Question
Title: Upgrade Civi 4.0 to secure version
What is the easiest way to get a 4.0 version of CiviCRM up to date or at least to a secure version? Is it possible to import a MySQL dump from 4.0 version into a new clean 4.7 version?

# Answer
> 3 votes
Easiest thing to do is upgrade in stages, go from 4.0 to 4.1, then to 4.2 then you can try straight up to 4.6

This approach should mean you dont hit too many issues

# Answer
> 2 votes
At minimum you would need to upgrade to 4.4 - this is the current LTS version and is the oldest version which still receives security patches.

As Parvez recommended, upgrading in stages is sometimes smoother, although 4 versions is not such a big jump that you can't necessarily do it all at once. Always back up your database first, and if jumping straight from 4.0 -\> 4.4 doesn't work perfectly, try 4.0 -\> 4.2 -\> 4.4.

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


# Question
Title: Whats the difference between a case sequence and a case timeline?
Whats the difference between a case sequence and a case timeline? I can see one has an offset and the other doesnt, is that it?

# Answer
A **timeline** defines a **default schedule**. The default schedule may intentionally stretch over a long period of time (weeks or months). Activities can potentially be concurrent or reordered. For example, as soon as the case is opened, you schedule four activities:

* We should acknowledge the new case within a day.
* We should have a phone call with the client after 3 days.
* We should have an internal meeting after 3 days.
* We should file a report after 14 days.

A **sequence** defines a **list of back-to-back steps**. There's no particular length of time (days or weeks or months), but there is a very specific order. For example:

* As soon as the case is opened, we should send an acknowledgement. It should be sent as soon as we can.
* After the acknowledgement, we should make a phone call (as soon as we can).
* After the call, we should have an internal meeting (as soon as we can).
* After the meeting, we should file a report (as soon as we can).

Both are *idealized*; the real activities will happen on their own schedule. These idealized models aim to be easier to discuss/explain, but they lack nuance (e.g. conditionals, branches, merges). For more sophisticated processes, one might

(Note: Some of the early specwork for sequences and case-controllers can be found at https://civicrm.org/blogs/totten/customizing-civicase-workflows and http://wiki.civicrm.org/confluence/display/HR/CiviCase+Util . The architecture is basically unchanged, but several of the symbols changed during implementation. "Pipelines" were renamed to "Sequences", and all the new classes were moved to `Civi\CCase`.)
> 9 votes

---
Tags: civicase
---


title: Using Paypal with Authorize.net?

text:
# Question
Title: Using Paypal with Authorize.net?
Authorize.net boosts this http://www.authorize.net/solutions/merchantsolutions/merchantservices/paypal/

How would I configure CiviCRM to use the Auth.net payment processor for processing Paypal transactions ?

\[edit\] more current link https://developer.authorize.net/api/reference/features/paypal.html

# Answer
I had recently looked into this for our website, so I think I can answer this question.

First, it is important to understand what this is. It is not accepting PayPal through Authorize.net, which is what it sounds like.

What happens is you setup a PayPal account for your organization, and then you link it to your Authorize.net account. That linking though is only for a record of transactions. The funds collected through PayPal never make it to your Authorize.net account. So you are left with money in your PayPal account that you still need to manage.

The only thing this is good for is consolidating records, as all of your PayPal transactions will be recorded in your Authorize.net account along with your Authorize.net transactions.

For us, that was not worth it. If that is a benefit for you folks this sort of setup could work well.

Let me know if you have any more questions, or if you need me to clarify anything for you.
> 3 votes

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


# Question
Title: Membership Renewals with 'Partner' relationship causing membership lapses/missing contribution
Contact A has an expired Membership which was granting Membership to Contact B through 'Partner of' relationship. Contact B renewed after Contact A's membership expired through an online contribution page, and the record showed the contribution, however their membership had the status of 'Expired'. Not knowing what to do, we deleted the relationship from Contact B to Contact A, and then re-added it. Now Contact B shows no contribution and no membership. What happened, and is there a way to fix this?

Ultimately what we want is either Contact A or B to be able to renew the 'joint' membership - does Civi support this?

CiviCRM 4.6.7 on Drupal 7

# Answer
"Ultimately what we want is either Contact A or B to be able to renew the 'joint' membership - does Civi support this?" No it doesn't support this. Generally I think users work on assumption that reminders should only go to Contact A, andI would suggest preferably with a checksum to a renewal form that sets First/Last as read only to stop contact B clicking on the link in the email without checking who it was to, and hence avoid risk of having name overwritten
> 1 votes

---
Tags: civicontribute, civimember, relationships
---


# Question
Title: Paypal Pro update billing details for recurring payments link is broken after upgrading to 4.6. How to fix it?
Since I have upgraded to 4.6.4, the link to update the billing details from recurring payment receipts is broken. I get the following message from log. How to fix it please?

```
2015/07/08 13:34:52 [error] 23640#0: *14724 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot use object of type CRM_Core_Payment_PayPalImpl as array in /srv/www/sites/all/modules/civicrm/CRM/Core/Payment/Form.php on line 220" while reading response header from upstream, client: 185.59.126.253, server: abc.com, request: "GET /index.php?q=civicrm/contribute/updatebilling&reset=1&coid=17747&cs=0bf9ca34f74268e1ff962830b2162a05_1436189654_inf HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/adb.sock:", host: "rldb.info"

```

# Answer
This issue seems to have Fixed on Civicrm 4.6.9
> 1 votes

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


# Question
Title: Fatal error: Cannot redeclare _PEAR_call_destructors()
> Fatal error: Cannot redeclare \_PEAR\_call\_destructors() (previously declared in /usr/share/php/PEAR.php:735) in /www/htdocs/w010699b/de/wsk/prod/cms-crm/sites/all/modules/civicrm/packages/PEAR.php on line 811

Every time I do a module update I get this error message. With a second or third attempt, the system did a clean start again without this error. Today, after updating metatags, I couldn't start the webpage anymore due to this error.

So I renamed pear.php in civicrm/packages to pear.php.bak which let me access the homepage. Selecting another page resulted in errors due to the missing pear.php. So I renamed pear.php.bak back to pear.php and now it works correctly.

Obviously after a module update there is an attempt to declare pear functions a second time. But why? And how may I find what causes this error?

# Answer
If you only have one copy of CiviCRM, try disabling the other drupal modules you have on the site. It is possible that some other module also uses PEAR and has its own copy of it which could cause the above error
> 4 votes

# Answer
Please ensure that there is one and only one copy of CiviCRM in your sites/\*/modules directory. Renaming the old copy when upgrading is not enough, you must either delete it or move it out of your modules directory.
> 3 votes

# Answer
Been working on this the past few hours.

In our case, we had been using OG Mailinglist and Civi. It had been working for a year with this added to my php.ini file:

```
include_path = ".:/home/example/public_html/sites/all/modules/civicrm/packages:/usr/lib/php:/usr/local/lib/php"

```

After some upgrades over the weekend, we were having some issues with mail. Today I added this line to sites/default.settings.php:

```
ini_set("include_path", "sites/all/modules/civicrm/packages");

```

Everything appears to be functioning at the moment.
> 1 votes

# Answer
I have had the same error with a similar set of two sites each with all their own folders running on the same host.

I just upgraded drupal 7.39 to drupal 7.40 and then civicrm 4.6.8 to civicrm 4.6.9 with the same error mentioned above. .. I tracked it down to the PEAR.php file and have been getting that error for a long time - every time I upgrade civicrm. I have searched my entire set of folders from the host top level and have a PEAR.php AND a PEAR5.php (both) under each site's civicrm packages folder. .. I've been renaming the PEAR.php file every time I upgrade civicrm for more than a year. .. And each site for each has all it's own drupal folders so no overlap - I update each site's folders independently (since understanding the old drupal multi-site will be deprecated in the future). .. If this is because I have two sites with separate folders for drupal and civicrm, it seems like the PEAR.php error should be independent too - where is the PEAR update happening?

\[Error: undefined\]

The civicrm upgrade from 4.6.8 to civicrm 4.6.9 is the first time that this new error occured

```
Exception: "Queue runner must be configured before execution. - onEnd"

```

# 0 /home/jandbweb/public\_html/jandbweb/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php(106): {closure}()

# 1 /home/jandbweb/public\_html/jandbweb/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(102): CRM\_Queue\_ErrorPolicy-\>call(Object(Closure))

# 2 internal function: CRM\_Queue\_Page\_AJAX::onEnd()

# 3 /home/jandbweb/public\_html/jandbweb/sites/all/modules/civicrm/CRM/Core /Invoke.php(278): call\_user\_func((Array:2))

# 4 /home/jandbweb/public\_html/jandbweb/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM\_Core\_Invoke::runItem((Array:4))

# 5 /home/jandbweb/public\_html/jandbweb/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM\_Core\_Invoke::\_invoke((Array:5))

# 6 /home/jandbweb/public\_html/jandbweb/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM\_Core\_Invoke::invoke((Array:5))

# 7 internal function: civicrm\_invoke("upgrade", "queue", "ajax", "onEnd")

# 8 /home/jandbweb/public\_html/jandbweb/includes/menu.inc(527): call\_user\_func\_array("civicrm\_invoke", (Array:4))

# 9 /home/jandbweb/public\_html/jandbweb/index.php(21): menu\_execute\_active\_handler()

# 10 {main}
> 0 votes

---
Tags: drupal, upgrade
---


# Question
Title: Can you include CiviCRM ID in exported fields?
Our administrator needs to export email addresses for households and individuals complete with CiviCRM ID so that an audit of imported data can be undertaken. However, CiviCRM ID isn't available in the select fields stage of contact export. Is there any way to work around this?

# Answer
Hmm, I export this all the time. Maybe it isn't named what you think it's named. It's called "Internal Contact ID" in the pull down menu.

If you don't find this what version of Civi are you using?
> 6 votes

# Answer
Yes, our administrator found it as Internal Contact ID - just a little confusing when it is named differently when displayed!
> 0 votes

---
Tags: contacts, export
---


title: Is Civi Mobile and Tablet Ready

text:
# Question
Title: Is Civi Mobile and Tablet Ready
Can Civi be accessed via the iPhone or Android phones and what about on the iPad or other tablets?

# Answer
In addition to CiviMobile and Cividroid, the full CiviCRM app works reasonably well on a tablet, particularly for public-facing pages - and work is underway to make it fully responsive. You can give it a try from a tablet at http://demo.civicrm.org and see if it meets your current needs.
> 6 votes

# Answer
There is a beta Android app that a Google Summer of Code student did - Cividroid - see here.

And there is CiviMobile, a very basic mobile version written in jquery I believe for a mobile browser that needs some more work.
> 4 votes

# Answer
We've had to do some work to make it better on mobile, see https://donate.creativecommons.org/ for example. We're continuing to make it easier to make a donation on mobile.
> 0 votes

---
Tags: mobile
---


title: MySql vs MariaDB

text:
# Question
Title: MySql vs MariaDB
After some reading, it appears that MariaDB could be a better challenger to MySQL and it runs, apparently, without any problems with CiviCRM (cf CiviCRM on MariaDB instead of mySQL).

But what about future compatibility? On the MariaDB FAQ they say

> MariaDB 10 takes a different approach. While retaining close feature compatibility with MySQL, there are enough differences and enhancements so that it makes sense to start a new numbering scheme...

It's possible that in a near future, there will be too many differences between MariaDB and MySQL, and the compatibility will fall in the background. It is only a supposition.

But, will CiviCRM continue to develop only for MySQL, or could it be developed for both? Or (better for a 10-year user) for PostgreSQL? PostgreSQL, as a community driven project, is ethically closer to the Civi community than Oracle, I would think. (It's not a troll ;-)

Alongside that, some time ago, I had seen some posts about Doctrine and Civi. Has that integration gone forward?

In short: what DBMS would you advise for a new project with 200 000 contacts?

# Answer
Don't overthink it, and don't go out on a limb without a worthwhile reason. So long as MariaDB is truly a drop-in replacement for MySQL, you're fine with that. If somehow MariaDB ceases to be compatible, you'll be able to do an export/import to MySQL, assuming you haven't upgraded your server irreversibly *and* deleted all of your backups from before then.

As a rule of thumb, if you stick with the versions that come with the most recent couple of Ubuntu LTS releases, you'll have enough company that CiviCRM wouldn't dare leave you in the dust.
> 5 votes

---
Tags: database
---


title: Payment Processor Error

text:
# Question
Title: Payment Processor Error
I am logged into our website, setting up a Contribution Page, and I need to set up a Payment Processor, but I am receiving and error message: \****The 'administer payment processors' permission is required to add or edit a payment processor.\****

# Answer
Error seems to be self explanatory, You need to have `administer payment processors` permission to Add, Update, or Disable Payment Processors.

If you're an admin, you can grant this permission by navigating to

Administer -\> Users and Permission -\> Permissions(Access Control)

and click on `Drupal/Joomla/Wordpress Access Control` w.r.t your CMS.
> 2 votes

---
Tags: payment-processor
---


# Question
Title: Creating Smart Groups based on multiple relationship types
Our company is made up of 'societies' which we have added as organisations (we have around 370 societies). Each society has anything from 90-800 'members' which we have added as individuals and given the relationship type 'member' to the specific society they belong to.

Each society also has a committee of around 10-15 individuals, these committee members have the relationship type 'member' as well as a committee relationship type of 'society chairman' or 'society treasurer' or 'society events secretary' etc etc. There are around 30 of these committee relationship types.

What we are trying to create are 'committee smart groups'

I can create smart groups based on one relationship type, so:

* Individual
* with Relationship - 'Society Chairman'
* with Target Contact - 'Example Society 1'

But this gives me one individual, what I want to search is:

* Individual
* with Relationship - 'Society Chairman' OR 'Society Treasurer' OR 'Society Events Secretary etc.
* with Target Contact - 'Example Society 1'

I cannot however, seem to be able to select more than one relationship type at a time, meaning my smart group is only based on one relationship type. I can select multiple contact types or activity types, so wonder why relationship types do not have the same functionality. Does anyone have a solution to this?

# Answer
> 1 votes
Probably the easiest way is to create a smart group for each relationship type using advanced search as you've highlighted and then create a 'master' smart group which is anyone who belongs to either child smart group.

The other option would have been to use search builder but at present (v4.6.9) relationships aren't supported yet.

---
Tags: relationships, smartgroups
---


# Question
Title: Renamed Contact type does not show on reports
I have changed the built in contact type from Individual to Member. This shows on the contact screen as Member but in the contact reports it still shows Individual. tried to create a new type but it was "based on" Individual" and I had te same outcome.

# Answer
> 2 votes
Another option, and one that will probably make your life a lot easier, would be to use the CiviCRM word replacements feature and simply get the system to translate 'Individual' into 'Member'. Would save any core changes and word replacements wont affect upgrade paths etc.

As per Erik's comments, I wouldn't change the core type.

# Answer
> 0 votes
You should be able to create a subtype called Member. I would not recommend renaming the built in contact type as the CiviCRM functionality will expect it be a around. If you create a new contact subtype, some reports will still show individual as they show the database field 'contact\_type' and not 'contact\_sub\_type'. You would have to change those reports, I would imagine contact subtype might be a selectable field on the report anyway.

Are you looking at the standard CiviCRM reports (and which ones) or do you have customised reports?

---
Tags: civireport, contact-types
---


# Question
Title: A/B Tests not tracking opens or clickthroughs
I'm testing out the A/B testing feature and I'm not getting any useful information. It just reads "Tracked Opens" as "n/a" and reads zero for click throughs and unsubscribes. This is despite me opening the emails and clicking through on links.

# Answer
> 1 votes
We are using tracking on A/B testing and it works fine, it might be something about your configuration.

Can you check on the source of the received message if \- the links you put are transformed into something else (ie. if you put google.com, it will be replaced by yoursite.org/sites/all....) \- you have an extra image with a src=yoursite.org/...

if they aren't them, you might have disabled the tracking, could check on the tab in your mailing if they are checked (track open and track clicks?)

---
Tags: civimail, abtesting
---


# Question
Title: CiviSEPA payment page asking for credit card informations
I updated CiviCRM to 4.4.19 and the civisepa module through git. Since then, instead of the BIC/IBAN informations required for SEPA payments, the contribution page displays a non-functioning credit card selector:

I cannot find anything wrong in the payment processor config, which is correctly set as sepa\_dd.

# Answer
The problem was that the existing payment processor had the wrong payment\_type (historical reasons) and civicrm didn't display the direct debit block but defaulted to the "dummy card" one.

Changing the payment processor type to direct debit (2) solves the problem
> 2 votes

# Answer
@Ash\_crow, I haven't encountered this problem yet.

Could you please go ahead and create a ticket on https://github.com/Project60/org.project60.sepa/issues? Could you also add some more information (like your CiviSEPA version and the setup of your contribution page)?
> 0 votes

---
Tags: civisepa
---


# Question
Title: Has anyone used CiviCRM on a 10" tablet?
I am working on a nightshelter signin application in CiviCRM, and the suggestion is to use a 10" tablet. I'm not sure this would work although the menu is much simplified. (I have a 7" tablet and it would be pretty unusable on that). Has anyone used CiviCRM on a 10" tablet? Was it usable?

# Answer
The main factor is probably the resolution of the tablet rather than its size, but the UI is in general meant to be used with a keyboard and a mouse (or very very pointy fingers ;)

For the mobiles, they have been several projects to provide a subset of CiviCRM features available.

If the aim for the tablet is "only" to do the registration, using drupal as the CMS+bootstrap as the theme+webform+webform civicrm should allow you to have a user friendly form tailored to your need that will push the data in civicrm (create the contact, the activity and the case for instance), to be used later with the "full" civicrm from a laptop

X+
> 5 votes

---
Tags: 4.6, mobile, usability
---


# Question
Title: Does Payflow Link support recurring billing with CiviCRM?
I want to know if it's possible to use Payflow Link's recurring billing option with CiviCRM.

There is some information in the forum about how it needs to be implemented yet.. but it's unclear to me whether it's about using Recurring with Paypal Pro or with Payflow Pro. It looks like it's talking about using Payflow recurring with Website Payments Pro, which I didn't know was an option. Could someone please clarify? Thanks. https://forum.civicrm.org/index.php?topic=29346.0

# Answer
Last I looked into it PayflowLink supported it - but the code integration was not written for CiviCRM.

However, that code was written quite a while ago and I believe that paypal has moved on & now prefers a different interaction with them is used. That might mean adding recurring would create more work. However, I would note that it only changes the nature of the 'development gap' - the short answer is that extra work is required to get recurring payments to work with Payflow Link. If you want to do that work, or commission it then I can help give development advice on it - but you might want to look at whether you are better off using a processor with existing recurring support (e.g. IATS, Stripe, Authorize.net, eway etc).

Note that if you do look into IATS you should use this link http://home.iatspayments.com/civicrm-referral \- if you are referring yourself you can put the referrer $ to CiviCRM core team I believe
> 2 votes

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


title: Problem Exporting Contacts

text:
# Question
Title: Problem Exporting Contacts
I'm running Civi 4.6.7 on Joomla 3.4.3 and I'm getting an unknown error anytime I try to export. Please see the link below for a video of the process and what I'm encountering.

http://screencast.com/t/EQZJUI8R

I tried "Select Fields for Import" and used a save field mapping and it exported the data just fine.

I also attempted to export a smaller number of records and did not receive any errors. I enabled debugging and backtrace on our Dev site and this is what it was giving me:

OregonJohn, I tried "Select Fields for Import" and used a save field mapping and it exported the data just fine.

Lesley Evensen, I also attempted to export a smaller number of records and did not receive any errors. I enabled debugging and backtrace on our Dev site and this is what it was giving me:

`#0/mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(182): CRM_Core_Error::backtrace() #1internal function: CRM_Core_Error::handle(Object(DB_Error)) #2/mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error)) #3/mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...") #4 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...") #5 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...", "DB_Error", TRUE) #6 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1317 ** Query execution was interrupted") #7 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError() #8 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...") #9 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2442): DB_common->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...") #10 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...") #11 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(325): DB_DataObject->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...") #12 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(1192): CRM_Core_DAO->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...", TRUE) #13 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Export/BAO/Export.php(673): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,...") #14 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Export/Form/Select.php(434): CRM_Export_BAO_Export::exportComponents(TRUE, (Array:0), (Array:7), "sort_name asc", NULL, NULL, 1, NULL, "civicrm_task_action_temp_3f2778dfd0b04a5460a46020efe47476_1756", 0, 0, (Array:11), "AND") #15 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(345): CRM_Export_Form_Select->postProcess() #16 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/StateMachine.php(164): CRM_Core_Form->mainProcess() #17 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Export_Form_Select), "next", "Next") #18 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Export_Form_Select), "next") #19 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Export_Form_Select), "next") #20 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("next") #21 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:4), (Array:0)) #22 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13)) #23 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4)) #24 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm.php(116): CRM_Core_Invoke::invoke((Array:4)) #25 /mnt/data/vhosts/xxx/httpdocs/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke() #26 /mnt/data/vhosts/xxx/httpdocs/libraries/cms/component/helper.php(392): require_once("/mnt/data/vhosts/xxx/httpdocs/administrator/compone...") #27 /mnt/data/vhosts/xxx/httpdocs/libraries/cms/component/helper.php(372): JComponentHelper::executeComponent("/mnt/data/vhosts/xxx/httpdocs/administrator/compone...") #28 /mnt/data/vhosts/xxx/httpdocs/libraries/cms/application/administrator.php(98): JComponentHelper::renderComponent("com_civicrm") #29 /mnt/data/vhosts/xxx/httpdocs/libraries/cms/application/administrator.php(152): JApplicationAdministrator->dispatch() #30 /mnt/data/vhosts/xxx/httpdocs/libraries/cms/application/cms.php(252): JApplicationAdministrator->doExecute() #31 /mnt/data/vhosts/xxx/httpdocs/administrator/index.php(47): JApplicationCms->execute() #32 {main}`

Any help would be appreciated.

Thanks!

# Answer
One possible cause of this is that you are hitting performance issues on exporting groups which is appearing as this error.

One way of checking this is 1) upgrade to 4.6.10 2) Swap the codebase for the Fuzion version of 4.6.10 http://dist.fudev.co.nz/by-date/latest/4.6.10.0/ \- you can switch between the Core codebase & the Fuzion codebase safely. However, we reverted some changes in Fuzion that added functionality but hurt performance around groups so testing on our codebase may allow us to rule this in or out as the cause of your problem.
> 1 votes

---
Tags: export
---


title: Paypal IPN failure -

text:
# Question
Title: Paypal IPN failure -
As referenced here and other places in the forum:

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

IPN's from paypal are apparently not passing muster with CiviCRM. The errors in the log are somewhere along the lines of "Could not find an entry for contactID in GET". This log is generated by testing using curl, like so:

curl -k -X POST -d "\[paste in IPN params from Paypal IPN log\]" https://oursite.org/sites/all/modules/civicrm/extern/ipn.php?reset=1&contactID=\[contact\_id\]&contributionID=\[contribution\_id\]&module=contribute

The words in brackets are my substitutions; clearly there is an integer contactID in the GET request; what's going on here?

UPDATE: More perplexing is that the civicrm\_system\_log table varies depnding on how the IPN is sent. From Paypal, it shows all the info from the IPN as it's logged in Paypal - with the GET parameters first, followed by the POST parameters, all within the same JSON-looking structure, in the log table's 'context' field. If I simulate a re-send of the same IPN using curl as described above, the parameters from the GET part of the request are missing from the context field. I'm not sure if they're supposed to show up in the log or not, as it seems the POST variables are what show up in the log, so it's a little tricky to know how to debug this.

In any event, the actual IPN's that came through from Paypal, and which Paypal says were met with 500 errors, are logged in the database, and there are no corresponding entries in Civicrm.\[hash\].log from those times indicating any errors, so presumably the IPN should have processed correctly. This is rather complicated and confusing.. could someone please help?

Update: Including the GET data in the curl request with -X GET -d "reset=1&contactID=\[contact\_id\]&contributionID=\[contribution\_id\]&module=contribute" results in a "302 found" response, but no more information than that, and I cannot find any evidence in the database log of the request, and there is no mention at all in Civicrm.\[..\].log.

Addendum: The PayPal IPN simulator reports that it cannot successfully handshake with either the dev or live sites. That is strange considering that IPN logs are appearing in the live site's civicrm\_system\_log table..

UPDATE: Apparently here's what was happening. I have a Civi extension where I call a function defined in a Drupal module, and the 500 error was about calling an undefined function. I fixed that in the extension code, but the function in question called the Drupal watchdog(..) function, which is also undefined in the context of being called from ipn.php. So here's a better question: What's the solution to this problem? Do I edit ipn.php and bootstrap Drupal before doing anything else? It seems odd that, just for IPN's, something would break because it is not running under the same assumptions that the rest of Civi runs under.. of course, I could also switch from Drupal watchdog in my extension to whatever the Civi equivalent is.. any suggestions?

# Answer
> 2 votes
We have a little trick for this situation.

This extension

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

allows you to replay processing IPNS from the system log - e.g after installing try

drush cvapi NotificationLog.retry system\_log\_id=xxx

# Answer
> 1 votes
a 302 redirect doesn't redirect the POST data, which is what I suspect your issue is.

The best solution is to use an IPN URL that doesn't need redirection. If that's not an option, see here for how to use a 307 redirect (which maintains the POST data) and see if that solves your problem.

---
Tags: civicontribute, paypal, ipn
---


# Question
Title: Soft credits created via API/hook_civicrm_post are automatically deleted in Civi 4.6
I have a custom extension "Automatic Soft Credit", which replicates a function from Raiser's Edge - if contact A has the relationship "Automatically Soft Credits" to contact B, then any contributions for contact A will automatically be soft credited to contact B.

In Civi 4.4, this function worked fine. In Civi 4.6, the soft credit is successfully created - and then immediately deleted! The `$result` below returns success, but the soft credit isn't in the database - but the auto-increment happens, so it seems to be created then deleted.

After some experimentation, I found that if I try creating a soft credit to a DIFFERENT contribution, it works. Confusing!

What could be happening after `hook_civicrm_post` that would cause a soft credit attached to the contribution to be deleted?

```
function automaticsoftcredit_civicrm_post( $op, $objectName, $objectId, &$objectRef ) {
  if($op == 'create' && $objectName == 'Contribution'){
    $cid = $objectRef->contact_id;

    //Look up whether this person has a relationship_type_id that's automatically soft credited
    $params = array(
     'version' => 3,
      'sequential' => 1,
      'contact_id_a' => $cid,
      'relationship_type_id' => 11, //FIXME: This relationship_type_id is currently hardcoded, we should load it from settings
    );
    $result = civicrm_api('Relationship', 'get', $params);
    //if we have the auto soft credit relationship for one or more contacts, create a soft credit for each
    if($result['count'] > 0) {
      unset($params);
      foreach ($result['values'] as $relationship) {
        $params = array(
          'sequential' => 1,
          'contribution_id' => $objectId,
          'contact_id' => $relationship['contact_id_b'],
          'amount' => $objectRef->total_amount,
        );
        $result = civicrm_api3('ContributionSoft', 'create', $params);
CRM_Core_Error::debug_var('result', $result);

      }
    }

  }

```

# Answer
> 1 votes
This is to do with code introduced in CRM-16804, and is specific to soft credits. It's not a generic API issue as I'd feared. I'll update this answer with a more complete solution once I've nailed it down.

---
Tags: api, hooks, developer
---


title: New User setup?

text:
# Question
Title: New User setup?
How do we add a user to our website? I know you think we need more to this question, but we just want one more staff person to be able to access the backend of the web site and registration.

Erika Dvorske

# Answer
It sounds like you are asking how to give a user a CMS account - which would depend on what type of CMS it is - joomla, drupal or wordpress - and if so you will find answers on their documentation i suspect.

If you already have a user but they don't have access, then you need to check their CMS permissions. hth
> 3 votes

---
Tags: civievent
---


# Question
Title: How hard is to begin develop for MS CRM after being good CiviCRM developer?
I know that MS CRM's platform is .NET and CiviCRM's PHP. Nevertheless we are looking for MS CRM developer with no result so I am wondering how hard it could be for somebody with knowledge od CiviCRM to develop for MS CRM.

Thanks

# Answer
> 2 votes
That is hard to answer :-). If I look with the perspective that developing for a CRM as being an integrated bit of software where a change can have impact on many levels, it should be roughly the same. And therefore not too difficult.

If I look from the perspective of it is just another programming language it is not too hard either. Personally I have developed in RPG400 (when I was still young and innocent), Visual Basic and now PHP/jQuery.

On the other hand, developing in an open source world where everyone is focused on sharing knowledge is a completely different ball game from developing in a closed source world where knowledge might be less easily shared can be very different.

# Answer
> 1 votes
Development is development, so switching from one language to another isn't that difficult, but...

It would be faster to start with someone knowing .NET and having her learning MS CRM than starting with someone knowing CiviCRM to learn .NET AND MS CRM.

Beside, finding civicrm developers is probably as hard as finding ms crm developers, so trying to convince one that is likely to be in high demand to give up on that knowledge and start learning a new CRM/language is probably not going to be that successful.

Good luck, finding good developers is difficult, no matter the language/software

---
Tags: cms-integration
---


title: GetCount not implemented on 4.4?

text:
# Question
Title: GetCount not implemented on 4.4?
It appears that the Contact GetCount API is not working properly in 4.4 to retrieve group counts. I can code around it by switching to Get which works fine, but wanted to see if there was something I was missing. (I'm upgrading from a 4.2.6 site which works fine.) My specific example is a smart group, but I've tried non-smart groups as well with the same result.

Using the api/explorer ....

**On my 4.4.19 test site**

The GetCount is wrong

/civicrm/ajax/rest?json=1&sequential=1&debug=1&&entity=Contact&action=getcount&group=82 returns { "is\_error":0, "result":1 }

But the get is right /civicrm/ajax/rest?/civicrm/ajax/rest?entity=Contact&action=get&debug=1&sequential=1&json=17&group=82 returns ... "count":9, ....

**But on my 4.2.6 live site**

The GetCount and Get are both correct

/civicrm/ajax/rest?json=1&sequential=1&debug=1&&entity=Contact&action=getcount&group=82 returns { "is\_error":0, "result":8 }

/civicrm/ajax/rest?/civicrm/ajax/rest?entity=Contact&action=get&debug=1&sequential=1&json=17&group=82 returns .... "count":8,

# Answer
> 1 votes
I have just checked the API call in Civi 4.4 installation and the getcount with the group parameter on Contact does not work.

Also the API call on GroupContact does not work either. What you could do is probably write a small extension which includes a getcount api for Group memberships.

# Answer
> 0 votes
That error does not ring a bell to me and we use CiviCRM 4.4 (and the API) quite a lot. As Jitendra already tried on the demo site I will give it a try on one of my installs...and the getcount on the contact works perfectly in the API explorer?

---
Tags: api, groups
---


# Question
Title: Membership Name-Your-Own Price (above Minimum) on Contribution Page
How can we enable users to enter a custom amount above the minimum fee when they are creating or renewing their membership through a contribution page?

For reference, this is the membership structure we want:

* Annual Member ($25/annual) auto-renew optional
* \[Other types\] ($\[*x* fixed\] / annual) auto-renew optional
* Sustaining Member ($\[user-custom \>= 10\] / month) auto-renew required

We're having trouble with the last one - on contribution pages, the fee shown for "Sustaining Member" is fixed at $10 and there is no option for users to input their own price (e.g., a textfield).

From the CiviCRM Book, "Defining Memberships" section,

> …we have an option to encourage people pay more than the minimum for a membership if they want to.

I have found no way to enable this, even through membership price sets (we **don't** want to create discrete increments, e.g. $10/15/20/25/etc.), nor through integration with Drupal webforms.

EDIT:

Here's a mockeup of what we'd like the membership signup form to look like, if it helps:

# Answer
I gather you are not looking for a development solution (ie. extension, custom template, etc.) since the API/template system is extremely extensible.

If that is the case you might consider creating a button or link on the form (if you are slick you might adjust the css or use jquery to place it in the price-set.) that takes the user to a separate contribution page with the name your own price.

I realize it does not match the mockup but it may serve the functional requirements.
> 4 votes

# Answer
The basic feature described here has been available for many years. This is what's described in the book. However, the specific need for auto-renew may cause trouble, as would the clutter of fields presented to the user.

For the basics:

* Don't use a price set.
* On the contribution amounts tab, make the contribution amount section active and allow other amounts.
* On the membership tab, check the boxes for the membership types you want to offer and require membership signup.

The result is that you select the membership type and then enter the amount you'd like to pay. The contribution page will enforce the minimum amount for your membership type.

Here are the caveats, however. First, it won't look like your mockup. The open-ended amount field (and any fixed contribution amounts you pick) will be below the membership types. Members may be confused by having to pick the type and then the price. This will also apply to all membership types on the page, not just one.

Second, I'm not certain that recurring membership dues will charge the custom contribution amount for the subsequent payments. You may find that it charges the minimum for the membership type.
> 3 votes

# Answer
At a client of us they have the same use case. They have a membership of a minimum fee of 5 euro a year but it could be anything more than that.

They don't have online payments but their memberships are payed by direct debit each quarter. (1st of Januaru, 1st of April, 1st of July, 1st of October).

We have created a custom membership api which allows to easily create new memberships. E.g. also dividing the yearly membership contribution by 4 quarters and creating 4 membership contributions.

The client has on their drupal website a custom drupal module which includes a form for signing up for a new membership. The backend of this form uses the custom API.

Again it is somehow extended by development.
> 3 votes

# Answer
Within a price set, you can add a text/numeric field and set the price of that text field to 1, and also turn off the option to display the amount. This will allow you the user to enter a contribution amount.

If you do not use a price set on the contribution page, there will be an Allow other amounts check box, on the Amounts tab. Once checked, there will be a min and max field.

Hope that helps,

--Ken
> 1 votes

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


# Question
Title: How can I add columns to the Accounting Batch screen?
I would like to modify the screen at http://mygroup.org/civicrm/batchtransaction?reset=1&bid=332

Specifically, I would like to add columns to the tables listing the transaction records. Which CiviCRM file would I need to override?

# Answer
You could do this by amending the profile used by the batching page? For instance on the Drupal demo site the Reserved profiles show a profile for batch contributions. So you should just add the fields to that and they'll shown on the form?
> 1 votes

---
Tags: civicontribute
---


# Question
Title: Where can I find out more about the changes made from one version of Civi to another?
Do you need to find what changes were made from one Civi version to another - say 4.6.6 to 4.6.9? Where can you find that?

# Answer
Go to the 'Jira' - the issue tracking platform used by the CiviCRM project - at https://issues.civicrm.org/jira/browse/CRM/?selectedTab=com.atlassian.jira.jira-projects-plugin:changelog-panel
> 1 votes

# Answer
On Jira at issues.civicrm.org, you can get the specific version that issues have as "fix for": https://issues.civicrm.org/jira/issues/?jql=project = CRM AND fixVersion = 4.6.10

(Yes, those are spaces in the URL--your browser will replace them with "%20" for you.)

Just replace "4.6.10" in the URL with the version number you're interested in, or just use the filter above the results:
> 1 votes

---
Tags: issues, 4.6, 4.6.8
---


title: CiviEvent Participant Import

text:
# Question
Title: CiviEvent Participant Import
I have about 4,500 rows of participant that I would like to import. In each row is a column for the CiviCRM internal ID and columns for the requisite information about the event.

When I upload the CSV file about 400 rows are imported and for each of the other rows I get this error "Matching Participant record not found for Participant ID 10180. Row was skipped." Of course the ID number changes for each row.

I have cross-checked several rows and the IDs are valid.

The file is a CSV file so Excel formatting should not make a difference but I tried changing the field format and a few other things in Excel. Nothing has worked.

There are many duplicates in the list but not 4,000. I have the duplicate setting set to update.

I appreciate any help.

# Answer
I re-ran the import with skip for duplicates and it worked perfectly. For my case this fixed the problem.

-Josh
> 1 votes

# Answer
After an import the failed rows are included in a new CSV file which you could download. That file contains the errors and per row why it failed.

It could be basicly something as invalid e-mail address e.g.
> 0 votes

---
Tags: civievent, import
---


# Question
Title: "Abandoned" Ubercart orders marked as "completed" in CiviCRM
I'm using Drupal (7.38), CiviCRM (4.6.5), Ubercart (7.x-3.8) and Ubercart\_CiviCRM (7.x-4.x-dev). Whenever a user (registered/anonymous) purchases a product from the site, a contribution will be added into the CivCRM contact. If the user is anonymous, the system will create a user in Drupal as well as a contact in CiviCRM, linked by the email address. I notice some of the orders have a status of 'Abandoned' in Ubercart, but under CiviCRM's contribution tab for this contact, it is listed as 'Completed'.

I have gone through the `uc_civicrm` module and I found the following code in uc\_civicrm/uc\_civicrm.module

```
function _uc_civicrm_map_contribution_status($order_status) {
  // NOTE: There may be a more "correct" way to do this.
  $map = array(
    "completed"        => 1,
    "payment_received" => 1,
    "pending"          => 2,
    "processing"       => 5,
    "canceled"         => 3,
    "in_checkout"      => 5,
  );

  if (array_key_exists($order_status, $map)) {
    $id = $map[$order_status];
  }
  else {
    // Oh no.
    $id = 1;
    watchdog('uc_civicrm', 'There is no status that maps to %order_status, marking as "Complete"', array('%order_status' => $order_status), WATCHDOG_WARNING);
  }

  return $id;
}

```

I want to synchronize Ubercart's order status with the CiviCRM contribution status. How can I do that?

# Answer
> 1 votes
If you want to map 'abandoned' to the 'canceled' status in CiviCRM (there is no "abandoned" status in CiviCRM) you could revise the above like so:

```
$map = array(
 "completed"        => 1,
 "payment_received" => 1,
 "pending"          => 2,
 "processing"       => 5,
 "canceled"         => 3,
 "abandoned"         => 3,
 "in_checkout"      => 5,
);

```

Then I'd recommend making a bug report/patch on the issue you filed at the project page so it gets into the module core if the maintainers agree.

---
Tags: civicontribute, drupal, ubercart
---


# Question
Title: Batch alter Relationship Contact Permission only
While trying to alter Contact Relationships Permission ("Contact A can view and update information about Contact B") using this code:

```
$result = civicrm_api3('Relationship', 'create', array(
  'debug' => 1,
  'contact_id_a' => 111,
  'contact_id_b' => 111,
  'relationship_type_id' => 111,
  'id' => 111,
'is_permission_a_b' => 0, /* <- This was manually set as 1 and need to be altered */
));

```

we've got "duplicate relationship" error message

```
"error_message": "Duplicate Relationship"

```

Deprecated "setvalue/update" suggestion is *"Use "create" with an id instead."* and we do have all IDs in place. Does 'Create' for Relationships work as it works for Contacts or we've missed something?

**UPDATE 1**
After some debugging it has turned that we have exactly same situation described here How to change the direction of a relationship type with existing data , but we weren't aware that changing Relationship direction via GUI doesn't make change in a database. Sounds like another civicrm bug.

**UPDATE 2** Even after Relationship directions have been altered, same error "Duplicate Relationships" appears at an attempt to ALTER one of Relationship parameter using CREATE Action via CiviCRM Api.

# Answer
After some debugging it has turned that we have exactly same situation described here How to change the direction of a relationship type with existing data , but we weren't aware that changing Relationship direction via GUI doesn't make change in a database. Sounds like another civicrm bug.

We've ended up by direct Mysql intervention with this query (in case someone will face this issue in future):

```
UPDATE
 civicrm_relationship
SET
  contact_id_a=contact_id_a+contact_id_b,
  contact_id_b=contact_id_a-contact_id_b,
  contact_id_a=contact_id_a-contact_id_b
WHERE ** ... conditions set ...  **

```
> 0 votes

---
Tags: api, permissions, relationships
---


# Question
Title: How do I set up custom permissive relationships?
I am currently using D7.35 and Civi4.4.14

We have custom relationships on our Civi installation. What I would like them to do is give the individual permission to view and edit the organisation which for some reason worked in development and not in the real world.... I think because the first tick box is unticked.... right?:

So there are probably two questions:

1. Am I Right?
2. How can I get Civi to allocate this automatically?

There is a bit of further information.

Our developer custom coded the module designed for our member management system. So a Station Administrator (as per the picture) and promote or demote within his station without our intervention using a custom page where a number of relationships are managed.

# Answer
> 5 votes
There is an extension that does exactly what you're looking for:

Relationship Permissions as ACLs

The release on the extensions page only does 1 thing (setting permissioned relationships to *actually* give acl permissions to those contacts, which CiviCRM does not do by default) but if you download the extension directly from github, it has the feature you are looking for (automatically adding certain permissions for certain relationship types). I believe the reason you have to download that version manually is because of a dependency on another extension (also available from github) and the automatic extension downloader does not resolve dependencies.

# Answer
> 5 votes
Yes, that checkbox must be checked. (The one reflecting the specific "direction" you wish.

I don't think you can configure this to occur automatically, however since you have custom code, it should be possible to add the permission automatically using an API call (the parameter name I believe is `is_permission_a_b` or `is_permission_b_a`).

Here's an API call:

```
$result = civicrm_api3('Relationship', 'create', array(
  'sequential' => 1,
  'contact_id_a' => "",
  'contact_id_b' => "",
  'relationship_type_id' => "",
  'is_permission_a_b' => "",
  'is_permission_b_a' => "",
));

```

# Answer
> 1 votes
Relationship Permissions as ACLs doesn't fully work in CiviCRM 4.6.x (please refer to issue here https://issues.civicrm.org/jira/browse/CRM-17349)

There is a good news for "permissioned relationships" fans: sounds like CiviCRM (at least 4.6.10) not only allows "one to one" permissions via relationship; it has also build-in support for inherited permissions via relationships via "Allow second-degree relationship permissions" radio button at Administer-\>System settings-\>Misc .

It's truly brilliant for use cases, where (quote): **contacts with the permission to edit a related contact will inherit that contact's permission to edit other related contacts.**

---
Tags: permissions, relationships
---


# Question
Title: Is the Intuit processor active/functional?
I have a question from a group that uses Intuit with their POS system and were wondering if they could integrate their CiviCRM payments directly into that same account.

I see there is a Wiki page from 2013 about setting up Intuit payments, but I can't even get the extension to install on CiviCRM 4.6.8. (I copied the .zip file from Github and unpacked in the CiviCRM Extensions directory but it doesn't show in the Extensions list, even after refreshing. I assume this means the extension is stale / not functional with a recent version of CiviCRM)

Is anyone using Intuit or should I consider this a lost cause and go to plan B?

# Answer
> 3 votes
This is a pre-civix extension - which probably makes it one of the first extensions, period.

I tried building a civix extension and dropping the files in from Github, but it isn't showing up as a payment processor option.

That said - the code doesn't look like it's in such bad shape. A little bit of love would probably get this functional.

# Answer
> 2 votes
Just got done fixing a civi install that uses this. It doesn't exactly install like an extension. According to the wiki page on how to set this up, files need to be copied over like so from a cloned git to civicrm module:

CRM/Core/Payment/IntuitQuickbooks.php \>\> civicrm/CRM/Core/Payment/IntuitQuickbooks.php

CRM/Event/Payment/IntuitQuickbooks.php \>\> civicrm/CRM/Event/Payment/IntuitQuickbooks.php

CRM/Contribute/Payment/IntuitQuickbooks.php \>\> civicrm/CRM/Contribute/Payment/IntuitQuickbooks.php

---
Tags: extension, payment-processor
---


# Question
Title: Payment Processor Error message 9003: MD5 Verification failed after upgrade
After the recent upgrade to 4.6.9, I am getting this error when processing secure Authorize.net payments:

Payment Processor Error message 9003: MD5 Verification failed

My payment processor settings appear to be correct, including API Login, Payment Key, MD5 Hash and Site URL. I am using the Drupal 7 CMS and both settings.php and civicrm.settings.php are correct.

No other issues exist after the upgrade.

\*Edit:

I suspect the MD5 Hash value is wrong here, which has always been recorded as my store\_id. Should this be a transaction key, or does the hash value come from Authorize.net? Here's a snip from my log file:

```
    Nov 03 09:27:04  [info] $Fatal Error Details = Array
(
    [message] => Invalid value passed to getPayment function
    [code] =>
)

Nov 03 09:27:04  [info] $backTrace = #0 /home/example.com/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(364): CRM_Core_Error::backtrace("backTrace", TRUE)

1. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/PaymentProcessor.php(188): CRM_Core_Error::fatal("Invalid value passed to getPayment function")
2. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/ContributionBase.php(349): CRM_Financial_BAO_PaymentProcessor::getPayment("", "live")
3. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php(73): CRM_Contribute_Form_ContributionBase->preProcess()
4. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(455): CRM_Contribute_Form_Contribution_Main->preProcess()
5. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(94): CRM_Core_Form->buildForm()
6. /home/example.com/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_Contribution_Main), "display")
7. /home/example.com/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Main), "display")
8. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("display")
9. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)
10. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
11. /home/example.com/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
12. /home/example.com/public_html/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
13. [internal function](): civicrm_invoke("contribute", "transact")
14. /home/example.com/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
15. /home/example.com/public_html/index.php(21): menu_execute_active_handler()
16. {main}

```

# Answer
> 1 votes
I found the issue. The ca.civicrm.moneris extension folder was deleted during the drush civicrm-upgrade process.

As a result, my "Moneris Credit Card" Payment Processor Type disappeared and defaulted to Authorize.net (which uses an MD5 hash algorithm) after the upgrade. After restoring this, I entered my API token as opposed to the store admin password in the Payment Processor Edit form and my transactions are now working again. I have renamed this field label to "API Token."

---
Tags: civicontribute
---


title: Designation menu on contribution page?

text:
# Question
Title: Designation menu on contribution page?
brand new user here looking for design options. My user would like to have a drop-down menu on a generic contribution page so donations can be designated to 6 or so different possible choices by the donor.

I believe a more straight forward approach might be to have each designation be a separate campaign with it's on contribution page - but I need to look the drop-down menu option as well. Is it possible to put a drop-down menu on a contribution page? Is it possible to tie a selection made with the drop-down menu to the donation in a report somewhere?

Thanks in advance for all comments

Michael

# Answer
> 1 votes
You can add a custom drop-down "select" field to the contribution, then add the custom field to a profile on the contribution, optionally specifying it as required.

You'll then be able to search and report on your donations by custom field.

---
Tags: civicontribute
---


# Question
Title: How do I set a case open date and/or close date with a webform?
We've successfully got Webforms that open or close a case and assign a case role.

However, I can't seem to figure out how to specify a date to close or open the case. All submissions record the status change as today.

Is there a way to specify a case start and/or end date through the webform other than today?

I've tried adding activities to the form and using those dates, but that creates separate activities on those dates and does not apply the date to the change in case status.

# Answer
I don't think so, no. But then, I don't think you can do this through the regular CiviCase UI either.

Perhaps the solution would be to expose the opened and closed dates to the webform as fields? This would require patching webform\_civicrm/includes/utils.php to add them under `function wf_crm_get_fields`). If that works for you, please submit a pull-request back :)
> 1 votes

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


# Question
Title: CIVI-SA-2015-010: VERSION INFORMATION DISCLOSURE
The announcement of this security advisory (https://civicrm.org/advisory/civi-sa-2015-010-version-information-disclosure) does not provide a patch that can be applied, and examining the CiviCRM git repository of the new versions (4.4.20, 4.6.10) the change(s) made are not apparent.

Can anyone shed light on the changes made for this security advisory?

# Answer
> 4 votes
Fix for 4.6 is: https://github.com/civicrm/civicrm-core/pull/7101

Fix for 4.4 is: https://github.com/civicrm/civicrm-core/pull/7102

# Answer
> 1 votes
Sorry for the omission, I have updated the SA to show the relevant pull-requests, on which you can view the patches.

---
Tags: security-advisory
---


# Question
Title: Config file issue / civicrm 4.6.8 / could not load the settings file
when I try to add external links in mailouts i get the following link: https://MYDOMAIN.COM/modules/civicrm/extern/url.php?u=300&qid=8370

when I click on it, there is an error: Could not load the settings file at: /usr/share/drupal7/modules/civicrm/../..//default/civicrm.settings.php

Civicrm is part of Drupal 7 in my installation. my php version is PHP 5.4.45-0+deb7u1 (cli) (built: Sep 10 2015 08:34:47) the install runs on debian wheezy

please help..

edit: the problem seems to be in this function: function civicrm\_conf\_init() {

in the civicrm.config.php which is located here: /usr/share/drupal7/modules/civicrm/civicrm.config.php

# Answer
> 1 votes
I think CiviCRM expects to find the CiviCRM module in /sites/all/modules/civicrm, as per: http://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+Drupal+7

This affects the loading of the settings file, which is expected to be in a directory relative to this. We encounter the same issue and have a patch for it which we will submit back once it is a more generic fix.

# Answer
> 0 votes
Doesn't seems to be a solution to your specific problem but somewhat related and may help others.

The link `.../modules/civicrm/../..//default/civicrm.settings.php` is the default link when civicrm doesn't find civicrm.settings.php in another place.

In Drupal 7, if you have a site with multiple domains (e.g. example.com, subdomain.example.com), CiviCRM will only be able to find the proper civicrm.settings.php if you navigate using the main domain.

I have provided a patch so that civicrm can use the sites/sites.php to load aliases. This way, it's possible to have multiple domain in the same site and civicrm will not try to find the civicrm.settings.php in sites/default (which is not used in our case).

cf. https://issues.civicrm.org/jira/browse/CRM-17521

---
Tags: civimail, configuration
---


# Question
Title: View of CiviCRM Profile Fields on Drupal User Edit Page Permissions
How do I create a view which is embedded in a Panel overriding the Drupal User Page, which shows the data from a CiviCRM profile ONLY to the currently logged in user, and that user has permission to see their own data in CiviCRM. The goal is to make a pane which shows some basic information about their civi contact record, so they can click a link, and edit it, and return to see it changed. Thanks!

# Answer
To answer your question: "What permission would just allow users to see their own results of this view?"

**Views Solution** (if users still need to be able to visit other users' user-pages)

Picking up from Coleman's answer, using a contextual argument (we've used "CiviCRM Drupal match table: Drupal User ID" with success), you provide a "Default value" of 'User ID from the logged in user'. Then, *to limit the view to be viewable by each user only*, scroll down in the contextual argument window and "Specify Validation Criteria" with a "Validator" of 'User'. Only allow 'Numeric UIDs' and for "Action to take if the filter value doesn't validate", choose 'Hide View.'

When User X visits his/her own user-page, the view will display. However, when User X visits User Y's user-page, User X will not see the information the View provides.

**Drupal Permissions Solution** (if users do not need to visit other users' user-pages)

If authenticated users have the Drupal permission "View User Profiles" under the 'User' section, then all users who are logged in would be able to see the results of the view, if the view is otherwise unrestricted. If you remove that permission, your view would be limited to the logged-in user only.
> 1 votes

# Answer
To get a Drupal View to show only the civi data that belongs to the current user, set up a View Relationship to join the Civi Contact to the Drupal User. Then add a Filter using 'current user = Yes'. Should do the job. Hopefully my terminology is close enough to what it says on the page
> 3 votes

# Answer
You cannot embed a civicrm profile in a drupal view. Using the user id as an argument and a relationship to the contact, you should be able to construct a view that displays the contact data you want to show for the current user.

In the view header or footer you can place a link to either a civicrm profile form or a drupal webform with civicrm integration that will allow the logged-in user to edit their own contact record.
> 1 votes

---
Tags: drupal-views
---


title: Event Time Zone

text:
# Question
Title: Event Time Zone
My org has events that are often hosted online and participants who register to attend these events live all over the United States. When we create events we make sure to list the timezone in the "complete description" or "event summary" field inside the "info and settings" tab of event creation.

When event confirmation emails (Events - Registration Confirmation and Receipt (on-line) message template) are sent the event time is listed without any timezone info. This behavior makes sense because there is no where, in "info and settings" to configure timzone.

I've created a custom data field set that includes a timezone field and assigned the field set to events. However, I'm unable to add a token for that custom field to the message templates for events. Is there any way to add this information, or should I edit the template to remove any info regarding event time and, as part of the event creation workflow, require users to add the event times to the "confirmation email" text inside the "online registration tab"?

Thanks!

-tim

Using civi 4.4.19

# Answer
Tim -

If the timezone for the event is always the one used by your organization (for example, if you're located in New York, it's always ET), you could modify the Smarty template for event receipts to include the time zone in the date formatting.

One example: {$event.event\_start\_date|crmDate}

could become {$event.event\_start\_date|date\_format:"%A, %B %e, %Y %r %Z"}

which ends up as Saturday, January 16, 2016 08:52:00 AM EST

(see http://www.smarty.net/docsv2/en/language.modifier.date.format.tpl for the various date formatting options)

If your events are in various timezones, then yes, you'd probably have to capture that custom field in the template or perhaps include the timezone in the confirmation email text as you say.

Lesley
> 3 votes

---
Tags: civievent, tokens, message-templates, timezone
---


# Question
Title: What's the best way to assign a case role via the API?
When you assign a case role through the UI it creates lines in the relationships and activities tables. I can't find an equivalent through the API - I can create the relationship (which then shows correctly in the case UI), but it doesn't create any activity lines. Does that matter? Or is there a better way?

Edit: Running on Civi 4.5.8 on WordPress.

Cheers,

Andrew

# Answer
> 1 votes
Looking through the api code for relationships it doesn't appear to be case-aware. You can duplicate what happens in the UI by checking out CRM\_Contact\_Page\_Ajax::relationship(), and note near the bottom where it calls CRM\_Case\_BAO\_Case::createCaseRoleActivity().

Depending on what you mean by "api", that might not be exactly what you're looking for, but you should just be able to add a call to CRM\_Case\_BAO\_Case::createCaseRoleActivity() to the code you've written that already creates the relationship.

---
Tags: api, civicase
---


# Question
Title: Drupal Webform missing edit link for fields from CiviCRM database
Webform Form Components page does not show option to edit individual fields that are from CiviCRM database. Drupal fields work OK. This was working previously but is not working after upgrading versions. I have multiple instances and some forms show edit option and others do not.

# Answer
> 3 votes
Version incompatibility introduced in Webform version 7.x-4.12 and webform civicrm 7.x-4.13.

Upgrade webform civicrm to 7.x-4.14 solves problem.

Drupal issue https://www.drupal.org/node/2600878 details this.

---
Tags: webform-civicrm
---


title: New contact created every time I login!

text:
# Question
Title: New contact created every time I login!
I have no idea where to start looking to fix this issue. Every time I login as admin CiviCRM seems to create a new user contact for me. So there's currently a gazillion contacts for my email address (well, 10,000, which is nearly a gazillion).

I'm running CiviCRM 4.6.8 on WordPress 4.3.1.

# Answer
> 2 votes
I've just had a similar problem with a Joomla installation. It was a problem with the civicrm\_uf\_match table that (in Joomla) links CMS users to Civi contacts. Somehow the CMS user ID in that table was not the current user ID. Civi created a new contact because it could not match the Civi contact back to the user. I don't know how that matching happens in WordPress but it might be worth a look.

To solve in Joomla, I manually changed the CMS ID in the records in the uf\_match table to the correct, current CMS ID.

# Answer
> 1 votes
Since the last update, and since switching from MyISAM to InnoDB databases, the problem has resolved itself. I've a suspicion that it was a MyISAM vs InnoDB issue.

---
Tags: wordpress
---


# Question
Title: Display Custom Fields in Activities in Views
I'm on Drupal 7 and CiviCRM 4.6.10. In Views, I am trying to show all the activities and their custom fields (multiple choice options). However, I'm not able to get any results, the custom field was added but the field is blank. Is this an expected behavior?

# Answer
Nope. That is not expected behavior.

If you have two separate databases, one for Drupal and one for Civi, then you'll need to add the tables to the settings.php file. Until you add them, Views will show the fields as available but will display an error that the table could not be found.

Every time you add a new custom set of fields, you'll need to go to Admnister/System Settings/CMS Database Integration, copy the code there and paste it into your settings.php file.
> 2 votes

---
Tags: custom-fields, drupal-views
---


# Question
Title: How can I show users the mailings they have been sent?
I am using CiviCRM 4.6.x with Drupal 7.

I would like users who are logged in to be able to see a table or list of all of the mailings they have been sent. The should be able to click on the subject line (or some other link) in the list in order to see the full text of that mailing.

Can this be done and if so, how? In CiviCRM? With Views?

Thanks for any suggestions.

# Answer
> 5 votes
Yes you can do this with Views.

Important points:

1. Views must be configured to see the CiviCRM database in settings.php
2. Create a View for "CiviCRM Activities". "Bulk Mailing" is an Activity type
3. The 'link' to view the bulk mailing is probably best constructed via "replacement patterns" within the Drupal View. You get this link from the mailing itself, before it is sent. All mailings have a similar link pattern, but each a unique number
4. Create a Relationship in the view to the Drupal User. Limit the results to the "current user" or the "logged in user". I forget the precise wording. This shows them "their mailings" - rather than everyone's mailings.

---
Tags: civimail
---


title: How can I clean reports?

text:
# Question
Title: How can I clean reports?
Which is the procedure /command to cleaning (deleting the records) of any report? I have tried with "delete", but it seems to delete the form. Thank you.

# Answer
> 2 votes
You cannot take any action on a report other than:

1. add to group
2. export as CSV
3. print

If you want to take action on contacts, you would do so by

1. search (find contacts, find contributions, etc)
2. use the 'actions' menu, choose 'delete'

---
Tags: civireport
---


# Question
Title: backup and migrate Cannot delete or update a parent row: a foreign key constraint fails
I have tried to use backup and migrate from an existing system into a fresh Bitnami Drupal 7.4.1 Civicrm 4.6.9 install on another machine. Win10 BandM 7.x-3.1 I received the following error: PDOException: SQLSTATE\[23000\]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails in backup\_migrate\_source\_db\_mysql-\>\_restore\_db\_from\_file() (line 199 of C:\Bitnami\civicrm-4.6.9-1\apps\civicrm\htdocs\sites\all\modules\backup\_migrate\includes\sources.db.mysql.inc) I looked at the existing answers and am unable to get it to work. Please help.

# Answer
> 1 votes
Backup and Migrate module may not be compatible with CiviCRM, and may not understand how to handle the many foreign key constraints within CiviCRM.

Here is the easy way:

1. Drop the database entirely (back it up first please)
2. recreate that database with the same name
3. then restore from your backup.

Here is the hard way: Particularly, if a failed update has altered the table structure of your database, simply restoring may not work with any tool, because the schema has changed. More information: http://wiki.civicrm.org/confluence/display/CRMDOC/Ensuring+Schema+Integrity+on+Upgrades

---
Tags: backups
---