What's the quickest way to set up a developer environment on windows? Wondering how to set up a dev environment with buildkit on Windows with the least amount of pain. Is there a shortcut like a prepackaged virtual machine image?

you also need bash, it MIGHT be doable with cygwin (https://www.cygwin.com/), but I think it would be a considerable amount of pain.

The least pain imo would be: install Virtualbox, install Ubuntu on it and then follow How do I set up dev environment with buildkit?


Access denied on price set page I have this problem

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

'access denied' for administrator on the price set admin page

civicrm/admin/price?reset=1&action=add

using civicrm 4.5.3 and drupal 7.33

The 'access denied' screen is a drupal screen, not an apache error. The message shows up in the 'recent log messages'.

Where should I start looking ?

I had a similar problem (CiviCRM 4.6) and solved it as follows:

The price sets kind of belong to the event component, and therefore they require not only "regular" CiviCRM permissions, but also access CiviEvent. Since the CiviEvent component wasn't enabled, the permissions weren't there, and the admin user didn't have them.

After enabling CiviEvent and giving CiviEvent access (in Drupal) to the administrator role it worked.


How to echo "Hello World" in civicrm? I need to echo "hello world" in civicrm how to do this in any page in civicrm? i'm trying to do this using hooks_civicrm_post but there is no result.

The civicrm_post hook performs stuff after a database update, and does not necessarily just echo stuff on a page.

If you want to customize CiviCRM I strongly recommend you read the Developer Guide carefully, and possibly check if you can follow a CiviCRM developer training somewhere.

I assume you do not actually really want to echo "hello world" on any page, so perhaps it will help if you tell us what you really want to do?


Auditing Who Merged Contacts? Is there any way to audit which admin merged duplicate contacts? I'd like to know who performed the merge, if possible.  Thanks.

When contacts are merged, activities are created - you can use Search > Find Activities to search for "Contact Merged" and "Contact Deleted by Merge" activities - the "Added by" column will display the user who performed the merge.

Hope this helps,
Tamar


How can I assign one contact to one of the team workers? Right now everybody have access to the info of all the contacts. And we need that only specific people of our team get access to the info of a specific group of people.

How do we do that?

ACL or Access Controls should be able to do that.
https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/

BUT... I've never worked with Joomla so can't offer any further advice


How to export contact list that includes total contributions to date? I can only either export my contacts, or contributions. Is there a way to export an amalgamated list of contacts including all contributions made by each contact, either that year/per year/within date rage, or total to date?
I tried to use the advanced search, to find contacts within a certain group + with contributions of certain $ amount. When I try to export that list, there is no available field to export "contributions". Please advise!

If you add the Summary Fields extension then you can choose to have a field for 'total amount', total this financial year, count this financial year, etc etc, which then makes exporting much easier as it is 'just' another custom field

https://civicrm.org/extensions/summary-fields
https://civicrm.org/extensions/joinerys-more-summary-fields
https://civicrm.org/extensions/synopsis


How can I have a repeating activity in a case standard timeline? I am currently exploring CiviCase. I like to setup an activity that tracks the progress of the client every 6 months. Is this possible with a case standard timeline? I can't predict how many times this tracking activity should be entered, until the case is closed. I'm thinking of adding the timeline:

Open Case
Tracking Activity #1 (6 months)
Tracking Activity #2 (12 months)
...

Can I have the Tracking Activity #2 appear only after the Tracking Activity #1 is completed? Is this where the Reference Onset comes into play?

I have done this once but it is a long time ago :-) As far as I know it is possible, and you have to set up the activity in the timeline. Just checked, the client in question solved it by having 'follow up 1', 'follow up 2' etc as activities and planning each one for a set period after the previous one. Does that help?


Proximity search doesn't always work for towns I'm noticing that the proximity search doesn't seem to work quite as well on towns as it does for postcodes.

I've seen this behaviour sporadically. For some contacts it's not an issue, for others it is.

For instance, if I do a search for 30km around Chester it won't find a person who's in Chester, but will find them if I search for postcode CH2.

In this case, the contact's address is simply 'Chester, Cheshire, UK', with no postcode supplied. Nevertheless, the Map icon in their contact record is successfully placing them in the middle of Chester.

The same occurs for other contacts with the same non-specific Chester address.

However, it doesn't occur for other contacts with similar address formats if they are in nearby towns. For instance, people with addresses such as 'Liverpool, Merseyside, UK' are found by the above search.

Having said that, if I then do a search for 30 km around Liverpool, I do get correct results!

We are using Google as our Geocode provider, Civi 5.3.1, Drupal 7.58.

Could it be that the Proximity search fails if the distance from certain towns is zero? And works for other towns? Or something else?

Does anyone have a suggestion where I should look to fix this? Or is it a known issue with the proximity search?

Thanks!

I've had something like this come up and so when I looked at what CiviCRM was doing I noticed it doesn't use all the available fields. For example it uses City but not County. It also only uses the first line of the street address, so depending on what you have there it may actually return nothing even though city, postal code, etc without the street address would work.

You can see what fields it's combining here:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Geocode/Google.php

You can also put the contact's address into maps.google.com directly and see what it returns, to help troubleshoot.


What file permissions for ConfigAndLog What are the best file permissions for

/sites/default/files/civicrm/ConfigAndLog/

username john, group apache

I currently have 770, but I get an error in my ssl_error_log

AH01797: client denied by server configuration: /var/www/xyz/sites/default/files/civicrm/ConfigAndLog/CiviCRM.e612b0519ce870b4405c16c4.log

Shouldn't it just be apache that plugs things in, or are there are things that enter into this log file as well?

Thanks!

John

The files and directory need to be group writeable, and you need the which ever user that is running cron to be in that group. Check to see if cron is being run by root, that can create log files that are root only.


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

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

How do I find or create the API Key?

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

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

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


Recording Funding Applications in CiviCRM I'm just in the process of implementing a process in CiviCRM so that we can track donations against specific projects. It would also be great if we could record the approaches we've made to organisations, so we know that for example we've approached an organisation for the full amount of funding required for project X, wait until we get a response before applying to other organisations. This would also allow us to generally report on what applications had been made and for how much.

My first ideas are to use contribution statuses or financial types to achieve this. Does anyone have experience of implementing something like this, are there any problems created from using financial types or statuses in this way?

I would recommend against using contribution type or contribution status as those have specific system uses for actually received contributions. Instead, you might try creating groups of contacts that have received your mailings or phone calls asking for contributions, perhaps based on whether the contact has specific activities under advanced search. If you want to target prospect contacts for donations of a specific amount I might create a custom field to contain the amount for the ask. You might want to make a Prospect contact type, add this contact type to the relevant contacts, and make the Target Ask' field a custom field of Prospects.


How to redirect to a static url after member signup I am working on a wordpress website with civiCRM. Member signup with CiviCRM is working correctly. I need an admin approve the new wordpress users after signup. I used "New User Approve" wordpress plugin for this. When the user make payment and completes the signup the page will redirect to the CiviCRM dashboard by default. But because of I am using the new user approve plugin the newly created wordpress user is not active and so that user can't sign in successfully and can't access the dashboard.  That results in an error message. So I need to show a Thank you page after submitting the registration details. How can I do it?

In order to do what Joe suggests pretty certain you will need to have installed Front End Page Options extension otherwise the 'redirect' option won't exist.


Sort function for Activities in CaseView I want to sort the Activity Types that appear in the dropdown menue in CaseView, when clicking "Add Activity". It should be sorted according to a determined order (based on frequency of use).
Therefore, I built a custom sort function that I included in sites/all/modules/civicrm/CRM/Case/Form/CaseView.php:
  public function compareToSample($aTypes, $sample_array) {
    $new_array = array();
    $size_sample = count($sample_array);
    // search for first element of $samplearray in $atypes
    for ($newarrayindex = 0; $newarrayindex < $size_sample; $newarrayindex++) {
      $key = array_search($sample_array[$newarrayindex], $aTypes, FALSE);
      if($key) {
        // found an element -> save at the end of $new_array
        array_push($new_array, $aTypes[$key]);
        unset($aTypes[$key]); // delete it from $aTypes
      }
    }
    // if after the whole process $aTypes is not empty, add the rest of elements to end of $new_array
    if(!(empty($aTypes))) {
      if(empty($new_array)) {
        // no element in common
        return $aTypes;
      }
      else {
        $new_array = array_merge($new_array, $aTypes);
      }
    }
    return $new_array;
  }

public function mySort($array_to_sort) {
    $sample_array = array(...some string elements representing the activity types in the right order...);
    if(empty($array_to_sort)) {
      return null; // EXCEPTION
    }
    $result = $this->compareToSample($array_to_sort, $sample_array);
    return $result;
  }

I am calling this function with $aTypes = $this->mySort($aTypes); inside the buildQuickForm() function in CaseView.php. (I am calling it just after the place where the original code is also sorting $aTypes, that is, just after:
if (!$xmlProcessor->getNaturalActivityTypeSort()) {
      asort($aTypes);
    }

The problem is now that the function only seems to sort the labels of the Activity Types, but not the Types themselves. So when clicking on one type, it will create an activity with another type of the list. How can I get the function to sort the real elements?
Any hint is appreciated :)

I think my mistake was using the functions array_push and array_merge, as they assigned new keys to the array elements (activity types). Therefore, the single activity types couldn't be found in the following code anymore.
I changed these two expressions to:
$new_array[$key] = $aTypes[$key]; /// instead of: array_push($new_array, $aTypes[$key]);

and
$new_array = $new_array + $aTypes; /// instead of: $new_array = array_merge($new_array, $aTypes);

With that, it seems to work now.


List organization on individual profile signup I am creating a join form for visitors on our site, and I'd like to give them the option of adding what school they go to.

I've imported schools as organizations, and I think I know how to link individual contacts to "Student of.." the school when I import our list, but going forward how do individuals link themselves to particular schools when they sign up?

