# Question
Title: Trouble connecting to SparkPost - Joomla 2.5.28 / Civicrm 4.6.14
I installed the SparkPost/CiviCRM extension and followed the README and all seems correct but I can not connect to SparkPost SMTP server. Is anyone else seeing a problem?

# Answer
> 2 votes
One possibility is that you are trying to send an email with a "From address" that is not in the sending domain(s) that you have verified in SparkPost. I think they only allow email from verified domains, so you can't send "from" a Gmail address in CiviCRM, for example.

If you are having trouble with the PESC Sparkpost extension you may want to try the one from Cividesk. It only requires inputting the API code and is pretty much plug and play.

# Answer
> 0 votes
I don't know about SparkPost specifically... however I use similar services with my CiviCRM installs...

Error seems to imply that your username and/or password is wrong: https://support.sparkpost.com/customer/portal/questions/16067096-atomic-email-sender-errors?b\_id=7411

## added in response to first comment

I ran into that on Google Compute Engine hosting. All mail ports but the non-standard 2525 were blocked. https://support.sparkpost.com/customer/portal/articles/1988470-smtp-connection-problems

I would test the ports. ssh into the server and telnet the ports to see if you can talk to the mail server. You should get a response something like below (try 587 and 2525):

david@server ~ $ telnet smtp.sparkpostmail.com 587 Trying 54.191.237.37... Connected to smtp.sparkpostmail.com. Escape character is '^\]'. 220 2.0.0 smtp.sparkpostmail.com ESMTP ecelerity 4.2.17.54068

---
Tags: civimail, ssl
---


# Question
Title: Is There A Way to Aggregate PDF Letters the Way Labels are Aggregated
When you create labels you can aggregate them by address. I want to be able to do this for PDF letters as well so that they match the labels. I have looked all over and do not see another way to do this.

Thanks, Steve

# Answer
> 1 votes
We came to the conclusion that this is not possible and that is because of the tokens that would be needed for the letters once they were aggregated.

---
Tags: search
---


title: Breakout Sessions

text:
# Question
Title: Breakout Sessions
Can you tell me how to set up Civi Events registration to allow attendees to sign up for breakout sessions? One set of sessions includes one that requires an additional fee.

# Answer
have a good look at what a Price Set can do for you. You can set up $0 options for the break-out sessions that have no price, and ones that have a price. You can set limits on how many registrations each session can take.
> 2 votes

# Answer
I'd set these up as Event Types with a custom field of type Event called Parent Event.
> 1 votes

---
Tags: civievent, registration
---


# Question
Title: Custom report with custom fields: Group By not correctly naming custom fields
**Update** I think the issue I'm running into is from this bug: https://issues.civicrm.org/jira/browse/CRM-18055

Using Civi 4.6.7 and Drupal 7.

This is my first custom report, and I'm attempting to let users sort by some custom fields. By reading through the docs and with the help of all y'all here on the forums, I got the fields added to the Sort dropdown:

```
class CRM_Report_Form_Special extends CRM_Report_Form {
  protected $_selectAliasesTotal = array();
  protected $_customGroupGroupBy = true;
  protected $_autoIncludeIndexedFieldsAsOrderBys = array( 'Activity' );
  protected $_customGroupExtends = array(
    'Activity',
  );

```

That part works great. What I can't get to work is when the user actually tries to sort by one of the custom fields, I always get a database error, as if the relevant columns don't exist:

```
FROM civireport_activity_temp_target tar
GROUP BY civicrm_activity_id  ORDER BY value_volunteer_activity_11_civireport.volunteer_activity_type_30 DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'value_volunteer_activity_11_civireport.volunteer_activity_type_30' in 'order clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT SQL_CALC_FOUND_ROWS GROUP_CONCAT(civicrm_contact_contact_target SEPARATOR ';') as civicrm_contact_contact_target, GROUP_CONCAT(civicrm_contact_contact_source_id SEPARATOR ';') as civicrm_contact_contact_source_id, GROUP_CONCAT(civicrm_contact_contact_assignee_id SEPARATOR ';') as civicrm_contact_contact_assignee_id, GROUP_CONCAT(civicrm_contact_contact_target_id SEPARATOR ';') as civicrm_contact_contact_target_id, civicrm_email_contact_target_email, civicrm_activity_id, civicrm_activity_source_record_id, civicrm_activity_status_id, civicrm_activity_details, civicrm_value_volunteer_activity_11_custom_30, civicrm_value_volunteer_activity_11_custom_43, civicrm_value_volunteer_activity_11_custom_31, civicrm_value_volunteer_activity_11_custom_42
FROM civireport_activity_temp_target tar
GROUP BY civicrm_activity_id  ORDER BY value_volunteer_activity_11_civireport.volunteer_activity_type_30 DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'value_volunteer_activity_11_civireport.volunteer_activity_type_30' in 'order clause']"]

```

\[Edit\] The field I want here is civicrm\_value\_volunteer\_activity\_11\_civireport.volunteer\_activity\_type\_30, instead of value\_volunteer\_activity\_11\_civireport.volunteer\_activity\_type\_30, but I don't understand why the settings at the top of my post don't make that happen already...

I *think* that the custom fields should work here, right? I don't want to go mucking about with the various SQL statements to fix this, do I? Thanks in advance for any help, and please let me know if I've left out relevant info!

# Answer
> 0 votes
I *think* the issue I'm running into is a result of this bug: https://issues.civicrm.org/jira/browse/CRM-18055

---
Tags: custom-fields, reports
---


# Question
Title: I am having a devil of a time with CiviCRM email
I've validated that my email settings work using SMTP.

Validated using the Contact / Send Email as well as from the Joomla Global Configuration as well as the joomla K2 article print button.

Its just down to testing a sample newsletter mailing. At the bottom is a single email address to send to. I send to an email address for my site (internal to the hosting service) and it works. I try to any other external email address and it fails.

Error msg: Error in call to Mailing\_send\_test : mail() returned a failure. If I changed the email setting to SMTP, I get a long error, a 'failure to connect to , Invalid SMTP response code received.

