How to get Participant Fee as Part of the Total Contribution, using Webform Integration

Step1 on the post you referenced will expose the Participant Fee field to the webform List item
Step2 sets the amount for it

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

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

End Result:

The Start page looks like:

Note that the Membership and the Event Participant webform fields live on the Start page; the Donation one lives on the Payment page.
Start page - webform Elements:

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

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


Image not displayed in the email with outlook

This is almost certainly a characteristic of Outlook rather than a problem with Civi. Outlook won't necessarily display images  - certainly if the 'from' email address is a new one to that Outlook - so the user has to check a flag to indicate that they want see images for that email address.  Other email systems also behave in a similar way - it's a (sort of) security feature.


Why does the Constituent Summary & Detail reports contain deleted contacts? (or, how to remove them?)

I think the answer is that the contacts probably haven't been deleted but are in Trash.  You can search for deleted contacts in Advanced Search>Search Settings where you'll see a box labeled "Search in Trash".  On completion of the search, click on Actions and they can be deleted permanently there.  They will probably not then appear in your reports.


How can I show users the mailings they have been sent?

Yes you can do this with Views.

Important points:

Views must be configured to see the CiviCRM database in settings.php
Create a View for "CiviCRM Activities".  "Bulk Mailing" is an Activity type
The 'link' to view the bulk mailing is probably best constructed via "replacement patterns" within the Drupal View.  You get this link from the mailing itself, before it is sent.  All mailings have a similar link pattern, but each a unique number
Create a Relationship in the view to the Drupal User.  Limit the results to the "current user" or the "logged in user".  I forget the precise wording.  This shows them "their mailings" - rather than everyone's mailings.


Upgraded to 5.4, Donor Report fails with bad sql. Status_id is missing

This error will occur if you have missing/inactive Batch Status. To check navigate to CiviCRM >> Administer >> System Settings >> Option Groups. Search for Batch Status and then click on options link besides it.

You should see 'Data Entry' if not then you will need to add it as it is required by CiviCRM or enable it if its disabled.

  Note from Paul:  It existed and was enabled; however, it had a value of 0 as did Reopen and Export. I looked at a demo and saw they
  have other values. Just hitting the Edit in order Data Entry, Reopen,
  Export and saving caused them automatically have the right value. That
  fixed the issue. Add this info to your answer and I'll check it and up
  vote it.

HTH

Pradeep


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

Applying a patch to a standard install doesn't require you to switch it over to Git. You can just apply the patch from a given PR (let's say it is PR #12345) like so from the command line:

cd path/to/civicrm
wget https://github.com/civicrm/civicrm-core/pull/12345.diff
patch -p1 < 12345.diff
rm 12345.diff


Some problems to add email account in CiviMail CiviCRM

First step would be to use Server: imap.gmail.com. smtp.gmail.com is for outgoing mail and Bounce Processing is for checking incoming mail.
Second step would be to verify that Less secure app access is enabled in Gmail.
If that doesn't solve the problem, here are the settings that work for me with Google Apps for bounce processing, same as what you have but using POP instead of IMAP:
Server: pop.gmail.com Protocol: POP3
Optionally, add Local part: myemail+ if you want VERP processing.


How to show only the relevant County/State of multiple countries in a profile?

If you have a state/province field on its own, it will have all options for the countries' states you enable on your site.  If you have a country field alongside a state/province field of the same location type, the state listing will depend upon the selected country (regardless of whether the country's states are enabled).

My hunch is that you have different location types for the two fields. Changing them to be the same should make it work.

