# Question
Title: Sort Criteria for civiCRM custom in Drupal View
I created a drupal view to display contributor names. The view displays civicrm fields, both custom fields I have created and out-of-the-box civicrm fields.

The contributors are displayed according to the amount of their contribution. For instance, there are "Gold" contributors at the top, then "Silver", then "Bronze" etc.

The categories that contributors should be displayed within is not related to the total amount of the contribution. So, for instance, I have a "Silver" contributor that gave more than a "Gold" contributor (for reasons related to an event).

The problem is how to sort the fields so that the "Gold" group displays higher up than the "Silver" group. I cannot use Total Amount (desc) because of this silly Silver contribution that was more than the Gold contribution.

I tried creating a custom field where these groups of contributions were simply assigned numbers, so Gold=1, Silver=2, Bronze=3, etc. When I use this criteria to sort, desc will put the Gold after Silver, so that it is highest in reverse order. But when I use asc, which *should* put Gold at the top, instead Gold is after Silver.

This is driving me nuts. I realize it's pretty convoluted, so it's possible no one will actually read to the end. But there has to be a way to do this.

# Answer
> 2 votes
I did read all the way down!

Try Adding a Global PHP field under Sort Criteria-\> you can then use PHP to say -\> Gold=1, Silver=2 and Bronze=3; And indicate you want to sort Ascending.

If you need a hand with the PHP - let me know.

# Answer
> 0 votes
Not sure I fully understand what you are seeing, but are you meaning it is sorting as Bronze, Gold, Silver and Silver, Gold, Bronze? ie alphabetically on the label rather than on the value? If so, and if you don't care too much about the labels you could relabel them as '1 - Gold', '2 - Silver', '3 - Bronze'

# Answer
> 0 votes
A simple work around would be to create three separate view blocks, one for each group, and then combine them in your favourite manner (e.g. context, block visibility, or the view field that pulls in other views, etc.)

Here's an example: https://casrai.org/reconnect16 (the sponsor blocks at the bottom of this page).

---
Tags: civicontribute, custom-fields, drupal-views
---


# Question
Title: New install, system status says "cron not running" and "timestamp mismatch"
Running CiviCRM 4.7 on WordPress 4.7.3, hosted on a shared Linux server at 1and1.com. The WordPress site is using PHP 7.0 but apparently the latest version I can use from the command line is 5.5.

Two problems (perhaps related?)

The system status screen says "Cron not running". Cron is running. I currently have crontab sending me an email every 15 minutes using the cronTest.php file which contains this:

```
<?php mail('cronuser@gmail.com','Cron Job Test Script',phpversion()); ?>

```

That is working, sending me the email and reporting PHP version 5.5.38.

I'm also trying to use cli.php to execute the CiviCRM Job, but that doesn't seem to be working.

Here's my whole crontab (with sensitive info changed):

```
*/15 * * * * /usr/bin/php5.5 /mysharedserver/homepages/34/d11111111/htdocs/cronTest.php
*/15 * * * * /usr/bin/php5.5 /mysharedserver/homepages/34/d11111111/htdocs/mysubdir/wp-content/plugins/civicrm/civicrm/bin/cli.php -s mydomain.org -u cronuser -p cronuserpassword -e Job -a execute

```

I have also tried wget in crontab without success:

```
0 * * * * wget -O - -q -t 1 'http://mydomain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php'?name=cronuser&pass=cronuserpassword@&key=mysitekey

```

I also tried wget with the single quote after the site key.

The timestamp error in CiviCRM system status says:

```
Timestamps reported by MySQL (eg "2017-04-11 14:58") and PHP (eg "2017-04-11 18:58" ) are mismatched

```

I have checked the PHP time using `date_default_timezone_get()` in the folder where WordPress is installed, and using SQL `CURTIME()` and `CURDATE()`, the times and dates match -- both show the time and date in New York. I have also created a php.ini in the directory where WordPress is running, with a directive setting the time to America/New York:

```
date.timezone = "America/New_York"

```

So CiviCRM must be getting its PHP time somewhere other than in the directory where WordPress is installed? I thought maybe that would be the directory where PHP 5.5 is running, so I tried running the PHP function date\_default\_timezone\_get() in /usr/bin/php5.5 and got:

```
X-Powered-By: PHP/5.5.38 Content-type: text/html date_default_timezone_set: America/New_York

```

Using this SQL command:

```
SELECT @@global.time_zone, @@session.time_zone

```

I get SYSTEM for both values. I haven't pursued the SQL question any further than that, since the SQL time seems correct (New York time).

I'm looks to me like the PHP time is the problem, but I'm not sure where to go from here.

# Answer
> 1 votes
The first thing I would check is the TimeZone setting in WP. Go to Settings--\> General. That cannot be the default (UTC +0) as the default does not exist in php (UTC does, but not UTC +0). That should solve the TZ mismatch. Best to use one of these - http://php.net/manual/en/timezones.america.php for NY I'd use `America/New_York`

As far as cron, I recommend that you set it using the wp-cli method as detailed here: https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

---
Tags: wordpress, php, cron, sql, timestamp
---


# Question
Title: I would like to categorize the Contribution pages
I would like to categorize the Contribution pages. How can I use Tags or Groups for that?

# Answer
Welcome! Tags and Groups are concepts that apply to Contacts, not Contribution Pages. It depends what you want to do with the categorization, but Campaigns may be useful.

If you don't see Campaigns in the top menu, you may need to enable the CiviCampaigns component at `Administer > System Settings > Components`
> 3 votes

---
Tags: civicontribute, contribution-page, civicampaign
---


# Question
Title: Search builder: searching for Not equals or Not In with tags or groups doesn't include Null
In Search Builder, if I search for contacts with a particular tag then the output returns the contacts with that tag.

If I then invert the search using 'Not In' or 'Not equals' it shows all the contacts who don't have that contact, but only **from the overall set of contacts who actually have a tag**. In other words, instead of searching the entire database for contacts who do not have that tag, it only searches all the contacts who have tags, and who in addition don't have that tag.

I believe the same applies to Groups.

This is very unintuitive behaviour; one would expect 'not in' or 'not equal' to apply to the entire database since everything else on all search screens does.

In fact, my SQL friends tell me that this is standard behaviour for searches across related tables; you should append an 'Or Null' query to any such searches if you want results returned from the entire database.

However, this would be too much for our non technical admin users to comprehend! Yet they regularly want to find people who don't have one particular tag or aren't in one particular group.

Is there a work around so that 'Not' searches of tags or groups can nevertheless search the entire database?

We're using 4.6.24 and Drupal 7.54. I'm hopeful of a clever work around to this! Thanks for your thoughts.

# Answer
Search Builder is more 'raw' and I find end-users are best to avoid it!

`Search > Custom Searches > Include / Exclude Search` will do what you want.

Once you have the results you could save it as a smart group for future use.
> 3 votes

---
Tags: search-builder
---


# Question
Title: Is it possible to change custom group/custom field Entity Scope from just individuals to individuals and households (or ANY)?
I have an existing field for the donor name to show in printed materials. It was set up **just** for Individuals. The Custom Group has only this one field in it. Several reports/profiles/templates already use this field. I **also** want this same field available for households. If household data (or organization data) is pulled, I'd like to be able to have this field available, and I'd like to be able to update it. Table: `civicrm_custom_group` shows the help text for the column in question as: **extends** *Type of object this group extends (can add other options later e.g. contact\_address, etc.).* `Individual` is the value currently. Can it hold more than one type? Can it be changed? Is there a way to have the same custom field for more than one type of entity?

# Answer
> 1 votes
An old question, but an answer might still be useful to someone ...

If you had set the Custom Group to extend 'Contact' then it would be available for Individuals, Households and Organisations. But you can't change the extends (Used for) setting via the GUI after creation.

Two options:

1) Create a new Custom Group used for Contacts. Then:

* go to the old Custom Group, View and Edit Custom Fields,
* on the relevant field click More then Move
* select the new Custom Group.

2) Modify the `extends` parameter via the API. For example, use the API explorer:

* set Entity to CustomGroup
* set Action to get
* Execute
* find the right Custom Group and note it's id
* change Action to create
* change Parameter to Custom Group ID = the id you just found
* add Parameter, Custom Group Extends = Contact
* Execute

Be aware that the API lets you do things that the GUI does not, and it is possible to break your system in nasty ways with it. Just because the API lets you change something doesn't mean you should!

---
Tags: custom-fields, database, households
---


# Question
Title: Payment processor, avoiding payments being rejected due to 'transaction is a duplicate'?
Are other people seeing the error message:

> Payment Processor Error message: 9003: It appears that this transaction is a duplicate. Have you already submitted the form once? If so there may have been a connection problem. Check your email for a receipt from eWAY. If you do not receive a receipt within 2 hours you can try your transaction again. If you continue to have problems please contact the site administrator.

We are using the Eway Payment processor and CiviCRM.

We had a donation and a membership submitted at the same time and we had the donation go through but not the membership. The membership seemed to fail regularly so I rebuilt the form with profiles and captcha. We are still getting this error.

I can see the error message in the code. https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment/eWAY.php. It looks as though it is checking for a unique invoice id. Is there a way to manage the way invoice id's are created that we are not managing correctly? Is it a race condition?

CiviCRM 4.7.17.

The http server logs (cleaned up) from this IP address are:

```
[06/Apr/2017:16:02:32   +1000]  POST /civicrm/contribute/transact HTTP/1.1  200 16030   https://www.colongwilderness.org.au/civicrm/contribute/transact?reset=1&id=1
[06/Apr/2017:16:05:07   +1000]  POST /civicrm/contribute/transact HTTP/1.1  200 15965   https://www.colongwilderness.org.au/civicrm/contribute/transact
[06/Apr/2017:16:05:36   +1000]  POST /civicrm/contribute/transact HTTP/1.1  200 15947   https://www.colongwilderness.org.au/civicrm/contribute/transact
[06/Apr/2017:16:06:05   +1000]  POST /civicrm/contribute/transact HTTP/1.1  302     https://www.colongwilderness.org.au/civicrm/contribute/transact
[06/Apr/2017:16:06:34   +1000]  POST /civicrm/contribute/transact HTTP/1.1  302     https://www.colongwilderness.org.au/civicrm/contribute/transact?_qf_Confirm_display=true&qfKey=d30c3a51b960fea81a73d70d656af1a9_8907

```