I'd like for them to be able to type in the name of the school and be presented with suggestions (to try and avoid creating duplicates with spelling differences).

Any idea how to do it?  Thanks!

I've got CiviCRM 4.7.25 and am using Wordpress.

You can add a Contact Reference field (one of the types of Custom Fields that you can create) and then display that in your profile and limit that to just the group of schools. users need to have permissions to use the autocomplete option so you need to visit /wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1 and find th permission "CiviCRM: access contact reference fields
Allow entering data into contact reference fields" and give it to your anonymous visitors. (You may also need to give "CiviCRM: access AJAX API
Allow API access even if Access CiviCRM is not granted")

The above won't do this as a Relationships, which is the ideal, but I don't know how that is done via Profiles for WP


Different Contributions if a member Is it possible to configure a contribution page or amount to be different if the person is a member?

For example, members pay $20 and non-members pay $25 as a contribution (its a separate registration fee, not a member fee in that sense).

Thanks
Norm

Yep - you can use CiviCRM Discount extensions for that; however - for registration fees -> you would need to use CiviEvent. Discounts don't work on Contributions/Donations;


CiviCRM BuildKit install fails on Ubuntu 18.04.1 LTS Running the BuildKit installer script on Ubuntu 18.04.1 LTS doesn't work - it fails trying to resolve the conflict between the openssl libraries used by Ubuntu's NodeJS/NPM packages and the libssl-dev package.

Updated:
The fix for this has now been merged as https://github.com/civicrm/civicrm-buildkit/pull/427
Original
Full solution: https://github.com/civicrm/civicrm-buildkit/issues/426
Assuming that we can get this fixed in the BuildKit installer this answer will be updated to reflect such a change.

Install a compatible version of NodeJS/NPM from NodeSource

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

Download, don't run, the get-buildkit.sh script.

wget https://civicrm.org/get-buildkit.sh

Using the editor of your choice, edit the downloaded script.

editor get-buildkit.sh

On line 453:

(PACKAGES="acl git wget unzip zip mysql-server mysql-client php7.2-cli php7.2-imap php7.2-ldap php7.2-curl php7.2-mysql php7.2-intl php7.2-gd php7.2-dev php7.2-bcmath php7.2-mbstring php7.2-soap php7.2-zip php7.2-xml apache2 libapache2-mod-php7.2 nodejs npm php-pear libmcrypt-dev libreadline-dev")
Remove npm:
(PACKAGES="acl git wget unzip zip mysql-server mysql-client php7.2-cli php7.2-imap php7.2-ldap php7.2-curl php7.2-mysql php7.2-intl php7.2-gd php7.2-dev php7.2-bcmath php7.2-mbstring php7.2-soap php7.2-zip php7.2-xml apache2 libapache2-mod-php7.2 nodejs php-pear libmcrypt-dev libreadline-dev")

Make the script executable:

chmod +x get-buildkit.sh

Install BuildKit:
Important The script CANNOT be in the same directory you intend to install BuildKit to!

./get-buildkit.sh --full --dir ~/buildkit

Continue the usual steps from here:

https://docs.civicrm.org/dev/en/latest/tools/buildkit/#config


CiviCRM Membership Status Change Summary Report What is the best way to use CiviReports to show how many members changed from grace -> expired in a given month (summary), not detail report.

When a Membership changes Status an Activity of type "Change Membership Status" is created, and for your example, has the Subject of "Status changed from Grace to Expired". These factors can be used either in Find Activities, or Report civicrm/report/instance/3, or in Drupal to make a View, and if we use Aggregation, to get summary statistics as requested in the question.

I decided to give the latter a Proof of Concept and have attached it. IF this is useful to you (or anyone) please consider 'giving back' (and forward) by chipping in to our project to get CiviCRM working fully with Drupal 8 ;-) http://www.fuzion.co.nz/civicrm/contribute/transact?reset=1&id=4.

Hmm can't see how to attach file so have put in the Fuzion Treasure Chest at http://www.fuzion.co.nz/blogs/getting-summary-stats-membership-status-changes-view

And in order to fully answer the question, if you use the Views CiviCRM Dashlet module described here you should be able to set it up on your dashboard https://civicrm.org/blogs/brandonferrell/drupal-views-civicrm-dashlets


Date added to CiviCRM DB error when using with a smart group that has a custom field type Using the CiviCRM custom search by Date added to CiviCRM, I can add any group or smart group and get results, but when I search within a specific smart group I created, which involves using criteria from a custom field, I get the following errors:

 17829237  16/Nov 16:53  warning  php     Warning: fopen(/var/www/html/example/docroot/sites/default/files/civicrm/ConfigAndLog/CiviCRM.c496aa562571a7869b7d0ea6d810ea10.log): failed to open stream: Permission denied in Log_file
 17829238  16/Nov 16:53  debug    civicrm  $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such
 17829239  16/Nov 16:53  warning  php     Warning: fopen(/var/www/html/example/docroot/sites/default/files/civicrm/ConfigAndLog/CiviCRM.c496aa562571a7869b7d0ea6d810ea10.log): failed to open stream: Permission denied in Log_file
 17829240  16/Nov 16:53  debug    civicrm  $backTrace = #0 /var/www/html/civicrm/v4.3.8-d7/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2

Please note that we are already working on trying to upgrade our version of CiviCRM from 4.3.8, but in the meantime, I'd like to know if anyone has any ideas about what is going on here, thanks! We are on Drupal 7.50 Commons.

Edit: changed permissions on log file but still get the DB Error:

 17835968  17/Nov 12:32  debug    civicrm  $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such
 17835969  17/Nov 12:32  debug    civicrm  $backTrace = #0 /var/www/html/civicrm/v4.3.8-d7/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2

This line:

  Warning: fopen(/var/www/html/example/docroot/sites/default/files/civicrm/ConfigAndLog/CiviCRM.c496aa562571a7869b7d0ea6d810ea10.log): failed to open stream: Permission denied in Log_file

indicates a permissions error. Check that your webserver user can write to the directory:

/var/www/html/example/docroot/sites/default/files/civicrm/ConfigAndLog

and to this file if it exists:

/var/www/html/example/docroot/sites/default/files/civicrm/ConfigAndLog/CiviCRM.c496aa562571a7869b7d0ea6d810ea10.log

That may not fix the search problem you describe, but you should then get more information in the log file.


How do I create a Drupal View to display last activity date. I'm trying to set up a View of Clients, Case Managers and date of last activity.  Most of the clients have many activities, but I only want the most recent one displayed.

Normally, I would use the Multiple Field Settings in Drupal Views, but it isn't an option for the CiviCRM Activity Date or Activity ID fields.

Everything else is working but can't get it to only display the last date.

Any ideas?

Asked this question before here:
http://forum.civicrm.org/index.php/topic,35580

All right...I did it but just wanted to follow up.

Expand Advances in the View UI, click next to Aggregation on the word No.

Turn it on.

Now Add the Scheduled Activity Date field.

Click Apply, then the Aggregation options will pop up.

Select Maximum in the drop down list.

Then click Apply.

Here is part of my output (with other fields too of course).


Why are all my menus open/garbled? My menus look like this:

For background: This is Drupal 8.  The menus were fine, but I'm porting the site to Pantheon.  My Browser dev tools say that all my files (inc. CSS/JS) are loading properly.  There are no JS console errors.  My non-Pantheon site doesn't have this behavior, though I've had to make changes to the site to make it work in Pantheon (mainly in Composer) but I can't think of what else could cause this.

Edit: I compared the actual CSS files - builder.css is different on my non-Pantheon site.

This is a symptom of missing the bower_components folder, which should be in your CiviCRM module's root folder.


Trying to Set Up CiviVolunteer and Getting Strange Results Angular installed
CiviVolunteer 4.6-2.2.1 Installed
Civi Version 4.6

This is my first attempt at getting this to do anything and I'm failing miserably

I click on the New Volunteer Project -- I don't get the setup screen.  I get a empty Drupal Page with the title CiviVolunteer (and this site is refusing to let me upload my screenshot)
I also get an error "PI permission check failed for VolunteerUtil/getbeneficiaries call; insufficient permission: require edit own volunteer projects" when I try to create a new volunteer project
(I have full administrator priviledges for both Drupal and CiviCRM, so this makes little sense)
I also tried setting up and event, and there was no check box to enable CiviVolunteer

welcome to the civiverse!

Try clearing caches and setting your extension path and resource url. Those are the most common source of error regarding extensions.

If that doesn't work post back!


Hard coding data during import I'm trying to import some contribution information from our payment processor and need to specify a "financial type" for the Civi Contribution (A mandatory field).

Unfortunately, this information isn't contained in the exported data. Is there any way to hard code the value that I would like to use for all imports?

I'm thinking I'll have to pre-process the exported data to add the field, but if there is a better way to do this in Civi, that would be amazing.

Thanks!
Trev

you'll have to add a column -> with Financial Type to your Exported Data before you can import it into CiviCRM; First you make the Financial Type in your CiviCRM -> if you're not sure what these monies make a Financial Type: Legacy Monies; Then create a Financial Type column in your Exported Data -> and fill it with: Legacy Monies. That should work - and will not take too long!


HTML tags showing in Activity details This seems to have been an issue before.
Formatting tags shown in activity view
Has this been resolved because I am still having an issue with this. I am not on the current version.
If there has not been a fix for this - is there a work around?
CivicCRM: 4.7.2
Drupal: 7.43

Thank you
Casey

A work around I use is to use simple text area instead of CKEditor.

It should be fixed in 4.7.5 according to this issue.


How do I download duplicates of imported contacts in the past month? I import contacts almost every day, and I automatically press "skip" on the "For Duplicate Contacts" import option.

When the import is complete, I recognize that I have the ability to download the duplicate emails.

However, I have NOT been doing that.

