# Question
Title: How to use the API to query custom fields on activities?
Looking at the API explorer on the demo site it appeared that it's possible to query custom data on activities using the API.

However it seems that while the UI helps you select custom fields and set the values you want to search for, and there's no error submitting that, it seems completely ignored in terms of the query run.

I added a custom field set to Meeting activities on the demo (4.6.8 at 21 Aug 2015) and added a meeting activity with `foo` in a custom field, then queried this using the API explorer, but it seems to return *all* activities regardless of the custom\_*N* query.

The developer documentation says

> As with normal API parameters, you can set custom\_22 = 'Fred' in a get operation to filter for records that have custom\_22 ...

So is this a bug/unimplemented feature or am I doing something wrong? Is there a work around or do I go back to writing plain ol' SQL?

Thanks.

# Answer
The answer at the time of writing is that this is not implemented, so you can't use the API for this.

However, work has begun and you need to wait for issue CRM-16036 to be resolved and released.
> 1 votes

---
Tags: api, custom-fields
---


# Question
Title: Civimail delivering AND bouncing at the same time - what's missing?
I could use some help troubleshooting Civimail- I seem to have bounce processing working correctly except when a mailing goes out, all recipients bounce AND all recipients receive the email.

Any suggestions for where to start looking?

Using ()mail to send, and a return@domain.org google apps account for bounces.

# Answer
Figured it out finally: bad default setting in php.ini.

The isp had this param added by default: mail.force\_extra\_parameters adding "SMTP = smtp.myisp.net" to every outgoing mail sent by mail().

This caused every email to bounce when civi called qmail.

Sheesh. I want those two days back.
> 1 votes

---
Tags: civimail, email, bounce
---


# Question
Title: Notification of address change (for external accounting software)
Our office manager uses an older external software program for all our accounting and issues tax receipts from that program. At present, we are not using CiviCRM for contributions. We have the external program's Giving ID as a Contact custom field in CiviCRM (called 'Envelope #').

The rest of our staff use CiviCRM for all contact management in their departments, and our website users can update their own CiviCRM contact information directly from their Drupal user account. Lots of addresses could be updated, and our office manager would never know about them.

**How can our office manager be notified of any mailing address changes for only people with Envelope #'s?** That way, she can change the address(es) in the external software and send the receipts to the correct address.

# Answer
> 6 votes
Use a combination of smart groups, tags, CiviRules, and CiviReports.

**A. Create a Smart Group**

1. Use Search Builder to search for Contact :: Envelope # :: Not Empty OR Not Null OR \> 0
2. From search results, create new smart group (called "Has Envelope #")

**B. Create a tag called "Update External Address"**

**C. Setup a CiviRule**

1. Create a Rule with the Linked Event as "Address Changed"
2. Linked Condition is "Contact (not) in group", "In one of selected groups", "Has Envelope #"
3. Linked Action is "Add tag to contact", "Update external address"

**D. Create a Report**

1. Create a report off of Constituent Report.
2. Filter the report to look for contacts tagged "Update External Address".
3. Setup report for email delivery (if needed).

**E. Office manager runs the report at her discretion (or gets emailed the report) and updates the addresses in the external program.**

**F. Once the address is updated in the external program, untag the relevant contact.**

---
Tags: drupal, addresses, accounting, civirules
---


# Question
Title: Upgraded to 4.6.7 and now the Register links in the Upcoming Events list block have a typo
We upgraded from 4.6.6 to 4.6.7 on Drupal6, and now the register links in the Upcoming Events block go to /civicrm/event/register?rest=1&id= (as shown in the screen shot below), instead of civicrm/event/register?reset=1&id=, creating redirect problems for potential patrons.

I am not sure in which file I would find the code to correct. Please help!!

# Answer
> 1 votes
In Views, I went to Edit view civicrm\_events, Events List view.

Click on field CiviCRM Events: Start Date. Under Rewriting, select the checkbox Output this field as link and make sure it is corrected to \[yoursite\]/civicrm/event/register?reset=1&id=\[id\]. Then click Update and Save.

---
Tags: civievent, registration, links
---


# Question
Title: What is CiviCRM's position on WordPress 4.3?
I've reviewed the WordPress 4.3 release info, and see that it has been downloaded about 3 Mio times now. Is there an expected CiviCRM compatibility date / release for WP 4.3? Thanks for any insights.

Edited 2015 10 02: I've now implemented WP 4.3.0 on an AWS T2 micro instance running Ubuntu 14.04 (Trusty Tahr). It is updated without problems to 4.3.1, and I am running CiviCRM 4.6.8 on it. So far, it is behaving nicely. The site is fully TLS protected, and after patching SMTP.php, I have SendMail linked with AWS SES in operation. Thanks to all who have posted here and on the CiviCRM Forums for helping this effort to succeed.

DVH

# Answer
I can't specifically answer your question, but I always develop my Civi plugins and test the main Civi plugin on WP bleeding edge and have not run into any problems doing so. YMMV, of course.
> 1 votes

---
Tags: wordpress, upgrade
---


# Question
Title: Why do multiple shortcodes on a single wordpress page not working?
I saw that this issue was resolved in version 4.6 (which I am on) but for some reason when I add shortcode for a contribution page followed by another shortcode for a membership signup (to enter their personal info etc), the page reverts to two hyperlinks (says: "find out more") and if I click on them it brings me to separate pages. I want both to display on the same page. What am I doing wrong?

# Answer
You're not doing anything wrong JDM - it's just that Civi itself is unable to do this. The shortcode "teaser" is the next best thing, i.e. a way to show that Civi content exists and offering a way to navigate to the Civi content.
> 3 votes

---
Tags: civicontribute, wordpress
---


# Question
Title: Is there a way of recording/exposing when an activity is added to CiviCRM?
When adding a custom activity the current time is automatically shown and can be updated. Where people are adding past/ future activities, is the actual time the activtiy is submitted also recorded somewhere in CiviCRM?

Is there a way of extracting this information?

Or should I add an extra date field in the custom data- default set to know to record the submission date?

# Answer
> 3 votes
The creation date of an activity is not, by default, stored in CiviCRM. Depending on what you want to do, you can:

* Create a custom field like you suggested, and write an extension that fills in the value on creation.
* Create a custom field, then define a MySQL trigger to fill in the date. This is less portable, but higher-performance.
* You can enable binary logging (aka detailed logging) as described here, which will create `log_civicrm_activity`. This is the easiest way to record the date - but doesn't give you a good way to expose this data through the UI.

---
Tags: activity, dates
---


# Question
Title: Export activities and the activity target contact
I found an old thread on the forum site: - https://forum.civicrm.org/index.php?topic=20506.0

My question is still the same as DaveJ's actually. We want to export the **activity target contact** with the activity details.

By default, it is exporting the activity source contact

# Answer
> 1 votes
I think petednz's comment is a good one - but you can also use the Activity Report from the Reports menu.

---
Tags: export, activity
---


# Question
Title: Requiring "Assigned" and "Target" contacts when recording Activity
When creating a new Activity record, I need to require the "With contact" and "Assigned to" fields have a contact selected.

In the activity/form/activity.php file I can add 'required'=\>TRUE to the various arrays, but that setting only works for the fields without a selector (e.g. subject, location, duration).

This can certainly be done with javascript in an extra.tpl file (and might be preferable, as it can be conditional to the activity type), but is there a way to modify either the template or php files to require a selected contact?

# Answer
The best way to handle this is with an extension that calls `hook_civicrm_validateForm`. Documentation is available here: http://wiki.civicrm.org/confluence/display/CRMDOC/hook\_civicrm\_validateForm
> 1 votes

---
Tags: custom-templates, javascript, activity
---


# Question
Title: Implications of making Activity Fields (Subject, Duration, Location, Details) required
I've been asked to make the standard activity fields Subject, Duration, Location, Activity Details required. I can see how to do this from this ticket.

Requiring "Assigned" and "Target" contacts when recording Activity

My question is what would be the implications of doing this? Are any of these fields also used by events, mailings or contributions modules to record interactions, so would setting them to mandatory cause problems with these activity types?

Thought I'd ask before taking a suck it and see approach.

# Answer
I think the best approach would be to use `hook_civicrm_validateForm` to make those fields required from the Activity screen only: http://wiki.civicrm.org/confluence/display/CRMDOC/hook\_civicrm\_validateForm
> 3 votes

---
Tags: activities
---


# Question
Title: HOWTO: provide log-in (uid and pass) to Civicrm Contact - NEW or Existing
Is it possible to assign contacts created in Civicrm with Drupal UserID and Password during either CIVICRM contact creation or contact editing process with new, existing or imported contact?

I believe one can create "users" in Drupal and then export/sync the drupal user into CiviCRM contacts. But, can it be done in reverse?

Help Appreciated

Thnks

# Answer
> 4 votes
There are several ways to go about this.

I wrote a somewhat convoluted guide a couple of years ago for creating a Drupal contact for a bunch of existing Civi contacts: http://wiki.civicrm.org/confluence/display/CRMDOC/Creating+a+Drupal+user+for+every+CiviCRM+contact

However, I'd say the best practice today is to use the `civicrm_entity` Drupal module in combination with the `rules` module to automate this. There's an excellent blog post about that here: https://civicrm.org/blogs/petednz/creating-drupal-users-made-easy-single-or-multiple-contacts-civi-imports-and-webforms

# Answer
> 4 votes
If you have a contact already created and want to create a Drupal user manually (in a one-off or as-needed fashion), there is an action set up which can be used when you are viewing the contact record:

Find it under **Actions \> Create user record**.

# Answer
> 1 votes
Creating CMS users during contact creation is simple, look at the advance settings on the profile. See my article on profiles.

---
Tags: drupal, contacts
---


# Question
Title: Postfix creates email bounces with permissions set to 600, but CiviMAIL doesn't like that!
My new installation of CiviCRM 4.6.6 is virtually perfect but for one thing I cannot solve.

Incoming bounced messages are handled by the Postfix server and placed in a directory where they are given permission 0600 in other words read and write by the owner only - "civicrm".

When I run the emailprocessor.php it happily deletes those messages but apparently can't read them! If I manually change their permissions before running the script then all is well and the bounces are correctly processed and the users marked "on hold".

Can you suggest a solution please?

# Answer
> 1 votes
Avoid using `bin/emailprocessor.php`, and instead configure your mail processor using the instructions under *Configuring inbound email processing* on CiviCRM's Email system configuration page.