It is referring back to itself which I can't explain.

A working test (form 4 not form 1)

```
[07/Apr/2017:05:10:25   +1000]  POST /civicrm/contribute/transact HTTP/1.1  302     https://www.colongwilderness.org.au/civicrm/contribute/transact?reset=1&id=4
[07/Apr/2017:05:10:59   +1000]  POST /civicrm/contribute/transact HTTP/1.1  302     https://www.colongwilderness.org.au/civicrm/contribute/transact?_qf_Confirm_display=true&qfKey=37ea51cf5a1e3f5197f136c5801cba2f_4643

```

The log does show that the contribution was being made on an old form that I had replaced.

This form only uses the inline options for donations and memberships. Thew new form uses price sets.

Old form configuration

With a membership section

# Answer
It has been confirmed by @petednz and by testing without the 'Separate membership payment' option, that unsetting this option resolves the 'transaction is a duplicate' error.

In our case the membership types were moved out of the form into a price set.
> 1 votes

---
Tags: civicontribute, payment-processor, eway
---


# Question
Title: "Cron not running" (but it is), trying to use wp-cli in crontab, with WordPress
Running CiviCRM 4.7 on WordPress 4.7.3, hosted on a shared Linux server at 1and1.com.

CiviCRM System Status screen says "Cron not running" even though it is.

Trying to use wp-cli in crontab

`wp help` at the command line brings up the list of wp-cli commands.

Ran wp --info and got

```
PHP binary: /usr/bin/php5.5-cli
PHP version:    5.5.38
php.ini used:   /usr/lib/php5.5/php.ini
WP-CLI root dir:    /usr/share/php/wp-cli
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 1.0.0

```

So tried this in crontab (sensitive values changed):

```
*/2 * * * * /usr/share/php/wp-cli --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/mysite/ civicrm api job.execute auth=0

```

Didn't seem to work, so I tried this from the command line:

```
/usr/share/php/wp-cli --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/ysite/ civicrm api job.execute auth=0

```

And got:

```
/usr/share/php/wp-cli: Is a directory

```

There is a `wp-content/plugins/civicrm/wp-cli` directory. I tried using the full path to that instead of `/usr/share/php/wp-cli` but the same results.

Any suggestions would be welcome!

# Answer
> 2 votes
`whereis wp` showed `wp: /usr/bin/wp`, so I tried that in crontab and the problem appears to be solved!

System Status no longer says cron is not running and the "Last Run" column on Scheduled Jobs listing shows that the jobs have run.

successful crontab entry:

```
*/15 * * * * /usr/bin/wp --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/mysite/ civicrm api job.execute auth=0

```

---
Tags: wordpress, cron
---


title: how to edit WordPress Base Page

text:
# Question
Title: how to edit WordPress Base Page
I have an installation of Wordpress.Civicrm which I have copied to another server using a different domain name

It works great, except the WordPress Base Page is still set at the old domain name and I cannot find where to edit it

I have searched the database and the files, and cannot resolve this it is shown on `my_website_domain/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fuf&reset=1`

I want to change it

FROM

`my_OLD_domain_name/civicrm`

TO

`my_NEW_domain_name/civicrm`

I hope you can help

thankyou in advance

Neil

# Answer
> 1 votes
You may find this wiki page helpful: Moving an Existing Installation to a New Server or Location

---
Tags: wordpress
---


# Question
Title: Need Token Help for System Message Template
CiviCRM 4.7.15 for WordPress

**Mailings\Message templates\System Message Templates** editing an offline Membership template

This template gets emailed whenever selects Edit or Renew under Memberships for a contact. Edit also allows one to override the status to cancelled, expired, on hold, and 5 other states.

**Question 1.** Should one be able to click on a token and put it into a template? In my case, it shows `</>` Tokens.

**Question 2.** What is the token syntax if you were able to click on one in the token dropdown? I need the address, so I assumed {address.street\_name}, but this does not work nor does {$address.street\_name}.

**Question 3.** Why does {$membershipStatus} show the previous status instead of the current one? Is there another token for the current status?

**Question 4.** {$cancelled} does not follow the Membership status of cancelled. What does it represent?

**Question 5.** Does anyone else feel that the text-area provided for editing is a little too small? A Message Preview option would be so helpful.

# Answer
A.1

