Questions About Mailer Settings - Suggested G Suite settings? I have CiviCRM send scheduled mailings once every 15 minutes. Because our list is under 800 contacts - we have decided to use our GSuite account for CiviMail.  The settings are all correct - but the mailer settings are confusing me.

Mailer Batch Limit: If I set this to 250 - Everytime the cron is run - up to 250 emails should be sent until entire mailing list is emailed - correct?

Mailer Throttle Time: If I set this to 10,000,000 - an email will be sent every 10 seconds correct?  That also means the mailer will be working until all the emails are sent.

Mailer Job Size: I have no clue what this means but since our list is under 1000 - I take it it does not apply to us.

Mailer Cron Job Limit: This I actually understand - but if I have it set to 2 jobs, and a third job is scheduled to run while the other two are running, will it just queue that third job until one of the other jobs ends?

Also - Is there any reason why I shouldn't use GSuite as my CiviMail provider?

Mailer Batch Limit: If I set this to 250 - Everytime the cron is run - up to 250 emails should be sent until entire mailing list is emailed - correct?

Yes

  Mailer Throttle Time: If I set this to 10,000,000 - an email will be sent every 10 seconds correct? That also means the mailer will be working until all the emails are sent.

No. It will carry on sending until the Mailer Batch limit is reached, or if no Mailer Batch limit is set, all emails have been delivered.

  Mailer Job Size: I have no clue what this means but since our list is under 1000 - I take it it does not apply to us.

This allows you to split the mail into smaller chunks that can be run in parallel.

  Mailer Cron Job Limit: If I have it set to 2 jobs, and a third job is scheduled to run while the other two are running, will it just queue that third job until one of the other jobs ends?

Yes, though that isn't really the point in this setting. You commonly see it used in conjunction with MailerJob size. Lets say you have a mailing that is to be sent to 100,000 addresses. You could split it into 100 Jobs of 1,000 and run 2 or more jobs in parallel if you like. Depending on what the limiting factor is, this may increase the rate at which you can send out mail. Which may or may not be a good thing for you :)

  Also - Is there any reason why I shouldn't use GSuite as my CiviMail provider?

Given the volume of email you mentioned, I am guessing you will be ok. There is nothing in the terms or service that would suggest you shouldn't be using it for your use case: https://support.google.com/a/answer/2956491?hl=en. As long as it can pass back bounce messages to CiviCRM (important if you do not want to be labelled as a spammer) you will probably be fine. Worth trying it out and reporting back at least.


Delivery mail status - unknown Is the delivery mail status 'unknown' a case of Civi not having sent the mail out at all and is still effectively in the queue to send?

Having lots of problems sending bulk mailing e.g. where only 30 out of 78 emails are successful and the rest set to unknown (as opposed to legitimate bounces)

Please check this related question Unknown mailing status on few mailings recipients to check if it fits to your case.

What version of civicrm do you use?


How to Add Image Field in CIVICRM I am trying to add an Image as Custom field in Civicrm Contact, but the Image Field type is not in the Custom Field section. It has only Field type as File.

How to apply Drupal Image styles for Images uploaded on Civicrm Contact.

I have integrated Civicrm in Drupal 7.

Yes, there's no custom field type specifically for images. You can of course put an image in a file field type. Interestingly, the image field that is available for organizations is technically there for all contact types, just not enabled for individuals, so I'd guess it wouldn't be hard to turn it on.

To display images from CiviCRM in Drupal, I use views and the external image cache module here: https://www.drupal.org/project/imagecache_external

It's a useful technique from Chris Burgess, who describes how to use it here: https://forum.civicrm.org/index.php?topic=34929.0


CiviCRM in Wordpress I'm trying out CiviCRM and searching the internet I found you guys.

Using Wordpress and installed CiviCRM, but want it in Portuguese. I've read many doc's and found nothing. I have pt_BR.mo and SQL file, already put in appropriate places and nothing works.

They could give me a hand? Indicate a doc/manual, anything so that I can analyze the CiviCRM and put him in Portuguese.

thanks
kklo

Basically you need to :

Download the language files from SF (it seems you have already done this)
Unpack the language-tarball in wp-content/plugins/civicrm. it creates subdirectories civicrm/i10n and civicrm/l18n with several files
Login to CiviCRM and Go to Administer » Localization » Languages, Currency, Locations
Enable Portuguese as default language

Beleza, should be working!

More details can be found here:
https://wiki.civicrm.org/confluence/display/CRMDOC/i18n+Administrator's+Guide:+Using+CiviCRM+in+your+own+language


How do I use CiviCRM with LDAP? I tried to get the CiviCRM LDAP integration working.

I used the LDAPcivi 'extension' (GitHub). And got it running quite quickly. But when I tried to connect with Thunderbird I ran into trouble. This is what the server showed me.

bind dc=[domain name of civicrm site], dc=[tld]:[password]
searching 100
[ 'title',
  'sn',
  'surname',
  'mozillahomelocalityname',
  'cn',
  'commonname',
  'givenname',
  'mozillahomestate',
  'mail',
  'mozillaworkurl',
  'workurl',
  'labeleduri',
  'o',
  'company',
  'mozillahomestreet2',
  'mozillanickname',
  'xmozillanickname',
  'mobile',
  'cellphone',
  'carphone',
  'modifytimestamp',
  'nsaimid',
  'nscpaimscreenname',
  'telephonenumber',
  'birthyear',
  'c',
  'countryname',
  'mozillahomestreet',
  'postalcode',
  'zip',
  'mozillacustom1',
  'custom1',
  'mozillahomecountryname',
  'st',
  'region',
  'mozillacustom2',
  'custom2',
  'mozillahomeurl',
  'homeurl',
  'mozillaworkstreet2',
  'mozillasecondemail',
  'xmozillasecondemail',
  'facsimiletelephonenumber',
  'fax',
  'description',
  'notes',
  'mozillacustom3',
  'custom3',
  'homephone',
  'mozillausehtmlmail',
  'xmozillausehtmlmail',
  'birthday',
  'street',
  'streetaddress',
  'postofficebox',
  'mozillacustom4',
  'custom4',
  'l',
  'locality',
  'pager',
  'pagerphone',
  'ou',
  'department',
  'departmentnumber',
  'orgunit',
  'birthmonth',
  'mozillahomepostalcode',
  'objectclass' ]
query DN = dc=[domain name of civicrm site], dc=[tld] sub / And
(&(|(cn=*ldap*)(givenname=*ldap*)(sn=*ldap*)(mozillanickname=*ldap*)(mail=*ldap*)(mozillasecondemail=*ldap*)(&(description=*ldap*))(o=*ldap*)(ou=*ldap*)(title=*ldap*)(mozillaworkurl=*ldap*)(mozillahomeurl=*ldap*)))-> searching And for ldap
searching ldap
civicrm_contact_search failed: couldn't parse {"is_error":0,"undefined_fields":["contact_is_deleted","cms","contact_type","sort_name"],"version":3,"count":1,"id":5,"values":[{"contact_id":"5","sort_name":"API, LDAP","display_name":"LDAP API","contact_type":"Individual","first_name":"LDAP","last_name":"API","job_title":"","organization_name":"","contact_is_deleted":"0","current_employer":"","address_id":"","street_address":"","supplemental_address_1":"","city":"","postal_code":"","state_province_id":"","country_id":"","phone_id":"","phone_type_id":"","phone":"","email_id":"","email":"","state_province_name":"","state_province":"","country":"","id":"5"}]}
civicrm_contact_search failed: unknown error

So. It actually manages to get a good search result. But somehow it isn't able to send it to Thunderbird. Maybe I'm missing out something obvious!

Hope someone else already got this LDAP thing running, and is able to help me out.

I also opened an issue on GitHub concerning this problem.

Maybe LDAPcivi is too old. I saw it was mentioned a bit more recently on this forum, so I hope that is still usable!

All the best,

For some reason, I didn't receive a notification on the ldap github repo, thanks to raise it here!

I answered on the issue in github, let's follow there?

I never tried civildap on wordpress, I don't know if it's why it has some issue. To exclude some potential sources of the problem, could you change your config file and put:

settings.civicrm.action = "get"


Is this a bug in civicrm/case/activity/view breadcrumb? Disable popups in display preferences.

Find a case eg     civicrm/case/search?reset=1.

'Manage' the case to open it.

Click on    the activity Subject, goes to eg    civicrm/case/activity/view?cid=203&aid=642

The 'Case Activity'    breadcrumb links to civicrm/case/activity?reset=1 which gives an error when you try to use it:

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.
required params missing.

Can reproduce this on http://dmaster.demo.civicrm.org

That was logged to gitlab & Coleman provided a fix which was merged - I think it missed the 5.3 rc so will be in 5.4


ezcMailParser not able to retrieve bcc from a mail Trying to process inbound mails that are bcc'd to abc@domain.com (Office 365).

Pasting the code we have at https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L128-L138

$parser = new ezcMailParser();
//set property text attachment as file CRM-5408
$parser->options->parseTextAttachmentsAsFiles = TRUE;
foreach ($set->getMessageNumbers() as $nr) {
  if ($this->_debug) {
    print "retrieving message $nr\n";
  }
  $single = $parser->parseMail($this->_transport->fetchByMessageNr($nr));
  $mails[$nr] = $single[0];
}

When a mail is bcc'd from a Gmail account to abc@domain.com and Process Inbound Email job is executed, $mails correctly contain the email address in the bcc header.

But, when it is sent from an outlook account or Apple Mail, there is no bcc or any header that contains an information that our mail was bcc'd to abc@domain.com.

Does our email parser strips bcc information if the input is from a server other than Gmail?

Update -

If mail is sent from Gmail, headers look like - https://gist.github.com/jitendrapurohit/fa6a115c18b8bcfbb8346f58cd1265c0

From Outlook - https://gist.github.com/jitendrapurohit/176eee759cfc9b3688682ea99b6c3460

In my experience, reading the Bcc field is not a reliable source of information, because there is not always available data. Thanks to your question I checked the RFC in response to your question and learned why!

What's happening