So now, I want to download all of the duplicates emails in the month of June.

So is there any way to retrieve all of the duplicate contacts from June?

I'm using CiviCRM 4.7.16.

I'm afraid those are gone.  By definition, those items aren't saved anywhere.


want to change search algorithm in custom fields Suppose I have phone number having format as (xxx)xxx-xxxx.Is their anything in search so that I can simply search with this format which excludes brackets and characters like xxxxxxxxxx.

For standard phone number fields, that is taken care of:

In Advanced Search, the help text shows "Punctuation and spaces are
ignored." Formatting entered in the search is ignored and the search is done on just the digits.
In Quick Search, enter just the digits of the phone number.

But your title mentions custom fields... Does that mean you have an alphanumeric custom field to store a phone number?  Instead of that, can you use the standard phone numbers with a different 'location'?  You can customise the list of locations at Administer > Customize Data and Screens > Dropdown Options > Location Types


Braintree with Wordpress not working with CiviEvent I have a wordpress Civicrm instance and we are using Braintree as the payment processor. I'm trying to create a CiviEvent, selling tickets to an event. When I try to test payments out by submitting test payments, I get an error.

Looks like there was problem. Payment Response: Braintree\Configuration::merchantId needs to be set (or accessToken needs to be passed to Braintree\Gateway).:

The weird thing is, the merchantId and all the API keys are already defined. I made a test payment on a CiviContribute page and that worked just fine. I'm confused as to why it would work on one Civi module and not work on the other.

Can anyone help advise me on how to fix this? Thanks.

Figured it out. For some reason, the braintree keys were not being loaded at the time before it started to post to Braintree. In Braintree.php I added the following

 if (empty(Braintree_Configuration::environment())) {
  $environment = ($this->_mode == "test" ? 'sandbox' : 'production');
  Braintree_Configuration::environment($environment);
}

if (empty(Braintree_Configuration::merchantId())) {
  Braintree_Configuration::merchantId($this->_paymentProcessor["user_name"]);
}

if (empty(Braintree_Configuration::publicKey())) {
  Braintree_Configuration::publicKey($this->_paymentProcessor["password"]);
}

if (empty(Braintree_Configuration::privateKey())) {
  Braintree_Configuration::privateKey($this->_paymentProcessor["signature"]);
}

Right before the following:

try {
  $result = Braintree_Transaction::sale($requestArray);
} catch (Exception $e) {
  return self::error("Oops! Looks like there was problem. Payment Response: " . $e->getMessage());
}

And it worked. I'm not entirely sure why the values weren't being loaded initially but this will do!


How can I find out our civicrm sitekey? I need to find out the sitekey for our developers. Not sure where to find this. Any advice appreciated!

It's found in civicrm.settings.php and will be generated by the installer (or set manually depending on how your CiviCRM instance was configured).  You're looking for a line that looks like this:
define( 'CIVICRM_SITE_KEY', "your.site.key.is.here");


Can't get action token {action.unsubscribeUrl} to work in Welcome automated message I've been trying to add unsubscribe and optout functionality to the default "Welcome Message" email template you find under Administer, Header, Footers, and Automated Messages. I don't have HTML experience but using the code in the "Mailing Footer" sample, the documentation, and a wysiwyg editor, I added this in the Body - HTML Format text block of the "Welcome Message":

To unsubscribe from this newsletter, click here.
 To opt out of all future emails from us, click here.

When I test this and produce the Welcome email, these tokens don't appear as links, only text.  I've been researching this all day with no luck.  Please help!

I'm on Wordpress 4.7.5 and CiviCRM 4.7.16.

I expect the token only gets populated with the relevent URL when it is used as part of a CiviMailing.

The automated message you are referring to does not go out via CiviMail, so it is possible that it will not function in that feature.

Since it seems that the checksum doesn't work directly with civicrm/mailing/subscribe?reset=1 you can set up a Profile that includes your public mailing lists, and send them to that. Bit of a pain having to do the extra steps.

Using tokens for Profiles is detailed here: https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens

And using Profiles for Mailing Lists is here: https://docs.civicrm.org/user/en/4.7/email/set-up/#allow-people-to-sign-up-for-your-mailing-lists-online


How can I set the end date of a membership to be calculated from birth date? I want people to be able to sign up for a membership using a contribution form. The membership lasts until the person turns 14. We collect the birthdate information in a profile on the contribution form.

How can I set the membership end date to be calculated from the birth date?

We are using CiviCRM 4.7 and Drupal 7

We created an extension that added this functionality.

Edit:
Unfortunately the extension is not publicly available as it is mixed in with a whole collection of custom stuff we needed to do for this client. Also our requirements changed so we were no longer working off birth date but still setting the end date based on a field completed whilst completing the form.

I am not the coder but as far as I can understand we created a function to set end date to the value we then calculated from the field of interest.


From email address not changing per user When we send emails, the person receiving the email can reply to the sender, and it has the correct name of the sender, but the email address it says the email is from isn't the sender.  My name is Helen.  My colleague's name is Clare.  Clare sends an email from her user account.  The receiver gets an email from 'Clare < helen@....>  The 'from email address' options contains all the correct names and emails.  Any help would be massively appreciated!

In addition to the emails shown in the Mailings menu » From Email Addresses, you can also use the email address associated with the user you're logged in as.  I would check Clare's record to see what emails are there; it sounds like your email might be present on Clare's record.

If you want to restrict users to ONLY use emails avilable in Mailings menu » From Email Addresses, you can go to Administer menu » System Settings » Outbound Mail and set Allow mail from logged in contact to No.  Note that in older versions of CiviCRM I believe this option is located somewhere in Administer menu » CiviMail.


Is Membership payment on Drupal 8 Webform supported yet? I am trying to configure a Drupal 8 Webform to support payment for Memberships, but there seems no connection between the Membership field and the Payment fields.  On D7, when configuring a Contribution on a Webform it asks for a Contribution Page to use, but not on D8.
Is this a bug, or just not yet implemented?

It’s a new feature! It is no longer necessary to create a Contribution Page


Does the Gift membership extension work with 4.7? Does anyone know if Civicrm's Gift Membership extension works with 4.7?

https://civicrm.org/extensions/gift-memberships shows stable releases up to 4.6.

Parenthetically, I'm also aware of Coleman's suggestion of using webforms to create gift memberships here: Webform CiviCRM and Gift Membership. But the Gift Extension provides individual access codes which start the membership when the gift recipient chooses, which is a great feature.

Thanks for any thoughts on this.

There is an issue in git here asking this very question but without any answers since Nov 2016 and last commit is nearly 2 years ago. Worth raising the question here since it has a broader audience

UPDATE

changes have been pushed to the main extension repository - https://github.com/relldoesphp/com.aghstrategies.giftmemberships/pull/11.

This will enable users to use the extension on 5.x versions


What is the best way forward to conduct surveys on an iPad? I am trying to help my co-operative optimze their workflow.

At the moment:

Surveys are conducted during home visits straight into (a very fiddly) excel spreadsheet.
Then when back in the office the employee enters some of the data from the spreadsheet into CiviCRM and the rest is retained in the spreadsheet (mainly because it takes too long to transfer all the data).

Two routes come to mind:

Use the Survey functionality to create a form that can be viewed on the ipad - would this then be viewed through a webpage or is there an app available for this?
I create my own form or app which can output a CSV file. This could then be uploaded to Civi relatively easy and also easily transferred to Excel/reports.

If anyone can point me in the right direction for how to use CiviCRM more effectively that would be fantastic!

If the iPads are connected to the internet, then you can create a profile form (or Webform if your site uses Drupal) and they can submit it directly.

I'm not aware of an offline app but others may know of one.


Contribution Amount does not work On civi 4.7.27 and wordpress 4.9

After recently upgrading both civi and wordpress I have noticed an issue that I have not been able to resolve.
On the contribution pages, if I have Membership section enabled AND Contribution Amounts section enabled, everything works fine. If I have just Membership section enabled, everything work fine.  However, if I have just the Contribution Amounts section enabled, after submitting the contribution, users will land on an error 500 page. The contribution will be completed and the record will be stored in civi,but the confirmation email will not be sent.  After hours of trouble shooting I have narrowed it down to: this only happens when the Contribution Amounts section is enabled by itself. Everything was wirking fine, until the recent upgrades. The error logs I can find are not giving me any useful information.
Does anyone have any ideas?

Thank you.

Is there any suspicious info in CiviCRM or apache log? Can you try by applying  https://github.com/civicrm/civicrm-core/pull/11454 patch works?


Personalised link using checksum tokens leads to empty page When testing the functionality of checksum tokens for a mailing, the link is properly created according to this wiki entry for profile pages (.../?page=CiviCRM&q=civicrm/profile/edit&reset=1&gid=N&{contact.checksum}&id={contact.contact_id}). However, clicking the link leads to an empty page that shows the profile title twice, but no other content.

Interesting: When clicking on Wordpress' customize button, the profile including the respective data is shown above the page – although home page instead of the CiviCRM page.

We're on CiviCRM 4.7.8 for Wordpress (Graphy theme) and are trying to set this up for the first time.

What I tried:

Using a different browser (Firefox and Chrome) and different devices (Windows PC and Android Phone) didn't show any differences.
I wasn't sure whether a reCAPTCHA would cause problems so I turned it off for this profile, but that didn't help.
Clearing cache and resetting paths didn't change anything either.
Not sure if this is relevant, but the sidebar is also shown despite having changed the WP template to "no sidebar".

Any other ideas what could cause this?

It seems only the link was incorrect and lead to the explained behaviour. The wiki entry over at civicrm.org is inaccurate (for Wordpress installations at least). The suggested link is

.../?page=CiviCRM&q=civicrm/profile/edit&reset=1&gid=N&{contact.checksum}&id={contact.contact_id}

while in my case the correct link is

