# Question
Title: Funky errors in 'drush cvup' / 'drush cvupdb'
I'm trying to upgrade from CiviCRM 4.7.4 to 4.7.9 for its security update. I'm doing this using 'drush' on my dev site. It seems to be hitting a couple different problems. Here's the first step:

```
% drush --version
 Drush Version   :  8.1.2

% drush -vv cvup --tarfile=~/Downloads/civicrm-4.7.9-drupal.tar.gz
Executing: mysql --defaults-extra-file=/private/var/tmp/drush_I5s0Cd --database=singersin_drupal --host=localhost --silent  < /private/var/tmp/drush_yqQTCt
Executing: mysql --defaults-extra-file=/private/var/tmp/drush_Sw9qa5 --database=singersin_drupal --host=localhost --silent  < /private/var/tmp/drush_X3IP5L

The upgrade process involves -
1. Backing up current CiviCRM code as => /Users/ken/Documents/SIA/server275-site/../backup/modules/20160712223432/civicrm
2. Backing up database as => /Users/ken/Documents/SIA/server275-site/../backup/modules/20160712223432/civicrm.sql
3. Unpacking tarfile to => /Users/ken/Documents/SIA/server275-site/sites/all/modules/
4. Executing civicrm/upgrade?reset=1 just as a browser would.

Do you really want to continue? (y/n): y
                                                                                [ok]
1. Code backed up.
Executing: mysql --defaults-extra-file=/private/var/tmp/drush_wbODsK --database=singersin_drupal --host=localhost --silent  < /private/var/tmp/drush_oyC1qd
Calling system(mysqldump --defaults-extra-file=/private/var/tmp/drush_UDJ4q2  singersin_drupal --host=localhost --no-autocommit --single-transaction --opt -Q  > /Users/ken/Documents/SIA/server275-site/../backup/modules/20160712223432/civicrm.sql);
Database dump saved to /Users/ken/Documents/SIA/server275-site/../backup/modules/20160712223432/civicrm.sql                                      [success]
2. Database backed up.                                                                                [ok]
Undefined variable: tarfile civicrm.drush.inc:368                                                                                [notice]
Executing: gzip -d
Executing: tar -xf /Users/ken/Downloads/civicrm-4.7.9-drupal.tar.gz -C "/Users/ken/Documents/SIA/server275-site/sites/all/modules/"
3. Tarfile unpacked.                                                                                [ok]
4.                                                                                [notice]
You are already upgraded to CiviCRM 4.7.4
                                                                                [completed]
Process completed.
Command dispatch complete                                                                                [notice]

```

First, notice the "Undefined variable: tarfile" in the output. I think that's because of this code in `civicrm.drush.inc`:

```
function _civicrm_extract_tarfile($destinationPath, $option = 'tarfile') {
  $tarpath = drush_get_option($option, FALSE);
  if (drush_shell_exec("gzip -d " . $tarfile)) {
    $tarpath = substr($tarfile, 0, strlen($tarfile) - 3);
  }
  drush_shell_exec("tar -xf $tarpath -C \"$destinationPath\"");
}

```

There are 3 instances of `$tarfile` that should be `$tarpath`, right?

The next problem is that it can't recognize the version it's trying to upgrade to - it says "You are already upgraded to CiviCRM 4.7.4", when trying to upgrade to 4.7.9. I'm guessing that's because the code was originally loaded when 4.7.4 was installed, so it would need to re-load itself somehow to detect that it's out of date.

Okay, no problem, I figured I could just run `drush cvupdb` separately. However, this fails with a database error:

```
% drush cvupdb
PEAR_Exception: "DB Error: unknown error"
 * ERROR TYPE: DB_Error
 * ERROR CODE: -1
 * ERROR MESSAGE: DB Error: unknown error
 * ERROR MODE: 16
 * ERROR USERINFO: ALTER TABLE `civicrm_contact` CHANGE `image_URL` `image_URL` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT
  'optional URL for preferred image (photo, logo, etc.) to display for this contact.'
  [nativecode=1071 ** Specified key was too long; max key length is 767 bytes]
 * ERROR DEBUGINFO: ALTER TABLE `civicrm_contact` CHANGE `image_URL` `image_URL` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT
  'optional URL for preferred image (photo, logo, etc.) to display for this contact.'
  [nativecode=1071 ** Specified key was too long; max key length is 767 bytes]
 ...

```

My database is MySQL version 5.6.27, is that problematic? What's a next step?

Thanks.

# Answer
> 3 votes
I ran into a similar problem when manually updating. Depending on how your database is configured the update will fail when trying to change the image\_URL from `VARCHAR(256)` to `VARCHAR(512)`. I wasn't able to figure out how to get it to let me make the change (it would even fail when I tried to directly manipulate the table). I ended up commenting out this line of the SQL update and everything ran just fine.

If I were you I would just do a manual update of CiviCRM.

You can comment out the SQL line in this file: `sites/all/modules/civicrm/CRM/Upgrade/Incremental/sql/4.7.8.mysql.tpl`

Just be sure to backup your DB before doing this.

```
mysqldump -u user -p mycividb > mycividb-backup.sql

```

I hope this helps!

---
Tags: drupal, upgrade, error, mysql, drush
---


# Question
Title: How to upload multiple files to be downloaded by contacts in frontend
I'm running CiviCRM 4.7.7. on Joomla for a Sport Club in which athletes have access to his licences, anual documents, reglaments, etc. from frontend.

In configuration we have added some custom fields to profiles, for example, "Licenses", and inside "Anual Sport License" and "Anual Federative License". For each license we have enabled the option to administrators to upload a file from backend that after, athletes can download in frontend.

The problem is when we update that files in the next season, previous file is deleted automatically and only the more recent stills, but we need that athletes can download all the files historial in every moment.

Can someone help us?

Thank you very much.

# Answer
> 1 votes
see https://book.civicrm.org/user/current/organising-your-data/custom-fields/ under Multiple record fieldsets. you can set (only for contacts) multiple field records. aftewards you can set how the content should be displayed. i think you can do that with files too.

---
Tags: joomla, files
---


# Question
Title: What causes the SMS system to stop working and throw DB errors?
I'm getting an error message on scheduled SMS.

Finished execution of Send Scheduled SMS with result: Failure, Error message: DB Error: syntax error

I'm running 4.7.8 and I think it was stable in 4.7.6. My WP install is 4.5.3

# Answer
> 3 votes
This error does show up in Civi 4.7.8 on Drupal 7.x. @PeteRoss Thanks. Haven't had chance to upgrade to 4.7.9 yet.

Had to send scheduled event SMS to members, so modified sql in if statement in CRM/Mailing/BAO/MailingJob.php

525 if ($mailing-\>sms\_provider\_id) { .... .... 546 OR contact\_a.do\_not\_sms = 0 ) \- 547 $aclWhere}"; \+ 547 $aclWhere"; 548 }

The scheduled SMS job completed successfully after the modification.

# Answer
> 1 votes
It appears that Civi on WordPress was throwing an extra } into the query from the file Mailingjob.php line 547. I hope this helps someone else and is there some way we can check if this affects others?

---
Tags: civisms, scheduled-job
---


title: Unable to access clients in CiviCase

text:
# Question
Title: Unable to access clients in CiviCase
I am using Wordpress 4.4.2 and recently upgraded Civicrm to 4.7.3

When I try to "manage" a case, that is, access the record itself, I get this message:

Sorry but we are not able to provide this at the moment. Unable to load configuration file for the referenced case type: 'My Case Type' (learn more...).

# Answer
> 1 votes
That error is almost always related to name vs label mismatches. Check your xml files for the `<name>` tag and the entries in the database in civicrm\_option\_value in the "name" column, e.g.

`SELECT ov.name, ov.label FROM civicrm_option_value ov INNER JOIN civicrm_option_group og ON og.id = ov.option_group_id WHERE og.name='case_type'`

# Answer
> 0 votes
Leslie, I am not getting that error. However, CiviCase rights are not given to any user below WordPress administrators by default. Is this WordPress account an Editor or below? Check the Administer -\> Users and Permissions -\> Permissions -\> WordPress Access Control and find the CiviCase section, about three quarters down the page.

---
Tags: civicase
---


# Question
Title: php putenv restrictions on server environment, how does this affect civicrm
I've got the email below from my hosting provider "wpengine". Is it going to affect civicrm, does civicrm rely much on putenv?

---

On July 20, 2016, we will be hardening the PHP function putenv based on industry best practices for all PHP applications.

You are receiving this message because we have detected the use of putenv on your WordPress install(s) and plugins listed below:

Plugin: civicrm

How this affects you

After Wednesday, July 20, 2016, you will no longer be able to set system-level environment variables using putenv. Any environment variables you set with putenv will be available in your WordPress site's code as it normally would.

# Answer
> 2 votes
It might if you use something other than US english, or whatever your host has set for the system-level.

See https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/I18n.php

But it will probably still work anyway because CiviCRM sets other variables too that have higher priority. See https://www.gnu.org/software/gettext/manual/html\_node/Locale-Environment-Variables.html

---
Tags: wordpress
---


# Question
Title: Setting up API access for WordPress installation
I'm using civicrm's API to pull country and state data from CiviCRM into a Gravity Forms address pull-down list. The current webhooks between Gravity Forms and CiviCRM are failing because Gravity Forms uses a text box for state field, which is unstructured and does not match CiviCRM data.

I see setup for the api gives the option to either check permission or not. Any reason to check permissions for data for public access?

# Answer
> 1 votes
Checking permissions is important if you want the API to respect the access rights you have given to users? If in your setting and requirement it is not important that you can protect the country and state data you could skip the permission check. Are you using the API on the same server or with REST?

---
Tags: api, permissions, security
---


# Question
Title: Searching by case - would like to sort by subject - greyed out
When I search for Cases, the search results are sortable by clicking on any of the column headings except for Subject and Case Manager. I would like to order the results by Subject - either by clicking on the Subject column heading, or by editing the appopriate php or tpl file so that the results are ordered by Subject by default. Can someone please point me in the right direction for the file(s) which I should edit to change the sort order? Thank you.