Need Help :-(

# Answer
> 1 votes
Possibly smtp settings, i.e. authentication? Outside of civi, are you able to send an email to confirm your global configuration/server/mail settings are correct?

Then go to CiviCRM, Administer CiviCRM, Outbound Mail. Ensure your settings match the cms. Then test to an outside email address.

If all goes well, go back to civi and try your email.

If still not working, then check what version of php you have, if 5.6, then smtp settings maybe messing you up because of peer verification.

---
Tags: email, newsletter
---


# Question
Title: How can i solve search issue in civiCRM?
In Wordpress I create two forms: one for a teacher and a second for a student. I need to search for teacher data using the student search form. But I can't understand how to do it. Please give solution, how can i solve this issue?

# Answer
Not sure what you are trying to do exactly, but if you are coding you could use the CiviCRM API to first find the teacher for the student with the API Relationship/Getsingle and then find the data for the teacher with the API Contact/Getsingle?

Aer you familiar with using the CiviCRM API? If not, explanation can be found on the documentation wiki: https://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
> 1 votes

---
Tags: custom-search
---


# Question
Title: Recommended upgrade for my civiCRM with Drupal 6
I'm currently using civiCRM 4.4.2 with Drupal 6.

I would like to know if I should upgrade it first to another version, or upgrade it directly to 4.7.5.

What do you recommend?

Thank you!

# Answer
You don't mention any extensions on your site so if that is not an issue then I think you are as well going to 4.7.x

If you do have extensions then you might want to check things out before going past 4.6.x which is a LTS (long term support) version and has probably had more extensions verified for it than for 4.7.x

Of course if you do have extensions, it helps the community to know if you find any issues on 4.7.x and reporting them back to the maintainers or contributing patches or funds to help ensure they do work on that release.
> 2 votes

# Answer
It depends on your release strategy? There are several options:

1. Always upgrade to the latest version. This ensures that you have the latest functionality and security fixes (advantage) but will also run the risk of finding new bugs that no one identified before (downside)
2. Stay on the latest LTS (Long Term support) which is more defensive but arguably more stable. I usually recommend customers to stay on the LTS unless they need the latest and greatest. Security fixes will always also be released for the LTS version, which at the moment is 4.6
    3. Stay on whatever release you want to stay on because you do not want to be troubled by testing after upgrades. Obvious downsides are that you will run a security risk (unless you apply or backport all security patches to your version) and that you miss the new functionality.

If you want to stay on the latest, you can upgrade directly from 4.4.2 to 4.7.5. As petednz mentions, it also depends on if you have any extensions/customizations
> 2 votes

# Answer
Ultimately it depends on the extensions you have installed. I just got off the phone with a different client who I recommended updating to 4.6.11
> 1 votes

---
Tags: drupal, upgrade
---


title: Manage Group broken on 4.7.5

text:
# Question
Title: Manage Group broken on 4.7.5
after update to 4.7.5, the "manage Groups" page just says "No groups have been created for this site".

Although the groups are functioning otherwise.

This also happens on the sandbox/demo site.

# Answer
Please follow https://issues.civicrm.org/jira/browse/CRM-18376 for the resolution of this issue.
> 3 votes

---
Tags: upgrade, groups, 4.7, issues
---


# Question
Title: Field names not showing up on profile screen Wordpress CMS
New to Civi, but not new to CRMs/Wordpress.

When using many of the themes that Wordpress provides (actually this problem occurs with everyone I have tried so far), the field names for a profile signup form do not show up.

However, if I just use the base theme, they do.

Any suggestions on how to address this?

# Answer
> 1 votes
This looks like a CSS issue.

I would suggest to create a new css file in you custom directory like `/wp-content/plugins/files/civicrm/my_css/my_stylesheet.css` Navigate to **Administer-\>System Settings-\>Resource URLs** and set your **Custom css URL** to the css file `http://yoursite.com/wp-content/plugins/files/civicrm/my_css/my_stylesheet.css` more info on how to set a custom CSS path here.

In your CSS file put this:

```
.label {
   color: #000 !important;
}

```

The field names/labels are there but they have a white color.

I guess that if put the same style in your Wordpress theme stylesheet section it will override Civi's stylesheet, but the above would be the correct and recommended way to do it.

---
Tags: wordpress, profile, templates, theme, fields
---


# Question
Title: How does the API deal with the addition of an existing contact?
If you add a contact via the API is it passed through any of the de-duplication rules? I.e. if I add a contact that matches an existing record will it create a new record or merge with the existing record?

If the contact is passed through the de-duplication rules how can you control which rule applies?

I am wondering if I need to create the necessary logic in my code to test if a new contact is a duplicate or if I can rely on the de-duplication process to take care of this.

# Answer
you can either set a check\_duplicate=\>true extra param... but to be honest, I always done the duplicate checking on the code side before calling the contact create api, because it's way more versatile and it's easier to match your exact need
> 2 votes

---
Tags: contacts, api, duplicate-contacts
---


# Question
Title: How can I detect potential duplicates in a CSV I want to import?
I have a list of about 1000 contacts I'd like to import. Unfortunately, there's no definitive way of linking the people on my spreadsheet to the contacts already in the database like an external identifier. So I'd like to generate a list of potential duplicates so I can go over them by hand.

Does anyone have a good way to accomplish this?

# Answer
Assuming standard fields (First/Last name, address, email, etc.), you could export the necessary fields from Civi via a search results action (Export Contacts) and use a 3rd party tool to compare your existing data to your new data and then highlight (or remove) the duplicates.

**Google Sheets**

**OpenOffice**

**Microsoft Excel**
> 2 votes

# Answer
I like Allen's answer but it seems there should be an approach at the point of import that would work. Esp if you had a gazillion contacts in the db already. Is the issue here is that the potential matches are more complex than any matching rules?

If there is a Matching Rule or a series of them that can work for you - then start with the loosest rule and then rerun and tighten them - and set your import to SKIP.

Eg, if you first run the import with First Name match, then every record that has a matching first name will be reported back to you. Then run it with eg First AND Last, or First AND Phone etc.
> 3 votes

---
Tags: import, duplicate-contacts
---


# Question
Title: How can I let users specify which address is their preferred address (e.g. work or home) within a profile?
When I'm using a profile that my users might be filling out for the first time (membership form for example), I generally ask for both a work and a home address, email address, etc. How can I let them choose which one to use as their primary contact information (mail and email as well as phone)?

# Answer
Adding as an answer since user never came back on this one.

This can be done via webform\_civicrm for sites using Drupal where Location Type and Phone Type can be provided as 'user select' fields.
> 1 votes

# Answer
What's more important for your organisation? Know that an address is primary? or that it is an home/work address?

If primary/secondary is more important then I would use the "Main" location type in the profile and set it to Primary in the settings. And then make sure a "secondary" Location type exists and add that one to the profile as well.
> 0 votes

---
Tags: profile
---


# Question
Title: Is my upgrade failing if the screen appears to hang
We're on 4.7.3 on Drupal 7, and are being affected by some bugs that affect contributions made on behalf of an organisation and paid for by paypal.

When I attempt the upgrade to 4.7.5, the upgrade script says it has updated to 4.7.4 without problems, but then hangs on Begin upgrade to 4.7.5 message

See:

I left it for 5 minutes (the php max runtime was set to 3 minutes) and then hit refresh, it emptied - no text or progress. Re-opening the upgrade script then says it failed the integrity check. I've rolled back to a backup for now.

There is no error in the HTTP error log, nothing seems to have run out of memory.

I'd be grateful for any help in how to set about diagnosing this issue!

# Answer
> 3 votes
Some upgrades can take a long time and do not die just because the screen isn't showing progress.

Sometimes you can better see how things are going by copying the url and pasting in a new window and you may see progress on the new screen.

Also you can check in the civicrm\_domain table which will show you where it is at.

Patience is often the issue here.

And as Robin added "using the SQL command SHOW FULL PROCESSLIST I can see it is in fact whirring away doing a number of database structural changes, which is necessitating some very large tables to be copied to temporary tables"

# Answer
> 4 votes
Answer was patience - upgrade took 45 minutes.

---
Tags: upgrade, error
---


# Question
Title: Advice on structuring tuition payment plans. Membership? Contribution?
I have an annual tuition total that some parents pay in one installment, some in two, and some in 10 monthly payments. This past year, we set it up as a pledge that parents worked towards with contributions on a contribution page, but as I set up for next year I think it might be more effectively tracked through CiviMember, perhaps with price-sets? I would also like to be able to use the CiviDiscount extension in the tuition payments, and have some way of allowing parents to contribute to a scholarship fund on the same page.

Does CiviMember allow payments on an installment plan? Does CiviDiscount work with the above answer? What setup would you recommend for this use case?

# Answer
Have a read of this one flexible membership billing where Ramesh suggests using different membership types to accommodate the various payment options.
> 1 votes

---
Tags: civimember, price-sets, cividiscount
---


title: Struggling to set-up SMTP Configuration

text:
# Question
Title: Struggling to set-up SMTP Configuration
I do not have a web development background, so you will have to bear with me. I am currently using CiviCRM 4.7.0 on Wordpress 4.9.2. I am trying to set up CiviMail and am receiving a "Mail Not Sent" error. We are currently using Webfactional to host our Wordpress site. I had previously been receiving a softfail when using mail(). This is the softfail that I would see in "Show Original" on Gmail:

Received-SPF: softfail (google.com: domain of transitioning **our email** does not designate 74.55.86.74 as permitted sender) client-ip=74.55.86.74; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning **our email** does not designate 74.55.86.74 as permitted sender) smtp.mailfrom=**our email**

I contacted them and followed instructions to set it up so that our Email would not be using their smtp but rather, go through Google Apps since Webfactional sets limitations on bulk mailings. I also set up an SFP DNS following their instructions for Google Apps. Following the instructions on Google Apps, I entered the following and received this error message when I tried a test email:

I tried removing the ssl:// and also tried to use Port 25 just for the sake of testing. I don't quite know where to head from here. What steps did I just completely miss or do wrong that I'm not seeing?

Thanks in advance!

# Answer
> 4 votes
you have a problem outside of civicrm realm: you are trying to send an email from a domain name that has a SPF record that doesn't include your server IP address.

it is the domain that you have set up for the bounce that needs to have the SPF record.

However, before you go down that rabbit hole: google has limitations on how many emails you can sent via their smtp server. It will never work for a production configuration as soon as you have more than a handful of contacts you want to mail.

I would suggest you to use an external provider to do the mailing (they are lots of providers (civismtp, sendgrid, mailjet...) that can easily be integrated with your civicrm that you can use.

# Answer
> 0 votes
I have used SMTP using gmail but i am not sure about using a different username other than gmail but you can try the below

First make sure you have set up the FROM Email ID - correctly

* Set the FROM Email Address

Administer -\> Commincations -\> FROM Email Addresses

"name" info@example.org - set this in the same format to your email id and update - and try first if you are getting error try the below option

If that didn't help please try using an gmail account email ID rather than .org ID - that should work correctly - I guess

---
Tags: civimail, email
---


# Question
Title: Trouble getting Activity Information with api
I'm trying to get Activity information via the API, but have run into two issues:

1. I cannot seem to filter by a date stored in a custom field. I've tried formatting the date multiple ways ('Y-m-d', 'm-d-Y', 'YmdHis', etc), but it doesn't seem to have any impact.
2. Since I can't figure out to make the filter work, I thought I would do the filtering myself. But I can't seem to get the custom field to be returned in the results. When I try in the API Explorer, I get all kinds of data back for each activity. But when I copy / paste the PHP code, I only get a small amount of activity fields, and definitely not the custom field I need.

This is the code from the explorer that isn't working for me when I actually use it in code:

$result = civicrm\_api3('Activity', 'get', array( 'return' =\> "custom\_46", 'status\_id' =\> "Scheduled", 'activity\_type\_id' =\> "TDY", ));

The Explorer shows all activity data for each result. When running the generated PHP code in my code, I only get the Activity ID, Activity Type ID, Status ID, and Source Contact ID.

# Answer
> 2 votes
That is weird :-) I assume you have all permission for custom data? And have you tried using the actual ID's for status\_id and activity\_type\_id?

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


title: Dedupe failing on merge

text:
# Question
Title: Dedupe failing on merge
I am receiving this back trace when trying to merge records after running Individual Supervised dedupe rule. Please advise.

```
Apr 07 17:51:30  [info] $backTrace = #0 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#4 /home/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#5 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...", "DB_Error", TRUE)
#6 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1205 ** Lock wait timeout exceeded; try restarting transaction")
#7 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#9 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2435): DB_common->query("UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#10 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1338): DB_DataObject->_query("UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#11 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(459): DB_DataObject->update()
#12 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php(213): CRM_Core_DAO->save()
#13 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php(312): CRM_Contact_BAO_Contact::add((Array:12))
#14 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php(1897): CRM_Contact_BAO_Contact::create((Array:12))
#15 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Dedupe/Merger.php(1840): CRM_Contact_BAO_Contact::createProfileContact((Array:7), (Array:0), "152")
#16 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Merge.php(318): CRM_Dedupe_Merger::moveAllBelongings("152", "9317", (Array:10))
#17 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(423): CRM_Contact_Form_Merge->postProcess()
#18 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Done.php(75): CRM_Core_Form->mainProcess()
#19 /home/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Done->perform(Object(CRM_Contact_Form_Merge), "done")
#20 /home/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "done")
#21 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("done")
#22 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#23 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact", NULL)
#24 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#25 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#26 /home/public_html/administrator/components/com_civicrm/civicrm.php(116): CRM_Core_Invoke::invoke((Array:3))
#27 /home/public_html/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#28 /home/public_html/libraries/cms/component/helper.php(392): require_once("/home/public_html/administrator/components/com_civicrm/civicrm.php")
#29 /home/public_html/libraries/cms/component/helper.php(372): JComponentHelper::executeComponent("/home/public_html/administrator/components/com_civicrm/civicrm.php")
#30 /home/public_html/libraries/cms/application/administrator.php(98): JComponentHelper::renderComponent("com_civicrm")
#31 /home/public_html/libraries/cms/application/administrator.php(152): JApplicationAdministrator->dispatch()
#32 /home/public_html/libraries/cms/application/cms.php(252): JApplicationAdministrator->doExecute()
#33 /home/public_html/administrator/index.php(47): JApplicationCms->execute()
#34 {main}

```

