Why do I get "Access denied; you need (at least one of) the SUPER privilege(s) for this operation" when importing a SQL dump to CiviCRM? When attempting to import a database dump from CiviCRM on a computer other than the one I dumped it from, I often get an error that looks like:

[ERROR in query 7] Access denied; you need (at least one of) the SUPER privilege(s) for this operation

How do I fix this?

CiviCRM defines MySQL triggers for certain tasks.  When you use phpMyAdmin, mysqldump or similar to export your database to a text file, it exports your triggers as well.  The format is something like this:

/*!50003 CREATE*/ /*!50017 DEFINER=`newpress`@`localhost`*/ /*!50003 TRIGGER civicrm_address_after_insert after insert ON civicrm_address FOR EACH ROW BEGIN

The issue is the DEFINER clause.  This specifies the user whose permissions are used when the trigger runs.  When you import a database, it defines your triggers, but you can NOT define a trigger to run as someone other than yourself.  So if the MySQL username has changed, you must fix your triggers.

You can either a) change the name of the MySQL user listed as the DEFINER, or b) remove the DEFINER portion of the clause altogether.  If you don't specify a user, MySQL will default to DEFINER = CURRENT_USER, which in this case is correct.

You can fix this with a search-and-replace in your favorite text editor.  If that text editor is vim, you can press : and paste this command in to remove all the definer clauses:

%s:/\*\!50017.*localhost`\*/::

EDIT: Chris' regex below is good.  I improved it slightly here:

perl -pi -e 's#\/\*\!5001[7|3].*?`[^\*]*\*\/##g' /path/to/mysqldump.sql


can't add profile to an event I have three environments that I can work in.

Production - the live site, currently 4.7.9
Development - a development site, currently 4.7.7
Staging - a sandbox, currently 4.7.9

I create an event in Production, go to the Online Registration tab. The "Include Profile (top of page)" label is there but the field is missing. The "Include Profile (bottom of page)" field is there as a text field (not a dropdown list). I can type in either the name of the profile or the profile ID, but the profile doesn't appear on the site web page, only the three default event fields (first name, last name and e-mail). The behavior on the Development site is the same.

When I create the same event/profile on the Staging (sandbox) site, the the "Include Profile" fields generates a dropdown list of current profiles and the profile fields correctly appear on the site web page.

Any ideas on what's going on?

Thanks!

Adam

This most often indicates a Javascript error - and in particular, this suggests a collision of Backbone.js with your CMS.  I suspect this question is actually a duplicate of mine here: Backbone isn't loading on Civi 4.6.11/WP 4.4.1

I should perhaps edit that question, since this appears to be a common issue with certain WordPress themes that have a media loader.


How to disable "From email address" for unauthorized users? If we define "From email address" then any user can use any of these addresses to send an email through the CiviCRM. Is there any way to disable the selection of these addresses for specific roles?

You can try following:

Go to Administer-> Customize data and Screens-> Navigation Menu and  select Mailing.
From mailing option, do right click and edit on 'From Email Address'.
In the next window, you can choose permission to that particular menu under 'Mailing'.
After choosing permission for menu, assign that permission to the role you want.

With this you can give permission to single submenu.

If you want restrict unauthorized user, simply do not assign the permission to anonymous user


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

i have finally set up my Checksum for profile update. However when link is clicked inside email i am getting this message-
"This profile is configured for contact type 'Individual'. It cannot be used to edit contacts of other types.
If I disable the Fist Name and Last Name fields for that profile it works.

Is there a way around this as i really need to have a First Name Last Name.

I'm not sure which CMS you are using but, per the civicrm wiki page, the URL Checksum for standard Profiles (edit mode) is as below:

To send people to a profile use this path where N is the ID of the Profile you want to send them to:

Drupal: http://www.myorganization.org/civicrm/profile/edit?reset=1&gid=N&{contact.checksum}&id={contact.contact_id}
Joomla!: http://www.myorganization.org/index.php?option=com_civicrm&task=civicrm/profile/edit&reset=1&gid=N&{contact.checksum}&id={contact.contact_id}
WordPress: http://www.myorganization.org/?page=CiviCRM&q=civicrm/profile/edit&reset=1&gid=N&{contact.checksum}&id={contact.contact_id}

Hope this helps and solves your problem.


Adding Case Role to CiviCRM Cases Views I have created a CiviCRM Cases View. How would I add a column for "Case Manager" role to the Views? I am unable to find the field where that can be displayed.

Actually you'll need to start with a CiviCRM Relationships View.

If you start with a view of CiviCRM Cases, you may get bad data if they have multiple open case types with different case managers.

So create a new view of CiviCRM Relationships, then in the advanced section add the Case ID relationship, then add the Contact A (the client) relationship and finally the Contact B (the case manager) relationship.

Add a Display Name field using relationship Contact A, then add another Display Name field using Contact B.

Here are all of the fields I eventually added:


Importing and updating pledges I want to import a bulk pledges to my CiviCRM installation and also I need to updating the pledges in every month. If I do it in manual it is very time consuming process. is there any easy way like import to update the pledges ?

You can import pledges with the API csv Import GUI extension mentioned in these questions:

api csv import - cannot find start page

Importing Pledges


What's the correct webhook for Stripe 5.2 extension? I can't find any documentation for the latest Stripe 5.2 extension and I've setup the webhook as 'https://www.example.com/civicrm/payment/ipn/1' - I have setup Stripe as the only payment processor hence the '1' at the end.  Is this correct?
Using Civi 5.7.3 and Drupl 7.61

Yes, The new webhook url should be https://www.example.com/civicrm/payment/ipn/1 where 1 is the payment processor ID.

Cheers

Pradeep


Is Civibooking compatible with PHP 7? We depend on Civibooking and CiviCRM developers with be ending support for PHP 5X soon. What is the status of Civibooking and PHP 7? I did try to run on PHP 7 a while back and had issues in Civibooking.

I would suggest you try it out whether it works on PHP7. And if you find out it breaks you have two options:

Fix it yourself (if you are a developer) and push a Pull request to the original developer
The other option you have is that you pay a developer to fix CiviBooking.

There is also a third option and that is to ask around in the community whether there are other people willing to contribute to make CiviBooking compatible with PHP 7.

I have one last remark, PHP, CiviCRM are all open source. So there is no supplier who guarantees that stuff keeps working. The End of support of PHP5x does actually not mean a lot, it means that the original developers of php5 will not bring out any new (security) releases of that php version. But others might still do that and no one prevents you to fix your php yourself when you discover a security flaw.

One really last remark, you said you depend on CiviBooking. The other option you have is not to upgrade php 5 to 7 as it brings in a risk for continuity of your primary process in your organization. But if you do not upgrade you have another risk and that is that your php 5 might become insecure at some point in the future.


How many users in a network We are a non-profit transition movement in Norway. If we as ha "head office" sign up for a user license, will all our grasrootgroups (=neigbourhood) around in Norway be able to use the same license?

First of all welcome to CiviCRM :)

As CiviCRM is published under the free GNU AGPL license there are no licensing costs and you do not even have to sign up. All your grasrootgroups can use your database or get their own copy /environment of CiviCRM (depending on your use case / requirements).


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

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

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

Thanks,

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

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

Issue 1: you have two solution for the same

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

ELSE

In webform_civicrm Module - includes/wf_crm_webform_postprocess.inc -> function validateBillingFields() - remove 'billing_state_province_id-5' => FALSE,

Issue 2: I guess this is also related to Version

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

I guess this helps !!!


Ideal Civi Setup for big database New here and a few months ago we start working with Civi for a small project but now we are planning to use it for a project with a over 300.000 contacts and 40+ users. I would like some help and suggestions :

What is the ideal Civi setup for a large project like this ?
Shoud we use wordpress or drupal ?
Local or Cloud hosting ?

Thank you in advance.

As others point out, there are no clear answers. The number of simultaneous users is also an important factor. But here are some tips from my administration of a similarly-sized database:

