Replace default Datatables script to most recent [custom buit] one How do one properly replace default 3-rd party packages without loosing changes after updates?

Namely, in need of Datatable CVS File Export, we've grabbed a custom DataTables built with all bells&whistles included from Download Builder page https://datatables.net/download/ and have just replaced stuff in    \civicrm\packages\jquery\plugins\DataTables\media\js\

However, changes will be obviously lost after civicrm core update. Is there any recommended technique to handle such things?

Thanks!

OK, answering my own question again. So, there are essentially 2 ways to achieve this:

Override  \civicrm\CRM\Core\Resources.php (copy it to your custom php directory first, in order to keep control on changes). It contains (quote) List of core resources we add to every CiviCRM page.
Use hook_civicrm_coreResourceList(&$list, $region) {}

(!! Attention: methods of adding 3rd-party resources, described at that page doesn't always work; we've ended up using drupal_add_js. Datatable initialization script has to be wrapped into drupal.behaviors than).


Why can't I see custom profile fields when I edit an event participant record I'm using civiCRM on Joomla and I need to edit a participant record to change a selection for a custom field. When I edit the record it does not show the custom field selections. Is this possible, if so, How do I view and edit their selections?

Thanks!

I figured it out. It was showing but the fields were collapsed.


Disable Outbound email or change SMTP server with an SQL Query? How can I activate the "Disable Outbound email" option or change the SMTP server address with only an SQL Query?

(My use case is when I copy live data to a test environment, I obviously want to make sure no real emails are sent from the test environment!)

Thanks,

In civicrm.settings.php, add the following:

define('CIVICRM_MAIL_LOG', 1);

This will route all email to files/civicrm/ConfigAndLog/mail (Drupal) or media/civicrm/ConfigAndLog (Joomla).

You can also specify:

define('CIVICRM_MAIL_LOG', "your_file_path");

to set a specific output file.

See https://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers.

Another option is to perform the following queries to kill any scheduled or queued mail:

UPDATE `civicrm_mailing_job` SET `status`= 'Complete' WHERE `status` IN ('Scheduled', 'Running', 'Paused')
DELETE FROM `civicrm_mailing_spool` WHERE 1


Change the permissions to access Volunteer tab in CiviEvent I have found out that the Volunteer tab within CiviEvent needs 'edit_all_events'. However, I do not want people editing events they did not create.

Where in the code could I find and adjust this permission? I'm looking here https://github.com/civicrm/org.civicrm.volunteer/blob/master/volunteer.php but have not found it.

I do have permissions set so this same user role can create and manage civivolunteer projects but it would be best if they were created with the event as the associated entity.

Relevant CiviEvent Permissions:

CiviEvent: access CiviEvent
CiviEvent: edit event participants

Relevant CiviVolunteer Permissions

CiviVolunteer: edit own volunteer projects
CiviVolunteer: create volunteer projects
CiviVolunteer: edit volunteer project relationships

With these, the user get permission denied:

The two places "Edit All Events" is defined as necessary is in the page callbacks in the router XML on lines 19 and 27.

You should be able to change those, then do a cache clear with menu rebuild to change the permissions.

Since CiviVolunteer is so AJAX-heavy, I'm pretty sure that's the right answer.  You can probably just remove the "Edit All Events" permission.  However, the better long-term answer is to do an event-level permission check in the PHP, because it's not uncommon for someone to grant permission to edit only some events via an extension.


Why no record locking in civicase? I haven't tested all the parts of civicase, but so far I have found that updates to activities, the main case record and custom fields are not locked.

Two users can update the same information with no warning or error at all.

Is this correct or is there a config option I have missed?

V5.17.4 on Drupal 7 if that makes a difference.

Regular activities are like that too. Locking isn't widely implemented. It's not on purpose just hasn't been implemented.