# Answer
One of the first things that I do when investigating these types of errors is to bump the truncation of SQL queries from 80 to 800 - no idea where that file is off the top of my head, I usually find it by grepping "80".

Then I run the command on the command line so that I get the full SQL error. Then it's much easier to fix.

At some point I'll file a patch request with core to make this change available for everyone.
> 1 votes

---
Tags: 4.7.1, duplicate-contacts
---


title: Where can I see what's fixed in 4.6.15?

text:
# Question
Title: Where can I see what's fixed in 4.6.15?
The announcement of release 4.6.15 (and previous updates) on the CiviCRM website blog is very 4.7 centric. There's no link to what fixes have been incorporated into the 4.6 update - and as 4.6 is an LTS release many will be wanting to stick with it. Or have I missed it? If someone can send me a link here that would be great. Suggestion: improve the announcement to have a link to the fixes.

# Answer
Agreed on your suggestion -- the notification post usually does have a link to the fixes. Here are the issues with a fixed version of 4.6.15:

CiviCRM issues fixed and closed for 4.6.15
> 3 votes

---
Tags: 4.6
---


# Question
Title: Paypal Interruptus - Wordpress w/ CiviCRM 4.7.1
Wordpress 4.4.2 CiviCRM Just upgraded from 4.6.10 to 4.7.1 last week.

Ever since we've upgraded, CiviCRM allows payments to be made via PayPal, but event registrations and membership renewals are now always marked as "Pending (incomplete transaction)". We have to manually go to PayPal, check whether they've actually paid, confirm and then edit the pending flag manually so that the transaction shows as complete in CiviCRM.

Additionally, email confirmations from CiviCRM are not going out.

This is causing much more work than we had to do last week before we updated to CiviCRM 4.7.1

Test event registrations and renewals work as expected. Live ones don't.

On the off chance that 4.7.2 has a fix, I've just upgraded successfully to the latest version. Until I see some renewals or event registrations, I won't know if that's fixed it.

I'd be grateful if someone can tell me if 4.7.2 had the fix or if this is something outside the scope of 4.7.2.

(see image below)

Cheers,

Chris

# Answer
> 1 votes
The answer now is to upgrade from 4.7.1 to 4.7.4 or better. Apparently a number of paypal processes were corrected after this and other posts on civicrm.stackexchange.com brought the bug to light.

# Answer
> 2 votes
It probably means that paypal doesn't ping back properly your civi to let it know if it processed properly the card. Unfortunately, they are a lot of reasons to get that call not working, either because paypal try to IPN elsewhere, with a different format than expected or that something is wrong on how we process it (given it broke after an upgrade, the most likely option)

Can you check on the log if you have any error that might clarify what is the issue?

# Answer
> 2 votes
I've found a fix that works for me, but I cannot guarantee that it won't have consequences for other transactions. A fully audited fix for this needs the involvement of people who know the code a lot better than me. Having said that, you can try the following:

Change this:

```
throw new CRM_Core_Exception

```

to this:

```
CRM_Core_Error::debug_log_message

```

in this file on line 177 for WordPress:

> /wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/BaseIPN.php

or this file on line 178 for Joomla:

> /administrator/components/com\_civicrm/civicrm/CRM/Core/Payment/BaseIPN.php

There's a ticket on Jira that seems to be relevant here: https://issues.civicrm.org/jira/browse/CRM-18107

---
Tags: upgrade, paypal, 4.7, pending
---


title: flexible membership billing

text:
# Question
Title: flexible membership billing
I have a series of different memberships in CiviCRM, currently with yearly billing for each. Each membership is currently set to auto renew.

The client has requested that a client might pay for these memberships monthly, or quarterly or yearly. I've looked to change the membership to a monthly membership, and using pricesets, enable 3 and 12 months as number of terms.

Unfortunately, as the membership is set to auto renew: "You can include auto-renew membership choices for only one price field in a price set. Another field in this set already contains one or more auto-renew membership options."

The auto renew functionality has been turned on, as the memberships are set to continually renew but not use a payment processor. The records are being exported to another system, which generates the invoices.

Do I need to create monthly, quarterly and yearly options for each membership? Is there a better way to create the one membership, but have flexible pricing options which keep renewing after every period.

---

Since posting this question I found there is a bug in 4.6 and 4.7 of CiviCRM where you can't create a membership with auto renew in a price set - no matter what - not even one. This should be resolved in 4.7.5 (with about two lines of code). This allows you to keep a single membership and have different renewal periods at the same time.. and keep the reporting simplified, so the membership reporting will continue to show one membership.

https://issues.civicrm.org/jira/browse/CRM-18050 //If price set field is already present with auto-renew option then, it will restrict for adding another price set field with auto-renew option. if ($dao-\>N == 0) { return 0; }

# Answer
> 1 votes
The easiest way is to create three membership one for monthly, Quarterly and yearly which will solve the problem

If you need all the frequency in a single membership then you have to handle this by creating a custom field linked with membership which will hold the frequency value and whenever we create a membership or renew a membership you should calculate the end date of the membership based on the frequency using hooks and update the membership record manually - that should solve the problem - I guess this helps!

# Answer
> 0 votes
One workaround, not the best, is to create a separate page for each type of membership, and through menus or an overview page direct users to the right one for the type of membership they want to buy.

---
Tags: civimember
---


title: Bounce handling not working

text:
# Question
Title: Bounce handling not working
We've been trying to make bounce handling work but with no success so far.

The fact is that it used to work setting a gmail.com email address as in this forum thread (see below), but all of a sudden it stopped working and it has nothing to do with opening port 993, because it was already open.

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

Server imap.gmail.com Username xxx@gmail.com Password (triple checked against gmail account) Localpart xxx+ Email Domain gmail.com Return-Path (empty) Protocol IMAP Source (empty) Use SSL? Y Used For? Bounce Processing

When sending a test mail to wrong email accounts CiviMail counts them as correct addresses.

Any clues?

Thank you very much for you help

# Answer
> 6 votes
Please do NOT use a gmail address for the bounces, it won't work (a google app email is fine however).

It will fail you in two different but both bad ways:

* if you use mail() or a local smtp mailer for your outbound, you are trying to send an email from your civicrm server as being from a gmail email, something that google said is not allowed (SPF record) and it will mostly end up in the spam folder of the recipient (or be flat out rejected).
* if you do use google smtp as mail servers, they will prevent you to send too many emails (the too many is going to be changed over time, but is pretty much guaranteed to be above the number of emails you want to send)

For your specific issue (and for others that use google apps): check the spam folder see if the bounced emails are there, and add a filter to these emails stay on your inbox, they will often be seen as spams by default until you add filters.

# Answer
> 1 votes
Google has tightened down secure access to their systems. To get CiviCRM bounce processing to work you need to loosen security for the email account. To do this, login to the bounce email account then go to https://www.google.com/settings/security/lesssecureapps and change the setting to allow less restrictive access.

---
Tags: civimail, email
---


# Question
Title: custom fields type "Select Date" are broken as of 4.7
I was wondering if someone else has encountered this issue and if there is resolution: https://issues.civicrm.org/jira/browse/CRM-18379

# Answer
Yes I did, and I posted a fix to that issue. You can find it under the "links" section.
> 1 votes

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


title: Mosaico and Imagemagick

text:
# Question
Title: Mosaico and Imagemagick
I am trying to test the Mosaico email template plugin however I am getting an error saying that Imagemagick is not install.

I checked with my hosting provider (Siteground) and they say that the PHP library is already install and that the path is /usr/bin/.

However i am not sure how to make Mosaico see that.

Does any one have this plugin working or any advice on how to fix my issue?

Zeak

# Answer
We got it working after having issues with the imagemagick message - we did have it but needed to install php5-imagick - also we were thrown by being on nginx but alpha had been geared towards apache so a bunch of paths weren't working.

we provided feedback/workarounds at https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/12 which resulted in alpha4 being released. assuming you are using that you might need to open an issue on Veda's github.
> 3 votes

---
Tags: civimail
---


# Question
Title: Batch merge error - wrong data type money?
I'm trying to clean up some duplicates using the batch merge tool, and it keeps showing this error:

\[Error: Processed 2 pair of duplicates out of 9\] value: null is not of the right field data type: Money

Any ideas?

Here's the full debug:

```
[Error: Processed 28 pair of duplicates out of 77]
Exception: "value: null is not of the right field data type: Money"

#0 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/BAO/CustomValueTable.php(595): CRM_Core_Error::createAPIError("value: null is not of the right field data type: Money")
#1 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(1777): CRM_Core_BAO_CustomValueTable::setValues((Array:10))
#2 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(748): CRM_Dedupe_Merger::moveAllBelongings("434", "204616", (Array:21))
#3 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(624): CRM_Dedupe_Merger::merge((Array:2), (Array:3), "safe", TRUE, TRUE)
#4 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Contact/Page/DedupeMerge.php(138): CRM_Dedupe_Merger::batchMerge("26", "263", "safe", TRUE, 2, 2)
#5 [internal function](): CRM_Contact_Page_DedupeMerge::callBatchMerge(Object(CRM_Queue_TaskContext), "26", "263", "safe", TRUE, 2, 2)
#6 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Queue/Task.php(88): call_user_func_array((Array:2), (Array:7))
#7 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Queue/Runner.php(214): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#8 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(52): CRM_Queue_Runner->runNext(TRUE)
#9 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php(106): CRM_Queue_Page_AJAX::{closure}()
#10 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(54): CRM_Queue_ErrorPolicy->call(Object(Closure))
#11 [internal function](): CRM_Queue_Page_AJAX::runNext()
#12 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
#13 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#14 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#15 /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:4))
#16 [internal function](): civicrm_invoke("queue", "ajax", "runNext")
#17 /var/www/vhosts/example.com/httpdocs/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#18 /var/www/vhosts/example.com/httpdocs/index.php(21): menu_execute_active_handler()
#19 {main}

```

