CiviMail Bounce Type - Syntax I am interested in learning what the Syntax Bounce Type is about. I have 77 of them from a recent email that was sent.

Thanks!

Gary

Ideally this means, that there was an error in the smtp transaction: https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/

However, this bounce type is also used for all bounces that could not be classified as one of the other types. Your best bet to actually find out what is going on is to look at the bounce reason in the bounce report or, if thats still not helpfull enough, to have a look into the actual mailbox.


programatically delete an event that has participants I am trying to delete an event that has participants registered using:

civicrm_api( 'event','delete', array('version' => 3, 'id' => $v) );

Which gives an error saying that I can't delete it because it has participants.

Is there any way to force the deletion of the event? Or how do I remove all participants of the event?

You can delete participants from an event using:

civicrm_api3('Participant', 'delete', array(
  'event_id' => $v,
  'options' => array('match' => 'event_id')
));

Once that's done you can proceed to delete the event.


Using the answer in custom field (select) to auto fill other field how would I get a custom field to automatically select from a list based on the answer given in a custom field where the answer has to be selected.

Basically the user selects the Scottish local authority field from a select list (Say, Edinburgh City Council). I want a field of MSP Regions - in this case Lothian Region - to auto fill based on the local authority.

Thanks.

Depends on the context:

On a public or profile, develop a custom JS file to do this.

On editing a CiviCRM contact through the interface there's probably no good way to do this, other than adding custom JS in an extension.

If you're using Drupal Webform you can use the Validation Rules to show and hide fields. With some creative optioning you can get the results you need entirely through an interface.

My recommendation is the Drupal Webform.


"No user/contact ID was specified, so the Profile cannot be used in edit mode" Upgraded to CiviCRM 4.7.9 with WordPress. Now the Profiles only work for a logged in user. Anyone else gets the error message shown above. It's not a members only website, so you shouldn't have to login. Here's one url: http://wiuta.org/petition

I tried deactivating all plugins but CiviCRM, but the problem persisted. I tried creating a new profile, but that didn't work either. My website is broken, please help!

Change the shortcode to create mode instead of edit, Civi expects a contact id if it's in edit mode, ie a logged in user,  it would be something like [civicrm component="profile" gid="xx" mode="create" hijack="0"] where xx would be the profile id.


Direct link to a CSV-formatted report I'm using CiviCRM as a WordPress plugin. I've created a report with a URL like:

https://example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/report/instance/123

I can visit that page and click the "Export CSV" button. Now, I want to write a script with the Google Sheets API that loads this CSV and updates a Google Sheet. Therefore, I need a direct link to the CSV-formatted report, so my script can issue an HTTP GET and receive the CSV data.

Is there a URL parameter I can pass, or some other way to directly link to the CSV?

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

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


When unchecking VERP option I am getting an error "Boolean value required for track_civimail_replies" When I go to Administer > CiviMail > CiviMail Component Settings. There is an option
"Track replies using VERP in Reply-To header"
When I uncheck this box and hit Save I am getting an error message
"Boolean value required for track_civimail_replies"
Does anyone know what this means and how I can successfully turn of VERP?
I am using CiviCRM 5.36.1
Thanks

Not similar, but related issue is already logged on gitlab issue. enter link description here and has been fixed and will be available on 5.37 release.
You can either wait for 5.37 release or apply patch.
Alternatively you can add below line in civicrm.settings.php to turn off VERP setting.
global $civicrm_setting;
$civicrm_setting['Mailing Preferences']['track_civimail_replies'] = FALSE;


Need Token Help for System Message Template CiviCRM 4.7.15 for WordPress

Mailings\Message templates\System Message Templates editing an offline Membership template

This template gets emailed whenever selects Edit or Renew under Memberships for a contact. Edit also allows one to override the status to cancelled, expired, on hold, and 5 other states.

Question 1. Should one be able to click on a token and put it into a template? In my case, it shows </> Tokens.

Question 2. What is the token syntax if you were able to click on one in the token dropdown? I need the address, so I assumed {address.street_name}, but this does not work nor does {$address.street_name}.

Question 3. Why does {$membershipStatus} show the previous status instead of the current one? Is there another token for the current status?

Question 4. {$cancelled} does not follow the Membership status of cancelled. What does it represent?

Question 5. Does anyone else feel that the text-area provided for editing is a little too small? A Message Preview option would be so helpful.

A.1