# Answer
> 1 votes
I found an answer - by editing the file **com\_civicrm/civicrm/CRM/Case/Selector/Search.php**. I inserted the following line after line 427:

**'sort' =\> 'case\_subject',**

This makes the Subject column clickable for sorting.

---
Tags: civicase, search-results, sort-order
---


# Question
Title: Why the change in how Soft Credit information in exports?
After recording contributions in Civi, I always export those contributions. All soft credit information used to be included with the primary "Hard Contribution" data, but now (perhaps as of 4.7?) you have to specifically export the soft credits, too, but even then the soft credit info still doesn't show up on the hard contribution line of the CSV file, only in a separate line for the soft credit. Any insight into why this is the case?

# Answer
I believe https://issues.civicrm.org/jira/browse/CRM-17286?focusedCommentId=80228&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-80228 will provide you with the answer as to why there are now two lines in the standard contribution export. That said, a couple of things that you can do to get around the issue:

1. Use the "Contribution Detail" report and include the column for "Contribution OR Tribute?" as well as any additional columns you need - when you export to CSV, you can filter/sort on the "Contribution OR Tribute?" column with the understanding that for every soft credit listed in the report, there will be an additional line for the "hard" contribution - depending on what you use the soft credit information for, you may want to save an instance of the report that will list only contributions and another that will list only tributes and then export each separately.
2. If the first option doesn't allow you to display all of the information you need, and if the the number of contributions with soft credits that you deal with is relatively few on each import, after exporting to CSV, CTRL + down arrow in one of the soft credit columns to arrive at the first soft credit in the export, then delete the corresponding contribution line that does NOT contain the soft credit information (from what I can tell, it is typically the line above the one with the soft credit).

Hope this helps!
> 2 votes

---
Tags: civicontribute, export
---


# Question
Title: Error reaching public extensions directory
I receive this error: Extension download error The CiviCRM public extensions directory at https://civicrm.org/extdir/ver=4.7.9|cms=Drupal could not be contacted - please check your webserver can make external HTTP requests or contact CiviCRM team on CiviCRM forum. However, from the browser I can go to that page and see a listing of extension.xml files. I'm trying to get the twilio sms extension installed. Drupal 7.5 CiviCRM 4.7.9

# Answer
In this situation, some possibilities to evaluate:

* There is a problem on `civicrm.org`, but it only occurs on a subpage. For example, in v4.7.x (and maybe 4.6.x), it fetches the subpage `/single` (e.g. `https://civicrm.org/extdir/ver=4.7.9|cms=Drupal/single`).
* There *was* a problem on `civicrm.org` and the failure got somehow cached. You could wait a while and try again -- or clear the caches. (Maybe use the "Support =\> Developer =\> API Explorer" to run `Extension.refresh` or `System.flush`.)
* Something in the web server environment is preventing it from making the request, e.g.
    + A security system (such as a firewall, suhosin, or php ini setting) interferes with outgoing requests.
    + The curl/http layer has a broken HTTP/SSL configuration.

In this particular case, I believe there was a change on `civicrm.org` which prevented it from correctly reading several of the XML files needed for `/single`, but that issue is now resolved.