# Answer
Please create a bug report in JIRA referencing this question if it continues to occur when extensions like Summary Fields are disabled.
> 0 votes

---
Tags: contacts, import, duplicate-contacts
---


title: Can't Add Profile To Contribution Page

text:
# Question
Title: Can't Add Profile To Contribution Page
I get this error when I try to attach a profile for the SignUp Form. I noticed also that in the Profile Tab of the Contribution the Civicrm Profiles are not displayed in a drop down. Instead what you have is a text form.

I am using Civicrm 4.6.8 with Wordpress4.4.2.

# Answer
Profiles that have fields from things other than contacts (and subtypes) and contributions can't be used on Contribution pages. Check to make sure you haven't included a core or custom field for a different type of object like an event registration, memebership, activity, etc. on the profile(s) you want to display on the contribution page.
> 1 votes

---
Tags: profile, contribution-page
---


title: Contact table: managing a new field

text:
# Question
Title: Contact table: managing a new field
in my extension I have the need to manage a new contact information (I added a field in civicrm\_contact, instead of using a custom field). Using the buildForm hook, I can show the input element in the contact form, but I don't know how to write the field value in the database. Is there a specific hook for this operation?

Thanks Marcello

# Answer
> 2 votes
There is no hook or api specifically for writing to a field added to the civicrm\_contact table, as that is a bad unsupported hack to core. I'd suggest changing your code to use the support provided for custom fields. That way you can be more confident that a code review of the extension won't end up preventing it from being published on civicrm.org for auto-distribution. If you still want to proceed with this bad pattern, then you might want to consider writing SQL and submitting it via db\_query.

# Answer
> 1 votes
Use the post hook on the Contact entity.

---
Tags: extension, database
---


# Question
Title: How to show "Formal Title" on the view Contact screen?
A previous developer repurposed the "formal title" field to be used as "badge name" for events.

The problem is that when viewing a contact, it doesn't show there unless you go to *edit* the name.

I found a "recipe" for displaying formal title as part of the general display of names, but that is not what we want.

How can we 1. display the "formal title" field when viewing a contact, but 2. *not* display it as part of a name everywhere that a name is displayed?

# Answer
As @coleman says and as I also mentioned in my comment above, you can create an extension as explained here or you can use an existing one and implement `hook_civicrm_contact_get_displayname`, somthing like this:

```
function myextension_civicrm_contact_get_displayname(&$display_name, $contactId, $objContact) {
    $formal_title = civicrm_api3('Contact', 'getsingle', array(
        'sequential' => 1,
        'contact_id' => $contactId,
        'return' => 'formal_title',
    ));
    if(!$formal_title['is_error'] && !empty($formal_title['formal_title'])){
        $display_name = $display_name . ' - Formal Title: ' . $formal_title['formal_title'];
    } else {
        $display_name = $display_name;
    }
}

```
> 2 votes

# Answer
I think what you want is hook\_civicrm\_contact\_get\_displayname. This allows you to alter the display name of a contact when it appears in the UI (namely in the contact summary screen and a few other screens where the display name is used as a title) without changing it in the db.
> 0 votes

---
Tags: contacts, fields, summaryfields
---


# Question
Title: Does anyone have a working example for CiviMail bulk emails on Wordpress and 4.7.x
Do you have a CiviCRM installation with bulk email working on the latest wordpress and CiviCRM 4.7.x, using a cron job set up in cPanel? I have been unable to get cli.php or wp-cli.php to work recently. The cron job fires without error but no email is sent. Cli.php with cron was working up to about 6 months ago or so, but we made the rookie mistake of upgrading CiviCRM... We would appreciate a step by step recipe to get this working again.

# Answer
I found the problem. There was a breaking change in CiviCRM over the past year. We were just using the access CiviMail permission for the wordpress user used for sending bulk mail. But it turns out you now need 3 permissions. (I found this in a 3 year old forum posting.)

CiviCRM: view all contacts CiviCRM: access CiviCRM CiviMail: access CiviMail

Both of the following cron job commands work now. cli.php still works contrary to what I posted before -- and this is the easiest to use since you don't have to learn and install SSH or wp-cli.phar. Our wordpress system is on inexpensive shared hosting.

```
/usr/local/bin/php -d extension=phar.so /home/example/wp-cli.phar --user=CiviMailUser --url=http://example.org --path=/home/example/public_html civicrm process-mail-queue job.execute auth=0

/usr/local/bin/php -q /home/example/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -j -s example.org -u CiviMailUser -p password -e Job -a process_mailing

```
> 3 votes

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


# Question
Title: Where is a list of breaking changes published for each new version?
We seem to have had several serious instances of loss of functionality when installing newer versions of CiviCRM. A lot of software projects have a list of breaking changes as each new version is released. Without an organized official list, I am afraid the developers might not actually be aware of breaking changes. The main losses (the ACL one filed as a bug) are:

1. ACLs no longer work with smart groups (this was working for us as of ~4.5.6).
2. ACLs don't even work with static groups anymore.

3. Bulk email, cron + CivicMail, no longer works. The cli.php cron method no longer works. We had bulk email working as of version ~4.5.6 using cli.php. I spent hours working with wp\_cli recently on 4.7.4 and I can't get that to work either.

I would go back immediately to v4.5.6 if I could, but the schema changes to the database prevent this.

Edit: I fixed #3 -- I was missing the 'view all contacts' permission for the cron user.

# Answer
CiviCRM does not have a "Known Issues" report per se, and I do not believe I have ever seen such a section in the announcement of a new release. What it has is **JIRA (issues.civicrm.org)**, which provides many tools for tracking problems great and small.

This is where you report and track specific bugs; for example, CRM-17968 scheduled emails not processed is reported to be fixed as of 4.7.4. But you are also given many tools for navigating the issues according to severity, resolution progress, and anticipated correction. You can see planned releases, the Change Log of which fixes were applied to which versions, and recent progress.

Broken functionality is not always detected during pre-release testing. I think if the core development team knew critical functionality was broken, they would fix it rather than include it in a report. Helping test the beta versions, either on your system or on demo.civicrm.org, will help prevent the software from going to release with major unresolved problems.

Related: *What should I do if an issue is marked as fixed in JIRA but it is still occurring?*

---

Obligatory lecture: the installation and upgrade guide, for one, emphasizes that you should back up your databases before attempting an upgrade. Your organization should have its own change control protocols for releasing new software to make sure that critical functionality does not suffer, and the system should be tested thoroughly before moving it into production. Your inability to roll back to 4.5.6 is not the fault of the developers.
> 3 votes