* in my 4.7.x test the dropdown arrow to the right of works to show me the tokens, but does not result in them being inserted. In my 4.6 test this did work (which suggests a JIRA issue might be needed for 4.7 but can't test on dmaster as the drupal permission has not been assigned)
* in my 4.6.x test the dropdown arrow to the right of works to show me the tokens, and does result in them being inserted.

A.2 address type tokens are {contact.country} and {contact.street\_address}

A.3 I don't see any membership based tokens listed. I believe we - Fuzion = did an Extension that can help with this - try this one

A.4 I don't know and am not sure what you are referencing.

A.5 In the 4.6.x it shows as full width and has a handle in bottom-left corner to drag it bigger. In my 4.7.x test it only shows as half-width but still has the handle. Guess if you are missing the handle you may need to check for js errors or something else like a WP theme issue??

Hope that helps you a bit.
> 1 votes

# Answer
**Question 1.** Should one be able to click on a token and put it into a template? In my case, it shows Tokens.

**Answer:** Yes. Seems to be disabled in 4.7.15

**Question 2.** What is the token syntax if you were able to click on one in the token dropdown? I need the address, so I assumed {address.street\_name}, but this does not work nor does {$address.street\_name}.

**Answer:**

```
{capture assign=address_line_2} {contact.supplemental_address_1} {/capture}
{capture assign=address_line_3} {contact.supplemental_address_2} {/capture}
{capture assign=address_suffix} {contact.postal_code_suffix} {/capture}
{capture assign=line_2_size} {$address_line_1|count_characters:false} {/capture}
{capture assign=line_3_size} {$address_line_2|count_characters:false} {/capture}
{capture assign=suffix_size} {$address_suffix|count_characters:false} {/capture}

{capture assign=casem_member_address}
        {contact.street_address}<br/>
    {if $line_2_size GT 0}
        {contact.supplemental_address_1}<br/>
    {/if}
    {if $line_3_size GT 0}
        {contact.supplemental_address_2}<br/>
    {/if}
        {contact.city}, {contact.state_province}<br/>
        {contact.country}<br/>
        {contact.postal_code}
    {if $suffix_size GT 0}
        -{contact.postal_code_suffix}
    {/if}
{/capture}

```

The supplemental address lines and the postal code suffix are null by default and causes a fatal error in Smarty. (The spinning symbol) However, the above code gets around it.

**Question 3.** Why does {$membershipStatus} show the previous status instead of the current one? Is there another token for the current status?

**Answer:** $contribution\_status\_id does show the correct value for renewals

**Question 4.** {$cancelled} does not follow the Membership status of cancelled. What does it represent?

civicrm\civicrm\CRM\Member\Form\Membership.php lines 1593 to 1603

```
$cancelled = TRUE;
if ($membership->end_date) {
  //display end date w/ status message.
  $endDate = $membership->end_date;

  if (!in_array($membership->status_id, array(
    // CRM-15475
    array_search('Cancelled', CRM_Member_PseudoConstant::membershipStatus(NULL, " name = 'Cancelled' ", 'name', FALSE, TRUE)),
    array_search('Expired', CRM_Member_PseudoConstant::membershipStatus()),
  ))
  ) {
    $cancelled = FALSE;
  }
}
// suppress form values in template.
$this->assign('cancelled', $cancelled);

```

Likely the answer has to do with the fix for CRM-15475.

**Question 5.** Does anyone else feel that the text-area provided for editing is a little too small? A Message Preview option would be so helpful.

**Answer:** Alas in the WordPress version, only certain pages are using the chkeditor boxes which can be expanded by the user. I guess they have not propogated these boxes into the Message Edit pages.
> 1 votes

# Answer
Q1 was a regression introduced in 4.7. It gets fixed by applying https://github.com/civicrm/civicrm-core/pull/10149 change.

JIRA filed here - https://issues.civicrm.org/jira/browse/CRM-20418
> 1 votes

---
Tags: wordpress, tokens, message-templates
---


title: Looking for a CRM solution

text:
# Question
Title: Looking for a CRM solution
: I am needing a quote. This will be for a political campaign that I serve as the IT Director. Needing software that allows integration of volunteers, their info, can send text or email, etc all from one place

# Answer
> 3 votes
Have a look at https://civicrm.org/partners-contributors and contact directly the providers that are in the country or provide the type of services you need

---
Tags: evaluating-civicrm
---


# Question
Title: Using API to retrieve contact records by modified date
I basically have the same questions as described in these topics https://forum.civicrm.org/index.php?topic=22774.0 https://forum.civicrm.org/index.php?topic=24121.0

I would like to know which parameter to use in an api call url to get the last modified date in the list of returned fields

and

which parameter to add to an api call url so that it only returns the contacts that where created/modified since a specific date (or if this isn't possible: the parameter for all contacts created since a specific date, and the parameter to get all contacts modified since a specific date).

Thanks!

# Answer
> 3 votes
You can use `modified_date` in `Contact.get` eg:

Return the date:

```
$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'return' => array("modified_date"),
));

```

Search for Contacts modified after a date:

```
$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'modified_date' => array('>' => "2017-04-12"),
));

```

The API explorer is useful for exploring things like this.

---
Tags: api
---


title: How to make home address default?

text:
# Question
Title: How to make home address default?
The billing address of the user is always the default in CIVICRM. I really need the home address to be default. Is there a way to do this?

The billing address is generated from the payment processor, so paypal standard or ubercart.

Drupal 7. CIVICRM 4.5.8.

Thanks, Andy

# Answer
You can set default Location Types From this menu:

Administer\>Customize Data and Screens\>Dropdown Options\>Location Types
> 2 votes

---
Tags: contacts, addresses
---


title: WYSIWYG Custom field Post Help text

text:
# Question
Title: WYSIWYG Custom field Post Help text
Is there a way to have custom field Post Help text HTML formatted? Not even new lines are recognised and it makes the help text very difficult to read.

# Answer
> 1 votes
I'm afraid the answer is "no you can't configure that to allow HTML tags". If you need lots of Help text put most of that into the 'Body' on the Event Info and/or Event Register and/or Contribution pages - keeping the help text nice and short.

# Answer
> -1 votes
If you're talking about a field on a public-facing profile, you can add a profile "field" of type "Formatting", which can be HTML-formatted. See screenshot.

If you ARE committed to hacking this, I'd do so by inserting a jQuery script into an .extra.tpl file.

---
Tags: wysiwyg, user-interface, user-experience
---


# Question
Title: CiviEvent - Unable to select profiles - get 'custom field is not assigned to the event' warning even though no profile selected
Possibly since the last versions of 4.6 but certainly in 4.7 we're unable to select any profiles for the online registration screen for events. Even for a new event we get the "The selected profile is using a custom field which is not assigned to the "Event" being configured" warning, and we can see only two profiles (Discount Codes and End Dates) - we get this warning even though at this stage we haven't picked any profile.

This is Joomla 3.4.8 and Civi 4.7.1. It's a default Joomla template and I've removed all Civi extensions for the moment. I'm accessing as a SuperUser so it isn't a permissions thing.

Unfortunately the demo server is running Civi 4.6 so I can't try to replicate the issue there.

Any suggestions where I should look?

# Answer
> 2 votes
I had a very similar issue and it was caused by CiviRules. I disabled CiviRules and it worked fine.

# Answer
> 0 votes
This is a bug in CiviCRM. A client of ours had this exact situation, and I opened issue CRM-20419.

TLDR: I wrote a fix here. More technical discussion is below.

The problem is that the profile selector is populated by a jQuery plugin that checks arrays and strings to see if they're empty by using a method designed for checking whether objects are empty. The documentation for `jQuery.isEmptyObject()` explains that it may act inconsistently when used with arguments that aren't plain objects.

In this case, it appears that most of time, it returns `true` when evaluating an empty string or array, but in our client's case, it was returning `false`.

There's really no reason to be using a fancy jQuery method to see if an array or string is empty: the `length` property will be `0` if so. The fix linked above just replaces `$.isEmptyArray()` with checking the variable's length whenever the variable isn't a plain object.

# Answer
> -1 votes
I'm running CiviCRM 4.7.15 on Joomla 3.6.5 Not running CiviRules. I have the same problem. I can create profiles that I can use in contribution pages for memberships but, if I enable online registration for an event or for an event template, only the pre-existing, default profiles show up. This means that I cannot collect custom data from event registrants.

---
Tags: civievent
---


# Question
Title: cannot select profile for online event registration after upgrading civi on Joomla
I've just upgraded CIVI on Joomla 3.4.1 from CiviCRM 4.5.3 to CiviCRM 4.6.9 and find that I can no longer select profiles to use for online event registrations when setting up an event.

I also find that when exporting participant records only the FIRST row of the exported csv file contains correct details for yes/no questions asked in existing custom data profiles. All following rows display numeric 1 or stay empty whereas first row correctly displays text "yes" or "no".

I could not replicate this issue on the demo joomla site, which is also Joomla 3.4.1 but running CiviCRM 4.6.0. I suspect the issue would appear on the demo site as well if it had a later version of civi.

I restored my website to pre-upgrade backup, then upgraded to CiviCRM 4.6.0. - This worked fine.

Then I did incremental upgrades of CIVI and all OK up to version 4.6.5 but when going from 4.6.5 to 4.6.6, the ability to select profiles and the odd behaviour with exporting participant data re-occurred.

I therefore suspect that code changes in civi 4.6.6 and onward cause this issue in Joomla installations.

I have found a similar issue that may or may not be relevant (but its too technical for me to be sure) https://issues.civicrm.org/jira/browse/CRM-15427

Is this a bug? if so how to progress it?

# Answer
> 1 votes
I also had a similar issue where I could not select Profiles in Civi. I am on a Wordpress site. I found that Civi had a conflict with my theme (it was not a problem if I changed back to the default theme). In my theme's functions.php file it had the following include which was causing the problem:

include\_once('mkdinc/plugins/visual-composer.php');

I changed it to this:

if(isset($\_GET\['page'\]) && $\_GET\['page'\] == 'CiviCRM') ;//dont include it breaks civi else include\_once('mkdinc/plugins/visual-composer.php');

and the profiles were useable again. Hope that helps.

# Answer
> 0 votes
This appears to be very similar to this other question. A client of ours encountered that exact issue: see this answer to the other question.

As it turns out, some of the problematic code was introduced to address CRM-15427, but some of it is separate.

---
Tags: civievent, joomla, upgrade
---


# Question
Title: Why can't I get tokens inserted in to HMTL or Text fields of System Template Messages
Clicking on the Token under Tokens has zero effect

# Answer
> 1 votes
This was a regression introduced in 4.7. It gets fixed by applying https://github.com/civicrm/civicrm-core/pull/10149 change.

JIRA filed here - https://issues.civicrm.org/jira/browse/CRM-20418

---
Tags: tokens
---


# Question
Title: CiviCRM: how to manage several areas for the same organization?
Good afternoon, we are analyzing CiviCRM as a possible solution for our organization. It is a governmental entity and in the same there is more than one area that is in a position to use CiviCRM to order their contacts. The specific question is how can we implement, so that each area has its own contact management? Some areas may want to share contacts, but each area should only have access to their contacts.

I hope you can help me! From already thank you very much!!

# Answer
The answer to your question depends on some of the details - but most likely you'll want to use ACLs. See here: https://docs.civicrm.org/user/en/4.7/initial-set-up/permissions-and-access-control/.

In some cases, you may want to consider multi-site permissioning - it depends on the size of your database and how much you need to differentiate between different departments. E.g. if you need different departments to create public-facing forms, each with their own "theme", you may want to consider multi-site.
> 1 votes

# Answer
You may find that the Fuzion extension for Permissioned Relationships may be helpful especially if you want an easily managed option where people can be connected to a number of different geographic or hierachial entities.
> 1 votes

---
Tags: groups, permissions, acl
---


# Question
Title: button to receipt not working on live dashboard, does work on print preview screen
something strange is happening at our site. The button to print a PDF receipt is not working on the live dashboard (within the site), it is working though on the print preview of the same page. On the live dashboard the links disappears from the HTML code.

HTML code from the live dashboard:

HTML code from print preview of the same page:

# Answer
Yes, it is working at all of my local installs and some of our customers use this button to actually print invoices using CiviCRM 4.6.24
> 0 votes

---
Tags: dashboard, pdf, receipts
---


title: Ordering Contact Reports

text:
# Question
Title: Ordering Contact Reports
Is it possible to set a specific order for all contact reports? Can they be grouped underneath certain headings making them easier to find? If so, how can I do this?

# Answer
> 1 votes
If you mean to order it on Contact Report section on the Report Page - Not yet from UI(need to write custom), they are actually ordered based on its id.

You can anyway move each report to the navigation menu(Access tab of each Report) and then order it according to your needs from `Administer -> Customize Data and Screens -> Navigation Menu`.

---
Tags: civireport
---


# Question
Title: What is the best way to alter menu permission?
I need different access argument for "civicrm/group/add" For now I found only 2 options: alter Group.xml or with hook\_civicrm\_xmlMenu unset Group.xml and use my own file to defined menus. But it would be nice just to use some hook to alter access arguments. Is there anything like that?

# Answer
Could hook\_civicrm\_alterMenu be what you need?
> 1 votes

---
Tags: permissions, menu
---


# Question
Title: PayPal receipts showing as Pending (Incomplete Transaction)
I have an issue with PayPal receipts. They are appearing as "Pending (Incomplete Transaction)".

I have discovered that there was a fix to the file BaseIPN.php in CiviCRM 4.3, but looking at the modified 4.3 file and my version (4.7), they appear totally different.

The receipt is successfully received in PayPal and the user is taken to the "Thank you" screen, with no errors, however the transaction in Contribution Dashboard is showing as Pending.

Is this a similar problem as was reported in version 4.3? If so, what would I need to change in the 4.7 version of BaseIPN?

Joomla 3.4.8 / CiviCRM 4.7.1 / PHP 5.6 (FastCGI)

PayPal IPN History reports the following:

*Message ID 0T926689FX401850L Date/time created 11/02/2016 16:14 GMT Original/Resent Original Latest delivery attempt date/time 11/02/2016 16:14 GMT HTTP response code 200*

These are the only errors I can see in the log with debug switched on for the same time period. They may be related, or may not...

Feb 11 10:12:36 \[info\] $GET = Array ( )

Feb 11 10:12:36 \[info\] $POST = Array ( )

Feb 11 10:12:36 \[info\] Could not find an entry for txn\_type in POST

Feb 11 10:12:36 \[info\] $error data = Array ( \[error\_code\] =\> 0 )

Feb 11 10:12:36 \[info\] $REQUEST = Array ( )

Thank you.

# Answer
This came up on the old site: Not receiving IPNs from Paypal Standard

Short answer was there were mod\_security rules on my server blocking the IPNs from coming back.
> 1 votes

# Answer
Do you have a firewall installed? I had the same issue, but found out that RSFirewall was blocking PayPal's IPN's, otherpeople have found that the HTCAccess file was blocking them.

Here is the resouce I used to let it through: https://www.rsjoomla.com/support/documentation/rsfirewall-user-guide/frequently-asked-questions/rsfirewall-blocks-paypal-responses.html
> 1 votes

---
Tags: paypal, ipn
---


# Question
Title: Contribution custom field not appearing in New Contribution window
We are planning on migrating from our current membership database to CiviCRM. I am starting to experiment with the system to see how to implement things. I am using version 4.7.17 on WordPress. We want to specify whether a mailed donation came to the station or to our PO Box. I set up a custom data field for contributions (alphanumeric text). It's active and searchable but when I go to the New Contribution window, it doesn't appear. Have I missed something ?

(I know alphanumeric text may not be the best choice, but for now I simply want to figure out why it is not appearing)

# Answer
> 4 votes
Did you make a Custom Field on Contribution of type -any- or did you narrow it down to specific financial type(s)? If that's the case you must select the Type first when entering a new Contribution - to make the Field appear;

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


# Question
Title: Can I disable syncing when WordPress users create accounts?
I have a CiviCRM database on my WordPress site. When new members sign up for our organization they create a CiviCRM account via the profile. Later they create accounts in WordPress to access certain members-only sections of the site. I do not want these WordPress accounts to sync. How can I disable that feature? I am now getting many duplicate records (and I need to allow duplicates as we have individual records -- children -- with same email -- parent).

# Answer
You can unhook CiviCRM's hook callbacks like this:

```
add_action( 'plugins_loaded', 'my_disable_civi_user_sync' );
function my_disable_civi_user_sync() {
    if ( ! function_exists( 'civi_wp' ) ) return;
    remove_action( 'user_register', array( civi_wp()->users, 'update_user' ) );
    remove_action( 'profile_update', array( civi_wp()->users, 'update_user' ) );
    remove_action( 'deleted_user', array( civi_wp()->users, 'delete_user_ufmatch' ), 10 );
}

```

Disclaimer: this is untested code. You may need to hook into a later action, e.g. `init`.
> 1 votes

# Answer
When members sign up you can give them the option of creating a WordPress account at that time. It is in the Advanced Settings of the profile. You can give the option or require account creation.

This will not stop the sync but should reduce the number of duplicates.

Hope it helps...
> 0 votes

# Answer
From reading between the lines of your question, I think you're taking the wrong approach. Rather than not syncing the contacts, why not prevent deduplication unless the names, DOBs, and the emails are the same? This is doable through the interface, allows you to have genuine matches between accounts where correct, and meets the need you stated.
> 0 votes

---
Tags: wordpress
---


title: Civicrm search results page URL

text:
# Question
Title: Civicrm search results page URL
How can I save the Civicrm search results page URL to link to it directly later from any account. At present the link we get is based on the qkey that does not work once we logout and login later.

We want a URL that takes us directly to search result page & we should be able to pass filters also in the URL like date range etc.

# Answer
> 7 votes
I don't think it helps with passing the filters in the URL, but you can save the search as a Smart Group and then use the link to the contact list for that group. I think you can strip of the qfkey portion of the URL in this case. Something like this (although this smart group on the demo site will be deleted shortly, the URL structure is what I want to show):

http://d46.demo.civicrm.org/civicrm/contact/search/advanced?force=1&reset=1&ssID=1&context=advanced

# Answer
> 5 votes
CiviCRM search pages don't accept filters from the url, but Drupal Views can. If you are using Drupal as your CMS, try that.

# Answer
> 4 votes
I wanted to leave a comment here because I came across this post looking for a this answer, and it may help someone else. (So this is probably only helpful to you as a clue, rather than as a complete answer to your question -- I'm not sure what types of queries you're trying to save.)

I was trying to do something similar with saving the URL of an advanced search to my navigation. My goal was to display results as Memberships (rather than the default contacts) and filtering by contacts in a certain group. (backstory: I needed to display as Memberships so I could export a file \[using a saved field mapping\] for printing membership cards, and I couldn't access membership info when exporting the contact only.)

This is the url that ended up working (not using qfKey! -- **it works in different sessions**):

```
[myurl]/administrator/?option=com_civicrm&task=civicrm/contact/search/advanced&option=com_civicrm&_qf_Advanced_display=true&component_mode=5&gid=41&force=1

```

(After clicking the link, it will append the qfKey to the url, but whatever.)

I'll try to break it down, but I don't necessarily know the full extent of these options.

`component_mode=[#]` is the "display results as" in the search criteria. 5 is Memberships, so that's what I'm using. Here is the inspect elements from my search form (caveat: I have some components disabled; this may change in future versions; etc. so... double check this):

```
<select class="crm-select2 crm-form-select" name="component_mode" id="component_mode" tabindex="-1" title="Display Results As" style="display: none;">
    <option value="1">Contacts</option>
    <option value="2">Contributions</option>
    <option value="4">Activities</option>
    <option value="5" selected="selected">Memberships</option>
    <option value="6">Cases</option>
    <option value="7">Related Contacts</option>

```

`gid=[#]` is the group id that I'm filtering by. I'm not sure what that looks like if you're tying to filter with multiple groups.

`force=1` seems to display results, rather than the search criteria

For other search parameters, you basically just have to dig around in the html using inspect element, and find the name/id of the filter you want to use, and then append that to the end of the url. (As far as I can tell, this works for other filters, but obviously my testing was not extensive.)

# Answer
> 0 votes
Not sure if i understand the OP correctly but we provided a PR so that relative dates would be stored correctly but hasn't been accepted yet https://issues.civicrm.org/jira/browse/CRM-19675

# Answer
> -1 votes
I have the same problem (and no answer) in a different (?) context : I want to follow event participants to regularize those who pay by check.

To do this I make a search based on event and participant role, then I go to partcicpant "modify" to register their payment and update their status.

My organisation can have a lot of different events, each with different managers : I want to pre-customize the search for each event, to ease the manager work and avoid errors.

I don't really know Views, but I don't think it could help, because I need the ability to "modify" each individual participant.

---
Tags: search
---


title: Double Phone Number Blocking

text:
# Question
Title: Double Phone Number Blocking
Our priority is Name Surname and **Phone Number** while we are creating a **New Individual** Entry However when the same info is written, the system doesn't give a warning, which causes to create new accounts with the existed info beforehand. to solve this problem i have examined this essay below but i haven't got the desired results. https://civicrm.org/blog/spidersilk/understanding-civicrm-dedupe-rules

What i want is that the system shall not let me to create New Individual Entry if there is this phone number in somebody's profile already.

Could you please launch a "**Matching Rule for Individual Contacts**" to this.

*Joomla! 3.6.5 - CiviCRM 4.7.17*

# Answer
> 1 votes
Go to Contacts \> Find and Merge Duplicate Contacts \> Add Rule for Individuals and create a 'Supervised' rule - eg:

This probably only works for 'primary' phones rather than checking against all phones of a contact, but unless you have multiple phone numbers per contact, it should do what you need.

# Answer
> 0 votes
What Aidan said, but don't forget to use the Phone Number Validator extension to keep them clean and consistent!

# Answer
> 0 votes
Thanks for information. But.

I've done this before. There is no conclusion. I have the following two examples. Allows registration to be opened even though the First Name and Number match.

It may come different because I make it in Turkish on the screen. :)

**Notice that the same name and number are the same. But the new individual recording was opened.**

# Answer
> 0 votes
"PHONE NUMBER VALIDATION" in order to be able to use it, it is necessary for Turkey to support the countries.

---
Tags: contacts, duplicate-contacts, phone
---


# Question
Title: Best practice: Multiple event types or custom data fields?
I've only been working with Civi for a couple of weeks ...

Say we want to offer three workshops or classes:

1. Basketweaving 101
2. Basketweaving 102
3. Basketweaving 103

And later we want to be able to produce reports to do things like: "Show me everyone who has taken 101 and 102 but not 103."

Would it be better, when creating a new event, to have an Event Type for each of these types of workshops, or alternatively to use the "Workshop" event type and have custom data fields that would allow the registrant to select 101, 102 or 103?

I'm thinking that it may be nice to produce reports that show all workshops just by selecting one workshop type, which would argue for creating custom data fields.

On the other hand, perhaps it's easier doing reporting on standard fields than custom ones, or there may be other "gotchas" with custom fields that I'm not aware of, which would argue for creating multiple Event Types.

Or perhaps it doesn't really matter?

Thanks in advance!

# Answer
> 1 votes
For your reporting perspective, it'll be basically the same. However, the two options would make your registration process very different. This should guide your decision.

If you have a "one-room schoolhouse" model for your classes where one session includes advanced students taking it as Basketweaving 103 as well as new folks registered as Basketweaving 101, the participant custom field would allow for them to choose which one they're registering for. From a logistical perspective, having a single event would make it easier to set a cap on total enrollment, see the full roster, and only have to set the location and time once.

On the other hand, if you have Basketweaving 101 on Tuesday evenings, 102 on Wednesday evenings, and 103 on Saturday mornings, perhaps with different instructors, you'll want completely separate events. You could set up event types for each, or you could have a single event type for all basketweaving and an event custom field for course number. If you have a dozen or more separate courses, you'll probably want to put the course number in an event custom field so you don't have an overwhelming number of event types.

You should be aware that if site visitors have the ability to view event custom fields, the custom field is displayed on the event info page.

---
Tags: civievent, custom-fields, civireport
---


# Question
Title: Legacy SQL Activity and Contacts Dump Transfer
Because of the excessive problem that happened to me on SQL, I had to create a new CiviCRM installation.

How can I transfer the existing Individual profiles and Activities in the old CiviCRM database to this new one?

I want to transfer legacy CiviCRM contacts and events to my new system.

Joomla! 3.6.5 - CiviCRM 4.7.17

# Answer
> 1 votes
For contacts and activities you could use the built in import functions If you want to migrate/import entities for which there is usually no gui (such as events), you could try this extension: https://civicrm.org/extensions/api-csv-import-gui

I am not sure if it works for profiles though. You could of course use the Rest API as well and for example code a script to import everything but the first time this would probably take a while to get your head around.

---
Tags: contacts, import, activities, mysql
---


title: How can I connect to CiviGrant users?

text:
# Question
Title: How can I connect to CiviGrant users?
I am looking for users of CiviGrant who use CiviGrant to administer grants once they have been awarded. We are a new(ish) grant-giving body who already use Civi for managing events and grant applications, and are considering extending our Civi use beyond the application and decision-making stages.

I am looking for organisations who would be willing to talk to us about how they use the CiviGrant system, and what advice they would give. All info would be in confidence.

# Answer
If you are still looking for CiviGrant users, please include your contact info. I'm also looking to connect with other CiviGrant users to share tips etc. I can be reached at edith (at) mrgfoundation.org.

Blog post about connecting to CiviGrant users is at: https://civicrm.org/blog/edith-casterline/calling-all-users-of-civigrant
> 1 votes

---
Tags: civigrant
---


# Question
Title: Update Multiple Activities - Cannot Display "Details" Field
I'd like to be able to update multiple Activities easily. I've prepared a Profile and have activated these fields:

* Activity Date
* Time
* Activity Status
* Subject
* Details
* Duration

All works as expected, except for the Details field which contains the Copy icon at the top of the column, but does not display the fields for each row. Instead the column is blank.

Thinking this may be an issue since Details is a text field, I added a Custom text field called Scratchpad. When added to the profile, this custom field displays as expected.

Any ideas as to why the Details field won't play along correctly?

Thanks.

We're using WordPress 4.7.3 and CiviCRM 4.7.17.

# Answer
Based on above, this seems to be a minor bug or deliberate behavior. I have created an issue https://issues.civicrm.org/jira/browse/CRM-20433 and will close this StackExchange thread.
> 1 votes

---
Tags: profile, fields
---


# Question
Title: Has the Dashboard Cache Timeout setting been moved?
I can't seem to find the Dashboard Cache Timeout setting, which according to my experience and documentation can be adjusted

> by visiting Administer \> System Settings \> Misc and editing Dashboard cache timeout.

But this setting is not to be found at that location, neither on my (slightly dated) out-of-the box 4.7.15 install, nor on the Drupal demo site.

Has this setting been moved or removed as of some version of CiviCRM? If so, how would one go about changing the Dashboard Cache Timeout?

# Answer
> 3 votes
This setting has been moved to each Reports(Access Tab). Major improvements related to dashlet has been done in 4.7.11 version. Hence, if you wish to change the cache timeout.

1. Navigate to any Reports.
2. Click on Access Tab.
3. Enable `Available for Dashboard?` checkbox which displays the setting you need.

---
Tags: 4.7, dashboard, settings
---


title: Civimail token not recognized

text:
# Question
Title: Civimail token not recognized
I have a question, I am running Drupal 7.54 and CiviCRM 4.7.18. I have created an html template with 3 tokens (from Mailings-\>New Mailing) {contact.first\_name} and the two required which are {domain.address}{action.optOutUrl}

My problem is that in html preview of the email, The contact.firstname points to the name of the sender instead to the 1 participant of the group in the mass-mailing option. I wonder why this is happening. Any clues?

The other 2 tokens are filled correcly in html preview

# Answer
That is the expected behavior. The preview replaces tokens based on the the logged-in viewer. If you send the email, the tokens will be replaced appropriately for each recipient.
> 2 votes

---
Tags: civimail, tokens
---


# Question
Title: Is CiviCRM a good choice for a website front end AND membership management?
We are looking for a CMS (or similar) for our Big Band. We need

1. A page for the public to see our next gigs
2. Membership management to keep a list of band members, deputies;
3. An events calendar diary for rehearsals and gigs;
4. A file store so that PDFs of our set lists, music charts etc can be stored and available for all band members;

It's clear to me that CiviCRM would be fine for 2 & 3, but not so clear that it will also cover items 1 & 4.

Any thoughts/help appreciated. Pete

# Answer
welcome to the community.

In short:

Q1. & Q2. are easily met with CiviCRM.

Q3. Can be done with a little effort.

Q4. This would be provided by your Content Management System (CMS). CiviCRM works with Drupal, WordPress, and Joomla!. For this, I'd go with Drupal (with which you could do this through configuration), but this functionality may also be provided by Joomla! and WordPress plugins.

Hope this helps!
> 4 votes

# Answer
**For item #4 -\>** When you run CiviCRM on Drupal it comes with this module:

CiviMember Roles Sync - Synchronize CiviCRM Contacts with Membership Status to a specified Drupal Role automatically.

In a nutshell - here's how this works: someone Logs in -\> Drupal checks with CiviCRM -\> ah this person has Membership A + status = Current; Drupal checks your Rules -\> ah that means this user should get Role = Member A -\> so that user now automatically has all the permissions (and thus buttons) that Member A should have.

This is how you can make really slick Member only content/sections on your CMS/website!
> 2 votes

---
Tags: workflow, administer
---


# Question
Title: How can you add a gift premium to pledge
I may not be understanding CiviCRM's donation model.

There seem to be three separate ways to make monetary donations. Contributions, Pledges and Memberships. Our current fundraisers have a large percentage of people making pledges and sending in the payment later (either as one big check, or with payments over several months). They usually want a gift premium. But there's not a way to add a gift premium to a pledge, only to a contribution. How can I add a gift premium to a pledge ?

This would seem to suggest I have to enter the donations into one of two separate areas. Either as a contribution or a pledge whereas I would like a single way to enter all donations in a single fundraiser. How can I keep all the donations in the fundraiser together in one report.

I am using version 4.7.17 on WordPress.

# Answer
> 1 votes
For our projects we always use Contributions (instead of pledges); in a nutshell we use: Contributions - with Status Pending - and with a receive date in the future.

Added: when you receive a check for eg 3 of such pending Contributions you can hit Edit -\> record the chq payment, update the receive date to the actual one (the one you had was just the 'promised by' one and toggle their contribution status to 'completed'

You can use any of the Contribution reports to find the Pending ones - you can use all Searches e.g. Final all that are Pending this week (may need follow up reminder) - and you can use Premiums.

---
Tags: contributions, pledges, premiums
---


# Question
Title: CiviCRM loads its own copy of jquery. This interferes with WP plugins
I am running Civi on WordPress. I was getting spam registrations. I installed WP-SpamShield which worked great until someone tried to register for an event. This fails saying that cookies and javascript need to be enabled. I backed off to just used SI Captcha Anti-Spam. This work ok for a month or so but then the spam registrations started again. The SpamShield support folks figured out that the problem is that Civi loads its own version of jQuery. They say this is know to be a bad thing to do: https://pippinsplugins.com/why-loading-your-own-jquery-is-irresponsible/

Any one know why Civi does this or how to disable it?

# Answer
> 1 votes
To be clear, the article that you linked to says why it's irresponsible to remove the default jQuery in WordPress. Are you sure that CiviCRM is doing that? My understanding (possibly incorrect) was that Civi just uses its own.

Do you have the console errors that SpamShield was throwing that proves that this is what the error is? This may be a namespacing issue.

# Answer
> 1 votes
I use Google ReCaptcha on our User Login and Contribution pages. Problem solved, No more Spam Registrations. It has been working for several months. Plus it is much simpler for the users to check *I am not a robot* then to do the pictures, letters, numbers mess.

---
Tags: wordpress, civievent, spam
---


# Question
Title: Wordpress / Civi - How to Hide All Menus
Install is latest WP w/Civi plugin. We would like to hide top menus from end users based on roles and use links in the Dashboard instead for limited functions. I've read postings regarding making changes in Drupal permissions but hosting in Wordpress. I've also seen suggestions of modifying the Civi navigation.tpl file.

Any suggestions for a Wordpress install? Thanks!

# Answer
> 1 votes
Install the plugin User Role Editor https://www.role-editor.com/ Then in WP under *Users* you will see *User Role Editor*. Set permissions according to your needs. You can also find Dashboard plugins that will allow you to control what the dashboard looks like based on user roles. I use ABD Dashboard Widget. The downside of this one is that you can only use it to specially control 1 user role. But that is all I need. I use it to simplify/control our contributors dashboards.

---
Tags: menu
---


title: Running WordPress/CiviCRM without cron?

text:
# Question
Title: Running WordPress/CiviCRM without cron?
I have been investigating running WordPress with CiviCRM on a managed cloud server at 1and1.com. It is a LAMP stack, but I have been told that they don't support cron.

This a deal-breaker, true?

CiviCRM needs cron for scheduled tasks, reminders, etc, yes?

# Answer
Yes, you can run CiviCRM on a host which lacks cron functionality. CiviCRM's scheduled tasks can be triggered by HTTP requests made to CiviCRM from anywhere, so you have lots of options.

To do this, you configure cron according to the documentation based on the instructions for using cron via the "URL method".

Do research your options for your existing host fully - you're best off with "proper" cron support if it's available to you, since a simpler setup is going to be more robust. But, if your hosting provider really lacks support for cron, you have other options like:

* Any always-on machine which has cron (including an office mac, or a raspberry pi, or your office NAS or home PVR). UNIX is all around you!
* Hosted cron services like easycron.com
* A Windows scheduled task will do it (adjust Drupal instructions to suit), provided that machine will stay on.
* I heard once of someone setting their cron URL as an RSS feed in their browser, so the browser would trigger it with each update ...

Not recommending that last approach — just mentioning because it shows how you can work around this with a little ingenuity ...

If you do use an external server, beware of forgetting about that cron task - for example if you one day stop using the laptop that's telling CiviCRM to send your emails!

All that said, my recommendation is to **select a hosting provider which supports your software well**, rather than select your software to suit constraints of any given hosting environment. If your host doesn't support core CiviCRM functionality without some outside help, what results could you expect for successful campaigns and advanced functionality in future?
> 1 votes

---
Tags: scheduled-reminders, cron, scheduled-job
---


# Question
Title: Accessing selectedMail in a new controller
I've created a new angular controller

```
angular.module('crmMailing').controller('crmMailingRecurScheduleCtrl', function($scope, $filter) {

```

I'd like to have access to the selectedMail object that other controllers (the ones built with `.factory('crmMailingSimpleDirective'`) so I can use the ID in an API call but I don't have the chops to work out how to go about doing getting access.

Adding selectedMail to the call back params didn't work.

Defining the callback as EditMailingCtrl didn't work either.

Help a noob out?!

Here is the code in case you are interested in more context.

# Answer
`selectedMail` is a function on the `route`´s `resolve` property, I believe you cannot inject it into another controller because the `controller` is instantiated in the route, but you can access the resolve property anywhere injecting the `$route` service like this:

```
...
angular.module('crmMailing').controller('crmMailingRecurScheduleCtrl', function($scope, $filter, $route) {
  var mailing_id = $route.current.locals.selectedMail.id;
...

```

Alternatively the way your directives are defined, the scope value is default to `true`, therefore you should be able to access the parent scope like `var mailing_id = $scope.mailing.id;`, `mailing` is the object holding the mailing settings.
> 1 votes

---
Tags: civimail, angular
---


# Question
Title: How to get Participant Fee as Part of the Total Contribution, using Webform Integration
Using Webform to register Event Participants, how can I get the Partipant Fee (and any other amount part) displayed as a Contribution Item of the "Total" in the Contribution page, like here-under (copied from Webform Event Fees in Combination) ?

# Answer
> 1 votes
I have to apologize : I used a contribution page which was based upon a payment processor which is not compatible with a webform online payment.

With a Stripe payement processor, everything works all-right.

# Answer
> 1 votes
* Step1 on the post you referenced will expose the Participant Fee field to the webform List item
* Step2 sets the amount for it

The lineitems are automatic from there on. I have webform\_civicrms that add on a Contribution (Donation amount) as well as a Membership!

\[UPDATED\] - posting some additional screenshots: I hope this will help you!

1. End Result:
2. The Start page looks like:
3. Note that the Membership and the Event Participant webform fields live on the Start page; the Donation one lives on the Payment page.
4. Start page - webform Elements:

Membership -\> I decided to present all live options - that means it will take the Membership Fee as specified in the CiviCRM Membership Type settings;

Event -\> two pairs: \_participant\_event\_id form key and \_participant\_fee\_amount form key / one pair for each event - I've set these fields to hidden -\> and I've specified a $ amount -\> then when someone selects the event -\> the fee is added automatically.

# Answer
> 0 votes
I'm having the exact same problem. I've got the participant fee activated and set with pricing. But, when you test the form and go to payment, it doesn't show the embedded box with the chosen participant fee. Running 4.7.16. Is there a setting I'm missing? Just wondering if you figured this out Jacques-Marie?

Thanks,

Dina

# Answer
> 0 votes
I've got the answer. You have to use a contribution page along with the event registration page for the box with the amounts to appear.

---
Tags: civievent, webform-civicrm, contribution-page
---


title: Filter event reports by facilitator

text:
# Question
Title: Filter event reports by facilitator
Currently if I want to collate a report on events facilitated by a particular individual (or, say, run by a partner organisation, or any contact with a custom role), I have to go to each event from their contact record, or add each event title to the event 'is one of' filter - it's not possible to filter the event participant list report by a facilitator without limiting the data to that facilitator, and the other event reports (e.g. event summary) can't be filtered by an individual.

Is it possible to build a report to filter in this way? i.e. for a list of events filtered by one contact record, provide data on all event participants.

(I had considered just adding the facilitator as a custom contact reference field, but unfortunately that only allows me to add one contact per field, and there's sometimes more than one facilitator per event.)

# Answer
> 0 votes
I had a client with a similar issue. They resolved it by not adding a facilitator to any events they didn't facilitate.

Assuming that's not a workable workaround for you - it IS possible to generate reports like you're describing, but you'd need to either a) code it (or find someone to code it), or b) use an (often pricey) third-party reporting tool. Come join us at https://chat.civicrm.org if you'd like to discuss custom reporting options - either doing it yourself or finding someone to do them.

---
Tags: civievent, civireport
---


# Question
Title: Is it possible to add just a time as a custom data field for an event?
We want to show multiple dates for the event, each with its own start and stop time.

```
Day 1
  Start Time #1
  Stop Time #1

Day 2
  Start Time #2
  Stop Time #2

```

But in custom data (Administer \> Customize Data and Screens \> Custom Fields), it doesn't seem to be possible to add a field that is just a time without a date.

I realize we could create two fields, each of which contains both a date and a time:

```
Day 1 Start
Day 1 End
Day 2 Start
Day 2 End

```

But we'd have to enter each date twice, extra work and introducing an opportunity for errors in entering the redundant information. For each day of the event, we want to enter three items: the date, a start time and a stop time.

# Answer
> 1 votes
You could create custom text fields, then add these 3 lines of javascript somewhere to your site where it will get loaded on every CiviCRM page:

```
CRM.$(document).on('crmLoad', function(e) {
  CRM.$('input[data-crm-custom="Event_Time:Start_Time"], input[data-crm-custom="Event_Time:Start_Time"]', e.target).timeEntry();
});

```

This assumes you've named the custom group "Event Time" and the fields "Start Time" and "End Time". Adjust the code as needed to match the actual names of your fields (while creating/editing an event, right-click on a field and "Inspect" it - in your console look for the data-crm-custom attribute).

The `.timeEntry()` widget will store the data in human readable format (e.g. 12:53PM). If you prefer it to be stored in a searchable format (so you can sort your events by time, etc) use `.crmDatepicker({date: false})` instead of `.timeEntry()`.

Also be careful you don't load this snippet on *every* page of your website as it will cause an error on non-civi pages due to the lack of `CRM` variable. hook\_civicrm\_coreResourceList is a good choice for achieving this.

---
Tags: civievent, custom-fields, dates
---


# Question
Title: Unable to filter contributions by date in Drupal with views and civicrm_entity
I am trying to use Drupal Views to create a report of contributions. I would like the user to be able to filter the contributions by financial type and by date.

To allow the user filter by date using a simple drop down I have installed the civicrm\_entity module. I have previously used this module to create views for activities and events and was able to filter these by date. However this doesn't work with contributions for some reason.

Using the devel module I have looked at the SQL that is created by views. It appears that for contributions the receive date is converted from unixtime which gives `NULL`. As a result the query returns no results. If you remove the `FROM_UNIXTIME()` and `ADDTIME()` functions from the query, it works as expected.

This is the SQL code for the activity view, which works fine:

```
SELECT civicrm_activity.activity_type_id AS civicrm_activity_activity_type_id, civicrm_value_publication_details_5.type_of_publication_8 AS civicrm_value_publication_details_5_type_of_publication_8, SUM(civicrm_value_publication_details_5.publication_price_9) AS civicrm_value_publication_details_5_publication_price_9, COUNT(civicrm_activity.id) AS id
FROM civicrm_activity civicrm_activity
LEFT JOIN civicrm_value_publication_details_5 civicrm_value_publication_details_5 ON civicrm_activity.id = civicrm_value_publication_details_5.entity_id
WHERE (( (DATE_FORMAT(civicrm_activity.activity_date_time, '%Y-%m') >= :civicrm_activity_date_filter AND DATE_FORMAT(civicrm_activity.activity_date_time, '%Y-%m') <= :civicrm_activity_date_filter1) ))
GROUP BY civicrm_activity_activity_type_id, civicrm_value_publication_details_5_type_of_publication_8 LIMIT 10 OFFSET 0

```

This is the SQL code for the contributions view, which doesn't:

```
SELECT civicrm_contribution.id AS id, civicrm_contribution.receive_date AS civicrm_contribution_receive_date, civicrm_contribution.total_amount AS civicrm_contribution_total_amount
FROM civicrm_contribution civicrm_contribution
LEFT JOIN civicrm_contact civicrm_contact ON civicrm_contribution.contact_id = civicrm_contact.id
WHERE (( (DATE_FORMAT(ADDTIME(FROM_UNIXTIME(civicrm_contribution.receipt_date), SEC_TO_TIME(3600)), '%Y-%m') = :civicrm_contact_date_filter OR DATE_FORMAT(ADDTIME(FROM_UNIXTIME(civicrm_contribution.receive_date), SEC_TO_TIME(3600)), '%Y-%m') = :civicrm_contact_date_filter1) ))
LIMIT 10 OFFSET 0

```

I'm not sure if this is an error with the civicrm\_entity module or with CiviCRM. Can anyone help?

# Answer
This is working in beta6 of CiviCRM entity...probably before, can't remember exactly when I fixed this.

Relevant D.O issue https://www.drupal.org/node/2570319
> 1 votes

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


title: Check last login of CiviCRM users

text:
# Question
Title: Check last login of CiviCRM users
I am using CiviCRM in WordPress. I just need to know how to check last logged in CiviCRM's user details.

Any helpful response will be very grateful.

Thanks

# Answer
That's more a CMS question - for Wordpress check this: http://www.wpbeginner.com/plugins/how-to-show-users-last-login-date-in-wordpress/

Users log in using the CMS that is attached to CiviCRM: Drupal, Wordpress, Joomla, Backdrop (not CiviCRM itself).
> 1 votes

# Answer
As Karin stated, not every CiviCRM contact is a user of your website. So the latest login is not so much something that CiviCRM is concerned with, but your CMS (Content Management System) which in your case is Wordpress. You should be able to see the latest login there?
> 0 votes

---
Tags: wordpress, civimember, civicrm-home
---


# Question
Title: What hook(s) can modify variables passed into Smarty templates?
Recently I needed to modify Smarty variables being passed into a template from an extension. I tried a couple of likely hooks, but neither of them seemed to provide this functionality. The templates in question were Confirm.tpl from various locations.

Is there hook functionality (akin to Drupal's preprocess functions) which permits adjusting variables in templates?

---

Background: for the eWay Recurring payment processor when using clientside encryption (Github branch), the CC value is submitted as a long encrypted string. CiviCRM renders this as a thousand stars on the confirm template; I wanted to render this nineteen stars rather than a thousand stars followed by the last four digits of the encrypted string.

I was able to achieve this with template overrides in the extension (PR #11), but it doesn't feel like the best approach to do this - much chance of conflict with other customisations / extensions / CiviCRM changes being my concern.

# Answer
> 1 votes
I often use the buildForm hook to modify data that is then passed to Smarty, or even add my own Smarty variables to the form.

# Answer
> 0 votes
Just adding an example to the solution of Erik Hommel. It removes a *create activity link*

```
function <<your extension>>_civicrm_buildForm($formName, &$form) {

  if($formName == 'CRM_Activity_Form_ActivityLinks') {
     $activityTypes = $form->get_template_vars('activityTypes');
     $ActityToRemoveKey = array_search('ActityToRemove', $activityTypes);
     if(isset($ActityToRemoveKey )){
     unset($activityTypes[$claimKey]);
     }
     $form->assign('activityTypes',$activityTypes);
  }
}

```

---
Tags: extension, hooks, smarty
---


# Question
Title: Problem with setting the default for a custom value in the buildForm hook
What is the correct way to set a default value on rendering a form for custom values. The code below works for native fields, but not for custom fields (presumably because they are looked up through API calls.

This is the code I have so far:

```
            function webform_membership_civicrm_buildForm($formName, &$form) {
                if ($formName == 'CRM_Activity_Form_Activity') {
                    if (in_array($form->getAction(), array(CRM_Core_Action::ADD, CRM_Core_Action::UPDATE))) {
                        $defaults['custom_8_-1'] = 710;
                        $form->setDefaults($defaults);

                    }
                }

```

# Answer
> 2 votes
Value is present on AJAX form. Solution:

```
            function webform_membership_civicrm_buildForm($formName, &$form) {

                if (($formName == 'CRM_Activity_Form_Activity') || ($formName == 'CRM_Custom_Form_CustomDataByType')) {

                    if (in_array($form->getAction(), array(0,1,2))) {

                        //$defaults['custom_8_-1'] = 710;
                        //$form->_groupTree[4]['fields'][8]['element_value'] = 111;

                        foreach ($form->_elements as $index => &$element) {
                            if ($element->_attributes['data-crm-custom'] == 'Points_for_this:Points') {
                                $element->_attributes['value'] = 115; // Set custom value here
                            }
                        }
                    }
                }
            }

```

---
Tags: webform-civicrm, hooks
---


# Question
Title: CKEDITOR is undefined when form is being loaded in model frame outside of /civicrm/ path
Yet another question regarding JS resources load outside of civicrm. We load contact edit form via **CRM.popup** from a page outside of /civicrm/ path (from custom dashboard page created in drupal). So far \[it was\] so good; recently we've mentioned that javascript goodies have stopped working on the form; only related message in a browser console is **CKEDITOR is undefined**. It all goes back to normal after disabling WYSIWYG at "Display Preferences" (we've got same error with TinyMCE enabled). Is it something we could "cure" via configuration tinkering or it is something to report as an error?

# Answer
Since you are using 4.6, the answer is that you need to ensure templates/CRM/common/wysiwyg.tpl is being loaded and that the smarty variable `$includeWysiwygEditor` is set to `true`.

Or since you are hacking around CiviCRM anyway, just keep it simple and stick something like this in your page source:

```
<script type="text/javascript" src="/path/to/civicrm/packages/ckeditor/ckeditor.js"></script>

```
> 1 votes

# Answer
I experimented the same issue with 4.7.10

In the New Mail form I cannot see the ckEditor buttons but no javacript error are raised. If I instead go to \[Configure CKEditor\] page I get the following error:

ReferenceError: CKEDITOR is not defined in abstracttoolbarmodifier.js
> 0 votes

---
Tags: javascript, ckeditor, wysiwyg, jquery
---


# Question
Title: Multiple Contact Registration for events
I'm sure I'm off in my configuration but not sure what. I've set up an event where a registrant can register multiple participants under the same address. For this event, a parent would sign up and then each of their children coming to the event would have to be registered

In the set-up, I have the following profiles for On-line Registration:

"Include Profile Top of Page" Parents Profile "Profile for Additional Participants" Youth Profile

I do have the option for "Same e-mail address" selected

Here is the problem...when a user sign's up and uses the same e-mail address, only the first contact is used so I'm seeing that first user registering each time.

Here is the actual scenario. Parent 1 and Parent 2 have to separate e-mails. Parent 1 registers three children under his e-mail.

Parent 1: parent1@email
Parent 2: parent2@email Child 1: parent1@email Child 2: parent1@email Child 3: parent1@email

When registered in this manner, Parent 1, Parent 2, and Child 1 get confirmation e-mails. Child 2 and 3 get a confirmation e-mail addressed to Child 1.

When I view the participants for the event, I see:

Parent1 Parent2 Child1 Child1 Child1

How can I correct this issue as it's important to have the name of each participant that is joining us.

# Answer
This situation is why there's the ability to pick a specific dedupe rule for your event's online registration. The information you get in certain cases is quite different than online donations or other events.

First, unless you are using a dedupe rule where email alone is *not* enough points to match, you should **uncheck the Same email address? box**. The default unsupervised rule says individuals with matching email addresses are the same person, so that's probably causing your problem.

Second, you should consider whether you expect any children to have real, independent email addresses (and whether you'd want those addresses anyway). If not, make **a profile lacking the email address field** and use it for additional attendees.

Finally, you'll want a strategy for dealing with duplicates. If you are just collecting first and last names for additional registrants, you don't have much to go by in matching them to contacts. (There was another Andrew Hunt at my high school.) Instead of trying to match blindly at the point of registration, it is probably more efficient to let the form create duplicates and then manage the duplicates later. Here's how:

1. Have your profile for additional attendees add contacts to a group for you to review later
2. You can create a *General* dedupe rule that matches on first and last name. It won't be good to use on a front-facing form, but you can use it to find duplicates later.
3. From the Find and Merge Duplicate Contacts screen, use that rule from step 2 to find duplicates, selecting the group from step 1. You'll get a few false positives, but you can mark them as "not a duplicate". Those pairs won't be suggested ever again.
4. Repeat step 3 every few weeks while your events are getting frequent registrations, and do it at least every couple of months through the rest of the year.
> 2 votes

---
Tags: civievent
---


# Question
Title: How to make backup joomla CiviCRM smaller?
I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.

Thank you Rob

# Answer
> 3 votes
One great way to shrink the backup is to only backup the bespoke bits (e.g. custom extensions and themes) and the database, not the actual Joomla! and CiviCRM code files that are freely downloaded from elsewhere.

This depends on you not having edited any core files, which your developers shouldn't be doing anyway.

# Answer
> 2 votes
I believe the free version of Akeeba Backup lets you exclude directories: https://www.akeebabackup.com/products/405-akeeba-core-vs-professional.html

# Answer
> 1 votes
Yes, that is approximately the number of files. And when you make a code base backup, you have to copy them all. What is the backup method you are using? If your only option is to copy them with (s)ftp transfer this can take a lot of time. But if you have ssh access to the system use zip or tar to pack all these files together, and copy just this single file. And often ISP´s offer faster backup methods in the control panel of the site.

# Answer
> 1 votes
problem was to backup the joomla, civi site because of the huge number of files; so backup with ftp (httpdocs) and database sql with phpmyadmin took several hours

so I tried akeeba free backup, extension for joomla; this works fine and fast on the server itself and I can downlad the akeeba .jpa file (70 MB) also very fast with ftp (downloading over browser is not recommended)

did not try to restore because the site is being used

now I will transfer the site to another subdomain with akeeba, fingers crossed...

# Answer
> -1 votes
thank you

I backup the database with phpmyadmin and the files with ftp because then I have the correct versions for joomla and civi

I have no ssh access and never changed the core files so I think of leaving out all unused themes and unused extensions thnx again

---
Tags: joomla, backups
---


# Question
Title: Event Registration - Duplicate Matching Impossible
Our organizzation is running CiviCRM 4.6.8. We are setting up an event and participants can register online. while configuring the on-line registration page, we get the error:

> Duplicate Matching Impossible The selected profiles do not contain the fields necessary to match registrations with existing contacts. This means all anonymous registrations will result in a new contact.

We have specified a custom profile to register participants. The profile includes as mandatory field, the ID number of the person as per their South African Identity document or passport. This field will allow us to uniquely identify each participant.

We have also created a custom dedupe rule (unsupervised) as follows: Field -\> ID Number Length -\> left this blank Weight -\> 30 Weight Threshold to Consider Contacts 'Matching': 30

Why do we get this error and how can we resolve it? We need to ensure that a participant can register only once for this event, as it is a competition.

# Answer
> 0 votes
It seems your event registration profile form has no email field or last name field for duplicates checking, refer to this related post How to register for event without an email address?

Also refer to the following link for for more information on civi deduping: http://book.civicrm.org/user/common-workflows/deduping-and-merging/

# Answer
> 0 votes
CiviCRM 4.5 introduced the ability to select a special duplicate matching rule for your event. With this came the higher likelihood that the fields needed for matching aren't all included in the registration form. The Duplicate Matching Impossible error highlights that situation.

From your comments on Kboy's answer, it seems like you had picked a different matching rule than the one you set as Unsupervised, so that explains why you got the error.

However, **you probably don't want such a specialized rule as your Unsupervised rule**. The Unsupervised rule is used on online contributions and other front-end pages, so it should be a broadly-applicable one: perhaps email only, or email plus first name. It's unlikely that you'll ask ID numbers of your donors, so you've effectively made duplicate matching impossible on other forms. (There just isn't a warning to say so.)

To fix this, make a different rule Unsupervised (leaving your special rule as a General rule) and then go back to your event configuration form and select your special ID rule specifically.

*A side note:* I don't know how sensitive these South African ID numbers are, but you might consider what precautions should be taken when collecting and storing this information--and whether you should be asking for it in a form:

* What are the consequences if an intruder (or even an unauthorized staff member) stole the numbers and corresponding names, addresses, etc.?
* Are people commonly asked to provide their ID number online? Will participants be willing to do this?

I bring up these considerations because here in the U.S., everyone has a unique Social Security number, but it's sensitive enough that it's generally a bad idea to collect or store it in a CRM system.

---
Tags: civievent, duplicate-contacts
---


title: Has anyone gotten CiviRebux working?

text:
# Question
Title: Has anyone gotten CiviRebux working?
Has anyone successfully gotten CiviRebux installed and working? **UPDATE: If you have CiviRebux running, would you be willing to post a comment with the version of MySQL that your server is running?**

The blog post and video demo look great but I have not had any luck getting it to function. I run into a fatal syntax error:

```
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => CREATE TRIGGER civicrm_civirebux_configuration_after_insert after insert ON civicrm_civirebux_configuration FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_civirebux_configuration (id, name, renderer, aggregator, vals, rows, cols, time, desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW.renderer, NEW.aggregator, NEW.vals, NEW.rows, NEW.cols, NEW.time, NEW.desc, NEW.type, CONNECTION_ID(), @civicrm_user_id, 'insert'); END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW' at line 1]
[type] => DB_Error
[user_info] => CREATE TRIGGER civicrm_civirebux_configuration_after_insert after insert ON civicrm_civirebux_configuration FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_civirebux_configuration (id, name, renderer, aggregator, vals, rows, cols, time, desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW.renderer, NEW.aggregator, NEW.vals, NEW.rows, NEW.cols, NEW.time, NEW.desc, NEW.type, CONNECTION_ID(), @civicrm_user_id, 'insert'); END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_civirebux_configuration_after_insert after insert ON civicrm_civirebux_configuration FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_civirebux_configuration (id, name, renderer, aggregator, vals, rows, cols, time, desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW.renderer, NEW.aggregator, NEW.vals, NEW.rows, NEW.cols, NEW.time, NEW.desc, NEW.type, CONNECTION_ID(), @civicrm_user_id, 'insert'); END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW' at line 1]"]
)

```

*Versions:*

* PHP 5.5.38
* MySQL 5.5.52-cll

# Answer
As Chris says, the problem is due to CiviCRM's Data Logging feature having a problem with column names that are MySQL reserved words. As John says, in this case it's the column named `desc`.

I think this is a bug in Civi logging rather than in the extension: it's allowed in MySQL to have a column name that is a reserved word, provided it is properly escaped when referred to. Civi logging should deal with that.

I have filed an issue: SQL syntax error creating logging triggers if column name is reserved word and tested a fix against 4.6.27, which from a quick look at the code should apply to 4.7 too - I'm going to test that and create a pull request. If you test the fix, please leave a comment on the issue with your results.

Update 20 Jun 2017: I've now replicated the problem with the latest 4.6 & 4.7 (master) code and verified that the fix (suitably adapted) works for both versions. Created PRs for 4.6 & 4.7 . The 4.7 one has been merged and the issue marked fixed.
> 5 votes

# Answer
I put in a pull request to rename that column: https://github.com/ypranay/org.civicrm.civirebux/pull/7
> 2 votes

# Answer
It seems there is some buggy functionality in CiviRebux that prevents an installation on some servers.

@ypranay: "Seems that the error is because of the settings of the MySQL server on which your site is hosted. Depending on the server, the SQL syntax will have to be changed."

No solution has been found yet.

Most recent error/issue report by @petednz:
> 1 votes

# Answer
From what is described above, it sounds like CiviRebux may be incompatible with CiviCRM's Data Logging feature.

If the option "Logging" is enabled at `civicrm/admin/setting/misc` then you're going to run into these issues when trigger generation is called on any tables created by CiviRebux which use MySQL reserved words as column names.
> 0 votes

# Answer
Based on nothing, "desc" doesn't seem like a likely column name, and it's where the error occurs.

Does this match the name of a column in your database?
> -1 votes

---
Tags: extension
---


title: Password not accepted for inbound email

text:
# Question
Title: Password not accepted for inbound email
I created on our mail server an email account *inbox.civicrm*, and checked it with the webmail facility: username *inbox.civicrm@example.org* and password are working.

Then, i created in CiviCRM an email account with

* server = example.org
* user = inbox.civicrm
* password = same password as used in webmail (tested several times)
* domain name = example.org

But the connection is refused, with SSL or not, POP3 or IMAP.

The error message in the CiviCRM log:

```
(
    [message] => Kan geen verbinding maken met Mailstore voorinbox.civicrm@example.org<p>Foutmelding:<pre>An error occured while sending or receiving mail. The POP3 server did not accept the password: -ERR [AUTH] Authentication failed.
.</pre><p>
    [code] =>
)

```

In this question Process Inbound Emails Failed, the password was the problem. Where to look for when a wrong password is not the problem?

Drupal 7.35 CiviCRM 4.7.14

# Answer
I believe that the "fetchmail" approach outlined by Chris Burgess on this answer is a good troubleshooting step.
> 2 votes

# Answer
Try setting up an email client like Mozilla Thunderbird to connect to your account using IMAP. That way, you can isolate the problem and avoid any differences in how your webmail login works.

For example, you might find that webmail takes just a username but IMAP/POP wants a domain added to the end, or vice-versa. Or, you may find that IMAP is turned off (the default in Gmail, for example), or you may need to connect to a different server like imap.example.org or mail.example.org. Using an IMAP client will give you a little more visibility into what's going on.
> 1 votes

---
Tags: email
---


# Question
Title: Different one time contribution and recurring contribution on same contribution page
I know we can create a contribution page with a single amount and the user can choose to make it a one time payment or a recurring payment.

But... is it possible to have a one time contribution of, say, $50, and a recurring contribution of only $10 on the same contribution page?

# Answer
> 3 votes
A great question, and before last week I would have said, no, it's better to create separate contribution pages for one-time vs. recurring contributions.

But then I saw how GiftTool does it (e.g. here: https://www.gifttool.com/donations/Donate?ID=1992&AID=1663) and realised you could do that in CiviCRM as well - it's just using a little javascript.

In other words, you could create all the payment amounts for both one-time and recurring on your form, and then use javascript to hide the options that aren't appropriate for the current recurrence/non-recurrence selection.

There would definitely be some assembly required, but it sounds like a worthwhile feature.

---
Tags: civicontribute, recurring-contributions
---


# Question
Title: How to setup CiviCRM for multiple simultaneous telefundraisers?
We are using CiviCRM for telefundraising. Basically, we have a list of contacts to call (smart group). After each call, the fundraiser registers a phone call activity in CiviCRM. When the activity is registered, the contact is temporarily removed from the group (using include/exclude search).

How can we setup the system so that different fundraisers are not messing with each other and avoid simultaneously calling the same contacts? Preferably, in long term we would like the same fundraisers to call the same contacts.

# Answer
Something along the lines of

* grab some contacts
* bulk create Activities for them all (one per each) with the person you want to make those calls as the Assignee
* set them up with some Reports (or Drupal Views linked to webforms) that will show each person what Calls are in what Status

Note you may want to create a custom Activity Type with a custom field for the outcome of call (eg busy so callback, etc) and use that field data in combination with the Activity Status to ensure that you have a useful record of which people need trying again etc.

We have worked on developing something along those lines but with more sophistication using Views and Webforms but is only relevant to Drupal installs. This also allowed for folk to 'self-assign' more calls from the pool if they had done their allocation.

There is also the CiviEngage package that comes with the drupal install which you can read about here: https://docs.civicrm.org/user/en/4.7/civic-engagement/what-is-civiengage/
> 1 votes

# Answer
Maybe you can try CiviRules. This extension gives you the option to automatically remove a contact from a group when an activity of a particular type is created. So you can define a group *Call Backlog*, instruct your fundraisers to select any contact that is in this group. When they log a *Call* activity the contact is removed from the group, so the other callers will not select it.
> 0 votes

---
Tags: fundraising
---


# Question
Title: CRM procurement: Presenting the case for CiviCRM
I have a list of functionality requirements for a new CRM system. I have run through this spec with a number of alternative CRM providers, who have given answers regarding what their systems can/can't do. How can I run through this list to consider CiviCRM?

# Answer
> 3 votes
Take a look at the recent Idealware report comparing 'donor management systems' and CRMs. I do not believe it is totally accurate or fair to CiviCRM, but it is something like what you want.

CiviCRM members are working on a side-by-side comparison of CiviCRM to 'competitor' platforms, which we hope to publish soon at the CiviCRM.org website.

# Answer
> 2 votes
Could you explain what your requirements are and which platform you would be using i.e. Drupal, Wordpress or Joomla.

It would probably be a good idea for you to start by reading the CiviCRM User Guide at https://docs.civicrm.org/user/en/latest/ This would give you a good basic explanation of what CiviCRM can do.

Hope this helps.

---
Tags: evaluating-civicrm
---


# Question
Title: Undefined Index error whenI run SYBUNT report
I am getting the following error when I try to run the SYBUNT report:

> Notice: Undefined index: yid\_value in CRM\_Report\_Form\_Contribute\_Sybunt-\>where() (line 286 of /srv/bindings/23131a86a5da4d9d91a43fa1623b947f/code/sites/all/modules/contrib/civicrm/CRM/Report/Form/Contribute/Sybunt.php).

# Answer
> 1 votes
that's just a notice - it's annoying - but may not be critical. You can check civicrm JIRA https://issues.civicrm.org/jira/projects/CRM/issues to see if there is an issue for it/report it (if not already).

If this is a live site then it's recommended not to display any errors. On Drupal go here:

```
admin/config/development/logging

```

and set to None.

---
Tags: drupal, pantheon
---


title: Cron not working after forcing https

text:
# Question
Title: Cron not working after forcing https
TL;DR: Does anyone know why forcing https would break CiviCRM's cron jobs?

---

A few days ago, I edited my .htaccess file to rewrite URLs to always use https, using the following code:

```
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

```

That change stopped CiviCRM from running its scheduled jobs (nothing being logged, emails not triggering, etc.). Running them manually still works.

The day this problem came to light, I changed the corresponding cron job URL to https instead of http. No change.

Subdomains with separate databases that don't force https are unaffected. "Force secure URLs" was on without incident before this problem started so I don't think that's a factor.

I'm running CivCRM 4.7.14 on Drupal 7.53.

---

Edits prompted by answers:

* My OS is CentOS 6.9
* Certificate has a clean bill of health
* I configure my cronjobs via cPanel. The entry for this job, anonymized, is:

GET 'https://example.com/sites/all/modules/civicrm/bin/cron.php?name=actualname&pass=actualpassword&key=longhexidecimalkey'

# Answer
> 1 votes
Upon reading that cron output logs are emailed to root rather than logged on-server (in CentOS anyway), I found the answer in an email from the Cron Daemon in my spam folder. The message read "LWP will support https URLs if the LWP::Protocol::https module is installed." Bingo!

To install that module, I logged on to my WHM interface, went to "Install a Perl module", searched for "LWP::Protocol::https" and installed it. Cron completed successfully on the next run.

# Answer
> 3 votes
The most likely causes for breakage with this change are:

## Cron job is pointing to HTTP only

`curl` by default will not follow 302 redirects, while `wget` will. If you're using curl, it won't work automatically when pointed to the non-SSL URL (not without `-L`, anyway). The 302 redirect can make this less obvious, since everything else that points to http "just works".

(Your question says you've addressed that already, but I'm including this for others who face that issue.)

## OS certificate chain does not recognise your new SSL cert

Another possibility is that `curl` or `wget` is rejecting the SSL certificate provided by your new URL. This can happen if the OS CA chain is outdated or misconfigured; it can also happen if your SSL installation is incomplete (and might not appear to be a problem if your browser includes CA components which your OS lacks).

## Debugging further

I would:

* Check if your OS has updates available to certificate authority certs (in Debian distros, package is `ca-certificates`).
* Include in this question the output of the cron task you have configured.
* Review (and include in this question) the webserver access logs for your cron task accessing CiviCRM.
* Review your site's SSL against a service like Qualys SSLLabs and verify that the SSL configuration is good. (You don't need a perfect score - but this may make some issues visible.)

When doing so, make sure to anonymize the URL and sensitive data like API keys, as you've done in your initial `.htaccess` snippet.

---
Tags: cron-job, security, scheduled-job
---


# Question
Title: Contribution page profile not displaying at top of page, above billing section, despite configuration
Newbie question. CiviCRM v 4.7.18. WordPress 4.7.3 running GeneratePress theme.

---

I have created a new contribution page and embedded it with shortcode in my Wordpress site (sorry, not public yet so no link). I'm using Paypal Express for payment processor.

In configuring the contribution page, I added a profile to appear at the TOP of the page. However, it displays BELOW the billing section. I tried moving the profile to the bottom position, and then to the top again. It always displays at the bottom, no matter which position I choose (only 1 profile chosen). I also tried selected a different profile, and that makes no difference. This is my first contribution page on this site.

Is there some other setting in CiviCRM that also controls the position that I need to change? Thank you.

# Answer
> 2 votes
You cannot get the Profile above the amounts. I do not use Paypal so I do not know what you payment portions look like. For me (using iATS with WordPress), my *Profile* placement options are 1. below the amounts (including the "is recurring option") but above the payment info/billing or 2. below the payment info but above the *Confirm Contribution* button.

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