Civicrm invoice number reset We have activated the contribute form within our CIVI.

We wondered: with the arrival of the new year, when there will be the need to restart from 1 with the invoice numbering, do we have to do some operation or will the system restart automatically?

Regards

It will not restart automatically, the requirement to restart from 1 (with a year somewhere in the invoice number?) is depending on countries AFAIK :-)

So what you need to do first thing in the new year is navigate to  Administer>CiviContribute>CiviContribute Component Settings and update the invoice prefix (and the credit notes prefix if you need that too).


White Screen During Joomla Installation I installed the previous version of Civi for Joomla just fine. I removed the older version and tried installing the current version but a few seconds after the installation process starts, I get a white screen and it stalls. The error is:

(/home7/accountname/public_html/administrator/components/com_civicrm/civicrm.settings.php): failed to open stream: No such file or directory in /home7/accountname/public_html/tmp/com_civicrm/com_civicrm/admin/configure.php on line 115

The configuration is:

Joomla 3.1.1
PHP 5.2.17
MySQL 5.5.42-37.1

As mentioned, I had installed a previous version in the same account with the same configuration without any problem at all. Any suggestions that would help me install Civi would be much appreciated.

Did you follow the steps here: http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrade+Joomla+Sites+to+4.5

When you say that you removed the older version, what steps did you follow to do this?  My first guess is that something wasn't removed correctly.


How can I make every new Group a type Mailing List? I have a request to enable making every new Group created (using search results -> Actions -> Add Contacts to Group) a group type Mailing List by default, thereby saving a user having to check the box next to Mailing List.  Can I do that with a new extension, using one of these hooks?

Use hook_civicrm_pre to modify the group-to-be prior to saving in the database.  Experiment a little with your hook function, adding the debug lines:

if ($op == 'create' && $objectName == 'Group') {
  print_r($params);
  die();
}

Try creating a group with the Mailing List checked and then creating a group with it not checked to see what it passes.  Write your code so that the $params array on a group where Mailing List is not checked ends up looking like the case where it is checked.  And obviously delete your debug!


Contribution Page Time to Submit Our contribution pages are not as fast as I would expect. What is the expected time people see to submit a CiviContribute page out of the box? Up until recently, it was reliably within 20-25s using Stripe which was at the outer limits of my expectations but serviceable.
Now contributions take from 30-35s. The increase seems to have occurred within the last month.
The factors I can see that are affecting submissions are:

USPS standardization
Google geocoding
Deduping to a large database
Stripe
Cividesk Normalize

We also experience a cookies error intermittently after submitting a donation.

In other words, the donor does not get to the thank you page but gets the following error. The donation does succeed. This issue has persisted for a long-time. We have not seen any pattern for when it occurs. I would estimate that it occurs 10-20% of the time.
This is related: https://lab.civicrm.org/dev/core/-/issues/517 and says using PHP 7.2 resolved, but we are already on 7.2.
Testing

CiviCRM 5.28.3
Processors: Stripe 6.4.2 / PayPal Standard / Authorize.net
Browser: Chrome

Baseline time to submission: Using Stripe with USPS standardization, CiviDesk Normalize, Geocoding: 32 seconds.
Test 1 - Stripe: Disable Cividesk Normalize and USPS standardization: 35s
Test 2 - Stripe: Above and disabled Google Geocoding + Geofill: 29s
Test 3 - Authorize.net and enabled above extensions: 23s
Test 4 - Authorize.net and disabled above extensions: 23s
Test 5 - PayPal Standard and enabled above extensions: 17s
Test 6 - PayPal Standard and disabled above extensions: 17s
So it appears to be related to Stripe.
For reference civicrm.org runs Stripe and donating there it took 7s to confirmation page and 9s to submit.
Update: The common factors of the slowness is WP + large database + Stripe.
Ref: https://lab.civicrm.org/extensions/stripe/-/issues/246

17 seconds from pressing "Submit" to the thank-you page is still obscenely high.  My only client who comes close to this has maybe 80 extensions installed.  My guess is you have something going on already that's exacerbated by Stripe.
While it's not the easiest solution, doing an xdebug profiling session would be really helpful here.  E.g. I once found a bug in the token processor that made contact creation take a long time - and when I added an extension with custom tokens, the problem got even worse.  Something comparable may be happening here.


Could not load settings file at: 4.7.0 wordpress I tried to load my contact to civicrm using the command line however was i tried to execute the import.php i received an error"could not load the settings file at:

i tried to further investigate i noticed that my civicrm.config.php is identical to the other server i used before that works perfectly fine as i tried the command line this error always comes up.

please do help a newbie.

Upgrade to 4.7.4.  There was a bug in civicrm.config.php in 4.7.0 that would result ib the settings file not being found in WP under certain circumstances.


Excluding in search doesn't work It seems that it's not possible to find contacts who are in group A, but not in group B. The only place where it's possible to exclude a group is Search Builder, but when I give two criteria (contact is in group A) and (contact is not n group B) CiviCRM ignores the second clause.

I tried to convert the second clause to use a Tag. So I've created a tag for group B, and searched for contacts in group A and contacts not in tag B.

The result is really puzzling, and it seems I am not following CiviCRM's logic:

(this is polish l10n, but "Etykieta" and "Kategorie" are both translations for "Tag")
Could someone clarify, what is happening here?

You should use the custom search "Include / Exclude Search" that does exactly what you want

civicrm/contact/search/custom?csid=4&reset=1 on my install, likely the same custom search id on your install


Can you create a mailing list based on tags Is there a way to use tags, possibly multiple tags e.g. using the tags Students and Attended Conference X, to create a bulk mail to members who fit into just those two categories.

Search Builder should let you say 'find Contacts who have this tag AND have that tag' and then set up the Smart Group from that.


ACL with nested groups I need to config a 2 layers group structure

GROUP 1
-- GROUP 1.1
-- GROUP 1.2
GROUP 2
-- GROUP 2.1
-- GROUP 2.2

Enabling a user to manage GROUP 1 contacts, this user will be able also to manage the subgroups contacts (GROUP 1.1 and GROUP 1.2)?

Thank's

This may not fit your scenario, but for others we have been able to provide this by using Relationships to 'join the dots'

If someone (X) has Permissioned Relationship to Org 1
and Org 1 has permission to Org 1.1,
and person Y has permission to Org 1.1
and if Org 1.1 has permissioned relationship to Z, then
X will see Y and Z
Y will see Z

Oh, and you don't need to add any ACLs at all, this is taken care of via this Fuzion Extension

May not be quite what you need but may be useful to others who read your ticket and who could switch to having Relationships at the heart of the ACL requirements.


Where can I find Documentation for Drupal 8 Webform CiviCRM module? Would love to see official docs/examples with lots of screenshots!

Yes! Official documentation is being created and can be found here:
https://docs.civicrm.org/webform-civicrm


WordPress Cron Events for running scheduled jobs on CiviCRM Need your help...I'm new to CiviCRM and I'm trying to create a cron job for automatically running all the CiviCRM scheduled jobs..I was wondering if it's possible to do this through the WordPress Cron Events Tool?

In CiviCRM  go to Administer > System Settings > Scheduled Jobs

https://docs.civicrm.org/user/en/stable/initial-set-up/scheduled-jobs/
https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs


Sort Criteria for civiCRM custom in Drupal View I created a drupal view to display contributor names. The view displays civicrm fields, both custom fields I have created and out-of-the-box civicrm fields.

The contributors are displayed according to the amount of their contribution. For instance, there are "Gold" contributors at the top, then "Silver", then "Bronze" etc.

The categories that contributors should be displayed within is not related to the total amount of the contribution. So, for instance, I have a "Silver" contributor that gave more than a "Gold" contributor (for reasons related to an event).

The problem is how to sort the fields so that the "Gold" group displays higher up than the "Silver" group. I cannot use Total Amount (desc) because of this silly Silver contribution that was more than the Gold contribution.

I tried creating a custom field where these groups of contributions were simply assigned numbers, so Gold=1, Silver=2, Bronze=3, etc. When I use this criteria to sort, desc will put the Gold after Silver, so that it is highest in reverse order. But when I use asc, which should put Gold at the top, instead Gold is after Silver.

This is driving me nuts. I realize it's pretty convoluted, so it's possible no one will actually read to the end. But there has to be a way to do this.

I did read all the way down!

Try Adding a Global PHP field under Sort Criteria-> you can then use PHP to say -> Gold=1, Silver=2 and Bronze=3; And indicate you want to sort Ascending.

If you need a hand with the PHP - let me know.


How do I set up recurring donations with Stripe? Im operating in Drupal 7 with Civi 4.7.30 and the latest Stripe API.

I want to set up recurring donations but it keeps giving me errors. I have it enabled on the Contribution page.

In Stripe they said to set up "Subscriptions" Which I did in the form of recurring donations. This does not enable the recurring to happen.

Advise on how to solve this?

I had a similar issue, not sure if it's the same but I applied this patch to correct:

https://github.com/drastik/com.drastikbydesign.stripe/pull/249/files


Why do Smart Groups now give database errors? I just updated from 4.6.3 to 4.6.5, on Joomla.  I have a number of Smart Groups which worked fine before, but now inconsistently fail to load contacts or settings, giving a database error instead.  The error seems related to building the cache, so I assume the inconsistency comes from whether or not it's refreshing the cache entry.

The database query that causes problems is:

SELECT id, cache_date, saved_search_id, children
FROM   civicrm_group
WHERE  id 0
  AND  ( saved_search_id != 0
   OR    saved_search_id IS NOT NULL
   OR    children IS NOT NULL )

Clearly "WHERE id 0" is invalid syntax.  The problem seems to be with changes to the CRM/Contact/BAO/Query.php code.  The function addGroupContactCache used to create a clause within the function, something like "WHERE ID IN (4, 7, 10)".  Now it calls self::buildClause.

From some debugging I did, buildClause is usually called with "IN" as the $op value, in which case it generates a valid clause.  But sometimes the $op value is "=", and it returns that "id 0" clause which breaks things.