(See also: https://issues.civicrm.org/jira/browse/CRM-19090 )
> 2 votes

# Answer
There have been intermittent connectivity issues with our civicrm.org server this week. We've observed this ourselves as well for a number of our projects.
> 1 votes

# Answer
It is working fine today. Must have been a temporary access issue.
> 1 votes

---
Tags: drupal, civisms
---


# Question
Title: Drupal webform submission, send email to email address in form
I'm using Drupal 7 and CiviCRM 4.7.3. I've built a Drupal webform and I want a user to be able to submit the form and get an email based on one of the options selected on the form. So far that part works fine if I send an email to the logged in Drupal user.

I'm having an issue sending an email to an anonymous user based on the value of the email field within the form. I tried using the following token (in the 'To' field in the Drupal rule):

```
[submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_email_email]

```

But that didn't work. I also tried to use PHP evaluation by using:

```
<?php print $form['submitted']['civicrm_1_contact_1_fieldset_fieldset']['civicrm_1_contact_1_email_email']['value'][0]; ?>

```

But that didn't work either.

I also added the token in the body of the email and changed the 'To' field to send to the logged in user. That email went through but where the token was in the body of the email was blank, this is telling me I have something wrong with the way my token is set up.

Can anyone offer any suggestions as to what I might be able to do?

# Answer
I always use the Webform -\> E-mails tab for this -\> and then I can pick any Component to send an Email - in the example below I want to send an Email to the address that a user typed into the Email field.
> 3 votes

---
Tags: webform-civicrm
---


# Question
Title: Create a Group using a CSV of existing contacts with an ID
Sorry for the potentially elementary question here, bur I have seen this done by a former coworker. I can't for the life of me remember how to use a CSV or comma delimited string of CiviCRM IDs to create a new mailing group through the CiviCRM user interface. I have a list of existing contacts from our database that has been filtered inside Excel and now I need to create a new group off the remaining contact IDs.

Can anyone remind me how to take the CSV list to create the search and then generate the new group? Or do I have to run the list through the "Import Contacts" process and add them to a group that way?

Thank you in advance.

# Answer
> 1 votes
You can use the import contacts wizard with a file of the contact IDs that you want to add to a group - in the field mapping screen, just map to contact ID, and in the import verification screen you have the option of adding contacts to a new or existing group.

Hope this helps! Tamar

---
Tags: search, groups, mailing
---


# Question
Title: How to exclude a lapsed membership from mailings
Currently using Civicrm 4.7.8 with Drupal.

We have a large membership base. We imported our lapsed members as well in case we will get them to renew membership. Currently about to do a mailings newsletter to our current membership. We wish to exclude the lapsed members from the member only newsletter.

Issue that presents us is that the lapsed members are in different branches, not in a specific group. If we use the "do not email" in privacy settings and they rejoin, our concern is a volunteer that renews that membership may not untick the do not email option, there fore the renewed member would not get their newsletters.

Any suggestions how we might "police" this or is their a way that by marking the do not email option can be automatically undone if someone renews membership after lapsing?

# Answer
I may have misunderstood but assuming you are using CiviMember an easy option is to make a Smart Group based on the membership criteria - and use that Smart Group as your Mailing List.

For example, go to Advanced Search, expand the membership section of the search, set the Membership status to eg New, Current and Grace. Then the lapsed members will automatically be excluded until they rejoin at which point they will be included in mailing.
> 4 votes

---
Tags: civimail, civimember
---


title: Civicrm Reporting

text:
# Question
Title: Civicrm Reporting
In Civicrm in Contact reports I used the template called Relationships. Our data is as follows:

We have Household Members, those members reside in a Residential Community(in our cases Caravan Parks with a unique name) and those Residential Communities are then grouped into branches.(example Ballina Branch)

So after checking the following report settings:

Contact A Full Name

Contact B Full name

Then set the following Filters: Contact Type A is one of Residential Community, then Contact Type B is one of Household

the report shows the contact A is for example Ballina Caravan Park(which is the Residential Community Name) then Contact B is Mr and Mrs Smith(which is the Household name) however when trying to filter by the Group(which is the Branch Name) the report generates no information. Remove the Group and the report shows all Households in every Residential Community across all 17 branches. I cant seem to narrow the filter to a specific branch using the group filter.

Any ideas if im making a mistake?

Thanks so much...lost too much hair already!

# Answer
> 2 votes
Like Aidan, I too was able to create and filter the report according to what I believe it is you are describing - to clarify:

1. Residential Community has a contact type of "Organization" = Contact A, total number of organizations = 4
2. Households = Contact B - total number of households = 4, each related to one of the 4 Residential Communities (a.k.a Organizations)
3. Relationship of Contact A to Contact B = Resident is
4. Relationship of Contact B to COntact A = Resident of
5. Residential Community (a.k.a Organization) are statically grouped by Branch - total number of branches = 2 made up of 2 Residential Communities (a.k.a Organizations)

See screenshot below for report results, first WITHOUT group filter, then WITH group filter:

Hope this helps!

---
Tags: civireport
---


# Question
Title: Use contribution page to record memberships at event
I'd like to use a contribution page that a volunteer will use to enter memberships at a booth at an event, and take payment from the new member at that time.

Contribution pages seem to only allow a "pay later" option for cash or cheques in the Payment Method section. I can't find a way for the volunteer to indicate that he/she has received the payment at the time of the page submission. The volunteer has to get into the contribution record later and indicate that he/she has received the money.

How can I streamline line the process and have the contribution page record that the payment has been made when it's submitted?

# Answer
> 1 votes
The logic behind only allowing pending (pay later) contributions to be created from online contribution pages is that typically, those using the contribution pages are most likely doing so online, not real time, hence if the pay later option is selected, it means that payment will be sent as opposed to handed over to someone.

You say that your volunteer then needs to go into the contribution record and update the contribution status, so this means that they have access to the back office - why not instruct them to submit a new membership directly from the back office with a status of completed?

If you wish to associate these contributions with a contribution page, you can use the "Update Multiple Contributions" action (or batch update contributions via profile if you are on an earlier version of Civi) to associate the contributions with the relevant contribution page (you would need to create a contribution update profile and add the "Contribution Page ID" field in order to be able to do this - I like making a copy of the reserved "Contribution Batch Entry" profile as it contains the most commonly used fields for contributions, but regardless of how many fields you have in the profile, the batch update window will only show the first 10 fields, so you will need to be sure that the "Contribution Page ID" field is moved up to be one of the first 10 fields in the profile - you can read more about profiles here: https://docs.civicrm.org/user/en/4.6/contributions/manual-entry-of-contributions/#configuring-profiles-for-batch-entry-of-contribution-membership-and-pledge-payments)

Hope this helps! Tamar

---
Tags: contribution-page
---


# Question
Title: Import and Export failing and returning no error message
I recently moved my CiviCRM install from a local in-house server to a cloud server hosted by Siteground. Everything is working beautifully except for the import and export.

My database is around 60,000 names.

When I try to import a list of 5000 names to update their addresses, it gets through about 600 records (exactly 3 minutes) and then reverts back to the initial import page. Sometimes it has failed in 2 minutes, but no longer than 3. I can't find in Drupal logs showing a failure. I contacted Siteground and asked them to increase my max\_execution\_time, memory\_limit, and max\_input\_time. They showed me how to do it myself and I tried it. Still no change. I disabled geocoding and it got to 3 minutes and 15 seconds.

So I tried exporting 45,000 contacts (a process I run about 4 times a year) and it lasted 3 minutes as well and then reverted back to the Search Builder page (where I started the export).

What setting is causing this issue? Siteground fixes things pretty well so I just need to know what to tell them.

Thanks, Paul

# Answer
> 1 votes
I am not a developer, but I believe you are running into timing out issues and you may have to verify that the server PHP settings in “php.ini” are set high enough to allow enough time for very long-running scripts/SQL statements to complete so that you end up with the import results screen (what high enough is, I could not say).

In addition to that, if a service such as CloudFlare is in place, those settings need to be set to longer than 3 minutes if possible - while the script will continue to run on the server, you won't be redirected to the import results screen if you get kicked out to an error screen. That said, you should be able to find the import error file using something like CPANEL to access the site file manager and for search for "sqlImport.errors". You may wish to open a support ticket with Siteground if you need any help with access.

If all else fails (e.g. like not being able to get your hands on a programmer fast enough to complete your import within a deadline), I have on more than one occasion resorted to breaking down a single import file to smaller ones (say 500 records in your case) to avoid the timing out altogether - incredibly frustrating, but at least my deadlines aren't missed!

Hope this helps! Tamar

---
Tags: drupal, import, export
---


# Question
Title: Send fee type to Authorize.net along payment
I need to assign a unique code to each fee label for accounting purposes. I can do that using price sets and use the fee type to add the code. Is it possible to see the fee type information in the Authorize.net report? knowing that one transaction can have multiple fee types. Thanks for any guidance.

# Answer
By fee type I am assuming you mean financial type, but if I am not mistaken, financial type information is not transferred to any payment processor - that all remains within CiviCRM, so to get that information from a report you generate from Authorize.net would not be possible without having something developed specifically for that purpose.

If I have misunderstood and you are referring to a report that you run from within CiviCRM, it could be that you either have a custom report or renamed a built-in report - if it is the latter, please let me know the name of the report that you are using.

Hope this helps! Tamar
> 1 votes

---
Tags: payment-processor
---


# Question
Title: Financial Type on Contributions - Receipt (on-line) template
We would like to add the contribution Financial Type to the Contribution (On-line) receipt template, so we communicate clearly to our donors where their money has gone. (Our Financial Types are named after certain funds: General Fund, Child Sponsorship Fund, Building Fund, etc.). We're not using Price Sets. We're on Civi 4.6 and Drupal 7.

In the Contribution (Off-line) template, there is this section of the template code:

```
  <tr>
  <td {$labelStyle}>
   {ts}Financial Type{/ts}
  </td>
  <td {$valueStyle}>
   {$formValues.contributionType_name}
  </td>
  </tr>

```

Because the "off-line" New Contribution screen specifically asks for which Financial Type the transaction is, the above code is pulling the Contribution Type into the receipt template from the input value in the form. I'm tracking with that.

But for the Online contribution template, the Financial Type isn't being selected from the form itself. Rather the Financial Type is set on the Manage Contribution screen for each contribution page. Financial Type isn't listed as a token in the template screen, so I tried the answer from Is there a token for contribution type?, `{contribution.financial_type}`. I'm afraid that didn't work. I checked debugging with `&smartyDebug=1`, but I couldn't find anything loaded in the contribution form that might work.

How is the Financial Type being transmitted to the Online Contribution page? Any ideas for a token or option I'm not seeing?

# Answer
> 1 votes
In your question you state "We're not using Price Sets." In that case you must have multiple contribution pages, one for each financial type.

You can edit the online contribution receipt to include something like:

```
{if $contributionPageId eq "4"}
     <tr>
     <td colspan="2" {$valueStyle}>
      {ts}Donation to General Fund{/ts}
     </td>
       </tr>
{elseif $contributionPageId eq "3"}
     <tr>
     <td colspan="2" {$valueStyle}>
      {ts}Donation to Child Sponsorship Fund{/ts}
     </td>
       </tr>
...

```

{/if}

I would place it in the receipt table just under the "Payment Details" header.

I realise it is a somewhat rudimentary solution, but "quick and dirty" is effective if you are struggling with tokens.

---
Tags: civicontribute, tokens, message-templates, receipts
---


# Question
Title: How can I pass in the contribution amount via URL?
Is there a quick way to pass in the contribution amount via URL on custom amounts?

```
http://example.org/civicrm/contribute/transact?reset=1&id=2&price=35

```

I'm not looking to use a price set, just a total amount. Ideally, I'd like to pay an existing contribution and bring up a form with the amount and contribution to pay against with a credit card.

# Answer
I just tried this on CiviCRM 4.6.18 and successfully passed the amount through using the field Name or id (inspect the field to find the name or id) In the case of my form I did this: http://example.org/civicrm/contribute/transact?reset=1&id=2&price\_5=35
> 4 votes

# Answer
If a javascript solution suits you:

```
var a = document.createElement('a');
a.href = document.location;
var amount = a.search.match(/amount=([0-9]+)/)[1];
jQuery('#search input[name="q"]').val(amount);

```
* Visit this URL -- current page + `?amount=1234`
* Paste the above code in your browser console
* Observe that the StackExchange search box now contains the value from the current page's query params.
* Add a free-text amount input to your contribute form.
* Use equivalent approach to populate that value on your own site.
> 3 votes

---
Tags: contributions, price-sets
---


# Question
Title: Search Builder One of parameters is not of the type MysqlColumnName
Drupal 7.43 / CIVICRM 4.7.7

I am trying to find contacts with no emails (any type eg/ Home, Other) using Search Builder. Using either IS EMPTY or IS NULL, I end up with no result but get a DB error. Viz: Sorry but we are not able to provide this at the moment. One of parameters (value: Home-email) is not of the type MysqlColumnName

It doesn't seem to matter what operator I use, the result is the same. Please help. Ian

# Answer
> 2 votes
I just tried to replicate this problem on the demo site but couldn't.

I would recommend upgrading to Civi 4.7.9, and if you still have the problem, you can do two things:

* Try to replicate it on the demo server (demo.civicrm.org). If you can't, the issue is most likely in the configuration.
* The "DB Error" isn't really enough info to go on. So you can go to **Administer menu » System Settings » Debugging and Error Handling**, and set "Debug mode" and "backtrace" to "yes". That will give you a much more detailed error. Updating your question with that info will let folks provide much more detailed information!

---
Tags: search-builder
---


title: Change domain name (wordpress)

text:
# Question
Title: Change domain name (wordpress)
I have civi crm 4.7.8 on wordpress 4.5.3 and I've changed my website domain name. When I go to wp admin, i can see civicrm icon and go the taskboard, but I haven't civicrm menu. I supposed there are some changes to do in database to set new domain name ? Can you hep me ?

# Answer
> 8 votes
Below are the simplified instructions taken from Moving an Existing Installation to a New Server or Location, but specific to answer your question.

1. Open the file wp-content/plugins/civicrm/civicrm.settings.php in any text editor and change the value for CIVICRM\_UF\_BASEURL with your new domain name For CiviCRM Version 4.7 open the file `wp-content/uploads/civicrm/civicrm.settings.php`
2. Login into WP and navigate to

http://\[your domain name\]/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/updateConfigBackend&reset=1

and clear cache and save the new base directory/path settings

3. Rebuild CiviCRM menu by navigating to

http://\[your domain name\]/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1

---
Tags: wordpress, database, migration
---


title: Fetching Contribution Information

text:
# Question
Title: Fetching Contribution Information
I am working on an extension which requires me to use Civi Contribute.Yet i have not tried anything yet as i don't now the approach, so i wish to obtain the details of a particular contribution transaction such as total\_amount, email ... so that i can use it in the extension, I have thought of using an API method but i am not clear of the details and if at all that is what i have to use. Something like the content of $params?

# Answer
> 1 votes
I think you are looking for the API getfields action? In the API explorer you can do a getfields and it will show you the possible fields for the API.

# Answer
> 1 votes
Using the API is the recommended way to access CiviCRM information from an extension, so you are on the right tracks. You can study https://github.com/cividesk/com.cividesk.cardreader/blob/master/CRM/Cardreader/Page/Callback.php#L50 for an example on how to call the CiviCRM API. You need to read https://wiki.civicrm.org/confluence/display/CRMDOC/API+Reference and use the API explorer to get familiar with the API. You can access the API explorer by using the slug civicrm/api/explorer on your CiviCRM instance.

---
Tags: civicontribute, drupal, extension, developer
---


# Question
Title: Can a Scheduled Job using mail_report send Reports as HTML in the e-mail body, rather than as a PDF attached to the e-mail?
We're on CiviCRM 4.6.19 and Drupal 7.50 .

I'm having problems with six daily Scheduled Jobs to send reports using Job and mail\_report and instanceId=x. Three of the reports get sent successfully, and three do not. There's an error reported with DOMPDF when executing the three failures manually as well. It's not an error with the e-mails being blocked as spam.

So: **Is there an option to send a report as HTML in an e-mail as a Scheduled Job, rather than as an attached PDF file? Is there a parameter for mail\_report to send as HTML?**

Or: **Is there another API option to do this besides mail\_report?**

Thanks!

# Answer
Yes, you can send a report as printer-friendly HTML, in the body of a Scheduled Job e-mail, using mail\_report.

Go to Administer -\> System Settings -\> Scheduled Jobs. Edit the Scheduled Job parameters to add format=print, which overrides the default option, which is to send the report as a PDF file attached to the e-mail.

See here for more information about managing Scheduled Jobs, including parameter options.
> 2 votes

---
Tags: civimail, civireport, scheduled-job
---


# Question
Title: Send welcome message at signup date, not membership 'start date'
I want to do something pretty simple, but it seems surprisingly hard to do.

When a member joins, they should receive a) A receipt and b) A welcome email.

