# Question
Title: 4.6.12 to 4.7.1 upgrade causes problems with directories, update paths and clear cache
This issue has been asked in two other threads specifically:

**4.6.10 to 4.7.1 upgrade woes** 4.6.10 to 4.7.1 upgrade woes

**Upgrade to 4.7.1 results in blank page** Upgrade to 4.7.1 results in blank page

I am asking this in a new thread so I can post images of what I am seeing as I am having the same problem. I did an update in my test region, and did not click on Clean Up Cache or Update Paths buttons (otherwise it goes blank) and found some other issues. This issue is preventing me from updating myproduction site.

Directories - gets an error page  Clean up Cache and Update Paths Paths disappear and clicking on either of the two buttons with blank out CiviCRM on front and back end.  Joomla-CiviCRM integration goes blank  For reference I am on Joomla 3.4.8, CiviCRM 4.6.12, PHP 5.5.25. I cleaned all the caches, validated paths prior to updating. Deleting Config.IDS.ini and en\_US do not make a difference.

Here is the entire content of the directories error that came back:

CiviCRM-001

**RuntimeException: "Cannot resolve path using "cms.root.path""**

```
#0 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Resources.php(475): Civi\Core\Paths->getVariable("cms.root", "path") #1 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Smarty/plugins/function.crmResPath.php(55): CRM_Core_Resources->getPath("cms.root", NULL) #2 /home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%E8/E8B/E8BB6A67%%Path.hlp.php(11): smarty_function_crmResPath((Array:1), Object(CRM_Core_Smarty)) #3 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php(1264): include("/home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%E8/E8B/E8...") #4 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Smarty.php(194): Smarty->fetch("CRM/Admin/Form/Setting/Path.hlp", NULL, NULL, FALSE) #5 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Smarty/plugins/function.help.php(64): CRM_Core_Smarty->fetch("CRM/Admin/Form/Setting/Path.hlp") #6 /home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%0F/0FF/0FF13161%%Path.tpl.php(9): smarty_function_help((Array:1), Object(CRM_Core_Smarty)) #7 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php(1907): include("/home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%0F/0FF/0F...") #8 /home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%0C/0CB/0CBEC124%%default.tpl.php(19): Smarty->_smarty_include((Array:2)) #9 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php(1907): include("/home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%0C/0CB/0C...") #10 /home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%EA/EAA/EAA96A89%%joomla.tpl.php(86): Smarty->_smarty_include((Array:2)) #11 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php(1264): include("/home/hetclub/public_html/hettest/media/civicrm/templates_c/en_US/%%EA/EAA/EA...") #12 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Smarty.php(194): Smarty->fetch("CRM/common/joomla.tpl", NULL, NULL, FALSE) #13 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(133): CRM_Core_Smarty->fetch("CRM/common/joomla.tpl") #14 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(99): CRM_Core_QuickForm_Action_Display->renderForm(Object(CRM_Admin_Form_Setting_Path)) #15 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Admin_Form_Setting_Path), "display") #16 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Setting_Path), "display") #17 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display") #18 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run() #19 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Admin_Form_Setting_Path", "Directories", NULL) #20 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13)) #21 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4)) #22 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm.php(116): CRM_Core_Invoke::invoke((Array:4)) #23 /home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke() #24 /home/hetclub/public_html/hettest/libraries/cms/component/helper.php(392): require_once("/home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicr...") #25 /home/hetclub/public_html/hettest/libraries/cms/component/helper.php(372): JComponentHelper::executeComponent("/home/hetclub/public_html/hettest/administrator/components/com_civicrm/civicr...") #26 /home/hetclub/public_html/hettest/libraries/cms/application/administrator.php(98): JComponentHelper::renderComponent("com_civicrm") #27 /home/hetclub/public_html/hettest/libraries/cms/application/administrator.php(152): JApplicationAdministrator->dispatch() #28 /home/hetclub/public_html/hettest/libraries/cms/application/cms.php(252): JApplicationAdministrator->doExecute() #29 /home/hetclub/public_html/hettest/administrator/index.php(47): JApplicationCms->execute() #30 {main}
```
@import url(http://hettest.hetclub.org/administrator/components/com\_civicrm/civicrm/css/civicrm.css); @import url(http://hettest.hetclub.org/administrator/components/com\_civicrm/civicrm/bower\_components/font-awesome/css/font-awesome.min.css); Sorry but we are not able to provide this at the moment. Cannot resolve path using "cms.root.path"

Return to home page.

function toggle( element ) { var parent = element.parentNode; var className = parent.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { parent.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { parent.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

# Answer
So this was solved by adding the manual extensions directory in (adding the manual path in both civicrm.settings.php - $civicrm\_setting\['Directory Preferences'\]\['extensionsDir'\] and the Directories page issue was solved using this: cms.root.path error after upgrade to 4.7 (Joomla). (Edit the file administrator/components/com\_civicrm/civicrm/templates/CRM/Admin/Form/Setting/Path.hlp to replace the first crmResPath with crmResURL)
> 1 votes

---
Tags: 4.7, upgrade, cache
---


# Question
Title: How do I record a group donation in CiviContribute?
Our agency received a $867 donation from a group of unnamed individuals at an event (not connected with our agency). How do we record this donation without a contact (an individual or organization).

# Answer
> 4 votes
It's a good question, but every contribution must be tied to a contact. The solution is to create a generic contact called "Group donations", and add the contribution to that contact.

---
Tags: civicontribute
---


# Question
Title: How would I configure an Event with varying inputs and free registrations based on contribution level?
I have a golf Tournament with a semi-complicated event contribution structure.

We have sponsor levels - Gold (10K), silver (5K), bronze (1K) and people give donations not just at those levels, but also in between - say $2,500.

For each donation level, I need to collect company info and participant info

For instance, Gold Level would get Main Event Signage (need Logo & Display Name), T/Hole-signs (Display name), and every $1,000 in contributions provides one participant (named with handicap) - but they do not have to use all spots.

How do you recommend it best to do this in Civi? Should I set up a separate contribution page from participant registration and send registered sponsors 'discount codes' to use to register players? Can I do it all through the event registration page?

I've been using civi for a while for simple needs - this is far more complicated than I've done in the past.

Thanks for any recommendations!

Edit -

I am using Wordpress with Civi 4.6

I assumed I could have a company & company contact responsible for payment with forms available for the other items based on sponsorship level. (They would choose silver level and then be asked for 5 golfers & the signage text) But it doesn't require this...

# Answer
> 1 votes
I think the discount codes is a good approach. To do this all on one page would require either webform\_civicrm for Drupal, which you don't have, or to write an extension.

If you write an extension, I'd use hook\_validateForm to make the Logo/Display Name optional/required, based on their level. The same hook would also allow you to set a maximum number of additional participants to register. You can also add a jQuery script with hook\_buildForm for niceties like adding/removing an asterisk as fields become required/optional, but you still need server-side validation for security purposes.

---
Tags: civievent, wordpress
---


# Question
Title: Access denied when I want to "Display and Edit Custom Fields"
I have Access denied when : Administer \> ... \> Custom Data \> Display and Edit Custom Fields

I notice that "www." is added between htpps:// and my site name : https://bapa-lacellesaintcloud.com/drupal/index.php?q=civicrm/admin/custom/group&reset=1 is moved to : https://www.bapa-lacellesaintcloud.com/drupal/index.php?q=civicrm/admin/custom/group/field&reset=1&action=browse&gid=1

... and I get the right form when I (manually) remove this "www." from the URL

Why (how ?) is this "www." added ?

BTW : I don't have this error on 2 test sites which are not https but only http ; All my sites have been upgraded to 4.7.2, but I am not sure that this problem was not there before.

# Answer
Take a look at this answer. Another possibility is that your web server has a rewrite that adds the www. Another possibility is that there's an `.htaccess` file in your CMS's path that's adding a rewrite.
> 1 votes

# Answer
Have you checked your settings file to ensure the base URLs are set correctly? From the Civi 4.7 demo site I see that some changes have taken place in how those are handled (with tokens instead of direct references in the Resource URLs page): http://screencast.com/t/lYLFOtdqrkK
> 0 votes

---
Tags: custom-fields
---


# Question
Title: changing or removing the Headers and Footers from mailing templates
Does anyone know if it's possible to stop a mailing template from using the default headers and footers?

I'd like to know if it's possible to disable the headers and footers for the template (if that can be done by assigning "empty" headers and footers, then I'd like to know about assigning different ones than the default.

Thanks in advance.

# Answer
Possibly I don't follow the question, but using CiviMail you can avoid the need for using Headers or Footers by ensuring that you include all the required tokens in the template itself. You can also 'edit' the existing default Header and Footer and set them to not be default, hence when you then use your template in CiviMail, no header or footer will be automatically included, and none will be required.
> 3 votes

---
Tags: civimail, message-templates, header-footer
---


title: Automated soft credits based on rules

text:
# Question
Title: Automated soft credits based on rules
Since I started using CiviCRM about 5 years ago I've thought one of the biggest problem areas was related to tracking and searching for contributions based on household, which is generally how non-profit contributions should be tracked. It's been the source of many struggles at 2 or 3 orgs I have been associated with during this time.

Soft credits have helped to some degree, but require consistent and mistake-free work. A possibly very useful solution occurred to me last night - what if any time an individual makes a contribution it automatically soft-credited the household they are a member of?

Ideally it could be turned off and on and have the ability to control based on financial type.

Thoughts?

# Answer
> 4 votes
Here is an extension that automatically creates a soft credit. I use it with my org and it works great. I'm running 4.7.2 with drupal 7.

https://github.com/PalanteJon/coop.palantetech.module.automaticsoftcredit

# Answer
> 2 votes
It is a great idea. Using CiviRules, you could get a good bit of the way there out of the box. To set the soft credit though, you would need to (or pay someone to) write some code -- you'd have to code the **CiviRule action**.

For the **formula**, you'd set the trigger to "Contribution is added."

For the **conditions**, you could have a couple:

* "Contribution is (not) of financial type ..." and you could set the type.
* "Contact (not) in group" and you'd select a Smart group you created for people who are in a household (if you have contacts who are *not* in a household, you would need this check in the rules).

For the **action**, you would need to code it such that a soft credit is created for the household that is related to the contact that added the contribution. Or if you wanted to get a bit more flexible with it, you could code it such that the user could select the relationship that determines the soft credit.

CiviRules allows you to enable/disable a Rule as you see fit.

---
Tags: contributions, households, soft-credit
---


# Question
Title: How to install translated database strings?
Allô!

I have installed CiviCRM 4.7.2 on Joomla and then copied the French language file (`l10n/fr_CA/LC_MESSAGES/civicrm.mo`). This allowed me to change the default language to fr\_CA and most of CiviCRM is now French.

Now I'm looking to install the French language database data file (`civicrm_data.fr_CA.mysql`) to have the countries, activities and many more strings in French, but it seems this can't be done once the install is complete? Is that right?

The only way I can think of to install this database file is to reinstall CiviCRM but by first replacing the original (English) `civicrm_data.mysql` file with the content of the `civicrm_data.fr_CA.mysql` file in the install package. Is this the only way? It feels like a strange hack and the i18n install guide does not mention this database file.

Thanks!

# Answer
I managed to install CiviCRM in Joomla with the database translated strings, but I had to replace the `civicrm_data.mysql` file with the content of the `civicrm_data.fr_CA.mysql` file.

Here is what I did, step by step, in case someone else is trying to accomplish the same thing:

1. Uncompressed both `civicrm-4.7.2-joomla.zip` and `civicrm-4.7.2-l10n.tar.gz` in `/tmp`
2. Unzipped `/tmp/com_civicrm/admin/civicrm.zip` and deleted the zip file.
3. Copied `/tmp/civicrm/l10n/fr_CA/LC_MESSAGES/civicrm.mo` into a newly created `/tmp/com_civicrm/admin/civicrm/l10n/fr_CA/LC_MESSAGES/` directory.
4. Copied `/tmp/civicrm/sql/civicrm_data.fr_CA.mysql` as `/tmp/com_civicrm/admin/civicrm/sql/civicrm_data.mysql` (overwriting the original file)
5. Zipped directory `/tmp/com_civicrm/admin/civicrm` as `/tmp/com_civicrm/admin/civicrm.zip` and deleted the directory.
6. Pointed Joomla to install from the `/tmp/com_civicrm` directory.
7. Once installed, from Joomla's control panel, went to **CiviCRM - Administer - Localization - Languages** and changed the **default language** to **français (Canada)**.

That's it! CiviCRM en français ! I don't know if there is an easier way, but that's the only solution I found working.
> 1 votes

# Answer
Indeed, the text that is created in the database needs to be set in the proper language at installation.

Once you have installed, you need to do it via the UI, one by one... painful

If you install the i18n folder \*before" the installation, you have the option to choose the language you want and it will choose the correct mysql sql for that language behind the scene

How long have you used your civi? might be easier to re-install and import your contacts if you just started
> 0 votes

---
Tags: joomla, i18n
---


# Question
Title: Contribution Form fails; bounces to Home Page or timeout error
**Using:** Joomla 3.4.7; CiviCRM 4.6.10; testing with Chrome, Firefox, Safari, and devices (iPhone, iPad, Android)

**ISSUE:** Contribution Form (infrequently) fails; bounces to Home Page (if one can get to next screen/action button) or timeout error (on devices, when one chooses PayPal option)

1. Using our Contribution form USUALLY SUCCEEDS, and for both the PayPal and Credit Card options
2. INFREQUENTLY it fails; always at the point when User touches/selects the lower Payment options fields
3. This problem cropped up earlier this year and it was more pervasive; using forum info and our own testing we isolated that the use of "OTHER Amount/custom field" apparently triggered the problem. We took two steps: Updated to the latest CiviCRM, and removed the "OTHER Amount" option.
4. This gave us SUCCESS; Robust cache deletion was required for some to see this success, though.
5. Subsequent testing on multiple platforms/browsers/devices made us think this was resolved, and we had planned to revisit the OTHER issue in January.
6. HOWEVER: The problem showed up again yesterday for ONE User (out of almost forty successful submissions). That one user confirms that the problem exists on Safari and Chrome (Mac), and on an iPhone.
7. As a result of his failure, we re-tested: we had success on everything except an iPad—when we got to the form fields related to payments, it bounced us to the Home page; when we noodled with the fields (tabbed instead of touched) we could fill out those fields but it took us to the home AND reported a timeout.

Any and all input would be greatly appreciated. Thanks in advance for your considerations.

# Answer
It seems as if the problem requires a proper technical analysis by someone who prvides professional CiviCRM support. You mentioned in another post, that no service provider responded to your enquiries - I am sorry for that, it is not usually that way.

Feel free to approach the CiviCRM partners \- including us (SYSTOPIA).
> 0 votes

---
Tags: civicontribute, forms
---


title: Scanning business cards to CiviCRM

text:
# Question
Title: Scanning business cards to CiviCRM
Anyone working on creating an app to scan a business card and have that information transfer to CiviCRM? Or ideas for how to create this? Thank you.

# Answer
> 3 votes
I don't recall seeing any discussion on this since this forum post and i don't suspect anything has changed. Scanning cards would be a 3rd party process and that would then presumably provide a csv to import.

# Answer
> 3 votes
Ideally I would find a very popular card scanner that has an API available with an event model with callbacks. Then I would create a desktop extension or app in a technology supported by the scanner that gets the scanned contact info from it, and have it use CiviCRM's REST API to insert the contact. The app will need to have a configuration file or interface to allow the CiviCRM REST url and login info at a minimum. I'd likely add an option to specify a tag or group for contacts inserted from the business card scanner. The app will need to check that the tag or group still exists everytime it is about to add it to a new contact.

# Answer
> 3 votes
It’d have to be some type of automation first that does OCR, then feeds it into CiviCRM. Maybe in combination with the Google Apps extension?

---
Tags: extension, import, mobile
---


title: User Permissions

text:
# Question
Title: User Permissions
I've been using CiviCRM on Wordpress for about a year now. Initially, I had created a user who had 'viewing' permissions only, although this user has not been active. I'm trying to use it now and whenever I try to view a contact's details I get this error: `DB error: no such table`. Any advice?

I have checked the Wordpress security profile and everything looks ok and this user does not have any additional CIvi ACLs assigned. Thanks for your insight into this!

# Answer
You're missing one of your tables in the CiviCRM database. I'm not sure how that could have possibly happened! I don't think it's possible for CiviCRM to have done it.

If you have a backup, your IT person may be able to restore just the `civicrm_acl` table - assuming that's the only one that's missing! If there's no backup, there's a file `<civicrm_root>/sql/civicrm.mysql`. Someone can open it up in a text editor, search for the "paragraph" starting with "

```
CREATE TABLE `civicrm_acl` (

```

and run that entire command in MySQL to recreate a blank ACL table.

Finally - thank you for posting the backtrace, it's what allowed me to figure out your problem! The best way to post it is to edit your original question, which allows you better formatting options.
> 2 votes

---
Tags: wordpress, permissions
---


title: 4.6.10 to 4.7.1 upgrade woes

text:
# Question
Title: 4.6.10 to 4.7.1 upgrade woes
\**UPDATE #5: See new answer at bottom. It's a fix!

\**UPDATE #4: Decided do a clean install of 4.7.1 and see if I can point it to a working 4.7.1 backup database. I suppose I need to follow Kurund's wisdom on this, eh? https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+the+database+using+phpMyAdmin

~~~~~

\**UPDATE #3: Well, it's been a nasty Mercury in retrograde these past couple of weeks. Or Murphy's Law has been acting like a troll. Had a power outage last night that exceeded the UPS runtime and this sandbox didn't gracefully shutdown. Ugh! Got it back up except...

4.7.1 gave me a blank screen again. Cleared the cache, checked all settings. All was intact except now missing a few files and folders. Ugh! Tried to reinstall it from Joomla Install-from-Folder function but that now gives me a blank page (500 error). I then decided to uninstall 4.7.1 and reinstall a fresh package but same results. It stopping after 30% of the folder/files are being installed.

I checked the database again, too. Noticed that in table

> civicrm\_domain
> config\_backend

field is gone

Any ideas?

~~~~~~~

\**UPDATE #2: I was finally able to upgrade after starting with a good 4.6.10 database backup. Then again in table

> civicrm\_domain.config\_backend

marked that field column to NULL, and made sure the version number was set back to 4.6.10.

Then reading through the documentation again, deleted

> ~/media/civicrm/ConfigAndLogs/Config.IDS.ini

and

> ~/media/civicrm/templates\_c/en\_US

I then performed the 4.7.1 install again and it worked.

~~~~~~

\**UPDATE #1: Seems there is an error of corrupted table creation in the log files. http://pastebin.com/KajmZuC1

There is an old bug by core developers on this supposedly fixed but here it is again. https://issues.civicrm.org/jira/browse/CRM-9493\**

---

I actually have a dead upgrade now from 4.6.10 to 4.7.1 on Joomla 3.4.8. I am still running PHP 5.4 if that makes a difference considering the warnings during the upgrade.

After initial upgrade, I got a system error message on pop-up and where the notice is at the bottom of the container next to the CiviCRM version number. The error was that no Crons were recorded. I opened Scheduled Events and it showed all active Crons having just been run.

Next, I Cleared Caches but on this settings page the paths were missing from the HTML. I decided to hit the Reset Paths button and then everything went blank.

Front and backends are completely blank now. All paths in civicrm.settings.php and civicrm.config.php are correct including MySQL settings.

Here is the latest entries in the ConfigAndLogs log file. http://pastebin.com/KajmZuC1

Also, "No mailboxes have been configured for Email to Activity Processing" but this shouldn't break the upgrade.

Please advise.

# Answer
I'm going to add this as an answer because it is what fixed my site after many days of troubleshooting, several sandboxes and multiples of restores.

First off, I use Joomla so Akeeba Backup extension is a savior. Totally worth the subscription to use the Pro version but the free one works just as well.

Now, what became obvious to me was that if hitting the Reset Paths button broke CiviCRM then where are those paths stored. Initially we all thought in the files, right? Hudson Essex Terraplane Club chose to use the override in

```
civicrm.settings.php

```

which works but is not a fix. It's a workaround.

So, I started to dig deeper after Catorghans (above) suggested a table was corrupt and repair may work. Of course, this was the culprit. Everything in a CiviCRM web form gets stored somewhere, right? But, repairing the table wasn't the issue.

NOTE: At this point I'm thinking this is not platform specific thus is a bug. So this should apply no matter what CMS you are using.

Here is my thought process: As Hudson and I reported, the Resource Paths broke when clicking on the Reset Resource Paths button in Administration Settings=\>Clear Cache area. Then Catorghans suggested a broken table. Then the error message that

```
civicrm_setting

```

table error of "not found". So, let's look in the table. Ah-Ha! All the fields that would contain these setting were flagged NULL! This means they were empty. Of course! If the place CiviCRM looks for its Resource URL Paths, no less, it's settings is empty then it has to be an obvious sign.

I then opened up one of the working sandboxes. It doesn't matter which version because for this table the developers probably wouldn't change it that drastically. But, even if they did it would be pretty standard database development to stick with more or less the same convention. At least, that is what intuition tells me.

So, I began to **enter in copies of data from a working instance.** Viola! It Works! Just in time to leave for CiviDay with Neil Planchon and friends in Oakland, CA.

**Immediately do a backup!**
> 2 votes

# Answer
I got CiviCRM to come back by manually entering the paths manually into the CiviCRM Settings Overrides in civicrm.settings.php file. There were some more error but at least CiviCRM came back for me. It is obvious that the Reset Paths is causing problem and it might have to do with the way UpdateConfigBackend is calling a URL for GettingStarted.php. I am not a developer but they all seem to be linked. I shared what I actually did in this posting at the bottom: 4.6.12 to 4.7.1 upgrade causes problems with directories, update paths and clear cache 4.6.12 to 4.7.1 upgrade causes problems with directories, update paths and clear cache
> 2 votes

# Answer
A corrupt table could explain this. I would repair it. First repair and see if it works already. If not, restore the backup, make sure table is still fixed (or repair again) and upgrade again.

If you have access to phpMyAdmin, you can select all tables at the bottom and then choose "repair tables".

If you do not have phpMyAdmin, but you have access to ssh then you can use mysqlrepair (or mysqlcheck -r), see more at http://linuxcommand.org/man\_pages/mysqlcheck1.html

If you have neither you should ask your hoster to do a repair for all tables.

Good luck.
> -1 votes

---
Tags: upgrade, database, error, 4.7, wsod
---


# Question
Title: Displaying long CiviCRM multi select fields in a Drupal Webform
We have a circumstance where we have a multi select custom field with around 200 options. We then have this field loaded into a Drupal webform (for this project we need to use Webforms).

The standard Drupal Webform field options only allow either a CTRL click multi select or radio buttons, neither of which will work with that many options.

We have also tried a module called Chosen (https://www.drupal.org/project/chosen) but have failed to get this to work with the Webform. Has anyone got any experience of getting Chosen working with Webforms or an alternative approach?

Oliver

# Answer
> 3 votes
I've written a small module that allows you to use the select2 widget on your webforms:

https://github.com/colemanw/webform\_select2

Enjoy!

---
Tags: webform-civicrm
---


# Question
Title: Removing Membership Status Message on Front End Webform
We recently sent out emails to our affiliates, providing them with a link outfitted with some checksum tokens. The link goes to a webform w/ CiviCRM Integration. The token and webform work fine -- they are able to fill out the required information and pay for their membership.

Some users, however, are getting confused by the message "x membership has a status of 'x'" at the top of the webform page, thinking that their membership is expired, cancelled, etc. based on what they see.

The organization, before my arrival, had tried to set up the membership feature, however it was never fully realized, leading to me having to create a new set of membership types to work with. I've gone ahead and expired the old memberships, re-titling the type to "2013 Membership", however that still leaves the aforementioned message visible to the person utilizing the checksum link. I could just delete the old membership type, as we plan to do a fresh install in the future without this information, however we have payments associated with the membership type that I don't want to go down that route, yet.

I'm assuming I'll have to make the change somewhere in a template file, however I wanted to check first before I go messing around with it, in case I'm missing an option somewhere inside the front end of Civi.

Edit: Here is an example of the message users see. I'm interested in removing the first line in the green box. Users will not see the second line as this is a new webform that everyone will be submitting for the first time.

# Answer
I suggest you disable the membership types you are no longer using in your system (per Pete's suggestion in the comments).

I've just patched webform\_civicrm to ensure it takes this into account, so it will no longer display messages about disabled membership types. That will be included in the 7.x-4.16 release, for now you can upgrade to the -dev version of the module to get this new functionality.
> 2 votes

---
Tags: civimember, webform-civicrm
---


# Question
Title: Change civicrm combobox value from the code
I want to know how to change the value of those awesome civicrm comboboxes from the code (i have google address search, I need to change the country), see the screenshot. jQuery("#country-1").val(val); document.getElementById('country-1').value = val; don't work

# Answer
> 2 votes
The widget is select2 3.5. But you don't need to interact with it directly. Find a selector for the underlying `<select>` element in the dom, set it's value, and then fire the change event. E.g.

```
CRM.$(function($) {
  $("#country-1").val(val).change()
});

```

Note that you should use CiviCRM's copy of jQuery and not the WP copy. So the above code uses `CRM.$` instead of `jQuery`. Using the wrong copy of jQuery would make things weird as change events would appear to have no effect, etc.

---
Tags: wordpress, civimember
---


# Question
Title: How to connect to Attentive.ly (Social Media Service)?
I have a Wordpress CiviCRM site and want to try using the Attentive.ly Social Media Service. There is an Extension to connect to this service. I have installed the Civi Extension and all seems good. I created an account on the Attentive.ly site. I am in the process of connecting Civi to the Attentive.ly account and it asks for 3 items of information:

1) URL you use for your CiviCRM access - I have no problem 2) Site Key you use for your CiviCRM access - I have no problem 3) API Key you use for your CiviCRM access - I do not know how to find this?

How do I find or create the API Key?

If anyone has experience with Attentive.ly and can give some feedback that would be great.

# Answer
CiviCRM has multiple layers of security, all of which need to be handled properly to update its data remotely. You need to create a user which will be provided the permissions needed to update data in CiviCRM from Attentive.ly. This is part of the CiviCRM permissions model for using an external programmatic interface to interact with CiviCRM (see https://wiki.civicrm.org/confluence/display/CRMDOC/API+Security#APISecurity-PermissionswithinAPI for more details - that page is dated but I think generally accurate still). This approach to permissioning allows different external services to interact with different permissions, leverages the existing user/contact based permissioning system, and allows tracking of changes made by services to follow the paradigm set up for tracking which user makes changes to a contact.

@Andrei's suggestions are good ones. The official documentation for creating API user keys is at https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers . I've added updated instructions that do not require interacting directly with the database at How do I set up an API key for a user?
> 2 votes

# Answer
I can think of two options:

**1)** Use the extension Api Key, which will add an Api Key tab in the contact summary view wher you can create/edit/delete an Api Key.

**2)** The old fashion SQL way, assuming you have access to your server and mysql credentials:

```
UPDATE civicrm_contact SET api_key = "key" WHERE id = "your_contact_id";

```

Replace **key** with a **strong** alphanumeric string (32 characters), and **your\_contact\_id** with your CiviCRM contact id ie:

```
UPDATE civicrm_contact SET api_key = "SWb9Mpuudv262JdQ8Z65yh2ae2s23XXG" WHERE id = 123;

```

I haven't used Attentive.ly so I cannot give feedback on that.
> 0 votes

# Answer
Ron, the API key you need is from Attentive.ly.

See https://github.com/JMAConsulting/biz.jmaconsulting.attentively \- "Once you have been redirected to the Attentive.ly Sign Up page, either create a new account or login to your existing Attentive.ly account."

You can request an Attentive.ly demo here - https://attentive.ly/product/
> -1 votes

---
Tags: api, extension
---


# Question
Title: How are recurring contributions (standing orders) implemented in 4.7?
I've read that recurring contributions are supported in core 4.7. I can't figure out how this is done, and book.civicrm.org is still at 4.6 (or have I missed something?). By recurring payments I mean, for example, monthly payments made from a contributor's bank. In the UK this is done by what is known as a 'standing order'. So, I don't mean recurring payments set up by a payment processor like Paypal. I can't find anything in the 4.7 UI that helps with these kind of recurring contributions.

# Answer
I think you're asking a very UK-specific question about direct debit. UK has special rules for direct debit that CiviCRM doesn't know anything about. But the iATS Payments payment processor does support the required workflow and the civicrm extension for iATS Payments does have a dedicated payment processor for that purpose, so that might work for you.

There is some information about how to set it up on this page:

https://github.com/iATSPayments/com.iatspayments.civicrm

\[2020-06-22 Update: the iATS payments extension has dropped it's UK-specific support code\]
> 3 votes

---
Tags: 4.7, recurring-contributions
---


# Question
Title: Building an extention in civicrm. i try fetch campaign base on contact nothing displays while i have records
```
function contactcampaign_civicrm_dashboard( $contactID, &$contentPlacement ) {
// REPLACE Activity Listing with custom content
$contentPlacement = 3;
//(int) CRM_Core_DAO::singleValueQuery('SELECT COUNT(*) FROM civicrm_campaign');
$query = "SELECT id, title, parent_id, status_id, goal_general, goal_revenue
              FROM civicrm_campaign
              WHERE created_id = $contactID";
$campaigns = CRM_Core_DAO::executeQuery($query);

$campaignList ='<table>';
$campaignList .= '<tr><th>Title</th><th>Contribution Page / Event</th><th>Status</th><th>Target Amount</th><th>Amount Raised</th><th>Number of Contributors</th></tr>';

while ($campaigns->fetch()) {

 foreach($campaigns as $campaign){

    $title = $campaign->title;
    $targetAmount = $campaign->goal_general;
    $raisedAmount = $campaign->goal_revenue;
     $status = $campaign->status_id->title;
     $parent = $campaign->parent_id->title;

    $campaignList .=  '<tr>';
    $campaignList .=  '<td>'.$title.'</td>';
    $campaignList .=  '<td>'.$targetAmount.'</td>';
    $campaignList .=  '<td>'.$raisedAmount.'</td>';
     $campaignList .= '<td>'.$status.'</td>';
     $campaignList .= '<td>'. $parent.'</td>';
    $campaignList .=  '</tr>';
 }
};
$campaignList .= '</table>';

return array (
   'Campaign List'=> $campaignList
);

```

}

pls i dont know what am doin wrong.

# Answer
I'd recommend looking into using the CiviCRM API as a more robust way to query CiviCRM data.

## Check out the API explorer

In your CiviCRM instance you can access the API Explorer. It includes tools to visually generate API queries which would deliver what you're doing there.

For the Drupal CiviCRM demo site at `http://dmaster.demo.civicrm.org`, the API explorer is at `http://dmaster.demo.civicrm.org/civicrm/api/explorer`. The CiviCRM demo sites permit you to log in and explore CiviCRM, though you've obviously got a local install (which may not be Drupal).

Using the API explorer, you can build a query which matches your code above in SQL, by selecting:

* Entity = Campaign
* Action = get
* Parameter: Campaign created by, (contact)

The API explorer will show you sample code in PHP, Javascript, and for other interfaces.

## API query to match the above

The equivalent PHP code for the above generated by the API explorer is,

```
$result = civicrm_api3('Campaign', 'get', array(
  'sequential' => 1,
  'created_id' => $contact_id,
));

```

The `$result` of this is in the CiviCRM API response format (documentation), which you will iterate through the `values` of.

## Why use the API over SQL?

> If you're not familiar with APIs, you might ask why you would use the API when you could access the core functions (e.g. the BAO files) or the data in the MySQL database directly?
>
> The answer is that the community will ensure that the API will function as expected with every new release. Great effort is made to preserve backwards compatibility of the API for several versions of CiviCRM. If you decide to use other ways to collect data (like your own MySQL statements), you are left to your own devices. Changes in the schema and BAO arguments, etc. will cause you grief.
> 2 votes

---
Tags: civicrm-entity, civicrm-buildkit
---


# Question
Title: Need to make a group of members who have been members for 5 consecutive years
People who have paid member dues for 5 consecutive years get a discount. We do not have rolling membership. jan 1 to dec 31 with a grace period of 6 months. I think that due to how the info was imported from our last CRM we cannot run it on dues payment. We have dues payments that are really donations. It would be good enough to be able to find out who has been a member for the last 5 years and then we can add them to our old list.

I tried doing this in reports with a start date of 1/1/2011 end of 12/31/15 but I get people who joined all during that time.

Help

# Answer
> 2 votes
It sounds like you're doing this:

Instead, try this:

---
Tags: civimember, civireport
---


# Question
Title: name "suffix" is missing from import mapping list
name "suffix" does not appear in the field names to be mapped. I have that data in my contacts.csv file but can't see how to map it.

# Answer
> 2 votes
Use individual suffix/prefix option for this.

---
Tags: import
---


title: ignored import file lines

text:
# Question
Title: ignored import file lines
I have a contacts.csv file with 4330 records. On importing, CiviCRM reports that the file has 1866 records. Separating the file into three files yields proportionately similar results. Why the miscount?

# Answer
> 3 votes
This is very difficult to answer without sample data. Your data may contain carriage returns, or not escape quotation marks properly. However, if you can't safely share the data, here are some troubleshooting steps:

* Try uploading to a demo server (demo.civicrm.org) to ensure you're seeing the same problem.
* Most likely, some lines work and some don't. Take just the first three lines. Which import, which don't? Is there any change from adding/removing lines? What do the lines that don't import have in common?
* Most importantly - view the data in a regular text editor, not just a spreadsheet app. The spreadsheet app may be hiding some irregularity that's obvious when viewing the data in a text editor.

---
Tags: import
---


# Question
Title: Calling images from a database with custom tokens in mass mailings
I was just wondering whether CiviCRM offers the ability to insert custom images into a mass mailing? So that each person receives a different image pulled from a server?

The best described example I can find is here.

In the same vein, can tokens/mail merge be used in CiviCRM to send a different attachment to each subscriber?

If the answer to these questions is yes, can you tell me where the images/attachments are pulled from? I would assume our own server?

Kind regards, G

# Answer
> 1 votes
What you're describing is technically possible, but far from streamlined - so whether it's worth doing is up for debate. If it's a feature that's interesting to you, you may want to write (or fund someone to write) an extension to facilitate it.

Let's talk about doing this with custom fields (**Administer menu \> Customize Data and Screens \> Custom Fields**) and with an extension.

Custom fields are available as tokens, and they can contain HTML links. So you can create a custom field called, e.g., "image link" on a contact. You can then insert a token in CiviMail - see "Using Tokens in Emails" on this page in the documentation. It will look something like this:

```
Here's a link to the image: {contact.custom_8}

```

That's not quite what you want - you want to embed the image into the mail itself. So instead, do:

```
Here's your image: <img src="{contact.custom_8}">

```

Note that you'll need to go into "HTML Source" mode on your mail to enter that.

You can store the images wherever you like.

Now, this is unwieldy, because you have to populate the custom field for every user who receives the mailing.

If you went the extension route, you would use civicrm\_hook\_tokens and civicrm\_hook\_tokenValues to create your own tokens. You could then make tokens that created images based on, say, someone's interests or any other data you already stored. There's a good article here if you want to go that route, or check out the excellent Fancy Tokens extension for a solution to a related problem.

---
Tags: database, tokens, mailing
---


title: How to create a new report

text:
# Question
Title: How to create a new report
I need to create a new report, an italian postal bulletin for donation or subscription, as in the below image.

Do you have any suggestions on where to start? I mean:

* I must create an extensions?
* What's the tool (the best one) to write reports in CiviCRM?
* ....

Thanks for your attention

Marcello

# Answer
> 1 votes
You can create an extension based on report template using Civix

please refer to the link https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Report-Template+Extension

Also the image which you have attached is not very clear..

# Answer
> 0 votes
There are some good suggestions for different ways of creating reports in answer to this question that I posted last year.

How can I make it easier for users to generate the reports they need?

# Answer
> 0 votes
Sorry for the quality of the image, this is better.

Pratically, for each contact I must create all the standard stucture (lines, boxes, ...) and fill the boxes with the contact personal data (names, addresses, ...)

Marcello

---
Tags: civireport
---


# Question
Title: Does the latest version of CiviCRM accommodate PayPal's changes to its dispute tracking?
I received this message from PayPal and I am wondering if I need to do anything or if CiviCRM 4.6.4 on Drupal 7 already has it covered.

If not, what do I need to do?

Thanks.

> If you are currently using the Instant Payment Notification (IPN) process or the Case report in your current integration, we want to notify you of a change that may impact your business.
>
> To ensure you don’t experience a disruption of PayPal service, we encourage you to make any applicable changes by July 7, 2015.
>
> What is happening?
>
> We’re enhancing our dispute management system to ensure you receive more detailed and timely information.
>
> The first phase of this enhancement will encompass chargebacks and ACH bank returns. As part of this enhancement, we’ll be updating the format of the Case ID which is the unique identifier we assign to a dispute case.
>
> Why is this happening?
>
> Enhancing our dispute management system will provide more detailed, accurate, and timely information regarding disputes.
>
> What do I need to do?
>
> If you are directly integrating data from the IPN process and/or the Case report into your systems, you will need to ensure that your configuration will accept the format change for the unique dispute identifier as outlined here.
>
> Data passed contains a case\_id value. This value will now be formatted in two ways:
>
> Existing format: PP-XXX-XXX-XXX-XXX New format: PP-D-XXXX For the new format, XXXX is an integer. The “D” indicates the case is a dispute.
>
> Effective July 15, cases will be identified using either ID format until the transition to the new dispute management system is complete. This is expected to take several years.
>
> As a best practice, merchants are encouraged to integrate flexibly so that any future changes to the unique case identifier can be made without integration changes.
>
> When is this happening?
>
> We will begin generating cases using the new format after July 15. To avoid any disruption to the way you process IPNs or the Case report, please update your integration by this date.
>
> Thanks for your patience as we continue to improve our services.
>
> Your Merchant Services Support Team

# Answer
I received the same message (I'm using PayPal Standard with CiviCRM on Drupal). I don't believe we need to do anything about it, because CiviCRM doesn't interact with PayPal's dispute process. My experience has always been that if a payment is reversed in PayPal, the reversal is *not* automatically reflected in CiviCRM -- instead, I have to manually edit the CiviCRM contribution record to note that a reversal took place.

As I mentioned, I'm on PayPal Standard. I don't know whether PayPal Pro would be different in this regard, but I doubt it.
> 2 votes

---
Tags: paypal
---


# Question
Title: profile email notifications: can CiviCRM indicate what information has changed?
Members on our site can update their own profiles, using a custom profile that is set to send notification emails to administrators when an update is submitted.

The notification email contains all the data now in the profile -- but it would be great if the data that was *changed* was indicated by a different color, or maybe just some indication of which fields have a changed value.

I have no idea how CiviCRM handles versioning (if it even does), so I have no idea if this is even possible without significant custom development.

Anybody have any ideas? Thanks!

# Answer
I think what you want is *Logging*.

In the Civi menu, go to Administer \> System Settings \> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)

Enable logging, and from then on all changes to contact records will be recorded. You can view them by visiting the "Change Log" tab on the contact summary screen.
> 3 votes

# Answer
Well that's definitely useful, but not exactly what I'm after. I have a couple of people who don't have access to the CiviCRM system but who maintain external systems and only get the notification emails. The mails are complete, but it's hard for them to see immediately what's changed, so they have to review the entire record every time they get an update.

Are there any notification hooks for logging -- maybe only send email regarding the CHANGED data, instead of the whole profile?
> 0 votes

---
Tags: profile, email
---


title: Event Registration Emails

text:
# Question
Title: Event Registration Emails
I have set up an event and everything works fine, but no confirmation emails are being sent. we are only getting the emails from Paypal informing us of payment. I have tested the mail settings and left it at the default "mail" and the site is on a linux server. I do receive an email when I test the settings. I have made sure the email addresses entered are correct. I have added email addresses to make sure it's not just one server not receiving them.

The emails were working correctly for an event last year. Since then I have updated to 4.7.1.

Joomla 3.4.8

I don't know what else to do.

Thank you for any help. Patti

# Answer
Yes, pay later option their is no email sent in Civicrm 4.7.1 / 4.7.2 Where as when payment is made using dummy payment processor an receipt is been sent out

I guess this is an Bug in this version so you could wait till the next release or you need to roll back to CiviCRM Version 4.6.10 where this option is working fine - Please raise an issue for the same so this gets fixed in next release

* I guess this helps
> 1 votes

---
Tags: civievent, joomla, email
---


# Question
Title: Is it possible to install CiviCRM offline using WAMP?
My company is interested at offline CRM.

I would like to ask. Can CiviCRM be installed on WAMP server?

Is it easy to customize fields by the needs of company without to be proficient in Programming/Development.

For example my company just wants a database to store their clients/potential clients and each client will have 50 fields of information (name,surname,address etc)

Is this doable with CiviCRM? Thank you in advance.

# Answer
So no problem installing it on a WAMP, especially if you "only" want it as an "internal address book".

You have quite a lot of fields by default, and if you need more, you can create custom ones directly from the UI, no need to develop anything for your requirement it seems.

But the easiest is that you try, either on your own install or check our demo sites at http://demo.civicrm.org
> 4 votes

# Answer
Alternatively you can download a ready-made CiviCRM server in the form of a VirtualMachine, such as: https://bitnami.com/stack/civicrm/virtual-machine which is a VMWare VM.

This will run your CiviCRM locally in a separate virtual machine in your server.

Customizing fields in CiviCRM does not require any programming abilities, yet it takes some getting used to. You will find lots of useful information in this online book: http://book.civicrm.org/user/

Good luck!
> 3 votes

---
Tags: installation, evaluating-civicrm
---


# Question
Title: Can we print mailing lables from CiviCRM?
I cannot find a function that allows us to print mailing labels. Please advise.

# Answer
1. Search for the contacts you want to print the labels for
2. Select the contacts
3. Go to Actions / Mailing labels - print (see attachment)
> 2 votes

# Answer
It's explained in the this online book. Civicrm Books

Basically if you query of the contacts and select the ones you want, the action pulldown menu has a print mailing labels.
> 1 votes

---
Tags: mailing
---


# Question
Title: Importing phone/fax/mobile phone numbers from CSV.....best practices?
I'm about to do my first import of contacts into a pre-existing CiviCRM database on WordPress. Client sent over the CSV but there are columns like this:

Home Phone Home Fax Mobile Phone Work Phone Work Fax

That's fine, but in the DB, the Contact Details set has a Phone field and two dropdowns, one for Phone Location and one for Phone Type. And the ability to add more numbers. So what's the best way to take this CSV and properly do an import?

# Answer
I'm assuming that home and work are location types in your Civi? If that is in fact the case, the one question I would ask from what you included is what location type to assign to the mobile phone. Home and work would be location types, and phone type would be phone, mobile, or fax. You would then set up your mapping in the contact import to assign the correct location and phone types to each column. Here is a sample of what I mean:

(I chose home as the location type for the mobile but that might not be correct in your situation.)

Hope this helps, Lesley
> 4 votes

---
Tags: contacts, import, database, phone
---


# Question
Title: Add Custom Fields to Contact Details data
I'm trying to add Custom Fields for the Contact area. I know I can create custom data for a set of custom fields I create myself, but I can't seem to add custom fields to pre-existing sets created by CiviCRM itself. How can I handle this? Or must I only add to Custom Sets I create?

# Answer
> 1 votes
You create custom fields in custom field sets. You have the choice of them being displayed inline or tabs, and as initially collapsed or open, but beyond that, you have little control over where they are displayed on the contact summary.

However, with a bit of jQuery they can be moved around. For an example (although not custom fields) see https://civicrm.org/extensions/group2summary

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


# Question
Title: CiviCase Users Unable to Edit & Add Activities on Cases They've Been Assigned
We have assigned the Wordpress Access Control permission “CiviCase: access my cases and activities” to a variety of users who we want to assign case roles to. The description of “CiviCase: access my cases and activities” permission indicates that users with this permission should be able to view and edit case activities with cases they are associated with.

Users with this permission can view the cases that they've been assigned to, but they are unable to edit case activities and add case activities on cases that they’ve been assigned a role to. A popup box that says "Sorry, an error occured. You are not authorized to view this page" appears. The only way users assigned to a case are able to edit and add new activities to a case they've been assigned to is to enable the permission "CiviCase: access all cases and activities", which is something we prefer to not enable.

Another Civicrm user brought this issue a couple of weeks ago, so it appears to be an issue experienced by other users. It's a significant issue for organizations that will rely on Civicase. **Is there a bug?**

Users with Case roles cannot edit activities assigned to them: is this a bug?

We are using Civicrm Wordpress version 4.7.2.

# Answer
> 1 votes
To me this reads like a bug - either the description is misleading, or the permission isn't functioning. You should log this at issues.civicrm.org, including all the detail you've added here (and a link back to this page).

Your options from there are basically: 1) Wait for the core team to fix it. 2) Pay for the core team to fix it. 3) Recruit a freelancer or an agency to fix it for you.

Message me if you want me to look at this in more depth for you.

---
Tags: civicase, activities, permissions, error
---


# Question
Title: Country selection UI in 4.7.x negative feedback
I am in the process of upgrading sites from CiviCRM 4.6.x to 4.7.x.

One thing we have had to deal with in CiviCRM upgrades, is at each upgrade the list of selected countries always resets itself to United States only. Always I must make sure to stop in at URL:

Home » CiviCRM » Administer CiviCRM Settings - Localization

```
/civicrm/admin/setting/localization?reset=1
```

And insure that all of the countries are in the selected / available list.

On previous versions of CiviCRM, this UI has been a simple HTML multiple pick list control. However with the upgrade to CiviCRM 4.7.x, now it is a fancy AJAX type pick list where I must click, click, click each country one at a time. This is a major PAIN / regression in functionality.

Please revert back to the simple HTML list control.

Oh, and the help text appears to not have been updated to the new UI. It is still as follows: "Available Countries - Which countries are available in the Country selection field when adding or editing contact addresses. Profile and Custom 'Country' fields also use this setting. **To include ALL countries, leave the right-hand box empty.** "

I am thankful, Michael

# Answer
> 2 votes
Terrific! I found a work-around, and here it is! Using Firefox web browser, with the "Web Developer" tool bar extension, select Disable \ Disable JavaScript \ Disable All JavaScipt. Then reload the above specified URL. That will load the page WITHOUT the AJAX / JavaScript multi-select controls... and leave the basic HTML list controls. I was able to quickly select all the countries, and I am cruising along wrapping up this upgrade.

# Answer
> 0 votes
To me the main bug here is needing to readd them after each upgrade. That's a symptom of aomething underlying. Please could you add this to http://issues.civicrm.org and include the previous upgrades you've done where you had to go through this, i.e. 4.5-\>4.6, 4.6.5 -\>4.6.10. This in particular is helpful to tell us when it's from and if it only affects major version updates.

---
Tags: admin, ui
---


title: Which SMTP relay to replace Mandrill

text:
# Question
Title: Which SMTP relay to replace Mandrill
as mandrill have just announced they are becoming an add-on to mailchimp, and transactional email service will be attached to a subscription to MailChimp. And as my provider mail service drop all bounces, I have to fall back on other solutions that can be integrated properly with CiviMail. What are solutions (free or very little expensive because we are a very small structure) that would send 600 messages per month maximum (Google, Zoho, ...)?

Thank you for your help.

# Answer
This conversation has been taking place on the CiviCRM Partners' list in the past week. Fortunately, some folks from the list created a wiki page to track the best options, which is available here: Mailing Providers.

I like Amazon SES, which termdark referenced (I'm the author of that documentation they linked). However, CiviCRM partners with much larger installations don't like it because it lacks some high-end features (e.g. sub-accounting) and because they can vary their throttling.

If you're only sending 600 messages/month, you can probably use your web host's SMTP servers. If you're on a VPS, you can set up Posfix yourself - you're unlikely to get blacklisted with such a low volume if you configure it right, and being able to configure Postfix is an important part of how to set up Amazon SES.

EDIT: There's a lot of interest amongst the partners in SparkPost. They offer 100,000 free messages a month, and support many of the high-end features. There's also an extension under development by the folks at CiviDesk to use the more efficient (and easier to set up) API for bounce handling.
> 3 votes

# Answer
Amazon SES is a suitable replacement for those on a budget. There's some useful documentation on getting it set up with CiviCRM at: https://hq.palantetech.coop/projects/commons/wiki/Amazon\_SES\_for\_CiviCRM

I'd advise you to set up the Postix server as SES lacks much of the more useful functionality of Mandrill.
> 2 votes

---
Tags: civimail, smtp, mandrill, amazon-ses
---


# Question
Title: Is it possible to populate a set of custom fields with data from a postcode dataset?
My organisation (and others I presume) would find it useful to populate a set of custom fields based upon a contact's postal code.

The dataset is the Scottish Index of Multiple Deprivation (SIMD), which provides demographic information by postal code area. The data is available as a CSV file: http://www.gov.scot/Topics/Statistics/SIMD/SIMDPostcodeLookup

What would be the best way of implementing this?

# Answer
There's an extension that provides this functionality called "CiviCRM Region Lookup". It says it only works through CiviCRM 4.4; I'm not sure if anyone's tested it with a newer version, it might just work.

Note that it's not an easy process to set up for the very first time - but it's easier than writing custom code to handle this from scratch. You may have follow-up questions, but that link should get you pointed in the right direction!
> 1 votes

---
Tags: custom-fields
---


title: Error whilst saving contact

text:
# Question
Title: Error whilst saving contact
Since yesterday I'am getting the following error when I save contact:

```
Notice: Undefined variable: ret in CRM_Utils_Geocode_Yahoo::format() (regel 155 van /sites/all/modules/civicrm/CRM/Utils/Geocode/Yahoo.php).
Notice: Undefined variable: ret in CRM_Utils_Geocode_Yahoo::format() (regel 156 van /sites/all/modules/civicrm/CRM/Utils/Geocode/Yahoo.php).

```

# Answer
> 2 votes
Check your Mapping and Geocoding Providers setting using below link.

your-site-name/civicrm/admin/setting/mapping?reset=1

Change Geocoding Provider to google and then save your contact.

---
Tags: drupal, geocoding
---


# Question
Title: How can I use a contribution page to allow user to make payment against an existing pending contribution record?
Here's my use case:

Users make a document submission via a separate third party system. The document is manually assessed and if suitable, is accepted. The user then needs to make a payment, but they need an invoice in order to do that.

I'd like them to use CiviCRM to make the payment online. In order to send an invoice from Civi I need to have a contribution record already in place, so if I create this record and give it a pending status, how can the user's subsequent payment be logged against this record, rather than a new record being created when they submit the contribution page?

# Answer
> 1 votes
It sounds to me more like a pledge use case. That is not something I have much experience with, but I'd think you could enter a pledge for them and when they make the contribution, it would be used against the pledge.

If you don't otherwise use pledges, you could even rename it invoices.

# Answer
> 0 votes
In order to achieve this process you need to write an Extension - this will be an bit of work

One way to do this - any contribution created against the user can be viewed in user dashboard - http://d46.demo.civicrm.org/civicrm/user?reset=1

you can add a new button to user dashboard and On submit the button/link which will redirect you to the payment screen based on you payment processor setup. Then you can collect the amount and complete the transaction

---
Tags: civicontribute, invoice
---


# Question
Title: Custom Fields not importing into contacts database
Having an issue where I'm trying to import a series of CSV files into the Civi Contact Database. There were new custom fields created to do the import, but when I do the import with all the fields, I get an 'DB Error: constraint violation' error. If I just import the fields that were originally there, I successfully import the CSV into the DB.

So I must have done something wrong with the custom fields I created yesterday. But what? What should I look for to make sure the import is successful?

# Answer
> 0 votes
I have found that in order for CiviCRM to accept the country field during an import you have to spell the country exactly as it is written in CiviCRM DB. For example you cannot import 'UK', but 'Great Britain' instead (not sure if I remember the values correctly, but this is the concept anyway).

If this is your case indeed, you will have to export the country list from CiviCRM and use it to populate the respective field in your csv file.

# Answer
> 0 votes
Two things: * "DB Error: constraint violation" isn't enough information to troubleshoot. If you get an error like this, turn on debugging and backtrace: **Administration menu \> System Settings \> Debugging and Error Handling**. Posting the debug info and a backtrace greatly increases others' ability to help! * What you're describing is a known bug: See here. Unfortunately, no one who's affected this has stepped up yet with a fix, or funds for the core team to fix it.

To give the usual pitch: CiviCRM is free to use, but not free to write. If you're making part of your living from CiviCRM, please consider being part of the community of folks who either fixes bugs or pays people to fix bugs.

---
Tags: custom-fields, import
---


# Question
Title: How to enable profiles in Contribution Pages?
In my contribution pages, I cannot see the Profile dropdown. Is there a way to enable this?

I have disabled all of my plugins and changed my theme to 2016 to see if it's an error on my side. So far no dice.

I'm using 4.7.1 for Wordpress.

# Answer
Many thanks to quick replies. You were right- I overlooked a plugin. On my site, it was the Ultimate Addon for Visual Composer.

As long as it's disabled, I can see the Profile selector. Once I'm done, I can enable the plugin and not loose functionality on the front of the site.
> 1 votes

---
Tags: profile, contributions
---


# Question
Title: Contacts not appearing on mailing labels
Have a strange situation where 2000 contacts have been imported with address details. The addresses look fine but when you create a mailing label neither the contacts nor the addresses chosen appear. But when you go and edit/save the contact that contact does then appear on the mailing label, V strange.

I've tried clearing caches and I also though the scheduled job 'Update Greetings and Addresses' may be connected but this made no difference. Something happens when you save the contact but I can't see what it is.

Olly

# Answer
> 1 votes
This was due to an import bug. During the import some contacts were set as deceased (value 1). The remaining contacts were then set to null by the import tool. But all the elements like Do Not Email if Deceased require a value of 0 for the deceased field. So they wouldn't show on the mailing labels as the system thought they were deceased. A simple export of all individuals (contact ID and deceased value), remove those who are deceased and re-import with a value of 0 on the deceased field solved the issue. –

---
Tags: address-labels
---


# Question
Title: How to have different receipt messages on different donation pages
I have different donation pages and want to have completely different receipt messages sent. You can set up a custom "intro" text for the thank you message, but the bulk of the mail comes from the same template, no matter the contribution page, so limited options to change that. Moreover, the template message used if recurring donation is no using the custom thank you "intro" text.

Is there a way to change what template to use on a per page basis?

# Answer
> 2 votes
I tried @Eli Lisseck's suggestion and it worked. You can have a different receipt message per page by using this logic {if $contributionPageId == "yourPageId"}

---
Tags: civicontribute, message-templates
---


# Question
Title: Is content accessed through a click-through link cacheable by Varnish or similar?
I have a client whose site grinds to a halt every time they send out a mailing because of incoming traffic. We're using Varnish without SSL endpoint termination, so right now, we're not caching those pages at all.

However, even if we install SSL endpoint termination (or use HTTP links), the click-through links are unique, even though they return identical content. Is that content cacheable by Varnish? Or does using unique click-through links completely break caching?

# Answer
> 2 votes
So, only the civicrm click-through requests are grinding the VM/Server?

I am not seeiing how to cache those without breaking the counter functionality.

Is site OK when not using the click-through functionality? To make 100% sure that those are the cause, and not some other Varnish config (like not caching when certain session cookies are available).

If it is really the CiviCRM counter functionality and not the pages it forwards to and you need that functionality then I only see 2 options:

* upgrade the server/VM
* send the mailing in batches (maybe even spread over a few days)

---
Tags: caching, click-through
---


# Question
Title: Network Error when wanting to modify a ACL Role
I get a "Network Error" when I want to modify an ACL Role.

This happens on my Production Site which is in https, and not on 2 other test sites which are in http.

All my sites are in Civi 4.7.2 / Drupal 7.42

# Answer
> 1 votes
Sorry for the question : this problem was due to errors in my .htaccess file. Once fxed, everything works OK.

Question closed.

# Answer
> 0 votes
I wanted to force https://www.xxx ; To do this, I modified .htaccess :

Addd 3 lines starting from 65 :
RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.\*)$ https://%{HTTP\_HOST}%{REQUEST\_URI} \[L,R=301\]

Uncommented 3 lines arround 95 : RewriteCond %{HTTP\_HOST} . RewriteCond %{HTTP\_HOST} !^www. \[NC\] RewriteRule ^ http%{ENV:protossl}://www.%{HTTP\_HOST}%{REQUEST\_URI} \[L,R=301\]

(Don't ask me why : I don't know anything to this : a friend of mine just told me)

---
Tags: permissions
---


# Question
Title: How to add profile shortcode to WordPress sidebar (i.e., in widget)
I can add a newsletter signup Profile shortcode to a page or post in Wordpress, but I'd like to have it show up on the sidebar. I put the shortcode into a text widget (the code is for our MailMunch signup is in a text widget) but the Civi shortcode doesn't work there.

See http://sandbox.bio4climate.org/

Suggestions?

Thanks!

Adam

P.S. - This is a test site (but the payment processor is live!).

# Answer
> 1 votes
Have you tried just adding the HTML form snippet to the text widget? It's not as neat as adding a shortcode, but it should work okay.

Go to Administer CiviCRM \> Profiles, then HTML Form Snippet under 'more' for your chosen snippet. Copy all the code there and paste it into your text widget.

# Answer
> 0 votes
To me this sounds like a custom plugin / extension job.

Be advised of the following: 1. Some versions of WordPress & CiviCRM only support one hook implementation across all plugins. I recommend building it in a civi extension to circumvent this. 2. Unless you are yourself a software developer, if you do need a custom plugin, I suspect you'd best recruit a freelancer. I'll happily bid, otherwise there's the excellent CiviCRM partnership organisations.

---
Tags: wordpress, profile
---


title: Error: Could not create directory

text:
# Question
Title: Error: Could not create directory
I have copied a drupal codebase, drupal database, and civicrm database and moved them to a new server. I am using version 4.7.0 of civicrm. My copied site throws this error:

> Error: Could not create directory: /home/abc. If you have moved an existing CiviCRM installation from one location or server to another there are several steps you will need to follow. They are detailed on this CiviCRM wiki page - (learn more...). A fix for the specific problem that caused this error message to be displayed is to set the value of the config\_backend column in the civicrm\_domain table to NULL. However we strongly recommend that you review and follow all the steps in that document.

This folder does not exist on my server, nor do I want it to. It is a reference to a location on the server from which I made the copy.

* I have looked in civicrm\_domain, config\_backend does not exist
* I have emptied all the cache tables in the civi database
* I have emptied all the cache tables in the drupal database
* I have updated settings.php ('home/abc' is not present anymore)
* I have updated civicrm.settings.php ('home/abc' is not present anymore)
* I have removed/removed all files from the following:

1. /sites/default/files/civicrm/templates\_c/\*
    2. /sites/default/files/civicrm/ConfigAndLog/Config.IDS.ini
    3. /sites/default/files/civicrm/ConfigAndLog/\*

When I run `grep -R "/home/abc" *` from my doc root, no matches are found. When I search for the string "/home/abc", in both databases, I get no matches.

Any ideas? Thanks.

# Answer
1. **General tip**: When I've had problems like this (a mysterious setting/value/datum), one other technique is to search the full database. There's no direct way to do that in MySQL, but you can dump the database to a file (`mysqldump`) and then search that.
2. **Specific tip**: In the Civi database, check table `civicrm_setting`, e.g. `select * from civicrm_setting where value like '%abc%';` Equivalently, in the admin UI, check `Administer => System Settings => Directories` (or its sibling `=> Resource URLs`).
3. **Background**: This may or may not be your problem, but as background/theory.

* In v4.1-v4.6, directory+URL settings were stored as a mix of absolute and relative paths (but displayed *as if* they were always absolute paths). The problem is that absolute paths kinda suck -- they make the database less portable. Ideally, you want all the settings to be stored as relative paths.
    * In v4.7, the defaults and UI have changed to better encourage relative paths. The key thing is the introduction of *path variables* like `[cms.root]`. For example, the default directories in a new v4.7 installation look like http://imgur.com/RbMgyn6
    * v4.7 is backward-compatible with old settings. If you used an absolute path in v4.6 and upgraded, then it's still an absolute path.
    * If you cannot edit these things in the UI (because an error blocks it), then you can use SQL or `drush cvapi setting.create`. For v4.7, I'd suggest simply deleting the offending setting. (Deleted settings will go back to their defaults in 4.7.)
> 4 votes

# Answer
Prem's comment contains a good next step - delete the contents of your `templates_c` folder. The location in a standard Drupal install is /sites/default/files/civicrm.
> 1 votes

---
Tags: drupal, 4.7
---


# Question
Title: Need to add Contribution page for "in kind" donations with image upload
I am using CiviCRM 4.7 in Wordpress. I have taken on a new project for a local charity, what they want is to have a donation page set up for furniture, clothing ect. They have plans of doing several other things as well and CiviCRM is a perfect fit, except I cannot for the life of me figure out how to create a custom contribution page with an image upload field. Any help would be appreciated.

# Answer
You can add Custom Fields to a set of fields that are specifically used for Contributions. One such field could be a file field type - and therefore you should then be able to include that in to a Profile that you then include on the Contribution form. I can flesh this out more, but if you know your way around creating Custom Fields and Profiles the above might be enough to help you advance.
> 1 votes

---
Tags: civicontribute, custom-fields
---


title: cPanel Cron to run Scheduled Job Help

text:
# Question
Title: cPanel Cron to run Scheduled Job Help
I have spent the last two weeks trying to get Cron Jobs with cPanel run Scheduled Jobs in CiviCRM. Literally everything I have tried does not work as a command in Cron Jobs but when using SSH I have been able to get this to trigger the job to run:

```
wget -q -O - "http://website.com/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=websiteAdmin&pass=websiteAdminPassword&key=1234567912345678912345678912345"

```

But when I take this exact command that works via SSH and put it into Cron Jobs I get an email stating:

```
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file

```

My next idea was to remove the quotation marks before and after the link, which then failed due to invalid token, the password has symbols in it, so I escaped them using \ before each special character. Then I get:

```
ERROR: You need to send a valid key to execute this file. More info at:http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

```

At this point, I know for a fact the key is correct since this command runs via SSH and the key never changed every time so far. The escaped characters are only within the password.

I have tried many other things but I figured a log file explanation might be overkill, anyone have any ideas?

Using: cPanel version 11.52.3 (build 1) CiviCRM version 4.6 WordPress 4.4.2

# Answer
> 1 votes
You don't say what version of anything you are running, or if you upgraded or did a new install. If this is a 4.7 upgrade, I had similar issues and had to resort to installing and using the WP-CLI method. If you go that route, you probably also want to take a look at this: WP-CLI using GMT/UTC Timezone on cron jobs

# Answer
> 0 votes
Not sure if I'm on the right track here, but what if you created a separate one-liner script with just the wget command you're trying to run and executed said script from cron?

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


# Question
Title: Event Registration Form - Page Automatically Refreshing
On our event registration form, where a user can register someone other than themselves. When they select 'Yes' to register someone else, a field appears where they can search for the person they want to register. However, once 'Yes; is selected, the page automatically refreshes in about 3 seconds. After the page refreshes, the form goes back to the original view as if the user just opened the registration form.

This is the only field that is causing the page to refresh.

Any thoughts on why the page is automatically refreshing and how to correct it?

EDIT: We are using Civicrm 4.2.6 with Drupal 7.34

# Answer
@stechsla,

Mate, that‘s a *really* old version of CiviCRM. There are literally hundreds of bugs on that that were fixed years ago. Definitely time you upgraded to 4.4 (there‘s a case to be made to get you all the way to 4.6!) - in my view there‘s little point in attempting to address this issue as an upgrade would likely fix this, a raft of other problems, and give you vital security upgrades, not to mention cracking new features, a faster system, and a slicker interface.

If you‘re interested in having your system upgraded then your sysadmin should be able to help you. If you would rather someone else do it, please contact myself (john@civifirst.com - proud presenter of a presentation called "upgrading your upgrade") or a CiviCRM partner agency, details of which are available on civicrm.org.
> 1 votes

# Answer
Seems for this you need to delve into the code.

My experience of the events registration page is that it has changed throughout the different versions - please can you tell us which version of Civi you're on? And which platform & version?

With that info, if someone here can't answer, it may be worth asking a freelancer (including your friendly neighbourhood JohnFF!) or agency to help.
> 0 votes

---
Tags: civievent
---


title: Switch template in extension

text:
# Question
Title: Switch template in extension
Extension loads and I added the following hook to switch demographics template:

```
function myext_civicrm_alterTemplateFile( $formName, &$form, $context, &$tplName) {
switch($tplName) {
    case "CRM/Contact/Form/Edit/Demographics.tpl":
      $mytpl='../templates/CRMContactFormEditDemographics.tpl';
        $template = CRM_Core_Smarty::singleton();
        if ($template->template_exists($mytpl)){
          $tplName=$mytpl;
        }
    break;
  }

}

```

I think this worked before. What did I wrong? I put a breakpoint with my debugger or let it run to cursor position, but it never even gets there, so I can't figure out what's wrong.

# Answer
> 1 votes
I use alter template file in 4.7.2. It has been working great for me.

I needed to switch out the contact editor form based on contact subtype. One important thing I found if doing this programically was the clear the template cache.

```
function customcomponent_civicrm_alterTemplateFile($formName, &$form, $context, &$tplName) {

    // swith contact template based on contact type
    switch ($formName) {
        case 'CRM_Contact_Form_Contact':

            $clear = true;

            if ($form->_contactType!='Individual'||empty($form->_contactSubType)) break;

            // there are some weird non printable chars on contact sub type
            $contactSubType = preg_replace('/\W/i','',$form->_contactSubType);

            // switch out the form based on contact type
            $newTpl = 'CRM/Contact_'.$form->_contactSubType.'/Form/Contact.tpl';
            $newDir = __DIR__ .'/templatesconditional/ContactSubType_'.$contactSubType;

            break;
    }

    // clear out old templates -- found CRM_Admin_Form_Setting_UpdateConfigBackend::postProcess -> CRM_Core_Config::cleanup
    if (!empty($clear)) {
        $config = CRM_Core_Config::singleton();
        CRM_Utils_File::cleanDir($config->templateCompileDir, false);
        CRM_Utils_File::createDir($config->templateCompileDir);
    }

    // switch out the templates
    $template = CRM_Core_Smarty::singleton();
    if (!empty($newTpl)&&$template->template_exists($newTpl)) $tplName = $newTpl;
    if (!empty($newDir)&&is_dir($newDir)) $template->addTemplateDir($newDir);
}

```

---
Tags: extension, hooks, debugging, custom-templates
---


# Question
Title: Is it possible to do geocoding in cronjob only?
I'd want to only do the geocoding in batch mode, because otherwise, it's too slow for my use case (petition signatures with dozen of signatures per second).

Is there a way to use the geocoding via the cronjob but disable it from the api call (contact.create)?

# Answer
I suspect you can pass skip\_geocode to the params of 'fixAddress' a number of ways (such as injecting it with tpl override or javascript).

Check CRM/Core/BAO/Address.php line 381-382.

```
// check if geocode should be skipped (can be forced with an optional parameter through the api)
$skip_geocode = (isset($params['skip_geocode']) && $params['skip_geocode']) ? TRUE : FALSE;

```

Leave geocoding enabled so the cron process completes it, but it is skipped when accessing via web.
> 2 votes

---
Tags: cron-job, geocoding
---


# Question
Title: Can I use CiviCRM group as mailing list - or sync with Mailman?
Currently I use CiviCRM as basically a "pure" CRM, and then I use an external Mailman provider to maintain two smallish discussion group lists (one with about 8 people, the other with about 50). I have to copy & paste names from CiviCRM into the Mailman interface & make sure they don't get out of sync.

Is it possible to let CiviCRM listen to an address (like `leadership@example.com`) and forward all such messages to the members of the "leadership" CRM group? If so, I could get rid of my Mailman setup entirely.

Failing that, is there a way to automatically sync between Mailman and CiviCRM so they don't get out of sync? I can set up my own Mailman instance if I need to (currently I outsource that because my web provider, Dreamhost, has pretty bad marks on spam blacklists, apparently).

# Answer
Check that extension https://github.com/fuzionnz/mailman\_sync that does sync a group and a mailing list

If you were to prefer sympa than mailman, there is another extension that does the same there https://github.com/civicrm/org.civicrm.sympasync
> 2 votes

# Answer
If you want a civicrm only solution, you will have your own extension.

Civi already allows you to listen to an email address and create an activity for every email received. What you'd need to add is to forward that email to everyone member of a group.

However, all the nice native features around email mailing lists (eg. thread, bounce management...) are going to be missing, or will need additional coding. At the end of the day, if you want a mailing list manager, using a real one seems to be easier than trying to code one in php on the top of civi
> 1 votes

---
Tags: email, groups
---


title: Theming Civi Vs Drupal

text:
# Question
Title: Theming Civi Vs Drupal
Since myself new to civi and drupal combination in certain case we need drupal as backend for few functionalities/workflow, and few functionalities works civi as backend. So my concerns is where would be the theme get placed ..whether we need to build two themes for civi and drupal differently. or theming will be common in one place? Please advise

Thank you

# Answer
> 4 votes
In Drupal 7 at /admin/appearance you can specify what Drupal theme to use for front-facing civicrm pages, and separately which one to use for back-end civicrm interface.

Hope that helps. Not sure I quite understood your question but thought this might be what you need.

# Answer
> 1 votes
If you want to use different theme for different page of CiviCRM, please have a look at Page Theme module. its here https://www.drupal.org/project/page\_theme

---
Tags: civicontribute, drupal, evaluating-civicrm, theme
---


# Question
Title: Database scheme corrupt - foreign key relationships are missing in mysql
At a client of us we have a problem with the database scheme. CiviCRM is working normally except that when you want to merge contacts the Activities/Groups/Relationships etc.. are missing in the merge screen.

After some investigation it turns out the merge functionality use the mysql databasescheme for fin ding out which tables are linked to a contact.

It does so with the query below:

```
SELECT table_name, column_name
FROM information_schema.key_column_usage
WHERE referenced_table_schema = database()
AND referenced_table_name = 'civicrm_contact'
AND referenced_column_name = 'id';

```

The problem at this specific installation is that the information\_scheme.key\_column\_usage is empty for this specific database.

So I assume that the foreign key relationships are missing in mysql. In the past this civicrm site has moved databases from one to another and there has been an update from 4.5.x to 4.6.x

Does anyone know how to fix the database scheme?

Thanks

# Answer
> 1 votes
Having spoken to our hosting experts we are going to rebuild foreign keys. Will update you shortly.

thanks, Jon-man

---
Tags: database
---


# Question
Title: How do I find the contact ID on a checksum link, after a form is submitted?
I'm trying to make an extension that does the following:

1. User clicks link in email
2. Form loads, extracts the contact ID from the querystring (along with a checksum for security), and customises the form appropriately
3. User submits form
4. Changes are saved
5. Form reloads, showing updated data

My problem comes at step 5, as the form no longer knows what the contact ID is. How can I pass the contact ID to this page? It's no longer in the querystring, and I can't find it anywhere...

Sorry if this is basic stuff - I've tried to figure it out from the existing profile code.

# Answer
> 2 votes
Please have a look at the code here and see if it can help with what you need.

---
Tags: quickform
---


title: Import multiple options in one field

text:
# Question
Title: Import multiple options in one field
I have a custom field for Individual contacts which can carry multiple values, i.e. 'Languages' can be 'English, German, Spanish, Greek'.

An individual may speak 'English, German', another 'Spanish, Greek, English' and so on.

How can I populate this field with multiple values when importing contacts?

# Answer
If you are using Multi-value Custom Data, see How to import to multi-record set custom fields and the answer.

But it sounds like you are importing multiple options in a field, in which case you can use comma separated values in a single cell. The import file will look something like this:

```
First Name,Last Name,Language
Joe,Smith,"English, Spanish"
Frank,Jones,"Dutch, English"

```

Tip: Try exporting a couple of existing records (with similar data) to see what CiviCRM expects in the import.
> 2 votes

# Answer
You can import the multi value data. Format should like this below.
ContactID Language
101 English
101 German
102 Spanish
102 Greek
102 English
> 1 votes

---
Tags: custom-fields, import
---


# Question
Title: Can only Primary Members renew a membership?
We have a membership type where the relationship type is specified as "Spouse of", with the idea that this would be how we implement a Family Membership. However it seems that only the contact who is designated as the "Primary" member can renew correctly. When the non-primary member renews, it works but a new membership is created rather than updating the old one. This is problematic for us because many of our Family Members are equally active; it won't be the same person every year who does the renewals.

# Answer
I think the only way you could do this currently is by having the 'family' as an Organisation, use the 'on behalf of' approach on the Contribution page, and ensure all Family members are 'current employee' and have a 'permissioned relationship'.
> 1 votes

---
Tags: civimember, primary
---


# Question
Title: Suppress default CRM.alert in hook_postProcess
Trying to figure out an answer to this question, have tried to just disable a default CRM.alert using `CRM_Core_Session::setStatus(null, false);` in hook\_postProcess (defined in a drupal module), but alert still pops up (not a problem generally, it pops up in a default style, would like to use **CRM.status** instead, which works perfectly even outside of CiviCRM, while CRM.alert doesn't). Any advice, please!

# Answer
To clear all status messages and prevent them from being shown to the user, you can do:

```
CRM_Core_Session::getStatus(TRUE);

```
> 2 votes

---
Tags: drupal, hooks, ajax, ui
---


title: Our donation pages are down

text:
# Question
Title: Our donation pages are down
There are code snips and what not at the top of our donation pages....and people cannot donate. Help!

# Answer
Andrew West's comment seems to be correct. There are two different things happening here - or three, depending on how you look at it.

The most important is "Permission Denied". I just visited your site, and confirmed you're running Drupal as your website software. Go to this page: www.mcuw.org/admin/people/permissions. In the "CiviCRM" section, find "CiviContribute: make online contributions", and make sure that it's checked off for both "Anonymous User" and "Authenticated User". Note that you'll need to be a Drupal administrator to view that page; if you're not, please contact your website administrator.

Second - you're getting notices on the top of the page. Those notices shouldn't affect anything, but they're bad for the donors to see, it erodes trust. You should hide those. A good explanation of how to do that is here.

Third - I'm not sure why you'd be getting those notices at all. You may want to ask your website administrator if there are any customizations they can think of that might lead to those notices appearing.
> 3 votes

# Answer
You need to contact your hosting company to resolve. United Way has vendors (OneEach Technologies, etc.) that provide website/hosting/civicrm packages to many UW affiliates that manage the backend configuration of your website.

You do not have the permissions to make the changes needed to fix this. Your hosting company does.
> 0 votes

---
Tags: civicontribute, drupal, permissions
---


# Question
Title: How do I add a search box to our website?
When I read the help section, it tells me where to go, but it says I don't have access. I just want a search box on our site.

# Answer
Discuss this with OneEach Technologies (your hosting partner/provider). You likely don't have permissions needed to make the changes you want without their support.
> 1 votes

---
Tags: search
---


title: Cron fatal error 4.7.2 (D6)

text:
# Question
Title: Cron fatal error 4.7.2 (D6)
After upgrading my Drupal 6 site (latest version) to Civi 4.7.2 all cronjobs set up in Cpanel are failing. Scheduled jobs are working fine when triggered in Civi but fail when triggered with the Cron url in the browser.

My cron is

```
wget -O /dev/null http://mysiteurl/sites/all/modules/civicrm/bin/cron.php?name=xxx\&pass=xxx\&key=xxx

```

Error is:

```
Fatal error: Call to undefined method CRM_Utils_System_Drupal6::getUsersTableName() in /home/mysite/public_html/sites/all/modules/civicrm/CRM/Utils/System/Drupal6.php on line 313

```

# Answer
A patch has been accepted for this.

https://github.com/civicrm/civicrm-core/commit/76eeb935253f42e836a58e1f9d077caaa498c947
> 1 votes

# Answer
Have you tried with the drush method? I found it more reliable to use than the cron one, and more performant than over wget too
> 0 votes

---
Tags: cron, drupal-6
---


# Question
Title: "Cron Not Running" system error after update to 4.7.1
The detail is: "No cron runs have been recorded."

Just updated from 4.6.10. This has never been a problem with other updates. What do I have to do to fix this? We need cron to send mailings as I recall.

Edit: **There are a lot of errors including "cron not running" on the civicrm wordpress demo site so it's not just me.** I think something needs a tidy. Another error on the demo site: "Failed to make directory (extensionsDir) at "/srv/buildkit/build/wpmaster/wp-content/uploads/civicrm/ext/". Please update the settings or file permissions."

# Answer
> 2 votes
I noticed on all my sites that I upgraded, it also initially had an error that cron was not running. But after the first automatic cron run triggered by my host cron job, this went away.

# Answer
> 2 votes
It seems to be an issue with running php bin/cli.php. Can you try using wp-cli instead?

```
/path/to/wp --user=<cron> --url=<http://example.com> --path=</path/to/wp> civicrm api job.execute auth=0

```

# Answer
> 0 votes
Hrm ... That's very interesting. I'm fighting the same error, though it is persisting far beyond the first run. On mine it seems like it's failing to render the WP\_Error correctly. I thought it was a third party plugin, but I'm beginning to feel like it is deeper. Perhaps related to the removal of the "htmlize" class? Here's a bug I've opened. https://issues.civicrm.org/jira/browse/CRM-17981

# Answer
> 0 votes
I reviewed the Civi instructions on cron. I performed an adjustment of the permissions of ../civicrm/bin/cli.php from 0754 to 0755 and the error message disappeared.

See Wrong permissions for cli.php

---
Tags: wordpress, upgrade, 4.7
---


title: How to fix translations in CiviCRM 4.7

text:
# Question
Title: How to fix translations in CiviCRM 4.7
We have a localized CiviCRM instance (Dutch), and after upgrading from 4.6 to 4.7, some things are not translated. In particular, after a contact search, the tasks you can do on the results (add relationship, delete contacts) are not translated.

So I created a Transifex-account, but there it says that all strings are translated. (I tried to see the translated strings using the Transifex UI, but I always get 'There was an error connecting to server. Reload '.)

This was not very helpful, so I cloned the l10n-repository from github. I looked at the .po-files, and it looks like they are automatically generated from the sources of 4.6. In 4.7, lots of strings changed, like e.g. in 7f82e636, but the new strings are not in the po-files.

So I wonder how we'll get CiviCRM 4.7 correctly translated.

# Answer
Exists an unresolved localization issue that probably explains your translation problems. You can see here:

CRM-17737 New Mailer dialog seems impossible to translate
> 3 votes

---
Tags: 4.7, localisation, translation, transifex
---


# Question
Title: /civicrm/civicrm/CRM/Case/BAO/Query.php Reported to Contain Malware by Wordfence
I'm testing Wordfence a WordPress security plug-in on our site. It reports that /civicrm/civicrm/CRM/Case/BAO/Query.php contains suspected malware. Is this true? We are running CiviCRM 4.7.2.

Here's the Wordfence message:

# Answer
No, this is a false positive.

The line flagging this is:

> $from .= " $side JOIN civicrm\_option\_value recent\_activity\_medium ON (case\_activity.medium\_id = recent\_activity\_medium.value AND option\_group\_activity\_**medium.id** = recent\_activity\_medium.option\_group\_id ) ";

Suggested courses of action: 1. Get rid of Wordfence. 2. Tell Wordfence about this false positive and request they fix it.
> 1 votes

---
Tags: civicase, security
---


# Question
Title: Contribution recorded but no membership created when account creation is used
We are seeing this on Drupal 7.4.2 / CiviCRM 4.6.13 instance

A new (anonymous) user makes a contribution (using price sets) to sign up for a membership. The profile forces an account creation.

The contribution is recorded but no membership is created. The Drupal contact is created too. Has any one seen this?

**Update:** this was due to a rule/trigger that redirected members on login. Disabling the trigger has resolved the problem.

# Answer
> 0 votes
There was a rule that redirected members to a page after login. Disabling that rule seems to have resolved the issue.

This was working earlier, a Drupal upgrade must have caused the problem.

# Answer
> 0 votes
Oh no! It looks like you've found a bug!

Here's how to take care of this pesky critter:

1) Check in the Drupal watchdog and civicrm log files for messages that occurred around about the same time as the contribution.

2) Establish if the contact was created in CiviCRM (your post doesn't explicitly say it was). If so, is it tied to the contribution and Drupal user?

3) If the answer to the above is yes, establish if you can create memberships on that user with the CiviCRM api.

4) If the answer to 3) is yes, then it should be possible to establish where in the code the critter is, put breakpoints around it (or use debug output or die commands) to establish where the error is. Finding out what parameters are going in is usually the thing to do here - so many times SQL queries end up trying to insert an illegal empty string or similar.

When you have that information, you have enough to file a bug report with the core team!

Hope that helps,

John

---
Tags: drupal, civimember
---