The code changes between 4.6.3 and 4.6.5 are complicated enough that I'm not sure how to quick-fix it.  Any suggestions to get our smart groups working again are very welcome!

To standardize Get.api and Search form underlying where clause(s), buildClause() fn expects value(s) to be in array(operator => array(values)) format [I call it "Operator as Key" - OK format :p ]. Earlier in prior version most of the Get.api aren't working because the buildClause() was designed according to Search formValues format [array(values)], so there is conflict in how the values got retrieved and eventually result into Fatal Error/Empty Value for get.Apis. Whereas in some worst-case scenario the get.Api was only working proper with '=' operator as the buildClause didn't got the flexibility to work with any other operator other then '='. But recent changes ( 4.6 onward ) in buildClause expects values atleast for n-nary operators IN/NOT IN in the desired OK format. On the otherhand recent changes has ALSO ensured that the Search Form formvalues processed first into OK format before passing it to build-Clause.

Now back to the bug mentioned here, here's my fix https://github.com/civicrm/civicrm-core/pull/6320. In addition buildClause will also support previous format but will through a e-notice to notify the wrong value format.


Civicrm 4.7.20 Register event participant - pay by creditcard just updated to civicrm 4.7.20 - I wanted to register a late event participant used Register Event Participant in the past.  I can select the event and price but if I check 'record payment' the payment block with CC #, ccv and expiry doesn't come up. I did this once and seemed to get the Contact info page plus a link to enter credit card information.
What is the correct way to get the payment block (not just the priceset for the event) to come up?

From a Contact's summary page -> hit the Events tab

-> then hit the Submit Credit Card Event Registration button - and select an Event. If it's a paid event and you've got a Payment Processor setup/selected that handles Credit Cards - then the Credit Card fields will appear:


sparkpost email config Trying to set up Sparkpost for Civicrm 5.12.0 / WP 5.1.1 / php 7.2

I was trying the cividesk extension but I'm on the EU server and can't figure out the fiddling needed to access that just yet.

So I've tried setting up smtp. I've configured Admin > Settings > Outbound mail and got a confirmation note from Sparkpost that it works. However, that test email hasn't been subsequently sent - Sparkpost has it as 'accepted' but not gone anywhere.

As advised by Sparkmail - I've set up mail.digilocal.org.uk as my mail subdomain. The sending DNS checks have been verified (DKIM / bounces).

I've tried sending a bulk email (just to myself but using a test group) with the following bounce report:

  authentication failure [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Ema

I have a FROM email address mail@mail.digilocal.org.uk and have set up a mailbox on my domain with that address. I've also set it up as the default bounce address (which is I guess how I'm getting the report).

I've got two other installations of civicrm working and not had these issues. Not quite sure what's so different with this domain.

closing as I think the problem is in CiviCRM - sending test mailing works, whenever I send a full scheduled run it falls over and bounces everything. So the error is in CiviCRM (or my config of it) rather than SparkPost.


Should the API return code always be 200? The Civicrm API seems to always return 200 (aka 'Success') even when there is an error (in the parameters of the request, or otherwise). To indicate an error, it instead sets the 'is_error' flag to '1' in the response.

This is fine, but is there a reason why it wouldn't set a more appropriate error code depending on the case (i.e. a 400 'Bad Request' code for malformed requests)? For example, when using a javascript http client and making an ajax API request it would allow use of default error handlers (function to call on success, function to call on fail).

HTTP return codes are typically indicative of "plumbing" issues between the client through the web server. A malformed API call is more indicative of an underlying data issue so doesn't really fit the same scheme (IMHO).

Further, I think that error handling for plumbing issues (ala "Website not available") probably needs to be different than that for API errors. I know my coding would always handle things differently.

That said, this question really calls for no more than personal opinions so should probably be closed.


How do I edit mailing recipients? I need to update the recipient list of a scheduled mailing.

How do I do this?

There's no way to do that through the UI. You're probably better off cancelling the mailing and recreating it.

If you're comfortable and familiar with the database you could edit the civicrm_mailing_recipients table for the relevant mailing, but that would be pretty fragile/risky.


Posting photos on our DONATE/ contribution page through Civi Is there an ideal image size for posting photos on this page? The photo that I want to post keeps getting smushed. I finally found decent dimensions but it the mobile website doesn't keep the correct dimensions.

Let me know!

In my experience the best option is to give the image a width of 100% or at least use media queries to set the width at 100% for mobile


Adding extra information to event registration We organise a walk with a lunch afterwards. Who registers online for the event must be able to indicate how many people will participate for the walk (number of adults and number of kids up to 12 year) and for the lunch (idem).

I do not see the possibility to add those fields to the online registration form. When i define custom fields for the event, they cannot be added to the registration form. When i add a "walk and lunch profile" to be used for these events, the first to know is the existing field of the person (such as last name...).

You will want to make the Custom fields on the Participant record (not on the Event). Then you'll be able to add them into a Profile and add that Profile to the Online Registration section for your Event.


Error Could not find valid session key wordpress Inside hook_civicrm_post, when I comment
the below line

  $user_id = wp_update_user( array( 'ID' => $user_id,'user_email' =>
  $objectRef[Email1]));

It does not give "Could not find valid key" error
but when I uncomment the above line it gives the error

Kindly let me know how I can fix this

$user_id  = $uf_match['values'][$uf_match['id']]['uf_id'];
        $data = get_userdata($user_id);
        if ($data->user_mail != $objectRef[Email1]){
         //$user_id = wp_update_user( array( 'ID' => $user_id,'user_email' => $objectRef[Email1]));
        }

I'm no WordPress expert, but my reading of the codex is that wp_update_user() will remove cookies for the logged-in user. The docs say it "Uses: wp_clear_auth_cookie()".

I would try to do the same with wp_insert_user() instead, it says in the codex that this can update OR create new users.


CiviCRM settings file does not exist Drupal 7.32, Attempted install of CiviCRM 4.6.9.
I do not yet have direct access to the server or database, that power rests in another's hands.
Installation goes off without a hitch, all requirements clear and the 'Modules' overlay confirms CiviCRM is installed.
Any attempt to enable CiviCRM produces the error:

  (Currently using CiviCRM settings does not exist CiviCRM settings
  file does not exist. It should be created by CiviCRM install)

It refuses activation.

I'm a little confused here - you say that the Modules overlay confirms it's installed, but any attempt to enable it produces the error. You shouldn't have to enable it anywhere - you run the install page and then it is installed and automatically enabled in Drupal.

So on the modules page is it just listed there, or is it checked to show that it is actually turned on?

I want to make sure where we stand on that before looking at other causes.


GDPR Civicrm Bug when attempting to forward to another thank you page? On the Communications Preferences settings page (of the GDPR extension) the option to Display a message on the form page works fine, but when attempting to forward to another thank you page

https://peoples-press.com/thank-you

and I put either relative or absolute (which the extensions says I can) the page it sends me to is

https://peoples-press.com/index.php?option=com_civicrm&task=https://peoples-press.com/thank-you

Have no idea how to tackle

Civicrm 5.1 - Joomla 3.8.7

thank you for reporting the problem. I tried to reproduce the problem on my website - it actually appears at absolute addresses. I link your entry, I will add my screenshots and create a problem notification in the plugin. Regards
Marcin Lewandowski
The Star of Life Foundation

EDIT - issue is here


Add group to activity assignees I want to assign everyone in a particular group to an activity when I create the activity.

Currently I only see how to add each one individually. This happens frequently enough that I would like to just assign to the group and have the contacts show up in the list of assignees, or use some other method to attain the same result.

When adding a new activity I can narrow the search to my group, but then I still have to add each one separately.

I tried searching for contacts in a group, then look for an action of "create activity" but that didn't show in my list of actions.

Thanks in advance for any help you can offer.

CiviCRM 4.6.3 on Drupal 7.37 in a Linux Mint 17.1 VirtualBox

you should be able to do this via Find Members or Advanced Search. Use either and select your Group. Search. Select all records. Under Actions find "Record Activities for Contacts". On the next screen you should see all members of your group. And there should be an option to "Create a separate activity for each contact."


Case activities are not shown in activity tab but appear in the filter In the Activity tab for a contact, case activities are not shown. I would rather they were, but I can live without that.

But in the filter for including and excluding activity types from the view, the case activities appear. Surely this is a bug. Since case activities are not shown in the tab, it makes no sense to filter by them.

In an organisation with a large amount of case activity types this makes the filter pretty much unusable because the list is so long and largely irrelevant.

I found the offending line of code, it is line 40 in CRM/Activity/Form/ActivityFilter.php

$activityOptions = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE);

It seems to be the first parameter being set to TRUE that makes it include case activites.

Should I file a bug, what do you think?

In the Activity tab for a contact, case activities are not shown. I would rather they were...

Me too! And After a lengthy process I've had this PR 1630 merged into core, should be released in 5.24 I think.

It adds an option (Administer » CiviCase » CiviCase Settings) that, if checked, will include case activities in the activities tab (and other activities listings that they were previously hidden from).

I felt that not having these exposed in the normal way led to some really strange situations - like if a case activity is assigned to me, I would not be able to see it from my record at all. You may want to read my rationale for why this option made sense.


Event custom fields not carried over to repeat events When we set up a recurring event, data in custom event fields isn't carried over to the repeated events. Similarly, if a recurring event is edited and we tell it to overwrite all the occurrences, only the edited event will retain the custom data.

