title: Membership signup when already a member

text:
# Question
Title: Membership signup when already a member
I have configured a one year fixed membership type. The membership renewal period has been fixed 3 month before the end of the current year.

When a member fills up the membership signup form, his membership is automatically renewed for one year, even if is not the renewal period.

Thus, if a member filled up several times the sign up form, one year is added to his membership time.

Is it possible to force membership only for the current year, except during the renewal period which include the next year?

Thank you.

# Answer
This is hard to answer without more details, such as your CiviCRM version and CMS type.

If your CMS supports it - I think the easiest way to handle this is to create a separate membership page for renewals, and create a membership status for folks within three months of renewal. Control access to that page with CiviMember Role Sync (for Drupal) or CiviCRM WP Member Sync (WordPress).

If none of that's an option, and you feel comfortable writing code (or know someone who can do it for you), you can use hook\_civicrm\_validateForm() to have the membership fail validation when membership end date falls outside of a given range.

Of course, the simplest answer - explanatory text telling people not to renew if it's not their time - shouldn't be overlooked.
> 1 votes

# Answer
An extension (always bundle code in an extension) - can be written to do something like:

hook\_contribution\_post: pull up contact's memberships - if membership did not need to be renewed (examine dates) - then record $ as a donation instead - email the contact about this - and reset the membership dates to where they were;
> 0 votes

---
Tags: civimember
---


# Question
Title: easy way to link an (offline) payment to a participant
we are not using any CC payment but rely stricktly on bank transfer or cash payment. Especially with these bank transfer payments it takes time to link payments to event participants.

It would help if each participant could be given a unique payment reference of some kind to include in the comment of their bank transfer so linking that payment to an event participant would become easier.

Is this possible in Civi? or through an extension?

# Answer
> 2 votes
Not sure I understand the question 100%, but Civi can be configured with ACH payment processing (e.g. using iATS: http://home.iatspayments.com/) - this will allow for users to register themselves online and will link the event payment with the participant record. For cash payments, you can use "Pending (Pay Later)" either from the front end (by enabling this as an option in the event configuration on the amounts tab - e.g. pay at the door) or back end (creating a back office registration and recording a contribution with a status of pending pay later).

Hope this helps! Tamar

# Answer
> 1 votes
Thanks for the additional info. If I understand correctly, you essentially want to provide those who pay via bank draft a reference number such that when you are informed of the receipt of a payment by your bank, you can do a find on the number and pull up the pending pay later contribution more easily than you would just by relying on a name - if that's the case, I would suggest you add a token to the for contribution ID and/or contact ID in the "Contributions - Receipt (on-line)" System Workflow Message Template provides content and formatting for the receipt. You can modify it from Administer \> Communications \> Message Templates \> System Workflow Message and it is part of the email that they receive after registering and ask that they include that as a memo or a note when requesting the bank transfer. You will need knowledge of HTML to do this (which I do not have).

The link to the participant record will be preserved if you edit the pending pay later contribution to a status of "Completed" and include whatever other details of the payment that are pertinent (e.g. transaction numer, date, etc.).

Hope this helps, Tamar

---
Tags: payment-processor, paylater
---


title: Unable to download buildkit on ubuntu

text:
# Question
Title: Unable to download buildkit on ubuntu
On a fresh Ubuntu system when running the command

> curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir ~/buildkit

as requested on the document on the repository, i get the following error

> bash: line 1: unexpected EOF while looking for matching \`'' bash: line 2: syntax error: unexpected end of file

and the download fails to proceed.

# Answer
Discussed this a bit over Mattermost. For debugging this, it made sense to run the first half of the command and check the output, e.g.

```
curl -Ls https://civicrm.org/get-buildkit.sh

```

It should display a bash script. However, it actually displayed an error message about an IP restriction. A quick work-around was to download the script through a different URL, i.e.

```
curl https://raw.githubusercontent.com/civicrm/civicrm-buildkit/master/bin/civi-download-tools | bash -s -- --full --dir ~/buildkit

```
> 1 votes

---
Tags: developer, civicrm-buildkit
---


# Question
Title: Actions > Create User Record: created a new user account no email has been sent, why?
We'd like to automate user account workflow a bit and send a standard Drupal Welcome email each time new User Record created from within a Contact Action drop down in CiviCRM.

Currently we've got only "created a new user account for USERNAME, no email has been sent" message.

It seems pretty logical to send emails at each new Drupal Account creation "by default", especially if all corresponded check boxes at /admin/config/people/accounts are checked.

What are we missing? Any clue, please!

Drupal 7.50, CiviCRM 4.6.20

# Answer
I don't believe any work has been done to enable this so a patch to core would be required.

The workaround we have often used is described in this blog \- basically it uses a civi tag, that triggers a drupal rule, which then uses drupal default processes for creating a drupal user and hence sends out the email etc.

We developed that approach for different scenarios and is probably overkill but it works so we use it ;-)
> 2 votes

---
Tags: drupal, contacts, user-account
---


# Question
Title: Upgrade CiviCRM 4.6.20 to 4.7.10 on Drupal - db error
I'm upgrading a CiviCRM 4.6.20 install to 4.7.10. I'm on Drupal 7.50. I've tried the updgrade several times. My Drupal database updates are all executed. Before running the upgrade, the civicrm\_action\_schedule table has an INDEX with the name, FK\_civicrm\_action\_schedule\_mapping\_id. But when I execute SQL to list all foreign key constraints, there are none. I don't know if this makes a difference, but the table is empty. I don't have any rows in civicrm\_action\_schedule.

What could I be missing here? Thanks!

\[Error: Upgrade DB to 4.7.alpha1: SQL\] Error Field Error Value Type DB\_Error Code -4 Message DB Error: not found Mode 16 UserInfo ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_schedule_mapping_id` \[nativecode=1091 \** Can't DROP 'FK\_civicrm\_action\_schedule\_mapping\_id'; check that column/key exists\] DebugInfo ALTER TABLE `civicrm_action_schedule` DROP FOREIGN KEY `FK_civicrm_action_schedule_mapping_id` \[nativecode=1091 \** Can't DROP 'FK\_civicrm\_action\_schedule\_mapping\_id'; check that column/key exists\]

# Answer
> 1 votes
I may have found a solution elsewhere - which is ugly and requires editing the upgrade scripts. Database Error When Upgrading 4.6 to 4.7 on Drupal 7

So it's not really a solution for me - but maybe it will be a solution for others, as once I got past that issue the 4.6.20 to 4.7.0alpha3 portion failed with the following. Have not found that many google matches for this error - but hopefully I can get past this next hurdle. Hopefully others won't also run into this issue.

> \[Error: undefined\]
>
> Exception: "A fatal error was triggered: Could not find valid value for qrid"
>
> # 0 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/CRM/Utils/Request.php(92):
>
> CRM\_Core\_Error::fatal("Could not find valid value for qrid")
>
> # 1 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(47):
>
> CRM\_Utils\_Request::retrieve("qrid", "String", NULL, TRUE, NULL, "POST")
>
> # 2 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php(106):
>
> CRM\_Queue\_Page\_AJAX::{closure}()
>
> # 3 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(54):
>
> CRM\_Queue\_ErrorPolicy-\>call(Object(Closure))
>
> # 4 internal function: CRM\_Queue\_Page\_AJAX::runNext()
>
> # 5 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/CRM/Core/Invoke.php(278):
>
> call\_user\_func((Array:2))
>
> # 6 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/CRM/Core/Invoke.php(86):
>
> CRM\_Core\_Invoke::runItem((Array:13))
>
> # 7 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/CRM/Core/Invoke.php(54):
>
> CRM\_Core\_Invoke::\_invoke((Array:5))
>
> # 8 /home/kialis/zootownarts.org/drupal7/sites/all/modules/civicrm/drupal/civicrm.module(454):
>
> CRM\_Core\_Invoke::invoke((Array:5))
>
> # 9 internal function: civicrm\_invoke("upgrade", "queue", "ajax", "runNext")
>
> # 10 /home/kialis/zootownarts.org/drupal7/includes/menu.inc(527): call\_user\_func\_array("civicrm\_invoke", (Array:4))
>
> # 11 /home/kialis/zootownarts.org/drupal7/index.php(21): menu\_execute\_active\_handler()
>
> # 12 {main}

---
Tags: drupal, 4.7.10
---


# Question
Title: Access Instant Messaging in Drupal Views
I want to display in Drupal Views the IM details, I think it could be displayed like the websites or phone details.

Should I add it to CiviCRM or is it something civicrm\_entity should handle ?

# Answer
> 2 votes
I added the feature in CiviCRM, https://issues.civicrm.org/jira/browse/CRM-19274

# Answer
> 0 votes
I needed some more changes in the relationships, to be able to display the phone of the household of the contact :

in the relationships :

* relationship CiviCRM relationship 'household member of'
* relationship household as contact\_id\_b
* relationship phone from relationship 'household', choice of primary phone

displayed fields : phone number, phone location, phone type from the 'Phone' relationship

so I altered some more code to be able to do that,

and I added the possibility to choose the location and type for Instant Messaging and Website, so it should answer How to access multiple CiviCRM website fields for a contact in Drupal Views?

I will put it in the same PR because it's related to the same part of code (relationships and fields location-related).

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


# Question
Title: How to access multiple CiviCRM website fields for a contact in Drupal Views?
I have two website fields for my contacts, a work website and a personal website. I am creating user profile pages (NOT CiviCRM profiles) for each of our members and want to display both website links, but, when I try to add a website field to the view, there is just one option to choose from and it is labelled generically, rather than as either personal or work.

How do I access both website fields?

When I add fields to the view for email or physical address, in the 'Configure field' dialogue in Views, there is a select box to choose which 'location type' you want for your email.

However, I don't get that option with websites.

Thanks, Lewis

# Answer
> 3 votes
* in your CiviCRM tab -\> you can set the Number of Email fields to 2 - and then set one to Email Location: home and one to Email Location: work (and decide which one is primary). Save Settings.
* next: in your Webform Tab -\> go ahead and hit Edit on the Elements you've just created -\> change the Label to anything you want -\> so that the user knows which Email address to plug in - in which field.
* in Views -\> to create a Member listing. First of all make sure you have CMS database integration enabled -\> check: civicrm/admin/setting/uf?reset=1 - and follow the Views integration settings instructions
* then into Views -\> make a View to display e.g. Contacts -\> then add Fields for Email -\> once you have added the field you can hit Edit and specify which one you'd like -\> make that Primary or Work or Home. Add another Field for Email -\> select another Location Type. That way you'll have multiple Email columns of different Location Type.

PS - just realized you said website -\> but the recipe should be identical;

**EDIT:** \- ah it's not - I just checked and it looks like Views integration is not quite working for that specific field yet (or it's a bug). Your workaround would be to store these fields yourself - in custom fields. Then you have complete control over them in both webform\_civicrm as well as in views listings. I'll file an issue on JIRA