In the first few years of CiviCase's life it used to always make new copies when you edited an activity. You'd still have no warning if two people edit, but you'd see the previous versions. It wasn't a good technical design performance-wise and in fact you couldn't turn it off. Then a feature called advanced/detailed logging was added that logs changes to all tables in civi, but it's not turned on by default. Again there'd be no warning, but you'd have the history for all records. Then at some point the case activity revisions feature was converted into an optional feature and turned off by default too. Then it stopped working. So, at the moment, as a partial solution you can turn on detailed logging (under Administer - System Settings - Misc, where it's just called Logging). Then at least you'll have the record in the database (it creates another set of tables named log_civicrm_XXX).


How to use civicrm to achieve campaign requirements I'm looking at using CiviCRM as part of a solution for a campaign. what we need is a solution that aids volunteers to go into the field, speak to and collect data from voters ( we do not have adequate voter records here, so we have to build ours). We'll be collecting names, phone numbers, gender and asking a couple of questions. Volunteers are split into areas to collect the data.

Our phone bank solution will use the data collected to reach and talk to potential voters. Is there a way to also manage call centre volunteers using civicrm?

Can civicrm be used to manage the data collected? Can we manage volunteers (those collecting data and manning the phones) with it and track volunteer efficiency as we are paying them? What are the best ways to achieve this? We'll be using the wordpress framework

CiviCRM is very well capable of doing what you want to achieve. You can store contacts in CiviCRM, adds a custom fields for information specific to your situation. Also you can store an activity of who added the person to the database.

CiviCRM is also capable of importing data from Excel (CSV files) and exporting it to excel.

Have you thought of how your volunteers are collecting this data? Are they using an tablet? Do you get CSV files and import them later on?


Can you explain the relationship between groups, i.e a parent group Can you explain the relationship between groups, i.e. a parent group

I have set up a new group which includes members who are also part of a larger group.  What does it mean if I set it so the larger group, i.e. volunteers, is the parent of the smaller group, i.e. Monday weeders?

Thanks

If your monday weeders group belongs to the volunteers group, then members of the monday weeders will be acted upon automatically as members of the volunteers group.  So when you send an email to the parent group of volunteers it will be sent to all the members of monday weeders and any other group that's a sub-group of volunteers.

Is that what you're wondering?

There's more information about groups here https://docs.civicrm.org/user/en/latest/organising-your-data/groups-and-tags/.


Unable to Create New Contact Field I'm currently setting up the CIVICRM platform, now at the stage of importing data I am  unable to create new contact fields, I followed the instructions available to create custom fields however none of the created custom fields is visible when mapping the data for import.
Please assist as soon as possible.
Edit: here are some screenshots:

@fuzion, I yes the fields are set to searchable, on contact report I can also see the created custom field, but not in the import page.
@Aidan, Please expand more I do not completely understand you.

The problem is that the custom field has been set up to allow Multiple Records, and you did not click on the ? to read the notes about this type of setting - and those notes would have explained that the 'special power' of multiple records impacts on the ability or approach to other functionality including Importing records.


Events - Registration Confirmation and Receipt (on-line) is not sending to anonymous users I have set up an event with webform/civievent and the registration confirmation & receipt is not sending to anonymous sign-ups. While logged in and signing up it will email me (if I am the sign-up), but for anonymous users it won't. I have the send receipt box ticked off in both the contribution page and the event itself. The payment is going through and the participant is being registered correctly, the receipt will just not auto-send. I am using Drupal 7, CiviCRM 5.3.1, and webform version 7.x-4.17.

Ah - ok - this is what's happening:

if the event is FREE -> then no receipt is issued via CiviCRM workflow message templates
if the event is FREE && if participants make a donation -> then the participants get an email message from the CiviCRM workflow message template - contribution online

So your workaround is a good one - a simple Email message that is triggered via CiviRules (add Participant to a certain event) - or you could even do a simple Email message from Webform -> Emails.


"MySQL support not included in PHP error" in CiviCRM-4.7.10-wordpress I'm getting the error "MySQL support not included in PHP" in the CiviCRM installer wordpress page.

My setup is:

Ubuntu 16.04
Wordpress 4.6.1
CiviCRM 4.7.10
php 7.0 with mysqli php extension installed

I checked that mysqli is indeed loaded by running

php -r 'echo extension_loaded("mysqli") ? "loaded\n" : "missing\n";'

Any ideas about what could be wrong? What else can I check?

PHP 7.0 isn't supported in CiviCRM 4.7.10.  Please try upgrading to 4.7.12.


Searching and smart group for multiple event types I created a smart group through advanced search maybe 1 year ago for all contacts that had participated in an Event Type A or B or C. If I remember correctly it was very simple because the "Event Type" field in Advanced Search allowed multiple types to be selected. We now want to include Event Type D but when I go to edit the advanced search, it only allows a single type to be selected. Has the select widget for Event Type in Advance Search been changed to single select? Any ideas on how to now do a search for multiple event types?

Using the API3 interface I was able to see the information I needed to work though this problem. See the comments.


Paypal ipn issues after upgrade to 4.6.15. Paypal ipn is failing with 500 after upgrading to 4.6.15 from 4.6.10

The notification url looks correct but isn't working
https://www.mysite.com/civicrm/extern/ipn.php?reset=1&contactID=83&contributionID=80&module=contribute

I am using Drupal 7 with Pantheon. I already have implemented this patch
https://www.drupal.org/node/2177647

I'm not sure how to further debug this. The extern/ipn.php file hasn't changed from 4.6.10 to 4.6.15. Where else can I look.

Any tips on debugging would be greatly appreciated, thanks.

Why is IPN failing on Pantheon?

Check out CRM-17212: IPN and other scripts break on Pantheon due to session handler although it does look like you have a similar patch in effect. Compare your changes with those merged into the 4.7 branch, or consider trying 4.7.

How do I debug on Pantheon?

On Pantheon hosting, you can inspect your application's error logs in:

logs/php-error.log

For additional tips on debugging PHP errors, see also:

Where should one look for logs when debugging a new problem? and
How do I debug CiviCRM when I hit a blank page / white screen / fatal error?

Pantheon specific docs on logfiles are:

https://pantheon.io/docs/debug-log-files/
https://pantheon.io/docs/php-errors/


Is it possible to get point-in-time membership data? My client needs to know:

How many members did we have on date x
Who were the members on date x

Using "Find memberships" it appears that, though the UI allows it, combining the membership status filter with any of the date filters will return misleading/wrong results. It seems that the query there is using whatever value is in the membership status field at the time you run the report to evaluate against the filter. (Is there a way to tell what query CiviCRM is running?)

How can I best deliver this historical information to my client.

The site in question is running CiviCRM 4.4.14 with Drupal 7.36.

Since the status is based upon the start and end date and changes with the cron job, can you just leave the status off and select the date range.  Anyone who had a start date before the date in question and an end date after that date should have been a member on that date.

So...
Select custom date range for start.
For From leave blank (the beginning of time).
For To: put the date in question.

Select custom date range for end.
For From put the date in question plus one day.
For To: leave blank.


Permission to edit activities but not contacts? The organisation I'm setting up Civi for does not assign activities to individual people but works in teams.

For example a client might be referred to the housing team to see if they qualify for housing. This activity would be created by a caseworker and edited / completed by a (any) member of the housing team.

This is just one example, there are also other cross-team activities.

The only way I have been able to make this work is by giving all caseworkers edit access to all other caseworkers.

This has not gone down at all well with the caseworkers who do not want their contact details viewable - and editable! - by so many people.

Any advice on how I could make it possible for A to edit an unassigned activity created by B, without giving A the ability to see or edit B's contact information?

The National Urban League funded work to add ACLs to cases, which laid the groundwork for adding ACLs to activities.  See here: https://civicrm.stackexchange.com/a/8005/12.  So one option would be to develop (or fund the development) of applying ACLs to activities.  I'm guessing the core team would be willing to take that on as a Paid Issue Queue item, since they did the groundwork.  This would be the most flexible arrangement.

Additionally, CiviDesk has implemented a hook that allows extension authors to escalate permissions via an extension with a new hook, hook_civicrm_permission_check.  This code has been written but at this time has not yet merged into upstream CiviCRM.  See CRM-19256 to see if that's still true now.  If you're able to QA this patch, please update the Jira ticket to say so.

The second approach is much less work to get into everyone's hands, but the first approach would allow non-coders to define their own activity permissions.


Errors in functions.php after installing 5.16.2 on Drupal 7 I'm running Drupal 7.67 on PHP 7.1 and am now getting the below error when I invoke Drush commands.

Another gripe is that upon install, Civi blew out my blocks settings, so I needed to reconstruct the site from a window I (thankfully) already had open.

I've not run into either of these issues before. Any suggestions greatly appreciated... thanks!

Warning: Unsupported declare 'strict_types' in /[site]/sites/all/modules/civicrm/vendor/league/csv/src/functions.php on line 12

Parse error: syntax error, unexpected ':', expecting '{' in /[site]/sites/all/modules/civicrm/vendor/league/csv/src/functions.php on line 33
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: syntax error, unexpected ':', expecting '{' in
/[site]/sites/all/modules/civicrm/vendor/league/csv/src/functions.php,
line 33

You will need to upgrade php version to 7.x. also check your apache/nginx and cli are using 7.x version of php

See https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-version


Why does this use of the API for Events work in the Explorer, but not in the Message Template? I'm trying to use the CiviCRM API to show a list of upcoming events (in the confirmation email a user receives when they sign up for an event).

When I try the operation in the API Explorer it appears to return exactly what I want, but when I apply the code (in this case, the Smarty code) in the Message Template, the filtering to only show events after the date specified doesn't seem to take any effect. It just shows all the events.

{php}
  $this->assign("param_start_date", array('>' => "2013-10-22 18:00:00"));
  $this->assign("param_options", array('sort' => "start_date"));
{/php}
{crmAPI var='result' entity='Event' action='get' return="title,start_date" start_date=$param_start_date options=$param_options}
{foreach from=$result.values item=event}
  {$event.event_title}
{/foreach}

I got the above code using the API Explorer by:

Selecting 'Event' as the entity.
'Get' as the method. 'Event Title'
and 'Event Start Date' as the Fields to return.
'Event Start Date' as
the parameter, with '>' as the operator and '2013-10-22 18:00:00' as
the value.
Selecting 'Sort' as an option, with value 'start_date'.

That's really strange! Just a guess but maybe it's a problem with the way $this->assign works in message templates? I've only tested that construct in smarty pages and message templates might have a different way of processing variables like that.


How to Setup for Recurring Giving Hi I am thinking about using CiviCRM and we are implementing a recurring giving program. How would I set up CiviCRM to track recurring monthly, bi-monthly, quarterly or annual donor contributions and send them reminders that their credit card is going to be charged?

The answer depends on your payment processor, but here's the general plan:

Contact your payment processor and inform them that you want ARB (Automated Recurring Billing) added to your account. Most payment processors will add an additional monthly charge (around $10-20/month). Some (like iATS Payments) do not.
Most payment processors (e.g. Authorize.Net, PayPal) will send a notification to a predetermined URL when they process a payment.  Instructions are here for PayPal and Authorize.
Other payment processors (e.g. iATS Payments) store a token in CiviCRM.  CiviCRM submits the token on a regular basis to process a payment.
On any contribution page, go to the Configure menu > Contribution Amounts and check the box labeled "Recurring Contributions".

You can configure your options from there.  Bi-monthly and quarterly transactions are possible by specifying recurring intervals.  I've been commissioned to write an extension to add "quarterly" as an option without using intervals, but it's not written yet!


How to get the sharing icons to display in mosaico? I've got the problem described in https://civicrm.org/blog/totten/mosaico-extension-v20-beta3-etal

The image location is

/files/civicrm/extensions/uk.co.vedaconsulting.mosaico/packages/mosaico/templates/versafix-1/img/social_def/facebook_ok.png

The HTML has it relative to templates

<img src="https://dmo.ecolsoc.org.au/templates/versafix-1/img/social_def/google+_ok.png" alt="Google+" border="0" class="socialIcon" style="border: 0px; display: inline-block; vertical-align: top; padding-bottom: 0px; border-radius: 100%;">

am I missing a .htaccess or extension variable?

It sounds like the same issue as here perhaps: https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/160

If you read the detail, the problem has been fixed for new templates, but old templates created before the fix will still fail most likely


Locked out of CiviCRM admin Wordpress 5.3.2    CiviCRM 5.21.0

I've recently upgraded to CiviCRM 5.21.0 successfully and everything was working fine.

Whilst tidying up the site, I inadvertently and stupidly changed the CiviCRM Resource URL to the site URL (not the full path) instead of [civicrm.root]/
I now cannot get into CiviCRM admin through Wordpress admin so am unable to change the resource URL back to how it was.

Does anyone know a way of resettting things through FTP or phpMyAdmin please?

The settings in civicrm-settings.php seem OK.  I've tried reinstalling CiviCRM but still cannot get into Admin.

Many thanks.

The easiest way would probably be to override this value in civicrm.settings.php.
There should be a commented out line something like:

// $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = '....';

You can uncomment this line by removing the leading '//' and edit the url.
Make a backup of civicrm.settings.php first.

If you wanted to make a change in the database you can do this by editing the value of civicrm_setting for the row with name "userFrameworkResourceURL".

I'd recommend backing up the database or at least that table first.

If you have logging enabled via (Admin -> System Settings ->  Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.) )

You could find the previous value for this in the log_civicrm_setting table.


When I imported new contacts, some contacts got error "record", what is that? When I imported contacts using a CSV some rows were not imported even though their formatting was fine and matched all the other rows. When I downloaded the errors, the error was called "record". Anyone know what that means?
I've now tried repeatedly re-entering the same six rows that were considered "record" errors and even though the data seems fine CiviCRM still won't import the contacts. Let me know what I'm doing wrong!

Thanks,

Evann

It's quite late now for the original poster but for those who are trying to solve this problem - it is likely that you simply need to enlarge the Excel row to show the full error. For example, it may actually be 'Record duplicates multiple contacts' which would explain why uploading is not working as expected.


Why can't I edit iATS Settings? I am running Civi 4.7.22 and iatspayments ext 1.6.1. When I try to edit the settings (Admin>Civicontribute>iATS Payment Settings) my edits won't stick. For instance, I try to edit the email address for notification on failed recurring transactions and submit, but when refreshed the page reverts to previous email settings. Same thing with editing the "Never" to "Always" for receipts.

Anyone with same problem, suggested solutions or troubleshooting thoughts?

Look at your User Role and Access Permissions. Do you have access to CiviCRM: administer payment processors
Add, Update, or Disable Payment Processors ???


Search 'Hangs' While Trying to Assign Transactions to a Batch I created a Smart Group of members whose memberships are expiring in a particular month.  I then created a new accounting batch.  When I open the batch by clicking 'Transactions,' I get a list of all 2,000 plus members.  Then I tried to revise my search by selecting the Smart Group in the search screen.  When I click search, I get a small box in the middle of the screen that says 'Processing...'  However, nothing happens. It appears that CiviCRM is hanging. I can find no reference to anything similar happening in any of the CiviCRM sites.

This can happen for many reason

check for any error message in Civicrm Log file
check for any error message in PHP error log file

If you haven't got any error message then

your MySQL DB is old version and you need to upgrade to latest
 Because some SQL which has been written in MySQL 5.6 is not been supported in Mysql 5.1 - which will not return any value and will timeout
also check for your Php Version too


How to install Wordpress/CiviCRM on arvixe hosting server I am running WP 4.4.2 trying to install CiviCRM 4.7.1. I get to the point where I enter the URL to run the install script then get a message that I do not have sufficient permsissions to access this page. The CiviCRM instructions say that this could be due to the fact that I deactivated CiviCRM before running the script, but I did not do that. It is activated.

If you've just upgraded CiviCRM for Wordpress and you see this error, check that you've restored the civicrm.settings.php file from your previous codebase as per steps 2 & 3 of Upgrading CiviCRM for WordPress