* You will create a mailbox accessible via network POP3 or IMAP protocols, not maildir.
* You will configure a *Bounce Processing* mailbox connection under CiviCRM's Mail Accounts (Administer \> CiviMail \> Mail Accounts, `civicrm/admin/mailSettings`) to access this mailbox.
* You will configure CiviCRM's Scheduled Jobs (Administer \> System Settings \> Scheduled Jobs, `civicrm/admin/job`) to run the *Fetch Bounces* Job periodically.
* You will confirm that your system cron configuration is correctly triggering this job to run.

With a POP3 or IMAP server handling the interaction between CiviCRM and your server's MDA, permissions issues should never arise. The files will be read by the mail system (eg Courier) as an appropriate system user, and will be communicated over the (local) network connection to CiviCRM's bounce fetcher task. Much cleaner.

---

CiviMail Processor in the CiviCRM wiki has a pink warning box at the top (which is hidden in mobile view):

> **Not Up to Date**
>
> This page isn't up to date anymore as it references a deprecated script: /bin/CiviMailProcessor.php. The new method of handling incoming mail is described on this book page.

# Answer
> 0 votes
Your description doesn't give much detail to work with. I'm guessing that you may be clearing messages via POP3? If so, CiviCRM might be deleting messages which it can't handle? When using IMAP, CiviCRM should move messages which it doesn't understand to a separate folder. Over POP3 CiviCRM might instead delete the message.

The most likely cause(s) for CiviCRM to not know how to handle bounce messages might be:

* your mailings do not contain VERP data, or
* your mail system strips this information, or
* your CiviMail configuration doesn't read this correctly.

---

But those are guesses; you are likely to get a much better reply if you increase the level of detail in your question. When reaching out for support, you'll improve your chance of successful request if you provide as many variables and as much data you can, eg:

* How is your bounce mailbox configured (POP or IMAP? Is it on a flaky dialup connection to head office?)
* What is the To: address of a bounce message? What do the headers of an email in the bounce mailbox look like before it's deleted?
* What mail server are you using? This shouldn't be a factor, but it shouldn't hurt to include the information.
* Anything else that we don't know about your situation? (Assuming the tool works for the majority of installs, you probably need to describe what might be special about your install.)

Often, taking time to gather this and similar information will lead you to solve the problem on your own. A couple of good reads on this topic: How do I ask a good question? and How to report bugs effectively. Hope this advice will help you move towards a solution!

---
Tags: civimail, bounce
---


# Question
Title: Placing RESTful calls to the CiViCRM demo
I do not wish to go down the road of installing the CiViCrm CRM but I do have a requirement to place REST calls to the API. Ideally I would like to do this (for simplicity) against the public accessible demo site. Can this be achieved? Presumably I would need need to generate an API Key?

# Answer
> 2 votes
This isn't possible, sorry. Could you say a bit more about what you're trying to achieve? I'm not sure how useful it is to do REST calls against a demo site.

# Answer
> 2 votes
While REST isn't available (the demo DB is reset daily, and the demo account does not have a publicly accessible API key), you can explore the CiviCRM API using the API explorer once logged in.

---
Tags: rest
---


# Question
Title: why are contacts images stored as absolute URLs?
I have made a copy of my civicrm instance i.e from http://www.example.com/example to http://www.example.com/example1 and when viewing a contact, the contact's image url is still pointing to the old sub domain http://www.example.com/example/civicrm/contact/imagefile?photo=firstname\_lastname\_6580lk2b77fb4029f5a00000035d9.jpg