.../civicrm/?page=CiviCRM&q=civicrm/profile/edit&gid=N&reset=1&gid=16&{contact.checksum}&id={contact.contact_id}

I realised the link was missing the "civicrm" part, when I tested the profile in "create mode", which gave me the correct (second) link. Hopefully, someone else may find this useful.


Drupal 8 version of CiviVRM Membership Roles Sync? Is there a Drupal 8 version of the CiviCRM Membership Roles Sync module, or is one planned?  I can't see it, or any opportunity to configure an equivalent facility.

There is a alpha version for d8(https://www.drupal.org/project/civicrm_member_roles) which seems to be working for me.


CiviMail not working I'm unable to send mail; it runs for a while but then returns:

Fatal error: Uncaught
PEAR_Exception: not connected in unknown on line unknown
- PEAR_Error: not connected in unknown on line unknown
Exception trace
#   Function    Location
0   CRM_Core_Error::exceptionHandler(Object(PEAR_Error))    unknown:unknown
1   call_user_func(Array, Object(PEAR_Error))   /var/www/slnmembers_drupal/sites/all/modules/civicrm/packages/PEAR.php:931
2   PEAR_Error->PEAR_Error('not connected', null, 16, Array, null)  /var/www/slnmembers_drupal/sites/all/modules/civicrm/packages/PEAR in /var/www/slnmembers_drupal/sites/all/modules/civicrm/CRM/Core/Error.php on line 901

PHP 5.6, MariaDB 5.5

Seems to be an error from PEAR Net_Socket, probably a few more lines of the backtrace would reveal that this came from Net_SMTP?

"Not connected" likely indicates that the remote SMTP connection has dropped the connection - this could be for a number of reasons, including intentional disconnection on that server's part ("whoah, 250 messages at once?!"), or an issue on that server, or even a network issue between CiviCRM and that server.

Since you say this is GMail, I'd guess that you might be running into intentional sending restrictions on Google Mail.

  To keep our systems healthy and your accounts safe, Google Apps limits the amount of mail one user can send. Limits restrict the number of messages sent per day and the number of recipients per message. After reaching one of these limits, a user can't send new messages for up to 24 hours after the limit was exceeded, but they can still access their account and receive incoming email.

I don't recommend using Google SMTP for CiviMail, they will shut you down (even mid-connection!), because the service is not intended to be used as a bulk mail provider. That's not a bug, it's part of the package.

Switching to mail() method will work, but may also be limited by the hosting environment. For example, one popular webhost limits outbound emails to 150/hr and silently drops delivery of any mails beyond this. That's a situation where you might run a few test CiviMails successfully, then push out a large promo and be left confused at why the response was so poor ...

If you want to be assured of your CiviMail delivery, make sure you have established terms with your SMTP provider & make sure they accommodate the level of usage you need.


CiviPledge "Next Payment Date" automatically set to Jan. 1, 1970 When I enable pledges on a contribution form, CiviCRM processes the first payment properly, and records the correct "pledge made date".

However, it records the "next payment date/payments start" as Jan. 1, 1970, and subsequent payments in their proper increments (weekly, monthly, etc.) on the proper day of that period.

Obviously, this error doesn't apply to pledges entered manually.

I am running Wordpress 4.6.1 with CiviCRM 4.7.12. Any ideas as to what's behind the timewarp back to the 1970s?

After updating to CiviCRM 4.7.14, this issue has disappeared. I am unable to replicate it on the CiviCRM Wordpress demo as well, so I think it must have just been an issue with my version being out of date.


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

Similar to Graham's question here.

Use case:
Setting up goal plans that look like this:
Long-Term Goal 1
  Short-Term Goal A
  Short-Term Goal B
  Short-Term Goal C
Long-Term Goal 2
  Short-Term Goal A
  Short-Term Goal B
  Short-Term Goal C
Long-Term Goal 3
  Short-Term Goal A
  Short-Term Goal B
  Short-Term Goal C

etc.

I've created a custom field set that allows multiple records.
Each record contains:
Long-Term Goal
Short-Term Goal A
Short-Term Goal B
Short-Term Goal C

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

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

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

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

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


How to show/hide Profile based on Price set Total on a Contribution page? I would like to hide/show my "Custom Profile Group" based on the value of "Price Set Total". I already have an extension with this Jquery, but seems to be not working. Any help would be appreciated. Thanks in advance.

  CRM_Core_Resources::singleton()->addScript("
     CRM.$(function($) {
        hideshowMainProfile();
    $('#priceset [price]').bind('keyup',hideshowMainProfile);

    function hideshowMainProfile() {
        let priceValue = $('#priceset [price]').val();
    if (priceValue.length > 1) {
      $('.crm-public-form-item.crm-group.custom_pre_profile-group').show();
    }
    else {
      $('.crm-public-form-item.crm-group.custom_pre_profile-group').hide();
    }
  }
    });
");

I would use calculateTotalFee() to check if total amount is > 0.

CRM_Core_Resources::singleton()->addScript("
  CRM.$(function($) {
    hideshowMainProfile();
    $('#priceset [price]').bind('change keyup click blur', hideshowMainProfile);

    function hideshowMainProfile() {
      if (calculateTotalFee() > 0) {
        $('.crm-public-form-item.crm-group.custom_pre_profile-group').show();
      }
      else {
        $('.crm-public-form-item.crm-group.custom_pre_profile-group').hide();
      }
    }
  });
");


Record audio/video fields for contacts? I'm using CiviCRM + Drupal 8.
I'd like to be able to add fields to contacts that can record audio &/or video, so that we can collect interviews with our contacts.
Is it possible to add "recording" fields that will allow you to record from within CiviCRM?
If not, what's the best way to set up contact fields to allow you to upload an audio/video file to a contact's record?

I don't know about recording directly, but in any case the resulting data would likely be large and would probably run into timeouts or other technical limits. I'd probably suggest storing the video files elsewhere and just adding a custom field to the stock Interview activity type in civi called e.g. "Audio/Video link" that's of type "Link", and then put the url to the video file in that field.


MailGun through WordPress I am trying to use the MailGun extntion by teamsinger in WordPress  ( Civicrm 4.7.11 )

https://github.com/teamsinger/uk.teamsinger.civicrm.mailgun

The main issue I am facing is the webhooks back.

The documentation gives the path
https://www.example.com/civicrm/mailgun/bounce

Which may well be appropriate for Drupal but not for WordPress.

The code seems to create a page for the hook.

Accessing that page manually

https://www.example.com/?page=CiviCRM&q=civicrm%2Fmailgun%2Fdrop&reset=1

I can see that it is being reached via

https://www.example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmailgun%2Fdrop&reset=1

(as it is giving the correct validation failure generated by the code )

The issue is I need MailGun to reach that page and Mailgun is not logged in of course and

https://www.example.com/?page=CiviCRM&q=civicrm%2Fmailgun%2Fdrop&reset=1

returns with "Sorry, no content matched your criteria."  response

I have turned off all plugins except CiviCRM & turned off permalinks and given "Master control for access to the main CiviCRM backend and API"  to annoymous

All to no avail?

Any ideas?

OK Solved

The URL should be

https://www.example.com/civicrm/?page=CiviCRM&q=civicrm%2Fmailgun%2Fdrop&reset=1

AND permalinks must be turned on.

Annoymous access is not required (it seems) for this extension


How is 'contact modified' defined as on CiviCRM reports? I'm looking to run a report that only shows contacts who we've engaged with (registered for an event, joined our database, updated their details) in the past 12 months. Would the 'contact modified field deliver this report? Thanks all!

Yes! The Contact modified date filter will work to filter contact that are modified in past 12 months


Some contact information not returned by API Get call I am fetching individual contacts using the following:

function get_member($id) {
 $member = array();
 require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/civicrm/civicrm.settings.php';
 require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php';
 $config = CRM_Core_Config::singleton( );
 require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/civicrm/civicrm/api/api.php';
 $contact = civicrm_api('Contact','Get',array('contact_id' => $id, 'version' =>3));
 if ($contact) {
    $member = $contact['values'][$id];
    $member['membership'] = civicrm_membership_contact_get($id);
 }
 return $member;
}

function civicrm_membership_contact_get($contact) {
  $params = array('contact_id' => $contact);
  try{
    $result = civicrm_api3('Membership', 'get', $params);
    $id = $result['id'];
    return $result['values'][$id];
  } catch (CiviCRM_API3_Exception $e) {
    $errorMessage = $e->getMessage();
    $errorCode = $e->getErrorCode();
    $errorData = $e->getExtraParams();
    return array(
      'error' => $errorMessage,
      'error_code' => $errorCode,
      'error_data' => $errorData,
    );
  }

}

The values array returned has all of my name fields, address fields, job title, employer, email, region...  but not my website URL.  Screenshot is of the actual contact entry in the Civi admin.

How do I get the Website URL in my data?

According to the API explorer, the Contact Entity does not return the website information. To include that data, you would have to use a GET action on the Website entity. See the example at (your site)/civicrm/api#examples for the fields the Website entity can return.


DAO,BAO files are not reading in custom folder I am very much new in the CiviCRM . I want to create a custom component , For that I have not tauch the CRM folder I have created my own CTM inside civicrm folder the module name with related BAO, DAO, FORM, PAGE,XML, info.php, config.php and pseudoconstant.php. I have loaded CTM_ call to the class loader. My Form folder .php files is working and its loaded the .tpl file also, But DAO,BAO folders .php fils are not loading. can anyone help me out with this problem. I have created my CTM folder inside sites>all>module>civicrm>CRT.

If you want to create customizations for CiviCRM you should do so in extensions. You can read more about customizing CiviCRM and creating extension in the CiviCRM Developer Guide.

You could also check if there is a CiviCRM partner near you on this list to find out if they are organizing CiviCRM developer trainings you can follow.


How to use existing scheduled email function programmatically in extensions? I need to send payment page links to user on schedule basis, is there any way to use existing  scheduled email functionality trough custom extension?

you need to create an API in order to use schedule jobs

look for table called civicrm_job and make an similar entry for the newly created API and this will create an entry in schedule jobs

you can create an Extension first and then API in the Extension find the below link http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension

if you need more help please let me know


How do I make a new Custom Field Set visible in the Tab Display Style? I have created a new Custom Field Set.  When I set Display Style = Inline, the tab shows as expected.

However, when I set Display Style = Tab, it disappears.  There is no Custom Fields tab either?

How can I make the new Custom Field Set visible?

Damihyph

Tab or Tab with Table display style creates a separate navigation tab to display and edit the values.

It will be shown as an extra tab in the Contact Summary Page unlike Inline which include the set of fields in the main contact Add/Edit form and Contact Summary screens.

Note: Tab with Table is recommended for customs data sets which allow multiple records.


Image Extention .tif Does anyone know what image extensions CIVI recognises.

I want to upload .TIF images to civi contacts.  Is there a way to do this as the extension is not recognised.

Thanks,
Andy

You can add file types in Safe File Extension Options in the admin console. (I don't know if it's advised, but it's certainly possible :)

Go to Administer > System Settings > Safe File Extensions, then click 'Add Safe File Extension'. Enter the file extension (without the dot) in the Label field, make sure it's enabled, then save.

Edit: However, this doesn't actually help with .tif files. TIFFs aren't meant for web use, so (presumably) the image processing in CiviCRM or the CMS isn't designed to deal with TIFF files - it looks like CiviCRM has an additional check to stop the upload because of this. There are probably modules for Drupal that will add this capacity (Imagemagick comes to mind), but I don't know if they'll be picked up by CiviCRM.

If you don't need the images to be TIFF files, I'd recommend using a progamme like Irfanview ( http://www.irfanview.com/ ) to convert them to jpgs.

If you do need to have the files as TIFFs, then add a custom file field for the contact record - this will allow you to upload the files, but won't display a thumbnail. (You can always upload a jpg version as well to get the thumbnail).


Auto Renewal Membership Confirmation Emails not being sent - PayPal (Updated Title 2016-04-05) CiviCRM: 4.7.3
Joomla: 3.4.8
PHP: 5.5.45

None of my Membership Contribution confirmation emails are being sent.   It doesn't matter if the person pays via PayPal, or is using Pay Later, they don't go out.

I receive the confirmation from PayPal that a membership fee payment has been made, but no other communications from CiviCRM, and I do have the email setup for CC to me.

Scheduled emails are being sent, as people are coming to the website to renew their memberships; and I've done the Outbound email check to verify that CiviCRM can send emails through the server.

This was working fine until August 2015, about the time I upgraded to 4.6.8 or so.

I kept up with the upgrades thinking that it was a fluke, but have not seen any corrections.   I am not seeing any PHP errors, and I have been testing this using dummy names and a real email address to see if I can force any error messages.

I'm basically at a loss, and with a major event coming up, I need to have confirmations sent when people pay.     I haven't tested with event confirmations yet, but that's the next step.

UPDATE:  Just tested with events, and Confirmation emails are being sent to the attendee, and the treasurer so, at least for PayLater, the confirmations are going out for events.

UPDATE - 2016-03-18  upgraded to 4.7.4, and had to revert out of it as it broke the 'pay later' display as described in CRM-18118.

Installed the patch to CRM/Contribute/Form/Contribution/Main.php as shown in 18118, and also patched CRM/Contribute/Form/Contribution/Confirm.php as showin in 18118.

The live page shows the Pay Later, and when tested sent an email to confirm the renewal, and show an invoice.   The CC email copies were sent properly.  I am not going to reinstall 4.7.4 as it appears something else in that release broke the fixes in 18118.

UPDATE - 2016-04-05 - OK ... the patch I installed from CRM-18245 appeared to take care of the issue with manual renewals from the website.   I received a copy of the Paid Invoice, along with the email from PayPal acknowledging the payment.

So the final issue now is what is happening with Auto-Renewal Memberships?  Are they supposed to be acknowledged by the system, and a receipt issued to the member??

Based on the fact that on April 4th I received a PayPal notice of payment, but no other notice of an Auto-Renewal, I suspect that area is not working correctly.


Do I have to empty the database of a fresh civicrm install, before I import a dump from another server? (and a question about mysql 5.7 dump ->8.0) Salut. I am following this wonderful guide https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/
in order to migrate civicrm from one server to another (wordpress, external civicrm database).
It is unlclear to me, however, if I need to completely clear the database of the new civicrm install on the new server, before importing the dump file there. I do get quite some errors when I import into an already existing structure (f.e. table already exists, trigger already exists, foreign key....).
My case is double-complex, it seems, since the original dump is mysql 5.7 and the new database is mysql 8.0. I know mysql version should be the same, but it is impossible in this case.
Has anybody tried this yet? If the mysql version does not match, is it a lost cause?
Thanks for any hints.
Michael

Are you using phpmyadmin to export the old one? You can check the box for ADD DROP TABLE which should solve this. There should also be an option to disable key checks but the drop table might add that automatically.
Using mysqldump on the command line it does this by default, and also by default it disables key checks.


Use case: management of planning / volunteers for a music festival I'm taking care of the management of volunteers (about 800 people) for a 10-days music festival.
I've been using drupal+civicrm for this for about 5 years now. There were some complaints that the way it works is not user friendly (but had to be implemented quickly). We've been looking to replace cicicrm by a commercial product but found out this product can't beat civicrm ;-)

So now I'm looking how I can improve the civicrm setup so everybody is happy! I hope to get some tips ...

I'll try to describe the way we are organised now and how I've set this up in civicrm.

At the festival there are about 50 different workplaces: bars, stage, backstage, toilets, foodstands, ... Each workplace has one or more responsibles. Volunteers can work on multiple workplaces. The workplace responsible must be able to manage the data of people working for him / her only. (So not of the other people)
Currently this is setup using groups and giving access rights on groups. Disadvantage of this is that when a responsible adds a new volunteer but forgets to assign a group (or assigns the wrong group) he cannot acces the data anymore.

One of the most important parts is creating a planning of who will work in which place on a certain day and creating reports / lists. I've done this now using custom fields for the contacts and creating many reports using drupal views but this is a lot of manual work each year.
I was wondering if using civievents would be more appropriate?

Ideally each volunteer would also be able to manage his/her own data (such as address, indicate when he/she's able to work, ...)

Any suggestions on the optimal way to implement this?

I would recommend using the CiviVolunteer extension: https://civicrm.org/extensions/civivolunteer. We have one customer that uses this extension to manage the volunteerd planning for a big event.


DBError and Network Error when saving phone numbers to contacts In our organization's new civi database, we are unable to add phone numbers to contacts. I've tried keying in the number and importing a contact with a number. (It took me hours to figure out that it was the phone numbers that were breaking the import!)

There are two error messages we get, depending on the context:

In the View Contact view of the data, when I try to save a phone number, we get this error message:

  Network Error
  Unable to reach the server. Please refresh this page in your browser
  and try again.

In the Edit Contact view, or when trying to import a record with a phone number, we get this error message:

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

Log is below, and seems to suggest it has something to do with stripping non-integer characters from the field. However, adding a phone number without any dashes 5554443333 also produces the error. Any ideas?

  Jul 02 12:28:40  [info] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )

[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] =>
CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8)
  RETURNS VARCHAR(255) CHARACTER SET utf8
  DETERMINISTIC
  NO SQL
BEGIN
  DECLARE output   VARCHAR(255) CHARACTER SET utf8 DEFAULT '';
  DECLARE iterator INT          DEFAULT 1;
  WHILE iterator < (LENGTH(input) + 1) DO
    IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN
      SET output = CONCAT(output, SUBSTRING(input, iterator, 1));
    END IF;
    SET iterator = iterator + 1;
  END WHILE;
  RETURN output;
END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]
[type] => DB_Error
[user_info] =>
CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8)
  RETURNS VARCHAR(255) CHARACTER SET utf8
  DETERMINISTIC
  NO SQL
BEGIN
  DECLARE output   VARCHAR(255) CHARACTER SET utf8 DEFAULT '';
  DECLARE iterator INT          DEFAULT 1;
  WHILE iterator < (LENGTH(input) + 1) DO
    IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN
      SET output = CONCAT(output, SUBSTRING(input, iterator, 1));
    END IF;
    SET iterator = iterator + 1;
  END WHILE;
  RETURN output;
END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="
CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8)
  RETURNS VARCHAR(255) CHARACTER SET utf8
  DETERMINISTIC
  NO SQL
BEGIN
  DECLARE output   VARCHAR(255) CHARACTER SET utf8 DEFAULT '';
  DECLARE iterator INT          DEFAULT 1;
  WHILE iterator < (LENGTH(input) + 1) DO
    IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN
      SET output = CONCAT(output, SUBSTRING(input, iterator, 1));
    END IF;
    SET iterator = iterator + 1;
  END WHILE;
  RETURN output;
END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]"]

  )