(This is in v4.6.4, but I'm able to duplicate this in the online demo)

This sure seems like an oversight on CiviCRM's part.  Good call for testing on the demo to rule out some weird problem on your site.

At this point, the bug needs to be reported and fixed.  Go to issues.civicrm.org and create an issue.  That way it can be triaged and assigned to the best person to fix it.

Unfortunately, until a fix comes out, you'll have to manually select the new recurring events in the custom data settings.


What are my options for importing recurring contributions? Our organization is currently transitioning into CiviCRM. We have some existing recurring contributions (with Paypal Standard) that are ongoing and we would like to import them into Civi. Why do we want to import them? Well, here is my current understanding of the situation:

When the monthly contribution amount is charged from the donor's card by Paypal, an IPN with the payment data is sent to our server. Civi processes the IPN and tries to relate it to an existing recurring contribution. If it finds the related recurring contribution, it creates a new single contribution record for the payment made. If it doesn't find a related recurring contribution, it gives an error.

So this is why we need to import (or somehow recreate) the recurring contributions. What are our options for that? I saw this wiki page, however in the Contributions tab inside a contact I can't find a "Submit Credit Card Contribution" button.

Here is some relevant information I got from JonGold on this matter in a private chat in IRC. Posting the conversation in its entirety.

[21:16] <borislav> hi
[21:16] <JonGold> hi
[21:17] <borislav> is this by any chance your answer here? http://stackoverflow.com/a/31733507/2762014
[21:18] <JonGold> yup
[21:18] <borislav> cool
[21:18] <borislav> how did you import the recurring contributions into your civi database?
[21:19] <JonGold> I used the command line CSV API import tool
[21:19] <borislav> ah!
[21:20] <borislav> could have thought of that myself, haha
[21:20] <borislav> so you first imported the contacts and then the recurring contributions?
[21:20] <JonGold> I'm looking at the CSV now.  Here are my headers:  "trxn_id","installments","frequency_unit","amount","invoice_id","start_date"    ,"create_date",contact_id,"frequency_interval"
[21:21] <JonGold> Yes - I do a lot of migrations to Civi.  I first import the first name/last name/external identifier.  That way I can map external IDs to CiviCRM contact IDs.
[21:21] <JonGold> Though I realize that we've confused two different issues here.
[21:22] <JonGold> The IPN issue didn't involve me importing anything.  I had a Civi client who switched from Drupal to Wordpress.  So the database didn't change, nothing was imported.  I just needed IPNs to show up at a Wordpress-based URL.
[21:22] <JonGold> But I've also imported plenty of recurring donations using the command line API CSV tool!
[21:24] <borislav> right, in that case you already had the recurring contribs in the civi database so you just needed to redirect the IPN. in my case I need to import them to the database
[21:24] <JonGold> What payment processor are you using?
[21:24] <borislav> Paypal Standard
[21:25] <JonGold> Hmm.  I'm not sure how successful you're going to be, but I can give you some tips.
[21:25] <borislav> if you want to, answer my question here: http://civicrm.stackexchange.com/questions/7146/what-are-my-options-for-importing-recurring-contributions
[21:26] <borislav> or I can compile an answer with your tips and post it
[21:26] <borislav> whichever you prefer :)
[21:26] <JonGold> When you create a recurring donation in CiviCRM using PayPal Standard, Civi gives PayPal a string of data that it expects to get back.  It includes the contact ID, recurring contribution ID, etc.
[21:27] <JonGold> So when PayPal sends its IPN ping, Civi is expecting to get that data back in a particular format.
[21:27] <JonGold> If it's getting the IPN data pinged to it and that contribution was created in a different CRM, the data won't be there.
[21:28] <JonGold> In theory, you can go into each IPN subscription in PayPal and change the data.  I've done it manually.  You can also possibly write a script.  It's a huge pain.
[21:28] <JonGold> You can compile these answers - I don't think I need the Stack Exchange points :)
[21:29] <JonGold> My last client in your situation agreed that the option they'd take is to manually upload a list of recurring donations from a CSV (I forget whether it was compiled manually or exported from a legacy system)
[21:29] <JonGold> The recurring contribution records were still present in Civi so they could, e.g., search for recurring donors, but there were no IPNs, just the manually imported recurring donations.
[21:30] <JonGold> As each person's credit card expired, they would have that person restart the recurring payment through Civi.  This may work differently with PayPal standard though.
[21:31] <JonGold> Also, to respond to your not seeing the "Submit Credit Card Contribution" button - I'm not sure that works with Paypal Standard, I'm afraid.  Not 100% sure though
[21:39] <borislav> I had no idea that the paypal IPN data depends on what Civi sent to Paypal in the first place. this makes things much more complicated. for me it may not be worth it to do all of this. with not too many subscribers, it might make more sense to ask them to register for a donation again, this time with Civi's donation form
[21:40] <borislav> you have saved me a lot of time with this info, thank you
[21:40] <JonGold> no problem!


Is there a way to set a cap (maximum participant) number within the price set field? I was hoping to find out if there was a way to set a cap on the price set field rather than the event. For our summer camp, we have a morning and afternoon session that you register for under the same event, but can pay which session you want. We were wanting to set a cap on both the morning and afternoon session. Since they aren't their own event, I didn't know if this was possible.

Yes. In your Price Field Option on a checkbox field type you should see 'max participants' field so you can limit how many can sign up to any option. Just make it a $0 item if you need to have it as a 'free' option within a paid event.


Lopsided Number of Extensions This is just a general question:
As a newbie, I'm wondering yhy are there so many more Drupal extensions than WordPress extensions? Just curious, since WP has a larger market share than any other CMS. Thanks.

Just historical. Civi started with drupal and mambo/joomla. But most extensions are designed to work with all CMSs and where possible it's encouraged to make them "CMS agnostic" that way.


Word replacement error I have a problem in word replacements as well. It is not getting replaced in all places. Tried replacing "contributions" with "donations". the change is not getting reflected in CiviReport, while in other places it has changed

The word replacement feature will only replace words that are part of the CiviCRM interface, and not words that are in your 'configuration'. This may not be at all obvious, but the key is that those occurrences of "Contribution" in the reports section are actually pre-configured report instances. So you can change them by going in and editing the reports (or rather, the report instances) themselves, via the web interface.

I should also say that you're probably working too hard to make it look 'right'. Although you may only use CiviContribute for donations now, you may end up wanting to use it for event registration in the future, for example.


What's the correct way to log debug info to log? The "current" wiki says to use CRM_Core_Error::debug and says, "Most runtime errors are logged here, as well as data that you explicitly write to log using the CRM_Core_Error::debug log=true parameter."  However, if you set $log = true, that just does an echo.

An older version of the docs says to use debug_var - and this works correctly, but seems duplicative, and isn't mentioned in the current docs.

Should the documentation be changed?  Or should the code be refactored?

I use

Civi::log()->debug('my message')

to write to the log file.


You have requested a non-existent service "mosaico_graphics" I am using version 5.2.2 of Wordpress and CiviCRM 5.13.5. Since I did a backup last week, I am getting this message when I go into Civi.

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
You have requested a non-existent service "mosaico_graphics".

Then I click CiviCRM again, and all is well.

However, today I tried to create a new mailing, and I get the same message. Unfortunately, I can't just click New Mailings and move on.

In either case, I am not trying to use mosaico.

(By the way, mosaico has not been working for some time, but I've been able to do a workaround.)

Thanks.

As it turns out, adding FlexMailer did the trick.
Administer: System Settings: Extensions
Add New
FlexMailer


CiviCRM WordPress uninstall - db issue Uninstall CiviCRM from WordPress, is creating me a big issue.
I needed to uninstall CiviCRM (5.31.1) from a production site, saving all theme and others settings.
CiviCRM went away without uninstall its db data. So:

I tried to delete the tables using phpmyadmin, failing
From command line, I dropped the db and I recreated it from a dump, cutting away the CiviCRM part, maining all tables without wp_ prefix; doing this the Wordpress site operate all as well.

Some days ago it was necessay to reinstall CiviCRM... All was good until we clicked the plugin enable link, recieving this page:
Initialization Error

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]"]

Where old CiviCRM data are still inside db?
Did someone prepare a SQL script performing correct db uninstall?
Could be possibile to add the data delete checkbox during plugin uninstall process, like in many others Wordpress plugins?
TIA -- Francesco

It sounds like you still have a civicrm.settings.php file. To uninstall you need to delete that too.


what is the intent of contribution batches listing financial line items instead of contribution total To see what I'm referring to:

create a contribution record
edit the record and alter the amount
create a new accounting batch
observe the record in the contribution search

Instead of displaying the contribution record, it displays the financial line items, which in this case is two records. For example, if you initially created the contribution with an amount of $50 and later changed to $25, you would see:

contact   $50
contact  -$25

What is the reasoning behind this? It seems overly complicated and is confusing for users. Simply modifying the total amount for a contribution is not necessarily a formal bookkeeping action where there is money in/money out -- it may simply be fixing a data entry mistake.

My inclination was to treat this as an error, but I'd like to understand the reasoning behind it.

Update/Additional Thoughts

I had a situation shortly after posting this that helped explain the possible value; but I think it also highlights some shortcomings.

The scenario was a contribution that had been created and batch processed, but was later found to be recorded in error. The user could edit the contribution to adjust the amount, and then when creating another accounting batch, the difference (adjustment) was available for processing.

That is a useful and accounting-significant workflow. However, I still think the scenario where a person simply creates a contribution and then modifies it should not be reflected in this way. There is no accounting impact by that action, and listing the change history only confuses things.

So (IMHO) a preferred behavior would be to only create new line item adjustments if the contribution has been batch processed; otherwise it's sufficient to simply edit the record.

More Thoughts

One more issue related to this that I really don't think should be how things function --

If you return at any point to edit a contribution -- for example to add a check number or alter some other value other than the amount -- it results in a positive and negative line item adjustment for the full amount. So if the contribution was $100 and you edit to add the check number and save, when you create an accounting batch you will see:

contact   $100
contact  -$100

That is totally unnecessary and very confusing (also creates a lot of extra records).

Yes, in some cases a change is just a correction of a data entry error, and in others it is an 'actual' business transaction change.

A primary objective of the CiviAccounts effort was to make the system audit-able so that certain generally larger organizations could start using CiviCRM. This requires that all changes are recorded. So for example, if a $50 cash contribution is received and recorded, then it is later changed to $25, the system will have recorded this change. This allows one to track what might be a significant change.

Generally, to prevent cooking the books like this to the benefit of a rogue employee, it is desirable to require a second person to sign-off or approve changes.

I think it would be reasonable feature request or perhaps new extension request to either not record bookkeeping entries for any changes made before a batch is exported or to allow a second person to approve them being deleted before the batch export. It might be more appropriate for certain types of batches, eg ones involving initial data entry, and not for others, eg online transactions.