which causes long response time to view a contact and also i get a warning (Warning: getimagesize(http://www.example.com/example/civicrm/contact/imagefile?photo=firstname\_lastname\_6580lk2b77fb4029f5a00000035d9.jpg): failed to open stream: Connection timed out in CRM\_Contact\_Page\_View-\>preProcess() (line 170 of /var/www/example1/sites/all/modules/civicrm/CRM/Contact/Page/View.php)

resource urls and directories have been updated, i'm on version 4.5.5

Note that this is not the case on http://www.example.com/example/

# Answer
> 2 votes
The schema for contact records specifies that the image be stored as URL (`civicrm_contact.image_URL`).

As an historical matter, I don't know why this was chosen, but it does come with some trade-offs:

* If you write a UI in a different PHP stack, it's easier to share image uploads if they're URLs. For example, webform\_civicrm accepts uploads using Drupal/webform techniques and then simply sets the URL.
* If you have a complex site that spans multiple domains, the contact images can be shared. Similarly, if you're migrating into Civi, you can import the URLs without rearranging the image files.
* It's trivial to include the image URL as a mail-merge token.
* If you migrate the Civi site to a different URL, the contact images break.
* If you access via APIv3, it's can be awkward to manage image data.

To fix contact images after migrating to a different URL, use SQL to perform a search/replace on field `image_URL` of table `civicrm_contact`. For tips on composing a search/replace, see, e.g., https://stackoverflow.com/questions/1876762/mysql-way-to-update-portion-of-a-string

# Answer
> 1 votes
Some of the performance problems are related to how the image url is resolved via the API. For a good discussion see here: https://forum.civicrm.org/index.php?topic=34929.0

Chris does a performance analysis : http://www.webpagetest.org/result/150121\_M9\_AX6/1/details/

One solution is to use the CMS for images and I found drupal handling / imagecache to be better for event images.

# Answer
> 0 votes
Whenever you move one instance to another please make sure you follow the below steps

http://wiki.civicrm.org:8090/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location

delete all the cache and rebuild the menu that should work correctly

---
Tags: contacts, contact-image
---


# Question
Title: Why am I getting "Column not found: 1054 Unknown column 'civicrm_activity.source_contact_id' in 'field list'" on Activity View after upgrade to 4.6.7?
For the past few upgrades I've needed to apply a fix for activity views detailed here: https://forum.civicrm.org/index.php?topic=33513.0

Today I upgraded to 4.6.7 and got the same error, but when I make the changes in the fix mentioned above, I still get the error.

Does anyone have any insight about this?

# Answer
> 0 votes
In 4.6.7, the fix Sudha Bisht suggested appears to only be partially applied.

Line 49 had not been removed.

If I edit civicrm\_handler\_field\_link\_activity.inc and remove line 49, it appears to resolve the issue.

# Answer
> 2 votes
Have you applied this https://github.com/civicrm/civicrm-drupal/pull/298 ?. As error you have mention is recently resolved.

---
Tags: activities, drupal-views, issues
---


# Question
Title: Record which timeline created an activity
I want to record which timeline created a given activity.

The purpose for this is so, at a later date, I can see all the activities created by a particular timeline for a particular case.

With that list, I want to be able to easily change dates for activities that have not yet occurred for that timeline.

Maybe a process for that already exists? Any hints on how to implement it if not?

Thanks in advance for any help. John.

# Answer
This is more of a workaround but you can create activity types specific to each timeline and then include the name of the timeline in the activity type label, e.g. if you have timelines named A and B then you could have activity types labelled:

`A - Phone Call
A - Fill out requisition
...
B - Phone Call
B - Fill out requisition
...`

Alternatively the add timeline feature will create dates relative to whatever offset you have in your config for that timeline, so you could have an "anchor" activity type which you create just before you add a timeline, and then in the timeline config you say make the offsets relative to that activity type. You'd have to rejig your timelines to match that workflow.
> 1 votes

---
Tags: civicase
---


# Question
Title: How to prevent a double enrollment in an event of the same participant.
We are using our CiviCRM to enroll participants from the office (not online), nonetheless the platform allows to enroll the same contact twice in the same event. We are using CiviCRM on Druppal. I test the problem in the demo: http://d46.demo.civicrm.org/civicrm/, and it also occurs in the demo.

Is there any mechanism to prevent double enrollment in an event?

Thanks in advance.

Please be aware, that this question is similar to other question, but the other was related to online enrollment, and my question is related to enrollment through the platform itself.

# Answer
> 1 votes
An event has a profile and "Allow multiple participants". If this is for a logged-in user, then it and you have unchecked allow multiple participants it should not let you participate in the event multiple times. If you are using profile matching, then check the profile and see if the matching is set to duplicate or update.

# Answer
> 0 votes
Have a look at:https://civicrm.org/blogs/spidersilk/understanding-civicrm-dedupe-rules

"Supervised rules, on the other hand, are rules that are automatically checked when an admin or staff member enters info into the back end of the site (i.e., the admin interface)."

---
Tags: civievent
---


# Question
Title: Best way to add "Check Date" to a contribution?
My org would like to add "check date" to contributions made by check.

What's the best way to accomplish this? A custom profile will make an additional "date" field available to all contributions, but I'd prefer to limit it by payment type so it only shows up for payment type= check.

# Answer
I've always just added it as a custom field. While I agree that it'd be preferable to not have it appear for non-check payments, I've never been asked to implement that. That could be accomplished with one line of jQuery though, which you could drop in an extension. If you don't have experience building extensions, you can also use an .extra.tpl file, which is less work.
> 3 votes

---
Tags: civicontribute
---


# Question
Title: Engagement Index in civicrm Activities Section
Does anyone know the use of the civicrm engagement index?

Thanks in advance

Edward

# Answer
Per the documentation, it's "to gauge their level of interest or potential to be a highly active member or be easily mobilised for direct actions".

If you use a methodology that involves an engagement ladder, you can decide that signing an online petition is an index of 1, showing up in person to a rally is an index of 2, recruiting others to attend is an index of 3, etc. Then you can use CiviCRM to find users who have taken an action of a certain level or higher. This is also potentially useful to fundraisers who use moves management/donor journeys.
> 1 votes

---
Tags: activity
---


# Question
Title: Submit Button Hidden on Reports for adding contact to group
On CiviCRM 4.6.7 on Drupal 7, under the report settings, there is an option to add the report results to a group. There is no button present for submitting it.

Upon reviewing the code I see this line

```
 <input style="display: none;"
 name="_qf_ContributionDetail_submit_group" value="" type="submit"
 id="_qf_ContributionDetail_submit_group" class="crm-form-submit">

```

The css has an element style of display: none;

I have overwritten this in my custom CSS style to make it display:block with a width, but the button has no text.

What's going on?

# Answer
> 2 votes
The submit button is hidden because the user does not need to click it. When selecting a group you will be instantly presented with a confirm dialog:

If this is not working for you, you might be experienceing javascript errors on your website. Try this troubleshooting guide.

---
Tags: civireport
---


# Question
Title: Upgrade to 4.6.6 : how to configure mysql server?
I upgraded Civicrm to 4.6.6 (next 4.6.7) and had a lot of problems since then. My sql server has started consuming much more memory while everything was allright before the upgrade with 512M of RAM. After the upgrade, the server crashed because it was overconsuming memory. It never happened before. I lowered the values (of cache and tmp tables). I had then a issue with max connections reached. I restarted the server several times and try to find the good configuration but no success for now. What is a fair configuration of mysql server with drupal 7 and civicrm 4.6.7? Does anyone has an idea why the upgrade made this problem occur ? Thanks a lot Laure

# Answer
> 1 votes
A lot depends on how much data you maintain in terms of contacts, participants, members, etc.

I have seldom seen any recent install of CiviCRM (on Drupal 7) running well on anything less than 1 gig, and I always recommend at least 1.5 gig; usually 2 gig.

Sorry, but I suspect no amount of MySQL tuning is going to give you what you need with only 512M.

# Answer
> 0 votes
what was the version you were using before?

the user interface is moving to be more reactive, and it means more smaller ajax requests than a big page loaded once in a while, it might have an impact.

an issue i faced is the dashlets that tend to generate a lot of requests too, try to ask your users to remove them, see if things improve.

as for the suggested size, i don't know, our servers are not vpn, so we got an order of magnitude more memory than your configuration.

---
Tags: mysql, configuration, performance
---


title: Is civisualize compatible with 4.6?

text:
# Question
Title: Is civisualize compatible with 4.6?
https://civicrm.org/extensions/civisualize-missing-data-visualization-extension this page only states 4.3-4.5

# Answer
It appears to be working. I went to this path on my site /civicrm/dataviz/contacts and it looks the same as it did on CiviCRM 4.4
> 4 votes

---
Tags: extension, civisualize
---


title: Paypal IPN check fails on Pantheon

text:
# Question
Title: Paypal IPN check fails on Pantheon
I recently moved our site to the Pantheon platform. The domain is the same (except the 'www' is now default where previously non-www was the default).

But we have just received this email from Paypal:

> Dear so-and-so,
>
> Please check your server that handles PayPal Instant Payment Notifications (IPN). Instant Payment Notifications sent to the following URL(s) are failing:
>
> http://www.mysite.com/sites/all/modules/civicrm/extern/ipn.php?r eset=1&contactID=1495&contributionID=1047&module=contribute&membershipID=627
>
> If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. **If this problem continues, IPNs may be disabled for your account.**
>
> Thank you for your prompt attention to this issue.

I tried accessing the address and got there without any trouble. Why might this be happening and how could it be fixed?

# Answer
I have been directed to this patch:

https://www.drupal.org/node/2177647

I can't tell you whether it works or not yet since it will take a few weeks to be sure. But it seems to be the going solution.
> 2 votes

---
Tags: paypal, pantheon, ipn
---


# Question
Title: Event registration confirmation mail: Can I suppress certain custom fields?
For my event, I set up a number of custom fields for the participants. One of these is sensitive, and I would like to avoid sending it via email.

Any idea, how this can be achieved?

Cheers, Detlev

# Answer
> 2 votes
Administer -\> Communications -\> Message Templates -\> system Workflow Messages

Where you can find all the message template for all Emails so find the Event registration template (Events - Registration Confirmation and Receipt (on-line / off-line))

and remove your custom field which you don't want to send

---
Tags: civievent
---


# Question
Title: Copy CiviVolunteer volunteer needs when creating a repeating event
When creating an event I am able to set the volunteer needs according to the regular schedule. If I set the event to repeat then I'd like it to copy those volunteer needs for each repeating event. Basically, I want a weekly volunteer schedule. Right now, none of the volunteer needs from CiviVolunteer copy for the repeating events, although you are able to edit each event's volunteer needs separately, which I'd like to keep. Does anyone know if this possible? If not, any tips on how to develop it? I am a novice programmer, so perhaps I could try to develop this functionality. Thanks much!!

# Answer
I think you can find all you need about this question at https://issues.civicrm.org/jira/browse/VOL-37

Note also that CiviVolunteer 2.0 beta is planned for a release on September (2015) - https://civicrm.org/blogs/ginkgofjg/civivolunteer-20-whats-in-the-works.
> 2 votes

---
Tags: civievent, civivolunteer
---


# Question
Title: How can I search in the greeting fields?
I would like to do a search in the greeting field for all contacts with the greeting 'Dear%'. Neither with the search builder nor the contact search I was successfull. Can anyone help? Thanks!

# Answer
Use the search builder again, select contacts from the include where, pick up Email Greeting and the operator is LIKE dear%

Just tested this on the drupal demo site, and it works.
> 1 votes

---
Tags: search, custom-search, search-builder
---


# Question
Title: Is Civi having a separate copy of jQuery inefficient?
In my html page source I can see 2 copies of jQuery; one for Drupal, and the other for CiviCRM. Surely this isn't very efficient. Is there a way to reconcile the two?

# Answer
> 2 votes
I wrote a Drupal module to do just that!

https://www.drupal.org/project/civi\_jquery

It allows Drupal and CiviCRM to share the same copy of jQuery, and resolves redundant plugins so the browser has a lot less javascript to download and run.

Maybe someone could do something similar for Wordpress?

---
Tags: javascript
---


# Question
Title: Is it possible to create multi-record custom fields on Activities?
Has anyone found a way to create multi-record custom fields on Activities? We have an example where a single activity can contain multiple funding sources and need to be able to enter them into the one activity

# Answer
> 0 votes
Not currently.

In general, feature requests like this can be handled in a few ways:

* If you are a developer, you can submit a pull-request with the new feature.
* If you have funds to contribute, you can submit a feature-request to the paid issue queue for the core team to work on.
* You can work around your problem using existing features. For example you could set up the custom field as a "Note" textarea and put the multiple funding sources each on a separate line of the same field.

---
Tags: activities
---


title: CiviCRM and Apache Solr Search

text:
# Question
Title: CiviCRM and Apache Solr Search
I want to set up CiviCrm so that I can use Apache Solr to do a full search. Which CiviCRM tables should I import into Apache Solr?

Is importing tables the correct approach?

I am not a developer so this will be a significant challenge to me.

I am using drupal 7.

# Answer
> 6 votes
Considering that you foresee this as a significant challenge for you, I'd like to suggest that it may not be worth the trouble. CiviCRM is unlike within content management systems, where searches are for snippets from among a handful of long text fields. Instead, there are hundreds of fields to search, but you're usually looking for the exact or nearly-exact value.

Consequently, the advanced full-text indexing that Solr would provide would be wasted in most CiviCRM searches. You'd also need to index all the tables (including ones that don't exist yet, as custom data tables are created on the fly and they're among the most-frequently searched). Even the most simple searches by city or email address can involve a bunch of database joins.

In sum, I'm not sure Solr search would be worth it even if you had a bunch of solid developers and an open checkbook. (The only reasonable example I can think of offhand is if you give out a bunch of grants and need a way to search among a ton of proposals.) If you aren't confident in your abilities, you won't want to embark on something this expansive and experimental.

# Answer
> 1 votes
Just to second Andrews comments. We've done some previous work at Compucorp with CiviCRM + Elastic Search (which is similar to SOLR in some respects) and it involves a significant amount of work to create SQL functions to index the data and then produce the search interface.

It may be worth knowing more about your reasons for wanting to use SOLR (Scalability? Full text searching? Read ahead? Data dashboarding?) in order to determine what may be the best approach.

---
Tags: drupal
---


title: How to display recent upgrade messages?

text:
# Question
Title: How to display recent upgrade messages?
Trying to semi-automate my upgrade process by using "drush civicrm-upgrade", but I'm concerned that any critical messages, e.g. that default message templates have changed, won't be displayed in the shell.

I have a vague recollection that there exists a URL which will display the site's most recent upgrade messages, but I can't find it now in the documentation. Is there such a URL?

And does drush civicrm-upgrade display such messages in the shell?

# Answer
> 5 votes
I just ran `drush civicrm-upgrade-db` and saw upgrade messages in the output.

While the formatting could certainly be improved, this does seem to work (in some cases?).

As Coleman notes below and in CRM-16946 \- *pre* upgrade warnings/notices are not displayed by Drush upgrade, while *post* upgrade notices are.

# Answer
> 2 votes
Post-upgrade messages do display via drush. However pre-upgrade warnings do not. There's an open issue for this, and help would be most welcome.

---
Tags: upgrade
---


title: Track last updated custom data

text:
# Question
Title: Track last updated custom data
Is there any built in way to tell when the data in a custom data set was last updated? If not, what would be the best way to proceed to build that in for one specific group?

As usual, the data can be edited by the administrative user logged in to civicrm OR it could be edited via a profile. In my case I know the profiles in advance, so could rely on the profile ids. These are always 'on behalf' profiles. Not sure if that's important.

I'm thinking I could create a custom "last updated" field in the data set, and then update it through a hook, but not sure if that's the best way. Thanks for any guidance.

# Answer
> 1 votes
This question is conceptually similar to this one: https://civicrm.stackexchange.com/a/4880/12

I think a hook is your best bet.

# Answer
> 0 votes
there are several related issues that you may have already considered, and without knowing the purpose or need I am not sure which might be of help, or which you have already considered and ruled out.

Database: if you have logging on you will have tables such as log\_civicrm\_value\_customfieldgroup and there is a log\_date field.

Multiple record fields: if you are keen to see the history of the data then this will display that data but has some limitations.

Profile: can be set to send out an email each time it is filled in. Seems an unlikely solution but does provide a record.

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


title: Setting up PayPal Pro in CiviCRM

text:
# Question
Title: Setting up PayPal Pro in CiviCRM
Currently trying to set up PayPal Pro as a Payment Processor in Civi 4.6.7, following the instructions here:

http://wiki.civicrm.org/confluence/display/CRMDOC/PayPal+Website+Payments+Pro+and+Express+Configuration

Am I right in thinking that this requires the PayPal Classic API instead of the PayPal REST API? The instructions seem to differ quite a lot from what is presented on PayPal Dev.

Thanks

# Answer
> 1 votes
Hopefully someone else more knowledgeable chimes in, but in short: yes. The PayPal payment processor uses the older PayPal APIs. My understanding is that the new APIs are actually the PayFlow APIs, and thus are compatible with the PayFlow processor plugin. Each time this has come up for me, we were able to get the older API from PayPal, but you need to speak on the phone to a person.

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


title: CiviRules and bulk email events

text:
# Question
Title: CiviRules and bulk email events
I'm interested in creating workflow based on bulk email opens and click throughs. Is this possible with CiviRules? If no, is support for these events planned?

# Answer
Yes and no!

Yes, this would certainly be possible within the framework which CiviRules is build on.

No, currently this specific event has not been developed. Conceptually this doesn't seem to be too difficult event to create. You or your developer can try to do it yourself using the new cookbook on CiviRules, or consider funding this work to be done by the first creators of the extension.
> 2 votes

---
Tags: civirules
---


# Question
Title: Why is offline contribution sending an online receipt?
In our situation we upload contributions into CiviCRM and want to send a receipt.

If we upload a set of contributions, find them using Find Contributions and then edit each one, we can tick "send receipt" and the donor is sent an offline receipt with lots of useful data. Yay!

But it's a hassle editing each one. We want to use the action Send Receipt. But this sends an online receipt with much less detail.

So, why is an online receipt being sent for an offline action?

To fix this should I continue using the online receipt but get more data into it?

Or should I hack the code to use an offline receipt?

Thoughts appreciated!

# Answer
> 1 votes
Let me tell you how I answered my questions above.

*Why is an online receipt being sent for an offline action?*

Typically, this sends the *right* receipt, as the original action was taken online. However, when the contact makes an EFT contribution, and it is uploaded to CiviCRM, there is no online action (not involving CiviCRM, anyway). So in this case the use of an online receipt introduces the wrinkle that there is no Contribution Page or Event Registration Page, and no Line Items. So details that the online receipt is expecting are missing.

*Should I hack the code to use an offline receipt?*

For me, no. The workflows in the code were a bit too different for me to easily resolve/refactor. That would be a major project in its own right.

*Should I continue using the online receipt but get more data into it?*

This is the approach I took. I modified the message template for 'contribution\_online\_receipt' to include at the bottom of the HTML ...

```
{if !$contributionPageId}
  <no-contribution-page/>
{/if}

```

... to introduce a HTML element if no Contribution Page was supplied.

My implementation of hook\_civicrm\_alterMailParams() looks for this element, and if found replaces it with the details I want ...

* Financial Type
* Receipt Date
* Paid By *(instrument)*
* Custom fields that have visibility 'Public pages' *(eg, we want to show people details like 'donation purpose' but not 'internal category X')*

---
Tags: civicontribute
---


# Question
Title: Membership sign-up fatal error: Duplicate entry, already exists
A user has tried to sign-up for a new membership. They have tried and failed multiple times. The log shows:

> $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> handle ) \[code\] =\> -5 \[message\] =\> DB Error: already exists \[mode\] =\> 16 \[debug\_info\] =\> INSERT INTO civicrm\_line\_item (entity\_table , entity\_id , contribution\_id , price\_field\_id , label , qty , unit\_price , line\_total , participant\_count , price\_field\_value\_id , financial\_type\_id ) VALUES ('civicrm\_membership' , \***** , \***** , 6 , '\*****' , 1 , *** , *** , 0 , 7 , 2 ) \[nativecode=1062 \** Duplicate entry 'civicrm\_membership-\*****-\*****-7-6' for key 'UI\_line\_item\_value'\] \[type\] =\> DB\_Error \[user\_info\] =\> INSERT INTO civicrm\_line\_item (entity\_table , entity\_id , contribution\_id , price\_field\_id , label , qty , unit\_price , line\_total , participant\_count , price\_field\_value\_id , financial\_type\_id ) VALUES ('civicrm\_membership' , \***** , \***** , 6 , '\*****' , 1 , *** , *** , 0 , 7 , 2 ) \[nativecode=1062 \** Duplicate entry 'civicrm\_membership-\*****-\*****-7-6' for key 'UI\_line\_item\_value'\] \[to\_string\] =\> \[db\_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM\_Core\_Error::handle prefix="" info="INSERT INTO civicrm\_line\_item (entity\_table , entity\_id , contribution\_id , price\_field\_id , label , qty , unit\_price , line\_total , participant\_count , price\_field\_value\_id , financial\_type\_id ) VALUES ('civicrm\_membership' , \***** , \***** , 6 , '\*****' , 1 , *** , *** , 0 , 7 , 2 ) \[nativecode=1062 \** Duplicate entry 'civicrm\_membership-\*****-\*****-7-6' for key 'UI\_line\_item\_value'\]"\] )