Your error log says:

  ** You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)]

If you turn off logging at Administer > System settings > Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)  can you save phone numbers?

You can find information on the MySQL privileges needed for CiviCRM at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+MySQL+Permission+Requirements

Not all hosting companies provide these privileges without a specific request to do so (and even then some will refuse to do so).


How to get more debug info about "DB Error: no such field Return to home page" I have created an event registration form, using a profile with a custom field. When I click Continue after filling in the form, I see Processing ... and then I get the confirmation screen, which looks good. But when I hit Continue I get:

Sorry but we are not able to provide this at the moment. DB Error: no such field Return to home page.

WordPress 4.7.4
CiviCRM 4.7.17

I'm filling in two of the input fields from URL variables.  Not sure if that might be a problem.

If you want to try:

https://connectionpractice.org/test-webinar-with-affiliate-code/?affiliatecode=irthlingz1&eventtype=Introduction

I'm thinking I need to get more debug info to figure out which field is causing the problem.  How can I do that?

P.S. My code for the URL variables

<script>
(function($) {
  // all JS code here
var l = document.location;
  var affiliatecode = l.search.match(/affiliatecode=([a-zA-Z0-9_]+)/)[1];
var eventtype = l.search.match(/eventtype=([a-zA-Z0-9_]+)/)[1];
   $( "input#custom_3").val(affiliatecode);
   $( "input#event_type").val(eventtype);
})(jQuery);
</script>