# Answer
One of the challenges of such a large open source software project is that it is in a constant state of flux - this is particularly true of non-lts versions (i.e. for extra stability v4.6.\* is recommended). Sadly, breakages do occur. The community definitely recommends having a staging server to test with and taking backups of databases so that you can roll-back if you needed to (as you said you'd prefer to).

"Challenging the company" is less useful than, say, contributing unit tests that test key functionality that you never want to break.

JohnFF
> 0 votes

---
Tags: wordpress, 4.7, documentation
---


title: Changing the contact dashboard display

text:
# Question
Title: Changing the contact dashboard display
I need to change the contact dashboard that I display to users so it does not show a \[Renew Now\] link in the Membership section.

Thanks Miguel Peirano

# Answer
> 2 votes
Out of curiosity: why would you want to do that? You can remove it in the css, by adding a little jQuery to a template and then add the template to the Contact Summary, or by changing your specific copy of the Summary template. You can get more information on how to do this on http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in+Screens

# Answer
> 2 votes
I'm fully sure I understood your need, why wouldn't you want your members to renew?

If you are using your membership in a "non standard" way, it might be easier to just remove anything about membership from their dashboard (it's something that you can configure via a UI).

But assuming it's just about the renew link, the clean way is to let civi add that renew link (ie. do not modify the core) and create an extension that will alter and hide or remove it

To build an extension, use civix, or take an existing one as example, then use the dashboard hook and alter the membership section, or as erik suggested, just add a block to display:none that link

# Answer
> 0 votes
To remove the Renew Now Link from the contact Dashboard go to Administer| CiviMember| CiviMember Component Settings. In the Default online membership renewal page deselect the default Contribution page that is selected. Or better still just put the drop down on -select- and click Save.

---
Tags: dashboard
---


# Question
Title: SOLVED - CiviCRM Cron Configuration on Drupal 7 throws unable to find key error with duplicate root folder in error message
I tried to find the answer here, in the old forum, and many searches on the Googoracle to avail. Here is my problem

The requested page "/cm\_starterkit\_moderate-7.x-2.0-beta7/cm\_starterkit\_moderate-7.x-2.0-beta7/civicrm-cron/passthrough?key=\*******(masked)" could not be found.

Obviously, it's not duplicated. And I wanted to change the directory structure, but ran into problems with that. :/

Any ideas on how to fix this? This seems to only be a problem with the CiviCRM Cron config screen.

I am on Drupal 7.4.3 and CiviCRM 4.7.6.

Thanks Chris!

# Answer
welcome to the Stack,

You need to update your directories!

Head on to "Administer" then "System Settings" and then directories. Point the locations to the right place and save. Don't forget to "clear cache and update paths" afterwards!
> 1 votes

---
Tags: configuration, cron, error-page
---


# Question
Title: Unable to install extensions: HTTP redirection error
I'm unable to install CiviCRM extensions from CiviCRM » Administer CiviCRM. On the CiviCRM extensions page I get the following error:

> WARNING: The downloader may be unable to download files which require HTTP redirection. This may be a configuration issue with PHP's open\_basedir or safe\_mode.

When I try to install an extension I get the following errors:

I've checked and:

The PHP setting open\_basedir is not defined. The PHP setting safe\_mode is set to off

What's going on?

I've got CiviCRM 4.5.5 installed with Wordpress 4.1.1

# Answer
> 4 votes
Try again now. I think Tim has resolved an issue that arose with the need for a new intermediate certificate for the SSL certificate replaced on C.o earlier this week: https://issues.civicrm.org/jira/browse/CRM-16191. Please comment on the issue if your error has been resolved.

# Answer
> 2 votes
I was having the same issue and resolved by bumping my PHP version from 5.3.29 to 5.4.13 -- can you check if this corrects the issue for you?

# Answer
> 1 votes
This is not fixed for me trying to add new extension on 4.6.8.

Bug reported: https://issues.civicrm.org/jira/browse/CRM-17263

---
Tags: extension, php
---


title: Can't Download Extensions

text:
# Question
Title: Can't Download Extensions
I attempted to enable the Stripe payment processor in CiviCRM 4.6.4 by going to Administer \> Administration Console \> Manage Extensions \> Add New. From there I click the Download link next to Stripe. After doing so I get the following error message:

"Sorry but we are not able to provide this at the moment. Unknown extension: com.drastikbydesign.stripe"

This message appears when attempting to download other extensions as well.

My CiviCRM Extensions Directory is: /home/sitename/www/www/sites/default/files/civicrm/upload/ My Extension Resource URL is: http://sitename.org/home/sitename/www/www/sites/default/files/civicrm/upload/

As a possible lead, I get the following error message when entering the Extensions screen: "WARNING: The downloader may be unable to download files which require HTTP redirection. This may be a configuration issue with PHP's open\_basedir or safe\_mode." If this error message is related, I'm still not sure how to proceed.

Thank you.

# Answer
Please update your Extension Resource URL path as below and give a try http://sitename.org/sites/default/files/civicrm/upload/

I guess this should work - please let me know the status thanks
> 2 votes

# Answer
I was having the same issue and resolved by bumping my PHP version from 5.3.29 to 5.4.13 -- can you check if this corrects the issue for you?
> 1 votes

---
Tags: extension
---


# Question
Title: How to target record id for multiple record custom field set in Webfom?
Drupal 7.40 Webform-Civi Integration 7.x-4.13

Similar to Graham's question here.

Use case: Setting up goal plans that look like this:

Long-Term Goal 1
Short-Term Goal A
Short-Term Goal B
Short-Term Goal C

Long-Term Goal 2
Short-Term Goal A
Short-Term Goal B
Short-Term Goal C

Long-Term Goal 3
Short-Term Goal A
Short-Term Goal B
Short-Term Goal C

etc.

I've created a custom field set that allows multiple records. Each record contains:

Long-Term Goal
Short-Term Goal A
Short-Term Goal B
Short-Term Goal C

We have a View that lists the goal plans with a link to edit the goal plan profile. However, it is large and confusing for the end user.

I'd like to create a Webform that targets each individual record not all of them.

Custom fields have ids in their tables, but I can't see a way to implement them in Views or Webform.

I believe I could expose it to Views but even if I can, is there any way for Webform to use the record id?

# Answer
Currently there is no way to target a single record of a multiple record custom field set with a Webform. As stated above, using Activities and Cases for this type of data as opposed to multiple record custom field sets is the better option for our use case.
> 2 votes

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


# Question
Title: How to create a Drupal View of CiviCRM Activities with an edit link to the corresponding Webform?
Goal is to have a filterable and sortable Drupal View of CiviCRM Activities (not a view of Webform Submissions) created with a Webfom with a link to edit the webform submission.

I can painstakingly do it through the Views UI if I create the View as a view of Webform Submissions, but the inability to filter/sort on fields is a deal breaker.

If I create a View of CiviCRM Activities, I get all of the filter and sort options but no nice link to edit the webform.

# Answer
> 0 votes
Ended up creating a view of Activities with a custom field to edit this activity. This link includes cid2 (the client) and aid (the activity) and points to an **Edit Activity** form with every possible activity field on it and many conditionals to hide/show certain fields depending on the activity type.

The final link is formed http://example.com/edit-activity?cid2=\[id1\]&aid=\[id\].

Took a while to create the Edit Activity form but once we got that sorted, the rest was pretty easy.

Thanks for all of the good ideas.

# Answer
> 4 votes
There is no straight forward way to get the 'Edit Submission' link in the View of CiviCRM Activities. Below is a workaround where we extract the 'Edit Submission' link from activity details.

Prerequisites:

1. Views PHP module is installed
2. In your webform, you have enabled/ticked 'Include link to edit webform submission in activity details'

Steps:

1. In the View of CiviCRM Activities, add 'CiviCRM Activities: Details' as a field to the view and tick 'Exclude from display'
2. Add a new field 'Global: PHP' to the view, and paste the below content in Output code

> ```
> <?php
> preg_match_all('/<a href=\"([^\"]*)\">Edit Submission<\/a>/iU', $row->details, $match);
> echo $match[0][0];
> ?>
>
> ```

The above code will get the edit submission link from the activity details using regular expression and will display the link in the view.

View Final Output:

Hope this helps.

# Answer
> 2 votes
There's no way in Views to exclude activities that were *not* created with a webform. Hopefully limiting to certain activity type(s) will do it for you.

As for getting the link to the webform submission. This data is stored in a serialized field (which is therefore quite hard to query). Here's an (untested) way you might get at it:

1. Install the Views PHP module.
2. Add a new field 'Global: PHP' to the view, and paste the below content in Output code:

```
<?php
$query = "SELECT cs.sid, s.nid FROM {webform_civicrm_submissions} cs, {webform_submissions} s WHERE s.sid = cs.sid AND cs.data LIKE '\"activity\";a:1:{i:1;a:1:{s:2:\"id\";i:{$row->id};'"
$wf = db_query($query)->fetchObject();
if ($wf) {
  print "<a href='/node/{$wf->nid}/submission/{$wf->sid}/edit'>Edit</a>";
}
?>

```

# Answer
> 1 votes
In your webfor you specify a path e.g. my-activity-webform and you enable CiviCRM processing with an activity. You have to select an activity type and also select a type under Update Extsiting.

Then the url you could use http://yoursite.com/my-activity-webform?aid=...

The parameter aid is the ID of the activity which you want to edit

---
Tags: activities, webform-civicrm, drupal-views
---


# Question
Title: Why did Case Type get stripped from all Smart Groups after upgrade to 4.6.9?
Drupal 7.41

After upgrade to CiviCRM 4.6.9, all Smart Groups that had a case type in the criteria were empty.

When I looked at the criteria for each group, the case type was stripped from the search.

I manually added each one back in and ran a rebuild and everything appears to be ok now.

Any idea what may have caused this?

# Answer
No answer necessary for this question.

More recent versions of Civi seem to have resolved this issue.
> 0 votes

---
Tags: civicase, upgrade, smartgroups
---


# Question
Title: How do you create a new custom table tied to case type?
Drupal 7.39
CiviCRM 4.6.8
Webform Civi Integration version 7.x-4.11.

None of our case managers see any of the Civi back-end. All of their interaction is through Drupal, Views and Webforms. This enables us to set very specific permissions for what they can and can't see or do.

For the most part, it works great. Thanks Coleman!

In the past, having user's select a case type to tie an activity to has resulted in bad data (choosing the wrong case type), we are trying to limit that by using webforms that add an activity to a specific case type.

The integration for CiviCase is not to the level of CiviEvent so it makes linking to specific webforms (that are tied to one case type) challenging on views that aren't of one case type.

The only way we've found to successfully link to the correct webform is to create views of one case type with a link to Add an Activity that opens the related webform.

We would like to tie urls to case types so that we could generate views for specific webforms in any view.

For example, we could create a view like this:

I think that if I could create urls associated with specific case types, I could expose those fields to Views and have views of different case types that render the correct url to the specific webform.

Essentially, my idea was to add a table like this:

I could join this table to the civicrm\_case\_type table in the views configuration and expose the appropriate fields.

Then in the view, I could rewrite that url to be node/1?\[id\] which would open the appropriate webfom with the appropriate client prefilled.

As you can see, I can add multiple urls to a case type. So the links could be pretty flexible.

Am I nuts?
Is there an easier way to go about doing this that is already in place?

# Answer
I found a work around for this issue.

For each case type description field, I entered the node id to the corresponding case activity Webform. For example, for Case Type A there is a separate Add Activity Webform (node id 1). So for the view I added the case type description field and rewrote it to Add New Activity and made it a link to http://example.com/node/\[description\]?cid2=\[id1\].
> 1 votes

---
Tags: drupal, webform-civicrm, civicase, drupal-views
---


# Question
Title: How do I search for Activity Attachments?
Drupal 7.39 CiviCRM (in this case 4.6.7)

We can't find any way to search for activities with attachments.

Am I missing something obvious?

Similar to this question: Search contacts with attachments

# Answer
In the long run we found it easier to add custom attachment fields to Activities.

These are easier to work with in Views and are searchable in the Search Builder.
> 0 votes

# Answer
This might be an answer to a slightly different question, but... in the past, I've used a mix of add-ons to perform a full-text search on activities and their attachments:

https://github.com/civicrm/apachesolr\_civiAttachments

When you run a search with "Search =\> Full Text" and filter on activities, it will include any matches in PDFs/DOCs/etc that are attached to activities.

That module may be a significant undertaking (e.g. it requires an extra server, Solr, and the documentation is pretty rudimentary), but if you really need it, it might be a piece in the puzzle.
> 1 votes

# Answer
I've customized the Activity Report to display which activities have attachments. I don't think I added a filter to show ONLY records with attachments, but that's just another line or two of code. I've uploaded a copy to github here: https://github.com/PalanteJon/activityAttachmentReport/tree/master

Note that these aren't the only customizations I've made in this report, but you can search for "attachments" in my code to see how I added attachments to the report.
> 1 votes

---
Tags: activities, attachments
---


# Question
Title: How to create a Drupal View of Open and Resolved Cases
Goal is to recreate the CiviCRM Summary of Involvement Dashlet in Views.

Problem arises when I try to count both open and resolved Cases in one View.

Table should look like:

**Columns:** Case Type/Open Cases/Resolved Cases

Row 1 (Case Type 1)

Row 2 (Case Type 2)

Row 3 (Case Type 3)

with the number of open cases and resolved cases for each case type in the corresponding row.

I can accomplish it with a view and an attachment view, but not a single view.

Anyone have any ideas?

# Answer
> 0 votes
In the end, we decided against this approach and went with a simple view with a Case Status exposed filter.

# Answer
> 1 votes
One option might be to create a UNION in your view. Here are instructions for doing so. The top answer says to use custom code, but farther down is a link to the Extra Views Handlers module which may be able to do it.

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


title: How to set up membership-only downloads

text:
# Question
Title: How to set up membership-only downloads
So I want the following to happen: 1. web visitor registers for membership 2. after registering the member would have to "add a pdf to cart" and "check out"

Is there a way on CiviCRM to set something like this up? I am trying to find something, but cannot find anything on having products (a pdf) download available for members to download after registration.

Not sure if CiviContribute, CiviEvent, or CiviCase would be appropriate.

Wordpress is what is being used.

The functionality is basically someone clicks to get a PDF or ebook, and then it takes them to a page where they have to register or donate. In receipt of the donation or registration they would receive the ebook/pdf to download on their computer.

# Answer
There are a few ways to do this. I've done something very similar on Drupal but not Wordpress, but there are two different answers depending on your situation:

* If membership entitles someone to download any/all publications, then the easiest approach would be to use CiviCRM WP Member Sync in conjunction with Groups. Make your download pages available only to a Wordpress user role called "Members". Use Civi-WP Member Sync to make any CiviCRM contacts with an active membership also have the "Member" user role. And of course, enable signing up for a Wordpress account in the membership signup profile.
* If you must pay an additional fee for each publication on top of membership, you'll want to do the above, but also add WooCommerce or another Wordpress e-commerce module. This is significantly more setup, but if you make your commerce pages available only to members using the approach outlined above, you'll have very fine-grained control.
> 5 votes

# Answer
What CMS are you using? There are product and shopping cart solutions for all three of Drupal, Wordpress, and Joomla.

You also might be able to sort of fake it with premiums on a contribution page so you could toy around with that, but it wouldn't be the shopping cart specification you asked about.
> 3 votes

# Answer
I suggest that you find a service (or wordpress plugin) that provides the download service and add a link to that service in the Thank You email for the transaction (donation/membership/etc). Be sure to make the cost of the download be FREE or $0.00. I would not put a direct link to a pdf in the Thank You email because then the buyer can share it.
> 0 votes

---
Tags: wordpress, civimember, woocommerce
---


# Question
Title: How is CiviCRM in a Drupal Commons Install?
My organization has been using WordPress, and wants to move to Drupal for views and webform, but we need some sort of social community for our members. We're currently using PeepSo (from the makers of Jomsocial for Joomla! (peepso.com)) which we like better than BuddyPress. However, what can we use to give us similar functionality in Drupal? The only thing we've found is Drupal Commons. Are there any conflicts between CiviCRM and Drupal Commons? If there are conflicts, is there another way to have a social community on Drupal that won't conflict with CiviCRM?

# Answer
> 2 votes
There would be no conflicts. I think the question of what makes a good drupal 'social community' is a specific drupal question and should be asked on that StackExchange, however if you want more specific answers here it would be helpful if you clarify in your question what you want the system to offer users.

Having used Commons once (due to someone elses choices) but eg Organic Groups many times, I would not opt for a pre-built system like Commons. But again that is not a discussion for CiviCRM SE really.

---
Tags: wordpress, drupal, civimember, webform-civicrm
---


# Question
Title: CiviCRM 4.6.8 compatible with Wordpress 4.3?
CiviCRM 4.6.8 Wordpress 4.3 MySQL Apache/2.2.22 (Debian) Datenbank-Client Version: libmysql - 5.5.44

I've imported contacts, added new contacts, without any problem.

Then I've added a rule for individuals in "Find and merge duplicate contacts". and added following rule: "Firstname Lastname"; "supervised"; "field=LastName" "field=First Name". Saved and used the rule.

The message i've got was: **"DB Error: syntax error"**

Now I'm not able to add a new contact...

I've already tested this in the public demo and it didn't show an error-message.

Can someone help?

Here are the Error Details:

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

```
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]
[type] => DB_Error
[user_info] => INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]"]

```

)

# Answer
This doesn't look like a Wordpress compatibility error. It is, as you guessed, related to deduplication.

It sounds like you may not have a rule designated as your "Supervised" dedupe rule - or there's a problem with the rule you have designated as your "Supervised" rule. Check to make sure you have a rule, and if you do, try changing it to the default Supervised dedupe rule. That should clear your problem. Then you can troubleshoot the dedupe rule itself.
> 2 votes

# Answer
Experienced the same problem on CiviCRM 4.7.... Creating an Individual contact resulted in "DB Error: syntax error" message on the front end. A custom de-dupe rule had been set as the "Supervised" rule, with just a single field from a multi-record custom data set. This naturally doesn't make sense as it's a multi-value data set and could have duplicate values for a single contact.

Setting the default "Name only" rule as the "Supervised" rule resolved the issue.

Lesson learned - do not use multi value custom data set fields in "Supervised" de-dupe rules.
> 0 votes

---
Tags: wordpress, error-page
---


# Question
Title: Can this Event Calendar Extension be added to CiviCRM core?
Many of us look for calendar extensions with color coding. This extension v1.1 was made in 2013 for CiviCRM 4.4, but I would like to know can it become part of CiviCRM core?

Event Calendar: https://civicrm.org/extensions/event-calendar-extension

# Answer
The code quality of core is generally higher then that of the extensions. So if you can help funding it, it might improve your chances.

On the other hand, discussions lately are going in the direction to move more functionality from core to extensions then the other way around, although exceptions likely will occur.
> 2 votes

---
Tags: civievent, webform-civicrm, core
---


title: Mailchimp pricing for Mandrill users

text:
# Question
Title: Mailchimp pricing for Mandrill users
After the Mandrill's announcement that their customers require a paid monthly MailChimp accounts, has anyone opted to sign up for MailChimp?

Mailchimp monthly pricing is based on subscribers, does this mean that you need to sign up for an account equivalent to your contacts count?

Or can you sign up for the basic $10 (0-500 subscribers) and pay the additional Mandrill fees for outgoing emails?

# Answer
> 2 votes
**Update:** Mandrill has introduced this language in their Terms of Service:

```
If you use Mandrill to send bulk emails, in violation of our Acceptable Use Policy, then we may charge you at the comparable MailChimp pricing tier or terminate your account.

```

See Blog Post: Alternatives to Mandrill

---- Previous Answer ----

I've communicated with MailChimp and I'm told that CiviCRM users do not need to pay by the number of contacts they have.

MailChimp counts subscribers as contacts in their system that you would send bulk emails to. But CiviCRM sends each contact an individual email. MailChimp see this as transactional emails not bulk emails.

So (I'm told) that CiviCRM users can sign up for the lowest tier, $10/mth plan and send emails to as many contacts as they want. On top of the MailChimp fee, users will also need to pay the Mandrill fees, $20 per 25K emails.

So if someone sends under 25K emails per month they would pay $30/mth.

**Update:** I also noticed this: https://mandrill.zendesk.com/hc/en-us/articles/217467117

**Am I required to import/move my Mandrill recipient data into a MailChimp list?**

The number of Mandrill blocks purchased each month doesn’t need to match the number of subscribers in your MailChimp plan. The core functionality of Mandrill isn’t changing at this time, and the recipients of your transactional emails sent through Mandrill are not required to be subscribers in your MailChimp account. Any paid monthly MailChimp plan will satisfy the new requirements.

---
Tags: mandrill
---


# Question
Title: How to resolve error: "Recurring contribution, but no database id"?
When processing a new recurring *membership*, with the *"Please renew my membership automatically"* option enabled, we get the following error:

> Sorry but we are not able to provide this at the moment.
>
> Recurring contribution, but no database id

What can we do to troubleshoot/resolve this issue?

# Temporary fix

As a temporary fix, we set the *Membership Type Auto-renew Option* value to *No auto-renew option*. Now, we can process memberships, but those memberships can not auto-renew.

We would like for members to have the option to auto-renew their membership.

# Environment

* Drupal 7.x
* CiviCRM 4.7.x
* MySQL

# Answer
> 2 votes
I am also experiencing this issue and have raised an issue in JIRA - https://issues.civicrm.org/jira/browse/CRM-18389. You can fix this by upgrading to CiviCRM 4.7.9 or higher.

# Answer
> -1 votes
I was just testing my Membership Contributions pages in the PayPal Sandbox to see what does happen when a renewal goes through (I was expecting a receipt sent from CiviCRM), however I'm seeing the same error that Mr. Oxley is seeing.

This on : Joomla 3.5.0 CiviCRM 4.7.4 MySql 5.5.45 PHP 5.5.31

Here's the relevant log entries:

```
Apr 04 05:42:23  [info] $Fatal Error Details = Array
(
    [message] => Recurring contribution, but no database id
    [code] =>
)

Apr 04 05:42:23  [info] $backTrace = #0 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(366): CRM_Core_Error::backtrace("backTrace", TRUE)

1 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Payment/PayPalImpl.php(904): CRM_Core_Error::fatal("Recurring contribution, but no database id")

2 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Payment.php(978): CRM_Core_Payment_PayPalImpl->doTransferCheckout((Array:59), "contribute")

3 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Payment/PayPalImpl.php(457): CRM_Core_Payment->doPayment((Array:59), "contribute")

4 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(1575): CRM_Core_Payment_PayPalImpl->doPayment((Array:59), "contribute")

5 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(1361): CRM_Contribute_Form_Contribution_Confirm->postProcessMembership((Array:54), "347", Object(CRM_Contribute_Form_Contribution_Confirm), (Array:50), (Array:0), (Array:0), (Array:13), (Array:1), TRUE, NULL, FALSE, "2", (Array:0), 0, TRUE)

6 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2266): CRM_Contribute_Form_Contribution_Confirm->processMembership((Array:54), "347", (Array:0), (Array:0), (Array:50), (Array:0), 0)

7 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2140): CRM_Contribute_Form_Contribution_Confirm->doMembershipProcessing("347", (Array:53), (Array:50), 0)

8 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(594): CRM_Contribute_Form_Contribution_Confirm->processFormSubmission("347")

9 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(423): CRM_Contribute_Form_Contribution_Confirm->postProcess()

10 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()

11 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next", "Next")

12 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next")

13 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Confirm), "next")

14 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")

15 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)

16 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))

17 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))

18 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm.php(116): CRM_Core_Invoke::invoke((Array:3))

19 /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()

20 /home/nwtaadmin/public_html/libraries/cms/component/helper.php(405): require_once("/home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm.php")

21 /home/nwtaadmin/public_html/libraries/cms/component/helper.php(380): JComponentHelper::executeComponent("/home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm.php")

22 /home/nwtaadmin/public_html/libraries/cms/application/administrator.php(98): JComponentHelper::renderComponent("com_civicrm")

23 /home/nwtaadmin/public_html/libraries/cms/application/administrator.php(152): JApplicationAdministrator->dispatch()

24 /home/nwtaadmin/public_html/libraries/cms/application/cms.php(257): JApplicationAdministrator->doExecute()

25 /home/nwtaadmin/public_html/administrator/index.php(51): JApplicationCms->execute()

26 {main}

```

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


# Question
Title: Trouble moving a Wordpress/CiviCRM install to a subdomain
I'm having trouble moving a Wordpress/CiviCRM install to a subdomain: from domain-name.com to sub.domain-name.com. What follows is the procedure I'm using (culled from forum articles Wordpress, and CiviCRM docs)--please advise where I'm going wrong. Any help would be greatly appreciated.

P.S. there are many permutations of the following steps and I've tried many of them. I do know that using PHPMyAdmin to export/import is not advised because Foreign Keys data is lost.

I dumped the original CiviCRM 4.6.9 database using SSH:

mysqldump --no-create-db=true -h db111111111.db.1and1.com -udbo111111111 -pPassword db111111111 \> exportedDatabases/db111111111.sql

I also dumped the original CiviCRM 4.6.9 without the domain and cache tables:

mysqldump -h db111111111.db.1and1.com -udbo111111111 -pPassword --no-create-db=true --ignore-table=db111111111.civicrm\_domain --ignore-table=db111111111.civicrm\_acl\_cache --ignore-table=db111111111.civicrm\_acl\_contact\_cache --ignore-table=db111111111.civicrm\_cache --ignore-table=db111111111.civicrm\_group\_contact\_cache db111111111 \> exportedDatabases/db111111111-nocache.sql

I created a fresh WP site at sub.domain-name.com using same username and password as original.

I used PHPMyAdmin to create a fresh database db999999999 with the same password as db111111111.

I created a fresh install of CiviCRM 4.6.9 closely following CiviCRM install procedure for Wordpress and using db999999999:

http://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress

The new CiviCRM 4.6.9 functions.

I uninstalled the native modules to match the original install.

I deactivated the new CiviCRM 4.6.9 plugin.

I dumped the new CiviCRM 4.6.9 db999999999 using SSH:

mysqldump --no-create-db=true -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 \> exportedDatabases/db999999999.sql

I also dumped the new CiviCRM 4.6.9 domain and cache tables:

mysqldump --no-create-db=true -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 civicrm\_domain civicrm\_acl\_cache civicrm\_acl\_contact\_cache civicrm\_cache civicrm\_group\_contact\_cache \> exportedDatabases/db999999999-5TABLES.sql

I used PHPMyAdmin to DROP all tables in db999999999.

I re-imported db999999999-5TABLES.sql into db999999999 using:

mysql -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 \< exportedDatabases/db999999999-5TABLES.sql

I used a text editor to modify all instances of '111111111' to '999999999' in db111111111-nocache.sql

I imported db111111111-nocache.sql into db999999999 using:

mysql -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 \< exportedDatabases/db111111111-nocache.sql

I deleted all files/folders in .../templates\_c/\*

There were no error messages until I (re)activated the CiviCRM 4.6.9 plugin when I get the cryptic error:

"DB Error: no such field"

Running the following did not change anything:

sub.domain-name.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/updateConfigBackend&reset=1

sub.domain-name.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/path?reset=1

sub.domain-name.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1

Any help would be greatly appreciated.

# Answer
The instructions for moving an installation should work even though you are only changing the base\_url: see http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location.

We tend to truncate tables rather than exclude on backup and migrate so that the structure is migrated.

You may be able to check the mysql log (see my.cnf for its location) for the specific table.field that is missing, if you want to try to fix the database you are currently working on. Wild guess: it is custom field, which are stored in the civicrm\_value\* tables, and defined in the civicrm\_custom\_field and civicrm\_custom\_group tables.
> 1 votes

# Answer
The Wiki page http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location is tried and true--we have migrated many sites using this.

You can also use phpMyAdmin to export/import--it preserves all foreign key and index data of course--your claim otherwise is a mistaken.

Your error of a missing field often means the CiviCRM version differs--try running the upgrader on your migrated site.

You can also consider hiring a consultant for this one-time job.
> 0 votes

---
Tags: wordpress
---


# Question
Title: Recaptcha not showing on contribution form
I have registered my recaptcha with Google as instructed in the documentation. I have then created a profile and set the advanced setting to include recaptcha. Added that profile to a contribution form and nothing is showing. So as a test, I added a field in the profile and the field is showing on the form but no recaptcha. Thought maybe something is wrong with my install so I went to the Civi Sandbox and tried it, but still it is not showing. So I must be doing something wrong, but cannot figure out what that is. Thx John

# Answer
> 4 votes
OK, I found the problem and it was my idiocy. I was trying to get it to show as a logged in user, and it was not. When I went as an anonymous user, it shows up just fine. It totally makes sense, just was not immediately obvious to me.

John

---
Tags: contributions, recaptcha
---


# Question
Title: Remove link(s) from an Activity View screen via crmReplace
How should `{$form.source_contact_id.html}` from \civicrm\templates\CRM\Activity\Form\Activity.tpl be altered so only text remains/ without an URL? smarty escape doesn't seems to be a good idea, neither crmReplace (which can replace link attributes like class or href, but doesn't seems to be able to remove link entirely). Any advice, please!

# Answer
> 0 votes
How about:

```
{$form.source_contact_id.html|strip_tags:"<a>"}

```

You'll have to add some conditional statements so the smarty only runs when your are viewing the Activity, if you don't the Contact Reference field in edit/create mode **will break**.

---
Tags: smarty, templates, custom-templates
---


title: Thankyou.tpl fields

text:
# Question
Title: Thankyou.tpl fields
I'm trying to edit the Thankyou.tpl smarty template to expose certain information on the Thank You page after a donation is submitted. Following the CiviCRM wiki it looks like, for instance, printing just the first name of the donor on that page should be able to be done using {$profileFields\_1.first\_name.value} - but this doesn't give me the result I'm looking for.

I know that I can print the full name using {$billingName} but I need to be able to pull just the first name and a couple of other address fields. Any ideas?

# Answer
> 2 votes
Add {debug} to your .tpl and you will find all available variables. Not all expected variables are available in all template.

One way to get more variables in the .tpl file is to use the API in smarty code.

More info about {debug}: https://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers

More info about using the API in smarty: https://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+API+interface

# Answer
> -1 votes
I ended up solving this by following existing code examples in the two files below (I know this is a hack of core files, but we are moving away from Civi and won't be upgrading).

The examples below expose the 'first name' contact field as {$billingFirstname} in the smarty templates (to be used in my ThankYou.tpl file).

CRM/Contribute/Form/AdditionalInfo.php:

$myvariable = CRM\_Utils\_Array::value( 'billing\_first\_name', $params );
$this-\>assign( 'billingFirstname', $myvariable );

CRM/Contribute/Form/ContributionBase.php:

$myvariable = CRM\_Utils\_Array::value( 'billing\_first\_name', $this-\>\_params ); $this-\>assign( 'billingFirstname', $myvariable ); $this-\>set( 'myvariable', $myvariable );

---
Tags: contribution-page, smarty, templates
---


title: Identify Volunteers in contact summary

text:
# Question
Title: Identify Volunteers in contact summary
I am testing the CiviVolunteer extension and was wondering if there is anyway to identify that a contact signed up to volunteer based on their profile? I assigned a few volunteers to an event, but I do not see that they signed up anywhere on their profile. I don't even see the event show up on their event tab. Let me know if I am missing anything or if this is a future enhancement. Thank you!

# Answer
> 3 votes
For now in the contact's profile click on the activities tab and filter out the activity type = volunteer. Status available means the contact has not been assigned to a specific need. Status scheduled means they have been assigned to a specific need.

# Answer
> 1 votes
Under 'CiviVolunteer' -\> 'Manage Volunteers' (or similar). I couldn't confirm as none of CiviVolunteer's menus are working on the demo site. I agree a 'volunteer' tab on the contact screen would be great (I thought there was one? It wouldn't be hard to make - drop an email to info@ginkgostreet.com to find out more).

---
Tags: civivolunteer
---


# Question
Title: CiviEvent online registration with multiple participants - move Payment Options to end
When signing up for an event with multiple participants, the Payment Options appear after the profile forms for the person signing up for the event. You have to choose the payment option you want, then click Continue, in order to add the additional participants. This can be confusing since it feels like payment is about to be taken, when the final registration amount will not be known until details for all participants have been entered.

Is there a way to move the Payment Options to the end of the process, i.e. after all the participant details have been entered?

# Answer
> 1 votes
I have the same problem ; Moreover, the price set is repeated for each participant, beyond payment, which is useless and confusing. I fully agree with a move to the end of the process, when everything is known.

# Answer
> 1 votes
I also have seen the same problem, The Person registers with their name and then selects and pays for accommodation. We have to explicitly tell them to select the No accommodation at 0$ when they register their spouse.

---
Tags: civievent
---


# Question
Title: Custom Data: Multiple Contact References
What is the easiest way to add a custom field that contains multiple contact references a la Activity Target Contacts.

I.E.

Custom Data:::::Extends Organizations
Field Set Name: Investment Round

Custom Field 1 Title: Amount Raised
Custom Field 1 Type: Money

Custom Field 2 Title: Raised Date
Custom Field 2 Type: Date

Custom Field 3 Title: Investor(s)
Custom Field 3 Type: Contact References

If this doesn't exist as a quickhack I could consider working on this if there was support for the idea. It seems like it would involve creating a helper table with the following columns.

```
CREATE TABLE `civicrm_custom_contact`(
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Custom Field ID',
  `custom_field_id` int(10) unsigned NOT NULL COMMENT 'FK to civicrm_custom_group.',
  `entity_id` int(10) unsigned NOT NULL COMMENT 'FK to civicrm_contact.',
  PRIMARY KEY (`id`),
  UNIQUE KEY `field_contact_id` (`custom_field_id`,`entity_id`),
  KEY `FK_civicrm_custom_contact_custom_field_id` (`custom_field_id`),
  KEY `FK_civicrm_custom_contact_contact_id` (`entity_id`),
  CONSTRAINT `FK_civicrm_custom_contact_custom_field_id` FOREIGN KEY (`custom_field_id`) REFERENCES `civicrm_custom_field` (`id`) ON DELETE CASCADE
  CONSTRAINT `FK_civicrm_custom_contact_contact_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=170 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

```

making a table which looks like

```
    id| custom_field_id | entity_id
    1 | 12              | 123
    2 | 13              | 4232

```

id is the primary key,
custom\_field\_id is the foreign key to the civicrm\_custom\_field table,
entity id is the foreign key to the civircm\_contact table.

In this way we could link multiple contacts to a custom field similar to the way multiple contacts are added to an activity.

So, to recap, is there an existant way to do this, and if not, would anyone be interested in working on this with me?

# Answer
> 1 votes
It looks like they are activities (new type investment), with a custom field (amount) and that should get you covered without the need of coding anything.

As for the reporting, as you know sql, I would suggest you to create a custom dataviz using https://civicrm.org/extensions/civisualize-missing-data-visualization-extension (you'll need a bit of javascript to do the graphs, but that's a handful of lines)

---
Tags: contacts, custom-fields, contact-reference
---


# Question
Title: Can a user be allowed to Create a CiviMail but not Schedule it
Concept is some users can only create Drafts, and then effectively submit them to some higher authority (presumably creates an Activity to notify right people) who has to Review and Schedule the mailing.

Anyone done anything like this yet?

If not, then I guess the bare minimum is a new Permission for 'Create Draft Mailing' which removes the 'Submit' option from the work flow.

Second step would be how to ensure the higher authority gets notified there is a Draft they need to review.

# Answer
> 2 votes
Just had this pointed out to me on IRC - which suggests that some thought was giving to creating 3 levels of permissions:

* Create mailing
* Schedule mailing
* Approve mailing

but looking like it missed the cut in the implementation.

Further documentation at 18400

---
Tags: civimail, permissions
---


# Question
Title: CIVIRM adding characters to Event name on submission to Paypal, payment received but shows as "pending, incomplete payment"
I'm currently running CIVICRM 4.7.4 with the most current version 7 release of Drupal and am running into an issue with event names when transmitted to Paypal. For example, the event name in CIVICRM is "3V2016 - Module 3 - Instructional Design" but it displays in PayPal as "1679-2049-3V2016 - Modul..." I tried this out by registering myself, and the same thing happened. I can't see any setting in CIVICRM to handle this and it worked fine before upgrading to 4.7.4 (from 4.6.x) so I'm not sure what's happening here.

In addition, for the particular registration in question (the real one) the payment processed through Paypal OK and we received the notification email from Paypal, but nothing from the site, and the registration shows as "Pending, incomplete transaction" Again, this worked fine before the upgrade. I saw somewhere that someone resolved this in a Wordpress installation by making the CIVICRM module's extern folder writable so I've done this (777) rather than (755) so I guess we'll see what happens with that. This is what I found in the log file in the Config and Log directory: Mar 22 11:44:44 \[info\] Could not find payment processor for contribution record: 2049

Mar 22 13:45:33 \[info\] Deprecated: Group='Contribute Preferences'. Name='cvv\_backoffice\_required'. Defaults should come from metadata

Any suggestions/help would be greatly appreciated. Thanks Chris

# Answer
"1679-2049-3V2016 - Modul..." is the contactID and contribution ID stored within civi respectively, followed by the event title, but concatenated to fit the total length allowed for the Item title.

This seems to be a change in the new version. Quite why this has changed from just the event title, I'm not sure, but I guess its been added to help reconcile who the contribution is from and what for to make it easier to match up paypal and civi records.

The second issue is different theres a resolution coming out for this for Joomla (see https://issues.civicrm.org/jira/browse/CRM-18245) - maybe it will fix drupal as well.
> 1 votes

---
Tags: civievent, paypal
---


# Question
Title: Unable to load registration pages or save registrations
I have a WordPress 4.2.1 site with CiviCRM 4.6.2, this is a fresh install. I have one event with registration and the default registration page:

?page=CiviCRM&q=civicrm/event/register&reset=1&id=1

shows no registration fields. If I visit

aaaaa/?page=CiviCRM&q=civicrm/event/register&reset=1&id=1

then I see the registration fields or if I visit

event/?page=CiviCRM&q=civicrm/event/register&reset=1&id=1

or

bbbbb/?page=CiviCRM&q=civicrm/event/register&reset=1&id=1

where aaaaa and bbbbb are indeed valid slugs on my site. If I visit

ccccc/?page=CiviCRM&q=civicrm/event/register&reset=1&id=1

where ccccc is not a slug, then I get a 404 Error page.

I have no "WordPress Base Page" set at

civicrm/admin/setting/uf&reset=1

and the wp\_users is set correctly as Users Table Name. I have " Your latest posts" set for the "Front page displays" in WordPress so that seems OK.

Something also odd is that the above URL is actually

civicrm%2Fadmin%2Fsetting%2Fuf&reset=1

in my browser. Not sure why...

Also when I visit

admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fmanage&reset=1

it's fine but if I visit

admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fmanage%2Fsettings&reset=1&action=update&id=1

then I get the dreaded

We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site adminstrator for assistance.

Site Administrators: This error may indicate ....

Error type: Could not find a valid session key.

error.

All pages I am testing have www before the myurl.org so that's not the problem.

Any ideas what is going on here?

# Answer
> 3 votes
It sounds like you may be having a problem with SSL pages. I suggest checking that you're not switching between HTTP and HTTPS. If you are, try going to **Administer menu \> System Settings \> Resource URLs** and changing "Force Secure URLs" to "No" until you have your SSL certificate straightened out.

# Answer
> 0 votes
The only way I've been able to resolve is to put all traffic to HTTPS.

---
Tags: civievent
---


# Question
Title: Need confirmation: Membership scheduled reminders do not sent to any email on bounce lists?
We ran our membership renewal reminder for the first time on our live data and found as expected that contacts whose email address is in the 'on-hold' category are skipped when sending out membership reminders.

But we also have additional skipped contacts, and we found some of them were on bounce lists but haven't triggered the 'on-hold' threshold yet.

Can someone please verify/falsify that even contacts on 'temporary bounce', are skipped when sending out membership renewal reminders?

Or alternatively point me to the tables/module handling this part of the feature.

I will report back to this thread.

# Answer
> 1 votes
Mail is designed to go out so long as email is not on hold. The point of the bounce thresholds is ensure the system keeps sending to an email address in cases where there is a reasonable prospect that the email will get through. And to not send when the likelihood drops too low.

Suggestions if small propotion of list not seeing email: 1. Have client check spam folder. 2. Set up SPF record for the emailing domain. 3. Reduce 'spamminess' of mailings, eg no attachments, no broken html, no words likely to be flagged. 4. Use a mail delivery service like the Mandrill one we put out when they provided 12k free emails per month (I think minimum spend is now $35-40/month so targetted at bigger installations), or the new SparkPost integration extension.

# Answer
> 0 votes
I am spitballing a little bit here, but could one possibility be that they are on hold in your mailing service, even if not in CiviCRM? For example, if you send mail through SparkPost and the contact is not on hold in CiviCRM but is blocked in SparkPost due to previous bounces, the mail may go through CiviCRM to SparkPost, but not from SparkPost to the contact.

---
Tags: civimember, scheduled-reminders, bounce
---