I have seen a similar bug report but that was for membership renewals and was fixed for 4.5. https://issues.civicrm.org/jira/browse/CRM-14894

We are running 4.6.7 on Drupal 7.39

Any help appreciated.

# Answer
Are you getting the same error for all the membership or just for single user

This error occurs when the confirmation button is clicked twice

did you check the DB - it should have already created membership record and also related contribution and line\_item record

so please try to cancel the users existing membership and ask him to try again
> 1 votes

---
Tags: civimember
---


title: 502 Bad Gateway Error

text:
# Question
Title: 502 Bad Gateway Error
I am getting a 502 when I try to access CiviCRM from my site. Is the server down? What does this mean and how can it be corrected?

# Answer
> 2 votes
This error indicates that the web server is trying to connect to another service in order to respond to your request but is unable to. A common scenario is web server software such as nginx, which does not incorporate a PHP interpreter, contacting a service such as php-fpm (typically running on the same server) in order to process PHP.

php-fpm might be unavailable because it is currently handling too many requests and has no free processes to handle your request. Or it is configured with too low a limit on the number of processes.

Alternatively if you access the web via a proxy server, the error might indicate that the proxy server is unable to contact the server where your site is hosted.

Does this error only occur on CiviCRM pages, can you access the rest of your site?

If you don't manage or have access to the server yourself, then best to contact your hosting provider.

# Answer
> 2 votes
This is a common problem with CiviCRM on Pantheon and hasn't entirely been solved, but it has been mitigated.

If you follow the instructions and add the patch described here, then there is about a 50% chance it will solve your problem.

(In essence it simply requires that you apply this patch.)

---
Tags: drupal, error-page
---


# Question
Title: Token for custom field returns the token but not the Values. How to fix it?
when I Insert a token of a custom field to print a pdf letter all built-in token seems working but not the custom ones, no value works, regardless of the number I put in the token. Do you know where the problem is please?

this is the link where I got "50" from :http://abcd.org/civicm/...update?action=update&reset=1&gid=18&id=50

# Answer
> 0 votes
what you are trying to do is to print Gift-Aid custom value in the PDF letter so you need use Token hooks - and assign an new token name for the gift-aid custom values by creating an new extension so the token will be available in the drop down list and you can print the values

do the same for all custom values

---
Tags: custom-fields, tokens
---


title: CiviEvent - Search by custom field

text:
# Question
Title: CiviEvent - Search by custom field
**The situation**

I added a custom field to CiviEvents called **regio** (means **region** in English) and I want to be able to fetch CiviEvents by this field.

I'm on CiviCRM 4.6.6 and Wordpress 4.2.2

**The problem**

When I build the query using the API Explorer provided by CiviCRM, it always returns all CiviEvents, instead of only those to the selected region. This is the code the API Explorer generates:

```
$result = civicrm_api3('Event', 'get', array(
  'debug' => 1,
  'sequential' => 1,
  'custom_10' => 1,
));

```

This gives the following results:

```
{
    "is_error": 0,
    "undefined_fields": [
        "custom_10",
        "page",
        "noheader"
    ],
    "version": 3,
    "count": 25,
    "values": [{...}, {...}]
}

```

As you can see, it says that **custom\_10** apparently is an undefined field, although it is generated by the API Explorer. And by the way, there actually are CiviEvents of which the region is set to **Rotterdam**.

I have spend days trying to debug this, going through the full backtrace of this function, but couldn't find anything. Does anyone have any idea why this presumably standard Civi-feature isn't working?

This screenshot gives the full settings I made in the API Explorer.

# Answer
As artfulrobot suggested, this is not implemented, but will be in V4.7
> 2 votes

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


# Question
Title: Advanced Search error after upgrade to 4.6.5
We upgraded from 4.5.8 to 4.6.5 today (on Drupal 7.38). The only known issue at this point is on the Advanced Search screen. Using the Relationship search field "Target Contact(s) in Group" results in a DB Error: syntax error.

Here is the backtrace and debugging log from the error:

```
backTrace

#0 /sites/all/modules/contrib/civicrm/CRM/Core/Error.php(182): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /sites/all/modules/contrib/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /sites/all/modules/contrib/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: syntax error", -2, 16, (Array:2), "\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...")
#4 /sites/all/modules/contrib/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-2, 16, (Array:2), "\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...")
#5 /sites/all/modules/contrib/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...", "DB_Error", TRUE)
#6 /sites/all/modules/contrib/civicrm/packages/DB/mysql.php(899): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
#7 /sites/all/modules/contrib/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /sites/all/modules/contrib/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...")
#9 /sites/all/modules/contrib/civicrm/packages/DB/DataObject.php(2442): DB_common->query("\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...")
#10 /sites/all/modules/contrib/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...")
#11 /sites/all/modules/contrib/civicrm/CRM/Core/DAO.php(325): DB_DataObject->query("\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...")
#12 /sites/all/modules/contrib/civicrm/CRM/Core/DAO.php(1179): CRM_Core_DAO->query("\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...", TRUE)
#13 /sites/all/modules/contrib/civicrm/CRM/Contact/BAO/Query.php(2933): CRM_Core_DAO::executeQuery("\nSELECT id, cache_date, saved_search_id, children\nFROM   civicrm_group\nWHE...")
#14 /sites/all/modules/contrib/civicrm/CRM/Contact/BAO/Query.php(4072): CRM_Contact_BAO_Query->addGroupContactCache((Array:1), "civicrm_relationship_group_contact_cache", "contact_b", "=")
#15 /sites/all/modules/contrib/civicrm/CRM/Contact/BAO/Query.php(1820): CRM_Contact_BAO_Query->relationship((Array:5))
#16 /sites/all/modules/contrib/civicrm/CRM/Contact/BAO/Query.php(1890): CRM_Contact_BAO_Query->whereClauseSingle((Array:5))
#17 /sites/all/modules/contrib/civicrm/CRM/Contact/BAO/Query.php(499): CRM_Contact_BAO_Query->whereClause()
#18 /sites/all/modules/contrib/civicrm/CRM/Contact/BAO/Query.php(461): CRM_Contact_BAO_Query->initialize()
#19 /sites/all/modules/contrib/civicrm/CRM/Contact/Selector.php(224): CRM_Contact_BAO_Query->__construct((Array:7), (Array:4), NULL, FALSE, FALSE, 1, FALSE, FALSE, FALSE, "", "AND")
#20 /sites/all/modules/contrib/civicrm/CRM/Contact/Form/Search.php(833): CRM_Contact_Selector->__construct(NULL, (Array:42), (Array:7), NULL, 512, FALSE, FALSE, "advanced", (Array:11))
#21 /sites/all/modules/contrib/civicrm/CRM/Contact/Form/Search/Advanced.php(330): CRM_Contact_Form_Search->postProcess()
#22 /sites/all/modules/contrib/civicrm/CRM/Core/Form.php(345): CRM_Contact_Form_Search_Advanced->postProcess()
#23 /sites/all/modules/contrib/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75): CRM_Core_Form->mainProcess()
#24 /sites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Advanced), "refresh")
#25 /sites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Advanced), "refresh")
#26 /sites/all/modules/contrib/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("refresh")
#27 /sites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:4), (Array:0))
#28 /sites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#29 /sites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#30 /sites/all/modules/contrib/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:4))
#31 [internal function](): civicrm_invoke("contact", "search", "advanced")
#32 /includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:3))
#33 /index.php(21): menu_execute_active_handler()
#34 {main}

Sorry but we are not able to provide this at the moment.
DB Error: syntax error
Error Details
Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 AND ( saved_search_id != 0 OR saved_search_id IS NOT NULL OR ch' at line 3, 1064
Additional Details:

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

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] =>
SELECT id, cache_date, saved_search_id, children
FROM   civicrm_group
WHERE  id 0
  AND  ( saved_search_id != 0
   OR    saved_search_id IS NOT NULL
   OR    children IS NOT NULL )
 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0
  AND  ( saved_search_id != 0
   OR    saved_search_id IS NOT NULL
   OR    ch' at line 3]
    [type] => DB_Error
    [user_info] =>
SELECT id, cache_date, saved_search_id, children
FROM   civicrm_group
WHERE  id 0
  AND  ( saved_search_id != 0
   OR    saved_search_id IS NOT NULL
   OR    children IS NOT NULL )
 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0
  AND  ( saved_search_id != 0
   OR    saved_search_id IS NOT NULL
   OR    ch' at line 3]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT id, cache_date, saved_search_id, children
FROM   civicrm_group
WHERE  id 0
  AND  ( saved_search_id != 0
   OR    saved_search_id IS NOT NULL
   OR    children IS NOT NULL )
 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0
  AND  ( saved_search_id != 0
   OR    saved_search_id IS NOT NULL
   OR    ch' at line 3]"]
)

Return to home page.

```

Anybody know how to parse this out and isolate what the error might be? It appears to be a SQL error, but I'm afraid I don't know what to do with it or where to begin resolving it. We are using MySQL version: 5.1.54

If it's relevant, I tried to use the Target Contact(s) in Group on the Drupal demo site to see if it was just our install, and while it did return a successful "no search results" at the bottom of the search screen, it yielded this warning at the top:

> Notice: Undefined variable: iAmAnIntentionalENoticeThatWarnsOfAProblemYouShouldReport in CRM\_Contact\_BAO\_Query::buildClause() (line 5193 of /srv/buildkit/build/d46/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).

Thanks for any help!

# Answer
> 2 votes
We reverted back to 4.6.4 for the sake of production. Then when 4.6.6 became available, an upgrade to 4.6.6 fixed this issue.

---
Tags: search, mysql
---


title: REST API without JSON just key=value

text:
# Question
Title: REST API without JSON just key=value
Is it possible to structure

```
/sites/all/modules/civicrm/extern/rest.php?entity=Activity&action=create&json={"sequential":1,"activity_date_time":"2015-09-01","id":2,"subject":"test","target_id":"1529697","status_id":2}&api_key=X&key=Y

```

without the JSON section? I'm integrating with Survey Gizmo and it assumes all REST calls will be in format ?variable=value&variable=value etc..

# Answer
> 6 votes
Yes, you do not need the params to be formatted as json, since they are all simple strings/numbers you can just place them in the url like `subject=test&target_id=1529697` etc.

If you want your results back in json format, add `&json=1` otherwise leave it off to get xml back.

---
Tags: api
---


# Question
Title: Recurring contributions with Webform-CiviCRM?
Does Webform-CiviCRM support recurring contributions for donations or memberships?

# Answer
> 4 votes
Yes, thanks to generous contributions from the community, this feature has now been added.

See this issue for details.

# Answer
> 2 votes
There is a feature request for this. You can post if you (or anyone else) is interested in supporting. Ref: https://www.drupal.org/node/2557997

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


# Question
Title: How do I find more information about the ACL regression introduced in 4.6.7?
Email was received stating

> If you are currently using 4.6.7 and your site uses ACLs to segment access to contacts you are strongly encouraged to upgrade. The 4.6.7 release included a regression in the ACL system which caused certain contact access permissions to behave improperly. The 4.4 LTS branch was unaffected.

There is no additional information provided at https://civicrm.org/advisory, and I don't see any issues in the Jira queue marked with a 4.6.8 fix version that would give more context for site administrators to judge whether an immediate upgrade is necessary or if it could be delayed.

# Answer
> 6 votes
I've posted an advisory now: CIVI-SA-2015-008: Access bypass in CiviCRM 4.6.7

> CiviCRM 4.6.7 introduced an access bypass issue which applied a limited number of sites.
>
> The issue affected only certain configurations, where the site used ACLs to limit access, and applied to users whose permissions included “access CiviCRM” and “view my contact” but not “view all contacts”. Changes introduced in CRM-16512 allowed the “view my contact” permission for those users to incorrectly grant access to all contacts.
>
> This issue is mitigated by the fact that only sites so configured are affected, but for sites affected the potential severity led us to make an out of schedule security release.

* If your users with "access CiviCRM" also have access to all contacts (many smaller sites), you are not affected
* If you are not using ACL functionality, you are not affected
* If you did not upgrade to 4.6.7, you are not affected (but you should check you have applied the security fixes in that version!)

---
Tags: acl, security, admin
---


# Question
Title: Webform CiviCRM Integration and duplicate contacts
I’m using Drupal 7.39, CiviCRM 4.6.7, and Webform CiviCRM Integration 7.x-4.12. I have a webform built whereas I’ve enabled the ‘Existing Contact’ field as I want the fields in the form to be filled out if the user has a CiviCRM contact record and those data are already entered.

If the user already has a Drupal account and a corresponding CiviCRM contact then all works well. The user logs and and goes to the form, sees the existing information, changes what needs editing, submits, and the corresponding CiviCRM contact record is updated with the new information.

The issue seems to be if there is a CiviCRM contact record and no associated Drupal account. If a user creates a new Drupal account then goes to the webform and submits it, a duplicate CiviCRM contact is created, the dedup rules are not used.

I noticed that when choosing a ‘Matching Rule’ there is this information:

> Note: Matching rules are only used if the contact is not already selected via "Existing Contact" field.

Is there a way around this? I need to have the form autopopulate if the Drupal user already has a CiviCRM contact record so they know what their existing information is and what might need to be corrected. But at the same time if they are creating a new Drupal account I want to avoid getting a lot of duplicate CiviCRM contacts created.

# Answer
> 3 votes
If they create a Drupal account is there already a duplicate before they fill the Webform? If so, you may be able to use a Profile on the Drupal account creation page that matches contacts to prevent duplicates there -- at which point the webform should function as expected.

# Answer
> 2 votes
The way we do it is that we have 2 webforms.

The first form creates a civi-drupal linked user account. On this form we deactivate the existing user feature. We use the civicrm\_rules integration module and set a rule to create a drupal user for civicrm contacts who have a certain tag. See here and we use the CiviGroup Roles Sync module to assign Drupal permissions.

The second form includes the existing user but we set it to static and display name = yes. in form settings we set it to only allow authenticated users.

---
Tags: webform-civicrm, duplicate-contacts
---


# Question
Title: REST error message saying request modifies the database, but it doesn't
We're having our custom dashboard that our members log into rewritten by an outsourced agency. It is being done with Angular and will use REST to call the API.

We have a particular custom API call that is giving them the error *"SECURITY: All requests that modify the database must be http POST, not GET."* This call does not modify the database. It composes and runs a SELECT query using *CRM\_Core\_DAO::executeQuery*.

How does the REST security mechanism determine whether a call modifies the database? If it contains handwritten queries will they just have to use a POST request?

# Answer
it's simply based on the name of the action, it has to be starting with get, so get, getsingle and so on are considered readonly and accepts over GET, the rest should be POST.

this being said, not sure using the rest api is the best option, you might want to use the 'normal' ajax backend and the js wrapper part of civi that takes care of calling the api the right way. this assume the same domain for civicrm and the dashboard
> 2 votes

---
Tags: api, rest
---


# Question
Title: How do I open a case that started more than twenty years ago?
We have one client whose case started 25 years ago.

This falls out of range of the allowable open case date range and produces this message:

Is there a way to expand/change this date range?

# Answer
Yes, you can expand this range in `Administer > Customize Data and Screens > Date Preferences`.

Change the `start Offset` of `activityDateTime` class to 30.
> 12 votes

---
Tags: civicase, dates
---


# Question
Title: Why is format returned for multi-select custom field API different for Contact vs. Relationship?
I have contacts with an Alphanumeric/CheckBox custom field on, and I have relationships with an Alphanumeric/CheckBox custom field on. (The former is legacy and is copied into the latter.) These seem to be returned differently when using the getsingle API call. Why is this?

For example:

```
$ drush -u <uid> cvapi Contact.getsingle id=<cid> contact_type=Individual contact_sub_type=Student return=custom_42
Array
(
    ...
    [custom_42] => Array
        (
            [0] => Fundraise_Donate_for_specific_school_needs
            [1] => Apply_to_become_a_Governor
            [2] => Be on a poster displayed in your old school/college
        )
    ...
)

```

but:

```
$ drush -u <uid> cvapi Relationship.getsingle id=<rid> relationship_type_id=21 return=custom_112
Array
(
    ...
    [custom_112] => Array
        (
            [Fundraise_Donate_for_specific_school_needs] => 1
            [Apply_to_become_a_Governor] => 1
            [Be on a poster displayed in your old school/college] => 1
        )
    ...
)

```