See https://tools.ietf.org/html/rfc2822#page-22

  The "Bcc:" field (where the "Bcc" means "Blind Carbon Copy") contains    addresses of recipients of the message whose addresses are not to be    revealed to other recipients of the message.  There are three ways in    which the "Bcc:" field is used.

  In the first case, when a message    containing a "Bcc:" field is prepared to be sent, the "Bcc:" line is    removed even though all of the recipients (including those specified    in the "Bcc:" field) are sent a copy of the message.

When sender and recipient are on different servers, this is the behaviour you'll observe. (Outlook.com => Gmail.com result)

  In the second    case, recipients specified in the "To:" and "Cc:" lines each are sent    a copy of the message with the "Bcc:" line removed as above, but the    recipients on the "Bcc:" line get a separate copy of the message    containing a "Bcc:" line.

  (When there are multiple recipient    addresses in the "Bcc:" field, some implementations actually send a    separate copy of the message to each recipient with a "Bcc:"    containing only the address of that particular recipient.)

When sender and recipient are on Outlook.com, this is the behaviour you observe. (Outlook.com => Outlook.com result)

  Finally,    since a "Bcc:" field may contain no addresses, a "Bcc:" field can be    sent without any addresses indicating to the recipients that blind    copies were sent to someone.

So - it's not a difference in Outlook vs GMail behaviour, so much as a difference in how MTAs handle internal and external deliveries. I still would not expect to see other Bcc recipients appear though.

See also this similar question/answer.

How to handle this

My take is: if you're parsing an email and the receiving address is not in To or Cc, it’s a fair bet that it was either Bcc'd or the receiving address is the final recipient of an email alias.

Beyond that, don’t expect to know who’s in the Bcc field - that’s what it’s for.


Is it possible to prevent a certain role from changing the activity status in a case activity? The use case is that every user should see their cases and their activities, but only certain users (based on their Drupal roles and permissions) should be able to change the status of some activities. The build up of the activities in the case summary form/page is not done in advance and does not show up in the buildForm hook. It is a jQuery datatable with a source url that is linked to CRM_Case_BAO_Case::getCaseActivity. What I have done is create a page in my extension and replace the sourceURL in the datatable with one in my extension, and in the callback replace the core method CRM_Case_BAO_Case::getCaseActivity with my own specific one. Any suggestion for another / better method?

Perhaps enhance core to provide a 'CiviCRM: edit activities' permission. I don't think it would be that difficult. We're currently adding permissions based on financial types of objects in contributions (like line items, premiums, etc) and it isn't that bad. With an edit permission you don't have to worry about reports, etc.


Charity wordpress template that works with CiviCRM I want to move our website from Drupal/CiviCRM to Wordpress/CiviCRM but understand that not all wordpress template will work with CiviCRM. Does anyone have a recommendation on the best charity wordpress template to use? We are a very small NFP and don't have money to spend on development.

Thank you!

The default Wordpress theme seems to work fine and that is free. Unless you have any specific requirements, I'd stick with that.


My cronjob fails to run my Civimail queue. What am I missing here? This invocation now returns a result code of 0.
And still I see no evidence that it ran my civimail,
in the browser UI, at /civicrm/mailing/browse/unscheduled,
nor in the logs at /civicrm/admin/joblog, nor in my inbox.

I've been struggling with this issue for a moment now.
Sorting through these issues, to get to this point is documented here:
CiviMail cron job unable to find: civicrm.config.php, built with: roundearth/drupal-civicrm-project

/usr/bin/nice -n19 /usr/bin/php \
    -d require /opt/local/my_client/drupal/vendor/autoload.php \
    /opt/local/my_client/drupal/vendor/civicrm/cv/bin/cv api job.execute \
    --cwd=/opt/local/my_client/drupal --user=mailprocess

My script now reads:

#!/bin/bash
set -x

CMD=$1
CWD='/opt/local/my_client/drupal'
CV="${CWD}/vendor/civicrm/cv/bin/cv"
CIVIMAIL_USER='mailprocess'
requirements="-d require ${CWD}/vendor/autoload.php"
PHP="/usr/bin/nice -n19 /usr/bin/php"
ARGS="--cwd=${CWD} --user=${CIVIMAIL_USER}"

cd ${CWD}; ${PHP} ${requirements} ${CV} api job.execute ${ARGS}
exit "$?"

Your script is nicely designed for running the civi cron using "cv", quietly in the background. But you want to run it w/ noise so you can debug it.

To start, try running it manually without the last line and see if you get anything. The main script here is "cv" (run as a php script) and the other bits are making sure cv runs with the right arguments. If it's quitting silently, try something simpler, like seeing if you can actually run php and then if you can run cv via php with a simpler argument like "vars:show".

Documentation of cv is here: https://github.com/civicrm/cv


"Deceased" flag set to "no" by default in standard reports Why is the "Deceased" flag set to "no" by default in standard reports ? This causes waste of time in understanding why the search results are not full. All other flags are set to "any".
Is it possible to change this default value in the reports templates?
Thank you

You can save an instance of the report that has your preferred settings and then have it appear in the menu or on the dashboard.
https://docs.civicrm.org/user/en/latest/reporting/set-up/#define-report-settings
Briefly, set your settings, refresh the report, look at the Access tab for any additional settings like menu entry, and then choose Create Report from the actions dropdown.


Updating an option value with drush cvapi I'm suprised that it is so hard to update an option value in a certain group using our API.

I have been writing scripts as follows:

get option group id where option group name = X (save as OptionGroupIDX)
get option value id where option value name = Y and option group id = OptionGroupIDX =(save as OptionValueIDY)
update OptionValueIDY title to Z

I'd like to be able to write scripts that look more like:

update the option value X in option group Y to value Z

The real world shell script I'm using at the minute is as follows:

OPTION_GROUP_ID=`drush cvapi OptionGroup.getvalue return=id name=from_email_address`
OPTION_VALUE_ID=`drush cvapi OptionValue.getvalue return=id option_group_id=$OPTION_GROUP_ID`
drush cvapi OptionValue.create id=$OPTION_VALUE_ID label='"Fixed" <info@fixed.org>'

Anyone able to help me get it closer to a one liner? Would be awesome if so because patterns like this seem to come up a fair amount when I'm working with the API. Would chaining help here?

In Civi 4.6+, you can use pseudoconstants instead of IDs in many places - including for option_group_id.  Civi 4.7 expands the number of places you can use it.

So you can get this down to 2 lines by replacing the first two with:

OPTION_VALUE_ID=`drush cvapi OptionValue.getvalue return=id option_group_id=from_email_address`.

Here's the trick: If the API Explorer allows you to select the value from a select list, that means that pseudoconstant substitution is available on that field.

Unfortunately, I don't think you're going to get this down to one API call.  create requires an ID; you're just not going to get the ID without a get call.

EDIT: It MAY be possible to get this down to one line!  See "options.match" and "options.match-mandatory" on this page.


How can I create a report that shows contacts with no activities within a certain date range? I'm trying to create what my client calls a "Lag Report" that allows them to get a list of contacts with no activities related to them within a certain date range.

"Who are my contacts who we have not been in touch with in a month?"

I assume we'd want to start with a constituent detail report template, but there are no activity filters to add there.

Thanks!

In case you don't know of it, there is a Custom Search available under 'searches' for Include/Exclude Groups. So you could use that.

Step 1: create a Smart Group based on Activities within timeframe (A)

Step 2: create a smart group of 'all individuals' (B)

Step 3: use Include/Exclude Search to say B minus A


Report with Payment Processor I'm trying to get a report with the name of the Payment Processor that was used for each online Payment. I'm not able to get this to work. Been though the API trying to track the data but not that familiar where that is stored.

It looks like this data is shown on the Contribution view. "PayPal" on the image is the name of the Processor and other Contributions have the name of my other Payment processor. Any ideas?

I had the same problem, wanting to reconcile against the PayPal account.
I'm not sure why there isn't a Payment Method column in any of the reports.

I

Created a new 'Asset' type financial account under CiviContribute > Financial account. If you leave it as 'Revenue' type it does not appear under the payment processor form list
Changed the Financial Account under System Settings > Payment processors.
The bookkeeping report from extended reports (dmaster.demo.civicrm.org) has this column, but it cannot sort by transaction date as per How do I sort the bookkeeping report by date? so export and sort with the spreadsheet program.


How do I search Contact Source? I am getting people added to our database from Contact Source called Get Updates.  I don't know what that is.

Go to Search > Search Builder and do this:

I can't comment on if this is the best way to do this, or perhaps have them added to a Group called 'Get Updates' instead so it becomes a discrete search for all those records, but there you go.


How to clone webforms? They are various drupal modules that allow to clone a webform, but so far, all the ones I tried didn't play nicely with webform_civicrm and introduced weird problems.

Do you have one that you use and that works when your form is connected to civicrm?

I previously had problems with node_clone (you had to enable civicrm option in cloned node), but last few projects it seemed to work properly.

What are the weird problems?


Is there any way to make a normal textarea in civi editable using CKEditor? I am referring in particular to the textarea that allows one to write a custom confirmation email in the 'Online Registration' tab of an event's configuration page.