in my 4.7.x test the dropdown arrow to the right of  works to show me the tokens, but does not result in them being inserted. In my 4.6 test this did work (which suggests a JIRA issue might be needed for 4.7 but can't test on dmaster as the drupal permission has not been assigned)
in my 4.6.x test the dropdown arrow to the right of  works to show me the tokens, and does result in them being inserted.

A.2 address type tokens are {contact.country} and {contact.street_address}

A.3 I don't see any membership based tokens listed. I believe we - Fuzion = did an Extension that can help with this - try this one

A.4 I don't know and am not sure what you are referencing.

A.5 In the 4.6.x it shows as full width and has a handle in bottom-left corner to drag it bigger. In my 4.7.x test it only shows as half-width but still has the handle. Guess if you are missing the handle you may need to check for js errors or something else like a WP theme issue??

Hope that helps you a bit.


Drupal Views and CiviCRM on same database not working I have CiviCRM 4.7.28, Drupal 7.56 and Views 7.x-3.18 and have CiviCRM and Drupal in the same database.

I have read in the documentation that Views should work out of the box, and most of the issues relating to CiviCRM and Views is to configure setup if CiviCRM and Drupal are on different databases.

Any tip much appreciated!

Perhaps you missed this step:
https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/

  Before making any changes, it is strongly advised that you make backups of your mysql databases and settings.php file.
  If you have different database users for your CiviCRM and Drupal databases, then you need to grant SELECT access for the Drupal user to all the CiviCRM tables.
  Make sure you are logged into your Drupal site as the administrator.
  Visit http://example.org/civicrm/admin/setting/uf?reset=1
  You should see a page with output that begins with: $databases['default']['default']['prefix']= array(
  Copy this setting output, including the trailing );
  Open /sites/default/settings.php for editing from the root directory of the site, typically public_html on most servers.

    Note: This assumes you have a single site installation. The location of the settings file might be different depending on whether or not you have multiple sites

  Find the database connector array. This is where Drupal stores the information regarding the MySQL database and the necessary credentials to connect to it. The array beings with $databases = array ( then goes on to include the location and MySQL credentials, as well as additional options.
  Paste your previously-copied settings output here. Be sure to paste it after the trailing );
  You may need to indicate the default prefix. If you see an error [like] PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kckruppc_every.semaphore' doesn't exist: SELECT ... You need to include an additional line, 'default' => '<drupaltableprefix>', in your settings.php just after $database ['default']['default']['prefix']= array(. …
  Save the file. You might want to clear your site cache at this point.
  You should now be able to create views based on CiviCRM data.


CiviMember Role Sync not Syncing One User Our Drupal 7.50 website is set up so that users can subscribe through CiviMemberships via a contribute page and then we use CiviMember Role Sync Module to assign them a new Drupal role. This has worked well and thousands have gone through this process. However, we have one user who went through the process of creating a Drupal account and then subscribing (becoming a member) and the sync refuses to sync his accounts. I had to give him the Drupal role manually. Names and email address are the same in his Drupal account and his CiviCRM contact record. The contact record shows his membership and contribution. Any ideas how to troubleshoot or manually sync this one user?

CiviCRM 4.7.15 Drupal 7.50 Commons

Thanks!

See if there's a deleted contact with the same deets?.

Also petendz's advice is stellar as ever. Use the api explorer do get uf match on that email if for whatever reason you can't access the MySQL table.


Remove & reinstall summary fields We're running Joomla 3.6.2 and CiviCRM 4.7.11, however we recently made some adjustments that prompted us to uninstall the Summary Fields extension. Essentially, it was installed in a different directory than the default settings. We reset the paths and that cause problems. So, we uninstalled and reinstalled, so extensions are now in the default directory. The problem is that when we configure summary fields and set it to update "when the form" is submitted, we receive the error "Error adding custom field 'contribution_amount_last': DB Error: already exists" (same error for other fields as well, like "last donated", etc.). Is there a way to do a complete uninstall of this, or is there a better way to handle this error?

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


How do you display custom Contact fields in Membership reports? I have created some custom fields for Contacts and want to display these fields in a membership report that we call member mailing list.  However I am unable to see the custom fields for Contacts as display columns in the report even though they are marked as searchable

If you can open the report file from your codebase, you can add the entity name to the _customGroupExtends variable array initialized at the top of the file of almost every report in CiviCRM.

protected $_customGroupExtends = array('Contact');

The above line will include all contact custom set in your report. You can add Individual, Membership to display custom group extending these entities too.

To see which file is used for the report, you can refresh the result to get a Developer tab which contains the class name used to display the result.

So the file which is used in above report is -

/path_to_civicrm/CRM/Report/Form/Member/Detail.php


CiviEvent in Multisite Acting Strange after Upgrade to 4.7 Our organizes uses Wordpress and CiviCRM, and we have multisite enabled to use one civi database across two websites (set up in WP multisite).

I upgraded to CiviCRM 4.7 this morning and it went smoothly on the main site. However, on the second site, the CiviEvent pages look strange on the website front end. It looks to me like the CSS is not loading correctly. Can anyone give me some idea as to what is happening here?

Here is an example.
Working, primary site:
http://japanphilly.org/wordpress/civicrm/?page=CiviCRM&q=civicrm/event/info&reset=1&id=225
Strange-looking, secondary site (same event):
http://subarucherryblossom.org/events/?page=CiviCRM&q=civicrm/event/info&id=225

In addition, while logged in as an admin, the drop-down admin links which usually appear near the top of the page (Info and Settings, Location, Fees, etc.) appear not as a drop down but as a list of links... which is why I am guessing the CSS is somehow not loading right.

If you look at the two urls you posted you can see that one is /civicrm and the other is /events.

That suggests that when you upgraded perhaps something got messed up in the WP equivalent of settings.php.

if i change out the url and go to

http://subarucherryblossom.org/wordpress/civicrm/?page=CiviCRM&q=civicrm/event/info&id=225

it all looks fine to me. hope that helps.


premium gift reports not showing size ordered we set up a premium gift ( a t-shirt) for a donation.   now i can't find a report that tells me what size of t shirt they wanted.  I have downloaded contribution reports but it's not there.  need to know the size so i can mail them out

There are a couple of extensions that give more detailed reporting on line items

Line Item Report
Extended Report

One of these may be helpful


Mailing settings not displaying For some reason none of the mailing settings seem to be accessible for me anymore. When I go to e.g. Administer > CiviMail > Mailer settings all I get is a blank screen, and it's the same for other mailing settings as well. We haven't been able to find why the settings aren't visible anymore so any advice would be much appreciated.
We're running on CiviCRM 4.7.15 and Drupal.

Thanks,
Saeunn

Sometimes when unexplainable things like this happen, it helps to just clear all the caches. Administer > System Settings > Cleanup Caches

If you use drush, drush cc civicrm. If that doesn't work, you could delete everything inside of the templates_c folder.

rm -r /[path/to/drupal_root]/sites/default/files/templates_c/*


I want to do something like "if campaign=xxx" {include footer} in System Workflow Messages My colleague wants to include an email footer/signature for the email confirmation sent for event registrations, but only for the events managed by their office.

I know it's something similar to the answer on this question : Can I create a custom System Workflow Message for a particular Contribution Page?

But I'm just looking for the text required for campaigns. I've got as far as working out that the campaign ID=1

So you need to find out if the campaign id is assigned to a variable available in the message template.

I can't test right now, but if you enable debugging and add a {debug} if you template you should get a long and fugly table with all the variables available from the message.

then it's the same process as for the contribution page:

{if $campaignID == 1}
{* whatever you need to do on this message *}
{/if}

campaignID to be replaced by the variable available to the template as identified in the debug message.


sparkpost undefined function status Can't load system status after upgrading from 4.7.31 to 5.2.2 on latest WP. When I try, Console shows Uncaught Error: Syntax error, unrecognized expression: #/status and the page is blank. Error log shows

  PHP Fatal error: Uncaught Error: Call to undefined function
  civicrmVersion() in
  /wp-content/uploads/civicrm/ext/com.cividesk.email.sparkpost/sparkpost.php
  on line 145

Tried disabling Asset Caching (in Debugging & Error Handling) to no avail. Also installed latest Sparkpost for WP, but no change. What might cause this behavior?

My bad -- I had botched the installation of the Sparkpost release for Civi 5.x compatibility. Once I realized the error of my ways, I put the Sparkpost files into the correct directory, and now Status page is happy again. No more errors!


Webform CiviCRM and Gift Membership Is it possible to use Webform CiviCRM Drupal module to create Stand Alone Forms for gifting a membership to a third party?

Yes, you can do this with Webforms. Create two contacts on the webform. Contact 1 will pay (that's always the case with contact 1), you can set contact 2 to receive the membership. Incidentally you could also add contacts 3, 4, etc. to also receive gift memberships.

More details can be found in these instructions.


Why does the default 'from' email address not show as the first option when using 'Send Email' Activity This seems odd. If I add a second email address to the list of "from" emails at /civicrm/admin/options/from_email_address?reset=1 and set it to default, i expect it to be selected as the first option when using "Send an Email' but it continues to be the second in the list.

If i change the Order of the From emails so my default is first, it continues to show as the second when using "Send an Email' (though perhaps a clear of caches would fix it, but fundamentally something seems wrong here.

This was a problem in core and has been fixed by Jitendra - will add the PR when I can dig it out.


Add field on Case type form I want to add a field on Case type setting (civicrm/a/#/caseType/1 which is build in angular js) either just below the description field or as a tab besides case role tab. What is the easiest way to do this?

Civi version - 5.14.0

If you're ok with it not being tightly integrated (i.e. automatically available in the xml or to the api), then you can do something like below, which adds a field labelled "Boo" to the case type edit screen.

Thanks for asking this question. It's probably helped me more than you, since it's helped clarify for me how this all works. And it occurs to me that customizing an existing form is probably a much more likely task for developers than writing your own angular form from scratch, which is what all the tutorials show.

function myextension_civicrm_alterAngular(\Civi\Angular\Manager $angular) {
  $changeSet = \Civi\Angular\ChangeSet::create('add_casetype_custom_field')
    ->alterHtml('~/crmCaseType/caseTypeDetails.html',
      function (phpQueryObject $doc) {
        $doc->find('div.crm-group')->append('
          <fieldset class="crm-collapsible">
            <legend class="collapsible-title">{{ ts(\'My Custom Fields\') }}</legend>

                <input crm-ui-id="mycustomfield" class="crm-form-text" name="mycustomfield" ng-model="mymodel.cusfield">

          </fieldset>
        ');
      });
  $angular->add($changeSet);

  CRM_Core_Resources::singleton()->addScriptFile('my.extension.name', 'js/angCustomField.js');
}

Reference: https://docs.civicrm.org/dev/en/latest/framework/angular/changeset/

And here is the contents of js/angCustomField.js:

(function(angular, $) {
  var crmCaseType = angular.module('crmCaseType');
  crmCaseType.controller('CustomFieldCtrl', function($scope) {
    // Need to replace this with an ajax call right here to look up the value from the db.
    $scope.mymodel = { cusfield: 'value looked up from db' };

    // just show that this is executing and we have the right id
    console.log($scope.caseType.id);

    // alias the real save() function so that we can do our stuff too
    var proxiedSave = $scope.$parent.$parent.save;
    $scope.$parent.$parent.save = function() {
      console.log($scope.caseType.id);
      console.log($scope.mymodel.cusfield);

      //
      // Do ajax api or whatever here to save the value to db
      //
      // IMPORTANT: Always validate the input server-side before using it even if you have javascript validation client-side since that can be easily bypassed. This isn't specific to angular it just seems to be ignored in all the angular tutorials. Even a plain html form with e.g. a select list can still submit values not in the select list - always need to validate server-side.

      // Now call the original save
      return proxiedSave.apply(this);
    }
  });
})(angular, CRM.$);

Some notes:

Note we're adding our own nested child controller in the line that has ng-controller="CustomFieldCtrl". This matches up to the controller in our js file.
The ng-model="mymodel.cusfield" value HAS TO HAVE A DOT IN IT. It just doesn't work if it doesn't. This matches up to the $scope.mymodel = ... line in our js file.


How do I delete my account I have not used my civicrm account for many many years.  Today I got 139 password reset email notifications.  I don't want to have to deal with this, I just want to delete the account.

If you have someone to whom I can forward some of these emails, I"m happy to do so.  Just let me know to whom I should forward it.

Obviously, I can't login again because someone/something has changed my password.

Peace
CJ Rhoads

I assume you are talking about your account at civicrm.org

There's no way for users to delete their accounts - you can unsubscribe from emails, which I think you have done.

There's a contact email at https://civicrm.org/contact - you can send your request to that.


how to get list of all buttons in civicrm hook_buildform? I need to add one more button to an event form but right now when I use

addButtons

it overrides existing buttons
How can I make sure the buttons which I add are updated instead of replacing the existing ones?

function custom_changes_civicrm_buildForm($formName, &$form){
  if($formName == 'CRM_Event_Form_ManageEvent_EventInfo' && $user->uid){
        $buttons = array(
        array(
          'type' => 'upload',
          'name' => ts('Request for Approval'),
          'isDefault' => TRUE,
        ),
      );
      $form->addButtons($buttons);

  }
}

In the CRM\Event\Form\ManageEvent.php
I see there are protected variables, which I am unable to add it in the conditions inside hook_buildForm
e.g. _cancelURL, _single , so how can I override it using hook_buildForm , an example would be helpful.

 /**
   * Build the form object.
   */
  public function buildQuickForm() {
    $session = CRM_Core_Session::singleton();

    $this->_cancelURL = CRM_Utils_Array::value('cancelURL', $_POST);

    if (!$this->_cancelURL) {
      if ($this->_isTemplate) {
        $this->_cancelURL = CRM_Utils_System::url('civicrm/admin/eventTemplate',
          'reset=1'
        );
      }
      else {
        $this->_cancelURL = CRM_Utils_System::url('civicrm/event/manage',
          'reset=1'
        );
      }
    }

    if ($this->_cancelURL) {
      $this->addElement('hidden', 'cancelURL', $this->_cancelURL);
    }

    if ($this->_single) {
      $buttons = array(
        array(
          'type' => 'upload',
          'name' => ts('Save'),
          'isDefault' => TRUE,
        ),
        array(
          'type' => 'upload',
          'name' => ts('Save and Done'),
          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
          'subName' => 'done',
        ),
        array(
          'type' => 'cancel',
          'name' => ts('Cancel'),
        ),
      );
      $this->addButtons($buttons);
    }
    else {
      $buttons = array();
      if (!$this->_first) {
        $buttons[] = array(
          'type' => 'back',
          'name' => ts('Previous'),
          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
        );
      }
      $buttons[] = array(
        'type' => 'upload',
        'name' => ts('Continue'),
        'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
        'isDefault' => TRUE,
      );
      $buttons[] = array(
        'type' => 'cancel',
        'name' => ts('Cancel'),
      );

      $this->addButtons($buttons);
    }
    $session->replaceUserContext($this->_cancelURL);
    $this->add('hidden', 'is_template', $this->_isTemplate);
  }

You will need to over-ride the button to include existing + new button through buildform. The other option is to add button using smarty in tpl file using below snippet

{crmButton p='civicrm/request' q="action=browse&reset=1&gid=$gid" icon="th-list"}{ts}Request for Approval{/ts}{/crmButton}

HTH

Pradeep


Upgrade error from v4.5.8 to 4.6.11 There is an upgrade error from v4.5.8 to v4.6.11. Even i tried to upgrade to v4.6.0, it fails. Please suggest an solution how to fix it. I upgrade the existing database from v4.5.5 to 4.5.8 which is running without errors.

Jitendra's comment is correct - it should be posted as an answer!

As for your second error, that's caused by skipping the first error.  The SQL for 4.6.alpha1 includes the command to create the "civicrm_recurring_entity" table.  When you skip the rest of the 4.6.alpha1 SQL, you're creating the circumstance that leads to the second error.


CiviCRM_API3_Exception: "Authorization failed to join onto StateProvince api in parameter loc_block_id.address_id.state_province_id.name" We are using CiviCRM with Drupal 7.54 and we just upgraded to CiviCRM 4.7.19.  After the upgrade, when I go to an event (Event->Manage Events->[some event]->location) with a user who has 'access CiviEvent' permissions and try to go to the location tab I receive this error:

CiviCRM_API3_Exception: "Authorization failed to join onto StateProvince api in parameter loc_block_id.address_id.state_province_id.name"

#0 sites/all/modules/civicrm/CRM/Event/BAO/Event.php(1889): civicrm_api3("Event", "get", (Array:5))
#1 sites/all/modules/civicrm/CRM/Event/Form/ManageEvent/Location.php(172): CRM_Event_BAO_Event::getLocationEvents()
#2 sites/all/modules/civicrm/CRM/Core/Form.php(564): CRM_Event_Form_ManageEvent_Location->buildQuickForm()
#3 sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#4 sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Event_Form_ManageEvent_Location), "display")
#5 sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_ManageEvent_Location), "display")
#6 sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#7 sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#8 sites/all/modules/civicrm/CRM/Core/Invoke.php(283): CRM_Utils_Wrapper->run("CRM_Event_Form_ManageEvent_Location", "Event Location", (Array:0))
#9 sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14))
#10 sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#11 sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#12 includes/menu.inc(527): civicrm_invoke("event", "manage", "location")
#13 index.php(20): menu_execute_active_handler()
#14 {main}

We upgraded from 4.7.15 so one of the upgrades implemented a permission check for

CRM_Event_BAO_Event::getLocationEvents()

Located in CRM/Event/BAO/Event.php

 $events = array();
    $ret = array(
      'loc_block_id',
      'loc_block_id.address_id.name',
      'loc_block_id.address_id.street_address',
      'loc_block_id.address_id.supplemental_address_1',
      'loc_block_id.address_id.supplemental_address_2',
      'loc_block_id.address_id.supplemental_address_3',
      'loc_block_id.address_id.city',
      'loc_block_id.address_id.state_province_id.name',
    );

    $result = civicrm_api3('Event', 'get', array(
      'check_permissions' => TRUE,
      'return' => $ret,
      'loc_block_id.address_id' => array('IS NOT NULL' => 1),
      'options' => array(
        'limit' => 0,
      ),
    ));

Now I am able to access the tab with the permission 'administer CiviCRM' but not with just 'access CiviEvent'.  This is problematic because many of my CiviEvent users can't complete their event postings.

When I comment out the this field

'loc_block_id.address_id.state_province_id.name'

in the return array ($ret) it passes permissions.  I'm wondering if something is wrong with the join in the API, or if there's a permission I need to set somewhere.

Also when I go to the API explorer and reproduce the API call above, I receive the same error.

I'm wondering if this is a bug in core or maybe something on my end.  Any help to find a way around this permission failure would awesome.

Thanks!

The problem lies with the API permission to the StateProvince entity.  Civi event users do not have access to this entity via the API. (I'm not sure why this is)

To fix this I created a custom drupal module with the civi hook: mymodule_civicrm_alterAPIPermissions

mymodule_civicrm_alterAPIPermissions($entity, $action, &$params, &$permissions) {

$permissions['state_province'] = array(
    'get' => array(
      'access CiviCRM',
      'access CiviEvent',
      'edit all events',
    ),
  );
}

Which gives CiviEvent users access to this entity via the API.


How do you use Apple Pay with CiviCRM? I've seen Apple Pay on CiviCRM contribution pages before, but I don't know how to go about setting it up.  Does anyone know how it's done?

You can use the stripe payment processor extension to handle stripe.

https://civicrm.org/extensions/stripe-payment-processor

But it only supports credit cards right now.  The maintainer is hoping to upgrade it to Stripe v3 which should support Apple Pay and lots of other wallets as well.


How can I extend the search builder I'm looking to extend the search builder to accept a custom value which then can be used to filter the search results. Thanks in advance.

Create custom fields under Administer - Custom Data and Screens - Custom fields.

Make sure you check the box for "is this field searchable".

Then the field should be available for searching in Advanced Search or Search Builder.


Cron Invalid username and/or password, After 4.2.9 to 4.2.20 Joomla Upgrade Very grateful if anyone can tell me where to start debugging this issue.

I had cron working fine in 4.2.9

I've cleared all, caches, templates, sessions, logged in and out as the cron user who is Super Admin. Key was also restored from backup settings files.

This is all due to Joomla changing its password authentication methods on 2.5.18 and above, to fix (not the nicest fix but it works) you need to edit the following.

administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php

CHANGE TO THIS AROUND LINE 445

  // now check password
  if (strpos($dbPassword, ':') === FALSE) {
    if ($dbPassword != md5($password)) {
      if (!JUserHelper::verifyPassword($password, $dbPassword, $dbId)) {
        return FALSE;
      }
    }
  }
  else {
    list($hash, $salt) = explode(':', $dbPassword);
    $cryptpass = md5($password . $salt);
    if ($hash != $cryptpass) {
      if (!JUserHelper::verifyPassword($password, $dbPassword, $dbId)) {
        return FALSE;
      }
    }
  }


Deleting and Adding Custom Fields I'm having trouble updating custom fields in CiviCRM 5.15.1/Drupal.

UPDATE: I believe this is occurring because I have too many custom fields in a custom group_id. I was able to reproduce this error twice: created a custom group, added custom fields to it. Once the number of custom fields reaches 93, I can no longer edit new or existing fields. When editing custom fields, I get the error:

DB Constraint Violation - custom_group_id should possibly be marked as mandatory for CustomField,create API. If so, please raise a bug report.

I cannot delete the custom field through civicrm (only phpmyadmin). When trying to edit the custom field, the logo spins forever. Also, when I try to access certain cases, I get an error "case_id is not valid : 1."

I know the issue is related to the custom fields/custom group because if I disable the custom group, I no longer have the case_id issue. Any ideas what is going on?

I do not think it is because you have too many custom fields but it might well be that something is not totally right in your data? Ideally you should compare the values in the civicrm_custom_group and civicrm_custom_field tables with the actual data holding tables (in your example civicrm_value_care_init_69) and check if that is all correct.

The error also suggest that there is a constraint, so you probably use a field type of contact entity reference somewhere? And perhaps that is not entirely correctly configured? It is hard to be sure with only the error message to go by :-)


Can Drupal send password reset tokens to non-default emails for accounts? Can Drupal send password reset tokens to email addresses other than the Primary in the linked CiviCRM contact?

If this question veers too far away from CiviCRM, I apologize. This ability might permit resetting passwords for all users in our Active Directory Federated Services/Office 365 environment - a huge benefit!

We are migrating away from a CRM we can't afford. We had a custom web application resetting AD passwords by searching the old CRM's email database and generating a link for the associated user, who could have any number of emails associated. The big problem is that the Primary email is likely issued by us via Office 365 and thus uses the same AD FS credentials that we would like to sync Drupal to. (We have achieved SSO everywhere else and don't want Drupal/CiviCRM to be separate.) Therefore, someone needing a password reset probably can't access his/her Primary email, either.

As the trend is lately, we allow students access to .edu emails after graduation, so we have quite a few random people out there forgetting passwords. A very desirable side effect of using CiviCRM for password resets is that alumni will probably care a lot more about keeping their own contact information up-to-date with us (since access to their .edu email depends on it).

If I can send password reset tokens to any one of a contact's emails, a lot of problems are suddenly solved.

This is not default. It's a custom drupal module or a custom CiviCRM extension, depending on the exact use case. Should not be that difficult.


Tags used for Cases, Activities or Attachments in Drupal Views? We are trying to achieve a hierarchical approach to some of our case types by using case tags.

It works great on the back-end, but if I try to filter a view by the case tag, I get no results.

In the View UI, I add a filter of CiviCRM tags, see the case tags in the list, but if I select any of them, I get no results.

I've tried with tags attached to contacts, cases, attachments and activities.  The only one that appears to work is when the tag is attached to a contact.

Since Smart Groups don't appear to function correctly in Views either, this functionality would be very useful.

Tables look good, view appears to be set up correctly.  Tags is available as a field and I can see the correct Case Tags in the list of available tags.

I brought this issue up before, but have no resolution yet.

Here is a link to the old issue:
Case Tags in View

On a development server, I edited sites/all/modules/civicrm/drupal/modules/views/components/civicrm.core.inc.

In the Tag section, I added:

$data['civicrm_tag']['table']['join']['civicrm_case'] = array(
    'left_table' => 'civicrm_entity_tag',
    'left_field' => 'tag_id',
    'field' => 'id',
  );

and

 $data['civicrm_entity_tag']['table']['join']['civicrm_case'] = array(
    // Directly links to tag table
    'left_field' => 'id',
    'field' => 'entity_id',
    'extra' => array(
      array(
        'field' => 'entity_table',
        'value' => 'civicrm_case',
        'numeric' => FALSE,
      ),
    ),
  );

After that, I was able to filter by case tags.

Would this have any unforeseen ramifications?  Does this cover all of my bases?

Would this be best put into a separate custom module?


How to alter and manipulate the behavior and action of button through extension? I want to alter and manipulate the behavior and action of continue button on new contribution page through extension, I want to do some additional tasks with that button through my extension like sending email etc.

What is the best way to accomplish this task?

you can use hook_civicrm_postProcess or hook_civicrm_post

which ever you need based on your requirement below is the link for more reference http://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference


Timezone issue - authenticated vs anonymous: a 6h time warp When I'm logged in -> and make a Contribution at 4:20pm - all is well!

I log out and then make a Contribution through the exact same Contribution page and notice that the Contribution clocks in at 10:24pm (so +6h - that's UTC I think as I believe the UK did their timezone change last weekend);

Any clues as to what may be going on here?
This is on Drupal 8 / CiviCRM 5.15.1

My default time zone in Drupal is set to Edmonton [Canada]. The 4:20pm was correct.

Additional Info:

CentOS thinks it's ET (+2h) - which is fine [machine is in Montreal];

This docker instance: php -v => PHP 7.3.7 php -i |grep time provides two clues:

Default timezone => UTC
date.timezone => no value => no value

For a D7 project on another server [works fine no +6h time issues - D7 site] ->
same server config (but PHP 7.1.29):

CentOS is in ET (+2h) - which is fine [machine is in Toronto]
Default timezone => UTC
date.timezone => no value => no value

So D8/PHP 7.3.7 vs D7/7.1.29

The main clue is that these date/times are being stored in mysql datetime fields, which do not include a timezone, but implicitly have a server-wide timezone (either adopted from the server, or configured explicitly).

So we know that the problem is at the php level - the code is generating the date time and converting based on the current user's timezone (which it shouldn't in this case).

Since it's an issue with D8 and not for D7, it seems likely that it's a D8 integration issue, some kind of automated handling of date/times that we don't want (we do want date/times to be converted to the users timezone on display).


Getting errors when moving D7/CiviCRM install form localhost xampp portable to another location I have xampp portable installed on Windows 10.

I run about a dozen Drupal, Wordpress and other CMS on there. I can move the whole stack to different drives and machines and it all works perfectly, only one that can't work is D7/CIVICrm install.

When I move it to another directory I get this error:

fatal error: Cannot redeclare class CRM_Core_ClassLoader in C:\Core\XAMPP_2018\htdocs\crm4\sites\all\modules\civicrm\CRM\Core\ClassLoader.php on line 36

Any idea how to make this work?

The files are absolutely identical from source to location, copy and paste whole Xampp portable folder...

Had to change the path name in civicrm.settings.php from:

G:\XAMPP_2018\htdocs\crm4

To

C:\Core\XAMPP_2018\htdocs\crm4\

This is around LINE 180:

Code looks like this:

$civicrm_root = 'G:/August25/XAMPP_2018/htdocs/crm4/sites/all/modules/civicrm';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
  define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'G:/August25/XAMPP_2018/htdocs/crm4\sites\default\files\civicrm\templates_c\');
}

But the slashes also have to be forward like this "/", I searched from Windows path, that's why I couldn't find the code using find and replace!


Can't disable debug/backtrace on WordPress I was encountering an error sending email so I turned on the backtrace/enabled debugging. No I can't get back to the menu to turn it off. I just have a page of error messages.

Help! Anyone got any ideas?

Thanks
Caroline

If you have command-line access and wp-cli enabled (with the CiviCRM extension), you can run: wp civicrm disable-debug.

If you don't have command-line access, run the following SQL via PHPMyAdmin or similar:

UPDATE civicrm_setting SET value = 'i:0;' WHERE name = 'backtrace' OR name = 'debug_enabled';


Issues with running Joomla 3.8 and Civi I am not looking to be first on this - just wanted to see if anyone is running J3.8 and current release of Civi.

The fix to the file CRM/Utils/System/Joomla.php suggested in the link
https://github.com/civicrm/civicrm-core/pull/11062/files?diff=unified
made the cron jobs run again for CiviCRM 4.7.25 and Joomla 3.8.1.


Design flaw in current employer and job title Apparently there is a design flaw in the current employer and job title fields in Civi.

"If you enter or amend these fields through the edit of a contact, a corresponding employment relationship will be established. Unfortunately, if you create an employment relationship directly then the two fields do not get updated. Likewise, if an employment relationship becomes non current or is deleted, then the two fields do not get updated."

Does anyone know about this and how can I  get around it? I am entering job titles for contacts. Civi says it saves them. When I open the contacts the next day, the updates have not occurred.

My experience is that 'Employer' field does get populated after adding the relationship directly.
However the Job Title field is not related to the relationship and that wouldn't get populated, as it's a field on the contact record only.


Changing background and button colours on public facing pages (like contribution) in drupal Is there and easy way to change the colours on contribution pages, the background shouldn't be blue?
Also the buttons are all white with white text till you wave your courser over them.
Is there a simple way I'm missing that doesn't require any knowledge of code?

In Drupal you could add a new theme, for example 'Bootstrap', and add the module 'Themekey' to Drupal.  Then in Themekey settings you can specify the Bootstrap theme to be used for a particular page. For example in the Themekey settings when 'drupal.node' = 'civicrm/something' then theme is 'Bootstrap'.  No coding required!


CiviCRM does not have permission to write temp files on new server I just built a RedHat server on AWS to act as a Test server and cloned a Git repository that has my Drupal installation in it. After importing the Prod MySQL database for both Drupal and CiviCRM and adjusting the civicrm.setting.php file I tried accessing the website. I get the error message:

  CiviCRM does not have permission to write temp files in
  /var/www/html/natureserve/sites/default/files/civicrm/templates_c/en_US/,
  Exiting

The root directory of the website is owned by the 'apache' user and I set the permissions to '777' (both recursively). I know this is not recommended but I wanted to see if it was indeed a file permissions issue.

Any thoughts as to what else I can try?

I found out the culprit was SELinux. Once I disabled it everything worked fine.


Error Event registration - When registering for an event This is all that is on the page after you click "Continue"

Sorry but we are not able to provide this at the moment.
Could not find valid value for id
Return to home page.

Using civicrm 4.7.8 with Wordpress

It might be because you start on a different domain name or protocol than the one configured in civi.

a common issue is to go to http://example.org but http://www.example.org is configured, or https://example.org

Can you copy/paste the url of the registration form and the one after? are they the same?


Emails templates in the language of the receiver I am working on a project in Belgium, where they speak French and Dutch. Now I want to send an email in the language of the receiver, using a standard template. Does CiviCRM offer options to support this (other than coding this with smarty if then else)?

I think there is no approach for this on CiviCRM beyond smarty approach. We workaround this by splitting receivers groups by their language preferences and sending their separate mails from templates builded in different languages.

This approach its fine for us. See this feature request on Mosaico project with the aim of facilitating work in this direction.

Also, maybe it would be better to find a language preference filter directly on the CiviMail UI without the need to have to separate the mailing groups by language previously.


How can I stop civicrm_metatag_metatags_view_alter() altering non-CiviCRM URLs The purpose of function civicrm_metatag_metatags_view_alter() is to ensure the metatag URLs include the query parameters. The problem is that it acts on non-CiviCRM pages.

'Metatag' is a Drupal module for adding  tags to the rendered HTML, and this function is in drupal/civicrm.module.

Proposed solution

civicrm_metatag_metatags_view_alter() should be modified to only work on CiviCRM pages. With all kudos going to @Chris-Burgess I've created an issue CRM-17594 and PR https://github.com/civicrm/civicrm-drupal/pull/328 to resolve this.

My question: How do I check that a URL is a CiviCRM URL?

As discussed below, the answer is to check if arg(0) equals 'civicrm'.

Description of problem

I get the following PHP Notice ...

  Notice: Array to string conversion in _civicrm_get_url_parameters_as_url_string() (line 295 of .../sites/all/modules/civicrm/drupal/civicrm.module).

A page where this occurs is http://citybibleforum.org/library?&title=&field_speakers_tid=&field_topics_tid=&field_bible_reference_value=&field_episode_date_value%5Bmin%5D=2011-08-12&field_episode_date_value%5Bmax%5D=2012-08-12&field_is_audio_value=All&field_is_text_value=All&field_is_video_value=All&page=46

The parameters causing the notice are ...

  field_episode_date_value[min]=2011-08-12&field_episode_date_value[max]=2012-08-12

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

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

hook_metatag_metatags_view_alter()
civicrm_metatag_metatags_view_alter()

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

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

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


How to expose the civicase hashed value that gets sent in Subject when sending an email from case Happy to be told we are going about this wrong.

SCENARIO: Case Manager gets sent an email from an external source to their private/organisational email address.

They want to forward/resend to it gets stored on the Case.

Manager goes in to Civi (or Views in our case) searches the contact, finds the relevant case, then, as i understand things, they need to include a value in the email such as

  [case #44fec3a]

where that value is the first 7 letters of a hashed value of the civicrm site-key plus the case id

And indeed this works, if I send an email to the 'inbound email processing email address' and have  [case #44fec3a] it gets added to the Case. Wonderful.

But the Case Managers have no way of knowing what the hashed value should be - and we need to be able to show it on both the CiviCase page and in Views.

So do we need to find a way to 'present' this 7-character string on both the Case page, and pull it together in our Views?

Or does anyone have a simpler/better suggestion/solution?

Here's the override code I've used to make it accept some variations of case id (with and without the word case, with and without the # sign) as well as hash, prioritizing the fanciest to the plainest. It looks like the original code hasn't changed since 4.2 so this should work against 4.7 too.

Create an override for CRM/Activity/BAO/Activity.php, and in lines 607 thru 622 replace it with this:

$matches = array();
$subj_to_match = CRM_Utils_Array::value('subject', $params);
if (preg_match('/\[case #([0-9a-h]{7})\]/', $subj_to_match, $matches)) {
  $key        = CRM_Core_DAO::escapeString(CIVICRM_SITE_KEY);
  $hash       = $matches[1];
  $query      = "SELECT id FROM civicrm_case WHERE SUBSTR(SHA1(CONCAT('$key', id)), 1, 7) = '$hash'";
} elseif (preg_match('/\[case #(\d+)\]/', $subj_to_match, $matches)) {
  $hash       = $matches[1];
  // this seems like an odd query but we are checking the id actually exists
  $query      = "SELECT id FROM civicrm_case WHERE id = '$hash'";
} elseif (preg_match('/\[#(\d+)\]/', $subj_to_match, $matches)) {
  // technically this is a subset of the one below, but keeping it allows a subject that had both and prioritize this one
  $hash       = $matches[1];
  $query      = "SELECT id FROM civicrm_case WHERE id = '$hash'";
} elseif (preg_match('/\[(\d+)\]/', $subj_to_match, $matches)) {
  $hash       = $matches[1];
  $query      = "SELECT id FROM civicrm_case WHERE id = '$hash'";
}
if (!empty($matches)) {
  $caseParams = array(
    'activity_id' => $activity->id,
    'case_id' => CRM_Core_DAO::singleValueQuery($query),
  );
  if ($caseParams['case_id']) {
    CRM_Case_BAO_Case::processCaseActivity($caseParams);
  }
  else {
    self::logActivityAction($activity, "unknown case hash encountered: $hash");
  }
}

One interesting side effect of this is that saving a non-case activity using the normal civi UI but putting [1234] in the subject will save it as a case activity on case 1234!


How to edit php so civicrm can find the extensions neither  - for the directories

/home/mysite/public_html/wp-content/plugins/files/civicrm/custom_ext

nor - for the resources

/http://www.mysite.org/wp-content/plugins/files/civicrm/custom_ext

works as an entry to find the extensions - everything is 775 permissions

Is anything in the path incorrect?

oddly, if I only use /home/mysite/public_html/ and /http://www.mysite.org/ civicrm picks up a zip file for another web app and displays this ridiculously long path to get to the file - in case you are interested it's

- Local Path = /home/mysite/public_html/qdpm/core/lib/vendor/symfony/test/unit/plugin/fixtures/http/pear.example.com/REST/p/sffooplugin

How it can find and interpret this as and extension and not the recommended path I don't know.  Does anyone?

I have searched the forum and not found anything that worked.  Not sure why this is so difficult to setup.  I have many web apps that just create the directories you need and you are done.

Anyway, do I need to edit directories.php etc. to make this Extensions show up as they should.  This is a deal breaker since there is no ad hoc reporting and I am hoping a report extension will give us what we need.  Otherwise Civicrm is useless for us.

Thx

You can define a directory for your extensions and point CiviCRM to it. Remember that custom extensions directory should be kept outside your CiviCRM installation because they will be easy to manage in case you need an upgrade on your install.

Below are the steps which i propose you carry out to setup your extensions directory

create your directory probably /home/../../../extensions
Give appropriate permissions to your extensions directory
Go to your CiviCRM install, under administer >> System settings click on Resource URL.
place the full path of the directory you created above in the "Extension Resource URL"
Now any extensions you place in the directory above should be seen and interpreted properly as an extension

-* you can verify and install by navigating to Administer >> System settings >> Extensions( there you will see all extensions )

If that does not make sense to you then you can follow from Extensions


ACL settings for civicrm in Joomla cannot be reset anymore Using CiviCRM 4.6.15 (and later 4.6.16) integrated in Joomla 3.5.1 I just found out that it is no longer possible to change ACL settings for CiviCRM. It is possible to change a setting, this change is ajaxified and will be shown immediately, however after saving the change it is rolled back to the setting before the change.

I see this in a site that I upgraded from an earlier Civi version, and also in an install of CiviCRM 4.7.6 in a Joomla 3.5.1 site.
The readme text with the ACL settings advised to set the value of 'max_input_vars' (defult 1000) higher. I reset this to 2000 and later to 8000.
This does not solve the issue with CiviCRM 4.7.6 (now 4.7.7) in Joomla 3.5.1 however.

This seems to be a longstanding bug, see: https://issues.civicrm.org/jira/browse/CRM-15841.

After updating Joomla 3.5.1 to the latest version Joomla 3.6.0 this problem seems to have disappeared completely.
I checked a civi 4.6.19 and a civi 4.7.9 install and both behave well again. You can now change the AVL settings again.
I did hear that the acl-part of Joomla needed and got some TLC so I presume this was the culprit in the previous Joomla version.

I did not need to to set the value of 'max_input_vars' (default 1000) higher for this to work.


Drupal block not appearing on CiviMail page I want to add some inline help to the New mailing CiviMail.  e.g. show a block on this page civicrm/a/#/mailing/12345

I've created my drupal block, set it to appear in the correct theme and set it to only display on this page: civicrm/a/#/mailing/*

However for some reason it won't show.  I've backtracked and I'm able to get it to show up with this expression: civicrm/* but as soon as I add civicrm/a/* it doesn't work, just doesn't display

Any ideas about why this might be?

Thanks
Peter

I think this may have something to do with the fragment identifier (#).  This is typically used to link to a particular point within a page (an anchor).  However, in this case I think it is being used by the JavaScript framework to indicate a particular page view.  I guess that Drupal may not be able to process URLs like this.


Contribution view / edit error When I go to Contributions and click "View", I always got an error "Erreur réseau. Impossible de joindre le serveur" ("Network error. Cannot join the server" - in english).

I can't find any error in logs...

I run CiviCRM 4.6.6 under Wordpress 4.3.1. But got the same error with updated versions of both on another server.

Any idea ?

Thanks !

I suggest that you check that the Base URL in the CiviCRM settings file.

Look for CIVICRM_UF_BASEURL in civicrm.settings.php file.

See this similar question for more details: **Network Error - Unable to reach the server


Can members login and then search membership database? I'm assuming this is the case, but I wanted to confirm. Would members of my organization have the capability of logging in to our membership database and viewing other members information?

Yes, there are a few different ways to accomplish this.  One tutorial for a members-only directory is available on the CiviCRM wiki: Creating a website member directory

If you are on Drupal, you could also use Views to create something similar.


How to link profile field with multiple values? I would like to create a link to a pre-filtered profile search.
I have a field (custom_2) with multiple values.
I was able to link using one value (ex id=2) suing this url:
.../index.php?option=com_civicrm&task=civicrm/profile&Itemid=45&_qf_Search_display=true&custom_2=2

However when I try the following I only get results of the last ID (ex. 1):
.../index.php?option=com_civicrm&task=civicrm/profile&Itemid=145&_qf_Search_display=true&custom_2=2&custom_2=1

When using the following URL, I get the results of both values (2 and 1) but I also get an error:
.../index.php?option=com_civicrm&task=civicrm/profile&Itemid=145&_qf_Search_display=true&custom_2[]=2&custom_2[]=1

Error:
Warning: strpos() expects parameter 1 to be string, array given in /home1/.../public_html/administrator/components/com_civicrm/civicrm/CRM/Profile/Form/Search.php on line 65

Warning: explode() expects parameter 2 to be string, array given in /home1/.../public_html/administrator/components/com_civicrm/civicrm/CRM/Profile/Form/Search.php on line 66

Warning: Invalid argument supplied for foreach() in /home1/.../public_html/administrator/components/com_civicrm/civicrm/CRM/Profile/Form/Search.php on line 68

I'm not sure what to put in the URL to get rid of the error and get results from multiple value of the same field.

This is CiviCRM 4.7.29 on Joomla 3.8.3

To pre-select multiple select value fields you can provide values with , separated.

Example:

.../index.php?option=com_civicrm&task=civicrm/profile&Itemid=145&_qf_Search_display=true&custom_2=2,1

HTH

Pradeep


MySQL Query to return all custom values Any MySQL Civi Gurus out there that know how I can create a query to return all custom value fields with their value per contact id?

I know how to get the occasional custom value, but i need the values not the key field numbers.

My problem is the custom values pick lists are all stored in the same table and so "1" maybe 5 different values and you have to pick the qualifier of each custom custom pick list so that throws off my SQL.

Thank you very much!

This would be difficult to do in pure SQL in a generic way. I assume this is for some type of reporting system you are connecting to CiviCRM and any scripting is not an option.

For each field where it needs a lookup you'd have to do a join, something like:

SELECT c.id,
cf1.label AS field1_title,
ov1.label AS field1_label,
cf2.label AS field2_title,
ov2.label AS field2_label
FROM civicrm_contact c
LEFT JOIN civicrm_value_XXX cv1 ON cv1.entity_id = c.id
LEFT JOIN civicrm_custom_field cf1 ON cf1.name = 'the field you want #1'
LEFT JOIN civicrm_option_group og1 ON cf1.option_group_id = og1.id
LEFT JOIN civicrm_option_value ov1 ON (ov1.option_group_id = og1.id AND ov1.value = cv1._the_database_field_name)
LEFT JOIN civicrm_value_YYY cv2 ON cv2.entity_id = c.id
LEFT JOIN civicrm_custom_field cf2 ON cf2.name = 'the field you want #2'
LEFT JOIN civicrm_option_group og2 ON cf2.option_group_id = og2.id
LEFT JOIN civicrm_option_value ov2 ON (ov2.option_group_id = og2.id AND ov2.value = cv2._the_database_field_name)
... more joins for each field...

XXX depends on the actual table name where the custom field is stored,
_the_database_field_name is the fieldname as it appears in that table.

I use left joins because depending on how contacts get into the system sometimes they are missing stuff, but you'd still want the contact to be output.


Can't install "CiviCRM UK GiftAid" Getting the following error when installing this extension. Had to enable PHP errors to get this as without all I see is a 500 server error w nothing in the Apache2 logs.

Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/website.vhost/web/wp-content/uploads/civicrm/ext/uk.co.compucorp.civicrm.giftaid-3.0.1/CRM/Civigiftaid/Utils/Contribution.php on line 99

Ah, v3 of this extension is incompatible with PHP7: https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues/49


WP CiviCRM shortcodes gone? I am running CiviCRM 4.7.18 in WordPress 4.7.4. For some time, the shortcode button has been gone. Even after re-installing CiviCRM/deactivating all other plugins I can't get it to show anymore. Has that feature been removed? Cheers!

Are you using this plugin too by any chance: https://wordpress.org/plugins/civicrm-admin-utilities/

If so, there are settings for what post type the shortcode should appear on.


CiviRules Identify how many times a donor contributed in a given time period I am trying to set up a CiviRule to identify if a donor has donated more then 10 times in the last 12 months. I used the Linked Condition xth Day of Contributing By Donor and set it to 10 last 12 months, but that did not work. Is this the right condition to use? If not is there a better way to identify those donors?

This did work. I was thinking it was 10 or more times in the last 12 months, but it only works if there is exactly 10 contributions.


how to test the version-or if a feature is implemented? when writing extensions, i often try to keep the code compatible with several versions of civi instead of having to maintain different branches.

however, i sometimes would like to use a new feature if it's available, for instance, civi 4.6 introduced an option to force rollback that i would like to use, but if i'm using this option and run the code with civi 4.5, it will silently ignore it and won't rollback.

is there a way from the api to test the version that is running, or -my preference- if a specific feature is implemented?

As Coleman suggests, one can do more direct inspections to see if particular entities/actions/fields are supported. This is generally more robust/correct in the long-run, but it can be problematic in some edge-cases. There is a way to get the version number.

In CiviCRM v4.4+, use the System.get API, e.g.

drush cvapi system.get
Array
(
    [is_error] => 0
    [version] => 3
    [count] => 1
    [id] => 0
    [values] => Array
        (
            [0] => Array
                (
                    [version] => 4.4.17
                    [uf] => Drupal
                )

        )
)

Of course, checking an API is mildly expensive. If you need to guard many statements with version checks, then it could add up. To mitigate this:

If using the API remotely to inspect system state, cache the data for a few minutes.
If writing server-side PHP code, don't use an API. Instead, call CRM_Utils_System::version() and version_compare().


How do I run a list of "on-hold" email addresses? I want to run a current list of emails that are "on Hold" in our system.  How do I do this?

You can use the "advanced search", there is an option to select the emails that are on hold


Adding another option to the Source drop down box Using webform civicrm, how can one add another source option to the wizard?

Since this is tagged as webform civicrm - I am guessing you mean the Source Label that you can find if you go to the CiviCRM tab on the webform and then go to Additional Options


Activity 'Result' field missing from API The default field on the Activity API doesn't return 'result' field by default, or even when specified as a return value. I've never added one of these before, if someone could let me know how it's done I'll sort a PR out. Thanks!

If anyone's interested - the use case is deleting Twilio's copy of messages after a period on a scheduled job. The return value is Twilio's SMS Unique ID.

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

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

HTH

Pradeep


Webform creating duplicate contact The snippets below show the duplicate contacts, the webform CiviCRM tab, and the matching rules. If I fill in name & a matching email the form updates the contact, does not create a dup. If I supply name & a matching phone the duplicate shows up. The Civi and Drupal logs don't show anything related. Thoughts?

Civi v5.24.3, Drupal v7.69, PHP v7.1.14, MySQL v5.6.41-84.1, Webform v7.x-4.22, Webform CiviCRM v7.x-4.28.

Per Karin's advice, filed bug report on Core - https://lab.civicrm.org/dev/core/-/issues/1767. Filed a separate one for webform_civicrm - https://www.drupal.org/project/webform_civicrm/issues/3137284. Both are needed for our use case.
I proposed patches with each issue, should anyone else run into this before it is fixed properly. BTW, good to know that the phone match is based on digits only. All formatting & decorations are stripped off.


Deleted flag missing from activities returned from API when getting by contact id I would like to fetch activities by contact_id and only return non-deleted activities (or, failing that, return them all but filter them afterwards by is_deleted). But I find that passing is is_deleted=0 does not make any difference and the is_deleted flag is not present on the returned data.

I guess this is a bug in the API? Is it known? I searched Jira but couldn't see it. If not I will file it and look at submitting a patch.

I can think of one workaround which is to fetch all the activity ids for the contact and then loop through them fetching each activity (since in does not seem to work with activity) by activity_id and is_deleted. But that could be a lot of api calls and means dealing with more async stuff if using JS. Anyone know of a cleaner workaround?

I think the API should return the is_deleted! Having said so, if you want to make sure you have the latest version of the activity you could also use the is_current_revision=1?

Editing to add a suggestion in the comments also by @ErikH, which was the solution I went for:

  Not sure this is of any help but there is an extension for the
  CaseActivity API: civicrm.org/extensions/caseactivity-api


Searching by check number after upgrading to 5.5.0 I recently upgraded to 5.5.0 and now when you edit a pending pay later contribution, add a check number, change status to complete and then i go to search contributions, enter the payment method and search by check number i get no result.

I

I was able to replicate this issue.

Historically, CiviCRM didn't support multiple payments on a single contribution.  So the check number is part of the contribution.  However, now that it supports multiple payments, the check number is part of the financial transaction.

The check number being searched is the contribution's, not the financial transaction's.  I think it needs to be changed; I can't think of a case where it's desirable not to.

I just opened a ticket on https://lab.civicrm.org, financial#37.


The replacement token civicrm-user:one-time-login-url not working in Drupal Rules emails With Drupal and Civi latest, is it possible to send an email with a one-time login url?

We have a scenario in which an admin grants a membership to a new contact. We want this new contact to automatically be given a new user account, and the correct role for their membership, and then send them an email giving them details about their new membership, as well as how to access their membership materials. (Their membership materials are on Drupal pages that are only visible to that membership's role).

So far we've succeeded in all of the above, using Drupal Rules.

However, to make their life easier I'd like to send them a one-time login so they can quickly make a password and get on with their life!

I'd prefer not to use the Drupal 'New Account' email for this purpose, since that has to be the same for all possible new users of the site. Also, we looked into not creating a user for them, and just sending them to the Drupal new user registration page. But that's clunky and these users are not internet savvy; they get lost.

In Drupal rules' 'Send HTML Email' action there is a token for the one-time user login: civicrm-user:one-time-login-url. However, it's not populated. And inspecting $civicrm_user via php print_r in the email shows no sign of this variable.

I did wonder if CiviRules could do all of the above, but I can't see any way to make a user from it, nor any token for a one-time user login - quite naturally since this would be a Drupal thing.

So... any ideas about how to progress this? I'm grateful for your thoughts.

The good news is that it is possible to send an email with a one-time login URL using rules.

There is an issue on the rules module for exactly this ability: problem with mail and one-time-login-url. A patch has been created for this issue that generates a new action in rules to generate a one-time login URL variable which you can then use to insert into an email. I updated the latest version of the patch to work with the most recent dev version of rules.

You will need to access the Drupal user account details in the rule in order to generate the login.


How does one flush the non-database cache (such as memcache) from CiviCRM code? I've seen from a different question a suggestion to use CRM_Core_Invoke::rebuildMenuAndCaches() as the "granddaddy" of all cache flushing. However, I'd like to know if this is only clearing the cache in the database, such as civicrm_cache and so on or if it also clears non-database cache as well such as memcache.

As far as I can tell the above function calls CRM_Core_Config::cleanupCaches() which calls CRM_Core_Config::clearDBCache() and that function truncates various cache tables. Am I missing something? How do the other caching backends get flushed?

Currently the function CRM_Core_Invoke::rebuildMenuAndCaches does not flush the memory caches, even though it will rebuild the database cache, menus and sessions. In order to also flush the memory caches you need to also call: CRM_Utils_System::flushCache( ); (This was confirmed by Lobo but I think it needed to be written more explicitly as an answer and not as how things should be.)


Updating a custom field set for case entity Civi API I have defined a custom field for a particular case type ("adhesion") it's a yes or no field that I need to update when I finish the processing. So I use the Case API to update it passing the id and the new value for the custom field. But this doesn't update the value I get this as a return in the API explorer. I was able to update custom fields in others entities and update case predifined fields using the API.

Is there any explantion for this problem? Any hint on how i can achieve this update action.

Down below is a screenshot from the API explorer

This looks like a bug to me. Looking at the code you can see in civicrm_api3_case_create that if the ID is already set it calls civicrm_api3_case_update.

civicrm_api3_case_update has no call to the CRM_Case_BAO_Case::create method, which is the only mention I see of custom parameter creation in the BAO.

In fact api/v3/Case.php contains only one mention of the word "custom". It's surprising that something like this could have been left out and maybe I'm missing something, but when I tried creating a custom field for a Case locally and setting some custom values nothing was created.

I'd suggest mentioning this in Mattermost or just going ahead and creating a bug report for it on Jira

Edit:

This issue is about custom data being ignored by the case API but is still open.


How to automatically generate a csv file? I need to daily update a list of members between civicrm and an external website on an other web server.
Is there a way/extension to do so from a smart group ?
First step would be to automatically generate a csv file.
It seems that I can't do this with CiviRules.
Second step, would be to export to a certain folder on an external web server.
Any experience or ideas?

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


Does CiviRules extension work on 4.6.x Title says it all really. Just trying to verify if there are known breakages, or if we just need to update the Extension info page

We're using it on 4.6.x sites too and are in the process of adding extra things such as the ability to allocate campaigns. If theres anything in particular you'd like to do but cant maybe drop into a wiki or on the issues list in github.


In 4.7 CiviCase, why does reassigning a role not delete the old one? In 4.7, when managing a case, I try to reassign a role to another contact, but it adds a new one.

It should delete the old relationship. The button is an 'edit' pencil and the hover text says 'reassign'. There is a separate add role button.

The function that is invoked is relationship() in CRM/Contact/Page/AJAX.php but the "cid" value is not set (this should be the Contact Id of the current person holding that role). So the existing relationship is not deleted.

This is a defect. See issue CRM-18698 for details.


Changes in display of batch data entry form in 4.6.x In 4.3.x and 4.4.x, it was possible to see the name and email of the donor when entering a contribution: http://screencast.com/t/vH0CG33LDPU

In 4.6.x, only the name is now displayed: http://screencast.com/t/65HG1fBZ7ZH

For some of our clients, this is extremely problematic because they either need to see whether a particular donor has an email address in the system (so they can exclude them from the email receipt) or because they have multiple contacts with similar names in Civi and use the email address to distinguish among them.  My developer colleague tells me this change was made in core.  My question is, is there a straightforward way to change what is displayed in the contact name field or will it be necessary to resort to code changes?

Thanks,
Lesley

From UI perspective, it is not currently possible to include an email in the select box. Some code changes need to be done.

I was just skimming the code of Common.js file where this functionality seems to be handled.

I guess the formatSelection function is the one which returns to what is seen after the selection of the contacts from the dropdown. You can make a change here to include the email to be concatenated to the name. Something like:

var email = (row.extra.email !== '' ? ' - ' + row.extra.email + ' ' : '');

and then add this to the label.

Well, modification in this file may not be recommended  as changes done here are too core and may affect some other functionality elsewhere. This file is called in almost all the pages of CiviCRM and hence this change would affect all the dropdown present in it.


CiviCRM membership component I need to develop an extension to extend the CiviCRM membership component so that when a membership is created or renewed a record for the membership “period” is recorded.
The membership period should be connected to a contribution record if a payment is taken for this membership or renewal.
i.e. If a membership commenced on 1 Jan 2014 and each term was 12 months in length, by 1 Jan 2016 the member would be renewing for their 3rd term. The terms would be:

Term/Period 1: 1 Jan 2014 - 31 Dec 2015
Term/Period 2: 1 Jan 2015 - 31 Dec 2016
Term/Period 3: 1 Jan 2016 - 31 Dec 2017

Currently, when a membership is renewed in CiviCRM the “end date” field on the membership itself is extended by the length of the membership as defined in CiviCRM membership type configuration but no record of the actual length of any one period or term is recorded. As such it is not possible to see how many “terms” or “periods” of membership a contact may have had.

Appreciate the help, please. Thank you.

This functionality already exists in CiviCRM; however, by default it isn't exposed to the UI.  Look in the database at civicrm_membership_log.

The main difference between what you're describing and what exists is that the contribution isn't tied directly to the civicrm_membership_log record.  Instead of an extension, you may want to extend civicrm_membership_payment to include a foreign key to the appropriate civicrm_membership_log entry.

Alternatively, you can most likely write an extension to correlate contributions and membership periods in the log by date for display in the UI.


Add language files in civibuild Checking the civibuild create parameters I do not see an option to include the translation/language files? That would be really helpfull, I now add them manually after a civibuild.

What build type are you using, Erik?

The translation files are included in drupal-demo but are commented out in drupal-clean.

Uncommenting the line:

 # extract-url --cache-ttl 172800 civicrm=http://download.civicrm.org/civicrm-l10n-core/archives/civicrm-l10n-daily.tar.gz

in app/config/drupal-clean/download.sh in your local buildkit will mean that localisation files are downloaded as part of the download.

You could go a step further and submit a PR that uncommented that line in buildkit, but that is probably for another day.


push notification for the registerd participants for an event I want to send the push notifications for the participants who have registered for the particular event.How can I approach using drupal push notification module? can anyone please help me?

If you want to send notifications to event participants, the best way to do that is with CiviCRM Scheduled Reminders (https://book.civicrm.org/user/email/scheduled-reminders/)
or with the extension CiviRules (https://civicrm.org/extensions/civirules).

Did you look at those?

If you, after looking at them, prefer a drupal module, you can get the CiviCRM information via the CiviCRM API or maybe even via drupal views.


Civi Volunteer 2.4.1 fatal errors on install CiviCRM 5.33.2 Drupal 7.78 I have just installed Civi Volunteer on Civi 5.33.2 with Drupal 7.78.  No errors were displayed on install.  I am seeing errors, including fatal ones.  I have worked through the Volunteers menu items and found the following:
New Volunteer Project
CiviVolunteer and nothing else
Manage Volunteer Projects
relationship_type_id is not a valid integer
Configure Roles
Working
Configure Project Relationships
getFieldValue failed
Configure volunteer Settings
'volunteer_project_relationship' is not a valid option for field option_group_id
Volunteer Interest Form
Form displays
Search for Volunteer Opportunities
Form working
I followed the various advices, including uninstall and reinstall, running the job to remove the tables, removing the extension files, clearing caches and resetting paths. I have a log file of the errors. I am not sure how to include this.
Any help would be most welcome, as I am trying to persuade a possible new user with some 80 volunteers to take CiviCRM.
Regards
Graham

I think I'm seeing that the only issue is the option group for volunteer_project_relationship did not get created.
If this is just a demo,it might be fine to create the option group manually. I would worry about what else failed if this is a permanent setup.
The install step in question is in the Upgrader.php file in installProjectRelationships(). You can see it is calling  civicrm_api3('OptionGroup', 'create'...  and civicrm_api3('OptionValue', 'create'....
Try going to Administer > System Settings > Option Groups. and create the option group with the settings in the installer.
You can then visit Volunteer > Configure Project Relationships to add the OptionValues. Again, look to Upgrader.php for the defaults.
If you want to get to the root of the matter, I would confirm that all available logging and debugging is enabled and try the install from the ground up. If it still persists with a fresh install of Civi, I would try some other recent releases to see if there really is an incompatibility introduced in the CiviCRM release.
Let me know if you would like to chat about the suitability of CiviVolunteer for the organization you are creating this demo for.
Cheers


How to send a thank to a recipient of a soft credit We want to send a thank you/acknowledgment letter to a donor who has their donation matched by their workplace. We log the workplace match under their workplace organization as a donation and we apply a soft credit to the employee. We use 'Find Contributions' to search for the employee match soft credits. We want to create a thank you letter that pulls in the employee name, the match amount, and the employer. The 2nd 2 variables are easy, but the employee that is linked with the soft credit appears to only be referenced as a contact ID. Is there a way to pull in the {contact.postal_greeting} or {contact.first_name} for this acknowledgment letter? I have looked through various extensions, but have not found anything. Thanks for any advice this group can provide.

I've been writing extensions these past few weeks to address this very scenario, but I haven't finished them completely and haven't advertised their existence yet - in part because of improvements to CiviCRM that aren't in the released version yet.

Ready Now

My Soft Credit Tokens extension adds some name tokens for the soft creditee.  Note that I've only tested this with CiviRules, but should work in the scenario you mention.

There's also Send to Soft Creditee which creates a CiviRules action of the same name, but I don't recommend its use as more than a stopgap for more than a couple of weeks (see below).

I actually have several extensions to improve soft credits; several seem relevant to your situation.

Ready Soon

Instead of the "Send to Soft Creditee" extension, in CiviCRM 5.23+ I've added support for firing a hook on Soft Credit creation/update.  I also added support for "soft credit created/edited/deleted" in CiviRules 5.12+.  Both should be released in early March 2020.  Once both are released, the "Send to Soft Creditee" extension will be obsolete.  You can also get this functionality today by applying the patch linked here and downloading the "master" branch of CiviRules.

Currently, all these tokens don't actually operate on the contribution selected, but on the most recent contribution of the contact who made the donation.  This is due to current limitations in how custom (non-contact) tokens work, but Matt Wire is actively working on a solution.  I work around this by sending the thank-you out immediately via CiviRules.


Image / file upload issue on civivolunteer public form I am just wondering if file uploading (image) is supported in CiviVolunteer as I am having an issue where attaching an image to a volunteer signup form is not being captured / displayed on the view contact details page.

Is this possibly a bug or just not supported by CiviVolunteer?

For clarity on what I have done so far and the results I am experiencing.

We want to add a file upload option on volunteer sign up page that allows the volunteer to add a picture of themself.

So I created a new custom field (file upload) and assigned it to a volunteer application form profile with expected results.
i.e: Field is displayed on public form and also available on the contact record.

However, once the form has been submitted and the new contact created the image is not available on the contact details page.

I assumed the image would be rendered next to the label or possibly a link to view elsewhere.

When editing the contact details from within Civi I am able to upload an image and then upon saving it is rendered on screen.
So it seems that the file upload is working but just not via the public form.

Tested with CiviCRM 5.13.5 and Master branch of Volunteer.

I have attached screenshots to detail what is going on.

Thanks.

da_adamt, Welcome to CiviCRM SE. This seems to be bug in Civi Volunteer extension. I have just submitted a PR for this. Can you try applying patch from here?

Thanks

Pradeep


System status blank - error message changing resource url I'm trying to set up two civicrm installs.  both on same host but  with different domains.

First install seems to be fine so far.

Second install has blank system status page.

I have previously fixed this by changing resource urls to absolute paths so I thought to try this (although I don't know why this should be required as the other install is fine!)

but trying to change the resource urls gives this error:

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.Error type: Could not find a valid session key.

What is wrong with this installation?

The system status page uses ajax requests. Browsers won't let ajax requests access data on a server that has a different hostname from the one where the request started.

So your second install can be accessed by a different domain but thinks it has another name. You can check this in your browser's developer tools -> network tab to see what url the system status page is trying to access.

For example you are visiting my2ndsite.org but the system status page is trying to access someOtherName.org.

If you state which http server (e.g. apache) and which CMS (e.g. drupal) and maybe some details about your virtual host config it would help give a more specific answer.


CiviCRM menu bar corrupted after installing Shoreditch I'm trying out the Shoreditch theme (originally for Mosaico, but it's so much more useable I'd prefer to keep it on by default if possible). I see weird white blocks at each end of the CiviCRM menu bar.

Is this a bug in the current version of Shoreditch, or have I done something wrong?

There has been some work going on to support shoreditch for CiviCRM 5.13. The temporary solution(until a new release is available) is to make the Menu colour to white by navigating to CiviCRM >> Administer >> Customize Data and Screens >> Display Preferences. Update the form by changing the 'Menu Color' to white

Cheers

Pradeep


Tracking the Processing of New Members As part of our joining process we send out a membership pack to new members. This involves exporting the name and address details to a mail merge to produce a membership card.

What is the best way to track and process these new members? I was hoping to use the membership status but that only works on dates. Would a custom field or a tag or group be the best approach?

Regards

Steve

if you are wanting to track who was sent something, then I would create a new Activity Type for 'send member pack' and then via a Search  you would be able to add an Activity to any member that you are sending the pack to, and set it to Completed, and hence you know the job has been done.

NOTE: when adding an Activity to lots of contacts via Actions on the Search screen there is a small checkbox that lets you specify whether you are making one Activity that relates to LOTS of contacts, or one Activity for EACH contact. You are welcome to choose, but i would suggest doing the latter option, so you have a single Activity record for each Member.

EDIT: (per frTommy suggestion) You could automate this somewhat by utilizing CiviRules to Schedule an Activity of "Send Member Pack" whenever a Membership is added


how to retrieve non-grouped contacts? Civi 5.15.1, Wordpress 5.2.3

I'm trying to get a list of all contacts who are not in any group (Smart or otherwise). I've done this two ways, with the same result: the first is by filtering the Constituent Summary report, and the second is using the Search Builder.

In either case, when I set the Group(s) filter to 'Is Empty', I get this message: "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred."

And when I set the Group(s) filter to 'Is Null' (available via Search Builder only, not the report), the resulting list includes contacts who are in Smart Groups, whom I want to exclude.

I'd prefer not to use the Import Contacts workaround provided by Nicholai here:
How to find contacts with no group?

And @Xavier's extension based on it does not seem to be available anymore
(https://civicrm.org/extensions/lonesome-find-contacts-without-group).

Does anyone have any other ideas? Thanks!

If this is a one off exercise, you can use the advanced search to select all the contacts are in any group (just keep adding all your groups to the group selection box) and create a new group "in any group". Then use the include/exclude custom search to exclude all the contacts on the "in any group" group. Then you can add them to a "not in any group" group.

Actually you could probably do it straight from include/exclude custom search.


Authorize.net is upgrading to CyberSource SCA. Will our payment gateway still work? Auth.net tell us that they are upgrading our account to CyberSource and that this entails moving to Strong Customer Authentication (SCA).

Looking at their information on this, https://www.cybersource.com/en-EMEA/psd2/upgrade/, it seems likely this will have substantial impact on the code of the Auth.net payment processor. I'm not at all sure about this... but wanting to ask the question just to be sure!

I think Auth.net plan to make this change in the next month or two, so if changes to code are necessary then this will need to take place soon!

I've phoned Auth.net support, but they are very hazy about whether code changes will be required. They 'think' 'maybe not'... Hmmm!

They said that they are merging with CyberSource and that they are therefore merging the best of their software with the best of CyberSource's software. Furthermore, they said they are receiving developers bit by bit, and currently the information is trickling out to them day by day.

We are on civicrm and drupal latest, based in the UK.

Does anyone have any details about this?

We updated the AuthorizeNet processor here: https://github.com/mattwire/com.donordepot.authnetecheck for both echeck and credit card.

However, it looks like AuthNet will not be supporting SCA (so you'll be fine for non EU payments) but will need to switch to Cybersource to accept EU payments via credit card.  It looks like Cybersource is supported by the Omnipay processor https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor


Can I customize the contact relationship tab to show custom fields? I have a relationship type with some custom fields.  Is there any way to customize the relationship tab under a contact, to display those custom fields?  Instead of the default Start/End/City/State/Email/Phone?  I have looked at the templates used, and ultimately the data to populate the oTable seems to come from an ajax call to civicrm/ajax/contactrelationships

I'm pretty sure I'm at a dead end, but figured I'd ask here before giving up.  Thanks!

Which CiviCRM version are you using? If 4.4, then it looks as though this extension may do what you want:

Custom Contact Relationships Tab

If you're using a more recent CiviCRM version, it may be worth contacting the maintainer of that extension to see whether they are working on support for more recent versions.

There was some discussion of this feature on the old Civi forum in 2013:
Changing relationship fields on the relationship tab. But please continue the discussion here rather than there. :-)


How do I delete a contribution If I have entered a contribution in duplicate, how can I delete one of them?  I do not know what to try before asking my question.

Go into CiviCRM admin>Contributions>Find Contributions to find the relevant contribution(s).  When the search is complete, on the very right hand side of the Find Contributions screen and in the relevant row, you will see the word "Delete".  All you then need to do is click on "delete" and the contribution will be deleted.

Alternatively, if you are viewing a contact record, choose the "Contribution" tab where the contact's contributions will be listed.  The "Delete" button is on the right hand side.


How to show by default Contributions Tab in Contact Summary Page? If I want to access to a Contact Summary Page, I go to url:

http://<my_site>/civicrm/contact/view?reset=1&cid=<contact_id>

Is there any parameter I can add to url (or other way) where I can access to this Contact Summary Page but showing the Contributions Tab by default?

I don't think CiviCRM allows this out of the box, but you can achieve this by following the below steps using JavaScript:

Using JavaScript check to see if the page url have '/civicrm/contact/view?reset=1&cid='
Then set below two attributes in  to true:

aria-selected="true"
 aria-expanded="true"

Where id = tab_contribute

Example:

<li id="tab_contribute" class="crm-tab-button ui-corner-all livePage ui-tabs-tab ui-corner-top ui-state-default ui-tab ui-tabs-active ui-state-active crm-count-1" role="tab" tabindex="0" aria-controls="ui-id-23" aria-labelledby="ui-id-22" aria-selected="true" aria-expanded="true">

If your CMS is drupal, you can use JS Injector module to include javascript which provides functionality to run JS on specific pages.

Let me know if you need more help.


Search builder operators do not work for Preferred Communication Method You can reproduce this yourself on the demo site:

Search Builder > Contacts > Preferred Communication Method = Phone

Returns the exact same results as

Search Builder > Contacts > Preferred Communication Method != Phone

See the screenshots:

and then:

You've found a bug.  Check out Reporting a Bug, starting with step 7.

As a point of interest - variations on this bug have been reported before. For instance, CRM-6652, several years ago, which was only fixed last month with CRM-16483.

If you're looking to patch this yourself, I would definitely look to CRM-16483 as a model.


Modifying Contribution and Event Templates I am trying to modify the confirmation and final page (not sure of the name) for  contributions and events. I want to modify the templates like described in this post - Why does the Contribution page amounts appear as a quanity?.

A few questions:

How do I find what template to modify?
How do I know where to put the custom template?
Is it best to just modify the template or to put this in an extension? I already have an extension with some simple JS.

I appreciate the help.

Thanks!

You're looking for the Confirm and ThankYou templates - they live here - for Contribution pages (and tree structure is very similar for Event):

Two options to override them:

add a custom_templates directory in the System Settings -> Directories - mimic this entire three.
or yes put it into your extension! I like that option better as I tend to forget about custom_php and custom_tpl when I upgrade sites. Same thing - in your extension -> copy the entire tree starting with templates - of course rename everything. Perhaps you already used civix to create your extension? Then you should already have a templates/ directory ready to be used!


Select contacts to register for events does nothing - how to fix? User selects one or more contacts, then selects action 'Register participants for event' and nothing happens - zilch.  In fact, none of the actions work at all.  This system was restored last Sunday after a migration failure, so I rebuilt triggers with civicrm/menu/rebuild?reset=1&triggerRebuild=1 but this didn't fix the problem.  So perhaps something broke in the restore?  Release 5.28.3 / Drupal. Ideas on how to fix, please?

I fixed this by disabling the Bootstrap theme and then re-enabling it. Other users had also had this problem, usually involving Shoreditch and/or Bootstrap.


Message Template Token limitations We want to use Message Templates for tailoring our sponsorship renewal invoice reminders. We have multiple sponsorships setup as separate Membership Types with corresponding prices sets.  However data about "membership" is NOT available as tokens when using Message Templates. That data is available as Tokens when using  Schedule Reminders - but this means a separate Reminder is to be setup for each Membership Type. Question is why cannot Membership data (and for that matter Event data) be available as Tokens under Message Templates?

Welcome to StackExchange Grant!

In regular messages token for other "entities" such as memberships, contributions or event registrations are not available because each contact can have any number of them.

For example, if a contact had two memberships or event registrations, CiviCRM would not know which data to "fill in" when sending the email.

This is why CiviCRM has several special functions such as event and membership reminders or thank you letters for contributions.


Why am I unable to edit a price set? For some reason I timeout when I try to edit a price set. I have maybe 30 custom price sets or so (mostly because I have had this problem for awhile, so I have to create a new price set with every new contribution page (if I want to modify the price set in any way, like, for instance, change its expiry date). This happens no matter whether the price set is in use, cloned or created from scratch without any connection to a contribution page or an event registration. I just get a spinning CiviCRM triangle of death. Nothing gets saved.

I am using 4.6.26 on D7.

P.S. I am able to make the changes to the tables. The only change I need to make is to expiration fields. However, I don't see why I shouldn't be able to make those changes from within the regular edit screens in civicrm. Something is definitely wrong somewhere.

P.P.S. I just discovered I cannot edit profiles either. This must mean there is something wrong generally, perhaps the server or permissions. There is a workaround for the profiles which is to use the editor function in the "list view" for the profile. I can click on several of the fields to edit, but not in the general edit screen (accessible by clicking the "edit" link in the far right column). Whatever, maybe someone else has solved this issue?

You may have already tried this, but if the window that you do the Edit in is a popup, then instead of clicking Edit to get the popup, right click and open in new Tab. Then there is more of a chance that you will see any errors being generated. May not apply in your case but it can be useful to know.

(Decided the comment i made was worth posting as an Answer.)


WP CivicCRM Menubar styles not loading In display preferences I have an option to set the menubar above or below content, but the styles for the menubar are not loading. It just dumps the list of links. Any ideas what the deal is?

Welcome to SE! You don't give a lot of detail. Are you just setting up or did it work and now it doesn't?

I've seen something like this (though the menu items were part hidden under the LH WordPress menu) when I'm hosting in a subdomain. Possibly because of the symlinks in my hosting provider. I got round this by going to Adminster >> System Setting >> Resource URL (or http://..org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Furl&reset=1 if you can't actually see the menu) and changing the Image Upload URL to http://..org/wp-content/uploads/civicrm/persist/contribute/

Can't remember now how I worked that out as it isn't obvious!

If that doesn't work you need to provide a few more details.