"Cannot redeclare class CRM_Core_ClassLoader" in backup site I had a civicrm 4.4.6 site in my drupal 7 subdomain, which is beta.mydomain.com.
I want to have a backup site to perform update on civicrm, but it shows:

  Fatal error: Cannot redeclare class CRM_Core_ClassLoader in
  /home/mydomain/www/backup/sites/all/modules/civicrm/CRM/Core/ClassLoader.php
  on line 36

Below is my setting scenario:

I created a subdomain, backup.mydomain.com, and copied all the files from beta site to backup site.

In beta site, these are the database: civicrm (drupal default database)  and civicrmdb (civicrm database)

I had copied the database, as backup_civicrm and backup_civicrmdb

In backup site, I made the following changes:

sites/default/settings.php : change database name to backup_civicrm
sites/default/civicrm.settings.php :

define( 'CIVICRM_UF_DSN' ) :    change to  backup_civicrm
define( 'CIVICRM_DSN' ) : change to backup_civicrm
$civicrm_root = '/home/mydomain/www/backup/sites/all/modules/civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home/mydomain/www/backup/sites/default/files/civicrm/templates_c/'
);
define( 'CIVICRM_UF_BASEURL' , 'http://backup.mydomain.com/' );
define( 'CIVICRM_MAIL_LOG', '/home/mydomain/www/backup/sites/default/files/civicrm/templates_c/mail.log' );

After configuration, my backup site shows error:

  Fatal error: Cannot redeclare class CRM_Core_ClassLoader in
  /home/mydomain/www/backup/sites/all/modules/civicrm/CRM/Core/ClassLoader.php
  on line 36

I had cleared all the files in sites/default/files/civicrm/templates_c , and it does not work.

I found that when I change $civicrm_root to beta, it works.

$civicrm_root = '/home/mydomain/www/beta/sites/all/modules/civicrm';

This is weird. I need to perform upgrade on civicrm, if the root is link to beta, I'm not sure how this will affect my update.

Am I missing out any configuration? Any idea on what is the problem?

It sounds as though there is either a cached path to ClassLoader.php somewhere or there are two copies of the CiviCRM code under your modules directories. Various scenarios and solutions are discussed in this forum post: svn installation says "Cannot redeclare class CRM_Core_ClassLoader" Please post back here rather than on the forum, though.

If you're sure that there aren't multiple copies of CiviCRM under /home/mydomain/www/backup/ then the most likely fix is to clear the Drupal variable civicrm_class_loader, e.g. using drush:

drush vset civicrm_class_loader ''

There's a good chance the fatal error will prevent the use of drush. In that case, you can delete the row from Drupal's variable table where name = 'civicrm_class_loader'. It's possible the variables are cached in addition -- you may need to clear Drupal's cache tables manually. (A targeted approach -- in Drupal 6, anyway -- is to delete the row from Drupal's cache table where cid = 'variables'.)


Hide CiviCRM navigation menu based on permission Any suggestions for a not-too-hacky way to hide the whole CiviCRM top navigation menu for users who don't have a particular permission? I could load some menu-hiding css or js conditional on permissions, maybe in Civi pageRun+buildForm hooks or Drupal preprocess_page hook - but that feels hacky.

CiviCRM 4.6, Drupal 7.

There's a CiviCRM navigation hook that you could use in an extension but...

To me this is the wrong approach. Hiding the menu does not stop users from accessing those pages or using the API via JavaScript.


Allowing contacts of contacts? Background

We're a membership association for music groups, and are in the process of building our new website, using Civi as both the CRM and for some of the functionality, events etc., of the website (along with Drupal).

Challenge

We would like to try to find a way (in the future) to offer group management tools (e.g. simple contact lists, civicontribute for fees and events etc.) to our members themselves.

I don't think that this is currently possible with Civi, as it would need two levels of data structure, i.e...

Our CiviCRM/website interface: organisations with contacts, payment processes and membership management etc.
Members' CiviCRM/website interface: THEIR own contacts database, THEIR own payment processes for THEIR own membership subscriptions etc.

..but I wondered if anyone has ever tried or thoguht about trying something similar?

Apologies if this is a stupid question, but I'm relatively new to Civi, so not sure what whizzy-amazing functionality might be possible.

Evan from IMBA here. Sorry for replying in a new answer, I don't have the required 50 points of reputation to comment in reply specifically to Lizz Trudeau's answer. I just watched the video Jason (my predecessor) gave at CiviCon 2012, and it gives a really solid overview of how we've tackled this and for the most part we're still set up this way. We've made improvements and enhancements along the way as new features become available in Civi, but the bones of what we're doing are the same. There are loads of things to consider when deciding on a tiered implementation, and a couple of good ideas have been thrown out already. Here's my take on what we've done vs. other solutions presented:

CiviCRM Multi-Site: for us at the time, we didn't have the need or capacity as an organization to support this structure. In our revenue share model, all membership funds are processed and collected by the parent organization and then dispersed quarterly to the chapters. We could certainly set up the payment processors, etc. for each chapter but restricting access to change settings like this would have been an issue. This remains a viable option for us in the future, as our chapters grow in function and capacity. Particularly if we enable a Drupal multi-site structure where IMBA offers chapter website hosting as subdomains of the main site. It's on the table for consideration in 2016.
Relationship Permissions as ACLs has my attention. Our method of using a multi-select custom data field to track multiple contact-to-chapter relationships works pretty well, but can be a little cumbersome and finicky when importing large lists into Civi and a few other tasks. Using relationships as ACLs could be a better way of handling this, but might also trade one set of challenges for another. I think if we were starting from the ground up, this would be a solution we would strongly consider, right now making the change seems rather daunting. We would still need to use custom data fields to track the revenue share component of contributions, to the best of my knowledge.
Using Custom Data Fields to Create Groups and ACLs has worked pretty well for us over the years, has been scalable through multiple Civi updates starting with 3.x all the way to 4.6. We've built some custom code to support it here and there such as increasing efficiency in the back office during data entry, but as Jason said in the video it's largely out of the box functionality. What it doesn't give our chapter admins permission to do is use their own payment processors, access to CiviEvent, etc. There are some pain points but largely it works well. In some ways it's a similar approach to the Relationships, and I think each would have their own challenges and strengths. Co-branding with our chapters is super important, and using the custom fields allows us to pull that data in searches, reports, and other lists which are then sent to vendors for doing membership fulfillment, renewal messaging, and even some region- or chapter-based variable content in our quarterly print magazine for instance. We're also making some changes to these custom fields to (hopefully) enable us to place custom tokens into email messaging as well.

Challenges we face:

Better signup UI: Right now we still have just one user workflow on the /join page, and I'd like to revamp this so we send renewing members directly to a contribution page for their specific chapter, rather than sending them through the "join" workflow which requires them to select their local chapter each time. This should be possible using the custom data fields as tokens and contact hashes. We now have over 180 chapters, and having a giant dropdown select is not a good UI solution. We've got some ideas in the works with Fuzion that will address the signup process and provide a better experience for visitors, but still capture revenue share data as needed.
Living with your neighbor's dirty laundry: this remains a bit of an issue with certain features of Civi not easily quarantined via ACLs. That all users can see the entire "From" email address list is one of these things, although minor. A larger one is that our chapters would like us to support Event Registration for their local events, but enabling those users access to CiviEvent grants them access to all other events in the system, not just their own. This may have changed since last I looked, but it has been a sticking point of opening up this feature to our chapters.
Growing our chapter's contact lists: Each "CHAPTER All" ACL group is a smart group based on that chapter's name being in the multi-select custom field. Each chapter's territory is defined by postal code. When a chapter is integrated, we import their list of contacts and also search out any existing contacts in their zip code territory, and add this chapter to that custom field for all these contacts. So the only time we place existing contacts in a chapter's partition (share back contacts from the main IMBA DB) is when the chapter is integrated. As new contacts come to the main IMBA database, they're not being actively shared back the appropriate chapter's partition. This was a conscience decision made years ago, but one that has recently changed. We have an extension that updates a contact's region based on zip code, it will be more challenging to update the chapter affiliation of a contact as each contact can be visible to multiple chapters. (NOTE: a contact can be associated with a chapter outside of their zip code by opting in, attending a fundraiser and signing up for email newsletters is an example of this)
Accommodating members who wish to join multiple chapters: Pretty self-explanatory here. Some of our members want to belong to more than one chapter. Summer home, favorite vacation spots, etc. Our preference would be to NOT implement 180+ membership types, so we're still brainstorming ideas for a solution. And the reality is, right now this challenge lies in sorting out the business rules and requirements, not in database or CRM limitations.

That's just an overview from our perspective, I'm sure I could ramble on and on about everything we've done that's worked and hasn't but I really should get back to testing some new functionality. Feel free to ping me with questions, I hope I helped.


CiviCRM & PCI Compliance Does anyone know if the Core CiviCRM Payment Methods are PCI Compliant. We want to use the eWay payment gateway in Core but not sure what the setup is of the payment processor. I know PCI Compliance requires a whole number of other factors as well but from a Payment processor standpoint I thought I should ask.

As I'm sure you are learning, PCI compliance is a complicated business.  The payment processor (I discuss eWay below) and your own operations play the biggest role in PCI compliance. Some of the issues on the organization's end are:

your own server's security protocols (including, but not limited to, SSL)
how the payment information is transferred to the payment processor
in-office protocols for access to data both on- and off-line

A great starting point is http://gitbook.civicrm.org/initial-set-up/security.html

One component is whether or not your site is utilizing SSL.  The CiviCRM wiki on Security and PCI Compliance has some excellent points about SSL.

CiviCRM itself does not store credit card information in the database, but if you are collecting credit card info on your Civi forms and then sending it to the payment processor, the credit card info will be on your server temporarily by default (see Lobo's comment here from 2011) so your server will need to be PCI compliant.  (Eileen mentions options like direct post and transparent redirect in this CiviCon talk for certain payment processors, but that takes some semblance of custom work: Adventures in Payment Processing).

For eWay specifically, their website says they are tier one PCI DSS compliant. If you are sending people to an external site for eWay to process on their site (I don't know if that's an option for eWay), then a lot of the responsibility for PCI compliance gets off-loaded as well.  If you are collecting credit card info on your own Civi forms and then sending the info to eWay, they have a page about your organization's responsibilities in PCI compliance.

A great explanation of PCI compliance and things an organization should consider relating to PCI compliance is available from this CiviCon Denver 2015 talk: CiviCon Denver Data Security and Payment.


Creating Drupal Accounts when a sub-type CiviCRM Contact is created - created by a webform I have a scenario - which I have no doubt that others will have come a crossed and some will have implemented.  The scenario is: to have a web form (created via the Webform module - which has CiviCRM fields integrated into it - via the Webform integration module) that has the CiviCRM fields such as:

the first name,
the last name,
the e-mail address, and
the address
(e.g. address line 1, address line 2, city, post code) etc

and when the user (whom is not logged in - as they do not have a Drupal account)  selects submit

The details entered are saved in CiviCRM, but equally
A Drupal user is created for the user (no doubt using the Rules module in Drupal).

The issue is that

I’d only want the rule fired if the web form was used, not if I create users via the CiviCRM admin interface (as I have sub-type contacts which wouldn’t need Drupal accounts assigned to them)
When I go into Rules - I can find the triggering event, which i assume would be “CiviCRM Contact: Contact has been created” e.g. when a Contact is created the rule will begin to fire…

what I’m not sure about is:

2a. how to configure the condition for the rule to say “only do the action if the contact is of sub-type x” or if triggered by webform x

2b. how to configure the action portion of the rule to create a new Drupal user

2)b)i. there is the “Create a new entity” option under the Entities section in the drop down for action to add, where i can choose “User” as the value …

