Best way to write module for 'unusual' payment gateway We are looking at writing a module for Ezidebit. Ezidebit allow the setup of Direct Debit payments online. However, the initial request to Ezidebit includes the payment frequency and Ezidebit initiates these future payments on the frequency provided.

So once setup Civi does not need to request any further payments from Ezidebit. Instead it just needs to import the payment receipts - which are available from Ezidebit via an API.

I'm wondering what the best way to go about building a module for this will be? It's not really a payment gateway as there are no real-time payments available via this aspect of Ezidebits service. It is probably more like a bank account with payments being received by Ezidebit that need to be entered in to Civi.

In Civi it is most likely going to be used for Regular Donors and if so we would need to be able to track the commitment the donor has made and also the actual payments received. This doesn't seem to quite fit Pledges (as it is ongoing) or recurring payments (as Civi does not initiate the payment).

Any suggestions on the best approach for this?

What you are describing is not unusual and is within the range of processes that CiviCRM can handle. See here for some details:
https://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=184188933

Two key things you want to do for your specific payment processor code are:
1. Set the 'payment type' to '2' - this sets some default assumptions for debit cards as opposed to credit card (e.g. fields).
2. Create an automated job to pull in the completed contributions.

There are some complex things you may want to implement later, like being able to manage the recurring schedule from CiviCRM, but for now you can probably get the basics working without too much suffering.

You'll want to look at a few examples and also the core payment object that you'll be subclassing:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php


FIne-grained Volunteer Management There is a need to manage neighbor-helping-neighbor volunteers in Senior Villages (and similar). Senior Villages are mutual-support organizations, often without paid staff, which provide social, cultural, fitness, and household support to enable their members to stay in their homes and age gracefully. Many Villages have a volunteer clearinghouse for things like rides to the doctor, watering plants while the homeowner is away, friendly welfare check-ups, shoveling snow, etc.
This is different from volunteers for fixed roles at fixed events. Maybe Civicase with an enhanced client/service match function would work. It is similar to a storefront, but for services, not products. It's actually kind of like Uber or AirB&B, where distributed producers provide distributed services through a clearing house.

What we need is:

volunteer registration, with tags for skill set, certification
(background check, CPR, etc.), and availability, including vacation
absences.