In step 2 of the upgrade, you make a copy of wp-content/plugins/civicrm/civicrm.settings.php
In step 3 of the upgrade, you restore this copy to wp-content/plugins/civicrm/civicrm.settings.php

Omitting this, or having a civicrm.settings.php which is unreadable to the webserver, may lead to the "you do not have permissions to access this page" error.


Class naming and namespaces: best practice as an extension author? Noting these related questions
(1
2
3)
and these two wiki pages
(1
2)
and the psr-0 standard, I remain a bit lost about current best practice in CiviCRM extensions!

So if I have an extenstion org.goodfolk.magichtml

Would I put my classes in

org.goodfolk.magichtml/Civi/MagicHtml/

So in org.goodfolk.magichtml/Civi/MagicHtml/HtmlFlash.php I would have the following:

    <?php
    namespace org.goodfolk.magichtml/MagicHtml;
    class HtmlFlash {
      public function squirmLeft() {};
      public function squirmRight() {};
    }

Is that correct?

or can it be simplified to:

org.goodfolk.magichtml/Civi/HtmlFlash.php:

    <?php
    namespace org.goodfolk.magichtml;
    class HtmlFlash {
      public function squirmLeft() {};
      public function squirmRight() {};
    }

The conventional approach

Generally, the safe play is to make a file like <myextension>/CRM/MyExtension/MyClass.php:

<?php
class CRM_MyExtension_MyClass { ...}

(Be sure to match the capitalization of files and classes.)

Most documentation and tooling is based on CRM_* conventions, and a handful of things in core (such as civicrm_payment_processor_type.class_name) make quirky assumptions which only work with CRM_* classes.

How it works: In civix-based extensions, the default hook_civicrm_config adds your extension to the include_path. The classloader CRM_Core_ClassLoader searches the include_path automatically for CRM_* classes.

Critique: In older PHP projects, it was common to automatically link the class-loading with the include_path, but in large codebases this can lead to a large number of file-system checks. Now-a-days many frameworks will reduce lookups by pre-generating some kind of map (namespaces<=>directories or classes<=>files).

The PSR-4 approach (Civi v4.7+)

PSR-4 is a more contemporary technique in which you explicitly map a directory to a namespace. Many PHP developers have been exposed to PSR-4 through composer.json. Civi v4.7 adds CRM_Extension_ClassLoader; with this, you can use info.xml to declare similar mappings:

<extension key="..." type="module">
  ...
  <classloader>
    <psr4 prefix="My\Namespace\" path="src" />
  </classloader>
  ...
</extension>

In this case, the file <myextension>/src/Foo.php would look like:

<?php
namespace My\Namespace;
class Foo { ... }

In terms of lookup performance and caching, this should be better than CRM_Core_ClassLoader. However, it doesn't have full parity with CRM_* in terms of documentation / tooling / testing.

Custom class loader

You should be able to register your own class-loaders -- e.g. just call spl_autoload_register(...) in your module's main PHP file (perhaps in hook_civicrm_config). If you do this, I suggest following a convention like PSR-0 or PSR-4.

Compared to the PSR-4/Civi v4.7 approach above:

Pro: Should be compatible with any version of Civi
Con: Requires more lines of code
Con: Has the same issue of negligible documentation / tooling / testing

PHPUnit Base Classes

There is an issue if you want to write a custom base-class for PHPUnit tests within an extension -- which is the topic of Does class autoloading not work in standalone phpunit testing?


Is it possible to make the UI simpler? My organization uses CiviCRM and we are contemplating moving away from it, but before we make that decision I wanted to canvass this site for some information. I'm not incredibly familiar with the inner-workings of the software, so bear with me.

Currently, we have lots of users (around 400) who have access to Civi via specific groups with specific permissions. One complaint that we get is that it's cumbersome to run reports. Most run only membership reports, but in order to do that they have to enter their search criteria every time (Associated chapter, date range, membership types, Current Members, etc.). Is there a way to format the UI so that when those users log in that they have button that says "Run Membership Report" or "Run Contributions Report" that has pre-filled parameters based on their specific permissions? Or are stuck with the dropdown menu search and cumbersome process?

Is there a Civi addon that formats search results into graphic reports or graphs/charts?

Also, is it possible to auto-run reports at a set period (say monthly) and have them emailed to a particular contact associated with a particular chapter/org?

Thanks!

Since you are using Drupal, I would also suggest considering how much you can save most users getting in to CiviCRM at all, and providing a lot of the UI via Views and Webforms. We have done this for chapter based organisation, and this has often involved using the Permissioned Relationships extension to provide the ACL.

The outcome is that the user can have a (menu) block with links to all the things they most commonly need to access and do so purely by visiting Views and Webforms


Incoporating PCPs in Wordpress I'm trying to write some plugins to incorporate PCPs (mainly lists of them) into my Wordpress sites. I did not see in the API explorer any coverage of PCPs. (I could be blind, please feel free to correct me.)

I'd like to build a search feature, so that a visitor could search by multiple variables, like pcp owner name, or contribution campaign, etc. I'm also thinking of listing top fundraisers for a campaign.

I think I could write something using mysql queries but was wondering if there is a better way to go about it.

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!


Special Characters are not Managed in CSV Export In Reports, special characters are displayed correctly.

But when I export a Report to a CSV file, special characters are not displayed

Ex.: Hélène (in the report) becomes HÃ©lÃ¨ne in the CSV file.

Is there any solution ?

(Currently in 4.7.12)

As @Chris Burgess said it depends on the software you're using the CSV with, but i'll leave a preemptive workaround for MS Excel since we do this pretty often.

This happens with Excel because CiviCRM exports the data in UTF-8 encoding and Excel tries to open it using ANSI by default. If you download your CSV, open and new workbook, and import your data into it as follows, the characters will display correctly:

Save the exported file as a csv
Open Excel
Import the data using Data-->Import External Data--> Import Data (may vary slightly depending on your version of excel, can be Data-->Get External Data-->From Text button)
Select the file type of "csv" and browse to your file
In the import wizard change the    File_Origin to "65001 UTF"
Change the Delimiter to comma Select where to import to and Finish

A bit of an annoying workaround but I hope this is helpful!


Canceling Membership Renewal Email Two questions I'm hoping someone can help me answer:

1) How do I make sure that our system does NOT send out emails to people who have a monthly recurring membership?

2) How do I make edits to rules of how membership renewal emails are sent?

Membership renewal notices are controlled by Scheduled Reminders. You can set these up here under 'Administer>Communications>Scheduled Reminders'.

The documentation is here:
https://docs.civicrm.org/user/en/latest/email/scheduled-reminders/#using-scheduled-reminders-for-memberships

With regards to your monthly recurring members you can choose to not send renewal reminders to that particular member type. There is also the following option 'Renewal Reminder (no-auto-renew memberships only)'.

You want to make sure you have the scheduled job 'Send Scheduled Reminders' enabled ('Administer>System Settings>Scheduled Jobs') and a cron job setup to run your scheduled jobs. You can find more info here:
https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/

Hope this helps.


$participant_status_id shows previous value in email template Using version 4.6.9 on Drupal 7.  I'm working on a revision to our email template for event registrants, and in our environment, it's important to distinguish between individuals who are awaiting administrative approval (status 8), those with completed registration (status 1), and those assigned to the waitlist(status 7). I thought the variable $participant_status_id would meet my needs, but emails generated after an update to participant status show the previous value for $participant_status_id, not the updated value. Is this how it's supposed to work? What smarty variable do I use to check the updated status?

This was posted a while ago, but I thought I should post the solution I finally found to the problem (which still exists in my version 4.7.29 install)

The solution to this problem was an API call.
While the value of $participant_status_id shows the value PRIOR to update, with this Smarty code added somewhere near the top of the template:

{crmAPI var='partinfo' entity='Participant' action='get' event_id=$event.id contact_id=$contactID}
{foreach from=$partinfo.values item=participant}{/foreach}</p>

I can then use the variable $participant.participant_status_id which will contain the correct status value reflecting the update made in the "Edit Event Registration" screen.


Case status "status class" - what is it used for? I can see that the status class (opened or closed) will end case role relationships, but is it used for anything else?

edit for clarification: Each case status has a "status class" - open is "opened" and resolved is "closed" by default. The only effect that changing a case status to resolved/closed that i can see, beyond that status, is that case role relationships are assigned an end date and so are inactive, so i'm wondering if this status class is used anywhere else that i've not noticed.

Reason being - i am considering removing "closed" status class from all status types, so that case role relationships are maintained whatever the status and can be ended manually if necessary instead.

If you remove it, then how would you close a case? It won't recognize the Change Case Status activity as actually closing the case.

If you want relationships to exist outside of a case then you can use regular non-case relationships. That's really the only technical difference between roles and relationships. And relationships can still have start/end dates if you need to record that.

And you can still see regular relationships on the manage case screen, under the Other Relationships accordion.


How delete billing address fields on contributing page? for example https://civicrm.org/contribute
joomla + civicrm

we want to keep only values:

Select your contribution amount below
Contribution Amount
$ 25.00
$ 50.00
$ 100.00
$ 200.00
$ 500.00

Email Address *

First Name *

Last Name *

Credit Card Information
VisaMasterCardAmexDiscover
Card Number *

Security Code *

Expiration Date *

how to leave only the desired values?

As Christia points out, online credit card processing requires an address, so you can't get rid of them.

If your goal is to simplify as much as possible that form, your best strategy would be to not include any profile fields, and then the form would just include the built-in billing fields.

If you do find a payment processor that will work without address fields somehow, then in theory a plugin could be written that would replace those billing fields with different ones. Who knows? It might not be long until you can just put in a mobile phone number instead and it'll look up your information somewhere ...


contact import process I am importing 955 contacts and assigning them a tag or a group (or both).  Time estimate showing is 20 minutes.
During the import the connection times out.
After waiting a long while, I go back to CiviCRM and look at the group or tag and see that they now have 955 contacts listed whereas before the import both were 0.