(While it may seem maddening at first, it's a good feature.  You can have multiple addresses in your profile, and if your home state field were to change as you set the work country field, that would be a problem if your addresses are in different countries.)

Counties work similarly with regard to states, except you must use a state field: there are so many US counties with repeating names that it would otherwise be a big problem.


How can I select all countries to be available for address fields in CiviCRM 4.7?

While a better user interface would be preferable, there IS a pretty decent solution for technical users suggested here: https://civicrm.stackexchange.com/a/10013/12


Welcome to civicrm SE, Can you make sure if you have 'CiviMail: access CiviMail subscribe/unsubscribe pages' permission set to anonymous and autheticated sure?
Can Check under CiviCRM >> Administer >> Users and Permissions >> Permissions (Access Control) >>  WordPress Access Control


Adding contribution_id or transaction_id to Receipt


How can I set up the default CiviCRM error page/message inside the site template?

you can override (not recommended):

templates/CRM/common/fatal.tpl

or set your custom error template here:

http://d46.demo.civicrm.org/civicrm/admin/setting/debug?reset=1

You can also specify a different error handler in that setting


Can not add Relationship to contact post CiviCRM 4.7.30 upgrade

Ensure you have extension nz.co.fuzion.entitysetting enabled as it is a requirement of nz.co.fuzion.relatedpermission


Return-Path vs. unsubscribe and X-CiviMail-Bounce

Turns out it was a problem with exim, which was apparently changing the headers civi was sending.

After working with our host they were able to adjust exim.conf to make it work.  Here's what they did which may or may not be completely correct, and may or may not solve others' problems, but it' a start

At the very top of exim.conf add

local_from_check=false
untrusted_set_sender = true
local_sender_retain = true

Here's the reference: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html

"If local_from_check is set false, the From: header check is disabled, and no Sender: header is ever added. If, in addition, you want to retain Sender: header lines supplied by untrusted users, you must also set local_sender_retain to be true.

These options affect only the header lines in the message. The envelope sender is still forced to be the login id at the qualify domain unless untrusted_set_sender permits the user to supply an envelope sender."


Good resource for learning civicrm and drupal

There are lots of tutorials available for CiviCRM. Here are some of the links that were useful for me while i was training someone 2-4 years ago.

https://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=38994278
https://docs.civicrm.org/
https://www.youtube.com/watch?v=XxexhDSzSME
https://www.youtube.com/channel/UCbmFxo3HyO9gaNG40byQjiQ
https://www.youtube.com/watch?v=a5bjr0s02NQ -- CiviCRM 101 Webinar
Series for Newbies
https://www.youtube.com/watch?v=ERGOSCIny0c -- CiviCRM 101 Webinar
https://www.youtube.com/playlist?list=PLjSU7YfE0E01HW7JPVAI80XDI0sgOSPDs

You can also look to past CiviCRM conferences. A lot of presenters upload their notes to the session pages or visiting local events if they are held nearby your places.

Similarly you can find lots of videos and documentation on drupal.

If you have good knowledge of PHP, MYSQL, Javascript then try to submit a patch for open issues or feature request.

HTH

Pradeep


How to automatically generate a csv file?

Civireports can send a file automatically so set up a CiviReport with the filter of your choice, then under the "Access" tab, you can enter an email to send the report to. From there, check out Scheduled Jobs to configure the report to send the .csv file at whatever interval you wish
(pete with appreciation to Justin for writing most of the answer)


Currently this is working on my development site:

Code removed as the actual solution is now in CiviCRM v 4.6.3

The first part is gets the payment status to flip to completed, the second section lets the IPN call back complete and send the email.   This is by no means perfect as if wp-load.php is NOT in the doc root it will fail.

It is a working solution for now.  Will comment if a better more flexible solution can be found

Patches for this problem are documented here:  https://issues.civicrm.org/jira/browse/CRM-15629

CiviCRM version 4.6.3 for WordPress fixes the issue


Pay later instructions don't show on membership contribution

Just Managed to test the same against CiviCRM 4.7.2

Membership has been created with an contribution pending status

But in pay later option their is no email sent in Civicrm 4.7.2
Where as when payment is made using dummy payment processor an receipt is been sent out

I guess this is an Bug in this version so you should wait till the next release or you need to roll back to CiviCRM Version 4.6.10 where this option is working fine - Please raise an issue for the same so this gets fixed in next release

I guess this helps


Why do front end dashboard/profile views create a duplicate Civi contact?

So a careful look at the civicrm_uf_match table revealed that some of the Joomla user IDs in the table were not the current user IDs of those users. Clearly the original Joomla users had been deleted and recreated with new IDs but the civicrm_uf-match table had not kept in sync with the changes. I'm not sure why - probably some past database problem that I've forgotten.  In Joomla installations, Civi only checks Joomla users for a linked Civi contact record when they interact with Civi as documented here.  So the matching of the Joomla user to the Civi contact was failing.  I manually changed the records in civicrm_uf_match to correct the Joomla user ID and all is now OK.


I didn't manage to test this but Receipt.pdf is been hard-coded in CiviCRM Core and if you need to change the name of the attachment then you need to look into the below file and you need to override the file to achieve your change

.../wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/confirm.php

'PDFFilename' => 'receipt.pdf' - Line 1274

Also look into the link before overriding the file

Can I override core classes or PHP files with custom versions?

I guess this helps!


CiviEvent - Confirmation takes a long time

When debugging issues like this, experience says "round" numbers in a delayed request (like 120s for two minutes, or 300s for five) are indicative of hitting a timeout somewhere in the hosting stack.

This might for example be -

a reverse DNS lookup that is failing (server lacks working DNS)
an HTTP or SMTP request triggered within CiviCRM or custom code which fails after some time (eg: email is timing out, server can't connect to your analytics engine, POSTs make connection to a spam analytics tool which isn't responding, ...)
"things like that ..."

Something is wrong here; that's not how CiviCRM works out of the box (try it on a demo site). But from the details here I can't tell you what's wrong.

Making specific guesses risks leading you astray even as it is likely to be of assistance. That said: You might want to check if this bug affects all situations where CiviCRM sends an email, or where CiviCRM processes a form submission.

This may require some debugging expertise I think - check out civicrm.org/providers if you don't have an existing team to lean on for this.

Do report back on the solution you find!


This might be tricky because the export csv button actually runs functions to compile the file and force the download using php header() and content-disposition attachment. See line 224 etc here to look at how it is working: https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Utils/Report.php.

You could probably write an extension that invokes the functions to generate the csv based on what's going on here. Or perhaps one exists?


The setup.sh is only necessary to build Mosaico, since it's still in beta.  You don't need it to actually run Mosaico.  Just download a pre-built version here: http://dist.civicrm.org/extension/uk.co.vedaconsulting.mosaico/latest/uk.co.vedaconsulting.mosaico-latest.zip


The answer rather depends on what data you have in CiviCRM and what you want to export.

One option is to export the data as a CSV file as Demerit says. This will allow you to export certain types of data - for example: contacts, event participants, activities.  You can do this via advanced search. See the manual for more details: Exporting your contacts.

Another option is to access the data directly from the database. This gives you more control to access the data that you need but would require some understanding of the database structure and SQL. If you have access to phpMyAdmin you will be able to export the SQL data using this (log in to phpMyAdmin and click on the Export tab). Alternatively your website hosting company may have a tool that allows you to export the SQL - you could contact them for help.

A third option to export the data via the API which would require some programming.


Civimail delivering AND bouncing at the same time - what's missing?

Figured it out finally: bad default setting in php.ini.

The isp had this param added by default: mail.force_extra_parameters adding "SMTP = smtp.myisp.net" to every outgoing mail sent by mail().

This caused every email to bounce when civi called qmail.

Sheesh. I want those two days back.


How to fix receipt/confirmation attached PDF alignment in email?

Maybe set up the default PDF form (Administer Communications PDF Format, ?page=CiviCRM&q=civicrm%2Fadmin%2FpdfFormats&reset=1) which allows you to define margins


Where are the 'Contributions - Receipt (on-line) templates stored?

Do you mean the code that uses the template?  If so, look at CRM/Contribute/BAO/ContributionPage.php and look for 'contribution_online_receipt' which is the template name for 'Contributions - Receipt (on-line)'.
Unless you want to pass different data to the template, you should just need to edit the template at Administer > Communications > Message Templates > System Workflow Messages
If you change the templates you might find this extension useful when you need to reconcile future core changes with your changes: https://lab.civicrm.org/extensions/msgtplhelper
And if you're making your templates look better, try this: https://lab.civicrm.org/extensions/prettyworkflowmessages


What is needed to make Payflow Pro Recurring Donations work?

This issue from 2009 seems to be the one to add payflow into the core:

https://issues.civicrm.org/jira/browse/CRM-5536

per Eileen comment:

  "Although the code is there to upload recurring transactions the
  customer opted not to complete the recurring payment side of things so
  this should be turned off in the payment_processor_type table for now.

  (code works but on-going querying of outcomes in incomplete)."

I would suggest you add a comment to this issue or contact Eileen on chat.civicrm if you want to know more about what's missing or an estimate of the number of hours need to make the recurring happen


Showing Financial Transaction Data with Contributions

Unfortunately there is no relationship being handled in views between contribution and payment(financial trxn table). You can do this by writing a small module implementing hook_views_data() hook with civicrm entity module.


Try clearing your caches: administer -> system settings -> Cleanup Caches and Update Paths;


Outbound email configuration. Different sending addresses with different servers

I am not sure if all this is possible in current version of CiviCRM

#1 - Yes, one can define and select From Address for sending emails.

#2 - CiviCRM sends email using settings defined in Outbound Settings.

#3 - There is no such way where one can specify outbound settings based on from address. But this is possible by creating extension that would create a settings page for each from address to save in civicrm_setting table and then have [hook][1] to alter the mailer setting before sending emails.

But i would still prefer you to wait for other people to provide solution.

HTH

Pradeep


CiviCRM Wordpress Member Sync w/ Wordpress Groups Plugin: How to add CiviMember to WP Group

This should be resolved in CiviCRM WordPress Member Sync version 0.4 which was released today. Group membership can now be applied via association rules, which means that the Groups v2.8.0+ schema for access control is now fully supported.


How to integrate with Drupal migrate to create a periodic import into CiviCRM?

I would expect 2/ ie https://github.com/eileenmcnaughton/civimigrate which we have made lots of use off for migrating legacy data. From memory we have one situation where client can 'click a switch' to run a migration to pull in latest data. I will flick a note to eileen to see if she can expand


Bounce processing - will fail for G Suite users when Google disables less secure apps in Feb 2021

Here's a potential workaround for anyone who can set up a non-G-Suite IMAP account. I haven't implemented or tested this.

Continue using your G Suite email address - it has your domain name and Google does SPAM etc processing
Forward email to your non-G-Suite account
Use this second account for Bounce Processing


Search Builder One of parameters is not of the type MysqlColumnName

I just tried to replicate this problem on the demo site but couldn't.

I would recommend upgrading to Civi 4.7.9, and if you still have the problem, you can do two things:

Try to replicate it on the demo server (demo.civicrm.org).  If you can't, the issue is most likely in the configuration.
The "DB Error" isn't really enough info to go on.  So you can go to Administer menu » System Settings » Debugging and Error Handling, and set "Debug mode" and "backtrace" to "yes".  That will give you a much more detailed error.  Updating your question with that info will let folks provide much more detailed information!


Problems with CF_CiviCRM Registration with Caldera Forms

This was my own confusion and I had help from the CF-CiviCRM author. Great support there.

The problem was related to conditional statements in the form. I had created conditions for the appearance of all the contacts in a multi-contact form, but I hadn't applied conditions to processors.

I had assumed that the conditions related to the show/hide fields were inherited by processors. That's not the case. Instead, each contact processor had to have its own conditions applied to the group of fields.

For example. Only process the second contact group if First Name 2 is %first_name_2%. In other words, if the first name of the 2nd contact is blank, don't process that contact group. This is regardless of whether the conditions allow visibility for that contact. The visibility rules were not applied to the processing of the group.

Lesson learned, and maybe someone else will benefit from my experience.


finding people with activities added by a certain user

You could use the search "Find activities" as in the screenshot. However this will only give you a list of activities as a result and not of the contacts (you can only see them in the results column). Maybe this helps anyway?


Make sure you back up first.

The display name field for the site concerned only contained first_name, last_name and prefixes. I assume in some case you might also want to append suffixes?

trim and replace are used to remove additional whitespace in cases where their was a null first or last name.

UPDATE civicrm_contact AS c LEFT JOIN civicrm_option_value AS ov ON c.prefix_id = ov.value AND ov.option_group_id = 6 SET c.display_name = trim(replace(concat(ov.label, " ", c.first_name, " ", c.last_name), "  ", " ")) WHERE c.contact_type = 'Individual' and c.display_name is null and (c.first_name is not null or c.last_name is not null);

Check if any contacts have no first or last name - but an email.

SELECT e.email FROM civicrm_contact as c LEFT JOIN civicrm_email as e on c.id = e.contact_id and e.is_primary WHERE c.contact_type = 'Individual' and c.display_name is null and c.first_name is null and c.last_name is null and e.email is not null;

in this case there was none so no need to do a further update.

The same for organizations

UPDATE civicrm_contact as c SET c.display_name = c.organization_name WHERE c.contact_type = 'Organization' and c.display_name is null and organization_name is not null;

Then you want to do the sort name

The select

SELECT c.id, CASE when c.last_name is not null and c.first_name is not null then concat(c.last_name, ", ", c.first_name) when c.last_name is null and c.first_name is not null then c.first_name when c.last_name is not null and c.first_name is null then c.last_name when c.last_name is null and c.first_name is null then e.email END from civicrm_contact as c left join civicrm_email as e on c.id = e.contact_id and e.is_primary where c.contact_type = 'Individual' and c.sort_name is null and (c.first_name is not null or c.last_name is not null or e.email is not null);

and the update

 UPDATE civicrm_contact as c set c.sort_name = CASE when c.last_name is not null and c.first_name is not null then concat(c.last_name, ", ", c.first_name) when c.last_name is null and c.first_name is not null then c.first_name when c.last_name is not null and c.first_name is null then c.last_name END where c.contact_type = 'Individual' and c.sort_name is null and (c.first_name is not null or c.last_name is not null);

Here I used case to resolve issue with multiple cases with both names, only first name only last name.

And finally organizations

SELECT count(c.id) from civicrm_contact as c where c.contact_type = 'Organization' and c.sort_name = null;


The automated messages can be edited here:

Administer>CiviMail>Headers, Footers and Automated Messages

You can also get to this under the Mailings menu.

Hope this helps!


Tested the fix from https://github.com/civicrm/civicrm-core/pull/17622 & can confirm it's now working as expected.


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

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

Issue 1: you have two solution for the same

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

ELSE

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

Issue 2: I guess this is also related to Version

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

I guess this helps !!!


Price Set won't let me turn off auto-pay on contributions

Unfortunately CiviCRM doesn't cuurently have support without custom programming for doing a one time payment at the same time as setting up recurring payments.

A very simple custom CiviCRM extension built using civix could implement a postProcess hook that filters for the correct contribution page, and then creates a one time contrution from the first priceset field and a recurring contribution for the second.

Most of CiviCRM partners should be able to do this for you or refer to one who can.


The easiest would be if you can find it in the CiviCRM custom groups? Using Administer/Customize Data and Screens/Custom Fields. If that does not work, check the table civicrm_custom_group. You will probably see an entry there with the column name 'is_reserved' having the value 1.
If that is the case, change the value for 'is_reserved' to 0 and check if you can see the custom group in the Administer menu now?

This would be the best way as you would delete all that you want to delete. If that fails, shout again?


Yes, pay later option their is no email sent in Civicrm 4.7.1 / 4.7.2
 Where as when payment is made using dummy payment processor an receipt is been sent out

I guess this is an Bug in this version so you could wait till the next release or you need to roll back to CiviCRM Version 4.6.10 where this option is working fine - Please raise an issue for the same so this gets fixed in next release

I guess this helps


webform membership : duplicate transaction & receipts and/or submissions

My first thought is (similar to what Pete's suggesting) to try:
https://www.drupal.org/project/hide_submit


Simple way to prevent one user seeing one contact

You could do that with hook_civicrm_aclWhereClause:

remove 'view all contacts', 'edit all contacts' for the case worker
create an extension implementing hook_civicrm_aclWhereClause eg:

function everyoneexcept_civicrm_aclWhereClause($type, &$tables, $whereTables, &$contactID, &$where) {
      if ($contactID == 'your_case_worker_id') {
        $where .= ($where ? ' AND ' : '') . " contact_a.id != 'your_case_worker_relative_id'";
      }
    }

For a one-off case, just hardcode the contact id's for your case worker and their relative.

Caveat - not extensively tested!


Error seems to be self explanatory, You need to have administer payment processors  permission to Add, Update, or Disable Payment Processors.

If you're an admin, you can grant this permission by navigating to

Administer -> Users and Permission -> Permissions(Access Control)

and click on Drupal/Joomla/Wordpress Access Control w.r.t your CMS.


Add custom field with multiple values to Contact Form 7 and Form Processor

Potentially you could also develop a new type of input in the Form Processor that deals with the comma separated list.


Webform integration for event registration

Can you check if "User Select" is still part of the Events list on the CiviCRM tab?

It MIGHT be somehow possible that the Webform field still exists but lost connection to the CiviCRM functionality. In that case the visitor still choses the event in the webform, but CiviCRM registers to all events.


Version 5.11.0, Event custom fields not carried over to repeat events

I think this is now fixed and should be part of 5.14. You can either wait for 5.14 release or apply patch from here.

Cheers

Pradeep


What's the purpose of adding a campaign when enrolling a membership

I don't have this use case and am not sure how you want to engage your constituents with this information linkage, but one possible use is in reporting. You can filter on campaigns, so if you want a list of members that have a differentiator not based on amount or date of membership, then you might assign them to specific campaigns. Similarly, "campaign" can be selected in Advanced search and used to create a smart group that can be used for mailings.


Why is CiviCRM mistranslating my string?

In the file /CRM/Core/BAO/WordReplacement.php you've got this delightful stanza:
// So. Weird. Some bizarre/probably-broken multi-lingual thing where
// data isn't really stored in civicrm_word_replacements. Probably
// shouldn't exist.
$stringOverride = self::_getLocaleCustomStrings($id);
$stringOverride[$config->lcMessages] = $overrides;

And digging in, you'll see it does this:
$domain = CRM_Core_DAO::executeQuery('SELECT locale_custom_strings FROM civicrm_domain WHERE id = %1', [
  1 => [$domainId, 'Integer'],
]);

In other words, it's pulling word replacement information from a field in the civicrm_domain file which is no longer accessible or used in the UI.
I looked in there and sure enough, I had an old collection of translations. By setting the field to empty, it solved the problem.


How to go to Batch Update via Profile in one click?

Luciano,  Unfortunately this can not be added as a menu item because you are working with a search result.

You could create a custom process that can be added to a menu.  Something like...create a custom contribution search (that filters by pending) with a hook that displays a profile that you can use to update.

If you need a consultant to do this for you, it is probably not worth it. Sorry....


what is the intent of contribution batches listing financial line items instead of contribution total

Yes, in some cases a change is just a correction of a data entry error, and in others it is an 'actual' business transaction change.

A primary objective of the CiviAccounts effort was to make the system audit-able so that certain generally larger organizations could start using CiviCRM. This requires that all changes are recorded. So for example, if a $50 cash contribution is received and recorded, then it is later changed to $25, the system will have recorded this change. This allows one to track what might be a significant change.

Generally, to prevent cooking the books like this to the benefit of a rogue employee, it is desirable to require a second person to sign-off or approve changes.

I think it would be reasonable feature request or perhaps new extension request to either not record bookkeeping entries for any changes made before a batch is exported or to allow a second person to approve them being deleted before the batch export. It might be more appropriate for certain types of batches, eg ones involving initial data entry, and not for others, eg online transactions.

This would be ideal for use cases like tiny orgs with less formal financial workflows, and for larger orgs that close data entry batches every day after reconciling with a tally of cheque amounts done with a calculator.

With respect to edits creating bookkeeping transactions that reverse then repost the same amount: that was an undesirable outcome of (re-)factoring the code to make it more modular and maintainable. The bookkeeping transaction for an edit can vary extensively based on changes to various fields in the contribution, and to various fields in each of the line items. I agree this leads to undesirable bloat of bookkeeping transactions. In defense of this implementation approach, popular accounting packages do the same thing when saving a change to the cheque number associated with a transaction.


How to configure authorize.net payment processor to use another currency

It sounds like the API call and/or payment form in CiviCRM would need modification to handle say, USD -OR- Euros -OR- GBP, is that right? Seeing that no further answers were given since Feb 2017.  And in Authorize, the payments might have to go to different accounts?


Event registration fatal error since v5.0.1

The two versions Stuart mentions are different extensions.

https://civicrm.org/extensions/sparkpost-civicrm-integration is the PESC extension from https://github.com/proexchange/com.pesc.sparkpost and the replacement used by Stuart is the Cividesk extension.

I had the same problem experienced by Stuart with the PESC version on a D6 system running CiviCRM 5.0.0. I seem to have fixed it using Stuart's sleuthing - I simply edited the sparkpost.php file and replaced source_record_id with source_contact_id

Everything seems to now work. (I'll report back if I find other problems).

UPDATE: The latest version 1.3.7 of com.pesc.sparkpost fixes the problem.


Individual Update Employer address/profile informaiton

for WP or Joomla i think the only in-built option is if your Contact has a Permissioned Relationship with their Employer then they should be able to view and edit some details about their Employer via their Contact Dashboard.

But my quick test on demo (i guessed the url to get to the dashboard since i don't 'know' WP) doesn't show the permissioned Relationships I just created for 'demo, demo' on the Contact Dashboard, which I assumed (wrongly) was just a setting but MyContacts/Organisation was checked - hmm .

So either there is another setting that I have forgotten, or this is something I didn't know was a limitation in WP, or something else ;-)

But try it on your local anyway.

Also worth nothing that you can provide 2nd degree permissions via a setting (which i do see on WP)


Auto-filing e-mails on Cases: Mail content not shown under details and attachment with extension .unknown created

Regarding the ".unknown", you can update the list of extensions it recognizes at Administer - System Settings - Safe File Extensions.

Regarding the rest that isn't how it used to work. Not sure if something's changed recently or maybe there is something unusual about those emails. You say it's both html and plain - are all the emails coming from the same source or different types of sources, e.g. MS Exchange, gmail, etc.

UPDATE: https://lab.civicrm.org/dev/core/issues/940


How to view CiviCRM Event Participants Custom Participant Fields?

I was able to do this using the Event Participant Report (List) and selecting my custom field for display.


How do I view a "Scheduled and Sent" mailing without creating a draft?

If you go to the Report for that Mailing (via Scheduled and Sent Mailings), then there should be a link on that page to HTML Message - view complete message


Two answers:

Do you have detailed logging eanabled?  If no, then no - you can restore a backup of your database (to a test site) and copy the data out.

If you have advanced logging enabled: you can use SQL.  You need to know the ID of the deleted mailing - you can check the titles with SELECT DISTINCT id, name FROM log_civicrm_mailing.

Once you find the ID number, substitute the X at the end of this query for the ID.

INSERT INTO civicrm_mailing (id, domain_id, header_id, footer_id, reply_id, unsubscribe_id, resubscribe_id, optout_id, name, mailing_type, from_name, from_email, replyto_email, subject, body_text, body_html, url_tracking, forward_replies, auto_responder, open_tracking, is_completed, msg_template_id, override_verp, created_id, created_date, scheduled_id, scheduled_date, approver_id, approval_date, approval_status_id, approval_note, is_archived, visibility, campaign_id, dedupe_email, sms_provider_id, hash, location_type_id, email_selection_method, language, template_type, template_options, modified_date) SELECT id, domain_id, header_id, footer_id, reply_id, unsubscribe_id, resubscribe_id, optout_id, name, mailing_type, from_name, from_email, replyto_email, subject, body_text, body_html, url_tracking, forward_replies, auto_responder, open_tracking, is_completed, msg_template_id, override_verp, created_id, created_date, scheduled_id, scheduled_date, approver_id, approval_date, approval_status_id, approval_note, is_archived, visibility, campaign_id, dedupe_email, sms_provider_id, hash, location_type_id, email_selection_method, language, template_type, template_options, modified_date
FROM log_civicrm_mailing WHERE log_action = 'Delete' AND id = X;


Unable to upgrade in WordPress from 4.6.12 to 4.7

There are a million reasons why this could be happening - you could look in your PHP logs (which, if you're running Apache with mod_php, will be in your Apache logs).  you can also check your CiviCRM log in the ConfigAndLog directory.

I find that if an upgrade isn't working, I'll often have better luck with an upgrade from the command line.  Unzip CiviCRM as you would normally, but instead of visiting the upgrade script page, run wp-cli civicrm upgrade-db.  This presumes you have wp-cli with the CiviCRM extension installed, of course.  I'll also get better error messages, in general.

Since you've got a failed upgrade, don't forget to roll back your database - and don't forgot to drop your database before you reload the backup, or you're likely to have more upgrade errors!


entityRef widget seems to not respecting params

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

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

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

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

$form->removeElement('related_contact_id');

and then add the field.

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

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

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


This happened to us, and it turned out that we didn't have a "supervised" dedupe rule defined for individuals. You can have at most one "supervised" and one "unsupervised" dedupe rule. Our supervised rule had disappeared (though I haven't worked out how). I recreated it and the error disappeared.
There's some relevant documentation here: https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/#dedupe-rules


How to keep contacts to a GROUP for a limited period?

I think you can create a smart group based on Event type and Registration date this year. This will have contacts who will be registered for an event for 2019 and then will be removed automatically when its 2020.

HTH

Pradeep


Network Error on Contact Search Results page change

[SOLVED] Yes found an answer with the help of the CiviCRM team - see https://lab.civicrm.org/dev/core/issues/963

The issue is MySQL configuration after upgrading, which adds ONLY_FULL_GROUP_BY to variable sql-mode.  There is a link to a patch but I found it straghtforward to remove this by adding the following line to my.cnf

sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Hope that helps.


In Civi we have a Contact named Cash that we use for this. This is an Individual contact type, no need for an additional Contact Type.

We use Price Sets (Line Items) to record Designations so we just have one "Cash" donor. Even if you use Campaigns, you could still get by with just one "Cash" donor.


Is there a function that will execute multiple SQL statements?

Yes, there is such a function; but you shouldn't use it.

Make each query separately and check the result.

Avoid functions which make multiple SQL queries in one action, as they make it harder for your application logic to handle unexpected cases.

CRM_Core_DAO::executeQuery() executes a single query against the DB - use this.
CRM_Utils_File::sourceSQLFile() does what your question asks - but don't use this.

Why not CRM_Utils_File::sourceSQLFile()?

The pattern of loading a .sql file in as a single set of queries via CRM_Utils_File::sourceSQLFile(); has issues IMO. It's one of the brittle points where I've most commonly seen sites (especially customised ones) fail on upgrades.

The cause for this is that it's a context switch in your code - when you load multiple queries in via sourceSQLFile(), you lose the ability to respond to a failure in any given one. Whether it's the first query which fails, or the second to last, sourceSQLFile is going to do no more than echo back a failure message OR die() - it doesn't return a result or throw an exception.

Code using this approach has to do extra work to handle failures - or assume they never happen, which is what this function IMO encourages. Looks like there are other things to be wary of there (eg no warning if $fileName doesn't exist).

Why is calling each query separately, eg via CRM_Core_DAO::executeQuery(), better?

In contrast, calling each query via CRM_Core_DAO::executeQuery() (or its future replacement) means your code can check the result of each query, and based on that information proceed with further queries OR handle the case of a failure in that executed query.

I think you'll be better served by taking a more diligent approach and calling each SQL query with context to handle the result each time.


Caldera Forms (Wordpress) - Handling of Duplicate matching rules

Dedupe rules are set in the contact processor. If you want it to create a duplicate, create a dedupe rule in Civi that it can never satisfy. A dummy one basically :)


Ran into something similar. There are some database table alteration between 4.7.5 and 4.7.6 (specifically relating to foreign keys). These edited CiviMail tables. If you have used CiviMail extensively, these tables could be quite large. The ALTER TABLE commands can take a very long time causing time outs.

The quickest option is to backup these tables, trucate them, run the CiviCRM 4.7.5 to 4.7.6 upgrade comands, and, finally, reimport the data.

Affected tables:

civicrm_mailing_event_queue
civicrm_mailing_recipients


Base table not found for civicrm_contribution_page #201

This happens when you have separate database for civicrm tables. Below patch in civicrm_entity module fixes problem for 'Base table or view not found:'

diff --git a/src/CivicrmEntityViewsData.php b/src/CivicrmEntityViewsData.php
index 51db201..ffbb31d 100644
--- a/src/CivicrmEntityViewsData.php
+++ b/src/CivicrmEntityViewsData.php
@@ -17,6 +17,8 @@ class CivicrmEntityViewsData extends EntityViewsData {
     $base_table = $this->entityType->getBaseTable() ?: $this->entityType->id();
     $base_field = $this->entityType->getKey('id');

+    $database = _civicrm_get_db_config()['key'];
+
     // Setup base information of the views data.
     $data[$base_table]['table']['group'] = sprintf('%s (CiviCRM Entity)', $this->entityType->getLabel());
     $data[$base_table]['table']['provider'] = $this->entityType->getProvider();
@@ -27,6 +29,7 @@ class CivicrmEntityViewsData extends EntityViewsData {
       'field' => $base_field,
       'title' => $this->entityType->getLabel(),
       'cache_contexts' => $this->entityType->getListCacheContexts(),
+      'database' => $database,
     ];
     $data[$base_table]['table']['entity revision'] = FALSE;
     if ($label_key = $this->entityType->getKey('label')) {


Use Mosaico or easy editor to edit email system template

There is nothing in Civi that provides this, and no Extensions I am aware of that provide this. No it cannot be done using Mosaico.


How do you move SSL to non-SSL? [ Wordpress 4.6.1 + CiviCRM 4.7.14]

Verify the file which is being reported as having a syntax error. PHP has a syntax check mode with -l (for "lint").

php.exe -l C:\vhost\sdbikecoalition\wp-content\uploads\civicrm\civicrm.settings.php

If civicrm.settings.php is not valid PHP, CiviCRM will not function - SSL or no SSL.

Note that your local PHP install may differ in version and therefore syntax from the PHP installed on your server.


Can we expose the membership description field within a Drupal View

I've added a Views relationship to the CiviCRM Entity project that will allow you to do this.

You must also enable the sub-module, CiviCRM Entity Views Extras.

It is in the 7.x-2.x-dev as of Jul 7 2018, and will be included in the next release (2.2)

Once you have the two modules installed, you will be able to add a Views Relationship titled "CiviCRM Member: Membership Type" to your View listing contacts.

Once that Views relationship is in place, all the properties of the membership type table, including the membership type description will be available to include in your view.

Here's export code for an example View that you can import to see for yourself:

$view = new view();
$view->name = 'contact_view_with_membership_type_description';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'civicrm_contact';
$view->human_name = 'Contact View with Membership Type Description';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Contact View with Membership Type Description';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'table';
/* Relationship: CiviCRM Member: Membership Type */
$handler->display->display_options['relationships']['civicrm_membership_type']['id'] = 'civicrm_membership_type';
$handler->display->display_options['relationships']['civicrm_membership_type']['table'] = 'civicrm_membership';
$handler->display->display_options['relationships']['civicrm_membership_type']['field'] = 'civicrm_membership_type';
/* Field: CiviCRM Contacts: Contact ID */
$handler->display->display_options['fields']['id']['id'] = 'id';
$handler->display->display_options['fields']['id']['table'] = 'civicrm_contact';
$handler->display->display_options['fields']['id']['field'] = 'id';
/* Field: CiviCRM Membership Type: Membership Type Description */
$handler->display->display_options['fields']['description']['id'] = 'description';
$handler->display->display_options['fields']['description']['table'] = 'civicrm_membership_type';
$handler->display->display_options['fields']['description']['field'] = 'description';
$handler->display->display_options['fields']['description']['relationship'] = 'civicrm_membership_type';
/* Filter criterion: CiviCRM Member: Membership ID */
$handler->display->display_options['filters']['id']['id'] = 'id';
$handler->display->display_options['filters']['id']['table'] = 'civicrm_membership';
$handler->display->display_options['filters']['id']['field'] = 'id';
$handler->display->display_options['filters']['id']['operator'] = 'not empty';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'contact-view-with-membership-type-description';


Exists an unresolved localization issue that probably explains your translation problems. You can see here:

CRM-17737
New Mailer dialog seems impossible to translate


How can I search contacts and run a report of contacts with no activity

Use search builder to search for all contacts with the activity field: activity date of "not null" and add them to new group "has activities". Use the include/exclude custom search to find any contact not in the "has activities group and add them to a new group "no activities".


How do I create a profile listing of multiple-record user relationships?

Interesting question. I was about to launch in to my usual - do this with either webforms, or Views, CiviEntities, VBO etc but knowing that the VBO interface is not 'great' for general users I wondered what could be done via multiple record fields and profiles.

You hadn't specified if you were thinking of using Civi Relationships, though the word is in the subject. But I don't think civi can give a user access to edit their own relationships particularly easily.

A Webform could be the solution since it does allow you to manage your start / end date etc so may be worth exploring more.

ANyhow, on demo site (which will of course be refreshed within 24 hours and lose this set up) I set up a multiple record field set with 2 types of 'employer fields' in case Contact Reference would be an option too (seems not from my testing based on the existing permissions for 'demo')

http://d46.demo.civicrm.org/civicrm/admin/custom/group/field?reset=1&action=browse&gid=8

There is also a profile set up with this used for View/Edit

So now if you go to

http://d46.demo.civicrm.org/user/2/edit/Employment_History_16

you will see the fields, and the user can Edit and Add new records to these fields.

Not sure how close this gets to answering your question since it does not use the Current Employer field, and does not use civicrm Relationships.

But i thought I would go down this route as I need to familiarise myself with what is now possible with multiple record fields in the newer versions. ;-)

Also noting that the Contact Reference field works fine in the civicrm tab on the contact record eg for http://d46.demo.civicrm.org/civicrm/contact/view?reset=1&cid=202 but not when it is used in a Profile which may be a well known limitation but just mentioning it here in case it might just be permissions or less likely a regression


Edit link in directory results not displaying

In the shortcode when adding a Proile to WP Page/Post there is an option for Search/Public Directory, the shortcode would be something like this

[civicrm component="profile" gid="#" mode="search"]

Replacing the # with the ID of that profile. That provides a page that starts with a search to then view results.

If you include force=1 in the shortcode it will show all results and the search needs to be extended to use to them filter results.

[civicrm component="profile" gid="#" mode="search" force="1"]


Two payment processors options on one webform

You can use multiple payment processor on a contribution or membership or event registration online forms. However the user will need to manually select which payment processor he would like to choose or you can add custom javascript to hide payment processor selection and set the payment process based on the selection of recurring option or membership they choose. This is same on offline forms as well.

HTH

Pradeep


How to search active relationships (e.g) during past year?

I would do the following, although it's a bit complicated so maybe you will want to develop a custom search after reading :).

Create a smart group to keep track of your active volunteers by searching for relationship type 'volunteer for' and status = active only (no start or end dates so you grab those empty end date people).

When you have your date criteria, for example the past year, create a group of folks who stopped volunteering in the past year by searching relationship type 'volunteer for', status = inactive only, and end date choose range choose your range, such as Jan 1, 2014 - Current date.

Now to get folks who are still active, or ended in the past year, do an OR search (checkbox in advanced search) using your 'active' smart group and your 'inactive in the past year' group.


packages/Net/UserAgent/Detect/APC.php flagged as malicious by Wordfence Firewall

What I believe it's flagging based on the "description" line in your post is probably that the UserAgent tool could be used by bad people to get information about a browser, possibly to look for versions or configurations with known security holes to exploit. But it doesn't seem to be used in CiviCRM as far as I can see, and the APC.php subclass file all it does is store the results in the APC cache if you're using that. I wonder if the whole Net/UserAgent folder could be removed from Civi.

UPDATE: It looks like the file will be removed in civi version 5.22: https://github.com/civicrm/civicrm-packages/pull/272


I would suggest that you take a look at the documentation: Importing Data into CiviCRM

Read through this and follow the steps carefully. Try to export a small number of contacts - i.e. the first ten or so. If you are able to import these then the problem may be with some of the data in the later records.

You may need to change the export settings so that fields are separated by a semicolon (;) rather than a comma (,).

You may find the answers to this related post helpful: CSV file import problem with file from Mac MS Office

If you are still having trouble it would be helpful if you could paste an example of the CSV file to your post with dummy data replacing any real data.  Again, just the first few lines would be sufficient.


How to display CiviCRM Custom Fields in a Drupal 8 View

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


Mass Emailing based on event day and time

You can use schedule reminders to send notifications based on event dates and status


I only want people to confirm their membership type (or choose another one) via a webform, but no membership to be renewed or created

You could display a (read-only) Views block on your webform that shows the contact's Membership status.  Relevant links and details on how to get the info to pre-populate are here:

Displaying a Views block with a CiviCRM-enabled webform


I was going to say, "Do a search for participants (not contacts), then select PDF letter" ... but then I tried it - and there are still no event tokens.

Some work was done to add participant tokens in CRM-16734.  Although the Fix Version is 4.7.15 the related PR (PR-9038) was closed without merging.

So unfortunately I don't have a solution for you but confirming this is a known gap in functionality. It would be great if you can do anything to help progress the issue.


Can a person inside a group be granted ACL Access to the group?

Ah, ok.  So I had to enable the " CiviCRM: view my contact" and "CiviCRM: edit my contact" fields under Drupal People -> Permissions.  Then if they are in the smart group I'm giving access to, they can see themselves.


DAO,BAO files are not reading in custom folder

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

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


How to access multiple CiviCRM website fields for a contact in Drupal Views?

in your CiviCRM tab -> you can set the Number of Email fields to 2 -
and then set one to Email Location: home and one to Email Location:
work (and decide which one is primary). Save Settings.
next: in your Webform Tab -> go ahead and hit Edit on the Elements
you've just created -> change the Label to anything you want -> so
that the user knows which Email address to plug in - in which field.
in Views -> to create a Member listing. First of all make sure you
have CMS database integration enabled -> check:
civicrm/admin/setting/uf?reset=1 - and follow the Views integration
settings instructions
then into Views -> make a View to display e.g. Contacts -> then add
Fields for Email -> once you have added the field you can hit Edit
and specify which one you'd like -> make that Primary or Work or
Home. Add another Field for Email -> select another Location Type.
That way you'll have multiple Email columns of different Location
Type.

PS - just realized you said website -> but the recipe should be identical;

EDIT: - ah it's not - I just checked and it looks like Views integration is not quite working for that specific field yet (or it's a bug). Your workaround would be to store these fields yourself - in custom fields. Then you have complete control over them in both webform_civicrm as well as in views listings. I'll file an issue on JIRA

EDIT: reported: https://issues.civicrm.org/jira/browse/CRM-19258


This sounds like an issue a customer of ours encountered. In the end they resolved it at the device level.
From our issue tracker notes on the subject:

The issue is to do with character encodings. CiviCRM emails are sent with the following headers:

Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset=utf-8

Whereas it appears Exchange is re-encoding these as 'quoted-printable' when serving them to the iOS device:

Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Here was their final feedback to us

"You were right about this being something to do with legacy mailservers, etc. Sort of. I sorted out how to replicate this behavior on ANY iOS device. Simply create a new mail account on your iOS device using the "Exchange" option as outlined here: http://www.macobserver.com/tmo/article/how-to-set-up-gmail-on-ios-using-exchange-activesync
Although he isn't here today to ask, I believe our ED has his email setup this way on both his iPhone and iPad, and this is causing the issue. I will check in with the member who is experiencing the same issue and see if they are on an Exchange server or a Google mailserver set up in a similar manner.
I'm setting this to resolved, and we'll work internally to get all our people on the correct iOS settings.
Thanks much for your help!"


How to work with names that don't fit first, last

Many thanks to Andrei for supplying this answer in a comment:

If you navigate to Administer->Customize Data and Screens->Display Preferences at the bottom you have two fields:
Individual Display name format: {contact.first_name}{ }{contact.last_name} and
Individual sort name format: {contact.first_name}{ }{contact.last_name}

By updating this setting I can just put whichever is the first name in the first name field, the rest of the names in the last name field, and the records will always show name1 name2 name3 ... everywhere it is listed/sorted.
The last step was to update the existing entered names. I did this with the following SQL, which was appropriate for my particular use (and may not be for yours!):
UPDATE civicrm_contact SET sort_name = display_name
WHERE contact_type = 'Individual';

And now my names are working exactly as the client requested throughout the system. Many thanks.


Under Administer - Custom Data and Screens - Display Preferences menu item there is a section for "Contact Dashboard"

You can turn on or off the display of Groups, Contributions, Memberships, Events, My Contacts/Organizations, Pledges, Personal Campaign Pages, Assigned Activities, Invoices / Credit Notes


How do I modify a core CiviCRM file (to change a search order)?

The answer is already here. According to tiny mention at the bottom of http://wiki.civicrm.org/confluence/display/CRMDOC/Directories page, it is possible (and, more important, it works!) to copy modofyed core files to  Custom PHP Path Directory (at civicrm/admin/setting/path?reset=1) , preserving original files/folders structure, so next time CiviCRM gets security updates, changes should be kept (unless original file / function major changes).


Error message when trying to run scheduled email send - Joomla

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

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


You can check in custom field settings if "Is this Field Searchable?" is enabled. I think it is necessary to mark it, to appear in the import selectable fields.


Drupal Views starts off with a base table - do you want to look at:  User, Nodes, CiviCRM activities and so on.

So if the base table is Nodes, then it's looking at nodes for the date info and displaying them.

If the base table is CiviCRM Activities, it's looking at those for the date info and displaying them.

But currently in Views you cannot combine this data. They are two separate views.

Back in the forums there has always been discussions about combining Drupal node dates and CiviCRM event dates - it's the same problem.

So out of the box there is not really a solution for this.


What is the best way to associate a building with a person?

In order to answer "best way", would need to know what are the tasks you do that use this information and what reporting you need. But as a general answer, one way is to create a new contact type (Admin - Customize - Contact Types), and then add your buildings as contacts. You can create custom fields on those contacts to store camera information etc. Then create a relationship (on the relationship tab on the contact) to the people (or household, depending on whether you're using household records or not, or simply prefer to directly relate to the people). Then when the people leave, you end the relationship(s) and make new ones with the new people.


Using Search Builder to search on a field with custom location gives DB error

For completeness, my comment probably should have been an answer…

I think this is probably a bug.

It doesn't matter if you create a new location type or use a pre-populated one. The sql has a column that doesn't exists and it's going against the wrong table.
Here's the sql:

SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name
FROM   civicrm_contact contact_a
WHERE  ( ( LOWER(Home-location_type.name) = '8' ) )
AND    (contact_a.is_deleted = 0) GROUP BY contact_a.id
ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc

[nativecode=1054 ** Unknown column 'Home-location_type.name' in 'where clause'"

AlanGallery submitted a bug see comment above.


Cannot create Survey when Events have 'is required' custom data: is this the fix?

I've created an issue and a PR for this fix. See https://issues.civicrm.org/jira/browse/CRM-18447 and https://github.com/civicrm/civicrm-core/pull/8188


The cron job "Activity processor (Hourly)" fails

If you turn on debugging (Administer menu > System Settings > Debugging and Error Handling) you should get a more verbose error from cron, which should in turn allow you to troubleshoot - or at least update your question with more info!


Civicrm views bulk operations contact delete operation not working

It worked when I just tested it. You should know that Civi can be configured to hold the contacts in 'trash', so they might look like they are still there, but you will notice they are marked for permanent deletion and don't show up in any reports.

You should change your View to filter by "Contact is Deleted" set to 0.


Will Stripe Payment Processor work with CiviCRM 4.6 and/or Drupal Webforms?

We are using Stripe with 4.4.14 and had problems accepting payments for memberships using a webform. With investigation though, our developer installed a version of Stripe 1.9.1 from the github and the latest dev build of webform and it is now working for us.

Whether anything within 4.5/4.6 has changed to make our experience irrelevant, that I can not answer.

Whether it is useful or not, contrary to the information on some of the links you provide indicating it might be a problem with the webform module; in our case it was apparently the Stripe module that was the issue.


new feature? - all addresses needs to be searchable

In the advanced search under the "Address Fields" you can choose "Address Location" which defaults to primary only. By selecting all of them you can search by any address type.  answer taken from this thread Using custom fields to store secondary addresses


How to output 'Event Source' field for attendees of an event?

"Source" is available in the reports as of Civi 4.7.2: see CRM-18042.

So one option is to upgrade to Civi 4.7.  Another option is to backport the patch, which is a lot less work than a custom report.  I'd give it a 95% chance that you can simply insert the lines from the patch into the appropriate file on 4.6 and it'll just work.


How to hardcode the unsubscribe /optout URL in a transactional email?

I think the unsubscribe link either needs mailing id or group id. The other option would be to create a profile with groups and opt-out field. And the include the profile as a unsubscribe link

https://example.com/civicrm/profile/edit?reset=1&gid=2&id={contact.contact_id}&{contact.checksum}

Where gid is a profile id.

Cheers

Pradeep


For activities of type Email, how do I get the id for the activity just created during hook_civicrm_postProcess?

As of 5.36 this wouldn't be possible in a way consistent with other activity types anyway, because if there's multiple recipients the system will now create multiple activities, so in 5.36+ the form doesn't correspond to a single activity like with other activity types.


How should I copy a site from production to staging?

Many of the steps documented on the "Migrating a site" wiki page are handled automatically now.  Here's my recipe, which is far from perfect, but is much closer.

Copy the entire filesystem to the staging server.  Git works well for this, but when it's not an option, we'll use SFTP or create a tarball.
Dump the database using mysqldump, either directly or using drush civicrm-sql-dump or wp-cli cv sql-dump.  Copy the db dump to the staging server.  We don't use git for this because of the database size; we either use drush sql-sync or copy it manually.
Assuming a manual database dump copy, we need to remove the trigger definers - unless the MySQL username is identical on both production and staging.  I use sed -i -e 's:/\*\!50017.*\*/::g'.
Load the database into MySQL on the staging server.

Assuming this is not the first time we set up the server, we're done!  On first time setup, there are a few other things we need to do:

Replace all the usernames, passwords, paths, etc. in settings.php, civicrm.settings.php, and/or wp-config.php with the values appropriate to the staging server.  If using git, these files are ignored in git, only local copies exist.
There are a number of values we override in civicrm.settings.php on the staging server to use the appropriate paths.  Here's what I put in mine, directly below the <?php marker:

.

global $civicrm_setting;
$civicrm_setting['CiviCRM Preferences']['allowPermDeleteFinancial'] = 1;
$civicrm_setting['Directory Preferences']['customTemplateDir'] = '/home/jon/local/example/wp-content/civicrm/templates';
$civicrm_setting['Directory Preferences']['customPHPPathDir'] = '/home/jon/local/example/wp-content/civicrm';
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/home/jon/local/example/wp-content/civicrm/extensions';
$civicrm_setting['URL Preferences']['extensionsURL'] = 'http://example.local/civicrm/extensions/';
$civicrm_setting['URL Preferences']['imageUploadURL'] = 'http://example.local/wp-content/plugins/files/civicrm/persist/contribute/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://example.local/wp-content/plugins/civicrm/civicrm';

In Wordpress, we also need to add a few overrides to wp-config.php.  Some of these may be overkill but:

define('WP_HOME','http://example.local');
define('WP_SITEURL','http://example.local');
define('RELOCATE',true);

Finally, if this is a multi-site Wordpress, we need to do a search and replace of the database for the URL.  We do this with wp-cli search-replace https://oldsite.com https://newsite.com but this tool also does the trick.


How can I track donor movement on CiviCRM?

It is not entirely an answer to your question but you would probably be interested in the extension CiviRules that is being developed. Check:
https://civicrm.org/blogs/erikhommel/civirules-sprint-january-and-march-2015
and/or
http://redmine.civicoop.org/projects/civirules/wiki


Do not send scheduled reminder if at least 1 membership is active

yes this can be problematic. You may also find that having other 'expired' memberships will trip you up when doing other searches etc. Therefore in a similar situation we have opted to find all the historic expired memberships and set them to a new Membership Status of 'previous expired'. that helped reduce confusion and would resolve your Scheduled Reminder issue to.


Email Send Now (to 50 or Less) - More than 50?

Its a hidden setting and can be set in below ways

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

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

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

Via api explorer


Does webform civicrm update contribution_recur_id when creating recurring contribution and membership?

Yes, it does, but only when you select 0 for installments (ongoing commitment) otherwise it seems to not link the recurring properly.


I found the solution by changing two lines of PHP for the Contribution Detail report (CRM\Report\Form\Contribute\Detail.php) and putting it in our Custom PHP directory.

The filters section for the batch name field reads by default (Civi 4.6.20) as follows:

  $this->_columns['civicrm_batch']['filters']['bid'] = array(
    'name' => 'id',
    'title' => ts('Batch Name'),
    'type' => CRM_Utils_Type::T_INT,
    'operatorType' => CRM_Report_Form::OP_MULTISELECT,
    'options' => $this->_allBatches,
  );

By changing the operator type and commenting out the options, I was able to get a widget with an "Is empty (Null)" option (thanks to the wiki, I knew to look in CRM_Report_Form for the possible values.)  My code now reads:

  $this->_columns['civicrm_batch']['filters']['bid'] = array(
    'name' => 'id',
    'title' => ts('Batch Name'),
    'type' => CRM_Utils_Type::T_INT,
    'operatorType' => CRM_Report_Form::OP_INT,
    //'options' => $this->_allBatches,
  );


Finding contacts without relationships (API)

Yes you can! I fiddled with the APIv4 Explorer a bit and came up with this:

The trick is to join onto RelationshipCache with the relationship type(s) you are wanting to exclude (note that the double quotes around '"Parent of"' are needed because you are passing a string literal not the name of a field or other SQL expression). And then in the WHERE clause specify that you want the relationship_cache.id to be NULL.
The GroupBy is necessary because your join can potentially produce duplicate results if the contact has more than one relationship, although technically that's impossible with this query so, meh, you could try leaving it off.


PSA for CiviCRM vulnerability released 7/18/18?

For those who find this question now - you can find the seven advisories here.


Inside a contact, under demographics (gender, age, etc.) when you choose "Edit demographics" there's an option for "Contact is deceased".


I found out that it was a bad custom field in my data set, when I disabled the set I can view my contacts. Thank you everyone who helped me with this.


Rule will not create drupal user record for CiviCRM contact

There's a working recipe on this CiviCRM wiki page.  There's also an excellent discussion on the old forums here.  In particular, I'd make sure you have all the modules named on that second link installed.


Custom field data - maintaining uniformity

There are two options:

Set your custom fields as a (multi) select if possible.
Develop an extension that validates the input using a validateForm hook (or in jQuery)


Postfix creates email bounces with permissions set to 600, but CiviMAIL doesn't like that!

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

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

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

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

  Not Up to Date

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


Problem with sorting civievent_widget custom_filter by startdate DESC and for past dates

I figured out why the second one wasn't working -- CiviEvent widget only shows UPCOMING events.

I still am not able to figure out why I cannot see the events in DESCENDING order.


How to prevent a form submission on a CiviCRM form with jquery?

I would add validator method via js which would stop the submit until the validator returns true
CRM.$(function($) {
  $.validator.addMethod('concessionaryError', function(value, element) {
    let isValid = true;
    if (value == '') {
      isValid = false;
    }
    return isValid;
  });
  $('#custom_39').addClass('concessionaryError valid');
  $.extend($.validator.messages, {concessionaryError:'please correct the error'});
});

HTH
Pradeep


Can't select Mailing Template in CiviMail after upgrading CiviCRM to 4.7.30

This is a bug in 4.7.30. See CRM-21759. There is now a patch for it, or you can wait for 4.7.31.

  in 4.7.30 there is a call to a non existent angular templates file. This means that the Message Templates section of a new mailing doesn't load.


Can you use CiviMail headers and footers on System Workflow Messages?

This question was asked here:

How can I include a custom template file in an email template using smarty?

It has been answered with quite a few specific places to make the needed changes


Adding validation: cannot use $this in formRule() of Form

If you take a look at the formRule() method, you will notice that it is static:

public static function formRule($params) {
...

When methods are invoked statically, you don't have access to $this. There is a similar construct to $this->, which is self:: (see http://php.net/manual/en/language.oop5.static.php) for more info, but I don't think it will help in your case as assign is expecting a form object  to work with.

If you want to add validation to a form, you probably want to use the addRules() method. You can define a custom function (callback) that will accept the values submitted into the form and expects you to return an array of errors.

/**
* If your form requires special validation, add one or more callbacks here
*/
function addRules() {
  $this->addFormRule(array('CRM_Example_Form', 'myRules'));
}
/**
* Here's our custom validation callback
*/
static function myRules($values) {
  $errors = array();
  if ($values['foo'] != 'abc') {
    $errors['foo'] = ts('You entered the wrong text!');
  }
  return empty($errors) ? TRUE : $errors;
}

see https://wiki.civicrm.org/confluence/display/CRMDOC/QuickForm+Reference for more details.

Another method I have used is

public function validate() {
  $this->setElementError(); // <-- more details here...
  return parent::validate();
}

See https://pear.php.net/manual/en/package.html.html-quickform.html-quickform.setelementerror.php for more info, though I think the above method is a little off piste.

Though having said that, the correct method really depends on why you are modifying the MembershipRenewal.php form.

If you are making a modification for your local site, you should really create an extension and use the https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_validateForm/ hook.

If you are looking to make a more generic improvement and submit it to core, then the approach described above is the way to go, but you'll want to discuss your planned modifications with others before doing too much work somewhere like https://chat.civicrm.org/civicrm/channels/dev.


Error "Unknown Error" when uploading a file with CKEditor

After digging, i have found that the problem was in the function packages/kcfinder/core/class/uploader.php :: checkFilePath

This function forbids an upload if you have a symbolic link in your path.

There is also a related issue in CiviCRM JIRA : https://issues.civicrm.org/jira/browse/CRM-15607

EDIT:

Probably not a very good solution but you can patch kcfinder.

In my case it's complicated to remove the symbolic link so I used this as a temporary fix.

Add the following line as the first line of the function checkFilePath to avoid the verification:

     protected function checkFilePath($file) {
+        return True;
         $rPath = realpath($file);
         if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN")
             $rPath = str_replace("\\", "/", $rPath);
         return (substr($rPath, 0, strlen($this->typeDir)) === $this->typeDir);
    }


Contributions for Membership completed, but Membership remains as Pending

I encountered the same issue on my CiviCRM installation. This is related to contributions status name which changed after being translated (in French at least), which prevented CiviCRM from finding the right membership status (the Completed status was translated to Complété which wasn’t correctly tested in this code).

A bug was reported to the developers by Sunil Pawar (CRM-20881), and a patch that solves this issue was submitted on GitHub.

This patch wasn’t included in the core repository yet, but in my case, the patch works fine.

Olivier;


Unexpected T_CLONE, expecting T_STRING (PHP 7, Drupal 7, Ubuntu 16.04)

PHP 7 is not supported yet - see CRM-17789

Also: this and this

Update (Aug 2017):  The information above was correct when it was written.  Things have moved on and PHP 7.0 is supported from 4.7.12 onwards.  Earlier versions of 4.7 don't run on PHP 7.0 and nor does any released version of 4.6.  There are discussions about adding this to 4.6 - see the same ticket.

The most current information should be on CiviCRM PHP Requirements


Is there a way to show second country at top of list of countries (after the default country) in CiviEvent?

Do you have participants from anywhere other than US/Canada? If it's just US/Canada you can restrict the country list to just those two (or some handful) under Admin - Localization - Languages, near the bottom of the page.

If you really do want all 200+ countries in the list, you can do a hack like this if you have access to mysql:

update civicrm_country set name=' Canada' where name='Canada';

(note the blank space in front - this will make it float to the top)

This might get overwritten on a future upgrade if Canada changes its name, but that seems unlikely. Still, this isn't a recommended hack, just if you're desperate.


Change Event Report fee level filter so operator offers 'contains' rather than 'is one of'

Yes, Its possible to do it using hook_civicrm_alterReportVar hook. You can create your own filters using this hook.


I'm in 5.7.5 on Drupal 7.64 with no issues, I can see a list of all my groups on this screen (Contacts Menu > Manage Groups).

There isn't actually a search button on this screen - I believe its ajax/javascript that powers the search. After you type something in a field and press enter or tab it refreshes the group listing.

Are there any javascript warnings/clashes in your console?


I used the alterPaymentProcessorParams Hook to override the parameters 'return' and 'cancel_return'.

The code looks like this:

function civicrm_alterPaymentProcessorParams($paymentObj,  &$rawParams,  &$cookedParams)
{
    if ($paymentObj->_processorName == "PayPal Standard")
    {
        if (!empty($rawParams['successUrl'])) {
            $cookedParams['return'] = $rawParams['successUrl'];
        }
        if (!empty($rawParams['cancelUrl'])) {
            $cookedParams['cancel_return'] = $rawParams['cancelUrl'];
        }
    }
}

$rawParams is the parameters that you passed to the payment processor in CiviCRM and cookedParams is what is passed from CiviCRM on to the Payment Site.


Why am I getting this error when using CiviRules

This very likely has the same root cause as civirules issue #45.  You may want to install CiviRules from master, or apply the change linked to above, or wait for version 1.2.


Has anyone used CiviCRM on a 10" tablet?

The main factor is probably the resolution of the tablet rather than its size, but the UI is in general meant to be used with a keyboard and a mouse (or very very pointy fingers ;)

For the mobiles, they have been several projects to provide a subset of CiviCRM features available.

One is cividroid, an android application from the latest google summer of code https://forum.civicrm.org/index.php?topic=36037.0
Another is an extension on the server that adds a few "mobile friendly" pages https://civicrm.org/extensions/civimobile

If the aim for the tablet is "only" to do the registration, using drupal as the CMS+bootstrap as the theme+webform+webform civicrm should allow you to have a user friendly form tailored to your need that will push the data in civicrm (create the contact, the activity and the case for instance), to be used later with the "full" civicrm from a laptop

X+


Why is my Contribution Detail Report (native CiviCRM Core report) not accurate?

Ok figured it out: the report is fine if I remove the column ‘Credit Card Type’. Then I see $100 in the report!

So if you select column ‘Credit Card Type’ a non-credit card contribution like this chq are aggregated over the number of financial transactions associated with the contribution, b/c the field ‘Credit Card Type’ lives in the Financial Tables.

So this is definitively a different bug from the one referenced here as well; this bug is related to (unnecessary) financial transactions.


List members of organisation belonging to sub-types

Partly depends who needs to see the report but we tend to build all such results in Drupal Views.


Performance Bug in Trigger Causing ~1000x Slowdown

Nice find. Thanks for posting. Yes the inner join is generally better than a subquery.
To answer your secondary question, to get it merged you need to create a ticket at https://lab.civicrm.org/dev/core/-/issues/new and then if you're able to also make an associated pull request at https://github.com/civicrm/civicrm-core against master. See also https://docs.civicrm.org/dev/en/latest/tools/git/#contributing. Then someone needs to confirm and test it.
When you do post your ticket, it would help to also describe the parameters (e.g. # of activities in the database, any other relevant variables...) so that others can reproduce/evaluate.


How do I allow custom date field over 10 years ago?

Also posting my answer to How do I override the default date range of JQuery date widget? here - for those following this Question:

I think the answer may be that this is working in 4.7.7 - set your date range in the Custom Field - Edit screen [I want to go back 30 years]:

Custom Date SE field:

And this is indeed giving me a dropdown going back 30 years (I can select 1986):


Scheduled Job not executing with wp-cli under cron, but works manually

To analyse this, as suggested by @Aidan I redirected the cron output to a file by adding this string to the end of the cron command:

&> /var/sites/d/mydomain/logs/cron.log

This showed that the command was failing with "Fatal error: Class 'Phar' not found in /var/sites/d/mydomain/wp on line 3"

Having queried this with my hosting support, it turned out that the implicit version of PHP called from cron was 5.4, but from SSH terminal, it defaulted to 7.0.  Once I explicity called v7.0 php at the front of the cron command as below, it ran fine:

/usr/bin/php-7.0 /var/sites/d/mydomain/wp etc


What is the purpose of logs for activities in civicrm_log table?

Under Administer - CiviReport - Create Report From Template there is one called "Database Log Report". That shows you more or less what's in civicrm_log.
For advanced logging (at Administer - System Settings - Misc - Logging), which I don't think is what you're talking about but just in case, the lack of an activity report is a known issue. The advanced logging Contact logging report does not always show proper logs for non-Contact records.


How to query "delivery status = unknown" on CiviMail report

Welcome to SE!  The first thing to note is that if you're on 4.6.36 you really need to upgrade.  There have been numerous security fixes and functionality enhancements since then.  You will also need to upgrade your version of php.  But that's not what you asked...
I needed to investigate mails with a status of 'unknown' recently.  The standard reports did not show what I wanted but the SQL behind them is a useful starting point.
From the Mailings > Scheduled and Sent Mailings screen, find the mailing of interest and click on Report.  On the Successful Deliveries line, click on Report and then go to the Developer tab.  From there you can copy the SQL, modify it a bit and paste it into a SQL session. How you modify it depends on what you want to know, but you will want to remove the 'where' clause that limits it to successful mails.
Things have changed a lot since 4.6 so this may not work for you.


How can I import ADDED BY field of Activities?

Selecting the Source Contact should do the trick.


There is not. In CiviCRM, ACL and permissions in general are contact-based: if you have permission to see a contact, then you see all related data about this contact. And if you see some data on screen, there is no reason you would not be able to export it.

The solution to your issue is to customize the export code to check the logged-in user and eventually display an error message if you want to deny this user the export.

Such a change would be in file CRM\Core\Report\Export\Excel.php as this file is responsible for generating all export files.


Create event participate using OOP API in CiviCRM

I think you have a typo. Please try $api->Participant->Create($params)) and let us know the result.

You can see an example here: https://github.com/civicrm/civicrm-core/blob/master/api/v3/examples/Participant/Create.php


How to show "Formal Title" on the view Contact screen?

As @coleman says and as I also mentioned in my comment above, you can create an extension as explained here or you can use an existing one and implement  hook_civicrm_contact_get_displayname, somthing like this:

function myextension_civicrm_contact_get_displayname(&$display_name, $contactId, $objContact) {
    $formal_title = civicrm_api3('Contact', 'getsingle', array(
        'sequential' => 1,
        'contact_id' => $contactId,
        'return' => 'formal_title',
    ));
    if(!$formal_title['is_error'] && !empty($formal_title['formal_title'])){
        $display_name = $display_name . ' - Formal Title: ' . $formal_title['formal_title'];
    } else {
        $display_name = $display_name;
    }
}


Display the payment vehicle (cash, check,...) of a contribution in a receipt

I think you can use Smarty to retrieve the payment instrument in your template. You can play with API explorer to return this value -

Copy the contents in smarty section and add it to your template. Eg -

{crmAPI var='result' entity='Contribution' action='get' id=<contribution_id_variable>}
{foreach from=$result.values item=contribution}
  {$contribution.payment_instrument}
{/foreach}

In the above statement $contribution.payment_instrument should hold a value of the payment vehicle.


I figured it out - I didn't have a Visibility selected. There isn't an asterisk next to it letting you know it is required and no error pops up telling you that you need to choose a visibility. So it is indeed a CiviCRM issue - it's missing the asterisk and a message letting you know that you need to choose one.


How to check if a contact has an active membership in a smarty template?

Don't think you have a direct variable to use in the template. Worth trying an extension to provide this? It can be done by simply writing something like below in your hook.

function yourextension_civicrm_postProcess($formName, &$form) {
  if ($formName == "your_form") {

    //Check if user has an active membership of type "General".
    $activeMembership = civicrm_api3('Membership', 'getcount', array(
      'contact_id' => <contact_id in $form>,
      'active_only' => 1,
      'membership_type_id' => "General",
    ));

    //Assign a new variable to the template.
    $form->assign('activeMembership', $activeMembership);
  }
}

You can now use this variable as {$activeMembership} in the template to check if user has a membership of the req type.


Resolved....Htaccess password protection on site prevented dashlets showing


How to mail to the default contact person of a member organization with more employees?

One way of approaching it is with a handful of smart groups:

Lets assume you create compliance officers as individuals and link them with a 'Compliance officer is/of' relationship

1) Create a smart group of 'Compliance officers of member orgs' by using Advanced Search to search for organisations that have a current membership and setting 'Display Results as' to 'Related contacts' and the relationship as 'Compliance officer of' - this is the first group to add to your mailing.

2) Create a smart group of 'Member Orgs'

3) Create a smart group of 'Member orgs with compliance officers' by searching for members with a 'compliance officer is' relationship

4) Create a smart group for 'Member orgs without compliance officers' using  Search > Custom Search > Include/Exclude search and the last two groups you just created

5) Create a smart group of 'Main contacts of member orgs without compliance officers' similar to 1) using 'Member orgs without compliance officers' and Related contacts/Main contact of - This is the second group to add to your mailing.

Use too many layers of smart groups and your server will be gasping for air, but it might work if your numbers are not too large.


How do i delete unknown addresses from a group

You can use use Search Builder (Search > Search Builder) to search for contacts in a group and add another search field like contact City (Primary or whichever address field you are using) is empty.

You can then select the results and delete, or remove from the group.


DreamHost is dropping support for Catch-All mailboxes

Demerit's comments probably constitute the best answer available. It's a loss in flexibility and functionality compared to being able to use a catch-all mailbox, but it's probably as good as it gets, given the situation. I may experiment with SendGrid, but I'm not impressed with them so far. It's a public company that makes it difficult to ask a question. I could only ask a question after I signed up with them.  It was answered by someone who just googled SendGrid CiviCRM and came up with a few fairly worthless links.


This error indicates that the web server is trying to connect to another service in order to respond to your request but is unable to. A common scenario is web server software such as nginx, which does not incorporate a PHP interpreter, contacting a service such as php-fpm (typically running on the same server) in order to process PHP.

php-fpm might be unavailable because it is currently handling too many requests and has no free processes to handle your request. Or it is configured with too low a limit on the number of processes.

Alternatively if you access the web via a proxy server, the error might indicate that the proxy server is unable to contact the server where your site is hosted.

Does this error only occur on CiviCRM pages, can you access the rest of your site?

If you don't manage or have access to the server yourself, then best to contact your hosting provider.


How do i add an custom activity field to an email in civimail?

This doesn't solve anything, but a note for future development: contributions have the same situation where it's ambiguous which contribution you're talking about if you're emailing a contact.  However, there's a nice feature for sending thank-you letters (PDF or email) that has the contribution and contact tokens.  The difference is that this is accessed from the contribution search, so you're explicitly picking the contribution.

Something similar could be done for activities: if you do an activity search, it would be nice if emails generated from there allowed for including tokens referring to the activity.  Likewise, it would be nice to have a button from the activity saying "send an email regarding this activity".


Can't make new profiles, or edit settings

I have tested the same against CiviCRM Version 4.6.10 and it works perfectly. So please try to reinstall CiviCRM or try to install an fresh copy of CiviCRM and do the testing - Thanks


How to add a class to a form element in buildQuickForm?

John - There's an existing pattern for simply add the markup to the template for cases like this, and I think it's fine for this situation. So in Register.tpl, just add this markup after the label:

*

Note that there was evidently some spots where this technique was used / but then removed in that file (see line 47). I think we can remove that {capture} statement at this point and just put the markup where it's needed.


Whats the difference between a case sequence and a case timeline?

A timeline defines a default schedule. The default schedule may intentionally stretch over a long period of time (weeks or months). Activities can potentially be concurrent or reordered. For example, as soon as the case is opened, you schedule four activities:

We should acknowledge the new case within a day.
We should have a phone call with the client after 3 days.
We should have an internal meeting after 3 days.
We should file a report after 14 days.

A sequence defines a list of back-to-back steps. There's no particular length of time (days or weeks or months), but there is a very specific order. For example:

As soon as the case is opened, we should send an acknowledgement. It should be sent as soon as we can.
After the acknowledgement, we should make a phone call (as soon as we can).
After the call, we should have an internal meeting (as soon as we can).
After the meeting, we should file a report (as soon as we can).

Both are idealized; the real activities will happen on their own schedule. These idealized models aim to be easier to discuss/explain, but they lack nuance (e.g. conditionals, branches, merges). For more sophisticated processes, one might

Write a case controller function using hook_civicrm_caseChange and Civi\CCase\Analyzer.
Write event/condition/action rules using CiviRules.

(Note: Some of the early specwork for sequences and case-controllers can be found at https://civicrm.org/blogs/totten/customizing-civicase-workflows and http://wiki.civicrm.org/confluence/display/HR/CiviCase+Util . The architecture is basically unchanged, but several of the symbols changed during implementation. "Pipelines" were renamed to "Sequences", and all the new classes were moved to Civi\CCase.)


Profiles are stored in civicrm_uf_group and the fields are in civicrm_uf_field. Search the column uf_group_type in civicrm_uf_group to see what the profile is used for or just lookup a particular profile id.

To search by an event id you will also need to look in civicrm_uf_join and use something like:

SELECT group_id where module = 'CiviEvent' AND entity_id = {my_event_id}


Twilio extension stopped working; neither individual nor mass SMS go through

Matthew Wire nailed it: the most current version of the Twilio extension for CiviCRM doesn't work with PHP 7.0 -- but luckily for us, a huge patch became available through GitHub just one week ago. Since we need PHP 7.0 for other stuff on our site to work, reverting to 5.6 wasn't a viable option.

As soon as the updated Twilio SDK extension was in place, I was able to run those scheduled jobs manually again. This experience also showed me how just one scheduled job that doesn't complete can derail the CRON train altogether. This gives me at least one idea for troubleshooting a persistent CRON headache in which our scheduled jobs run some of the time, yet we haven't yet isolated the problem. It's all connected, isn't it?


Ckeditor Subscript and Superscript buttons

Once you upgrade to 4.7 it will be super easy due to the new configurator UI.

See https://civicrm.org/blogs/colemanw/big-changes-wysiwyg-editing-47

4.7 is now available for beta testing, be sure to give it a try :)


Drupal broken after upgrade to CiviCRM 4.6.16

I don't think that error is related to your CiviCRM upgrade, at least not directly. That error message is telling you that a duplicate function exists in your custom theme's drupal6_theme_methods.php file and garland's template.php file. Neither of those files are in the CiviCRM directory, which is the only code you replaced during the upgrade, right?


Drupal to Wordpress Migration - Can we keep/recreate our forms?

The answer is no - but having said that we do have one organization that went with a Wordpress main site for content delivery [example.org] and a second Drupal/CiviCRM site [secure.example.org] - to leverage all that Drupal can do. So the Drupal component on the second site is very small - mostly for webform_civicrm; views displays. One added benefit is that donors really like going to the 'secure' site.


constraint violation during event registration

If your hook relies on $objectRef being populated, check whether it actually is - they aren't always. See Should civicrm_post hook receive populated Relationship object following relationship enable/disable in UI?


buildForm hook is used to add the elements on the form. To store the values of your select element, you need to look at postProcess hook which is called after the form is submitted.

You'll get the submitted select value in $form parameter. Use this and store the value in your expected table.