Following the CKEditor integration documentation here (http://docs.ckeditor.com/#!/guide/dev_installation-section-adding-ckeditor-to-your-page), I have added some JavaScript to the bottom of templates/CRM/Event/Form/ManageEvent/Registration.tpl to allow the CKEditor user interface to take over the textarea (where confirm_email_text is the name and id of the textarea in question):

CKEDITOR.replace( 'confirm_email_text' );

This appears to work, as the CKEditor interface appears where the textarea did previously. However, any content entered into this CKEditor textbox does not seem to be saved to the database.

The documentation for CK Editor 4 (the version in use on our version of CiviCRM) also says the following:

  When CKEditor functions as a replacement for a  element, the integration with the parent  element is automatic

(see http://docs.ckeditor.com/#!/guide/dev_savedata)

Am I missing something here?

So we looked at how one of the existing CKEditor-enabled fields on the page was processed in the civi code base (we chose the footer_text slightly further up the Online Registration page) and tried to replicate the same processing with the confirm_email_text field.

Based on this, we changed two files.

1. civicrm/CRM/Core/I18n/SchemaStructure.php

In the original Civi code on our version this had the following settings for confirm_email_text:

      'confirm_email_text' => array(
        'type' => "TextArea",
        'rows' => "4",
        'cols' => "50",
      ) ,

We changed this (it was around line 644) to:

      'confirm_email_text' => array(
        'type' => "RichTextEditor",
        'rows' => "4",
        'cols' => "50",
      ) ,

In other words, we changed the type from 'TextArea' to 'RichTextEditor'.

2. civicrm/CRM/Event/Form/ManageEvent/Registration.php

In the original Civi code on our version this had the following settings for confirm_email_text:

$form->add('textarea', 'confirm_email_text', ts('Text'), $attributes['confirm_email_text']);

We changed this (it was around line 423) to:

$form->add('wysiwyg', 'confirm_email_text', ts('Text'), $attributes['confirm_email_text']);

In other words, we changed the first argument from 'textarea' to 'wysiwyg'.

One more note

This code sufficed to display the CKEditor instead of the default textarea, and to save and retrieve the text that was written into it. However, during testing we found that our emails were not displaying images that had a src with a % sign in it properly. This was remedied by altering our Message Templates. They had the following line in them by default for including the custom confirmation text at the top of the confirmation email:

{$event.confirm_email_text|htmlize}

We simply removed the htmlize filter, so instead we had:

{$event.confirm_email_text}

This seemed to deal with the problem.

I should note that we removed the line of code mentioned in my original question from Registration.tpl before implementing the actual working solution above.


Events 'missing' after upgrade to 4.7.19 On a civi 4.7.19 / joomla 3.70 installation I have problems accessing events after the 4.7.19 ugrade (events worked OK on 4.7.18/3.7.0).
I have current events displaying on the front page via the civievent module that can't be 'seen' in the event dashboard (no current events showing) or in Manage Events (only some old events show here). If I 'Search All', I get a 'None Found' message even though there is also a message saying 'Event 1-50 of 224'. When I try plugging the ID of a current event into the edit URL for one of these old events I get the error 'You do not have permission to access this page'.
In case it's important, I have a 'Performance warning: Missing indices' alert on the status page, but the 'Update Indices' button does not seem to achieve anything as it comes back after confirming an update with the same Missing indices alert.

There is now an open issue and fix for this: https://issues.civicrm.org/jira/browse/CRM-20549


Upgraded to PHP 7.2; no errors but Sparkpost doesn't receive and send CiviMail I upgraded to PHP 7.2 and received the system warning stating "your SMTP password will not be stored encrypted, and if you have recently upgraded from a PHP that stored it with encryption, it will not be decrypted correctly." I updated our Sparkpost API key and everything on CiviMail's side seems to be working--all test messages go through and no errors pop up when sending email. However, when we tried to send a mass mailing, we got 100% successful deliveries but zero openings; upon further investigation, Sparkpost did not receive send any of the emails. Has anyone else encountered this or know a fix?

PHP 7.2 does not have the mcrypt module, and the Sparkpost extension needs that module.   If you can install php7.2-mcrypt as a pecl module Sparkpost will work.   If not, I would move to php 7.1 for the time being.


How to get Target Contacts from Api4 Activity.get call? I have an Api4 call that gets a particular set of activities. I'd like the call to return the names of the "target"/"with" contacts.
I've tried:
Joining the Contact directly "using" ActivityContact
$activities = \Civi\Api4\Activity::get(FALSE)
  ->addSelect('activity_date_time', 'subject', 'details', 'contact.display_name')
  ->setJoin([
    ['Contact AS contact', TRUE, 'ActivityContact'],
  ])
  ->addWhere('activity_type_id', '=', 56)
  ->addOrderBy('activity_date_time', 'DESC')
  ->setLimit(3)
  ->execute();

This works but leaves me with no way to limit the results to just the target contacts.
Joining the ActivityContact record, then the Contact
This is how I know the SQL needs to work, but it doesn't work [as expected] in Api4:

$activities = \Civi\Api4\Activity::get(FALSE)
  ->addSelect('activity_date_time', 'subject', 'details', 'contact.display_name')
  ->setJoin([
    ['ActivityContact AS activity_contact', TRUE, NULL, ['activity_contact.record_type_id', '=', 3]],
    ['Contact AS contact', TRUE, NULL, ['id', '=', 'activity_contact.contact_id']],
  ])
  ->addWhere('activity_type_id', '=', 56)
  ->addOrderBy('activity_date_time', 'DESC')
  ->setLimit(3)
  ->execute();

This ends up joining the contact ID to the activity ID(!)
a`.`id` = `activity_contact`.`contact_id`

Perhaps a Join in Api4 always means a join onto the primary entity? Except for hard-coded "using" joins? It's not mentioned in the documentation. Perhaps it's that you cannot do it from the API explorer? Though I kinda use that to figure out what you can do.
I'm using CiviCRM 5.35.1

For joining explicitly by adding an ActivityContact join then a Contact join instead of just a Contact join with "Using ActivityContact" in the explorer, I think it's just the Contact join that is causing you problems.  Either join on contact.id not id, or omit the explicit clause to use the implicit one.
ie use:
    ['Contact AS contact', TRUE, NULL, ['contact.id', '=', 'activity_contact.contact_id']],

or
    ['Contact AS contact', TRUE, NULL],

Both this:
$activities = \Civi\Api4\Activity::get()
  ->addSelect('activity_date_time', 'subject', 'details', 'contact.display_name')
  ->setJoin([
    ['ActivityContact AS activity_contact', TRUE, NULL, ['activity_contact.record_type_id', '=', 3]],
    ['Contact AS contact', TRUE, NULL, ['activity_contact.id', '=', 'contact.id']],
  ])
  ->setLimit(3)
  ->execute();

and this:
$activities = \Civi\Api4\Activity::get()
  ->addSelect('activity_date_time', 'subject', 'details', 'contact.display_name')
  ->setJoin([
    ['ActivityContact AS activity_contact', TRUE, NULL, ['activity_contact.record_type_id', '=', 3]],
    ['Contact AS contact', TRUE, NULL],
  ])
  ->setLimit(3)
  ->execute();

produce the same sql:
SELECT `a`.`id` AS `id`, `a`.`activity_date_time` AS `activity_date_time`, `a`.`subject` AS `subject`, `a`.`details` AS `details`, `contact`.`display_name` AS `contact.display_name`
FROM civicrm_activity a
INNER JOIN `civicrm_activity_contact` `activity_contact` ON `activity_contact`.`activity_id` = `a`.`id` AND `activity_contact`.`record_type_id` = \"3\"
INNER JOIN `civicrm_contact` `contact` ON `activity_contact`.`id` = `contact`.`id`
WHERE ((`a`.`activity_type_id` IS NULL OR (`a`.`activity_type_id` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 17, 19, 22, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57)))) AND (`a`.`is_test` = \"0\") AND (`a`.`is_deleted` = \"0\")
LIMIT 3
OFFSET 0

(API Explorer 4 on 5.36.alpha1)


CLI Contact Import is not importing address details I have a local test environment on a mac where the site is installed.

I'm trying to do a CLI import via the mac terminal and unfortunately, address details are not being imported.

Command Used:
php [absolute path]/sites/all/modules/civicrm/bin/csv/import.php -e Contact --file [absolute path]/csv/test.csv

Column headers:
"contact_type","email","first_name","middle_name","last_name","street_address","city","state_province","country","gender","custom_1"

Sample CSV:
"Individual","person.email@local.dev","FirstName","MiddleName","LastName","Street Address Details","City Name","State Name","Country Name","Female","custom_1 value"

As you can see above, there's even a custom value and it get's imported, but address details are not.

Please help.

Mac: El cap, Drupal: 7, CiviCRM: 4.7

The CLI Contact import is meant to work on a per-entity basis, since it uses the API.  So Contact is a separate entity from Address.  The Contact entity API has a couple of hacks to accept certain parameters from other APIs - e.g. primary email address - but generally speaking, what you're doing is unsupported.

If you'd like to do what you're doing via command-line, you have a couple of options:

Pull the contact ID into your CSV, and do a second import using the Address entity.
Write a small PHP script that handles this using the API Chaining rules.
If you're super-ambitious, you could write support for API Chaining into the existing CLI import, or submit a paid issue queue item to the core team to do so.

If this is a one-time import and you're not a coder, the first choice is the easiest.  Do your initial contact import first.  I use a tool called Pentaho Kettle to automate the process of substituting contact IDs into my address etc. imports - but it's got a steep learning curve if this is a one-off job.  Instead, export contact ID and external identifier from Civi, open it in a spreadsheet program, and use a VLOOKUP formula to generate your address import.


changing or removing the Headers and Footers from mailing templates Does anyone know if it's possible to stop a mailing template from using the default headers and footers?

I'd like to know if it's possible to disable the headers and footers for the template (if that can be done by assigning "empty" headers and footers, then I'd like to know about assigning different ones than the default.

Thanks in advance.

Possibly I don't follow the question, but using CiviMail you can avoid the need for using Headers or Footers by ensuring that you include all the required tokens in the template itself. You can also 'edit' the existing default Header and Footer and set them to not be default, hence when you then use your template in CiviMail, no header or footer will be automatically included, and none will be required.


Google Checkout disabled but causes Network Error loading Membership tab Payment processor Google Checkout is disabled, but Civi is still trying to load its file which doesn't exit:
PHP Warning:  require_once(CRM/Core/Payment/Google.php): failed to open stream: No such file or directory in /wp-content/plugins/civicrm/civicrm/Civi/Payment/System.php on line 59

Can I safely delete that payment processor without affecting any contributions that used it (there doesn't appear to be any FKs tying them together)?
Wouldn't it be better to not check for disabled (not supported anymore) processors?

You will also need to disable the google checkout payment processor. This error is now handled in 4.7.31.


Security alert - how to manage the download I am new to the CiviCRM interface, and am trying to build a conference registration form within www.jesuitschoolsnetwork.org.  I have repeatedly been notified that there is a needed update due to a security issue. Our site runs on Drupal 7x, and I have downloaded civicrm-4.6.8-drupal.gz, but am not sure what to do with the download.

Follow the instructions at http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Drupal+7. If you have questions about the documentation, please post a separate question back here.


how to find .tpl file? I installed civicrm 5.7.2
I am trying to find a perticular tpl file related to new individual contact.When I trying to search it shows me 'no matches'.

I referred a civicrm documentation

You can find the tpl file which is used to build the html by viewing page source.

Go to Administer menu > System Settings > Debugging and Error Handling, select Yes for Enable Debugging.
Visit the page/form you want to check which tpl file is invoked.
Right click >> View Page Source.
Ctrl + F to find tpl


Click to go to contact record from report When i am viewing contacts in a civireport if i click on the persons contact name i am taken to the "view contact detail report" which is basically the Constituent Report (Detail). Is there a way to go the the persons contact record directly from the report and not have to be referred to the Constituent Report (Detail)?

this is the url it takes me to when i click on someone from the report that refers me to the constituent detail report: /civicrm/report/instance/2?reset=1&force=1&id_op=eq&id_value=6732

This extension should help with your query –

https://civicrm.org/extensions/no-drill-down


Webform Integration - Permission level for viewing the civicrm contact name column Just curious if anyone using Drupal and the Webform integration has come across this:

When viewing results as an admin, I can see clickable links to the Civi individual who filled out the form - it's great! But I noticed that not all my users can see data in that column (they see the column it's just empty.)

If you click the view button for a submission, they can see (and click) the Civi Individual - but that same info does not show up on the list of completed submissions.

After some testing, I found that you have to give user the permission set "Edit All Webform Submissions" which is a little awkward. I just want this user set to VIEW the name of the person who completed the form and be able to click right over to civi (without having to open each survey).

Drupal 7.41 Webforms Civi 7.x.4.11

Any advice on how to accomplish this? Does it perhaps not behave this way in a future version?

The permissions per webform module overrides the webform permissions. When this module is installed and enabled, there will be a tab on the form settings called 'Permission settings' for every webform node. With this you can control the results tab on each webform by role. You can use only the Access webform results and Edit webform results.

Please test this module before using on production


Email greeting token not working with mosaico Building a mailing with mosaico

Contact email greeting not showing in final mail

(shows in html preview) mail sent as test and as mailing. No greeting in either.

d 7.66 c 5.10.3

other contact tokens (first name etc) are showing

Any ideas?

Thanks to Parvez, for pointing this out.

As well as Mosaico we had the GDPR extension installed. Upgrading to latest version GDPR has fixed the issue!


is there a jobboard in civiCRM new to civiCRM;-)

is there a jobboard in civiCRM

or to ask it in other words: does civiCRM  has a board constructed more in the realm of an Applicant Tracking System OR does it allow to function as a jobboard:

It might help if i describe a user scenario as well eg

User A want to list a job. They need to specify the Salary, Location, Skills required etc.

User B wants to find a job. They want to be able to search by Skilll, Location, Salary, etc

does civiCRM accomplish this?

There is no 'job board' feature as such. You could have a look at CiviHR but I don't recall it being a place where people could advertise their own jobs.

If I had to do this, on Drupal, I would be using Drupal Webforms that would generate Activities which would then be displayed in a Drupal View with links that would take the 'applicant' to another Drupal Webform where they would generate another Activity that was somehow referencing the 'job position'.

Not much help to you directly but hope this gets the conversation started.


CiviBuild - wp-demo install error with postdrop I am trying to use civibuild for installing a wp-demo instance on my local machine. I am using XAMPP on macOS Sierra.

The download successfully completed:

civibuild download "civiwpbuild" --civi-ver "master" --type "wp-demo"

But while running install:

civibuild install "civiwpbuild" --url "http://localhost:4000" --admin-pass "XXXXXXXXXX"

It gets stuck with:

postdrop: warning: mail_queue_enter: create file maildrop/29895.24374: No such file or directory

Any suggestion please.

Just found the fix that my postfix was not running.

I had to do a sudo postfix start which resulted in a number of warnings with final output

postfix/postfix-script: starting the Postfix mail system

After this I retried running the civibuild install

civibuild install "civiwpbuild" --url "http://localhost:4000" --admin-pass "XXXXXXXXXX"

and it worked.

More details on postdrop: http://www.postfix.org/postdrop.1.html


Activity Permission - Prevent User to View Other User Activity - CiviCRM I'm asking about activity permission in CiviCRM. I've tried to search by default functionality to prevent user to view other user activity but i guess there is no feature to do this.

This is the case that I want. Example : There are 5 users in CiviCRM : Barnie, JohnDoe, Michelle, Danielle & Felix. User JohnDoe create new activity type "Phone Call" with contact user Danielle and assign to user Barnie.

What I want is : While user Felix login into system, while he find activities, that phone call activities above will not showed to him.

Can you show me where is the code to execute query to prevent current user to view activity(s) that's not related to him/her?

I think this will require a custom extension to extend the ACLs such that the only folk who can see an Activity are those who are an Activity Contact (or who have View all Activities permission).

AFAIK this sort of permissioning is currently only provided through CiviCase but you have already indicated you want this as a new feature for Activities.

Search existing Extensions in case someone already developed this.

If you want assistance to build such an extension I suggest you try one (but only one) of the following so no one growls about cross-posting

https://chat.civicrm.org/civicrm/channels/dev
https://chat.civicrm.org/civicrm/channels/dev-newcomers
https://chat.civicrm.org/civicrm/channels/extensions

or if you want professional support you can find Partners such as Fuzion listed here.

Another approach, if you were using Drupal, and were interested in keeping most folk outside civicrm and have them interact mostly through Views and Webforms would be to build a View which would limit the Activities displayed to the Current User to those where they are a 'contact' on the Activity.

We do this quite a lot for clients who have lots of users but few who really need to get deep inside civicrm and bounce folk between using Views to find info and then Webforms to add/update.

Hope that helps.


In order to see Activities fields in Views - do I need to add/install CiviCRM Entity? I want to add Activities fields or Relationships in Drupal Views. Do I need to add/install CiviCRM Entity?

The answer is No, you do not, at least for Drupal 7. What I was missing was to first, add a new View, selecting CiviCRM Activities, not CiviCRM Contacts. I discovered clues starting on page 169 of The CiviCRM Cookbook by Tony Horrocks.


Stripe Checkout integration I see that Stripe can be used with CiviCRM but is Stripe Checkout ( https://stripe.com/checkout) an option with CiviCRM?

Stripe Checkout is not implemented at this time, but I would love to add it in the future.

Source:  I am the maintainer of CiviCRM Stripe integration.


Wordpress permission issue on a fresh install of CiviCRM I have just installed CiviCRM and I have a permission issue when accessing the "Configuration checklist" page.

When clicked, this URL redirects me to front-end with message :

  "You do not have permission to access this content."

Page URL : http://domain.com/civicrm/?page=CiviCRM&q=civicrm/admin/configtask&reset=1

How come I encounter this issue ?
Can it be a server-side configuration problem ?

Thanks for your support.

I have around  workaround for this issue - not an answer or fix to the permissions problem though....

If you scroll to the footer of the page and click on the "System Status: error" link.

http://localhost/xxxxxx/wp-admin/admin.php?page=CiviCRM&q=civicrm/a/#/status)

This will take to the config checklist screen.

Still need an answer to the permissions issue though - where do I set permissions for the config checklist page, and why would they have changed if I have not upgraded anything?


Is this the desired/typical setup for directories after 4.7? After an upgrade from 4.6 to 4.7, I see this.  While it advertises 'variables' in the top right, they aren't used in the boxes below, and any other hardcoded path has been stripped out.  The files seem to be working, is this correct?

Yes it appears to simply be using $civicrm_root (from the civicrm.settings.php) to look for these dirs! So as long as you have them in the usual places - this will work.

If you have a dir in a slightly different place or if you give it a different name - then you have to continue to be more specific [either specify exact path or construct it with the path variables]. I must do that for our projects for which we typically name and put the /extensions dir in a different place.


Search extension for first name = last name (to purge spam submissions) Some years back there was a forum discussion about a custom search to find contacts where the first name was equal to the last name, which is (or was) common for spam submissions that ended up generating contacts.

A custom search was shared but I was curious if anyone had this working on a more recent version of CiviCRM via an extension. (If not, I may play with that).

Now that I got my computer set up with buildkit, I had a chance to play further with civix and built a simple "first name = last name" search extension to test this out and practice the basics of civix.

If anyone wants to try it let me know how it goes:

https://github.com/CEDC/org.cedc.namename


Why are taxes calculated incorrectly when "other amounts" enabled on contribution page? CiviCRM 4.6.5, Wordpress 4.2.3

When I create a contribution page, I choose the financial type on which there is my taxes financial account linked.

The amount that the user can pay is decided by the user. So there is only "Allow other amounts enabled".

The tax financial account have a 14.975% rate.

When I put my page online and I try to make a contribution, I get a tax amount of 0.15% instead of 14.975%.

When I make a contribution manually with the same financial type, the taxes are calculated the right way.

If I put a precise amount with "Allow other amounts" disabled, the taxes are also calculated the right way.

Thanks for helping!

Whatever amount I put, the "Total tax amount" is equal to the Tax rate.

This patch solved my issue by using a real priceset:

https://github.com/civicrm/civicrm-core/pull/6520/files

Details here:

Contribution forms with numerical quantities is not taxed properly

Thanks!


Error uploading an image in email wysiwyg I get this error when I try to upload an image in the email wysiwyg...

Could not load the settings file at: /srv/bindings/34923847/code/profiles/civicrm_starterkit/modules/civicrm/../..//default/civicrm.settings.php

I have no problem uploading images for contacts.
All my directories and resource urls seem to be good.
I'm running civicrm 4.6.5 on D7.
I started having this problem once I upgraded from civicrm 4.4.7 to 4.6

CiviCRM Starterkit is installed as a Drupal installation profile, so it's got the civicrm module directory inside /profiles/civicrm_starterkit/modules rather than /sites/all/modules.  CiviCRM is assuming that you can go up two levels from the folder where it's currently running and then over to the default folder to find civicrm.settings.php.  That's not the case here.

A couple of things to do, then:

To deal with this in the short run, you might copy your settings file into code/profiles/default as a short-term hack.
File a bug report because obviously something's making an inaccurate assumption.
Consider whether using Pantheon and civicrm-starterkit is giving you any benefit.  Just because something can work doesn't mean it's worth the extra effort dealing with a quirky host and an unmaintained distribution.


Problem with process_mailing Using Drupal 7 and Civi 5.7.0

When sending batch emails using CiviMail, if I select "Administer CiviCRM » Scheduled Jobs" and select "Process now" on the "Send Scheduled Mailings" job then the mailing sends successfully. If I allow the cron to execute the same job, then I'm getting an SMTP error ("Failed to set sender" and "authentication failure") and the mailing fails. The log entries for the two jobs are identical. The SMTP settings are correct. The user specified in the cron job is the same as the one I'm using to "Process now".

Note: I recently dealt with the time zone error described in process_mailing processing addresses when called in UI but not CRON This got my cron running the process_mailing job but now I'm getting the SMTP error. The only change I made was to set the timezone on the server to the same as Drupal.

OK, the answer turns out to be a matter of capitalization. I'm using the cv addon (https://github.com/civicrm/cv) to send the command "job.execute" from cron. My cron line looks like:

cv api job.execute --user=username --cwd=/var/www/html/sites/default

However, my username on the server is not capitalized while my Username in Drupal IS capitalized. When I changed the cron to "--user=Username" all is well. It is interesting that the cron WAS executing and that the commands were being fired, thus the entries in the CiviCRM logs. However, since Drupal was seeing "username" as an unauthenticated user without the authority to send email, even though the process_mailing command was working, SMTP was failing.


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

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

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

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


recently viewed items stack: Add a configuration option for MAX_ITEMS in Recent.php What's the recommended way to make the max item count of civi's recently viewed items stack configurable. Current value ist a constant MAX_ITEMS defined directly in CRM/Utils/Recent.php.

A quick glance at civicrm.settings.php lets me think that this is not the right place – stuff there seems to be more generic/low level.

Maybe it's possible to add a new field in admin/setting/misc (CRM_Admin_Form_Setting_Miscellaneous)?

So where to put this?

You would need to patch CiviCRM to change this from a hardcoded constant into a setting.

Create a pull-request for this change and the core team will review it and merge it into 4.7.

See http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference


Problem creating Drupal users using Rules and Webform integration I have a simple Drupal webform that is integrated with Civi and creates a tagged contact. I use the approach described by @petednz at https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and to create a Drupal user and log them in when the form is submitted. In my case this then gives them access to a larger form where I want them to be able to save a draft and return later, hence the need for the user account.

Here's the rule that I'm using:

{ "rules_friends_tag_account_create" : {
"LABEL" : "Self Create User Account and login",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"TAGS" : [ "CiviCRM", "CiviCRM User" ],
"REQUIRES" : [ "civicrm", "rules" ],
"ON" : { "civicrm_entity_tag_create" : [] },
"IF" : [
  { "NOT civicrm_entity_user_exists" : { "civicrm_contact" : [ "civicrm-entity-tag:entity-id-contact" ] } },
  { "data_is" : {
      "data" : [ "civicrm-entity-tag:entity-table" ],
      "value" : "civicrm_contact"
    }
  },
  { "data_is" : { "data" : [ "civicrm-entity-tag:tag-id" ], "value" : "6" } }
],
"DO" : [
  { "civicrm_entity_action_create_user" : {
      "USING" : {
        "civicrm_contact" : [ "civicrm-entity-tag:entity-id-contact" ],
        "is_active" : "1",
        "notify" : "1",
        "signin" : "1",
        "username_format" : "first last"
      },
      "PROVIDE" : { "civicrm_user" : { "civicrm_user" : "Created Drupal User" } }
    }
  },
  { "user_unblock" : { "account" : [ "civicrm-user" ] } },
  { "user_add_role" : { "account" : [ "civicrm-user" ], "roles" : { "value" : { "7" : "7" } } } }
]

}
}

This has been working reliably for some months, and seems rock solid when I test it.

However I'm seeing behaviour from users that suggests that it isn't working all the time: i.e. sometimes I see that they have submitted the first form two or three times in quick succession, suggesting that they are not reaching the second form, but getting an access denied message instead, which is what would happen if the user account wasn't created for them.

Also, in recent days, I've seen on two or three occasions now the following error message in the Drupal log:

Unable to get variable civicrm_user, it is not defined.

Why might this rule be working fine for much of the time, but not consistently? How can I debug this? Is there a more robust approach that I could take?

You can register users through Webform Registration module. This module allows maximum flexibility to control the user registration process.


Undefined property: CRM_Contact_DAO_Contact::$contact_id in civicrm_entity_contact_user_get() Following the advice I received in Allow only existing CiviCRM contacts to create own Drupal account, I'm trying to implement Drupal Rules to create an associated Drupal user whenever a CiviCRM contact is added to the 'Web Site Users' group.

I'm running Drupal Core 7.66 and CiviCRM 5.12.3. Trying to get this working I've installed Entity API 1.9, Rules 2.12, and CiviCRM Entity 2.2.

This is the rule I'm using:

Creating a new contact in CiviCRM is correctly creating a new Drupal user, but I'm also getting this error, with no other visible consequences:

  Notice: Undefined property: CRM_Contact_DAO_Contact::$contact_id in
  civicrm_entity_contact_user_get() (line 3671 of
  /var/sites/c/civicrm.jesusshapedpeople.net/public_html/sites/all/modules/civicrm_entity/civicrm_entity.module).

Should I be concerned? Am I doing something wrong? Is there a fix?

The message is a 'Notice' which can sometimes be ignored.  However, looking at the code causing the message the purpose of the function is to load a user entity based on the contact id but the contact id is not set which is fundamental to the purpose of that function.

It would take a bit of debugging to track down where and why that is being called from your rule in a way that causes the contact_id not to be set - and ideally you would do that.  Alternatively providing it is does what you need in creating the Drupal user correctly you could choose to ignore it.


Can any New Zealand-based NFPs share their CiviCRM experiences? In the absence of a "users" mailing list where I would normally post this, I'm based in New Zealand, and I'm looking for New Zealand-based end-users or administrators of CiviCRM happy to share some experiences off-list about how well (or not) it's working. I am absolutely not interested in talking to any vendors or consultants, only folks who are actually using and supporting it in house (either hosted on on-premises).

Ideally your organisation would be at the medium end of the size scale (at least in NZ terms). Any experiences at all though would be welcome appreciated.

If any folks out there are keen please let me know.

Cheers,
Dave

there's a board on the CiviCRM forums for NZ users - you might get a better dialogue by posting this question there: https://forum.civicrm.org/index.php?board=78.0 . StackExchange is better for a straight Q&A format.

There are a number of CiviCRM agencies who may be able to point you to testimonials of their clients. You can search for CiviCRM experts in your country on the CiviCRM website: https://civicrm.org/partners-contributors?country=1154&service_languages_181=All&services=All&supported_cms_s_182=All


CiviContribute/CiviCRM overrides content entered into a custom field each time a donation is made Hopefully I can explain this so it makes sense. :)
We have customers that have donation pages (and events) that they use custom fields with, but when someone completes the custom field once, it does show in the contact's profile. If the same person comes back and makes another contribution, but chooses a different option for the custom field, it overrides what they entered previously.
We work with a lot of nonprofits, so they have people making multiple donations at different times throughout the year (and sometimes monthly), but they need to have a record of each designation the donor selects every time they make a donation.
Is there a way to prevent the information in the custom field from being overridden each time someone donates with a different designation?
Any help would be greatly appreciated. :)
Hopefully it makes sense.
Let me know if you need any further information. :)
Thank You!
Nicole

It sounds like your custom fields are on the contact record. If you create custom fields on the contribution instead then you avoid the problem.


Need to create a SepaMandate for street walkers? Business logic:
Customer sends out street walkers who recruit recurring donors on the streets with forms in their hands (or on their tablets). They need to create SEPA mandate reference numbers in advance.
Customer has implemented the basic CiviSepa and CiviBanking extensions.
I am going to add this functionality to the CiviSepa extension (see https://github.com/Project60/org.project60.sepa/issues/271)

To generate these required Sepa mandate reference codes I thought I could use the API SepaMandate with the create action. This API requires an entity table and id, which I do not have yet. Should I still use the API or should I set up a separate table for the generated references and use those to create a mandate once the recurring contribution is added?

To generate these required Sepa mandate reference codes I thought I
  could use the API SepaMandate with the create action. This API
  requires an entity table and id, which I do not have yet.

There's currently two API calls for creating a SEPA mandate: SepaMandate.create and SepaMandate.createfull. The first one requires indeed a contribution/recurring_contribution to exist, the second one will create both in one go. Both of them take a reference parameter with an externally generated mandate reference number. If this is not set, a new reference number will be generated. Does that answer your question?


How do I setup a webform so that an existing activity in a case is updated? Here's the scenario:

A user submits a webform that creates a case.

An administrator assigns a role in that case to a second user, and edits a specific activity (activity ID = xxx) in that case to assign that activity to the same user named for the role.

A Drupal View is used to present to that second user a link to a different webform. The link is of the form http://example.org/path/to/form?aid=xxx
My understanding is that because I have appended the activity ID to the url the form submission will update the activity with that ID.

However, when I submit the form a new activity gets created and the activity with ID = xxx is not updated or affected in any way.
It doesn't seem to matter which options I set for the activity within the webform.
Where am I going wrong?

As a supplementary, I've noticed that for the activity that does get created (with ID = yyy), if I file that activity on the case where it should be, then the filed activity has a different ID (yyy+1), which is concerning. Surely an activity should retain the same ID number regardless of its status?

This is possible at the option update existing case and update existing activity. This option is available after you have enabled case and activity processing.


Issues with refunds for credit card payments This has been a long standing issue for us.

We accept event registrations and accept payments with credit cards through Authorize.net. Many of our events have multiple options using price sets.

If someone registers for the event, and later needs to change the options lowering the fee, they need a refund. We can issue the refund manually without issue, but when we change their registration in CiviCRM the contribution fee changes to the new value and the status changes to pending refund, and we can't ever change it from that.

All our refunds happen manually out of the system, and we really need the pending refund contributions to be changeable back to complete when the refund is processed.

This really messes up our reporting for the event, and throws things off in a messy way.

Is there a way to resolve this so that we can track things as they should be?

What is the logic in restricting the change in that field? Since CiviCRM can't process the refund, and we need to do it offline, we should be able to change the status once we issue the refund.

Any help, thoughts, or ideas would be wonderful.

You don't say what version of CiviCRM you are using.

In 4.7 you need to record the refund against the registration record. This can be done at the time you alter the registration or by viewing the event registration later on.

In both case you will get a screen that clearly offers you chance to Record refund.  ]1


Alternative CiviCRM theme I have looked a great bit into some alternatives to the default civicrm theme such as shoreditch, haystack, the CiviHR theme and one that agiliway developed for their demo site.

My question is what alternatives are most people using instead of their default civicrm theme? Custom theme or one of the alternatives i discussed above.

We have been using CiviCRM shoreditch theme for quite a long time until we switched to Kindly Theme by artfulrobot for some of our clients recently. Both are good in their own aspects. Around 2.4k sites in this universe are using CiviCRM shoreditch theme. We also have custom theme inheriting Drupal bootstrap3 theme for some clients to match their screens.


Is the "Show Contact Deceased" extension compatible with 4.6? Extension here shows as compatible through 4.5.  Is this compatible with 4.6?

What is the best way to determine whether something is likely not compatible with a contemporary Civi version rather than just not updated to reflect as much?

The core team liked the extension so much that it was incorporated into core for 4.6. So we won't be releasing a 4.6 version. Thanks for your question - we will update the documentation on civicrm.org to reflect that it has gone into core for 4.6.


Support for distributing benefits in Turkish Can CiviCRM be quickly setup in a cloud so that it's primary function is to distribute benefits (cash, food, etc) with user interface in Turkish?

you would have to check how complete the turkish translation is. It seems we have achieved 100% translated, but can't judge of the quality of the translation.

https://www.transifex.com/civicrm/civicrm/

They are various hosting providers that can offer you to host. We do host on our own servers, so don't have a first hand experience on what they offer and it is not a question that fits the SE format, but I can mention that a nice community member is fast at replying and has a lot of experience with civi: hershel, you can find more on civihosting

and this page lists other providers, that are all active in the community:
https://civicrm.org/hosting-providers


Scheduled mailings don't get sent If we schedule a mailing, they only ever say running in the status column but never get sent.  The only way they send is if we hit "execute now", so at least we know they are no email config/password issues.

I have little experience with Drupal, CiviCRM and Linux, so don't even know where to look for logs.

CiviCRM is running off Drupal on a Linux Ubuntu vm, I've found version number for CiviCRM is 4.1, Drupal is 7.34, php is 5.59 and MySQL 5.541.

How can I get the mailing delivered automatically?

EDIT:
I have checked under the scheduled jobs (administer > system settings >schedules jobs) and found this.

If i click on log for the above, i get a blank web page.  The test mailing i scheduled is still sat there saying "running".

I looked at the civicrm instructions before I posted on here, but to be honest they mean nothing to me, i didnt setup civi, never used drupal so I am really trying to sort this problem.

I have run crontab -l and everything is commented out.

Please can someone help

It sounds like you may not have a server cron job set up to trigger the Civi cron job.  Are your other Scheduled Jobs executing?

The documentation to reference is here: http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs


CiviEvent Mass Participant Registration - Blank Page WordPress 5.5.3
CiviCRM 5.31.1
Problem with CiviCRM event (CiviEvent) mass registration
I'm trying to mass register participants as per: https://docs.civicrm.org/user/en/latest/events/manual-event-registration/#mass-registrations. However, on clicking Register participants for event, it simply redirects me to a blank page titled New Event Registration.
What I clicked on:

Redirected to:

I've checked 5.32.0 https://github.com/civicrm/civicrm-core/blob/5.32/release-notes/5.32.0.md release note and there's nothing addressing this issue.

This is a recent regression. A fix has been merged for 5.33 (RC) and the upcoming 5.32.2.


Important Event Participants on CiviCRM 4.6.5 no longer supports external ID? We've been importing event participation in 4.4.6 using their external ID (External Identifier). This appears to be no longer supported in 4.6.5.

Any way to get this to function again?

I found the problem: UPDATING events requires Internal ID, but skipping duplicate entries allows for the External ID. (Who knows why!)


What causes periodic database errors while using logging, and what should I do about it? Running a Drupal site with CiviCRM Logging enabled.  It seems like once a month we get a crash. On investigation one of the log tables is corrupted. Since the tables are type Archive MYSQL provides very limited tools.

The normal fix is to remove the data from the sick table or completely deleting the sick table and rebuilding. Any suggestions for preventing the issue or recovering from the problem

A few orgs who use logging on fairly high volume sites have modified the logging tables to either use MyISAM or InnoDB and have had fairly good success with it. Can you please report back if you adopt this approach and your success with it


How to prevent selecting the wrong file format? When you close an accounting batch, you are asked if you want the exported file in IIF or CSV.  We export to CSV every time since we don't use Quickbooks. Just now, however, our office manager accidentally chose IIF. "No worries," I thought, "we'll just re-download it and choose CSV."  No dice.

When you go to Exported Batches and click Download, you are not given the choice of format, it just begins downloading another IIF.  To fix it, I went to the civicrm_batch table in the database, found the batch in question and changed its status ID to 2 (Closed).  This allowed our office manager to export it again, but in the correct format.  (There must be an association somewhere in the database between file format and export batches; I wonder where that is... I digress).

My actual question: What is the best way to prevent choosing the wrong export file format on the batch export screen?  Disable the IIF option with CSS and/or JS? Can I prevent the IIF option from even systematically appearing since we don't use it? Where would I adjust that?

[Old question, but may still be relevant]

A quick but hacky option would be to comment out the IIF line in $optionTypes in CRM_Financial_Form_Export::buildQuickForm()

A better option would be create a setting and use that to set $optionTypes which would be a straightforward enhancement. Since a site probably wants the same type for every batch, a setting under CiviContribute Component Settings seems reasonable.


Scheduled reminders for rolling renewals not sending after first renewal One set of our memberships is a 1-year, rolling product that can be purchased at any time.

We've set up tests for scheduled renewal reminders but it seems to have stopped working:

Entity: membership > individual membership
When: [1] [week] [before] [membership end date]
Enable repetition: yes
Repetition: every [1] [day] until [1] [day] [after] [membership end date]
'From name/email' etc. added
Limited to Smart Group made up of test contacts

We initially set one of the test contacts up with a membership set to expire in 8 days. At 7 days before we got the first email, and each day after that until we changed the renewal end date to be a further 8 days in the future from that point (to test what would happen for the 2nd year renewal period).

After that, we no longer received any emails. Checked cron jobs etc. and send scheduled reminders is set to run daily.

Is there a problem with 'clearing out' contacts tat have been triggered to (e.g. once they have renewed once they'll never get sent the scheduled reminder again, even once they get to 1 week before membership end date once again)?

(we're using v4.6.9 in case that is relevant.)

one way to further test whether this is just an issue resulting from manually changing the End Date would be to set up a membership type that is only on a 10 day cycle (or less if urgent) so you can test it without needing to alter the end date. if that is helpful i can convert to an answer (may do anyway)


One database table very large Database table Table: civicrm_contact_push_notification_messages
Is huge. 51GB to be precise.
The main field is %display_name has created activity.
Is this the table that shows up what emails have been sent under a user's activity tab? Or something else.
Does anyone know?
Thakns!
Caroline

Thats from Civimobile extension and You can find quick solution at https://lab.civicrm.org/extensions/civimobileapi/-/issues/57#note_54817

One thing I have found is editing the scheduled job Civimobile clean
old push notification messages and setting a command / API parameter
count_of_day=1 which means keep only 1 days worth of notification
messages can help


How to do a 'mock up' event or prolfile form without it going 'live' on the website? I have just started using CiviCRM so I am still finding my way around. Is there a way to create, for example, an event or a newsletter sign-up form and see what it would look like on the website without making it go live on the net? Someone else takes care of our website, I just do CiviCRM, so I don't want to mess up our website while I am still figuring out how to use Civi!

Any advice would be most appreciated.

Thanks!

-Mia

On the first step when creating a new event, down near the bottom of the form, there is a checkbox labelled "Is this Event Active?" Un-check this and the event will be hidden from the public. You can come back later to set to true -- it's on the first tab when configuring the event.

To display the event on a WordPress / CiviCRM site you need to insert a shortcode for the event into a WordPress post. Put your cursor into the body of the post, then click on the CiviCRM triangular icon just above the field. Choose appropriate options like an event and test rather live page. That will let you test purchasing a ticket for the event without having to pay real money. Test tickets purchased also dont show up in standard reports and participant counts. When you are satisfied with the purchase pages and emails sent you should switch the shortcode to the live page and ènable the  event.

Good luck.


File Storage on CiviCRM We have a client who is looking to upload about 5G per year of files onto client records in CiviCRM.

We can obviously arrange for the server to manage that, but wondered if anyone has ever notice speed issues with uploading so many files? They need to keep records for 7 years, so will eventually have around 35G of files attached to activities.

the files are stored outside of civi database, the database itself contains only the file name, it shouldn't be a problem

However, did you think about using a "real" document management system (ie. one that offer full search on the documents and revision and whatelse) and integrate it with civi? given the quantities you expect, might be easier for the users


Event Info, registration and other front end not displaying correctly I have a fresh CiviCRM install on my test server and the frontend is displaying incorrectly as if it can't read the CSS
Here is a test event: http://node01.tmdhosting983.com/~agsmca/index.php?option=com_civicrm&task=civicrm/event/info&reset=1&id=1

I can't seem to find the problem, is my Joomla theme overriding it?

RESOLVED

So it turns out that I was missing a whole folder on my server. The zipped civicrm folder in the installation files under the admin folder didn't install properly (even though my PHP has zip enabled and CiviCRM was installed by a professional and reinstalled by a professional).

The solution is to take manually unzip civicrm.zip from the asmin folder in the install folder you used to install CiviCRM, then manually upload these into your Joomla folder/components/com_civicrm in a new folder named "civicrm"

Here is a screenshot of the resolved page:

That page doesn't look unreasonable, but I'm attaching a screenshot here that shows a lot of failed css loads in the console.

I'd guess it's a file permissions issue (i.e. your server is unable to read those resources).


Import from one db to another fails I exported all the civi tables from one database and saved as a sql file, including a droptable statement. I then tried to import the data into a fresh site with brand new civi installation.  The import fails with a foreign key constraint failure.
When that failed I tried to import a sql file with data only, no structure, no drop table. Also failed with

1st SQL query (with structure & data):

-- --------------------------------------------------------
--
-- Table structure for table `civicrm_action_mapping`
--
DROP TABLE IF EXISTS `civicrm_action_mapping` ;

MySQL said: Documentation
#1217 - Cannot delete or update a parent row: a foreign key constraint fails

2nd SQL Query (data only)

-- Dumping data for table `civicrm_acl_entity_role`
--
INSERT INTO `civicrm_acl_entity_role` ( `id` , `acl_role_id` , `entity_table` , `entity_id` , `is_active` )
VALUES ( 1, 3, 'civicrm_group', 1, 1 ) , ( 2, 1, 'civicrm_group', 15, 1 ) , ( 3, 4, 'civicrm_group', 2, 1 ) , ( 4, 2, 'civicrm_group', 2, 1 ) ;

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 'PRIMARY'

Any help is appreciated.
Kate

You can add this to the top of your .sql file, then try loading it again.

SET FOREIGN_KEY_CHECKS = 0;

This will permit MySQL to load the data while ignoring the foreign key checks.

Since CiviCRM uses foreign key checks, this is a good idea only if the checks throw errors when loading the DB but not when using CiviCRM afterwards.

Alternatively, to ensure foreign key integrity and handle existing tables not wanting to be deleted, prefix your .sql with

DROP DATABASE nameofdb;
CREATE DATABASE nameofdb;

(where nameofdb is your actual DB name of course).


CiviCRM upgrade from 4.2.7 to 4.7.13 fails to show any report CiviCRM was updated from 4.2.7 and right now is even updated to 4.7.16 but when we try to get reports and even try to click on "Refresh Results" it shows nothing, not even an error about it. The original site still has CiviCRM 4.2.7 and is able to show all reports with no trouble. I've been looking for any file, database table or anything that might be missing and needs to be updated but can't find what is causing this, any ideas what might be?

Regards,

As I said to your previous post about the same topic here: What tables are used for civicrm reports?

  4.2->4.7 is a huge upgrade. Swathes of tables - including Activities and Settings - have changed. If you have any custom reports or
  extensions these definitely will need to be upgraded without a doubt.

As ErikH said:

  Assuming you are using customized reports and do not have a
  CiviCRM/PHP developer in your staff, you have to find a CiviCRM
  expert/developer to do this for you

Upgrading these reports will require a coder to change their code to point them to the new database tables used by CiviCRM. There's no workaround. Code for custom reports will need to be changed. Tell your next developer to use the CiviCRM API if possible!


Type "Timestamp" in CiviCRM I ran into some validation problem when run a DAO with a 'YmdHis' date string using a Date type callback. It turns out the Date type does not take a full date+time string. So I changed to use Timestamp callback with a timestamp string like this this one "1432650922" but it failed again.

Took a look and realise that the Timestamp type is not really for Unix timestamps but for date strings in either 'YYYYMMDD' or 'YYYYMMDDHHMMSS' format.

In this case, should we call it Datetime rather than Timestamp? Just to avoid confusions.

yes, agreed. Can you work on this and submit a PR for this against master (4.7). Should be a relatively easy fix. I'd probably recommend keeping Timestamp for the 4.7 cycle and mark it as deprecated and get rid of it in the 4.8 / 5.0 version


Need help upgrading 4.4.5 to 4.7.18 0n Ubuntu 16.04 server with PHP 7 on Drupal 7 The VPS host running Drupal/CiviCRM was upgraded from Ubuntu 14 LTS to 16 LTS.  That ran without error. However, that upgrade came with PHP7.  immediately after the upgrade all three CiviCRM sites experienced The following Drupal Log error:

"ParseError: syntax error, unexpected 'clone' (T_CLONE), expecting '(' in require_once() (line 1 of /var/www//sites/all/modules/civicrm/packages/DB/DataObject.php(207) : eval()'d code)."

After disabling CiviCRM on all three sites the error cleared.

Per CRM-17789 PHP 7 compatibility comes with CiviCRM 7.12.  Upgrade of 4.4.5 site tto 4.7.18 was attempted. However,  now "http://www..com/civicrm/upgrade?reset=1" produces the following: "ERROR: The website encountered an unexpected error. Please try again later."

Apparently, the installation with the CiviCRM module enabled was not a fix.  This was tried several times after clearing the browser cache ... and in more than one browser with an open admin session set-up before the upgrade.

Is there a way around short of a new install of CiviCRM?

The other two sites are currently running 4.1.2 and 4.2.8.  No CiviCRM upgrade has been attempted on these

Thanks,

TJH43

Does your VPS let you choose the version of PHP?  If so, downgrade the version of PHP, upgrade CiviCRM, reset the PHP version.

Alternatively you could copy your installation to another server with older PHP, upgrade CiviCRM there and then transfer back to your VPS.

Since you have attempted an upgrade your system may be in a partially upgraded state.  You should start from the database dump and software tree that was backed up before the Ubuntu upgrade.

If you want to copy to another server, be sure to follow the instructions at Moving an Existing Installation to a New Server or Location.  You may want to get some help if those instructions look daunting.


Remove display of location field in Current and Upcoming Events view - Joomla We are using CiviCRM  4.6.28 on current Joomla version.
As we are using the training location in the title already we would like to remove the display of the location column as it is irritating if it shows (not available).

Is there any way of removing this without hindering further updates?

You haven't said which page you are referring to but I'm guessing that this is the public HTML listing of events.  If so, the output is controlled by this template: <civicrm root>/templates/CRM/Event/Page/ICalendar.tpl

You can copy this to create a custom template and edit it to remove the location column.

Read more about customising templates here: Page Templates


CiviCase - remember user choices in search filters for activities We are using CiviCRM 5.5.3 and CiviCase on Wordpress 4.9.8

Similar to "make activity filter user preference an optional setting" CRM-20799
we wish to make the system remember user choices in case activity tab.
Currently all filters are remove with every refresh.

Alternatively we would be happy if we could set the field Status to "Scheduled" by default.

Any way to accomplish that.

The setting Preserve activity filters as a user preference present in Display Preferences is limited to only Activity tab displayed on the contact summary page. As of now, there is no way to save the user choices in case activity tab.

Similarly, to select Scheduled as a default option for status, you might need to write a minor customization in an extension to make it work. Either using the buildForm hook and setting default value OR using a smal js code snippet.


"Printer-friendly" pages Does anyone use the little printer icon at the top right of many pages?  It is supposed to produce a printer-friendly view of the page, but the output looks pretty bad.  It shows the main content rather than the whole page that you get from a browser print so is potentially useful.

According to this this jira, the printer friendly views were ok in 4.4.20, deteriorated in 4.5.9 and improved a bit by 4.6.9.

So, is this an old piece of cruft that can be removed, or a useful feature in need of attention?

Agree, it's probably time to remove it.

Over on https://civicrm.org, it's handled like this:

.crm-container #printer-friendly {
  display: none;
}


Price Sets - Won't let me use recurring contributions I'm running civicrm 4.6.10, drupal 7.41, and I'm trying to add a field to a price set that would let users select from a couple of different price levels for membership.

Maximum Dues $33
Regular Dues $22
Minimum Dues $11
Sub-Minimum Dues $6

They are each attached to a membership type that has recurring payments listed as an option.

However, I keep getting this error.

"You can include auto-renew membership choices for only one price field in a price set. Another field in this set already contains one or more auto-renew membership options."

I get this error even when there are not other fields in the set, or when I only make one option is the field for the memberships (like just listing maximum)

Any ideas?  Is this something I'm doing wrong or possibly a bug?

Turns out it was a bug that I was able to fix by updating to the latest version of civicrm 4.7.4


Integrating CiviCRM events with Drupal Commerce? I am wondering if anyone has successfully integrated CiviCRM events with Drupal Commerce. I'd like to sell events through commerce to prevent having a two commerce solutions on one site. I am aware of Commerce CiviCRM, but it seems irrelevant for the purpose of selling event registration.

Does anyone have a working model for selling event registration through commerce?

Having spent time working with the CiviCRM Commerce module approach, the route we now recommend is using CiviCRM Entities and Drupal Rules. We don't have a package of such Rules yet as the project that was going to give us the time to do this has been deferred.


Autodetecting variables for URL variables I am having an issue in Settings - Resource URLs where the [civicrm.files] variable is detecting incorrectly. It's actually detecting as https://www.mydomain.org/usr/home/webhoster/mydomain.org/wp-content/plugins/files/civicrm/

Is there an override I can put in my civi URL variable settings file to make it right? Or do I need to get a tweak to my server?

If those tokens aren't working for you, it's OK to use the absolute URL or path without the token instead. Would that solve the problem for you?

https://www.example.org/wp-content/plugins/files/civicrm/

There seem to have been a few questions about this recently. I haven't run into it myself, but got an impression this may relate to symlinks in the webserver path.

There has been a bit of work recently regarding miscalculation of [civicrm.files] values - contributing information to these linked discussions may help to get the problem resolved:

CRM-20609: File URL when CiviCRM detects Drupal doesn't match path set by [civicrm.files]
CRM-19303: CKEditor configuration can't be edited on a Drupal multisite installation
Lots of discussion of this in PR9458


Membership cancelled, but active until end date Our memberships period is a calendar year. If a member decides to cancel, he will still be a member until the end of the year. During the remainder of the year, the member can still profit from his membership. But he must not be reminded of renewing his membership.

So, the end date discriminates active memberships, not the membership status itself. At the end of the year, the status should still be cancelled, not expired.

Is this something that can be done?

I think I did a bit of both:

I created an extra membership status called Stopped. This is valid and active until the end of the year. At the end of the year I update all the Stopped memberships to Cancelled.


Rich html CiviMails can send from a Mac but not Windows? I've an issue with the new 4.6.5 CiviMail on Joomla 3.4.3 where the 'send test' button remains deactivated after pasting in content - and when a draft is saved, it saves blank.

We send out a weekly newsletter that is rendered as a web page ( http://www.pctscotland.co.uk/latest-newsletter ), the source html of this is copied and pasted into the source of the CiviMail interface. This has been working for some years but stopped after I upgraded to 4.6.3 (normal composed mass mails were fine but not these html ones copied and pasted). Upgrading to 4.6.5 fixed this for me (Mac Chrome/Firefox) - but not for the other site users using Windows Chrome.

They paste the content in, fill in the required fields and the 'send test' button remains greyed, with no 'preview as html' link to the left. When they save the draft, it saves it as blank. When I do the same, it works. I've just done a detailed screen share to make sure there is no difference in processes - and there isn't. All users trying to do this have the same super user privileges.

Any help on this would be really appreciated.

Nic

I haven't heard any other issues like this so I suspect this has been solved by now. Please upgrade to the latest version and try again.


Recently created event not appearing I created an event for my organization that occurred on July 21st. When I go to "Manage Events", it is not shown in the event list. However, when I search for the event by time period, it once again appears. Why can't I see the event all of the time?

It's assumed that once an event is complete, you're not so interested in it. I also find it a slightly annoying interface, but I get used to doing that search.

On the other hand, for organizations that are hosting lots of events, it's a sensible default.


Integration with Weebly? We have been using CiviCRM for many years now. However, our organization has decided to move to Weebly for content management.

How can we continue using CiviCRM, and possibly integrate some aspects like forms/profiles with Weebly?

The short answer is no.

The long answer is that Weebly is a proprietary system - you would not be able to integrate CiviCRM. However, you could use clunky iFrames and there is work in progress to have some CiviCRM forms embedded on external sites.

Some small organizations may use a proprietary system for their website and host civiCRM with wordpress or drupal on a sub domain - that could be an option too.

What is your current version of CiviCRM and what is your current CMS as those are factors.


Logged out periodically for unknown reason and word replacement not working On one of the CiviCRM sites I've set up, it keeps logging me out every 30 minutes or so. I have set the cookies in the default.settings.php file so that I'm logged out when I close the browser but it's exactly the same as my other sites, where there's no problem. Same hosting as well. Any ideas why it's throwing me out all the time??

I'm on Drupal 7.53 and CiviCRM 4.7.16.

EDIT: This is still ongoing, I've restored all settings across the site that I can think of that may trigger an issue. Just today, I've had the following error message (usually it just logs you out with no warning) but I thought it may throw some light on the issue?

And this is my cookie session settings in the default.settings.php file:

----- THE FOLLOWING ISSUE HAS BEEN RESOLVED SO CAN BE IGNORED -------

Also, same site, different issue. I've done word replacement and changed the name from Organization to Organisation but when I search for Contact Type, it's still showing Organization - regardless of whether I specify exact match or not for the word replacement?

I've solved the problem with the name change:

I used the word replacements function.
When you check 'Administer > Contact Types' it looks like the 3rd Contact Type has changed...
BUT you still need to 'Edit' and specifically change it


How to get a CiviCRM popup form (eg create new Group / Tag etc) working via a Drupal link We wanted to let a Drupal user 'create new group' in civicrm without needing to go in to CiviCRM itself.

Clues from here suggested we might be able to do it without using API etc. The suggestion was that

 putting <a class="crm-popup" href="/civicrm/group/add?reset=1"> Create a New Group </a> into block body (Full HTML input format)

may suffice. It didn't as it seems to require 'something' to initialise civicrm

At this point it looks as if putting

civicrm_initialize();
$manager = CRM_Core_Resources::singleton();
$manager->addCoreResources();

in to a module in hook_init() does the job.


Access denied for specific role IDs that previously were able to use CiviCRM now get 'Access denied - You are not authorized to access this page.'.  (i.e. /civicrm/dashboard) These Ids can log in to Drupal. I may have caused this with some Role permission changes.  I've fiddled with many of the Role permissions to no avail.  We use ACLs to limit access to contact records.

What's the necessary subset of Drupal Role permissions to gain access to CiviCRM?

Drupal 7.61
CiviCRM 5.9.0

We had the same issue and same resolution, but agree, it doesn't feel right. I opened an issue in the lab but couldn't find anything else: https://lab.civicrm.org/dev/drupal/issues/45

EDIT: Maintainer/owner "colemanw" replied to the issue:

  Looks like "access CiviCRM" was recently renamed "access CiviCRM backend and
  API" I assume to enhance clarity but it seems to have caused some confusion.
  But it's true, you should only allow trusted users to access your CRM.

EDIT2: More info from colemanw:

  Right, "access CiviCRM" or whatever it's called now is the gatekeeper, the minimum permission needed to access any part of CiviCRM. It is required to have that permission before doing anything.

Looks like we had the right idea!


STARTTLS failed in version 4.7 CiviMail throws the error Mailing_send_test : STARTTLS failed when doing a test email. Sending results in bounces. I have a handful of CiviCRM installations running on the same server and only 4.7 installs seem affected.

Version 4.6.9 no error.
Version 4.7.3+ error as described.

Does anyone know what would have caused this?

(I did recently add mysqli per the recent blog post, and I went from PHP 5.5.38 to 5.6.24 in the process. But perhaps that's unrelated.)

Edit: I use CiviSMTP.

This sounds like it's the same problem described here.

While the solutions there suggest hacks to the code, most likely you're either a) connecting to a mail server that has a self-signed certificate, or b) your CiviCRM is installed on a server with an outdated list of CAs.  Fixing the root problem is preferable.  Let's Encrypt issues free SSL certificates in case your problem is the former one.


Installing Webform CiviCRM from an Installation Profile The background is that I have an installation profile that installs certain Drupal modules and CiviCRM. The list of module dependencies goes in my profile's .info file. However if I include webform_civcirm the installation fails. The failure seems to be because CiviCRM has not been installed yet:

[ok]
Starting Drupal installation. This takes a while. Consider using the   --notify global option.
[warning]
WD php: Warning: include_once(sites/default/civicrm.settings.php): failed to open stream: No such file or directory in civicrm_initialize() (line 190 of /var/www/site/profiles/compuclient/modules/civicrm/drupal/civicrm.module).
[warning]
WD php: Warning: include_once(): Failed opening 'sites/default/civicrm.settings.php' for inclusion  (include_path='<my include path>') in civicrm_initialize() (line 190 of /var/www/site/profiles/compuclient/modules/civicrm/drupal/civicrm.module).
[warning]
WD php: Warning: Invalid argument supplied for foreach() in civicrm_menu_alter() (line 482 of /var/www/site/profiles/compuclient/modules/civicrm/drupal/civicrm.module).
[error]
Drush command terminated abnormally due to an unrecoverable error.

I might be trying to do something the module just isn't designed for, i.e. installing it when CiviCRM isn't yet installed on the site. The step that installs CiviCRM takes place after the site's dependencies are downloaded and enabled.

AFAIK you can not install Webform CiviCRM if CiviCRM is not installed yet.


Search for contributions made in previous 4 months I'm trying to search for contributions made in the previous 4 months.

Example - We are in October, but I want to be able to see if people have contributed since June 1.

I can search by previous month (Sept), previous 2 months (Aug), and the previous quarter (July), but am not sure how to search from the previous 4 months.

Any ideas?

Thanks!

You can always search by selecting "Choose Date Range" and entering dates manually (see screenshot below).

If you're looking to use a relative date filter because you need this to be in a report or smart group, then that date filter doesn't currently exist.

However: I am actively working on making it possible to create your own date filters (CRM-16195)!  I am waiting on someone to review some preliminary cleanup I did a couple of weeks ago.  Once the cleanup is approved, I will submit a change so that custom date filters can be added by an extension.  I already have an extension written that will handle your scenario.

If you absolutely can't wait, and you're comfortable patching CiviCRM, contact me on https://chat.civicrm.org (@junglebird) and I'll give you a patch so you can do this today.


How to include token or variable for Invoice number under the message templates for Memberships - Receipt (on-line) I need to send Invoice number in the message templates for Membership Receipt Online, but I don't see any token or variables associated for Invoice Number which I can use to place it

is there any way we can place the invoice number in the message templates ?

The tokens you can use in a message template are a bit random, just what the developer added to the template. In this case, the contribution id can be found with {$contributionID}. However, that is not the same as the invoice_number. I could not find a token for the invoice number. But the templates are generated by smarty, and in smarty you can use the CiviCRM api. So the following line gets the invoice number:

{crmAPI var='invoiceReference'
        entity='Contribution'
        action='getvalue'
        return="invoice_id"
        id=$contributionID}

You can print it with {$invoiceReference}


Some contacts are shown as LAST, FIRST; some as FIRST, LAST On Constituent Summary page in Contact name column I see contacts listed in two different formats.

1) Last, Name

2) Name Last

Also, in search boxes, CiviCRM provides suggestions in these two formats.

How can I get all contacts displayed the same way (e.g. First Last)?

Looks like your greetings/display name format has changed at some point in time.

You can run the "Update Greetings" job to force a refresh, I would create a copy of the job and set the relevant force flags so that its not constantly refreshing.

You can get to the Schduled Jobs page from the Admin -> System settings menu.


How to add Contact "Notes" field in webform? I need to create a signup form via webform and would like to include a Notes section where people can make write something  during signup. I would like that to appear in the "Notes" section of contact. Cant seem to locate that option, any ideas please? Thanks

Here's a similar question: Can I add a space for people to write notes: like dietary needs and or comments?

And here's an outstanding request for the feature here: https://www.drupal.org/project/webform_civicrm/issues/2320295

The conclusion is: consider putting the note somewhere else, e.g. an activity or custom field.

Although the notes field seems like the right place, it's not a bad idea to NOT put it there, since the notes field tends to be private for administrators and hiding the contact's notes in there means they might not get seen.

If you work forwards and think about what those notes are for, that might suggest a better location. A custom field seems like the right answer.


Guidance Request : SSO between CIviCRM & WordPress! We've been using CiviCRM for a number of years and also running a blog on WordPress.

I can't find much information on setting up SSO / OAUTH / SAML / or even just custom CiviCRM | WP API to handshake and achieve a better user experience.
(I checked the CiviCRM API Doc and don't see user authentication)
I once setup SSO between Vanilla Forums 2 and a custom C# asp.net site and just don't see something like that available.

I did find this: (I wouldn't use Facebook SSO because of privacy offneses)
https://civicrm.org/sites/civicrm.org/files/SingleSignOnAccess-for-CiviCRM-Facebook-case.pdf

WordPress has alot of options for SSO plugins:
https://wordpress.org/plugins/tags/single-sign-on/

If you moved CiviCRM over to WordPress (same instance) you would have no problem, but as you have been running on Drupal for some while I expect that you'd have to change various things and it would change the user experience a bit so probably not the route you want to take.