A) How can I quickly see if the import was successfully finished?
B) Is adding the contacts to a group or tag one of the last steps for the import process?
C) If the contacts are now listed in the previously empty group or tag, does that indicate that the import was successful?

Look at MySQL and find the temporary table. It will be names something like "civicrm_tmp_d_dflt_..."
Search status=NEW  and that will tell you the number of rows left to import. Once the table has no NEW rows to import it is done and the table will be removed. If it did not succeed the table will still exist. I find this the best way to monitor the progress of imports using the default importer.


Edit subscription confirmation requests CIVICRM 4.6.27 Drupal 7

Hi,

I have subscription confirmation requests on for anyone signing up to a CIVI group via a webform.

How do i edit the text in that email. It currently says
You have a pending subscription to the "" mailing list. To confirm this subscription, reply to this email or click here.

I want to remove the reply feature as it clogs up mailboxes.

Thanks,
Andy

The automated messages can be edited here:

Administer>CiviMail>Headers, Footers and Automated Messages

You can also get to this under the Mailings menu.

Hope this helps!


Can native CiviContribute capture In-Kind donations? We are new to Civi. We need a mechanism to capture In-Kind contributions from our contacts e.g furniture, toys, services, books. I cannot see how native Civicontribute allows this and the help doc doesn't give specifics or ways to configure the contribute screen for non-financial data? Help please!!

Civi is pretty flexible.

First, click Administer | CiviContribute | Financial Types. Then add a new financial type and name it "In-Kind".

You can also create custom fields that will appear on the contribution form. Click Administer | Custom Data and Screens | Custom Fields.
Click Add Set of Custom Fields, and create a custom field set to hold your custom fields, then continue to add any number of custom fields such as Description (a Note field), Qty (an Integer Text field), etc. You can add drop-downs or multi-selects to categorize donations. You can even choose to make your custom fields searchable.


WYSIWYG Custom field Post Help text Is there a way to have custom field Post Help text HTML formatted? Not even new lines are recognised and it makes the help text very difficult to read.

I'm afraid the answer is "no you can't configure that to allow HTML tags". If you need lots of Help text put most of that into the 'Body' on the Event Info and/or Event Register and/or Contribution pages - keeping the help text nice and short.


How can I manage the drop down field lists in Search Builder? I upgraded a site from 4.2 to 4.4.

They use Search Builder to run specific searches against custom data, and build quarterly reports.

Previously the field list in search builder was grouped by data set so related fields were listed next to each other. There now seems to be no underlying order to the listing and site users are finding it difficult to build their searches.

Does anyone know what governs the field listing? is there somewhere I can go to re-order the list in a way that makes sense to the end user?

These lists are generated programmatically now, and are basically alphabetical.  While I would encourage your users to give it a little more time to adapt, you could reorder the steps  with a jQuery script.  Consider adding a .extra.tpl file with your script in your custom templates folder in CRM/Contact/Form/Search/Builder.extra.tpl.


Membership not generated by membership contribution 4.6.18 We are upgrading our database from 4.4.7 to 4.6.18.

On testing, there is an issue related to pending membership payments, generated by the Civi contribution page, not generating a membership on the membership tab when the membership contribution is marked as completed.

I've tested as a new member opting to pay later on our  database, then opened the contact record as a member of staff would on receiving funds to mark this contribution as complete. On our live CiviCRM 4.4.7. database, this results in the membership appearing as new, but on CiviCRM 4.6.18. nothing appears on the membership tab.

Is this a bug or is this how 4.6.18 works?

Are you using a price set? If so, look at the price sets and make sure that each for membership has a Membership Type chosen in the first field drop-down menu. The notation there states:
"If a membership type is selected, a membership will be created or renewed when users select this option. Leave this blank if you are using this for non-membership options (e.g. magazine subscription)."

I found that some of mine were empty thus no membership records were created; only the contributions were. This is a bit arcane and not obvious if not researched.

Here are some pics:

https://imagebin.ca/36uQhc0anGfS/civicrm-PriceSets.jpg

https://imagebin.ca/36uR45kYYMny/civicrm-PriceSets-PriceFields.jpg

https://imagebin.ca/36uRKx3WsIvy/civicrm-PriceSets-PriceOption.jpg

Also, I am finding that if you enter the membership using New Contribution it will not record it in the Membership Manager. You have to enter it as New Membership and then the Membership Dues will be recorded as a contribution. This is a little clunky but the workflow is understandable.


integration with payment processer I'm bidding on a redesign of an existing Joomla site that requires tight integration with CiciCRM. The client wishes to move from PayPal to an online merchant account.

Is there a list of preferred payment processors to use with CiviCRM?

thanks,
david

Ginkgo Street Labs has collated four of the most common processors into one post:  Evaluating Payment Processor Options

For a larger comparison see: Payment Processors

For general instructions see: Contributions - Payment Processors


Drupal 8 / CiviCRM ; Directories that need to be manually created? I've created a d8/civi site on all three of bionic/eoam/focal and now have worked out the variances between them to the state that I now have an operational

Nevermind....
I was accidentally using the drush-10 and I see that drush-8 is recommended.
That fixed my woes.
composer require drush/drush:^8


Settings - Date Preferences - mailing - start offset, end offset (what do they mean?) Please can someone explain what the start offset and end offset fields mean in Settings - Date Preferences - mailing. The default values are 0 and 1 respectively. I feel it should understand this, but I don't. Am I an idiot? Thanks.

OK, I'm an idiot. The start offset means that users can't schedule mailings in the past, and the 1 means that they can schedule mailings up to one year into the future.

Maybe "offset" isn't the ideal word. "Start of valid range" and "End of valid range" would be clearer.


Network error: Unable to reach the server WordPress/CiviCRM Running CiviCRM 5.11 plugin on WordPress. This is a fresh install on DigitalOcean.

In the WordPress Settings>General, there is a place to specify a URL, which I did using the URL for the website as registered in DNS.

When I first installed this, the setting used the IP address of the server, for example http://nnn.nn.nnn.nnn

With this setting, no problems.

After I was sure my DNS was pointing to this IP address and that it had propagated, I changed the setting to use the correct URL.

I can log in to WordPress okay but, when I click on the link to CiviCRM, I get a pop-up that says "Network Error: Unable to reach the server. Please refresh the page in your browser and try again. I do that and have to log in again.

All of the WordPress links are working fine. It only is a problem when I click on CiviCRM.

I changed it back to the IP address and CiviCRM works fine

Oops...I needed to make changes to civicrm.settings.php. All fixed


Changed Resource URL setting, now can't access Civi on Wordpress I've been getting 404s on public pages due to my directory setup, so I changed the default Resource URL in Administer >> System Settings >> Resource URLs
from the default ([civicrm.files]?)
to the URL for my civi directory.

I now can't get back to reset it to the default.

I've tried overriding the Resource URL in settings.php to:

http://mysite.org/mysite/wp-content/plugins/civicrm/civicrm/

but that doesnt work.

Any advice appreciated.

If I understand your question correctly, you are asking how to return the settings back to default.

I believe that the default settings for WordPress (in Administer >> System Settings >> Resource URLs) are as follows:

CiviCRM Resource URL: [civicrm.root]/
Image Upload URL: [civicrm.files]/persist/contribute/
Custom CSS URL: (blank)
Extension Resource URL: [civicrm.files]/ext/

You would typically only need to override the Resource URL in civicrm.settings.php if you have moved your site. I suggest that you set this back to how it was previously.

You may want to post a separate question about the problems you are having with 404s if this is still an issue.


Where is the 'subscription history' exposed? CiviCRM has a table called civicrm_subscription_history. This table stores a log of each time a contact is added, removed, or deleted from a group. That's cool. It seems to be reliable (tied in to the groupContact BAOs), and is even used with the role sync Drupal module too.

But, it doesn't seem to be 'used' anywhere? The information in the subscription history is never exposed to the front end? It seems to be just an ever-growing list of history that most users will never know exists.