A) Works Fine. B) Is a problem.

Memberships for this client are all dated from 1st of the year, so the 'start date' is always 1st January.

It is easy to set a 'reminder' to send the welcome letter on the membership start date, but if a new member signs up on 16 July, the welcome letter will never send, because the start date is 6 and a half months earlier than the sign up date.

Can somebody suggest a way to send the welcome letter at the membership sign up time, not the membership start date? Obviously I could edit the receipt to include the welcome email, but that's not the way the client wants it to work.

# Answer
> 1 votes
Actually the answer is simple, but a little counter-intuitive.

Membership reminders need to be set up under 'Contributions' and not 'Memberships'. So, create reminder for "Contribution Type - Member Dues", sent 'O hours after Receipt Date' in the Schedule Reminders screen.

# Answer
> 4 votes
When a membership is created there is both a 'join date' (member since) and a 'start date'

You should be able to set up a scheduled reminder to be triggered based on the 'join date' and you should get what you need.

# Answer
> 4 votes
Another option if you are using civicrm v4.6 or higher would be to use the date of the activity type "Membership Signup" to trigger a 'reminder'.

---
Tags: civimember, scheduled-reminders, scheduled-job
---


title: Change button text

text:
# Question
Title: Change button text
Man I haven't been this frustrated with a plugin in a LONG TIME. Everything I need to do I have to run around in a circle. With that being said I have no choice as this is the plugin my client wants to use.

How the heck to I change the button confirm contribution to Confirm Registration. I have tried the word replacements and it doesn't work. I am using wordpress.

Thanks!

# Answer
> 4 votes
CiviCRM is a large and complex application. Much of its functionality is covered by unit tests to prevent regressions, and there is a rigorous review and testing process for changes made to the stable releases. However neither of these are foolproof and sometimes things break. We rely on the goodwill of community members such as yourself to find bugs and contribute toward fixing them in a timely manner. Once identified, critical bugs are often solved in a matter of days.

I just tested on a couple of systems and this bug is unusual in that it seems to affect Wordpress (and reportedly Joomla) but not Drupal. That's odd since the CiviCRM core application is identical for all 3 CMSs, and that oddity no doubt contributed to this one slipping through the cracks.

An issue has been filed in the bug tracker for this and it's been marked as critical so it will get highest priority from the core team. If community members step in with debugging info or patches that will move things along even faster.

# Answer
> 4 votes
Regarding the option of using Word Replacements, there's been a bug in 4.7.x, and the simple work-around is to navigate to "Administer =\> Localization =\> Languages" and re-save the form. (You don't need to change anything; just re-save the settings.)

The Word Replacements in 4.7 are internally tied to the active language. But on a new installation, the active language may (technically) be new/blank/undefined - and there are no Word Replacements for the blank language. Re-saving the form fixes this by affirmatively setting the language.

For more discussion, use CRM-15813 and PR #8712.

# Answer
> 3 votes
It is a bug affecting 4.7 - I have created a bug here. When facing an issue, please try and replicate it on the various demos. When a bug is found, please report it.

As Karen-Ann said, Word replacement works like a charm on 4.6.

# Answer
> 2 votes
What version of civi are you using? Reason being is, I think there is a bug. Civi 4.7.3 word replacement does not work, previous versions it does. I've got the same problem, was just about to make a post but you beat me to it. :) I'm on joomla as platform, it is an overall bug i think.

---
Tags: wordpress, issues
---


# Question
Title: getting error message "too many connections"
Getting an error message on public website regarding too many connections. We increased our SQL connections, but we don't have a lot of interaction going on between our website and CiviCRM. We have web hooks between our forms and CiviCRM. How do we troubleshoot what is causing this? Nothing in the logs. Any ideas for preventing this?

We are on WordPress 4.5.3 and CiviCRM 4.7.9.

```
Initialization Error

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

    [code] => -24
    [message] => DB Error: connect failed
    [mode] => 16
    [debug_info] =>  [nativecode=Too many connections]
    [type] => DB_Error
    [user_info] =>  [nativecode=Too many connections]
    [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=Too many connections]"]
)
Initialization Error

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

    [code] => -24
    [message] => DB Error: connect failed
    [mode] => 16
    [debug_info] =>  [nativecode=Too many connections]
    [type] => DB_Error
    [user_info] =>  [nativecode=Too many connections]
    [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=Too many connections]"]
)

```

# Answer
> 1 votes
Two thoughts:

1) any chance you have a very low limit by default in your hosting setup/config? Can you get into MySQL and figure out the value of this variable:

```
show variables like 'max_connections';

```

2) could you be under brute force attack - e.g. against the login form? Can you see any extra/unusual load on your server. If you can get to a shell you can type the following command:

```
top

```

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


title: Cron is running, but not running

text:
# Question
Title: Cron is running, but not running
I'm running CiviCRM 4.7.9 on Drupal 7.50. Drupal's cron is running fine every 3 hours, using Drupal's built-in scheduler. I can also run cron successfully manually.

However, I still get the famous error message in CiviCRM saying that cron has never run:

What specifically in the database is this check looking for, and what's supposed to be creating that? Is this likely to be a problem with cron actually not running, or a problem with *detecting* whether it's run?

# Answer
> 2 votes
check out this very detailed answer on a different SE site by Chris:

https://drupal.stackexchange.com/questions/136722/drupal-7-cron-does-not-run-civicrm-scheduled-jobs

---
Tags: drupal, error, cron
---


# Question
Title: Suspected external REST API not updating Drupal entities
We're trying to push a Civi contact's data into an LDAP data store using the Civi Drupal entity module and the Drupal ldap module. That part works fine. If a user updates their contact card using a Civi user profile form, the changes are immediately pushed into ldap.

But when we update the same contact using the Rest API, the changes are not synced into ldap and we dont know why. (The REST API call does successfully update the civi contact card however.) We suspect its because some specific Drupal function is not being called and are wondering if it is a bug. The closest I have been able to find is `hook_user_update`. Reading the documentation, we believe it isn't called by the Rest API but is called by Civi Profile form. We're not sure about this.

What can we do to ensure that the Civi entity module successfully updates our LDAP store when called using the REST interface?

# Answer
> 1 votes
We believe the bug may be caused by the Drupal hook model which expects to receive Drupal form data which the Civi API is not capable of invoking since, of course, it does not use forms. Shimming the data would have been messy and clunky so in the end we hooked directly into the LDAP module using CiviCRM's edit hooks. Like this:

```
function ldap_user_civicrm_post($op, $objectName, $objectId, &$objectRef) {
  if ($op=="edit") {
    try {
      $cms_user_id = civicrm_api3('UFMatch', 'getvalue', array(
        'return' => "uf_id",
        'contact_id' => $objectId,
      ));
      if ($cms_user_id) {
        $account = user_load($cms_user_id);

        $ldap_user_conf = ldap_user_conf();

        $bool_result = $ldap_user_conf->synchToLdapEntry($account);
        if ($bool_result) {
          ldap_user_ldap_provision_semaphore('synch', 'set', $account->name);
        }
      }
    } catch (Exception $e) {

    }
  }
}

```

---
Tags: api, profile, tokens, civicrm-entity, rest
---


title: Paypal Pro Payment Processor problems

text:
# Question
Title: Paypal Pro Payment Processor problems
We are using Paypal pro to take payments for memberships. We use webforms in Drupal to capture the data into CIVICRM 4.5.8. There are some issues I have outlines in order of importance.

1. We cannot take international payments because the county field does not change when you select a different country. For example West Midlands, Saudi Arabia. Is it possible to get rid of the county field as a required field and hide it? Is the billing address required at all?
2. The page refreshes when something is wrong with the payment information but it does not tell you what is wrong.
3. There is no option to use the users address (shipping address) as the billing address. They have to type it again.

Does anyone know how to fix any of the above. it would be much appreciated.

Thanks,

# Answer
These issues has been fixed in the later version 4.6 - If possible please upgrade to version 4.6 that should fix all the issues which you have reported

If you still wanted to fix the issue in the same version - then

Issue 1: you have two solution for the same

you need to hide the existing billingblock country and county field and need to add two new field for the same by overriding CRM/CORE/BillingBlock.tpl

ELSE

In webform\_civicrm Module - includes/wf\_crm\_webform\_postprocess.inc -\> function validateBillingFields() - remove 'billing\_state\_province\_id-5' =\> FALSE,

Issue 2: I guess this is also related to Version

Issue 3: you need to write a module/condition in drupal to copy over webform address field to the billing address field

I guess this helps !!!
> 1 votes

---
Tags: civimember, paypal
---


# Question
Title: Add new case: "Case Type is a required field"
When I try (on 4.6.18) to create a new Case, I get an error saying Case Type and Case Start Date are required, but no fields exist on the form to specify these?

I have Case Types defined and enabled at `civicrm/a/#/caseType` and I've tried adding a case from the menu *Cases » New Case* and from the Cases tab.

There's no javascript errors showing, nothing in Drupal's watchdog log. Hmmm. Am I doing something daft?

# Answer
This was due to permissions in the `templates_c` folder. Some entries in there were not deletable by the user that Apache was running as. I discovered this by attempting to clear caches at `civicrm/admin/setting/updateConfigBackend?reset=1` which generated lots of errors.

Removing these files/or correcting their permissions and clearing the cache fixed it.
> 3 votes

# Answer
I do not recognize this problem, but I am assuming you have an extension active on the form too? If so, sure that does not muck things up?
> 0 votes

---
Tags: civicase, 4.6
---