I run everything on a 4GB server.  This is usually sufficient, but when my client had a very high-traffic event, I saw some monitoring warnings (though I couldn't detect slowdown in manual testing).  If you're eligible for Microsoft Azure free hosting credits, you can get an 8GB server and not worry*.
Local vs. cloud doesn't affect performance.  If "local" implies "not accessible to the Internet" that will mean you lose some features though.
Install Redis.  I have it on my live site but not my dev site and the difference is noticeable.
Tweak your MySQL settings to give as much InnoDB cache as you can spare.

* As Alan points out in the comments, there are many political reasons to not host with Microsoft; data privacy issues, jurisdiction and a willingness of your host to fight for your rights are all important.


How to identify if a contact id is associated with an administrator role? I need to write a code to identify if a contact id is associated with an administrator role in my civiCRM extension and it needs to be platform independent.
How can I achieve it ?

I don't think you can do this in a platform-independent way since "admin role" means different things in different CMS's. What you can do that is platform-independent is check specific CiviCRM permissions, e.g. CRM_Core_Permission::check('administer CiviCRM', $contact_id)
You can leave out $contact_id to check for the currently logged-in user.


Recurring contributions cancelled in Civi NOT cancelled in Authorize.net Anyone having issues with recurring contributions being cancelled in Civi not being communicated to authorize.net in 4.7.9?

Turns out that this was an issue caused by the iATS extension - strange as that may sound - you will find details at the following link: https://github.com/iATSPayments/com.iatspayments.civicrm/issues/188

Whether or not the cancel recurring for PayPal ever worked is a separate question altogether (for us it never has).


Adding a column for Document Links to the Activity table in CaseView In the CiviCRM Case View, I want to add another column to the Activities table. Right now, the last column contains some links ("View", "Edit", "Delete") and one link to an attached document if existent.
I want to split this last column in two, so the link to attachments and the other links are in two different columns.
Therefore, I doubled the last column inside the sites/all/modules/civicrm/templates/CRM/Case/Form/ActivityTab.tpl template:
&nbsp;
&nbsp;

Then, I adapted the first column like this:
&nbsp;Dokumente
&nbsp;

Now, I am stuck at the content part. Does anyone know from which location "links" is called or created? I read that the html "data" attribute can be used by a JavaScript script. As I need only the links to any attached documents, but not the others, I would need to alter that script.
Edit: Alternatively, it would be helpful to know where the Activity table is created (
).
Edit: Reading Demerit's answer, I have checked the addCaseActivityLinks() function. To adapt it for my documents column, I thought about copying the function, renaming it, adapting it, and make the ActivityTab.tpl call it inside my document  tag.
Another solution would be to use an existing param of the addCaseActivityLinks() function in order to determine with which value of data-data the function has been called (data-data="links" or data-data="documents"). These existing params are: $caseID, $contactID, $userID, $context, $dao, $allowView = TRUE
I think I am still missing understanding of how/where the addCaseActivityLinks() function is called, so I would be able to implement one of the abovementioned solutions. I searched the whole project for a fucntion call, but couldn't find one. Any hint anyone?

Finally, I solved the problem like this:

sites/all/modules/civicrm/templates/CRM/Case/Form/ActivityTab.tpl -> add another cell to the activity table:
<th data-data="document_links" data-orderable="false" class="crm-case-activities-status">&nbsp;Dokumente </th>
sites/all/modules/civicrm/CRM/Case/Selector/Search.php -> add the function addDocumentLinks() that is basically only the document-link part of the original function addCaseActivityLinks():

public static function addDocumentLinks($caseID, $contactID, $userID, $context, $dao, $allowView = TRUE) {
$caseDeleted = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $caseID, 'is_deleted');
$actionLinks = self::actionLinks();
// Check logged in user for permission.
if (CRM_Case_BAO_Case::checkPermission($dao->id, 'view', $dao->activity_type_id, $userID)) {
$permissions[] = CRM_Core_Permission::VIEW;
  }
if (!$allowView) {
unset($actionLinks[CRM_Core_Action::VIEW]);
  }
$linksMarkup = "";
// if there are file attachments we will return how many and, if only one, add a link to it
if (!empty($dao->attachment_ids)) {
$linksMarkup .= implode(' ', CRM_Core_BAO_File::paperIconAttachment('civicrm_activity', $dao->id));
  }
return $linksMarkup;
}

sites/all/modules/civicrm/CRM/Case/Selector/Search.php -> delete the document-link part from the original function addCaseActivityLinks():

public static function addCaseActivityLinks($caseID, $contactID, $userID, $context, $dao, $allowView = TRUE) {
$caseDeleted = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $caseID, 'is_deleted');
$actionLinks = self::actionLinks();
// Check logged in user for permission.
if (CRM_Case_BAO_Case::checkPermission($dao->id, 'view', $dao->activity_type_id, $userID)) {
$permissions[] = CRM_Core_Permission::VIEW;
  }
if (!$allowView) {
unset($actionLinks[CRM_Core_Action::VIEW]);
  }
if (!$dao->deleted) {
// Activity is not deleted, allow user to edit/delete if they have permission
    // hide Edit link if:
    // 1. User does not have edit permission.
    // 2. Activity type is NOT editable (special case activities).CRM-5871
if (CRM_Case_BAO_Case::checkPermission($dao->id, 'edit', $dao->activity_type_id, $userID)) {
$permissions[] = CRM_Core_Permission::EDIT;
    }
if (in_array($dao->activity_type_id, CRM_Activity_BAO_Activity::getViewOnlyActivityTypeIDs())) {
unset($actionLinks[CRM_Core_Action::UPDATE]);
    }
if (CRM_Case_BAO_Case::checkPermission($dao->id, 'delete', $dao->activity_type_id, $userID)) {
$permissions[] = CRM_Core_Permission::DELETE;
    }
unset($actionLinks[CRM_Core_Action::RENEW]);
  }
$extraMask = 0;
if ($dao->deleted && !$caseDeleted
&& (CRM_Case_BAO_Case::checkPermission($dao->id, 'delete', $dao->activity_type_id, $userID))) {
// Case is not deleted but activity is.
    // Allow user to restore activity if they have delete permissions
unset($actionLinks[CRM_Core_Action::DELETE]);
$extraMask = CRM_Core_Action::RENEW;
  }
if (!CRM_Case_BAO_Case::checkPermission($dao->id, 'Move To Case', $dao->activity_type_id)) {
unset($actionLinks[CRM_Core_Action::DETACH]);
  }
if (!CRM_Case_BAO_Case::checkPermission($dao->id, 'Copy To Case', $dao->activity_type_id)) {
unset($actionLinks[CRM_Core_Action::COPY]);
  }
$actionMask = CRM_Core_Action::mask($permissions) | $extraMask;
$values = [
'aid' => $dao->id,
'cid' => $contactID,
'cxt' => empty($context) ? '' : "&context={$context}",
'caseid' => $caseID,
  ];
$linksMarkup = CRM_Core_Action::formLink($actionLinks,
$actionMask,
$values,
ts('more'),
FALSE,
'case.tab.row',
'Activity',
$dao->id
);

// deleted part

return $linksMarkup;
}

sites/all/modules/civicrm/CRM/Case/BAO/Case.php -> add the function call for addDocumentLinks() inside the function getCaseActivity() inside the while loop while($dao->fetch()) { } (approx. line 1091):

$caseActivities[$caseActivityId]['document_links']
        = CRM_Case_Selector_Search::addDocumentLinks($caseID, $contactID, $userID, $context, $dao);


Price Set Total Amount not displaying I have a WP civicrm install.  I am using a price set on a membership contribution page, but the total amount is not displaying.

All works fine on test drive but on the live page no total amount is displayed at all, either initially or when any items from the price set are chosen.

It seems like the price total calculation is working as when contribution is confirmed the next pages shows the correct amounts.

fixed by disabling Wordpress Autoptimize plugin


Can't find my extension option under administer>System settings I installed CiViCRM on WordPress and imported a Drupal CiViCRM database into it. everything seemed to work well. Just that I'm getting few errors such as
Unknown extension: org.civicoop.civirules.
Error loading module file (). Please restore the file or disable the module

I want to fix those errors. I wanted to access the extension option under administer>System settings but can't find the option to add or remove extensions. Hope you could help me fix this issue.
I am using  CiviCRM 4.7.27 on WordPress

Thank you

The extensions need code files that are not in your database, but your imported database will have a table called civicrm_extension with a list of the installed extensions.

So it will expect every extension in that table to be present (code files) in the correct spot. Obviously that is not the case. You need to either re-install these extensions OR also copy the extension directory from your source installation. Does that make sense?


List all Group linked in ACL for specific User How do I list group linked for a specific user in CiviCRM

Example: I have three user group in Civi - Admin, user and staff

I have linked only one group (staff contact) for staff user with ACL

Now If I login has staff user he can only see (staff contact) group

I need SQL or a civiCRM function which can return me the group based on Contact_ID

Thanks in Advance

Found a way to list the group linked with contact based on ACL

$group = CRM_ACL_API::group(2,$request_contactID);

The above API group function returns the group ID for the requested contact ID

Thanks


Membership renewal forms - am I handling this correctly? I just wanted to clarify if what I'm doing is best practice.

When a user signs up as a member for the first time we ask the standard core info and payment information (we give the option of using GoCardless or Stripe) we also ask a few personal optional questions about the user.

It's an annual membership so one year on, when they renew, they are directed to another page which basically is basically a clone of the sign up page with core info, payment, but doesn't include the questions we asked the first time around.

Is this the best way to do this?

What i do is I have the same profile, but since they see the info filled in, they can just browse over that area. I have found it helpful as some people like to update info, such as, in our case, emergency contact, and volunteering preferences.


What is the best way to record in-kind contributions? I am working with an organisation that would like to record in-kind contributions and pro bono support.  These are gifts that they receive from other organisations in the form of services or support rather than cash.

They would like to record these contributions so that they can report on the value to the organisation - e.g. 'in the last year we have received £10,000 of in-kind support'.

What is the best way of recording this in CiviCRM?  Should they just create another financial type for this?  Will this cause any problems as it isn't actually money?

If you create a separate financial type for in-kind donations, you can both track those separately and exclude them from the contribution reports (so as not to confuse things when you try to report on actual monetary gifts).  So far none of the clients I have that track their in-kind gifts in this fashion have encountered difficulties with it.

Hope this helps,
Lesley


Unknown mailing status on few mailings recipients Since the 4.7.8 update to 4.7.10 and 4.7.10 to 4.7.12 recently some mails are not reaching their recipients. If I look at the Mailing Detail Report the Successful Deliveries rate is between 90% and 100% and the status of the not received mails are "Unknown".

To see these mails on the report I have to filter as status "-any-" because there is no possibility to do it with the status "unknown".

Has anyone encountered the same problem? What may be due?

Edit

I investigated a little more and I see that "Unknown" status appears when there is no record on the civicrm_mailing_event_bounce table AND when there is no record on the civicrm_mailing_event_delivered. Then, it seems that for some users, there isn't registering the delivery of the mail.