This would be ideal for use cases like tiny orgs with less formal financial workflows, and for larger orgs that close data entry batches every day after reconciling with a tally of cheque amounts done with a calculator.

With respect to edits creating bookkeeping transactions that reverse then repost the same amount: that was an undesirable outcome of (re-)factoring the code to make it more modular and maintainable. The bookkeeping transaction for an edit can vary extensively based on changes to various fields in the contribution, and to various fields in each of the line items. I agree this leads to undesirable bloat of bookkeeping transactions. In defense of this implementation approach, popular accounting packages do the same thing when saving a change to the cheque number associated with a transaction.


Database Error Code: Access denied for user 'civi'@'localhost' (using password: YES), 1045 I encounter a really weird issue. I'm moving my CiviCRM install from an Ubuntu 14.04 server to an Ubuntu 16.04 server. Mysql is now 5.7.21.

CiviCRM version is the latest 4.7.30

The default SQL mode only_full_group_by is disabled.

If I connect using the terminal from the same localhost using the same username/password (I triple triple triple checked), it runs like a charm.

The CiviCRM page always shows a DB Error: unknown error (duh!). Enabling the backtrace gives me more info:

[callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] =>
SELECT  v.name as name ,v.value as value, v.grouping as grouping
FROM   civicrm_option_value_en_US v,
       civicrm_option_group_en_US g
WHERE  v.option_group_id = g.id
  AND  g.name            = 'wysiwyg_presets'
  AND  g.is_active       = 1  AND  v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviMember","CiviMail","CiviReport")) )  ORDER BY v.weight [nativecode=1045 ** Access denied for user 'civietui'@'localhost' (using password: YES)]

Any help much appreciated

Update

If I deliberately use a wrong username or password, I have a different error:

Initialization Error

It shows that somehow, Civi connects to the DB up to a certain point

update 2

mysql> show grants for username@localhost;

| Grants for username@localhost                                                        |

| GRANT USAGE ON . TO 'username'@'localhost'                                         |
| GRANT ALL PRIVILEGES ON civicrm_DB.* TO 'username'@'localhost' WITH GRANT OPTION |

MySQL 5.7 has "pluggable authentication", which means that you're not always logging in by password from your terminal.  You'll want to ensure that the mysql.user table shows a value of mysql_native_password for all users in the plugin column.

If you're logging in to the terminal as the root user on Ubuntu 16.04, then by default you're not using mysql_native_password, you're using auth_socket.  This could lead to misleading results where you can log in from the command line with what SEEMS like a good password!  If this is your problem, you may need to install the mysql_native_password plugin before you can set the password.


Creating a new "Member" in one step If you "become a member" by going through the normal route of "joining" through the website front-end -- using a CiviCRM profile and requiring the creation of a Joomla (in my case) account -- it is an easy one step process. However, my organization has a lot of older members who join through the mail or in person.

This means that you have to:
(1) Create a CiviCRM "Contact"
(2) Create a CiviCRM "Membership"
(3) Create a CiviCRM "Contribution" and
(4) Create a Joomla user that is connected to the CiviCRM "Contact".

That is a cumbersome four step process that is being handled in one go if you join through the website front-end. In addition, you cannot create a Profile form that has more than one "category" in it, which means you cannot create a profile form so that somebody already logged in can create a new member, accomplishing all of these tasks in one form, or on one page.

I have thought to myself, "Surely somebody out there has faced this problem and solved it," but after nearly 6 months of searching the web, reading the CiviCRM wiki, searching the old boards and the new Stack Exchange board, I can't even find anybody discussing it.

Does somebody have a solution to this problem?

It should never be a 4 step process as the contribution and membership records are created at the same time. When you sign someone up for a membership offline via Add Membership on the membership tab of their contact record you tick the "Record Membership Payment" box and enter the payment during the membership creation or, if it is a credit card payment you choose Submit Credit card membership and the details for recording the payment are visible from the beginning.

You can get it down to 2 steps if it is a credit card payment and you make use of the "not you or want to do this for another person" feature at the top of the online sign up page.(The only step to do separately would be creating the onnected Joomla user.)

If you were using Drupal and the payment was by Credit card you could do it in one step if you used CiviRules to tag the contact when it was created and then implemented the steps outlined in Creating Drupal users made easy .

However, I note that you are using Joomla.  I don't use Joomla and don't know if anyone has created a similar method for creating Joomla users by tagging civicrm contacts.


Where does "Added By" value come from? I logged into the back end as "Joomla Administrator". I manually processed a new membership for user "Sheridan Test14". The renewal correctly shows in the membership, contribution, and activity for Sheridan Test14. However, the activity indicated added by "Gmail Test." Test GMail contact has activity that matches the activity in Sheridan Test14. Why is the transaction associated with the contact "Test Gmail" and not contact "Joomla Administrator"?

The membership form uses a price set, price field = Membership Dues financial type and price field 2 = Publications. Does it matter that a Price set is used?
Thanks,
Kate