There are two ways.
First, you can enable debugging and backtrace under Administer menu » System Settings » Debugging and Error Handling.

The same information should be available in your ConfigAndLog directory.  See Where are the "ConfigAndLog" and "templates_c" directories?


Postfix creates email bounces with permissions set to 600, but CiviMAIL doesn't like that! My new installation of CiviCRM 4.6.6 is virtually perfect but for one thing I cannot solve.

Incoming bounced messages are handled by the Postfix server and placed in a  directory where they are given permission 0600 in other words read and write by the owner only - "civicrm".

When I run the emailprocessor.php it happily deletes those messages but apparently can't read them! If I manually change their permissions before running the script then all is well and the bounces are correctly processed and the users marked "on hold".

Can you suggest a solution please?

Avoid using bin/emailprocessor.php, and instead configure your mail processor using the instructions under Configuring inbound email processing on CiviCRM's Email system configuration page.

You will create a mailbox accessible via network POP3 or IMAP protocols, not maildir.
You will configure a Bounce Processing mailbox connection under CiviCRM's Mail Accounts (Administer > CiviMail > Mail Accounts, civicrm/admin/mailSettings) to access this mailbox.
You will configure CiviCRM's Scheduled Jobs (Administer > System Settings > Scheduled Jobs, civicrm/admin/job) to run the Fetch Bounces Job periodically.
You will confirm that your system cron configuration is correctly triggering this job to run.

With a POP3 or IMAP server handling the interaction between CiviCRM and your server's MDA, permissions issues should never arise. The files will be read by the mail system (eg Courier) as an appropriate system user, and will be communicated over the (local) network connection to CiviCRM's bounce fetcher task. Much cleaner.

CiviMail Processor in the CiviCRM wiki has a pink warning box at the top (which is hidden in mobile view):

  Not Up to Date

  This page isn't up to date anymore as it references a deprecated script: /bin/CiviMailProcessor.php. The new method of handling incoming mail is described on this book page.


How can I export/import contribution pages and event pages from one site to another I want to export contribution and event pages from one Drupal7 site to another Drupal7 site.

Is this doable, any help greatly appreciated.