I begin to suspect that the problem is related with an issue of inconsitency caches of the mailing recipients groups.

Edit 2

I found on logs messages like [info] CiviMail will not send an empty mail body, Skipping: xxxxxxxxxx@xxxxx.xxx corresponding to the contacts with mailing status marked as "Unknown".

This has been fixed for 4.7.15

PR https://github.com/civicrm/civicrm-core/pull/9463


Civimail gives a blank page Upgrading to Civi 5.11.0 in a Joomla 3.9.4 site (with templates & cache flushed) has left Civimail (via New Mail or Reuse) producing only blank pages (with menus and Civi's footer).

There is no error message with or without 'Enable Debugging' and 'Display Backtrace' turned on. However, just toggling 'Enable Debugging' ON makes the problem go away, while OFF brings it back, again with no error messages.

Any clues?

Sorry, should have searched more carefully. Found the answer here:

Status page angular load error


Donation recorded under the wrong contact name Help!

When one of our donors contributed on our online contribution page with Civi, it was recorded in civi under another (unrelated) donors name. But it was recorded properly in our payment processor. Civi even sent a confirmation email to the correct email address but using the incorrect name of our donor. What went wrong?

I want to move the donation from the wrong client to the correct one, but if I try to delete the donation it says it will delete any financial record of that donation as well. Is this true? Will it delete the payment as recorded in our payment processor Authorize.net?

Thank you all.

If its a matter of updating one contribution than you can

use api explorer(CiviCRM >> Support >> Developer >> API explorer 3) to update the contact id for the contribution, see below image(use the contribution id to move the contribution)

2. Execute below sql statement in your mysql (below sql statement update contribution with 23 to set contact to id 103)

sql:

UPDATE civicrm_contribution SET contact_id = 103 WHERE id = 23;

You can use Move contribution extension to move contribution to different contact


Sending one copy of each CiviMail campaign to a specific email address? I have been asked to generate one copy of each mailing sent to go to a specific mailbox (say emails@example.org) that they will check for validation of emails sent (with content comparison) versus emails requested to be sent (with content requests).

I have proposed a group with just "emails@example.org" in it which gets put into the recipients for each civiMail we send out for lack of a better solution in my mind, but have been told that is unacceptable and it must be automatic.

I don't believe I can simply put "emails@" in every mailing group either because I will have no way of necessarily knowing if a new mailing group is created to add this email address to.

We are using civiCRM 4.6.4 and Drupal 7.43 and using Sparkpost as our mail service. I have thought a bit about forwarding in Sparkpost but I haven't thought of a way not to forward a number of copies of each email equal to the number of targets to our verifying inbox.

Has anyone set something like this up using civiMail? Or have any ideas how I might go about this?

CiviRules provides a good foundation for say 'if trigger X happens, then do Action Y'.

I have no idea if the option you need is there but if it isn't it might be a good place to add it.

In other words, create a rule that says, if a Group is created then add contact X to it.


Auto add into user group I created a three group and three organization  g1,g2,g3,o1,o2,o3 respectively.
I also created a 3 drupal role og1, og2, og3.I assigned these three groups to three user drupal role.I logged in by uesr1 assigned a og1 group. When I am creating a new individual it must add into default group i.e. in g1 group but it is not happening.
My scenario is that when I will create a new individual it must have a default group.

If I add new Individual, it must auto choose a defualt group.

It looks like you should be using CiviGroup Roles Sync

You should check the documentation here

https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/group-roles/


Email Send Now (to 50 or Less) - More than 50? Is it possible to use email send now to more than 50 people?

Its a hidden setting and can be set in below ways

Add below line in civicrm.settings.php
$civicrm_setting['Mailing Preferences']['simple_mail_limit'] = '100';

Via drush or cv
cv api Setting.create simple_mail_limit=100
drush cvapi Setting.create simple_mail_limit=60

Mysql statement
UPDATE civicrm_setting
SET value = '100'
WHERE name = 'simple_mail_limit';

Via api explorer


CRM_Mailing_BAO_Mailing - Error 500 trying to view Draft, Unscheduled, Scheduled, and Sent Mailings Drupal 7.52
CiviCRM 4.7.15
Apache/2.4.7 (Ubuntu)
PHP/5.5.9-1ubuntu4.20

For the past few versions of CiviCRM I am getting a 500 error when going to:

Mailings > Draft and Unscheduled Mailings (/civicrm/mailing/browse/unscheduled)
Mailings > Scheduled and Sent Mailings (/civicrm/mailing/browse/scheduled)

The browser page:

The www.EXAMPLE.org page isn’t working

www.EXAMPLE.org is currently unable to handle this request.
HTTP ERROR 500

Apache logs:

[Mon Jan 30 23:11:31.163855 2017] [:error] [pid 7942] [client xx.xx.xx.xx:36293] PHP Fatal error:  Call to undefined method CRM_Mailing_BAO_Mailing::getPublicViewUrl() in /home/USER/web/EXAMPLE.org/public_html/sites/all/modules/civicrm/CRM/Mailing/Selector/Browse.php on line 425

I can send a mailing, and it does go out, but as soon as I send it I get the error, and can never see the Scheduled and Sent messages.

I am a capable server administrator, and I've been hosting CiviCRM sites for seven years, but I have no idea how to even begin to debug or fix this error. I keep hoping the error will go away with each CiviCRM update, but it remains. Any help is greatly appreciated.

Thank you,
Tony

I just looked at a stock install of Civi 4.7.15, and the getPublicViewUrl() method is present in <civiroot>/CRM/Mailing/BAO/Mailing.php.  So if you're getting an "undefined method" error, I would assume that your CRM_Mailing_BAO_mailing class is getting overridden.  My wild guess is you have an extension installed that isn't compatible with 4.7.

Here's what I would do:

Ensure that the file <civiroot>/CRM/Mailing/BAO/Mailing.php exists, and the line public static function getPublicViewUrl($id, $absolute = TRUE) { is present in it.  This is pretty much guaranteed unless you're doing something really wacky, but it's a good sanity check.
Look for any PHP overrides you might have.  Go to Administer menu » System Settings » Directories and locate both your "extensions" and "PHP overrides" directory.
Go into your PHP overrides directory.  Is there a subdirectory CRM/Mailing/BAO?  If so, and it has a file Mailing.php, then you need to figure out why.  The resolution should be either to remove the override, or to copy the latest version of Mailing.php into the folder and incorporate your override.  PHP overrides are difficult to maintain because they're not upgrade-safe; if you have one, I suggest finding a way to remove it.
Any of your extensions may also have a CRM/Mailing/BAO subfolder.  If so, identify if you can disable that extension.  If not, you may want to follow up, either in the comments to this answer, or with the extension author.


Report for user and assigned contacts (ACL) I have a set of users that have been assigned access to specific contacts (ACL based off a smart group for each user) - for each contact I have added a set of custom fields that a user needs to fill out (example call status) - The workflow is: the user signs in, has access to the contacts that has been assigned to him, calls up the contact and marks the contact custom fields appropriately

I am now looking to generate a report that shows all users and their corresponding contacts - I can't see any option to do so since I am unable to connect the user to assigned contacts

Is this possible to do through civiReports or would it need to be a database query?

I can't answer directly, but I can make an alternate suggestion for your structure. Instead of using ACL on Groups, you could use our extension which builds ACLs off a Relationship.
This would require a Relationship between your "user" and the contacts they need to call, but it would mean that you can then use this to deliver Reports or Drupal Views to see who is connected to whom, and the status of their calls etc.
If it is of interest you can find it here https://civicrm.org/extensions/relationship-permissions-acls


How to have both credit card and Pay later option in webform I'm using Webform instead of the core module for a contribution because of conditionals and I don't succeed in finding a way to have the "pay later" option. I only see Stripe payment processor.
I tried the webform_Payment module but this is actually not what I need.
How do I do this?

I am using CiviCRM 5.12.3 on Drupal 7.66

Thanks!
Guillaume

In webform, on the civi tab set the Payment method (?) field to 'user selects'.

Then in the Payment method component you should be able to set it to static and just offer the two options you need.


Create User Account profile creates error Undefined index: location_type_id in CRM_Dedupe_BAO_Rule Drupal 7.59
Civi 4.7.27
Webform 4.17
Webform CiviCRM Integration 4.20

We are in the process of switching over from WordPress to Drupal for our CMS.

With the /user/register, when you click Create Account it does create a Drupal User and a Civi  Contact. However you get the following error message.

Notice: Undefined index: location_type_id in CRM_Dedupe_BAO_Rule->sql() (line 96 of */sites/all/modules/civicrm/CRM/Dedupe/BAO/Rule.php).

Where do I edit this form to change the location type (I am assuming it is the address that is mislabled)?

Since you talk about /user/register (which is not a drupal webform but a core drupal form) then this should be a Civi Profile and that is where you would edit the Location Type.

Your screenshot shows you have a Profile called "Name and Home Address" -

have a look for 'edit' on one of the fields in the Profile eg 'Street' and there you should be able to specify the location type of 'street'


Can't view Exported Batches (DataTables warning) I just had a report that someone is having trouble seeing the list of exported batches (civicrm/financial/financialbatches?reset=1&batchStatus=5) and it seems to have started just recently -- likely after I upgraded to CiviCRM 5.6 (I also recently upgraded from PHP 7.0 to PHP 7.1 but I reverted that as a test and still had the error). The strange part is that there is no error in viewing the list of Open or Closed batches, just the Exported batches. There are a lot of exported batches -- could the volume of batches be an issue here?

The only error I've been able to track down is the popup error:

  DataTables warning: table id=crm-batch-selector-5 - Ajax error. For more information about this error, please see http://datatables.net/tn/7

...and the one in the Drupal watchdog log:

  Notice: Trying to get property of non-object in CRM_Batch_BAO_Batch::getBatchList() (line 335 of /path-to-site/sites/all/modules/civicrm/CRM/Batch/BAO/Batch.php).

Drupal 7
CiviCRM 5.6.0
PHP 7.1

Okay, solved. There was something awry with the latest Batch in that it had been exported, but the file didn't exist in the custom directory/filesystem. I changed that last batch status directly in the database from 5 (exported) to 2 (closed) and now the screens all load as usual.

I suppose line 335 of /path-to-site/sites/all/modules/civicrm/CRM/Batch/BAO/Batch.php is trying to load information about this non-existent file and causes the error somehow, but I don't fully understand how.

EDIT: The error recurred when we tried to re-export the problem batch, but I was able to get a more helpful error message this time:

  Error: [] operator not supported for strings in CRM_Financial_BAO_ExportFormat_CSV->formatHeaders() (line 166 of /path-to-site/sites/all/modules/civicrm/CRM/Financial/BAO/ExportFormat/CSV.php).

So this is in fact a PHP 7.1 bug. Issue in lab is here. PR is here.


What is the recommended way to upload husband and wife data from csv file csv file has name of both husband and wife as well as the same address field. Separate cell phone #s but same home #.

This is an excellent question, and it has more to do with how you want to use your data than with the technology.

Most CRM experts will tell you that the "right" way is to make the husband and wife each into their own contact, and create a "spouse" relationship between the two.  You could also consider using "address sharing" so that updating one address updates both, if you like - though I don't think there's a way to do that from an import.

Of course, the reality is that if it would be a ton of work to handle them separately (e.g. the spouses' names in the CSV aren't in separate columns) and you only deal with them together, you could "cheat" and upload them as a single contact.

Assuming you want to do it the "right" way, I would do the following:

Add a new column called "spouse identifier", which is a serial number: 1, 2, 3 etc.
Import the first spouse, with their name, cell #, address, etc.
For columns that belong exclusively to the spouse, use the "related contact info" to select "Spouse Of" (see screenshots 1 and 2 below).
Finally, do the same with "spouse identifier", setting the field to the "Spouse Of" "External Identifier".

When you're done with this import, you're almost there - you'll have both spouses imported, each with their own cell #.  The shared contact info will be on the first spouse but not the second spouse.

To add the shared contact info to the second spouse, import a second time.  However:

Only import the "spouse identifier" field and any shared contact info fields.  Don't import any other columns.

CiviCRM will use the external identifier to understand that you're adding additional contact info to the second spouse.


How to use a CiviCRM generated form in an Android App I'm programming an Android App for a company, and they use CiviCRM for subscribing to newsletters. The form is available to anyone online, but I have to add the form in an android app. On the android app, i use a button "Send", who should send the form as the online form. Then the form is recorded in a database using CiviCRM. In order to do that, I need to create a JSON object, and send the request using Ajax. But I have no idea of what should be the url of the ajax request, and what should be the variables I should use.

The form is composed of three parts: a select, four text inputs and two checkbox sets.

You might want to check the CiviMobile Extension:

https://civicrm.org/extensions/civimobile

and see how things are done in that app. Might help give you a better direction for the app.

In general, you might want to first design / develop what you want to do with CiviCRM first before deciding how to do it in an app. Your use case seems to be an instance of CiviCRM profiles.


Discount Codes Stop Working After a Day We currently have CiviCRM 4.4.6 installed with Drupal 7.36. Our version of CiviDiscount is 2.5.

Our issue is as stated in the title. Our discount codes stop working after about a day. It will start giving us fatal errors, the most recent being "/civi_extensions/org.civicrm.module.cividiscount/cividiscount.php on line 848".

If we delete the offending discount code and replace it either with the same code or a new one, it will work for a brief period before doing the same thing. This is becoming problematic as we have quite a few upcoming events that need discounts applied to them.

I'm not sure if this is a bug or related to the amount of discount codes we have in the system (~65).

It should be noted that we are in the process of upgrading to CiviCRM 4.7 and have a dev site up, however I haven't had a chance to see if 2.5 is a problem on that installation as well. We'll ideally be upgrading CiviDiscount to the latest version for CiviCRM 4.7, but until then, I need a solution to our current installation.

Upgrading to the latest version seems to have fixed the problem.


Is it possible to change Custom Field types? I have a custom data set with a number of custom fields set as alphanumeric text fields - it's become clear that some of these would be better as note/text areas.

Because I'm increasing the size of the fields, rather than decreasing them and potentially cutting off existing data, I'm hoping it's possible to change them in the database.

From what I can see, the only tables affected are civicrm_custom_field (where I'd be changing data_type and html_type) and the civicrm_value_custom_data_set (where I'd be changing the relevant field's Type from varchar to text and removing the 255 character limit).

There's only a small amount of data entered using the custom data set, but I'd rather not have to re-enter everything (particularly as it means deleting and recreating the custom fields as well as the data).

Is this possible? Is there anywhere else I need to change the settings? Or is this just generally a horrible idea?

you are making the job harder - just create an Temp table (Export) move all your custom data to it. Delete the unwanted custom field and create new custom field as you needed

Once you have created all the custom field as per your requirement just move all the data from temp table to the new custom field table - job done.


AJAX error when viewing contact groups Version 4.7.10 on Wordpress 4.6

Error when selecting Contacts->Manage Groups:
DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7

This is a fresh install. The error makes contact group unusable which makes the whole thing unusable.

Comment from my system admin:
I've updated the nginx config without any success and also tried updating the PHP query string size limit, again without any success. I would say the next step would be to contact the civicrm maintainers and say that the query string is causing problems. Usually GET query parameters shouldn't exceed more than 255 characters, while the one above is closer to 1300. They should probably be using a POST request instead of GET.

UPDATE

Following the instructions from the datatables link above, I compared the demo site to my site.

-The suspect request URL is identical.

-Data transferred / size: demo site 0.05 kb. my site 0.19 kb. This is puzzling since the URL is identical!

-On the demo site request type is json. On my site, it says html.

-Both are GET requests. I also looked at Civi 4.6.21 on WP 4.5.3 and this same request is a POST request. So I guess they changed it to GET.

-Demo site runs Wordpress 4.5.3 and Civi 4.7.11. my site is Wordpress 4.6 and Civi 4.7.10

I have tested the above issue against WP 4.6.1 and CiviCRM 4.7.11.   I am running Apache 2.4, php 5.6 and MySQL 5.6.   The OS is CentOS 6.

I cannot reproduce this error nor the one mentioned Ajax Error when trying to view relationships tab

I commented in https://issues.civicrm.org/jira/browse/CRM-19331 about this as well.

I would suspect the issue here is due to either a plugin conflict or something specific to the Hosting Configuration. I am interested if these issues are specific to a host or a specific configuration.

I'd disable all plugins (except CiviCRM) and see if you can trace errors in you apache and php logs.  I would also revert to a default theme (CiviCRM demo sites are tested with TwentyThirteen) I'd also look at the CiviCRM logs. The CiviCRM logins should be in the /civicrm/ConfigAndLog directory that is stored in the WP upload directory in 4.7

I'd be interested if these issues are specific to a host or a specific configuration.


Add Membership Token to PDF Template Joomla I have been banging my head on this for a few days.  I created a PDF Template for our members so I can run a search of members in Expired or Grace, then PDF a letter reminding them to pay their membership.  I see the tokens for contacts, however cannot figure out how to add a token for Membership Type.  Any suggestions

Joomla 3.4.1 CiviCrm 4.6.0

Are you searching for Contacts or Memberships?  By default, Basic and Advanced Search return Contacts.

Your search needs to return Memberships, not Contacts if you want the membership tokens to be available in the PDF letter.

a) use Search >> Find Memberships

b) use Search >> Advanced Search and set "Display results as" to Memberships

In both cases you should have the "Print PDF Letters for Memberships" action that will let you include the Membership Type token.


Environment Settings, mismatch timezone I have just done a new install of WordPress and CiviCRM, it has displayed this warning when looking at the CiviCRM dashboard:

Environment Settings
Timestamps reported by MySQL (eg "2016-03-22 14:45") and PHP (eg "2016-03-22 20:45" ) are mismatched.

The link it refers to is this: https://wiki.civicrm.org/confluence/display/CRMDOC/checkMysqlTime

Which I have read but maybe I am missing something.

I ran this command on MySQL "SELECT TIMEDIFF( NOW( ) , UTC_TIMESTAMP );"
and it returns -06:00:00

So then in my php.ini I set date.timezone=America/Chicago to match, then as another precaution I went to the WordPress wp-admin dashboard in the settings and set the timezone to UTC-6 and yet the warning is still displaying, does anyone have any ideas?

In testing i determined that all of the UTC offset TZ WordPress offers are invalid from a php perspective.

Set the timezone to the proper php TZ (Europe/Zurich for example) and that error will go away.


How do I find a patch for an issue in CiviCRM's issue tracker (JIRA)? For example, issue CRM-17493 shows that it is fixed in 4.6.11.

How do I find the patch to fix this specific issue from JIRA?

If you click the all tab on the issue - you'll see the link to the patch

How to apply a patch: How do I apply a patch supplied in the issue queue via Git?


Unable to view CiviCRM contacts anymore Today our site started giving fatal error(DB Error: unknown error) screen when trying to view contact. Nothing recorded in php or apache log, but found below error in my CiviCRM logs

[nativecode=1116 ** Too many tables; MariaDB can only use 61 tables in a join]

Found a relevant issue/blog for this but none of them have provided any solutions. Is it a known issue in CiviCRM?

https://forum.civicrm.org/index.php%3Ftopic=34205.0.html
https://issues.civicrm.org/jira/browse/CRM-21491

CiviCRM version: 5.15.2

CMS - Drupal

CiviCRM logging - OFF

Backtrace : https://pastebin.com/6vV59YDM

Any help or pointers would be appreciated.

It looks like from your backtrace, its a bug in GDPR extension because its not possible to replicate in CiviCRM. Your system has many custom group for activity, and the extension code breaks when trying to retrieve results, Mysql supports max 61 joins in a query.

Possible solution:

Disable custom group for activity which is not required.
Restructure your custom group by moving custom fields into new/existing custom group and delete the ones not required. This is bit risky and will take lots of effort since UI may not allow you to move custom field if its defined for subtype. And if you have already used this field in webforms than probably you may need to retain the custom field ID.
Apply the fix from here.

Thanks

Pradeep


civicrm dropdown list not appearing on the same popup but underneath pop-up's layer i am having a strange issue .
1.when i click on any drop-down , list does not show on the same place , but appears beneath  the pop-up/ or the dropdown's layer.
here is the  screen shot, what's wrong i am not able to figure out.

We are having the same problem and its annoying as we can't added Shortcodes. Another post from 2016 found it was a CSS conflict with Slider Revolution.

Dropdowns in the admin area appear underneath the modal window.

Using the Function snippet didn't fix the problem for us or changing the CSS.

One hack around this that works for us is:

Click the dropdown
Move drag the pop-up box to one side to see what the dropdown displays
Click the dropdown again to close it
Click the dropdown once more
Use the curser keys to select your dropdown option
Hit the Enter key on your keyboard to select the dropdown option.


How can I create a contact (quickly) with multiple contact subtypes? The need

I need to create contacts that have more than one contact subtype assigned. For example Student + Parent.

Slow approaches

If I create the contact directly from the menu link Contacts > New Individual > New Student, then it is not possible to assign it a second subtype on the immediat form. It is necessary first save the contact and then re-edit to add the second contact subtype.
Also it's possible to create the contact from the menu link Contacts > New Individual and then assign the needed contact subtypes on the immediat form. But this option is confusing by our users as they hope to create an Student or a Parent but not a Individual.

There is a more direct approach to this need?

Maybe I expected to find the possibility to add an item to the menu of contacts that allow us to create directly a contact with multiple contact subtypes with and URL like civicrm/contact/add?ct=Individual&cst=Student+Parent&reset=1.

If you are using drupal then you could use webforms for this.


What is the correct REST URL in Drupal 8? I know there's been a lot of work to deprecate the extern endpoints in CiviCRM, and the extern endpoints don't work in Drupal 8 without a lot of finagling.  The documentation isn't updated to reflect a new way of using D8 REST endpoints, nor is API Explorer.  Does anyone know what the "correct" endpoint is?

The comment above is right - the answer for this is very much in flux, and this is a temporary hack - but nevertheless, if you need a REST endpoint today, you can do this:

Copy the entire extern directories into your web/libraries/civicrm directory.
Copy the template for civicrm.config.php into web/libraries.

Here are the commands I used:
cp -r <drupalroot>/vendor/civicrm/civicrm-core/extern <drupalroot>/web/libraries/civicrm/extern
cp <drupalroot>/web/modules/contrib/civicrm/civicrm.config.php.drupal <drupalroot>/web/libraries/civicrm/civicrm.config.php


CiviVolunteer 2.2 - problem with missing profile I installed the latest Civivolunteer 2.2 with 4.7.24. First time, not an upgrade. When I click the 'Volunteers' tab in an event I get the error message 'The requested profile (gid=36) is disabled OR...' (etc etc). I tried uninstalling, clearing all caches and re-installing but still a problem.  The profile with gid of 36 does not exist.  If I could figure out how to create a profile with gid of 36 I would but can't see where they are stored in the db - another user fixed the problem this way.  How can I fix this?

Profiles are in the table civicrm_uf_group, and the table civicrm_uf_field contains the relevant fields for the profile. This does not answer your main question, but may help you workaround.


Groups correctly set but showing wrong - caching problem? I'm using CiviCRM 4.6.5, Joomla 2.5.28 (yes, I know...), with 70k contacts and 25 groups (one of which is a smart group).

Since the upgrade to 4.5.6, contacts started to display the wrong groups (actually several times the same group, instead of several different groups). If you check the groups the contact should be in, the contact is there. But the group doesn't show on the contact record. Cleaning the Caches (through the backend) seems to fix the problem, and everything is fine and dandy for a while, with the groups displaying correctly in the contact records again. But the fix is only temporary - the next day, the problem is back again.

Can anyone please suggest where to start looking for the cause?

Thanks.

This sounds very much like https://issues.civicrm.org/jira/browse/CRM-16945

This has only just popped up in testing of 4.6 for my organisation as well.


CiviCRM Multi-site support under drupal 8 Does anyone do CiviCRM Multisite under drupal 8?
We have lots of affiliates and would like to put them all in the same civicrm database with ACLs set up per domain.

Does this work the same way it did with Drupal 7?

It seems like if you were running Drupal 8 multisite as well, and have discrete drupal 8 databases for each subdomain, you'd run into drupal contact id collisions that would play havoc with the drupal -> civi contact mappings.

If there's no difference between drupal 7/8 with civicrm I'll just read the documentation for drupal 7

Anyone done this?

I've set up a multisite with drupal 8 alongside a drupal 7 but not multiple drupal 8 sites.

The existing drupal 7 documentation was enough to go off. Definitely would recommend trying it out on a demo site first.


How to distinguish "Contacts with the same name" when assigning an activity? A couple of people have exactly the same name in CiviCRM: John Smith.
When assigning an activity you select a person by starting to type its name.
However in case that people have exactly the same name, Civi shows both names.
How can i distinguish between the two?
Showing an emailaddress behind the name, or showing a nickname would be very helpful but I don't see any way to configure this field.

Any ideas of tips?

We're working in CiviCRM 4.4.8

You could upgrade your CiviCRM version (4.4) to the latest version (4.6+), which will display contact emails along with their names in the autocomplete, making it easier to distinguish between similar contacts.


Exclude certain Activity types on Activities tab On the Activities tab of contacts, there is the possibility to filter which activity types are displayed.

Is there any way to set this filter by default?

Or another way to exclude Contribution Activities from that tab?

I'm not aware of a way of doing this through the user interface. However once a user sets the activity type filter, this should persist for that user, as it gets saved as a user preference. See Save user preferences for filtering Activities tab listings.

To set the default value of the filter, I would try using the buildForm hook.


Is it possible to limit access to field through ACL or drupal permissions? We want to create a user that has read only access to the civicrm database. However, we only want the user to have access to specific info and not for others. For example, the user can only view name, address, and email, and not anything else (like phone or birthday).

I think it can be done for custom fields (through groups) but can this be done for the builtin fields without involving lots of coding/programming?

Thanks!

One option with Drupal for this sort of scenario is to actually keep your 'read only' users completely out of CiviCRM and deliver whatever they might need through Drupal Views, and if necessary, Webforms (for making updates to data)


How to sell membership on event page and apply the membership discount? (Autodiscount) Is it possible to have a CiviEvent page that offers a membership, and if you select that membership, receive a discount on certain price set options in the same form?

I found this: https://github.com/aghstrategies/com.aghstrategies.eventmembershipsignup

However it remains unclear if it will do the above.

Things I've considered:

Webform CiviCRM. Can't use it because it does not support complex price sets and loses the abilities of Civi to change/update registrations.
Drupal Commerce / Rules - same as above.
Having people sign up for Membership using Contribution Page, pay, then go to Event page, pay. Two payments, too many steps.

Thank you for your help.

Reasoning: we want to encourage people to join as a Member to receive a discount from our event and have it done on one form. Currently there is no easy pathway for this AFAIK.

The Event Membership Signup extension is designed for this purpose--to give a discounted price for the membership/event combo--but it won't help in certain complex scenarios.

If your event fee is $100, and your membership fee is $50, and you want to give a $20 combo discount, there are two ways to do it. You could add a new price field with a single checkbox option for $30 membership, or you could add a new option to your existing event price field offering a registration and membership together for $130.

On the other hand, you cannot (without custom code) say that selecting the membership option gives 20% off on each of a bunch of possible add-on items.  The discount comes from the price you assign to the option that gives you the membership, so the discount can't be variable.


Can discounts be combined? I'm using the CiviDiscount extension and it works great - thank you.

Is it possible to combine an auto-discount (e.g. for qualifying logged-in members) and a manually entered discount (e.g. entered on an event registration page) combine? It's not working for me at the moment but am wondering if it's my set up or if this option is not available.

To the best of my knowledge, the CiviDiscount module only allows one discount to be applied.  So you may want to consider utilizing one manually entered discount code that adds up to the total discount you're hoping to give (presumably only to certain members?).

Hope this helps,
Lesley


New D8 / Civi install. First d8 then added Civi. Civi Menus not showig up I installed D8 first then Civi and it seems like it is working if I manually put the url comonents after the http://focal-civi.domain.org/civicrm/{manually-add} but the menu is not showing up.
Anyone have any hints?

This problem was (I think) related to a permission problem with the plug-in not having permissions to copy the libraries from a parent directory to the doc-root directory.
Solved for me.  Hope this helps someone else.


how civicrm class prepared on body tag Does anybody have an idea, how and where we build CiviCRM class on body tag.?

E.g. 1

URL:https://domain.com/civicrm/admin/setting/updateConfigBackend?reset=1
Class : html not-front logged-in page-civicrm page-civicrm-admin page-civicrm-admin-setting page-civicrm-admin-setting-updateconfigbackend

E.g. 2

URL: https://domain.com/civicrm/admin/setting/path?reset=1
Class: html not-front logged-in page-civicrm page-civicrm-admin page-civicrm-admin-setting page-civicrm-admin-setting-path

Basically class build using civicrm url

page-civicrm-admin-setting-updateconfigbackend
page-civicrm-admin-setting
page-civicrm-admin
page-civicrm

Some of it is added via javascript, e.g. https://github.com/civicrm/civicrm-core/blob/5.15.2/js/crm.menubar.js#L104

But as this ticket notes the rest depends a bit on the CMS and the theme and is inconsistent:   https://lab.civicrm.org/dev/core/issues/300


Export activities and the activity target contact I found an old thread on the forum site: -
 https://forum.civicrm.org/index.php?topic=20506.0

My question is still the same as DaveJ's actually. We want to export the activity target contact with the activity details.

By default, it is exporting the activity source contact

I think petednz's comment is a good one - but you can also use the Activity Report from the Reports menu.


Is there a setting to automatically Refresh Dashboard Data on a user login, or when returning to CiviCRM Home? We're on Civi 4.6.17 and Drupal 7.

I'm looking for a way for users to be able to select an option to be able to automatically Refresh Dashboard Data on login, or when returning to their  CiviCRM Home page, without having to click on Refresh Dashboard Data.

Better, is there a way to have this be the default action with an admin setting.

Is/are there such a setting(s)?

I don't think such setting exists, although, you can set the timeout for the Dashboard cache navigating to Administer - System settings - Misc and set the the Dashboard cache timeout to the value desired in minutes, setting it to 1 minute for example it will refresh the Dashboard data every minute.

I guess the other option would be to create an extension and use the resetDashletCache method on login


Is it a bug that Relative Dates are broken in Search and Smart Groups? According to CiviCRM user guide article's Searching section The Date Range Filter:

Relative date ranges are especially useful for searches that you would
like to then save as Smart Groups (automatically populated groups that are configured to include contacts that share a certain set of characteristics or activities).

However, it seems that it is actually impossible to use them this way, because during search relative dates (e.g. Today) are transformed into fixed dates (e.g. August 18th).
See: How to use Smart Groups with relative dates? and
smart group change log criteria
Is it a recent bug or has it been like this forever? Will there be a fix for that?

I think you may find that, although the search results show the relative dates converted to fixed dates, when you create a smart group from the results it will save the relative date range.

That is certainly what happens in my live v4.4.

I have also checked this as best I can on a 4.7.10 site that has had no activity or changes on it since February this year. I have a smart group based on a search that used the relative date filter Previous month.  That group has no contacts now and if I go to Edit smart group search criteria... (via the Contacts link on the Manage Groups page) I see:

  No matches found for:
   ...AND Activity Date - greater than or equal to "01 July 2016 12:00
  AM" AND less than or equal to "31 July 2016 11:59 PM" ...AND.

but when I click on Edit smart group search criteria... for the second time it shows me the actual search parameters which include:

  Activity date :Previous Calendar month


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

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

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

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

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

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

Hope this helps!
Tamar


How can I adjust the fonts and layout of PDF reports? I have managed to clean up the display of membership lists (civireport) to the satisfaction of our users by linking a CSS file to the report header, but I do not find how to adjust the font and layout of generated PDF (is that even possible?)

The PDF generator uses the HTML to create the PDF. So changing CSS will have effect. But.. to have a different font in the PDF, the font should be available on the server. If the font is not available on the server (and the pdf generator) then a fall-back font is used.

Here's some more info about DOMPDF (the tool CiviCRM is using for creating PDF's):