CustomValue.get, however, returns the same format for the Contact and the Relationship field, and that format is more like the Contact one above.

# Answer
This is a known issue: CRM-15915. I created a pull request so that the format of your 1st example is used everywhere, but that pull request was closed in favour of another one. This one still has some issues, as it seems.
> 1 votes

# Answer
If the custom fields are of the same type, i think you should log an "Improvement" issue in JIRA for this. It's not really a bug but i think Api should be consistent.
> 1 votes

---
Tags: api, custom-fields
---


# Question
Title: What is required to run CiviCRM on Platform.sh?
Platform.sh is a managed hosting service & devops infrastructure with support for Drupal and Symfony (and apparently any arbitrary php application).

* What additional considerations are there for hosting CiviCRM on Platform.sh?
* Are there any specific configurations or patches required?
* Is there any functionality which differs from hosting CiviCRM on a "standard" LAMP stack?

# Answer
In effect Platform.sh supports any PHP application, though it does have some specific magic for Drupal, but you can run any PHP application unmodified.

All you need is to know is how to inject the correct configuration for the infrastructure dependencies (MySQL, and possibly Redis or Solr in this case).

The specific "Drupal Magic" brings support for installation profiles and "drush make files". So it shouldn't be complicated to setup CiviCRM with Drupal. There is an example Git repository on GitHub for CiviCRM with Drupal 8.

This basically allows you to only commit your own custom code to the repository and let Platform.sh build the whole thing. This is nice because it keeps your Git repository lean, and allows you to benefit "for free" from security updates. Platform.sh also "magically" injects to Drupal the database settings, so you really have nothing to do. So that best way to go is to figure out how to have your CiviCRM installation based on a project.make file.

To host a normal CiviCRM application (without Drupal), there is nothing specific to do. The main thing to understand, is that Platform.sh is Git driven. You can't just go around hacking your production server. The only way to get code to your server is to commit it to Git. Because anything else is evil and no good at all.

For other PHP applications you will need to edit their settings file.

Platform.sh will expose in its environment everything you need to configure your application.

For example, this command will give you all the relationships of your application (and specifically the database configuration).:

`$relationships = json_decode(base64_decode($_ENV['PLATFORM_RELATIONSHIPS']), TRUE);`

I hope this help.
> 5 votes

---
Tags: evaluating-civicrm, hosting, hosting-providers
---


# Question
Title: Webform Event Registration skips payment processing
Following the tutorial at Civiteacher.com on "How to: Register for Multiple Events With Webform," registering for an event works, but it skips the payment procession section.

Logs report this error:

```
The CiviCRM "participant getoptions" API function returned the error: "The field 'fee_amount' has no associated option list." when called by line 1459 of utils.inc with the following parameters: "Array ( [field] => fee_amount [context] => create [event_id] => Array ( [259-9] => 259-9 ) [role_id] => 1 [options] => Array ( [limit] => 9999 ) [check_permissions] => [version] => 3 ) "

```

This occurs whether I am logged-in or not as well as with the "CiviContribute: access CiviContribute" given to everyone (just for testing purposes!).

Additional information:

* I set-up the Participant Fee by checking the box by "Webform\>Civicrm\>Event Registration\>Registration\>Participant Fee"; it is using the "Select options" widget
* The Webform Element is of type "Radio buttons (static)"
* Running Civicrm 4.6.3, Webform 7.x-4.9 and Webform Civicrm integration 7.x-4.10

Additional information - 2:

Using PayPal Standard as the payment processor.

By "skips" I mean submitting the form results in a confirmation page – no chance to enter payment information:

Above goes directly to this:

Here's how I've set up the webform participant fee:

# Answer
I was able to get this working by recreating the form using 7.x-4.12 version of the Webform CiviCRM Integration module. (Simply upgrading the module and using the existing form would not work.)

