PCPs don't have an API currently - but I just wrote one in about 15 minutes.  I didn't write unit tests, so I can't submit it upstream - maybe this is something you can help with to make CiviCRM better?

Paste the contents of this file into "Pcp.php" in your civicrm/api/v3 folder: http://pastebin.com/cvzqfq69

There's some odd line of hyphens at the bottom, leave that off!
Next, in civicrm/api/v3/util.php, you should see a part that looks like:

  // FIXME: DAO names should follow CamelCase convention
  if ($name == 'Im' || $name == 'Acl') {
    $name = strtoupper($name);
  }

Change that "if" statement to:

  if ($name == 'Im' || $name == 'Acl' || $name == 'Pcp') {

That should get you a working PCP API!


How to update contact email with JavaScript API?

There are many ways you can update email for contact

Using Email api with create action

CRM.api3('Email', 'create', {"email": "aaa@asas.comsdsd",  "id": 201}).done(function(result) { // do something});

Using Email api with replace action

  CRM.api3('Email', 'replace', {
      "values": {"0":{"email":"asasa@asas.com","location_typ_id":"Home"}},
      "contact_id": 203
    }).done(function(result) {
      // do something
    });

Using Contact api with Email chain api

CRM.api3('Contact', 'create', {
  "id": 203,
  "api.Email.replace": {"values":{"0":{"email":"assdfsfdsasa@asas.com","location_typ_id":"Home"}}}
}).done(function(result) {
  // do something
});

HTH

Pradeep


How much symfony do I need to learn if I am going to be a CiviCRM core hacker?

You must be digging pretty deep if you're running into Symfony. Its introduction into the stack is fairly new. CiviCRM has been around for over ten years, so some of the technologies are pretty hip and new (like Symfony) and some of the technologies, like Smarty or PEAR DB... well, not so much.

I think I've run into Symfony in some code around events (like... programming events, not CiviEvents) and maybe in some of the new command line tools. If your primary concern is fixing bugs, you may never even see it, as many of the bugs tend to live in older code.

Bottom line: It's a technology the core team would like to adopt, but adoption is happening slowly. I wouldn't say that Symfony experience is a prerequisite for developing CiviCRM any more than AngularJS experience is.


Unable to select profiles when creating online event registration

Found answer from a newer post:

  After more investigation, the problem is solved using the fix from
  agh1 (thanks to him by the way).

  It looks like a problem in the civicrm code using jquery.

  Here is the url of the fix. We tested it and it works.

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

  I hope this will be in the next civicrm release code.


How can I generate a CiviMail delivery & Click-thru report

I guess you can use Mailing Summary report with filter as start and end date and configure it to send email via schedule job.


How can I use existing tokens to send out a single Scheduled Reminder to both the Org and the Employee

We have done this with {membership.owner}, which works for the email that goes to the main contact (with inherited membership) and the organization email.

E.g. TestOrg’s membership is due for renewal //// {membership.owner}’s membership is due for renewal


How is CiviCRM in a Drupal Commons Install?

There would be no conflicts. I think the question of what makes a good drupal 'social community' is a specific drupal question and should be asked on that StackExchange, however if you want more specific answers here it would be helpful if you clarify in your question what you want the system to offer users.

Having used Commons once (due to someone elses choices) but eg Organic Groups many times, I would not opt for a pre-built system like Commons. But again that is not a discussion for CiviCRM SE really.


You may be running into performance issues if you have groups in your Search Builder queries.  See CRM-16483.


How to limit number of contacts in a group?

Just to be sure: civi doesn't have any limit on the number of contacts per group, it's a business case you have that introduces that constraint, right?

I didn't find a safe way to prevent an operation (I'm not sure it's a good idea, it might introduce lots of problems later on, the best IMO is to fail the query).

One workaround to get that is to introduce an invalid value in the pre hook (eg set contact_id or group_id to null, the query will fail and it will prevent inserting.


Fresh installation gets 403 error when non-administrator user tries to access a page

What do you have at /wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1? You probably just need to set up permissions.
More info here: https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/


I found issue and how to fix it.
I change files in: CRM/event/BAO/event.php

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


Where is the $_params field of the CRM_Contribute_Form_ContributionBase class set?

I highly recommend setting up an IDE with debugger so you can easily step through the code while it is executing. Yes it's a little bit of work to install and learn to use those tools, but worth it!

My IDE tells me that the $_params variable is an array declared in CRM_Contribute_Form_ContributionBase but mostly populated during CRM_Contribute_Form_Contribution_Confirm::preProcess().


Wordpress profile will allow view but not edit when logged in

Looks like a WordPress/Civi permissions issue - have you checked at /wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1


Clear custom multiple records fieldset occurences

Pretty sure you can truncate the civicrm_value_customname table. I've done that before with no ill effects (assuming you don't have custom code running off those values).


Batch merge error - wrong data type money?

Please create a bug report in JIRA referencing this question if it continues to occur when extensions like Summary Fields are disabled.


Why can't I easily manage contact images in Drupal Views any more?

Did you try the Output the image URL only option as shown below?


Configuring cronjob in wordpress installation (siteground)

This should help you,

https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs#ManagingScheduledJobs-PHPclimethod

You can follow either of the methods mentioned on that page, depending on how your server is set up.

HTH,
Edsel


For gift memberships, send email receipt to the giver

After some digging with debug_backtrace() to unravel the program flow within CiviCRM, I found this solution, which works:

(1) Implement hook_civicrm_postProcess(), and use it to get the giver email from $form->_submitValues. Stash it into a global variable.

(2) In CRM/Contribute/BAO/Contribution.php, patch function composeMessageArray() to append the giver email to $values['cc_receipt'] prior to the sendMail calls at the end of the function, then clear the global.

Obvious, this will need to be tested and reapplied with each upgrade of CiviCRM, but we already have a handful of such patches so one more is not too bad.


Signing up for an event returns 500 error

So after much digging, I found it was due to Civi trying and failing to send an PDF receipt.

After disabling this in Administer > System Settings > Misc (civicrm/admin/setting/misc?reset=1), the error resolved, the 500 Internal Server Error disappeared and the emails started sending with the email receipt instead of the PDF.

Attach PDF copy to receipts: No


Performance Warning: Missing Indices. Mismatched Index Key

I suggest you delete the UI_case_contact_id index as suggested by CiviCRM, and then refresh the system status page. It should then present a button which will automatically add missing indexes.


Has anyone experienced member receipts not being sent out all the time when sending from the back end of a membership record?

Likely you'll find the answers you need in the CiviCRM debug log. Also check your server's mail logs to confirm what's actually happening, so you can identify whether there's an issue with the email being generated or delivered.

Where should one look for logs when debugging a new problem?
CiviCRM wiki: Debugging for developers

It's possibly an issue with a customised message template not being valid Smarty - we've seen this affect Smarty templates before, which use { / } to denote template markup and are not validated when edited through CiviCRM.

As a result it's very easy for admin users to unknowingly include CSS or JS in the message templates, not knowing the template will fail when executed in context of a system email.


Why do some From addresses work and others get rejected

In general: you should NOT use a from address of a domain you do not control.

the smtp protocol does not care and you can send an email pretending to be whomever sender you want, but given how it has been abused by spamers, other protection layers were put in place (DKIM, SPF).

These basically white-list which servers are allowed to send emails on the behalf of a specific sender (domain). Each other server in the world can then look at these lists, and decide to accept or reject your email based on that.

So it's not a hard rule, and depending on what from email you put and to whom you send it and how the various email servers are setup, it will work... or won't.

And no matter what, it's likely that more and more domains will white-list what are the servers allowed to send on their behalf, and more and more mail servers will look at these list and reject "unauthorised" senders.

So consider an anomaly that you can still send as @me.com for instance, and that it will soon fail.

Use your own domain(s) for the from and do set up the needed dns records to white-list your civicrm server (and the other servers you use to send emails).

And yes, it's a bit of a pain to set up, I'd suggest you to use an external provider (sendgrid, mailjet...) to deal with that. they all have clear instructions on how to set it up.


Contributions: Error Cancelling Contribution The recurring contribution could not be cancelled

The problem you're describing is a known bug, which is documented at CRM-20800.  A patch was submitted yesterday; by testing this patch, you can speed its inclusion into an upcoming version of CiviCRM.


Free registrations still asking for payment info

I found out there is a fork of the Stripe payment plugin for Civi 5.X.  This fixed my issue.  Can be found here:

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


How to configure Views VBO action to disable relationships?

First part is easy. When you check the box 'modify entity values' in the VBO field, you should see an option to tick another box that says 'override label'. That lets you then set the button that users will see to be 'Disable relationships'.

The second bit - i think it would require more code for CiviCRM Entities module or civicrm_entity_actions. I say this because on a VBO i set up recently I had the option to tick both 'Add to Group' and 'Remove from Group' (and there was also 'modify entity values') - so it sounds like you need the options for 'Enable Relationship' and 'Disable Relationship' to be explicit options at that step.


I have been directed to this patch:

https://www.drupal.org/node/2177647

I can't tell you whether it works or not yet since it will take a few weeks to be sure. But it seems to be the going solution.


How to clean the Contacts and relevant Users

You could use Search > Search Builder and search for Individuals whose First Name and Last Name are NULL (when this is the case, Civi will use the email address as the Display Name), select all of the search results and then create a Smart Group. You would then periodically review the contacts of the smart group by navigating to Contacts > Manage Groups and then clicking on the Contacts hyperlink to the right-hand side of the group and perform the desired actions.


Paypal recurring payments failed after merging the contact. How to fix?

Could you create a new contact with just a first and last name (no address, phone, or anything else that might go in a separate table somewhere) and then change that new contact's ID in the database to 1212? Then you could merge again, making sure to keep the new contact and transfer all of the other information over during the merge. (Try on a copy of the database of course)


What could $civicrm_root setting in civicrm.settings.php appears ignored?

There might two settings defined for CiviCRM. Can look if you have any other civicrm.settings.php file located in different folder?

 The recommended location is wp-content/uploads/civicrm/civicrm.settings.php.

 The deprecated location, still supported as of April 2017, was wp-content/plugins/civicrm/civicrm.settings.php

HTH

Pradeep


How do I partially hide Ajax supplied content?

Please see the Civi JavaScript reference , specially this:

CRM.$(function($) {

// Your code here

 });

  Remember that CRM.$ is our alias of jQuery. So the first line is shorthand notation for CRM.$('document').ready(function($) {
  The function receives jQuery as it's param, so now we have access to jQuery as the familiar $ for use in our code.

Also make sure you are targeting the right template:  CRM/Contact/Page/View/RelationshipSelector.tpl

A different approach would be to create a custom template as explained here and disable the actions links based on $context

Update: according to dataTable API, you could do this:

CRM.$(function($) {
    var table = $('table.crm-contact-relationship-selector-current').DataTable();
    var column = table.column('.crm-contact-relationship-links');
    column.visible( false );
});


How to disable State/Province in billing address blocks

We also needed to disable some billing fields, including the state/province, so we wrote an extension for it: https://github.com/WeMoveEU/nobillingfields

It keeps only first name, last name and zip code, and this is a hardcoded thing, but you should be able to easily adapt to your needs if you have a developer.
Note however that when we migrated to 4.7, the extension stopped working, and I patched civi core to make it work again. I reported the problem, and the suggested fix was to unset validation errors with a hook, but I have yet to try it.

I'm afraid there is no easier solution...


Are there public repos including WordPress WooCommerce and CiviCRM integration code?

Doesn't seem like there is a public repo that has code integrating wooCommerce and CiviCRM yet.


Is there a way to allow one user to register many participants for an event and to send separate invoices to each participant?

I have my Alt Invoice extension, which sends an additional invoice to someone based on their relationship.  I'd say that a developer could start from there to make an extension and be more than halfway there.


When saved to activities, tokens inside emails are not evaluated

yes, that is normal behavior. Feature requests can be made on the forums or if there is funding, via the paid issue queue.


Where can I see the database upgrade script?

There are a number of other threads around this issue and you may find the specific advice you need if you read through them eg

How to find and/or fix missing indices?

or this one

Missing indices status after upgrading to CiviCRM 4.7.21 on WordPress 4.8


Creating a custom Form: Action (view vs update)

Paul B,

Its not necessary to have 2 separate tpl for View and edit, the logic can be added in one tpl or php file. But for convenience Civi tries to keep it separate.

A good example for view and add form will be New/Update/ View Membership forms.

The action for CRUD is registered here
https://github.com/civicrm/civicrm-core/blob/master/CRM/Member/xml/Menu/Member.xml#L13

https://github.com/civicrm/civicrm-core/blob/master/CRM/Member/xml/Menu/Member.xml#L48

When above one of the 2 url is hit CiviCRM will execute run() function from here. Where you decided which file to invoke for example to create view form process view(), Add/Edit process edit(), listing process browse()
Each php file should have tpl associated with it.

You can copy paste same file and structure and just change the class name. It should work for you.

HTH

Pradeep


After update CiviCRM IATS Extension to 1.7.4, Card on file and Expiry Date fields are not showing

I have upgraded the extension 1.6.2 to 1.7.4. During upgraded extension upgrade function were not ruined upgrade_1_7_002 and upgrade_1_7_003. After manually run the SQL Queries issue is resolved.


Current state of Household Membership signup (Wordpress)

This question has a lot of moving parts, not all of which are clear to me here.  It may be best as separate questions.  I'll try to answer the parts I see.

It sounds like you need to track the members of a household each as a separate contact.  This is best with Webform-CiviCRM.  However, Caldera Forms will do most of this.  You can create several contacts, and create relationships between them.  However, you can't take payment on the same screen (not a big deal).  I'm not sure how it handles pre-populating related contacts for managing households later - you'll have to experiment.  Worst case, you could sponsor the Caldera Forms devs for a lot less than 200-400 hours for that feature.
You do NOT need to use the Household contact type if it's not important to you!  You can do this with a "primary contact" who has a relationship to the other family members.  This is up to you.  I prefer to not use households, personally.
You use the Relationship Type feature of CiviMember to allow family members to inherit the membership via relationship to the household (or primary contact).


CiviCRM 4.6.7 Wordpress 4.3 Extension Issue / BaseURL

This is as @Christian-Wach suggested. For some reason a permalink was set injecting the index.php in a new install of both Wordpress and CiviCRM.

So check your permalinks inside Wordpress in addition to BaseURL.


What does this import error mean? "Invalid value for field(s) : ... Country input value not in country table"

Sounds like the issue is that CiviCRM doesn't recognise the contents of your Country column (for some rows).

In the import UI, you should see an option to download rows with errors, and that CSV will report which exact country values CiviCRM does not recognise.

Eg, CiviCRM would accept either US (ISO-3166), United States (CiviCRM's label) or 1228 (CiviCRM's DB ID), but if the CSV contains United States of America or U.S.A, then CiviCRM might not recognise that alternative.

Cleaning this up is usually as simple as a Find & Replace in your import spreadsheet before re-importing. You might then rinse and repeat (N.Z => NZ or New Zealand) for further countries, or other invalid data that needs cleanup.

To get a working import format, try exporting a few contacts (even if you have to create a few first), then use the resulting CSV as basis for your next import.


Accessing CiviCRM contact data from external page

The best way to do that is to make use of the CiviCRM REST API.

It can be used via PHP or via JavaScript.

With that method you collect the data you need, and then you can display it as you like.

Much more information can be found:
https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface


Possible to import Contacts and Activities at the same time?

You can cut down one step by assigning the to be imported contacts an external ID; then also use that external ID to import the Activities.

Other than that - we end up writing mysql queries to import on an going basis from other data systems -  once these queries work well they can then be bundled into an extension - so admin staff can initiate/run the import at will.


Solved via Facepunch. This time, my own.

http://forum.civicrm.org/index.php?topic=34797.0


How do I get the Name and Address on the Invoice to show up in a Window Envelope?

This requires editing of the Contribution Invoice Receipt - Message Template. End result looks like this:

I'll detail the steps below to get the header part.

The header portion contains two tables: the first table is used to add your logo. The second table has the formatting for the Name and Address section: note that we're putting the Member's Name and Address on the far left and in a slight larger font.

          {ts}INVOICE{/ts}
          {ts}Invoice Date{/ts}
          {$domain_organization}

          {$invoice_date}
          {$domain_street_address}

          {if $domain_city}{$domain_city|upper}{/if} {if $domain_state }{$domain_state}{/if} {$domain_postal_code}

          {$display_name}
          {ts}Invoice Number{/ts}
          {if $domain_country}{$domain_country|upper}{/if}

          {$street_address} {$supplemental_address_1}
          {$invoice_number}
          {if $domain_email}{$domain_email}{/if}

          {$city|upper} {$stateProvinceAbbreviation} {$postal_code}

           {if $domain_phone}{$domain_phone}{/if}

          {ts}Reference{/ts}

          {$source}


How to add an activity for the contacts generated via a report?

I would just add all the contacts to a group (you have to create the group first) and then add the activity to all the contacts in the group.


Problem with register_rest_route call since 5.28.0: missing the required permission_callback argument

Don't panic, the issue you are seeing is only a notice, not an error and won't stop CiviCRM working.
In WordPress 5.5, a change was made to how REST routes are registered and now required a permission_callback. For the moment, the plugin will continue to work and once the plugin author releases an update that adds the permission_callback, the notice will disappear.
The reason you may see it the notice on one site and not all is that notices only appear when WordPress is run in DEBUG mode, confirm by checking the value of
wp-config.php for
define( 'WP_DEBUG', true );

If the site showing the notices should not be in debug mode, simply change the value of WP_DEBUG to false.


Contribution Amounts Section does not work

I've found that almost all of our 500 errors have been server related, such as a security issue being run into with the site. I usually work with the host to see if they can find something in their logs. The only other reason I've gotten a 500 error was when something in my php settings wasn't set high enough (like memory allocated, execution time for a script, etc).

Usually my host will have me run through the steps to recreate it (making sure they have my IP address) and they will watch for any related errors.


How can I include Profiles on Drupal user registration?

My guess is the problem is with Multiple Register since many folks have integrated LoginToboggin and CiviCRM. Turn off all of the three Drupal modules you mention, then reenable them one at a time to isolate which is causing the problem.

You can probably benefit by examining the source of the page with and without the troublesome module enabled in your browser using Firebug or something similar. You may end up needing to provide a patch to Multiple Register or making a custom extension in CiviCRM to help CiviCRM and Multiple Register play nicely with each other.


What is the scheduled job linked to Scheduled SMS Reminders?

I cannot answer your direct question, but I have an alternative solution.

We are using the extension CiviRules and the extensions SMS API and Email API to achieve the same.

Then you have the possibilities to set certain triggers/events, and conditions. At the end you can set different actions, and one of them is sending sms automatically via the SMS API

We are on 4.4, so you need to try it yourself though...


How can I change the fields displayed by dataTables?

If you look in CRM/Core/xml/Menu/Contact.xml you'll see that the civicrm/ajax/contactrelationships maps to CRM_Contact_Page_AJAX::getContactRelationships, so you can go into CRM/Contact/Page/AJAX.php and change what the getContactRelationships function does.

If you're not familiar with the techniques here to override core files, as opposed to editing the actual core files, you also want to take a look at that.


Using a profile with custom fields for event online registration

Try a theme for CiviCRM, like Shoreditch.


GDPR Extention and PETITIONs (in Wordpress)

We resolve by using CiviRules: "if the action is a petition signing then accept the Privacy Policy and Communication Preferences for that contact".


Does Google Hangouts SMS integrate with CiviCRM?

I have never seen this coming up for discussion and suspect the answer to that part of your question is 'no'. In terms of 'where to start', it would be worth looking at the two extensions Clickatell and Twilio but i suspect you have already looked at them.

Third option is to engage the services of a Professional or use the core teams Paid Issue Queue


How do I add "honoree section" to new contribution form in the backend?

Here is the solution that I've come up with: first, we created a custom field set for "Honoree Section". We then create two fields in the set (or as many data fields as required for your application). In my case, 1) radio selects for "honoree type" (two types, "In Honor Of" and "In Memory Of") and 2) a text field for the name of the person memorialized with the gift.

Next we create a custom profile for contributions called "Honoree Section" and use the custom fields.

The searchable profile data can now be entered into the backend along with the soft credit. Also, the soft credit can now be entered for the family of the deceased, whereas the contribution can be "attributed to" the deceased (searchably connected to the deceased via the custom profile).


how to make charts and graphs in CiviCRM

One approach would be to extend what CiviVisualise extension provides


DB error: already exists on contribute page

It means you a trying to create a new account with an email that is already in use for another account.

Some CMS (drupal at least!?) don't allow two separate accounts with the same email, hence the (rather not too explicit) error message.

The simple solution is either to change the existing account so it uses another email address or create the new account with an email that isn't used already.

The not so simple but would be awesome for your karma solution is to contribute a patch to display an "end user friendly" error message and the option to put another email in the form if its invalid

X+


Why is there private_html in my [cms.root] directory variable and is it trouble?

It starts with a peculiarity of DirectAdmin. Using a subdomain, you have to upload the files for https connection to private_html and the files for not secure http connection to public_html. For the situation these files are the same DirectAdmin offers the option to create a  symbolic link from private_html to public_html. Thus when you ask for https://<domain>/file.html it looks for the file /private_html/file.html and thanks to the link this is the same as public_html/file.html.

The [cms.root] variabele is not set. It is derived from the DRUPAL_ROOT constant, that is calculated with getcwd(). At the moment you use a secure connection this functions returns the private_html directory.

And it causes trouble.

The directory variable  [cms.root] is used to calculate the URL variabele [civicrm.root] so this is also wrong. The effect is that a lot of javascript files are not found, for example ckeditor.js.

My solution is adding the [cms.root] directly to the civicrm.settings.php file with the following line:

$civicrm_paths['cms.root']['path'] = '/home/<user>/domains/<subdomain>/public_html/crm';


Multiple transactions recorded against contribution using webform

Seems like a known issue which recently got fixed in webform civicrm. Can you try applying the patch https://github.com/colemanw/webform_civicrm/pull/180 or use the latest 7.x version from github and see if it fixes this problem for you?


From CiviCRM Requirements

An installation of Drupal, Joomla or Wordpress, and the following additional requirements:

PHP 5.5+ is recommended. See the CiviCRM PHP Requirements page for details.
PHP memory_limit set to between 256 and 512 megabytes.

MySQL 5.1.x or higher with INNODB support : CiviCRM is compatible with the current generally available MySQL release. Trigger support is required for logging and multi-lingual features. SUPER privileges are required in MySQL 5.1 if binary logging is enabled.

Surprised if this (or other places which reference mysql) was hard for you to find, so please suggest where you think the documentation could be improved.


Remove User Login from Event registration

You will need to turn off the setting for profile that you have used in Event registration.

HTH

Pradeep


Example: Recommended way to hide entry fields in new contact view

One way to simplify data entry is to consider using a Profile as the way for your users to add new contacts. This means you add fields that you want, rather then removing fields you don't want. Once you have created a Profile you can then use the 'create' version link such as

http://d46.demo.civicrm.org/civicrm/profile/create?gid=1&reset=1

but you don't get the same warnings in terms of potential matches, and there are no doubt other downsides (such as the unwanted fields still showing on the Summary screen), but it may be worth a thought as a temporary fix if you hadn't already considered it.


Where do I found the "form action" call in TPLs to an Event?

Most / All forms inherit the form code from:

templates/CRM/Form/default.tpl

I dont think you should modify that. However, the form tag also emits all attributes attached to the form. So your best bet will be to add an attribute to the form object in the buildForm hook for event registration. There is a method call on the form object to add an attribute:

$form->updateAttributes()

lobo


Can the API be used to find contacts with multiple tags?

You can achieve this by giving the key 'tag_id' an array containing multiple tags. Something like this:

'tag_id' => array('volunteer', 'Major Donor'),


I've created an extension to handle bounces through Amazon SNS notifications, see civicrm-ses.

It exposes a webhook to process SNS notifications and map and create bounces when appropriate.

Hope you find it useful.

PS: although the extension is in alpha stage, I've been using it in production for a month (~60,000 emails processed), test in a dev environment first if you like :)


CiviEvent price set custom validation rules

You can limit the price options the user sees with some JavaScript in a custom template. This can allow you to control the user options based on the selections. For example:

If the user clicks 'Full Registration' it triggers JavaScript to only show the relevant options. So if meals are included in the user doesn't see the individual meal prices.

You need to do some planning particularly with required fields. If there is a field that you need to be required that relates to individual items you need to have an option for when it is included in the full registration. This will avoid errors.

More information on custom templates can be found here: https://docs.civicrm.org/sysadmin/en/latest/setup/directories/#custom-templates

Hope this helps.


CiviCampaign is not an extension but a component (ie it's part of the core), you can enable/disable it from (administer>system settings>Components)

and disable it.

This being said, I'd be surprised it's the issue, lots of install have civicampaign enabled and working email receipts


Issue with sending html email from civicrm with Smarty

It might be because you have syntax error in your smarty code. Try not to use editor if you want to use smarty code or use this configuration to use smarty using ck-editor


How can I offer event registration cancellation but not registration transfer?

You can't, and it sucks.  It's been on my to-do list to fix for a long time, but the client who wanted to fund it decided they didn't care.  It's maybe 2-4 hours of work, but it just needs to be done.


Copy CiviVolunteer volunteer needs when creating a repeating event

I think you can find all you need about this question at https://issues.civicrm.org/jira/browse/VOL-37

Note also that CiviVolunteer 2.0 beta is planned for a release on September (2015) - https://civicrm.org/blogs/ginkgofjg/civivolunteer-20-whats-in-the-works.


Can I offer different pricing for an event based on user group?

Edit: I forgot this was a CiviCRM extension (Group-Based Pricing). My apologies. Luckily it's very easy to use.

I haven't used CiviDiscount but what I am using right now is Price Sets with Radio, Select, or Checkbox price fields. Within those, you can edit each option, and limit the visibility to certain groups. (I actually just posted asking if there's a way to do this with the "Text / Numeric Quantity" price field because it doesn't have the same options available).

Create a Price Set with the fields: Radio, Select, or Checkbox. Fill out all price options, details, save it, and close the popup window.
Click on Edit Price Options
Click on Edit Option for the price that should have limited visibility.
Limit Price Option To the group(s) you want to see this price option.

This also allows for people to pay the "full price" if they feel generous.


Jim, Welcome CiviCRM SE. You can use membership search to find membership data or reports.

Search:
CiviCRM >> Membership >> Find Memberships.

Reports:
CiviCRM >> Reports >> Membership Reports.

Doc:
https://docs.civicrm.org/user/en/latest/membership/what-is-civimember/

Cheers

Pradeep


Why is no Receipt is being sent for a Contribution when using PayPal Standard?

This patch fixes the problem for me: https://github.com/civicrm/civicrm-core/pull/6900


How do I add a currently unsupported field to Views?

You will need to add the field manually to:

drupal/modules/views/components/civicrm.core.inc

and then submit a PR to civicrm-drupal repository, so the fix gets merged into the main code base.

In D8, the situation is a lot better, as torrance has automated the process and the fields and their definition get picked up automatically. So a lot cleaner and easier on everyone.

But for now, the above is your best bet and will help views intergration for D7 and prior


Pledge payment off contact dashboard: "DB Error: No Such Field"

This is a known bug and is documented and fixed at CRM-21465.  You will need to apply the patch to fix the problem or will need to wait for 4.7.30 release.


Unable to add file to event with Attachment api

Do you have created the custom field on event?

I would suggest you to add manually (via the UI) an attachement and check how it looks like (using the api explorer and get the file(s)), it will be easier to understand what civi expects by looking at what it does


I don't recall seeing any discussion on this since this forum post and i don't suspect anything has changed. Scanning cards would be a 3rd party process and that would then presumably provide a csv to import.


You can write the below code in civicrm.settings.php file to override the current value of [civicrm.root] token.

global $civicrm_paths;
$civicrm_paths['civicrm.root'] = array(
  'url' => 'https://website_url.com/.../civicrm',
  'path' => '/path/to/civicrm/folder/',
);

Similarly, it can be used to set [civicrm.files] and [cms.root].


Use Case Difference between CiviCRM and Croudfunding Sites?

I totally agree with Pete. To put it more bluntly, to me it sounds as if you are saying that a pushbike is the same as a car as they can both be used for transport :-) Or that a calculator and a spreadsheet are the same type of software as you can do sums with them :-)

CiviCRM is a full blown CRM that offers functionality for fundraising, event management, membership management, relationship management, case management, some automated workflow. A crowdfunding site supports fundraising with crowdfunding, full stop.


Error printing event badges after sorting by participant name

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


When users are contributing a duplicate record is created in wordpress

This should be able to be controlled via your Matching Rules.

I would suggest you read up about them and look at your DeDupe/Matching rules at civicrm/contact/deduperules?reset=1


How do I use custom fields in Drupal views?

Saw the same issue here.

We noticed that the field appeared twice in the list of fields. We'd selected it as CiviCRM Contact: My Field - but it also appeared as CiviCRM Custom: My Field.

When we selected it as CiviCRM Custom: My Field, it worked.


Error when updating Stripe: Trait 'CRM_Core_Payment_MJWTrait' not found

There's a new requirement listed in the Stripe CiviCRM documentation for version 6.0.  You also need the MJWShared extension.


How do I get the time in the change log to be the same as my local time?

Check your timezone setting in Joomla.

Go to System, Global Configuration

Click on the Server tab and go to Location Settings


How to add "ACTION" Column in a custom Search?

The custom search interface does not implement an API for those actions as yet. I dont think those are hookable right now, but I suspect the best first step would be to modify the code (and submit the patch back) to make those actions hookable.

Once that is done, it should be relatively easy, for the custom search interface to expose the hook as an API


FAX. Is it difficult to hook up Twilio programmable faxing to CiviCRM?

I'm guessing Twilio is one of the cheapest and you're already set up with them, but if you'd consider RingCentral at about 1.7c/page which is reasonable then you can still keep Twilio for other things and just use RingCentral's email-to-fax plan.

So you'd add an email address on your contact records something like 1234567890@rcfax.com, and then use it the same way you'd use any other email address, attaching the pdf or whatever.

https://www.ringcentral.com/plansandpricing/ringcentralfax.html

https://support.ringcentral.com/s/article/6643?language=en_US

There are others besides ringcentral, but that's one I'm familiar with.

UPDATE: One workaround for tracking successful transmissions using the above is to use a dedicated sending address like 'fax-notifications@myorg.org', and then set up the email processor for inbound email processing on this address (see https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/#autofiling-email-activities-via-emailprocessor). Then when ringcentral (or whatever) sends the transmission receipt it will get automatically filed into CiviCRM. It won't get filed on the specific contact without some extra programming, but it would at least get filed in CiviCRM.


As far as I know if you did not have the extended logging switched on, if they were permanently deleted there is no direct way to check.

You might want to compare a backup with the current data, if that is possible?

To reassure you: we work with a fair number of organizations that use CiviCRM, some small and some quite large. None of them have ever experienced contacts simply 'disappearing' from the database.


How to fetch perticular column data of table?

For every table CiviCRM has api, you can use following method to retrieve data by specifying return in api params.

1 - Get -  Returns one or more results and with N number of columns

$result = civicrm_api3('Contact', 'get', [
  'return' => ["id", "display_name"],
  'contact_sub_type' => "Parent",
]);

2 - GetValue - Returns only single result and with single column (make sure to use id in filer or limit =1 else the api will throw error if the api returns more than one results)

$result = civicrm_api3('Contact', 'getvalue', [
  'return' => "display_name",
  'id' => 1,
]);

3 - GetSingle - Returns only single result and with N number of columns (make sure to use id in filer or limit =1 else the api will throw error if the api returns more than one results)

$result = civicrm_api3('Contact', 'getsingle', [
  'return' => ["display_name", "email"],
  'id' => 1,
]);

Incase if you want to retrieve from custom table created using extension then you will need to make sure you have

New entity defined -
DAO for the table
api with create, delete and get action

You can use Civix to create new entity which will create above 3 points automatically for you.

Then you can use below snippet to build your select field

    $this->add('select',
      'name',         //field type
      ts('Name'), //field label
      CRM_Utils_Array::collect('name', civicrm_api3('Emp', 'get', [
        'return' => ["id", "name"],
      ])['values']) //list (id, name)
    );

HTH

Pradeep


Activity 'Result' field missing from API

Api result doesn't return if the fields value is NULL. In your case result field must be NULL for the activity you trying to get. Try using to check if the result key is present in api result and use accordingly.

$result = CRM_Utils_Array::value('result', $activityResults);
or !empty($activityResults['result'])

HTH

Pradeep


How can I stop civicrm_metatag_metatags_view_alter() altering non-CiviCRM URLs

I'd recommend a check to test that the Drupal path (eg current_path()) commences with civicrm. This is untested, but I think you want something like the following -

/**
 * Alter metatags before being cached.
 *
 * This hook is invoked prior to the meta tags for a given page are cached.
 *
 * @param array $output
 *   Metatags to be displayed.
 * @param string $instance
 *  Context.
 */
function civicrm_metatag_metatags_view_alter(&$output, $instance) {
  if (arg(0) == 'civicrm') {
    $linkUrls = array('og:url', 'canonical', 'shortlink');
    foreach ($linkUrls as $url) {
      if (isset($output[$url]['#attached']['drupal_add_html_head'][0][0]['#value'])) {
        $output[$url]['#attached']['drupal_add_html_head'][0][0]['#value'] .= _civicrm_get_url_parameters_as_url_string();
      }
    }
  }
}

hook_metatag_metatags_view_alter()
civicrm_metatag_metatags_view_alter()

I don't really like the look of the fixed [0][0] in that code either?

If you're submitting a fix, you should check out CRM-16495: Metatag canonicals are broken, q is multiplied which looks like it fixes the error message you're experiencing also. That fix is committed to 4.7 now.

I think your proposed solution is correct, CiviCRM shouldn't be messing with metatags if it hasn't been involved in the page generation.


Append an option to the BlockSchedule Directive in crmMailing

What you want to do now is decorate the directive ;)

The decorator method allows you to decorate/modify an angular directive/service/factory/controller before its usage/instantiated.

You have two options (that I know of) to manipulate the directives DOM, one is the compile function, used for template DOM manipulation (is where the template is actually compiled), and the second is the link function, is where the data/scope is attached to the instantiated element/elements, and usaully used for event listeneres, like $watch

The angular mailing app uses a boilerplate template to declare directives, see the source here.

I'll try to explain with inline comments:

angular.module( 'crmMailing' ).config( function( $provide ){

        // the callback recieves the directive when the Mailing app bootsraps
        $provide.decorator( 'crmMailingBlockScheduleDirective', function( $delegate ){

            // $delegate is an array, we grab and store the directive into the 'directive' variable
            var directive = $delegate[0];

            // we hold the original link function
            var link = directive.link;

            // as the link function is already defined in Civi's boilerplate
            // we create the compile function and return a new link function calling apply on the old link function
            directive.compile = function( Element, Attrs ){

                // you can manipulate the directive's template here, like adding your own DOM elements/directives
                Element.append( '
Text added from compile
' );

                // return new link function
                return function( scope, elem, attr ){

                    // call apply to get original functionality
                    link.apply( this, arguments );

                    // add new functionality here
                    elem.append( '
Text added from new link function
' );

                };
            };

            // always return $delegate
            return $delegate;
        });
    });

In order for this to work what I do is declare a fake/empty angular module like crmMailSubjectReview = angular.module( 'crmMailSubjectReview', [] );, load it via hook_civicrm_angularModules and then add the crmMailing config block, see here another small example (have a look at the comments to see the template and the end result).


CiviCase not strictly adhering to permissions?

You might be right. The dashboard as far as I can remember has never used ACL's it just uses "my" or "all". The feature where ACL support for case was introduced might have been for a different need and doesn't seem to have included the dashboard (https://issues.civicrm.org/jira/browse/CRM-17645).

So yes and no to your question?


How to adjust the column width of an item on a contribution receipt?

would be nice to have border for tables to avoid confusion. you can add css in your message template, either it can be inline or using  tag

{literal}
  <style>
    .button-group {
      display: block;
      margin-top: 5px !important;
      margin-bottom: 5px !important;
   }
  </style>
{/literal}

Thanks
Pradeep


My mail_report: Finished execution of Mail Reports with result: Failure, Error message: is not of type String

If you run it manually from the scheduled jobs screen you need to edit the mail report entry there and set those parameters. Normally you would set them in the specific command you use for cron for a specific report.
See https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/#job_mail_report. For getting the instance id that's a good point. There's a couple ways but one is to go to Reports -> All Reports and then hover over the View Results link and in the url that appears in the browser status bar it's the number after the word "instance", e.g. if it says civicrm/report/instance/5?force=1&reset=1 then the id is 5.


CiviContribute Pages have differing wrong titles in

Upgrading to the most recent version of CiviCRM (4.7.15) solved this problem.


Views : SQLSTATE[42S02]: Base table or view not found (concerning a Custom Value Table)

This error usually means .... "Drupal doesn't know the table exists" ... which either means

1/ you have your civicrm tables in a different database and need to update the list of tables that you entered in settings.php so that drupal can connect to it

2/ the fields have been created, but no data has been stored yet (i may be wrong but i think the table for the data is created the first time a record is saved that contains data that needs storing in the table)


Can I add non-contact fields (such as membership, contribution, relationship, etc) in bulk emails?

The short answer is "not without extensions". It would be difficult, for instance, to say exactly which of a contact's many contributions you want to pull data from.

That said, other users have created extensions that give you many of the most commonly needed tokens. Check out the Summary Fields, Contributions Table, and Eileen's custom tokens, in that order.


This is a bug in CiviCRM. I can replicate the issue on my database using v4.7.

Basically what is happening is that if a sort order isn't defined, the $order variable is NULL which throws off the strpos() function and sends the error message which then triggers the "headers already sent" errors.

See this post about why the $order variable was changed: https://forum.civicrm.org/index.php?topic=36040.0

This post "Empty needle" error when exporting from Advanced Search results provides a quick fix by hiding error messages.

I've submitted an issue to CiviCRM: https://issues.civicrm.org/jira/browse/CRM-19212


I have now reported this bug here; https://issues.civicrm.org/jira/browse/CRM-17651

The bug only shows up when using price fields for a contribution page. There are good reasons for using price sets, however, and there is no reason I can see not to allow pledges when using the price set functionality.

If you have any fixes or workarounds that allow me to still use the price sets, please let me know!


How to resolve issue with " Â " appears before currency sign?

My workaround for this is to immediately convert the CSV file in a text editor such as Notepad++ or UltraEdit.

As soon as it's downloaded I open the CSV as UTF8, then immediately save it as ANSI. It's a bit fiddly, but fixes the £ problem, as well as any unusual characters in names/addresses.


CiviMail - Error 500 when tracking clickthroughs

This seems to be an issue with 4.7 and 4.7.1:
https://issues.civicrm.org/jira/browse/CRM-17953

The issue has a workaround solution, and the full fix will be linked from that issue when it has been implemented.


What tpl or php file calls/loads CRM/UF/Page/Group.tpl for the Profiles page?

For the Profiles page, the templates/CRM/common/joomla.tpl template loads the Group.tpl file.  Since the production website was malfunctioning, I had to install a local copy in order to adequately debug.


How to customize the layout of a Contribution form created in Wordpress

You can setup a custom template directory (Administer > System Settings > Directories > Custom Template Directory) and add code to a Main.extra.tpl (the directory is (your_path/CRM/Contribute/Form/Contribution/Main.extra.tpl) and also see this Styling Contribution pages with buttons.

Or use an extension which is a preferred way: https://docs.civicrm.org/dev/en/latest/framework/templates/customizing/.

You can also add a custom style sheet for civi under Administer > System Settings > Resource URL's > Custom CSS URL for global styling changes. Conversely, if you want your theme to handle styling then configure
CiviCRM Admin Utilities which will give you an option on disabling civicrm.css on the front-end.


How to trigger the Refund Notification email

The Additional Payment Receipt or Refund Notification template is used to send receipt when payment is recorded for Partially paid or Pending refund or Pending Pay Later Contribution.

To trigger this you will need to create Pending Paylater Contribution and then under Contribution tab of Contact or Find Contribution results click on More >> Record Payment besides the contribution row.

Submit the Payment form by checking Automatically email a receipt to xxx ??

HTH

Pradeep


How to Export full back up of entire database

Exports and backups serve different purposes: 'export' refers to an extract of data to use in another system, 'backup' refers to recovery in the event of system failure, recovery from bad user actions (eg unintended deletes), creating a second copy of the site etc.

If you want a backup, then take a dump of the mysql database with mysqldump or an equivalent provided by your hosting environment.  That will include 'all the details' including all activities, events, contributions, memberships etc relating to each contact.

If you want to export data into eg a spreadsheet, then there are a few options:

I think you were referring to the Export Contacts action from contact search results.  If you don't want its selection of primary fields then unfortunately you need to specify each one.
You could look at using a report (eg Constituent Report (Summary)) that allows you to export as CSV (in the Actions dropdown).
If the reports don't provide what you need and you are on Drupal, then you could create a View and use eg Views Data Export to create your own CSV.
If you have command line access you could also look at, and maybe customize, the script at <civiroot>/bin/csv/export.php


Command are running manually, but cron is not running

In order to close this post, I'll explain the solution.
There were 2 mistakes:
1/ the parametre cwd= (current working directory)  was incorrect.
2/ the way I use UIHostinger for cron was incorect.
My solution is:
0,30 * * * *   /usr/bin/php /home/u781989671/public_html/wp-content/plugins/civicrm/civicrm/bin/cv.phar api job.execute --user=myuser --cwd=/home/u781989671/public_html
best regards,
rv


How to limit access to manage/create contacts by type via user roles?

This may not be the answer you hope for, but the way we have approached this for other multi-level sites is to keep the 'lower level' users completely out of civicrm and give them everything they need via Views and Webforms.


I'm afraid CiviCRM doesn't support Drupal 8 yet.  You will need to install Drupal 7.

You can find more details here: Installation and Upgrades

See also this question: Does CiviCRM work with Drupal 8 and how can I help?


"Forward this email" creates contacts with e-mail and no first/last name

I think that page has not changed since it was first implemented. I'd probably vote for the following changes:

a. Add optional form fields first name and last name

b. Create an activity to make it similar to tell-a-friend, which is kinda the same concept


Based on the content you provided, the problem I see is the src is missing from the image tag.  Be sure the URL you use is fully formed including the domain, ala, src='http://mysite.com/.....'     (Well, actually, you don't have a img tag in there.... I think you meant for the i tag to be the image??)

The href you have on the anchor tag has this problem, with the URL not including the actual URL.

Once you get the src set on the image, and if it's still not working, post the HTML from that source view.


I'd agree with trying the theme suggestion in the above comment, but if you do want to change css I would use "extras.css". See the hilited box on this page:
https://wiki.civicrm.org/confluence/display/CRMDOC/Resource+URLs

  "You can also define additional CSS styles to be applied to all or
  specific page elements by adding CSS styles to the 'extra CSS' file:
  css/extras.css. This file is included in the downloaded code, but is
  empty by default."

It's difficult to answer the other questions because they're a little too general.


Scheduled Job Membership renewal reminder not running

The cron job Job.execute is running all active cron task defined in menu Administer -> System settings -> Scheduled Jobs

If your cron is running as it seems to be, you might first want to check :

if the task Send Scheduled Reminders is enabled in  Administer -> System settings -> Scheduled Jobs
if the frequency is correct - it should be daily or hourly maybe
when you click View Job Log - do you have any error


How to use the new Pdf.Createmulti in CiviRule?

After asking Jaap from Civicoop, maintainer of the extension, it seems that the option of sending multiple pdf from a civirule is not yet possible. It's meant to be used from the API v3 interface. But with small additional development, it would be easy to have it as an option in CiviRule.


As the error message says, you seem to have deleted the "case coordinator" relationship type, yet one or more of your case types depends on it. Either restore that relationship type, or remove it from the case type configuration.


We ended up disabling the extension via phpmyadmin, which enabled the "uninstall" link in the UI. Un-installation went fine, and we did a fresh install and now everything appears to be working fine.


Adding Custom Field to Contact Membership Tab

The template you're looking for is templates/CRM/Member/Page/Tab.tpl.  The "browse" action is number 16, and takes up the vast majority of the template, starting around line 33.

You'll want to populate the $activeMembers and/or $inActiveMembers array with modified data.  Those are defined in CRM_Member_Page_Tab around line 211, but most likely you'll want to modify the $membership array that they're both based on.  The browse() method of that function is mostly a "while" loop devoted to building the $membership array, but is sadly devoid of hooks.


Running CiviCRM unit tests with an extension installed

Agree that the typical configuration is to have a separate, headless database for running tests.

Your problem sounds similar to (but slightly different from) the problem of running unit-tests provided by extensions. In both cases, one wants to activate the extension on the headless database, so we may borrow some techniques from extension testing.

If I were you, I'd try preparing a DB snapshot with the extension preinstalled, e.g.:

cd ~/buildkit/build/mybuild

# Put the extension source code somewhere under `civicrm`, e.g
git clone https://mygit.example.com/myextension sites/all/modules/civicrm/tools/extensions

# Activate the extension in your main DB, e.g.
drush cvapi extension.install key=com.example.myextension

# Update the DB snapshot for your build
civibuild snapshot mybuild

cd sites/all/modules/civicrm/tools/extensions

# Restore DB & run tests at the same time
civibuild restore mybuild && ./scripts/phpunit CRM_AllTests

Each time you restore the DB, it resets both the main DBs (Civi+CMS) as well as the headless test DB using the latest snapshot.

You can repeat the last command whenever you want to run the tests. This ensures that the extension is active (even if some test went mucking around with extension data).

You can change CRM_AllTests to api_v3_AllTests, api_v3_SyntaxConformanceTest, CRM_Myextension_MyTest, or any other test class.


Impossible to get the source field with the Contribution API

There is an issue with the contribution 'source' field being accessed through the API, due to there being a conflict between the 'source' field of a contribution and the 'source' field of a contact.

To get around this conflict, add the prefix 'contribution_'. So in the API call, change 'source' to 'contribution_source':

$result = civicrm_api3('Contribution', 'get', array(
  'sequential' => 1,
  'return' => "source",
  'id' => 1,
));

...becomes...

$result = civicrm_api3('Contribution', 'get', array(
  'sequential' => 1,
  'return' => "contribution_source",
  'id' => 1,
));

This worked for me.


How would I configure an Event with varying inputs and free registrations based on contribution level?

I think the discount codes is a good approach.  To do this all on one page would require either webform_civicrm for Drupal, which you don't have, or to write an extension.

If you write an extension, I'd use hook_validateForm to make the Logo/Display Name optional/required, based on their level.  The same hook would also allow you to set a maximum number of additional participants to register.  You can also add a jQuery script with hook_buildForm for niceties like adding/removing an asterisk as fields become required/optional, but you still need server-side validation for security purposes.


Can't install CiviCRM on Wordpress (error Database)

Couple of observations:

You may need to double-check that you can reach your MySQL database, since CiviCRM apparently can't (it's confusing since it reports that it can't connect, yet various operations can be done)
Your MySQL user needs to be able to create triggers. You probably need to contact your host to request this capability.


Summaryfields Extension - 'Largest Contribution' includes Test contributions

The developers fixed it in the master branch, if anyone comes across this: https://github.com/progressivetech/net.ourpowerbase.sumfields/issues/63


I am not sure if we can. One option is to disable report template but it will disable all the reports associated with the template, which i believe you don't want.

However there is column(is_active) in civicrm_report_instance to set report Active/In-active but the report list is not filtered on this field(See here). So adding a where clause AND inst.is_active = 1 will list only active reports and then update all the report instances that you would like to archive to set is_active = 0 through api explorer (CiviCRM >> Support >> Developer >> API Explorer)

Alternate option will be to create a dummy user and assign all the report instances that you would like to archive to dummy user contact through api(so all assigned reports will be visible to dummy contact user only and then set it NULL when you want the report to be visible for all)

HTH

Pradeep


Display Membership type description on contribution page?

If you did this as a Price Set you would be able to have some info in the post-field-help, and you can set the 'label' to be different to the membership type if you want eg

and actually the Price Options do have a pre/post help options but they show inline, presumably some minor theming could address that

Currently at https://dmaster.demo.civicrm.org/civicrm/admin/price/field?reset=1&action=browse&sid=10&new=1 but will be flushed within 24 hours


None of the extension you mentioned have schedule job or script to fix historical data, we had to write a script to update historical data when the extension was installed, and going forward extension managed to capitalize the name.


Utterly useless and unhelpful error message on attempting upgrade to 5.33.1

It sounds like this is the url change that happened in 5.26. If you're upgrading from before 5.26 see https://civicrm.org/blog/kcristiano/civicrm-526-and-wordpress-important-notice


CustomGroup Create API Not Passing Param extends_entity_column_id

I figured it out.

You have to set

'extends' => "ParticipantEventType",

By doing that it will set the proper value for 'extends_entity_column_id'.


JPG files uploaded as notes can't be viewed

Eventually I found out what the problem is and it is caused by the child theme that I had created. Another problem elsewhere that had an extra blank line at the start of a news feed and Demerit's comment above suggested this as a solution. When I changed to the base theme all was fine. Going back to functions.php for the child theme I found a blank line outside  (though not at the start of the file which is why Demerit's suggestion didn't lead me to the solution before).


Changing CiviCRM events partcipant status

Normally it would be a civicrm user/ administrator that would update participant details after an event. (Rather than the participant themselves).

As Pete said you can configure a Drupal Webform to update participation details.

The answers to this question How do I get Retrospective feedback for an event using a Webform (participant Custom Data)?

Shows how someone else has configured a webform, and the webform url (including event id and contact id) for use in a schedued reminder.


Schedule reminders configured for all the available entities except for participant will send reminder on exact same day match in your case it would be on 7th day after expiry date.
For events participant its different, in current version of civi if you have configured send reminder for event start date after 7 days than it will send reminder for all the participant whose event start date is past 7 days


Searching by 'Contribution Source' gives no results CiviCRM 5.21.1

It seems to work ok on https://dmaster.demo.civicrm.org and 5.23. I know there were a lot of search form changes around 5.21/5.22. If you're able to upgrade it seems to be working.


Yes, One can register for events on behalf using backend form or front end form.

Backend:

Navigate to Events >> Register Events Participants. Select Contact and Event to register.

Front End:

Visit online page by navigating to Events >> Manage Events. Click on Event links against the event you want to register and then click on Registration(live).  If you are logged in than online form will pre populate with your details, to register other contact click on the link (Not Pradeep, or want to register a different person?) as shown in below image.

Here you will get 2 options

To select Contact from auto select field. (if user have permission to view contacts in system)
Create registration for new contact. In this case if CiviCRM finds duplicate match of this contact (using rule defined in dedupe rule) than it will update the existing contact in CiviCRM.


How to include "Same as Billing/Home address" in a payment processing page?

I believe the checkbox should appear automatically on a core Contribution page as long as the profile with the home address is at the top of the page, not the bottom.


Smart group url parameter to search contributes

The syntax doesn't use [] for multivalued fields. You put commas if you want more more than one. See https://docs.civicrm.org/user/en/latest/the-user-interface/searching-url-support/
So the parameters here would just be reset=1&force=1&group=47&contribution_status_id=1


Importing contacts and adding to a group also adds contacts with imported relationships to the same group

This is strange behavior, but it's been the case for at least nine years and probably longer.  I think that until the import is overhauled (work that is slowly but surely happening) we shouldn't change behavior out from under folks.


I need some help resolving db error:unknown error CSV Import helper when selecting a CSV from my desktop

The issue was unrelated to the log error, which we will debug at a future time.

The problem was caused by my preferred use of a semicolon ";" as a delimiter instead of a comma ",". I frequently use the semicolon because clients frequently include commmas in names and addresses. Apparently this disambiguation was a problem for the CSV Import Helper.


Repeating Payments with Authorize.net Problem

1) Make sure the Silent post URL is properly configured in Authorize.net.
Example: https://YOURSITE.COM/civicrm/payment/ipn/2 (the 2 needs to be replaced with your CiviCRM Payment Processor ID#)

2) It is possible that recurring payments are not processed instantly. It could be that recurring payments are processed in the middle of the night for example and therefore the payment will remain pending until it is processed.


"Abandoned" Ubercart orders marked as "completed" in CiviCRM

If you want to map 'abandoned' to the 'canceled' status in CiviCRM (there is no "abandoned" status in CiviCRM) you could revise the above like so:

$map = array(
 "completed"        => 1,
 "payment_received" => 1,
 "pending"          => 2,
 "processing"       => 5,
 "canceled"         => 3,
 "abandoned"         => 3,
 "in_checkout"      => 5,
);

Then I'd recommend making a bug report/patch on the issue you filed at the project page so it gets into the module core if the maintainers agree.


Domain Access and CIVICRM ACL of data and drupal

It sounds like what you want is CiviCRM multi-site capabilities with the multisite extension.  This will give you most of what you want without ACLs, and integrates well with Domain Access.  I've also written an extension to properly handle creating new user logins via CiviCRM profiles with Domain Access.

To handle the "propagate some groups to all users" scenario - with multisite, every subdomain will have a "master group".  Any contact in that group will be visible to all contacts on that subdomain.  If you set a master group as the parent of another group, all those contacts become visible to those domain members.  Since a group can have multiple parents, simply make the "visible to all" contacts have all the master groups as parent groups.


Howto extend a civi db field's size (maxlength, varchar)

Interesting one. I would probably add a custom field at Organization level with the full name and use an abbreviated version in the display name. Possibly add an extension to show the custom name in forms with the buildForm hook and the summary hook. Also add an apiWrapper hook to add the longer name to the API.


A copy of the raw email is in the CiviMail.processed folder under the "custom" folder. Depending on the CMS you are using the location is different, but e.g. for Drupal it's usually sites/default/files/civicrm


Undefined index: params in CRM_Event_BAO_Event::buildCustomProfile() - CiviEvent

I also came across this notice, I've submitted a pull request: https://github.com/civicrm/civicrm-core/pull/12678


Listing events that only belong to a group

I think you can filter the views using CONTEXTUAL FILTERS. Add group custom field in CONTEXTUAL FILTERS set default value to use below php code

    civicrm_initialize();
    try {
      $result = civicrm_api3('Contact', 'getsingle', [
        'return' => ["groups"],
        'id' => "user_contact_id",
      ]);
      return $result['group'];
    }
    catch (Exception $e) {
      return 0;
    }

Cheers

Pradeep


Permanently Deleted Contact Records Keep Reappearing

Are those real contacts? Can you check the created date against the contact? It shows up at the bottom when you view the contact or you can grab from civicrm_contact.created_date using mysql.
If the dates are changing than it means those contact are created via Bots. Could check all the forms which are accessible to anonymous user have recaptcha installed these includes user registration, membership signup or event registration etc? Include recaptcha on all your Civi profile forms. Visit the permission page to check if anonymous user is allowed to create contact.


The civicrm_post hook performs stuff after a database update, and does not necessarily just echo stuff on a page.

If you want to customize CiviCRM I strongly recommend you read the Developer Guide carefully, and possibly check if you can follow a CiviCRM developer training somewhere.

I assume you do not actually really want to echo "hello world" on any page, so perhaps it will help if you tell us what you really want to do?


The way i would do is use CiviCRM merge duplicate contact feature. Here is the documentation on how you can use Merge contact screen to merge two duplicate contacts in your system.

If you know the contact that is duplicate and want to delete than you can click on 'Delete contact' button that appears when viewing the contact.

Or find the contact you want to delete using contact search and select the contact and choose from action drop down 'Delete contact' or 'Delete permanently'.

Ref: https://docs.civicrm.org/user/en/latest/organising-your-data/contacts/#deleting-contacts

Cheers

Pradeep


What should I do if an issue is marked as fixed in JIRA but it is still occurring?

Basically, you should reopen the original issue in JIRA once you have confirmed the problem is re-occuring in a later version than was fixed. Or if your account doesn't have the permission to do this in JIRA, leave a comment on the issue.

Every issue in JIRA has a field that says which version of CiviCRM included the code developed to address it. Bugs might re-occur because only part of it was fixed, or the QA wasn't thorough enough, or more commonly some later change recreated the problematic behaviour somehow.

Before reopening the issue, check that you can reproduce the error on the demo site, and make sure the behaviour matches the original bug description.

If it seems a bit different, create a new issue and include a link to the old one in your description, saying why you think the bug is similar but not the same (this can save time for people working to fix the bug).

If you're reasonably sure the bug is the same then reopen it, describe your experience including you site's version number, and indicate that you have reproduced the problem on the demo site. Note that you have to login to JIRA before you see the button to Reopen an issue:

If you don't see the button, then just leave a comment:

If an error was closed without being fixed because it couldn't be reproduced, you have an opportunity to assist even more. Try to take screen shots of the problem, and if possible, offer to do any testing the core team might request. This can involve checking a setting, examining a log file, or even putting in a debug statement. Rarely they might even benefit from accessing your system to investigate more thoroughly.


browser session expired = unable to complete event form

thank you for your answer.
Yes I am using "WP Cleaner URL's":
-the starting page seen in civicrm-admin is: /event/info/?reset=1&id=2
page1= http://migrationccb.esy.es/2020/08/03/la-6eme-edition-des-vallees-breuilletoise-se-prepare/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&cid=0&reset=1&id=2
page2= http://migrationccb.esy.es/2020/08/03/la-6eme-edition-des-vallees-breuilletoise-se-prepare/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_Confirm_display=true&qfKey=4e151fc03d552da26b4ccef7fa052d83_8032
page3= http://migrationccb.esy.es/2020/08/03/la-6eme-edition-des-vallees-breuilletoise-se-prepare/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_ThankYou_display=true&qfKey=4e151fc03d552da26b4ccef7fa052d83_8032
The website is hosting by Hostinger that advice to activate LiteSpeed from his admin-page: it is LiteSpeed Cache 3.3 with defaut settings.
As a first step I decided now to

un-activate "Mettre en cache les utilisateurs connectés"
un-activate "Server stale"
set "shedule purge time" at 00:01

Thank you for suggestions


Deprecated function CRM_Core_Config::defaultContactCountry error

Looks like cividesk.normalize based on the pastebin.

Actually looks like it's already patched in master: https://github.com/cividesk/com.cividesk.normalize/commit/221562b8bf4fb56fe677eaaf9122d3af5c3cce74


It sounds like the CiviRules extension might fit your requirements
https://civicrm.org/extensions/civirules

This extension allows to you trigger actions when certain events happen. If x happens then do y.

There are some good examples in the 'cookbook' - linked to from the page above - that should help you get started.


If you do a Search for Memberships (eg Find Members, or Adv. Search but set to show results as Memberships) then you should have access to a Batch Update via Profile that I think lets you change Membership characteristics such as Status.

You will also need to create a Profile with the relevant Membership fields in it.


Relationship Type "name" as Drupal [Rules] Token in Civicrm Entity module

It seems that Fetch CiviCRM entity by property action loads anything else but ID, so, in order to get a full Relationship Type, one may want to use  another action with almost the same name has been used ( Fetch entity by id) which loads Relationship Type by its ID from any Relationship.


Change Case summary report to group by Case ID

In general this kind of thing depends what other fields you're including as columns. But ignoring that for the moment one approach is use the groupBy as you suggest and then in select() add an if statement for the contact sort_name and use mysql GROUP_CONCAT().

Another is remove the joins and anything related to contact.

Another is alter the from() to do some kind of derived table inner select on the contact tables so that at the outer level it's already flattened to one row per case.


CiviCRM werkt achter een website.

Om CiviCRM te gebruiken begin je met het installeren van de website.
Er zijn 3 website systemen waar CiviCRM mee samenwerkt:

WordPress
Drupal
Joomla

WordPress is een veelgebruikt systeem en redelijk makkelijk te installeren.

CiviCRM zelf is wel lastiger dan het installeren van 1 van die 3 systemen.
Je hebt redelijk wat technische kennis nodig.

Laat maar weten of het lukt of dat je hulp nodig hebt.


PROBLEM>> The Profile Redirect URL is Limited to One Setting for Multilingual Site

I am not familiar with WPML, but what I normally do with multilingual sites is that I add one profile per language, that way you can also create the field labels as you want.

That way you can set the redirect URL as you want.

In WordPress you can then use a different shortcode per language to embed the profiles.


Can webform-civicrm pre-select an event using Drupal Views?

I believe this has been implemented now so that there is a setting on the Event section of the webform's civicrm tab so that you can 'allow events to be autoloaded from URL'


Compucorp Membership Extras: Offline auto-renew questions

Thanks for looking into membership extras. Just a quick point that we are planning a release at the end of Jan which will fix a lot of bugs and issues so I would suggest to wait till that is released before using this fully.

Answers to questions below:

  Does this plugin actually create a recurring contribution record the same way that online payments do?

Yes it does - when creating a new membership you have the option to use a payment plan. If you do the system will create a recurring contribution.

  Is there any way to bulk apply this to our 400 existing direct debits before they auto-renew in April 2020?

This is a bit more tricky. For existing memberships who do not have a recurring contribution you would need to set them up with recurring contributions linked to the contributions and memberships. Perhaps with 400 or so this would be best done manually by creating new memberships starting in the new period, but alternatively you could generate a script (or if you would like some developer support with this do get in touch with me at hello@compucorp.co.uk and we can see if we can create this for you).

  We use two different payment processors for offline auto-renewals; a mix of "Legacy Direct Debit" and "Standing Order". Is there any way
  for auto-renewal to just use the same payment processor as the
  original contribution?

Afraid not. The payment processor is what does all the clever work behind the scenes to create the payment plan and instalments. Note you also need to enable the renew memberships scheduled job. Why do you need to use the existing payment processors can I ask?

  In some cases, a member has an existing direct debit or standing order that adds extra money as a donation on top of the annual
  membership fee. Historically, we split this into two imports: Is there
  any way to have the extension include the donation as part of the
  'duplication' auto-renew process?

Yes... but again this is a bit tricky to update existing memberships into. For new memberships the extension completely supports line items so you could have a membership line (or two) + donation lines on a single contribution. These would then recur with the recurring contribution.

Hope the above is useful and do keep an eye out for the v2 release which will be a big update.

Best

Jamie


CiviCRM component pointing to different database than Joomla CMS

First - everything I suggest, do on a dev site, and make backups!

You SHOULD be able to just change civicrm.settings.php to point to @deafhhny_jmlnew@, then run the upgrade script, which upgrades the database to match the installed version.  Make sure you're logged into Joomla before you do this - going so many versions ahead, you're likely to be unable to do pretty much anything in Joomla/Civi (including log in) except go to the upgrade script page.


Adding new default components to the database

A bit of terminology: Components in CiviCRM usually means CiviContribute, CiviEvent, CiviMembership, etc. I think you are referring to parts of an email template when you write about components. In general, when you are wanting to add something to the database in CiviCRM as part of the core code, you need to make sure it is added to the install tarball and is added or changed in databases as they are upgraded.

To insert data in the tarball, look under https://github.com/civicrm/civicrm-core/tree/master/xml/templates - in your case you likely want to add or update templates in https://github.com/civicrm/civicrm-core/tree/master/xml/templates/message_templates

To insert or modify data on upgrade, look at https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade. Note that the message templates are in subdirectories by release, and that non-message template insertions are generally in the per release upgrade scripts in https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade/Incremental/sql


Upgrading from 4.6 to 5.5.3 - [Error: Remove Moneris] CiviCRM_API3_Exception: "Could not delete payment processor type"

This error relates to the fact that there used to be payment processor code in CiviCRM core to support the Moneris payment processor.  If you don't interact with Moneris, this is fairly safe to ignore.  However, I suspect the error may mean you use Moneris, in which case I would NOT follow the instructions below.

In your CiviCRM folder, find the file located at CRM/Upgrade/Incremental/php/FourSeven.php.
Delete line 193.  Confirm it matches the line 193 linked here.
Run the upgrade again.

Note that it's common to experience upgrade errors because you have a partially upgraded database - so be sure to restore the pre-upgrade database backup to minimize your upgrade pain.


Track activities and changes that were made in civicrm by staff

Under administer - system settings - misc you can turn on logging which tracks changes.

Also if using drupal turning on the statistics module is sometimes helpful in seeing what people have been clicking on since it makes a recent hits report available.


Unfortunately, at this time (CiviCRM 4.7.13) it's not possible to export multi-record custom fields through the CiviCRM interface.

This question: How do you export a multi record set? suggests an alternate method that may work, but it would take someone experienced at writing custom CiviReports.


Unable to donate due to DOB format anomaly

Have you formatted the date in Administer/Localization/Date Formats? For the UK  'Complete Date' is set to '%B %E, %Y', and 'Complete Date and Time' is set to '%E%f  %B, %Y %l:%M %P'.  Also 'Date Input Fields' is set to 'dd/mm/yyyy' which is probably the critical one in this case.


Is revealing Internal id a security risk?

I think it is a pretty common practice - similar to the way your utility bills have their customer number on them


Ajax Error when trying to view relationships tab

I had the same issue.  CiviCRM 4.7/Drupal 7/IIS8 configuration.  The Ajax call was generating a query longer than what the web server was configured to handle and behind the scenes the web server was throwing an error, but it is not logged to the Civicrm log nor the Drupal log.

I was able to solve this by increasing the query string length in IIS.

In IIS Manager select the site
Choose the Request filtering icon
Navigate to the query string tab
Click the edit feature settings
Change the Maximum query string (Bytes) from 2048 to 4096 or something larger

Contact Relationships now show properly.


How do I restore a default report template?

Don't know a way through the UI, but I think you could do it through SQL.

The default reports appear to be defined in xml/templates/civicrm_navigation.tpl, which in turn gets copied into sql/civicrm_data.mysql.

You might make a new instance with the default settings by copying the definition:

Open sql/civircm_data.mysql and search for civicrm_report_instance. Find the INSERT statement which corresponds to your report.
Copy the INSERT statement into a text editor.
Change @domainID to 1 (unless you have a special/multidomain system; then adjust accordingly).
Open your MySQL tool (e.g. mysql cli or phpmyadmin) with an appropriate user+database.
Paste and execute the INSERT statement.

If you want to reset the existing report and know a bit of SQL, then you can massage the INSERT and produce an UPDATE for the existing report.


After upgrade, System Status page is empty, but issues display in popup

Well, I'm not sure this is a long-term solution, but it is a workaround....

In one of the Angular posts (Status page angular load error) I found this:

  another work-around should be going to "Administer => System Settings => Debugging" and disabling the "Asset Cache"

That's brought my System Status page back, but I don't like the thought of not using a performance enhancement.


The Elavon payment processor integration ships with CiviCRM https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment/Elavon.php
From Administer > System Settings > Payment Processors, click Add Payment Processor. On New Payment Processor page, for Payment Processor Type, select Elavon Payment Processor and complete the rest of the form before submitting.
This is one of the oldest integrations with CiviCRM, and we have clients who have been happy with it for many years.


You may want to first check out the Advanced Fundraising Reports extension before you go too far down that road - I think it has the option you want.

Second - I've been working on user-configurable date filters - I'm hoping to get them into the next version of Civi, so you don't have to modify code to get a new filter.

Third - since you need this now and not later - you'll want to override one or both of these core files:
CRM/Core/Form/Date.php
CRM/Utils/Date.php (function relativeToAbsolute).


CiviVolunteer stopped working after upgrading to 4.7-2.2.2

The latest version of CiviVolunteer (4.7-2.2.2) is not compatible with versions of CiviCRM before 4.7.21. You should upgrade CiviCRM to at least this version, if possible. Full details are available in the announcement.

If you are not able to upgrade CiviCRM, there are no changes to the database schema in 4.7-2.2.2, so it is possible to downgrade CiviVolunteer to 4.6-2.2.1. Download the code and replace version 4.7-2.2.2 in your extensions directory.


CiviCRM running very slow on local network

And once again I had found out the answer on my own, took a lot of time though...  it is in components and administrator's civicrm.setting.php (both php file!)
just simply change both localhost (see the photos below) into your server IP
Simple as that (yeah I'm so noob TwT), I wish this can help those who have the same problem like mine, apology for my bad grammar english and stuffs :P


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


Has anyone added discounting functionality to the 'cart' component of CiviEvent?

This might an important feature for folks using Event Cart functionality. It would be great if you can submit a PR against CiviDiscount repository at

  https://github.com/dlobo/org.civicrm.module.cividiscount


Membership form submit button goes to 404 not found error

Since you are on wordpress 5.5 it s mandatory to upgrade civicrm to 5.26 or more (5.28.x preferred) else all your front end civi forms will not work
Ref: https://civicrm.org/blog/kcristiano/civicrm-526-and-wordpress-important-notice


On workaround/better solution is to change the format of the value entered by end users so DAMIEN is converted into Damien, and the dedupe rule compares Damien=Damien and all works smoothly.

https://github.com/TechToThePeople/civicrm-normalise

X+


What is the purpose of the Disable Expired Relationships scheduled job?

End date alone does not determine if the relationship is 'active' or not. It will remain active until the scheduled job kicks in and makes it inactive. Examples include inherited memberships (membership by relationship). If you look in the advanced search you can see a radio option for active/inactive relationships. Its important to note anything in Civi that is using relationships to work out if it should carry out the action will most likely look for active relationships.


Certain data is not displaying on records

FYI, I found a work-around by changing from "tab with table" to "tab". Also when I checked the staging environment that I used for testing, there were two fields in the custom field group, the multi-select field and a text field, that I no longer needed.  Although it worked fine with "tab with table", once I deleted the text field that I no longer needed, it no longer worked.  Seems like a bug to me.


This turned out to be an unexpected odyssey.

This error was misleading, and actually indicated that some of the page elements were being returned with 0 bytes.
Those elements were civicrm php urls, and most of the errors we noticed where from a 4.7 installation.
There were unhelpful messages in the php error log until I turned on 'catch_workers_output=yes' in the php-fpm.d/www.conf file.
The detailed error 'WARNING: [pool php56u] child 31883 said into stderr: "zend_mm_heap corrupted"' led me to https://bugs.php.net/bug.php?id=65590
A suggestion in that thread "opcache.fast_shutdown=0" appears to have resolved the issue.


Live Paypal transactions showing as Test

I have noticed this behavior in the past. When using a PayPal sandbox account, CiviCRM transactions are flagged as "test" even when using the sandbox credentials in the "live" processor configuration.


Error with recording membership payment offline

I just confirmed the bug in http://dmaster.demo.civicrm.org. This means not fixed yet. I take a look on https://issues.civicrm.org and I have not found any related error.

You can see guideline Bug Reporting and report this issue.


How to access contact ID and checksum for a new contact from the Caldera form that creates the contact?

There's an example of how to do the second part of this in the integration module's README.

  Checksum support to auto-populate form with URLs like example.com/some-page?cid={contact.contact_id}&{contact.checksum}

The part I'm not aware of is how to properly redirect from one form to a second form with the right contact ID and checksum. I don't have any Civi-on-WordPress instances to test with.


Searching based on members that have a twitter website address

When you say "return all groups" I presume you mean return all contacts, as I don't see a way to associate a website with a group, but please clarify. From what I can see, there doesn't seem to be an option to search on website at all in Advanced search, but I think you can achieve what you want in Search Builder with

record type: contact
field: website
operator: like (or maybe a more precise regex)
value: twitter.com


Multi language update to 4.7 does not update Custom Field Sets to be 'is public'

While the patch in https://github.com/civicrm/civicrm-core/pull/10399/files will fix the issue for future site upgrades, it won't help with site that are already experiencing this issue. Running the following will fix sites affected by this issue:

drush eval 'civicrm_initialize(); $domain = new CRM_Core_DAO_Domain(); $domain->find(TRUE); if ($domain->locales) { $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales); CRM_Core_I18n_Schema::rebuildMultilingualSchema($locales, NULL); }'


Add/Edit Email field not shown when editing a contact

It may be possible that email field is disabled from your Display Preferences. You can find this on Administer -> Customize Data and Screens -> Display Preferences.

Make sure Email field is checked TRUE on Contact Details Column of Editing Contact Section.

Demo Link - http://dmaster.demo.civicrm.org/civicrm/admin/setting/preferences/display?reset=1


What you're seeing is correct. The reason is mostly because you can have multiple notes, so it gets its own tab.

If you only want one "note" per contact and want it to always appear, you can create a custom field, e.g. called "comments" (to distinguish from notes), and then it will appear on the summary tab and in edit mode in an accordian section.


403 Forbidden When Trying to Edit Contributions

I upgraded to the newest version of CiviCRM and this appears to be resolved.


On some of our (older but since upgraded) instances the Manage Extensions still shows under Admin > Customise, rather than Admin > System Settings - just in case your is there, but just not where you expect it ;-)


How to automatically create relationship between Drupal role user and a group of civi contacts?

Use the Silent User Registration extension https://lab.civicrm.org/extensions/silentuserreg This will create the user in Drupal
Before you install the extension, replace the Createcmsuser.php file in CRM > Silentuserreg > CivirulesAction with the code below. This will create the UF Match that you are looking for to link it to the user in Civi
Follow the extension instructions to set it up. I would have your CiviRule trigger off When contact is added to group or something like that.
<?php

/**

Carls Notes
This file is to create a CRMUser and then a UFMatch record. File Location=secure/sites/all/files/civicrm/extensionsions/silentuserreg-master/CRM/Silentuserreg/Silentuserreg
/
/*
Class for CiviRules Create User Action

@author Jon Goldberg (jon@megaphonetech.com)
@license AGPL-3.0
*/
class CRM_Silentuserreg_CivirulesAction_Createcmsuser extends CRM_Civirules_Action {

/**

Method processAction to execute the action

@param CRM_Civirules_TriggerData_TriggerData $triggerData
@access public

/
public function processAction(CRM_Civirules_TriggerData_TriggerData $triggerData) {
$cid = $triggerData->getContactId();
$userInfo = \Civi\Api4\Email::get()
->addSelect('id', 'email', 'contact.display_name', 'is_primary')
->addWhere('is_primary', '=', TRUE)
->addWhere('contact_id', '=', $cid)
->setCheckPermissions(FALSE)
->execute()
->first();
$userExists = (bool) count(\Civi\Api4\UFMatch::get()
->addWhere('contact_id', '=', $cid)
->setCheckPermissions(FALSE)
->execute());
if (!$userExists) {
$userParams['cms_name'] = $userParams['nickname'] = $userInfo['contact.display_name'];
$userParams['email'] = $userInfo['email'];
$userParams['cms_pass'] = CRM_Silentuserreg_Util::randomPassword();
$nid=CRM_Core_BAO_CMSUser::create($userParams, 'email');
// create the UF Match record
$ufmatch['uf_id'] = $nid;
$ufmatch['contact_id'] = $cid;
$ufmatch['uf_name'] = $userInfo['email'];
CRM_Core_BAO_UFMatch::create($ufmatch);
}
}
/*

Method to return the url for additional form processing for action
and return false if none is needed

@param int $ruleActionId
@return bool
@access public
*/
public function getExtraDataInputUrl($ruleActionId) {
return FALSE;
}

}


Does anyone have a recipe for Commerce / Rules / CiviCRM integration?

Exported Rules:

The description of what I'm trying to do is below, and you can download (and/or pitch in) on the current versions of the Rules below at this GitHub repo.

Problem Areas:

In creating the CiviCRM Contribution record, I haven't been able to figure out how to set the Receive Date. I can't input the token for the date of the order because that is of type Date and the CiviCRM Receive Date field only allows data of type Text. Pointers/ideas welcome as currently it leaves the date off completely in the inserted contribution record.
Also less than ideal is leaving Fee amount and Net amount blank...
This seems not to work unless the purchaser is an administrator so I've got some further digging to do on permissions

With a lot of trial and error, I have a start on this. This is a work in progress, so feel free to chip in on remaining items if you have an idea or have thought of a better way.

Needed Modules:

Rules
Commerce
Commerce Donate (if you want to allow a donation to be added in a shopping cart, so they don't need two checkouts)
CiviCRM Entity
Conditional Rules (to add some conditional logic to the rule)

Working Elements:

Add some contact info to the CiviCRM contact
Add separate contributions to the CiviCRM contact depending on type (store item, donation, shipping fee)

Instructions:

Set up Commerce Donate and have a pane on your checkout to allow someone to add a donation to a store order:

Now go to Rules (Configuration > Workflow > Rules) and create a new rule. I ended up breaking this into two separate rules but after I discovered the Conditional Rules module I'm pretty sure I could have done it in one.

First rule: Add contact info to CiviCRM on store order

Events: Completing the checkout process
Conditions: I don't think any conditions are needed. I have a few in there from testing currently but I don't think they affect anything.
Actions:

Fetch entity by id with Entity type = "CiviCRM Contact" and Identifier = "commerce-order:owner:civicrm-contact:id"

Fetch entity by id with Entity type = "User" and Identifier = "site:current-cart-order:uid"
Fetch entity by id with Entity type = "Commerce Customer profile" and Identifier = "site:current-cart-order:uid"
Set a data value selecting "civi-contact:first-name" and using the value "[customer:commerce-customer-address:first_name]" (do likewise for any other information you want to pull from the Commerce profile and insert into the appropriate CiviCRM field)

Second rule: Add contribution info to CiviCRM on store order

Events: Completing the checkout process
Conditions: Same as above; I don't think any conditions are needed. I have a few in there from testing currently but I don't think they affect anything.
Actions:

Fetch entity by id with Entity type = "CiviCRM Contact" and Identifier = "commerce-order:owner:civicrm-contact:id"

For each contribution type (e.g. donation, store product, shipping fee) do: Add a variable to capture the total amount for that type. (e.g. donation_total) and set it to 0 to start.

After all variables are added, Add a loop to the rule's actions
Within this loop, Add a switch on Data to match against = "line-item:type" (switch functionality is provided by the Conditional Rules module; this is assuming your store products are set up as different types -- e.g. Donations as a donation type)

For each contribution type again, within this Switch, add a Case (again provided by Conditional Rules) and select the type of product in the Data value. Select "Fall through" as False.

Within each of these conditional Cases, add two new actions. The first one is to Calculate a value (input value 1 as the respective variable you set up above, e.g. donation_total, and input value 2 as line-item:commerce-total:amount-decimal and the operator as + for addition). The second action within this case is to Set a data value on the donation_total variable, using the value you just calculated.

After all of the Cases have been added to the Switch, add a new root level Conditional for each product type, to make sure the total for that type is greater than zero before creating a Contribution record. To do this, choose Add conditional and then within this conditional, choose Add if with a "Data comparison" to make sure it isn't empty (or is greater than zero).
Within this final If, we can add a new action to Create a new entity, selecting CiviCRM Contribution. Within here, I've added a number of direct input/hard coded values such as:

Financial Type ID = 1 (for donations, adjust as needed for other types such as a custom 'Store purchase' financial type within CiviCRM)
Total Amount: use the variable that you created and have updated for this type, e.g. total_donations
Contact id: civi-contact:id
Payment Instrument ID: kind of hackish but I've just entered a hard-coded value for credit card purchase (4)
You can add a direct input value in the "Contribution source" field and "note" field if you like


Contact Import Longitude missing in mapping

See here: Can't find 'longitude' in import wizard

It should be available by default, so yes, open an issue to fix.