The follow-up questions would be (if indeed it isn't exposed anywhere), should we:

Create a feature request to be able to turn the functionality on/off?
Create a feature request to expose it via a UI in core?
Create an extension that exposes it via a UI?
Copy out the code into an extension, with a UI that exposes it (and eventually deprecate it from core)?
Leave it alone? (Our table has 9 million rows though...)

It feels like a loose-end at the moment.

Edit: I notice it is exposed by the new GDPR extension from Veda Consulting.

The subscription history is shown in the Group tab of the Contact summary in as much as you can see Groups people 'were' in.

The the civicrm_group_contact table stores that people are 'removed' from the group, but the date that it happened is pulled from civicrm_subscription_history (as part of this function: \CRM_Contact_BAO_GroupContact::getContactGroup).


Remove Individual's eMail as default when sending eMails Sending ( not mass-sending ) of eMails:
the eMail address of th actual user is put to the send-from field.
Alternativley the organizations eMail address can ( and has to be selected
manually - this is error-prone )
Question: how can I make only our orgaizations eMail address to be displayed - or at least show this as default instead of the acual user's one?

best regards, Markus

This isn't an option that CiviCRM provides out of the box.  If you have some jQuery skills or some PHP skills, it would only be a few lines of code to do what you're describing by writing an extension.  If you don't have those skills, you may want to consider hiring someone who does, either a third party or the core team.


Are extensions that work with CiviCRM 4.7 also compatible with 5.x? Most of my extensions are marked as compatible with 4.7 but do not explicitly say they will work with 5.0, 5.1, etc. Can I safely upgrade CiviCRM and continue to use the extensions?

Because 5.0 does not include breaking changes, it is considered equally compatible with 4.7 extensions. There is always minor risk of breakage when upgrading software, but 4.7 to 5.0 is not considered a major upgrade.

From https://lab.civicrm.org/dev/release/issues/1#note_2843

  In the 4.x series,  tags mean the same as today. (Exact-match to version. An extension declaring 4.6 is not displayed for
  download on 4.7.)
  In the 5.x series,  tags imply forward compatibility. (An extension declaring 5.2 is displayed on 5.2, 5.3, etc. But
  not on 5.0.)
  To bridge them, 4.7 is forward compatible with 5.0. (An extension declaring 4.7 is displayed on 4.7, 5.0, 5.1, etc.)
  As today, a consumer sees the newest extensions that are compatible with their version.


How to find contacts with no group? I want to do some spring cleanup and see who in my individual contacts aren't in any group, is there an easy way to do it?

The best solution would be to use search builder like so:

However as Laryn noted there was a bug preventing this from working. I've filed an issue for this, and worked up a fix that hopefully will make it into the next release.


Contribute Widget showing Placeholder on Wordpress There are a few posts that report this error but none of the solutions seemed to work for me.

Wordpress 4.9.4
Civi 4.7.27
http://radiowaterloo.ca/

I have a contribution widget in the Content Sidebar. On the home page, it displays "placeholder", similar to what others have reported. On any other page on the site, it displays as expected.

JSON output is also the same whether I look at the homepage or another page:

var jsondata3 = {"currencySymbol":"$","is_error":false,"is_active":true,"title":"FRIENDS OF CKMS FUNDING DRIVE 2018","logo":null,"button_title":"Contribute Now!","about":"CKMS NEEDS YOUR HELP!</big>
\r\n\r\nThe radio station is entirely run by volunteers and does not receive any ongoing funding from government or universities. The majority of our operations are funded by fees paid by the on-air hosts and donations from listeners like you!</big>
","num_donors":"2 Donors","money_raised":"Raised $ 30.00 of $ 2,500.00","campaign_start":"Campaign ends on March 24th, 2018","money_target":2500,"money_raised_percentage":"1%","money_target_display":"$ 2,500.00","money_low":0,"home_url":"Learn more.","homepage_link":null,"colors":{"title":"#000000","button":"#FFFFFF","bar":"#2786C2","main_text":"#000000","main":"#33FFF6","main_bg":"#FFFF00","bg":"#96C0E7","about_link":"#556C82"}};

You've got a Javascript error on your homepage that isn't present on other pages:

Uncaught TypeError: (intermediate value)(...) is not a function at jquery.flexslider-min.js?ver=4.9.4

If you fix this, I expect the widget will work.


Can I create a custom System Workflow Message for a particular Contribution Page? I need to create a custom system workflow message for

Contributions - Receipt (on-line)

that will be used instead of the default template when a particular contribution page is used.

I already know about the Receipt tab of the contribution page wizard. There I can prepend text to the receipt that is unique to that contribution page.

But I need to fuss with the template itself. I  know about the System Workflow Messages at: civicrm/admin/messageTemplates. The problem there is that the change applies to all contribution receipts. I'm looking to change the template only for a particular contribution page.

I'm using CiviCRM 4.5.8 on Drupal 7.36.

Thanks.

As I learned from @Nicholai in a previous (unrelated) thread, you can override these templates with some pretty easy logic to add something custom to a single page. For example:

{if $contributionPageID == 20}
{* whatever you need to do on this page *}

{/if}

I assume this would work in this case, too. If you try it and it works, let us know!


Why is my email stuck in "Scheduled" even thought I sent immediately? Everything seems to be configured correctly from a mail server perspective. Why is my email stuck in "Scheduled" even thought I sent immediately? See screenshot... it's just an email to a group on 16.

You either need to run the job manually or have a cron that runs periodically that will execute the job that actually sends the email.

In my Drupal install, you find the place to manually execute it at http://www.yourdomain.com/civicrm/admin/job?reset=1

Or:

Civi Menu >> Administer >>  System Settings >> Scheduled Jobs

Some links with more info:

https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/

https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/


Deleting Contributions I imported 50 new contributions but it did not import correctly.

How do I delete a contribution?

Previous suggestions have been to follow this process:

Contributions > Find Contributions > *Enter criteria and Select "Search" > *Check Desired Contribution(s) > Select "delete"

But a "Delete" button does not exist. Is there another  way?

Thank you

There should be a 'Delete contribution' option in the list of actions:

If you don't see it there, check that you have the 'Delete contributions' permission.


Does Webform CiviCRM event registration respect the "Registration End Date" setting? CiviCRM events can have a "Registration End Date" (and start date, for that matter):

Is the following setting on CiviCRM Webform (under CiviCRM > Event Registration > Registration Options) meant to take this Registration Start/End Date into account, or is it only checking the Event End Date?

No, it does not. Those checkboxes apply to the event end date, not the registration end date.


use of "Dear you" extension when there is no first/last name only email and custom name field What if I don't have First name/last name but only a custom field called "full name" How to display that field or if thats missing display: "Supporter" instead?

You can use Smarty in greetings handling.  So first - make sure you're using the "Email Greeting" or "Postal Greeting" token instead of the "First Name" etc. tokens.

Then you can do something like this:

{capture assign=ln}{contact.last_name}{/capture}{if $lm ==""}{contact.custom_1}{else}{contact.last_name}{/if}

See this blog post on greetings handling for more detail.

EDIT: This approach won't work if you need accented characters because of how Smarty works.  See https://www.dxsdata.com/2014/05/php-smarty-empties-strings-with-special-characters/ for details.


Adding a dynamic “cover processing fees” checkbox to CiviCRM contribution form I've seen other systems that allow the donor to check a box to cover processing costs, similar to this:

In researching whether something like this was possible with CiviCRM, this thread is the closest I've found. The solution there is to simply put a flat rate additional amount.

I'd love some guidance on how this could be implemented more dynamically (so the amount of the fee changes based on the size of the donation) as either a default contribution page, or a Webform-CiviCRM implementation. Anyone have an idea?

It's pretty late to be answering this, but the Percentage Price Field extension supports something very much like this.

  This extension allows you to add an "Additional Percentage" field to
  any price set, which will automatically calculate and add an
  additional amount to a transaction, as a configurable percentage of
  other selected price set options.

  Want to ask donors to give an extra 3% to cover credit card processing
  fees? Or to give an additional 10% of their membership fee to support
  a special project?   Then you're in the right place.

  Because it's a price set field, this option will appear as a line item
  in contribution records and receipts, allow configuration of financial
  type, label, help text, and other standard price field options, and
  work equally well for contributions, memberships, events -- anywhere
  you can use a price set.

https://civicrm.org/extensions/percentage-price-field

[Disclosure: I'm the author of this extension.]


Manual contribution, add contact that is not found While adding a contribution manually, the first step is to find a contact. If the contact is not found, I remember being able to select 'new contact' from the bottom of the autocomplete list. As at 4.7.25 is it possible to add a contact from the contribution page or do we need to move to 'new individual' if the contact is not found while taking payments?

It does show up the link to create contact when no match is found.

From your shared image it looks like the user has limited permission to create contact/access CiviCRM profile or also check if 'New Individual' Profile is enabled under Reserved profiles.


Navigation (or other action) after afform submission I am trying to set up a reduced entry form for new contacts to hide the complexity of the generic form and just collect the essentials. Thanks to afform_gui it is not difficult to set up the form as such and it can indeed be used to add contacts.
But: When the submit button is clicked, all I get is that tiny green notification saying “Saving…” and then “Saved” in the upper right corner of the CiviCRM window. And then nothing happens.
I would expect to be able to navigate to the contact summary view or at least clear the form so that it becomes ready for the next contact or do something else upon submission of the form but I cannot find out how. It feels like I must be missing something very basic but I just cannot figure out what it is.
Any hints anyone?

This was just implemented a few days ago. See https://github.com/civicrm/civicrm-core/pull/20018


Hide Line items if user is logged in I am working on an event registration. We need to hide certain price set line items based on various factors. Most are based on previous field response but there is one line item that needs to be hidden if user is logged in. I found this post: https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery

But can't seem to get it to work in my custom template. I probably have some syntax wrong.

Any thoughts or a alternate solution would be appreciated.

Thanks

So I've done something similar (I used the group a user was a part of vs just a user) with a template 'extra' file that contained javescript and a quick call to the API. Not sure if this is the ideal method but it worked to show/hide some content.

https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates

Javascript Contact API - how do I 'do something' with results


Is there a more elegant way to handling contribution pages that have ended? When a contribution page passes its end date, you get the following error:

Is there a way to let the contribution page load, but display something like what is displayed on events?

Ideally it would say something like.

This page is no longer accepting contributions.
This contribution page has ended.
Contributions are no longer being accepted on this page.

In the meantime, we are simply redirecting the pages.

This module might be what you need

The extension allows a default contribution page to be configured (by domain), and blocks disabling or deleting of this page. Browsers accessing a disabled contribution page are redirected to the default page.

or, now i reread your post :-), could be a good place to add a new feature since i think you are saying 'my pages are not disabled, they are just past their use-by-date'


Profile No Longer Creates WP User Vistors to our website can fill out a form to create an account. It is a CiviCRM profile, and "WordPress user account registration option" is set to "Account creation required". The username and password fields are shown above the profile but a Wordpress account is not created when the form is saved. A Contact is created, but it is linked to the Wordpress admin account (ID #1).

I attempted to replicate this on the Wordpress Demo site. I created a profile that required Wordpress registration, but it (quite reasonably) would not allow me, as the demo user, to create a page for embedding it. When I view the profile in "Create Mode", it does not show the username and password fields (even when not logged in), and no new contact or account is created.

Occasionally WordPress plugins can interfere with user account creation. Have you installed any spam prevention plugins recently? If so, try turning it off and seeing if the user creation option shows up on your profile.

The reason this isn't working with WordPress demo site, is that User Creation is turned off on all demo sites. You may want to check that this is enabled on your own site as well.


Multiple custom field sets in one contact tab (not the main one)? Drupal 7.59, CiviCRM 5.5.1, Shoreditch alpha24.

Within a contact you can display a custom field set as an additional tab (or on main tab). On the main tab you can have groups of fields, including custom ones. Is it possible to organise several custom field sets into an extra tab? Then each set of fields could be collapsible/expandable, neatly organised etc, rather than having a mess of fields in a tab.

Ideally not heavy on coding, not looking to heavily modify CRM at all just hoping there was a simple way I hadn't found. I could achieve with view/profile, but that would need extra work while I currently envisage users using CRM natively.

Unfortunately there is no way to show all the custom fields in a single tab. However you can show all the custom fields on the Summary tab for that you will need to update each custom group to use 'Inline' for 'Display Style'. There is an extension released for 5.5 which developed by Coleman called 'CONTACT LAYOUT EDITOR' which allows you to rearrange the contact summary screen, Move the most important information to the top, Remove unnecessary stuff from the screen.

HTH

Pradeep


Conditional relationships? Our food co-op site uses relationships, e.g. Household Member. We have a custom relationship type: Proxy Shopper. We're interested in making Proxy Shopper conditional so that no individual can get Proxy Shopper status unless both individuals are Members of the same Household.

  Example:

  Jerry and Willow are Members of the Ortega Household. Willow
  owns a co-op membership with which she can shop at our store, and
  Jerry does not own such a membership. However, Willow has designated
  Jerry as a Proxy Shopper so he'll be able to shop on her behalf.

  Willow's mother Sabrina, however, is a member of the Sturm household
  (not Ortega), so Sabrina should not be a proxy shopper for Willow,
  even though Willow wants to send her mother to the co-op.

In short, we're looking for a way (possibly through an extension) to condition the Proxy Shopper relationship type upon membership in the same Household.

Worth noting that while belonging to the same Household should be required for setting a Proxy Shopper relationship, Household membership should not predict a Proxy Shopper relationship. In other words, no Household Member should become a Proxy Shopper unless someone sets that relationship via the admin interface.

What's the best way to do this -- beyond just telling backend users that they shouldn't make anyone a Proxy Shopper unless that individual belongs to the same Household as the second individual?

Another approach worth considering is the use of custom fields on the Relationship. You can add a Custom Field for Proxy Shopper, on to the Household Member relationship, and if Willow lets you know that Jerry is 'safe' to be a Proxy Shopper then you have that information without need for potential code and complexity


MySQL support not included in PHP - Wordpress Heroku Got this error on heroku wordpress with ClearDB Mysql Connected. Everything works expect this:

Any ideas? Thanks.

The CiviCRM installer checks for the presence of mysql_connect. Your Heroku environment has mysql_* extension disabled. The installer won't run if the environment doesn't pass CiviCRM's checks (as you've discovered).

This mysql_ library was deprecated in PHP5.5 and removed in PHP7. It looks like Heroku do offer mysql_ as an option you can enable through composer.json (see their docs on Heroku PHP extension support).

Even so, it's likely easier to use a hosting environment known to support CiviCRM; if you're a CiviCRM pioneer on Heroku, you may have to deal with other features of that environment which CiviCRM hasn't been road-tested with. (Not a criticism of Heroku - but CiviCRM has some expectations of its host environment above and beyond the "average" PHP app.)

It's also possible that you could convert CiviCRM to use mysqli_* with a global replace of the mysql_* functions through the CiviCRM codebase ... if that works, the relevant ticket is CRM-16067: Replace deprecated mysql api with PDO or mysqli!

See also:

Undefined function mysql_connect on Heroku
Error during Drupal installation: MySQL support not included in PHP
php.net: mysql deprecation


Add 'Non-deductible amount' to Contribution Receipt template I am trying to add the non-deductible amount to my Automatic Contribution receipt but it is not printing the value. Any tips? I am using Civicrm 4.6.19 with Drupal 7

  <tr>
    <td {$labelStyle}>
      {ts}Non-deductible Amount{/ts}
    </td>
    <td {$valueStyle}>
      {$nonDeductAmount|crmMoney:$currency}
    </td>
  </tr>

There seems to be a bug that does not fill the civicrm_contribution table non-deductible_amount column. Until that is fixed this will continue not printing a value. For now you can use the API csv Import to update that column for existing donations.

There is another thread started about this. Non-deductible contribution amounts are always $0


No anonymous user role in CiviCRM » Administer CiviCRM » Access Control WordPress Access Control All volunteer organization running new install of Civi 5.10.4. under Wordpress 5.1.1 multisite network. Under civi, the events rss, page, or specific events page can only be viewed when a user is logged in. For example the following links:

https://data.chihuahuan.org/?page=CiviCRM&q=civicrm%2Fevent%2Fical&reset=1&list=1&html=1
https://data.chihuahuan.org/?page=CiviCRM&q=civicrm%2Fevent%2Fical&reset=1&list=1&rss=1
https://data.chihuahuan.org/?page=CiviCRM&q=civicrm%2Fevent%2Finfo&reset=1&id=5

I believe there are similar issues with other public pages and suspect that access control is the root issue at play. Anonymous users get the error "You do not have permission to view the page." Logged in users can view these pages fine. Reading documentation and asking questions, I was instructed to go to CiviCRM » Administer CiviCRM » Access Control WordPress Access Control and enable settings for anonymous users.

Looking in the Permissions and Access Control WordPress section of the manual, I think I should be seeing something like this

In our instance of CiviCRM, the WP Access Control page does not have an anonymous user role column shown above. **I don't know how to enable one or how to make public pages accessible without enabling anonymous access control.

Reading about a WordPress Access Control post at the CiviCRM blog, I see that it says

  One other drawback in Wordpress is that Wordpress does not deal with Anonymous users, which makes it hard for administrators to manage access to public event/contribution pages in Wordpress/CiviCRM installation. To overcome this, CiviCRM injects a new role (Anonymous User) in the wordpress instance, so that this role can be used to assign capabilities for anonymous users accessing public event/contribution pages.

From something else I read, it seems that a lack of anonymous user role in this case may be related to the fact that the site is part of a WP multisite network--that the new CiviCRM Anonymous User role was not properly injected on install because the site is part of a WP Multisite Network I'm afraid much of this is beyond by understanding, but I'm trying to follow along. Is anyone familiar with this issue and does anyone have suggestions for how I might enable anonymous access to various public pages produced by Civi?

I see a workaround below for a multi-site civi installation. I'd eventually like to work towards multi site functionality, but being new to the software I'm trying to address one thing at a time.

That linked fix doesn't quite seem to pertain directly to a single site install of civi within a multisite network. I'm also reticent to paste in code that I don't understand.

Thanks in advance for any help or guidance someone might have.

It seems that there were two moving parts here. The first was properly setting up the base page the second, and more complex part, was properly creating and naming the Anonymous User role. With the former properly in place, the latter seems to be the fix.

From what I can gather, it seems that on install Civi 5.10.4 did not create an anonymous user role. It was not listed in the Wordpress Access Control. The role needed to be created manually and it needed to be properly named. I used the User Role Editor plugin which gave good control. I now realize that I was not properly naming the new at first, calling it simply "anonymous" which did not work as hoped. Looking at the civi code provided clues to correctly naming "Anonymous User" as "anonymous_user". Creating that role and assigning the permissions seems to have resolved the issue.

See here
https://lab.civicrm.org/dev/wordpress/blob/master/includes/civicrm.users.php#L253

The correct permissions are here:
https://lab.civicrm.org/dev/wordpress/blob/master/includes/civicrm.users.php#L272

Thanks to the two people who provided clues. Sorry if I didn't properly follow custom here, I'm very new and getting the hang of things. I'll try to watch and learn.


Custom code that sets custom field value stopped working in 4.6 I have some code in a  custom module (in the civicrm_pre hook) that sets a custom field value, using the function CRM_Core_BAO_CustomValueTable::setValues

Here's a print_r of the parameters it is passed in an example case:

(
    [entityID] => 1202
    [custom_133] => foo
)

The field is not being set. Before upgrading to 4.6, it was working. There is definitely still a custom field with id 133 on the entity. Here's the documentation - is it outdated now, or should it still work?

http://wiki.civicrm.org/confluence/display/CRMDOC/Setting+and+getting+custom+field+values+from+within+hooks

Edit: The output of CRM_Core_BAO_CustomValueTable::setValues is:

(
    [is_error] => 0
    [result] => 1
)

So it thinks it has worked, but it hasn't. The new value is not written to the database table.

I don't believe that the document you referenced is current best practice - it should probably be rewritten!  Using the BAO rather than the API to set values greatly increases the chance that an upgrade will break someone's custom extension.

You can troubleshoot the BAO code.  There's certainly something that could be done to make it work (assuming the issue is the code, and not that the hook is no longer firing).  However, I'd suggest rewriting the BAO call as an API call instead.  Something like this (assuming the custom field is attached to a Contact entity, otherwise change appropriately):

$params = array(
  'version' => 3,
  'custom_133' => 'foo',
  'id' => 1202,
);
$result = civicrm_api('Contact', 'create', $params);


Contacts not merged When creating Account on Event Page - DB Error: already exists Running: CiviCRM 4.7.17, WordPress 4.9.4

When an anonymous visitor tries to register for an event, we have them required to sign in or create an account via Civi's profile settings to keep our existing contact information to be relevant.

The profile used in the event requires a WP account
Duplicate Civi contact matching is set to merge with an existing contact in the profile's settings
I've only tried with pay later option (is there a way to use the test digital payment without being signed in? I the test option limits the test to certain users which have to be signed in to try it).
Existing users who sign-in don't receive the error

The anonymous user enters creates a new WP account, as required. When the user enters the name and email which matches an existing contact in Civi, they are thrown the following, DB Error: already exists instead of the intended confirmation and contact merge.

CiviCRM/WP seems to:

create a new contact based on their name and email instead of merging new details with the existing contact.
Payment (Pay later) and event registration is recorded under the existing contact.
Send out 2 new WP user emails. One has the username and email, the second is blank.

I've tried poking around but no results. Suggestions?

[info] $Fatal Error Details = Array (
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  44 , 'test@email.com' ,  1353 )  [nativecode=1062 ** Duplicate entry 'test@email.com-1' for key 'UI_uf_name_domain_id']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  44 , 'test@email.com' ,  1353 )  [nativecode=1062 ** Duplicate entry 'test@email.com-1' for key 'UI_uf_name_domain_id']
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  44 , 'test@email.com' ,  1353 )  [nativecode=1062 ** Duplicate entry 'test@email.com-1' for key 'UI_uf_name_domain_id']"] )