It should be possible (but I've not tried it ...) using the API for Event and ContributionPage:
civicrm_api3('Event', 'get', ...) to get them from one system and
civicrm_api3('Event', 'create', ...) on the other.

Take a look at the API explorer on your system (Support >> Developer >> API explorer).

Unless you have loads of them, it might be just as quick doing it manually!


Question about duplicate matching rule for event registrations what happens when you select "individualsupervised-supervised" for duplicate matching rule?  i have only selected unsupervised rule in the past, and it has caused problems because once the second child of the same parent with the same address is entered, the first child's name is on the registration again.  I want to know how to make sure if the same person registers multiple people, both or more names show up on the registration list.

Even though many children/youth these days have their own email address - parents will often use their own for registration/event purposes - b/c they aniticipate (correctly so) that's where receipts/reminders will go.

For such registrations you need to use/create a rule like first name + email address [as last name is often also the same within a household].

I prefer Drupal - webform-civicrm for this as it allows me to set up one specific matching rule for the Primary Contact [default unsupervised] - and then I can set up different matching rules for the other (children) Contacts on the form.

See https://civicrm.org/blog/sarahgladstone/recipe-for-handling-youth-registration-with-civicrm for a nice write up/example by Sarah on how this works.


How Can I Attach a PDF Certificate for a Membership Payment? On Drupal 7.35 / Civi 4.4.14 - is it possible for a membership payment via CiviContribute to e-mail a membership certificate as a PDF as an attachment to a receipt?

What we currently do is print membership certificates and post them, however the intention is to move to e-mailing them. I already have the template certificate stored as a mailing message template which comes out nicely when printed on A4.

I don't think it's possible right now without coding.

If you are not afraid of coding, what you could do is something like :

add you membership certificate after the content of the receipt (in templates) and add an arbitrary separator between your receipt and the certificate. In my case <!--break-->.
use the hook_civicrm_alterMailParams with the following content (extract the part after <!--break--> and put it in a pdf as a attachment) :

$pos = strpos($params['html'], '<!--break-->');
if ($pos !== False) {
  $pdf_content = substr($params['html'], $pos + 12);
  $params['html'] = substr($params['html'], 0, $pos);

  if (empty($params['attachments'])) {
    $params['attachments'] = array();
  }
  $params['attachments'][] = CRM_Utils_Mail::appendPDF(ts('Membership certificate') . '.pdf', $pdf_content);
}

I may create a little extension for this.


Listing events that only belong to a group I have CiviCRM 5.12 on drupal 7. I want to create a drupal view containing the next events that are printed if only the contact belongs to an authorized group. That is, when I create an event, I link it to a group with a custom field and in the view, I want to filter the events and keep those reserved for the group containing the contact corresponding to the user drupal.  Please can you help me ?

I think you can filter the views using CONTEXTUAL FILTERS. Add group custom field in CONTEXTUAL FILTERS set default value to use below php code

    civicrm_initialize();
    try {
      $result = civicrm_api3('Contact', 'getsingle', [
        'return' => ["groups"],
        'id' => "user_contact_id",
      ]);
      return $result['group'];
    }
    catch (Exception $e) {
      return 0;
    }

Cheers

Pradeep


Wordpress Multisite Installation Error I have a Wordpress multisite that I have civicrm installed on.  I did an upgrade to the new version and the database shows that it is the new version.  Problem is that the civi dashboard thinks it has not been upgraded and shows an error.

I've seen this happen when there's a permission issue on the version-info-cache.json file that prevents the upgrader from properly deleting it.  The file can be found in your CiviCRM "Temporary Files Directory".

If you're not sure where to find your Temporary Files Directory, you can check at Administer menu » System Settings » Directories.  If there's a token (e.g. [civicrm.files]/upload), you can see the value of the token by pressing the "help" icon (see screenshot below).

Try deleting version-info-cache.json manually (e.g. via FTP or CPanel File Manager).  Then visit the Civi System Status Page (Administer menu » Administration Console » System Status) and the issue should clear up.

This file is also auto-deleted every three days - so if this seems like a lot, simply ignore it!


Why are activities to do with a case hidden from contact records? I have a case and it has some activities which are assigned to Betty. But when I visit Betty's contact record the activities are not listed there, neither is the case, in fact there seems to be absolutely no trace that this activity has been assigned to them.

The Activity tab for a contact record is useful for getting an overview of a contact's involvement with the organisation, so I don't understand why this would be missing?

Is this the designed behaviour, and if so, why?

(Civi 5.21 / Drupal 7)

That is how it was intended. Let me see if I can find the original spec for more info.

UPDATE: Haven't found it yet but did find https://issues.civicrm.org/jira/browse/CRM-3829 and also a reference that it is "in the spec" https://forum.civicrm.org/index.php%3Ftopic=6895.0.html

I know the reason is somewhere, but it has come up several times. Regardless of the original reason it seems to be one of the many things in Civi that 50% of people want it one way and 50% another.

I haven't tested this but I wonder what happens if you change showActivitiesInCore to 1 in CRM/Case/Info.php...

ANOTHER UPDATE: As I'm looking at the PR I'm reminded that the CiviCase project at the time was also being used as a sandbox for this new thing called jQuery (the rest of civi used dojo), and so part of the reason besides business reasons might have been technical, as in "let's keep this separate so we can play with it without touching the rest of core". There's also some actions like "File on Case" that require some attention when the activity can live on both sides. I also remember at one time, but it seems fixed now, that there were multiple link formats to get to editing an activity, and if you used a non-case one the activity would get "downgraded" to a regular activity and get disconnected from the case.


Random 9002 Errors from iATS when making donations WordPress 4.6.26
Civi 4.7.3
iATS for Payment Processing

Beginning in Jan we started hearing from donors that when they set up donations they would get a 9002 Error when they clicked Confirm. So far it appears to be ACH transactions that are having trouble.

The iATS Request Log for these donations looks the same as all others. However, the iATS Response Log does not have anything in the auth_result field.

The first time this happened, I attempted entering the donor's account info for them and got the same results. 20 minutes later it went through with no error.

The other cases have processed the first attempt for me but I can see in the Response Log that they tried several times with no auth_results data. I have another one right now that the donor tried 2 days in a row and got the 9002 Error. I have not tried to do it yet because I was hoping to do some trouble shooting first.

At least two of the donors were using Google Chrome for their browser. I have not seen any problems with any browsers except IE.

How to get IATS working  It is about someone else getting the 9002 Error (but theirs was constant). I changed to Karin's https://www2.iatspayments.com/NetGate/ProcessLinkv2.asmx?WSDL and donations are still processing.
Just for clarification, does any one know:
1. What are the special characters to avoid?
2. Is this in our password with iATS/Civi or is this in the donor's password?
3. Is there a list of potential "misconfiguration" issues out there somewhere that I can go over?

Does anyone have any other ideas for troubleshooting the sporadic loss in communications? Are there other logs that would show if Civi actually sent the request or that show if iATS received the request?

Intermittent issues can be difficult to diagnose. A couple of notes that may help:

What you really need to do is to get TLS 1.2 and switch back to the www server. The www2 server is only needed for those not at the TLS 1.2 standard yet and is going to go away. Your lack of TLS 1.2 is probably a symptom of a system that is not up to date or maintained, that could well be the key issue.

Avoid any special characters in your iATS 80 account password; If you're using another than 80 account w/ iATS then confirm with customer services that you can deposit monies into that account via WebServices. If you're using more than one iATS subaccount 80, 81, 82 etc confirm all are able to accept monies via WebServices.


Events link outside of civicrm admin area does not work in wordpress I installed wordpress in a directory that is not root. I later installed Civicrm. From within the admin area I am able to access the events without any issue. when I use the test link to access an event it works. However when I use the live link, it goes to the wrong address. What do I need to change to get the live links to work outside of civicrm admin area?

Example:
Working link
http://akhawaty.org/aiw/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Finfo&id=7&reset=1

Nonworking link
http://akhawaty.org/aiw/civicrm?page=CiviCRM&q=civicrm/event/info&reset=1&id=7

I believe that installing CiviCRM with WordPress in a different directory is not fully supported.

See this answer: 404 errors for loading CSS on Event pages (Wordpress)

The list of issues are documented on this page in the Wiki: WordPress installed in its own directory issues

If possible, I would suggest that you install WordPress in the root directory.


Payment Page not accessible to anonymous users in Wordpress [I have updated some information following Tamara's answer, but it is still not accessible by anonymous users]

I need people to be able to be able to sign up and pay for membership.

I set up a CiviCRM Membership and a Price Set for the membership
I created a profile (including custom fields) for the membership registration
I ticked the box that says 'Account Creation Required' under WordPress user account registration option for the profile [Update: one of the profile fields is Email (Primary)]
. I've set up a CiviCRM Payment Page for membership fees using above profile. [UPDATE: I set up some Word Replacements, hence Payment page not Contribution page.]
I've checked the permissions for Anonymous Users to create, edit, view profiles.
CiviCRM: Access all custom data fields checked for Anonymous
CiviCRM: access contact reference fields is checked for Anonymous users [Update: I'm using address details from Contacts]
CiviContribute: make online contributions  is checked for Anonymous user
[Update] CiviCRM: Profile listings and forms:  is checked for Anonymous user
I've created a Wordpress page and used the CiviCRM shortcode to add the payment page

When I access that page logged in, it displays no problem. Logged out, it's coming up with the civiCRM alert 'You do not have permission to access this page.'

When this happened before for another civiCRM profile I set up (with no payment), it was because I had not ticked 'Create' within the civiCRM shortcode options for Profiles; as soon as I did that, anonymous users could you see the page and fill in the form and create an account.

However, with a payment page, I'm not seeing an option for 'Create'.

How do a I set up a page where people can sign up for membership, create an account in Wordpress, and pay the fee all at the same time when not logged in?

Any help much appreciated.

The page in question.

Cheers,
Tracy

Since you have questions regarding the specific steps you took, I copy and paste all of them below and intersperse with my responses (IN BOLD CAPS for clarity):

I set up a CiviCRM Membership and a Price Set for the membership > GOOD
I created a profile (including custom fields) for the membership registration > GOOD
I ticked the box that says 'Account Creation Required' under WordPress user account registration option for the profile > YOU MUST INCLUDE A PRIMARY EMAIL ADDRESS FIELD IN THE PROFILE FOR THIS FEATURE TO FUNCTION PROPERLY
I've set up a CiviCRM Payment Page for membership fees using above profile. > GOOD
I've checked the permissions for Anonymous Users to create, edit, view profiles...> AS INDICATED HERE, YOU ALSO NEED TO ENABLE THE PERMISSION FOR
PROFILE LISTINGS AND FORMS
...and Access all custom data fields (Not sure this is necessary?) > YES, THIS TOO IS NECESSARY
CiviCRM: access contact reference fields is checked for Anonymous users > UNLESS YOU ARE USING CONTACT REFERENCE FIELDS IN YOUR PROFILE, THIS IS NOT NECESSARY
CiviCRM: add contributions of type Campaign Contribution is checked for Anonymous users > UNLESS YOU ARE USING THE FINANCIAL TYPE OF CAMPAIGN CONTRIBUTION FOR MEMBERSHIP DUES, THIS IS NOT NECESSARY
CiviContribute: make online contributions is checked for Anonymous user > GOOD
CiviCRM: access Contact Dashboard is checked for Anonymous user (not sure if necessary?) > AS INDICATED HERE, THIS PERMISSION SHOULD NOT BE GIVEN TO ANONYMOUS USER
I've created a Wordpress page and used the CiviCRM shortcode to add the payment page > IF YOU HAVE ALL OF THE REQUIRED FIELDS IN PLACE PERMISSIONS ENABLED AND THIS STILL ISN'T WORKING FOR YOU, PERHAPS YOU SHOULD TRY USING ONE OF THE OTHER OPTIONS FOR LINKING YOUR MEMBERSHIP PAGE TO YOUR WEBSITE AS INDICATED HERE

Hope this helps!
Tamar


Error in Class CRM_Extension_Mapper 'Class CRM_Extension_Info not found' when installing 5.24 in Drupal 7 I have a problem enabling CiviCRM 5.24.2 after installation in Drupal 7.69 under PHP 7.2.27 under Centos7 Apache/2.4.6

CiviCRM installs correctly using both UI and CV method - ie builds database & civicrm.settings, but fails to enable (same error in both install methods).

drush en -y civicrm produces the following error (and breaks Drupal site):

WD php: Error: Class 'CRM_Extension_Info' not found in CRM_Extension_Mapper->keyToInfo()
Error: Class &#039;CRM_Extension_Info&#039; not found in CRM_Extension_Mapper->keyToInfo() (line 170 of /srv/web/climatebonds.net/web/sites/all/modules/civicrm/CRM/Extension/Mapper.php).
Drush command terminated abnormally due to an unrecoverable error.

drush dis -y civicrm returns site to working order.

No problems with installation under local environment: Apache/2.4.35 (Unix) PHP/7.2.19

This issue fixed .. simply due to missing file in deployment.


screen for composing a mail is blank I am using CiviCRM 4.7.21, on Drupal 7.56.
I am attempting to send a monthly mail-out.  If I choose last month's mail-out and click the "re-use" button, I get a blank screen:

If I go to mailings->draft, my new mailing is listed there.  If I then click "continue", it goes to the same blank screen.  If I try using mailings->new mailing, again the same blank screen, and a new draft mailing that I can't edit.
This problem seems to have come up since I updated from 4.7.20 to 4.7.21 (updated 2 weeks ago, but this is the first new mailing we're trying to create since then).
If more information is needed in order to reply, please tell me how/where to find it.

thanks,
CMD

This may be related to Status page angular load error. Make sure that the following two items point to the same place:

Image Upload URL at Administer > System Settings > Resource URLS
Image Directory at Administer > System Settings > Directories

If this doesn't work, try disabling Asset Caching at Administer > System Settings > Debugging and Error Handling until this bug is fixed.


Deadlocks on a high load of contact inserts We use CiviCRM 5.21.2 with Drupal 7.69 and Webform together with webform_civicrm to provide petitions. The petitions ask for address and email. So every petition signature creates a contact with email and address. Additionally every contact gets a tag and if the email is confirmed with webform_confirm_email in some cases a group.

If the load on this webform submission gets higher we face deadlocks. Some of them seem to connected to group cache and acl cache and some to email or address inserts.

I saw that the tables email and address have triggers defined for insert, update and delete that write into the table contact. For example:

UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.contact_id;

Is it possible that these triggers have something to do with at least some of the deadlocks. Or that they at least make the chance higher to run into a deadlock?

Does anybody know, why they are there? Is it necessary to update the modified_date in the table contact immediately or would it be sufficient for the system if this is done by a cron job that runs once per day?

Do you have some smart groups that are getting re-calculated on each submission perhaps?

Here's my answer to a more general question about smart groups and performance:
How Smart Groups Work


CiviReport - Add days to Transaction Date for Estimated Deposit Date Our Treasurer has asked for a report that will help him reconcile the monthly bank statement more efficiently. As with most financial services vendors, our vendor (iATS) has a delay between the transaction date (or receive date in Civi) and the day the money is actually deposited into our organization's bank account.  This creates an extra step for our treasurer as he has to line up the transaction dates in Civi to the deposit dates on the bank statement.

iATS has the added wrinkle that credit/debit card transactions are deposited on a different schedule than ACH/EFT transactions.  How can I create a column in the CiviContribute Bookkeeping Transactions report that will give an estimated deposit date for each donation based on what type of payment instrument was used and what day of the week the transaction took place?

For reference, iATS deposits transactions on this schedule:

Credit/Debit cards - 1-2 business days, rolling; to be safe, the default on the report will be 2 business days unless the transaction happens on a Friday-Sunday; then it will be the following Monday.
ACH/EFT - each Sunday through Saturday is deposited on the following Wednesday.

Civi 4.6.20, Drupal 7

This is not an elegant solution by any means.  But it does work.  So there's that.

To start, I copied the Bookkeeping transactions report from here (sites\all\modules\contrib\civicrm\CRM\Report\Form\Contribute) and renamed it Reconcile.php and placed the new file in my custom PHP folder so I wouldn't be adjusting the original report.

I renamed the class on line 35 to CRM_Report_Form_Contribute_Reconcile so the class name and file name match.

My report does not require both the Receive Date and Transaction Date columns, so I re-purposed the Transaction Date column. (Truthfully, I would rather have been able to add a column for this, instead of re-purposing an existing one... but alas, I didn't know how). In the function __construct(), under 'civicrm_financial_trxn' 'fields', I changed the 'title' of 'trxn_date' to 'Est Deposit Date'.  Approx line 299:

'trxn_date' => array(
  'title' => ts('Est Deposit Date'),
  'default' => TRUE,
  'type' => CRM_Utils_Type::T_DATE,
),

I also changed the title in the 'filters' section so that the UI would match.

Then in 'function select()', I added another case to the switch ($fieldName) (which begins approx line 371). Our payment instrument 1 is credit/debit cards. Our payment instrument 2 is ACH/EFT.

//adjust Transaction Date column to yield adjusted dates for Estimated Deposit Date
case 'trxn_date':
  $select[] = " CASE
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 1 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 1
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 1 DAY)
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 1 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 6
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 3 DAY)

     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 2 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 1
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 10 DAY)
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 2 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 2
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 9 DAY)
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 2 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 3
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 8 DAY)
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 2 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 4
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 7 DAY)
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 2 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 5
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 6 DAY)
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 2 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 6
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 5 DAY)
     WHEN {$this->_aliases['civicrm_financial_trxn']}.payment_instrument_id = 2 AND DAYOFWEEK({$this->_aliases['civicrm_financial_trxn']}.trxn_date) = 7
     THEN DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 4 DAY)

     ELSE DATE_ADD({$this->_aliases['civicrm_financial_trxn']}.trxn_date, INTERVAL 2 DAY)
     END AS civicrm_financial_trxn_trxn_date ";