# Question
Title: ACL settings for civicrm in Joomla cannot be reset anymore
Using CiviCRM 4.6.15 (and later 4.6.16) integrated in Joomla 3.5.1 I just found out that it is no longer possible to change ACL settings for CiviCRM. It is possible to change a setting, this change is ajaxified and will be shown immediately, however after saving the change it is rolled back to the setting before the change.

I see this in a site that I upgraded from an earlier Civi version, and also in an install of CiviCRM 4.7.6 in a Joomla 3.5.1 site. The readme text with the ACL settings advised to set the value of 'max\_input\_vars' (defult 1000) higher. I reset this to 2000 and later to 8000. This does not solve the issue with CiviCRM 4.7.6 (now 4.7.7) in Joomla 3.5.1 however.

This seems to be a longstanding bug, see: https://issues.civicrm.org/jira/browse/CRM-15841.

# Answer
> 1 votes
After updating Joomla 3.5.1 to the latest version Joomla 3.6.0 this problem seems to have disappeared completely. I checked a civi 4.6.19 and a civi 4.7.9 install and both behave well again. You can now change the AVL settings again. I did hear that the acl-part of Joomla needed and got some TLC so I presume this was the culprit in the previous Joomla version.

I did not need to to set the value of 'max\_input\_vars' (default 1000) higher for this to work.

---
Tags: joomla, acl
---


# Question
Title: Sanity check for adding customer (sales) data to database with donations data
I am importing a large amount of customer data for a charity's shop into CiviCRM. Of course we would like to be able to use this data alongside existing data from donors and contributors.

I have made a new Financial Type and a new Financial Account to hold this data and keep it separate from the donation data. Is the best thing to do now to make a new Price Set which includes all of the items in the store? Is there anything I should know before I do this to avoid polluting the dataset? Should I process each Sale in the same way as a Contribution? I am worried this will pollute overviews of the dataset by inflating the amount of money the charity appears to have at any one time, given that the actual assets for the sales transaction is equal to (sale value minus item cost).

I should clarify that I am a software engineer not an accountant and I have no idea if this is a reasonable concern or not.

Edit: The shop is based in BigCartel. I am building a script which imports historic sales data and will also function as a webhook (e.g. IPN) for future sales.

They have 60 products in 14 categories. Each product has different types, e.g. 'small t-shirt', 'book with £5 donation', etc. Fairly standard charity gift shop fair -- t-shirts, books, stickers, etc. My understanding is this system should accurately reflect financial data but isn't being used to keep inventory. The purpose of the integration is mainly to increase demographics and sales monitoring to tie the shop data into CiviCRM with data from other sources (e.g. newsletter subscriptions, social networking, etc.).

I'm not sure if I should then make a new price set for each category and map the data that way. One thing I would like to do when I make a new Price Set is to say that the price set is used for "Product Sales", not "Contributions", "Events", "Memberships", etc. Though the business logic is probably similar, it seems that a product sale is inherently a different kind of event to a donation. I can't seem to figure out how I'd do that without making a new module though...

# Answer
@DanielJames

Thanks for your clarification. Since you will be importing historical data and using an IPN to capture future sales information, I don't think you need to use price sets at all.

FINANCIAL TYPES:

Again, you should touch base with the powers that be to understand what level of detail they wish to preserve in Civi, but my guess is that at the very least you will want to create financial types/accounts for each of the 14 categories (my OCD would prompt me to create a financial type/account for each type of product - e.g. financial type = T-shirts, different sizes should be handled as custom data if the client is interested in preserving that detail).

You can build your import script/hook to create both financial types/accounts if they do not already exist, and since people are receiving goods on behalf of their purchases, those financial types should be considered non-deductible (the exception would be the additional donation amounts that donors can contribute with their item purchase - that, of course, should be considered deductible).

I am assuming that your hook would include a verification to check for existing contacts and if no matching contact is found, create a new one - you would do the same for categories/products that may be added directly via BigCartel.

To facilitate reporting and differentiate between contributions/donations originating from BigCartel from other contributions/donations recorded directly in Civi, you can do so in several ways - the first two that come to mind:

1. Include a custom data field (e.g. a Y/N flag for "BigCartel?")
2. Include a convention on the financial types that can then be used for multiple filtration purposes (e.g. all BigCartel financial types should begin with BC---, a custom extension would prevent them from being available in the drop down when recording contributions directly in Civi, add filters in reports/searches to group all financial types by whatever precedes the three dashes, etc.)

How much effort you put into the differentiation will depend on what your clients' processes will be for recording the information from BigCartel moving forward - i.e. will they be transferring all financial information from Civi to their G/L system, or will they continue to take contribution information from both Civi and BigCartel (which is what I assume they are currently doing)? If it is the former, then you will definitely need to sit down with someone to understand how the data needs to be structured so that they are able to extract that information in a relatively easy manner.

HISTORICAL & LINE ITEM DATA:

I am assuming you are writing an import script for historical data instead of using the built-in contribution import wizard because you want to preserve the line item detail of each contribution (e.g. if more than one type of item was purchased) - the function would be the same in your hook and I believe you can make use of APIs or hooks that already exist, but here you would be more well versed than I and you probably would know where to look for the information at the following link: https://wiki.civicrm.org/confluence/display/CRMDOC/Develop

Hope this helps! Tamar
> 2 votes

# Answer
Thought of a few more important things:

1. I would map the BigCartel transaction ID to invoice ID and the payment processor transaction ID to the transaction ID field in Civi - this will preserve consistency of data and facilitate reconciliation
2. Sometimes communications get disrupted and your hook might miss a few transactions unless you add some kind of a loop based on BigCartel transaction ID and amount, e.g.: every time the hook is triggered, check that for every BigCartel transaction ID and amount there is a corresponding Contribution ID - to limit the amount of data that this query reviews, you can limit the verification to something like the past 30 days
3. You also need to determine how you will handle refunded/cancelled transactions, e.g: create a separate negative contribution that should have its own unique payment processor transaction ID (probably the easiest option), or update existing contribution ID to a status of refunded of the refund amount is for the full amount of the contribution (in which case you need to be sure the script will not get confused during step #2)
4. If a transaction is missed and it is older than 30 days or if a contribution needs to be edited for some reason (e.g. If pending pay later is offered as an option for payment), then you will need to make the financial types available for staff to record the contribution manually via the back office, otherwise, upon clicking edit, the financial type might be wiped and upon clicking save the system will require that they select a financial type

Ok, I think that is really it for now - good luck!
> 2 votes

---
Tags: contributions, accounting, sales, donations
---


# Question
Title: Dashboard not loading and it crashes the site
Today I upgraded from CiviCRM on WordPress, from 4.7.5 up to 4.7.9.

I can't say if the problem started with the upgrade, or not. As it is a test installation I abandoned some months ago. I am now picking it back up, to further develop it for the non-profit that's looking at using it.

# The Issue...

The dashboard does not load the two dashlets that are on it. Sometimes one might load, usually not. It's like it hangs. It can cause the server to go into a spin, resulting in 500 Server Errors when I try to refresh the page or perhaps even when accessing another admin page of WordPress.

# Things tried so far..

I've read numerous posts about this issue (at least, a matching description of it) but found no confirmed solutions.

I tried some of the suggestions on this post: CiviCRM Dashboard Hangs for 5+ minutes

Namely...

> 1. Add your IP and domain to /etc/hosts file
> 2. Check if your firewall is blocking any AJAX calls
> 3. Check if any .htaccess file in any of the directories (mainly wp-admin directory) is blocking the AJAX call

I am assuming the /etc/hosts is referring to my local computer? Not sure. As for the firewall... I assume that's referring to the firewall on the server Civi is on? It's a shared hosting environment, so how would I check that?

As for the .htaccess files. That's one thing I was able to act on. I found no .htaccess files that were blocking directories.

I also tried these suggestions... (found here)

> 4. Check the civicrm log in /../uploads/civicrm/ConfigAndLog or /../plugins/files/civicrm/ConfigAndLog
> 5. Check the error\_log. phpinfo() will tell you where it is.

The only thing in the log is the entries for the update I just performed.

## PHP error\_log

I did find errors in the error\_log file in the /wp-admin/ folder. Those errors are:

```
[17-Jul-2016 02:55:59 UTC] PHP Warning:  include_once(/home/sewaluna/public_html/wp-content/plugins/civicrm/includes/civicrm.users.php): failed to open stream: No such file or directory in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm.php on line 422
[17-Jul-2016 02:55:59 UTC] PHP Warning:  include_once(): Failed opening '/home/sewaluna/public_html/wp-content/plugins/civicrm/includes/civicrm.users.php' for inclusion (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm.php on line 422
[17-Jul-2016 02:55:59 UTC] PHP Fatal error:  Class 'CiviCRM_For_WordPress_Users' not found in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm.php on line 423
[17-Jul-2016 23:07:36 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756
Stack trace:
#0 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(199): PEAR->loadExtension('mysql')
#1 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(564): DB_mysql->connect(Array, false)
#2 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2308): DB::connect('mysql://sewalun...')
#3 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(378): DB_DataObject->_connect()
#4 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(86): CRM_Core_DAO->initialize()
#5 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1268): CRM_Core_DAO->__construct()
#6 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(114): CRM_Core_DAO::executeQuery('SET NAMES utf8')
#7 /home/sewaluna/public in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 756
[17-Jul-2016 23:07:40 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756
Stack trace:
#0 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(199): PEAR->loadExtension('mysql')
#1 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(564): DB_mysql->connect(Array, false)
#2 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2308): DB::connect('mysql://sewalun...')
#3 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(378): DB_DataObject->_connect()
#4 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(86): CRM_Core_DAO->initialize()
#5 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1268): CRM_Core_DAO->__construct()
#6 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(114): CRM_Core_DAO::executeQuery('SET NAMES utf8')
#7 /home/sewaluna/public in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 756
[17-Jul-2016 23:07:42 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756
Stack trace:
#0 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(199): PEAR->loadExtension('mysql')
#1 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(564): DB_mysql->connect(Array, false)
#2 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2308): DB::connect('mysql://sewalun...')
#3 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(378): DB_DataObject->_connect()
#4 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(86): CRM_Core_DAO->initialize()
#5 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1268): CRM_Core_DAO->__construct()
#6 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(114): CRM_Core_DAO::executeQuery('SET NAMES utf8')
#7 /home/sewaluna/public in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 756

```

Are these indicating a potential cause of this issue?

## PHP Version

I have also tried different versions of PHP (something my host suggested). Was originally on v5.6.23, then changed to v5.5.37. Same effect occurred on both. I also tried v5.4.45 and 7.x. Same issue. So I think it's fairly safe to say it's not a PHP version related issue.

## PHP Modules

I can select which PHP modules load into PHP. Are there any selected that shouldn't be, or not selected that should be? See this image...

### Which dashlets

The dashlets configured to load are Activities, and Latest News.

## System Error

I should add that I see the following in the footer: `Powered by CiviCRM 4.7.9. System Status: Error`

When I click on `System Status:Error` in the footer it takes me to `admin.php?page=CiviCRM&q=civicrm%2Fa%2F#/status` and no information is present there.

It just looks like this:

# What next?

Q1) Are the above errors indicating the cause of this issue? If so, can you suggest what I do about it?