Image 2: The rules screen - where trigger specified in top section

Image 3: The options user the actions options

 however, on the next screen - where it asks for the login name of the user, the replacement patterns do not provide me with a means of saying use the e-mail entered in the registration form as the User name for the account that I want created; nor does it allow me to specify that the system should pick up the e-mail entered in the web form as use that as the email address for the new account being used.

side note: I do realise at this point having written the above that the rule was written saying do x when event y is triggered - and without specifying that event y should be coming from webform a, which might explain why the action portion of the rule is not providing any replacement pattern for the username - e.g the rule is generic so would be fired if a contact record was created via a different form or the general CiviCRM admin panel.

So… anyone got any ideas on how to achieve what I’m trying to do above?  I assume I can do the above without having to get involved with writing bespoke modules or using hooks etc.

Most of what you need is here: How can I create a Drupal user when someone submits a CiviCRM-Webform? based on @petednz-fuzion's blog post.   It uses civicrm_entity which has seen a lot of activity since the previous question so there may be some changes but hopefully nothing that prevents you following it.

For limiting action to a specific contact sub-type, add a new Condition using 'Data comparison' with a data selector of civicrm-contact:contact-sub-type


How to add Contribution By column My use case is that I want users to be able to pay for another user's Event Participation.

Currently, the display name is baked into the source:

I'm hoping to add a column "Contribution By" to record a link to this person instead.

How can I add a column into this table?

I'd wager that the template you're looking at calls hook_civicrm_searchColumns.  Despite the name referring to "search", it's designed to let you change the values of the columns in tables like the one you display.

I just pushed a simple extension that demonstrates how it's used: https://github.com/PalanteJon/org.takethestreets.campaignincontributiontab/blob/master/campaignincontributiontab.php


PHP Warnings in maildir.php Running Civicrm v4.7.14 on Wordpress v4.7 PHP v 5.6.29

For the last couple of weeks, I've been getting the following PHP warning emails, mostly hourly, from my host's server, after the CRON runs with cli.php.
All permissions are set correctly in root /httpdocs /wp-content /plugins /civicrm /civicrm /bin/cli.php.

My host has investigated the email setup but found no problems.

Everything else with CRON is working normally and all scheduled jobs are being executed as far as I can tell, with the exception of mail_report where error message is "Finished execution of Mail Reports with result: Failure, Error message: A fatal error was triggered:  is not of type String".  I'm not sure whether this has any relevance and it would appear that this message was being received prior to when the PHP warnings started.

Mail() is used (rather than SMTP).

The PHP warning messages are as follows:
PHP Warning:  scandir(INBOX/cur): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  scandir(INBOX/new): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  scandir(INBOX/cur): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  scandir(INBOX/new): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85