https://stackoverflow.com/questions/12581156/custom-fonts-for-dompdf
https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding


How to enter event registrations after event has ended We are using Civi 5.0.1 on Wordpress 4.9

We had our conference two weeks ago.  Most of the attendees signed up online through the website.
We also allow attendees to Walk in and signup and pay during the event.
Today I was asked to enter the information for the people who walked in and paid during the conference.
When I try to save their information for the event registration I get the error you see in the screenshot.
I believe this is due to the event having ended.  How can I add registrations and have them associated with an event that already ended?

It looks like you set end dates not just on the event, but on the price fields as well.  If so, you can remove the end dates from the price fields and that should fix your issue.

Public registration will still be impossible.  End dates on price fields are only necessary if that price option goes away before the event takes place (e.g. early bird pricing).


Custom field set for custom entity I want to create custom field set for my custom entity.

I have Lead.xml

and there:

  < class >Lead< /class >
  < name >civicrm_lead< /name >

inside cg_extend_objects I put title:Lead, value:Lead

But I'm not able to create custom field set for Lead now.

I've tried to debug it.
to CRM_Core_BAO_SchemaHandler::createTable
this array is passed:

Array
(
    [name] => civicrm_value_cccc1_16
    [is_multiple] => 0
    [attributes] => ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
    [fields] => Array
        (
            [0] => Array
                (
                    [name] => id
                    [type] => int unsigned
                    [primary] => 1
                    [required] => 1
                    [attributes] => AUTO_INCREMENT
                    [comment] => Default MySQL primary key
                )

        [1] => Array
            (
                [name] => entity_id
                [type] => int unsigned
                [required] => 1
                [comment] => Table that this extends
                [fk_table_name] => Lead
                [fk_field_name] => id
                [fk_attributes] => ON DELETE CASCADE
            )

    )

[indexes] => Array
    (
        [0] => Array
            (
                [unique] => 1
                [field_name_1] => entity_id
            )

    )

)