break;

I'd be curious to hear and learn how others might have tackled this. I know I could have done this as an extension, but that would have been more work for me at this point.  Maybe if I learned the extension system better it wouldn't be more work in the future.  :-)  I also initially tried finding a solution in Drupal Views, but I couldn't sort out how to add days to a date within the Views ecosystem.


What can I do so that mailings sent through Civi are not marked as spam? I need to send a mailing but I've had problems before because a large share of the intented recipients never read it because the mailing was detected as spam. How can I solve this?

An alternative solution is to use a third party service to send the emails and not the web server. They'll be better placed to ensure your not marked as spam. Services such as CiviSMTP (Paid), Mandrill (Free to small lists or with Mailchimp plans otherwise Paid) and Sendgrid (Paid) can all be used. I would recommend this as a longer term solution rather then trying to manage your own reputation.


Addition of custom-fields I would like to know if it is possible to customize the description of the contacts or any objects of the system?
Can we enrich dropdown lists?
Can we add fields and indicate it's a text, a date, a decimal, a booelan etc...
Can we reorganise the tabs layout and mix standard fields and customized fields as we want?

Thank you for your answer
Regards
Evelyne PLEE-LEMOYNE

Thank you for your interest in CiviCRM. Broadly, the answer to your question is 'YES'.

Since CiviCRM is open source software it is possible to customise anything and everything. However, some things are much easier to customise than others.

For example you can easily make changes to the configuration to do the following:

customise the user interface - including dropdowns, display preferences and search preferences
create custom fields
create profiles - to collect or display related fields

Other changes may require custom coding and so may require a developer to make the change for you (or you could learn how to do this yourself if you are that way inclined).

If you have specific questions about any of these topics it would be best to post them as separate questions. As mickadoo says StackExchange works best if you just ask one question per 'question'.


CiviCrm will not install on Joomla 3.5.0 Installation fails with the following error using Joomla 3.5.0:

0 Call to undefined function dl()

Installation succeeds when using Joomla 3.4.8

Any help would be appreciated.

I'm currently running J 3.5.0 with CiviCRM v 4.7.4. Have you tried upgrading J 3.4.8 install to J 3.5.0? If not, I would give that a try.


CiviCRM Dashboard Hangs for 5+ minutes I have migrated a site from:

Unknown OS (Was through BlueHost)
cPanel 11.52.6 (build 1)
Apache (v. 2.2.31)
PHP (v. 5.2.17)
MySQL (v. 5.5.42-37.1)
WordPress (v. 4.5.3)
CiviCRM (v. 4.6.9)

To:

CentOS release 6.8
cPanel 56.0 (build 25)
Apache (v. 2.4.18)
PHP (v. 5.6.22)
MySQL (v. 5.6.30)
WordPress (v. 4.5.3)
CiviCRM (v. 4.6.19)

I have followed the documentation found at https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location and have managed to get CiviCRM to run but with a hiccup. The initial loading of the CiviCRM dashboard takes a very long time, sometimes 5+ minutes, but after the initial load everything is incredibly fast and flawless. Seems to happen only when it is trying to establish a new session as if I clear cache and try to get back to the CiviCRM dashboard it reproduces the issue but the issue will not reproduce as long as the session isn't reset like logging out or clearing cache. I have also noticed that if you sit and let it load that the dashlets then will not load and just shows the spinning loading image and never actually loads but I am guessing these two issues are related.

I have also followed the recommendations found here: civicrm dashboard won't load and have not been able to fix it.

Also I have tried many things like clearing the cache, deleting CiviCRM and re-installing then importing the database and then using the CiviCRM database update utility and seems like nothing is solving the issue.

Snooping around in the Apache, PHP, MySQL, & CiviCRM log files I found only one error being reported that I know is related to the dashboard hanging at public_html/wp-content/plugins/files/civicrm/ConfigAndLog/ here is the pastebin: http://pastebin.com/TRTg0sHx

I feel as if I have tried everything and am out of ideas, any help as what to do to get this resolved would be greatly appreciated.

EDIT: Ignore "UPDATE (7/12/2016)", found out that this was a separate issue, sorry for the confusion.

UPDATE (7/12/2016):
Decided to try a fresh cPanel account, fresh WordPress, and fresh CiviCRM installtion and only running the bare basics to see if the problem would still exist and it does. But on the new install these errors come up:

Warning: session_start(): open(/tmp/sess_c279ba138c878520b23fb7085f54a267, O_RDWR) failed: Permission denied (13) in /home/civicrmtest/public_html/wp-content/plugins/civicrm/civicrm.php on line 282

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/civicrmtest/public_html/wp-content/plugins/civicrm/civicrm.php:282) in /home/civicrmtest/public_html/wp-content/plugins/civicrm/civicrm.php on line 282

Warning: Cannot modify header information - headers already sent by (output started at /home/civicrmtest/public_html/wp-content/plugins/civicrm/civicrm.php:282) in /home/civicrmtest/public_html/wp-includes/option.php on line 823

Warning: Cannot modify header information - headers already sent by (output started at /home/civicrmtest/public_html/wp-content/plugins/civicrm/civicrm.php:282) in /home/civicrmtest/public_html/wp-includes/option.php on line 824

The first two errors above show and then the dashboard takes forever to load and then once the dashboard loads the last two errors display. Also the dashlets do not load properly afterwards and keep the "Loading..." message with the twirling image.

https://issues.civicrm.org/jira/browse/CRM-16035 has now been fixed. So your best solution now would be to upgrade to CiviCRM 4.7.11 which will include an improved dashboard that no longer depends on server-to-self http requests.

This upgrade will be released in about 2 weeks. The new dashboard features are sponsored by WMF.

Read more about the issue at https://issues.civicrm.org/jira/browse/CRM-17663


What to do when upgrading from 4.3.4 to 4.6.0 is failing? I loaded a new 4.6.0 database with data dumped from a 4.3.4 database. The update ran okay to a certain point, when I got this message:

*[Error: Upgrade DB to 4.6.alpha7]
Error Field Error Value
Type    DB_Error
Code    -1
Message DB Error: unknown error
Mode    16
UserInfo    ALTER TABLE civicrm_mailing_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD CONSTRAINT FK_civicrm_mailing_abtest_created_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL [nativecode=1060 ** Duplicate column name 'created_id']
DebugInfo   ALTER TABLE civicrm_mailing_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD CONSTRAINT FK_civicrm_mailing_abtest_created_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL [nativecode=1060 ** Duplicate column name 'created_id']
PEAR_Exception: DB Error: unknown error in unknown on line unknown
- DB_Error: DB Error: unknown error in unknown on line unknown*

If I understand correctly, you first installed 4.6.0 and then loaded a DB dump for 4.3.4 on top of the 4.6.0 system. Doing so would put the database in an inconsistent state — some elements from 4.6.0 (e.g. the table civicrm_mailing_abtest) are still present, but other elements are replaced by the 4.3.4 version (e.g. the table civicrm_domain).

When loading an old database dump, ensure that you are loading into a pristine database. The easiest way is to drop+recreate the database before loading.

If for some reason that's not possible (eg the database is shared with another app whose data must be preserved), then you might drop all civicrm_* tables (and preserve the other tables). The exact steps will depend on your tooling. I can't speak about any GUI tools, but if you're comfortable with scripting, then you could ripoff this snippet from setup.sh.

echo; echo "Dropping civicrm_* tables from database $DBNAME"
echo "SELECT table_name FROM information_schema.TABLES WHERE TABLE_SCHEMA='${DBNAME}' AND TABLE_TYPE = 'VIEW'" \
    | $MYSQLCMD \
    | grep '^\(civicrm_\|log_civicrm_\)' \
    | awk -v NOFOREIGNCHECK='SET FOREIGN_KEY_CHECKS=0;' 'BEGIN {print NOFOREIGNCHECK}{print "drop view " $1 ";"}' \
    | $MYSQLCMD
echo "SELECT table_name FROM information_schema.TABLES WHERE TABLE_SCHEMA='${DBNAME}' AND TABLE_TYPE = 'BASE TABLE'" \
    | $MYSQLCMD \
    | grep '^\(civicrm_\|log_civicrm_\)' \
    | awk -v NOFOREIGNCHECK='SET FOREIGN_KEY_CHECKS=0;' 'BEGIN {print NOFOREIGNCHECK}{print "drop table " $1 ";"}' \
    | $MYSQLCMD


Help with configuring CiviCRM new to Civi CRM and really need help with setting up / customising. Anyone here that does that as volunteer for charity or paid ? looked on peopleperhour and cannot find

Welcome to StackExchange.  You can find many people who will do this on a paid basis at https://civicrm.org/partners-contributors

If you want to do it yourself and have specific questions then ask away on this site.

If you describe what your charity is, it may just resonate with someone willing to offer more substantial pro-bono help - but that's an exception.