Lines 85 to 89 in the Maildir.php file shows:
foreach (scandir($dir) as $file) {
        if ($file == '.' or $file == '..') {
          continue;
        }
        $path = $dir . DIRECTORY_SEPARATOR . $file;

I'm not sure whether I have any missing core files and any help to find out the cause of these warning messages would be greatly appreciated.

What this is suggestive of is that the configuration setting for the mail account look in correct as its trying to retrieve emails to see if it needs to process them (for bounces or replies etc) and it can't find the relevant directories

Seamus


Need to make a group of members who have been members for 5 consecutive years People who have paid member dues for 5 consecutive years get a discount. We do not have rolling membership.  jan 1 to dec 31 with a grace period of 6 months. I think that due to how the info was imported from our last CRM we cannot run it on dues payment.  We have dues payments that are really donations. It would be good enough to be able to find out who has been a member for the last 5 years and then we can add them to our old list.

I tried doing this in reports with a start date of 1/1/2011 end of 12/31/15 but I get people who joined all during that time.

Help

It sounds like you're doing this:

Instead, try this:


Smarty with CiviRules I have a template with Smarty strings.

If I send the email from inside CiviCRM, Smarty works fine (it shows "Cher Guillaume"):

If I send the same template using a CiviRule, it doesn't work:

although it attaches a .pdf file with Smarty Strings inside that also work fine.

Is there a reason related to CiviRule?

Any idea?

best Regards

Guillaume

There used to be a diffence in the way tokens behave in the Email or PDF API, as far as I know this has been fixed in the latest versions of the extensions Email API and PDF API. Can you check if you have these latest versions installed?


How do you get contact_id in a custom form? $contactId = CRM_Utils_Request::retrieve('cid', 'Positive');
$contactId = (int) $_GET['cid'];
$contactId = $form->getVar('_contactID');

Are all possible solutions at different places, but none seem to work when in a Form_CustomData.

In this case the cust data is in an Activity for a civiCase

For the avoidance of doubt, this is to get the ID for the contact (not the user)

Edit: additional info.

Can you explain a little more what you are after in what circumstances?

Generally speaking: when in a form Custom Data I would expect to see something like entityId or _entityID. Depending on the defintion of the custom group this would be the contact_id (or membership or activity etc.)


emails to gsuite addresses bounce I am having trouble sending email to addresses in our own GSuite domain.  They bounce with a "syntax" error, and the addressee gets flagged as ON HOLD.

Using CiviCRM with Wordpress, current versions.

Any ideas, friends?

Sending emails that appear to come from within the organization but are from an outside server is a common scammer's tactic, and Google is much quicker to not deliver these emails.  To get delivery, you'll need to configure an SPF record.  This will improve all-around deliverability - but is 100% required for delivering to your own domain when using GSuite.


iATS Charge to Card on File attributed to merged/deleted record What happened:
1: Went to recurring series. Clicked "Process" on Card on File
2: Put in the amount, left defaults
3: Charge went to iATS and posted successfully.
4. The charge linked to a formerly merged/deleted record of the same name as the record it was supposed to be processed on, unlinked to the recurring contribution.

What could have caused this?

This tells me there are issues with the way in which you have migrated your recurring series from PayPal to iATS Payments and into CiviCRM.


Manage Tags is loading a blank page When a staff or admin goes to manage tags, the page doesn't seem to load anything. I have checked in Drupal permissions that both admins and staff have permissions to administer tags and tag sets (in https://www.fosterclub.com/civicrm/tag?reset=1 or Contacts > Manage Tags).

I checked the following logs and can't seem to find anything related:

CiviCRM sites/default/files/civicrm/ConfigAndLog latest log
Apache
MySQL
Drupal (I use Drupal syslog in /var/log/drupal instead of watchdog)

I have checked in my development environment and the issue doesn't exist, and no code changes have been made or tracked through git.

Has anyone heard of this issue or know what I should try or look for? Thanks!

Edit: Other pages that seem to be affected:

New Tag
New Activity
Payment Processor settings

This was caused from the oldest problem in the book. I needed to delete the everything inside sites/default/files/civicrm/templates_c and then clear caches and make it writeable (chmod 775).

That solved all of the above mentioned page load issues.

We had recently restored the website from an older backup and this always needs to be done when moving or refreshing CiviCRM on the server.


How can I change the 'Postcode' field to work with UK postcodes? I am currently running tests with CiviCRM 4.6.14 and have custom functionality working as we require.  During testing by the end user, an issue has come to light with the 'Postcode' field.

Despite having the UK localization installed, the report filters are still treating the postcode field as an integer.  UK postcodes are a mixture of letter and numbers and I need to be able to query the database using these.
Have I missed something in the localization?  Is there something I can alter so the postcode field is interrogated as an alphanumeric rather than integer?

Any help would be appreciated.
Many thanks
Russell

Short answer:

This is a limitation/bug in CiviCRM. The advanced search handles postcodes correctly (ex: I can search postcode ranges H4 to H5), but most reports do not. It would be a feature that needs to be implemented in CiviCRM reports.

Longer answer, if you are a developer:

We could fix it by changing the filter type in the report, but then US-style postal code would lose the ability to search by range. I'm not too sure how to implement that in the report.

Ex: civicrm/CRM/Report/Form.php in function addAddressFields():

    'postal_code' => array(
      'title' => ts('Postal Code'),
      'type' => 1,
      'name' => 'postal_code',
    ),

Should be:

    'postal_code' => array(
      'title' => ts('Postal Code'),
      'type' => CRM_Utils_Type::T_STRING,
      'name' => 'postal_code',
    ),

but, as I mentioned, this breaks "search postcode between X and Y". The advanced search has a checkbox to enable "search by range", and it works for UK/Canada-style postcodes, but I'm not sure how to implement this for reports.


Civicase . how to copy a timeline or sequence we're setting up a few case types, each of which has half a dozen timelines. Once we have set up one timeline, is there any way of duplicating it? I imagine that the timeline definition is stored in XML somewhere, in which case can I simply cut and paste in the XML?

Thanks.

Using CiviCRM 4.6.8 and Joomla 3.4.3.

As far as I know in principle yes. But my experience with CiviCase is mainly CiviCRM 4.4 and before. I do not know where the case type XML files are stored from 4.5 onwards but you should be able to find that in the CiviCRM documentation wiki.


How to configure mail_report for every mailing? I´m trying to configure the cron job mail_report. I need an email to be sent to the address example@myaddress.com every time a mailing is sent. The screen to configure it is in the following image

What are the command parameters I need? I don´t see it clear in the "lear more" help..

Thanks a lot!

Hi davejenx, here´s another picture of what is happening now. I´ve put the id of the instance report (28 is the bouncing report). The log entry doesn´t seem to raise an error, but the screen gets blank on that url and does nothing :s

What I´m doing wrong?

Many thanks!

See Managing Scheduled Jobs, for mail_report:

  Generates and sends a copy of the specified report instance to the
  email addresses configured in that instance's Report Settings.

So you specify the email address in the settings for the report instance, not in the settings for the scheduled job.


How to setup an auto email for a specific group sign up? I am looking for instructions on how to set up an auto email when someone signs up and joins a specific group.  Thank you for your assistance.

Agree with Peter, you can find the CiviRules extension here: https://civicrm.org/extensions/civirules (or in the extensions list when you do Administer>Extension and then click on the Add New tab)

Documentation on how CiviRules work can be found here : https://docs.civicrm.org/civirules/en/latest/


Why do custom fields on Membership not pre-load when a member is renewing There was a discussion on the forum here - which suggested that the reason this happened was because Contributions should alway be loading fresh data.

The jury seemed to be out on whether that should be default behaviour for Member fields.

Our scenario is members join up, and use Contact Reference field to assign themselves to a club (and then we build a Relationship from that).

When the member renews we absolutely want this data loading.

My feeling is this should be core behaviour but would be good to canvass opinions on this.

We tried the suggestion to

  hack /srv/www/yfnz/yfnz.fudev.co.nz/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php
  line 33 $removeCustomFieldTypes = array('Contribution', 'Membership');
  needs to be changed to be $removeCustomFieldTypes = array('Contribution');

and it did what we needed.


Automatically recording electronic fund transfers for members We will receive a lot of individual transactions via automated electronic funds transfers from our members' internet banks. I would like to record these, but it seems very cumbersome to do "Batch Data Entry" for each individual member and each individual transaction.

Is there any way in Civi to automatically record these EFTs every month (linked to the member in question)?

Kindest regards,
Frederik Federspiel

There would not be an automatic process.

Save a CSV spreadsheet(s) with the list of transactions. Every month, you can change the date column and import it into Civi.


How can I have a paid membership sign up that includes an option for a paid premium version? Our primary membership sign up is via a dropdown list of options at different prices.  Regardless of which option is chosen, we would like to give the sign-up person an option to upgrade (via an additional check box? to a premium version at a fixed additional price.

This could be done by creating a price set with the premium option, and then using the civicrm_post hook to make the change once the transaction was successfully completed in the DB.


Example of membership sign up? We're considering Civicrm for our membership database, but my client would like to see an example of what the look/feel would be for a new member signup. Is there an example/demo that someone can point me to?

There is the generic CiviCRM demo, but that only shows the back-office part (see https://civicrm.org/demo). I assume your client would be interested in the outside facing web part, and that entitely depends on what you can do with Drupal, Wordpress or Joomla. It will be hard to show you one example that gives you an idea of what the new member sign up looks like not because they are not there but because there are so many!


Personalized Drupal login link I can send out personalized links from CiviCRM, as described here.
https://aghstrategies.com/content/how-create-one-click-personalized-links-civicrm-emails

They contain the contact id and a checksum that civicrm manages. Following the link will 'identify' the user.

Can I use such a link to have a contact that has a Drupal account log in to Drupal ?

I have a module in which I can create a menu router, validate the url, find a drupal id, log a user in, and redirect, I reckon. But to validate the url, I have to validate the checksum which afaik is not in the API, so I have to call the deep dark Core::BAODAO magic.

Is there an easy way to do this ?

If not, can someone sketch the BAODAO part ?

I was looking for a way to validate the checksum at one point, too. Here's what I found:

CRM_Contact_BAO_Contact_Utils::validChecksum($cid, $_GET["cs"])

which takes a CiviCRM contact id ($cid) and compares it to the checksum in the URL and did the trick for me.

UPDATE:

It looks like the usage has changed slightly in core since I pulled the above out of there (although the above was still working for me). Below was taken from here:

    //check if this is a checksum authentication
$userChecksum = CRM_Utils_Request::retrieve('cs', 'String', $this);
if ($userChecksum) {
  //check for anonymous user.
  $validUser = CRM_Contact_BAO_Contact_Utils::validChecksum($tempID, $userChecksum);
  if ($validUser) {
    return $tempID;
  }
}


Do I need root access to my database to use CiviCRM? After installing your plug in, I looked at the CiviCRM installer page and was shown an error which said "unable to create database triggers".  I have shared hosting.  Is it possible to still use this plug in?

No, you don't need to have root access to the database. However, the database user does need to have the following permissions:

SELECT,INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, TRIGGER, CREATE ROUTINE, ALTER ROUTINE

It sounds like the database user doesn't currently have the required permissions to access the database.  You should check with your website host to see if it is possible to get these permissions, but not all shared hosting packages will allow this level of access to the database.  If this is not possible with your hosting package you may need to look for a hosting package that does meet these requirements.

See the wiki for more details: CiviCRM MySQL Permission Requirements

And this page for the general requirements: Installation and Upgrades


How do I determine how many active members there were on a date in the past? I've been asked to mine CiviCRM to determine how many active members we had on a particular date in the past, i.e. How many active members did we have on Dec 31, 2015?   Is there a search or report that will show me this?

I think you can do this via Find Members since to be an Active Member on that date you need

a start date before that date AND
an end date after that date


Submit Credit Card Membership (or Event Registration) Not showing in Admin Not exactly sure what happened, but now the Submit Credit Card Membership option is not available in the Admin side of a Joomla install (v3.5.1). All seemed to be working fine, but then it disappeared. I tried recreating the Payment Processor and selecting it in the Contribution Page, but no luck. Then I opted to update to CiviCRM to 4.7.8 to see if that was the issues, still no luck. I am hoping it is just some sort of reset, otherwise our site is dead in the water with a conference coming up.

Looking at your issue: See CRM-15394

David Greenberg added a comment - 30/Sep/14 12:03 PM
The back-office 'Submit Credit Contribution' feature is only available when the site has at least one configured payment processor of the type that allows credit card data to be entered within CiviCRM forms. This includes Paypal Pro, Auth.net and iATS. The link is hidden on the demo because the configured 'Test Processor' does not support this.


Trapped by MySQL 5.6 HostGator has frozen their shared platforms at MySQL 5.6 with no plans to offer MySQL 5.7 to the shared packages, even though 5.6 went EOL on February 5th, 2021. They're pushing people to use their Virtual Private Server which is about 10x the cost of shared. So, if you're installing CiviCRM, DON'T host with HostGator.
We'd like to stay up-to-date on CiviCRM, at least the security fixes, but the only option seems to be to pay for Extended Security Release. Are there any alternatives for those who have been locked out by their hosting platforms?
cheers ... :) gn

Geoff - although I do want to encourage you to upgrade your mysql you are still able to install the free version of CiviCRM on mysql 5.6 at this stage. We are discussing when to stop supporting it over here https://lab.civicrm.org/dev/core/-/issues/2481


Problem with wp-cli and setting up cron in CiviCRM I'm trying to set up the CiviCRM cron job.

I've downloaded and installed wp-cli according to the instructions on

http://wp-cli.org/

I have logged into the server as the user running the cron job.

I can successfully run this command in the shell:

 /usr/local/bin/wp  --url=https://<URL of Server>/ --path=/home/<userDir>/<hostingDir>/ civicrm api job.execute auth=0

But if I run the same command in cron it returns this error in the Cron email:

===============================

Set-Cookie: PHPSESSID=73sl011599lmjbg5038j5n06q4; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8

Warning:  fwrite() expects parameter 1 to be resource, string given in phar:///usr/local/bin/wp/php/WP_CLI/Loggers/Base.php on line 61

Warning:  fwrite() expects parameter 1 to be resource, string given in phar:///usr/local/bin/wp/php/utils-wp.php on line 118

Warning:  Cannot modify header information - headers already sent by (output started at phar:///usr/local/bin/wp/php/WP_CLI/Loggers/Base.php:61) in /home/<userDir>/<hostingDir>/wp-includes/pluggable.php on line 1216

========================================

I've also run the whoami command via cron and it confirms that it's the same user running in the shell and the cron job.

Running wp --info in the shell gives this:

OS:     Linux 3.10.0-514.21.2.el7.centos.plus.x86_64 #1 SMP Wed Jun 21 17:20:54 UTC 2017 x86_64
Shell:  /bin/bash
PHP binary:     /opt/cpanel/ea-php56/root/usr/bin/php
PHP version:    5.6.33
php.ini used:   /opt/cpanel/ea-php56/root/etc/php.ini
WP-CLI root dir:        phar://wp-cli.phar
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /home/<userDir>
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 1.5.0

=================================

Running wp --info in the cron job gives this:

OS:     Linux 3.10.0-514.21.2.el7.centos.plus.x86_64 #1 SMP Wed Jun 21 17:20:54 UTC 2017 x86_64
Shell:  /bin/bash
PHP binary:     /opt/cpanel/ea-php56/root/usr/bin/php-cgi
PHP version:    5.6.33
php.ini used:   /opt/cpanel/ea-php56/root/etc/php.ini
WP-CLI root dir:        phar://wp-cli.phar
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /usr/local/bin
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 1.5.0

================

Now, the PHP binary paths are different. As is the WP_CLI phar path.

I'm assuming this may be the problem?

But I don't know why they are different, or how to reconcile them...

Any insights gratefully received.

Thanks,
Norman

After much research and getting expert ideas...

(I'm sure this is known to many people here, but I'm posting here to hopefully help others who don't know this.)

TLDR; in Cron jobs, you should fully specify the path to the PHP binary as well as wp-cli.

=======================================

Cron runs in its own minimal environment. It does run as the relevant user, but it does not load most of the user environment info. This post was helpful for me to understand some of this:

https://serverfault.com/questions/337631/crontab-execution-doesnt-have-the-same-environment-variables-as-executing-user

I am running cPanel which does some of its own management of php. The cPanel support people were very helpful in helping me understand more.

What is not obvious is that when you login to a shell, various paths are added, even ones that are NOT in the user's .bash_profile. Cron does not necessarily do the same thing.

One that is added with a shell login is /usr/local/bin/

So typing "which php" in a shell gives /usr/local/bin/php, but in cron it gives /usr/bin/php

In cPanel, or indeed other tools I expect, this contains references to specific php binaries that can change depending on what user you are.

I don't pretend to understand the underlying mechanism.

But the upshot is that the php command points to a different binary in the shell or via cron.

So in the cron job, you ALSO have to point at the specific php binary with a command like:

/usr/local/bin/php /usr/local/bin/wp --info (etc)

Or even a FULL path to the desired php binary:

/opt/cpanel/ea-php56/root/usr/bin/php /usr/local/bin/wp --info (etc)

In cPanel there is also a known problem when using PHP-FPM for a site where the automatic PHP detection doesn't work, so it falls back to the cPanel PHP default. They are working on fixing that. If this is a problem, then setting the full path to the desired PHP binary will work.


On CiviContribute forms within WP, the behavior of predefined amounts and an "Other Amount" input box is broken For CiviContribute forms in WordPress that have predefined fixed amounts ($25, $50, $100, ...) and that also allow an "Other" amount, it seems that the javascript that is supposed to clear the fixed amount radio buttons when an "other" amount is filled in is broken. I'm using Civi v.5.4.0 in WordPress v.4.9.9.

The malfunctioning behavior is also reported here, but the CMS is not indicated. A couple javascript solutions are posted— but this should work out of the box with Civi, right?

Looking under the covers, I see there are javascript functions clearAmountOther() and useAmountOther() that are wired to the onclick events for the radio buttons. However, the DOM structure the code refers to is invalid. There is no document.Main.amount_other.

function clearAmountOther() {
  var priceset = 0
  if( priceset ){
    cj(priceset).val('');
    cj(priceset).blur();
  }
  if (document.Main.amount_other == null) return; // other_amt field not present; do nothing
  document.Main.amount_other.value = "";
}

As a result, if you select a fixed amount like $25 and then enter $40 into the "Other Amount" box, the contribution is the sum $65. This is likely to surprise donors!

Is this a known issue? A bug that needs to be fixed?

I have experienced this behavior in two different situations. In one situation, the Contribution was using a manually created price set that mimicked the behavior of the contribution page with "Allow other amounts" checked. The javascript code is not added for these price sets since CiviCRM can't really tell how they are supposed to work. Switching the contribution page to use the amount options provided by the page itself instead of a price set should solve that problem.

However, in another case, the onclick event was not added because the price set value field's name was "Contribution_Amount" instead of "other_amount". I don't know why the price set value field's name was not created properly.

The code in question is in CRM/Price/BAO/PriceField.php:

if (!empty($qf->_quickConfig) && !empty($qf->_contributionAmount) && strtolower($fieldOptions[$optionKey]['name']) == 'other_amount') {
  $label .= '  ' . $currencySymbol;
  $qf->assign('priceset', $elementName);
  $extra = ['onclick' => 'useAmountOther();'];
}

I figured out which price field value record was the one being used and manually updated it with:

UPDATE civicrm_price_field_value SET name = 'other_amount' WHERE id = 934;

This isn't a great answer to your question - more of a work-around. Figuring out why the price field value record was added with the name set to "Contribution_Amount" would be better.


Custom data: Can the Input Type Field be None? Here's some context:  I want to implement a Kinko's style self-serve credit system for the big tools at our maker space.  Members scan their RFID cards to sign in to the laser cutter, CNC machine, 3d printers etc. and credits are deducted from the members account per job. The part of the scenario that's relevant to CiviCRM is where to store the members credit amount and how to add to it. All the deductions happen without CiviCRM.

The overall idea I had, is for a custom contribution page to read the users current credit amount value from the database, add it to the contribution value, and put the result back in the users credit amount field.

Finally, my questions!  If I use Custom Data to store the users credit amount, is it possible to set the input type to None?  This shouldn't ever be a value that gets manipulated without a contribution, or deduction.  Am I better off creating a table manually?  If you were in my shoes, would you use Custom Data for this?  I'd like to keep it in the system if I can, so others can readily use it.

Yes, you can use custom data for this. When creating/editing your custom field, enable the "View Only" option:


Why Can't I use an Organization Profile type in a Contribution Page? I want to create a contribution page for organizations specifically.  So, I create a profile with the "Organization Name" field.  This makes the profile type Organization (as opposed to Individual).  When setting up my contribution page I'm unable to select my Organization Type Profile from the drop-down menu (Individual Type Profiles work fine).

I have modified the "On Behalf Of Organization" profile to include the fields I desire and selected the [Allow individuals to contribute and / or signup for membership on behalf of an organization?] check-box.  Other than the user having to check a box to see Organization fields, this works fine.

The problem now is that I can't setup the form to be a "cid=0" URL form, which gives the user the option to lookup a contact record and have the fields populate upon selection.  The lookup works on the Organization form, but when I click the organization I want CiviCRM doesn't populate the fields and I get this error: "Error Mandatory key(s) missing from params array: profile_id"

The web form I have put together for Individuals works great with a "cid=0" URL for lookup and auto-populate.  Why can't a form with organization fields work the same?

You kind of have two questions here: the second being an issue you ran across after addressing the first.

To start with, yes, the main profiles on a contribution form are limited to contribution fields, individual fields, and fields for all contact types.

The presumption is that only individuals have fingers to fill out a form; even if the form is an organization's membership or donation, it's really an individual acting on behalf of the organization.  However, you already solved this: you started using the "on behalf of organization" options.

I know the feature you describe with the cid=0 for filling the donation form as someone else, but that box should only allow you to select individuals, since it's filling the parts of the form that are individual-specific.  Meanwhile, it wouldn't necessarily make sense to fill the organization fields, because an individual may have any number of relationships with organizations.

If someone were to extend CiviCRM to add a second box for selecting the organization that is related to the individual making the contribution, that would be a nice feature.  However, it doesn't do it at the moment.


how do I turn off access control and allow all users to see all contacts? When we started setting up civicrm many months ago we applied access controls so that users wouldn't see any contacts until we add them to their particular group. Over time we've come to the conclusion that there are too many situations where we need to see each other's contacts, so I've been requested to undo the access controls and leave it more wide open. What is the cleanest way to make this transition?

There is a permission in the CMS (Drupal, Wordpress, Joomla) called "CiviCRM: View all contacts". Give this permission to any role/user that is supposed to see contacts in CiviCRM.


How do I find more information about the ACL regression introduced in 4.6.7? Email was received stating

  If you are currently using 4.6.7 and your site uses ACLs to segment access to contacts you are strongly encouraged to upgrade. The 4.6.7 release included a regression in the ACL system which caused certain contact access permissions to behave improperly. The 4.4 LTS branch was unaffected.

There is no additional information provided at https://civicrm.org/advisory, and I don't see any issues in the Jira queue marked with a 4.6.8 fix version that would give more context for site administrators to judge whether an immediate upgrade is necessary or if it could be delayed.

I've posted an advisory now: CIVI-SA-2015-008: Access bypass in CiviCRM 4.6.7

CiviCRM 4.6.7 introduced an access bypass issue which applied a limited number of sites.
The issue affected only certain configurations, where the site used ACLs to limit access, and applied to users whose permissions included “access CiviCRM” and “view my contact” but not “view all contacts”. Changes introduced in CRM-16512 allowed the “view my contact” permission for those users to incorrectly grant access to all contacts.
This issue is mitigated by the fact that only sites so configured are affected, but for sites affected the potential severity led us to make an out of schedule security release.

If your users with "access CiviCRM" also have access to all contacts (many smaller sites), you are not affected
If you are not using ACL functionality, you are not affected
If you did not upgrade to 4.6.7, you are not affected (but you should check you have applied the security fixes in that version!)


Menus do not load on some pages I am attempting to correct an issue that has plagued me since setting up CiviCRM. The issue remains for me, even after upgrades. The issue is that on some pages within CiviCRM, the menu doesn't fully load, and ultimately renders a page useless. It occurs when I am going to the Civimail component and some other features. It isn't consistent. Here are two screenshots. The first shows the normal menu that appears on most pages. The second image is the image with the broken menu:

Sometimes it is worth visiting /civicrm/admin/menu?reset=1 and right clicking on any menu item, and then click Edit and Save so that you then get the message

  Click here (/civicrm/admin/menu?reset=1) to reload the page and see your changes in the menu bar above.

Otherwise you can just visit that url directly. This may not help with your situation since it seems to be less consistent. But it may help others looking around for such advice


Any new functionality to sync smart groups to Drupal roles? When last I checked CiviGroup Roles Sync did not work with Smart Groups. Has this changed with later versions (I'm on 5.17).

There were some workarounds discussed back in 2017.

It works just fine for us.  We are on Civi 5.8 and Drupal 7.x.


report on price list options? I'd like to create a report that summarizes the number of registrations for each price set selection.
I'd like to quickly show how many people registered at each price level. I know I can create a report of all the people who chose a price option and then get the number at the bottom. However, I have many options and would like a nice summary similar to this:

A1: 27
A2: 12
B1: 17
B2: 2
...

This seems like a reasonable thing to do, but I don't see any way to do it. Possible? Can someone point me in the right direction?

I would give our Extended Report extension a go since it offers Price Set Line Item reporting options

https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport


How can I see the available tokens for message templates? For a page in the browser, we can put &smartyDebug=1 in the URL to see variables in scope for the top level template. How can we do this for message templates?

Insert {debug} into a message template then perform the relevant action (ie make an online contribution if you modified Contributions - Receipt (on-line)). The email sent will contain a list of all the smarty variables assigned to that template


How to install CiviCRM patch (5.7.2 to 5.7.5) on Drupal 7.64 - is my file directory writeable? Currently running Drupal 7.64 and got a notification that I need to install a security patch on CiviCRM. Currently running CiviCRM 5.7.2 and need to install 5.7.5.

Apologies in advance if this question seems a bit unintelligent - but completely beyond my scope!

I read through the instructions in the CiviCRM Documentation and had one question in particular:

Ensure that your Drupal files directory is writeable by the webserver.

Is there a way of doing this through cPanel? I have no idea how to access anything command line-related...

I've updated Drupal before (e.g. from 7.61 to 7.64), not sure if that gives an indication of whether my file directory is writeable?

The rest of the instructions seem pretty straight forward... but is there anything else I need to be wary of? Always a bit hesitant with installing updates for the first time, so just making sure!

For cpanel it's described in more detail at https://documentation.cpanel.net/display/76Docs/File+Manager#FileManager-Modifyfileorfolderpermissions

but briefly open the icon called File Manager and right-click on the folder and choose permissions.

In most shared hosting setups "writable by the webserver" means the user column has write access. Here "Drupal files" most likely means the "sites/default/files" subfolder.

But if you're upgrading and civi was working before it almost certainly has the right permissions already.

If you make backups first you'll usually be safe no matter what happens.


Unable to View Household members on Contact Dashboard CiviCRM was recently upgraded from 3.5.x to 4.6.36
I can see Household members when logged in as an Admin on Drupal 7.50 website.
When I am logged in as an authenticated user,
I don't see the Relationship on contact dashboard

What would be the appropriate permission I need to set to enable authenticated users to view Relationships(household members)?

In recent versions of CiviCRM, if you go to Contact Summary Page, Relationships tab, and edit a relationship, there are options there for each side of the relationship to edit, view or have no permission for the other contact. I'm pretty sure this predated 4.6.


Database name on Wordpress can't include hyphen, but our host has mandatory prefix-hyphen-name format Is there any way we can work around this?

Our Joomla install was quite happy to use a db of format xxnn-yyyyyy.

When we create or rename db using phpMyAdmin we can only choose the yyyyyy. "xxnn-" is automatic.

The CiviCRM Installer had an error to the question
"Is the provided database name valid?   The database name provided is not valid. Please use only 0-9, a-z, A-Z and _ as characters in the name."

Found how to resolve this one, but bit concerned that this fudge might break something further on down the line.

The CiviCRM installer page is driven by the file: wp-content/plugins/civicrm/civicrm/install/index.php.

This runs various checks and the db name check is on line 464 showing a call to CRM_Core_DAO to function requireValidDBName.

This function is in php file: wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php.  Editing the preg_match string to include hyphens after the underscore allows these in the file name.

public static function requireValidDBName($database) {
  $matches = array();
  preg_match(
    "/^[0-9]*[a-zA-Z_-]+[a-zA-Z0-9_-]*$/",
    $database,
    $matches
  );
  if (empty($matches)) {
    return FALSE;
  }
  return TRUE;
}


NEWBIE - Move Data fields in input form Members,
as a relative newbie to Civi, i would like move some entry forms for a new contact (in germany, zip comes before city...) basically it is relevant to adresses now, but there could be more fields. I know i could create a custom profile for that, but could you give me a hint where to look for the code? i cannot find the tpl-file....

System: wordpress 4.9.8, civi 5.6.0

i hope my question is understandable ;-).

Thanks very much in advance,

Walter

there is a section in the Developer Guide on templates: https://docs.civicrm.org/dev/en/latest/framework/templates/

This includes some pointers on how to customize templates.
Having said so, you might also be tempted to put this in an extension as you might run into some more "Germanization":-) Are you aware of the German CiviCRM mailing list?


Where can I edit text on pcp page How do I change this text
“This contribution is being made thanks to the effort of [contact name], who supports our campaign.You can support it as well - once you complete the donation, you will be able to create your own Personal Campaign Page!”

I’ve searched high and low - every tpl file in contribute/pcp etc
Is it hardwired somewhere?

Thanks all.

Lesley,

This is set in php and then assigned to tpl. It's being set from two places CRM/Contribute/Form/Contribution/Main.php and CRM/PCP/BAO/PCP.php. Since its being assigned to tpl through php then its pretty simple and easy to change the text using either preprocess/buildform/postprocess hook by over-riding the tpl variable.

Here are list of lines that uses the variable to print the text

templates//CRM/Contribute/Form/Contribution/Main.tpl:177:    {if $pcpSupporterText}
templates//CRM/Contribute/Form/Contribution/Main.tpl:178:

templates//CRM/Contribute/Form/Contribution/Main.tpl:180:
{$pcpSupporterText}

templates//CRM/Event/Form/Registration/Register.tpl:61:    {if $pcpSupporterText}
templates//CRM/Event/Form/Registration/Register.tpl:62:

templates//CRM/Event/Form/Registration/Register.tpl:63:
{$pcpSupporterText}

If you not familiar with using php then you can JS to replace the text. Here is what i would do

Create a Main.extra.tpl under templates/CRM/Contribute/Form/Contribution/ (custom template directory or extension)
Add below snippet in Main.extra

Snippet:

{if $pcpSupporterText}

    {ts}Text to print{/ts}

{literal}

{/literal}

{/if}

HTH

Pradeep


Prefill webform with civicrm activity data I want to prefill a webform with data from a specific CiviCRM activity in order to edit the activity using the webform. I want to do this by having an "Edit" link in a Drupal View of CiviCRM activities. These activities may or may not be associated with a case, so let's assume they aren't. I've turned on "Update Existing Activity" in the webform for all of the statuses.

Can someone confirm that I can do this, and if so, what is the proper form of the URL for the link in the view? I've tried a bunch of different ones and can't seem to get it.

Below please find some screenshots to illustrate how to do this:

1. This is a View of Activities. Each Activity has an Update button [that's a Global: Custom Text field -> Text Update; Rewrite results: Output this field as a link -> to the webform URL with case-worker-form?cid2=[contact_id]&aid=[id] and bootstrap classes btn to make it a button] -> the URL that is constructed is case-worker-form?cid2=41218&aid=19153

2. The webform case-worker-form -> receives this data. That form is set up such that cid1 = the logged in user (the social worker); cid2 = the client; aid = activity id of the activity to be updated;

3. Let's edit the subject e.g. ->

4. Result:

5. Note the Webform just has Update Existing Activity set to None (as we're matching by aid)

Add on:
I've double checked that this is (still) working on our latest webform civicrm 5.x

root@f4d0afb6c36d:/var/www/html/sites/default/modules/webform_civicrm# git log
commit 76b444bf5192ddf4663a0222540684a230d8e39e
Merge: b54ddfd ef2a518
Author: Karin Gerritsen <KarinG>
Date:   Thu Sep 12 11:24:26 2019 -0600
    Merge pull request #251 from colemanw/rel7
    Use api to retrieve relationship data

Add - on config notes:

ensure your views field is configured such that commas are stripped from cid and aid before passing them into the webform
ensure your webform is configured to allow an activity of the type you want updated -> setting it to -user select- will ensure that


Create new contacts every time someone makes a contribution ( with duplicate emails ) Currently, we have a custom profile field on our contribution page named: "Designation" which user need to have, but also we have contributors that make more than one donation and therefore the designation they selected the first time may not be the same the second time they donate.

Can we have a contact created not based on unique email rather based on other fields? because a donor might use the same email id when making the contributions.

Perhaps the answer is to attach the custom field to Contributions rather than Contacts? This way the same contact could make multiple contributions and designate on each contribution (rather than a field associated with their contact record directly) what the designation is.


Error when trying to view profile list on frontend by public I suspect this issue is one of a single configuration not being set properly, but I am at my wit's end to figure out which one...

I am trying to create a public directory of a CiviCRM group of contacts.

I have set up a profile and indicated it to be used for form & list as well as search. Each field of this profile is set to "Public User Pages and Listings" and visible.

In the CiviCRM configuration in the backend of Joomla, I gave permission to public users to view all contacts, view their (my) contacts, profile view, access all custom data.

I created a Joomla Menu defined as public and of the CiviCRM profile list type (associated to the correct profile).

When I try to open the menu, I get an error stating that the "the contact ID parameter to see the contact registration with a profile was not found" (free translation as it is written in French in my DB)

A registered user, on the other hand) can see the directory, so it has to do with a public user not having a contact ID...

What am I missing? How can I have the system overcome this?

Thanks in advance for your help!

Related question (I assume), when a registered user goes to this page, the first thing he sees is his own profile and need to click the "Return to contact list" to view all contacts. Is there a way to make this directory direct so the user sees the table right away?

Follow-up after June 15th comments:
Registered as a test school and when to the URL:

Clicked "Return to contact list" and copied the URL for that list:
https://voile.qc.ca/fr/?option=com_civicrm&task=civicrm/profile&Itemid=1046&force=1&gid=14

Closed session and copied list link public site. Arrived directly at the list w/o the registered user profile data.

It thus seems that the option to view the contact profile needs to be turned off somehow.

But how?

Thanks!

Finally what I did is create a URL type menu (instead of a CiviCRM profile view menu) with the URL of the list once the "return to list" link is clicked. This way, a user does not need to be logged in to see the list.


Can't load custom template We need to customise a template called 'Selector.tpl', we have identify this template with debugging on and copied it into /wp-content/uploads/civicrm/templates/ and this directory is declared in Directories. We followed the documentation and it should work fine when it doesn't. The template is not loaded. We've tried on the original file that gets modify in the desired way but we want to use the custom one. Folder has 755 rights on and File has 644 on. Is there something special to care about?

The Selector.tpl is placed wrong hence its not invoked. It should follow exact path of CiviCRM core module
For example if the Selector.tpl in Core is placed under plugins/civicrm/civicrm/templates/CRM/Contact/Form/Selector.tpl than in template over-ride it should be /home/domain/testwpcivi/wp-content/uploads/civicrm/templates/CRM/Contact/Form/Selector.tpl
Once you have tpl placed under correct directory path clear civicrm cache


How should I move a custom field to a different custom fieldset? Sometimes one needs to rejig which fieldset contains one or more fields after data has been entered in them. For example, you create a new contact subtype and you want to move some but not all of the custom fields in an existing custom fieldset to a custom fieldset for the new contact subtype. You might need to do this when consolidating fieldsets, or just so the fields appear under a more appropriate title when you have several fieldsets for the same objects.

What's the best way to move a custom contact field and its data to a different fieldset?

Mostly you will want to move fields between customs fields sets used for the same entity (ie from one custom field set used for participants to another custom field set used for participants.)

This can be done easily through the UI as follows:

Go to Administer > Customize Data and Screens > Custom Fields
If it doesn't already exist create the new field set.
Return to Administer > Customize Data and Screens > Custom Fields and select View and Edit Custom Fields for the field set containing the field you want to move.
On the far right of the row containing the field you want to move click on More > Move.
Select the the new field set.

However, if you want to move a field from a field set used for Individuals to a field set used for Contacts or vice versa you will get an error message "The destination group extends a different entity type."

In that situation or similar involving a single branch of contact subtypes:

Back up your database.
Using phpMyAdmin or otherwise, in civicrm_custom_group
find the field set with the most restricted contact type and edit the Extends field to match the value in the field set with the least restricted contact type. (eg change "Individual" to "Contact".)
In the UI move the field as described above.
Using phpMyAdmin or otherwise change the Extends value you altered in 2. back to it's original value.

NOTE: 1. I haven't tried moving fields between a field set used for Organizations and one used for Individuals.


Error When Expanding Relationship Section on Advanced Search I'm on CiviCRM 5.6.0 on WordPress 4.9.8, and I have created some custom relationships, all with contact type A of individual, and contact type B of organization.

When I go to Search -> Advanced Search and expand the Relationships section, I get this notice:
Network Error
Unable to reach the server. Please refresh this page in your browser and try again.

When I check the logs, this is the full error message that occurs when I expand the Relationships section:

[Wed Oct 24 15:42:05.499499 2018] [proxy_fcgi:error] [pid 32638:tid 140566905980672] [client X.X.X.X:56697] AH01071: Got error 'PHP message: PHP Warning:  array_key_exists(): The first argument should be either a string or an integer in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Search.php on line 301\nPHP message: PHP Warning:  array_key_exists(): The first argument should be either a string or an integer in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Search.php on line 301\n', referer: https://XXXX/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fsearch%2Fadvanced&reset=1

On another instance of CiviCRM 5.5.2, also on WordPress, on which I have not created any custom relationship types, I do not get this error. I tried disabling all the custom relationships I created in the instance on which I'm having issues but the error still occurs.

Anyone have any ideas on what might be going on? Thanks.

So this all boiled down to this issue, which has to do specifically with custom fields that are integer selects, and it was impacting both the custom fields and the relationships sections of the advanced search since I was using the same custom field on a custom relationship.

The short-term fix is I went into the database and made the custom field in question not searchable and set is_search_range to 0 as well, which resolved the issue with the relationships section on advanced search throwing an error.

That does mean that for the time being I can't search by that custom field, which is unfortunate since it's kind of a key piece of what I might want to sort/filter by, but I'll keep an eye on the bug and if push comes to shove I can always change that custom field into a text field and rework things since in this case although the data is integers it doesn't have to be since I'm not running math on it or anything, it's essentially just a numeric label.

Hope that helps someone else who runs into this with some thought process or at least raises awareness about the bug.


Dashboard Dashlets Unauthorized Wordpress 4.4
CiviCRM 4.6.10

I installed recently and was in initial setup stages. I had dashlets working fine and created new dashlets. Now all dashlets are giving error

401 - Unauthorized
Your authorization failed.
Please try refreshing the page and fill in the correct login details.

I was working with extensions and configuring the URLs for extension folders. I installed CiviRules and logger successfully. I've dsiabled these and removed extension URLS now.

I've searched and cannot find similar errors.No Wordpress errors showing.

Any ideas?

Thanks

Alan

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


participant status doesn't export I just upgraded to Civi 4.6.3 yesterday. I'm running it on Drupal 7. I tried to export some participant records today, including the participant status. Everything exported fine except the participant status. It's blank for every record. Any ideas? Bug? User error? TIA - John

It appears you have found a bug.  I tried just now on the Civi 4.6/Drupal demo site and got the same results as you with both Export Primary fields and selecting my own fields.  I would log it on JIRA.  https://issues.civicrm.org/jira/secure/Dashboard.jspa

I did a quick Google search and could not find any relevant issues already logged for this.


How do I search for contacts with "not empty" multiple records field? today I realized that the search builder does not provide access to custom multiple-record-fields. Thus I'm wondering how it's possible to search for contacts having at least one record of such field.

Any ideas?

Thanx in advance // nielo

In a stock installation of Civi 4.6, I don't think this is possible.  However, this is possible in Civi 4.7: https://issues.civicrm.org/jira/browse/CRM-16137

This is a very simple patch, so if you want this functionality today, check this out: https://github.com/civicrm/civicrm-core/pull/5435/files


"Connection Refused" error when trying to create a new contact I'm running Civi 4.5.2 on Drupal 7. When I try to create a new organisation, I get a "Connection refused error" with this backtrace. Any ideas what is wrong?

backTrace
#0 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Error.php(191): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
#2 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
#3 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("Connection refused", 111, 16, (Array:2), NULL)
#4 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR->raiseError("Connection refused", 111)
#5 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("maps.googleapis.com", 80, NULL, NULL, NULL)
#6 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php(128): HTTP_Request->sendRequest()
#7 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(394): CRM_Utils_Geocode_Google::format((Array:22))
#8 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(151): CRM_Core_BAO_Address::fixAddress((Array:22))
#9 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(128): CRM_Core_BAO_Address::add((Array:22), TRUE)
#10 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Location.php(71): CRM_Core_BAO_Address::create((Array:36), TRUE, NULL)
#11 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php(358): CRM_Core_BAO_Location::create((Array:36), TRUE)
#12 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php(975): CRM_Contact_BAO_Contact::create((Array:36), TRUE, FALSE, TRUE)
#13 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Form.php(328): CRM_Contact_Form_Contact->postProcess()
#14 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(158): CRM_Core_Form->mainProcess()
#15 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(129): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contact_Form_Contact), "upload")
#16 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contact_Form_Contact), "upload")
#17 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "upload")
#18 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Controller.php(356): HTML_QuickForm_Page->handle("upload")
#19 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(117): CRM_Core_Controller->run()
#20 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
#21 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(75): CRM_Core_Invoke::runItem((Array:13))
#22 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#23 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/drupal/civicrm.module(457): CRM_Core_Invoke::invoke((Array:3))
#24 [internal function](): civicrm_invoke("contact", "add")
#25 /srv/domain.tld/public/htdocs/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
#26 /srv/domain.tld/public/htdocs/index.php(21): menu_execute_active_handler()
#27 {main}

The issue seems to be with the automatic address geocoding (finding the latitude and longitude using google maps api)

It's probably that your server has a firewall that restrict it to connect to other websites. You should disable the geocoding feature or let the server connect to google maps api server

You'll have a few other features that require the server to connect to external sites (eg. most of the payment processors), it's probably worthwhile opening up more the security, or at least keep in mind when you have a problem that it might be the issue


How to customize the layout of a Contribution form created in Wordpress The title pretty much describes the question. In Wordpress it is easy to customize the layout of a post/page by using child theme. I wonder how to do so for a CiviComponent, say, contribution page.

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

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

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


Preview page not shown in webforms I'm trying to show the preview page in a CiviCRM Webform and it's not working. I have activated the option in Webform > Form settings > Preview Page but when I press the Send button it goes directly to the thanks page.

I'm using CiviCRM 4.6.10 and Webform CiviCRM Integration 7.x-4.15

Any ideas?

Thanks in advance.

Hi Just tested the same preview against same version of Civicrm 4.6.10 and webform integration 7.x-4.15 works find

Both in Pay-later option and also using an payment processor

I guess you need to look for any PHP error log and also look for any Ajax issue - thanks


Re-run iATS recurring contributions that failed due to bad iATS account credentials? iATS credentials were messed up for a couple of days in December, and now I have lots of recurring contributions that failed, with source="iATS Payments Recurring Contribution (id=N) Agent code has not been set up on the authorization system. Please call iATS at 1-888-955-5455."

Is there a way to re-run those recurring contributions?

Change the date for the next scheduled recurrence.
Table civicrm_contribution_recur > Column next_sched_contribution_date

Change it to today and run your cron job or change it to tomorrow and it should process them with tomorrows transactions.


Keep getting "invalid email" message on any Civicrm/Joomla operation, such as register new individual or org address, or anything requiring email Our email address is definitely valid, and everything else seems to set up fine in Civicrm in Joomla, but our org's email address always comes back as invalid.

The only clue we have is that when we became a Civicrm member, we used a different (personal) email address. Is that the problem? Or something else?

We get "Confirm from email error and configure event - civicrm/civicrm/packages/HTML/QuickForm/Rule/Email.php on line 58"

Thanks for any advice!

This is fixed in 5.21. If you want to apply the patch now it's a small patch:
https://github.com/civicrm/civicrm-packages/pull/271/files

In fact for a quick temporary fix all you need to do is change that line 58 from

$part = idn_to_ascii($part, 0, INTL_IDNA_VARIANT_UTS46);

to

$part = idn_to_ascii($part);

More info: https://lab.civicrm.org/dev/core/issues/1469


VBO (Views Bulk Operations) - Bulk Operations field not showing in field list Trying to use VBO in a view of CiviCRM contributions, but when I try to add the Bulk Operations field, it is not listed in the pop-up field list so can't be added.

The rest of the view works (ie can access contribution data), and VBO works if the view is based on eg Users.

What else is needed?

(Drupal 7)

Using VBO with CiviCRM views requires the CiviCRM Entity module, so
make sure that is enabled.
CiviCRM Entity does not expose all CiviCRM entities as Drupal
entities by default.  Go to
admin/structure/civicrm-entity/settings to enable the right
entities - in this case, Contributions

(Thanks to @jackrabbithanna on chat: https://chat.civicrm.org/civicrm/pl/85qwezc5d3fo3jr4hxgafoyn4r)


How to send confirmation when importing contributions When importing contributions, on the 2nd page where CSV columns are linked to database fields, there is no field "send a confirmation". Is there a way to add this field (and generate a confirmation after import)? Or do we have the use another method?

Confirmation sending can't directly from import.  There ARE ways to do it, but it slows down the import considerably, so I'd recommend doing it separately.  Here are your options:

Bulk confirmation

When importing, have an easy way to search for the contributions that were just imported.  Perhaps that's already possible because of your data.  If not, add a custom field "Needs confirmation" to your data, and populate that.
Using Find Contributions, find the contributions you just imported.
From the Actions menu, select Receipts - print or email and send confirmations as per the manual receipts documentation.

You could also use CiviRules, but as I started to document the process I realized how complicated that would be - I definitely think the bulk confirmation above is the way to go.


Cannot Record Payment to a Contribution in Pending Pay Later Status (WordPress 5.0.10, CIVICRM 5.21.2) I was testing the Record Payment function in the following manner:

Click Contribution under Contact A
Click "Record Contrirbution"
Create Contribution, set Status to "Pending (Pay Later)"
Click "more" for the Contribution record, Select "Record Payment"
Select Payment Method (I chose Cash)
Click Record Payment

This will result in spinning of the logo and nothing happens.  This requires a refresh of the page to get out.  No payment was recorded to the contribution.
I have checked that this didn't happen to earlier versions (5.12).  Any insights?  Thanks.

thanks for your guidance, here is the PHP error and it led me to the solution:
Fatal error: Uncaught Error: Call to undefined function bccomp() in
/var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Payment.php:374
..

this prompted me to install bcmath:
sudo apt-get update -y
sudo apt-get install -y php7.2-bcmath

restarted apache and the problem went away.


How can a pull a report with notes includes We are trying to export a list with notes included. We are creating a prospect list for Employment Engagement team. We will add names to the database, this list is obtained from events that we host. We will then take the names and information add to Civi and use notes to personal our contact engagement. We will then want to pull and export a specific list that would include notes from previous interactions, so we can keep track of conversations

Do a search to find the people who you want to pull information from, select the contacts and under actions select "export contacts." At step two select "select fields for export" and hit continue. Once on that page, choose any fields you want exported and there is an option for "Note(s)." I recommend saving the mapping so you do not have to choose which fields you want exported every time.


How to increase limits on activity attachments? Current (4.6.7) limits say that an activity can have up to 3 attachments, each being less than 2MB.

I need more, and a bigger file size limit.

What are the obstacles to achieving this?

I can't see anything in the db schema that implies a limit per activity, so is it just the UI that imposes the number of file limits?
The files are stored (I assume) in the civicrm_file.document field which is a MEDIUM_BLOB and can therefore store a file just under 4GB. (my requirements are only ~20MB.) Is that 2MB limit set in a PHP ini file?

Thanks.

Go to configure it in your settings
/civicrm/admin/setting/misc?reset=1


Why am I getting duplicate contacts for contributions? I am getting dupes created when contributing.  Contribution pages use the 'Unsupervised' dedupe rule, which I have set to First name, Last name & email, assigning 10 to each with a threshold of 30.  But then I am getting duplicate contacts created every time, with exact matches on all three fields.  When I change the value of email to 20 and set the threshold to 20 a match is made & no dupe. It seems that first name and last name are being ignored and only email is working. Am I misunderstanding something here?  Could this be a bug? Using Stripe 4.7.2, Civi 4.7.24 with Drupal 7.

Hi I can confirm the same behaviour. We are on Drupal 7, CiviCRM 5.19.4 and the problem is that the Billing address profile seems to be ignored for the dedupe rules. You must create a new profile with all fields needed for dedupe rule and include it in page. The billing address name and first name is not used.


Section and Page Breaks in Reports I'm trying to work out how this is done,  it seems the standard templates have this coded in

{$l}if $sections.{$column}.type & 4{$r}
                    {$l}assign var=printValue value=$row.{$column}|crmDate{$r}
                {$l}elseif $sections.{$column}.type eq 1024{$r}
                    {$l}assign var=printValue value=$row.{$column}|crmMoney{$r}
                {$l}else{$r}
                    {$l}assign var=printValue value=$row.{$column}{$r}
                {$l}/if{$r}
                {$l}if $rowid neq 0{$r}
                  {if $section.pageBreak}
                    {$l}if $pageBroke >= {$h} or $pageBroke == 0{$r}

And I know the extended reports extension implements this.

I have been looking at the code, but it is very generic, in that it allows selecting sort fields & selecting section / page breaks.   But I can't yet fathom out what I need for my simple use case ( I don't need user selectable option - just want to break on a sort field )

I'm hoping it is something straight forward  $this->_sections but I am floundering around a bit.

$this->assign('sections', $this->_sections);

Any help or pointers to example much appreciated.

--- edit  ---  this is where I have got to

function orderBy() {  $this->_orderBy = "ORDER BY mycolumn";

                  $sections = array ( 'my_section' => array (
                  'title' => 'My Name',
                  'type' => 2,
                  'tplField' => 'mytable_mycolumn',
                  'section' => 1,
                  'pageBreak' => 1,
                  ));

                  $this->assign('sections', $sections);

                 }

Whilst it is promising, in that it puts out the at least the text of the first section and it doesn't fail or shout warnings, it just doesn't present any values?

I have tried combinations of mytable_myfield / myfield in tplField and columns.

I have compared smarty debug variables between working versions and mine, and I haven't got it yet.

OK for others searching this is what I found works

 $sections = array ( 'mybreakcolumn' => array (
                  'title' => 'Rep Name',
                  'type' => 2,
                  'section' => 1,
                  'pageBreak' => 1,
                  ));

                  $this->assign('sections', $sections);

Where mybreakcolum is the full column name sent to the template


Has version 4.7 introduced an Activity Date filter problem with activity reports? Since upgrading to 4.7 we have had the following problem:

Created a new Activity (contacts) report with
 - the Activity Date filter set to This week
 - the Navigation Menu Link To
   set to View Results

When running the report from the navigation menu the report is displayed without any filtering on Activity Date - the Activity Date filter has been reset to empty.

If I:

Set the (emptied) Activity Date filter to This week
Change the Navigation Menu Link To to Show Criteria
Click the Update Report button to save the changes
Re-run the report from the navigation menu

The report is not run, as expected, but the Activity Filter now remains set to This week. Clicking on the Preview Report button now produces the report I was expecting.

To see the problem on the demo site (while the Joomla demo site is still on 4.6):

4.6

4.7

This seems to be a bug with the update report, preview report works as expected. See guideline on bug reporting https://civicrm.org/bug-reporting


Add an image for each address in contact form As in a previous (unanswered) question, I'm trying to add an image with an anchor for each address in the contact form.

In my extension, through the buildForm hook I'm able to add (once) an image in the contact form, but not to add n images in each address section.

Thank's for your answer.

In general, tweaks to CiviCRM templates are not super simple and usually require a 2-step process:

Add a tpl.extra template with the same name as the template you wish to modify.
Add a <script> tag and some javascript to your new template which uses jQuery to place the markup in the spot you want.


Safe to run cron jobs using wget and user with full admin rights? I recently set up cron jobs with CiviCRM using wget url method through Cpanel.  I set up an administrator account and used that accounts username and password. My concern is if there is any security risk with this method and if its best practice to limit that user's account to just the bare civicrm permissions - "view all contacts", "access CiviCRM", "access CiviMail".

Your feedback is appreciated.

Using latest wordpress and civicrm releases.

It's better to limit the cron user to the minimum permissions - but I'm not 100% sure what those permissions are.  E.g. if you don't give access to CiviEvent, can you use smart groups based on participant status?

The reason why it's unsafe to give a full admin user cron access is because you're leaving an API key (essentially a password) in plaintext on a server.  Depending on how wget is configured (with HTTP GET instead of POST) you're also leaving the api key in the server logs.  Someone who accesses one of those can escalate their permissions.  This is especially true if you're using wget from a remote server.


Use Case Difference between CiviCRM and Croudfunding Sites? Several people (who know little about CiviCRM) when looking at CiviCRM claim that it's no different than a Crowdfunding site, but I look at it as you don't own a Crowdfunding site, and thus they can impose rules on you, while charging you, and non of that will apply if you own the platform you're running it on.  Of course your host can do that as well, but not to the extent that a business that works to specifically do crowdfunding can.

I've never actually tried a crowdfunding site, and so I was wondering what the differences are...I would imagine that the data on the crowdfunding site is what they give you, and that there's no way to add additional information or query it in different ways.  The project still exists, and is still active, so there must be some advantage to it over a crowdfunding site.

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

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


civievent - add 2097 participiant to an event I tried to add 2097 contacts as a participant to an event.
procedure:
 - search
 - advanced search for "individuals"
 - action add 2097 participants to an event
 - waited for more than one hour
 - it didn't add the participants to this event, no error message

I did the same procedure with 1597 contacts and it works. is there a limit?

It's likely a configuration limit on your server that doesn't handle "big" operations

There is an upper limit on how much "stuff" you can do, and your webserver has a limit on how long a page can work (usually 30 sec) and how much memory it can use.

It might be that you hit one of these limits. If you have access to the log on the server, check if there is an error written when you try to do that operation... hard to be more detailed, it depends on your server and how it's configured.


How can many email, address and phone records suddenly disappear? Title says it pretty much and came to us from a client. The initial concern was that this had occurred due to an upgrade. There was plenty of evidence in the log tables however to show that the data had been deleted by a particular user in bulk.

The reason proved to be that an admin user removed a Location Type. There is a clear warning if you try to do this via the UI.

  WARNING: Deleting this option will result in the loss of all location type records which use the option. This may mean the loss of a substantial amount of data, and the action cannot be undone. Do you want to continue?

Have asked about making the warning more specific in CRM-17273: Deleting Location Type should warn about loss of related contact data


Access Denied when making Contributions with Auto renewal and discount When making a contribution (i.e. membership payment) I get an Access Denied message from Paypal, where the following conditions apply:

An applicable Discount is enabled

The user has toggled the Auto-renewal option to ON in the contribution form.

Current setup
WordPress: 5.5.1
CiviCRM: 5.29.0
CiviDiscount: 3.8.1
PayPal account type: Business
Process Flow

Go to MYDOMAIN.COM
login
Go to the Contribution Form page
Fill select membership option AND check the box for "Please renew my memberhip automatically"
Click 'Continue', review the confirmation page, and click Continue again
If this were doing what it was supposed to I'd be sent to the login form on PayPal, but instead I get this error page:

Error Message
    **Access Denied.**
    You don't have permission to access "/subscriptions?business=PAYPAL_ACCOUNT_EMAIL¬ify_url=https%3A//MYDOMAIN/FORM_PAGE/%3Fciviwp%3DCiviCRM%26q%3Dcivicrm%252Fpayment%252Fipn%252F3&item_name=MY_PAYPAL_ITEM_NAME&quantity=1&undefined_quantity=0&cancel_return=https%3A//MYDOMAIN/FORM_PAGE/%3Fciviwp%3DCiviCRM%26q%3Dcivicrm%252Fcontribute%252Ftransact%26_qf_Main_display%3D1%26cancel%3D1%26qfKey%3D48952a1caaf16f8b76aafc96ffb778bfdeb8e5aef9da49e3897dc33fbb4540ef_8394%26isRecur%3D1%26recurId%3D11%26contribId%3D1142&no_note=1&no_shipping=1&return=https%3A//MYDOMAIN/FORM_PAGE/%3Fciviwp%3DCiviCRM%26q%3Dcivicrm%252Fcontribute%252Ftransact%26_qf_ThankYou_display%3D1%26qfKey%3D48952a1caaf16f8b76aafc96ffb778bfdeb8e5aef9da49e3897dc33fbb4540ef_8394&rm=2¤cy_code=USD&invoice=940f55d4240395cacee1f76cd374dd8e&lc=US&charset=UTF-8&custom=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22CONTACT_ID%22%2C%22contributionID%22%3A1142%2C%22membershipID%22%3A%22578%22%2C%22contributionRecurID%22%3A11%2C%22contributionPageID%22%3A%224%22%7D&bn=CiviCRM_SP&email=MEMBER_EMAIL&cmd=_xclick-subscriptions&a3=0.25&p3=1&t3=D&src=1&sra=1&modify=0" on this server.

I am able to apply a discount to a renewal without the auto-renewal being set.  But not with.
I am offering Current members who have been imported to the CiviCRM system the option to restart their renewal process within the system with the incentive of a discount.  So I need auto-renewals and a short-term discount in place.  Has anyone else run into this problem for auto-renewals of contribution paired with a CiviDiscount?

This seems to be an error on the paypal side.
Check with paypal, if they have blacklisted your IP.
Try doing a contribution with a different router or a separate internet service provider, i.e, a new IP that hasn't contacted paypal yet.


Case Manager is not shown for closed cases I'm testing an upgrade from 4.6.38 to 5.5.3 and have noticed a new case related behavior that feels a little strange to me. When you close a case and subsequently the case roles expire and are disabled they no longer show on the manage case screen (in the roles section).

This issue prompted a PR that I think is the cause. If a civicase is reopened why isn't the Case Coordinator (and other roles) reinstated?

I've not been in 4.7, so the verbiage 'reinstate' roles is confusing to me.  In 4.6.38, when a case was closed while the relationship may have been inactive but the case manager still showed on the case. As Demerit pointed out as a comment on that issue "I'm pretty sure they used to stick around - maybe something changed recently. Otherwise, you wouldn't be able to see what they were on closed cases."

I've verified on the demo site that if you close a case, case roles do, in fact, 'disappear' on the manage case screen. This is strange to me, why wouldn't you want to be able to reference who a case manager was on a closed case?

https://lab.civicrm.org/dev/core/commit/0fd841b07dfbb958a1c4ae8349131b3325b15dc4

In the PR, line 849 has, $activeOnly = TRUE. If I set that to FALSE, I can see case managers on closed cases. But I'm afraid that will have an effect beyond the manage case screen. Can this variable be set for just the manage case screen to "FALSE" so that you can still see Case Managers on closed cases?

There is now a fix submitted on GitHub to handle this issue - https://github.com/civicrm/civicrm-core/pull/13144.

This should be a part of the next release, possibly 5.8.9.


Event Participant invitation We have created an event with on-line registration.

How do we send the 'event' to contacts within a group in CiviCRM?

Search for Contacts w/ specific criteria (if you like to narrow things down) -> then add the resulting Contacts to a Group; make sure in Manage Groups that the Groups is a mailing group; Then go to CiviMail and email this Group your Event details + link to registration page.

If you have fewer than 50 Contacts you can also send Email from the Result of the Contact search screen; over 50 you'll need to use CiviMail;

If you want to get really fancy -> embed a checksum token in your Email message to your Contacts -> that way when they get to the Event registration page existing information (already in your CiviCRM) - will be filled out for them;

The details on how to use this would depend on your CMS -> but here's an example for Drupal (where IDNUMBER is the ID of your Event)

http://www.myorganization.org/civicrm/event/register?reset=1&id=IDNUMBER&{contact.checksum}&cid={contact.contact_id}

When using checksum tokens -> they only have limited lifetime (for security reasons) -> you may need to visit Administer -> System Settings -> Misc -> and change the Checkum Lifespan (7 days is default);


Getting problem while getting group id of current logged in user I am trying to get a group id of currently logged in user

function search_civicrm_preProcess($formName, &$form) {
    $getContactId = (int) CRM_Core_Session::singleton()->getLoggedInContactID();
    $query = "select 'group_id' from 'civicrm_group_contact' where contact_id ='.$getContactId'";
$dao1 =&  CRM_Core_DAO::executeQuery( $query, CRM_Core_DAO::$_nullArray );
}

I would use api to find groups of logged in user

$result = civicrm_api3('Contact', 'getsingle', [
  'return' => ["group"],
  'id' => 'user_contact_id',
]);

or

$result = civicrm_api3('GroupContact', 'getsingle', [
  'return' => ["group_id"],
  'contact_id' => 'user_contact_id',
]);

HTH

Pradeep


Why are my QuickForm checkboxes always ticked, in postProcess()? I'm trying to build a form using QuickForm checkboxes. Here's what should happen:

The form displays a bunch of checkboxes. These are ticked or unticked according to a load of API calls in buildQuickForm(). If ticked, this is set using setChecked->true.
The user then ticks or unticks appropriately, and postProcess() handles the changes.

Except, the form data received by postProcess() is wrong: if a checkbox is set as ticked using setChecked->true, it always comes through as ticked, even if the user unticked it.

I assume I'm not understanding Civi's QuickForm process properly. Could setChecked->true be kicking in after the form is submitted? During validation, or something?

Any advice appreciated...

Andrew

Two suggestions:

Do the setting in setDefaultValues() instead of buildQuickForm().
I find the "form data received by postProcess" often contains duplicates and miscellaneous other stuff and I'm sometimes not sure what to look at but usually use $this->_submitValues for visible fields. What are you examining?