Where in the CiviCRM codebase do css and js resources get output for an AJAX url or snippet? I'm trying to debug a Drupal/CiviCRM integration issue where js/css resources that are added in an extension are not getting output. I think it should get output as part of a form snippet that's getting loaded via ajax, and I can see that the code here: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Resources.php manages the code interface that allows extensions to add in their css and js, but I can't figure out at what point all the added js/css gets output. And I care because for the code I'm working with (webform civicrm), it isn't getting output.

Presumably there's some core code somewhere that grabs the structured data via something like:

$resource = CRM_Core_Resources::singleton()

And then converts the $resource object into html for output?

In the case I care about I want my css/js added to the end of a form that's being loaded via ajax, and the code seems to support this via the isAjaxMode method.

I haven't found the answer to this question, but I can avoid it instead.

These functions:

CRM_Core_Resources::singleton()->addScriptUrl()
CRM_Core_Resources::singleton()->addScriptFile()
CRM_Core_Resources::singleton()->addStyleFile()

all generate html that gets stored for later output, which is smart most of the time, so it can do some more processing (e.g. weeding out duplicates and/or compressing, whatever).

But if you look in the CRM_Core_Resources object, you can instead use the internal functions to generate the html and then manually add it to the html region that's going to get output in the ajax call.

Here's a patch that solved this for me, as an example.

https://github.com/iATSPayments/com.iatspayments.civicrm/commit/6441cd5dee2ee0163330cceb95b0ce4e3ae37fa8

Just adding js to the html being loaded doesn't always fire the functions that might get fired it was loaded with the original page, so you do have to pay attention to that.


preferred language not importing with contact data I have tried this several ways, but can't seem to get the preferred language to come in with the contact import. The initial values I had were basic (English, French, etc.) and didn't match the labels in Civi. I changed them to match the Civi labels, with no luck and finally, have tried simply using the assigned values: en, es, etc.  Still no luck.

Any thoughts?

It seems that a country designation is required too, even though they are not easily shown in the prefered language interface. So fr is not valid, but fr_FR is.


Where does CiviCRM store Merge 'history'? After Merging Contacts -> dig up a Contact in the Trash bin and you'll see something like:

Where does CiviCRM store this information? How does it track which Contact is merged with which Contact?

An activity gets recorded when you merge and it looks up the target contact via that.

Use $winnerContact = civicrm_api3('Contact', 'getmergedto', ['contact_id' => $contactId]).

See also https://github.com/civicrm/civicrm-core/blob/5.20.2/api/v3/Contact.php#L1275


In CiviCRM 5.13.5 the new menu appears below the actual page or form in CiviCRM 5.13.5 I get the CiviCRM menu below my main form/page even though I have specified that the menu should replace the website menu.
(see screenshot)

Fixed it by enabling clean url's in my local Drupal installation.


CiviEvent: Event info and registration form on one page? Right now, when I create an event, there is one web page for the info about the event, with buttons to click to get to the online registration page with a form where they fill in their name and email and actually register for the event. Is it possible to have the event info and registration form on one page, so they don't have to click a button and go to a different page, but can just fill in their name and email and click "register" one time and be done? This is a free event, so payment is not a concern.

I'm running CiviCRM in WordPress 4.7.4, if that matters.

What you can do is skip the Event info page. You can link directly to:
/civicrm/event/register?id=1&reset=1

For the info:
In Drupal you'd add a block on the register page to show the Event info/details. I'm all but certain that Wordpress has a concept similar to Drupal's 'blocks'.


Any way to allow non validated (public visitors) to search the PCP pages available for an event? Still evaluating CIVICRM for use by my organisation and I love most of the functionality.

One thing I need, and I'm surprised it's not core functionality - or perhaps it is and I haven't found it yet.....

Having created an event (a sponsored cycle ride in my case) and having participants register and create PCP pages, is there any way to allow a member of the public (i.e. not a logged in registered user) to search the PCP pages available for the event in order to find a particular participant they want to sponsor?

I've extended this somewhat by adding the PCP for Teams extension from uk.co.vedaconsulting.pcpteams so would need to integrate with that and search for individuals or teams.....

Here’s a working example of a PCP site using that specific Veda Extension as a basis. I’ve made some small edits thus far and have committed them back upstream;

https://secure.thewellspringfoundation.org

We decided to organIze the View (list of Team and Individual PCP pages) as a Leaderboard (based on funds raised thus far) but that could easily be an Exposed Search Term in the View.


Using CiviCRM shortcode (wordpress) for a profile in a popup I want to include a Civi Profile (newsletter signup) in a popup. I have tried many popup plugins but none seem to work. The profile just does not load. Is this possible and if so, please point me in the right direction. Thanks.

I have had success with Popup Builder - the preview never works, but the embed on the page always works.  This is a popup overlay - which I assume is what you are looking for. The free version is great if you just want a popup on a page of your choosing - the paid version is great if you want the popup to come up on any page a first time visitor first sees.


Unable to insert membership custom field in e-mail using Smarty I created a custom field set and a custom field used for memberships.
Now i would like to insert the data from the custom field into my e-mail template.
So i tried to find the custom field id by going to the edit custom field page:

?option=com_civicrm&task=civicrm/admin/custom/group/field&reset=1&action=browse&gid=4

So i presume that the the id is membership.custom_4 (???)
However when i add another Custom Field in the same group, I also find the same id. So it looks like the id that i find is from the Custom Field Set.

My question/problem is: what is the correct way to find out the custom field id and what is the correct syntax for this membership custom field within Smarty

When using the following code in the e-mail, the mail is not sent and the interface hangs forever. I only use plain text e-mail for testing.

{capture assign=lic}{membership.custom_4}{/capture}
{$lic}

It depends on which message template you are trying to add token to and method you are using for sending email.

Not all method of sending email renders membership token. If you are successful to render {membership.id} or if you can get membership from smarty then you can use CiviCRM api to render the custom field value for membership based on membership id.

For ref: How to create tokens for custom fields (participant, individual, organisation)

HTH

Pradeep


Consequences of changing domain name We are considering to change our domain name from:

reallylongandnotuserfriendly.example.com

to:

you.example.com

We have a Drupal 7 site. What are the consequences / fixes we need to be aware of, to not harm our CiviCRM installation?

Aside from any customizations, you should:

Check your civicrm.settings.php file to fix the base URL.  (And double-check that your path hasn't changed).
Go to Administer - System Settings - Clear Caches and Update Paths and clear your caches and update your paths.
Confirm that the Resource URLs look right (they should be fine as a result of step 2).
Make sure you get a SSL certificate for your new domain name if you had one for your old domain name.


Smarty causing contact import to fail I have CiviCRM 4.6.28 on Drupal 7.56, hosted on Pantheon.

We are trying to import lists of contacts, but anything above 250 contacts throws a timeout error, due to Pantheon's time limits.  The time limit is 240 seconds, and the files vary between 14 and 30 kbs.

I've traced the resource usage back to find that the issue is that Smarty is being used during the import.  Pantheon is showing Smarty as using a lot of resources, and I believe this is the issue because we can import event participants without problem, and the only difference in resource usage seems to be that event participant imports don't use Smarty.

So, now I am trying to figure out how to get it to stop using Smarty during import.  I am thinking that it is using it for handling the email greetings field.  Is there a way to turn off this field?  We do not have special e-mail greetings for users.

The speed you experience seems to be much slower than usual (not that contact imports are super fast, but civi can do better than 1 per second ;)

What is the field mapping you use? the less fields you import, the faster it's going to be (mostly true, some are more expensive than others, eg current employer if you import individuals)

Are the salutations one of the fields you alter?

What is the dedupe rule you use?
Some of the out of the box rules are optimised, but if you create and use your own, it might end up being super slow

What is the rule you use? update data is more expensive than ignoring duplicates, skip or replace


private or protected class properties I'm looking at a class in CRM_Utils_Cache here specificly and it looks exactly like what I need to write some unit tests against my extension.

The issue is that the $cache array is private rather than protected...

This means I can't extend this class into a test mock that allows my unit tests to manipulate and observe the cache state.

For this reason I'm wonder if there is a downside to changing this (and maybe other) properties to protected?

I think submitting a PR to make this variable protected would be perfectly reasonable.

Alternatively, there is a way to access private properties in PHP for the sake of unit testing via Reflection. It's slightly cludgy but it does work.


Batch merge automation of big data set We've faced duplicate records  batch merge issue while moving big data set (around 140K Individuals as Organisation members and cca. 400 Organisations accordingly) from proprietary CRM to CiviCRM and would appreciate any advice of how to move forward. We've successfully started from importing small records amount both via Import GUI and API calls; however after bigger import we've found that a large amount of nested Organisations have been created via Relationships, so, we have one "main" Organisation with properly filled address, etc, and several members and, say, 400 "phantom" organisations with just name and one member visible at Relationships tab.

We have tried "Find and Merge Duplicate Contacts" Individual Rules  via GUI, however, after leaving it works for a night we ended up with same total Individuals number and an url like this: civicrm/contact/dedupefind?reset=1&action=map&rgid=7&skipped=XYZ&merged=0 (where XYZ was 8175 just before it was stopped); since no status report has been received, guess "merged=0" part of an url shows number of successfully merges.
api/explorer (Contacts -> Merge) has almost no parameters to work with, just "$result = civicrm_api3('Contact', 'merge');" and "Other" as choose parameter option, so it's not quite clear how to use it.
What really works for us is a multi-step GUI workaround, like:

Find all instances of Organisation with same name
Assign search results set to a new group
Apply one of the Find and Merge Organization Rules
Wait (cca. half of an hour, thanks to fine tuned MySQL with 13G innodb_buffer_pool_size and tons of other improvements)
Manually merge several remained records

It works almost great, however it is quite time-consuming since we will have to repeat a process around 400 times. Hope there is alternative/faster way(s), we've no clue where to start from. Please help!

UPD: Thank you all for a valuable responses, it gives us some inspiration of how to attack an issue from an another angle(s).
I'd accept both replies, however Xavier's approach sounds more easy for us at this stage: we've got some positive experience using api/scripting before, even if this method did not work 100% for us previously, we're going to try it again.

For big imports, I wouldn't use the UI and write either a custom script (using the API), using existing drupal modules (civimigrate or use an ETL (amnesty spain has shared a plugin for pentaho for instance)

It would likely be faster than trying to untangle where you are now.

If you can't start, I wouldn't try to merge the contacts, that is a complex operation, but simply write a script to identify the duplicates and manually update the individual to replace the "empty" organisation by the real record, and delete the empty record.

You can use the api from a php script that you'd run from the shell, it will be much faster to run than a "real" dedupe

X+


Error with Views + VBO I want to give organizations administrators the ability to update events or memberships contributions payments by check, without having to do an Advanced Search based upon pending statuses to such or such event or membership.

As far as I know, I cannot store such searches to replay them.

So, I am testing an approach using Views with a VBO operation field which enables Contribution edition : enclosed screen capture

When I tick a line of the report, and then confirm the item (Edit Contribution) I get the following error :

Une erreur HTTP AJAX s'est produite.
Code de statut HTTP : 200 Informations de débogage ci-dessous. Chemin : /batch?id=6940&op=do StatusText: OK
ResponseText :
Add CiviCRM Contribution | BAPA (Paroisse de La Celle Saint Cloud)
@import url("https://xxxx.com/modules/system/system.base.css?ook5dq");
@import url("https://xxxx.com/modules/system/system.menus.css?ook5dq");
@import url("https://xxxx.com/modules/system/system.messages.css?ook5dq");
@import url("https://xxxx.com/modules/system/system.theme.css?ook5dq");
@import url("https://xxxx.com/modules/contextual/contextual.css?ook5dq");
@import url("https://xxxx.com/modules/comment/comment.css?ook5dq");
@import url("https://xxxx.com/modules/field/theme/field.css?ook5dq");
@import url("https://xxxx.com/modules/node/node.css?ook5dq");
@import url("https://xxxx.com/modules/search/search.css?ook5dq");
@import url("https://xxxx.com/modules/user/user.css?ook5dq");
@import url("https://xxxx.com/sites/all/modules/views/css/views.css?ook5dq");
@import url("https://xxxx.com/sites/all/modules/ckeditor/css/ckeditor.css?ook5dq");
@import url("https://xxxx.com/sites/all/modules/advuser/css/advuser.css?ook5dq");
@import url("https://xxxx.com/sites/all/modules/ctools/css/ctools.css?ook5dq");
@import url("https://xxxx.com/sites/all/modules/l10n_client/l10n_client.css?ook5dq");
@import url("https://xxxx.com/modules/shortcut/shortcut.css?ook5dq");
@import url("https://xxxx.com/modules/toolbar/toolbar.css?ook5dq");
@import url("https://xxxx.com/themes/bartik/css/layout.css?ook5dq");
@import url("https://xxxx.com/themes/bartik/css/style.css?ook5dq");
@import url("https://xxxx.com/sites/default/files/color/bartik-8a90baaf/colors.css?ook5dq");
@import url("https://xxxx.com/themes/bartik/css/print.css?ook5dq");
...

Depending upon context, ?ook5dq can change to ?oonnv5 (and maybe others (?))

I am not familiar with Views ; Am I missing something ?

if i was testing this, i would

a/ confirm vbo works for you for normal drupal process (eg node based view, can you use vbo to publish/unpublish), then if that works,

b/ set up a civi contact based VBO that uses other entities. if it fails,

c/ export the view and attach here so someone else can confirm if it is an issue on their set up


Call to undefined function dl() error w/Joomla 3.5.1 & PHP 7 I've just installed CiviCRM on a Joomla 3.5.1 site to learn how to use it.
I am seeing an issue that I have a question about.

As long as I use Php 5.6 the installation works properly. If I try to use Php 7 everything on the Joomla site works except Civicrm. From the backend if I select Civicrm I get this error:  Call to undefined function dl()

As soon as I go back to Php5.x all is well. The database is using utf8mb4_general_ci collation and mysqli.

Is there anything that needs to be done to use Php7 that I haven't found?

Thank you.

I learned that php7 is not supported yet.

https://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+PHP+Requirements


Fatal error when activating CiviCRM fails and throws up catchable fatal error Catchable fatal error: Argument 1 passed to CiviCRM_WP_REST\Autoloader::add_source() must be an instance of CiviCRM_WP_REST\string, string given, called in /var/sites/b/caftest.site/public_html/wp-content/plugins/civicrm/civicrm.php on line 691 and defined in /var/sites/b/caftest.site/public_html/wp-content/plugins/civicrm/wp-rest/Autoloader.php on line 64

Do you have the CiviCRM WP REST API Wrapper plugin installed?
If so,try disabling that as it's not required with newer versions of Civicrm


Paypal IPN check fails on Pantheon I recently moved our site to the Pantheon platform. The domain is the same (except the 'www' is now default where previously non-www was the default).

But we have just received this email from Paypal:

  Dear so-and-so,

  Please check your server that handles PayPal Instant Payment
  Notifications (IPN). Instant Payment Notifications sent to the
  following URL(s) are failing:

  http://www.mysite.com/sites/all/modules/civicrm/extern/ipn.php?r
  eset=1&contactID=1495&contributionID=1047&module=contribute&membershipID=627

  If you do not recognize this URL, you may be using a service provider
  that is using IPN on your behalf. Please contact your service provider
  with the above information. If this problem continues, IPNs may be
  disabled for your account.

  Thank you for your prompt attention to this issue.

I tried accessing the address and got there without any trouble. Why might this be happening and how could it be fixed?

I have been directed to this patch:

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

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


Main menu disappears after updating Summary Fields extension under wordpress I use latest civi 5.10.0 in Wordpress 5.0.3. Today I was warned to update Summary Fields to 4.0.0 version. After update the main menu disappeared from my civi installation. The Cleanup Caches and Update paths did not help.

Finally I can disable the extension, the menu appeared again and works correctly.

The developer updated the issue.  There is a missing line in the code.  They say they will release version 4.0.1 overnight.  If you want to fix it yourself before that look at issue linked above in the comment.


FYI - Sending mail via G Suite - Google announce username/password authentication will be turned off Google have announced they are turning off access to G Suite via username/password authentication.

My initial concern was this could potentially impact anyone using G Suite for Outbound Mail. However the statement says "No change is required for scanners or other devices using simple mail transfer protocol (SMTP) or LSAs (less secure apps) to send emails."

My question is whether CiviCRM are considering OAuth2 authentication (eg Google's XOAUTH2 scheme) when sending mail?

CiviCRM is not responsible for authentication of users (that's the CMS, ie. Drupal or WordPress). Using OAuth2 (or other protocol) for authenticating CiviCRM to another system would be the responsibility of the extension that wants to do that.

Or do you see a reason to include Oauth2 in core CiviCRM?

I'd be hesitant about using Oauth2 before fully understanding what you're getting into - here's a helpful blog w/ links from Colan Schwartz:

https://colan.consulting/blog/authenticating-drupal-users-oauth2


How do you set a fiscal year? Also - does changing a fiscal year change anything else outside of reporting and searching?

It's under admin - localization - date formats.

This link is old but suggests it's only for reports.

https://forum.civicrm.org/index.php%3Ftopic=30822.0.html


Can't get a list of people whose birthday in current month We want to see a list of people who have birthday next month. Advanced search doesn't suit us because it is trying to do search only for a current year. We use SYSTOPIA Birthdays for generating upcoming birthday report (this month). Then we configured scheduled job to send this monthly mail report. But somehow date when report sent is moving forward: one month it was sent at the first day of month, the other month at the second day etc. We need to send this report at the very first day of the month. If it sends a mail report at for example seventh day then we don't see people whose birthday was in the first days of the month. Is there any way to solve this problem?

CiviCRM version - 5.10.2

This extension should help with your requirement –

https://civicrm.org/extensions/birthdays-month


DB error in 'civicrm_group_roles' module When I log in to my site and I have the civicrm_group_roles module enabled, I'm getting this generic error in the browser:
Error
The website encountered an unexpected error. Please try again later.

In the database log, I see this error message:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table
'singersin_drupal.singersin_combined.civicrm_group_roles_rules' doesn't exist:
SELECT r.name AS name, cgr.role_id AS role_id, cgr.group_id AS group_id FROM
{civicrm_group_roles_rules} cgr INNER JOIN {role} r ON r.rid=cgr.role_id; Array ( ) in
civicrm_group_roles_sync_roles() (line 821 of
/Users/ken/src/SIA/server275-site/sites/all/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module).

Note the table name singersin_drupal.singersin_combined.civicrm_group_roles_rules - that's actually the Drupal database name, followed by the CiviCRM database name, followed by the table it's looking for.  So I assume that somehow the {civicrm_group_roles_rules} token is getting filled in wrong when the site has different databases for Drupal and CiviCRM.
I can work around this by disabling the civicrm_group_roles module (drush dis civicrm_group_roles).
I'm using:

CiviCRM 5.32.2
Drupal 7.76

Drupal 7.76 was only current for about a day, because of this bug (which affects other integrations, but hits CiviCRM especially hard). Upgrade to Drupal 7.77.


How to show custom data on subsequent recurring contributions or how to setup anonymous donations? Drupal 7.69 CiviCRM 5.20.0 iATSPayments 1.7.2

How do we get custom data to show with subsequent contributions in a recurring series or to have recurring anonymous donations? We use a custom data profile so donors can select that "they want this donation to be anonymous." If they check this box, we need this information to continue on with each recurring contribution. In the reporting, the staff can see the donations to projects they oversee. If the donor was anonymous, they do not see the donor info just the amount. Does anyone have any suggestions on how to accomplish this since subsequent recurring contributions no longer carry the custom data forward?
It used to work using custom data. This is a mess for our office staff because they have to try to catch these anonymous donations and manually add the missing custom data before the other staff see the the names.

where are the custom field stored right now? on the 1st "payment" of the recurring donation or on the recurring donation itself?

Anyway, we had similar problems with tracking the source of the donation (say if the recurring donation came from a specific campaign or mailig, we want the subsequent contributions being attributed to the initial campaign.

We had to write custom code for that, as it's not necessarily universal that whatever custom field you filled at the initial contribution ought to be duplicated to each new monthly donation.

I can see three paths:

you modify (or pay/convince someone to do it) iats extension so it does copy the custom fields. as I mentioned, it might not be what every user of this extension wants, so might be trickier
you write a custom extension that checks if a new contribution has the relevant custom fields, and if not checks if it needs to duplicate them from the recurring contribution. This might have the benefit of working as well if you use another payment provider than iats (and could help someone else that has similar needs)
you modify the report(s) so they do not only anonymise the donor info if the "want the donation to be anonymous" is set on the specific donation, but as well if it's set on the recurring contribution itself


How do I get a backup of CiviCRM working on a different server? If I restore a backup of a site with CiviCRM onto another server it seems that it does not work. Getting it to work is especially troublesome if I restore to a different operating system (Linux -> MacOSX, e.g.), but also differences in server setup seem to be problematic.

Is there a way that always works?

There are multiple "gotchas" when relocating a working CiviCRM install. (CiviCRM's wiki page on Moving an Existing Installation to a New Server or Location is seven pages printed out!) Here's what we watch out for when moving sites.

Filesystem paths

CiviCRM stores filesystem paths in various locations in the DB, which can cause a restored DB to not function when loaded in another location.

The simplest way to work around this is to use the facility to Override CiviCRM settings in civicrm.settings.php to ensure that all the settings in $civicrm_setting['Directory Preferences'] are "locked" to values which work in the new environment.

global $civicrm_setting;
$civicrm_setting['Directory Preferences']['uploadDir'] = '/path/to/site/sites/default/files/civicrm/upload';
$civicrm_setting['Directory Preferences']['imageUploadDir'] = '/path/to/site/sites/default/files/civicrm/images';
$civicrm_setting['Directory Preferences']['customFileUploadDir'] = '/path/to/site/sites/default/files/civicrm/custom';
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/path/to/site/sites/default/civicrm/extensions';
$civicrm_setting['Directory Preferences']['customTemplateDir'] = '/path/to/site/sites/default/civicrm/custom_tpl';

This prevents the settings being changed via the web interface at civicrm/admin/setting/path while the settings are overridden in the settings file.

Sometimes Drupal has a variable civicrm_class_loader set with a fixed path - it may help to remove this variable.

drush vdel civicrm_class_loader

I think that I've seen mention of the hardcoded paths issues being addressed in 4.7 cycle, which would be great news IMO.

Definer in DB dumps

This is the most common cause of trouble reloading CiviCRM DB dumps.

The cause is that MySQL's default dump behaviour is to include trigger creator information in the dump - which will upset MySQL if you load the dump on a server where the original MySQL user doesn't exist. This looks like this in a MySQL dump:

/*!50017 DEFINER=`civicrmuser`@`localhost` */

The solution is really simple: use the --skip-triggers option when making your MySQL export. MySQL will omit the user-specific information, and CiviCRM will sort the triggers out the next time it rebuilds its caches.

If you've already got a large DB dump and don't want to make/transfer a new one just to remove that information, you can also do it using sed:

sed -E 's/DEFINER=`[^`]+`@`[^`]+`/DEFINER=CURRENT_USER/g' dump.sql > new dump.sql

I'm not sure if there are plans to address this?

Permissions

CiviCRM runs (in UNIX space) as the webserver/php user, and you probably restored the codebase / site files as your system user. In order to permit CiviCRM to function, you likely need to either change the ownership of the CiviCRM-writeable files to the webserver user (eg chown -R www-data: /path/to/sites/default/files/civicrm) OR find some other way to ensure that permissions are managed to ensure your user and the webserver user will not conflict.

There's an existing question on this topic: CiviCRM does not have permission to write temp files which covers the merits of various approaches to dealing with CiviCRM's special requirements when it comes to filesystem perms.

The main cause of this issue is the use of a disk cache for templates_c. Moving cached HTML to DB (as per Drupal's cache_* tables) or to a permissionless store (Redis, memcache etc) would remove this friction, but I'm not sure if / where that is on the roadmap.

Other considerations

You may also -

need to remove the file ConfigIDS.ini from your new site. CiviCRM will regenerate this file.
need to trigger CiviCRM to revisit its idea of which extensions are installed ("Refresh" @ civicrm/admin/extensions)
need to visit civicrm/admin/setting/updateConfigBackend to reset CiviCRM's caches and stored paths


Summing up donations on the household level We have the following problem: If we record a donation on the individual level of a person: Let’s say there is the imaginary Byron Terry-Lee and the spouse is Megan Terry-Lee. Both are members of the household Terry-Lee. Byron Terry-Lee donates 10 $, Megan 20 $ and on the occasion of an anniversary both donate together (as a household) 30 $. I’d like to see on the household level the summed up donation for the household (respectively 60 $). Has anyone an idea how to reach that?

Thank you for looking into it.

Best regards

Esther

This is what you're looking for: https://civicrm.org/extensions/aggregate-household-contributions-report


zero s after the decimal in simple donate Hi  I am using CiviCrm 5 on wordpress,

donation amounts displayed with zeros floating points after the decimal for example 25.00000000 instead of 25

Is there any solution?

Short answer: I've prepared a patch that I'd love for someone to test to fix this.

Longer answer: In recent months, CiviCRM has implemented support for currencies with more than two digits after the decimal point.  This is important both for cryptocurrencies as well as certain countries' tax calculations.  The decision was, "Store all currencies in the database with nine significant digits, and when displaying them, format them according to the rules of that currency."

This all happened in CiviCRM core and it went so well that end users who didn't need the greater accuracy didn't notice.  Unfortunately, no one updated Simple Donate.

I don't use Simple Donate, but recently handled a similar problem in my custom code, so I looked and it was a 4 line fix.

I'd love for someone affected by this problem to test my patched version and report back if you have any problems with it.  If there are no issues, I'll submit the patch to the original authors. I'd especially love feedback from users who don't use US dollars as their currency!

Find the fix on my Github repo or download directly.  When unzipping, please be sure to rename the folder to match your old extension folder name that you're replacing.


Contact types not updating When editing or disabling Individual and Organization contact types, the main menu doesn't update the contact type. For example I disabled Student, Parent and Staff for Individual. The options under Contacts > Individuals > are still New Student, New Parent, and New Staff.

I have checked this forum and found that there is already one question regarding this subject telling that it is a bug.
I have upgraded to the very last version (5.17) and have the demo contacts records charged in the CiviCRM instance I use (under WP).

Any idea ? Thanks in advance

Found that the menu should also be edited in Administer -> Customize... -> Navigation Menu then Delete or Disable the inactive menu items
Sorry for that but documentation should be clearer ;-)


Pulling a Report of Donors with More than One Donation, Not Recurring I would like to pull a report of all donors who have more than one contribution. This is slightly different than pulling a report on actual recurring donations. This is my workflow:

When donors donate one time, they get a thank you card and a receipt
If donors contribute again in the same year, I save the acknowledgement for the end of the year, and send a PDF listing all the contributions with a total in the form of a generated letter

I want to use the CiviCRM to generate the form letter, but want to exclude everyone that has donated one time, since they will have already received sufficient documentation and acknowledgement.

Any advice on how this can occur?

For those who might not already know Summary Fields extension can give you info like 'how many' donations, and i expect via Search Builder you could then drill down to '> 1' on that field to find just those who have contributed more than once


How do I turn off the "Contribution amounts section" for a membership only contribution page? Using 4.7.18 and Wordpress 4.7.4, on my contribution page that I want to configure as a membership only sign-up page, I untick the checkbox labelled "Contribution Amounts section enabled" on the 'Amounts' tab of the contribution page set-up wizard. However, after saving the page, if i then go pack in I see that this field is once again ticked.

I've just repeated this on http://wpmaster.demo.civicrm.org and got the same result. It looks like this is a bug.

Update: now logged as an issue here: https://issues.civicrm.org/jira/browse/CRM-20495

I see the same thing on Drupal/CiviCRM 4.7.18 - but it looks like the checkbox only gets checked again -> when you go into the Config. That is you can still uncheck it and Save it and have a Membership only Contribution form with no additional amounts. For some reason it defaults to ON now on edit of the contribution form config. Definitively a bug - and a regression [this was for sure working previously].


CiviMail tracking opens stopped working after upgrade to 4.7.x CiviMail reports track unique opens and total opens, but after upgrading to 4.7 line, suddenly all mailing register 0 opens. I have testing and opened a test email and CiviMail does not register the open.

Has anyone else noticed this or have an idea why this could be happening?

We are on HostGator shared hosting and have the latest version of Drupal and CiviCRM.

Thanks for any ideas.

I've experienced this on a few sites and it turns out the file/directory permissions seem to have changed. I'm not sure if this is in relation to the way 4.7 is packaged, or something on the particular hosts that these sites are on, or what, but I have found that I need to recursively reset permissions after updating, or the tracking doesn't work, click through links don't work, you can't upload images from CiviMail, etc.

From just outside the civicrm directory, I do this and it seems to solve it:

find civicrm -type d -exec chmod 755 {} ";"

find civicrm -type f -exec chmod 644 {} ";"

The first one changes permissions on directories and the second on files.


Custom Fields used for Participants and then used in a Profile are not displayed I have created specific custom fields for Participants. These are viewable in Preview mode under Custom Data.
When these fields are used in a Profile they are not displayed in Preview mode.
I notice that the Profile I have created does not have anything shown in the "Type" column - whereas all the other profiles do have an entry - such as "individual, Contact". I cannot see where this "Type" entry is derived from when creating the profile. If its the Field Type (from the Custom Field) - then its not linking to Participants nor Events.

Clearing the cache has resolved the problem. Thank your for your prompt responses.


Form to partially pay for Event Attendance I want to create a payment form to allow users to pay towards someone's event attendance.

Given a Contribution ID, how can I create a link to a page that will accept payments towards that Contribution?

Do I have to do this through Personal Campaign Pages, or is there a way without that overhead?

JohnFF

You could use Line Items. Create a Price Set with the Attendee Name(s)/Contribution Id(s) that you would like to have available for people to help pay. Donors can enter the amount they want to give toward specific attendee(s). You will have to manually apply these contributions to the attendee's event fee. We do this for tuition here https://radiusinternational.org/paytuition/

The other way to do this is to use Contribution Notes via Profiles. Then the donor would just write in the name that they want to have the money applied to. The downside here is the limited placement of Profiles on the contribution page. Neither of the 2 placement options really puts the Notes anywhere logical in relation to giving form. The Notes are not next to the contribution label so then you have to add a description telling donors where to find the Notes further down the page.


Including discount codes in membership imports We offer a discounted membership to graduates of affiliated training programmes - to minimise the processing work, the course administrator fills out a template spreadsheet and sends it to us, and deposits the fees in bulk.
We tidy the file, save it as csv then run a contacts import followed by a member import.

Although we initially used a separate membership type with a lower fee, the problem of having to manually change membership type after one year led us to switch to applying standard individual memberships and creating a discount code.

However, I can't find discount code anywhere in the field matching for either membership or contributions imports.
How can I apply the discount so that contribution records do not show the full price?

I am not sure why you need to import a discount code. A discount code is needed for online transactions so that civi knows to charge a reduced price yet still create a membership. Here the transaction has already taken place offline.

Import the contributions for the actual amount paid, with a contributions source of, say, Student (or student discounted price if you think you might forget the student price was discounted).  Then import the memberships. There is no link between contributions and memberships when they are both imported, so the membership "won't care" how much money was paid for it.


Is there a way to change the Pending (Pay Later) payment method? Its quite confusing.
The default payment method is check.
When someone says they are paying later - it can be a multitude of payment options. When we record the payment - it still shows the main payment method as check - even though its something else - how can we change that. (besides heading into the back end.)

This mostly impacts how we report payment methods and search for payments.

I also found that workaround!  This is an ongoing pain point, see https://lab.civicrm.org/dev/financial/issues/37 for a related issue.

In short - until a few years ago, a Contribution record was just that - a contribution.  Now it's more of an "obligation to pay", and Payment records are where the actual money is recorded.

So "payment method" (and "check number") don't belong on contributions - they belong on payments.  Until this is fixed, your workaround is as good as it gets.  Fortunately, there's general agreement on this direction, and the financial subsystems are currently being rewritten to make future changes easier and more testable.


CiviCRM menu not displaying properly or useably in wordpress !(https://imgur.com/a/Q1PCgMe)
This is standard install of wordpress with the default theme, I've tried changing the theme and the settings in the Civicrm Admin Utilities plugin but to no avail. The menu appaers fully displayed below the dash board but is fully obscured by the wp menu, and only visible when that is collapsed. I'm aware this is a formatting issue, but I wondered if anybody had seen it before in a fresh wordpress install

For WordPress 5.5.1 the minimum CiviCRM version is 5.26.2.  I'd recommend 5.28.4 as that is the security release.
Due to changes in WP you may also have to update your settings.
For reference: https://civicrm.org/blog/kcristiano/civicrm-526-and-wordpress-important-notice
Even though the changes discussed come into effect in 5.29 this doc: https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-529  is a good explanation of paths for CiviCRM and WP


Bulk Import of Membership Dues Hi this is our first season with CiviCRM. Our data is uploaded and getting to grips with updating processes.

Our process is annual membership collected in cash and banked in tranches.

The user front end is not really appropriate for the bulk process, manually looking up a member, renewing the membership with a contribution - which is slow enough - but then we need to go to the contribution to record a custom field ( banking id ) for later reconciliation.

A lot faster process would be to work off a downloaded spreadsheet, removing non paid members, and then uploading the contributions & membership.

But, as far as I can see, simply uploading the contributions through import process does not renew that membership - and bulk uploading memberships do not link to contributions.

I guess many orgs bulk upload contribution / memberships - how is this best achieved?

It sounds like your process of importing memberships via CSV and contributions via CSV works - except that your contributions and memberships aren't linked.

If that's correct, I've resolved this when doing migrations as follows:

Create a custom field for contributions called "external serial" or similar.
Create a custom field for memberships also called "external serial".
Add a serial number column to your CSV (if one doesn't already exist) before importing it as contributions/memberships.  The only important part is that each row have a unique identifier.
After import, you can use the shared identifier to create a new CSV with just two columns - membership_id and contribution_id (as CiviCRM assigned them).  I typically would do this via SQL.  Something like this:

SELECT cc.id AS contribution_id, cm.id AS membership_id
FROM civicrm_contribution cc
JOIN civicrm_value_importfieldcc_1 cvi1 ON cc.id = cvi1.entity_id
JOIN civicrm_value_importfieldcm_2 cvi2 ON cvi1.external_serial_1 = cvi2.external_serial_2
JOIN civicrm_membership cm ON cvi2.entity_id = cm.id

Create membership payments using this new CSV to link the memberships/contributions.  You can do that with the API CSV Import GUI extension or the command-line tool that ships with CiviCRM.


Pay later option on 4.7.2 using Stripe doesn't work - throwing error Have events set up - working fine in 4.6.x updated to 4.7,2

Getting the following error - when hitting continue on event registration
Payment Error Response:
Error: The card object must have a value for 'number'.

Thoughts - Suggestions ?

Drupal 7.4.3

The problem is with the Stripe payment processor.

The javascript file in stripe needs to be updated because the name of the payment processor changed in 4.7 from "payment_processor" to "payement_processor_id".

The Stripe Extension does not yet have a 4.7 branch to push these changes to.


Why is the field "contribution_id" in "civicrm_line_item" sometimes NULL The table "civicrm_line_item" has a field called "contribution_id". For the most part, this field is filled in. But there are many records where the "contribution_id" field is NULL.  I have seen this with happen no matter what the "entity_table" value is.

Why is "contribution_id sometimes NULL? What would cause this? (I have seen this in version 4.5.x and version 4.6.5)

For every contribution, a line_item is being created. The contribution_id field is the FK reference to the civicrm_contribution table.

If I manually delete the Contribution record related to the Contact, the contribution gets deleted from civicrm_contribution table, which results in contribution_id to be NULL in civicrm_line_item.


Why do these characters - Â Ã Â - that were not added appear on Event registration pages created using CKEditor? We're on Civi 4.6.21 and Drupal 7.

We can't figure out why these characters - like Â Ã and Â -  appear in our Event pages. The text is not on the page we created, obviously, right in Civi.

See the screenshots below - the first is this page in the Chromium browser on my laptop running Ubuntu.

Any clues appreciated!

UPDATE: The problem appears to be with the built-in version of CKEditor, see the second screenshot below. This code - &Acirc; - keeps getting re-inserted in to the page intro text source on Save after being edited out.

UPDATE 2: So - not sure why - and not a final fix - but editing the intro text source using Firefox, rather than Chrome, seems to take the weird characters out and not re-insert them on Save, pretty much. See the third screenshot below - the page after editing the source using Firefox, not Chrome.

UPDATE 3: Here's the CKEditor bug report from four years ago about this issue, it was fixed three years ago...maybe it's time to update the CKEditor version in CiviCRM 4.6.X? Is there a newer version of CKEditor in CiviCRM 4.7.X ?

That type of thing is normally character encoding problems. The first thing I'd check is what the character encoding on your database tables are, e.g.

SHOW CREATE TABLE civicrm_event;

If it says charset=latin1 or anything instead of utf-8 at the bottom then I'd guess that's your problem. You can see here for ways to fix it: https://stackoverflow.com/questions/2150256/how-to-change-all-the-tables-in-my-database-to-utf8-character-set

Edit: To save anyone reading all the comments, in this particular case it has something to do with ckeditor and character encoding. Workaround is use a different browser like firefox.


Drupal/CiviContribute & Metatags We are running Drupal 7 and the Metatag module, which is working as intended on the rest of the site.

While our contribution pages are working fine, they do not contain the description and keyword meta tags that appear on the other pages on our site.

Can someone point me in the right direction to get this functioning?

Thank you!
Rachel

To anyone else trying to do this:

Install/enable Metatag module
Install/enable Context module
Enable Metatag:Context submodule

In Metatag module settings you will now be able to enter either the path or the query string to set the tags.  To make query strings work, you will also need to configure those in the Context module setup.


How to transfer an event participation from one contact to another in the back end? I've been trying to move some event registrations from one contact to another. Noting form the admin screen that there is a 'Cancel or Transfer' link available when viewing event registrations from the contact's 'Events' tab, I gave it a try. Sure enough I got a pop-up asking for the name and email address of the contact to transfer to, and on submitting that it seemed to work, although I then got taken to the event registration form oddly.

Trying the same trick again for another contact record, and all I get now is a message saying "Sorry, You cannot transfer or cancel your registration for  as you are not currently registered for this event." which seems pretty weird given that a) I'm logged in as an administrator and b) that I'd just done exactly this with another contact record.

Looking at https://issues.civicrm.org/jira/browse/CRM-20879 the impression there, albeit an old issue, is that enabling admins to do this is not yet built.

What's the current state of play on this? (running 5.10.4 at the time of writing)

Graham,

I understand that there are some issue when moving contact when logged is as Admin. You can also try an extension developed by LCD Services that moves participant from one contact to another.

HTH

Pradeep


CiviCRM and WordPress on different hosts? I'm considering getting started with CiviCRM. I have a website with WordPress on a hosting provider that doesn't cater to CiviCRM. Do CiviCRM and WordPress need to be on the same web host in order for integrations to work properly?

I found some documentation on this here, which makes it look like I can run CiviCRM on a subdomain, but it seems that this doesn't integrate as well. Can someone elaborate on how this is different than running them on the same server?

There are multiple ways to do integration with CiviCRM.
CiviCRM and WordPress on the same server.
There are certainly benefits that come with hosting CiviCRM and WordPress together. Those benefits are a distinguishing feature compared to other CRMs that often lead folks to pick CiviCRM.  For instance, using Caldera Form-CiviCRM integration, or the CiviEvent widget.  Donation, membership and event signups automatically inherit your site's theme.  A shared login system.
CiviCRM and WordPress on different servers
Many folks choose to keep their website and CRM separate.  Sometimes the CRM contains data that necessitates higher security. Sometimes a parent organization offers CiviCRM to its branch offices, who wish to maintain their own website but use CiviCRM.
You can still do a good amount of integration.  There is Remoteform to do remote event/donation pages and email signups remotely (though not yet with 100% of features of a same-site page).  Contact Form 7 CiviCRM integration allows remote form submission.  I have a proposal in to synchronize events from CiviCRM to a remote (or local) WordPress site running Event Calendar Pro which I would release publicly if funded.  However, there's no denying these are more advanced configurations which are more difficult to set up.
The short answer
Ultimately CiviCRM requires a CMS, even as a "shell" to manage users.  If you're going to go with a host capable of running CiviCRM anyway, there's no reason not to switch your WordPress site to that same server and likely save a few bucks by canceling that hosting.


Set number of free events for members I'm creating a wordpress site for a gym. The gym memberships are tiered. Platinum members can access as many classes as they like as part of their membership. They are easy to handle with CiviDisount - I just give those members 100% discount on event (class) bookings.
Other membership tiers are harder for me to figure out. The gold membership includes 12 classes a month. How do I limit the number of events a member can access based on their membership? Can I even do this is Civi?

I can not think of a way to limit the number of events based on a membership out of the box.

I would certainly add a custom field to a membership which I would then populate automatically based on the membership type with the CiviRules extension (more information here: https://docs.civicrm.org/civirules/en/latest/).

What CMS are you using?


What's stripping the characters from my menu links? (ie. '?' '=' and '&') Just updated to 4.7.10 on wordpress and any menu link with non alphanumeric characters is stripped and replaced by an underscore.

Example:
/civicrm/contact/add?reset=1&ct=Individual

Becomes:
civicrm/contact/add_reset_1_ct_Individual

I've tried clearing caches, rebuilding menus etc. Debugger shows nothing - any ideas?

The answer is: bad upgrade from older database schema. Somewhere in the 4.5 alpha upgrade series something went wrong for me. I'm not sure what, exactly, but the answer was to verify the schema and to a clean install. Sad face.


How to search for emails "on hold opt out" and not "on hold bounce" We experienced a severe network problem across many ISP's this week that resulted in a bunch of email non deliveries. I now have many email addresses marked as on hold, I think because of the unusual network problems. I want to unhold these addresses, but do not want to unhold emails where addressees opted out.

Is there a way to search for emails that are on hold because of bounces, and not because they opted out. (alternatively can I search for emails that are on hold because of an opt out, and not because of bounce processing).

Thanks
Davy

You can perfectly get the result you want navigating to Search - Advanced Search and expand the Mailings section, from there you can search for bounced emails or opt-out request specifying a date range.

If you cannot see the Mailings section navigate to Administer - Customize Data and Screens - Display Preferences and make sure you have Mailing ticked under Contact Search

You can do the same from Search - Search Builder selecting Contact as record type and On Hold or No Bulk emails(User Opt Out) as the field.

You can also bulk Unhold Emails from the action menu in the search result, selecting the contacts you think they shouldn't be on hold.

Hope that helps.


CiviCRM-Entity Case - view block on a Drupal node I'm attempting to display a View Block with a CiviEntity (type: CiviCRM Case) on a Drupal Node using Display Suite (block field).

When I set up the Display Suite Block Field, I'm presented with options for the type of entity, if I choose any of the Civi Entities (Civicrm Case, Civicrm Contact, etc.) they will not show up in the 'Manage Display' section of node setup.

Is there something I'm missing to be able to display a view based on CiviEntities on an existing Drupal node?

If you install the CiviCRM Entity module you can put Entity Reference fields on node types that can reference civicrm_case, civicrm_contact, and 40 other CiviCRM entity types.

You can reference the data in Views, either individual fields or rendered view modes of the entity types.

Your question doesn't quite make sense to me, so if you could elaborate about what you are trying to do a little bit or provide a screenshot or two, it could be helpful.

You can definitely use and add Display Suite Blocks. For instance, you can create a Display Suite block, check the civicrm_contact checkbox for the "Entities" field. Then down toward the bottom of the form, select which block you want to show on the Drupal contact pages, at paths, "/civicrm-contact/[contact_id]" where [contact_id] is the numeric id of a contact.

You have to first add the block to the display of the contact page, the full content view mode, at "/admin/structure/civicrm-entity/civicrm_contact/display/full". To make the Display Suite Block available as a field, you have to enable a Display Suite layout for the full content view mode. You then place it in a layout region, and save, and it will show on all contact pages.

I'm a bit confused what you mean by showing civi case or contact blocks on nodes..You can use entity reference fields to reference cases or contacts from a node, which would mean you wouldn't need to use Display Suite Block fields, or you can create Views base blocks listing cases or contacts, and then choose them in your Display Suite Block field settings, and check "Node" for the "Entities" field.


Mailmerge token syntax Please could someone tell me what is wrong with the following
Dear contact.nickname Thank you.
I know that brackets need to be used.

Yes you need brackets: the curly { } kind

When composing a mail mesage - hit the Insert token button on the right - select the one you want - and it will insert it in the text (where your cursor was located) - including the { }


How to Remove Old Events from the Managing Events Tab I have eight events under my "Manage Events" Tab on Civi. Three of them are upcoming, but five of them are left over from 2012. When I try to put an end date to the event, so they will be cleared from my this page, but not deleted, I am given this error blocking message:

"Sorry an error occurred
We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.

Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.

Error type: Could not find a valid session key."

The error is likely misleading. You'll find more details in your CiviCRM error log (and/or perhaps your CMS error log). The CiviCRM Log Viewer extension is the simplest way to see those.

It's likely that these old events have some configuration that is blowing up when you resave them with the end date.

Since you just want to hide them, your simplest course of action is to set an end date directly using sql, e.g. with something like:

UPDATE civicrm_event SET end_date = start_date where isnull(end_date) and start_date < '2013-01-01'


CiviCRM access for Wordpress custom group users I am using CiviCRM 5.8.1 (update to 5.8.2 will be done shortly) on Wordpress 5.0.1 with German localization. For extended permission management on WP, I use Advanced Access Manager.

I created a group for the office users and granted them access in CiviCRM - Administration - User and Roles - Access control and granted them all necessary permissions including CiviCRM access.

Wordpress and CiviCRM user are properly matching (the WP user ID is listed the respective contact of the CiviCRM user).

Nevertheless, except for users with the WP Administrator role, all menu items of the CiviCRM backend except for search, contacts and CiviSEPA Dashboard keep invisible.

I tried it with different groups and also ensured that on the WP side, all capabilities in AAA with relation to CiviCRM are enabled.

To exclude side effects I removed all previously existing CiviCRM specific permission configurations (except for the administrator), including CiviCRM groups, allocations between WP and CiviCRM groups and ACL.

Anybody an idea where else to look? I tried to find hints by searching but presently I am stuck. Thanks!

Obviously, the CiviSEPA extension messes with the menu for users without administrative permissions. Disabling this extension in the ACL for the non-admin groups solves the problem


Joomla - Embedding youtube video in CIVI mailing I am a novice with Joomla and have recently taken the position at an organization managing the CMS.

We are writing a newsletter and I want to embed a youtube video within the mailing. After following the steps for updating Joomla's iframe restrictions (tinyMCE extension), I see the video embedded in the mail, but when it is actually sent, the video is not accessible.

All the articles I am finding are for embedding a youtube video into a Joomla page.

Any advice will be appreciated!
And since I am so new to this, Layman's Terms would be appreciated!
Thank you kindly.
Renee F

You probably won't have much luck embedding the actual video into a mailing due to restrictions in email clients. One workaround could be embedding a screenshot of the video which is then linked to the webpage where the video can be played (so when the screenshot is clicked, they are sent to the website to view).


How can I deal with a missing or corrupt binary ("advanced") log table? Sometimes I install an extension that creates a new MySQL table, but it breaks because I have binary ("advanced") logging enabled. CiviCRM tries to write to the binary log, and it fails because the table doesn't exist.

Other times, there's a corrupt binary log table, which I can only fix by dropping it.

In these situations, I know that disabling and re-enabling binary logging will fix the situation, but then I lose my existing logs!  Is there another less destructive solution?

As of CiviCRM 4.7, you can fix this by installing any extension; see CRM-15078.  Schema differences are fixed on extension installation.

If you are on an earlier version of CiviCRM, there's a trick you can do.  Edit the PHP for a page that doesn't normally get used - I like the API Explorer page (CRM/Admin/Page/APIExplorer.php).

Right after public function run() {, I put:

$temp = new CRM_Logging_Schema();
$temp->fixSchemaDifferences(TRUE);
echo "Binary log schema differences are now fixed.";
die;

Once I get back the "now fixed" message, I remove the code from the page and everything works.


Event Date Stamps Messed up? I have been using events for a while and this just started happening - not sure if it is related to moving from one host to another since everything is functioning as expected.
When I select a template or edit an event, the date/time stamps change to 2 boxes with the calendar icon in one, but not usable.
So I added some events without a template and get the single box with a selectable date, but they don't show on my calendar now and when I select Events, Show Events Calendar it returns to the Civicrm admin front page.  Any suggestions on how to resolve??  I am on 4.7.18 and was going to upgrade to 4.7.23 but am hesitant with this error.  I did do the upgrade on my test environment and when I saw this error in production, I went back to the upgraded test environment and the issue is there too.

So this issue was quite obscure but I went through my wordpress plugins one at a time, deactivated and tested and this one: "Social Icons Widget by WPZOOM" was at fault!  Once I deactivated that plugin, events started to work correctly again.  This plugin was part of a recent site update on our test, it apparently passed all the tests and was promoted to our production system.  Time to check the testing checklist again.


How to increase the number of participants registered in single transaction currently the system limit to 10 registrations (including oneself) for a single email.  Can we increase the number?  if so, how? Thanks.

According to this the functionality is in core code, not that I have noticed it, but also it is possible that it only works to reduce the number below 10.

If you are not wanting to capture info details for all the Additional Particants then you should be able to do this via a Price Set field iirc.


Registration - Thank you page Error - Call to undefined method -Joomla Joomla 3.9.14 and Civi 5.20 / 21  registration has been running fine for years with various different combos of Civi and joomla
The full error is: Call to undefined method CRM_Core_BAO_UFGroup::getFrontEndTitle()

User is registered to the event - just an error page where a thank you page should be - any thoughts were to look.

Thanks

At administer - system settings - directories, there's one called custom php path that contains a folder path. Go look in that path in the filesystem and you probably have a customized version of CRM/Core/BAO/UFGroup.php. It will need to be updated with some recent changes that were made to the real CRM/Core/BAO/UFGroup.php, in particular the addition of the function getFrontEndTitle().


Can't set 'Force Secure URLs' Civi 4.4 still w/WP 4.7 (which is using https/secure URLs w/a plugin 'https') - I tried setting base url to 'www.mysite.org' as opposed to 'mysite.org' and saving but my change isn't saved.
FYI I am using https: in effect for all civi pages, but I can't seem to set this in Admin settings.  My .htaccess file allows for www or not

You almost certainly want to upgrade your version of CiviCRM at least to 4.6, due to security concerns.

If you're already forcing https for all Civi pages via WP (or via apache/.htaccess, or any other mechanism), then there's no point in setting it in CiviCRM.

The base url setting is likely hard-coded into your civicrm.settings.php file, you'll want to change it there.

In general, having a consistent version of your domain is a good thing, for lots of reasons (SEO and caching are the two main ones).


How best to resolve Wordpress theme / CiviCRM conflicts I need help where we cannot upgrade CiviCRM 5.12.4 to any higher version because of a theme conflict with a paid, premium theme, Benevolent Pro. Details are in CiviCRM 5.17.5 and WordPress 5.2.3 just won't work.

We have logged the problem with Benevolent support. Their initial response is "this is a CiviCRM error." In this case, I believe "error" is the wrong word, but rather there is some kind of conflict, because CiviCRM 5.17.5 works just fine with the stock Wordpress "2019" theme. With the stock "2019" theme, we have also removed any CiviCRM conflicts with any other plugins we use (there was one). Who is to say who is at fault in this case, and how do I diagnose? I'm including a screenshot showing javascript errors on one important contribution page for reference. My main question, though, is to whom do I register this conflict? It seems like discussions on this nice forum are not where I am going to find an answer. I am still pursuing with Benevolent support, but just looking for advice how we can ever upgrade Civi again. Btw, we quite love Benevolent Pro. As a paid, supported theme it is guaranteed to be stable as Wordpress evolution continues, something we had difficulty with a previously customized hard-coded theme that was continuing to paint us into a corner with either Wordpress or our plugin upgrades.

Thanks for any advice here!

*Edit added ~midnight 10/11/2019 *
Adding more details from a local xampp clone of our site. We have 2 instances, all Wordpress data identical and Civi data identical except one is at CiviCRM 5.12.4 and the broken one is at CiviCRM 5.18.2. In both cases, the URL in the address bar is http://{clone_site}.webdev/civicrm/?page=CiviCRM&q=civicrm/event/info&reset=1&id=168

In this screenshot for CiviCRM 5.12.4, note civicrm under Sources in the inspect panel shows http://sdbikecoalition.webdev/civicrm/?page=CiviCRM&q=civicrm%2Fajax%2Fl10n-js%2Fen_US&cid=&r=aMJXH and the event page (event id=168) displays correctly.

In this next screenshot for CiviCRM 5.18.2, note the civicrm under Sources in the inspect panel shows http://test.sdcbcdream.webdev/civicrm/?page=CiviCRM&q=civicrm/event/info&reset=1&id=168 and the event page (event id=168) does NOT display.

Note the difference in the Sources in the inspect panel is the Ajax injection when it works correctly. Makes no sense to me, but I'm not javascript fluent at all.

And finally, here is a screenshot of Event id=168 for CiviCRM 5.18.2 with the stock Wordpress 2019 theme. It displays correctly and note there are 2 entries under civicrm under Sources in the inspect panel, one with the event URL as in the address bar and the other with the Ajax injection.

After inserting some debug code per recommendation at chat.civicrm.org, I discovered an even more focused repair is to just change a single line in civicrm_in_wordpress_set() within civicrm.php.
Replace

  $page = get_query_var( 'page' );

with

  $page = $_GET['page'];

and all problems we have noted disappear. The get_query_var call involves calls to our theme (looking at the backtrace at that point) that evidently get in the way. Obviously a theme interaction, but how would I even notify Benevolent support of the conflict? It seems so simple to make this one change on the CiviCRM side, but I need to understand unintended consequences. Why was get_query_var added in the first place - it first appeared in Civi 5.13.0?


White screen in 4.7.12 I note with the 4.7.12 version of the difficulties of implementation, particularly with queries that only lead to blank pages.
Track errors in apache located abnormalities in smarty.
I returned to version 4.6.22 LTS that does not pose this problem.

Installation on a dedicated server ubuntu 14.04, apche 2.2 mysql 5.5.52 php5 wordpress 4.6

cordially

You don't mention your php5 version, that would be the most likely cause (i.e if it's less than 5.4).

But if the problem is seen in an apache error file and it's in the smarty file, then just give us the error and it should be clearer.

If you only updated the code files and didn't clear caches afterwards and run db updates, then you'll definitely want to do that, as per the documentation.


CiviVolunteer: is there a way to send mailings to smart groups targeting shifts for volunteers We have a group using CiviVolunteer v4.6-2.1.1 with Angular Profiles v4.6-1.0.1 on CiviCRM 4.6.17.

The scenario - which is basically what most groups need when doing volunteer management is to be able to send reminder emails to people, letting them know the shifts they've committed to.  Now there can be multiple shifts during the day with the same role - for e.g.  You have an upcoming fundraiser and you want to manage volunteers to do phone calling for a a few days, and you have a role called "Phone Caller" with four 2-hour shifts per day.

Currently, CiviVolunteer isn't integrated into CiviMail, and you can email your volunteers INDIVIDUALLY through your email client of choice (you select the email application to use when you want to email an individual inside CiviVolunteer).

So I'm poking around Civi to see if we can create smart groups of the individuals who signed up for a particular shifts by looking at the activity record that CiviVolunteer creates.

I see that that the Volunteer Role, and Volunteer Need (which has the actual date and time the individual signed up for - but looks like it's in a separate table with another ID) are exposed in the activity record.  CiviVolunteer also records the activity type as Volunteer, the Date, the Time, and sets the status to SCHEDULED when someone signs up.

Now in the UI, you can't search on the TIME in the activity record (which would be very helpful for targeting groups who signed up for a shift during a particular day).

I also see that you can get to the Volunteer Need field (which is a reserved field for CiviVOlunteer) via the Search Builder, but have no way through the UI to know what value to put there to get to the actual volunteer date and time shift to be able to conduct the search.

There is also no token available for the Volunteer Need field in the Mailings feature - which would be another way to send reminders to folks so they know what shift they signed up for.

It seems that this piece is huge for volunteer management.   I remember Frank talking about more work on the mailing piece,  but I was wondering if there's a current solution or work around to be able to send targetted emails to remind people of the shift they signed up for.

There is one wacky way, where you can create a role such as "Phone Caller Sept 12 5pm shift" or something - since volunteer roles are available in the search.  But this would be so inefficient and wacky that I wouldn't advise this workaround at all, especially if it's a huge volunteer project.

Any ideas?

The "who signed up for a particular shifts" part is the problem right now. At present, you could use scheduled reminders to send an email to anyone with any volunteer activity between X and Y o'clock, but if you have two shifts (or projects, for that matter) you won't have a way to distinguish between them, so they'll all get the same message.

We're expecting to finish a proper integration with scheduled reminders sometime before March 2017, but probably not in 2016.


SQL Error in Contribution Details Report Can someone help me resolve this error? I have recently started using CiviCRM but the website has been up for years. Thanks for helping. Arthur

Running CiviCRM 4.7.27 with Wordpress 4.8.4

On the Contribution Reports/Contribution Details see the following error in the log when trying to view results.

[type] => DB_Error
[user_info] => CREATE TEMPORARY TABLE civireport_contribution_detail_temp2  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_soft_civireport.amount as civicrm_contribution_total_amount_sum, 'Soft Credit' as civicrm_contribution_contribution_or_soft, address_civireport.country_id as civicrm_address_country_id
  FROM  civireport_contribution_detail_temp1 temp1_civireport
  INNER JOIN civicrm_contribution contribution_civireport
    ON temp1_civireport.civicrm_contribution_contribution_id = contribution_civireport.id
  INNER JOIN civicrm_contribution_soft contribution_soft_civireport
    ON contribution_soft_civireport.contribution_id = contribution_civireport.id
  INNER JOIN civicrm_contact      contact_civireport
    ON contact_civireport.id = contribution_soft_civireport.contact_id

  LEFT JOIN civicrm_phone phone_civireport
  ON (contact_civireport.id =
  phone_civireport.contact_id) AND
  phone_civireport.is_primary = 1

             LEFT JOIN civicrm_address address_civireport
                       ON (contact_civireport.id =
                           address_civireport.contact_id) AND
                           address_civireport.is_primary = 1

        LEFT JOIN civicrm_email email_civireport
               ON contact_civireport.id = email_civireport.contact_id AND
                  email_civireport.is_primary = 1

WHERE (1) AND ( contribution_civireport.contribution_status_id IN (1) )  GROUP BY contact_civireport.id, contribution_civireport.id, email_civireport.email, phone_civireport.phone, 'Contribution', address_civireport.country_id [nativecode=1055 ** Expression #9 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'civicrm.contribution_soft_civireport.amount' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]

Your mysql database has only_full_group_by set. You want to unset it, but probably keep the rest of the sql_mode values. You can see the current value with SELECT @@sql_mode. You probably want to set it in the server's my.cnf file.

So for example if the current value is
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

then you want to set it to
STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

See https://dev.mysql.com/doc/refman/5.7/en/option-files.html if you're not familiar with the my.cnf startup options file.


Permission 'See CiviCRM is installed' keeps being removed on Joomla I have a problem where the CiviCRM permissions on a Joomla site keep being altered.  The 'See CiviCRM is installed' permission is set on 'Registered' users to 'Allowed' but keeps being reset to 'Not Allowed'.  Any suggestions as to what might be causing this would be appreciated - could it be a CiviCRm security check process running something?
PHP version 7.3.24, Joomla! 3.9.19 Stable, CiviCRM 5.31.0

There is a paid Joomla component PWT ACL that helps a lot with these kind of problems.
For instance: the 'See CiviCRM is installed' permission could be the right to view the component with all contacts etc. This view of the component is only possible from the admin area of the website. To view it you need the right to login, you need to login at website.ext/administrator, and only then you can see the component as such.
If your registered user does not have the right of access to the admin area this right to See CiviCRM is not permitted, even if you explicitly set it like that: because the system does not allow access to the admin area, it cannot give access to the CiviCRM component when this requires access to the admin area first.
PWT ACL helps solve conundrums that can exist with 'clashing rights settings'.


In which table is Activity assignee contact information stored in mysql? I'm looking for the table in which Activity assignee contact information is stored in mysql.

Depends on your version. From CiviCRM 4.4 the activity assignee can be found in the table civicrm_activity_contact, where record_type_id = 1 is 1 for source contact, 2 for assignee contact and 3 for target contact.


Passing CiviCRM invoice number to Moneris hosted payment page We use this extension to hook CiviCRM up to Moneris' hosted payment page to process payments: https://github.com/webaccess/com.webaccessglobal.moneriseselect

Could someone help point me in the right direction as to how to pass along the Invoice # to Moneris so that reconciliation between Moneris transactions and CiviCRM contributions can be more straight forward?

Or share some tips on best practices for this kind of reconciliation?

If that is the case - Looking at the code I can see that in the confirmation page you are redirecting to Moneries Site for entering Card details and then once the payment is processed "Successfull/Failed" it is redirected again to CiviCRM Page.

So at that time please read the order number from the payment details and update that against your contribution - which will be usefully for your client to link both the records - I guess this helps


How can i add organization Legal name to search? I am looking for a way to add Legal name to search. I can see on this page that it is possible to add Nickname to search, which i have done.

Civi webform adds great functionality to add relationship to individual contacts. I allow users to lookup their current employer when completing a webform online and with possibility to add new employer.

I'm looking for a way to reduce the amount of duplicate employers added by users because some new organizations added are already in the database but entered different or only with an acronym.

I have turned off wildcard search, and also enabled Nickname field search.

The problem here is that, i have organizations in different languages, so Organization name field is for English name, Nickname is for another language or for acronym.
I want to be able to also use the Legal name and add it to search. For example: Organization name: World Bank, Nikcname: WB, Legal name: The World bank. This way user will be able to find the same organization by keying it in 3 different ways thus reducing the number of duplicates in the system.
With only the organization name and Nickname, another user will add 'The World Bank' as new organization.

How are you letting the users lookup their employer?  Is that an autocomplete existing user on the webform?

If so, you can customise what information is displayed in the autocomplete, but that does not currently include legal name.  I'd guess that is a trivial enhancement.

If you want the option of the autocomplete searching on legal name, that might be a bit more effort.  For both, you could raise an issue at https://www.drupal.org/project/issues/webform_civicrm

To add an option for legal name search in the normal search would need a core change following the same pattern as nickname.

A different approach would be to provide a separate lookup facility on legal name using a view but that is not as integrated.


Cron ERROR: Invalid username and/or password (Wordpress) Our cron has worked without issue then all of a sudden it stopped and provided the error: Civi 5.23.3 WP 5.3

When the cron runs - I get the following:
ERROR: Invalid username and/or password

My cron is as follows:
/usr/local/bin/php.cli -q /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/bin/cli.php -u username -p password -e Job -a execute

Turns out the issue was with captcha on our site. The plugin Captcha by BestWebSoft and all other captcha's that I have tested, including Wordfence captcha cause cron error. I found a captcha plugin that allowed me to restrict registration but not login pages in the mean time.


Apply Access Ajax API permission to allow Add new organization option to public autocomplete for current employer, still not works Civicrm-4.7. Apply Access Ajax API permission to allow Add new organization option to public autocomplete(1.4 v) for current employer field, but still not works!.

Pls check the following permission is provided to users:

CiviCRM: access AJAX API
Allow API access even if Access CiviCRM is not granted


Problem processing payment after CiviCRM Drupal to Wordpress migration After migrating from Drupal to Wordpress, my payment processor is no longer working.

After having gone to the payment processor I am redirected to the URL:
?page=CiviCRM&q=civicrm/payment/ipn&processor_name=Sagepay.....

The error I get is: You do not have permission to execute this url.

Any help in getting to the bottom of this would be appreciated!

A bit of a stab here, but have you checked the Wordpress Access Control (Administer > Users and Permissions > Permissions (Access Control) > WordPress Access Control) settings to make sure that Anonymous users have access to the "CiviContribute: make online contributions" permission?


Set custom field during Membership signup through a Contribution Page I need to save some additional information related to the membership during sign-up. This will be stored in custom fields of the membership. Sign-up (Membership creation) is happening through a Contribution Page which includes a Profile with those custom fields.

The Profile does not transfer the values from the custom field into the custom field of the newly created Membership.

Previously I used (Drupal Module) custom code and the civicrm_api to update the membership. However, nowadays I don't seem to be able to get the contributionID and membershipID values from the $form->_params array anymore.

How can I add custom fields to a Membership from a Contribution Page?

Please check the PR: https://github.com/civicrm/civicrm-core/pull/8052

The bug mentioned in description is not replicating, but found an additional bug. After making online membership contribution, with custom field included in profile, custom data is not getting saved in fields. When, view a membership record on contact summary page.

So made additional fix for CRM-18282.


You are using Stripe.js in live mode over an insecure connection Testing out Stripe with Civicrm 4.6.2, the plugin installed from Civicrm Stripe payment processor, when confirming the input test data of a Contribution Campaign with an enabled thank you page, stripe.js replies with:

You are using Stripe.js in live mode over an insecure connection.
This is considered unsafe. Please conduct live requests only on sites
served over https.

Now the Stripe dashboard is set to test, yet even after caching and reloading the page this message is shown.

Possibly for this reason when submitting a payment with a test card there is no confirmation, the page just renders again with the blank payment details input form. Nothing is shown on the Stripe dashboard.
What could the problem be?

UPDATE:

After setting the Link to Test-Drive, the process works in the dashboard admin. On the live site after submitting the transaction with the details, the page still renders again with blank cc input form. In the console there are two errors which I think might be the reason for the error:

TypeError: cont is undefined civicrm:1460
ReferenceError: Shadowbox is not defined civicrm:1509

Shadowbox JS is installed as a plugin and set to active.
Any ideas?

Not only must the stripe dashboard be "test" but CiviCRM's contribution page must be rendered in "test drive" mode as well.   Is that the case?


Can a message template replace tokens with appropriate translations? I see the option to set a contact's Preferred Language, and I have set up my test system with French and English.  If I make French the default for the whole system, when I edit the demographics of a contact, the radio options are in French, but the displayed text after saving is in English.

When I send an email to a contact with French as the Preferred language, and use the token contact.gender, the token replacement is still in English.

Is there a way to have token replacements respect the preferred language for each contact, and use the translated value?  Or am I stuck with English values because the system was installed in English?

This is not really an answer but a work around.

You can use smarty's to look for the English and replace it with the French (which I'm guessing at).

{if "{contact.gender}" eq "Female"}
    Femme
{elseif "{contact.gender}" eq 'Male'}
    Masculin
{/if}


Why do deleted contacts cause errors? I deleted a bunch of contacts because I imported the wrong data pertaining to them. I then imported it again, with the right data and it wouldn't let me because of "duplicate" contacts. However I searched for these duplicates and they do not exist. I am at a lost with what to do. Changing their ID isn't an option here. ALSO do note that when I do an advanced search, I do not have the option to search in trash.

Go in to Adv Search, check the 'search in trash' box, select all your contacts in Trash, and then choose the dropdown option to Permanently Delete. That should help


Display custom contact dashboard only to certain Contact subtypes Drupal 7.78
Civi 5.28.2
I am setting up a custom contact dashboard following Demerit's answer using UserDashBoard.extra.tpl and smarty's crmAPI.
But I only want it to be for contact sub-type = Student. How would I write an IF statement for that?
Here is my best guess but it does not work.
    {crmAPI var='result' entity='Contact' action='get' id=$contactId sequential=0}
{foreach from=$result.values item=contact}
  {if $contact.contact_sub_type = 'Student'}

Student Demographics

{crmAPI entity='Contact' action='get' var='result' id=$contactId return="birth_date,gender_id,custom_108,custom_107,custom_109,custom_110" sequential=0}
{foreach from=$result.values item=contact}

Date of Birth	Gender	Student Status	 Marital Status	Anniversary	# of Children

{$contact.birth_date}
  {$contact.gender_id}
  {$contact.custom_108}
  {$contact.custom_107}
  {$contact.custom_110}
  {$contact.custom_109}

{/foreach}

Class Info

{crmAPI var='result' entity='Contact' action='get' id=$contactId return="custom_118,custom_112,custom_113,custom_111"}
{foreach from=$result.values item=contact}

Class of	Campus	CG Leader	 Met Spouse at RI

{$contact.custom_118}
  {$contact.custom_112}
  {$contact.custom_113}
  {$contact.custom_111}

{/foreach}

{/if}
{/foreach}

Thanks

Might just be a typo but you need == instead of =.
{if $contact.contact_sub_type == 'Student'}
But contact_sub_type is an array, so you could foreach over it and check if one of the values is Student.


Importing Contributions I am currently trying to import contributions to CiviCRM, and it will not let me. Ill get all the way to the import option, it will tell me that all rows are valid, then once I import, all rows are invalid. It is saying that my contact id is not valid, but it is! I have exhausted everything in my ability, and as wondering if you could help me out.

Thanks,

Chandler

I recommend you check the detailed error message (you can download a csv file which contains those).

Maybe CiviCRM thinks that some columns are the contribution_id and it automatically selects this column to be matched with contribution_id. Then when doing this, it cannot find this ID.

I have expirienced exactly this problem, ignoring that column during import helped.


Display: is it possible yet to collapse a set of non-custom data? This is my first time on stack exchange so please excuse me if I've posted this in the wrong place, tagged it incorrectly, or missed anything else. And although I feel that I know civiCRM fairly well, I'm not at all a computer whiz, so forgive me if my tech language/terms aren't accurate. :)

Here goes... is it possible yet to collapse a set of built in/core fields, via the UI? I know how to do it for custom fields, but it'd be really helpful if I could do it for sets when I'm adding a contribution, for example.

I found this topic on the civiCRM Community Forum from 2012...
https://forum.civicrm.org/index.php?topic=26273.0

Sounds like Lobo thought it would be a good little project, but I haven't found any updates.

Thanks in advance for any help you can give!

UPDATE: Specifically, when recording a New Contribution, I'd like to collapse the Soft Credit fieldset, and expand the Additional Contribution Info fieldset. It would speed up my data entry if I didn't have to tab through the fields within Soft Credit or reach for my mouse to expand the Additional Contribution Info section.

The easiest one would be with css. But that would not be collapsing them, that would be hiding them. You just get the id's of the fields and hide them. If they are not required that just works.
The 2nd easiest one would be with creating .extra.tpl files and doing it with jquery: https://civicrm.org/blogs/dave-greenberg/now-its-easier-add-custom-behaviors-templates. With jquery you should be able to make a collapsible fieldset.
The most robust one would be with a custom extension and share with all of us on github http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension


Why does API get participants return all custom fields together with the specified return field? When I do this:

$result = civicrm_api3('Participant', 'get', [
  'sequential' => 1,
  'return' => ["custom_14"],
  'event_id' => 3,
]);

In the results I get the desired custom field, but I also get all the other custom fields. At first I thought it's just the entire custom field set but then I tested it and it returns all the custom fields for participants no matter which field set they belong to.

 "is_error": 0,
    "version": 3,
    "count": 18,
    "values": [
        {
            "contact_id": "181",
            "participant_id": "46",
            "civicrm_value_ew_9_id": "1",
            "custom_14": "dsfa",
            "custom_14_1": "dsfa",
            "custom_15": "d",
            "custom_15_1": "d",
            "custom_16": "AAA",
            "custom_16_1": "AAA",
            "id": "46"
        },

The value I looked for is returned with civicrm_value prefix, but why is the other data displayed as well? Is this a bug or am I missing something?
This seems to be the case for the Participant entity only.

I tested this on CiviCRM 5.9.1 and Michael McAndrew docker image with CiviCRM 5.11.alpha1.

This is almost certainly a bug, but unlikely to be fixed in v3.

As Aidan mentioned - there are non-standard APIs in v3, and the Participant API is one of them, along with Contact and EntityTag.


Override TPL path dynamically Is it possible to dynamically override the .tpl file path in CiviCRM?  Rather than use the corresponding TPL file to the Class.

Use an extension's templates dir

Creating a simple extension via civix provides a templates/ directory in the extension. This is searched before the default templates, so you can intercept and provide your own.

If that doesn't go far enough & you want to dynamically select a template (eg replace Form.php, but only when foo=123), these options are available:

Use CiviCRM's hook_civicrm_alterTemplateFile()

Alters template files, based on the form & form data. This is something you'd do in an extension or CMS module. (Function signature refers to $form, I'm not sure what this will mean if you're rendering a page.)

Nest templates

Copy the default template Foo.tpl to your custom (or extension) template dir as Foo-default.tpl and Foo-123.tpl, create a wrapper Foo.tpl which uses Smarty to insert the correct template based on your criteria.

This last method can be done without creating a custom extension.


How can I update a credit/debit card number, card billing address, or card expiration date to continue transaction processing - on Authorize.net We're on CiviCRM 4.6.19, Drupal 7.50 and using Authorize.net for payment processing.

When a credit/debit card number, card billing address, or card expiration date has changed, should simply updating the subscription with the new card info in Authorize for an ongoing monthly sustainer continue the processing uninterrupted, on the same date?

UPDATE for clarification - The monthly/recurring amount will remain the same. The goal is to resume the same monthly/recurring contribution in the same amount by fixing an error with processing by updating the "subscription" in Authorize with the new card number, billing address and/or expiration date.

Automatic recurring billing is an extra feature in Authnet (ARB) that you usually have to request. In order for Authnet to communicate to the CiviCRM that a recurring transaction has taken place, you must install a silent post URL in the designated field within the Authnet portal, under Account > Settings > Silent Post URL.

The silent post URL for a Drupal site is: https://yoursite.org/sites/all/modules/civicrm/extern/authorizeIPN.php

Once that's established, the credit card and billing information would need to be managed through the Authnet portal since CiviCRM does not store credit card numbers. If you update the information proactively, it should update everything else in the CRM automatically.

https://wiki.civicrm.org/confluence/display/CRMDOC/Authorize.net+Configuration


CiviContribute - convert amounts into words Is there a plugin that would populate a field with a word amount of a contribution total? Using such a token can make a letter more personalized. Similar to the SpellNumber formula in Excel. I.e. $240.00 = two hundred and forty dollars.

No there is no such plugin that I am aware of.


Import contacts: can't get past the "Choose Data Source" screen I am trying to import contacts into our database from a CSV file.  On the first import screen, "Choose Data Source", I have set the data source to CSV, picked the file, ticked "first row contains column headers", set contact type to Individual, dup to Update, picked the rule I want to use, set comma separator and the date format.

However, when I click Continue, the same page reloads and everything I had set is cleared.  I am not taken to the next step and I do not see any error message.

Any advice?

Thanks very much,
Richard

I figured it out.  The CSV file was malformed.  I rebuilt it and it worked perfectly.
Richard


Administration Console After Civi 4.6.10 upgrade I can no longer access the Administer/Administration Console without getting an error.  Here is a sample:

  @import url(/devjom3update/administrator/components/com_civicrm/civicrm/css/civicrm.css); @import url(/devjom3update/administrator/components/com_civicrm/civicrm/bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css);    Sorry but we are not able to provide this at the moment. You do not have permission to access this page. Return to home page.    function toggle( element ) { var className = element.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { element.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

Check the URL before you select the Administration Console link.  Does it have a www or no www?  Is it http:// or https://?  Next, check the URL of the error page for the same things.  Is there a difference?  If so, that's your problem.  Check here for a solution.


Where to update new Mosaico templates I want create my Mosaico template in WordPress with the CiviCRM extension
but I can't find where upload the new template.

Secondly, must I activate the new template after uploading it to my host?

When you install the Mosaico and related Extensions, you then create the Templates in civicrm and they become available to use in CiviMail, you do not upload them.

ADDENDUM:

If you have installed correctly, as per instructions, ie Shoreditch then FlexMailer then Mosaico then at /civicrm/a/#/mosaico-template you should see the word NEW on top of the base template


How Smart Groups Work What updates a smart group? Is it all based on the cron/scheduled job that runs updating the group members based on specific criteria?

Additionally are hidden smart groups updated when the cron/schedule job runs or are hidden smart groups not included when smart groups are updated?

Smart groups are kind of complicated. If you've got a small install, using the defaults will generally just work, i.e. there will be temporary caching that gets refreshed when necessary.

To answer your first question though, smart groups are updated depending on the timeout configuration and/or the scheduled job, and also depending on urls being loaded.

To answer your second question - if you mean disabled instead of hidden, then the answer is that I don't think they are ever updated. But if you mean when you're looking at the groups of an individual contact - then the smart groups are only calculated when you open the section of the page that displays them.

In other words, there are quite a few clever ways that CiviCRM tries to cache smart group results to avoid long re-calculations.

If you've got performance issues, especially with a larger install, then you'll want to think about the configuration under the Administer -> Customize Data and Screens -> Search settings. In there you can set a different default timeout for the smart group cache so that your site isn't constantly recalculating smart groups. You can also set this to a very large number and then use the system job to selectively regenerate the cache as appropriate for each smart group.

BUT, this gets tricky and is often counter-intuitive about the results, you'll find quite a few discussions about optimal settings for this.

The best advice (yes, not your question) is that if you're having issues, e.g. with slowness due to caches being rebuilt, then the first thing to do is to get rid of unused smart groups. A couple of smart groups that include all your contacts (e.g. all individuals) can really take a long time to regenerate for a large number of contacts.


CiviCRM Entity and editing or viewing activites I'm just curious if anyone has done work with CiviCRM Entity and activities. I was considering whether it makes sense (or is even possible) to have people edit certain activities from Drupal rather than from CiviCRM.
We have a lot of custom activity types with a lot of custom data (total about 600 fields) - it is only appropriate to view/add/edit the custom data related to the appropriate activity type.

For viewing activity info, I found that I could use either the Module View Mode Page or create a view with some contextual filters and a rendered entity that uses a custom view mode (or simply a customized view).
For editing an activity - is there any way to limit what is on the form? Rather than showing the long list of all activity custom data?
Depending on the answer to the question directly above, how can I avoid loading all 600 fields?

(Drupal 7.78, CiviCRM Entity 7.x-2.2, CiviCRM 5.33.4)

With CiviCRM Entity, there is a Drupal form for editing activities
/civicrm-activity/[activity-id]/edit
Unfortunately the form does not limit to only those custom fields that are appropriate for the activity type.
In the past, we had done hook_form_alter() implementation in custom module to hide custom fields depending on activity type.
This feature to only show custom fields appropriate for activity type is on our radar for future improvements.