service requests, including: type of service, time of service, locations (transport needs start and final destinations; round
trip?); special concerns ("needs help with stairs"; "must transport
wheelchair/walker"), etc.
provider/service match (including volunteer's past workload), query, and assignment
mutual notification of client and provider
confirmation, evaluation, and "lessons learned" feedback from both client and provider; time sheet logging
performance reports for evaluation and recognition of outstanding performance ('cause we ain't paying the volunteers money)

Thanks for any help.

Does anyone know of a module to do this, or can suggest one that might be modified? There are commercial apps that do some of this (Ride Scheduler, Club Express), but not all and which are not readily customizable the way Civi is. Without a staff, we need to embed as much paperwork and process expertise in the system as possible.
As the population ages, but doesn't die or go into care, this is potentially a big market.

despite the detail provided it is hard to presume the workflow involved here but having looked through the Ride Scheduler tour I would approach building the core of this around Drupal Webform-civicrm and Activities and Views.

The webform approach gives the flexibility for capturing the info that civi core lacks.

The use of Activities or Webform delivers the notification process.

Views can be used to give displays of current 'requests' in a more user friendly way.

At this point I don't see CiviCase being necessary but that is because I am probably not imagining the workflow very well.

The one gap I see compared to RideScheduler is the automated call to the driver. But an SMS should be do-able without extra effort using eg CiviRules


How can I modify the displayed discount message? Are there any controls for the displayed discount message?

I'd like to change the message and, if possible, not show it depending on user criteria - membership, etc.

A nice to have would be to have control over the location.

I can't seem to find documentation on this extension

Thanks

Documentation isn't complete but is available here.  It specifically mentioned control over the location as something that doesn't exist yet.  If you're JavaScipt-savvy, a single line of jQuery will let you move the box wherever you want; a second line will let you control the wording.  I wish there was an answer for non-coders to do what you're asking for.  If this is important to you and you're not a coder, you might be able to fund someone (either the core team or another CiviCRM developer) to add those features.


Commas displayed instead of selected responses from a multi-select field on Confirmation page for CiviEvent registration When viewing the confirmation page of a CiviEvent registration form, the options selected in two different multiselect fields do not appear. Instead, for each field a series of commas equivalent to the number of options available in the field appear. This happens if I select any fewer than the full number of options available for the field.

The responses to other fields on the same form are fine, including those related to a couple of radio-button select fields.

In the attached image, Job Title and Dietary Restriction fields are examples of the issue.

Personal pronoun and several other fields displayed in the image are from fields using radio-button selections.

What could be causing this?

I've seen this Q&A but I think my concern is different and I'm on a later version of CiviCRM (5.13).
https://issues.civicrm.org/jira/browse/CRM-17129

This is now fixed in 5.16.2 version. You can either upgrade CiviCRM to 5.16.2 or apply patch from here.

Cheers

Pradeep


Drupal AJAX HTTP Request terminated Abnormally after file upload I am getting the following error (as shown) when trying to upload a file to a normal content type. This started happening after migration of the Drupal site to a new server and more than one site hosting on this server seems to be having this problem. Not quite sure what the cause could be at this point.

Issue was resolved by modifying mod_security configuration


What's the right crontab entry for running cv? I'm trying to get cron to run cv.

Putting this in crontab:

*/5 * * * * /usr/local/bin/cv api job.execute --user=harrumph

produces...

Failed to locate civicrm.settings.php. By default, this tool searches the parent directories for a standard CMS (Drupal, WordPress, etal) and standard civicrm.settings.php. Symlinks and multisite configurations may interfere. To customize, set variable CIVICRM_SETTINGS to point to the preferred civicrm.settings.php.

The correct path to civicrm.settings.php is

/var/www/html/wp-content/uploads/civicrm/civicrm.settings.php

SO...

How am I supposed to use EXPORT in crontab so as to point cv to where it should be looking?

You can use the --cwd option for cv to set a current working directory:

*/5 * * * * /usr/local/bin/cv --cwd=/var/www/html/ api job.execute --user=harrumph


How could I restrict view access to message templates Wordpress. I know I can restrict edit access but I would like to restrict "use". So I can allow some users to send an email but not select a template. (otherwise they can use for instance CEO signature)

I think its down to adding some code via php or js to restrict use of message template on some screen based on permission.


Token not evaluating in CiviMail I have a token for a custom field in my email template, but its not being replaced with the value when the email is sent.

What's wrong?  How can I fix it?

If you can produce a test for the email, and the token is replaced by the field value, then you might have a permission issue.

It might be buried deeply, but see which role your Cron user has.  Be sure the "CiviCRM - access all custom data" is on for your Cron user.


CiviMail won't send mailings; start/completed date is "0th, 0 12:00 AM" CiviMail is no longer sending out mailings after a recent upgrade.  The start and completed dates, instead of being blank, are "0th, 0 12:00 AM".  How do I fix this?

I'm not sure what causes this - but an upgrade on a site of mine (MySQL 5.5, Debian 8.9) caused my civicrm_mailing_job database table to not allow NULL values for start_date and end_date.  Since a NULL start date is a condition for sending emails, this causes CiviMail to fail.

To fix this, you need to run the following SQL commands:

ALTER TABLE civicrm_mailing_job MODIFY start_date timestamp null;
ALTER TABLE civicrm_mailing_job MODIFY end_date timestamp null;


What are the security considerations before allowing access AJAX API to anonymous users? We have an autocomplete-select list in one of our profiles that we want to use on a public page. I can see the call is blocked for anonymous users because of permissions on 'access AJAX API'. I'm trying and have failed to find further documentation on any security considerations before allowing allowing access AJAX API to anonymous users. If we enable this are there features in CiviCRM that would prevent an anonymous user from using the AJAX API maliciously?

Is the visibility for your field defined in the profile as Expose Publicly and also with the Searchable checkbox checked? You might not have to fiddle with permissions.

Otherwise to directly answer your question, some of the other permissions might still restrict undesired actions, but among other things it gives access to the REST api (via civicrm/ajax/rest), so you'd have to check what your other actions are allowing. For example you could open a developer tools console in the browser and type (this uses civicrm/ajax/rest behind the scenes)

CRM.api3('Contact', 'create', {
  "contact_type": "Individual",
  "first_name": "John",
  "last_name": "Smith"
}).done(function(result) {
  console.log(result);
});

which would probably fail because you might not have the add contact permission enabled for anonymous, but you might be able to do something like read all the contributions, depending on what else you're allowing for anonymous.

Also the autocomplete might be limited by whatever you restrict it to in the profile, e.g. limit to a group, but you could use the api to locate other contacts and their info.

The bottom line is it depends what your other permissions are also allowing.


Wat moet ik downloaden? Als newbe zie ik even door het bos de bomen niet meer. Ik ga een praktijk opstarten met diensten en ik zoek een CRM waar ik per klant niet alleen hun gegevens kan bewaren, maar ook verslagen van behandelingen enz... Ik kreeg CiviCRM als tip aangeraden. Ik heb me ingeschreven, en wilde gaan downloaden, maar zie dat er verschillende versie's zijn. Ik weet niet goed welke versie het beste past bij wat ik nodig heb, omdat ik zo snel niet kan vinden waar welke downloadknop voor dient. Iemand die kan helpen?

CiviCRM werkt achter een website.

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

WordPress
Drupal
Joomla

WordPress is een veelgebruikt systeem en redelijk makkelijk te installeren.

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

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


multiple bulk email update 5.10.3 We have updated our CiviCRM to the 5.10.3 but now we have trouble with bulk email.

The checkbox buttons behave like a radio button.
So we can not have more the one bulk email address (not really useful)

For old contact the data are correct but we can not change it.

No one has this trouble?
No one has an idea to resolve it?

Thanks

Nicolas

You must enable the ‘Enable multiple bulk email address for a contact’ option from CiviMail component settings.

Administer > CiviMail > CiviMail component settings

/civicrm/admin/setting/preferences/mailing?reset=1


Removing "List-Unsubscribe" from civimail headers (for when getting seemingly random unsubscribes) There is a "header" entry automatically put into mailnigs from civimail (also when using flexmailer / mosaico) which some email clients use to enable unsubscribing (or opting out) from mailing lists.

If, for example, an unsubscribe link is in your email, and the site is reporting opt-out's (or vice-versa) then this may be the reason why. So - how to fix it?

thanks to @pradpnayak for guidance :D

according to the docs for hook_civicrm_alterMailParams:

  You can add custom headers by appending to $params['headers']. Example:

$params['headers']['X-My-Header'] = 'my header value';

  The headers key may not exist in the $params array when passed into the > hook.

so this was the code in an extension to unset the existing 'List-Unsubscribe', and put in a NULL replacement into the headers:

/**
 * Implements hook_civicrm_alterMailParams().
 *
 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
 */
function custom_civicrm_alterMailParams(&$params, $context) {
  if ($context == 'flexmailer' || $context == 'civimail') {
    // remove existing header
    unset($params['List-Unsubscribe']);
    // replace via the 'headers' key
    $params['headers']['List-Unsubscribe'] = NULL;
  }
}


Mandrill extension error I have civicrm 4.6.5 running on Drupal 7.38 with the Mandrill 2 extension for bulk email.
I set up a webhook in mandrill to speak to civi and I sent a test bulk email (including fake email addresses) with mandrill to make sure it all works.
It all works fine except that Mandrill has been sending me 6 bounce notifications per ever since that email which included 1 fake email address.

mandrill posts this error under the webhook :
Error: POST to https://www.msite.org/civicrm/ajax/mte/callback?mandrillSecret=*********989c failed with 500:

Drupal posts :Notice: Undefined index: event in CRM_Mte_BAO_Mandrill::processMandrillCalls() (line 84 of /srv/bindings/.../code/sites/all/extensions/biz.jmaconsulting.mte-2.0/CRM/Mte/BAO/Mandrill.php).

Could this bug be your issue: https://github.com/JMAConsulting/biz.jmaconsulting.mte/issues/93


How to set the CMS language as the preferred language of the contact? There is a way to force the language of a contact created via webform:
How to set a constant value for a field in webform (eg the prefered language)?

but I'd like to do it automatically, eg if I see the form as /fr/form it will set the preferred Civi language to fr, if the visitor is on /de/form it will be in german

Is this possible with webform civicrm?

This is only a partial answer - but the PHP $_SERVER global variable contain the requested language code (e.g. en_US) (See here).  civicrm_option_value stores the "Languages" option group, which provides a mapping from the language code to the language option value ID.

It seems like you could parse the requested language (en and en-US must be mapped to en_US), add an API call to OptionValue.get to get the correct ID value, and set the default value for preferred language.

Note that this is slightly different from what you're requesting - a French-speaking user on an English-localised web browser will get English, not French - but the concept should be applicable.


Contribution Export Places Campaign IDs in Campaign Title Column, Nothing in Campaign ID Column When we search for contributions and export, the export places Campaign IDs in Campaign Title column and nothing in Campaign ID Column. Any ideas?

CiviCRM 4.6.3 (happened in older versions also)

WP 4.2.2

Thanks,

e.

This is a bug. Please file an issue on JIRA referencing this page. Instructions on filing a bug report here: https://civicrm.org/bug-reporting


Update Reports not available after Upgrade to 4.7.10 After Upgrading to 4.7.10 from 4.7.8, it looks like the Reports have lost some of their features. The buttons for Preview Report, Update Report Save as Copy at are not displayed anymore.

Here is the screen before upgrade:

Here is the screen after upgrade:

This functionality has been moved to the action drop-down list.


CiviGroup Roles Sync errors After upgrading Drupal to 7.3.8 (don't know if this is related), I'm getting an error when a user logs on and belongs to groups/holds a role that is set up with CiviGroup Roles Sync.

  Role groupname (group id) should be held by user username (drupal user id)
  because they are part of group id (contactID: civi id)

When I check the user's groups and roles, they appear to be correct.
The error is listed in dblog for each group that they are a member of.

Groups are regular groups, not smart groups.

Appears to be happening for all users.

I don't think this is actually an 'error', the status is just misleading.

The Group <> Role sync runs on a user when they log in, syncing up the roles. All this message is saying is: "When the user logged in, I added role x, because they are a member of group y."

The severity of these database log messages is misleading and will be fixed up in 4.7 by this commit: https://github.com/civicrm/civicrm-drupal/pull/272


Migrating to Pantheon: How to make CiviMail editor insert images with non-relative refs? When our site migrated to Pantheon, all the images in a mailing became broken when the mailing was received.

I saw this (https://stackoverflow.com/questions/27569280/civicrm-civimail-images-are-relative-urls) but the question is only partially answered.

I can't see any settings in the menu for the editor. How do I make the WYSIWYG editor for mailings provide absolute URL refs? Otherwise the images look fine in the preview but are all broken when the mailing is sent.

To clarify, the refs are coming out as "/sites/default/files/civicrm/image.jpg" instead of "http://mysite.com/sites/default/files/civicrm/image.jpg" and that is why they are broken.

Any help would be appreciated. Thanks!

When CiviCRM is on Pantheon, it needs a special set of config in the civicrm.settings.php which defines various variables to make CiviCRM work in cloud hosting.

I had to add this variable to that list:

$civicrm_setting['URL Preferences']['imageUploadURL'] = 'http://www.mysite.com/sites/default/files/civicrm/persist/contribute/';

Then I had to make sure that the "system settings"->"Directories" was pointing to the same folder. Then it worked!


Cannot add or update a child row: a foreign key constraint fails I am using CiviCRM(4.6.10) with Drupal (7.38) together with the civicrm_og_sync module. Until now everything worked fine:

Everytime a drupal user was created automatically a civi contact was also created. Then I deleted a user account on drupal and the corresponding contact in civi (full deletion!).

Now when I try to create a new user in drupal I get the following error:

  Datenbank-Errorcode: Cannot add or update a child row: a foreign key constraint fails (civi_db.civicrm_log, CONSTRAINT FK_civicrm_log_modified_id FOREIGN KEY (modified_id) REFERENCES civicrm_contact (id) ON DELETE CASCADE), 1452
  Zusätzliche Details:
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
      [code] => -3
      [message] => DB Error: constraint violation
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  381 , 'civicrm_contact,381' ,  374 ,  20160111141559 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (civi_db.civicrm_log, CONSTRAINT FK_civicrm_log_modified_id FOREIGN KEY (modified_id) REFERENCES civicrm_contact (id) ON DELETE CASCADE)]
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  381 , 'civicrm_contact,381' ,  374 ,  20160111141559 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (civi_db.civicrm_log, CONSTRAINT FK_civicrm_log_modified_id FOREIGN KEY (modified_id) REFERENCES civicrm_contact (id) ON DELETE CASCADE)]
      [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  381 , 'civicrm_contact,381' ,  374 ,  20160111141559 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (civi_db.civicrm_log, CONSTRAINT FK_civicrm_log_modified_id FOREIGN KEY (modified_id) REFERENCES civicrm_contact (id) ON DELETE CASCADE)]"]
  )

In the end the drupal user is created but not the civi contact. I looked into the tables 'civicrm_contact' and 'civicrm_log' but couldn't find anything supicious - an id or modified_id with number 381 did not exist. On the other hand I can still create a contact with the civi user-interface...

What can I do?

It looks like civicrm is trying to record the change as being done with a different id than the contact that is trying to register (381 vs 374)

Are you sure you are properly anonymous? it might be that your site still think you are "someone else" (eg. the contact you deleted?).

Could you try creating a new account from a "clean" computer, or if you can't, try doing it with your computer, but from an anonymous session (each browser has a different way of doing that, in firefox, it's File->New Private window) and see if you experience the same issue?

and if you do, could you temporarily disable the og_sync, to try to narrow down where the problem comes from?

X+


CiviCRM view activities permissions I have a role to view contacts in a particular group granted through CiviCRM  view ACL permissions (/civicrm/acl?reset=1) but even though the role can see all contacts in that group, when trying to view an activity of a contact in that group, user gets an error message "you do not have permissions to access this page".
- CiviCRM: view all activities is enabled for this role
- CiviCRM: view all contacts  is disabled for this role
- CiviCRM: edit all contacts  is disabled for this role

I have one activity type which i want to exclude users with that role from seeing the same activities of other contacts in another group.

any suggestion for a possible soultion will be much appreciated, I'm on CiviCRM 4.6.35, Drupal 7

If i enable CiviCRM: view all contacts, the role will be able to view all activities of other groups as well.

There is an extension ACL for Activity Types that provides ACL for activities based on activity type. This extension allows one to define permission for CRUD operations for each CMS role.