Update: Trying to merge the duplicate contacts made (one with name and email - another with the full profile details) returns a different DB error:

    [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => UPDATE IGNORE civicrm_action_log SET contact_id = 1353 WHERE contact_id = 1415 [nativecode=1146 ** Table 'our_database.civicrm_action_log' doesn't exist]
    [type] => DB_Error
    [user_info] => UPDATE IGNORE civicrm_action_log SET contact_id = 1353 WHERE contact_id = 1415 [nativecode=1146 ** Table 'our_databse.civicrm_action_log' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE IGNORE civicrm_action_log SET contact_id = 1353 WHERE contact_id = 1415 [nativecode=1146 ** Table 'our_databse.civicrm_action_log' doesn't exist]"]
)

Maybe, you should check the profile settings, make sure you check the below input which updates the existing contact if profile finds a duplicate match -


How do I add Javascript to pages using Core functions? I'm calling this from a hook but it's not working.  Am I doing something wrong?

CRM_Core_Resources::singleton()->addScript("alert('hello');");

I confirmed that it's running by adding debug code to addScript.

The syntax you gave is correct. I suggest you:

Ensure your code is actually running (add a debug statement or exit(); in your code).
Clear your caches. If your page is being cached by the cms then that might be why you're not seeing it.


Event registration page refreshes when clicking continue I'm running into a problem with event registration pages. Since upgrading to CiviCRM 5.14 & 5.15 whenever a user clicks continue on an event registration page it appears to refresh, not advancing to the confirmation page. We are placing a shortcode on these pages to display the registration form. It doesn't seem to matter if I set hijack to 1 or 0.

Initial registration slug:

/events-training/rice-lake-classroom-field-event/register-rice-lake-2019/

After clicking continue, but a blank registration form appears:

/events-training/rice-lake-classroom-field-event/register-rice-lake-2019/?page=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_Confirm_display=true&qfKey=XXXXXXXXXXXXXXX

We are running Wordpress 5.2.2 and CiviCRM 5.15 currently. I have not adopted the clean URLs introduced in v5.13, but I suspect something in this update is causing the issue. If I temporarily revert back to CiviCRM 5.12.4 (with the same 5.15 database) the event pages advance as expected.

At the same time the live links CiviCRM provides to check out an event registration page aren't loading in v5.15, but they are in v5.12.4. In v5.15 all I see is the default "Do not delete this page. Page content is generated by CiviCRM".

/civicrm/?page=CiviCRM&q=civicrm%2Fevent%2Fregister&reset=1&id=24

Doing the standard cache clearing and updating resource URLs doesn't seem to help. Any ideas on what I could try? If I permanently revert back to 5.12.4 and keep the database at 5.15 would there be any issues?

UPDATE: I tried completing a test registration with v5.12.4 and ran into a database error once I confirmed the registration. We decided to revert the entire site to a backup before the upgrade to 5.14. We'll want to upgrade later on so I'm still interested in ideas for getting this resolved.

I am using 5.15 and event registrations are working.
I did turn on clean url but I doubt it has anything to do.


Drupal Webform for Activities - CiviCRM Permissions I have created a Webform that will be used to create CiviCRM activities for a particular (existing) client. The form is structured in such a way that the client must exist in CiviCRM first, and the person creating the Activity must select the existing client:

When I'm logged in as an administrator, and submit the form, the data correctly populates the CiviCRM database. However, when I'm logged in as a different role ("Volunteer") with much more limited permissions, the data does not get entered into the database (the webform gets submitted, and I can see the webform results when logged in as an administrator, but the data doesn't get entered into the related CiviCRM fields).

Ideally, the Volunteer role should not be able to create new clients, and should not be able to edit any client data. The Volunteer should ONLY be able to create new activities (Client Needs).

So in the Drupal permissions, I have things like the following turned OFF for the "Volunteer" role:

CiviCRM: add contacts
CiviCRM: edit all contacts
CiviCRM: delete contacts
CiviCRM: Delete activities
CiviCRM: access CiviCRM backend and API

... and I have things like the following permissions turned ON for the Volunteer Role:

CiviCRM: view all contacts
CiviCRM: view all activities
CiviCRM: access Contact Dashboard
CiviCRM: add contact notes
CiviCRM: access AJAX API

Clearly, I'm missing some sort of permission that the volunteer needs in order to create a new activity for a client. Can anyone point me in the right direction?

I think the issue in your case was that Contact 1 was not set on the form


new event From Template does not copy custom fields On the demo site - http://wpmaster.demo.civicrm.org/wp-admin/ I have created a new set of custom fields for Events - "Events custom fields" with one text field - "test1".
I have added value "tst" for this custom field in the event template "Free Meeting with Online Registration".

When using this template on a new event the custom field value is not populated with what's in the template. Do I have to use hook to copy over custom data? If so what's the hook?

According to https://lab.civicrm.org/dev/core/issues/766 this looks like it has now been fixed.


What permissions are needed to edit Mosaico templates? My guess it that template creation and editing requires Administer CiviCRM - but wanted to check in and see if there was another way.

Thanks!

I guess below permission are required fro user to update the mosaico template

CiviCRM: edit message templates
CiviCRM: edit system workflow message templates


SOLVED - Cron setting for CiviCRM 4.x.x on Drupal 7.x via cPanel Cron admin panel Greetings and salutations.  I know some of you must be growing impatient with all of these cron questions from the noobs.  I am at a loss.  I have consulted all of the documentation links posted in the cron question threads and tried every example given. I have even changed hosting providers and installed a fresh copy of Drupal 7 and CiviCRM separately (the bundle caused all kinds of errors that I didn't know how to fix). I have everything working now except cron.  Still.  I have scoured every resource I can find trying to understand cron and c/p'ed every example of cron settings relevant to CiviCRM and Drupal. I still cannot get cron to fire automatically and the error on the status page will not go away.  I can click the button and run it manually, so it doesn't seem to be a permissions issue. I really don't know what else to do at this point.  My current cron setting is

22 */2 * * * wget -O - -q -t 1 http://mydomain.com/cron.php?cron_key=mykey > /dev/null

Can anyone please explain to me WHY this is wrong so that hopefully I can get this running? Please and thank you.

Solution: Single quote (') before http and after the end of site key in addition the wget etc.

This is how it should look:

*/6 * * * * wget -O - -q -t 1 'http://mydomain.com/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=site-key'

Thank you everyone for the help and to Hock for providing the info about single quotes around the http attribute.

The cron job you have there looks like a Drupal cron job.  You should look at the scheduled jobs wiki page for full details, but in the case of a Drupal site using wget (since that is the direction you're seeming to go in), try:

*/6 * * * * wget -O - -q -t 1 http://mydomain.com/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=site-key

You'll find the "site-key" in the civicrm.settings.php file, and the "username" and "password" correspond to a Drupal user with Administer CiviCRM permission.

You'll see that I have it going every six minutes rather than every 2 hours: you'll want to set CiviCRM cron to run multiple times per hour; you can set specific scheduled jobs to run less frequently from the management page in CiviCRM.


Custom Field Log out Wordpress When I click to view or edit custom fields; CiviCrm system automatically log out.

It seems to be a domain name problem.

Are you using one of the following :

subdomains - i.e. http://subdom1.website.org, http://subdom2.website.org
http / https - i.e. http://website.org, https://website.org
with and without www. - i.e. http://website.org, http://www.website.org ?

If it is the case, you need to ensure that the main CiviCRM domain (the one that is in civicrm.settings.php) is the same that you use during all the civicrm navigation.


Activity assignee email not being sent from webform Emails are not being sent out from a CiviCRM webform to the activity assignee. Not sure why but there is a notice in Drupal: -

Notice: Undefined index: act in wf_crm_webform_postprocess->processActivities() (line 1250 of /home/xxxxx/public_html/sites/all/modules/webform_civicrm/includes/wf_crm_webform_postprocess.inc).

Can anyone help?

Looks like this is due to a mistyped variable name.
I've created a bug report for this in the module's issue queue.


How does this work with an existing website? How does this work with an existing website? Or do we create a new website via a host like wordpress?

As Jon says, CiviCRM is installed on top of WordPress, Drupal/Backdrop or Joomla, so if your main website uses one of those you have the option to add Civi to it.

Alternatively, you can leave the main website as is and install CiviCRM and one of the CMS's on a separate site.  Then for example, your main website has the write up of your event and includes a link for booking that goes to the Civi site to do the event booking and payment.


What is stopping to update recurring payment or billing details! Some of our donors have reported that they were not able to update the amount or cancel their recurring subscription payment using the standard email receipt that gets sent from CiviCRM. I am using Paypal pro with CiviCRM 5.13.5. When I have tried it myself, I get the following error.

However, if a link is served with checksum for that user then I was able to use UPDATE, CANCEL links!
How can I fix this problem, please? Thanks.

UPDATE: this is the url I get when I click the link

https://example.com/index.php?q=civicrm/contribute/unsubscribe&reset=1&crid=173&cs=631e63d2b52b3596e18b1f3fe144afc3_1559485259_inf

does it seem all parameters present in the URL?

Test this patch to see if it fixes your problem? https://github.com/civicrm/civicrm-core/pull/14407


Can not access System Status & New Mailing I've install clean WordPress 4.8.1 by softaculous and CiviCRM 4.7.23. But when I access to System Status (wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fa%2F#/status) & New Mailing (wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fa%2F#/mailing), it shows only blank page.

I've tried install WordPress 4.8.1 and CiviCRM Long Term Support version 4.6.31, It works normally.

It's very strange that when I turn on Debug Mode, 2 link above can access normally like picture above. Please show me how to fix this.

Check whether image Image Directory and Image Upload URL share the same path in System Setting -> Directoty & Resource URL page.

This issue of 404 has been seen on some installs. See - Status page angular load error


CiviEvent online registration with multiple participants - move Payment Options to end When signing up for an event with multiple participants, the Payment Options appear after the profile forms for the person signing up for the event. You have to choose the payment option you want, then click Continue, in order to add the additional participants. This can be confusing since it feels like payment is about to be taken, when the final registration amount will not be known until details for all participants have been entered.

Is there a way to move the Payment Options to the end of the process, i.e. after all the participant details have been entered?

I have the same problem ;
Moreover, the price set is repeated for each participant, beyond payment, which is useless and confusing.
I fully agree with a move to the end of the process, when everything is known.


When users are contributing a duplicate record is created in wordpress A member when contributing again is not linking to the member but creating a new profile even if name is different? can we have only unique email for member contribution?

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 bulk update organization subtypes using a profile? I've been trying to use the 'Update Multiple Contacts' feature from within a Group using a profile. The profile field is 'Organization Subtype'

However, when I get the list of contacts to update, and click in the field, no results with the error 'none found' shows up, even though on my database there are a few different subtypes. Am I doing something wrong, or is this a bug?

This problem sounded vaguely familiar, and I just found out why.

This is logged on the (old) CiviCRM issue tracker as CRM-17451.  The answer was that someone would have to write this functionality or work with the core team to do so.  However, I also see that I found a workaround back in 2016.  From the page:

  In non-technical terms: Profiles secretly have a contact type they're
  associated with. You can see this if you try to add an
  organization-specific field to a profile, then an individual-specific
  field. You'll get the error "Cannot add or update profile field type
  Individual with combination of Household or Organization". That's
  because Civi has decided this is a profile associated with
  Organizations. However, when you don't have any contact type-specific
  fields on a profile, your profile defaults to a contact type of
  "Individual" for many purposes. So individual contact subtypes are
  loaded.

  The workaround: Add an organization-specific field (like "Organization
  Name") to your profile, and this problem goes away.


What are the minimum permissions for Cron User? In the interest of creating minimal permission sets for automated users, what are these for the cron user? If the cron is being run via drush, what are the minimum Civi permissions it can get away with? If a scheduled job requires permissions to execute (e.g., contact create) does the automated user need these too?

[This may seem like a pointless question: if there's a Cron User, and its credentials just live on the host machine, why would this be necessary? If they have the host machine, they have the host machine, right? Well, usernames can be guessed, passwords can be cracked over time, and best practice is best practice.]

Check out this answer.

Safe to run cron jobs using wget and user with full admin rights?

Essentially just give the permissions necessary to run the cron jobs.  If no event crons - don't give event permissions.


How do I trigger a price calculation update on the event registration page? The requirement is that if someone picks a complimentary part of the event they have to select a paid part.

I have updated with jquery the rule so that if someone checks a free option the corresponding paid for option is also checked. The price calculation update is not performed. How do I get the prices to update?

Here's how we do it:

We do the two sets of items in a separate price field on the same price set. So the paid options that are required would be in one field, the complementary in another (or several others). I set the price field for the required options to required. Then they are forced to choose one of them. We only have one item in the required section and one in the optional section, but you could have more.

This then forces them to choose the mandatory item every time. We had to do this because folks would select the optional item, the book, and not select the training registration as well.


Getting Stripe Webhooks working I'm using Stripe Payment Processor 6.3.2, MJWShared 0.6 on Civicrm 5.23.2 with Wordpress Multisite.

I've used the Wizard to instal webhooks in Stripe.

I'm now getting a warning in CiviCRM System Status "Webhook API version is set to 2020-03-02 but CiviCRM requires 2019-12-03. To correct this please delete the webhook at Stripe and then revisit this page which will recreate it correctly. Webhook path is: https://xxx.xxxx,com/?page=CiviCRM&q=civicrm/payment/ipn/2."

If I delete the webhooks on the Stripe Dashboard, the Wizard can again be used to instal webhooks, but the same warning message comes up.

Any ideas on how I proceed?  Or indeed where this process is documented?

David Brown

If the Stripe webhook wizard is creating webhooks with the wrong API version, that's a bug, and should be reported on https://lab.civicrm.org/extensions/stripe/issues.

To allay your concerns - it's very unlikely that you're going to experience any ill effects from this.  The check in question is mostly concerned with folks running older versions of the Stripe API, and the API doesn't change that drastically from version to version.


Contribution pages don't work My contribution pages (that I use to collect new members on a website) are completely crazy, just showing the page title repeatedly some 10 or more times.

But when I try to do a test-drive everything looks fine.

Based on a similar question here, I tried to create a new page from scratch, but the problem persists.
No idea where to start digging :/

You need to set a WordPress base page. Create an empty page (e.g. titled "CiviCRM" with the slug "civicrm") and enter the page slug in the basepage field in wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fuf&reset=1. Your form(s) should then render properly.


Race condition death spiral when changing a site's domain? Drupal 7, CiviCRM 4.6, I've just switched a site from being a directory of one domain to it's own new domain. After clearing all caches and resetting the backend configuration, it's able to load the dashboard, but other pages result in what I believe is a race condition - specifically, loading the page seems to trigger the server into calling itself for the same page (i.e. generating an outgoing request to the url being requested). So it ends up in quite the death spiral of resource use.

I know that 4.6 uses outgoing requests to itself to populate the dashboard, but that's not exactly the issue here. I also have noticed that 4.6 uses http requests to itself to identify it's own version, which is also a kind of crazy thing, and I wonder if that's what's creating the death spiral in this case.

Any clues or similar experiences?

Not really a CiviCRM issue, but in case anyone else has a similar experience.

As Aidan correctly guessed, it was indeed due to an http/https redirect - the one that comes from CiviCRM when you tell it to use https for admin/payment pages. Which is why it was okay on some pages, and why it was spawning new php processes for each one.

The reason this site had the problem was due to my use of a separate ssl termination ("Pound") before it went to apache. When you do this, you have to tell apache how it can know if it's been through the termination (via the use of http headers). I hadn't done that for this site, so it kept redirecting itself to the same page, not aware that it was already https.

I put in a redirect from the http to https site, and added the required apache vhost line:

SetEnvIf X-Forwarded-Proto https HTTPS=on

and the issue has now been resolved.


How to request bug fix for LTS How do I request that LTS include a particular bug fix?

The issue in question is https://issues.civicrm.org/jira/browse/CRM-13287.  It's an issue for my site upgrading to 4.4 now and presumably 4.6 once it's officially the LTS release, so I'd like to get it incorporated.

I can run a patch for the simple fix as described in the jira, it's just the deletion of a single space changing   $nullIndex = $nullValueIndex = ' '; to   $nullIndex = $nullValueIndex = '';

But once I have the patch, what do I do with it to get it applied to LTS?

The process to get a bug fix included is to submit a Pull Request ("PR") to that branch on Github.

This is documented in the civicrm wiki: How to Submit a Patch to a Version Branch

Get yourself a GitHub account.
Create an issue in JIRA (already done, CRM-13287).
Create a fork of the appropriate branch of civicrm-core to your own account.

At this point I'd usually create a branch named for the JIRA issue.

Make changes to your forked repository.

For this small change you could easily apply the patch manually in the GitHub web UI, but for most changes you would clone the codebase to your computer using Git / GitHub app, change the code locally and test it, then push the changes back to your fork.

Use the GitHub web UI to submit a Pull Request back to the original branch.
Note the PR number / URL in GitHub, go back to the JIRA issue and add a comment identifying the the PR in the issue.

To get a change into LTS, submit your change to the appropriate version branch - currently 4.4 - as well as to the master branch.

Going further ... Your aim is to make it easy for maintainers to accept the change, to make it clear why they should accept the change, and to reassure them that the change is not harmful. Submitting a PR addresses the first of these.

The PR makes it easy for maintainers to merge the changed code in. To help illustrate the motivation for accepting the change, you might need to improve the ticket in JIRA so that the severity of the problem is clear. To demonstrate that the change is not harmful, you might expand test coverage to prove that the functionality before and after the change is equivalent or even improved.


Email Group Only Pulls subset of total emails Having an interesting issue here whereby if I create a group in Civi to email, the actual recipient list is much smaller than the total number of contacts with an email in that group.

For a recent mailing, we had about 1766 contacts selected to email.  However, on the next screen, only 289 contacts are expected to receive the email.  I thought perhaps this was only an estimate, and scheduled the email.  Once it sent (successfully) it indeed only went to 289 contacts.  Just to clarify, it was 100% successful in sending, so it's not as if the system attempted to send to all of the contacts in the group but failed.

I compared some members in the group that didn't get the email to members that did, thinking it might be a communication preference or something like that.  I couldn't find anything between the contacts that received the email that differed from those who didn't.

I'm on Wordpress running Civi 4.7.21.

Reasons that come to mind for bulk emails not being sent to certain contacts:

Contacts with duplicate email address (only one contact will receive the email unless you uncheck the "Dedupe by email" option next to the Recipients box).
Contact has no email address which is marked either Primary or Bulk-Mailings and is not marked On-Hold.
Either of the following privacy settings:

Do not email
NO BULK EMAILS (User Opt Out)


How to create a free Membership sign-up? Can someone tell me the correct setup for a FREE Membership?
Cannot figure out what to check to get rid of the error "One of parameters (value: ) is not of the type Integer", which occurs after the second page.

Doesn't seem to be a way to do this with the word "contribution" everywhere and trying to set a price to $0 didn't work like some other posts listed.

Just want a clean membership page where joining is free and no hint of needing to contribute.

Here's an Example of a clean FREE Membership page with no hint of needing to contribute! On the Contribution Page Config -> Memberships Tab -> make sure you select the Membership.

Note 1: you'll want to add some anti-spam control - like add a reCAPTCHA to a profile that you expose on your Contribution Page

Note 2: In Drupal we can sync Membership Type/Status -> to Drupal role - and can then create Member only content pages. Not sure if you can do that in Wordpress - but that's often our use case for a FREE Membership.