Unable to browse images on the CKEditor in the admin area When I try to browse and upload images on the CKEditor in the admin area I get the error below. Can someone give me a clue? See the screenshot. WordPress 4.6.1, CiviCRM 4.7.9

Fatal error: Uncaught exception 'Exception' with message 'Failed to locate civicrm.settings.php. Please boot with settingsFile, search, or CIVICRM_SETTINGS; or normalize your directory structure.' in /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/civicrm.config.php:125 Stack trace:
#0 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/civicrm.config.php(415): Civi\Cv\Bootstrap->boot() #1 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/packages/kcfinder/integration/civicrm.php(45): require_once('/nas/content/st...')
#2 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/packages/kcfinder/integration/civicrm.php(140): checkAuthentication()
#3 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/packages/kcfinder/core/bootstrap.php(39): require('/nas/content/st...')
#4 /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/packages/kcfinder/browse.php(15): require('/nas/content/st...')
#5 {main} thrown in /nas/content/staging/theexecnet/wp-content/plugins/civicrm/civicrm/civicrm.config.php on line 125

Have you looked to see if your civicrm.settings.php file is still in-tact? See if it is there and then make sure it has the correct permissions. In Drupal sites, it lives in sites/default/civicrm.settings.php.

Edit: In Wordpress sites, it should be in /wp-content/plugins/civicrm/civicrm.settings.php


entityRef widget seems to not respecting params Whatever has been tried, this code doesn't restrict entityRef widget output according to desired parameters:

$selection = array(132, 168, 169);
$sa_custom_props = array(
  'api' => array('params' => array(
   'contact_type' => 'Individual',
    'id' => array('IN' => $selection)
  )));
$form->addEntityRef(
   'related_contact_id',
    ts('Contact'),
     $sa_custom_props
 );
}

It happens at an attempt to override current contacts select widget at "Add Relationship" (CRM\Contact\Form\Relationship.tpl&.php pair) form, if it matters.  Any piece of advice is highly  appreciated, thanks!

The entityRef widget uses the 'getlist' API action, so you can test it out by going to the API Explorer (in the Help or Support menu under Developer, or if you go to the CiviCRM path "civicrm/api/explorer").

Select Contact as the Entity and getlist as the Action.
Pick the Parameter API Params, and set the value to {'contact_type': 'Individual', 'id': {'IN': [132, 168, 169]}}.

See what you get--in theory, that should just return those three contacts.  If so, your problem isn't the parameters; it must be the way your form is customized.

The code presented here looks good.  However, are you sure you removed the field you are replacing?  To replace a QuickForm element, you should remove the old one and generate a new one in its place.  To remove the old form, add this to the top of your code:

$form->removeElement('related_contact_id');

and then add the field.

An alternative method: since you're just replacing an existing entityRef field, it might be more efficient to just modify the API parameters.  The following Javascript might do the trick:

// Get rid of the old entityRef:
$('#related_contact_id').crmEntityRef('destroy');

// Generate a new entityRef:
$('#related_contact_id').crmEntityRef({
  api: {
    params: {
      contact_type: 'Individual',
      id: {IN: [132, 168, 169]}
    }
  }
});


How can Wordpress user edit Organisation details? I'm sorry if this has been asked before but I can't find a solution...

I've created a custom Profile for an Individual's contact details and one for their Organisation's contact details. I've added shortcodes for both of these to separate pages in Wordpress. The user that I'm logged in with has an associated Individual contact record in CiviCRM and that Individial is an Employee of an Organization. I've also made sure the Individiual has access rights to edit the Organization contact details. This relationship was initially created via a Contribution page using profiles to both capture the users personal details and organization details using the 'on behalf of profile'. All good in that a logged in user can edit their Individual contact details, but when I try and access the page in Wordpress where the shortcode is for the Organization profile I get message:

This profile is configured for contact type 'Organization'. It cannot be used to edit contacts of other types.

What am I doing wrong? How can an individual edit his organisation's details?

there is another option you might not know about. Users can be given access to their "My Contact Dashboard" eg at civicrm/user?reset=1 (in Drupal it is at that path).

And if X has permissioned relationship over Y, and if you have not unset it from /civicrm/admin/setting/preferences/display?reset=1 then X should see Y listed, and should be able to 'edit' (some of) their details. hth


Email setup for outgoing mail I'm totally new to civicrm, so I'd appreciate the simplest answer possible :)
Here's my goal: to send mass emails through civicrm, to certain mailing list groups.
Here's the problem: I can't even send test emails to myself!
Here's what I did:
1.Admin> System Settings> outbound mail> SMTP: I tried three different configurations with three different email systems. CiviCRM insisted that all the settings I tried were incorrect. I confirmed with the email providers that the information I was using was correct.
2. Admin> Civi Mail> Email Accounts: I don't seem to be able to modify or delete any account I added to that list. I have absolutely no idea if it's required for sending email, or for just reading bounce emails. I'm not sure if it should be the same account used for outbound mail.
3. From Email addresses: I added the address I used for Outbound Mail, but it didn't work.
My questions is, what's the simplest way to configure civicrm for mass emailing?
Thanks.

to address your primary question "what's the simplest way to configure civicrm for mass emailing?"
That's a difficult question to answer without a lot of context.
In some ways, the simplest is to use sendmail/postfix/php mail(), if that's setup and running on your server. Many smtp relays you might use put limits on how many messages can be sent, that could get in the way of bulk email. But, using the server's local server adds complexity -- you have to set some DNS records and pay close attention to bounces to make sure your messages are getting through and not being marked as spam by some stupid automated system (yes, google, I'm looking at you).
In some cases, I use the local server; in some I use an smtp relay service like CiviSMTP, sendgrid or mandril. Some organizations have services they are paying for already (like google apps) and use that. I've had problems using organizational outlook accounts in the past, I try to avoid having microsoft in the mix, but I think outlook can now handle the verp separator that civi uses for bounce tracking so maybe it's not as annoying now.
So the right answer depends on the resources and skills you have in the organization. Sorry if that is not a complete answer.


Problem with the ical feed of the calendar I would really like to use CiviCRM's function to create an ical feed for the calendar. But I'm having some hard times to get it working.

The event has a title, a date, a custom category and a 'long description'. When you visit the url to the ical feed: https://example.tld/civicrm?page=CiviCRM&q=civicrm%2Fevent%2Fical&reset=1

you get the following .ics file

civicrm_ical.ics

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
X-WR-TIMEZONE:Europe/Amsterdam
METHOD:PUBLISH
BEGIN:VEVENT
UID:CiviCRM_EventID_4_215ca88ba6fc880ae683205e6cd7bc8d@example.tld
SUMMARY:Test-event
DESCRIPTION:Some description
CATEGORIES:ALV
CALSCALE:GREGORIAN
DTSTAMP;VALUE=DATE-TIME:20190401T200000
DTSTART;VALUE=DATE-TIME:20190401T200000
DTEND;VALUE=DATE-TIME:20190402T030000
URL:https://example.tld/civicrm/?page=CiviCRM&q=civicrm%2Fevent%2Finfo&reset=1&id=4
END:VEVENT
END:VCALENDAR

But when I use the url of the feed in fastmail or google calendar for instance, an error appears, or the calendar items do not appear. What could be the problem?

I use CiviCRM 5.10.3 on Wordpress.

Kind regards,

Sam

--- edit ---

I got the following error message from Fastmail, my mailprovider.

  Syncing to your [redacted] calendar has been disabled: [ad2278bd-7237-4dee-884f-4eff6f3666bc] The calendar data was invalid: Error parsing VCalendar data: error Closed a different card name than opened at line 7 char 0:

---> ï»¿BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
X-WR-TIMEZONE:Europe/Amsterdam
METHOD:PUBLISH
END:VCALENDAR
 <--- at /usr/lib/x86_64-linux-gnu/perl5/5.20/Text/VCardFast.pm line 55.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
X-WR-TIMEZONE:Europe/Amsterdam
METHOD:PUBLISH
END:VCALENDAR
 at /home/mod_perl/hm/ME/CalDAVTalk.pm line 1427.
    ME::CalDAVTalk::_getEventsFromVCalendar(ME::CalDAV=HASH(0x8601578), "\x{feff}BEGIN:VCALENDAR\x{a}VERSION:2.0\x{a}PRODID:-//CiviCRM//NONSGML CiviE"...) called at /home/mod_perl/hm/ME/CalDAVTalk.pm line 2554
    ME::CalDAVTalk::vcalendarToEvents(ME::CalDAV=HASH(0x8601578), "\x{feff}BEGIN:VCALENDAR\x{a}VERSION:2.0\x{a}PRODID:-//CiviCRM//NONSGML CiviE"...) called at /home/mod_perl/hm/ME/CalDAV.pm line 1434
    eval {...} called at /home/mod_perl/hm/ME/CalDAV.pm line 1433
    ME::CalDAV::syncFromIcal(ME::CalDAV=HASH(0x8601578), "b8285308-2a18-4c47-9d22-fae8d8798d21", "\x{feff}BEGIN:VCALENDAR\x{a}VERSION:2.0\x{a}PRODID:-//CiviCRM//NONSGML CiviE"..., HASH(0x89e5670), "Force", 0, "ReadUidPrefix", "913888i-") called at /home/mod_perl/hm/ME/CalDAV.pm line 1904
    eval {...} called at /home/mod_perl/hm/ME/CalDAV.pm line 1867
    ME::CalDAV::syncCalendar(ME::CalDAV=HASH(0x8601578), 913888, "Force", 0) called at /home/mod_perl/hm/scripts/caldav_sync.pl line 271
    main::SyncCalendar(ME::User=HASH(0x89bea78)) called at /home/mod_perl/hm/scripts/caldav_sync.pl line 98

I have no idea what to make of this. There are currently no events in the calendar.

As discussed in https://lab.civicrm.org/dev/wordpress/issues/25 and using a different grep since the grep linked to in the comments above doesn't seem to work, there were two theme files with a BOM.

This grep

find . -type f -printf "%p " -a -exec od -x -N 4 \{\} \; | grep "bbef 3cbf"

located

wp-content/themes/ari/functions.php
wp-content/themes/ari/header.php


Qualification Module Is there an easy way to record the various qualification levels for members?  We have our own internal qualification and renewal system that determines some people's membership status.  It would be helpful to be able to record the date, place and trainer involved for each of our Members.  There are 6 levels of training.

This can be very easily achieved using custom data –

https://docs.civicrm.org/user/en/latest/organising-your-data/creating-custom-fields/

The first decision to make is where you would like to see this information, on the contact record or at a membership level.

If a member can have multiple membership types then the custom data set should be created at the membership level. This option will then allow you to record qualification details per membership.

To record –

Date use the Data and Input Field Type option -

Place / Location use the Alphanumeric Select option -

Training level use the Alphanumeric Select option -

To record trainer level you can either use the Alphanumeric Select option or if you have the trainers as contacts in CiviCRM then you can use the Contact Reference Autocomplete option and limit list to a group

Don’t forget to mark them as searchable for reporting purposes!

The end result when viewing the membership -


Error with CiviEvent Form Having a few issues with Civievent forms.

Potential registrants are seeing these error messages.

1)Sorry but we are not able to provide this at the moment
XML data could not be loaded. Make sure you specified the correct path.