and this SQL is generated:
CREATE TABLE civicrm_value_cccc4_18 ( id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Default MySQL primary key', entity_id int unsigned NOT NULL COMMENT 'Table that this extends', PRIMARY KEY ( id ), UNIQUE INDEX unique_entity_id ( entity_id ), CONSTRAINT FK_civicrm_value_cccc4_18_entity_id FOREIGN KEY ( entity_id ) REFERENCES Lead ( id ) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

It doesn't take table for Lead entity. Is there any extra coding needed for this?

to CRM_Core_BAO_CustomGroup::mapTableName
I had to add this:

case 'Lead':
    return 'civicrm_lead';

after that I'm able to add custom fields for my custom entity.

so steps to add custom data for custom entity you need these things:
Add entity to this group cg_extend_objects
and then map type to table here: CRM_Core_BAO_CustomGroup::mapTableName


Is Civi supposed to redirect after a contribution form submission? When submitting a contribution form, I first get taken to what seems like a truncated URL: https://mysite.example.com/donate/?page=CiviCRM&q=civicrm/contribute/transact. The HTTP response code is 302 and I get redirected to https://mysite.example.com/donate/?page=CiviCRM&q=civicrm/contribute/transact&_qf_Confirm_display=true&qfKey=ea68d5378e175112aace8d733a982f53_5648. Then the response code is 200 and the page displays all fine. I'm seeing all of this in the Network tab of the browser's developer tool.

My question is whether this is the intended behavior of Civi. This redirect seems rather odd to me.

I'm using Civi 4.6.8 with Wordpress 4.3.1 (multisite). I use a shortcode to load the contribution form into the Wordpress page (but without hijacking the whole page).

UPDATE:
I tried this on the Civi Wordpress demo site - http://wp46.demo.civicrm.org/contribution-page - and I get the absolutely same behavior. First a truncated URL and a redirect to the complete URL. I also tried the test-drive link on the backend: http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=1&action=preview . When clicking Confirm Contribution there is again a redirect and then we get to the complete URL. So this redirect behavior doesn't seem to be related to the use of the shortcode.

So when filling the form, you submit it (the data is into the post, so you have the feeling it's truncated as you don't see the params in the log/net tab). Once that data is processed, it needs to display something (the confirmation that everything went well).

They are two ways of doing that:
- either the result of the post is the confirmation message
- or you redirect to another page that displays the confirmation message

the second one (the one yo experienced) has several benefits: it's easier to redirect to another page (so you have a completely custom and different thank you page from outside of civi, and as importantly, it allows you to reload the confirmation page without resubmitting the contribution (that's why you have warning from your browser when you reload a page after you submit something)