[

When you access Civi, you log into your CMS (Joomla in this case) with a CMS account. That CMS account "Joomla Administrator" will be linked to a Civi contact. My guess is that your "Joomla Administrator" account is linked to the "Test Gmail" Civi contact. You can check this by looking at "Test Gmail" summary page in Civi: "Contact ID / User ID" will show Civi's ID for the contact and Joomla's ID for any linked account. A Joomla ID will have a clickable link that will take you to the Joomla Account profile.


Summary Fields Extension - Do the contribution fields include event/membership payments For the Summary Fields Extension - Do the contribution fields (i.e "Total Lifetime Contributions") include event/membership payments?

Also, related question, if it does include event payments, does it include partial payments?

A blog about this extension is here:  https://civicrm.org/extensions/summary-fields.

You can select the contribution types you want to include (there is a setting page). I don't know about partial payments though...


Impossible to login with new civicrm user I have created a Drupal 7 website with civicrm . My problem is when I create an account with Drupal and I would like to reset password I don't have problem's. The account is automatically created in civiCRM .
But when I create a contact in civiCRM, an user is created in Drupal 7 . When I would like to reinitialize this user password, the process don't have problem's.

But when I would like to log out and login with new password, I can't.

I have checked in drupal's table "user" .

They don't have difference between drupal user created and civicrm user created. The permissions are same and the generated passwords are ok and the cache cleaned.

Any person have any idea ? I use Drupal 7.43 and 4.7.3

OK, I have found my problem's solution. The cause was the user generated by civicrm had a username that wasn't the e-mail. I trying to login using the e-mail not the username. I have install this module and now they works .

https://www.drupal.org/project/email_registration


Clicking Fields in Front-end Profile View Gives Inconsistent Results These issues have existed for a while, but perhaps without resolution?

Front-end Profile View Issues

When you go to view the full profile from a profile-based search, all the fields are clickable but the actions after the click are inconsistent. For example:

Click on a website URL - goes to the website. Click on an email link - goes back to the profile list search results for that email address. Click on a text-type field - adds that to the search criteria.

I would rather have email fields trigger an "emailto:" type action.

And in the specific instance I'm working with, it would probably be best if text type fields were not clickable at all in the full profile.

All profile fields are set to Expose publicly and for listings.

Wordpress 4.7.5 CiviCRM 4.7.17

When you setup your fields set visibility to "Public Pages". Otherwise in the detailed view the data will show as a link which when clicked will re-run the search based on that value.

Websites are turned into a hyperlink by default.

Hope this helps.


(version 5.13/5.14) Search Builder syntax error when "Groups" "is empty" in the latest versions of CiviCRM (5.13.4 and 5.14) we can no longer search for contacts that are not included in any group through the search builder!

First (at least until version 5.12) with this search:

we obtained "all contacts that did not belong to any group", while now we give a a SINTAX ERROR.

How to solve?

This is a recent bug introduced by the fix to a different search issue, issue #726.

A permanent fix will need to be found that doesn't break either scenario.  However, to resolve your immediate issue, you can open file CRM/Contact/BAO/Query.php and delete line 3037.

I've reported this issue as #1048.


Import bulk email addresses I have 700 email addresses in an Excel doc. How can I import them en masse to a single smart folder for a one-off mailing?

When you import you can specify 'add to group' or 'add to new group' on the final step of the import wizard
It doesn't make sense to me why this should be a 'smart group' per your OP ah but you said 'smart folder'. shrug. hope my answer helps :-)


Is there a way to disconnect CiviCRM contacts and Drupal Users via the UI? I have a connection between a Drupal User and a CiviCRM contact that I would like to remove. I found this Q&A which describes how to do that on the database level.

I was however wondering if there is any way to do that via the UI. Any hints? (Using CiviCRM 4.6.9 and latest Drupal.)

This is just a top-of-the-head thought and I am not sure I've thought through all the ramifications, but could you:

Create a new contact (blank, essentially, or with the same name)
Run a search that pulls both of these, and select to merge them
Flip the contacts so the old contact is considered the duplicate contact
Check the boxes to transfer all the info except the Drupal user to the new contact in the process of merging?

Test first, obviously!


Which mobile Apps or Extension work well for what scenario (EDIT - I changed this from a question asking for an App for the 'general contact/member to a more generic one that hopefully gives good enough across the whole range of scenarios)

There are several questions about Apps that i have found eg
- CiviCRM on mobile phone
- What is the best approach for using CiviCRM as an app on mobile?
- CiviCRM on mobile phone

My sense at this early point of discovery is that most effort has been going in to Apps for the admin/organiser, rather than just for a general user/member who may want to
- view and update their profile and membership.
- see their relationships and click through to those relationships eg employer, region and club.
- search for and register for events through the app

Hence this question will hopefully flesh out what features each offers and what particular scenarios they may be best applied to.

Here is an initial list - hoping we can collectively flesh this out so it is a useful reference document

CiviContact - AgileWare

Android and IOS

CiviMobile - AgiliWay

Android and IOS

SmartCivi - ArtTech

Android only

CiviMobile Extension - WebAccess

NOTE: I will do my best to update this list with more info/summaries if folk post Comments or separate Answers


Cancelling an A/B test How do I cancel a scheduled A/B test? I have one scheduled for tomorrow, but found a type post scheduling that our proofreader missed. I know I can no longer edit this, but I want to cancel it and resent it: how can I do this?

I found this, it just took a while to show up! It is under the mailings section, I guess I just need to give the server some time to refresh.


What Are the Best WordPress Theme Recommendations for CiviCRM We are about to deploy Civi CRM in our WordPress website. We are using the Avada Theme from ThemeFusion. I came across a couple of comments saying that with Avada's recent upgrades, this was causing CSS and other issues.

Can I ask this community to weigh in on which themes they recommend for a WordPress & CiviCRM website?

What's important to us?

We would love to have some of the bells & whistles that Avada supplies. For example, we can designate whether any block of content on a page will show across all devices (smartphones. tablets, desktops) or only specific devices. This is especially helpful when we don't want some content to show on mobile and when we do want specific content to show on mobile but not desktop.

Most importantly, the theme needs to work with CiviCRM to make it as mobile-friendly as possible.

Many thanks in advance for any recommendations and advice.

I can recommend the Divi theme from Elegant themes.  It is fully responsive and mobile friendly and we've had very few issues.  We've had some problems with certain plug-ins but not from the theme itself.


Adding tag or assigning group when user created from profile I'm trying to create a mailing list sign-up using a custom profile (capturing a little more information about the user than the default mailing list).

I'm running Wordpress 4.7.x and Civi 4.7.x

I've managed to get the profile up and running but can't work out a nice way of assigning a tag \ group to the newly created individual.

I've had a read of How can I assign tag when certain profiles are submitted which looks like a similar question but unfortunately CiviRules isn't an option for me (4.7 not supported) nor are Drupal Webforms.

So far the best I've managed to achieve is to add a contact source field to the profile and auto-populate \ hide the field with Javascript which doesn't feel like an ideal solution.

Any thoughts or ideas appreciated!

Thanks,

In the the profile settings > advanced settings there is an option to "Add new contacts to a Group?". This will add contacts to the group specified when the profile form is completed.

If you are looking to give the user options on which mailing lists they wish to be part of you can create a custom field with the selections. Then create smart groups for each option to use for mailings on each area of interest.


"Your postal code is incomplete" on Spark signup page I'm trying to sign up for Spark, using the link found here: https://civicrm.org/spark
I've entered all my information and keep getting an error that says "Your postal code is incomplete".  There are two places to put in your zip code on this form, I have filled them both in.  I have tried the zip format and the zip+4 format.  Getting the error each time.  I get the error whether I let my browser do the autofill settings or not.  Ready and willing subscriber here, being kept from becoming your customer by this frustrating problem.  Not a great start, this does not exactly inspire confidence that I want to use this (will my subscribers have the same problem?).

Just double-checking: when filling in the form, after typing the credit card number, do you see the postcode/zip field?

The payment processor (Stripe) displays a different field depending on the country (numeric ZIP for the US, alphanumeric for Canada, etc). I have to admit it's a bit confusing. I will double-check if we can do something about it.
If the issue persists, please do not hesitate to reach out by email at spark@civicrm.org.


CKEditor in WP 4.72 and CiviCRM 4.7.16 strips inline CSS for CiviMAIL The editor strips the inline CSS when composing the emails but seems to re-append when sent. My Comms users are freaking out that they can't check their work before it goes out.

I recently held off upgrading 4.7.13 because I get crazy bugs every time I update. This happened after I did what I hate doing :)

It appears to be by design.

The stripping of head tags has killed my designed templates and I have had to roll back to 4.7.13 until a solution can be found.

I get a little frustrated with undocumented features creeping into minor updates.


Custom PHP not being picked up I've been pulling my hair out trying to get this working. There is a file in core that throws up errors using the SagePay extension from Circle. I can edit the core .php file and fix the problem. Obviously each time I update it is overwritten. So I have created the same directory structure under civicrm_custom_php and added the edited file. Directory paths are correct, but the file in custom isn't being picked up. Any hints or tips really appreciated on getting this working. I am running CiviCRM 5.6.0 on Drupal 7.

Thanks

The SagePay extension from Circle is outdated and is not supported for 5.x version. Mattwire has integrated sagepay payment processor in Eileen's CiviCRM OmniPay Multiprocessor extension. The simplest, easy and recommended solution would be to install the omnipay extension from Matt's git repository(sagepay branch). Move old payment processor from all Contribution and event pages to new sagepay payment processor either by running sql or updating manually.

HTH

Pradeep


How to add Scheduled Reminder CC and BCC email? I'm using CiviCRM 4.6.11. In my Scheduled Reminders, I have a reminder which will send email to members, reminding them their membership will expire in 3 days.

Is there any way I can add a CC and BCC of the email to send it to selected email address?

This doesn't currently seem to be a feature available in CiviCRM, however, when setting up the schedule reminder, there is an option to "Record activity for automated email or SMS" - if this is toggled, then you can set up an activities dashlet on your dashboard filtered on the given activity such that every time you login to the back office you will see if any reminders have been sent - this option might even be preferable to receiving an an email and will definitely keep your inbox more manageable).

Hope this helps!
Tamar


How to go to Batch Update via Profile in one click? I have a weekly procedure where I need to batch update Pending Contributions. It requires several manual steps to finally get to Batch Update via profile form:

Go to Find Contributions
Check Pending / Click Search
Check all Contributions radio, in the resultset page
Select action "Batch Update..." from dropdown
Select profile to use

I know it's not that bad, but I was trying to find a way to add a Menu item, where clicking it opens Batch Update via Profile form, with the profile I want, for all Pending Contributions.

Still think a good/easy way to implement this, any ideas?

Luciano,  Unfortunately this can not be added as a menu item because you are working with a search result.

You could create a custom process that can be added to a menu.  Something like...create a custom contribution search (that filters by pending) with a hook that displays a profile that you can use to update.

If you need a consultant to do this for you, it is probably not worth it. Sorry....


Code example of how to pro-rate Fixed Calendar Year Membership in CiviCRM To avoid having members pay full price for a fixed Membership Type Plan? We are using the rollover but need something that kicks in before the complete rollover takes affect.

I ended up using the buildAmount hook - (in a custom extension) - very similar to how CiviDiscount works! July 01 is the roll over day. After that we don't need to discount anymore. This is my first pass at it:

function membershippro_civicrm_buildAmount($pageType, &$form, &$amounts) {

  //retrieve price set field associated with this priceset
  $priceSetInfo = CRM_CiviDiscount_Utils::getPriceSetsInfo($psid);
  $originalAmounts = $amounts;

  $discountApplied = FALSE;
    foreach ($amounts as $fee_id => &$fee) {
    if (!is_array($fee['options'])) {
      continue;
    }

  foreach ($fee['options'] as $option_id => &$option) {
    $originalLabel = $originalAmounts[$fee_id]['options'][$option_id]['label'];
    $originalAmount = CRM_Utils_Rule::cleanMoney($originalAmounts[$fee_id]['options'][$option_id]['amount']);

    $now = time(); // or your date as well
    $to_date = strtotime("2017-07-01");
    $datediff = $to_date - $now;

    $num_days = floor($datediff / (60 * 60 * 24));

    if ($num_days >= 1) {
      $discountAmount = $originalAmounts[$fee_id]['options'][$option_id]['amount'] * $num_days / 365;
    }

    $amount = $originalAmount - $discountAmount;

    $option['amount'] = $amount;
    $option['discount_applied'] = $discountAmount;

    $recalculateTaxAmount = array();
    if (array_key_exists('tax_amount', $originalAmounts[$fee_id]['options'][$option_id]) &&
      array_key_exists('tax_rate', $originalAmounts[$fee_id]['options'][$option_id])
    ) {
      $recalculateTaxAmount = CRM_Contribute_BAO_Contribution_Utils::calculateTaxAmount($amount, $originalAmounts[$fee_id]['options'][$option_id]['tax_rate']);
        if (!empty($recalculateTaxAmount)) {
          $option['tax_amount'] = round($recalculateTaxAmount['tax_amount'], 2);
        }
      }

        $discountApplied = TRUE;

      }
    }
}


Using civi for big data sets (1 million plus) I love civi! But mainly i use it for small datasets of sub 10,000

I have the opportunity to suggest its use in an organisation with a voter pool of 1 million+ I know this is an open ended question but does anyone out there have experience of using civi with large datasets. Is there anything BAD I shoudl know!Hopefully I won't get told off for asking the question!

Any thoughts welcome

Thanks

I've never used Civi with a dataset that large, but there are some general scaling principles that apply to Civi as with any other system.

The most important one I learned is that work = size * complexity. Okay, that might be a bit of an exaggeration, and in some ways, size doesn't matter very much at all (e.g. you can simply scale your servers to some extent to handle the extra records), but in any real project, there will be exceptions and workarounds and custom bits, and those little bits will be magnified, sometimes exponentially, with the size of your dataset.

For example - suppose you're importing some data that isn't perfect. On a small contact dataset, you might load it into excel and do a search and replace so that USA is replaced by United States. And after doing an import you might have to clean up a few extra records. But that kind of process isn't feasible if you multiply your dataset by 1000.

In other words, scaling is not simply linear. There are some aspects that will scale almost magically, and overall Civi is well-designed to scale and there are certainly Civi installs out there with that kind of size. But with any specific install, especially one that has some kind of migration that includes custom data and idiosyncratic requirements, you're going to get various kinds of unexpected points in your scaling that will require new things to learn, new processes, and quite likely, custom code.


Do not send scheduled reminder if at least 1 membership is active we recently encountered an issue after migrating to CiviCRM.

In the original system, membership renewals were considered discrete, separate memberships rather than a contiguous one.

When we imported the membership history from the original CRM to CiviCRM, the membership history imported fine, and the old memberships were marked as "Expired". However, due to a scheduled reminder rule ("Send membership renewal notice 7 days after expiry"), we're finding that people who have already renewed a membership and have an active one will still get a reminder notice because one of their expired memberships meets that criteria.

Does anyone have a code snippet to adjust the schedule reminder for memberships to only send a reminder if there are zero ACTIVE memberships on record?

yes this can be problematic. You may also find that having other 'expired' memberships will trip you up when doing other searches etc. Therefore in a similar situation we have opted to find all the historic expired memberships and set them to a new Membership Status of 'previous expired'. that helped reduce confusion and would resolve your Scheduled Reminder issue to.


YTD growth as a dashlet I want to display a dashlet showing growth percentage YTD this year, comparing with the same period last year.

I used the extension Advanced Fundraising reports to achieve this, but that extension gave me performance issues related to other site-specific features.

Now I am looking into Drupal Views, in the combination with this extension Drupal Views as CiviCRM dashlets.

However, I am struggling with how to use Drupal Views to calculate percentage growth of YTD CiviCRM contributions amount.

How to show the difference between YTD total contribution amount, and the same period last year as percentage, in a CiviCRM Dashlet?

If you turn on dashboard caching with a long duration it might mitigate the performance issues enough for you to use the Advanced Fundraising reports?


Override CiviCRM contact import timeout using PHP-fpm and Nginx I'm attempting to override the fpm time out from nginx just for the import. We are importing very large files, and it might take up to a couple hours to complete, so I need to set:

fastcgi_send_timeout 0;
fastcgi_read_timeout 0;

I'm having difficulties understanding what exactly happens during the import in which location I should add this override to.

There seems to be a lot happening during the import, ajax, POST requests etc, and I have tried adding this override to just certain paths, all of which didn't fix the problem.

Our installation is at /vendor/civicrm/civicrm-core, and adding the following location block didn't work.

location ^~ /vendor/civicrm/civicrm-core/CRM/Contact/Import {
        try_files $uri /index.php?$query_string;
        location ~ \.php$ {
            include snippets/fastcgi-common.conf;
            fastcgi_send_timeout 0;
            fastcgi_read_timeout 0;
            fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        }
}

I have tried /civicrm/import/contact, but it still times out with:

upstream timed out (110: Connection timed out) while reading response header from upstream, client: ::ffff:REDACTED, server: REDACTED.com, request: "POST /civicrm/import/contact HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock", host: "REDACTED.com", referrer: "https://REDACTED.com/civicrm/import/contact"

Trying to use an invalid fastcgi socket seems to imply it's not being matched since it doesn't error out:

location ^~ /civicrm/import/contact {
    ## Standard site protection
    try_files $uri /index.php?$query_string;
    location ~ \.php$ {
        include snippets/fastcgi-common.conf;
        fastcgi_send_timeout 0;
        fastcgi_read_timeout 0;
        fastcgi_pass unix:/tmp/for_sure_will_500_and_doesnt_exist.sock;
    }
}

location ~ \.php$ {
    include snippets/fastcgi-common.conf;
    fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}

The debug log also shows its matching ~ \.php$, why would it not match the import path first?

The import do generate a lot of requests indeed, the one you should care about is the POST one (that does the import). The others are mostly cosmetic to update the counter of how many contacts have been processed so far.

What matters for your rewrite isn't where the code is, but what's the url of that post. It depends of your install (check your log or the console on your browser), but it's likely not including the full path (vendor/civicrm/civicrm-core), eg something like:

location ^~ /civicrm/import/contact { ...

one trick I use to see if the location nginx rule is the correct one is to put an invalid fastcgi_pass, 50x errors are easier to see than waiting and trying to guess if the timeout worked or not ;)

This being said, if you have a lot of contacts to import, it's probably safer/easier to write a php script that you run from the CLI and that uses civicrm api to create the contacts (you don't have to deal with timeout, you have more memory, easier to do exactly the tests you want and create the data you need the way you want it.... and that's way easier to re-run if something breaks because some input is invalid)

X+


Membership renewal start date doesn't update? This behaviour has been observed on a live CiviCRM 4.5.8 site as well as the current demo site which is 4.6.6

When renewing a membership offline, the start date doesn't update to reflect the current membership term. An example (using UK date formats)

Membership type term = 1 year
Membership Since Date = 01/07/2011
Membership Start Date =  01/07/2014
Membership End Date = 30/06/2015

So as of today, the member is in "Grace".

When you click "Renew" the membership start date doesn't update to reflect the new membership term, only the end date does. So the new dates are

Membership type term = 1 year
Membership Since Date = 01/07/2011
Membership Start Date =  01/07/2014
Membership End Date = 30/06/2016

which would suggest this person has 2 year membership and doesn't reflect that they renewed this year, making membership dashboard data incorrect.

Is this expected behaviour or a possible bug?

Heather O.

If you check on yoursite/civicrm/admin/member/membershipStatus?reset=1 and for the status "Grace" there is a Yes in the column headed "Member" then this is expected behaviour.

CiviCRM does not have a "renewal start date".  The "start date" is the date the latest continuous period of membership started on. For any member with a status that has a "Yes" in that "Member" column a renewal will extend the end date of the current membership and not change the start date.

If you want anybody who renews after their membership end date to get a new start date then you either need to edit the Grace status and untick the box Current Membership?, or disable the Grace status entirely if it is not needed for your business rules and just have a membership status of Current followed by the membership status Ended.

You can read more about Membership status rules  in the Defining memberships chapter of our User and Admin Guide


Outbound mail config in civicrm.settings.php? Is it possible to store the outbound mail settings in civicrm.settings.php?
SMTP server IP address, port, user...

In civicrm.settings.php

global $civicrm_setting;
$civicrm_setting['Mailing Preferences']['mailing_backend'] = [
 'outBound_option' => 0,
 'smtpServer' => 'localhost',
 'smtpPort' => 1025,
 'smtpAuth' => false
];


Can financial accounts be imported? I have close to 100 financial accounts from Quickbooks that I need to get in CiviCRM. I'd like to avoid entering these by hand. Is there any way I could import these?

There are likely more tables involved that just that table so I would not go directly into the database. There is an api for creating financial accounts so you could try using the csvimporter extension to import them. I believe it is available as a downloadable extension from your manage extensions page.

I would suggest just importing one and then looking to make sure it looks correct before doing more. Not that there are at least 3 entities involved - financial types, financial accounts & the one that links them.

Financial accounts have the cost code information and financial types are what the user selects. Each Financial type should have a number of related financial accounts for different purposes (income, expense etc) - so just look to make sure they look the same through the UI before you go for 100 imports


CiviMail Tracked Click Throughs not Redirecting I am using CiviCRM with Drupal 7 (latest version). After upgrading to CiviCRM 4.7, the Track Click Through links in my mailings have stopped redirecting. They just go to the custom CiviCRM URL's, but don't redirect, leaving simply a white page. Everything worked fine before the upgrade.

As instructed in this post, I have added this code to the .htaccess file in the appropriate block area:

php_value date.timezone "America/New_York"

I also tried using the ini_set command for civicm.setting.php mentioned in the same post.

Help please!

This is a known bug in CiviCRM 4.7.1, and it's been fixed in 4.7.2 - which hasn't been released as of this writing.  However, if you're comfortable applying the patch, the fix has been released.  See https://issues.civicrm.org/jira/browse/CRM-17953 for details.


Can't edit mosaico templates any more Recently we migrated our site from Drupal to Wordpress, everything seems to be working fine however we can't edit mosaico templates we had created while we were on Drupal. Have bunch of JS errors on browser console, seems its trying to load template from oldsite.
Checked the Resource URL, Directories settings everything seems to be correct. Also cleared CiviCRM cache and delete template_c with no success.
Any pointers would be appricated
Thank you

Mosaico extension stores path in civicrm_mosaico_template and civicrm_mosaico_msg_template table. When mosaico extension code is moved you will need to update path in these tables to new path.
You can run below query to update the path from sites/default/files/civicrm/ext/ to wp-content/civicrm_extensions/
UPDATE civicrm_mosaico_template
SET metadata = REPLACE(metadata, 'sites/default/files/civicrm/ext/', 'wp-content/civicrm_extensions/‘);

UPDATE civicrm_mosaico_msg_template
SET metadata = REPLACE(metadata, 'sites/default/files/civicrm/ext/', 'wp-content/civicrm_extensions/‘);

HTH
Pradeep


User info overwritten by new member I created a contribution page to allow new members to sign up. Then I just signed up with the email of an existing member but other info (like a different name, address). As a result: the info of the existing member gets overwritten (name, address) in civicrm.
I found out that the profile-setting for duplicate contacts is being ignored for online contribution pages (I don't really understand why ...), but even creating a new Duplicate Contact rule with type Unsupervised (specifying lastname,firstname and email) results in the same behavior.
So: is there any way of blocking new members from changing the info for already existing members via a regular contribution-membership page?

The issue was with your dedupe rules as you had not entered weights. You can't leave the weights empty.

Try reading civicrm.org/blog/spidersilk/understanding-civicrm-dedupe-rules or https://docs.civicrm.org/user/en/stable/common-workflows/deduping-and-merging/.

I think the former makes it a bit clearer about weight. But basically you need to have a weight, eg email 2 first 10 last 10; threshold 22, so that it means it must score a match on the email AND the first AND the last

reason for a lower 'score' on the email is that if a contact has 4 emails all of which are the same, then each 'counts' hence if you set email as 10, and first as 10 and last as 10, threshold 30, then the email by itself would score a 40 and hence 'match' even if first and last did not match! hope that helps


When creating or editing a CiviRule, not all custom fields are available in Condition Parameters Civi 4.6.9
Drupal 7.44
CiviRule 1.2

I am trying to build a CiviRule that creates a scheduled activity based on a custom field used for activities.

All looks to be good until I get to the CiviRules Edit Condition parameters form.
I select Activity for entity. When I go to fields, I see most custom fields that were created but the list is not complete. It appears to get cut off.

The fields are listed in the order they were created. In our case, the list cuts off between custom field sets 92 and 93 and displays 154 fields.

Of course I need the ones further down!

Any guidance?

You probably need to file an issue on the Github page, and hope for technical guidance on how to solve it there.

However, I could think of a hack...

You could take one custom field before 92 that you are not using (or not using for CiviRules), and swap the id directly in the SQL-database. In that way you will probably see your custom field in the list.


Cannot create CiviCRM view in Drupal "Error: Base table or view not found: 1146 Table drupal.civicrm Drupal 7.41
CiviCRM: 4.6.9

Hi, new to CiviCRM and Drupal. Maybe I'm overlooking something but no matter what I try I cannot create a View from Drupal of any Civi data structure. For example, to show whether a logged in user is registered for a CiviEvent, I want to create a view of Civi_Participant but get the error:

Base table or view not found: 1146 Table 'drupal.civicrm_participant' doesn't exist

Check setting.php file (a snippet of which is below). Looks fine. Prefix is set to nothing but that shouldn't be a problem since default is properly set:

$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'drupal',
      'username' => 'dpal',
      'password' => '*********',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

/** CiviCRM Views Integration
$databases['default']['default']['prefix']= array(
  'default' => '',
  'civicrm_acl'                              => 'civicrm.',
  'civicrm_acl_cache'                        => 'civicrm.',
  'civicrm_acl_contact_cache'                => 'civicrm.',
  'civicrm_acl_entity_role'                  => 'civicrm.',

Forgot to grant the drupal user SELECT access to the civicrm database? Don't think so. From mysql command line:

mysql> SHOW GRANTS for dpal@localhost;
Grants for dpal@localhost                                                                 |
| GRANT ALL PRIVILEGES ON . TO 'dpal'@'localhost' IDENTIFIED BY PASSWORD
| GRANT SELECT ON civicrm.* TO 'dpal'@'localhost'

I tried another example where I tried to select civicrm_contact and selected the 'Show SQL' option for my view. I get:

SELECT civicrm_contact.id AS id
FROM
{civicrm_contact} civicrm_contact
LIMIT 10 OFFSET 0

I'm no SQL pro by any means but how does that query address the database civicrm? Where's the reference to the database? This is why I get the error:

Table 'drupal.civicrm_contact' doesn't exist

Views is defaulting to the Drupal database, not the civicrm database even when selecting Show CiviCRM Contact, or CiviCRM Participants or CiviCRM PrettyMuchAnythingElse. How do I fix that?

I tried a query from mysql directly and this works:

SELECT civicrm_contact.id AS id FROM civicrm.civicrm_contact;

How do I get drupal to do that? What are those kooky curly brackets. {civicrm_contact} .... Is that wrong?

Just in case you are wondering, yes, I am being driven crazy by this problem

This is because you don't have civicrm_participant as a key in the array defined under CiviCRM Views Integration section. To make sure copy all the tables listed in UF Integration page to settings.php file.

Navigate to Administer -> System Settings -> CMS Database Integration
Copy and paste the $databases['default']['default']['prefix'] array in settings.php file.
Save and clear the cache of your site.

More Information at : http://wiki.civicrm.org/confluence/display/CRMDOC/Views3+Integration


CiviCRM reports Cron not running, but my web host is adamant that it is I'm using the cli.php method to run cron as described in the System Administrator Guide.

I am able to run this command from ssh, and it seems to execute fine:

php /var/sites/c/<mydomain>/public_html/sites/all/modules/civicrm/bin/cli.php -s <mydomain> -u <mydrupalusername> -p <mydrupalpassword> -e Job -a execute

Immediately after running that CiviCRM's System Status page will be updated with the time it ran.

However, when I use my host's control panel to run that every 15 minutes, nothing seems to happen, and the CiviCRM status page eventually returns to saying 'Cron not running'.

The advanced view of my host's control panel, which supposedly lets me edit the raw crontab, shows the following line:

*/15 * * * * php /var/sites/c/<mydomain>/public_html/sites/all/modules/civicrm/bin/cli.php -s <mydomain> -u <mydrupalusername> -p <mydrupalpassword> -e Job -a execute

But nothing is happening at the 15 minute intervals. CiviCRM's status page doesn't update. I have the CiviCRM Update Check set to always run as well, and that doesn't update on the scheduled jobs settings page either.

I've spoken to my host's support, and they insist that it is running the command every 15 minutes, and that it should be doing it with the same rights and in the same location as it does when I run it manually via ssh.

The host's logs that I can see via the control panel update every 15 minutes with this line:

Jul 17 12:45:24 cron2-lxc crond[107640]: (<myhostingusername>) CMD (php /var/sites/c/<mydomain>/public_html/sites/all/modules/civicrm/bin/cli.php -s <mydomain> -u <mydrupalusername> -p <mydrupalpassword> -e Job -a execute)

What's going wrong?

I think you probably will need to provide full path of php to execute php files.

You can try the option from https://stackoverflow.com/questions/19916949/running-php-from-cron-did-not-run-as-cli/19917512#19917512

HTH

Pradeep


Upgrading from 4.6.4 to 4.6.6 returns following error, how to go pass it? Although I have followed all the steps listed in the upgrade tutorial, this is the message comes up in the beginning of the upgrading process. I have tried on my demo & production site, both have same error. how to fix this please?

See Failed Upgrade 4.6.4 to 4.6.5 Joomla 2.5 & 3.4. Let us know whether the procedure described there solves the problem.


How to change Greetings in CiviCRM? This was already a topic and I was able to fix it using Smarty and the help of the community but Smarty doesn't work with Mosaico and Greetings are showing pretty poorly in CiviCRM (dear e.g cher doesn't fit the feminine).
Is there a way to set the Greetings because it's not just a French situation as German also has grammatical gender. Is this a PR?

In the post you linked you said you would use a code like this:

{capture assign=gender}{contact.gender}{/capture}
{if $gender eq 'Homme'} Cher {contact.first_name},
{elseif $gender eq 'Femme'} Chère {contact.first_name},
{/if}

Instead of putting it directly in the template you could also add this smarty logic to the email greeting (/civicrm/admin/options/email_greeting?reset=1). CiviCRM would then generate the correct greeting for each contact and it also works with Mosaico etc.. For many of our German customers we use this logic to cover some more exceptions:

{if "{contact.communication_style}"=="familiär"}{if "{contact.individual_prefix}"=="Frau"}Liebe{ }{contact.first_name}{elseif "{contact.individual_prefix}"=="Herr"}Lieber{ }{contact.first_name}{else}Liebe(r) Unterstützer(in){/if}{else}{if "{contact.individual_prefix}"=="Frau"}Sehr geehrte Frau {contact.formal_title}{ }{contact.last_name}{elseif "{contact.individual_prefix}"=="Herr"}Sehr geehrter Herr{ }{contact.formal_title}{ }{contact.last_name}{else}Sehr geehrte Damen und Herren{/if}{/if}

There are two issues with this approach:
If you change the greeting logic it will not automatically update all contacts. You could use the scheduled job that does that: (/civicrm/admin/job?action=update&id=7&reset=1)
Also the maximum length for the smarty logic is limited so can't go too crazy. If you need more complex logic and/or more different greetings, please have a look a the extension "More Greetings" which we developed a while ago.


Primary address being set to the wrong address I am importing a number of custom contact types.

I am importing them with a "Main" address and "Postal Address" location which I created.

The default location is set to "Main".

However, when I import the Primary location is being set to an empty "Home" location which I do not want at all. How can I force it to make Main the primary location by default?

I think when you import if you choose "Primary" rather than "Main" from the drop-down options it will do both for you - set the address as location Main and set it as the primary. This is based on you saying you set Main as the default location. (I may not have entirely gotten your question as you mentioned another custom location but hopefully, this gives you something to start with.)


Can I show contact photos in a public membership list on a WordPress site? On a newly built WordPress site for a City livery company, I have created a membership list that members can opt to appear on. This is working perfectly, and the list is showing name, member type, role, email and phone number.

However, if I include the contact image (which works on individual profiles), it just shows as a url.

Is there a solution to this? I know the livery company members will be disappointed if they can't see member photos.

I am not sure if its a bug or indented to show url in profile search listing. I have just written a small extension that converts imageurl into image.

HTH

Pradeep


CiviContribute: show contributions without other contact details Been using CiviCRM with the CiviContribute extension for a good portion of this year. Would like to allow users to see their contributions from their own logins without actually having access to other details, like the notes tab specifically.

Any ideas?
Thanks!

This answer is applicable for WordPress. If you are using a different CMS you will have to state which you are looking for.

Create a Page titled "Dashboard"
Insert this shortcode [civicrm component="user-dashboard" hijack="0"] & whatever else you want the donors to see.
Add plugin WP Redirect After Login Plugin. It is in the WP Plugin Library. https://wordpress.org/plugins/redirect-after-login/ I just change the Subscriber Role (or whatever Role your Members are defaulted to) to go to the dashboard url you just made in step 1. If you do not do this, they will land on the WP-admin dashboard.
Add a donor login link where you need it (yousiteurl/wp-admin/ or yoursiteurl/login/)

ps. I also use a plugin ABD Dashboard Widget Manager https://wordpress.org/plugins/abd-dashboard-widget-manager/ This allows you to edit what the donors see when they are in the WP Dashboard. Add widgets that redirect them back to their donation history, give them information, etc.


My ACL Role is now showing selected contact groups I tried digging through other questions before I posed my own. So, I'm asking for a solution here.

What I want to do:
I want to give a group of contacts ability to 1. Create and edit events based on templates 2. See Event participants 3. See a select group of contacts that have custom fields, custom profiles and some with custom activities.

What I have done so far:
I have created a Role in Drupal and given a select number of Civi access including CiviEvents. I turned off See All Civi Contacts.

Then I created an ACL Role, Permission and ACL access
The ACL access includes most view activities related to contacts in the select group I want them to see. I also want them to see custom profiles and custom fields.

Problem
When I log into the website as an end user (member of the group) I can see the CiviCRM Menu, Add and Event, etc. But I am not able to see any contacts even though my ACL Role indicates I should be able to see this set of contacts and it is turned off in Drupal permission.

I also tried turning on the See All Contacts in Drupal and it showed me far more than I should be seeing with this user role.

I checked the ACL Roles against the Drupal ones and I am still running into problems. Any advice?

I am using Drupal 7 and the Civi 4.7.24.

Without jumping in and working through the whole scenario, have you considered adding all their Participants to a Smart Group and giving your users an ACL that accesses just that Group of contacts


Recurring contribution report by LineItem financial type I am looking for a report that lists recurring contributions by Line item financial type. I have tried the Find Contribution report, the Advanced Search, the contribution report Recurring Contributions... They all only query the Contribution table Financial Type. I need to query the Line Item financial type.

I think Extended report extension does provide Line item financial type filtering but not sure if they filter only recurring contribution. There are of Contribution reports with additional filter/fields available that are not present in core reports. You may need to add filter to show only recurring contribution using hook_civicrm_alterReportVar hook.

(Even Bookkeeping Transactions Report does filter financial type using line item FT.)

HTH

Pradeep


How can I set up an email discussion list based on CiviCRM groups? Is it possible to create civicrm integrated email discussion lists? For example I want the members of a civicrm group to be able to send an email to theirgroupname@ourcompany.org and have it sent to all members of the group. All members of the group should be able to respond to such messages. Email version of google groups, yahoo groups. I did some googling and saw some mentions of Drupal/Civicrm/Organic Groups/Mailman integration but can't tell what is the current best solution. A lot of the pages were very old.

we have deployed this in a couple of situations including making a UI that let's you set the Civi Group, or a Civi Relationship, as the basis for the Mailman group. There is still the issue about what happens when someone unsubs via Mailman, since the Civi synch just puts them back in ;-)

I don't think we were ever able to take it further than a build for that single client ie it didn't not get developed as an extension or even a releasable module. i should check what might be involved in making it able to be shared.


How to connect to REST API from remote host? I'm trying to connect to the rest api from a remote server, and the only response I ever get back is:

var jsondata = {"currencySymbol":"$","is_error":true};

I'm able to make api calls from the site's API Explorer (within the same domain).  But no matter what I do from my remote host, any calls to this site's rest.php always return that same generic response.

Is there something one must to do allow external access to the REST API?  Or does this response hint at some other request filtering taking place?

To get the rest API working, you need to call an url looking like that (this example to create a contact)

http://www.mysite.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=create&api_key=(myAPIkey)&key=(mySiteKey)&json={“contact_type":"Individual","first_name":"Tester","last_name":"Yolanda"}

The specific path to rest.php depends on what CMS you use

A few pointers:

you need to set the key with the site key (from civicrm.settings.php)
you need to create an api key on the contact that peforms the operation, and
this contact needs to a user that has the appropriate permission (start with an admin account to rule out the permission issue)

This being said, your error message is not normal, you should get a "Failed to authenticate key" error message

https://civicrm.org/sites/all/modules/civicrm/extern/rest.php

it might be that you don't use the proper url to reach the rest.php file, or that something needs to be configured on your webserver so it's properly processed

What is the url you try? it's a different one from the ajax api used by the api explorer

X+


Is it possible to insert a table in a fieldset? In a custom 'health form' field, I want to be able to fill in multiple pieces of information about medication; what it is, what it's taken for, how much, how often, when it's taken. Is it possible to have a table that allows each of these pieces of information to be gathered, relating to each medication? I.e. responding to each of the above questions about each medication taken.
Or is there a different way to achieve this?

Ideally we could export this information, but if that's not possible I'd still settle for being able to gather the information in a logical way!

Perhaps the answer is as simple as multiple records fieldset? I'm trying this at the moment, but I'm not sure how to enter multiple records - or perhaps how to set the fieldset so that entering multiple records is blatantly obvious.

Obviously I'm no IT person, but your help would be wonderful!

Thanks heaps,
Kate

See http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fcustom%2Fgroup%2Ffield&reset=1&new=1&gid=4&action=browse where you have an example of a bunch of fields for

medication
frequency
amount

is that what you need?


Transferring Data Out of CiviCRM Some time ago we transferred data from CiviCRM to a different CRM (YourMembership). However, it has become apparent that we have not collected all of the data.

We have the web version CiviCRM 4.6.21. I am trying to export ALL of the data, but I keep getting warnings and errors that there is not enough memory in one of the lines of code.

In addition to that, even when I segment the data and export it in chunks, some of the data in each individual records appears to exist only within the record, and not in some master spreadsheet (e.g. ticket sales).

Any help would be greatly appreciated.

Thank you.

Exporting 'all' data is not a simple process. You will need to eg

Find all Contacts: export including all Custom Fields using for Contacts
Find all Contribution: export including all Custom Fields using for Cont
Find all Events: export including all Custom Fields using for Cont


How to import custom fields i want to import my own table that contains custom fields and custom fields data.

is  there a wizard that will understand that the first line title  is the custom-fields and that that the data that follow the same row is the data , so i dot have to manually create custom fields?

can i create a csv file with custom fields ( no data just the custom fields) and import it to civi , instead of manualy create each and every one of those ?

Custom Fields are complex and can be used for a variety of things. Having a wizard that will automatically create custom fields from the first line of the import file is not a good idea, at least for most non-expert users.

In your original/unedited question you asked if someone could create the wizard. You are welcome to do that, or commission an extension (by Core-Team or a Partner/Contributor) if you think it will be used.


Upgrade from Drupal 7/ CiviCRM 4.6.38 to Drupal 9 / CiviCRM 5.37.2 Good morning ladies and gentlemen,
I would like to upgrade my old installation of CiviCRM on an old system (Drupal 7, CiviCRM 4.6.38 ) to an up to date system like Drupal 9 / CiviCRM 5.37.2. Are there any suggestions how to do that including migration of all data? CSV export?  Mysql-dump (which tables?). I am very open minded (Wordpress instead?) and experienced hacking the shit out of my system. Just looking for a best practice solution.
Thanks for your help,
Robert

If you have a very simple d7 front end with minimum common modules than it won't be difficult to upgrade from d7 >> d8 >> d9.
To Upgrade Civi i would do incremental upgrade i.e

4.6 > 4.7(latest)
4.7 > 5.8(latest)
5.8 > 5.22(latest)
5.22 > 5.37(latest)

Would upgrade Civi first than drupal.


How to link to a stored invoice pdf with civicrm api I can see that the invoices I have created are in the civicrm/custom map as invoiceID.pdf, but how can I link to them using Civicrm api?

Invoices can be send via email or can be downloaded. Both create an activity (of type "Emailed Invoice" or "Downloaded Invoice"). The invoice pdfs are attached to that activity.

When you first get the activity via the API and collect the Activity ID, you can get information about the attachment via the "Attachment-Get" API function, where "entity_table" then should be "civicrm_activity" and "entity_id" should be the activity id.

For example in php:

$result = civicrm_api3('Attachment', 'get', array(
  'sequential' => 1,
  'entity_table' => "civicrm_activity",
  'entity_id' => #activity_id#,
));


How to add Each Contact Membership fee using webform civicrm in drupal7 I have 2 contacts(Contact1 & contact2) in webform, I Want each contact get membership fee.(like In civicrm while creating new membership with Record payment Registration, it will create membership fee.)
Trail: for this problem i created contribution page of financial type is "membership fee" in civicrm. this page is selcted in webform contribution tab, after submitting form it showing membership fee added only in contact1 not added in contact2,3,4.., so i want to add membership fee in each contact.

The first problem I see in your screenshot is that you've set up Contact 1 as an organization. Really, contact 1 needs to represent the person who is filling out the webform and paying for the membership. An organization, generally, cannot operate a keyboard & mouse. Fix that and the rest ought to make more sense.


Custom Mailing Labels and "Merge labels for contacts with the same address" This is not a duplicate of Is it possible to change the Mailing label format?

While printing Mailing Labels, we've found that Addressee Tokens don't work as expected when "Merge labels for contacts with the same address" is ticked.

Mean, if one wants to get "Mr & Mrs Smith", {addressee} token should be used at civicrm/admin/setting/preferences/address?reset=1; we've tried to add "contact.formal_title", but it doesn't get merged properly, only first value is printed, so it looks like:

 "Mr Smith Title
Mr A & Mrs B Smith "

instead of

Mr Smith Title  A & Mrs Smith Title B Smith

There is a mergeSameAddress function at \civicrm\CRM\Core\BAO\Address.php which works with &$rows parameter, but there is no "formal_title" in a $row according to print_r:

  [contact_type] => Individual
            [display_name] => H S W
            [do_not_mail] => 0
            [first_name] => H S
            [last_name] => W
            [prefix_id] =>
            [is_deceased] => 0
            [addressee_id] => 1
            [addressee_display] => H S W
            [addressee_custom] =>
            [address_id] => 20144
            [street_address] => 111
            [supplemental_address_1] => 111
            [supplemental_address_2] =>
            [city] =>
            [postal_code_suffix] =>
            [postal_code] => 111
            [address_name] =>
            [county_id] =>
            [state_province_id] =>
            [country_id] => 1226
            [individual_prefix] =>
            [addressee] => H S W
            [county] =>
            [state_province_name] =>
            [state_province] =>
            [country] => 111

What would be a proper way to add formal_title as a part of a merged address value (assuming appending formal_title to a first name)? Currently, Prefix works as desired, but it exists in a $rows, so can be easily retrieved. Not sure why formal_title is not a part of this and it's not clear, where $rows data is came from.

UPDATE

Desired result has been achieved by modifying two core files:

civicrm/CRM/Core/BAO/Address.php

line 1059

  'formal_title' =>  $rows[$rowID]['formal_title'],

line 1095

replace

  $family = trim(implode(" & ", array_keys($first_names)) . " " . $last_name);

to

  $family = trim(implode(" & ", array_keys($first_names)));

civicrm/CRM/Contact/Form/Task/Label.php
line 167

  $returnProperties['formal_title'] = 1;

Just curious, how to make it according to best practices of CiviCRM development.

The answer is already here. According to a tiny mention at the bottom of http://wiki.civicrm.org/confluence/display/CRMDOC/Directories page, it is possible (and, more important, it works!) to copy modified core files to Custom PHP Path Directory (at civicrm/admin/setting/path?reset=1) , preserving original files/folders structure, so next time CiviCRM gets security updates, changes should be kept (unless original file / function major changes).