2)When is does work and they click process. They see processing in the button and that screen never changes. They never know if it went through or not.

3) Confirmation emails are not being sent.

Any ideas with any of these ?

These error looks like an PHP error. Are you trying these in an fresh copy of CiviCRM ? please get the latest version and try the same

If you have any extension installed in CiviCRM please do disable all the extension and then try the same


Email Outgoing Configuration - Failed to connect to the SMTP server We are having trouble with setting up our SMTP server.

We have confirmed that the username, password, and port are correct but still get the following message:

The error in red shows 'Name or service not known' so the problem is related to the server name 'smtp.touchingbase.org'.   There is no public DNS record for that.   Did you enter the wrong name?


Any recommended alumni tracking system that integrates with Civi? We are a small non-profit school (around 70 students) and we would like to keep some stats on our alumni so we can measure how well are doing at training.

Is this something you would use CiviCase for?
Do you recommend any other systems out there for this?

Edit:
We specifically want to track several things.

Class dropouts
Location of where they land a job within area of training
How long from graduation to working within field of training
They will be working in teams (not necessarily just teams of our alumni) so we want to be able to see team connections across our crm.
Stages of advancement within field of training and team successes/accomplishments
How long working in said field

Since we are a small tight-knit school, we have continuing relationships with our alumni. So we will likely get a high response rate to annual surveys that can keep the data base updated.

CiviCase might be overkill. Maybe if you had several steps involved with each alumni outreach and wanted to track those steps separately but count the number of outreaches as a whole, but otherwise just one or two regular activities should do it? Or CiviCampaign with a survey.


How do I set up custom permissive relationships? I am currently using D7.35 and Civi4.4.14

We have custom relationships on our Civi installation. What I would like them to do is give the individual permission to view and edit the organisation which for some reason worked in development and not in the real world.... I think because the first tick box is unticked.... right?:

So there are probably two questions:

Am I Right?
How can I get Civi to allocate this automatically?

There is a bit of further information.

Our developer custom coded the module designed for our member management system. So a Station Administrator (as per the picture) and promote or demote within his station without our intervention using a custom page where a number of relationships are managed.

