How to revert the demo sites to English? (Or change to another language) The demo site is in Russian (or Chinese or French -- or any language you don't read fluently), how can I switch it to English (or my preferred language)?

As the demo sites are periodically reset to a default state (in English), waiting is an option, but not the fastest one.

You can change the language in

Administer > Localization > Languages, Currency, Locations

and change the default language (first field) to English (United States)

However, as the site is in a different language, it might be hard to find (the url is civicrm/admin/setting/localization), so here are the direct links:

Drupal
Joomla
Wordpress


Cleaning up images (or other files) in the custom folder I'm wondering if anyone else has come up with a good way to manage their custom files (where documents and images which are attachments to contact records are stored.)

We have a fair amount of files in this folder. In addition, some of the contact images have been 'deleted' in Civi (i.e. mistakenly uploaded and replaced with a new image or updated with a newer image.)

Any way to cull through the files and remove files no longer in use?
Or to separate contact record images from pdfs attached to activity records?

Might justify developing a script or extension?

The column uri in the database table civicrm_file seems to refer to these.

The table civicrm_entity_file then links civicrm_file records to other existing entities.

The column image_URL in the table civicrm_contact, on my transplanted legacy installation at least:

in some cases contains absolute URLs that also reference files in this folder,
and in others contains URLs to civicrm/contact/imagefile with a photo parameter that is a filename in this folder.

So you may be able to identify unreferenced files that way, although I won't guarantee that files in that folder can't be referenced from elsewhere too.


Smarty only generating nulls from API calls Using the Explorer, I built up the smarty code I need for a template to pull in address information on a contact for use in an email:

{crmAPI var='result' entity='Address' action='get' contact_id=203}
{foreach from=$result.values item=address}
  {$address.some_field}
{/foreach}

and it produces the desired output in the Explorer when executed.

In an email though, the expected output never renders, and when I add the smarty expression {result|@debug_print_var}, I get null for the value of the variable in the message.

The fact that I'm getting null suggests to me that smarty is in fact running, but I can't for the life of me figure out why it can't seem to make an API call. Thoughts?

Thanks for the help!

N.B.: I'm running CiviCRM 5.17.4 on Drupal 7.67 and Ubuntu 16.04.

Update

With the following email code:

{capture assign=contact_id}{contact.contact_id}{/capture}

id: {contact.contact_id}

smarty id: {$contact_id}

{crmAPI var='result' entity='Contact' action='get' id=203}

{$result|@debug_print_var}

This is the email that renders when sending to contact # 203:

id: 203

smarty id: 203

null

So, for posterity's sake, I wanted to share the answer I figured out.

When I looked at the Source view of the email in CiviCRM, I realized that the code had pasted as

id:&nbsp;{contact.contact_id}

smarty id: {$contact_id}

{crmAPI var=&#39;result&#39; entity=&#39;Contact&#39; action=&#39;get&#39; id=203}

{$result|@debug_print_var}

instead of

{capture assign=contact_id}{contact.contact_id}{/capture}

id: {contact.contact_id}

smarty id: {$contact_id}

{crmAPI var='result' entity='Contact' action='get' id=203}

{$result|@debug_print_var}

When I composed the code correctly in the Source view rather than the HTML view, everything worked as expected!


How do I create a view to DISPLAY ALL EVENTS it looks like the Events Dashboard only shows upcoming events.
As I am using Civi to Manage membership and attendance to events, I would like to easily access all past events in order to edit participant lists, etc.
HOW DO I DO THIS?
And is there a reason why the events dashboard does not offer the choice of showing events?
Thanks.

Welcome to StackExchange Daniel. You are probably talking about this view: Events > Dashboard, which indeed only shows upcoming events and recents registrations.
There is another page, Events > Manage Events, that allows you to search and filter for events or show all events including past ones.

You could of course also create a report to list all (relevant) events and/or participants.


Send alert if smart group contains any contacts The problem:

I'm trying to monitor daily for contacts meeting certain criteria, and would thus like to have a way to receive a scheduled email if a smart group contains contacts.

Possible solution: Using CiviReport?

CiviReport supports scheduled delivery of reports, configurable under a report's "Email Delivery" tab.

Is there a way to avoid sending the report if it contains no rows?

Alternately, I could do something in cron with drush sql-query or some such, but ideally I'd like to do this within CiviCRM.

Other options:

Are there other to achieve this goal within CiviCRM that would not require custom code?

We've done just this using CiviRules and CiviReport, though the solution does still send emails if the smart group is empty.

I've outlined the steps here: https://civicrm.stackexchange.com/a/4873/105


Activity Separation field- set an option as default When you record an activity with multiple target contacts, the Activity Separation option appears. When it first shows it is not immediately obvious that this is a required field.

One of our clients regularly records activities with multiple targets, and by and large only want to record one activity for all.

Would it be possible to set one activity for all- as the default option for this field? And if so, where would I do that?

Also. What are the potential drawbacks of doing this?

The change was introduced at https://issues.civicrm.org/jira/browse/CRM-21419, and it gives the reasoning. As with a lot of things probably 50% of people would disagree.

If you want a quick hack (which would get overriden on upgrade though):
Change line 137 in CRM/Activity/Form/Activity.php from

protected $supportsActivitySeparation = TRUE;

to

protected $supportsActivitySeparation = FALSE;


Smart Group criteria disappearing or changing We've been using a number of smart groups created via the search builder and from time to time, the smart group criteria disappear or are changed. For instance, we had five similar smart groups based on membership in five different groups with a certain contact type. At some point, the criteria changed for all five smart groups to membership in group 0.

We've had occasional similar issues for years, with no obvious trigger for the change. Does anyone have any idea what might be happening? Has anyone else had the same issue?

There was a set of nasty bugs that fit the description of what you're talking about throughout 2015:

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

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

CRM-18435 in particular is getting a fix in the August 3rd release of CiviCRM.  You can patch it now if you know how (patch is linked from the ticket above) but otherwise upgrade next week.

To give a big-picture overview - smart groups rely on the underlying form (in this case, Search Builder) not changing.  For a while, there wasn't really awareness that changing the form would break smart groups.  In fact, I have a patch that hasn't yet made it into CiviCRM here because someone pointed out that a benign-seeming change could break a smart group.

Now that there's awareness (and automated tests!) around that, those issues are going away.


Can you share an example of a complex .CSV file for import? I'm looking for structure information on complex .CSV files that have custom fields, relationships, groups. I'd like to get a better sense of best practices for organizing data ahead of time. If you can share a sample file that would be great. You can delete the names but the titles for the .CSV would be informative.

Probably below the level of your question, but maybe it'll point you in a good direction?

A sample CSV can be exported from existing CiviCRM data.

This can be done from the CiviCRM demo sites, or if there's a need to  frame up columns with custom data, via a CRM with existing data. Export the resulting contacts via CiviCRM Search => Export Contacts action.

The advantage of this approach is that the exported column names automatically map back to what CiviCRM expects[1]. It should apply to both simple and more complex import formats.

CSV sample exported from http://dmaster.demo.civicrm.org/ today -

"Contact ID","Contact Type","Contact Subtype","Do Not Email","Do Not Phone","Do Not Mail","Do Not Sms","Do Not Trade","No Bulk Emails (User Opt Out)","Legal Identifier","External Identifier","Sort Name","Display Name","Nickname","Legal Name","Image Url","Preferred Communication Method","Preferred Language","Preferred Mail Format","Contact Hash","Contact Source","First Name","Middle Name","Last Name","Individual Prefix","Individual Suffix","Formal Title","Communication Style","Job Title","Gender","Birth Date","Deceased","Deceased Date","Household Name","Organization Name","Sic Code","Unique ID (OpenID)","Current Employer ID","Contact is in Trash","Created Date","Modified Date","Addressee","Email Greeting","Postal Greeting","Current Employer","Location Type","Street Address","Street Number","Street Number Suffix","Street Name","Street Unit","Supplemental Address 1","Supplemental Address 2","City","Postal Code Suffix","Postal Code","Latitude","Longitude","Address Name","Master Address Belongs To","County","State","Country","Phone","Phone Extension","Email","On Hold","Use for Bulk Mail","Signature Text","Signature Html","IM Provider","IM Screen Name","OpenID","World Region","Website","Group(s)","Tag(s)","Note(s)","Phone Type","IM Service Provider"
"2","Individual",,,,,,,,,,"Samuels, Jed","Mr. Jed Samuels",,,,"SMS",,"Both","3988235934","Sample Data","Jed",,"Samuels","Mr.",,,,,,,,,,,,,"52",,"2016-08-13 11:07:38","2016-08-13 11:07:42","Mr. Jed Samuels","Dear Jed","Dear Jed","Urban Empowerment Fund","Work","190Y Cadell Ave SE","190","Y","Cadell",,"Attn: Development",,"Bowmanstown",,"18030","40.80116","-75.66158",,"Urban Empowerment Fund","Alameda","PA","United States","265-5630",,"jeds@notmail.co.pl",,,,,,,,"America South, Central, North and Caribbean",,"Newsletter Subscribers",,,"Phone",
"3","Individual",,,,,,,,,,"smith.o.carylon98@spamalot.co.uk","smith.o.carylon98@spamalot.co.uk",,,,"SMS",,"Both","990362788","Sample Data",,,,,,,,,,,,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:39","smith.o.carylon98@spamalot.co.uk","Dear smith.o.carylon98@spamalot.co.uk","Dear smith.o.carylon98@spamalot.co.uk",,,,,,,,,,,,,,,,,,,,,,"smith.o.carylon98@spamalot.co.uk",,,,,,,,,,"Newsletter Subscribers",,,,
"4","Individual",,,"1",,,,,,,"Grant, Lawerence","Mr. Lawerence Grant II",,,,,,"Both","2064444768","Sample Data","Lawerence",,"Grant","Mr.","II",,,,"Male",,,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:43","Mr. Lawerence Grant II","Dear Lawerence","Dear Lawerence",,"Home","176T Dowlen Blvd S","176","T","Dowlen",,,,"Boston",,"02266","42.338947","-70.919635",,,"Alameda","MA","United States",,,,,,,,,,,"America South, Central, North and Caribbean",,,"Volunteer",,,
"5","Individual",,,,,,,,,,"Terrell, Russell","Russell Terrell Jr.",,,,"Postal Mail",,"Both","127505299","Sample Data","Russell",,"Terrell",,"Jr.",,,,"Male","1996-05-04",,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:42","Russell Terrell Jr.","Dear Russell","Dear Russell",,"Home","235X States Path NE","235","X","States",,,,"Valrico",,"33595","27.871964","-82.438841",,"Terrell family","Alameda","FL","United States",,,,,,,,,,,"America South, Central, North and Caribbean",,,"Volunteer",,,
"6","Individual",,,"1",,,,,,,"Adams, Scarlet","Scarlet Adams",,,,"Phone",,"Both","2620107037","Sample Data","Scarlet","W","Adams",,,,,,"Female","1957-11-05",,,,,,,,,"2016-08-13 11:07:38","2016-08-13 11:07:40","Scarlet Adams","Dear Scarlet","Dear Scarlet",,,,,,,,,,,,,,,,,,,,"(449) 428-2300",,"adamss68@lol.biz",,,,,,,,,,"Newsletter Subscribers","Major Donor,Volunteer",,"Phone",

[1] You do have to deselect some of the Addressee fields to get the exported CSV to import straight back in: CRM-19360: Exported CSV does not import back in without adjusting import columns.


Disable check that a web browser has already signed a petition? Many of our subscribers have informed us of the problem that they sign our petition, and then when other household members go to sign the same petition (e.g. particularly grandparents who don't have their own computer) they are unable to.  I understand that clearing the cookie cache of the browser and thereby killing the sessionid or else opening a private window would be a work-a-round, but I'd like to just not have the problem.
Can anyone point me to which file in the source code performs this check?  And, as an aside, what do DAO and BAO mean?  How civicrm works is really a mystery to me...

What CMS are you using? If Drupal you could do a webform for your petition which would have all of the basic functionality of Civi petitions plus a lot more configurability. It would definitely let you change this setting.


Why can't I get tokens inserted in to HMTL or Text fields of System Template Messages Clicking on the Token under Tokens has zero effect

This was a regression introduced in 4.7. It gets fixed by applying https://github.com/civicrm/civicrm-core/pull/10149 change.

JIRA filed here - https://issues.civicrm.org/jira/browse/CRM-20418


Change thumbnail size on public directory detail page We have a public directory that contains the contact image. By default the image thumbnail is set to a size of 100px X 100px. We would like this to be larger. Does anyone know where we can change that? I took a look at the css but did not see anything.

We are using WordPress 4.9.1 & CiviCRM 4.7.27.

Thanks

I believe that thumbnail size is set by CSS (at least it is in the backend), the actual contact image should be whatever size you uploaded the image at originally. Perhaps you can adjust the CSS to display those contact images at your desired size.

Based on your page, you could use:

.content img {
    width: auto;
    height: auto;
}

To set it to it's native size. You could alternatively used specific values (height: 200px; width: auto;) to be a little more uniform across different contact results.


Membership cannot be saved The membership cannot be saved because the status cannot be calculated
  for start_date: 20160425 end_date 20170424 join_date 20160425 as at
  2017-09-25 13:54:10

This error message shows when a user, with recorded start and end dates of membership in expired status tries to renew their membership.

Perhaps status rules need some work or there is an issue with memberships that occurred before upgrading to 4.7.x version of the CRM. Here is a screenshot of the status settings:

Note: I know this may be a duplicate question but I wanted to provide more information than than the other posts to see if we can resolve all of them.

Using CiviCRM 4.7.15 on Drupal 7.x

The issue went away once I adjusted the membership rules.

I disabled Grace because we want users to renew right away. I changed the expired rule so that the start of the event is the end date and the end of the event is not selected. See screenshot.


Applying part of a contribution to a Participant Payment We often have participants for an event who have a portion of their fee paid by another entity. Sometimes, the other entity pays for more than one participant in the same transaction. I realize that Civi doesn't have an out-of-the-box method to handle this, so I've been toying around with an extension to make it happen.

What I don't understand is this: If J.Smith makes a $200 contribution that is to pay for Participant A ($100) and Participant B ($100), it would seem that creating a new entity_financial_trxn as follows would do the trick:

entity_table = "civicrm_contribution"
entity_id = contribution id of the participant payment
financial_trxn_id = id of the transaction for J.Smith's contribution
amount = 100

But this applies the full amount of J.Smith's contribution ($200) to the Participant Payment, rather than just $100. This is not what I expect when entity_financial_trxn.amount is the "allocated amount of transaction to this entity".

I guess my question is: Is this in fact the intended behavior? If not, what is the purpose of entity_financial_trxn.amount?

(I should also note that we do not use civi's accounting features, so maintaining audit-level financial transactions is not a concern.)

Civi 5.19.1

I would suggest

Create participant for Participant A
Create participant for Participant B
Create a $200 contribution against J.Smith contact
Add line $100 line item for Participant A and Participant B with contribution id from #3
Add participant payment entry linking contribution from #3 with participant id from #1 and #2.

If you are using drupal than whole process can be done using webform without any customization. (Probably caldera form for wordpress)

Thanks
Pradeep


CiviMember Range Price: Automatically assign Membership based on $amount paid We are looking to have ranged membership prices e.g.

$5-59 = Level 1
$60-99 = Level 2
$100-499 = Level 3

CiviCRM seems to support a "minimum price" for membership. How do we make it a range between minimum and maximum?

Also, these ranges should support recurring contributions (yearly).

Nice to have:
* Ability to make a sliderfield out of the range

CiviCRM 4.7.x - drupal 7

You can totally do this out of the box with Webform CiviCRM module!

Sorry for the swim squad references - but that's the project I was on when I read your question - here's a quick demo:

in CiviCRM Tab -> add Membership Type - User Select; also add Membership Fee field;
in the Webform tab -> ensure the Membership Type is a Listbox; Use static to only get the ones you need on this form;

Then under Webform Tab -> Conditionals - just a quick example - but you can make this as complex as you like - and even combine statements (is greater than or equal and is less then) to cover your $ ranges.

This says -> if we type in 25 -> we automatically get option1 -> which is my case is White Squad Membership; note how Webform is clever enough to grey out the Membership Type so the user can't self select anymore;

And if we type in 50 or higher -> we automatically get option number 2 -> in my case: a Black Squad Membership

PS - and you're going to get that slider in D8:


Could CiviCRM 4.5 or 4.6 make it easier to generate large numbers of PDFs at once? I have a client using CiviCRM 4.4, who prefers to generate donation and membership receipts as PDFs for mailing in print form, but has found that they often have trouble generating all the PDFs they need to at once, and have to break the list of donations or memberships down into small batches in order to generate the receipts.

They are considering upgrading to 4.5 or 4.6, but are wondering whether this might help address the problems with batch generation of PDFs. I looked through the issues list in Jira for both releases and didn't see anything that seemed specifically related, but there are so many things listed that it's easy to miss something.

Does anyone have any personal experience of this, or know whether there are any improvements to PDF generation in 4.5 or 4.6?

Are you using the wkhtmltopdf option in CiviCRM:

Administer CiviCRM >> System Settings >> Misc

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

Its a local binary installation (needs to be done by your system admin), but gives you a lot better performance than the php pdf libraries shipped with CiviCRM


Automatically setting a date for an activity being added by a sequence I am attempting to set up a timeline for a set of case types. I made a sequence for a few activities. However, the scheduled date automatically sets to the current day. How do I get it so that when an activity is added due to a sequence, its date is set based off an offset value?

I have figured out the issue that I am having. It turns out there is a bug in version 4.7.18 that is fixed in 4.7.20. So I will just need to wait for the release version.


Donors who gave the same amount in X and Y year Is there a report in the Current version of CiviCRM that can tell us this? https://civicrm.org/extensions/advanced-fundraising-reports seems to have reports that will show if the giving is increased or decreased year to year, but not if it's exactly the same. Thanks!

I don't think there is such a report. I would probably look at using Summary Fields extension and then adding a new calculated field that does your calculation - and then report on that.

In drupal I would also consider doing this in Views and using eg views_calc to do the calculation for me instead of creating a calculated field


Upgrade from 4.4.19 to 4.4.2 DB error When I try to upgrade CIVICRM 4.4.19 to 4.4.2 I get the following error message:
"Your database is marked with an unexpected version number: 4.4.19. The v4.4.2 codebase may not be compatible with your database state."

The site is operating fine in 4.4.19, but I am running into an error I've seen mentioned here with waitlists not working properly on paid events - it's not, and I understand an upgrade is the solution. Any suggestions would be appreciated. This is, BTW, the Drupal version.

Thanks!

Version 4.4.19 is the latest LTS version of CiviCRM.  The next LTS version will be 4.4.20.  V4.4.2 is an old version that came after 4.4.1 and before 4.4.3.

Not surprising CiviCRM is not happy with you trying to downgrade your site.

If you add a link to the question that referred to waitlist error I can have looked at that to see what versions it refers to.  It could be talking about the 4.6.X series.


How do I process a refund for a credit card payment via iATS? I have a member who accidentally bought two memberships and there is no clear way to just refund one of the amounts. Seems like a relatively simple task that should be more intuitive.

You will need to initiate refund at iATS gateway and then change the contribution status to refunded in CiviCRM.

HTH

Pradeep


In what circumstances is it safe to automatically de-duplicate contacts? When is it safe (and when might it not be safe) to automatically de-duplicate contacts submitted from a public facing form?

How might a malicious user leverage automatic contact merges to their advantage?

As soon as you automatically "merge", it will never be 100% safe. If you want to be sure, never dedupe (ie put dedupe rules that are not possible to match) and ask your users to login.

Obviously, it means that you will end up with tons of duplicates, so in practice, you will need to relax the rules and accept that you might have two different persons that end up merged in the same contact. This isn't as bad as it sounds, and it happens with every shared list of items that several people can update, and it doesn't create too much problems.

So your choice is what type of error you want to avoid more: having more duplicates or having more incorrect merges. For what I've experienced, the most relaxed rule is to consider that everyone sharing an address is the same person, and the strictest want the first and last name and email and country.

you might want to add an extra layer of protection if you send emails with the hash token (so your contacts don't have to login and are automatically identified) so they can't change their name by accident with this extension https://civicrm.org/extensions/no-overwrite

And you could enable the detailed logging http://book.civicrm.org/user/advanced-configuration/logging/ so you keep the history of all the changes if you haven't done it already


How can I add my extension API into civicrm API? I create a extension with API but I want to add in API 3 (i.e.on civicrm portal in support->developer ->API explorer.)

If you've added an api in the extension, it will be automatically seen in the API explorer, provided -

The extension is enabled.
The API is created as per https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-api
The api file need to be under /path/to/extension/api/v3/your_file.php which is auto-created if you've followed the steps in the above documentation


How to include smarty script with mosaico email I used to use a name personalisation in civimail with smarty script...

{capture assign=nickname}{contact.nick_name}{/capture} Dear {if $nickname}{contact.nick_name}{else}{contact.sort_name}{/if}

I was testing if this script would render in mosaico 2.x, it seems doesn't work. Is there any workaround? Thanks

As a workaround for the specific example in your post, you can create a custom token.  This post explains how using hook_civicrm_tokens and hook_civicrm_tokenValues


How to disable or fix the wysiwyg editor on civimail Oh joy of wysiwyg editors, that are going to alter the html you have so carefully typed to be compatible with all the mail clients in their glorious diversities...

For some mailings at least, I'd like to be able to tell the editor to stay home and let me type my html directly, as the W3C gods intended. Unfortunately, the setting to change the editor (CKEDITOR, tinyeditor or textarea) doesn't seem to be taken into account in civimail (or ab testing)

Is this a cache that I couldn't clear after the change (it worked fine for "normal" mail sendings, just civimail that ignored the new setting)?

Is there a bit of code to hack to make it work?

Editing markup

The editor includes a "Source" button which can be used to edit markup directly.

Using <textarea>

Upgrade to v4.7!

In depth

CiviCRM v4.6 includes a pure-JS rewrite of the CiviMail frontend. Unfortunately, the old WYSIWYG abstraction couldn't adapt well to pure-JS, so CiviMail in v4.6 only supports one editor. (Specifically, CiviMail uses the crmUiRichtext directive which is hardcoded to CKEditor.) However, all other screens still use the old WYSIWYG abstraction.

v4.7 cleans things up by switching to a pure-JS WYSIWYG abstraction. The core ships with only two options (CKEditor and <textarea>). However, you can write an extension that defines alternatives (e.g. https://civicrm.org/extensions/tinymce ).

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


Sending invoice from webform civicrm Just wondering if anyone can direct me how I can configure webform and civicrm to send invoice to user when they submit the webform.

I can see from the URL (https://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration) that email receipt is possible using webform civicrm.

Email receipt - if enabled, these will be sent from the webform just as they would be from the real contribution page

Thanks in advance.

Have you connected a contribution page to your webform? via the civicrm tab and within that the contributions tab.

If so then you need to set up the contribution page to send a receipt.

If you don't have a contribution page connected and you don't need one then you might like to consider using Webform Emails found at /node/#/webform/emails to send your emails


How to add/remove search fields from the search box dropdown in the navbar? In the CiviCRM global menu there is a nice search box on the left. This box allows for targeting specific fields via radio buttons in a dropdown, like this:

Is it possible to remove or change the fields that appear here?

Can custom contact fields be added to these options?

The quick answer is "no."

For some back-story, that feature was contributed (circa 4.3) by a volunteer from the community who was enough of a coder to be able to get it to work, but not really a CiviCRM architect. His implementation was done by hard-coding that list of fields directly into the template.

The result of his good-faith effort is that:

We have the feature (which IMO is a step up from previously not having it).
It's not flexible or extensible.

I've been thinking that it would be a great little project for someone to add a setting to the "display preferences" screen that would allow you to enable/disable fields from that list. Searchable custom fields could be included.

If anyone is interested in taking this on, let me know in the comments and I'm more than happy to help you get started.


How to enable profiles in Contribution Pages? In my contribution pages, I cannot see the Profile dropdown. Is there a way to enable this?

I have disabled all of my plugins and changed my theme to 2016 to see if it's an error on my side. So far no dice.

I'm using 4.7.1 for Wordpress.

Many thanks to quick replies. You were right- I overlooked a plugin. On my site, it was the Ultimate Addon for Visual Composer.

As long as it's disabled, I can see the Profile selector. Once I'm done, I can enable the plugin and not loose functionality on the front of the site.


What is the pattern used to name the fields accessible through the API? I'm getting familiar with the API and having trouble understanding the pattern used to name fields.

A call like CRM.api3('Address', 'get') makes sense to me because the fields in the result are (1) named consistently, and (2) each named exactly as they appear in MySQL. I see things like street_address, location_type_id, and is_primary. I like this.

A call like CRM.api3('Activity', 'get') produces fields which make slightly less sense. I see subject and status_id which seem consistent. Good. But then I see activity_date_time and activity_type_id and become confused about why some fields are named with their entity as a prefix and some are not... But at the very least, all these field names are consistent with the column names in MySQL. Ok fine, I can live with that.

But then when I look at the same call for Contribution, I get even more confused. I see fields like contribution_check_number which seem to have an added prefix, not present from MySQL. Why?

And when I look at Participant, all the fields have a participant_ prefix. Huh??

Is there some sort of underlying pattern that can explain this madness to my logic-seeking brain?

For historical reasons (namely cramming a bunch of fields from various entities into a flat array for e.g. a profile form) some fields in the database have a "unique_name" which is generally the entity prefixing the field name. For obscure reasons, the api v3 sometimes returns those "unique_names" instead of the regular field names.

I personally hate the implementation of unique names in CiviCRM - it's inconsistent and confusing and if I have anything to say about it there will be no unique names in api v4!


"Post Code Suffix" in Reports is the same as "Postal Code" I'm running CiviCRM 5.10.4 on top of Drupal 7.63 on Debian, with localisation.

My contacts have UK-style postcodes with the first half (e.g. "M19") stored in "Postal Code" and the second (e.g. "3JD") in "Post Code Suffix".

I am trying to get a list of my members, with full postcode data, as a CSV. I generate the built-in "Membership Report (Detail)" which is at /civicrm/report/instance/20 for my instance. I then add the "Postal Code" and "Post Code Suffix" columns (among other address ones). The data displayed in "Post Code Suffix" is identical to that in "Postal Code", e.g. they are both "M19". This is also the case in an exported CSV of the report.

The correct data is in the database - clicking on any "Contact Name" from the report takes me to the individual "View Contact" screen, where the Post Code & Suffix are correct (e.g. "M19" "3JD").

Any idea what's going on here or how I can fix this?

You have discovered a bug in the Membership Details report.

The first step in a situation like this is to see whether anyone else has reported the issue on the CiviCRM issue tracker. A link to the issue tracker is at the bottom of every CiviCRM screen.

As of this posting, it doesn't look like anyone has created an issue, so you can write one up. You could pretty much paste in the description you've written in your question here.

To actually get the bug fixed, you may need to engage a CiviCRM service provider.

In the meantime, if you just need to export a CSV of your members' contact information, including postal codes, try using Search > Find Memberships, and in the search results choose the "Export Members" action.


How to install a separated Civi database with Drupal 8? I am very confused with the evolution of Drupal 8 going away from its ability in Drupal 7 to easily handle multisite.

Is it still possible to share a Civi database with the multisite extension with several Drupal 8 sites?

What about sharing a CiviCRM database between a mix of Drupal 7 and Drupal 8 sites?

More globally, can a Civi database be separated from the Drupal 8 database ?

=========
I had read from David Snopek while researching this question that he thought it might work to use an edited version of the file civicrm.settings.php, though hadn't actually tried because of his server policies.

So I tried integrating an additional Drupal 8 site already running with a Drupal 7 site! I edited the civicrm.settings.php in Drupal 7 site in order to adapt it to the path of the Drupal 8 site as follows:

$civicrm_root = '/PATH/SITE/public_html/sites/all/modules/civicrm';

became this :

$civicrm_root = '/PATH/SITE/public_html/vendor/civicrm/civicrm-core';

But I this error message was the result:

PHP Fatal error:  Call to undefined function variable_get() in /var/data/sites/reveal/public_html/vendor/civicrm/civicrm-core/CRM/Utils/System/Drupal.php on line 790and –-

I was able to separate my Drupal 8 database from my CiviCRM database fairly easily, here are my notes I took on how to do it. Note that these steps aren't particularly specific to Drupal 8, and can be used to convert any single-database install into a two-database install.

Create a new database (e.g. "example_civi") on the same server.
Do NOT create a separate MySQL user - just use the same MySQL user
Drupal uses.
Grant permissions to the user.  Here's the permissions you need:

TABLES, CREATE TEMPORARY TABLES, TRIGGER, CREATE ROUTINE, ALTER ROUTINE,
CREATE VIEW, SHOW VIEW, REFERENCES ON ``.* TO ''@'localhost';

Load a dump that just has CiviCRM tables into the new database.  Steps to dump tables by prefix are available. Since you sound like you're potentially upgrading an existing site, you can just copy the existing database instead.
Drop the CiviCRM tables from the Drupal database.  There's a good
explanation of how to remove tables by prefix.

On the last step, note that foreign key constraints will cause some tables not to delete.  You'll either need to run those steps multiple times or disable FK constraints before dropping the tables.

UPDATE:  See also how to enable Views integration on D8 with separated databases.


Running cron job CiviCRM on Drupal in the CPanel I am trying to configure the CiviCRM file "sites/all/modules/civicrm/bin/cron.php" to be run as a cron job.  If I paste the url:

https:// domain.com/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=key

in to the web browser, with the username, password and key specified then the cron.php is triggered.

But if I create a cron entry via the CPanel and define the command as:

/usr/local/bin/php /home/username/domain/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=key

then the cron job is not triggered.

If i try:

/usr/bin/wget https://domain/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=key

then the cron job is equally not triggered.

Any ideas what the issue might be?  Or what else i could try to get it to run?

At the moment I do not have access to server logs so can't see what is causing the issue.

I appear to have resolved the issue with the help of the thread at Cron job with shared hosting CPanel

The issue was related to missing backslashes after the username and the password.

/usr/bin/wget https://domain/sites/all/modules/civicrm/bin/cron.php?name=username\&pass=password\&key=key


CiviCase dashboard for individuals In our system, based on imported data, we have the role of Pastor (whose parent is individual), and pastors are the only contacts with Drupal accounts.

When a pastor logs in, they are shown the dashboard for their Household, but this is, of course, empty, as all cases and activities have been assigned to them as an individual.

How can we correct this?

There are multiple things called dashboard, but if I understand right I think the one you're looking for is the "Case" dashboard, which is not the default dashboard unless you change the frontpage under /admin/config/system/site-information. The case dashboard is under the Cases menu.


Best platform for a new website with CiviCRM: WordPress or Drupal? Which platform - at the present day (but also with an eye for the future) - is recommended to use for a new organization that is setting up a completely new website and want to use CiviCRM?

I'm volunteering for this org. and am helping them decide what platform to use

My thinking so far:

For Drupal, i understand that at the present day integrates better with CiviCRM, with fewer bugs and with slightly more extensions.
Drupal has better security (and the org. will be accepting donations and memberships)
Also the fact that CiviCRM uses Drupals "permissions" and "roles" could be a plus maybe?
For WordPress, i'm thinking that the growth and size is a long-term advantage, for example if the organization needs to find more developers.
Also, future development of CiviCRM could maybe be geared towards prioritizing WordPress because of it's popularity?

Grateful for any help on how to think about all of this!

Respectfully and with kind regards,
Tord

Reference: How is CiviCRM different in Drupal, Joomla, and WordPress?

I'd originally started my Civi 'journey' by bolting it onto our existing Wordpress site, and that was fine for holding contact details and sending out bulk emails/SMS.

As we started to use Civi more though, it became quickly apparent that we couldn't do many of the things in Wordpress that we'd like to. The lack of an equivalent to the Drupal webform module was by far the biggest stumbling block for us (with the views module coming close behind). The ability to receive webform input directly into CiviCRM was key for us - we wanted volunteers and our clients to be able to input data in a way that Civi's profiles just wouldn't allow if we had stuck with Wordpress.

It was a fair bit of work (and a steep learning curve for me!) for us to transition across to Drupal, but the ecosystem around it and the sheer number of available modules has made it more than worth it. If I was in your position, as a new organisation setting up a new site, I'd go with Drupal in a heartbeat.


what kind of sanitization needs to be done when doing civicrm_api3('Contact', 'create') inside custom drupal modules? How does creating contacts via civicrm_api3() fit into these areas https://docs.civicrm.org/dev/en/latest/security/#strategy
https://docs.civicrm.org/dev/en/latest/security/inputs
?

If I'm using this inside custom drupal modules, is it safe to simply:

function mycustom_webform_submission_insert($node, $submission) {
  if ($node->nid == 123) {
    civicrm_api3('Contact', 'create', array(
      'sequential' => 1,
      'contact_type' => 'Organization',
      'contact_sub_type' => 'Sub Type Name',
      'organization_name' => $submission->data[48][0],
      // I've done nothing to that $submission data, it's only been processed by whatever Drupal/Webform module do.
      // Is that a security risk?
    ));
  }
}

The Drupal Webform module sanitises form inputs.

The Webform CiviCRM Integration module uses the underlying webform submission functions to sanitise data.

However the accepted answer on this question makes a very valid point.

  It's a common misconception that user input can be filtered. PHP even has a >(now deprecated) "feature", called magic-quotes, that builds on this idea. It's nonsense. Forget about filtering (Or cleaning, or whatever people call it).
  What you should do, to avoid problems, is quite simple: whenever you embed a string within foreign code, you must escape it, according to the rules of that language.

Both modules mentioned above are covered by the Drupal security advisory policy.


How to remove the dummy contacts from the default contact DB How can we remove the dummy contacts from the default contact database?

I assume you have loaded the sample data and you want to get rid of those? If that is the case, best advice is re-install WITHOUT loading the sample data. If you have loaded the sample data, you do not only have contacts but also cases, contributions, pledges, activities, events etc. and some configuration.


Add/update activity date time using webform Is it possible to use webform to update the activity date and time using webform?

Below please find some screenshots to show you how: note there is an Activity Date and an Activity Time checkbox


API CSV Import -> for ActivityContact -> invalid value for record_type_id Using API CSV import to try add entries to the civicrm_activity_contact table -> running out of ideas as to what I need to use for record_type_id (see screenshot) - any other ideas are welcome! Trying to get a GUI solution for a client.

API explorer says "Activity Assignees". And as noted in comment it must have the upper case A's.


Cannot install extensions on a wordpress+civicrm install I'm trying to install CiviVolunteers on a Wordpress site, and when i click the "download" link on the extensions list page, i get this error message:

Sorry but we are not able to provide this at the moment.
Unknown extension

Any ideas on what might be the issue?

I'd be happy to provide wordpress admin access upon request, i'm not sure if it's common to put the login info here...

After experiencing this same problem, I dug a bit deeper, and confirmed that this is a bug in CiviCRM 4.6.  I've submitted it here: https://issues.civicrm.org/jira/browse/CRM-16590

UPDATE: this is fixed in version 4.6.4+.


Is slicknav really obsolete? The slicknav mobile extension classes itself as Obsolete when we load it into our extensions. https://civicrm.org/extensions/slicknav-web-responsive-admin-menu.

Is this really true? And if so, is it known what it would take to make it current again?

Or is there some other way of having a mobile responsive menu with Civicrm?

We are also looking at the CiviMobile app, which is really really cool! In fact it may make a mobile menu quite obsolete, although there are some parts of Civi we'd like to access (such as pledges and projects) on a mobile device that CiviMobile can't.

We're with latest Drupal 7 and Civicrm 5.21

Yes it was made obsolete when another menu system was brought in: https://github.com/civicrm/civicrm-core/pull/13582

You could try the shoreditch theme: https://civicrm.org/extensions/shoreditch


Geocoding using google api I'm having problems getting consistent behavior from CiviCRM's Address Geocoder scheduled job.  Yesterday I was able to geocode a handful (~1700) records but today I am getting an over quota message in the log.

  Parameters raw (from db settings):
  geocoding=1
  start=47000
  throttle=5

  Parameters parsed (and passed to API method):
  a:4:{s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"start";s:5:"47000";s:8:"throttle";s:1:"5";}

  Full message:
  Finished execution of Address geocoder with result: Failure, Error message: A fatal error was triggered: Aborting batch geocoding. Hit the over query limit on geocoder.

Using the same parameters yesterday (with the exception of a different CID for the start parameter) I had some success.

  Parameters raw (from db settings):
  geocoding=1
  start=47877
  throttle=5

  Parameters parsed (and passed to API method):
  a:4:{s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"start";s:5:"47877";s:8:"throttle";s:2:"10";}

  Full message:
  Finished execution of Address geocoder with result: Success (Addresses Evaluated: 1094
  Addresses Geocoded: 1094
  )

I'm running CiviCRM 4.4.19 and using Google as my mapping and geocoding provider.  I've tried with and without an API key.  The job is being executed manually from the UI.  Does anyone have any thoughts on what is going on or any ideas how I can troubleshoot this further?

Thanks.

While the Google API has an unauthenticated limit of 2,500 requests per day per IP, using an API key currently gives free a quota of 100,000 requests per day, with additional requests by payment.

You'll need a recent-ish (4.7.9, 4.6.23 or greater) version of CiviCRM to use the API key for geocoding: CRM-18830: Google Geocoding - use SSL, restore API key.

With this you should be able to geocode a larger number of addresses.

Your API key should be configured with the following permissions:

Google Maps Geocoding API (for geocoding)
Google Maps JavaScript API (for displaying / mapping)


Discounts for multiple price field selections (e.g. select all five options and get $X off) Is it possible to set up a price set such that selecting multiple options would lower the total price?

Our use case is a summer camp. You can register for a day ($50) or for a week ($190). We need to be able to set a maximum number of participants for each day. So, if we could make a form where you simply select all days in the week to register for an entire week and a $60 discount was applied in that case, this would satisfy our requirements.

Putting in the week as a separate option would make it impossible to have registration limits for each day. The camp has multiple weeks over the summer, so we can't use a registration limit for the whole event to do this.

This is currently set up as a webform, but that comes with other issues, so it would be preferable to find an option that works with price sets and CiviEvent.

Maybe you could create the price set with 5 individual day options each at $50 and a 'Full week discount' at -$60 and then add javascript to hide the discount option and set it when all 5 days are selected.

As a javascript approach that is open to someone messing with it and selecting the discount option when they should not so you might want to add a check on the server side as well - depends a bit on your audience.


CiviCRM Contact Information Merging and Overriding Unrelated Users/Donors Ok, I am going to try and explain this as best I can:

I am working with nonprofit to help export their donors for last year, but some of the contacts have their own email address listed as well as another individual's email address that is completely unrelated. Sometimes the address information is completely different as well.

It looks like it has been merging/overriding the contacts based on their first names, but it doesn't do that for everyone with the same first name.

They set their event registration duplicate matching rule to "Name and Address (reserved) - General" and I'm think that may have something to do with the merged contacts? My customer isn't manually merging duplicate contacts, so that's where some of the confusion lies as well.

They also have online contributions setup, so CiviCRM is also merging/overriding the information used when making contributions if it's different than what is already showing in the contact record.

Here are a couple of examples:

Billy S recently donated $25 - in his CiviCRM contact record, his home email is listed as xxx@beverly-hanks.com and personal email as yyy@gmail.com
Katherine (Kathy) V recently donated $1,000 online - in her CiviCRM contact record, her home email is listed as xxx@ywcaofasheville.org and her billing email is yyy@gmail.com

**In both of these cases the "home email" is incorrect but the personal or billing email is correct.

This example is the one that is actually combining 4 different contacts with the first name of "John", but only one John now exists as a contact in CiviCRM:

John M donated $100 on Oct 30, 2017

John V donated $1,000 on Dec 6, 2017

John W donated $250 on Dec 22, 2017

John R donated $1,000 on Dec 31, 2017 (this is the only contact that is now showing in CiviCRM, but it includes all 4 of those donations)

Each of these donors received their receipts to their own email addresses confirming their contribution.

Now, when we pull a report, only John R's name is listed and he's listed as giving 4 times:

10/30/2017 16:25 - $100.00

12/6/2017 22:21 - $1,000.00

12/22/2017 7:32 - $250.00

12/31/2017 10:35 - $1,000.00

When searching contacts in CiviCRM, John R's name is the only one that comes up. When searching by email addresses, only John R's email "exists" in the system.

So, is this all related to the dedupe rule that has been used for events that these donors have also signed up for?

Or is it something else entirely?

Any assistance with this would be GREATLY appreciated!

And if you need any further clarification, just let me know because I know this is very confusing and difficult to fully explain :)

Thank You!

Oh dear, yes that sounds like things are in a mess. Some suggestions

It sounds like you need to review the Dedupe Rules that are set up and in use. That should include checking that the 'threshold' has been set correctly
You should check if logging is turned on (civicrm/admin/setting/misc?reset=1) and hope that it is as that should let you use the Change Log tab to try and identify and restore changes
if you have access to the db and have access to some sql skills then you may be able to repair some of the problems


How can I send "Birthday wish" email to contact? I have tried to create a smart group for the contact who's birthday is today and send an email via civirules, but search builder doesn't have option to set the date as "Today".

Is there any alternative way to achieve this?

Just wondering if anyone has worked on a similar flow and give a hint please?

I would not use a smart group, but use the "Individual has birthday" trigger that is included in CiviRules?


How to enter relationship dates before 1997? In relationship management you also want the information to be complete and include relationships that were before CiviCRM was used. This could typically be relationships older than 20 years. CiviCRM imposes a limit and I cannot find the setting to change it to our needs.

For CiviCRM 4.6+ go to Administer menu > Customize Data and Screens > Date Preferences. From there, change the Start Offset of SearchDate.

I found this answer in Member since date before 1995 and although it talks about Membership dates, it apparently applies to Relationship dates too.


Is it possible to restrict event registration to members? I've been trying to figure out how to set up events where only members can register. Is this possible?

What I'm looking for is the ability to:

specify one or more memberships that can register for an event, and
limit registration to those members.
require authentication as part
of registration for events where membership is required OR allow
membership signup during registration
not require authentication if
the event registration is not limited to members only.

I'm running CiviCRM on Drupal, and I know I could set the Drupal permission for CiviEvent: register for events so that only logged-in users with a given role could register. I would then sync CiviCRM memberships with Drupal roles. But I only want to limit some events, not all, so this approach won't work.

Also, if I had multiple roles (one per membership), those roles would all need the same Register permission, meaning any member could register for any event, even those events should be limited to people holding a specific membership.

I also know that I could publish details of member-only events to just those members. But those members could share the registration URL with non-members, who could then register.

Any suggestions?

The way I do this is by using the "Require participant approval?" feature in the event set up. This means that anyone can apply for the event, but then their application is manually reviewed by one of the admins to see if they are a member.

Clearly, this introduces a manual process, but it does mean it's quite secure and it means any anonymous user can apply without having to log in.


What are the most popular extensions for CiviCRM? Ever wonder how many Civi sites are using a particular extension? Which are the popular extensions your site is not yet using? Me too!

Here's the answer - the most popular extensions for CiviCRM ranking numbers are here: https://stats.civicrm.org/?tab=sites


Payment area disappeared We've had a CiviCRM site running for a while. Just recently our payment area is missing on all our events, contribution pages, and membership pages. As such, people cannot select to do Paypal, credit card (Authorize.net), or pay later.

Here's an event: https://www.zendust.org/civicrm/event/register?id=158&reset=1

Here's the donate page: https://www.zendust.org/civicrm/contribute/transact?reset=1&id=3

I completely cleared out any custom template pages we had in our CiviCRM files directory. This is a fresh install of Civi - I had to do the whole database dump and then into a new database and then run the updates, as updates were failing. I don't know if this has been an issue ever since we redid the database or not, as folks just noticed it.

I just took a look at your pages. If you select a pricing level (which generates an amount due) the options for payment type appear. These options are hidden until there is a total amount due. For your event since there is only one price you may want to make it default.


Looking for a Dutch CiviCRM basics manual or book Is anyone aware of a book, document, customer manual or other Dutch material that could help customers in understanding and using the basic functionality (like searching, basic concepts ...) ?

Unfortunately not Paul, but if you start writing let me know :-)


PHP Fatal Error on Custom Report Background
We have had Civicrm running for two years. last week a malicious attack occurred. We had to implement a back up copy taken of our crm on 12th June 2018. All is working except for a custom report called Residential Communities Report.

Issue
When clicking on Membership Reports then clicking on Residential Communities Report it throws to a HTTP 500 Error. When looking at the error log it shows the following:

[17-Jun-2018 08:51:09 Australia/Sydney] PHP Fatal error:  require_once(): Failed opening required 'CRM/Report/Form/Contact/Residential.php' (include_path='/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/uk.co.vedaconsulting.membershipchurnchart-master/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/uk.co.vedaconsulting.outlookapi-master/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/uk.org.futurefirst.networks.civipoints-1.0/uk.org.futurefirst.networks.civipoints-1.0/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/org.civicrm.module.cividiscount/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/eu.tttp.civisualize/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/nz.co.fuzion.extendedreport/:.:/home/gazzafm/public_html/crm/sites/all/modules/civicrm:/home/gazzafm/public_html/crm/sites/all/modules/civicrm/packages:.:/home/gazzafm/public_html/crm/sites/all/modules/civicrm:/home/gazzafm/public_html/crm/sites/all/modules/civicrm/packages:/home/gazzafm/public_html/crm/sites/all/modules/c in /home/gazzafm/public_html/crm/sites/all/modules/civicrm/CRM/Core/Controller.php on line 451

A lot of the error seems to also include extensions. We have checked those extensions and they are all working. Not sure why they are included in the error log.

Im including Line 451 from the Controller.php for reference here:

require_once str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';

Im not certain why this one report is causing an error. We have checked the paths and the report is registered.

Any ideas would help. I have also included the code around the line 451 if that also helps:

  $ext = CRM_Extension_System::singleton()->getMapper();
  if ($ext->isExtensionClass($className)) {
    require_once $ext->classToPath($className);
  }
  else {
    require_once str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
  }
  $$stateName = new $className($stateMachine->find($className), $action, 'post', $formName);
  if ($title) {
    $$stateName->setTitle($title);
  }
  if ($options) {
    $$stateName->setOptions($options);
  }
  if (property_exists($$stateName, 'urlPath') && isset($_GET[CRM_Core_Config::singleton()->userFrameworkURLVar])) {
    $$stateName->urlPath = explode('/', $_GET[CRM_Core_Config::singleton()->userFrameworkURLVar]);
  }
  $this->addPage($$stateName);
  $this->addAction($stateName, new HTML_QuickForm_Action_Direct());

  //CRM-6342 -we need kill the reference here,
  //as we have deprecated reference object creation.
  unset($$stateName);

You state that the Residential Communities Report is a custom report. And, indeed, I cannot find it in the list with standard reports. Custom reports can be installed in two ways.

In an extension. You could check if all your extensions are restored and enabled.
It is put in the Custom PHP directory, that can be configured using civicrm/admin/setting/path . Check this value. Maybe you restored on another file location and this value is incorrect.


Can members pay renew fees early? Can members pay their dues early? Basically before the system has them as expired.

If they renew early, it should just extend their membership. (e.g. if it is an annual membership and they have 2 months left when they renew, they should have 14 months on their membership afterwards).


Payment link in Civi invoice Our organization hosts events and has memberships individuals sign up for on our website. If someone signs up for a membership or registers for an event online they have two options for payment. They can choose to "pay now" on the registration page or they can choose "invoice me". We do not currently utilize the invoice feature in Civi. Instead we have our accounting department send an invoice to the requesting party. We would like to begin using Civi Invoice. However, we noticed there is no online payment functionality (i.e. payment link) in the link or email.

Is this something we would need to enable or is there a plug in that would allow us to send invoices that contain a payment link in the invoice or email? If not, does anyone have a work around process for allowing members to pay for membership online via an invoice.

You can use "Default invoice payment page" setting which is used to set contribution page that can be used to pay pending or partially paid contribution using payment processor.
More about the setting and uses:
Wiki: https://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=346750980
Here is how you can achieve this

Create a Contribution Page by enabling Other amount and payment processor.
Navigate to Administer >> CiviContribute >> CiviContribute Component Settings and select contribution page create at #1 for Default invoice payment page
Create a contribution for a contact with pending status.
On User Dashboard of contact (/civicrm/user?cid=[contact_id]) under contribution section you will see pay now button against the pending contribution. When clicked on pay now it will redirect to online contribution page where one can pay pending contribution online using credit card.

You can also generate the link to pay pending contribution online http://domainname.com/civicrm/contribute/transact?reset=1&id=[contribution_page_id]&ccid=[contribution_id]

where contribution_page_id(id) is contribution page id created at #1 and contribution_id(ccid) is contribution id created at #3.
6. You can use this link to send in invoice for people to pay online.
HTH
Pradeep


Older CiviCRM that does NOT require TRIGGER privileges? As of title, I'm looking for a CiviCRM version that does not require trigger privileges, since the hosting service that I'm using does not support it, currently I'm on version CiviCRM 4.7.13 and getting this error when I try to create a new contact:
"Sorry but we are not able to provide this at the moment.
DB Error: insufficient permissions"

these are the privileges on my user from MySQL:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON db1234.* TO 'usr1234'

I'd recommend approaching the problem the other way round: find a hoster that works with the latest versions of Civi rather than find a version of Civi that works with your current hoster.  You will be missing out on many new features and security fixes if you choose to run an old version.  It will only bite you later.

Is there any reason not to move hoster?  As ErikH points out, there are several specialist CiviCRM hosting services - but not all are equal.  See eg How to evaluate hosted CiviCrm enviroments


Undefined offset: 1 in CRM_Utils_Check_Security->guessUrl() Notice: Undefined offset: 1 in CRM_Utils_Check_Security->guessUrl() (line 330 of /home/saintfran/www/www/sites/all/modules/civicrm/CRM/Utils/Check/Security.php).

I found the following on the issue queue and the old forums but they say they are fixed and that it's related to windows. I'm  not on a windows machine. I'm hosted on civihosting with 4.6.2.

https://issues.civicrm.org/jira/browse/CRM-15214
http://forum.civicrm.org/index.php?topic=32544.0

So I think I found the fix.

I had my Images directory under Admin=>Directories to the following:
/home/my_site/www/www/civi_images

The Image Upload URL under Admin=>Resource URLS to the following:
https://saintfrancisocc.org/civi_images

When I upgraded to 4.6.2 is when I started getting the error. I checked that line in the Security.php file and it referred to the uploadurl as samuelsov stated. So I thought I'd try changing that to something else and see if it fixed it.

I changed the Images director under Admin=>Directories to the following:
/home/my_site/www/www/sites/default/files/civicrm/civi_images/

And changed the Image Upload URL under Admin=>Resource URLS to the following:
https://saintfrancisocc.org/sites/default/files/civicrm/civi_images/

I went and refreshed and no more error. So it appears that civi 4.6.2 doesn't like the upload directory to be at the root


Does CiviCRM Spark come with a Drupal or Joomla website? I am considering purchasing CiviCRM Spark to trial it for my organization. I know CiviCRM can be loaded into Drupal, Joomla or Wordpress. I was just wondering whether "spark" is a stand-alone product or if it comes with either website (CMS) platform.

Thanks!
Chris

Sorry, Spark cannot handle the public-facing website part. We have locked out those Drupal features. Only the CiviCRM features are available.

However, you can use another service to create your website, then point to your CiviCRM forms hosted on Spark (donation form, newsletter signup, event registration, etc).

CiviCRM Spark aims to help people evaluate and get started with CiviCRM. It is also suitable for smaller organisations (larger ones will hit the contact/email limits and will want to customize it more). For those who outgrow Spark or who have more customization requirements, we recommend contacting a CiviCRM hosting partner.


Allow multiple registrations from the same email address requires a profile of type 'Individual' Long time ago, we had created event and template for event.
We give permission to user to register multiple participant with same email address.

Now we have problem with a lot of question link to participant.

At this time we receive this error :
"Allow multiple registrations from the same email address requires a profile of type 'Individual'"

I think problem is comming from dedupe rules but I can resolved it.
I have create new one but it change nothing. I received this error

But I receive error when I was creating new user more detailed error like this :

#0 /home/username/etuc/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(187): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /usr/share/php/PEAR.php(890): call_user_func((Array:2), Object(DB_Error))
#3 /home/username/etuc/docroot/sites/all/modules/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: constraint violation", -3, 16, (Array:2), "DELETE FROM civicrm_dedupe_rule_group  WHERE (  civicrm_dedupe_rule_group.id ...")
#4 /usr/share/php/PEAR.php(531): DB_Error->DB_Error(-3, 16, (Array:2), "DELETE FROM civicrm_dedupe_rule_group  WHERE (  civicrm_dedupe_rule_group.id ...")
#5 /home/username/etuc/docroot/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -3, NULL, NULL, "DELETE FROM civicrm_dedupe_rule_group  WHERE (  civicrm_dedupe_rule_group.id ...", "DB_Error", TRUE)
#6 /home/username/etuc/docroot/sites/all/modules/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-3, NULL, NULL, NULL, "1451 ** Cannot delete or update a parent row: a foreign key constraint fails ...")
#7 /home/username/etuc/docroot/sites/all/modules/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /home/username/etuc/docroot/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("DELETE FROM civicrm_dedupe_rule_group  WHERE (  civicrm_dedupe_rule_group.id ...")
#9 /home/username/etuc/docroot/sites/all/modules/civicrm/packages/DB/DataObject.php(2438): DB_common->query("DELETE FROM civicrm_dedupe_rule_group  WHERE (  civicrm_dedupe_rule_group.id ...")
#10 /home/username/etuc/docroot/sites/all/modules/civicrm/packages/DB/DataObject.php(1449): DB_DataObject->_query("DELETE FROM civicrm_dedupe_rule_group  WHERE (  civicrm_dedupe_rule_group.id ...")
#11 /home/username/etuc/docroot/sites/all/modules/civicrm/CRM/Core/DAO.php(519): DB_DataObject->delete(FALSE)
#12 /home/username/etuc/docroot/sites/all/modules/civicrm/CRM/Contact/Page/DedupeRules.php(218): CRM_Core_DAO->delete()
#13 /home/username/etuc/docroot/sites/all/modules/civicrm/CRM/Contact/Page/DedupeRules.php(123): CRM_Contact_Page_DedupeRules->delete("1")
#14 /home/username/etuc/docroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Contact_Page_DedupeRules->run((Array:3), NULL)
#15 /home/username/etuc/docroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#16 /home/username/etuc/docroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#17 /home/username/etuc/docroot/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
#18 [internal function](): civicrm_invoke("contact", "deduperules")
#19 /home/username/etuc/docroot/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#20 /home/username/etuc/docroot/index.php(21): menu_execute_active_handler()
#21 {main}

Sorry but we are not able to provide this at the moment
"Supervised rule for Indivual does not exist"

How have the same problems? What are solutions?

Thanks a lot.

NI

The list line is probably the information you need

  "Supervised rule for Indivual does not exist"

Go to your Duplicate matching rules and confirm if this is missing and create it.

/civicrm/contact/deduperules?reset=1

Read the book on DeDupe rules if you need more info on creating Rules.


Upgrade to civicrm 5.17.4 fails with PHP 7.1 Uncaught Error: [] operator not supported for strings Testing an upgrade from 5.13.4 to 5.17.4 on wordpress, I get a fatal error. This is on PHP 7.1.32.

PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/SmartGroups.php:105
Stack trace:
#0 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/SmartGroups.php(48): CRM_Upgrade_Incremental_SmartGroups->datePickerConversion(Array)
#1 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/Base.php(233): CRM_Upgrade_Incremental_SmartGroups->updateGroups(Array)
#2 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php(88): CRM_Upgrade_Incremental_Base::updateSmartGroups(Object(CRM_Queue_TaskContext), Array)
#3 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php(217): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#4 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php(52): CRM_Queue_Runner->runNext(true)
#5 /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Queue/ in /home/dhwpuser/testdomain/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/SmartGroups.php on line 105

This appears to be a well known issue with PHP 7.1. See for example this issue.

Proper define of the array will sort you out, Please check out this Post, this issue is seen with many places after upgrade php.


Are Civicon Session materials aggregated somewhere? I have seen session slides on slideshare and some youtube videos, and links posted on civicrm.org but wondering if there is a repository for all things civicon somewhere that is publicly available?

Here is a playlist with the videos on Youtube for 2015:


Opt out by email -- return address doesnt exist I am testing our ability to include opt-out as well as unsubscribe by email options to a bulk email newsletter.

When I try to opt-out/unsubscribe from a test message (as recipient) using the provided email address (e.g., u.2679.86732.92da29cb61fe154d@my_organization), I receive another email indicating the opt out address does not exist.

Can anyone help me understand why this error occurs and how I can correct it?

Thanks in Advance!

it means you haven't properly set up your bounce account - ie. beside not processing the opt-out, you do not process the bounces either -

check the documentation on how to set it up https://wiki.civicrm.org/confluence/display/CRMDOC/CiviMail+Installation#CiviMailInstallation-SettingUptheReturnChannel


How to authenticate user in Spark I'm using the spark version of civicrm and can set up CiviCRM contacts to be administrators, but am having trouble with user authentication (allowing users to log in).

The spark version runs under Drupal and I've read through the Drupal directions, and maybe it's me, but the drupal interface doesn't seem to be particularly transparent.

Does anyone know how to allow authentication, or even if this is possible?

Here is how to add new user accounts* in the Spark interface (if you don't want to use the URL that Noah provides above).

Step 1: Click the down arrow icon at the upper right of your screen.

This will expose another menu.

Step 2: Click "Manage Users" on that menu.

This will take you to the the screen where you can add new users.

*It might be helpful to review the difference between CiviCRM contacts and user accounts.


CiviBooking menu doesn't function correctly I was going to do some testing with the CiviBooking extension but have found that after installation the new menu item is non-functional.

I had a copy of the extension from some time earlier but I hadn't found time to test yet. In case I had an outdated copy, I uninstalled, took the latest Zip from the GitHub repo, reinstalled, cleared caches. I still have a menu item that displays funny and doesn't have any hover functionality:

Has anyone else experienced the same, and if so, how did you correct it?

Further research indicates this may possibly be due to the fact that there does not seem to be support for CiviBooking beyond CiviCRM 4.4 currently.


Twilio extension installation problem - php query (I think!) I have installed the twilio extension (extensions, github) on a new civicrm site.
I was unable to install using the in civicrm method so uploaded via FTP and then refreshed the installed extension page. Pressed install and got the following error message.

Warning: Invalid argument supplied for foreach() in _twilio_civix_civicrm_xmlMenu() (line 34 of /var/www/vhosts/XXXX.net/httpdocs/sites/default/files/civicrm/custom_ext/org.civicrm.sms.twilio-master/twilio.civix.php).
Warning: Invalid argument supplied for foreach() in _twilio_civix_find_files() (line 118 of /var/www/vhosts/XXXXX.net/httpdocs/sites/default/files/civicrm/custom_ext/org.civicrm.sms.twilio-master/twilio.civix.php).

I have gone and looked the twilio.civix.php  file
The first instance:
function _twilio_civix_civicrm_xmlMenu(&$files) {
  foreach (glob(__DIR__ . '/xml/Menu/*.xml') as $file) {  // this is line 34
    $files[] = $file;
  }
}

And the second instance:
function _twilio_civix_find_files($dir, $pattern) {
  $todos = array($dir);
  $result = array();
  while (!empty($todos)) {
    $subdir = array_shift($todos);
    foreach (glob("$subdir/$pattern") as $match) { // this is line 118
      if (!is_dir($match)) {
        $result[] = $match;
      }
    }
    if ($dh = opendir($subdir)) {
      while (FALSE !== ($entry = readdir($dh))) {
        $path = $subdir . DIRECTORY_SEPARATOR . $entry;
        if ($entry == '.' || $entry == '..') {
        } elseif (is_dir($path)) {
          $todos[] = $path;
        }
      }
      closedir($dh);
    }
  }
  return $result;
}

But I literally have no clue what is wrong as I am not that familiar with PHP. I have tried to install both the new version of twilio and the previous version but the error message is the same. I have successfully used the twilio extension on another site.
Any thoughts about where to go with this woudl be gratefully received!
Thanks
Caroline
Site is drupal 7/CiviCRM 4.6.8.

These two are warnings, not fatal errors. It's possible that they are harmless, and likely that they indicate that the extension is not yet configured.

Both report that the glob() for files returned something other than an array - which suggests that glob returned FALSE, meaning either the path searched didn't exist or the web user's permissions didn't allow CiviCRM to scan for files there.

First off, I'd make sure the extension is configured properly. If that didn't solve the issue, I'd add some debug code to see what the return value of glob() is before treating it as an array, and if the return value isn't an array to produce a helpful error message.

If that sounds too complex, you could open an issue on the Github project for Twilio, and refer the authors to this extension.


How to control access to a Panel or View in Drupal based on CiviCRM Activity or completion of webform I would like to control access to audio from a recent conference based on completion of a feedback form (webform).

I have created an Activity type for the feedback and added that completed activity to the contact upon completion of the form.

I would like to allow access to the audio content for those contacts with that completed activity, but can't see any Civi fields to operate on in Views (Filters, Contextual Filters, or Relationships) or in Panels (Selection Rules).

I'd prefer to use the selection rules in panels to do this, but will go with whatever works first!

I'm sure I've filtered on Civi stuff before in Views and I know everyone else does.  Not sure what's going on.

I've moved the database to a new server recently and tacked it onto the back of a different Drupal installation, but I've addded the requisite lines to settings.php and the other Civi integration modules work, e.g. Rules.  CiviCRM is working fine and I can integrate with Webform.

I'm using Drupal 7.43 and CiviCRM 4.7.6.

Thanks,
Lewis

I'd handle this by adding folks to a smart group with the selection criteria being those who have the activity associated with the completed webform.  Then use Group-Role synchronization to add folks to a role, and restrict access based on role.


How do i properly include civicrm.settings.php to use api calls? Quite a long time ago I wrote an external script that does this at the top:

require_once '/path/to/joomla/install/com_civicrm/civicrm.settings.php';
require_once '/path/to/joomla/install/civicrm/CRM/Core/Config.php';
$config = CRM_Core_Config::singleton( );

...so that I can use civicrm_api() calls from an external php script.  Now after upgrading to the 5.x train of CiviCRM I realized my script was not working.  If I manually run the script I get this error:

  PHP Parse error:  syntax error, unexpected '$this' (T_VARIABLE) in .../civicrm/CRM/Core/DAO.php on line 1123

In an effort to determine if this was happening in a civicrm_api() call I made a file with just the three lines quoted above and run it with php, and it produces the error.  So I'm pretty confident the issue is the require_once trying to include these files, not the actual act of making an api call.

I've found numerous references to $this issues in DAO.php, but none of them are relevant to including these two files for the purposes of API calls and the line number of the failure is always different.

How can I fix this so I can use my existing script?

I think I found the issue. Command line php was 5.4.16 despite the website using 7.x.


Mailing_send_test error I'm getting the following error when I'm trying to send a test email.

  Error in call to Mailing_send_test : Error in call to
  MailingJob_create : DB Constraint Violation - possibly mailing_id
  should possibly be marked as mandatory for this API. If so, please
  raise a bug report

Civi was working yesterday. Some reports have been run since then but nothing else. I'm on 4.6.22 for Drupal.  Any thoughts on how I can fix this bug?

I needed toL

  drush cc civicrm.

clearing Civi cash via ui did not work
drush cc all did not work

many thanks to Christia: https://civicrm.stackexchange.com/a/19237


Why is my search for a specific contact subtype giving no results? I'm working on a site that uses several contact subtypes for the Organisation contact type. Following a recent upgrade, everything seems to be working fine, but a basic or advanced search for contacts of this particular subtype gives zero results. Searches for other contact subtypes are working fine. Looking at the database I can see that there are in excess of 1300 contact records with this contact subtype, and they aren't in the trash.

Any thoughts on what the issue might be, how to fix it, or how to work around it (I was thinking about the possibility of creating a new contact subtype and applying this to all of the records - assuming of course that I can find them!).

I remember there was a patch for a contact type search...let me dig....that was with CiviCRM 4.6 and the issue was https://issues.civicrm.org/jira/browse/CRM-18063. The patch worked for me, but I am not sure if you have the same problem?


How does one call civicrm_api3_system_check API What are the valid parameters to pass to civicrm_api3_system_check($params)?

Passing $params = false or $params = array() causes an infinite loop despite my try catch.

../civicrm/civicrm/api/v3/System.php gives no hints

../civicrm/civicrm/api/v3/examples/System/Flush.php only shows how to use System flush

Your example of calling System.check with an empty $params array should work. For example, this is what I get if I call the API from the command line:

$ cv php:eval 'return civicrm_api3("System","check", array());'
{
    "is_error": 0,
    "version": 3,
    "count": 6,
    "values": {
        "1": {
            "name": "checkExtensionUpgrades",
            "message": "Extension upgrades are pending.  Please visit the upgrade page to run them.",
            "title": "Run Extension Upgrades",
            "severity": "error",
            "severity_id": 4,
            "is_visible": 1,
            "icon": "fa-plug",
            "id": 1
        },
        ...

(For other media, you can use the API Explorer to get code snippets.)

There are a lot of checks, and it's possible that they're slow on some systems. Alternatively, maybe one of the checks has a bug, relies on an incorrect assumption about the environment or data, or has an interaction with third-party code?


Blank CiviCRM Home page after install This is my first time installing Civi. The install appeared to go OK but the Home and Configuration pages are blank.
The inspector shows these errors:
Error: CRM.url called before initialization CRM.console @ Common.js?r=l6LAc:1617
Error: Cannot read property 'back' of undefined
My error log shows:
PHP Warning: include(/ebs2/vhosts/mvfn.ca/staging.mvfn.ca/wp-content/uploads/civicrm/templates_c/en_US//%%52/529/529A2042%%l10n.js.tpl.php): failed to open stream: No such file or directory in /ebs2/vhosts/mvfn.ca/staging.mvfn.ca/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1273
That file is indeed missing. The /templates_c/en_US/ directory exists but has only .htaccess in it. Permissions for that and all the other /uploads folders are 755, and the owner and group are the same for all.
Am I able to locate that file in the plugin ZIP and upload it manually? Any other ideas? Thanks.
I'm running WP 5.7.1.
UPDATE
Hi Aidan, thanks for your reply. I did follow that install procedure, yes, and the owner and group for that folder appear to be the same as for the rest of the server. In checking my logs I see a security warning at about the time I was doing the install -- some Googling suggests that this is a message from the Imunify security application. Sounds like I may have to try and sort this out with my hosting company.
[client 174.89.56.82] ModSecurity: [file "/etc/httpd/conf/modsecurity.d/rules/custom/004_i360_4_custom.conf"] [line "905"] [id "77140992"] [msg "IM360 WAF: Suspicious access attempt (WP folders)!||SC:/var/www/vhosts/mvfn.ca/staging.mvfn.ca/wp-admin/options-general.php||T:APACHE||REQUEST_URI:/wp-admin/options-general.php?page=civicrm-install||"] [severity "NOTICE"] [tag "service_i360custom"] [tag "noshow"] Warning. Match of "pmFromFile path_excludes" against "REQUEST_FILENAME" required. [hostname "staging.mvfn.ca"] [uri "/wp-admin/options-general.php"]

Welcome to SE!  Sorry to hear you are having problems installing CiviCRM.
Have you followed the installation instructions here?
Files are created automatically under the templates_c directory. The only thing you need to do there occasionally is to remove all the files.  (Normally that is taken care of by 'clearing the cache').
Is the file owner of the directory the same user as the one running your webserver?
Edit after the question update: yes, you'll need to talk to your hosting company about ModSecurity.


Installs fails with Error Database does not support creation of triggers - User has TRIGGER privilege MySQL 8.0.22-0ubuntu0.20.04.3 (Ubuntu)
WordPress 5.6
CiviCRM 5.32.2
Attempting a fresh install of WP and CiviCRM on a clean AWS site as upgrading CiviCRM  was continually failing
I get this error:
System Requirements
We are not able to install the software. Please review the errors and warnings below.
Severity    Section Name    Details
Error   Database    CiviCRM MySQL Trigger   Database does not support creation of triggers
Refresh
After updating your system, refresh to test the requirements again.
Environment
The system settings were auto-detected. CiviCRM will be installed with:
CMS Database    mysql://wpdbuser:HIDDEN@localhost/wordpress
CiviCRM Database
mysql://wpdbuser:HIDDEN@localhost/wordpress
CiviCRM Settings File   /var/www/wordpress/wp-content/uploads/civicrm/civicrm.settings.php
CiviCRM Source Code /var/www/wordpress/wp-content/plugins/civicrm/civicrm
My Wordpress database user has full privileges including TRIGGER.
mysql> SHOW GRANTS FOR 'wpdbuser'@'localhost';
+-----------------------------------------------------------------+
| Grants for wpdbuser@localhost                                   |
+-----------------------------------------------------------------+
| GRANT USAGE ON *.* TO `wpdbuser`@`localhost`                    |
| GRANT ALL PRIVILEGES ON `wordpress`.* TO `wpdbuser`@`localhost` |
+-----------------------------------------------------------------+
2 rows in set (0.01 sec)

I specifically added TRIGGER
mysql> GRANT  TRIGGER ON wordpress.* TO 'wpdbuser'@'localhost';
Query OK, 0 rows affected (0.01 sec)

How can I resolve this ?      Is this a CiviCRM problem or a MySQL issue?

In the MySQL CLI, run:
SET GLOBAL log_bin_trust_function_creators=1;


Fatal error: Cannot redeclare _PEAR_call_destructors() Fatal error: Cannot redeclare _PEAR_call_destructors() (previously
  declared in /usr/share/php/PEAR.php:735) in
  /www/htdocs/w010699b/de/wsk/prod/cms-crm/sites/all/modules/civicrm/packages/PEAR.php
  on line 811

Every time I do a module update I get this error message. With a second or third attempt, the system did a clean start again without this error. Today, after updating metatags, I couldn't start the webpage anymore due to this error.

So I renamed pear.php in civicrm/packages to pear.php.bak which let me access the homepage. Selecting another page resulted in errors due to the missing pear.php. So I renamed pear.php.bak back to pear.php and now it works correctly.

Obviously after a module update there is an attempt to declare pear functions a second time. But why? And how may I find what causes this error?

If you only have one copy of CiviCRM, try disabling the other drupal modules you have on the site. It is possible that some other module also uses PEAR and has its own copy of it which could cause the above error


Ckeditor Subscript and Superscript buttons I have manually edited the ckeditor config file: packages/ckeditor/config.js to enable the Subscript and Superscript buttons by commenting out this line //config.removeButtons = 'Underline,Subscript,Superscript

this is working correctly in my local environment but when i deploy it on production, the Subscript and Superscript buttons  are not available.

clearing cache (drush cc all, /civicrm/clearcache, browser cache) doesn't help, the only difference between my local and production is https.

How can i solve this issue?

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 :)


Why doesn't CiviCase API filter by case status when the client is specified? This seems like a bug.  I encountered it on Joomla with 4.6.8 and reproduced on the demo server.

If I create a case and change the status to "Urgent", then use the API (including API explorer), it seems to filter properly on status_id and is_deleted UNTIL I also add contact_id (Case Client).  Then it returns the case regardless of its status.  (I didn't test whether it works correctly with is_deleted).

While I can see this is an older issue I have the same problem in Drupal 7.41 and Civi 4.6.10. I found that this is no longer an issue in Drupal 7 Civi 4.7.27 (I just verified on the demo site!) If we aren't able to upgrade in the near future, I'll get around to looking at the log query (hopefully it doesn't come to that ;)


How do I use the API to access protected custom data in a hook? I have custom data for events that is not visible to anonymous users (it's for internal use only).

I want to access that data from my implementation of hook_civicrm_post().

When I call the API "get" from within the hook, the API doesn't return this custom data, since it's protected.

I guess I want my implementation of the hook to run as if it's a logged in user. How do I do that within the hook, but not in a way that opens up visibility once the hook completes running?

Here's a cut-down sample of my code, where 'custom_25' is the custom field which is not returned as part of $event ...

function xxxxxx_civicrm_post( $op, $objectName, $id, &$params )
{
  if ($objectName == 'Participant') {
    switch ($op) {
      case 'create':
        $event = civicrm_api3('Event', 'get', array(
            'sequential' => 1,
            'return' => 'custom_25',
            'id' => $params->event_id,
        ));
        break;
    }
  }
}

I followed @xavier's answer, but I'm posting what I did in case it's useful to others.

See the code below. The '25' is a magic number for this Custom Field, and can be found using the CiviCRM API Explorer. The foreach loop finds the right result among those returned (even though I specify Custom Field '25' I get results for other fields).

function xxxxxx_civicrm_post( $op, $objectName, $id, &$params )
{
  if ($objectName == 'Participant') {
    switch ($op) {
      case 'create':
        $custom_values = civicrm_api3('CustomValue', 'get', array(
            'sequential' => 1,
            'entity_id' => $params->event_id,
            'entity_table' => 'civicrm_event',
            'id' => 25,
        ));

        $id = null;
        foreach ($custom_values['values'] as $custom_value) {
          if (isset($custom_value['latest'])
              && isset($custom_value['id'])
              && $custom_value['id'] = '25') {
            $id = (int) $custom_value['latest'];
            break;
          }
        }

        if ( ! isset($id) ) {
          break;
        }

        /* Use the $id */
        break;
    }
  }
}


DB error on listing mailing recipients. Did anybody see that before? When listing recipients of CiviMail either via advanced search or mailing report¹ I get a wrong row count query. See the where-clause in

SELECT count(DISTINCT contact_a.id) as rowCount  FROM civicrm_contact contact_a
LEFT JOIN civicrm_mailing_recipients ON civicrm_mailing_recipients.contact_id = contact_a.id
LEFT JOIN civicrm_mailing ON civicrm_mailing.id = civicrm_mailing_recipients.mailing_id
WHERE  (  AND civicrm_mailing.id IN (2198) )  AND (contact_a.is_deleted = 0)

This is generated by CRM\Contact\Bao\Query.php.

Before I dig down into all the query generating code: Did anybody of you civi gurus out there see this before?

Relevant stacktrace is:

#10 /civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("SELECT count(DISTINCT contact_a.id) as rowCount  FROM civicrm_contact contact...")
#11 /civicrm/CRM/Core/DAO.php(420): DB_DataObject->query("SELECT count(DISTINCT contact_a.id) as rowCount  FROM civicrm_contact contact...")
#12 /civicrm/CRM/Core/DAO.php(1496): CRM_Core_DAO->query("SELECT count(DISTINCT contact_a.id) as rowCount  FROM civicrm_contact contact...", TRUE)
#13 /civicrm/CRM/Contact/BAO/Query.php(4977): CRM_Core_DAO::singleValueQuery("SELECT count(DISTINCT contact_a.id) as rowCount  FROM civicrm_contact contact...")
#14 /civicrm/CRM/Contact/Selector.php(525): CRM_Contact_BAO_Query->searchQuery(0, 0, NULL, TRUE)
#15 /civicrm/CRM/Core/Selector/Controller.php(218): CRM_Contact_Selector->getTotalCount(4, NULL)

¹) URI on error is /civicrm/contact/search/advanced?force=1&mailing_id=<MAILING_ID>

The issue you getting has been now fixed and will be part of 5.23 release. You can either wait for 5.23 release and upgrade CiviCRM or apply patch from here.

HTH

Pradeep


Tags for contact in drupal view shown on separate rows I'm creating a drupal view based on civicontact.  The fields are user id, user roles, I link to civicrm_uf_match table to get the contact id, then add a field for the tags associated with that contact.  The problem is that each tag is shown on a separate row.  This does not happen with user roles, the are shown as a single comma delimited text field, which is what I wanted to have happen with the civiCRM tags.  What am I doing wrong?

You can use the views_merge_rows module to render the Tags in to a comma separated list


api: Get renewal activity for a contact I need to find out in php if 'the current user' has recently renewed membership (or just signed up as a new member).

I don't think I can get data about renewal from the Membership entity. The 'Join date' seems to be the same as the 'Start date'. So for renewal, I'd have to look at Activities of the type renewal.

I hoped I could do this with the ActivityContact entity, but it
doesn't allow me to filter on activity type.
I hoped I could do this
with the Activity entity, but it doesn't allow me to filter on the
'target_contact', or 'assignee', or whatever it's called.

So .. do I need to join api calls - how would I do that ? - or is there another way ?

Why not check against membership status New? The length of time it's New from and for is configurable I believe.

Personally I'd try to use the API with a get command. If the API for this didn't work on the install that I was working on, I would write a custom SQL query for CRM_Core_DAO. Happy to help you further with that if needed.


CiviPoints - Basics on how to configure and use this extension I need some basic guidance on configuring CiviPoints and using it. I have installed already on our Wordpress site. But I don't see any simple guide on how to set it up and use it. Simple example with screenshots would do.

PS: I also installed CiviRules. So an example with CiviRules with CiviPoints would be great.

Response from the developers:

If you want to create a new category of points, this is in the option group "Points Type". Editing option groups can be found somewhere in your admin menus.

A separate points tab will show for each type of points- but only if that contact has previously been granted some points of that type. That can initially be done with the "Grant Points" item in the Actions menu. The points tabs, when visible, also have a "Grant Points" button.

Various permissions are currently required to do stuff with points. The tabs I think require "view all contacts" and granting or deleting require "edit all contacts". With this permission, "Grant Points" appears in the Actions menu. This isn't ideal, perhaps it should check ACLs too but I can't remember how to do this.


Can I sync CiviCRM data with Raiser's Edge? We currently use Raiser's Edge. We're thinking about handling our e-communications via Mailchimp and wondered whether we can then use CiviCRM as the back end to our online functionality and then sync it to Raiser's Edge.

Is this possible?

Thanks

CiviCRM has a fully-featured "API", which makes it relatively easy to get data in and out of it via a sync.  Raiser's Edge has an API, but it's an additional add-on.

If you had the API add-on for Raiser's Edge, this would be possible - though the more data you want to sync the more intensive the process would be.


Why does the sender not receive a bulk emailing they originate? To test out CiviMail, I sent a message to the "administrators" mailing group, which has three members, including me. Only two emails were sent out, however. Even though I'm in the group,
the mailing report only reports the two mailings to the other administrators and I did not received the message.
I do not have the "do not email" or any similar box checked in my profile.
Shouldn't bulk mailings go out to all group members, including the mailing originator?
Follow up:
This may be related: Here's an experiment.
I select my own contact and start a CiviMail mailing just to me:

(For privacy, I've omitted information here, but the email address is correct.)

I select "Email - schedule/send via CiviMail" from the pulldown.

But as you can see, CiviMail creates a "hidden smart group" that contains "No Recipients". There's nothing in my contact DB entry to prevent receipt of email.
What am I missing?

I haven't found the cause, but I've found a fix that seems to work.
If I call up Edit on a contact and then Save it, even without making any changes, I am able to send that contact bulk email. I cannot be sure, but I suspect that the defective contact records were ones that were imported via CSV from another platform with an older CiviCRM release.
Yes, this seems mysterious and it doesn't exactly increase my confidence in CiviCRM. On the other hand, I'm a release or two behind on WordPress and CiviCRM, so maybe it's already been fixed.
So all I have to do now is Edit/Save all 1024 (coincidentally, I think, 2**10) contacts in my database. Perhaps I'll make this a group project for my organization! B-)


How do I display the Contact ID on User Dashboard? MAYYYBE I am over complicating this, but I have searched and searched and only found this answered for Drupal.

We are on Wordpress and would like for members to provide me with a searchable unique id. Obviously, that means the Contact ID would be best. I am just struggling with an easy way to integrate this SINGLE piece of info into the user dashboard.

I really just want it to say something like: Your Contact ID is: ### at the top of the dashboard so people aren't freaked out by looking for it.

There are a couple ways you could do this:

Create a report that shows the contact ID and name, make that report available on a user dashboard, then you can use the dashlet extension to place the dashlet on the end-user dashboard.

Take the Contact IDs and reimport them as the External ID, then display that in the Contact Dashboard as part of the member profile.

Write some code to pull the ID out of the database and display it graphically as part of a Membership Card. I do this on one of my Joomla sites but there's no reason why it can't work in Wordpress.

Example:


CKEditor not visible I'm struggling to get the CKeditor to work on civimail - there is a blank space above the text box space. I've made sure CKEditor is selected in Administer > Customise data and screens > Display preferences.

Has anyone got anything similar or a solution?

Edit: We are using version 5.4.1, on wordpress 4.7.5

Is your CiviCRM in a subdomain of the main WordPress site? If so it looks like the problem I had a while back. See WYSIWYG editor not present with WordPress for the details and my work around.


Different credit card choices for each payment processor I have one payment processor set up that only accepts VISA and MasterCard. I have a different payment processor set up that only accepts American Express. Both use the Authorize.net style payment processor APIs.

I have added both payment processors to my contribution page. But all credit card choices (VISA, MasterCard and American Express) are offered to the visitor no matter which payment processor is selected.

How should I configure this?

(FYI: I already checked the settings at http://mygroup.org/civicrm/admin/options/accept_creditcard?reset=1  but the settings there seem to be global, not per payment processor.)

I can't think of a way to do that out of the box - I think the only way to get that functionality would be a custom extension


How do I remove a contact from a group using the API? As part of an import process, I'm trying to remove contacts from a group. There is a delete call for the GroupContact entity but this has been deprecated in favour of create (which I find puzzling). A getfields call shows that a CRM_Core_SelectValues::groupContactStatus callback is available, but this takes no arguments and is for display purposes only as far as I can tell.

How do I use the create function to remove a specific contact from a group, or if that isn't possible, how do I use the API to remove a contact from a group?

From using the API Explorer (Support menu > Developer > API Explorer) I can see that you can delete a GroupContact entity by specifying a GroupContact ID and a Group Contact Status of "Removed".

I don't think that makes a lot of sense - even for a non-standard API such as GroupContact, since a Group Contact Status of "Removed" is NOT the same as a deleted contact.

Note that my findings are at variance with CRM-16878, which covers the same topic.