Now, that design choice made many years ago doesn't make that much sense when you have forms in ajax (eg. with payment providers like stripe), but I don't think it's a problem to do a redirect, it doesn't create a major speed difference.

So in short: it's normal behaviour, nothing to worry about ;)


After security update civi admin menu has twinned support menu-heading Today I updated civicrm (4.6.8 to 4.6.9) on a Joomla website (version 3.4.4).
All went well I was told in screen-messages.
However after the update I now see the menu Support heading twice.
Both headings cover the same sub-menu headings.
What triggers this? And, how can I de-select or delete one of these two? What is the best way?
Greetings,
Paul

This is a very small bug, but to fix easily, here's my above comment again. This problem is also true for Drupal on a couple of 4.6.9 test systems of mine. I fixed by using the navigation menu update in administer/customise data and screens. I deleted the second Support item and all was well.


Why am I seeing two identical payments associated with one contribution in 4.7.x? "Is this an issue with iATS payments Extension?"

No it's not an issue with the iATS Payments Extension.

I got this question - and have reproduced it using 4.7.7 and iATS Payments Extension [note the transaction IDs are identical]:

But I also get this on the
http://dmaster.demo.civicrm.org/civicrm/contribute?reset=1
[today May23 at 9:40MT] - again: note the transaction IDs are identical:

I will file a JIRA issue for this - Please note that iATS Extension is officially still on the 4.6.x (LTS = Long Term Release).


CiviMail - Unable to select group, getting error of No recipients After update from 4.7.23 to 4.7.24 Unable to select group, getting an error of No recipients, under Wordpress 4.8.1.

My steps:
Create new mailing  Mailings>New Mailing
The new mail opens.
Click on Recipients, the dropdown is empty, no groups listed.

This no problem in WP demo site.

I've read a lot of similar bugs posts with no solutions.
I have several mailing groups, I can manage in other places in CiviCRM.

With the update get some exception on my CiviCRM, caused by wrongly set permissions on files and folders (writable by groups).

This can be caused by other wrong permissions?

Because you update so frequently, it's easy to track down the potential issues.  I see two relevant changes to CiviMail's recipient list: CRM-20521 and (maybe) CRM-21070.

In non-technical terms: Prior to Civi 4.7.24, all the mailing groups were loaded onto the mailing form when you selected "New Mailing".  For sites with many groups, that made things slow.  In 4.7.24+, the list is loaded after the page is loaded, in a more efficient way.

First, look at the screenshot on CRM-21070: Does your "Recipients" box look like this?  If the box is present, but has no data, the issue is related to CRM-20521.

If this is caused by CRM-20521, then you have a JavaScript problem.  That could be a bug, but more likely means your Resource URLs are incorrect.  Please consult troubleshooting JavaScript in CiviCRM - in particular, check your browser's dev tools Network/XHR tab for errors - and you should find your solution.  If you find an error but you're not sure what to do, please edit this question with the errors you find.


CiviEvent, group by relationship I'm currently setting up CiviCRM for a dance institution. They want to create an event for each lesson (weekly) and use CiviMobile on an iPad or something similar to manage attendance.

Now there's a need to group dance partners together. To this end I've set up an extra relationship called 'Dancepartner of' to tie them together.

An example:

Marie dances with Peter
Kate dances with Micheal
Emma dances with Adam

I would like the event participants view to look like:

Marie
Peter
Kate
Micheal
Emma
Adam

I think an SQL join for the relations and a GROUP_BY would do the trick but I have no idea where to begin coding this.

Can anyone point me in the right direction of am I going about this all wrong and should I perhaps use groups ?

Thanks in advance,

CiviMobile (new version) works nicely for checking people into an event, but I think it's going to do its own sorting regardless of anything you display in the normal Civi GUI.

If you're on Drupal then a view using the DancePartner relationship with a VBO might do what you need to display the partners and register attendance.

Do you want to register and check in individuals or couples?

If you are more interested in couples, then you could potentially repurpose/abuse 'household' as 'dance partnership' since you can register households as event participants.  You could then use CiviMobile and check in the 'Marie & Peter partnership' household.  You would need to check the rest of your workflow but it fits the objective of checking in a couple via CiviMobile.


Deleted duplicate contact, when try to make login still says the email address is already registered ((Drupal 7.53, CiviCRM 4.6.24) Someone who signed up on our website was having trouble logging into her account (made via joining membership). I went to manually reset a login for her, and found out that her email address was already being used for a different contact account we had on file (made from joining a mailing list). To fix this, I deleted the latter contact account, so that only her membership one would exist. I then tried to create a login for this account, but every time I do so it says her email address is already registered still, even though I deleted the previous contact file linked to that email address and can no longer find it. Whenever I search for another contact under her name nothing shows up except for the membership one, which is the one I am trying to edit, so I don't know how to access (and DELETE!) this supposed second account that keeps on interfering with her membership one.

When you check availability, it's actually not looking at CiviCRM - it's looking in Drupal.  If you're a coder, you can read the code here.  Based on this, it seems like you need to delete the Drupal user, not the CiviCRM contact.

To fix:

Go to CiviCRM menu » Hide menu to view the Drupal menu (see screenshot).

Your Drupal menu may vary based on the installed extension, but you'll likely have a "People" menu:

From here, you can delete the Drupal user.  Instructions can be found here.

Note that if you create a new Drupal contact with the same email address as a CiviCRM contact's primary contact, the link between the two will be regenerated!  So you should never have to delete the CiviCRM contact in this instance.


What changed in 4.4.21? The security advisory that came out today referred to a set of issues, all of which appear to have been fixed by 4.4.20 if present in the 4.4.X version at all. I don't see any separate patch notes / changelog anywhere for 4.4.21, other than the standard "a variety of non-security issues" language.

So, does anyone know what ACTUALLY changed in 4.4.21?

https://github.com/civicrm/civicrm-core/compare/4.4.20...4.4.21

Nothing that looks security-sensitive to me. Are the three 2016 flaws also present in 4.4.20/4.4.21?


Everything In CRM is Slow - Errors With CRM_Contact_BAO_GroupContactCache After a database was corrupted and reloaded from a backup.
Looking at the error log this appears to be where CiviCRM is hanging.

  CRM_Contact_BAO_GroupContactCache::load(Object(CRM_Core_DAO))

Here is the debug information.

  [debug_info] => CREATE TEMPORARY TABLE
  civicrm_temp_group_contact_cache1632  (SELECT 95 as group_id,
  contact_a.id as id   FROM civicrm_contact contact_a    LEFT JOIN
  civicrm_email ON (contact_a.id = civicrm_email.contact_id AND
  civicrm_email.is_primary = 1)   WHERE  (  (
  (NULLIF(civicrm_email.email, '') IS NOT NULL)  AND
  contact_a.do_not_email =  AND contact_a.is_opt_out =  AND
  contact_a.contact_type = 'Individual' )  )  AND (contact_a.is_deleted
  = 0)   AND contact_a.id NOT IN (
                                 SELECT contact_id FROM civicrm_group_contact
                                 WHERE civicrm_group_contact.status = 'Removed'
                                AND   civicrm_group_contact.group_id = 95 ) ); [nativecode=1064 ** You have an error in your SQL syntax;
  check the manual that corresponds to your MySQL server version for the
  right syntax to use near 'AND contact_a.is_opt_out =  AND
  contact_a.contact_type = 'Individual' )  )  AND ' at line 1]

Any advice on how to resolve this is appreciated.

Thanks,
Josh

There's something wrong with your smart group with an ID of 95.  However, this is unlikely to be causing a performance problem, since this query simply isn't running.  If you can delete and recreate your smart group with an ID of 95, this error should go away.


Cron issue with shared hosting CiviCRM 4.6.7

I get an error with this command:
wget -O - -q -t 1 'http://www.website.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=user&pass=password&key=site-key'

  Fatal error: Uncaught exception 'Exception' with message 'Function
  "is_admin()" is missing, even though WordPress is the user framework.'
  in
  /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:258

Thanks for helping.

Edit:

With CLI PHP I get this error:

This what I get with CLI PHP:

Sorry. A non-recoverable error has occurred.
Could not find the install directory for WordPress

#0 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php(343): CRM_Core_Error::fatal("Could not find the install directory for WordPress")
#1 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(1500): CRM_Utils_System_WordPress->loadBootStrap((Array:0), FALSE, FALSE, "/var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/")
#2 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(251): CRM_Utils_System::loadBootStrap((Array:0), FALSE, FALSE, "/var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/")
#3 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(72): civicrm_cli->_bootstrap()
#4 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.php(31): civicrm_cli->initialize()
#5 {main}

I have resolved the issue. The path to the wordpress directory was wrong, don't know why. I have changed hosting during the week.

I had to add this line in civicrm.settings.php:

define('CIVICRM_CMSDIR','/var/www/vhosts/website.org/httpdocs');

This issue helped me: Problem with open_basedir restriction in effect


api4: get(FALSE) vs get()->setCheckPermissions(FALSE): which is preferred? In ap4, there are apparently two different ways to specify skipping permissions:
In the api4 browser at /civicrm/api4, when you un-check the "CheckPermissions" checkbox, the action method is given a single boolean-negative argument:
\Civi\Api4\Contact::get(FALSE)