CiviCRM 5.29.0 - import relationships (2020 12 02; 13:27 US/PST:  I've edited this question to more accurately reflect the data available for import.)
Can anyone point me at an example of two of importing a set of relationship data (e.g., is head or member of household) between an individual contact record and a (somehow) related household contact record?  I have read through the available documentation several times, and have tried the import process in several ways, all to no useful results.
I am working with a small number of records (~27) of individuals to relate to (~17) households.   Each individual and household record as a unique (but related) external identifier, and all related records have a record # in common among them, as well as a unique record number assigned by CiviCRM at the time of import.  This number is not available prior to the import process and is not part of the import data.
I am working with WordPress 5.5.3 / CIviCRM 5.29.0.
Here are three example records (most fields omitted):
ID  ID1     UniqueID          Type  Relationship    Name
15  101015  1010150           h                     Hh Name
15  101015  1010151           i     HoH             HoH name
15  101015  1010152           i     MoH             MoH name

Household records have UniqueID ending in '0', Head of household individual records have UniqueID ending in '1', Member of household records have UniqueID ending in 2.  This field is imported as CiviCRM's ExternalID.  ID and ID1 look related in this example, they are not necessarily related.  The UniqueID is created from ID1, which is an increasing series.
My approach has been to import individual records first, and then household records, with attempted links to individuals.  This creates new individual records rather than updating existing individual records.  I've read on SE that it may work better to create Hh records first and then import individuals.  I will try that and update this question with results.
Once this small subset is functioning as expected, I then have about 2,000 records to import and establish relationships among individuals, households, and organizations.  TIA, DVH

So your contacts (both individuals and households) already exist in CiviCRM and you have the contact ids for all of them - all you need to do is create the relationships.
I think part of your difficulty comes from the way your data is currently structured.
Create a file of your HoH's with just the contact_id of the individual and the household:
contact_id,household_id
10596,10594

Then at Contacts > Import Contacts:

select your file
tick 'First row contains column headers'
select Update for Duplicate Contacts
Continue

On the next page:

map contact_id to Contact ID
map household_id to Head of Household for Contact ID

Note: if Contact ID is not listed, go back to the previous page and make sure you select Update.
Run the import and you should find the relationships are created.  Then repeat for MoH
However ... creating a file like that from your current one takes a little work.
Depending on your preference you could create that with Excel & Vlookup, or php/perl/etc
Alternatively since you have created external identifiers with a specific relationship between ID1 and UniqueID, you could use those:

extract the contact_id and ID1 for the HoH lines
append '0' to the ID1 field (to create the external identifier for the household)
import as above but map to Head of Household for External ID

Update (following update of the question):
If you don't have the CiviCRM contact ids available, just use the external id's for both parties:

extract the UniqueID and ID1 for the HoH lines
append '0' to the ID1 field (to create the external identifier for the household)
map UniqueID to External ID
map modified ID1 to Head of Household for External ID

This was based on you already having imported the contacts and just needing to import the relationships.  If you are starting from scratch you can import household and HoH in one go, then import MoH.


WordPress 5.27 membership renewals failing I'm on latest WordPress, with Civi 5.27.4
Membership renewals fail both with a URL created with smarty sent in an email (which has previously worked), and attempting to renew a logged-in admin. The failure is at the same point: the final confirmation screen. Instead of loading the confirmation screen users get an error pag with a broken link: https://example.com/?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact
Things I have tried

upgraded to latest 5.27.x
flushed caches and rebuilt urls
implemented CLEANURLS (I think)
Turned off Stripe Extension
Checked for any corrupt database tables

None of this has solved the problem. Any advice gratefully received, as you can imagine this is a pretty significant problem.

Looking at this url https://example.com/?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact  It appears the base page is missing.
Can you look at :

make sure that the base page is set - go to https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fuf&reset=1

Review the Base Page setting and value, it cannot be blank

Make sure there is a published page that matches the one in that page

If there is no value there, add one, civicrm is the default and then create a WP page with that slug

Make sure the page is public and visible to all

Once you've done that (or confirmed the base page exists) Visit this page https://example.org/wp-admin/options-permalink.php

Confirm that your permalinkls are set to anything EXCEPT Plain

If it is set to Plain change to one of the other options and save

If it is not set to plain, you can exit the page

Flush CiviCRM Caches go to https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2FupdateConfigBackend&reset=1  and click cleanup caches

After all that is complete, try a test membership renewal.


How to send A and B messages at the same time? When doing an AB test on two groups of 7k contacts, what seem to happen is that first the A group is sent in full, then the B group is processed.

It obviously means that the second group is going to be sent later (in the latest experiment, 30 min later) than the first one, so obviously, it's a huge bias and it's hardly possible to compare the open or click rates, because A has such a head start.

Is this possible to change the way the mails are sent to process the two groups as the same time? ie. change something on the cronjob?

What I did was to keep big batches (bigger than the test groups) and allow to run several jobs, and then:

drupal_root=/var/www/drupal

*/5 * * * * www-data nice -n19 /usr/bin/drush -u 1 -r $drupal_root civicrm-api job.process_mailing auth=0 -y -l wemove
*/5 * * * * www-data nice -n19 /usr/bin/drush -u 1 -r $drupal_root civicrm-api job.process_mailing auth=0 -y -l wemove


How to debug PayPal IPN issue? Environment: Joomla: 3.4.4,
CiviCRM: 4.6.2,
PHP: 5.4.45,
MySQL: 5.5.42-37.1
HTTP only, no HTTPS,
On Shared Hosting at HostGator

The site is a few months old, and we've had 30-50(?) online payments (member dues, events, donate) via PayPal Standard, but all of the transactions remain "Pending".

I've followed and double checked "Configure Paypal to Talk to CiviCRM" here ... http://wiki.civicrm.org/confluence/display/CRMDOC/PayPal+Website+Payments+Standard+and+Recurring+Contributions

IPN is Enabled
IPN points the sites home page, including "http://" (http://my-site.org)
... (worth noting the home page is managed by Joomla, not CiviCRM, but since the url is a "place holder' it does not make any difference I assume)
Auto Return: On
Payment Data Transfer: Off

I enabled the Joomla Redirect Component to catch any 404's, assume some how the IPN URL is wrong. But there have been no IPN related 404s in there. This makes me think the issue is either 1) the link back from the IPN is valid, but not being processed, or 2) the IPN never reaches the site.

I have enabled Logging in the CiviCRM Admin, but where should I look for IPN details? There are many log_civicrm_% tables in mysql, but none seem to log  IPN details.

I assume PayPal IPN Simulator might give me some clues, but how do I construct a test URL?

I kept pulling my hair out until we migrated to paypal pro (with it's own set of issues :)) but a couple of things to look at:

Check apache error log,
Paypal has a log that shows details of all IPN calls to server.
Make sure you have correct URL for http vs. https
Check civicrm log files in files/civicrm/ConfigandLog
Make sure firewall rules (and especially modsecurity) are letting things post
Don't know about joomla but in drupal, I always need to disable IDS (Intrusion Detection) for anon users and it often triggers false positives.


Transactional email bounce tracking I've just spent the day trying to set up bounce processing, and have it working for civimail, but found out that it doesn't work for transactional emails? I tried installing the transactional emails extension by unzipping it to my ext folder with the rest of my extensions, but it doesn't show up.
Has anyone had luck installing it?
I'm on CiviCRM 4.7.27 on Joomla 3.8.6

I'm not sure what fixed it, but I deleted my civi and browser caches, reinstalled the extension, and refreshed my view and transactional emails showed up and it works wonderfully, thanks Fuzion!


CiviCase case closed and remove remaining activities On CiviCase, if you setup the standard timeline to be:

Open Case
Phone Call to Confirm Interest (offset, 2 days)
Setup Meeting (offset 7 days after phone call)
Case Closed

This example here will schedule the phone call and setup meeting on the case. If at the phone call activity, and person is not interested and case is closed, wouldn't the expected behavior be to remove the scheduled meeting out of the timeline? And/or, only show the "setup meeting" activity if the phone call is completed?

I'm not sure what you're looking for other than to just confirm the behavior that you're seeing, in which case the answer is "no" and "no". i.e. it does not currently do those things.

Could it work differently? Probably. The history is that when the feature was first added it was left pretty basic because while there were lots of ideas tossed around, the feature itself and nailing down the full set of use-cases wasn't a priority, and it wasn't desired to spend time/money on things where it wasn't clear yet if they'd be used or not.

One way to implement your workflow is to have activities 3 and 4 be configured as part of another timeline/sequence, and then after the staffer does 2, if the person is interested the staffer chooses "Add timeline" and picks the other timeline/sequence.


Are there up-to-date CiviCRM coding standards available? I am using NetBeans 8.1 under Windows to develop/debug some CiviCRM code.  Previous attempts at getting the contribution accepted ran into trouble as they failed to comply with the coding standards.  I've installed PHP Code Sniffer and the Drupal standard from Coder - see https://www.drupal.org/node/1420008, but even when applied to 'vanilla' CiviCRM code throws a number of standards violations, particularly around the way comments are entered.  Has anyone got any comments/thoughts?

Using the Drupal standards in your IDE ought to get you most of the way. For fine-tuning you can see https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation and also try out the civilint cli tool which is shipped with buildkit.


All emails are sent from the same address I've noticed recently that when you send an email via Actions->Send Email, it does not show as being from the address you are logged in with or the one you choose from the drop-down. Instead it always comes from the same address (presumably one that is configured globally somewhere).

The reply-to address is correct, but the from address is not.

There is nothing in the bug tracker about it. Is anyone else having this problem? I have not consciously changed any email settigs... I'm on civi 4.7.22 on Drupal.

Ah - yes that sounds like a regression. This is working fine in 4.6.28 - I just confirmed that in 4.6.28 the From is (correct) the Email that I am selecting from the From list - and not the default From as configured in:

civicrm/admin/options/from_email_address?reset=1

Open a JIRA ticket for it to try get some attention to this issue. Label it with regression - and any detail you may have e.g. do you remember when this was last working?


Modify unsupervised dedupe rule to ignore whitespace? I have noticed in many occasions, duplicate contact is created just because there’s an extra space in names or a missing one.
Just wondering is it possible to setup the unsupervised dedupe rule in a way so that it can ignore the whitespace of first or last name? Thanks

I assume Civi trims whitespace on both sides of first name and last name before saving into the database. Are you saying if there is a space before and after names dedupe rule doesn't work? If so than its a core bug.
Have just created a PR for the fix.
If you saying the first name entered is 'Pradeep k' with a space between two words than i don't think its handled in Civi at the moment. You may need to ask someone to have this feature available in Civi or contribute code if you are developer. Or you can create an extension and handle the above scenario by implementing hook_civicrm_findDuplicates or hook_civicrm_dupeQuery hooks.
Thanks
Pradeep


Event Webform Templates? I have a complex Event registration process, for which I create a complex Webform (I use Webform Integration).

This event recurs several times a year, and the webform is painful to re-create each time.

Is there any way to either clone an existing webform (then adapt), or create a Event Webform template from which I could then derive individual Event Webform occurrences ?

This is more of a Drupal answer than a CiviCRM answer, but I believe you can use Node Clone to copy/duplicate webforms.

  The clone module allows users to make a copy of an existing item of site content (a node) and then edit that copy. The authorship is set to the current user, the menu and url aliases are reset, and the words "Clone of" are inserted into the title to remind you that you are not editing the original content.


Where to hire CiviCRM consultants or developers Is there a directory of CiviCRM companies or freelancers to make CiviCRM features that we need?

You may want to have a look at CiviCRM's Partners and contributors page.
For special requirements, it would be helpful if you specify a bit more in detail, what you are looking for. Also, this CiviCRM forum may be of interest: Professional CiviCRM Services

Regards
Fabian


Mailing to contacts in a group - deleted contacts were included to the list of recipients We discovered a bug on this weekend with our last newsletter. We use CiviMail to send our newsletter to all contacts within our "Newsletter" group. As usual we collected the group as the recipients in the mailing form. After the update to CiviCRM 5.29.1 we made last week we realized that the newsletter was sent to group members which are delete already.
I checked if these contacts were included to the newsletter recipients before but I did not find deleted contacts in the list of recipients for newsletters sent before this update.

It seems that the bugfix which fixed this for smart groups also did it for the groups. Our last mailing sending after upgrading to CiviCRM 5.30.1 resolved this issue. No mails have been sent to contacts in trash.


Can we integrate forms on wordpress using CiviCRM? I just wanted to ask what plugins or any ways to integrate forms in wordpress that can integrate using CiviCRM?

I'd recommend using Caldera Forms CiviCRM which has great integration with WordPress via the superb Caldera Forms plugin. Check out the tutorial by Tadpole Collective to get yourself going with Caldera Forms CiviCRM.


Rule to Cancel Membership After Certain Number of Events Attended I'm new to CiviRules. I have a membership type that I want to be an event based membership in that I want users to users to be able to attend 5 events and then their membership is cancelled. I guess the rule would be: When active member on 'event membership' type attends 5 events their membership is cancelled and a renewal reminder email is sent. Can anyone help me with how to set this up?

I think the trigger should be 'participant changed' as you want to test this everyone time someone attends an event.

The first condition would be something like 'participant status changed to registered'.

I am not sure if you can combine membership conditions with a participant trigger, so checking the membership type would be weird (the data is not there when dealing with a participant of an event). But you could put all members in a group and then check if the participant is a member of that group.

The third condition would be to count if it is the fifth, I do not think there is a ready made condition for that, so it would have to be developed (probably about 4 hrs work).

The first action would be to send an email (you will need to install the Email API extension to do this: https://civicrm.org/extensions/e-mail-api).

The second action would be to cancel the membership. At the moment there is no action to do this, so that would need to be developed (approx. 4 hrs work).

I would recommend extensive testing too :-) CiviRules is powerful but also allows you to automatically send lots of emails.

Good luck!


Why are email replies not being forwarded properly? When I send a bulk email through civiMail i use my email address and have the options to track replies and forward replies but in the report I see that there are 2 people who replied but the emails never got forwarded to me.

do you see them as activities for these contacts? if you track replies, they come back to civi and get stored as activities


Suppress 'Unsupported locale specified to parseStreetAddress: en_GB' message If debugging is enabled,  'Unsupported locale specified to parseStreetAddress: en_GB' message appears in some situations (add/edit contact), which scares non-techy editors.

There are some ancient posts at civicrm forums, which describe clearly  why   this message appears, but I've not been able to find a recipe of how to stop this from popping up, apart from a general advice of "provide custom logic for parsing UK postal addresses".

Any hint about how to hide the message, please. Thanks!

If you switch off the checkbox for street parsing (as petednz suggests) the error will disappear. But if you really need the street parsing that will not help you. In that case you would need to add the en_GB to the array in CRM_Core_BAO_Address in an extension, like so:

  static function parseStreetAddress($streetAddress, $locale = NULL) {
$config = CRM_Core_Config::singleton();
/* locales supported include:
 *  en_US - http://pe.usps.com/cpim/ftp/pubs/pub28/pub28.pdf
 *  en_CA - http://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp
 *  fr_CA - http://www.canadapost.ca/tools/pg/manual/PGaddress-f.asp
 *          NB: common use of comma after street number also supported
 *  default is en_US
 */
$supportedLocalesForParsing = array('en_US', 'en_CA', 'fr_CA', 'en_GB');

if (!$locale) {
  $locale = $config->lcMessages;
}

and this is a bit awkward :-)


"Recent Registration" view under CiviEvent - Customise columns Hi to all (and thank you in advance),

I'm looking to add / remove a number of columns under the "Recent Registrations" view, in CiviEvent (image attached).

Any suggestions are welcome.

(running CiviCRM 5.13.4)

Kind regards
A.

That table is defined in templates/CRM/Event/Form/Selector.tpl and changing that would require some level of coding (your profile suggests you have this skill). Changing the Selector.tpl template directly would solve your problem but is discouraged because it causes headaches when upgrading to new versions. Creating an extension is the preferred way to make these kinds of changes, but that is much more involved. (See this question for more information.)

A non-coding, quick alternative is create an Event Report with the columns that you want to view, and under that report's Access tab check "Available for Dashboard". That will allow users to add the report to their main Civi Dashboard (rather than the Events Dashboard). That won't get exactly what you want, but may help you solve the usability/workflow issue that I imagine is behind your question.


CiviMail DB Error: no database selected Civi 4.6.15
Joomla 3.5.1
Previously I upgraded my civi version to 4.7, and somehow I corrupted my database. I reinstalled a clean 4.6.15 and restored my database from backup.
It seemed to be working. I was able to send a New Mailing by executing "Send Scheduled Mailings" with no issues. 10 minutes later, I attempted to send another email to the same group and the same manual execution, but I'm getting:

Sorry but we are not able to provide this at the moment.
DB Error: no database selected
Return to home page.

I can still access contacts, and I can still see the groups.
Any ideas on where to start?
-EDIT 5/8/16-
I ended up exporting contact info, uninstalling Civi, deleting the media folder, deleting all associated database info in my Joomla database, reinstalling Civi (4.7.7), and importing contacts back into the system. Yes, it's an insane Neanderthal way to do it, but I ran out of options.
I just attempted to send an email to about 55 recipients using the CiviMail component (see below). I manually initiated it via the Send Scheduled Mailings in the Scheduled Jobs area.
It hangs then displays the DB error message above.
For some recipients, they receive the email multiple times. Others never see it. The report says there are zero successful deliveries, but it also shows tracked opens:

If I try to send another email, it reinitiates the send on emails that have not been cancelled.
I thought I completed a last resort option of rebuilding everything. Since that didn't work, I don't know what to do. I'm desperate for any suggestions.

In all of your database changes, you may have mixed up the database information in one or the other of your civicrm.settings.php files.  In Joomla there are two:

administrator/components/com_civicrm/civicrm.settings.php

and

components/com_civicrm/civicrm.settings.php

They should be almost identical: the site URL for the one in administrator should be http://yoursite.org/administrator/ rather than just the base URL of your site.

Both have database connection information; so does your Joomla configuration.php file.  You need all three to agree on the Joomla database information (the line with CIVICRM_UF_DSN in the CiviCRM files), and you need the two CiviCRM files to agree on the CiviCRM database information (the line with CIVICRM_DSN).

If you think you've hopelessly ruined your CiviCRM settings files, you can rebuild them from the copy at

administrator/components/com_civicrm/civicrm/templates/CRM/common/civicrm.settings.php.template

You will want to keep your existing ones handy as a guide (and a fallback in case you cause trouble), and you'll need to replace all the tokens, which appear as %%tokenname%% in the file.


Splitting Contributions between Accounts From time to time, we have contributions that come in which need to be credited to two accounts. How do I split a contribution?

You could create two contributions, as @ErikH mentioned in a comment.
You could create a price set with two fields configured for the two accounts. Then create a contribution using the price set and have two line items, one for each account.

FYI, we expect with a month or so to have a new version of the Line Item Edit extension which will allow you to easily add an additional line item without first defining a priceset. That will allow you to split the contribution between accounts more easily. See https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/wiki


Event invoice (receipt) - custom tokens Can anyone provide guidance how to create tokens for custom participant fields, to be added into a  Contribution Invoice Receipt for event registrations? Our tax system requires that VAT registration numbers are included in all invoices, and we want to also add purchase order numbers.

(Drupal, Civi 4.7)

Many thanks
Davy

I'm not sure if this is possible - until very recently (version 4.7.17), there wasn't support for custom contribution tokens on a receipt, let alone participant custom tokens.  See CRM-8526 for details.


change default 'district' CiviCRM newbie here!

When I want to add a new contact (individual or organisation) to the db there're a set of checkboxes under the 'District' accordion – District A, B, etc

How do I change those options to postcode AB1, AB2 etc, for example?

Also, how do I change the title of the accordion itself?

TIA

Welcome!
In future: it would help if you tell us what version of CiviCRM you are using with what CMS. Also, it looks like you are working on a customised version of CiviCRM. The tab 'District' is not part of core CiviCRM, but looks like a Custom Group.

If you select 'Administer/Customize Data and Screens/Custom Fields' in your menu you will get a list of custom sets. I expect you will see 'District' there. If you click on 'More' and then 'Settings' you can change the label (and hit 'Save') which will then also be the title of the tab.

If you are then back in the list with Custom Data, you have to click on 'View and Edit Custom Fields'. This will show a list of fields in the group. One of those (and possibly the only one) will be 'Districts'. You should see an option 'Edit Multiple Choice Options' which will allow you to change the options.

This is all on the assumption that this is a custom group :-)


"nativecode=1060 ** Duplicate column name 'created_id'" when upgrading from 4.4.14 to 4.6.2 Keep getting this error when Upgrading from 4.4.14 to 4.6.2 directly. I am upgrading based on the civicrm documentation.
Seems like civicm_mailing_abtest has some error. But I have checked I did not have this table in 4.4 version and it was created during the upgrade process.
How to deal with it?

DB Error: unknown error in unknown on line unknown
nativecode=1060 ** Duplicate column name 'created_id'
ALTER TABLE civicrm_mailing_abtest ADD COLUMN created_id int unsigned

That looks very strange error, it appears to be complaining that the created_id column is being created twice, However looking through the upgrade sql files on the github repo, I can only see the one reference to creating created_id column on that table and that is in the 4.6alpha7.sql file. I do note that it came from this JIRA case https://issues.civicrm.org/jira/browse/CRM-15970. Perhaps you should raise it as a bug in the Jira system but also would recommend looking through the upgrade sql files on your system to see if they match what is in the git repo


API chaining like behaviour with import.php Looking to use import.php function to do a big import.

I'm yet to find some documentation that clearly explains it all. Seen this:

https://civicrm.org/blogs/xavier/api_batch_tools

and this http://wiki.civicrm.org/confluence/display/CRMDOC/Imports

But I'm wondering - the way it works, in terms of using a csv that maps to an entity - is it possible in any way to chain entities in the same way the API works? i.e. create contacts with address and email etc in one CSV?

Thanks

J

I use CSV API import quite heavily - but if there's a way to do chaining, I'm unaware of it.  I use an ETL tool (Pentaho Kettle) to script migrations, so I handle lookups there.


Is there a hook for when a CiviMail is created/scheduled/sent/completed? I want to call a function whenever a CiviMail is sent from our system, to send a log message to a third party system (Slack in this case).

I've had a look at the CiviCRM documentation, and while I can see hooks for both before/after an email is sent, I can't see one for a CiviMailing. I could in theory use these hooks, but even if I de-duplicated it down to a single record, it wouldn't contain information about the mailing (such as mailing name, mailing size, groups, etc).

What's the best option to accomplish this? Is there a relevant hook? Would I need to run a cronjob to check the relevant tables?

to be checked, but creating a mailing should go through the normal hooks like the other entities in civi

so if you go with the pre or post hooks
http://wiki.civicrm.org/confluence/display/CRMDOC/Database+hooks

hook_civicrm_post( $op, $objectName, $objectId, &$objectRef )

you should have one with the objectname mailing you want to handle and do the needed


Global editing of CiviCRM fields How can I globally edit a particular CiviCRM Contact field?  For example, I would like to search for a specific set of contacts, then assign them all a particular Contact Subtype.

This is possible using Update contact using profile. Below are the step to achieve this

Create a Profile with Contact Sub-type field.

Do Contact Search and select contact(s) you want to update and select 'Update multiple contacts' from Actions dropdown.

You will be redirected to Profile selection page. Select the profile you had created at #1 from 'select profile' dropdown and click on continue.

You will be redirected to a page where you wii see fields against each contact. Select the contact subtype for each contact and then click on Update Contacts. You can also click on Copy image (besides column title) to copy the content of 1st field into rest of fields beneath it.

HTH

Pradeep


On CiviCRM 4.7.7 Error Exporting I've moved to a new server with a current version of PHP, have updated WordPress to 4.5.2 and updated CiviCRM to 4.7.7. I still get this error when exporting selected records from an Advanced Search:

Warning: strpos(): Empty needle in /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php on line 709

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895

Warning: Cannot modify header information - headers already sent by (output started at /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:709) in /home/zoweh/public_html/allied/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895
"Contact ID","Contact Type","Contact Subtype","Do Not Email","Do Not Phone","Do Not Mail","Do Not Sms","Do Not Trade","No Bulk Emails (User Opt Out)","Legal Identifier","External Identifier","Sort Name","Display Name","Nickname","Legal Name","Image Url","Preferred Communication Method","Preferred Language","Preferred Mail Format","Contact Hash","Contact Source","First Name","Middle Name","Last Name","Individual Prefix","Individual Suffix","Formal Title","Communication Style","Job Title","Gender","Birth Date","Deceased","Deceased Date","Household Name","Organization Name","Sic Code","Unique ID (OpenID)","Current Employer ID","Contact is in Trash","Created Date","Modified Date","Addressee","Email Greeting","Postal Greeting","Current Employer","Location Type","Street Address","Street Number","Street Number Suffix","Street Name","Street Unit","Supplemental Address 1","Supplemental Address 2","City","Postal Code Suffix","Postal Code","Latitude","Longitude","Address Name","Master Address Belongs To","County","State","Country","Phone","Phone Extension","Email","On Hold","Use for Bulk Mail","Signature Text","Signature Html","IM Provider","IM Screen Name","OpenID","World Region","Website","Group(s)","Tag(s)","Note(s)","Phone Type","IM Service Provider"

It then lists each of the records selected in the same format...

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

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

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

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

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


Is there a setting to prevent Paypal Express overwriting contact details with provided Paypal billing details? We are using CiviCRM 4.7.22/Drupal 7.56 and are increasingly encountering a scenario where Civi contacts are sharing their log in details with admin/PA staff to make payment via PayPal with a credit card on their behalf. The problem we encounter is when the admin/PA checkout with Paypal they enter their own name, email address and billing info, not the Civi contact. When the contribution is made this then  overwrites the Civi contact. This is particularly problematic for events as we use Civi data to make badges and email joining instructions.

Is this the designed behavior or is there a setting either in Civi or Paypal I'm missing?

I found a solution for PayPalPro by editing the code at line 277 in \CRM\Core\Payment\PayPalImpl.php

  'billing_first_name' => 'firstname',
  'billing_middle_name' => 'middlename',
  'billing_last_name' => 'lastname',

ie I added "billing_" at the start of the three Civi field names.  This is how received information from PayPal is mapped to Civi fields. With my change the name goes into the billing fields and not the main/primary fields.

In my case there was not a problem for the address fields, ie they were getting through OK to the billing address.

I've done this as a customisation for my site. If it's correct then this should be converted into a bug report so it's incorporated into the main code.  Anyone care to test?


Food Coop Model for CiviCRM setup I'm helping our food coop transition from a home grown membership system to CiviCRM. We have a number of unique requirements and am wondering whether any members have a model configuration to share for coop membership. Some of the uniqueness includes:

Equity for membership is paid in different amounts and over different periods of time for individual versus family memberships. During the equity period one is still an active member and must also pay a yearly fee.
There is also an option for sweat equity for those who cannot pay the equity fee. This also needs to be tracked for completion.

I'm currently struggling with the using membership types versus membership status to track the above.

The coop has varying discount levels based on the amount of hours volunteered. This can change on a monthly basis and the monthly discount rate needs to be tracked. A separate PHP/MySQL based system tracks the actual hours posted.

Realizing that this is a very broad subject and request, I am hoping there are some members here who have a similar system they've set up for their coop and could share some insights and even some configuration info.

Firstly, props for the work you're doing!

Secondly, the first two bullet points I'm fairly sure you can do out of the box just with config - you can have two membership types with different fees, and you can definitely offer discounts.

The last point is the most interesting. I wonder if a combination of one of either CiviPoints (a brilliant extension written by DaveFF) or CiviVolunteer (a brilliant extension written by Ginkgo Street Labs) with CiviRules (a brilliant extension written by CiviCoop) with perhaps some custom jiggery would help you with the latter.

CiviPoints lets you collect "points" that people have accumulated through different means.
CiviVolunteer lets you track Volunteers' hours and shift allocation.
CiviRules lets you perform actions when conditions are met. I.e. people who donate time, money, or food could then trigger CiviPoints to be awarded and tracked, and when enough points made you could adjust a value that says what discount memberships are allowed.

I know that all of the extensions' authors would be happy to be contacted :)


Tax Receipt (CDN TAX RECEIPTS) On our tax receipt (using CDN TAX RECEIPTS) it says: "Charitable Registration:" - Is there any plan to change that to read: "Charitable Registration Number" on the template?

Since it's a ts() wrapped string, you should be able to use Administer - Customize Data - Word Replacements to replace it. See https://github.com/jake-mw/CDNTaxReceipts/blob/1.5.1/cdntaxreceipts.functions.inc#L409. I haven't tested that.

To fully customize it you could implement hook_cdntaxreceipts_writeReceipt. See https://github.com/jake-mw/CDNTaxReceipts/blob/1.5.1/cdntaxreceipts.functions.inc#L301


Can I turn off Drupal cron while the CiviCRM upgrade script is running? I want to know if it is a bad idea to turn off cron while in the middle of upgrading the CiviCRM?

Below is my original post, but now I see that this information is irrelevant/unrelated.

I am upgrading our CiviCRM from 4.3.8 to 4.7.13. On my local dev environment, the update went basically fine, but I didn't have cron turned on. On my remote test site, which does have cron runs, the update seems to be stalled. Watchdog is showing cron errors for the last 3 hours with seemingly no progress. I suspect that Drupal's cron is trying to run and everything is being stalled because of this error, that could be caused from jumping so many versions. What I want to know is if I can open another terminal window and turn off cron until I'm done running the update script or is this a bad idea, especially since it's already running?

In case it's important, here is the cron error:

error  cron  EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7953 of /var/www/html/mydomain/docroot/includes/common.inc).

My standard for Drupal cron is to only run it every 8 hours.  Unless you use modules that expect a more frequent update (e.g. to pull in RSS feeds in a timely manner) you should be fine turning it off for a day.


Handling registration of multiple participants for an event? I'm not sure if this should be here, in Mattermost or in Issue Reporting.  It refers to CiviCRM 5.22.0.
We allow on-line registration of multiple participants for an event, and allow a deposit to be paid. The initial registration is Pending (Pay Later) as we do not wish to get involved with payment processors and the associated security implications. Instead, we monitor our bank account for such payments. The email sent in response to the receipt of the registration sent to the primary participant contains the information about all the participants. However, the email sent in response to the administrator recording the payment (and changing the status to Partially Paid only shows the registration of the primary participant and it also shows the total amount paid and the outstanding balance. Editing and sending another receipt just shows the information about the primary recipient and no balance information.

Would it be better if all such receipts showed:

The information about all the recipients
The amount paid so far and the outstanding balance.

?

I have been investigating how this might be accomplished and discovered, among other things, that there seem to be several ways in which the total amount payable is calculated, depending on which part of CiviEvent is doing the calculation.

Has anyone any thoughts on this?

This by default is not available in CiviCRM ATM. You can alter the message template under System workflow message for 'Events - Registration Confirmation and Receipt (off-line)' to include additional details. If you are good in smarty variables than you can use api to fetch details like additional participant or payments and include it in your message template, or you can create extension to
 implement tokens and tokenvalue hook to add tokens and process the value when rendering message template before it is send to user.


Is upgrade possible for `payment` type Extension? I see extension of type 'payment' has been deprecated and hence not listed in the active modules we get from getActiveModuleFiles() function. Due to this, any upgrade to this ext. is not possible since the upgrade link is not shown for them (as they are not active modules anymore)

Is there any way to upgrade such extentions - i.e to execute the following query in upgrade?

UPDATE civicrm_extension
SET type = "module"
WHERE full_name = "nz.co.fuzion.paystation

I haven't found anything other than the answer I posted below.

Uninstall the extension form the site.
Upgrade the site to 4.7.
Make the extension compatible with the latest version - Eg - Upgrade Paystation processor to 4.7 compatible and Install the extension again.


Why is the CiviCRM Data Processor "Country" field displayed as a number in Word Press Content Views? I successfully installed Content Views CiviCRM with CiviCRM Data Processor for pulling data via Content Views in WordPress. This integration that is explained here works fine. However, I'm encountering a problem that I don't know if it's a bug or a mishandling on my part: The country field is displayed as a number (e.g. I get 1193 instead of Slovenia). How can I fix this? Thank you for your support!

The country name should display correctly if you set the field from 'Raw field value' to 'Option label'.


require_once(CRM/Core/Payment/SecurePay.php) failed to open stream: No such file or directory in Civi\Payment\System::getByProcessor() I have been working on a site which was recently upgraded from 3.4.8 to 4.6.0
I am getting an error in error log which states that

  Warning: require_once(CRM/Core/Payment/SecurePay.php): failed to open
  stream: No such file or directory in
  Civi\Payment\System::getByProcessor() (line 52 of
  /sites/all/modules/civicrm/Civi/Payment/System.php)

I did not find any civicrm extension with respect to SecurePay.
I found securepay file here which i placed at CRM/Core/Payment/SecurePay.php :https://github.com/hash-bang/PHP-SecurePay

Only if go to database and disable securepay payment processor it fixes the error

UPDATE `pysecure_civi3`.`civicrm_payment_processor` SET `is_active` = '0' WHERE `civicrm_payment_processor`.`id` = 4;

where id= 4 is securepay payment processor.

Using a library that is not customised for CiviCRM will not work. Maybe the pre-upgrade system (the 3.4.8 version) had a custom made payment processor for SecurePay. Look if you can find the file SecurePay.php in the backup of the old installation.


Managing Events -> Log Volunteer hours When logging volunteer hours for events and selecting "no-show" in the status it asks me to put the "Actual Duration". Value '0' or '-' doesnt work.
Any idea how to fix this problem?

Thanks,

Alek

Just to add the answer, as mentioned by Alek. This is a legitimate bug report and the issue is being tracked here: https://issues.civicrm.org/jira/browse/VOL-172

It is slated to be included in the 2.1 release and a link to the patch will be available on the issue when it is released.


Issue on closing popup and showing message after doing any action in CiviCRM Having issue when doing action like adding, updating or deleting anything from CiviCRM. Its not closing the popup and shows success message.

For Example,
When I am adding the new event registration from CiviCRM admin panel, Once I clicked on Save button, the registration got saved, but the popup is not closing and not showing the success message. Page stops with disabled buttons. Every time I suppose to refresh to see the saved records.

When I checked the ajax, One ajax request was called and succeed.

/civicrm/contact/view/participant?action=add&cid=50767&context=participant&snippet=json

Response

Object ID: 39731Operation: createObject Name: ContributionObject Ref: CRM_Contribute_BAO_Contribution Object
(
    [_relatedObjects] => Array
        (
        )

    [_component] =>
    [trxn_result_code] =>
    [id] => 39731
    [contact_id] => 50767
    [financial_type_id] => 4
    [contribution_page_id] =>
    [payment_instrument_id] => 4
    [receive_date] => 20180709022000
    [non_deductible_amount] => null
    [total_amount] => 0.00
    [fee_amount] => 0
    [net_amount] => 0
    [trxn_id] => null
    [invoice_id] =>
    [invoice_number] =>
    [currency] => USD
    [cancel_date] =>
    [cancel_reason] =>
    [receipt_date] => null
    [thankyou_date] =>
    [source] => HGS General Dinner- Tentative : Offline registration (by Mr. Manigandan V)
    [amount_level] =>
    [contribution_recur_id] =>
    [is_test] =>
    [is_pay_later] => 0
    [contribution_status_id] => 1
    [address_id] =>
    [check_number] => null
    [campaign_id] =>
    [creditnote_id] =>
    [tax_amount] =>
    [revenue_recognition_date] =>
    [_options:protected] => Array
        (
        )

    [_DB_DataObject_version] => 1.8.12
    [__table] => civicrm_contribution
    [N] => 0
    [_database_dsn] =>
    [_database_dsn_md5] =>
    [_database] => pantheon
    [_query] => Array
        (
            [condition] =>
            [group_by] =>
            [order_by] =>
            [having] =>
            [limit_start] =>
            [limit_count] =>
            [data_select] => *
        )

    [_DB_resultid] =>
    [_resultFields] =>
    [_link_loaded] =>
    [_join] =>
    [_lastError] =>
    [payment_processor] =>
)
{"buttonName":"upload","action":1,"id":22766,"status":"success","userContext":"\/civicrm\/contact\/view?reset=1&force=1&cid=50767&selectedChild=participant","title":"New Event Registration for Mr. Mani V","crmMessages":[{"text":"Event registration for Mani V has been added.","title":"Saved","type":"success","options":null}]}

Please Help!
I am using Drupal 7 with CiviCRM 4.7.29.

Only that last line (starting with {"buttonName) should be present.  The rest looks like debugging code that was accidentally left in.

If this doesn't sound like something you may have done personally, try disabling extensions and re-enabling them one by one (or half at a time) until you've found the troublesome extension.

UPDATE: Since this code isn't in an extension, it may be in core.  I searched the codebase for the words "Object ID", which appear in your output - and for me they only appear in xml/schema/ACL/ACL.xml and CRM/ACL/DAO/ACL.php.  If you search YOUR codebase for the words "Object ID" you're bound to find them somewhere else.


How can I generate a CiviMail delivery & Click-thru report I need to email a report to a person of a particular mass email that was sent from CiviMail. The person doesn’t have access to CiviCRM. How can I generate a CiviMail detailed delivery & Click-thru report from CiviReport and email using scheduled job? Thanks

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


Where should one look for logs when debugging a new problem? When a bug or problem arises, one must often seek out the corresponding error-messages or error-logs. Since Civi runs on a large stack, there can be several layers to check, e.g.

The browser's Javascript console
The Civi application log
The PHP error log
The httpd log

The answers vary a bit (depending on CMS, browser, server platform, etc), but there's also a fairly limited range -- in general usage, there are only a handful of common CMSs (Drupal/Joomla/WordPress), common browsers (Firefox/Chrome/Safari/IE), and common server platforms. For web-designers and moderately-technical site builders, it would help to have a cheatsheet with common places to look.

I found a couple pages about debugging strategies in Civi. The bug-reporting page discusses the high-level business process of using forums and issue trackers. The Debugging for developers page is very developer-centric (eg adding new log statements to the source-code; installing+configuring xdebug). However, I could not find a concrete list of places or instructions for checking logs.

It really depends on the type of error you are getting. If something is wrong with the display or some ajax functionality isn't working I check the JavaScript console. If there is an actual error message I check the php log and then turn on display back-trace to get a better view of where the problem is occurring.


Do CiviCRM Extensions Cost Anything? Do the CiviCRM extensions cost money or are they free?

Sorry, very new to all of this.  Trying to compare open source with something like Salesforce.  So with Salesforce they have a kind of app store where you can buy things made with salesforce CRM?

Thank you in advance,
Chloe

Like CiviCRM, its extensions are currently without any upfront or ongoing licensing fees. People are free to offer paid extensions, but I am not aware of them.

You are free to use, modify and share the code. If you benefit from Free and Open Source Software (FOSS), you are encouraged to contribute back to the community.


How can I set up the default CiviCRM error page/message inside the site template? On occasion, CiviCRM produces an error page like this (for example, when someone tries to visit a contribution page that has since been disabled):

How can I make sure that this shows up in the site's theme instead of a blank white, unfriendly, actually-rather-scary page?

BONUS FOLLOWUP: would it be possible to set up a redirect setting for specific disabled pages, to forward them to a live page, or a more descriptive message?

you can override (not recommended):

templates/CRM/common/fatal.tpl

or set your custom error template here:

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

You can also specify a different error handler in that setting


Best WordPress theme framework for correct display of CiviCRM? For those who develop for CiviCRM on WordPress, what theme frameworks do not work with CiviCRM, what theme frameworks do work without problems, and which seem best for displaying CiviCRM content?

I've looked at Genesis, and Gantry.

Watch out for themes or plugins that use Backbone.JS calls. They seem to be causing some issues right now.  One such theme is Salient.

The JetPack plugin also seems to be suffering from the same problems. (Search the StackExchange for backbone and you'll see a few different threads.)

The Virtue theme has styling issues.

Twenty Fourteen provides good displays.


How can I tell if the logged in user has a certain permission? How can I tell if the currently logged-in user has a certain permission in CiviCRM?

Should I use CMS-dependent functions, like user_access('permission') in Drupal, or can I use one CiviCRM function to check the permission for the current user?

For example, how could I display a message if the currently logged-in user has the 'edit all contacts' permission?

I believe what you're looking for is:

CRM_Core_Permission::check('edit all contacts')


How to change a sites URL CiviCRM 5.14.0

I've read several explanations of how to change a sites URL but I am not having luck. I have made the changes in my apache2 sites-available conf file and restarted apache2. I have also changed the base in civicrm.settings.php. Now the new URL just goes to the Apache default page.

Some things I have read say I have to clear the CiviCRM cache but I can't do that if I cannot access the site.

Any suggestions?

This is basically a system admin question rather CiviCRM specific. I personally don't have very good experience in doing this but when there is URL changes

Make sure your new domain is pointing to correct server IP
Update the url in apache or nginx conf.
Update .htaccess file in your site directory if its using any base url.
Update the base url in wp-settings.php or drupal's settings.php file.
Update the base url in civicrm.settings.php file
Clear drupal and civicrm cache
If using wordpress you may need to update in database

Query:

UPDATE wp_options SET option_value = 'http://new_domain.org' WHERE option_name IN ('siteurl', 'home');

Cheers

Pradeep


Minor flaw in CiviCRM registration page for EFF Excuse me for being OCD = perfectionist, but when RSVPing for an EFF event, there was no [register], [Submit], [Complete your registration] etc, but only a [Review your registration].
As a professional CRM company, I'd expect CiviCRM to have something this simple be correct:
Change the "review your registration" (which DOESN'T - you're LOOKING at your information right there!!) to "register".   Maybe you're thinking that it goes through an audit process making sure data is entered in the *'d (mandatory) fields.  But still... you are submitting the registration!
Thanks

The answer is that the meaning of that button changes depending on how the registration is set up and the text of the button doesn't change in line with that, unfortunately. I have a pull request in to fix this in future versions.


Best way to record court appointed community service? Our charity is a source for court appointed community service. Those volunteers are normally assigned to activities in and around the office, like cleaning, moving boxes of food around for the food pantry, etc. I hate to call it this, but in a lot of cases it might just be busy work in order to satisfy the probation conditions.  In other words, it's probably not the type of event the original coders had in mind when developing this app.  I have been reading and watching everything I can about events and I cannot convince myself that that is the best approach to recording activity/task hours for these types of people.

If that's it, then I'll go with it and figure out the best configuration within the framework of that feature.

BTW, this is running on Drupal and I have CiviVolunteer installed and working.

Thanks in advance and kind regards

it might be easier to log these as activities.  you can create new activity types, eg community service.

if you need a more complete overview of the activities spent around a volunteer,eg not only being able to see the time they spent, but also the monitoring and helping tasks of others, or record court events, try civicase. more complete, but more complex to set up


Drupal 6 Fatal error on profile view D6, Civi 4.6.7

I've ceated a directory profile of organisations. I can see the directory list, but when trying to 'view' the details of an organisation I get the following error:

Fatal error: Class 'CRM_Profile_Page_View' not found in /home/xxxx/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php on line 297

How I can fix this?

If you have recently upgraded, make sure you clear your caches, including the contents of /sites/.../files/civicrm/templates_c/*


How to get over 'Failed to locate CMS...' exception on civix? I was working to create skeletal extension module through civix but unfortunately I am getting this exception "Failed to locate CMS. Please call civix from somewhere under the CMS root."

Maybe the standard wrong suggestion :-) but did you try the generate:module whilst in a subfolder of your website root?


Undefined index: start_time in CRM Volunteer BAO NeedSearch.php Drupal 7.67
Civicrm 5.15.2
CiviVolunteer 4.7.31-2.3.1

I have the following error message on Volunteer Event registration "Volunteer Now" screen:

Notice: Undefined index: start_time in CRM_Volunteer_BAO_NeedSearch::usortDateAscending() (line 299 of /home/mysite/public_html/members/drupal/sites/default/files/civicrm/ext/org.civicrm.volunteer/CRM/Volunteer/BAO/NeedSearch.php).

Can you try to apply this PR https://github.com/civicrm/org.civicrm.volunteer/pull/513. I this it should fix the notice error.

Cheers

Pradeep


"System Status: Error" I updated to CiviCRM 5.12.0 hosted on WordPress internally on a QNAP TS-251+ Server. Where do I go from here? System Status: Error
Cron Not Running (CiviCRM Homepage says "Loading...)
Configure Default Mailbox (CiviCRM Homepage says "Loading...)
Complete Setup (CiviCRM Homepage says "Loading...)
MySQL utf8mb4 Support (Server charset: UTF-8 Unicode (utf8))
PHP Out-of-Date (Unavoidable)
Remote Profiles Enabled (CiviCRM Homepage says "Loading...)
View details and manage alerts

I know why the PHP is out of date. QNAP refuses to update their firmware.
We use PHPMyadmin.

I see suggestions aiming at editing this or that, but don't know what to use to edit.
We are hosting internally and I setup everything, but I do not know how to restore the settings and database. I am adept at searching through folders and putting preconfigured pieces in place, but this is like thinking 4 moves ahead in chess for me. I struggle at 3.

Any assistance is greatly appreciated.

I have not used a QNAP for this, but have in other contexts. You might be able to install entware ( https://www.qnapclub.eu/en/qpkg/556 ) and use that to install php7.1 or similar QPKG from entware's repo


Self-service update of credit card details - how to notify staff to re-process recurring contribution? We would like to send out links for credit card recurring donors to update their credit card when a donation fails, using the solution from this question. Then, we need to somehow notify staff that the donor has made the update, so we can re-process their recurring donation to cover the missed donation. Does someone have a solution for this notification?
There is a notification sent to the donor about the update, but that only goes to the donor. I've tried CiviRules on recurring donation change, but that does not appear to be triggered by updating credit card details through this link.
We're using IATS.

This works in core! There is an activity created of type Update Recurring Contribution Billing Details when a contact updates their details through the form. And then you can add a CiviRule to send an email when this activity is created. That will also capture back office updates and ideally it wouldn't but this is bearable. A back office update will have a target contact while a self service one will not, but I don't think there is any way to add lack of target contact as a condition in Civirules.
What I did is to only trigger on source contact activities and exclude updates with the source contact ID of one of our staff who might update a credit card from the CiviRule. Not pretty, but good enough.

Not sure if this always worked and somehow my testing didn't work before or something was fixed in our latest update to 5.35.1.


LIKE search in API for membership_type_id Is it possible to do a membership get api request with a "LIKE" operator with wildcards for membership_type_id?
Trying this out, I get

  CiviCRM_API3_Exception: [2001: 'Something%' is not a valid option for
  field membership_type_id

Which is fair enough enough but it means that LIKE isn't supported even though it's in the api explorer's operator dropdown.

Thanks!

SQL doesn't support LIKE for integer fields. For something like membership type id I'm not even sure what it would mean unless you have 10 or more, and even then still not really meaningful.


Can't Download Extensions I attempted to enable the Stripe payment processor in CiviCRM 4.6.4 by going to Administer > Administration Console > Manage Extensions > Add New. From there I click the Download link next to Stripe. After doing so I get the following error message:

"Sorry but we are not able to provide this at the moment.
Unknown extension: com.drastikbydesign.stripe"

This message appears when attempting to download other extensions as well.

My CiviCRM Extensions Directory is: /home/sitename/www/www/sites/default/files/civicrm/upload/
My Extension Resource URL is:
http://sitename.org/home/sitename/www/www/sites/default/files/civicrm/upload/

As a possible lead, I get the following error message when entering the Extensions screen: "WARNING: The downloader may be unable to download files which require HTTP redirection. This may be a configuration issue with PHP's open_basedir or safe_mode." If this error message is related, I'm still not sure how to proceed.

Thank you.

Please update your Extension Resource URL path as below and give a try
http://sitename.org/sites/default/files/civicrm/upload/

I guess this should work - please let me know the status thanks


How do I restore City, County, State to the Address block in Contact Summary I'm on Civi 5.20.0 and Drupal 7.67.

I installed and re-installed the Electoral extension, see

https://github.com/josephlacey/com.jlacey.electoral/issues/23

and

https://github.com/josephlacey/com.jlacey.electoral/issues/25.

To reinstall the Electoral extension, I deleted a number of custom fields, and option values, using the API, including City, County and State/Province from Option Group 21, Addressing Options.

I had used the Contact Summary Editor to create a custom layout. I have the Address block/pane on the top left of the leftmost column. Address is a 'predefined block', meaning it's in Core code, right?

But, now I don't see the City, County or State in the contact summary Address when editing, just when displayed. I do see Street Address, Postal Code and Country displayed and when editing.

The core.Address code is still there, I can see all the fields using the API Explorer to GET the Contact Summary layout, and I can update a record's Address values with the API Explorer.  I just don't see the fields in the UI when selecting Edit in the Address pane.

UPDATE: I just upgraded to Civi 5.19.2 and still see the same error.

So my assumption is that I deleted something I should not have during the Electoral extension install and re-install process, like a reference to City, County and State in the Address pane Edit UI, but not sure now what, or how to restore it :) .

UPDATE 2: I was able to duplicate the problem on the dmaster demo site by disabling City, County and State/Province in Addressing Options in Option Groups, which caused those fields to not appear in Administer -> Localization -> Address Settings -> Address Editing and so not in Address editing in the Summary screen for a Contact. And I was able to fix that on the dmaster demo site by re-enabling the fields in Addressing Options and selecting the checkboxes in Address Editing. However, the same fix does not work on my demo site.

UPDATE 3: I had deleted the City, County and State/Province option values in Addressing Options, duh on me, then added them back in, but of course, they had a new auto-incremented ID number. I thought that restoring to the previous, original OptionValue ID would fix the problem with the City, County and State/Province not appearing when editing an Address in the Summary screen. I was able to update the ID using mysql at the command line. But, changing the Option Value ID back didn't do the trick.

If the problem is that the county does not show up with viewing the address on the contact summary page... You can control what address fields are displayed by clicking Adminster -> Localization -> Address Settings.

Then, find the Address Display Format field and add to it: {contact.county}

If the problem is that when you edit the address, no county field shows up, then you can choose which fields show up by clicking Adminster -> Localization -> Address Settings.

Then, find the Address Editing field and check off the county option.

If the problem is that the county option is not even an option for Address Editing, then click Administer -> System Settings -> Option Groups. Find Addressing Options and clicked Edit Option. Hopefully county will be listed but disabled and you can simply enable it. If it's not there at all you could try adding it, but I'm not sure if it will be added in a way the CiviCRM expects.


How to hide civiCRM event sections like event attachment, event committee, Event Contact, Event Filter Informations when they don't have data Currently, I am using CiviCRM 4.7 version and integrated with Drupal 7.

In the Event registration page sections like Event attachment, event committee, Event Contact showing as default. Please refer to the screenshot.

Question is, Can we hide those sections on the Event registration page for each event. If they don't have any information . if they don't have any information.

Please guide me how to achieve this.

If it is possible in a new version of CiviCRM 5.8, Please guide me how to achieve this.

You can try this css trick

div:empty {
   display: none;
}

Or you can try using jQuery

$('div.section:empty').hide();


Sync new clients added in civiCRM to mailchimp I have started to use civiCRM on wordpress recently.
I have been using mailchimp for sending newsletter.
If I add new client in civiCRM, I want them to be added to mailchimp client newsletter list automatically. One way traffic only at the moment - from civiCRM to mailchimp when I add a client.
And second, if someone unsubscribes from newsletter list, how can I automatically (?) update in civiCRM this newsletter list?
how can I do this automatically?

Many Thanks

There is an extension that keeps MailChimp and CiviCRM synchronized. You can find it here

This extension allows you to configure groups or smart groups in CiviCRM so that they synchronise (in either direction) with Mailchimp lists.

The extension is compatible with CiviCRM 4.7.x and 5.x.x versions (Extension compatibility with 4.7.x generally implies forward-compatibility with 5.x.x)


How do I pass a variable to a smarty template? Big picture:  I'm working on a module that will display view-only custom data on a specific contribution page.

Please understand, if you're not aware of this already, view-only custom data is not available to smarty templates automatically.

I have successfully put my custom-data in a variable and have displaying in a debug message on my specific contribution page.

Now I want to display it for the user.  Some folks seem to be using the hook buildform for this.  I've looked at he buildform reference, and can make a form field appear on my contribution page.

In my template, I've tried using {$variable_name}, but it seems that's not enough to display my variable.

I've also tried:
$form->setVar( 'my_var', $variable_name); //in the module

and

{$my_var} // in the template

or

{$form.my_var} //  in the template.

Still nothing.  How do I pass a variable to a smarty template?

Can someone reply with some source code for the module and accompanying template help illustrate this for me?

Thanks much

I found a way to achieve the goal, although I'm sure there are other ways and possibly a more correct way.

In the module, assuming the value of $var is already set, in the module I have:

 $form->addElement('text','my_var', $var );

  // dynamically insert a template block in the page
   $templatePath = realpath(dirname(__FILE__)."/templates");
    CRM_Core_Region::instance('page-body')->add(array(
      'template' => "{$templatePath}/testfield.tpl"

Then the template file is this.  My data appears under 'label' instead of 'value'.  It does work though.

{* template block that contains the new field *}

The value of var is: {$form.my_var.label}

{* reposition the above block after #someOtherBlock *}


CKEditor Spellcheck Error The spellcheck option in ckeditor is throwing this error when use is attempted. Once the error window appears the screen just freezes unless you go into another menu. I am unsure if the recent update has contributed to this issue.

Wordpress 4.9.4
CiviCRM 4.7.29

Error Message:
"WebSpellChecker.net server: The specified customer ID is intended for use with CKEditor only. For more information, please contact us at support@webspellchecker.net or submit a ticket at webspellchecker.net website."

I had the same, in both Chrome and Firefox, due to the Referrer-Policy setting of my site. Error was raised with Referrer-Policy: same-origin (or stricter). To resolve it, relax the policy to origin-when-cross-origin for CK Editor.

Apparently, webspellchecker uses the referrer to check if the originating page is CK Editor.


How do we make sure labels are printing with proper capitalization? CiviCRM 4.3.8 (upgrading as soon as we can!) Drupal 7.50

We have a situation where, when people fill out the contribution form to make a donation, their name and address information is captured exactly as they type it (such as lack of capitalization or all caps). How to we ensure that when we print address labels, the labels have proper capitalization?

Thanks!

Pete suggests two good extensions - I've personally had good luck with Cividesk Normalize.


How can I redirect users to the contact dashboard after login? We're on civicrm 4.5.8 and drupal 7.

I'm testing accepting donations including recurring, which means the contacts will need logins.  When they login I think I'd like the landing place to be their contact dashboard or at the very least have a direct link to it in the menu.  Right now it seems that the users have to select My Account then after their name and address stuff there is a link for View Contact Dashboard.

Can I make it go their directly after they login?

Really, ideally, depending on their role I'd like them to be directed to different places, e.g. back office staff goes to the standard Civicrm home page normal users go to contact dashboard.

Your best bet with Drupal is to use the Rules module.  I think you also need to have CiviCRM Entity installed to get the proper tokens.

Add a new Rules Component:

Component Plugin: Action Set
Name the component (e.g.: Fetch CiviCRM ID of logged in user)
You only need one variable, choose CiviCRM > CiviCRM Contact (may need the CiviCRM Entity module for this step).  Give it a label (e.g.: Contact) and a machine name (e.g. civi_contact).  For usage, leave it on Parameter.

For the actions in the Action Set:

Add new action (1):

Entities > Fetch Entity by Property (not one of the many possibilities listed under CiviCRM headings)
Value: User
Property - Value: CiviCRM Contact
For Value - Data Selector, choose whatever the machine name of your Variable above is (e.g. civi-contact).
Limit the result count to 1.
Save

Add new action (2):

System > Page redirect
Specify your URL - you should now be able to use the [your-machine-name:id] token (e.g. [civi-contact:id]) to fill in the logged in user's Civi Contact ID.
Save

Then create a new rule

Reacts on Event: User > User has logged in
Add a condition: User > User has role(s); specify which role(s)
Set actions: use the Rules component that you just created (all the way at the bottom of the list).

Lastly, clone the rule component and rule as much as you need depending on how many different roles are going to different places.


Adding an individual to repeating events I have set up an after school event every monday for six weeks.
It's $5 for each session, but if they register for all sessions it's $20 rather than $30.

Currently I have to add the child to all six events individually. Is there some way to add a child to all events in a repetition? Also wondering whats the best way to handle this payment set up? I am unsure how to do it without charging $120 at the moment!

I tried having a look and the registration for multiple events was a requested feature in 2015. Is there any update on this? An extension that could help?

Thanks.

The Multiple Event Registration extension can handle this.


How to import csv file with some required fields missing I am running CiviCRM v.4.7.6. I am trying to import a csv file into contacts. Some of the members of the organization do not have email accounts and as a result the import rejects those records. Is there any way to import a file that has some of the required fields missing?

Email address isn't a required field unless you don't also have a last name.  At present, CiviCRM requires either a last name or an email address, but not both.


How should I configure CiviMember so both individuals and organizations can hold memberships? I've got CiviCRM installed for a non-profit client whose membership base is small organizations (theater ensembles) and individuals. I am now considering that I may have fundamentally engineered this wrong and that if I got it right there would be better solutions to problems that arrise.

How should CiviCRM be implemented so that there is the most logical and flexible architecture when both individuals and organizations can hold memberships?

Some details about what I mean about organizations and individuals both holding memberships:

Organizations can hold memberships.
Organizations have staff and associates.
Organizations often have no email address of their own, only the address of an associate. This maybe be the achilles heel.
Individuals can hold personal memberships.
Some of these members are affiliated with member organizations.
Some stand alone.
There are also many non-member contacts such as donors, newsletter subscribers, potential members, event participants... you get the idea.
We'd like to keep track of all these folks so that we can (easily) see activity for an individual, an organization, and an aggregate of activity for an organization with its associates.
We'd like members to be able to manage their membership profiles, manage their associates' profiles (if they are organizations), pay for new/renewing membership.
We'd like members to have privileged use of the website based on the type and status of their memberships.
We'd like to send bulk emails based on profile information and past activity. We'd like to send renewal notices and other personalized emails.
We'd like to be able to pose questions like: Which organizations had more than one associate who attend an event last year?

There's so much more of course but it is predicated on getting the architecture right. Any guidance will be most appreciated. Thanks.

I think the missing piece of your puzzle is to enable CiviCRM's inherited membership functionality.

Create a membership type that will be inherited from your organization members.
Set the relationship type to Employer of.
Your organizations' staff will now be considered members, which allows you to send them emails, and lets them renew their employer's membership online.

You can read more about this in the user and administrator guide.


Volunteer Signup - Display quantity/quantity_needed I've been modifying the sign up page to better suit our needs. I've figured out how to add Quantity but how would I go about counting the remaining need?

In other words, I'd like to show the total needed and the remaining needed after someone signs up.