In addition, I had to make sure that Webform\>Payment Processor had both "Pay Later" and "Credit Card or PayPal" selected. (You'll notice on the screenshot above that only "Pay Later" displays.)
> 1 votes

---
Tags: civievent, webform-civicrm, payment-processor
---


# Question
Title: How to allow online renewals for memberships created in the backend?
If you created a membership in the admin section, the member is not able to renew the membership using their dashboard.

If you have a link on your site for that membership sign up, the user can renew by going there. But if for some reason there's no public link, it is hard for the user to renew.

This may be the case if you have multiple memberships, with some that are not available to the general public.

# Answer
You have to modify the contribution so that the system knows which online page needs to be used for renewal. Steps:

Add the membership & payment (must add a payment, $0 works)

Edit the payment - In the Additional details section, choose the appropriate Online contribution page
> 2 votes

---
Tags: civicontribute, civimember
---


# Question
Title: How do i add an custom activity field to an email in civimail?
When i send an email to someone i need it to include activity tokens in the email. All you can use currently is contact fields. Any thoughts?

# Answer
This doesn't solve anything, but a note for future development: contributions have the same situation where it's ambiguous which contribution you're talking about if you're emailing a contact. However, there's a nice feature for sending thank-you letters (PDF or email) that has the contribution and contact tokens. The difference is that this is accessed from the contribution search, so you're explicitly picking the contribution.

Something similar could be done for activities: if you do an activity search, it would be nice if emails generated from there allowed for including tokens referring to the activity. Likewise, it would be nice to have a button from the activity saying "send an email regarding this activity".
> 1 votes

# Answer
I actually ended up writing a custom drupal module for this that pulls the custom fields and assigns them as tokens.thanks for your feedback! I will try to post the module after fully testing. - but it is possible.
> 1 votes

# Answer
Could you be making use of Scheduled Reminders triggered by some feature of the Activity eg Status rather than manually emailing the Activity? And if so, does that give you access to the Activity custom field token?

(more questions than answers but it does point you in an alternative direction)
> 0 votes

---
Tags: civimail, activities
---


title: How to delete sample data?

text:
# Question
Title: How to delete sample data?
When I accepted sample data on install I did not realize there would be 200 contacts added with no clear way to get rid of them. How do I delete these contacts?

# Answer
> 12 votes
The quickest way is to:

* Run a contribution search with no criteria. You will have a result page with all of them.
* For the *Select Records* option, choose **All Records**.
* For the *Actions* option, choose **Delete Contributions**.
* Repeat for contacts with Advanced Search; type "Sample Data" into the "Contact Source" field to find all sample contacts and then bulk delete them. This will cascade down to delete events, activities, etc. You'll also get a message that your own record can't be deleted, so there's no concern about wiping yourself out of the system.

# Answer
> 3 votes
First delete all test contributions following Nicholai's answer.

Then do an "Advanced Search" and type "Sample Data" into the "Contact Source" field. You can then select all results (should be exactly 200 of them) and bulk-delete them.

---
Tags: contacts
---


# Question
Title: CiviCRM 4.6.7 Wordpress 4.3 Extension Issue / BaseURL
Went through the install twice and it is repeatable on my shared hosting server.

The extensions are expecting to rewrite: wp/civicrm?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1

But the it is actually here: wp/index.php/civicrm?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1

(wp/ is the base install of my wordpress)

It seems Wordpress 4.3 is injecting the index.php file to be rewritten and CiviCRM does not like this. I am having to create amended menu items with the corrected URL, but would like to know if there is a better way to handle this?

I tried changing some of the base url configurations, but then I break the main CiviCRM components and have to restore them manually.

# Answer
> 2 votes
This is as @Christian-Wach suggested. For some reason a permalink was set injecting the index.php in a new install of both Wordpress and CiviCRM.

So check your permalinks inside Wordpress in addition to BaseURL.

---
Tags: civicontribute, wordpress, extension
---


title: Membership Renewal with PayPal Standard

text:
# Question
Title: Membership Renewal with PayPal Standard
I have problem to get PayPal Standard Membership Renewal to work:

* If it's the only payment option, the form doesn't have a submit button, I would expect the PayPal button to appear.
* If I use it with a second option like Pay Later, the form displays error message requesting Credit card number and Expiration dates, despite the fact, that this information would be collected on PayPal's site. (see screenshots here)

Any ideas?

CiviCRM 4.6.4 + WordPress 4.2.3 updated 7/30 upgraded to 4.6.5

# Answer
> 2 votes
You may want to follow progress on this issue which seems related: https://issues.civicrm.org/jira/browse/CRM-17082

# Answer
> 1 votes
Membership renewal and auto-recurring memberships with PayPal Standard have been quirky. Civi 4.4 they worked with some caveats; Civi 4.5 less so. Civi 4.6 (and the post 4.6 versions of 4.4LTS) work much more smoothly - though there's still improvements being made, both in the 4.6 and 4.7 branches. Try upgrading a non-live version of your site to Civi 4.6, and I'm almost certain you'll see this issue go away.

---
Tags: contributions, paypal
---


title: My contacts aren't showing anymore

text:
# Question
Title: My contacts aren't showing anymore
I have a big issue with my contacts. My database contains all of the correct information. I have checked it all in phpMyAdmin. Out of no where, when I search for contacts in Civi, it comes up with 0 contacts. It's like they all got deleted automatically. Please help!!

# Answer
> 4 votes
Have you enabled "Contact Trash and Undelete" for your site? If so, have you tried searching in Trash for contacts? Do an Advanced search and tick the "Search in Trash" box. It will be on the right side of the Basic Criteris search pane. Exactly where depends on what version of CiviCRM you are using - which is why I have asked for that information.

Do you have logging enabled? Can you look in the log\_civicrm\_contacts to see who made the last change to the contacts and when and what it was.

"Out of no where" sounds improbable.

What has been changed on your system since you last could "see" the contacts. (Added an extension for your CMS?, upgraded?, your host changed something?)

# Answer
> 0 votes
Have you tried searching for other things like activities or contributions? If you get results for activities then likely your contacts are there. If not (and there not in trash) then likely they are not.

---
Tags: contacts
---


title: WordPress Content Directory Setting

text:
# Question
Title: WordPress Content Directory Setting
I have installed CiviCRM successfully for WordPress. However, the Civi dashboard shows many 404 errors. My install directory is `content/plugins/civicrm` and the dashboard is searching for `wp-content/plugins/civicrm`. I am not able to find a setting that tells Civi where to look for the content directory. Is this something that I can modify?

# Answer
I'm sorry to say that you'll have to revert back to the default 'wp-content' folder name in order to use CiviCRM. I can find at least 5 places in CiviCRM core where this is hard-coded.
> 3 votes

---
Tags: wordpress, settings
---


# Question
Title: can't delete Event Registration - web page hangs with spinning logo
I am trying to delete several event registrations from an event, but each time I try with any of the contacts it fails. I get a pop-up warning that any corresponding payment transactions will be deleted and I click the tick/delete button but then I just get the spinning Civi logo and the webpage hangs like that.

The event registrations were created using a webform registering multiple people (parent and children) for the event at once. I turned on logging errors to the Drupal logs but there is nothing appearing there. When I refresh the webpage the participant listing is the same as before.

I can edit the participants and change their status to cancelled but cannot delete the registration. We're on Civi 4.6.5 and Drupal 7 with CiviHosting.

EDIT: I get this error message following @petednz advice:

Fatal error: Class name must be a valid object or a string in /home/../www/www/includes/common.inc on line 7963

Line 7963 is in bold below:

/\**
* Gets the entity controller for an entity type.
*
* @return DrupalEntityControllerInterface
* The entity controller object for the specified entity type.
\*/
function entity\_get\_controller($entity\_type) {
$controllers = &drupal\_static(**FUNCTION**, array());
if (!isset($controllers\[$entity\_type\])) {
$type\_info = entity\_get\_info($entity\_type);
$class = $type\_info\['controller class'\];
**$controllers\[$entity\_type\] = new $class($entity\_type);**
}
return $controllers\[$entity\_type\];
}

This Drupal post is another recent user with error at the same line but different situation:

Viewing entity results in Fatal error: Class name must be a valid object or a string

# Answer
> 2 votes
Update to the latest version of civicrm\_entity

# Answer
> 0 votes
This could be a JavaScript error. Perhaps something conflicting. If there is nothing in your server logs you could try opening your web browser's development console (normally F12) and then run through the process. Do you see any JS errors reported there?

# Answer
> 0 votes
I'm on the Drupal 6 version of 4.6.7 and also cannot delete an event registrant. Also get the spinning wheel.

This is my error:

```
Fatal error: require_once(): Failed opening required 'api/v2/Participant.php' (include_path='/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/civiexportexcel/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/nz.co.fuzion.civitoken/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/orgdedupe/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/com.pogstone.contenttokens/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/nz.co.fuzion.extendedreport-master/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/com.pogstone.fancytokens-3.2/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/org.civicrm.module.cividiscount-3.0/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/com.pogstone.fancysearches-master/:/home/purcosa/public_html/sites/default/files/civicrm/custom_extensions/noverwrite-master/:/home/purcosa/public_html/sites/default/files/civicrm/custo in /home/purcosa/public_html/sites/all/modules/ckeditor_link/civievent_discount/civievent_discount.admin.inc on line 764

```

---
Tags: civievent
---


# Question
Title: How do I search for contacts with "not empty" multiple records field?
today I realized that the search builder does not provide access to custom multiple-record-fields. Thus I'm wondering how it's possible to search for contacts having at least one record of such field.

Any ideas?

Thanx in advance // nielo

# Answer
> 2 votes
In a stock installation of Civi 4.6, I don't think this is possible. However, this is possible in Civi 4.7: https://issues.civicrm.org/jira/browse/CRM-16137

This is a very simple patch, so if you want this functionality today, check this out: https://github.com/civicrm/civicrm-core/pull/5435/files

---
Tags: custom-fields, search, search-builder
---


# Question
Title: Using the extension CiviVolunteer, assigning a volunteer to a company, not an event
The latest stable version of CiviVolunteer creates a volunteer allows to assign volunteers to events. The documentation says "The features for this release focus on volunteering at events, but the design creates a foundation for adding support for volunteering in a wide variety of situations"

Not being a programmer, I am wondering if it is possible through a workaround to assign volunteers to organisations instead of having to assign them to an event.

# Answer
Earlier this year, the CiviCRM community crowdfunded $30,000 to build CiviVolunteer 2.0, which includes the functionality you're describing. See here: https://civicrm.org/blogs/ginkgofjg/civivolunteer-20-whats-in-the-works. The beta version should be out in 4-5 weeks.

For now, the workaround is to create a bogus event to attach volunteers to.
> 1 votes

---
Tags: civivolunteer
---


# Question
Title: How to enter an activity ID in the API Explorer?
I know the numeric IDs I want to query, but I can't enter them. e.g. on entity `ActivityContact`, I want to use the `Contact ID` params, and the `Activity Id`.

(I'm wanting to issue this request, which will only give me back what I already know, as a way of validating that the record exists.)

On the Contact ID I get a Contact search, but I can't figure out how to bypass this to enter the numeric ID. It's not such a problem because I can always go look up the contact's name and type that in and select it.

But I'm flummoxed by the Activity Id selector. I know the Activity Id I want, but I can't type a number in (it says not found), but I don't see what I *would* type in to locate it any other way?

Is there a way to override those new GUI elements (old explorer provided a workaround)? I tried using 'other' parameter and entering `activity_id` manually but it's too clever and noticed this and presented the GUI again!

(I can run this in code, but I'm trying to get in to the much promoted habit of using the explorer for answers first and wondered if I was missing something.)

Thanks.

# Answer
To answer your different questions:

> I don't see what I would type in to locate it any other way?

You would locate it by typing in the activity subject. Admittedly, this isn't perfect because some activities might have no subject, and therefore can't be located via autocomplete.

> Is there a way to override those new GUI elements

Update: now the answer is yes :) As of CiviCRM 4.6.9 an EntityRef in the Api Explorer will accept any integer.
> 3 votes

---
Tags: api, 4.6
---


# Question
Title: How to increase limits on activity attachments?
Current (4.6.7) limits say that an activity can have up to 3 attachments, each being less than 2MB.

I need more, and a bigger file size limit.

**What are the obstacles to achieving this?**

* I can't see anything in the db schema that implies a limit per activity, so is it just the UI that imposes the number of file limits?
* The files are stored (I assume) in the `civicrm_file.document` field which is a `MEDIUM_BLOB` and can therefore store a file just under 4GB. (my requirements are only ~20MB.) Is that 2MB limit set in a PHP ini file?

Thanks.

# Answer
Go to configure it in your settings /civicrm/admin/setting/misc?reset=1
> 9 votes

# Answer
As a side note you might also need to increase PHP limits for larger files
> 1 votes

---
Tags: activities, developer, 4.6
---


# Question
Title: Can't Include Profiles for Contribution Page after migration
We just underwent a migration from one server to another. For some reason, I don't have the same options to include Profiles I have previously created when I "manage" a contribution page I am configuring. The ebook says "select a CiviCRM profile from the dropdown menu..."

But when I try to do that, there are no real options. The "Include Profile (top of page)" is greyed out and the "Include Profile (bottom of page)" has a blank white text box but no options to select previously created profile or make new ones on the fly. Yes I have the profiles "activated" in the system but they still don't show up. What do I do?

# Answer
Try going to the include profile section and hit 'save', see if the profiles become available. I had a similar issue, and that fixed it.
> 1 votes

# Answer
This might be a client-side JavaScript error. Enable Firebug in Firefox and browse to that form to see if errors are reported.
> 0 votes

# Answer
Since this happened after a migration, I'd recommend checking your base path in **Admin \> System Settings \> Cleanup Caches and Update Paths** (`civicrm/admin/setting/updateConfigBackend?reset=1`), saving if needed, and then hitting the "Cleanup Caches" button on that page.

.

That might do it. If not, you could try the answer on this question related to civicrm.settings.php.
> 0 votes

---
Tags: civicontribute, profile, migration
---


# Question
Title: Custom data: Can the Input Type Field be None?
Here's some context: I want to implement a Kinko's style self-serve credit system for the big tools at our maker space. Members scan their RFID cards to sign in to the laser cutter, CNC machine, 3d printers etc. and credits are deducted from the members account per job. The part of the scenario that's relevant to CiviCRM is where to store the members credit amount and how to add to it. All the deductions happen without CiviCRM.

The overall idea I had, is for a custom contribution page to read the users current credit amount value from the database, add it to the contribution value, and put the result back in the users credit amount field.

Finally, my questions! If I use Custom Data to store the users credit amount, is it possible to set the input type to None? This shouldn't ever be a value that gets manipulated without a contribution, or deduction. Am I better off creating a table manually? If you were in my shoes, would you use Custom Data for this? I'd like to keep it in the system if I can, so others can readily use it.

# Answer
> 5 votes
Yes, you can use custom data for this. When creating/editing your custom field, enable the "View Only" option:

---
Tags: custom-fields, contribution-page
---


# Question
Title: I cant get civi Bounce Processing or Email-to-Activity Processing to function.
Where can I find help? I am willing to pay a developer to teach me

# Answer
You should read: http://book.civicrm.org/user/current/advanced-configuration/email-system-configuration/

After reading you can ask specific questions here on StackExchange.

If you want to find an expert: https://civicrm.org/providers or use http://civi911.com (Disclosure: I work for AGH Strategies who offer this service)
> 2 votes

---
Tags: civimail
---


# Question
Title: Getting ERROR: You need to send a valid key to execute this file when running Cron
When I run my cron job, wget -O - -q -t 1 domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX

When I use this link in my browser it works just fine no issue, so the key is valid. I get the same error when running GET domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX

I can't seem to use single quotes or it stops running altogether. A FQDN and I get a JSON error in the cron setup.

# Answer
> 2 votes
Without quotes around the URL, your shell may interpret the '&' character as a request to run a command in the background:

```
$ wget -O - -q -t 1 none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX
[1] 9887
[2] 9888
$ jobs
[1]-  Exit 4                  wget -O - -q -t 1 none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX
[2]+  Done                    pass=XXX
$

```

Here it uses the URL up to but not including the first '&', thus missing the `pass` and `key` parameters. Enclosing the URL in quotes should resolve this:

```
$ wget -O - -q -t 1 'none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX'
$

```

You say this didn't work for you, could you provide details of what command you tried and what the result was?

# Answer
> 0 votes
This was a permissions issue with my webhost like davejenx suggested. Quick fix via support chat.

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


title: Trying to get external cron working

text:
# Question
Title: Trying to get external cron working
I'm trying to get the external url-based cron to run and I keep getting fatal errors. I don't really want to debug the PHP code. Can anyone help me?

The URL I use has the correct username, password and sitekey:

http://predigerforum.ch/wordpress/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx@xxx&pass=xx&key=xxx

I get the following message:

Fatal error: require\_once(): Failed opening required 'CRM/Core/Config.php' (include\_path='.') in /nhldata/631/106631/data/web/predigerforum/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/bin/cron.php on line 30

It looks like there is a path configuration error, but I cannot find any mistakes in the settings file. I've checked quite a few forum entries and things look correct...

Thanks for any help

David

# Answer
> 2 votes
After lots of messing around, I upgraded to 4.6.8 and then made a clean copy of the latest civicrm 4.6.8 files into the civicrm/CRM subdirectory, and the cron job ran properly. However, my Wordpress installation failed, because there are multiple Wordpress installations on the server and a search from the top root caused basedir restriction errors (and would probably have failed for that reason...).

The fix was to add the following lines to civicrm.settings.php, just before the section "do not add anything below this":

if (!defined('CIVICRM\_CMSDIR')) { define( 'CIVICRM\_CMSDIR', '/nhldata/631/106631/data/web/predigerforum/htdocs/wordpress/' ); }

It was important to include the "/wordpress/" at the end!

I'm not sure that this overriding parameter is really documented, though. I found it referred to in a forum post.

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


# Question
Title: Why do the exported contacts differ from the contacts presented on the Advanced Search using Display Results as Related Contacts?
If you perform an advanced search using the Display Results As Related Contacts feature, the related contacts presented are correct but when you export but the original contacts are exported instead of the related contacts.

I expected that the contacts exported would match the search results, but this is not occurring. Is this correct?

# Answer
> 2 votes
This is a known issue: https://issues.civicrm.org/jira/browse/CRM-15682

As a bug that affects relatively few people, the core team with their limited resources hasn't allocated someone to investigate and fix this. If you're a developer or have access to one, this shouldn't be terribly difficult to develop a patch for; alternatively, if you don't have a developer, you may want to submit this to the paid issue queue.

---
Tags: search
---


title: Custom field set for custom entity

text:
# Question
Title: Custom field set for custom entity
I want to create custom field set for my custom entity.

I have Lead.xml

and there: `< class >Lead< /class >
 < name >civicrm_lead< /name >`

inside cg\_extend\_objects I put title:Lead, value:Lead

But I'm not able to create custom field set for Lead now.

I've tried to debug it. to CRM\_Core\_BAO\_SchemaHandler::createTable this array is passed: `Array
(
 [name] => civicrm_value_cccc1_16
 [is_multiple] => 0
 [attributes] => ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
 [fields] => Array
 (
 [0] => Array
 (
 [name] => id
 [type] => int unsigned
 [primary] => 1
 [required] => 1
 [attributes] => AUTO_INCREMENT
 [comment] => Default MySQL primary key
 )`

````
        [1] => Array
            (
                [name] => entity_id
                [type] => int unsigned
                [required] => 1
                [comment] => Table that this extends
                [fk_table_name] => Lead
                [fk_field_name] => id
                [fk_attributes] => ON DELETE CASCADE
            )

    )

[indexes] => Array
    (
        [0] => Array
            (
                [unique] => 1
                [field_name_1] => entity_id
            )

    )

````

`)`

and this SQL is generated: CREATE TABLE civicrm\_value\_cccc4\_18 ( `id` int unsigned NOT NULL AUTO\_INCREMENT COMMENT 'Default MySQL primary key', `entity_id` int unsigned NOT NULL COMMENT 'Table that this extends', PRIMARY KEY ( id ), UNIQUE INDEX unique\_entity\_id ( entity\_id ), CONSTRAINT FK\_civicrm\_value\_cccc4\_18\_entity\_id FOREIGN KEY ( `entity_id` ) REFERENCES Lead ( id ) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8\_unicode\_ci;

It doesn't take table for Lead entity. Is there any extra coding needed for this?

# Answer
to CRM\_Core\_BAO\_CustomGroup::mapTableName I had to add this:

```
case 'Lead':
    return 'civicrm_lead';

```

after that I'm able to add custom fields for my custom entity.

so steps to add custom data for custom entity you need these things: Add entity to this group cg\_extend\_objects and then map type to table here: CRM\_Core\_BAO\_CustomGroup::mapTableName
> 2 votes

# Answer
Since this is in the context of CiviCRM Extension, please consult the example to Create Custom Set via civix. Or for quick reference check the xml file used to create custom set for one of the CiviHR module https://github.com/civicrm/civihr/blob/master/hrqual/xml/auto\_install.xml
> 1 votes

---
Tags: custom-fields
---


title: Broken Navigation Image Gifs,and

text:
# Question
Title: Broken Navigation Image Gifs,and
Thanks for assisting .. I have just a couple of questions:

1) I'm a little puzzled by missing navigation icons (see below)..and it would appear to be using a relative reference. I'm hosting CiviCRM on the Google cloud thru Bitnami which is by and large working pretty well. Nowhere in the configuration would appear to allow me to put in specific reference of the IP where CiviCRM is hosted. I can see the image gifs with the specific IP and image path. Saw a post Broken Image Link (Menu) but didnt quite work for me.

2) In configuring the Navigation Menu, I could not remove the sub menu items of Events and other top menu items. I was able to do so in a local install previously when I would simply click on the Events link, and all the sub menu items displayed below, and I simply deleted the sub menu items, click to refresh and it was done. With this install on the cloud - there is no response when I click on Events menu item. But I could right click on it do Rename, Delete and Edit the main menu item.

# Answer
> 2 votes
The Base URL is set in `civicrm.settings.php`. From your screenshot, it looks like you're running CiviCRM on Drupal; find `civicrm.settings.php` in `<drupal root>/sites/default/civicrm.settings.php`.

---
Tags: menu, images
---


title: Custom Reply-to setting doesn't stick

text:
# Question
Title: Custom Reply-to setting doesn't stick
I'm trying to use new feature Custom Reply-to introduced in CiviCRM 4.6 (4.6.8 now installed). I go into Admin/CiviMail/Mailer Setting and click the Yes radio button, then save. A Reply-to field now appears on the message preparation form, and the feature appears to work fine. However, when I go back to Admin/CiviMail/Mailer Settings the Custom Reply-to radio buttons are both blank (unselected), with neither Yes or No selected. This same issue exists in both my test and production systems. The sandbox does not have this issue so there is probably something amiss in my database(s). Which table is supposed to store this setting, and can I best repair the problem?

# Answer
That's stored in `civicrm_settings` with a `group_name` of `Mailing Preferences` and a `name` of `replyTo`.

As a tangential note, this feature also existed in Civi 4.5.
> 1 votes

---
Tags: civimail, drupal
---


# Question
Title: Sync name and address with drupal user page via civicrm webform
I am trying to sync the CiviCRM first name and address fields to a Drupal user account page but I cannot figure out the configuration. I am hoping it is something simple that I am missing out.

Scenario - We have a user who submits a webform with the first name, last name, address and phone number fields from CiviCRM. This is attached to an Ubercart product and when submitted the user has successfully purchased the product which comes with access to drupal to add some content. However, when the user logs in all the Drupal User fields are blank i.e. they need to be refilled again. Is there a simple way to sync them.

I have tried to the profiles section in CiviCRM but it actually add new fields to the profile page and does not sync them. Perhaps the CiviCRM roles sync is the right way to go? Any advice will be appreciated.

# Answer
I think that the instructions in this blog about setting up a webform so that it adds a 'tag' to the contact, and Drupal Rules then use that contact to create a Drupal User for the contact (and log them in instantly if required) might be helpful to you.
> 1 votes

---
Tags: webform-civicrm
---


# Question
Title: Why unexpected attached files are loaded in all mailings by default?
We upgrade recently from 4.5.8 to 4.6.6 on four of our CiviCRM instances.

In one of the instances ocurrs something very strange and compromising. When we create a new mailing, in the attachment tab appears one/two random files uploaded previously to event custom fields.

However if we try to delete the attached file/s we get the following error:

> "Failed to run permission check: Unrecognized target entity table (civicrm\_participant)"

Why they appear if they have no connection with the mailings?

**Edit: Screenshot**

# Answer
We found a workaround solution. It seems that is a bug in Attachment.php API file.

**Original code**

```
315: foreach ($entityFile as $key => $value) {
316:   $select->where('cef.!field = @value', array(
317:     '!field' => $key,

```

**Workaround solution**

```
315: foreach ($entityFile as $key => $value) {
316:   $select->where('cef.!field'.$key.' = @value', array(
317:     '!field'.$key => $key,

```

Seems that if there is more than one `$entityFile` element, then `where` clause is generated wrongly.
> 2 votes

# Answer
I think I've found the cause. Check out bug CRM-16544, it matches your problem exactly (except theirs was Grant and yours is Event). I think we can fix this by adding `civicrm_event` to the array on line 210 of Container.php, but I'm not familiar enough with the Symfony stuff to be sure. I think your best bet is to file a bug.
> 3 votes

---
Tags: civimail, issues
---


# Question
Title: Can a New Member automatically become a Drupal User with defined Role?
I would like to allow people who pay to become civicrm members to have access to protected DRUPAL pages. I would like it to happen right away rather than waiting for a batch operation.

My method is to make some DRUPAL RULES so that when a person becomes a member then they would automatically become a DRUPAL user with a specified ROLE. Then the pages would be open to that particular ROLE.

I found a way of creating a DRUPAL user if I add a TAG on a civicrm contact. So it seems like I just need a rule that adds the TAG when the contact becomes a member.

Here are my questions:

1)Does anybody know how to set up a rule to assign a tag to a new member?

2)Is there an easier way to accomplish my goal?

In gratitude, Daniel

# Answer
Daniel - have you looked at the CiviMember Roles Sync module which pretty much delivers this as you want. IE when someone joins and has a Drupal user then when they log in Drupal checks their Civi Membership status and gives them a role based on that.

The Rules approach would also work, and is how we are planning on doing this for Drupal 8, funds permitting, but I don't think people have used that approach in D7 since the module gives you the solution out of the box, unless i am missing a nuance in your use case.

Some documentation about above here
> 7 votes

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


# Question
Title: Can a contact have more than 5 websites?
Apologies if I'm missing something simple...

I want to add about 10 websites to a contact, but after I add five, I no longer get an "Add" button, and can't figure out how to add more.

Any suggestions?

# Answer
> 4 votes
A quick workaround which I can see is you can easily add `n` number of websites for a contact from the Contact Edit Form (Click Edit on the Contact Summary Page). `<site_name>/civicrm/contact/add?reset=1&action=update&cid=<contact_id>`.

This is restricted to a count of 5 (may be a bug) in Inline Edit mode according to the code written here.

---
Tags: contacts
---