Yes, that checkbox must be checked. (The one reflecting the specific "direction" you wish.

I don't think you can configure this to occur automatically, however since you have custom code, it should be possible to add the permission automatically using an API call (the parameter name I believe is is_permission_a_b or is_permission_b_a).

Here's an API call:

$result = civicrm_api3('Relationship', 'create', array(
  'sequential' => 1,
  'contact_id_a' => "",
  'contact_id_b' => "",
  'relationship_type_id' => "",
  'is_permission_a_b' => "",
  'is_permission_b_a' => "",
));


How to make event registration form fields be displayed inline At the moment, each field specified in a profile that is related to an event online registration form, has its own line, inside its own div.
I want to be able to display 2 specific fields in the same line, which are logically connected to each other.
How can I do that?

If you are on Drupal you could do the event registration using a webform with webform_civicrm and use the webform_layout module to place two fields on the same line.

Alternatively you could write a tiny extension to drop in some jQuery to move the fields around in the standard event registration form. There is write up of how to do that here: http://jackrabbithanna.com/articles/easy-jquery-modificaiton-civicrm-forms  Note that since that was written cj has been deprecated in favour of CRM.$

If you can do the changes with CSS without needing the power of jQuery, you can also do that - see my answer to How can I change the way price set information is presented on a contribution page?


All dashlets display "Object Moved" after host name change We've changed server host name recently and all seems to be fine excluding dashlet reports disappearance: there is just "Object Moved, This document may be found here" like on this screen grab http://awesomescreenshot.com/0375gftva1

We've checked carefully all paths at:

civicrm.settings.php
Administer - System Settings - Directories
Administer - System Settings - Resource URLs
Administer - System
Settings - Cleanup Caches and Update Paths

Also

Cache has been instantly cleared,
Refresh Dashboard button used,
each report has been enabled / disabled / updated,
log files in ConfigAndLogs folder has been monitored,
page has been inspected using  XHR inspector in Firefox,
as well as server logs.

There are several suspicious messages in Drupal Watchdog though, like:

* undefined index: columns in CRM_Contact_Page_AJAX::dashboard()
(line 610 of /civicrm/CRM/Contact/Page/AJAX.php).

* $Fatal Error Details = Array ( [callback] => Array ( [0] =>
 CRM_Core_Error [1] => handle ) [code] => -5 [message] =>
DB Error: already exists [mode] => 16 [debug_info] => INSERT INTO civicrm_menu
(domain_id , path , breadcrumb ) VALUES

..but it's unclear how it might be relevant to this case, especially when cache has been cleared almost instantly. Any clue, please?

In "own question - own answer" mode .. again. Well, it turned that server name resolves as www.hostname.tld while all paths we used were in just hostname.tld format.


Is there a way to remove text formatting when copy and pasting text into Activity details section? Some information that I add into Civi to record activities may be copied and pasted form a word document, an email etc. This looks fine on the activity when reading it on Civi, however when pulling reports as a cvc file the text is littered with jargon (something like: $n&*) where ever a bit of punctuation was. I know that it reads easier (without the jargon) if for each entry the user removes the formatting, however I wondered if there was a way to make this the default.

Do you mean unicode characters like the fancy quotation marks? For CiviReports, unicode output for export to CSV was fixed in 5.22 in https://github.com/civicrm/civicrm-core/pull/16117. What version are you running?


Link to Directly View Default List of Contacts (Drupal) I would like to be able to link directly to the page listing contacts (same as if searching for a wildcard (searching without entering . Even better would be able to pass in variables through the link to filter the results.

At the very minimum I would like to show the list of contacts as if you just go to the search bar and press enter. I'm looking for a way to directly link to the list of contacts.

Is this possible?

Clarification and thoughts...
Right now it appears that the only way you can repeatedly search for contacts is to manually do a search. This is tedious and very limited. Ideally there would be a way to pass in parameters through the URL to get search results. This would allow us to have direct links to a specific set of search results.

There is no navigation that sends you to a 'list' of contacts. First you need to be clear on what that 'list' would show. Is it just the list that you get from going to Advanced Search and clicking on 'search' which is same as clicking in Quick Search and hitting 'enter/return' on your keyboard. If you don't want to build a View then perhaps make a Profile, add the fields you want in it, and set them to 'searchable' - but of course that all begs the question of 'what do you want people to be able to do once they see this list' which is something you haven't mentioned.


CiviCRM Managing Contacts in a Group I face difficultly validating individual contacts to a group who must be a member of its parent group.
For Example I have groups such as sales executive-north, sales executive-east,sales executive-west. All these have Sale Executives as there parent group.

Case 1 : Whenever I add new individual contact to any of the three subgroups, the system have validate/notify  that the  contact have to a member of Sale Executives group first.

Case 2: Whenever I  remove a member from Sale Executives group then they have to be removed from its subgroups also.

Is there way to control this through Civirules ?

If I understand you correctly, parent groups work the other round to the way you are trying to use them: you don't add someone to the parent and then to a child group; but instead you add them to a child group and they are regarded as a member of the parent group.

In your case, by adding someone to the Sales Executive-North group, they are automatically part of the Sales Executive parent group.  Similarly when you remove them from the child group, they are no longer part of the parent group (unless they were also in another child group).

As an alternative to parent groups you could use smart groups.


Activity search by subject - advanced search vs activity search I've noticed the upgrade to the activity search now lets you search either the Subject or details of an activity (I'm in Civi 5.5.3, Drupal 7.59) which is great but on the Advanced search screen it seems to use the strict "=" qualifier.

I've verified the following behavior of the demo site (5.8) as well:

Run an Advanced search for an activity that contains "Tell a Friend" in the subject line - no results.
Run an activity search for an activity that contains "Tell a Friend" in the subject line - returns all the activities that subject line contains the search term, including "Subject for Tell a Friend".
Same problem when you search details or both.

I can see in feedback for the the blank search results:

No matches found for:
Activity targeted to ...AND...
Activity Text (Subject Only) = 'Tell a Friend' ...AND...
Activity Status In Completed

Versus the summary that shows on the full set of results:

Activity targeted to ...AND...
Activity Text (Subject Only) Like '%Tell a Friend%' ...AND...
Activity Status In Completed

I'd like to use advanced search so that I can return contact results and add them to a group. Any idea where I take a look to change the Advanced Search from "=" to "LIKE"?

Also, any idea if this was intentional behavior - it doesn't seem like it would be very useful but maybe that's me? Is this worthy of a bug report?

You can use wildcard characters (%xxxx%) in search to change the default operator of "=" to "LIKE" - e.g. on demo:

Using Search > Find Activities:

Activity Text = Tell a Friend
Status = Scheduled, Completed
Generates the same query as you listed in your question and at the time I write results in 204 records:

Activity targeted to ...AND...

Activity Text (Subject Only) Like '%Tell a Friend%' ...AND...

Activity Status In Scheduled, Completed

The same query is generated when using  Search > Advanced Search with the following parameters:

Activity Text = %Tell a Friend%
Status = Scheduled, Completed

The above returns 89 contacts, but if you display the results as activities, you get the same 204 that you did using Search > Find Activities.

Hope this helps,
Tamar


Error message when trying to run scheduled email send - Joomla I've acquired a site that is several generations of CiviCRM out of date - currently running 4.0.7.

I'm working through the upgrades and went to 4.1.0 where the new procedure for sending emails is implemented - unfortunately I can't get it to work

I'm trying to run it manually from the command line at the moment. The command I'm using is

php bin/cli.php -s demo1.network-midlands.co.uk -u ***** -p ***** -e Job -a execute

and every time I run it I get the following error

PHP Notice:  Undefined variable: cli in /var/www/vhosts/network-midlands.co.uk/demo1/administrator/components/com_civicrm/civicrm/bin/cli.php on line 30

PHP Fatal error:  Call to a member function callApi() on a non-object in /var/www/vhosts/network-midlands.co.uk/demo1/administrator/components/com_civicrm/civicrm/bin/cli.php on line 30

Lines 28-30 are as follows

$cli = new civicrm_Cli( );
$cli->initialize( ) || die(  );
$cli->callApi( ) || die(  );

it looks like $cli isn't getting defined  on line 28 ($cli = new civicrm_Cli( );)

Any clues?. I've since moved up to CiviCRM 4.1.2 to se eif that fixes it but it doesn't.

Note - Joomla is still at version 1.7 - I'm getting as many of the modules as up to date as possible before moving it all to Joomla 3

Thanks

I don't think the problem is what you think it is (on line 28) because otherwise you should get that same notice (and fatal error) on line 29.

There are a whole bunch of bugs submitted on issues.civicrm.org relating to cron in early versions of 4.1.  Since CiviCRM 4.2 supports Joomla 1.7, my advice is to upgrade to CiviCRM 4.2.20.  Civi 4.2 was a "long term support" release, which means it was getting (some) fixes through April of this year.  It should be in far better shape (especially as regards the cron system) than Civi 4.1.2.


How can I force delete an event I have a few test events I registered a single user for. I then removed the single user from all the events but when I go to delete the event I get a message the event still has participants. There are no participants when I do a search. It appears to be some sort of bug. How do I force delete the event? Is there a way to get rid of it via MySQL if the GUI won't comply?

CiviCRM 4.6.9
Drupal 7.41

Thanks

Use the API explorer :

$result = civicrm_api3('Event', 'delete', array(
  'sequential' => 1,
  'id' => <your_event_id>,
));

This will delete the event along with the related participant.


Paypal Pro update billing details for recurring payments link is broken after upgrading to 4.6. How to fix it? Since I have upgraded to 4.6.4, the link to update the billing details from recurring payment receipts is broken. I get the following message from log. How to fix it please?

2015/07/08 13:34:52 [error] 23640#0: *14724 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot use object of type CRM_Core_Payment_PayPalImpl as array in /srv/www/sites/all/modules/civicrm/CRM/Core/Payment/Form.php on line 220" while reading response header from upstream, client: 185.59.126.253, server: abc.com, request: "GET /index.php?q=civicrm/contribute/updatebilling&reset=1&coid=17747&cs=0bf9ca34f74268e1ff962830b2162a05_1436189654_inf HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/adb.sock:", host: "rldb.info"

This issue seems to have Fixed on Civicrm 4.6.9


At signup, auto assign organization:contact relationship based on email domain being the same Is there a way for this:  When a new contact is created (through drupal or backend), auto assign a relationship to an organization if one exists with the same email domain as the contact's email domain.

Makes sense right?  If I'm newly on-boarded to my company, I'd like to just register on the site and it all be set up and working. Most of our members inherit their membership through their Employer and we'd like to manually have this done since this is starting to be an administrative burden.

Thanks everyone!  I solved it totally with CiviRules extension.  I just used a combination of the built-in API explorer & the extension's documentation to figure out how to create my own Condition & Action.

The condition checks if that domain exists for an Organization.  I set it to work ONLY if it finds 1 (just to make it work simply for now) and the contact is an Individual (no Org to Org relationships).  If true, the Action then creates the relationship.

To make this work, when we set up an Org..  we make a dummy email their primary/main email and put it on hold so no communications go out to it.. like this: dummy@domain.com

I'll share the big stuff.  I'm not a coder, so if someone finds a better way to do this.. let me know.

https://docs.civicrm.org/civirules/en/latest/

    Condition:

  public function isConditionValid(CRM_Civirules_TriggerData_TriggerData $triggerData) {
    /** $this->logCondition('my con log message', $triggerData, \PSR\Log\LogLevel::INFO); */
    $contactId = $triggerData->getContactId();
    $contactTypeParams = array('return' => "contact_type",'id' => $contactId);
    $contactType = civicrm_api3('Contact', 'Getvalue', $contactTypeParams);
    $contactEmailParams = array('return' => "email",'id' => $contactId);
    $contactEmail = civicrm_api3('Contact', 'getvalue', $contactEmailParams);
    $contactEmailDomain = substr(strrchr($contactEmail, "@"), 1);
    $orgEmailDomainCountParams = array('email' => ['LIKE' => "%" . $contactEmailDomain],'contact_type' => "Organization");
    $orgEmailDomainCount = civicrm_api3('Contact', 'getcount', $orgEmailDomainCountParams);
    if ($orgEmailDomainCount = 1 && $contactType = "Individual"){
        return TRUE;
    } else {
    return FALSE;
    }

    Action:

  public function processAction(CRM_Civirules_TriggerData_TriggerData $triggerData) {
     /** $this->logAction('my act log message', $triggerData, \PSR\Log\LogLevel::INFO);  */
    $contactId = $triggerData->getContactId();
    $contactEmailParams = array('return' => "email",'id' => $contactId);
    $contactEmail = civicrm_api3('Contact', 'getvalue', $contactEmailParams);
    $contactEmailDomain = explode('@', $contactEmail)[1];
    $orgContactIdParams = array('return' => "id",'email' => ['LIKE' => "%" . $contactEmailDomain],'contact_type' => "Organization");
    $orgContactId = civicrm_api3('Contact', 'getvalue', $orgContactIdParams);
    civicrm_api3('Relationship', 'create', ['contact_id_a' => $contactId,'contact_id_b' => $orgContactId,'relationship_type_id' => 5,'is_active' => 1,'is_permission_a_b' => 2,]);
    civicrm_api3('Contact', 'create', ['id' => $contactId,'employer_id' => $orgContactId,]);
  }


Way to sync CiviCRM memberships to Drupal group The organization I work for wants to create a subscription that provides access to certain parts of our Drupal site using the CiviCRM membership subscription process, wherein they would subscribe to become a member of one of the memberships (there would be a couple dozen of such memberships and special access sections, one per membership type). I haven't figured out a good way to limit access to those parts of the site in Drupal and want to see if groups will do the trick. I am wondering if there is a way to sync memberships in CiviCRM with organic groups in Drupal?

Drupal 7.56 CiviCRM 4.7.27

This question gives an answer to a very similar question that you can apply to your situation: Reverse sync CiviCRM groups to Drupal organic groups

However, even with a couple dozen membership types, I still think it might be better to use regular CiviMember-Role sync and use a "limit content access by role" module.  I think Content Access is the popular one.

Try both approaches and see what works for you!


CiviCRM Entity display shows email addresses - should only show display name I have a content type in Drupal ('Event') that uses an entity reference autocomplete field to search the name of the submitting organization.  The entity reference field only displays contacts that meet a filter criteria, as set in the entity reference view.

When the content type with the entity reference field was originally set up, it functioned as expected.  About a month ago I noticed the display was suddenly showing the submitting organizations' email address in addition to just their name.  The problem is specifically in the display of the event after it has been created (the way the name appears in the autocomplete widget is fine).

The display was originally:
"Event facilitator: Random Organization Name"

Now, it appears like this, with the addition of their email address:
"Event facilitator: Random Organization Name <random@organization.com>"

I'd rather not have their email addresses be displayed.

Thinking that it might have had something to do with an update, we downgraded  CiviCRM Entity back to version 7.x-2.0-beta11, but the problem persists.

Has anybody experienced this issue?  Any help or insight is greatly appreciated.

Using CiviCRM 5.3.1.

Congratulations, you're the winner of jackrabbithanna's Friday open source evening random issue choice award!

I've added a configuration option to CiviCRM Entity to be able choose a few options for what the civicrm contact entity label should be.

You'll find a fieldset 'Options' at the configuration page: 'admin/structure/civicrm-entity/settings'

There's a field, "Contact Entity Label"...The default option is "Legacy", which will follow the logic for formatting of the contact entity label that existed previously to this update. Users who upgrade and don't choose an option will have it behave as it did before.

You can also choose, "Display Name only", "Display Name + email", "Display Name + phone", or "Display Name + IM"..

It's available in the 7.x-2.x-dev version right now, will be in version 2.2

Or apply the code updates in this pull request:
https://github.com/eileenmcnaughton/civicrm_entity/pull/165/files


How do I find duplicate contacts by nickname? Here's an example of a very common situation I have:

Database has a contact like this

first name: Robert
nick name: Bob
last name: Smith
email: bobsmith@example.com
...

Event registration form receives a submission like this

first name: Bob
last name: Smith
email: bobsmith@example.com
...

A duplicate contact is created because the first name values do not match.

When finding duplicate contacts, is there some way of getting Civi to notice that the first name of one contact is identical to the nick name of another contact?

As a workaround, I've tried adding the nick name field to public forms, but trust me you don't want to do this. It's funny seeing what people write when prompted for a nick name, but not so funny when you notice postal solicitations addressed to people like "The Dude Smith".

You can create a view only custom field that you set with a civicrm_post hook when contacts are created/edited. It has the value of nickname if nickname isn't null, else first_name. Use that field in your dedupe rule.


Cant install extension E-mail API 1.17 wordpress 4.9

And recently upgraded to civicrm 5.22 CiviRules 2.1

Was working fine with older civirules and E-mail API 1.10

this is the error

CiviCRM_API3_Exception: "Could not find the SQL file."

#0 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php(190): civicrm_api3("Extension", "install", (Array:1))
#1 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(453): CRM_Admin_Form_Extensions->postProcess()
#2 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#3 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), "next", "Next")
#4 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), "next")
#5 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), "next")
#6 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
#7 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(398): CRM_Core_Controller->run()
#8 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(156): CRM_Core_Page_Basic->edit(1, NULL)
#9 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(121): CRM_Core_Page_Basic->run()
#10 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Admin_Page_Extensions->run((Array:3), NULL)
#11 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:16))
#12 /home/domain/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#13 /home/domain/public_html/wp-content/plugins/civicrm/civicrm.php(1246): CRM_Core_Invoke::invoke((Array:3))
#14 [internal function](): CiviCRM_For_WordPress->invoke("")
#15 /home/domain/public_html/wp-includes/class-wp-hook.php(286): call_user_func_array((Array:2), (Array:1))
#16 /home/domain/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#17 /home/domain/public_html/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#18 /home/domain/public_html/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
#19 {main}

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Could not find the SQL file.

Yep, there is a typo in there. Fixed in the latest master : https://github.com/CiviCooP/org.civicoop.emailapi.


How to know if Smarty is really activated on WordPress? On WP 5.6 / CiviCRM 5.32 we can't succeed to send HTML e-mails using css in <style> and {literal} (see this post) knowing that we succeed in sending html templates with in-line css.
Smarty is set on '1' in civicrm.settings.php but my question is if smarty is "really" activated and if there's a way to check this parameter.
* Enable this constant, if you want to send your email through the smarty
 * templating engine(allows you to do conditional and more complex logic)
 *
 */
if (!defined('CIVICRM_MAIL_SMARTY')) {
  define( 'CIVICRM_MAIL_SMARTY', 1 );
}

Any idea?

easy answer indeed :
send an e-mail with this code

{$smarty.now|date_format}

{$smarty.version}

You should get something like:

Jan 14, 2021
2.6.31


CiviCase: Accordions not toggle ("Roles" "Activities"). Menu Options ("Add Activity" etc.) not "auto-trigger," Admin menus at top of screen not open CiviCRM 4.6.8; Drupal 7.39

Everything seems normal when I go to the dashboard initially. I click "Manage" to open a previous case. On the case management page that follows, pretty much all menus and accordions are non-responsive.

Screenshot:

I recently created and installed a new Drupal Theme, but it all worked fine in the development and test environments, and the issue persists whether I'm in the new theme or the old theme (where it worked fine). However... I went back to my dev and test environments and it's failing now. What the hey? I tried clearing caches (CiviCRM and browser) and the issue persists.

All my problems stemmed from one module I installed to make adjusting the new theme easier: SwitchTheme. After installing the new theme, I installed SwitchTheme 7.x-1.x-dev on all environments. I was so caught up in theme-tweaking that when I spotted this CiviCase error, I'd forgotten about SwitchTheme. Additionally, it's such a tiny, minor module, I really hadn't expected it to have such a big impact on site behavior.

Disabling SwitchTheme 7.x-1.x-dev in Drupal's Modules page immediately resolved the issue.


URGENT : Stripe.js token was not passed! Report this message to the site administrator. (on civicrm 4.7.20) I recently upgraded civicrm from 4.7.16 to 4.7.20 (on Drupal 7.56).

Now, when I use a Contribtion Page to make a payment, I get the following message : "Stripe.js token was not passed! Report this message to the site administrator." (tested on different existing Contribution Pages with same result).

I already had this same message in the past, for webform embedded payments (see Stripe.js token was not passed! (using Webform Integration)), but it was solved by a fix (https://github.com/drastik/com.drastikbydesign.stripe/pull/159/files).

But this time, the problem happens on simple Contribution Pages (which previously worked).

To be complete, since this upgrade, I have had an other problem on webform embedded payments (submitted here : Stripe extension fails with a new account (civi 4.7.20)) :

old webforms continue to work properly (I don't have this stripe.js
message and the payments succeed) (but for how long ?)
new webforms based upon new stripe Accounts send the payment to an other (existing) account.

May be both problems are linked ?

FYI, I use Stripe Extension 4.7.1 and I am not a programmer

Too late for me to go back to 4.7.16, any help is very very welcome and urgent.

Please upgrade to the current github 4.7-dev version. Lots of work went into eliminating "Stripe.js token not passed!" errors that can for a variety of reasons. Jacques-Marie, you can reap the benefits of this labor by upgrading.

You already posted the url, but this is it:

https://github.com/drastik/com.drastikbydesign.stripe


Error printing event badges after sorting by participant name We need to print event badges in alphabetical order instead of the date registered order that you initially get from a participant search.  The PDF creation completes successfully with the default sort, but after changing to alphabetical order, you get a yellow screen DB Error: unknown error.  Is there a way around this?  Thanks!

We are on CiviCRM 5.4.0 on Drupal 7.63

I confirmed that this is caused by having a name badge layout with a spacer field and sorting the participants by name prior to generating name badges.  My work-around for now is to instead of using a spacer in the badge layout, to insert an unused blank field, and I can now print alphabetically sorted badges.


How to change date format in exports I am using Civi 4.7.29 on Wordpress 4.9.1

When exporting the membership list for postal mailing, the expiration date is shown as YYYY-MM-DD.  I would really like it to be MM-DD-YYYY.

To export I go to Search>Find Memberships, I select my membership type then scroll to the bottom and click search.  On the next page I select All Records, then select Export Members from the drop down menu.

Is there a better way of doing this to get the date format I need, or are there some settings I can change?  The Localization > Date Formats do not seem to cover the exports.

Thank you.

Yes, Date fields in export do not respect Date formats set in Localization >> Date Formats. Can you try Format Date Column in Export extension? This extension allows to set Export Date format under Localization >> Date Formats and uses this to format the date fields while exporting.


Auto-filled Drupal Webform That Creates New Contact Is it possible to make a Drupal Webform which always creates a new contact but uses Existing Contact for prefilling?

The use-case is that the data needs to be updated but supervised by another human. So what I in effect need is for my drupal webform to create a duplicate based on the existing contact. Duplicates are then to be merged by a supervised deduplication process.

How would I go about doing this? Would it be a matter of inserting some code before the form is processed or is the entire Existing Contact framework more complicated then that? Or is there an easier way to achieve this?

Check out I3Val Input Validation (https://github.com/systopia/be.aivl.i3val/blob/master/docs/index.md) as this allows backend validation before changes go into Civi. It may save people having to complete information again that hasn't changed and from an admin perspective unlikely more work than having to check and then dedupe.


Can I override core classes or PHP files with custom versions? Can I override core behavior of CRM/SMS/Providers.php by creating the file with the changes in my civicrm_custom_php directory?

The answer is "yes" but...

Overriding an entire file means upgrades will become difficult, as you'll have to manually diff the contents of that file with the one in the new version, and reapply your changes.

If possible, try accomplishing your goal using a hook.


Webform-civicrm Address fields not being saved in CiviCRM We are running Civi 4.7.29. with Drupal. We have a webform using Drupal webform integration which populates civicrm fields.  When the form is submitted the address fields (Street, State, Postal Code, Country) are not being saved in CiviCRM.

Has anyone come across this issue?

Are the affected fields selected in the "Fields to lock' dropdown in the "CONTACT FIELD HANDLING" section of the "Existing Contact" field of the webform?

IF so, then see this issue. At the bottom is a link to a much-needed pull request which has been available since Dec 2016. I don't know why it was never merged. With each update of webform_civicrm, I apply the third commit in that PR. Not sure of the importance of the first two commits shown there.


contact match script? I'd like to import an inconsistent list of contact names with associated donations and match the names to contacts.  IMO there are 3 options:

Clean the csv in advance by displaying contact alternatives (ideally showing contact ID for matching)
Run an import script and use interactive matching logic.
Use forms for batch entry and interactively match contacts.

The problem is that the person who understands the matching is not the same person who can do the interactive import.

I was wondering if someone has used an excel function / drush or extension of some sort to process a list of names and retrieve  likely matches that I could present (with contact ID) in excel so the user would not have to use the autocomplete widget. Would like to avoid a developer.

The

Step 1 - Use a program to make your data consistent.  There are lots of possibilities out there - try OpenRefine (open refine.org).

Step 2 - once consistent, try to assign the contact.id (aka contact id, internal contact id) to a column.  This will remove de-duplication issues

Step 3 - Import

Its really hard to have a script that finds inconsistencies, and they vary so much across data sets: some have all sorts of titles, others have improper address (street vs st vs str), etc.  I find its almost always less time to invest in work before the import instead of counting/hoping on finding duplicates later.


How to display CiviCRM Custom Fields in a Drupal 8 View I've been not very experienced with CiviCRM. I try to get CiviCRM custom fields displayed in Views.
I've installed Drupal 8.9.3., CiviCRM 5.28.3, CiviCRM Entity 8.x-3.0-beta1.
Drupal and CiviCRM run on different databases on the same server with the same database user.
In added the array with the links to the correct database to civicrm.settings.php as described in https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/.
In Drupal 7, when I created a view(user) I was offered different CiviCRM fields. This doesn't happen in my Drupal 8 installation.
Besides when In try to create a view(contacts) I get the following error message:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'usr_p550866_1.civicrm_contact' doesn't exist: SELECT civicrm_contact.id AS id FROM {civicrm_contact} civicrm_contact LIMIT 11 OFFSET 0; Array ( )

(usr_p550866_1 is the database for Drupal)
Is this a problem with Drupal 8 or do I anything wrong?
Your help would be appreciated very much.

You need to add it in settings.php not civicrm.settings.php. once you add them in settings file clear Drupal cache


MySQL Tuning: Is Defragmenting Tables safe? I like using MySQLTuner to check on things from time to time. It's as easy as:

$: sudo apt-get install mysqltuner (CentOS: sudo yum install mysqltuner)
$: sudo mysqltuner

Also, besides 'top' which is the default monitor for the server's processes and hardware, install 'mytop' exclusively for monitoring MySQL. Excellent tool to watch all your databases at once.
I have never performed OPTIMIZE_TABLES to defragment for a CiviCRM installation before. Is it safe? Of course, do a robust backup first, but want to know before to expect if there is likelihood of failure. No one wants more work or downtime than necessary. Also, please advise on the other two suggestions. All noted with arrows. Thanks in advance.
Here are the results:
General recommendations:

    =>Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    =>Adjust your join queries to always utilize indexes
Variables to adjust:

    =>join_buffer_size (> 128.0K, or always use indexes with joins)

Full Report:
 >>  MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.38-1~dotdeb.0
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 17M (Tables: 203)
[--] Data in InnoDB tables: 53M (Tables: 841)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[--] Data in MEMORY tables: 0B (Tables: 10)
[!!] Total fragmented tables: 861

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1h 25m 6s (7K q [1.402 qps], 270 conn, TX: 11M, RX: 1M)
[--] Reads / Writes: 64% / 36%
[--] Total buffers: 192.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 597.8M (29% of installed RAM)
[OK] Slow queries: 0% (21/7K)
[OK] Highest usage of available connections: 5% (8/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/2.9M
[OK] Key buffer hit rate: 98.8% (10K cached / 121 reads)
[OK] Query cache efficiency: 51.1% (1K cached / 3K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 417 sorts)
[!!] Joins performed without indexes: 151
[OK] Temporary tables created on disk: 16% (127 on disk / 788 total)
[OK] Thread cache hit rate: 97% (8 created / 270 connections)
[OK] Table cache hit rate: 96% (234 open / 242 opened)
[OK] Open file limit used: 9% (102/1K)
[OK] Table locks acquired immediately: 99% (3K immediate / 3K locks)
[OK] InnoDB data size / buffer pool: 53.8M/128.0M

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
Variables to adjust:
    join_buffer_size (> 128.0K, or always use indexes with joins)

Yes, running OPTIMIZE TABLES on a regular basis is beneficial. I don't think there is significant risk with it. I'd run it on a copy of the DB first.

If you have the memory on your database server increasing the cache and buffer sizes of MySQL is a good thing, IMO.

In the past, I've found the Percona blog quite a useful resource. Also some folks (NYSS) have been using the Percona distribution for improved performance.


If I create a Scheduled Reminder for Event feedback, eg 16 hours after, should I expect it to go out to all past events? We set up a Scheduled Reminder with a link to a webform for event feedback. It is set to go out 16 hours after the event.

We did not expect it to go out to all past events (hundreds of events with thousands of participants over many years)

A/ is this a bug that can/should be fixed

B/ should there be a warning when setting up Scheduled Reminders that these may go out to a much wider audience than expected

C/ is there some way we could have worked around this if we had known it was likely?

We had the same issue - making a new post-event feedback email live via Scheduled Reminders unexpectedly triggered emails to hundreds of past attendees of events from years ago.

Until the issue is fixed, one workaround is to set-up a Smart Group that adds attendees to new events of this type that occur only after a certain date. Then in Scheduled Reminders, use the "Limit to" field to only send out to contacts in this Smart Group.


constituent detail report not working (timeout) I am using CiviCRM 4.5.8, an instance with 18,328 contacts.

No matter how long I set the max execution time of a page, I am getting a timeout when trying to view the constituent detail report (instance 2). The other reports all work fine.

Has anyone ever experienced this? Can anyone think of a reason this might be happening? The PHP error logs are showing nothing but a timeout, and the CiviCRM log is showing nothing.

Update: It seems to be related to Activities. If I create a new report based on constituent detail, and uncheck all the activity columns from being used, then the report is produced ok. If I check one column to do with activities again, then it stops working and times out.

How many activities do you have (i.e. the number of rows in the activity table)
Where are you hosting the site
Is your database on the same server as the web server

If i had to guess, i suspect your activity table is quite large and the left join with the contact tables is basically causing the query to take forever and hence the timeout


A Couple of Questions from a Newbie I apologize ahead of time, I was brought on to fix a company's website, but they asked me to do their CiviCRM. Instead, I've never done this, nor have I ever heard of it before this.
They have a few concerns, and I was hoping you guys could help me. No, I'm not getting paid, I'm volunteering to help them.
-Mail Settings: they had some email addresses bounce that are good email addresses. For example, when they send out emails, their emails bounce back. How can I fix this?
-Update CiviMail settings and website, so Unsubscribe and Opt-Out links are valid. Folks were able to use it in the first email they sent out, but now it doesn't work.

MailChimp Extension: is there a MailChimp available to install with CiviCRM.

I did some searches on the forums to see if I can avoid asking you guys for help, but I couldn't find anything this specific. Again, I apologize, I know I'm in over my head, but I would like to learn this for my future.
Thanks!
EDIT: WordPress + Version 5.24.4
EDIT 2: This is the website: http://crm.allparksallianceforchange.org/wordpress

For your last question, a quick google of "civicrm mailchimp extension" gets

https://civicrm.org/extensions/mailchimp-civicrm-integration (usage 795)
https://civicrm.org/extensions/mailchimp-sync (usage 1)


Can you send an immediate thank you to a recurring donation? I set up a recurring donation using authorize.net, have the IPN url configured, etc.  However, when someone completes a recurring contribution they do not get an email right now, or even 10-15 minutes later.

I'm assuming that the email is generated by the IPN event from authorize.net, but they don't attempt the transaction until around 6am.  (My first test had a bad URL for the callback).

Is there a way to acknowledge that the contribution commitment has been made with a somewhat immediate thank you email that can also spell out how future receipts will be delivered?

Alternatively you can use Civirules to send an automated email: https://docs.civicrm.org/civirules/en/latest/


Outgoing donations tracking I've installed CiviCRM on my non-profit organization (Wordpress 4.2.2, CiviCRM 4.6.3, MySql 5.1 and PHP 5.3), a trashware association which get computers from companies, other association and families and donate them to people who cannot purchase a computer.

Do you know if there are modules / extension which can allow us to track the outgoing donations too?

I can see that with CiviContribute it's possible to track donations, but it's not applicable to our needs, is that correct? If I well looked at it, it shouldn't be possible to track the donation of computers to us, only moneys...right?

Thanks in advance!

For incoming donations, CiviContribute does have the ability to track "in kind" non-monetary donations. Visit Administer > CiviContribute > Payment Instruments and add "In kind" as an option.

You can also set up some custom fields to extend the contribution record with options like e.g. "hardware type", etc.


What character is VALUE_SEPARATOR? I need to run a MySQL query to split the values in the fee_level field of the civicrm_participant table. I just can't determine what character to use as the delimiter. When I look at VALUE_SEPARATOR in eclipse, I see a character that resembles a 'binary domino.' When I look at VALUE_SEPARATOR in vi, I see ^A. I'm not sure how to query on either?

In fact, if you use HEX() function, you can guess it's the ASCII code 01 which is not really readable :

MySQL> SELECT substring(besoins_sp__114, 1,1)
       FROM civicrm_value_besoins_sp_cifiques_v_nements_26 LIMIT 1;
+---------------------------------+
| substring(besoins_sp__114, 1,1) |
+---------------------------------+
|                                |
+---------------------------------+
1 row in set (0.00 sec)

MySQL> SELECT HEX(substring(besoins_sp__114, 1,1))
       FROM civicrm_value_besoins_sp_cifiques_v_nements_26 LIMIT 1;
+--------------------------------------+
| HEX(substring(besoins_sp__114, 1,1)) |
+--------------------------------------+
| 01                                   |
+--------------------------------------+
1 row in set (0.00 sec)

From there, you can do reverse operation using UNHEX.
So, if you need to replace this char by another more readable one, you can do the following :

MySQL> SELECT replace(besoins_sp__114, UNHEX(01), '|') AS special_needs
       FROM civicrm_value_besoins_sp_cifiques_v_nements_26;
+---------------+
| special_needs |
+---------------+
| |AL|          |
| |AL|          |
| |VG|          |
| |VG|          |
| |VG|          |
| |VG|          |
| |VG|          |
| |VG|          |
| |VG|          |
| |VG|AL|       |
+---------------+


One host, multiple Wordpress domains, one CiviCRM database We want to use CiviCRM on one host which has several domains each with their own Wordpress  installation. The CiviCRM database is located on the same host.
I have looked at:
https://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=86213708

but cannot figure out which scenario applies.
Is there something else I should look at?

I think I want to put the CiviCRM plugin in the wp-content/plugins in each domain, but indicate the same CiviCRM database for each. Is that correct?

I haven't done multisite with Wordpress, but I think this link is more up-to-date documentation:

https://docs.civicrm.org/sysadmin/en/latest/install/multi-site/#wordpress-multisites

  If using a WordPress multisite when CiviCRM is activated the civicrm.settings.php file is added within the uploads directory for that site. Site 1, generally the main site of the multisite, uses the default upload path /wp-content/uploads/. But all other sites will use be in /wp-content/uploads/sites/#/civicrm, the # being the website ID for that site. This default setup allows multiple CiviCRM databases to share one codebase...


Restrict contacts available to be assigned to an activity We're looking to restrict the contacts that are available when assigning an activity. Has anyone done this before?

The email function is really useful, but due to the sensitive nature of some of the information, we want to remove the possibility of human error as someone could accidentally choose the wrong contact to assign.

It would be great if this could be restricted by group the same was a custom contact reference field can be done.

The EntityRef field on the form can be given that restriction. Best way to do it is probably via a hook, e.g.

hook_civicrm_preProcess($formName, &$form) {
  if (is_a($form, 'CRM_Activity_Form_Activity')) {
    $form->_fields['assignee_contact_id']['attributes']['api']['params']['group'] = 1;
  }
}

(where "hook" is the name of your module and "1" is the id of the group)

Note use of is_a rather than the $formName so we also catch the case activity form.


Current Employer style field for a custom field I have been asked to add some custom fields to the default CiviCRM Interface that bahave like the current employer field.

That is to say, my users want to create certain relationships and have them turn up in the relationships tab.

I had originally implemented this as a contact reference with a filter to look up the specific sub-set of contacts needed but I have been asked to make them relationships.

I realise I can implement this using webforms integration (we are using Drupal 7) but I have been specifically asked to implement this on the default UI.

I have also read it can be achieved using hook_civicrm_post however, I was hoping there was a more straightforward way that I was overlooking so that if in the future one of my users needs to add a new relationship custom field they don't need to update code in an extension

You might have already checked field like "Current Employer" that creates new organization and relationship. Post hook is the most straight-forward and correct way to proceed here.

You could give a common prefix kind of name to your custom field and write your code in such a way that it performs the action only when custom field has that prefix in the title/name. This way, you won't need to modify the extension every time a new custom field is added.


Change of custom field type to bigint I have a custom group where one of its custom fields is of type varchar(64). This field is storing huge numbers only (something that I did not know during development) so I want to convert it into a int type, a bigint type due to the really lengthy numbers it's storing
My question is the following:
Assuming that the length is the same in all stored entries (around 2,5 million entries, 12 or 16 digit length), can I convert it into another type simply by ALTER TABLE or I need to inform Civi that this is an int/bigint field? Lastly, since I haven't seen the use of Bigint, is it safe to assume that it won't cause havoc in Civi's functionality if I do so?

Thanks!

You have all the control of your custom table but always it is not advised to change custom field type in the database

Better way of doing this would be

In DB - Create a temp table of the same and move all the records to the temp table first

In the front end - delete the column with varchar and create a new one with int with the same name

In DB - move all the value from temp table to the custom field

I guess this helps !!!


Is there an extension to limit activity types to contact types? We have a custom activity type that should only be added to contacts of a specific contact subtype (ie activity targets must be of given contact subtype)

Is there an extension to enforce this?

You might be interested in this:
CiviCRM: Hide Activity Types (com.joinery.hideactivitytypes)

Hide activity types in one or more ways:

Remove the activity type from the "Actions" list on the Activity Summary.
On a per-contact-type basis: activity type will be removed from the "New Activity" list under a contact's Activities tab, based on the contact's Type or Sub-Type.

Note, however, it only does what's stated above. It won't prevent creating activities in some other way, e.g., via api, or the New Activiy form. (But if  features for more aggressive limitation are desired, I think it would be a good fit to add them.)


Enable location "Name" in CiviEvent location configuration? Is there a way to enter a location name above the address fields in CiviEvent location settings?

When configuring an event:

It would be nice to be able to place the name just above the address like this:

"Conference Center Name"
Street address 1
City, State, ZIP

Anybody know how to do this?

If you enable the Address Name field globally, it will become available on the Event Location screen.

From Administer CiviCRM → Localization → Address Settings (or browse directly to /civicrm/admin/setting/preferences/address ), check the box for Address Name under the Address Editing section.


Not adding longitude or latitude Pulling my hair out a little! I'm trying to set up the mapping feature on CiviCRM. I've got a google API for the geocoding, I've enabled longitude/latitude/parsing in the localisation section, and I've got the geocoding scheduled task set to: geocode=1, and I've executed the task. I'm not getting any longitudes or latitudes in any of my contacts (it works if I add them manually). What am I missing? And does it matter all our contacts are based in the UK?

Cheers.

I worked it out! Many of my contacts weren't given a country (must have been forgotten in a profile). I checked what the difference was between the handful that were working and the lots which weren't and spotted the missing country - as soon asI updated the contacts that were missing a country it started finding the longitude and latitude. Thanks for the help!


How can I submit WordPress forms to a REST URL? I've been directed here to ask this question, I've been asked if WordPress contact forms/forms can post to a REST URL rather than to the WordPress database. Now I'm not really familiar with CiviCRM tbh but we were wondering if there were any plugins that could achieve this? Any advice please.

You can use Contact Form 7 and the Contact Form 7 CiviCRM plugins for wordpress to POST your forms directly to CiviCRM's REST API. There is a blog post by Erik Hommel on CiviCRM.org that explains how this works.


Civi Event Participant Status ID I'm trying to create a simple spreadsheet to import event participants, and need to add the Participant Status codes to import.

Is there a list anywhere or which codes correspond to which statuses?

E.g. which code number for "Registered", "Attended", "On waitlist", "Cancelled", etc?

I'm sure this info must exist but I can't find it in the documentation...

An easy way to know it is goin to Admin -> CiviEvent -> Participant Status

You will see all the Participant Status. Put the mouse over the "Edit" but dont click it. And you will see the url you will be redirected if you click it. This utl is like: "http://dmaster.demo.civicrm.org/civicrm/admin/participant_status?action=update&id=2&reset=1"

The id you are looking for is the id variable, which in the case I show you above is 2. (id=2)

I hope this is what you need!

EDIT: No need for the link. Just int the page of Participant Status you can see it in the column:  "Name (Status ID)"


Is there an easy way to have the summary fields for deductible contributions be based on calendar year? I went to generate letters to our contributors telling them how much they donated in 2015 that was deductible for their taxes.  I discovered that total deductible contributions for last year is based upon our FY which is Jul - Jun.

Clearly, that number is worthless to most individuals since most people base their taxes on calendar year.

So is there an easy way to get it to be based upon CY?

As I write this and think about it, I guess the best answer would be to include another summary field for just that or maybe for this year, last year and year before.  Most of year we really don't care about contributions by CY, just for the tax reporting thing.

There are, of course, a couple of other ways, tokens for example, to get the number.  The nice thing about the summary fields is the ability to use them in searches so we can say only get the people who donated more than a certain amount and to only get people who made tax deductible donations.  (Too bad the search form doesn't have a deductible checkbox.  One has to wade through all their financial types and pick the ones that are.)

Pretty sure this is now available either in Summary Fields itself or via https://civicrm.org/extensions/joinerys-more-summary-fields


Simple, consistent N. Am. phone validation/reformatting everywhere? If we want to put in some validation and reformatting for phone numbers to make sure they conform to N. Am. standard for 10 digit numbers, is there a simple way to catch this for everywhere a phone number is entered or edited (including edit in place), rather than having to search and deal with each form separately?

There's an extension that does precisely this: https://github.com/cividesk/com.cividesk.normalize

It used to be in the extensions directory, but it's gone now for some reason.  It uses libphonenumber, and it formats international numbers appropriately based upon the country in the address.


Change Drupal username when auto creating using tags I'm using Pete's great way of creating Drupal users by adding a tag, but was wondering (as Michael McAndrew did in the comments on that page) how a different username could be auto-created, e.g. email address or even firstnamelastname. (Presumably the Rule would fail if a duplicate username occurred?)

And bonus question: on the same page Coleman mentioned potentially using Rules to remove the tag and clean up, but I can't work out which action this would be under. Any pointers?

There's an unreviewed patch to the CiviCRM Entity module that tackles this.

To clean up and remove a tag, you can easily set up CiviRules to just delete a tag as soon as it's created.


Importing contacts into Civicrm I am importing 350 contacts into Civi. This post says that you should always include an import identifier. I don't have admin access so I cannot create a custom field set. I was going to identify the contacts by tagging them all. Alternatively, Civi includes a contact source field. Could I include a value for contact source in the CSV file? I will also tag the imports.

These are all valid options!  I never use a custom field for this; I use tags or the contact source field.  The "external identifier" field is often useful for this - I'll tag contacts from a certain location with their ID from that source prefaced by an acronym for that source.
As someone who works daily with data migrations, I rarely need to do any of these things if I'm the one who might have to deal with mistakes.  Using advanced logging is good enough; if it's only 350 contacts, it's probably enough to just go by creation date.
That said, I highly recommend that people who don't do this regularly tag their contacts or use the Source field :)


Fiscal Year/Summary Field Issue I have set the fiscal year under administer->Localization->Date Formats. However, when looking at Summary Fields, it continues to calculate only calendar year contributions for the Total Contributions this Fiscal Year category. How do I correct?

Summary fields creates a collection of custom fields that it populates. It populates them when you first set the extension up, and then it also updates them as new contributions are stored.
I suspect that it doesn't recalculate all the fields when you update your fiscal year, you probably need to ask it explicitly to do that, eg. by resaving the configuration of the extension.


Has anyone used Emojis in CiviMail subject/body? I am curious if anyone has used Emojis in CiviMail content. I just tried a test mailing with an Emoji in the subject and message body, which show up fine in the editor but do not appear in the test message in my inbox.

@laryn the short answer is that for this to work your database needs to be changed. CiviCRM by standard sets things to be utf8_unicode_ci. You will need to convert database to utf8mb4_unicode_ci to allow for Emojis and you would need to change the setNames call in CiviCRM to be utf8mb4 as per https://stackoverflow.com/questions/7814293/how-to-insert-utf-8-mb4-characteremoji-in-ios5-in-mysql


How to Manage View Title according to Contextual Filters I want to use one common View to list Donations to each different organization (I have a lot), manageing each different View instance via contextual filters.

e.g. mysite/myView/9/2017, where :

9 = Contribution Page ID (which is organization specific)
2017 = Contribution Year

This works fine for filtering, but, beyond this, I would like the page Title to contain the Contribution Page Name.

I can, of course have a Title in the form of "Contributions 9" (using %1 to override the Title), but "9" does not speak a lot.

I have tried a solution, consisting in specifying the Contribution Page Name as a 3rd Contextual Filter and overriding the Page Title with this %3 filter : when I do that, the following URL mysite/myView/9/2017/"my Contribution Page" provides me with the correct title, but then, the View displays no result.

Am I missing sth ? Any help is welcome.

I can't quite make out all your requirements from your description - but I do have an example that (possibly) comes close to this. I don't use contextual filters though - I use Exposed Filters to identify which of 150 Contribution pages - specific Donations belong to:

Note that the URL in this case is:
/donations-via-group-contribution-pages?financial_type=All&contribution_page=43

So you could pass in that URL (or for any other contribution_page_id) -> and then have a screen for a sub-organization;

Thus far I've only used contextual filters for Drupal Commerce Views -> with a Contextual filter for Drupal userid -> so that we can then have permissions to only show Orders that belong to a specific user;


Why are commits to 7.x-master not included in latest versions of CiviCRM? I had two pull requests committed to 7.x-master on GitHub over the past year.

When I view the two files that were changed by my pull requests, the changes are present in the master branch.

They do not appear to be included in latest download and I end up having to manually add them.

I was under the assumption that commits to master would be included in future releases.  Is that not the case?

While Github is used for the code collaboration, co-ordination of which issues are fixed in which release is done on over CiviCRM's JIRA install.

In order to better ensure your PR was included in the next 4.6.x, you could open an issue there and tag with appropriate versions (eg 4.6.10 for fix version), then reference the JIRA ticket in the Github PR.


Civimail Urls don't load and show Could not load the settings file at: We have setup CiviCRM to run as part of an installation profile. So instead of the default sites/all/modules folder, CiviCRM is installed in profiles/ourprofile/modules/contrib/civicrm.

CiviCRM works perfectly and so we have had no issues. However, when testing an email campaign I keep getting this error message

  Could not load the settings file at: (followed) by a path to civicrm.settings.php file.

Nothing loads and the links don't work. I read a few comments on Github that there is a similar issue for multisite on CiviCRM. However, this is a single site and I am not sure what do next as there is not much information on how this can be fixed.

I know the easiest solution is to move CiviCRM to the sites/all/modules folder. However, this will make it harder for us to maintain versions for CiviCRM as part of our profile.

Any advice is appreciated. Thanks.

You'll see from civicrm_conf_init() that CiviCRM assumes the site's settings.php and civicrm.settings.php have a specific (relative) location to the CiviCRM codebase. When CiviCRM is installed in a profiles folder, this isn't the case, so config discovery fails.

I believe this could be addressed fairly easily (eg via available Drupal functions like conf_path() for the config directory and drupal_get_path() for the module path), and it would probably make CiviCRM a better "Drupal" citizen if that was the case.

AFAIK the reason CiviCRM doesn't use functions provided by the host CMS when initialising site config is just to handle a few remaining locations where CiviCRM scripts are called directly, without being initialised via the CMS itself.

These are scripts like extern/ipn.php (for which civicrm/payment/ipn/%processor_id would be preferable: CRM-9779), and other files in that extern directory.

While a patch to support locating CiviCRM in the profiles directory alone could be contributed, I'd encourage working towards eliminating remaining scripts in those deprecated locations. Then CiviCRM doesn't have to duplicate the logic of each CMS's config discovery (amongst other benefits), and it'll "play nicer" in that CMS ecosystem.

Some background:

Forum: Remove CiviCRM entry points except via CMS frontend
CRM-11212: Drupal does not bootstrap from extern/rest.php
CRM-9779: Common payment notification framework for payment processor extensions


Anyone else seeing an overlapping admin/civi menu bug with Joomla 3.8.13 and CiviCRM 5.6.0? After an upgrade to Joomla 3.8.13 and Civi 5.6.0 the Joomla admin menu dropdown is stacking under the Civi menu. I can't reproduce on https://joomla.demo.civicrm.org as even if the versions weren't 3812 and 560, the Joomla admin menu isn't long enough.

There was a commit that fixed css for shoreditch theme probably that might have caused the regression in Joomla. Can you try to replace the code from the commit and see if it works? If so I can file a issue and submit the patch for regression.


Error Upgrading DB to 4.7.18: SQL [Error: Upgrade DB to 4.7.18: SQL]
 [nativecode=1062 ** Duplicate entry 'Chandigarh-1101' for key 'UI_name_country_id']

How can I fix the error as given below:

INSERT INTO `civicrm_state_province` (`id`, `country_id`, `abbreviation`, `name`) VALUES (NULL, 1101, "CH", "Chandigarh"), (NULL, 1083, "CP", "Central"), (NULL, 1083, "EP", "Eastern"), (NULL, 1083, "NP", "Northern"), (NULL, 1083, "WP", "Western"), (NULL, 1181, "K", "Saint Kitts"), (NULL, 1181, "N", "Nevis"), (NULL, 1190, "E", "Eastern"), (NULL, 1190, "N", "Northern"), (NULL, 1190, "S", "Southern") [nativecode=1062 ** Duplicate entry 'Chandigarh-1101' for key 'UI_name_country_id']
DebugInfo   INSERT INTO `civicrm_state_province` (`id`, `country_id`, `abbreviation`, `name`) VALUES (NULL, 1101, "CH", "Chandigarh"), (NULL, 1083, "CP", "Central"), (NULL, 1083, "EP", "Eastern"), (NULL, 1083, "NP", "Northern"), (NULL, 1083, "WP", "Western"), (NULL, 1181, "K", "Saint Kitts"), (NULL, 1181, "N", "Nevis"), (NULL, 1190, "E", "Eastern"), (NULL, 1190, "N", "Northern"), (NULL, 1190, "S", "Southern") [nativecode=1062 ** Duplicate entry 'Chandigarh-1101' for key 'UI_name_country_id']

The upgrade for 4.7.18 tries to insert new state in civicrm_state_province table. This was done via https://issues.civicrm.org/jira/browse/CRM-19993.

But seems you already have Chandigarh in the table due to which mysql finds a duplicate row already present in the database and eventually displays an error. So the question is how this record is already present in your database?

Have you tried this upgrade for 4.7.18 before and retrying this again? If yes, try getting a backup of the previous version and then start the upgrade process.
Have you added the new state Chandigarh in your DB manually in your previous version?
In this case, you can simply delete the Chandigarh entry manually from civicrm_state_province table and restart the upgrade. It will create the entry for Chandigarh so you'll not lose any state record from your DB.


test send mail, wrong test email account I want to test the outgoing mail settings, but CiviCRM sends the test mail to one of the contacts in the database (last name Adams).
Why does it associate this person with my account? How can I change that?

ps:  I do have a contact in CiviCRM with the same email as my WordPress account.  I also tried creating a test contact that was called AAAtest.

Temporary Solution:  This isn't really a solution, but I created a new WordPress account using my personal email address.  I had a test contact in CiviCRM that used this email address, and they are now associated with each other.

Thanks

Seamus' comment has the correct answer.

CiviCRM links each WordPress login with a corresponding contact.  Your WordPress login is tied to the wrong contact - maybe a messed-up import, an incorrect merge, it's hard to say!

This is going to lead to multiple problems, including the one you're seeing, and you need to fix this ASAP.  If you or someone you know is comfortable with SQL, then changing civicrm_uf_match to match your WordPress ID with the correct CiviCRM contact is the best solution.

If not, you can use the API Explorer to change it - but make sure you have a backup of your database before trying, the API Explorer is powerful enough to wreck things!

Go to Support menu > Developer > API Explorer.  "Support" menu might be called "Help" menu, it switched somewhere in 4.6.
Set "Entity" to "UFMatch", "Action" to "Get".  In "Parameters", Set "CiviCRM Contact ID" to Adams.
Press "Execute".
In the "Results" area below the "Execute" button, note the value of "id".  There are two "id" values - you want the one INSIDE the "values" stanza.
Keep "Entity" as "UFMatch", change "Action" to "Delete".  For "UFMatch ID", put in the ID you just found.  Press execute.

At this point, Adams should no longer be tied to your account!  Assuming your WordPress email address and CiviCRM email address match, CiviCRM should link the two on your next login.


Token for different content? I have created a template that I am going to send to a group of people. Depending on a certain value (in this case a custom field), I want to use a different picture.

Today I create four different templates.

Is there a way to "merge" content in a template based on another field value?

And is it a generic way of doing this, if I next time want to merge different sentences, based on the same field values I used for the pictures?

(I have looked at the extension Content Tokens, but this is slightly different)

I have had success in differentiating content based on the value of a custom field by enabling Smarty for message templates http://wiki.civicrm.org/confluence/display/CRMDOC46/Smarty+in+mail+templates


Change 'Used for' contact type of custom fields I have custom field group set as used for 'individual' but I want to change it to limit it to a contact subtype.  What is the best way to achieve this - I could create a new field group and copy data over - but there are several hundred contacts to do this for

Jonathan, Welcome to CiviCRM stackexchange.

Sometimes its not possible to change custom group's used for since the CiviCRM creates a separate table for this with a Foreign key. However its possible to update if the 'Used for' share the same table.

In your case you want to make it visible for Individual subtype then its possible through UI by editing the custom group and then selecting the contact sub-type from the dropdown list.


How to create a drupal 'contact me' link where the user is a contact reference field of Contact B in a civi relationship I have an organisation with members across many institutions around Australia and each institution will have one of those members as a contact for that institution.

On each institution's landing page on my site, I want to display a 'contact me' link for the designated contact person for that institution.

The data for both the institution and individual are held in CiviCRM, although the individual contacts are users in Drupal as well.

The way I have structured the data is to have the institution contact person be a custom contact reference field in CiviCRM that is attached to the Organisation contact type.

On my institution landing pages, created with a Drupal view, I can display the organisation data from Civi, including the institution contact person, and, using a CiviCRM relationship (B to A), list the members who are at that institution.

However, what I cannot figure out is how to link the institution contact person to their Drupal ID, so as to be able to rewrite the output of that field and link their name to a Drupal contact form.

I can link the list of members to Drupal ID's because they are Contact A of the CiviCRM relationship, but the institution contact person (who is also in the list of members, of course) is a field of Contact B, which does not have a Drupal ID.

[EDIT] A more concise way to describe the problem.  I have a view based on the relationship between an organisation and its members.  One field of the organisation is a contact reference.

I want to:

Display fields from the organisation
Display a list of members of the organisation
Link the contact reference field of the organisation to its Drupal user

I have managed 1. and 2.

I presume that the question related to 3. above is how do I access the full contact record (including Drupal ID) of the contact in the contact reference field when the view is based on a different CiviCRM contact, namely the organisation?[\EDIT]

Questions:

Is there a way to solve Point 3 above with relationships and filters in views the way I have the data structured, and, if so, how?
Is there a better way to structure the data, and, if so, how?  For example, would it be better to create a CiviCRM relationship to define the contact person, e.g. "Contact person for"/"Our contact person", and then try to set up multiple relationships with the institution in Views to get the links right?

If 2, then some advice as to how to proceed with relationships would also be appreciated.

Thanks,
Lewis

There may be a reason you want this as a 'drupal contact me' link but if you have the contact ID for the person you are wanting to be contactable in your View, then you should be able to provide a link to a webform with that cid1=x and therefore load that persons details in to the webform and use that as your 'contact me' option.

But to try and answer the other question, I would expect you to be able to add a 'drupal user' relationship to your existing relationships in the view, and set it to use the existing relationship that relates to the contact person


How can I customize the page coming after an event registration? we're having an event coming up and I've succeeded in setting up the event registration page in civicrm running on wordpress. I've already customized the registration confirmation e-mail, however, when it comes to the page that one is led to after finalizing the registration process, I have no idea how to customize it. Unfortunately, it contains multiple aspects I'd like to change.

Any ideas?

Thanks a lot in advance and best regards!

In the Event Configuration > Online Registration you can edit three locations on the confirmation page--the Title, Intro, and Footer. You can add text or html in the "Thank You Screen" boxes and it will be displayed on the confirmation page.

If you need to edit more than this, see the above answer and comments.


How do mixed AND and OR in CiviRules Conditions work? When adding a Condition to a CiviRule one can specify whether it is Adned or ORed with the previous one.  If you enter a mixed sequence of AND and OR, what is the algorithm for combining them, since there is no bracketing available.  Are they applied one at a time to the previously calculated answer, or what?

Thank you, Tony

They do not. You can only use a combination of AND or a combination of OR, you can not mix them.

If you want a complicated condition you might contemplate building you own condition, documentation on how to can be found here: https://docs.civicrm.org/civirules/en/latest/create-your-own-condition/


Is there a previewer for workflow message templates? After some amount of playing, I've finally started to get the hang of editing message workflow templates (Administer CiviCRM, Communications, Message Templates, System Workflow Messages) to include organization specific messages or additional tokens (e.g. contact id). Trouble is, as near as I can tell, there's no previewer for the changes you make (e.g. wysiwyg editing). This makes it difficult to see what changes you've made because the only way to see your changes, seems to be by going through the workflow process. For example, to see if my offline events registration confirmation shows my changes in the right place, I need to create an event, fill in every required field, register someone, and so on. Over and over until things look right in the emailed confirmation.

And so, is there another way to just preview the changes without jumping through all those additional hoops?

-- Marcel

Even though the tokens won't work, have you tried just copying the code into a separate code editor and saving it as a .html file so you can see what it looks like that way, by loading it into a browser? Then all you have to do is edit the code in the editor, keep refreshing the screen and when you like the way it looks, post it back into the CiviCRM template.


Contact mail action fails Drupal 7, CiviCRM 4.6.25/4.7.15

When I try to send an email to an individual contact using the 'send mail' action, the triangle spins and nothing happens. Affects our production and test site.

mail() configuration check out fine, and mailings 'send test' works. Haven't extensively checked this as we haven't gone live with the site.

The log/backtrace points to /civicrm/CRM/Utils/Token.php, line 1190:

     if (empty($contactIDs)) {
      // putting a fatal here so we can track if/when this happens
      CRM_Core_Error::fatal();

I've blown out our test database and re-initialized it with sample data -- no fix.

I've also upgraded our test site to 4.7.15 and am getting the same problem, stemming from the token.php function

Stranger still, if we use the 'send now (to less than 50 people)' selection from the contact search page, email works, just not from the contact record directly.

Works:

civicrm/contact/search?_qf_Email_display=true&qfKey=2b01f498b92b4b919c45446ae38d6c5d_3790

Doesn't:

civicrm/activity/email/add?action=add&reset=1&cid=202&selectedChild=activity&atype=3

I notice that the first line of your backTrace is line 1190 in the Token.php file, which is this:

   if (empty($contactIDs)) {
      // putting a fatal here so we can track if/when this happens
      CRM_Core_Error::fatal();
    }

Judging from the fact that it appears to happen when you are the only recipient, I'd guess that it's because of something funny about your own contact record. For example - perhaps your contact record (i.e. the one that is connected to your login) is deleted?


Problem with membership contribution page In civimember, I'm setting up a contribution page. The help for the "display membership fee" field says:
"If the page 'Separate Membership Payment' is NOT enabled AND the Contribution Amount is enabled so that user's can opt to give more than the minimum membership fee - then the display looks like this:

General Membership (contribute at least $100.00 to be eligible for this membership)"

When I try this I only get the minimum membership fee with an additional form for people to list an amount. What am I missing? I'd like to have the (contribute at least... line with a form where the person can list the total they'd like to pledge rather than adding the amount to the minimum membership fee.

I was about to suggest the following but found that a Price Field for memberships that is set to Text / Numeric Quantity doesn't allow one to set the Membership type - odd - am digging further but will leave the recipe here for now

Turn off Contribution Amount on the Amounts tab.

Create a Price Set set up for Membership and with Min Amount set to $100, make a Price Field of type Text / Numeric Quantity with 1.00 as the unit.

Turn off Display Amount.

On the membership tab of the Contribution Page select Price Set created above

You should then have a field where you can enter an amount and if it is not above the minimum required will get an outcome like this.


How can I set custom field date field for default date to be today's date? The threads I have seen are from 2009...

Is there a solution for this in 2018?

Something that would dynamically set current date as default?

I am not sure if this is possible through UI configuration. The form only allows you to enter valid date but not now(), CURRENT_DATE() etc. However it is definitely possible by adding a small code in a extension.

Create and enable a new CiviCRM extension
Implement the hook_civicrm_buildForm in your extension

For the appropriate variable do:

function ext_civicrm_buildForm($formName, &$form) {
  if ($formName == 'REPLACE_WITH_FORMNAME') {
    $defaultDate = [];
    CRM_Utils_Date::getAllDefaultValues($defaultDate);
    $defaults['custom_XXX'] = $defaultDate;
    $form->setDefaults($defaults);
  }
}


Where has a custom field been used? Drupal 7.65
CiviCRM 5.10.4

Hi everyone,

Bit of a strange question here but I'll explain the context and hopefully there's a solution!

So we have a custom field that asks for people's consent to become a member. We use it specifically on the profile that people fill in to express their interest in being a volunteer. The field is a Yes/No field, with no default answer. We don't use CiviVolunteer or CiviMember. We don't collect membership dues so just have a Group set up for our members, rather than using CiviMember.

When I set that field up I was new to CiviCRM and didn't know about CiviRules and how I could automatically add people to our members group based on them ticking that box.

Now I'm just setting up that CiviRule but realised I haven't done anything with the people who have previously ticked 'yes' on that field, so I did an advanced search of people who have a 'Yes' in that field, and it gave me a lot more users that I was expecting.

Before I add all these people into the members group, I want to double-check whether this field has been accidentally added to any other profiles and set to have a default 'yes' answer. Is there a way I can check where a specific field has been used? I just want to make sure that I don't accidentally add people who haven't specifically said 'yes' to membership, since there won't be a way to remove them and while that membership boost would be amazing, it just seems too high for what we've done in the last few months we've had Civi!

Let me know if you have any questions - hopefully this is clear enough.

I can think of a way, but you need to know how to run SQL on your CiviCRM database.

Find out the ID number of the custom field.
Run the following SQL.  Change the "7" in custom_7 to the ID number of the custom field:

SELECT cug.id, cug.title
FROM civicrm_uf_field cuf
JOIN civicrm_uf_group cug ON cuf.uf_group_id = cug.id
WHERE field_name = 'custom_7';

It will give you back the title of any profiles that use the field.

Of course, if you're using Webform-CiviCRM or Caldera Forms-CiviCRM integration, this won't catch those!


Pay Later status on imported contributions I am trying to do a bulk import of transactions that are all being invoiced now. By indicating the Contribution Status as "Pending," the transactions all import as "Pending (Incomplete Transaction)" Is there any way to get them to import as "Pending (Pay Later)"? I've tried several different variations of the text in the Contribution Status column, but all seem to fail.

The contribution status text Pending seems to be right in your csv.

Pending(Pay later) status is displayed based on the is_pay_later value in civicrm_contribution table. So it seems you need to add another column in CSV with value 1 and map it to the field Is Pay Later on the Match Fields screen. See below Screenshot.


Drupal Core Search to show results from CiviCRM Events data along with drupal content results I'm looking for a solution to extend Drupal Core Search functionality to fetch results from Civicrm Events.

Did anyone tried or achieved this? Is there any module to achieve this? any configurations? or any pointers please?

Does CiviCRM Entity module helps to achieve this?

I want drupal to search CiviCRM events along with entire drupal site when someone search for event related content

TIA

Good Question! I have three different ideas for answers to this questions, but I'll lump them all here.

First off, we've used Search API module with CiviCRM Entity with success a number of times. If you have an option to use Search API, because it is easier to setup search indexes without code. You might check out that module to create a more powerful site search.

2nd option, register your own search index. It will be a coded solution, there is no module I am aware of to do what is necessary.This could get to be a complex answer, so first I'll say you will have to making a custom module, if you aren't comfortable with that, then likely best course is to use Search API..

You must have the code from the "CMS Database Integration" CiviCRM page added to your settings.php , civicrm/admin/setting/uf?reset=1

See the Drupal API documentation for hook_search_info()

You'll need to implement that hook to register a search page for the CiviCRM Event entity type...see in the description of the hook_search_info() documentation, at a minimum hook_search_execute() and hook_update_index() . They given a pretty good example of how nodes are integrated into Drupal Core search, and the same methodology can be applied for CiviCRM Events or other entity types. The CiviCRM Entity module would be a requirement to use the same methodology.

3rd option. If you have event related content types, you could add a entity reference field that reference the CiviCRM Events. In that case you might only need some little bit of code, that could modify the search for those event related nodes, to index the referenced event data along with the node that references the event. See hook_node_update_index() . In the example provided, they are adding some information about a node's comments to the node's indexed text...a similar procedure could be used to add data from the referenced event. CiviCRM Entity would again be required, as this is how you can reference CiviCRM events from node types..

Let's start there and see where it goes. Sounds like a fun project!