Q2) If Q1 above is not the issue/solution, does anyone have any other suggestions on how to resolve this? It seems to be common enough that it suggests to me this is a bug or issue in the way CiviCRM is going about things, rather than something specific to me and my situation.

Thanks,

Jonathan

# Answer
> 2 votes
I once had a similar symptom of dashlets frequently hanging. In my case it was caused by using PHP in PHP-FPM mode with pm.max\_children set to a value less than 4. I was running on a VPS so I had total control of these settings. On a shared server, you might not have control of this so you might want to ask your hosting provider.

Why this symptom would appear for you only after a Civi upgrade is not clear, however.

# Answer
> 1 votes
Ignore my previous answer! @BobS points out that the timestamps don't quite line up.

However, I'm now focusing on the correct error:

```
Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756

```

That suggests this: Call to undefined function dl() error w/Joomla 3.5.1 & PHP 7

Since you've already stated your PHP version - it may be worth checking with your webhost to see if there's a different PHP version for CLI commands. That may be causing your issues. If you can log into the server via SSH, running `php --version` should also answer whether the CLI is running PHP7.

# Answer
> 1 votes
Sorry to leave another answer - but the previous answer is likely to be accurate in some cases, just not yours!

I decided to dig into the code a little bit to see what's going on. This function `loadExtension` that has the troublesome code IS tied to your PHP modules. It's intended to load any modules that you didn't enable, but CiviCRM needs, using the `dl` function.

However, the `dl` function is deprecated in newer versions of PHP, and removed in PHP7 - hence the answer above. It still doesn't work in PHP 5.4-5.6 in most cases (see here). PEAR (the CiviCRM package with this code) handles this with the "STFU operator", so you don't normally get an error. You're still seeing an error - not sure why. Oh well.

To fix this: This code ONLY fires if the needed PHP module isn't loaded. So if we figure out which missing module is causing this code to fire, we can check it off on that control panel you screenshotted above.

To figure this out, I'd recommend the following:

* Open up `/home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php`.
* Find line 756, which reads: `return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);`
* Just ABOVE that line, enter this code and save the file: `CRM_Core_Error::debug_var('missing module', $ext);`
* Reload the page that causes that stack trace to appear.
* Search your log for the words "missing module". The module should be listed on that line!
* Enable that module in your PHP control panel checklist. You may need to do this 2-3 times if you have multiple modules missing.

---
Tags: dashboard
---


# Question
Title: Webform CiviCRM: Issue with Membership Options Not Displaying
(This has been replicated both on a Civi 4.6.19/Drupal 7.50 site and a Civi 4.4.6/Drupal 7.37 site, with the following versions of Civi Webform 7.x: 4.10, 4.14, 4.15)

We have a webform connected to a contribution page with membership options - not a priceset, just selected membership options from the membership types stored in Civi. The membership options are not showing up on the payment page, as seen below so the user cannot make a selection of membership type. Is this standard Civi webform behavior? If not, is there some setting or permission issue that we can modify?

# Answer
> 1 votes
Look for them on the Start page - and make sure you have configured the Membership (under the Webform tab) - as a user select. Note here you can also decide if you want live options or static - and if you go static you can decide which ones are available.

Add on: Before all this you will want to get into the Membership section under the Webform -\> CiviCRM tab.

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


# Question
Title: How can I sort groups by the date the individual was added to the group?
How can I sort groups by the date the individual was added to the group?

I can't figure out how to do it in either manage groups, search, or reports.

# Answer
For a standard group there is no direct way to do that through the UI as the group(s) someone is in are stored in a single field.

If you are using smart groups, then you may be able to use the underlying criteria for the group to work out the joining order (eg, display and sort by membership join date if your smart group in based on a particular membership type). However that won't be ideal or even appropriate in many situations.
> 1 votes

---
Tags: groups, sort-order
---


# Question
Title: Duplicate additional participant created during online payment(event)
In online event registration, duplicate additional participant created when user click continue button on review page after come back from Payment gateway(PG like Paypal Standard, Monerise) by clicking browser back button.

Civicrm version: 4.6.2

Any fix?

Thanks, Siv

# Answer
> 0 votes
If the payment was successfully then the user has to be redirected to thank you page -

I guess you are speaking about - user manually clicking the back button or cancel button before successful payment - in that case you need to redirect the page to the event start page or just refresh the page again

This is an cache issue

I guess this helps !!!

---
Tags: civievent
---


title: Multi statement queries in Civireport

text:
# Question
Title: Multi statement queries in Civireport
I am building a custom report that, due to its complexity, requires multiple SQL statements including the creation of temporary tables. I have developed the queries in MySQL workbench and they work as intended.

However, when embedding these statements in the postProcess() function of a subclass of CRM\_REPORT\_FORM and passing the query to $this-\>buildRows the query fails with "DB Error: syntax error". Can anyone point me to an example of a report that uses multiple SQL statements or advise how to properly construct such a report?

If it helps, the rough outline of the SQL I need to handle is as follows:

CREATE TEMPORARY TABLE all\_grades AS (SELECT ......

CREATE TEMPORARY TABLE all\_grades\_copy SELECT * FROM all\_grades;

CREATE TEMPORARY TABLE most\_recent\_sequence SELECT .....

SELECT.....FROM all\_grades, INNER JOIN most\_recent\_sequence ON ....JOIN all\_grades\_copy ON .... GROUP BY .....

# Answer
@Dino62 - I dont think you can execute multiple SQL at the same time

But still you can split the SQL in to different task and create a temp table and input all the values which you want to display in the report

Use the below to run the SQL against Database separately

```
CRM_Core_DAO::executeQuery( $query, $sqlParams );

```

If the above is not helping then try to use

```
function alterRow( &$row ) {
    $row['sort_name'] .= ' ( altered )';
}

```

where you can handle each row individually

I guess this helps !!!
> 0 votes

---
Tags: civireport
---


# Question
Title: Can't seem to access Session values in module's API file
I can't seem to access session values on API definition. `var_dump($_SESSION)` returns an empty array event after putting `session_start()`.

`api/v3/MymoduleEntity.php`

```
function civicrm_api3_mymodule_entity_method($params) {
  session_start();
  return var_dump($_SESSION); // Returns an empty array
  ...
}

```

# Answer
> 1 votes
You can try

-- Variable to set in CiviCRM session `CRM_Core_Session::singleton()->set('myVariable', 'Yes, I am in current Session');`

-- get value of variable from CiviCRM Session `CRM_Core_Session::singleton()->get('myVariable');`

HTH
Pradeep

---
Tags: api, session
---


# Question
Title: How to change the display of case listings to show and/or sort on case ID
My client makes extensive use of cases, and the case ID is an important identifier. CiviCRM tends to downplay the case ID, however, often placing more emphasis on the case subject, which isn't as helpful to us.

The default results list display when searching for cases does include the case ID in the 'Client' column (along with client name and phone number), and so this results list is not sortable by case ID. If I wanted to edit the template file that describes this results listing, how could I go about that in order to have the case ID in its own column, and be a sortable column?

We also use the listing of cases visible from the 'Cases' tab of a contact's summary screen. This presents a similar listing of case, but in this instance the case ID is not shown at all. Again, how would I go about changing this display in order to have the case ID in its own column, and be a sortable column?

I've spent a fair bit of time digging into this so far, and to be honest I'm struggling even to identify the correct template files to customise (it feels a bit like going down the rabbit hole in Alice in Wonderland!)

# Answer
> 1 votes
For both pages you're talking about it's templates/CRM/Case/Form/Selector.tpl, but what's interesting is that I know case id used to be there. Browsing the code history it looks like it was removed around v4.5, but without investigating further I can't say why. But take a look at 4.4 for example to see how it used to be. It's not sortable there, but might get you started. https://github.com/civicrm/civicrm-core/blob/4.4/templates/CRM/Case/Form/Selector.tpl

---
Tags: civicase, custom-templates
---


# Question
Title: How to go about making a Core Tab on the Contact Summary screen view Inline instead?
Specifically -\> I'd like to see what's in the Membership Tab -\> Inline instead. I'd like that table with Active Memberships printed right at the top underneath the Display Name on civicrm/contact/view?reset=1&cid=xxx

When you add a Custom Data Set/Field you get a choice between Tab and Inline. Which is very cool. But how to go about switching a Core Tab -\> Inline?

It's not as simple as finding the tpl - and then injecting that into the CRM/Contact/Page/View/Summary.tpl - as the $ variables aren't known. I don't really want to be copying phps bit over - I think?

# Answer
> 5 votes
Rather than smarty, JavaScript will do the trick. Those tabs are all separate pages, and you can load any CiviCRM page/form as a snippet instead.

First, in your extension, use a hook to include the Javascript and provide the contact ID for it:

```
$r = CRM_Core_Resources::singleton()

// Provide the contact ID (assuming you've got it handy)
$r->addVars('memberTabInline', array('contactId' => $contactId));

// Add the script
$r->addScriptFile('com.example.membertabinline', 'membertabinline.js')

```

Then in membertabinline.js:

```
CRM.$(function($) {
  $.get(CRM.url('civicrm/contact/view/membership', {
    reset: 1,
    force: 1,
    cid: CRM.vars.memberTabInline.contactId,
    snippet: 1
  }), function(result) {
    $('#mainTabContainer').append(result);
  });
});

```

You'll probably need to add a div or something and have this fill it so that you don't have the membership stuff appending multiple times, but this is the gist.

Alternatively, you might look at https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms to see if you can fill a wrapper with the tab and have it work. I'm only familiar with this re: popups, but it looks like it might work within any element.

---
Tags: smarty, javascript, contact-view
---


title: Inserting images in mailing

text:
# Question
Title: Inserting images in mailing
When creating a mailing, the draft looks fine, but when sending a test, , the images seem to be in all sorts of strange sizes for some people, as if redefining the size in the draft didn’t happen (the original images are quite large). It looked fine in my inbox, but for 2 people who had to click on “download pictures” those images showed up strange. I don’t know if this can effect it too, but I’m on a Mac and they’re not. All are on Outlook.

I then tried to resize the original image and upload those instead of adjusting the size in the draft by replacing the existing ones, but it didn't help. I noticed the image url leads to a mail chimp gallery, so that might be the problem.

I now want to start from scratch instead of replacing old images, but I don't have an image url to use and so I can't upload the images. When I send images to server or browse server, nothing shows up.

This feels like it should be simple but I have no idea what else to try.

Hel and thanks!

# Answer
> 5 votes
There are two issues going on here. First, you have images that you attempt to resize, but they are appearing wrong for many recipients. Second, you can't fix the images.

I can't answer the second issue without knowing your particular server environment. I'm especially puzzled how you got your images up there in the first place but are having trouble now.

However, I can explain the first issue. When you resize an image in the editor window, all you're doing is adding HTML parameters or inline CSS to constrain the images to a given height or width. You have to trust the recipient's email client or webmail to carry out your instructions, though.

It's not uncommon for email clients to strip out the inline CSS that scales images, so that's what you're facing. You're on the right track: get the actual image file to a size that is reasonably close to what you want, and then only trust the editor for fine-tuning.

---
Tags: civimail, email, images
---


title: No coding no CIVICRM? Or..?

text:
# Question
Title: No coding no CIVICRM? Or..?
I run a small but growing non-profit and I was looking into CIVICRM as our much needed CRM system. Now I know no coding at all, can I still custumie and use CIVI or do I nedd to know coding?TY!!

# Answer
You can customize civicrm in many ways - eg add custom data/fields; you can also add extensions \- essentially packages of code that help you leverage civicrm further. Lots of ways to customize your civicrm without requiring you to know touch code.
> 4 votes

# Answer
You can indeed customize CiviCRM in many ways, as KarinG explained. However, if you are a small NGO with small budgets I would recommend doing only the absolutely necessary customizations and stay away from 'i want this to look a little different'. Not because you can not, but because the benefits will probably not outweight the effort.
> 3 votes

# Answer
There are ways to customize the appearance and UI of CiviCRM as well. See this talk from 2015's Denver conference: CiviCON Denver- Make It Pretty: Customize the Appearance of CiviCRM without Knowing How to Code
> 2 votes

---
Tags: evaluating-civicrm
---


# Question
Title: Login Fails For One Account, But Not For Others
A user on our client's CiviCRM site \[CiviCRM(4.6.5)/Drupal(7.36)\] is having trouble with her login. Each time she attempts to login, she is greeted with an error indicating that she has entered her password incorrectly. Testing her login from another location/network, I am able to login using her credentials. Using a JoinMe session to share her screen, I am able to login to CiviCRM using my credentials (as well as several others), but when I use hers, her login fails. I have cleared the cache on her browser, cleared caches on CiviCRM, and have tried updating her user-password, but get the same results each time I attempt to login from her PC (Windows10). It seems that there is something wrong with her account, but I have directly inspected her user-record in the Drupal users table and can find no anomalies which would explain why she cannot login. Her user-roles are all correct as well, but still she cannot login. Has anyone else had this problem with one of their CiviCRM users?

# Answer
> 1 votes
Just to clarify, this appears to be a Drupal issue, not a CiviCRM issue as Civi is not involved in checking passwords. I'm just fishing here, but I would try the following:

* Clear the Drupal caches.
* Delete relevant cookies in the browser.
* See if you can login using a different browser on the same machine.
* Change the users password.

---
Tags: drupal, issues, user-account
---


# Question
Title: Smart Group criteria disappearing or changing
We've been using a number of smart groups created via the search builder and from time to time, the smart group criteria disappear or are changed. For instance, we had five similar smart groups based on membership in five different groups with a certain contact type. At some point, the criteria changed for all five smart groups to membership in group 0.

We've had occasional similar issues for years, with no obvious trigger for the change. Does anyone have any idea what might be happening? Has anyone else had the same issue?

# Answer
There was a set of nasty bugs that fit the description of what you're talking about throughout 2015:

https://issues.civicrm.org/jira/browse/CRM-18155

https://issues.civicrm.org/jira/browse/CRM-18435

CRM-18435 in particular is getting a fix in the August 3rd release of CiviCRM. You can patch it now if you know how (patch is linked from the ticket above) but otherwise upgrade next week.

To give a big-picture overview - smart groups rely on the underlying form (in this case, Search Builder) not changing. For a while, there wasn't really awareness that changing the form would break smart groups. In fact, I have a patch that hasn't yet made it into CiviCRM here because someone pointed out that a benign-seeming change could break a smart group.

Now that there's awareness (and automated tests!) around that, those issues are going away.
> 4 votes

---
Tags: smartgroups, search-builder
---


# Question
Title: How do I get csv file of Gmail contacts to import?
I am trying to import a Google Apps Contacts list in csv file format. I go through the steps; it goes through the motions of importing the file, but no contacts are added. We're running CiviCrm 4.7.8. It's a trial run on a friend's Wordpress account. We get a System Status:Error message that everything's not configured yet e.g. No Cron Running. Any ideas?

# Answer
> 2 votes
That cron is not running is not affecting the import process.

Ideas - in no particular order:

* Perhaps your csv needs some formatting? Do you have columns for First Name; Last Name; Email adress and are they all in expect format? Email address should just be email address only (so separate columns):

Mary (in column 1) Smith (in column 2) Mary.Smith@example.com (in column 3)

* I find that MS Excel does not always give me a correctly formatted importable CSV file... so I always use Open Office instead - just look and save
* is the upload directory writable by the user the webserver runs as? Not sure where that lives in Wordpress; in Drupal it's files/civicrm/upload

---
Tags: contacts, import
---


title: Create Report From Scratch?

text:
# Question
Title: Create Report From Scratch?
In the reports section, I see that I can change and adjust default reports. Is there a way for me to build a report entirely from scratch?

# Answer
> 2 votes
Via the UI, you'll need to create reports using one of the templates available (e.g., from /civicrm/report/template/list?reset=1 ). If you have coding experience, you can create custom reports from scratch, yes. Here is the report reference from the Civi wiki: https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference

# Answer
> 1 votes
Yes, you can make a CiviCRM Extension. Within that extension you can make a (or more) custom report(s).

For more info about creating the extension: https://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension

For more info about creating the report within the extension: https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addareport

# Answer
> 1 votes
I never start from scratch! I always look for a core report that mostly closely resembles what I need to do - then I clone that and start from there to add in my fields (columns), my filters, group by, from, display alter etc.

---
Tags: reports
---


title: CiviSMS extension

text:
# Question
Title: CiviSMS extension
I am running CiviCRM 4.7.6 on Drupal 7.43 on a CentOS 7 platform. I need to install CiviSMS with the Twilio and am running into a problem with the PHP version requirement of 5.5. CentOS natively has PHP 5.4.16. Can anyone advise on a better platform that gives me the ability to run CiviSMS?

# Answer
Depending upon your hosting, you might be able to upgrade PHP on your CentOS server. A quick Google search showed some options, but I can't vouch for any particular guide.

I tend to work more on the Ubuntu/Debian side of things, and Ubuntu 14.04 LTS ships with PHP 5.5.9 out of the box. (And Ubuntu 16.04 gives you the option of PHP 5.6 or PHP 7.0, which isn't yet supported by CiviCRM.) If you aren't set in your ways, you might try switching over.
> 1 votes

# Answer
I don't think whatever PHP requirement you have is coming from CiviCRM or the Twilio extension. CiviCRM definitely doesn't require PHP 5.5 - and the Twilio code hasn't really changed for years, so I can't imagine that requires it either.

Please post a screenshot of the screen that says you need PHP 5.5 and maybe folks can help you more.
> 1 votes

---
Tags: installation, civisms
---


# Question
Title: in-house civicrm install - but remote email install?
I've got a decent sized database (170,000 contacts) and I've been thinking lately of ways I could speed it up. Right now I'm on a VPS host with 4GB of ram and it runs... pretty good actually. But there are a handful of things that do take a while. So, I'm looking at upgrading the server to 8GB, but that increases our monthly costs of course.

So, I started thinking about running civicrm locally in my office. I have a spare computer laying around the office the office that would run a LAMP stack REALLY well and would run this civicrm install really well. I could probably put 16GB of ram in it for pretty cheap. This would work really well for us as we only use it as a private constituent management. We don't use contributions or events so people from the outside world don't really need to touch it. We do import contributions and events when needed and that works really well.

The one thing people do from the outside world is click on our emails. We send out approx 250,000 emails a month from this server and that click/read/unsubscribe data is super valuable to us.

So my question is: how could I go about running my local database but still use my cloud host to track and I guess sync back to my local database for click events and email opens events? Is this even possible? Even if I switch to using a 3rd party smtp, the click events are still based on the CMS civicrm install, right?

Thanks for your help!

# Answer
you could have a look at an extension called CiviProxy we developed a while ago. The major focus is on security as it enbables you to run CiviCRM without having to make your environment publically available.

However, most interesting for you is probably the fact that it enables pass-through of tracking data on opening and click-through rates as well as Sign-on and off of your newsletter (Webpage templates).

Please find more information on the github page and in this recorded video presentation.
> 1 votes

---
Tags: civievent, civimail, mailserver
---


title: Payment area disappeared

text:
# Question
Title: Payment area disappeared
We've had a CiviCRM site running for a while. Just recently our payment area is missing on all our events, contribution pages, and membership pages. As such, people cannot select to do Paypal, credit card (Authorize.net), or pay later.

Here's an event: https://www.zendust.org/civicrm/event/register?id=158&reset=1

Here's the donate page: https://www.zendust.org/civicrm/contribute/transact?reset=1&id=3

I completely cleared out any custom template pages we had in our CiviCRM files directory. This is a fresh install of Civi - I had to do the whole database dump and then into a new database and then run the updates, as updates were failing. I don't know if this has been an issue ever since we redid the database or not, as folks just noticed it.

# Answer
I just took a look at your pages. If you select a pricing level (which generates an amount due) the options for payment type appear. These options are hidden until there is a total amount due. For your event since there is only one price you may want to make it default.
> 1 votes

---
Tags: payment-processor
---


# Question
Title: CiviBooking menu doesn't function correctly
I was going to do some testing with the CiviBooking extension but have found that after installation the new menu item is non-functional.

I had a copy of the extension from some time earlier but I hadn't found time to test yet. In case I had an outdated copy, I uninstalled, took the latest Zip from the GitHub repo, reinstalled, cleared caches. I still have a menu item that displays funny and doesn't have any hover functionality:

Has anyone else experienced the same, and if so, how did you correct it?

# Answer
> 2 votes
Further research indicates this may possibly be due to the fact that there does not seem to be support for CiviBooking beyond CiviCRM 4.4 currently.

# Answer
> 0 votes
Have you tried our latest beta release? If not, please use this link here. https://github.com/compucorp/civibooking/releases/tag/v1.5beta

This is version is compatible with latest 4.6.

Please report back if any issue persists. Thanks.

---
Tags: menu, civibooking
---


# Question
Title: How can we Make separate option for standing Orders
Is there any way to make a separate option for the orders which are not delivered yet or standing orders in civi.

Thanks in Advance

# Answer
> 1 votes
Yes you can add a new payment method - Standing Order

Steps: Administers -\> System Settings -\> Option Groups

Look for "Payment Methods" - Edit the option and add a new payment method and call it as **"Standing Order"**

I guess this helps!!!

---
Tags: civievent, civicontribute
---


# Question
Title: how do I set up the Moneris mpgClasses.php file to work with my wordpress install
http://java-prod.civicrm.osuosl.org:8090/confluence/pages/viewpage.action?pageId=124813669

This is what I've been using, I have the php file placed in the packages/services folder, but Moneris is not showing up as an option for Payment Processors still.

rchapman

# Answer
> 1 votes
I haven't used it myself, but a quick search pulled up this extension by Alan Dixon and this related post: Does the core Moneris payment processor work?

Also, have you looked at the documentation?

I hope that helps.

---
Tags: wordpress, payment-processor, moneris
---


title: Where is the membership id?

text:
# Question
Title: Where is the membership id?
Hi I am testing updating memberships via the front-end 'import memberships'tool. The \[membership id\] is required in order to do this. For the life of me I cannot find a way to get it out of Civi (cannot go inot the db, need to stick to stick to the frontend interface for users).

It's not on screen, not available as a field on membership reports, not available to set up as a profile view...

We are on 4.6.12 Any tips appreciated.

# Answer
1. Go to **Membership \> Find Memberships** and perform a search.
2. Select **All XX records**
3. From the action menu select **Export members**
4. Choose **Select fields for export** and **Continue**

You can then choose to export the **membership ID**, **membership type**, **membership start date** (all of which are needed to update a membership) and contact ID or Display Name or whatever else you need to match the memberships in the database to your external list of memberships.
> 4 votes

---
Tags: civimember
---


# Question
Title: How can I add Mailing Date to the Mail Details Report?
I would like to include extra fields in the Mailing Details report, especially the Mailing Date. Please can you advise how i get access to fields that are not showing. We are using version: CiviCRM 4.6.18.

# Answer
> 2 votes
I used a combination of these four resources to learn how to customize reports to add columns and filters etc with some tenacity and very minimal php and mysql background:

https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference

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

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

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

The basic steps are, create .tpl and .php files based on a report that is close to you what you want (mailing details in this case), add the little chunk of code into the .php file under "columns" section and under "filters" section as detailed in the resources above, drop these two files into your websites custom templates and custom php directories, and register them with civicrm.

---
Tags: civimail
---


# Question
Title: How do I search for all unsubscribed e-mails across any/all groups
Newbie question: How do I search for all unsubscribed e-mails across any/all groups?

I would also like to mark e-mail addresses if they're unsubscribed from an imported list. How do I do this?

Thanks!

Adam

# Answer
Not sure what version of Civi you are on (I'm on 4.7.9), but take a looking under Reports \> Mailing Reports \> Mailing Detail Report - I think this will give you a good solid list to work with (see attached screen shot for available columns) - on the filters tab you also have the option to filter by group.

Hope this helps! Tamar
> 3 votes

# Answer
I just tried a few things, and I don't think this is possible out of the box! If you're a coder, you could write a custom search to do this. Or you could query the MySQL database. The `civicrm_group_contact` folder has the info you want in the `status` field.
> 1 votes

---
Tags: civimail, unsubscribe
---


# Question
Title: Retrieve all phone info through PHP object-oriented API
How can I retrieve all the phone numbers for a contact using the PHP object-oriented API? I'm only seeing the primary phone available in the API explorer. I want to be able to create a directory of everyone in a certain group, including all their phone numbers, with labels like "home", "work", "mobile".

My query currently looks like this:

```
$api->Contact->Get(array(
             'group' => 6,
             'sequential' => 1,
             'rowCount' => 100,
             'return' => 'custom_4,display_name,email,phone,'.
                   'street_address,city,state_province,postal_code',
             'sort'=>'custom_4,last_name,first_name'));

```

Thanks.

# Answer
If you look in CRM\_Contact\_BAO\_Query, it looks like it takes the "location" return property into account when considering primary, but location is an array but using the api you'd have to somehow put it in the return string, so I'm not sure how you'd specify it.

If you're willing to stray a little from the official api, there is the less official CRM\_Contact\_BAO\_Contact::retrieve(). So something like

`$params = array('contact_id' => 4); // 4 is an example, use the desired contact id
$defaults = array();
$contact = CRM_Contact_BAO_Contact::retrieve($params, $defaults);`

And then there's an array under $contact-\>phone
> 1 votes

---
Tags: api, phone
---


title: Payment Automation

text:
# Question
Title: Payment Automation
1) Is There any way to make a client payment contribution automatically on the due date so he/she does not have to do that manually.

2) Or can we setup a monthly standing order of £50 and every month by CRON the system will create these donations for her against that person.

Thanks In Advance

# Answer
Aman, you will want to look at Recurring Contributions. If this is not what you are looking for please clarify your question.

Thanks, Steve
> 2 votes

---
Tags: recurring-contributions
---


# Question
Title: How to keep track of our constituents' nominations/awards
We're trying to setup Civi in our organization and one of the things we keep track of is the awards our members get and their nomination to said award.

Each award has a name, description, set of requirements, deadline (usually annually), contact, and whether it is still active or inactive.

In the current setup (using access db), there's a separate table with the list of all the awards (~400) and it's unique id is referenced in the contact's information, along with the nomination date and whether contact received or not. Multiple members could also be nominated or win the same award.

I was thinking that in Civi, we could have a custom field set for individuals with the award name, date of nomination, and whether awarded or not. I think this is easy enough to implement. Another thing we thought of is to have a custom activity type with custom fields associated to it.

However, we'd like to have all the possible awards also available for reference and for lookup so the users don't have to type manually the award name--which is a common source of mistake and spelling errors.

Also, some awards are given by an organization and an organization could potentially give multiple awards. That's why the list is very long.

Is there a better way to do this in Civi?

Sorry if the description is confusing, but i tried to describe it as best I can.

Thanks!

# Answer
You could use/abuse a new Contact Sub-Type based on Organisation for your awards and use one or more Relationship Type to indicate who got nominated/awarded award with the dates. Or you could use a Contact Reference field rather than a relationship (but you don't get the dates option then).
> 1 votes

# Answer
Pete's idea is a pretty good one. If you have access to a coder, you could also make an "Award" entity - but that's a LOT more work.
> 0 votes

---
Tags: custom-fields
---


# Question
Title: How to control access to a Panel or View in Drupal based on CiviCRM Activity or completion of webform
I would like to control access to audio from a recent conference based on completion of a feedback form (webform).

I have created an Activity type for the feedback and added that completed activity to the contact upon completion of the form.

I would like to allow access to the audio content for those contacts with that completed activity, but can't see any Civi fields to operate on in Views (Filters, Contextual Filters, or Relationships) or in Panels (Selection Rules).

I'd prefer to use the selection rules in panels to do this, but will go with whatever works first!

I'm sure I've filtered on Civi stuff before in Views and I know everyone else does. Not sure what's going on.

I've moved the database to a new server recently and tacked it onto the back of a different Drupal installation, but I've addded the requisite lines to settings.php and the other Civi integration modules work, e.g. Rules. CiviCRM is working fine and I can integrate with Webform.

I'm using Drupal 7.43 and CiviCRM 4.7.6.

Thanks, Lewis

# Answer
I'd handle this by adding folks to a smart group with the selection criteria being those who have the activity associated with the completed webform. Then use Group-Role synchronization to add folks to a role, and restrict access based on role.
> 2 votes

---
Tags: cms-integration
---