**EDIT:** reported: https://issues.civicrm.org/jira/browse/CRM-19258

# Answer
> 2 votes
I proposed some changes in the code to be able to choose the location and the type of the website here : https://issues.civicrm.org/jira/browse/CRM-19274

# Answer
> 1 votes
Lewis, I would check out using webform-civicrm to do this, and a bunch of other handy stuff as well. In the CiviCRM tab, add the member as Contact 1 and of type Existing Contact. Then, in the fields to display for Contact 1, select Websites and choose to display two - work and personal.

Then edit the display label in the Webform tab for each displayed Website field and change to Website - Work and Website - Personal. You can have as many website, e-mail, address etc fields displayed (and updatable) as you like.

---
Tags: drupal-views
---


# Question
Title: DB Error: unknown error (Tablespace is missing for table .civicrm_setting)
i just restarted my PC which has a locally hosted dev version of CiviCRM in WordPress, and now get the following error on initialization...

```
Initialization Error

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

  [code] => -1
  [message] => DB Error: unknown error
  [mode] => 16
  [debug_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)  [nativecode=1812 **
Tablespace is missing for table `ieditims`.`civicrm_setting`.]
  [type] => DB_Error
  [user_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)  [nativecode=1812 **
Tablespace is missing for table `ieditims`.`civicrm_setting`.]
   [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::simpleHandler prefix=""
 info="SELECT id, name, value, domain_id, contact_id, is_domain,
component_id, created_date, created_id FROM civicrm_setting WHERE
(domain_id = 1) AND (is_domain = 1)  [nativecode=1812 ** Tablespace is
missing for table `ieditims`.`civicrm_setting`.]"]

```

Please help!!!

Joe.

# Answer
> 1 votes
The relevant underlying error is hidden in that long message:

> \** Tablespace is missing for table ieditims.civicrm\_setting.

I am no expert in database administration but it seems this might be related to a corrupted or missing file of your database system.

If your dev system doesn't have very specific civicrm settings, I would try to delete the table `civicrm_setting` in an admin tool like phpmyadmin and recreate it afterwards. For CiviCRM 4.7.10 the SQL query to create the table would be