But various documentation (e.g. https://docs.civicrm.org/dev/en/latest/api/v4/joins/#using-an-api-join and https://docs.civicrm.org/dev/en/latest/api/v4/differences-with-v3/) describes an explicit method:
\Civi\Api4\Email::get()
...
  ->setCheckPermissions(FALSE)
...

I assume these are equivalent. Personally I prefer the more explicit method as it's well, more explicit, but I wonder:
Is one of these preferred as a best practice, in the community at large or by core developers?

Core tends to use the short form but both are equally valid. The short form was introduced later just because it comes up so often that you want to set it to false.


Can I customize the columns that are displayed on the Manage Events page? IS there anyway that I can modify the table that is displayed on the Manage Events page.  Ideally I'd like to be able to change the columns that are displayed.  I couldn't see where this can be done in the admin/config menu but can this be done by editing the relevant page template?  If so can someone provide me with details as to which file needs to be edited? thanks!

You can change that display by writing some code using hook_civicrm_searchColumns

The template is CRM/Event/Form/Selector.tpl but you may not need to change that.


How do I locate the Financial Type ID? I am trying to import hundreds of contribution records and it is requiring I include the Financial Type ID when importing. Simply having the word Donation is not enough! When I visit Administer - CiviContribute - Financial Types, it does not display the Financial Type ID.

When importing contributions, you must specify the Financial Type in the form of the Financial Type ID.  Unfortunately going to Administer - CiviContribute - Financial Types does not display the Financial Type ID.  You must get the Financial Type ID from the API Explorer

Go to Support - Developer - then one of the following:

API Explorer V3

Entity: Financial Type
Action: getlist
Parameters: Leave blank
Execute

You will revive a list of all the Financial Type labels and their ID numbers.

For example:

  "id": "7",
        "label": "Money Donations",
        "description": [
            "For all monetary donations.  "

In this case 7 is the Financial Type ID for Money Donations

API Explorer V4

Good luck and
don't !@#$ it up.

So pretty much use V3 as v4 does not use getlist. ;)


Custom Fields not importing into contacts database Having an issue where I'm trying to import a series of CSV files into the Civi Contact Database. There were new custom fields created to do the import, but when I do the import with all the fields, I get an 'DB Error: constraint violation' error. If I just import the fields that were originally there, I successfully import the CSV into the DB.

So I must have done something wrong with the custom fields I created yesterday. But what? What should I look for to make sure the import is successful?

Two things:
* "DB Error: constraint violation" isn't enough information to troubleshoot.  If you get an error like this, turn on debugging and backtrace:  Administration menu > System Settings > Debugging and Error Handling.  Posting the debug info and a backtrace greatly increases others' ability to help!
* What you're describing is a known bug:  See here.  Unfortunately, no one who's affected this has stepped up yet with a fix, or funds for the core team to fix it.

To give the usual pitch:  CiviCRM is free to use, but not free to write.  If you're making part of your living from CiviCRM, please consider being part of the community of folks who either fixes bugs or pays people to fix bugs.


Group Type is set to empty while updating Group On ManageGroup page, if group description is updated or if I enable/disable group, the value of GroupType gets updated to an empty value. Ideally, GroupType value must not be updated, it should retain its original value.

This isn't a question, it's a bug report ;)

For bug reports, could you use jira, ideally with a patch to fix the behaviour.


Community centre crm: courses, attendance, reporting We're trying various different CRMs and systems, looking for a best fit before customisation.  As well as CiviCRM, we're looking at Zoho and some others.  Please could I ask you opinion on CiviCRM's compatibility with the brief spec below?

Thanks!

We run a local community centre charity.  We host numerous groups, from a weekly basketball club to youth support community outreach.

Briefly, as a starting point, we’d like to:

make adding a new group and setting up sessions very easy for end users
make adding a new user and allocating them to existing groups very easy for end users
track all user details
track the number of times they come to their sessions (‘check in’)

Staff to do this securely on hand-held devices

optional notes per user in each session, as part of the session’s record
tag each group with up to seven of the "key objectives"
report on the above

There are a number of approaches that could be taken for some of your questions, and without doing a detail 'spec' it would be hard to give a definitive answer. Also some CiviCRM concepts and terminology may not quite fit with your descriptions.

In general, having built civicrm implementations for a number of clients in the educational sphere with needs for both 'attendance' and 'achievements' I would expect CiviCRM to be able to cover the vast majority of your requirements without needing significant additional development work.

In saying the above there is a presumption on my part that the CMS is going to be Drupal, as the combination of CiviCRM and Drupal Views and Webforms give you tools that CiviCRM by itself struggles to deliver.

Your concept of 'group' may not necessarily match with Civi Groups, in that you may be able to do what you want without setting up a group for each situation you may be thinking of. But yes, setting up Groups is easy, as is adding folk to groups, or making the groups 'smart' so folk get added based on some characteristic (saved search)

Sessions could either be mapped to Events or may in some cases make sense to use just Activities. Tracking the number of sessions can be done using custom fields on Participant records or on Activities

Notes, and user details are all out of the box.

Key Objectives, may be something to re-purpose Campaigns for.


"Print PDF Letter for Contacts" missing from Contact Actions There's a lot of reference to this but the 4.7 version I'm setting up has changed this action. How do you print a pdf letter for contacts in 4.7?

Found it of course right after posting. The trick is to look in Actions for "Print/Merge Document"


Sorting by clicking on column headers I'm evaluating CiviCRM for my organization and noticed something about the demo report tables that concerns me. Hopefully I'm just missing something. Do I have to create a new report or modify an existing one in order to change the sort order of a field? For example, I'd like to view the Contribution Details report and quickly sort it by amount, but when I click on the amount column header, nothing happens. Why can't I sort by amount by clicking on its column heading? Did CiviCRM used to have that capability but there was a bug that caused problems, so you took it out?

How a report is sorted is defined in the Report Criteria. Depending on what data the report looks at, you can sort of different criteria. It's usually called something like "Order by columns" and appears below the Selected Columns. Reports generally sort in date order.

If you want to play about with the data, the easiest thing to do is export to CSV and save in Excel so you can sort, filter and build graphical representation of your data as you wish.


Disabling Scheduled Jobs, Transactions, etc (from command line)? I'm working on migrating our site to a different server. I need to do some testing on the new server while keeping the production site live. The problem is that the test server continues to run all the scheduled jobs and recurring contributions. I read about changing the environment (https://docs.civicrm.org/sysadmin/en/latest/misc/staging-production/#changing-your-environment), but that doesn't clearly state what actually gets disabled (besides mail jobs).

What is the best way to ensure that my test server has all that stuff disabled? I have several sites running on the server and need to do this from the command line.

Thanks!

Setting the environment to Staging/Development will turn off all schedule job from running unless you explicitly specify runInNonProductionEnvironment=TRUE in job parameter and also no emails will be send out from CiviCRM to any contact(will be logged in a file on server disk)

You can set the option to Staging/Development using one of the below methods

CiviCRM >> Administer >> Debugging and Error Handling, Select option for 'Environment'
cv api Setting.create environment="Staging"
drush cvapi Setting.create environment="Staging"
Over-ride settings by adding below lines in civicrm.settings.php

:

global $civicrm_setting
$civicrm_setting['domain']['environment'] = 'Production';
define( 'CIVICRM_MAIL_LOG', '/Users/pradeep/Sites/drupal7/sites/default/files/civicrm/templates_c//mail.log');


Needing to change the email address emails are coming from I am looking for some help on two issues:

When Mailing contacts who have booked for an event, the email is coming from an email address I don't want to use. How do I remove the preferred email address and add a new one?

Likewise, when manually registering an event participant, the default email address that the booking confirmation would come from is also wrong, and I wish to remove this completely and add a new one/

Thanks in advance

I'd look first at the event settings themselves.

(From the manage events page, choose configure and then click to the online registration tab)

At the foot of the page is the email confirmation settings

This is what governs the "from email address" in any confirmation message.

Cheers

Craig


Development - Custom Payment Gateway Wordpress with CiviCRM 5.3.2

Good Day!

we are developing custom payment gateway for civicrm.
  in Payment Processor Settings  we need to create a login screen to get our
  gateway account details instead of "Processor Details for Live Payments" settings using different form elements is there anyway to develop .

Thanks a lot for any suggestion or help .

Which payment gateway are you wanting to develop?  If it is one supported by Omnipay then take a look at the Omnipay Multiprocessor Extension

If you are considering any work in this area I'd strongly encourage you to discuss this in the ~dev-financial channel on CiviChat

As regards Settings - there are significant changes coming up in 5.8 as described by Eileen here


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

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

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

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

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

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

@DanielJames

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

FINANCIAL TYPES:

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

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

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

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

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

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

HISTORICAL & LINE ITEM DATA:

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

Hope this helps!
Tamar


(Part solved) Missing line items on event invoice and confirmation email for Event (using Webform CiviCRM) Drupal7 / Civi5.12
I have created a webform for event bookings, using webform_civicrm.
The webform uses Participant Fee for the exhibition cost, and a Line Item for an additional booking fee.

Can anyone guide me how to make the line item reflect on the Invoice and in the confirmation email?

UPDATE - the solution from @KarinG below fixes the invoice issue.

STILL NEED HELP WITH CONFIRMATION EMAIL
 - does not print the line item
 - has wrong sales tax amount (shows the percentage not the amount)
 - reflects Amount after tax in the "Amount Before tax' field

I believe this PR by Andrei (who works on the Wordpress/Caldera form integration) may help fix this (Core) issue:

https://github.com/civicrm/civicrm-core/pull/13477

It removes bad logic re: participants -originally included in Core invoicing code and works great. I’ve tested it/used it myself using Drupal/Webform CiviCRM module.

Unfortunately Andrei’s PR has been deemed ‘needs work to be reviewable’ - so it has gone nowhere. And that’s unfortunate.


Exporting Contacts to a .csv file How do I export all contacts to a .csv file?

Do a search that finds all contacts (for example, Find Contacts and then search without entering anything), then select "All nnn contacts" and choose Export from the drop down menu. You can select all primary fields or specific fields to export.


CiviCRM in a NEOS website Hi I have a Website with NEOS CMS. is it possible to implement CiviCRM Events, Payments etc. in that Website?

I take it you have already read that CiviCRM is designed to work with only the following 4 CMS: Drupal, WordPress, Joomla and Backdrop.
Therefore I assume you are asking a question more along the lines of 'how can I embed a form for event registrations on a standalone CMS?'
There are tools (RemoteForm, CMRF) that allow for this but they still all require CiviCRM to be set up with D, WP, J or B but will then capture the data from a from on an external website. Suggest you read
How can I connect my website to CiviCRM on a remote server?
https://civicrm.org/blog/jamie/display-civicrm-forms-on-any-web-site-anywhere