> CREATE TABLE IF NOT EXISTS `civicrm_setting` ( `id` int(10) unsigned NOT NULL AUTO\_INCREMENT, `name` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL COMMENT 'Unique name for setting', `value` text COLLATE utf8\_unicode\_ci COMMENT 'data associated with this group / name combo', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this menu item for', `contact_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Contact ID if the setting is localized to a contact', `is_domain` tinyint(4) DEFAULT NULL COMMENT 'Is this setting a contact specific or site wide setting?', `component_id` int(10) unsigned DEFAULT NULL COMMENT 'Component that this menu item belongs to', `created_date` datetime DEFAULT NULL COMMENT 'When was the setting created', `created_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm\_contact, who created this setting', PRIMARY KEY (`id`), UNIQUE KEY `index_domain_contact_name` (`domain_id`,`contact_id`,`name`), KEY `FK_civicrm_setting_domain_id` (`domain_id`), KEY `FK_civicrm_setting_contact_id` (`contact_id`), KEY `FK_civicrm_setting_component_id` (`component_id`), KEY `FK_civicrm_setting_created_id` (`created_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci

---
Tags: wordpress, database, error
---


# Question
Title: "Save contact and add contribution" button in the contact form
In the contact form, I need to add a new button "Save and add Contribution" that, when pressed:

* save the current contact data
* redirect to the "New contribution" page, possibly with the contact already selected

How can obtain this? Thanks

# Answer
You can solve this by writing some custom code in an extension. You can use a hook to insert this butoon on the contact form which does what you want to do.
> 1 votes

# Answer
The way suggested by Jaap is correct. After creating a new extension in the buildForm hook I've inserted the following button:

> $form-\>add('submit', 'SaveAndContribution', ts('Save and Add Contribution'));

and his template. The form is now complete.

At the moment, anyway, I'm not able to distinguish which button was pressed. I had a look at the postProcess hook, but without result.
> 0 votes

---
Tags: contacts, contributions
---


title: Search Builder Issue

text:
# Question
Title: Search Builder Issue
I have a problem with Search Builder on my CiviCRM. I just wanted to check how many contacts i have in my db outside of Italy. It should be a simple search:

1. Record Type = Contacts
2. Field type = Country
3. Operator = ≠
4. Value = Italy

I get this error: "Sorry but we are not able to provide this at the moment. DB Error: no such field". If i try with another field type, e.g. city, it works.

I've tried the same search in CiviCRM Beta website, it works.

Is there someone who can help me figuring out what could be the problem here?

Thank you very much Alessandro

# Answer
> -1 votes
I believe you would need to find the country\_id for Italy in civicrm\_country, and then use that? The country name will not be stored in any other table.

---
Tags: search-builder
---


# Question
Title: CiviCRM does not send mail to microsoft based webmail clients (outlook, hotmail and live)
CiviCRM does not send mail to microsoft based webmail clients (outlook, hotmail and live)

CiviCRM Version 4.7.4 on Wordpress

> ECDHE-RSA-AES256-SHA384:256 CV=yes: SMTP error from remote mail server after MAIL FROM: email address redacted SIZE=1620: 550 SC-001 (BAY004-MC1F36)

This has been happening consistently over time, is there any way to track or identify where the process is falling down?

We have tested thirdsectordumgal (via Civi) to live, which failed. live (via civi) to thirdsectordumgal appeared to work, but has not shown up. live (via civi) to live also failed.

We use Sendmail to send out the mail as SMTP authorisation has not worked in the past.

# Answer
> 2 votes
Microsoft's mail services have blocked your mail server.

Their specific reasons for blocking may vary (and their server's response codes will guide you here to some degree), but there are a variety of things you can do to improve the situation.

Alternatively you might consider one of the hosted mail provider plugins available for CiviCRM - managing relations with mail providers can be a big task, and outsourcing that may save you a lot of time.

# Answer
> 1 votes
CiviCRM generates valid SMTP emails, so the issue is almost certainly with your mail stack.

I would speak to your mail administrator. If you ARE the mail administrator, I'd download a copy of swaks and send some test emails through Sendmail on the server in question. Ideally, you're running swaks on the server itself, possibly even as your CiviCRM web server user.

---
Tags: email
---


# Question
Title: eWay Payment Processor error 9001 on contribution - help please
eWay Payment Processor error 9001 on Contact's Contribution page.

Setup new eWay account works fine with Xero, however, with CiviCrm (4.7.10) when used with a Contact's Contribution page I get a "9001 error. Connection to payment gateway failed - no data found". Have tried the delivered eWay processor and also Chris Chincilla's V1.2 and I get the same behaviour.

Have checked the setup many times and it is correct. Have deleted the payment processor and then re-added it. No change.

Can anybody help me or point me in he right direction please?

# Answer
This has been fixed. My hosting company migrated my site to another server which could communicate with eWay and it is now working.
> 2 votes

---
Tags: wordpress, payment-processor, eway
---


# Question
Title: I have selected a Linked Trigger for a new rule created using CiviRules, so why do I see the error " Select Trigger is a required field "?
We're on CiviCRM 4.6.19 and Drupal 7.50.

I've just added and installed CiviRules 1.2 from master.

I'm trying to create my first rule. I selected "Membership is changed" as the Linked Trigger. Other settings are in the screenshot.

Yet, when saving the new rule, I see the error message "Please correct the following errors in the form fields below: Select Trigger is a required field" and I can't save the new rule.

I'm going to start from scratch to see if there is *another* trigger setting I missed.

Any clues to fixing the error or removing the error message are appreciated. Thanks!

UPDATE: I've filed an issue on the GitHub repo and I've started a list of Triggers, Conditions and Actions that definitely work here

# Answer
This issue was fixed on September 1, 2016 - see the closed issue on the CiviRules GitHub repo here
> 1 votes

---
Tags: civirules
---


# Question
Title: How to code a handler for <action> HTTP requests?
I've managed to add a tab to "**My Contact Dashboard**". The way I did this was by adding my extension using civix and then a hook\_civicrm\_tabset hook to my extension.

Now, the URL that my tab button is pointing to is *civicrm/contact/view/someaction?qstr*. The Contact dashboard is making an AJAX request when I click on a tab button, and the server then returns the HTML code for that tab. But since I haven't added any code for that URL/action yet I'd expect either an error response or some default page. (It seems CiviCRM takes the default page action, *civicrm/contact/view/someaction?qstr* seems to return the same as *civicrm/contact/view?qstr*)

Can anyone tell me how to make my extension return the HTML for my newly created tab? Should I implement a hook for this somewhere? Or something else? Or perhaps register a route for *civicrm/contact/view/someaction*? I found https://wiki.civicrm.org/confluence/display/CRMDOC/How+to+Create+Your+Own+Action ("How To Create Your Own Action") which seems to be pretty close. But it says CiviRules module is required, and an optional module for this(adding my own action)..well, it seems sort of far fetched.

# Answer
> 3 votes
> It seems CiviCRM takes the default page action, civicrm/contact/view/someaction?qstr seems to return the same as civicrm/contact/view?qstr

Civi's router uses a fallback search. (The wisdom of this can be debated elsewhere - I'm just reporting facts.) For example, if you request `civicrm/foo/bar/baz`, then it will look for the routes in this order:

* `civicrm/foo/bar/baz`
* `civicrm/foo/bar`
* `civicrm/foo`
* `civicrm`

The first matching route will handle the page-request.

> Or perhaps register a route for civicrm/contact/view/someaction

If I understand correctly, I believe this is what you want.

Since you mentioned `civix`, look at Create a Module Extension for instructions to "Add a basic web page". It describes the command `civix generate:page <ClassName> <web/path>`, which will generate scaffolding for a new route.

**Aside**: When I first read the title, I interpreted the question to mean "How code different handlers for (GET/POST/PUT/DELETE) HTTP requests?" In case that really is the question: Civi's router doesn't distinguish between HTTP verbs. You can just define one route and then use something like `switch($_REQUEST['REQUEST_METHOD'])`.

---
Tags: drupal, extension, civirules
---


# Question
Title: I want Theme developer to have admin access to WP but not civicrm, is that possible?
I am using WP, and I have a theme developer helping me with a few issues in a buddypress forum, and then I have another plugin developer I would like to help me with another issue having to deal with super security. Anyway, I don't want so many people having access to my civicrm database as they don't need to touch civicrm in order to fix WP or plugin issues.

Is there a way to limit WP admin access to NOT allow access to civicrm?

Thanks? If not, does anyone know a developer who knows WP, Civicrm, Thrive Theme, and BPS Security? I tried a Civi911 developer and they couldn't help me with all these WP plugin/theme/forum issues.

# Answer
> 2 votes
I wouldn't hire an IT person who thinks it's ok to do development on a live site. You always do development and testing on a COPY of the site. See also https://codex.wordpress.org/Running\_a\_Development\_Copy\_of\_WordPress

One of many reasons is that the dev copy can have fake or anonymized data in it - I assume your concern is the devs seeing the real data.

---
Tags: admin
---


title: Tutorial for creating pages with ajax

text:
# Question
Title: Tutorial for creating pages with ajax
For our CiviCRM instance, I use to create forms that allow the user to execute some specific tasks. Typically they end up on a form, they enter some values, and the postProcess function executes some API calls based on what the user entered in the form.

Now I read in the wiki that the use of forms is discouraged, and that I should use a web page and use Ajax. But I have little experience using javascript in my forms, so I wonder whether there exists some kind of tutorial that shows the best practices for doing this. Or is there a particular existing page in CiviCRM (or an extension) that I can look at? Or maybe someone gave a talk at some Civicon that has been recorded?

Any input is greatly appreciated.

# Answer
> 2 votes
As far as I know - If you dont need any specific action to be done on the form which you have created before you hit the submit button then you should be alright

For example: If you enter a Postcode on the form and you need to populate address line of the postcode before submission then you need to write AJAX to fetch the records from Database

Links for civicrm Ajax: references

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

https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms

Also you can find a good example of Ajax used in the below extension

https://civicrm.org/extensions/civicrm-postcode-lookup

I guess this helps !!!

---
Tags: developer, forms, ajax
---


# Question
Title: How do I create a token that automatically gets urls convert to trackable links?
This is kind of the opposite of Integrating CiviMail tracked links with Google Analytics

In other words, I'm generating html for civimail using tokens, and the html includes links, but those links are not getting converted into trackable links. I think there's probably some code I could include in my hook\_civicrm\_tokenValues function to convert my embedded urls into trackable links, just like the Civi core code does. Or maybe I have to tell Civi that it's okay to do this using some settings?

# Answer
> 3 votes
The BAO responsible for trackable URLs is `CRM_Mailing_BAO_TrackableURL` link here.

Because the `MailingJob` is available in `hook_civicrm_tokenValues` you could do something like this:

```
// job details to get mailing_id
$job_id = civicrm_api3('MailingJob', 'getsingle', array(
        'id' => $job,
));
// get event_queue_id
$queue_id = civicrm_api3('MailingEventQueue', 'getsingle', array(
        'job_id' => $job,
        'contact_id' => $cid,
));

$url = 'https://example.com';
$trackableUrl = CRM_Mailing_BAO_TrackableURL::getTrackerURL($url, $job_id['mailing_id'], $queue_id['id']);

```

RE: "wyswyig button that pulled in auto-generated content" HTML Buttons plugin for CKEditor does what you describe, I have a couple of dropdowns with buttons that insert complex HTML snippets, is what I use for composing newsletters.

---
Tags: civimail, tokens
---


# Question
Title: Managing Large Conference Sub-Programs in CiviCRM
I work for an organization that has a long history of putting on large conferences and we want the workshops and panels of these conferences to stored in CiviCRM connected to those who spoke and attended. Where would be the best place to do this? Should I create a Custom Field for Programs or should they each be activities so I can have more than one contact record connected to it?

# Answer
> 1 votes
CiviEvent works marvellously for conferences. As Erik suggests use different roles for your delegates, speakers etc. From Civi help: "Participant Role: The Role you select here is automatically assigned to people when they register online for this event (usually the default 'Attendee' role). You can also allow people to choose a Role by creating a Profile with the Participant Role field. Then include that Profile when you configure the Online Registration page for this event.

# Answer
> 0 votes
I am not sure I fully understand what you want to achieve. You will probably need to explain in some more detail. My first reaction is: use the participant role so you can see which role the contact had on which conference?

---
Tags: custom-fields
---


# Question
Title: Adding additional admin fee on top of civicontribute membership signup
I need to create a membership signup price with the following price:

Membership Fee: £500.00 + Vat and Administration fee: £20 + Vat

I manage to add the membership fee and vat but I could not figure out how to set additional admin fee and vat.

Can anyone please help me how I can achieve it.

Thanks in advance.

# Answer
> 2 votes
If you haven't tried using priceset then i would recommend you to use priceset

The best way to have membership fee and administration fee would be using a price set which allows you to have multiple option

reference: https://wiki.civicrm.org/confluence/display/CRMDOC/Membership+Price+Sets

https://docs.civicrm.org/user/en/4.6/membership/membership-price-sets/

I guess this helps !!!

# Answer
> 0 votes
Not sure if you are on Civi 4.7+, but the instructions for VAT can be found at the following link: https://docs.civicrm.org/user/en/stable/contributions/sales-tax-and-vat/

If you have followed these instructions and this is what you are having issue with, please edit your question to include a screen shots of the price set and field options - that might help us understand the issue you are facing at the moment.

Hope this helps, Tamar

---
Tags: civicontribute
---


title: Specific Reports

text:
# Question
Title: Specific Reports
I'm having trouble running a report and I hope someone can help.

I would like to run a report that shows me the name and address of the contributors between now and 2011. I have a database that goes back to 2005.

Any help is appreciated.

# Answer
> 1 votes
If I am not wrong you need a list of all the contact who has made a contribution since 2005 without any duplicate contact

you can get a list of all the members since 2005 to till date as below

Report using Civicrm 4.7.12

Reports -\> contribution Reports -\> Contribution Summary

In cloumns: select contact name and address fields as you needed

In Grouping: just select contact ID so you will not get repeated records

In Filters: just select the date range

then refresh the report and you will get all the records you wanted

I guess this helps!!!

---
Tags: contributions, reports
---


title: Adding a contact summary tab

text:
# Question
Title: Adding a contact summary tab
I am completely new to Civicrm and successfully created an extension that modify and existing page{Contact Page} but I am required to create a extension that shows a new CIVICRM Contact Tab that show list of Personal Campaign Pages created by a contact.I have not clue how to start creating this..Any tip on how to do this will be appreciated

# Answer
You can use the tabset hook (detailed information can be found on the wiki here: https://wiki.civicrm.org/confluence/display/CRMDOC/hook\_civicrm\_tabset) to add a contact tab.
> 1 votes

# Answer
Check out the CiviPoints extension that has an excellent example of how to do this
> 0 votes

# Answer
Adding a tab to the contact summary page is a matter of implementing hook\_civicrm\_tabset. You'll need to add a page callback to render the new tab content.
> 0 votes

---
Tags: extension, developer
---


title: Event registration expires - why?

text:
# Question
Title: Event registration expires - why?
Question from Civi newbie:

I'm testing the event registration process, live. Why do I get this message:

"Your pending event registration for Restoring Oceans, Restoring Climate has expired because you did not confirm your registration."

I don't know what "confirm" means. Registration was completed and charged with credit card via Paypal standard. I received no e-mail asking for any kind of confirmation.

IOW, it seems to me that it shouldn't have expired.

Thanks!

Adam

# Answer
The message is a little misleading. This email is generated if you've got the field "Pending participant expiration (hours)" set on the "Online Registration" tab of your event configuration. The help text for this field states:

> Time limit in hours for confirming/finishing registration by participants with any of the pending statuses. Enter 0 (or leave empty) to disable this feature.

If you don't have participant approval or waitlisting enabled for your event, then the likely cause is that your PayPal transactions are getting stuck in a pending state. You've probably seen the "Pending (Incomplete Transaction)" status on contributions in your database. Have a look in PayPal to see if the funds are actually going through. If they are, you probably have a config problem keeping PayPal from pinging CiviCRM to let it know that the transaction was successful. Is your notification URL set in PayPal?
> 5 votes

---
Tags: civievent, registration
---


title: Spouse relationship in a Drupal view

text:
# Question
Title: Spouse relationship in a Drupal view
I currently have a Drupal View Displaying the current user and his/her spouse (AKA Drupal User and CiviCRM Contact B) For some reason it will only Display the Drupal User and spouse if the spousal relationship was created from the Drupal User's CiviCRM contact profile. If the spousal relationship was created from Contact B's CiviCRM profile, then nothing is displayed. Is there a way to get this working regardless where the relationship was added?

# Answer
> 4 votes
You need to add the relationship from the contact ID B?

# Answer
> -1 votes
Are the relationships permissioned? Your users probably can only see their spouses if it's a permissioned relationship, and perhaps when the relationship is bring created the second way it isn't being created in such a way that it is permissioned.

---
Tags: drupal-views
---


title: Using households

text:
# Question
Title: Using households
We are migrating our homemade contacts-management software under CiviCRM and Drupal and we have some questions about the use of households.

In our current software, we have less than 10 % of our contacts which are identified as being in couple. We need this household notion for:

* grouping the contributions by household for statistics purpose,
* optimizing the management of addresses and snail mail,
* and in 3 or 4 % of the cases, to connect children with a household.

In the forums, some advise to create a household for each single individual so as to homogenize the management of the contacts and so facilitate the lists report. Others say that the simple management of the relationships can be enough and is simpler to manage.

(A very interesting post but may be not up-to-date : https://www.civicrm.org/blog/eileen/households-%E2%80%93-a-bit-of-an-audit)

We are afraid that the first option increases the problems of duplicates : duplicates for the contacts and duplicates for households, and of the blow more time consuming for merging. And the merging will be more complex to.

Same thing for creation, even if solutions to automate seem to exist : Has anyone come up with an easy way to enter a household, the members, create the relationship, share the address, etc.?

In the light of your experiences of using Civi, do you think that, for our case, setting the option to manage households is a good solution or should we simply manage relationships?

For those who took the option to manage households, what types of complications did you meet and how did you solve them?

# Answer
We are a church and use Households to hold the address and to aggregate contributions.

We use the extension https://github.com/PalanteJon/coop.palantetech.module.automaticsoftcredit to automatically create soft credits to the household for all individual contributions. In my opinion this is how Civi should work out of the box (rather than allowing a household to make a contribution it should only aggregate the contributions of all the members of the household) I think the Household should simply be a container for data within Civi and that's how we treat it.

I wish, as Eileen points out on her blog post, that there was an easy way for an individual to update a shared address through profiles or manage their shared addresses.

We do create a household for all contacts even singles.
> 1 votes

# Answer
I normally set up a Drupal webform to make adding a household, and everyone in it, and the various relationships a lot easier. The webform can be used by staff and volunteers to make data entry easier.

In my experience, there tends to be mixture of individuals connected to households, and individuals not connected to households. There are a number of searches/reports that aggregate data at the household level as needed (and can deal with singles in the same report.) For example: https://civicrm.org/extensions/aggregate-household-contributions-report and https://civicrm.org/extensions/family-friendly

Even if the staff/volunteers always creates households, singles end up in the database anyhow when people register for an event or donate money via a contribution page.

FYI: You should also check out the extension: https://civicrm.org/extensions/household-tools
> 0 votes

---
Tags: duplicate-contacts, best-practice, households
---


# Question
Title: Why do we need new_link in the mysql DSN settings?
I see that in all civicrm settings.php examples the DSN is something like

> mysql://crm\_db\_username:crm\_db\_password@db\_server/crm\_database?new\_link=true

but why the new\_link setting? Isn't it much more efficient to re-use an existing mysql connection than to open a new one each time?

# Answer
If you only ever connected to one database on the same database server yes. If you run e.g. drupal and civi in different databases on the same server you will have problems. Even if you don't, it's theoretically possible a 3rd party civi extension uses its own separate database (but probably rare).
> 1 votes

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


# Question
Title: How do I stop the new "Security Notifications" that civi pops up for upgrades
As we keep an eye on these upgrade for clients, the last thing we need is for them to worry about it while we check out their customisations for compatability etc.

How to get rid of them?

# Answer
**Disabling security notifications hides the notice from your users, but it won't hide your sites from attackers.** Turning off the warning supports a scenario where those sites are at risk longer.

Here's how we handle it for our hosting clients -

Since CiviCRM stores personal data, I believe every organisation using CiviCRM has a responsibility to ensure there are processes in place to ensure security updates are applied promptly as part of a wider programme to protect your customers and their contacts.
> 8 votes

# Answer
Whilst **this may not be a good idea if you don't have infrastructure to keep on top of upgrades & security issues**, the setting can be found in:

> **Administer \> System Settings \> Misc**.

the notifications are set in the dababase in the civicrm\_setting table (along with lots of other useful little settings :))

From the "name" column, we can ascertain that:

```
global $civicrm_setting;
// Disable new version messages
$civicrm_setting['CiviCRM Preferences']['versionAlert'] = 0;
// Disable Security Messages
$civicrm_setting['CiviCRM Preferences']['securityUpdateAlert'] = 0;

```

will disable all of the notifications.

**See Chris' answer - it's important to have the infrastructure to take care of upgrades!**
> 3 votes

# Answer
Marsh's answer is correct for Civi 4.6. For versions 4.7+, go to **Administer menu » Administration Console » System Status** and press "Hide" next to the version check message. You can choose to hide the message for a week, a month, or forever.

Note that hiding a non-security update will NOT hide a security update, but hiding a security update will hide both.

If you're looking for a way to hide upgrade messages from the command line, or when there's no update available, use an API command, something like this:

```
#Drupal or Backdrop
drush cvapi StatusPreference.create name="checkVersion" ignore_severity=2
#WordPress
wp civicrm api StatusPreference.create name="checkVersion" ignore_severity=2

```

Change the 2 to a 5 to hide security updates as well as non-security updates.
> 2 votes

# Answer
You can disable this from: CiviCRM \> Administer \> System Settings \> Undelete, Logging, ReCAPTCHA (on version 4.3.x ) and from CiviCRM \> Administer \> System Settings \> Misc (Undelete, PDFs, Limits ....) (on version 4.4.x)
> 0 votes

---
Tags: security, settings, civicrm.settings.php
---


# Question
Title: What is the difference between Email and Mailing?
I found that if I want to send mail to an individual, I need to use Email while in order to send mail to a group, I need to use mailing. Is this the main difference? Are there ways to schedule Email like in case of Mailings?

Also I could not find a folder for Email in Civicrm folder. Are there DAO and BAO files for Email?

# Answer
> 4 votes
The main difference is that the mails are sent "synchronously", when you save it, that sets a limit of max 50 emails, whilst the mailings are sent in the background via a cron (so you don't get any timeout and can send it to millions)

The BAO/DAO for emails are into CRM/Core

if you have installed civi from buildkit (or from git) you have a xml/schema folder that defines the structure of the tables and where the DAO are (it's from there it's generated). I find it more convenient to search than the CRM code

# Answer
> 2 votes
This link will explain you about Email and Mailing in details http://book.civicrm.org/user/current/email/what-you-need-to-know/ give a quick read

# Answer
> 0 votes
E Mail is a mean of communication which is used for purposes such as send/receive/forward and reply to text / audio or video messages. It is sent to specific persons whom we want to send the message. All sorts of messages/interests can be shared and discussed. Whereas, Mailing list is a group o people with similar interest.Their E mail addresses are collected in a group which is known by a single name. Whenever a person sends a mail , everyone in the group gets a copy of the mail. We can subscribe to a mailing list of our interest and then sens/receive mails to/from the group.

---
Tags: civimail, email, gsoc
---


title: How do I perform a security update

text:
# Question
Title: How do I perform a security update
When logging on today, I got the following alert:

"Jmanage Security Update Required New security release 4.7.11 is available. The site is currently running 4.7.9."

What steps do I need to perform to achieve this goal?

# Answer
Depends on your CMS - Here is the link https://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades Always backup first - It is kind of like doing an instal except you do not need to do the configuration after :-)
> 2 votes

---
Tags: security, upgrade
---


# Question
Title: quick search autocomplete not working on civi 4.6.20 drupal 7.50
After the last minor update, my colleague pointed out that quick search auto complete is not operating. I don't find any similar issues in stackexchange or jira, and couldn't reproduce it on the 4.7 demo site. I am seeing a failure in the browser on this resource:

403 error https://domain.org/civicrm/ajax/rest?entity=contact&action=getquick&json=%7B%22name%22%3A%22asdf%22%2C%22field\_name%22%3A%22%22%2C%22table\_name%22%3A%22cc%22%7D

# Answer
This was a hosting issue. ModSecurity rules had to be edited. Not a 4.6 update issue at all.
> 1 votes

---
Tags: 4.6, quicksearch
---


# Question
Title: Create custom entity in CiviCRM with its UI form for data entry?
I want to create new custom entity in the Drupal-CiviCRM with its form from where user can data. In my case I want to have something like : User can register new application for keeping dangerous animal. It will then initiate workflow which will forward the application for its approval/decline process to admin.

# Answer
It sounds like you want to use the CiviCRM Webform Integration module and start a case in CiviCRM when an application form is submitted?
> 1 votes

---
Tags: civicrm-entity, workflow
---


# Question
Title: How can I increase the amount an existing monthly sustainer is giving?
We're on CiviCRM 4.6.19, Drupal 7.50 and we use Authorize.net for payment processing.

If I simply want to increase the amount an existing monthly sustainer is giving, should I be able to do that by changing the monthly "subscription" amount in Authorize before the next monthly transaction?

Is there a recommended way to do this in CiviCRM itself?

# Answer
> 5 votes
This won't work, because CiviCRM doesn't communicate with Authorize.Net regarding changes to recurring billing. Only token-based payment processors (e.g. iATS) do.

While I can't answer specifically for Authorize.Net, in PayPal you can change the billing amount by no more than 20% every 6 months without entering new card info. You do this from the PayPal UI.

# Answer
> 3 votes
You'll need to cancel the transaction via Authorize.net's merchant portal, cancel the recurring contribution in civi, and create a new recurring gift.

Civi can't do it all internally.

# Answer
> 0 votes
Would this process not work? If not, please comment and give some feedback so that I can alter what I'm expecting.

Editing Recurring Contributions without user login

---
Tags: civicontribute, civimember, authorize.net
---


# Question
Title: MyISAM database but all civicrm_ tables are INNODB... is this a problem?
I just upgraded a large site to 4.7 (without any issues in the upgrade process by the way). The new "System Status" admin screen gives a warning as follows:

> "Your database is configured to use the MyISAM database engine. CiviCRM requires InnoDB. You will need to convert any MyISAM tables in your database to InnoDB. Using MyISAM tables will result in data integrity issues."

This is news to me. I took the database over from another person and have upgraded it a number of times already. I looked at the database and it does have some strangeness. For the most part, each `civicrm_` table is listed as INNODB, all the `log_` tables show up as ARCHIVE, and at the bottom the global setting seems to be MYISAM. The one exception is the `civicrm_system_log` table, which is listed as MYISAM.

Is this going to cause problems, and is there an easy way to get everything on track?

...

# Answer
> 13 votes
I backed the database up, opened it up in Sequel Pro and went to the `civicrm_system_log` table. Under "Table Info" I could select "InnoDB" from the dropdown. Then I cleared the caches on the CiviCRM installation and the system status came back green ("System Status: OK").

Per a comment from George Lozier on another thread, the MySQL query to do the same is:

```
ALTER TABLE civicrm_system_log ENGINE=InnoDB;

```

# Answer
> 7 votes
Sounds good. To be sure, please execute ///civicrm/menu/rebuild?reset=1&triggerRebuild=1 which fixes the trigger and function definitions in the database.

# Answer
> 3 votes
Single command to update all tables is:

SELECT CONCAT('ALTER TABLE ', TABLE\_SCHEMA, '.', TABLE\_NAME, ' engine=InnoDB;') FROM information\_schema.TABLES WHERE ENGINE = 'MyISAM';

# Answer
> 1 votes
I had the issue which kept recurring - traced it to an extension that I use for exporting to excel - was creating the temp file in MyISAM - removed the extension and the issue went away.

---
Tags: mysql, mysql-archive-format, db-logging
---


# Question
Title: Groups and sub-groups display broken after upgrade to 4.7.10
Hi After upgrading civicrm to v4.7.10 from 4.7.8, it looks like the display of groups and sub-groups has changed and is not partially broken.

The first group and has sub-groups is displayed showing that there are sub-groups. The second group that has sub-groups and sub-sub-groups shows as a regular group but not that it has sub-groups.

This prevents from accessing the sub-sub-groups. They can only be in searching for them in the Find so it appears to be a display issue only.

# Answer
I believe you're referring to CRM-19096 and/or CRM-19219, and possibly CRM-19272.

The first two are fixed with CiviCRM 4.7.11, which is officially released on September 7th, 2016. The third one has a fix available but hasn't been scheduled into a release.

If you can't wait, and you know how to patch your CiviCRM, you can get the fixes from Github; if you don't know how, wait for CiviCRM 4.7.11, it's only a week away!
> 1 votes

# Answer
Just as an FYI, we downloaded version 4.7.11 (security upgrade). We tested it and the group and sub-group display error from 4.7.10 is now solved.

Thanks.
> 0 votes

---
Tags: groups, 4.7.10, display
---


# Question
Title: unable to upgrade from 4.4.5 to 4.7.11 - 'DB Error: no such field' (Wordpress)
Trying to upgrade from CiviCRM 4.4.5 to 4.7.11 in Wordpress 4.5/4.4 (problem doesn't change for either WP version) because it stopped working and just printed this when trying to view `/wp-admin/admin.php?page=CiviCRM`

```
Sorry but we are not able to provide this at the moment.
DB Error: unknown error

```

I downloaded v4.7.11, removed the old civicrm code and unpacked the new one, then addressed the settings file (I ended up generating a new settings file via /wp-admin/options-general.php?page=civicrm-install, dropping the database tables that where created, then putting in the DB credentials for the existing CiviCRM database).

Now I ran the database update script - `/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1` \- and it looked good, I clicked the button, the progress bar started moving... then this:

```
[Error: Upgrade DB to 4.5.beta9: SQL]
Error Field Error Value
Type    DB_Error
Code    -19
Message DB Error: no such field
Mode    16
UserInfo    UPDATE `civicrm_dashboard` SET `permission` = 'access my cases and activities,access all cases and activities', `permission_operator` = 'OR' WHERE `name` = 'casedashboard' [nativecode=1054 ** Unknown column 'name' in 'where clause']
DebugInfo   UPDATE `civicrm_dashboard` SET `permission` = 'access my cases and activities,access all cases and activities', `permission_operator` = 'OR' WHERE `name` = 'casedashboard' [nativecode=1054 ** Unknown column 'name' in 'where clause']
PEAR_Exception: DB Error: no such field in unknown on line unknown
- DB_Error: DB Error: no such field in unknown on line unknown
Exception trace
    Function    Location
0   CRM_Core_Error::exceptionHandler(Object(DB_Error))  unknown:unknown
1   call_user_func(Array, Object(DB_Error)) /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:931
2   PEAR_Error->PEAR_Error('DB Error: no suc…', -19, 16, Array, 'UPDATE `civicrm_…')    /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/packages/DB.php:976
3   DB_Error->DB_Error(-19, 16, Array, 'UPDATE `civicrm_…') /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:564
4   PEAR->raiseError(null, -19, null, null, 'UPDATE `civicrm_…', 'DB_Error', true)  /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1905
5   DB_common->raiseError(-19, null, null, null, '1054 ** Unknown …')   /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:895
6   DB_mysql->mysqlRaiseError() /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:328
7   DB_mysql->simpleQuery('UPDATE `civicrm_…')  /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1216
8   DB_common->query('UPDATE `civicrm_…')   /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/File.php:333
9   CRM_Utils_File::sourceSQLFile('mysql://kansas:4…', '-- CRM-15211 UPD…', null, true) /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:196
10  CRM_Upgrade_Form->source('-- CRM-15211 UPD…', true) /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:387
11  CRM_Upgrade_Form->processLocales('/home/kansas/www…', '4.5.beta9')  /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:421
12  CRM_Upgrade_Form->processSQL('4.5.beta9')   /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/Base.php:80
13  CRM_Upgrade_Incremental_Base::runSql(Object(CRM_Queue_TaskContext), '4.5.beta9')    unknown:unknown
14  call_user_func_array(Array, Array)  /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php:88
15  CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))  /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php:214
16  CRM_Queue_Runner->runNext(true) /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
17  CRM_Queue_Page_AJAX::{closure}()    /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
18  CRM_Queue_ErrorPolicy->call(Object(Closure))    /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
19  CRM_Queue_Page_AJAX::runNext()  unknown:unknown
20  call_user_func(Array)   /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:278
21  CRM_Core_Invoke::runItem(Array) /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:86
22  CRM_Core_Invoke::_invoke(Array) /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:54
23  CRM_Core_Invoke::invoke(Array)  /home/kansas/www/dev/krc_wordpress/wp-content/plugins/civicrm/civicrm.php:1227
24  CiviCRM_For_WordPress->invoke('')   unknown:unknown
25  call_user_func_array(Array, Array)  /home/kansas/www/dev/krc_wordpress/wp-includes/plugin.php:524
26  do_action('toplevel_page_Ci…')  /home/kansas/www/dev/krc_wordpress/wp-admin/admin.php:222
27  {main}

```

Seems to me that the update script is trying to modify a table and needs the 'name' column, but there is no 'name' column..

***Any help would be GREATLY GREATLY APPRECIATED!!!!***

# Answer
I don't know about this particular issue, but this sort of thing happens occasionally, especially when a version (like 4.4) has a long run of minor releases and you're jumping a few versions ahead. Since 4.4 was a LTS, a number of changes got backported to later 4.4.x releases, and it's hard to test the full variety of upgrade combinations.

My general suggestion would be to download CiviCRM 4.4.20, upgrade to that, and then upgrade to 4.7.11. If need be, try another stop at 4.6.20 along the way.

By breaking up the jump, you're following a couple of more heavily-trod paths (with more testing and real-world experience) rather than a possibly unique jump from your particular version.
> 2 votes

# Answer
SOLVED!!

I had to add a column in the table that was giving me a hard time.

```
ALTER TABLE `civicrm_dashboard` ADD `name` VARCHAR(255) NOT NULL AFTER `domain_id`;

```

Here's trying to update from 4.4.21 to 4.6.21:

And here's after *changing* the column 'label' to 'name'

And here's after *adding* the 'name' column:

Yay!!
> 1 votes

---
Tags: wordpress, upgrade, database
---


# Question
Title: Can you share an example of a complex .CSV file for import?
I'm looking for structure information on complex .CSV files that have custom fields, relationships, groups. I'd like to get a better sense of best practices for organizing data ahead of time. If you can share a sample file that would be great. You can delete the names but the titles for the .CSV would be informative.

# Answer
> 0 votes
*Probably below the level of your question, but maybe it'll point you in a good direction?*

**A sample CSV can be exported from existing CiviCRM data.**

This can be done from the CiviCRM demo sites, or if there's a need to frame up columns with custom data, via a CRM with existing data. Export the resulting contacts via **CiviCRM Search** =\> **Export Contacts** action.

The advantage of this approach is that the exported column names automatically map back to what CiviCRM expects\[1\]. It should apply to both simple and more complex import formats.

CSV sample exported from http://dmaster.demo.civicrm.org/ today -

```
"Contact ID","Contact Type","Contact Subtype","Do Not Email","Do Not Phone","Do Not Mail","Do Not Sms","Do Not Trade","No Bulk Emails (User Opt Out)","Legal Identifier","External Identifier","Sort Name","Display Name","Nickname","Legal Name","Image Url","Preferred Communication Method","Preferred Language","Preferred Mail Format","Contact Hash","Contact Source","First Name","Middle Name","Last Name","Individual Prefix","Individual Suffix","Formal Title","Communication Style","Job Title","Gender","Birth Date","Deceased","Deceased Date","Household Name","Organization Name","Sic Code","Unique ID (OpenID)","Current Employer ID","Contact is in Trash","Created Date","Modified Date","Addressee","Email Greeting","Postal Greeting","Current Employer","Location Type","Street Address","Street Number","Street Number Suffix","Street Name","Street Unit","Supplemental Address 1","Supplemental Address 2","City","Postal Code Suffix","Postal Code","Latitude","Longitude","Address Name","Master Address Belongs To","County","State","Country","Phone","Phone Extension","Email","On Hold","Use for Bulk Mail","Signature Text","Signature Html","IM Provider","IM Screen Name","OpenID","World Region","Website","Group(s)","Tag(s)","Note(s)","Phone Type","IM Service Provider"
"2","Individual",,,,,,,,,,"Samuels, Jed","Mr. Jed Samuels",,,,"SMS",,"Both","3988235934","Sample Data","Jed",,"Samuels","Mr.",,,,,,,,,,,,,"52",,"2016-08-13 11:07:38","2016-08-13 11:07:42","Mr. Jed Samuels","Dear Jed","Dear Jed","Urban Empowerment Fund","Work","190Y Cadell Ave SE","190","Y","Cadell",,"Attn: Development",,"Bowmanstown",,"18030","40.80116","-75.66158",,"Urban Empowerment Fund","Alameda","PA","United States","265-5630",,"jeds@notmail.co.pl",,,,,,,,"America South, Central, North and Caribbean",,"Newsletter Subscribers",,,"Phone",
"3","Individual",,,,,,,,,,"smith.o.carylon98@spamalot.co.uk","smith.o.carylon98@spamalot.co.uk",,,,"SMS",,"Both","990362788","Sample Data",,,,,,,,,,,,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:39","smith.o.carylon98@spamalot.co.uk","Dear smith.o.carylon98@spamalot.co.uk","Dear smith.o.carylon98@spamalot.co.uk",,,,,,,,,,,,,,,,,,,,,,"smith.o.carylon98@spamalot.co.uk",,,,,,,,,,"Newsletter Subscribers",,,,
"4","Individual",,,"1",,,,,,,"Grant, Lawerence","Mr. Lawerence Grant II",,,,,,"Both","2064444768","Sample Data","Lawerence",,"Grant","Mr.","II",,,,"Male",,,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:43","Mr. Lawerence Grant II","Dear Lawerence","Dear Lawerence",,"Home","176T Dowlen Blvd S","176","T","Dowlen",,,,"Boston",,"02266","42.338947","-70.919635",,,"Alameda","MA","United States",,,,,,,,,,,"America South, Central, North and Caribbean",,,"Volunteer",,,
"5","Individual",,,,,,,,,,"Terrell, Russell","Russell Terrell Jr.",,,,"Postal Mail",,"Both","127505299","Sample Data","Russell",,"Terrell",,"Jr.",,,,"Male","1996-05-04",,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:42","Russell Terrell Jr.","Dear Russell","Dear Russell",,"Home","235X States Path NE","235","X","States",,,,"Valrico",,"33595","27.871964","-82.438841",,"Terrell family","Alameda","FL","United States",,,,,,,,,,,"America South, Central, North and Caribbean",,,"Volunteer",,,
"6","Individual",,,"1",,,,,,,"Adams, Scarlet","Scarlet Adams",,,,"Phone",,"Both","2620107037","Sample Data","Scarlet","W","Adams",,,,,,"Female","1957-11-05",,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:40","Scarlet Adams","Dear Scarlet","Dear Scarlet",,,,,,,,,,,,,,,,,,,,"(449) 428-2300",,"adamss68@lol.biz",,,,,,,,,,"Newsletter Subscribers","Major Donor,Volunteer",,"Phone",

```

\[1\] You do have to deselect some of the Addressee fields to get the exported CSV to import straight back in: CRM-19360: Exported CSV does not import back in without adjusting import columns.

---
Tags: custom-fields, import, best-practice
---


# Question
Title: Civi 4.7.11 Update on Joomla 3.62 with receipts
In addition to some CkEditor issues - I am having issues when trying to print receipts - Thoughts ? @import url(/administrator/components/com\_civicrm/civicrm/css/civicrm.css); @import url(/administrator/components/com\_civicrm/civicrm/bower\_components/font-awesome/css/font-awesome.min.css); Sorry but we are not able to provide this at the moment. is not of type String

# Answer
-- I wanted to thank Brian S for tracking this down and hopefully he will post the fix to the core team.

It was a bug in core as a result of a recent change. The code was looking for the payment processor ID associated with the contribution. But if you have an offline contrib, there is no transaction ID or processor, and the query to do the lookup was triggering a fatal error if the value was null.
> 0 votes

# Answer
here's the issue and PR patch: https://issues.civicrm.org/jira/browse/CRM-19354
> 0 votes

---
Tags: joomla, 4.7, upgrade
---


title: CKEditor Issue with 4.7.11 install

text:
# Question
Title: CKEditor Issue with 4.7.11 install
Run a couple sites using Joomla 3.6.2 and Civi 4.7.10 - Did the upgrade tonight - all went well. One site is having problems with CKEditor and the link tool. Edit link or adding a new link just simply doesn't work. - it shows all options (Link,Anchor and Mailto) It is fine in my other site. I can work around it by using the TinyMCE extension and changing editors. Image is a picture of trying to edit an existing link - which shows up blank. Choosing OK just copies any text you have in the link info box - does not make the link ..

Thoughts Thanks

# Answer
This resolved itself - could be a clear cache issue - not sure - but it is now closed
> 1 votes

---
Tags: joomla, ckeditor, upgrade
---


title: Event Waitlist - Paid

text:
# Question
Title: Event Waitlist - Paid
Is possible to set a limit of say 20 participants for an event, have waitlist enabled and when people register for waitlist, they still have to pay like a normal registration?

I couldn't see that and hope I haven't missed it.

# Answer
I don't think it is without custom code :-(

The idea of the waitlist is they only pay if they have a place.
> 3 votes

# Answer
For your case I think you could instead use the pending approval functionality. That way a real-time payment is made but you can make the registration final.
> 1 votes

---
Tags: waitlist
---


title: Adding fields to contribution searches

text:
# Question
Title: Adding fields to contribution searches
I know that it is possible to create profiles for Contacts that show up as options under "Search Views" in the Advanced Search screen:

I was hoping to add "Campaign" to the search results screen when searching for donations, but when I try to create a custom profile for this and begin to add a Contribution field, it says "Error: Contribution can not be used as a Result Column for profile searches."

Is there another way to adjust which columns show up for Contribution searches?

# Answer
I would say you can create a group first using Advance search and in the contribution report try to list all the contact based on the group

This will provide you all the contribution column and also contact related columns

I guess this helps !!!
> 1 votes

---
Tags: contributions, search-results, civicampaign
---


title: Wordpress 4.7.x Installer issue

text:
# Question
Title: Wordpress 4.7.x Installer issue
After activating the CiviCRM plugin within Wordpress and opening the 'CiviCRM Installer' I am unable to alter the CiviCRM Database settings fields to point to my CiviCRM database.

The fields are pre-populated with my Wordpress database details and whenever I alter them and press 'Re-check requirememnts' my details are removed and the Wordpress database details re-appear.

* Windows Server 2012 R2
* IIS 8
* php 5.4.45
* MySQL 5.1.73
* Wordpress 4.4.1

The installer for 4.6.x works fine, after upgrading to 4.7.x, the upgrade is successful but I receive Datatables warnings on fields with Tab with table Display styles (such as Relationships) and wanted to try a fresh install.

Has anyone experienced this behaviour before, or able to help me resolve this?

Many thanks
Russell

# Answer
> 2 votes
I have seen this behaviour too. Just make sure your database details are correctly entered, then use the "Check Requirements and Install CiviCRM" button above the details instead.

# Answer
> 1 votes
There is an issue in the installer for 4.7. I created https://issues.civicrm.org/jira/browse/CRM-19279 to track the issue. With Christian's help I created a PR - https://github.com/civicrm/civicrm-core/pull/9029 I have tested this locally and on one of our test sites and it works.

I'd appreciate any testing that can be done with this to make it a merge candidate.

---
Tags: wordpress, installation
---


# Question
Title: CiviCRM Installer Errors - Can't change DB settings
I can't get past the install page (/wp-admin/admin.php?page=civicrm-install). The installer prepopulates to my WordPress DB settings and won't take the CiviCRM DB settings I put in. I input the MySQL server, username, password and DB settings and hit the Re-check Requirements button and it fails. Below it shows the Database details, not with the data I input in the fields above but rather with the original WordPress DB server and database.

Is there any way to change the "default" values that the page is coming up with or install without using the installer? I didn't find any tricks around this problem. This is a WordPress Multisite network installed on AWS (Ubuntu 14.04/WP 4.6.1/CiviCRM 4.7.11).

# Answer
> 1 votes
There is an issue in the installer for 4.7. I created https://issues.civicrm.org/jira/browse/CRM-19279 to track the issue. With Christian's help I created a PR - https://github.com/civicrm/civicrm-core/pull/9029 I have tested this locally and on one of our test sites and it works.

I'd appreciate any testing that can be done with this to make it a merge candidate.

---
Tags: installation, mysql, settings
---


# Question
Title: How can I search by relationship in Contact.get?
Is there a way to search by relationship in the Contact.get API call?

Eg: give me all the contacts that are individuals, in group 9 and have a relationship type 8 (optionally specifying direction and/or the other contact) ?

I'm modifying existing code that builds a variety of filters into a Contact.get call and I want to add relationships to that.

The new join feature in 4.7 looks hopeful except that it is not advertised for Contacts in the API explorer.

# Answer
This is going to require a second api call, first to retrieve a list of relationships for the 2nd contact, use a php loop to turn the list of relations into an array, and then you can add that to the original api call like

`'id' => array('IN', $related_contact_ids)`

PS. I'm not sure if the contact api3 supports this syntax.
> 1 votes

---
Tags: api, relationships
---


# Question
Title: How do I get search actions to appear for multi-site users of one site
How can I get the usual search actions to show up for a user? Search actions they can already do by editing a single contact, are missing from the list of actions shown after a search. The missing actions are "Group - add contacts", "Tag - add to contacts", "Tag - remove from contacts", among many others.

When a user for a sub-domain does a search in CiviCRM, there are only 4 search actions available: Email- send now, Email - CiviMail, Export, and Mailing Labels.

In my environment, I am using the extension org.civicrm.multisite version 2.5 on CiviCRM version 4.7.9. I am using the multi-site extension to manage permissions for various sites. (Its a hierarchical organization with a head office and various chapters, so multi-site is a good fit)

When a user for one of the chapter sites (http://chapterA.largeorganization.org) logs in, they can only view and edit contacts within their site (ie their chapter). BUT, most of the search actions are missing as described above.

The user's role has the following Drupal permissions for the subsite:

* CiviCRM Multisite: view all contacts in domain
* CiviCRM Multisite: edit all contacts in domain
* CiviCRM Multisite: list all groups in domain

# Answer
You still need to grant the other normal civicrm permissions to the subsite user as you would to the primary user. The only difference would be don't enable view all contacts or edit all contacts.
> 1 votes

# Answer
I found the issue. The subsite did not have any groups that belonged to that subsite's domain. As soon as I added a single group in the subsite, the search actions appeared. (I did not have to change any Drupal permissions or ACL permissions)
> 1 votes

---
Tags: acl, multisite
---


# Question
Title: Are there up-to-date CiviCRM coding standards available?
I am using NetBeans 8.1 under Windows to develop/debug some CiviCRM code. Previous attempts at getting the contribution accepted ran into trouble as they failed to comply with the coding standards. I've installed PHP Code Sniffer and the Drupal standard from Coder - see https://www.drupal.org/node/1420008, but even when applied to 'vanilla' CiviCRM code throws a number of standards violations, particularly around the way comments are entered. Has anyone got any comments/thoughts?

# Answer
> 6 votes
Using the Drupal standards in your IDE ought to get you most of the way. For fine-tuning you can see https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation and also try out the `civilint` cli tool which is shipped with buildkit.

# Answer
> 5 votes
For IDE purposes, look at https://github.com/civicrm/coder/

This is a fork of drupal/coder which relaxes a number of conditions. (The coding practices in Civi differed from Drupal in some non-cosmetic ways -- changing them would break functional backward-compatibility.)

This is the same rule-set used by `civilint`, which is the script that runs the `civicrm.org` test bot (Github/Jenkins).

---
Tags: developer, php
---


title: Smart Groups - Contacts by Adder

text:
# Question
Title: Smart Groups - Contacts by Adder
My basic need is to allow a CiviCRM user to view and edit only the Contacts they have added.

It seems that to support that requirement, I need a Smart Group of Contacts, filtered by Adder.

I see that I should be able to filter Contacts using the Changelog "Added By" field. However, I am not retrieving the Contacts when searching "Added By" using email address, username, first/last name or even id. "Modified by" doesn't seems to work either. Changelog date filters do work.

The administrative user I am using for the search does have all rights to all Contacts.

It seems like first/last name is the intended input for the "Added by" Changelog search. Can someone confirm?

What else might I be missing?

I did notice that the first/last name search seems to lower-case my input. I spotted this in the Search Filter output confirmation in the results display. (So, "Test Marketer" changes to "test marketer"). Could this be why there are no matches are returning? I suspect not, but that's all I can spot so far.

Cheers!

Kathy

# Answer
This is what I have discovered through further trial and error.

1. To search on Changelog by Added or Modified, use first name, last name, or last, first. Using both names separated by a space will not work.
2. The Changelog search actually makes no distinction between Added and Modified. Even if you select the Added radio button to restrict your search to Contacts Added by a particular user, it will still also return Changelog matches on Modified (which does include Added). In other words, whether you select neither radio button, or one or the other, you get the same search results, in which Added OR Modified contains the name you entered.
3. The case of the search name makes no difference in results returned.

The answers to my question, then, are that a Changelog search term may be in the formats of \[first name\], \[last name\], or \[last, first\] and that Changelogs are only filtered by Added OR Modified, despite the UI indication.

Also note the very helpful discussions here about using Webforms with Drupal do create many more options for filtering by contact Add and Modify history.

Kathy
> 2 votes

# Answer
You have to search by the sort name. The default format for this is "last\_name, first\_name" for individuals.

There does indeed seem to be no support for added\_by. You may report that as a bug in JIRA.

I'm not aware that there is an option to have a case sensitive search.
> 1 votes

# Answer
There may be other ways to approach your problem but if you have sorted this via this route then great.

Other options would depend on your CMS

E.g. if using Drupal I would suggest using Webforms and the webform\_civicrm module that allows you to easily and simply construct forms for adding/updating civi contacts especially when Relationships are involved.

For logged in users, a View can then be provided that gives them the necessary links to arrive at the page with pre-filled details for multiple contacts (eg cid1 and cid2 etc)

Using the Permissioned Relationships extension takes this further and ensures that users who can access CiviCRM only see contacts that they have a relationship with. The relationships can be daisy-chained so the access can be granted to 2nd, 3rd or nth hand relationships.
> 0 votes

---
Tags: contacts, smartgroups, acl
---


# Question
Title: What's the best way to import memberships and their associated contributions?
I have a load of Memberships to import. Each has a linked Contribution.

While I can import Memberships and Contributions separately, I cannot find a way to import the two together - in other words there does not seem to be an import routine in any version of CiviCRM which can create an entry in the member\_payment table.

In the past I have done this through SQL, which is a bit fragile as a solution. I have been thinking of an API-based approach. But it seems strange if this has not come up before. I haven't even seen any code for this. Is there something out there which I am missing?

# Answer
This is doable using the API, and I've accomplished it using Pentaho Kettle. It has a CiviCRM Input and CiviCRM Output step, which use the REST API. You're right to be concerned about the SQL-based approach, since there's been discussion of deprecating that table in favor of a line item-based approach to connecting contributions and memberships.

If you use Kettle, you can see my example code here: https://github.com/PalanteJon/aceware\_civicrm\_kettle/

If you decide to go with the CSV CLI tool, you'll run into trouble, because your output won't contain the ID of the created memberships and payments to create the MembershipPayment record. So you can either a) use API chaining, or b) do what I did in Kettle, parse the JSON that the API outputs and use that to create your MembershipPayment record.
> 8 votes

# Answer
I've not used them but have happened on this previously, I believe it's a GUI for the API which allows importing into any entity. Would likely still be a two stage process though, as you'd need the IDs from the first pass

https://civicrm.org/blogs/stoob/csv-api-import

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

# Answer
We commissioned a developer to implement a fairly complex migration extension for a project a while back. The whole thing is very much coupled to our system however you might be able to glean something from their repo.

They didn't handle payments in this migration, we actually added that after the fact. In our case, we were only concerned with importing payments for event registrations which wound up being a little more complex than just creating a `participant`, `contribution`, and `participant_payment` record. Of course, we were also trying to achieve partial payments in the same process.
> 2 votes

# Answer
Carlos Capote for Amnesty International Spain has been doing work to facilitate imports and exports using Pentaho Kettle. See https://civicrm.org/blogs/capo/new-tool-civicrm-data-integration for background and various improvements being done in Fall 2014 (http://wiki.civicrm.org/confluence/display/CRM/Civi+Data+Integration+v1.2).

Code is available at https://github.com/amnesty/civicrm-data-integration
> 2 votes

# Answer
If you use Eileen's https://github.com/eileenmcnaughton/civimigrate then it's not too hard - an import that references the membership import and contribution import and inserts membership payments would be relatively straightforward. This solution requires Drupal, though only during the migration process, you could still use this for a civicrm install for WordPress or Joomla by detaching it and moving it after it's been populated.
> 1 votes

# Answer
If found this on the old forum

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

Where there is some PHP code.

I haven't tried it yet, I was wondering if this approach is still valid. If I use it and get it to work I will revert back here.
> 1 votes

---
Tags: civimember, api, contributions, import, sql
---


# Question
Title: Troubleshooting relationship ACL Permissions
This is the same issue listed here but my understanding of the issue has changed enough that it really isn't the same question anymore. (If any mods disagree I'm happy to take guidance on this point.) I am using the CiviCRM Webform Integration module in Drupal 7 to have users register both themselves and their children for events. Currently, they are not able to see their children even though their relationships are permissioned in CiviCRM. I believe the issue is that my ACL permissioned relationships are broken.

I'm using CivCRM 4.6.18, Related Permissions 1.1, Drupal 7.43, Webform 7.x-4.12, and Webform Civicrm Integration 7.x-4.15+27-dev

Any clues appreciated, even if you don't' have a complete answer!

# Answer
> 1 votes
Did you follow the recipe at: https://civicrm.org/blog/sarahgladstone/recipe-for-handling-youth-registration-with-civicrm

Make sure you have both extensions:

Entity Settings Helper Extension (nz.co.fuzion.entitysetting) version 1.2

Related Permissions Extension (nz.co.fuzion.relatedpermissions) version 1.2

---
Tags: webform-civicrm, permissions, relationships, acl
---


# Question
Title: Does anyone know why I have two "Summary" tabs on each contact when I use a custom template?
I use a custom template for the "Summary" tab. In recent versions of CiviCRM, this has created two identical "Summary" tabs at the top of each contact. Both of these tabs work correctly and bring up identical fields from the custom template - see image.

Has anyone else had this happen with a custom template? It looks like a bug to raise.

I am using Drupal with CiviCRM 4.7.10

# Answer
> 2 votes
I've now checked for any changes to the template since v4.7.0 and there are changes. I've now incorporated these into my custom template and this has fixed the problem. Please ignore the question!

---
Tags: contacts, core
---


# Question
Title: What does "Result Column? 'In Sector' Cannot be checked with participant" mean?
Im trying to create a profile form that connects to a speaker - participant profile for event hosts to review speakers. I created a custom field set and now and trying to put the questions into the profile form.

I want the results to be displayed only to people with permission as well as the form. When I edit the form and indicate that it is visible ONLY to "User and Admin" then it gives me the error attached.

How do I deal with this?

# Answer
There are two fields `Searchable?` and `Results Column?` that make sense only for Public Pages and contact profile.

The field `Searchable ?` should be automatically unchecked when setting the visibility to "User and User Admin Only". When testing in http://dmaster.demo.civicrm.org in doesn't seems to be possible to even check them in a participant profile context.

Anyway, you might be able to submit the form by doing :

* change visibility to `Public Pages`
* uncheck `Searchable?` and `Results Column?`
* change visibility back to `User and User Admin Only`

If that doesn't work, i suggest you udpate your CiviCRM to latest version.
> 3 votes

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


title: Remove & reinstall summary fields

text:
# Question
Title: Remove & reinstall summary fields
We're running Joomla 3.6.2 and CiviCRM 4.7.11, however we recently made some adjustments that prompted us to uninstall the Summary Fields extension. Essentially, it was installed in a different directory than the default settings. We reset the paths and that cause problems. So, we uninstalled and reinstalled, so extensions are now in the default directory. The problem is that when we configure summary fields and set it to update "when the form" is submitted, we receive the error "Error adding custom field 'contribution\_amount\_last': DB Error: already exists" (same error for other fields as well, like "last donated", etc.). Is there a way to do a complete uninstall of this, or is there a better way to handle this error?

# Answer
We ended up disabling the extension via phpmyadmin, which enabled the "uninstall" link in the UI. Un-installation went fine, and we did a fresh install and now everything appears to be working fine.
> 1 votes

---
Tags: summaryfields
---


title: Custom Report By Relationship

text:
# Question
Title: Custom Report By Relationship
Can you point me to resources that can cover this requirements, I'm sure it would be needed often, and whilst I can dive into working it out from first principals, as a newbie, it would be nice to get thr benefit of some starting points.

Scenario is multiple households are 'managed' by an individual rep.

I would like to produce a reported, grouped / broken by rep of all their households.

Effectively a 'responsibility list' they can use to 'tick off' their annual visit to households.

So I have set up reps as type of 'individual'

and set up an A-B relationship between rep and household.

The standard 'contact relationship' goes part way there, but for instance doesn't have address.

I can see a 'developer tab' so I am assuming I can tweak the SQL - but before I start hacking around I though I'd ask the best way to approach this.

Thanks

p.s.

I found this https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference the implication to me is to write a custom php report? Is that the right approach?

Seems pretty heavy weight to get the desired results - but blogs lik ethis seem to indicate it is the way to go

https://alastaira.wordpress.com/2011/03/17/civicrm-creating-a-custom-report/

# Answer
This *could* be a place where it's just easier for the users to use an advanced search to bring up a list of households related to their own contact record. It's definitely possible that this puts too much onus on the user for your use-case, but it really only adds a couple of clicks over pulling up a report:

`Advanced Search>Relationships tab
Relationship Type = *your relationship from org to individual*
Target Contact = *the reps name*`

This would bring up the list of households the rep has a relationship for them. There are many ways to proceed in how they may 'tick off' these households for the year depending on the org process.

If that's too much for this set of users than your "p.s." is probably on the right track and writing a custom report is the way to go here. I would not create an entire extension for this.

If you're just adding results columns, it's usually pretty painless - the documentation is just kind of all over the place. The new .tpl file is a one-liner explained in Alastair's blog post. You can copy the base report (contact relationships in this case) .php file that is closest to what you want and then copy/paste the address block columns from a different report base that has them included.

I would like to add two resources to your links above that I found helpful to put it all together when learning custom report writing for myself:

https://artfulrobot.uk/civicrm-custom-birthdays-report

https://sf2012.civicrm.org/sites/default/files/slides/CiviCRM%20Reports-Customize%20and%20Extend.pdf
> 1 votes

# Answer
Are you on Drupal? If so, you could do that with Views.
> 0 votes

# Answer
Since you're on WordPress, Views won't help.

You could check the published extensions and see if any of those do what you need: go to https://civicrm.org/extensions and search for 'report'. Two that might be of interest are: https://civicrm.org/extensions/extended-reports and https://civicrm.org/extensions/relationship-overview-report

If none of those fit and you want to develop your own, create an extension (https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Generateaskeletalextension) and add a report (https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addareport) Note that you can copy an existing report to modify.
> 0 votes

---
Tags: relationships, reports
---


# Question
Title: What's the optimal way to install and track CiviCRM with Drupal and git?
First, I know compatibility with Drupal 8 is not full yet. There are still open bugs, a bunch of open PRs and an apparent lack of code review.

But let's ignore that for a moment and consider civi d8-ready. I want to do a test install for a migration from Joomla, but also maintain some level of tracking, so it's easier to work with custom changes and any (*knock on wood*) malicious ones are easier to detect and revert. Looking at various docs, I've found at least these options:

* classical install: drupal, civi
* drush: nicely handles downloads, upgrades and backups (no idea if it has VCS support by itself)
* composer: seems to be unofficially preferred for drupal8; not that much info available; more dependency heavy
* civi-buildkit: seems like a complete overkill, as I don't need a full development environment

All of them can be preceded by initing a blank git repo and manually tracking from there. The buildkit is already fully based on git. **Can any of** the others track upstream automatically, to avoid the need for manual commits-on-update and working with tarballs? Did I forget an even better option, some combination?

# Answer
Drush can support VCS deployments and you can tell drush make to keep the .git directory with "drush make --working-copy your-platform.make". However, unless it's changed recently, drush doesn't have post-install hooks, so it won't handle composer/bower/npm well.

Composer has support for "post-install-cmd", but civicrm itself is not on packagist. I'm not familiar enough with composer to comment further, but from experiences so far, I find Composer more interesting than Drush on many many aspects (not CMS-specific, huge community, great tool).

Personally, and this is not an ideal solution: I build platforms (drupal+contrib+civicrm+extensions) using the tar.gz of each project. Extensions/themes that are actively developed get added as git submodules. All my servers use the same git repo (except for site-specific extensions/themes/modules which are in their own repos) and when I do upgrades, I run a git pull everywhere.

The main down side to this is that I cannot cherry-pick patches from upstream, which was the main issue of your question. I usually apply patches manually.

The main issue I had with running upstream git in production, is that this means I have to run composer/bower/npm/gencode on all production servers whenever there is a new version. That has a too high risk of failing (I manage ~ 20 servers, some with a mix of 4.7-D6, 4.7-D7, 4.6-D7, 4.7-WP).
> 2 votes

---
Tags: drupal, civicrm-buildkit, drush, drupal-8, deployment
---


# Question
Title: How to use civivolunteer description text
On the civivolunteer role options page you can edit the roles and fill out a description field. That is great but how do I use the description field on event pages where civivolunteer is enabled? I just get a drop down box listing the label. And obviously we can add description text to the event page, but that seems wrong. Where is the role description displayed?

# Answer
The role description is currently used in two primary places.

On your volunteer opportunities page, you'll notice a small quote bubble next to each role that has a description defined. Clicking the bubble will bring up a popup listing the description.

The other place the description is used is in the confirmation email sent to the volunteer after signup.
> 1 votes

---
Tags: civivolunteer
---


# Question
Title: Select list showing limited contacts, using “CiviCRM Contact” reference in drupal
I'm having problem while storing values in select list field, for this field i'm using "CiviCRM Contact" reference. I have more than 30,000 contacts, but why in select list showing limited contacts? its showing maximum 10 contacts.

( Note : I have set "Number of values" : "Unlimited" for select list )

# Answer
> 2 votes
I see there is a limit set while building the options on the select list. It seems this has been only handled for `autocomplete` widget as `$limit` doesn't gets modified anywhere in the function or is nowhere passed to `_civicrm_contact_ref_potential_references_standard()` function.

So, it is set to a default value of 10 every time the list is loaded irrespective of the widget used.

---
Tags: drupal, contact-reference
---


# Question
Title: How can I find out how many individuals are inputted onto our civi system
I need to know how many families and individuals we work with each year. How can civi tell me these figures?

# Answer
> 2 votes
Simplest way :

* menu Search -\> Find Contacts
* is `- any contact type -` -\> replace by the contact type you want to count (Household or Individual)
* click `Search` button

In the result, you will see the total count (here 1238 individual contacts) :

You can use another search to have more criteria and get the total count for each. The search result will always show you the total count.

---
Tags: civireport
---


# Question
Title: What is the best practice to change Email Address
I use Webform Integration to access/update contacts informations.

Is it a good practice to use a Webform to modify a contact email address ?

What matching rule should I use ? What if an other Contact already has the new mail address ?

Will the modification be updated for the pertaining Drupal User ? What if there is no pertaining Drupal User ?

# Answer
> 4 votes
Here is what we usually do :

* either let people change their information by logging in the system, either after sending an email with a checksum link to let them update their own information. You can use a webform but in that case, you don't have to worry about the matching rule (i.e. you match with the user logged in or the checksum)
* for anonymous form, i prefer to use Email + First Name as a matching rule as it is quite unlikely in most case that people with the same email will have the same first name.
* the synchronisation between Drupal user email and CiviCRM contact email is not automatic and you will have to set some process to synchronize the 2. You might want to bloc edition of Drupal email and add a Drupal Rule to push master CiviCRM email into drupal account. I usually have my own custom code for such a thing.

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


title: Quick search not working

text:
# Question
Title: Quick search not working
At some point within the past few upgrades (currently on 4.7.11) our quick search stopped working (i.e. you type a name, but the search doesn't yield results as you type) and we've no idea why. How would we even start to troubleshoot and/or resolve this issue?

# Answer
> 2 votes
Thanks Joe for the comment. In the search settings, all of the checkboxes for "Autocomplete Contact Search" were checked. We disabled all but "Contact" (which is set by default) and "Email" and now it's working.

---
Tags: quicksearch
---