There isn't a way to do this in the user interface but you can write a small extension where you either:

Use https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/ and change the field definition so that it's required.
Use https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_validateForm/ and set an error if the field is blank.


Is there a reason CiviMail won't send a draft if no recipients are selected?

I would think this is just that the entire form is being validated. It would make sense that there is different validation for the preview than their is for sending.

-Steve


What does the membership automatic renewal interface look like?

After you've made the membership type as optional, you should set an additional setting on the contribution page, i.e,

visit Contributions -> Manage Contribution Pages
Go to the Membership tab of the required contribution page.
You will see an additional column of Auto-Renew on the Membership type field.

Select Give Option on the membership type that you want to enable this option for.
Save and Navigate to the live contribution link civicrm/contribute/transact?reset=1&id=<page_id>. This should display an option to renew the membership.


Your name sounds Dutch, what often happens to me is that if you open this file with Excel and save it again, it is saved with ; in stead of ,

Could that be the case?

It also is possible it is saved as an Excel file in stead of .csv


For performance, avoid remote SMTP entirely.

Using SMTP directly to hosted mail products will be tangibly slower while the SMTP transaction blocks the PHP request; having a "real" local MTA which then smarthosts to Office 365 allows CiviCRM to offload messages quicker (local process/filesystem versus remote network).

Stack Exchange prefers documenting the actual process to external links but in this case I'll do the latter since you have several options, and hey, I'm already not answering your actual request :)

Configure CiviCRM to use local mail delivery, AND
Configure Postfix to smarthost to office365 using SMTP auth for a single origin address, OR
Configure Postfix to smarthost to office365 using Office365 connectors for multiple origin addresses, OR
Do the same for your preferred local MTA.


there is also a link at civicrm/group?reset=1 where you can 'update smart group counts' which uses this path /civicrm/group?reset=1&update_smart_groups=1 so you could probably put a Menu item in with that destination if it is something that you need to do frequently.

There is also a setting at civicrm/admin/setting/search?reset=1 where you can reduce the "Smart group cache timeout" (The number of minutes to cache smart group contacts. We strongly recommend that this value be greater than zero, since a value of zero means no caching at all. If your contact data changes frequently, you should set this value to at least 5 minutes.)


Is it possible to move data from a contact type to a component/extension?

It's good to be thinking about where the data is stored, but don't let your thinking ahead get in the way of getting started somewhere.  It's not unusual for organizations using CiviCRM heavily to decide they need to remap data somehow, and the fact that the data is in CiviCRM somewhere already makes it one step easier.  The short answer is that you should put your data in the place that makes the most sense right now, and if you have to move it later, it'll take a little bit of work, but nothing overwhelming.

Since you're worried about just some potential future place to store data, I'll have to be a bit abstract, but the principle should hold.

There are two main tasks you'd face if you were to decide that your data in custom fields really belongs in different custom fields or an extension's ad-hoc tables.  The first is moving data, and the second is any transformation that may be necessary.

Using SQL queries, moving data to and from custom fields is relatively easy.  You'll end up doing something like

INSERT INTO civicrm_value_newtable
SELECT NULL as id, entity_id, oldfield AS newfield
FROM civicrm_value_oldtable

to move the data from one custom field to another.  Of course, you could also export to CSV and then import from CSV, mapping the old field's column to the new field.  Since you have the contact ID, you know who a value belongs to.

The more challenging aspect is if you need to transform the data.  Maybe you have three categories, and the new system takes four.  Maybe you have two fields where the new system has one, or vice-versa.

Not knowing what situation you might encounter, the only thing you can do is to pick the most useful and accurate ways to store your data now.  The better your data now reflects reality, the more reliably you can transform it into something else.

When it does come time to transform, you can do SQL functions; and export, alter within CSV, and import; or a series of SQL insert queries, such as

INSERT INTO civicrm_value_newtable
SELECT NULL AS id, entity_id, "option1" AS newfield
FROM civicrm_value_oldtable
WHERE oldfield = "A";

INSERT INTO civicrm_value_newtable
SELECT NULL AS id, entity_id, "option2" AS newfield
FROM civicrm_value_oldtable
WHERE oldfield = "B"
  OR oldfield = "C";

and so on for each new possible value.

In sum, don't let the perfect be the enemy of the good, and don't work so hard to prepare for vague possibilities that it's not functional now.  "If it's a life of possibilities that you wanna live...."


simple way to import membership and contributions together

You cannot do this in one import. You have to update one table per import.

You will likely need the API csv Import extension.

First step will be to create your csv files.
1. If they do not have it already, give each member a unique id number.
2. If your contact info and contribution are all on the same report, divide those into two csv files. You will need to assign the unique contact id # to each contribution.

After you have your csv files ready, you can import the contact files and then the contribution files. I recommend that your first import only have 2-3 contacts and then another with 2-3 related contributions. This way you can test it without making a mess of all 300 contacts.

You may need the API csv Import extension to import the Contributions. It depends on your setup and which fields you are importing.

https://wiki.civicrm.org/confluence/display/CRM/Import+Contacts+from+Other+Sources

https://wiki.civicrm.org/confluence/display/CRMDOC/Import+Contributions


first CiviCRM request of each session takes 4 minutes, afterwards works fine

I had a lot of trouble tracking down a problem that sounds the same. We ARE behind a firewall so pingbacks to CiviCRM etc WILL timeout. The last piece of the puzzle (once normal version checks were disabled) was adding this to civicrm.settings.php

global $civicrm_setting;
  $civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = FALSE;


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.


Translating salutations like "Mr." to Dutch

1st problem solved by typing 1957 contacts, pffff...
2nd connection problem solved by disabling geocoding


Access Denied when making Contributions with Auto renewal and discount

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


Where did the standard HTML window go on mailings with mosiaco installed?

If you want to open the traditional UI for mailings, you can find this under Mailings -> New Mailing(Traditional) nagivation menu.

If you don't see that menu item, try updating mosaico ext to latest OR simply visit -

http://site-name/civicrm/a/#/mailing/new/traditional


how to prevent people enrolling for an event twice

Check if 'Same email address?' checkbox is ticked in Manage Event >> Configure Event >> Online Registration.

If this checkbox is enabled, CiviCRM will allow a user to register multiple times using the same email address.

Untick 'Same email address?' checkbox to prevent people from registering for the same event more than once.


A drupal webform cannot create an event (it can register a person for an existing event tho... is that what you meant?). It can create an activity, which, even if you don't use it as part of your approval workflow, might be useful just to record the fact that the person submitted a proposal.

It's hard to say what you "should" do because you haven't described exactly what your end goal is. Is a workshop ultimately going to be a CiviCRM event, with participants registering, etc? Or something else? I'm not sure that you necessarily need to be creating anything in Civi for your purpose. Maybe all you need is the webform submission. Or activities might work well for you if you create a few extra activity statuses like "Proposed" "Approved" and "Rejected". Or if you wanted to get really detailed in your record keeping, you could have the webform open a case, which would let you record all your back-and-forth (as activities) and the details of exactly when and why the session was approved or rejected.

Seems like the bottom line is that you'll end up creating the actual sessions by hand (as Civi events or whatever else) so that's not really part of the equation here, so you should just do whatever works well for you to record the proposals and manage the acceptances.


Moved Wordpress and CivCRM to new server recently

Looks like you've a couple of hangovers! These are usually in the CiviCRM Administer > System Settings > Resource URLs, and Administer > System Settings > Directories pages. Update those, clear cache, and you should be good to go!


How to delete/reorder a Contact from a Webform

Sorry, the module does not have any mechanism for reordering contacts. The only solution is to reconfigure the contacts manually. Since you are wanting to add a new contact #1 and get rid of contact #2, you don't have to mess with #3 or #4 - they can stay put. Just configure #2 to have all the properties of #1, and then change #1 to be like the new contact you are wanting to add.


The short answer is "no". Location types are handled in a very simple/dumb way by webform integration. When it looks up a contact it simply pulls all addresses (primary first, otherwise in no particular order) and populates address fields with them in order, and with no respect to location type settings for those fields (so the suggestion of pulling a default from $_GET wouldn't help you I'm afraid).

There is an open issue for improving this if you'd like to contribute.


How can I preserve changes to civicrm.css when civicrm is updated?

If you use a custom CSS style sheet, you avoid the scenario you mention of losing modifications to your CSS upon upgrade.  From the top menu, go to Administer > System Settings > Resource URLS and use the Custom CSS URL field.  Its help text reads:

  You can modify the look and feel of CiviCRM by adding your own
  stylesheet. For small to medium sized modifications, use your css file
  to override some of the styles in civicrm.css. Or if you need to make
  drastic changes, you can choose to disable civicrm.css completely.

You can put the file anywhere you'd like (so you would put it outside of the file structure that will get replaced when you upgrade CiviCRM; just specify its location in the field). That custom CSS file gets loaded after civicrm.css so as long as you've selected the proper components with your IDs, classes, etc. your custom CSS will take precedence over Civi's.


Action "send mail" not available for new contact


In CivilMail for 4.6.2 how do I prevent duplicate emails?

This was a bug related to smart groups and premature mailings, which is now fixed in version 4.6.3.

See https://issues.civicrm.org/jira/browse/CRM-16251


Want to auto populate city and state from an entered U.S. zip code, WordPress

I only now stumbled on this question, so will copy-paste my response from the forum:

I am the developer of civicrm-region-lookup. I use it on CiviCRM 4.6, and it would require a small fix for CiviCRM 4.7, but it should work otherwise.

Although it is probably not the most user-friendly solution. It was meant to be flexible and vendor-neutral (i.e. not rely on specific paid sites for the data, make it possible to manage your own mappings).

For the US, you would need to import a list of postcodes via phpmyadmin, then configure the correct mapping in the admin settings (i.e. to set the field names so that the postcode field sets the city, but you might need an additional custom Javascript hook to set the state as well, which is not ideal, but not very complicated either).

There may be simpler solutions out there, especially for the US. If you decide to use this extension, I will be happy to provide some support on this forum if you run into issues.

Reference: https://forum.civicrm.org/index.php?topic=37098.0

See also the comments from petednz on the forum.


You are using quite older version of CiviCRM, I would recommend you to upgrade CiviCRM to 4.7.31 or 5.2.1 rather fixing core code to handle php7. The newer version does support php7. And also since 4.7.7 there has been many security releases(since you had malicious attack) and includes many fixes.

HTH

Pradeep


How to distinguish "Contacts with the same name" when assigning an activity?

You could upgrade your CiviCRM version (4.4) to the latest version (4.6+), which will display contact emails along with their names in the autocomplete, making it easier to distinguish between similar contacts.


That's more a CMS question - for Wordpress check this: http://www.wpbeginner.com/plugins/how-to-show-users-last-login-date-in-wordpress/

Users log in using the CMS that is attached to CiviCRM: Drupal, Wordpress, Joomla, Backdrop (not CiviCRM itself).


Rounding differences between Contribution and Bookkeeping reports

This looks like an error. The bookkeeping report is based on records in two different tables than the contribution report. From this report it seems the algorithm for ensuring the series sums to the proper figure used by contributions by having one value different is not properly setting the financial line item values. IIRC there have been some recent changes in this area. Please open an issue at https://lab.civicrm.org/dev/financial/issues and assign it to me.


Using API csv Import GU"I extension for Pledges

If I'm understanding you correctly, you are importing pledges and the contributions relative to each pledge in the same import.  You have to import pledges and their connected contributions separately.  You must also add a couple of columns in order to have things connect correctly.

See https://civicrm.stackexchange.com/a/6380/105


Job scheduler not working after Joomla update

Yes, if after updating to the latest version of Joomla! and clearing all the cache it still is an issue, please post on https://issues.civicrm.org


Where in the database is the note field for contributions?

civicrm_note

entity_table = 'civicrm_contribution'

entity_id = contributionID


Creating extension with civix: How to use CRM dir?

Overriding core files was how we used to make changes until collectively we figured out that was storing up trouble for the future.
Another possibility is that if you think this is likely to be a small, useful improvement for most users of this aspect of CiviCRM then you could propose it as a change for core - go here and use the 'improvement' template.  If that is agreed then submit your changes as a PR.


What's the best way to import memberships and their associated contributions?

This is doable using the API, and I've accomplished it using Pentaho Kettle.  It has a CiviCRM Input and CiviCRM Output step, which use the REST API.  You're right to be concerned about the SQL-based approach, since there's been discussion of deprecating that table in favor of a line item-based approach to connecting contributions and memberships.

If you use Kettle, you can see my example code here: https://github.com/PalanteJon/aceware_civicrm_kettle/

If you decide to go with the CSV CLI tool, you'll run into trouble, because your output won't contain the ID of the created memberships and payments to create the MembershipPayment record.  So you can either a) use API chaining, or b) do what I did in Kettle, parse the JSON that the API outputs and use that to create your MembershipPayment record.


Unable to update participants using civicrm api?

Since you are passing $entity_id to id in participant params without checking it to be not empty. If $entity_id is empty then new participant will be created else it will be updated. Make sure your id is set before calling to participant api if you want to update the participant

Cheers

Pradeep


It's assumed that once an event is complete, you're not so interested in it. I also find it a slightly annoying interface, but I get used to doing that search.

On the other hand, for organizations that are hosting lots of events, it's a sensible default.


The issue seemed to have been caused by an automatically created .htaccess file in the Resource Image folder. This is being automatically generated but I don't know by what. The contents of the automatically generated file was

  Order allow,deny
  Deny from all

This prevented the image file from being access. As a quick fix I renamed the file and a new file was there again in less than a minute. I edited the file to allow access and that resolved the issue.
Though I don't understand where the htaccess file is created from, this can be marked as resolved. Thanks


How can I set the order of membership organisations in dropdown?

While Membership Types can be ordered at civicrm/admin/member/membershipType it seems like the Organizations are sorted alphabetically here (CRM-6099).

You could rename the organisations to rearrange their alphabetical ordering. This is probably not realistic :)
You could create a CiviCRM extension which implements hook_civicrm_buildForm() and rearranges the options in the Organizations list.
A patch to core could make the form respect the order defined at civicrm/admin/member/membershipType for the related Organizations also.


DNS changes can take up to 48 hours to propagate, and the time can vary widely for each computer trying accessing your site due to the many stages of caching involved. Your payment processor might not have received the new DNS records yet, so wait a day or two. Most/all will retry each payment notification for a number of days/weeks, so you will not lose any information if the card was actually charged.


Managing a smart mailing groups (un)subscriptions

On the manage group screen (civicrm/group?reset=1) click on contacts next to the group in question. There you should be able to search for added pending and removed contacts for this particular group.


Yes. CiviCRM can manage

fundraising
volunteer management
phone banking
door knocking
Get Out The Vote
event management (think fundraising events, or getting folk for a door-knocking bash).

As per my comment above though, what really matters is what you need to achieve your political goals.


PayPal IPN Notification Inconsistently Received

As an update to this thread, the issue was identified as a bug in the PayPal integration (https://lab.civicrm.org/dev/core/-/issues/1931) and was resolved in an update pushed by CiviCRM Admin Utilities 0.8 released on 20 November 2020. Payments have been closing perfectly for us since applying the patch.


nativecode=1260 ** Row 60 was cut by GROUP_CONCAT()

As an ad-hoc solution, I put

CRM_Core_DAO::executeQuery('SET SESSION group_concat_max_len=15000');

In the report code, before line 546, and that fixed it.


Error when creating new contact: "Fatal error: Uncaught CRM_Core_Exception"

I wasn't able to recreate the error on the demo site: http://joomla.demo.civicrm.org/

But the problem you are running into sounds the same as this issue: https://issues.civicrm.org/jira/browse/CRM-16287

Perhaps there is some information there that will help?


How can I display message after form submission

In the advanced settings of a profile, there is a Redirect URL field. Copying from the CiviCRM user guide:

"This applies only to Profiles that are being used as standalone forms; it will not apply when the Profile is embedded in an event sign-up or contribution form. The Redirect URL field allows you to send people to a specific web page after they submit their form. For example, you may want to create a web page that thanks people for submitting their information. If this field is left blank, people will be directed to a page which displays the information they've just entered."

At the top of the default redirect page, a generic statement of "Thank you. Your information has been saved." will be displayed, but this is not a pop-up. If you want to change this wording, you could use Administer > Customize Data and Screens > Word Replacements, but keep in mind that this replacement will be applied globally - i.e. you should not use this option if you want the wording to be different for each profile submitted.

Hope this helps!


The CiviCRM public extensions directory at https://civicrm.org/extdir/ver=5.4.1|cms=WordPress could not be contacted

The dashboard issue is a known issue in CiviCRM 5.4. The latest version of CiviCRM solves this.  I'm not sure if that would also affect the extensions directory though.  Please comment on this answer if it does though!


While these commands are split into multiple lines for readability, that curl statement is a single command.  You can paste that straight into your command line; depending on your shell, you might need to remove line breaks so it's all on a single line.


Civirules can't add activity parameter "CiviCRM_API3_Exception: "Expected one OptionValue but found 2

I have recently (with the latest CiviRules version) succesfully used this rule in combination with the same condition. My first step would be to check your activity types and make sure there is not a double one in there (with the same name rather than label)


This configuration is at CMS level but not in CiviCRM. You can update the logo through theme config.

For Drupal

1. Navigate to Appearance >> Settings and under Logo image setting upload the new image and save.
2. Clear Drupal cache( and sometimes browser cache).

For Wordpress

1. Here it depends on the theme you using. For most of the theme you can change the logo by navigating to Appearance >> Header. You will be redirected to page where you can update the logo.
2. Save the theme setting.

HTH

Pradeep


how to resend a mailing to corrected bounce addresses?

In Adv Search you can select the 'bounced' contacts for that specific mailing and then add them to a new group (or not) and fire a new Mailing off to them


Sending organisation custom tokens to individual

You should be able to do this with the reltoken extension.


Staff restricted by ACLs cannot use/see any other groups

The core issue is that CiviCRM's in-built ACLs don't distinguish between access to view a group and access to view the group's contacts.

However, extension-based ACLs CAN distinguish.  So my solution is to give folks access to "View All Groups" as a web-based ACL, then restrict permissions by extension.

Note that this doesn't work unless you've applied the patch for core#580.  This will be part of CiviCRM 5.12+.

UPDATE: Here's an example where I limit the viewing of anonymous donors (as flagged by a custom field) to members of a group called "Confidential Staff":

function tweaks_civicrm_aclWhereClause($type, &$tables, &$whereTables, &$contactID, &$where) {
  // If the person is not in the "Confidential Staff" group, don't show them the contacts in the "Anonymous Donors" group.
  if (!$contactID) {
    return;
  }
  $confidentialStaff = civicrm_api3('GroupContact', 'get', [
    'group_id' => "Confidential_Staff_14",
    'contact_id' => $contactID,
  ]);
  // If this person is not confidential staff;
  if ($confidentialStaff['count'] === 0) {
    // Find a list of anonymous donors.
    $result = civicrm_api3('Contact', 'get', [
      'return' => ["id"],
      'custom_12' => 1,
    ]);
    $anonDonors = array_keys($result['values']);
    $anonDonors = implode(",", $anonDonors);
    $where .= ($where ? ' AND ' : '') . " contact_a.id NOT IN ($anonDonors)";
  }
}


Can form submissions dedupe and "fill" instead of "override"?

There is a partial solution available called the No overwrite extension which will prevent users from changing their name. But this only works if they are logged into your website already.

For non-logged in (anonymous) users, CiviCRM has to "guess" who it is by using its dedupe rules. You can configure which rule the event page uses here:

However there is no solution I know of to filter the information submitted - it will overwrite existing records if CiviCRM finds a match.


Can I status override an auto renewing membership?

This appears to have been implemented as a deliberate 'feature' to prevent users from making changes to memberships linked to recurring payments. See this related question for details:

How can you edit the end date for an auto-renew membership?

A fix has been merged into CiviCRM core (PR #15540) that fixes this issue for the end date field. This fix should be included in CiviCRM 5.20.


Extension Upgrade Failed: Download failed - ZIP file is unavailable or malformed

You could do a manual upgrade:

download the zipfile from https://civicrm.org/extensions/civirules
remove the civirules directory from your extension folder on the server
extract the downloaded zip file
upload the org.civicoop.civirules folder to your extension folder on the server
Go to the extension page in civicrm and see whether any database upgrades are reuired.

ps. It is a good habit to make a backup before step 1.


Send fee type to Authorize.net along payment

By fee type I am assuming you mean financial type, but if I am not mistaken, financial type information is not transferred to any payment processor - that all remains within CiviCRM, so to get that information from a report you generate from Authorize.net would not be possible without having something developed specifically for that purpose.

If I have misunderstood and you are referring to a report that you run from within CiviCRM, it could be that you either have a custom report or renamed a built-in report - if it is the latter, please let me know the name of the report that you are using.

Hope this helps!
Tamar


Most recent installs I have done of CiviCRM seem to behave best with 2gig minimum of memory.  1.5gig should work as a minimum, but memory is cheap so go with 2gig.

We typically use eApps for most of our clients. They have a nice interface to easily adjust your resources up and down as you need: memory, cpu, disk space. Being able to easily raise and lower these resources (and just pay for the days used) is really nice, for those times you are importing or exporting or doing some other resource intensive tasks. They also have a relatively great support desk.


Allowing users to update information without logging in

The construction differs depending on your cms.

Best info imo is at docs.civicrm.org/dev/en/master/framework/civimail/tokens

You have pasted

civicrm/profile/edit?reset=1&gid=1&id=2798&5fb7dfc93d6b855d75659da64805ac82_1503574955_179

In point 5. you stated ** and the {contact. contact_id}** but i don't see that in your example.

You need to have cid={contact. contact_id} in the string so will not work


How do we make sure labels are printing with proper capitalization?

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


Visually group custom and standard fields on screen

I found easier to move fields on the client side (using jQuery). you could write a simple extension that:

adds a custom javascript on the specific page(s) you want to modify
and that javascript would move the fields to their new location, and presumably hide the custom group "activity metadata"

It's mostly robust, but you would need to check everytime you do an upgrade that the selectors you used are still the same between different civicrm versions


Event Error - civi_flexmailer_required_tokens

we have similar issue but after clearing civicrm cache using menu/rebuild it started working.


I just saw, all I need to do is click on the source button in the message editor and paste my code in there as described here


How can I find the transaction date of a payment by check?

trxn_id is the common denominator on the civicrm_financial_trxn table and the civicrm_contribution table

civicrm_financial_trxn.trxn_id
civicrm_contribution.trxn_id


Select and register multiple people for a pre-selected event

That's a good question. This ought to get you started, if you get it all working please post your own answer with more details :)

Create a webform with 1 contact
Disable all fields except the "existing contact" field
Edit this field and set it to be "static", and set the default value to be populated from the group of your choice
Under the "event" settings for the webform, choose "register each participant separately" and set the event field to be "user select"
Edit this event field to limit the options to only the event of your choosing.
You should now have a working webform that shows the first member of your group and allows you to register them for the event.
If the above is working, you can now clone contact 1 as many times as needed to add the other members of the group.

Admittedly this method has a few drawbacks

Doesn't allow the end-user to select the group or event.
Contact name and event checkbox will be on separate lines (maybe some css could fix this).
There is a limit to the number of contacts you can have on a webform. Depending on the size of your groups, this may or may not be a problem.


How can I access an activity's grouping value in CiviCases?

The function that is responsible to build the list of activities on case is CRM_Case_BAO_Case::getCaseActivity(). It is very difficult to alter the function via custom module/plugin/extension.
I would create an extension that would alter the page callback for 'civicrm/ajax/activity' to custom function (eg CRM_ExtName_Page_AJAX::getCaseActivity using hook_civicrm_alterMenu hook. Copy CRM_Activity_Page_AJAX::getCaseActivity() into your custom php file i.e CRM_ExtName_Page_AJAX::getCaseActivity() and change the line below line to your custom function which will basically copy paste of CRM_Case_BAO_Case::getCaseActivity function with change the where clause to include your conditions
$activities = CRM_Case_BAO_Case::getCaseActivity($caseID, $params, $contactID, $context, $userID);

HTH
Pradeep


You're asking for the fabled "Line Item Search" feature!

In short - this is a tragedy of the commons.  It's cheaper for folks to build a custom search for their particular use case than to fund this feature - and so while several folks have expressed interest in this feature, it's yet to be funded.

If you think you have resources (time or money) to put toward implementing this feature, please contact the CiviCRM core team!


Using 2 payment processors with Webform CIVI intergration

In general you can find out the values of any field by looking at the markup. If you visit your webform and right-click the payment processor field, select "inspect element" (if you're using a decent webbrowser) it will show you the code.

<option value="0">Pay Later</option>
<option value="1" selected="selected">Test Processor</option>

So in this example the test processor has a value of 1, pay later has a value of 0.


We had some more luck with the integrated UI configuration of CKeditor, and after some trial and error we came up with the following solution:

In the following documentation I will assume that the fonts, files and configurations will be put in /sites/default/files/civicrm/persist/ and /sites/default/files/civicrm/persist/customfonts. The persist folder can be configured for multiple CMSs, I am using drupal.

The configuration file can be configured via the UI at /civicrm/admin/ckeditor. Add the fonts plugin on top if not already done.
Under advanced options add a customConfig, and add a custom configuration file. I would use something like /sites/default/files/civicrm/persist/crm-ckeditor-custom.js

This can be copied and extended from the already generated crm-ckeditor-default.js in the same folder. Be aware that if the path is added, "/" characters will be escaped. Sadly multiple times, so be careful when saving the form!

In the custom configuration you can now add CKEditor configuration, according to their API documentation.
For the fonts to be added, a fonts.css file needs to be created, with the default @fontface syntax and the added to the configuration like this:

config.contentsCss = "/sites/default/files/civicrm/persist/customfonts/fonts.css";

And the font names needs to be extended as well:

config.font_names = "Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif;Indie Flower/Indie Flower";

This is the list of pre-configured fonts, and a new fonts Indie Flower (as an example) is added. The syntax is [Display name]/[Font Name]

Afterwards the directory could look something like this:

 sites/default/files/civicrm/persist
  - crm-ckeditor-custom.js
  - customfonts
    - IndieFlower.woff2
    - IndieFlower.woff
    - IndieFlower.ttf
    - IndieFlower.svg
    - IndieFlower.eot
    - fonts.css

Then a message template has to be created (civicrm/admin/messageTemplates/add?action=add&reset=1), and the fonts.css has to be included:

<link href="https://my.example.domain/sites/default/files/civicrm/persist/customfonts/fonts.css" rel="stylesheet" />

The webserver needs to be configured as well to allow CORS Header, either by a .htaccess file or for nginx:

<IfModule mod_headers.c>
  <FilesMatch ".(eot|ttf|otf|woff|svg)">
        Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

location ~ ^/sites/default/files/civicrm/persist/customfonts/.+\.(eot|ttf|woff|woff2|svg)$ {
    add_header Access-Control-Allow-Origin "*";
}

Then, when creating an Email or a PDF the template has to be selected, and the text can be created by wysiwyg. Email Clients can then load the fonts, and pdf generators can use the fonts.


Using the 12 hour time display option, how can I schedule a mailing to go out at 1 minute past midnight?

When you schedule the time you should set to 12:01AM. Initially the time display doesn't display AM/PM but once you begin to enter a time it should show and be editable.


A 'way' would be to export all Membership data together with Internal ID, then manipulate the data as you want, and then delete all existing member data and then doing an Import. It may feel 'safer' than in mysql since you will be able to make whatever tweaks might be required for those 'odd case' members.


CiviCRM 4.7 - Showing Empty home page in wordpress editor

Short answer: that third line from your console means your page is failing to load some javascript that it (probably) requires to display properly.

You might be able to test this theory by adding "&q=civicrm/admin" to your url and see if it shows something.

My best guess is that your civicrm 'assets' (css/js) aren't being loaded properly due to some base url settings.


IATS ACH Civi is not recording when a donation has been refunded or returned

That’s correct and by design. Refunding for example a donation may have other business consequences like revoking a charitable tax receipt already issued for the original donation so best to have a finance/admin have eyes and hands on refunds and ensure the entire refund procedure for their specific org is followed.


When making an in memory of donation -> why does the deceased contact not get marked deceased?

Best response was by Andrew/AGH: "... it's way better to have a dead person look alive than to have a live person look dead."


Membership/Contribution does not get updated

We are having a similar issue, and while this isn't a great answer, the temporary solution has been to install browser add-ons (either in Firefox or Chrome) that clean the cache with one click. On Firefox, I'm using Clear Cache, which also refreshes the page. On Chrome, I'm using Clean Master, and have to manually refresh the page afterwards. Cleaning the Joomla and Civi caches don't seem to make a difference - only the browser cache. Unfortunately, any time we make any changes that we want to see immediately, we have to repeat this process. That includes to discount codes, events, memberships, contributions, etc. It's annoying and hopefully if enough people are also experiencing it and report the problem we can get a permanent resolution.


error when opening Word attachment to email from view activity

I've tried again just now and all seems OK, so I think the answer is the same as JPG files uploaded as notes can't be viewed and that it was caused by a blank line in the functions.php in the theme


Is there a way to integrate CiviCRM with Ticketspice.com and other Event ticketing platforms like Eventbrite?

Much easier to get Events working in CiviCRM and/or with CiviDiscount than to API integrate a third party ticketing system! You'd have to think about how to handle duplicate Contacts, get the monies right - where are any refunds being recorded etc.

Where are you stuck with Events in CiviCRM w/ CiviDiscount? What version of CiviCRM? Post a question on it - and we'll try help you out.


Implementing Duplicate Membership With Different Membership Form Information

I thought there was an extension out there which permitted this but didn't find it in my quick trawl. The answer will partly depend on what the maximum number of such towers might be.

The original workaround for this was to create multiple membership each 'owned' by a different Organisation (ie when you create the Membership Type, you set up the first type to belong to Org-A, next one to belong to Org-B etc)

You can see a discussion about that here: https://forum.civicrm.org/index.php%3Ftopic=31251.0.html

But as I said i thought there was a way to specify in civi that each 'new' membership be treated as a separate membership and not a renewal (ie avoiding the 'upsell' concept') but the only thread i found about this was https://civicrm.org/blog/eileen/price-sets-memberships-multiple-memberships


Can I show a profile on contact summary page

If you install the Extended Reports extension (available from in-app download), you can place Extended Reports as a block using Contact Layout Editor.
See the screenshot below - I'm using the "Extended Report - Membership Price Set Report" template to generate this report.  Under the report's Display Options tab, I clicked Make available for contact summary page.


Activity search by subject - advanced search vs activity search

You can use wildcard characters (%xxxx%) in search to change the default operator of "=" to "LIKE" - e.g. on demo:

Using Search > Find Activities:

Activity Text = Tell a Friend
Status = Scheduled, Completed
Generates the same query as you listed in your question and at the time I write results in 204 records:

Activity targeted to ...AND...

Activity Text (Subject Only) Like '%Tell a Friend%' ...AND...

Activity Status In Scheduled, Completed

The same query is generated when using  Search > Advanced Search with the following parameters:

Activity Text = %Tell a Friend%
Status = Scheduled, Completed

The above returns 89 contacts, but if you display the results as activities, you get the same 204 that you did using Search > Find Activities.

Hope this helps,
Tamar


More usable forms/profiles is a major goal of CiviCRM 5.0.

Creating a form creator that's flexible enough to meet the varied needs of many constituencies is a lot of work.  Unfortunately, while CiviCRM is free to use, it's not free to write.  Most of the folks who complain aren't willing to fund (or do) the work.  Using Webform is certainly a crutch, but in a world without unlimited developer resources, you can understand why someone wrote the CiviCRM-Webform integration rather than try to do it all from scratch.

I have no way of knowing which camp you fall into - but for everyone with this same question who hasn't contributed, please consider the many ways in which you can help make more usable forms/profiles a reality.


What do civicrm extension "current usage" statistics indicate?

What a site sends back to civicrm.org is just this: https://github.com/civicrm/civicrm-core/blob/506fffd478a7d322fbea786c35787c95a6dbe290/CRM/Utils/VersionCheck.php#L238-L240
name, enabled, version
One thing to note at https://github.com/civicrm/civicrm-core/blob/506fffd478a7d322fbea786c35787c95a6dbe290/CRM/Utils/VersionCheck.php#L139 is that it's only sent back for beta and stable installs. Alpha dev sites do not send those stats back, but release candidate testing sites do.
Also note that it does this when its cache expires (3 days, or when cleared). It also up to a point depends on site cron.
Whether civicrm.org further scours the internet for more data to match it up to your birthdate, friends, and latest purchases I don't know - if you can find where the code for stable.php is at https://latest.civicrm.org/stable.php it will say what it does with it. It probably just stores it.
When it's displayed on an extension node, I believe it comes from the update() function at https://lab.civicrm.org/marketing/civicrm-website/-/blob/1f421835b1bc0ad2ce45a919215a6794955aa208/civiext/org.civicrm.civicrmorgstats/CRM/Civicrmorgstats/Utils/Extensions.php#L31-41, which in turn gets it from https://stats.civicrm.org/json/ext/{extension name}.
I believe that is somewhere at https://lab.civicrm.org/infra/stats-collection, but I would think just pulls it from whereever stable.php stored it.
So without seeing what is actually installed on civicrm.org, or knowing how often that update() function runs, half of this is guessing, but it's clear what a site sends back.


Cron job fatal error - scheduled emails won't send. AddThis 5.0.7 issue

I have seen this error before with this plugin.   The CiviCRM cron job will fail if while bootstrapping WP a fatal error is encountered.

My only workaround (besides removing the plugin as you did), is to launch the cron job via wp-cli.  See http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs and the section on wp-cli.   In this case the flag --skip-plugins can be used to stop the addthis plugin from loading.


Using hook_civicrm_tabset; why doesn't my tab focus when linked to via url?

You will need to add below line in your preprocess() function.

$this->assign('selectedChild', 'mysettings');


CiviCRM API: How to get event by custom multiselect field option?

I think the feature you need is A 'contains' operation for the api to search multiselect custom values, which is work in progress. See the associated pull request #6612 for discussion of progress - it seems to have stalled but with good work already having been done.


Thanks Paul - it turned out that relationships needed to be set up at contact type level, not as a contact sub type in order for the relationships options to be displayed in the import screens.

So where contact sub types had been set up on earlier versions of civi, the relationship had to be changed to conctact type leve i.e

individual to individual
not Individual (parent) to Indiviudal (child)

The relationship names can stay the same just not the level.


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

More details can be found in these instructions.


Preferred mail format select does not set current value

It has been fixed in the updated version https://issues.civicrm.org/jira/browse/CRM-19135.

So it's recommended if you could upgrade CiviCRM to 4.7.11 or apply this patch to your site and check if it works for you https://github.com/civicrm/civicrm-core/pull/8777


Is there a list of CiviCRM shortcodes for Wordpress?

Going by the shortcode function, there are five possible ways to use the shortcode.

Technically there's only one shortcode used ([civicrm]) but it uses the component attribute to switch between different content.

The five possible components are:

Contribution: [civicrm component="contribution" id="x"]

shows a contribution page specified by the id attribute.
Event: [civicrm component="event" action="register" id="x"] and [civicrm component="event" action="info" id="x"]

shows either a registration or information page for the event specified by the id attribute.
User dashboard: [civicrm component="user-dashboard"]

shows the current user's dashboard page
Profile: [civicrm component="profile" mode="y" gid="x"]

shows a page for displaying a user's profile. This can be one of 4 modes - edit, view, create or search. The default is create. The gid attribute selects which profile group is displayed.
Petition: [civicrm component="petition" id="x"]

displays a petition form specified by the id attribute.

In addition, any of these can specify a hijack option and they will replace all other content on that page rather than being display inline. This looks like hijack="1". A force attribute is mentioned in the code but I'm not clear what it does.

force=1 means it will display the table, force=0 means it will display the search box for the table and you will see the results of the search for the table after you search


Only !CRM.checkPerm("administer CiviCRM")) conditional works

If you want to use CRM.checkPerm() JS function than you will need to add permission using hook and than it will be catched in CRM.checkPerm() js function. eg: In hook

function extname_civicrm_buildForm($formName, &$form) {
  if ('Some_FormName' == $formName) {
    CRM_Core_Resources::singleton()->addPermissions('administer CiviCRM');
  }
}

and than in tpl

{literal}
<script>
  CRM.$( function( $ ) {
    if (!CRM.checkPerm("administer CiviCRM")) {
      $( document ).ajaxComplete(function(event, request, settings) {
       //do stuff
      });
    }
  });
{/literal}
</script>

An other alternate could be

{if !call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCRM')}
  {literal}
  <script>
    CRM.$( function( $ ) {
      $( document ).ajaxComplete(function(event, request, settings) {
        //do stuff
      })
    });
  {/literal}
  </script>
{/if}


One Contribution page with multiple webforms

One thing you might want to consider is that the webform uses the receipt language configured on the contribution page you're using, so you might check to confirm that the verbiage is sufficiently generic to cover both types of membership.

Lesley


ER diagram for the latest Civicrm , Foreign key in Structure, test cases/plans

I will answer your questions #1 and #2. (I'm not sure what you mean by #3. If #3 is sufficiently unrelated to #1 and #2, I would suggest creating a separate question for it)

Why an ER (Entity Relationship) diagram might not be helpful

As a visual learner, I too looked for an ER diagram when first trying to understand the CiviCRM database schema. I was eventually able to generate such a diagram with a special tool, but in the end, my attempts to learn from this diagram were a fantastic waste of time.

In my opinion, CiviCRM's schema is just too big to make any sort of diagram useful. There are too many tables. (Currently over 150, and more when you add custom fields!) At this scale, a diagram becomes a rat's nest of confusion.

Other ways to learn about CiviCRM's schema

Using MySQL workbench

MySQL workbench is an awesome tool that has helped me tremedously in understanding CiviCRM's schema. It's similar to phpMyAdmin, but IMHO way better. It's a desktop application. You can use it to connect to a remote server like your live CiviCRM site, but for purposes of learning I'd recommend that you install MySQL locally and load a copy of your live CiviCRM database onto your local computer. Then you inspect this local database with MySQL workbench and it will be both faster and safer than looking at the live one.

A typical workflow would be:

Look at the list of tables in the database. The table name generally gives you a good idea of the type of data it stores.
Pick one table and look closer. Let's look at civicrm_country (a relatively simple example) by opening the "Table inspector" for that table.

We can look at the list of columns in the table.

We can see that columns have comments which explain (to some extent) the meaning of the data stored in the columns.

From the column names (and comments), we can also get some idea of the relationships between tables. For example, we can see that each country has an associated address_format. Cool!
We can look at the foreign keys which are relevant to this table.

Here, we get an even more comprehensive picture because, not only do we see tables referenced by civicrm_country, we see tables which reference civicrm_country. So we can see that each country has multiple state_provinces.

Using other tools (e.g. phpMyAdmin)

While MySQL Workbench is the best tool I've found for inspecting the CiviCRM data structure, other tools (such as phpMyAdmin) offer lots of the same functionality.

Specifically, looking at the names of the columns in each table goes a long way towards understanding the relationships between tables. For the most part, the following patterns hold true:

Every table has an id column as a primary (and thus unique) key.
Columns which reference other tables are named (usually) with the table name + _id. For example when you see a column called address_format_id, you can be relatively sure that it references civicrm_address_format.id
Many-to-many relationships use "join tables" as intermediary tables. For example, a contact can have many activity records, and an activity can have many contact records. So the table civicrm_activity_contact is used as the glue because it has foreign keys to both.
In some places CiviCRM defines schema using a construct called pseudoconstants which produces some slightly more complex logic

Lots of columns reference civicrm_option_values when they just need a simple (and user-configurable) list of options. For example, look at civicrm_contribution which has a column called payment_instrument_id. You'll notice there's no table called civicrm_payment_instrument. So in this case the payment_instrument_id column actually references the value column in civicrm_option_values (but only for records in civicrm_option_values with the appropriate option_group_id.) Here there is no foreign key, so referential integrity is managed at the application layer, not the database layer.
Some tables use "dynamic foreign keys". For example, look at civicrm_note which has columns entity_id and entity_table. This is because a note can be attached to different entities (e.g. contact, contribution, etc). So two columns are used to indicate what the note references. Here again, the application layer is responsible for ensuring referential integrity, so you won't find any foreign keys.


Export list of all successful civimails?

You can use CiviCRM inbuild reports (i.e Mailing Detail or Summary report) or extended mailing stats extension. You can export the result as CSV or PDF


Invalid currency "$" when sending confirmation and receipt

We had the same issue. The cause of the membership creation issue is with the email template syntax. Look in your system-generated messages and change the receipt templates you are using with, any instance of:

{$line.unit_price|crmMoney:$currency}
{$line.line_total|crmMoney:$currency}
{$formValues.total_amount|crmMoney:$currency}

Needs to be changed to:

{$line.unit_price|crmMoney}
{$line.line_total|crmMoney}
{$formValues.total_amount|crmMoney}


Wordpress newbie: Not show author, date at top and garbage at bottom of Civi registration profile

That's a wp issue, will be standard on all pages unless you remove it from your theme settings on wp.
This has nothing to do with civicrm.


How can I use the API to set a field to NULL on an existing record?

It doesn't quite feel right to me on the empty vs null front - playing around with the API explorer in 4.7.15, but what I can say is if I do an api call for a contact ID (say, 3) with nickname IS NULL as follows:

CRM.api3('Contact', 'get', {
  "sequential": 1,
  "id": 3,
  "nick_name": {"IS NULL":1}
})

I come up with the result for cid 3 including "nick_name": "", (which would say to me that it's empty instead of IS NULL... but comes up with the previous api call anyways.

Then I run the following test by adding a nickname:

CRM.api3('Contact', 'create', {
  "sequential": 1,
  "contact_type": "Individual",
  "id": 3,
  "nick_name": "nickname"
})

and run the same GET query as above, and get no results as follows:

{
    "is_error": 0,
    "version": 3,
    "count": 0,
    "values": []
}

If I then run:

CRM.api3('Contact', 'create', {
  "sequential": 1,
  "contact_type": "Individual",
  "id": 3,
  "nick_name": ""
})

and run the first GET query... I come up with the same result as the beginning again... which appears to be a contact with nickname empty ("") rather than null.

TLDR; It looks like you can use

CRM.api3('Contact', 'create', {
  "sequential": 1,
  "contact_type": "Individual",
  "id": 3,
  "nick_name": ""
})

even though it doesn't feel quite right... if you're trying to pull that contact up with "nickname IS NULL" searches using the api.


We integrated that into an extension, found here at github. Retention can be configured in days for each folder.

Extension is still alpha, handle with care.


How to perform searches with groups of OR statements joined by AND statements

The best way to do what you want is to :

create a smart group for (X OR Y OR Z) using search builder
create a smart group for (C OR D) using search builder
use search builder to combine all the criteria using Contact -> Group -> '=' -> (the group you have created)

I agree it's pretty tedious... but someone will have to re-work the search builder to allow the logic you want. It's not a simple task.


Using Mailjet purely as SMTP server - pros & cons?

I'm working with a site that has used MailJet via SMTP for a number of years. I'm not aware of any issues of using it in that way.


Check Processing - How does your organization do it?

On a day-to-day basis, you can save yourself a few clicks by using Contributions > Find Contributions. Also, instead of Editing the contribution and updating the status, you would be better off using "Record Payment" by clicking on the black arrow to the left of the contribution amount:

On a similar note, when you have multiple contributions to update, streamline the payment recording process by selecting the relevant records from your search and then using the "Update pending contribution status" action:

This action opens up a data entry screen that will allow you to enter the same payment details when using the "Record Payment".


Yes it appears to be a bug.  You should file one.

Here seems to be the conditions:

Importing update or fill, i.e. contact already exists
Has no existing email address or any existing has is_primary flag = 0
Has a street address or are also importing one

There seems to be no way via import to fix these or to import them correct.  Well, if you are also importing a street address, you can to do two imports, first just adding email address and second adding the address.

I guessing the design is for any new additional email address imports to not make them primary (makes sense) and for some reason the existence of a street address makes it think there is already an existing email address.

Here is some sql that will give you back any contacts with email addresses that don't have primary one.

select c.display_name,
       e.email,
       e.on_hold,
       e.is_primary,
       e.id eid,
       t.name,
       c.id cid,
from   civicrm_contact c,
       civicrm_email e,
       civicrm_location_type t
where  e.contact_id = c.id
and    e.location_type_id = t.id
and    not c.is_deleted
and    not exists
       (select 'email primary'
        from   civicrm_email e2
        where  e2.contact_id = e.contact_id
        and    e2.is_primary)
order by 1


How to find out the URL of my search results and edit the columns in the results?

You can configure profile to use as contact search. You can also control the result columns in profile search. To display contact result by default you can append force=1 in url.

Ref: https://docs.civicrm.org/user/en/latest/the-user-interface/searching/#views-for-display-contacts

You can create smart group which holds all the contacts and use the contacts link from Manage group page to use as a url.

Use contact search url and apend force=1 to display contact by default.

HTH

Pradeep


How do I open a case that started more than twenty years ago?

Yes, you can expand this range in Administer > Customize Data and Screens > Date Preferences.

Change the start Offset of activityDateTime class to 30.


I think you can bypass permission using permission_check hook.


Webform contact default token doesn't work - why?

"I'd like the existing contact name that's selected to be stored in the new contact records, in a custom field" ->
Quick solution and better from a data point of view -> use Relationships.
That way you can not only see who has nominated a child for a present but also get a list of all kids nominated by a certain contact.
Cool project!


Error in civix generate:api "You cannot change the session module's ini settings at this time"

As a workaround, you can create manually the Create.php file that contains civicrm_api3_invoice_create()

Check the api/v3 folder in the core for examples (eg. the email one)

As for civix, do you have the latest version? if it's the case, fill a bug on github


Embedding Google Analytics code on CiviMail message

This doesn't seem to be supported yet, but thanks for asking - giving voice to needs is how these things start!

Currently CiviMail generates a URL like  http://dmaster.demo.civicrm.org/civicrm/mailing/view?reset=1&id=10 which renders the mail as sent out (without site theme).

First thought: look at using your existing site theme to include your tracking codes, and display your newsletter content wrapped in the default site theme. This might be possible by commenting out the CRM_Utils_System ::civiExit() line mentioned in @diegov's answer below, or by (eg) creating a Drupal View which displays the rendered Mailing content at a similar path but without skipping the site theme.

Alternatively, a quick CiviCRM extension could detect the mail when viewed over the web and include your tracking codes?

Both of these would require some work, so consider contributing the end result back to the community if you do take it from here! And if you can't, maybe post it as a feature request on issues.civicrm.org?


Percentage Price Field extension not working for Additional Participants?

I heard back from the developer directly on GitHub who said this feature might be included in the future.


Ok, so it turns out I was kinda doing something wrong...

What I needed was a simple \ prefix:

    \Civi::log()->info('Hello, log!');


You can set up a profile that includes the field Contacts > Groups.

Then send the link to that profile in edit mode, in Joomla the url will look like: http://joomla.demo.civicrm.org/index.php?option=com_civicrm&task=civicrm/profile/edit&gid=1&reset=1

This url is the modified Create Mode (changing create to edit). To see how to get that click here

The user will need to be logged in to make changes. You can send a token in an email by adding &id={contact.contact_id}&{contact.checksum} to the url.


If you are processing more records at the same time - you will run out of memory -

In order to prevent Out of Memory the best way is to process less records in a single go - civimail does process records in a batch (like 200 approx.) at a single go

Whenever we create PDF in bulk, mail in bulk always we use to end up in Out of memory even in local PC or local server - so processing min amount of records should fix the problem

I guess the main problem for this Out of memory Issue is:
Civicrm DAO uses more memory and once the process is finished it doesn't free the memory at all. So php memory keeps on building and eventually - so we end up in Out of memory

I guess this helps!!!!


API - Create a contact from an external site

What you are asking is "How do I send a POST request with PHP?". See the following stackoverflow question: https://stackoverflow.com/questions/5647461/how-do-i-send-a-post-request-with-php .


It's not quite what you're looking for but if you install the Extended Reports extension then you can do:

Go to Administer - CiviReport - Create Report from Template.
Pick extended report - activities.
Pick some columns for the activity.
On the Display Options tab, check the box to display as a tab on the contact record, and for the box below that choose assignee.
Click refresh results.
From the actions dropdown choose Create Report.

Then on any given contact they'll have a tab that shows their assigned activities.


CiviEvent in Multisite Acting Strange after Upgrade to 4.7

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

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

if i change out the url and go to

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

it all looks fine to me. hope that helps.


In your civicrm.setting.php update the $civicrm_root and template_c path to use /var/sites/j/example.net/public_html instead of /var/sites/c/beta.example.net/public_html/

Thanks

Pradeep


How do I find the mails belonging to a particular mailing by looking at the SQL tables?

Try the civicrm_mailing_recipients table - mailing_id tells you which Mailing they relate to. Is that what you are after?


Free memberships are not created after upgrading to 4.6

I had a similar problem with civicrm and wordpress but it is now solved by upgrading to 4.6.3


MyISAM database but all civicrm_ tables are INNODB... is this a problem?

I backed the database up, opened it up in Sequel Pro and went to the civicrm_system_log table. Under "Table Info" I could select "InnoDB" from the dropdown. Then I cleared the caches on the CiviCRM installation and the system status came back green ("System Status: OK").

Per a comment from George Lozier on another thread, the MySQL query to do the same is:

ALTER TABLE civicrm_system_log ENGINE=InnoDB;


Create Case using API via REST - no "Open Case" activity created

Answer (thanks to @ErikH and @Demerit): the problem was that the case type did not have an Open Case activity in its standard timeline (presumably I had deleted it). Anyway, I added the Open Case activity to the standard timeline, and subsequently-created cases have been fine.


Yes you should be able to do this by specifying the amount, the period when that occured and then setting an Activity as assigned to you, which should itself then send you the email you require.

The templates_c error is unrelated to CiviRules specifically and suggests you should endeavour to truncate the en_US folder.

EDIT: Adding comment from Jon G that you need to "have the Email API extension installed ... to send emails using CiviRules"


Reading the code and that issue, the hook exists and someone just forgot to add it to the wiki. Here, I've just added it:

http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_postSave_table_name


Welcome to CiviCRM StackExchange Kim!

If you think that the translation should be changed for all users that use Swedish as a language in CiviCRM (e.g. because it is wrong or yours is better) you should update the strings in transifex.

This would imply that you create a free account there and ask to become part of the Swedish translation team. Once you changed the translation in transifex you will need to update your translation locally. You can find information on transifex in the CiviCRM Wiki.

If you only want to change the translation for yourself, you should use the function for word replacement in CiviCRM, which you can find at yourdomain.org/admin/options/wordreplacements?reset=1

On the left side you will need to enter the original (English!) string, on the right side, the one you want to use (in Swedish).


CiviVolunteer is adding menu items in the recommended way for Extensions.

We are looking for guidance on how to support menu customization. I did not find any in the developer docs.

If anyone knows the secret, or can point to an extension that menu customization works for... it would be a help.


Is it possible to export a newsletter to PDF

If you using CiviMail for sending newsletter than you can view the html snippet that was sent as a email body. To view the html you can go navigate to Mailings >> Scheduled and Send Mailing.

Find the mailing/newsletter name you want to convert into PDF and then click on report link besides the name. You will be redirected to CiviMail Report: [Name of Mailing] page.

Under Content / Components section you will see View Complete Message link. Open the link in new tab to see the content that was sent.

You can print this page using any one of the following method:

Use browser print option to Print as PDF
Use wkhtmltopdf to print the page using the url

// example for drupal 7.
// http://yoursite.com/civicrm/mailing/view?reset=1&id=1
$ wkhtmltopdf content-url newsletter.pdf

Use online tool to print pdf using url.
Use php to convert content of page into pdf.

Note: For #2 and #3 you will need to set CiviMail: view public CiviMail content permission for Anonymous user.

HTH

Pradeep


I had not seen this before, but on testing ( CiviCRM 4.6.6 and WP 4.2.4 using an admin with full permissions) I get the same behavior you do.   In the back end (or in Drupal) we can click on a link to the Address record and if we have permission to edit, we can.

When you insert the shortcode in the page, you are editing the current user's profile/contact info.   In the profile form there is no way that I can see to edit the 'master address'.

I took a look at using the Contact Dashboard as we've used this for a similar purpose between Orgs and Contacts, but the relationship that is created when sharing the address does not show here.

It does look to me like this is a limitation of editing the contact on the front end via shortcode as opposed to editing in the admin.


Custom emails automatically generated based on participants filling in drupal forms

The list of tokens you see when editing a template changes depending on where you're editing from.  Unfortunately, CiviRules doesn't expose event/participant/contribution tokens in the drop-down - but if you use them in the email, they WILL work.

To see the tokens you may want to use, create a new Scheduled Reminder (**Administer menu » Communications » Scheduled Reminders), and create a new reminder based on an event.  You should be able to see event etc. tokens (see screenshot below).  Then either save as a new template, or simply copy the tokens into an existing one.


If statement involving "is not empty" in smarty template?

{capture assign=temp}{contact.supplemental_address_1}{/capture} {if $temp ne ""} {$temp}
{/if}

is what I do. I got the idea from the source referenced above. You also need to ensure that smarty is turned on in civicrm.settings.php


Civiengage pieces not showing despite being activated- Drupal, CiviCRM 4.7.15

Drupal permission was checked, but additional Drupal configuration was not. This is not clear in the manual.

Thank you both for your attention!

S.


git and composer aren't necessary to install civix.  In the README it suggests multiple ways to install civix.  The first one is a simple download: https://download.civicrm.org/civix/civix.phar.


Is there a work around for the limit (10) of soft credits that can be added to a contribution?

There is technically no limit in the soft credit : it's only a limitation in the public form.

If it's a rare case i would propose to simply add the missing soft credit using the API explorer :

go to menu Support -> Developer -> API Explorer v3 (or v4 but my screenshot is in v3)
choose entity ContributionSoft, Action create and set value for Contribution, Soft Credit Amount and Contact ID
Then use Execute button

Like so :

Otherwise, you will have to create an extension to somehow overwrite the CRM_Contribute_Form_Contribution::$_softCreditItemCount value and it should do the trick :

  /**
   * @var int
   *
   * Max row count for soft credits. The value here is +1 the actual number of
   * rows displayed.
   */
  public $_softCreditItemCount = 11;


How to create Drupal View of Participants with custom fields

Create a new view.

Give the view a name

Show CiviCRM Participants

Create a page view perhaps, make sure there is a path

Continue

Add some fields, maybe you want the contact display name for instance
The custom field will be available in a group "CiviCRM Custom [custom_group_name]"
Add your custom fields...

Maybe you want only those participants for a given event?

Number of ways to do this, but lets just describe one way.

so lets say your View is at path "/event-participant-listing"
Lets use a contextual filter, and filter by event id, so that
"/event-participant-listing/1" would list participants for event with id 1

editing your view, Click the Advanced fieldset in the right column

Add a contextual filter
"CiviCRM Events: Event ID"

Maybe set "When the filter value is NOT in the URL" to 'Display contents of "No results found"'

Make sure if you choose that to add a "Global: Text Area" to the "No Results Behavior"


Easily switch group of contacts to a newly created contact subtype

Create a profile (Administer > Customize Data and Screens > Profiles) that includes the Contact field "Contact Subtype."
Bring up your desired group of individuals (whether through a search, group listing, etc.).
Select the appropriate individuals and use the "Batch Update via Profile" action.
On the next screen, select your Profile that contains the "Contact Subtype" field and click Continue.
On the Batch Update screen, select the Student subtype for the top individual, then click the Copy icon next to the column label "Contact Subtype."  That will copy the Student subtype selection all the way down the list. Scroll down to the bottom of the page and click "Update Contacts".

You're all set!

Note: the limit for Batch Update via Profile is 100 contacts, so if your number is greater than 100, you'll have to do Steps 3-5 multiple times.


How do I isolate the amount of a recurring contribution in CiviRules?

You can use search builder using condition shown in image to create a smart group.
You can add more filter based on your payment processor to limit the result to first payment, for that you will need to diff between first payment and second payment in civicrm_contribution table. For example if you using paypal for recurring contribution than the first contribution has invoice_id set but the subsequent ones are set to NULL so you can use filter like Invoice reference not null, for Smart debit you can use contribution source eg contribution source like %Membership form%.


Is there a way automatically get sort name and greetings to be correct for households?

Have you tried changing the sort name so the results show up in alphabetical order? (Administer/Customize Data and Screens/Display Preferences). I set it like this:

{contact.last_name}{, }{contact.first_name}{ }{contact.middle_name}

In that way my contacts are sorted on the last name and I also include the middle_name (which means something in Dutch so it becomes 'Boer, Jan de').

But perhaps you tried that and your problem is somewhere else?


CiviCRM cron job failing under Joomla 3.7

It is not a civi issue - it is a joomla issue that impacts other modules as well
the fix is in j 3.71
It is a 6 line patch and 1 line deletion

I have tested it and it works if you want to patch it yourself

https://github.com/joomla/joomla-cms/pull/15605


CiviDiscount does not auto-apply when filtering on contact type

This may not a long-term fix, but I found a fix in the CiviDiscount github issue tracker.

The underlying problem:  CiviDiscount source will not apply discounts to events with no coupon entered.

The fix:  Add exceptions so that CiviDiscount will apply auto-discounts even if no coupon is entered.

Here is a link to the fix, hopefully this fix or a comparable fix will make it into the next version release.

https://github.com/dlobo/org.civicrm.module.cividiscount/pull/98


Installation problem of civicrm on wordpress

It looks like the mysql user you use doesn't have enough permissions on the database (or invalid database/password?)

This page lists all the privileges that civicrm mysql account needs:

https://docs.civicrm.org/sysadmin/en/latest/requirements/

  GRANT
  SELECT,
  INSERT,
  UPDATE,
  DELETE,
  CREATE,
  DROP,
  INDEX,
  ALTER,
  CREATE TEMPORARY TABLES,
  LOCK TABLES,
  TRIGGER,
  CREATE ROUTINE,
  ALTER ROUTINE,
  REFERENCES,
  CREATE VIEW,
  SHOW VIEW
ON civicrm.*
TO 'civicrm_user'@'localhost'
IDENTIFIED BY 'realpasswordhere';

you would obviously need to adjust with the database and user account you have


Initialization Error After Backing Up Wordpress

The failure you're seeing is because the MySQL credentials are no good.  These are set in the civicrm.settings.php file.  Did you possibly restore a backup that didn't include the civicrm.settings.php file that was in place when it was working?


CiviCRM Event - Event Confirmation EMail

Welcome to Stack Exchange!

You can edit any emails that are automatically sent from the System Workflow tab on this page - /wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2FmessageTemplates&reset=1

You're able to edit any email templates that are generated from the system such as event emails, membership emails and contribution emails.

Hope this helps!


Invalid Currency error when using custom template

This was a regression and was fixed. https://lab.civicrm.org/dev/core/-/issues/2344


How do I manually add an additional participant to an event?

A person is not allowed to register for same event twice with same email address. However this can be bypassed by enabling 'Same email address?' option under 'Online Registration' tab of an event.


All of those settings are set per-site.

If you're more comfortable looking at things at the SQL level, you can check out everything stored in civicrm_setting.  Note the presence of a domain_id field; each domain ID corresponds to one of the sites (see civicrm_domain to map them).

It's pretty safe to use SQL to copy those settings if you need to bulk change them.  There used to be an extension that let you change the settings in bulk; the name escapes me right now, but it doesn't work with modern CiviCRM anyway.


New Install "MYSql Server Has Gone Away"

+1 for the xkcd reference.
There's some work being done on SSL but for the "server exists" error this is a known issue for azure. See https://lab.civicrm.org/dev/core/-/issues/1206
Briefly, just comment out the body of the check it mentions and instead make it always return TRUE: https://github.com/civicrm/civicrm-core/blob/5.16.2/install/index.php#L1036


"Print selected rows" option missing in Event Participant listing dropdown actions

This is a core bug introduced during refactoring of task action. I have submitted core PR at https://github.com/civicrm/civicrm-core/pull/12310 . Can you please and if possible comment on PR your test results.

Issue logged at https://lab.civicrm.org/dev/core/issues/185

Thanks

Pradeep


Welcome to StackExchange!   There are fewer installations of CiviCRM on Joomla than Drupal or WP, but it does work, and for most of what it does, Civi doesn't care which CMS it sits on.
You may be hitting problems described here with HostGator. In general, I'd only try to run CiviCRM on a hosting provider that explicitly supports CiviCRM.
The end of the error message simply says "DB Error: unknown error" - which is not much use to you or us!  Do your log files provide any more information about the error?
If the logs don't provide further info you could try connecting to the db directly (either command line or phpmyadmin) and copy/paste in the create table statement and see what error it gives.


Do I gather correctly you want to do this in many cases? The easiest option would then be to use the CiviRules extension to send the PDF so you do not have to code.

You could then set up something like if a membership of a certain type is added, send the PDF. That would make more sense to me then trying to add it to a template? I do not think that route will take you anywhere.

You can find more information about the CiviRules extension here: https://docs.civicrm.org/civirules/en/latest/

If CiviRules can not help you you would probably have to write an extension but you need to explain more about what is required exactly at what time for me to be able to help you with that.


How can I make a mailing public after it's been sent?

If you can access the civicrm_mailing table you could try changing the value in the column = Visibility so it is set to Public Pages, not User and User Admin Only


If you use Drupal, I'd recommend setting up a view that lays out the bits you want for your print-friendly data screen, and then use the Drupal print module to give you the print-friendly and/or pdf-generated versions.

The print module can actually generate both print-friendly and pdf-generated versions of any page (via a url trick, prefix with "print/"), i.e. you can use a url like this:

/print/civicrm/contact/view?reset=1&cid=yourcontactid

but they probably won't look very nice. You can do some customziations via the print.css file of your theme.

It's probably harder than you think, less useful, and not a good idea most of the time as noted in the comments above.


I don't think you can get the logs for Events via the UI. If you have access to the db then most tables have a log table, eg log_civicrm_event and log_civicrm_participant


How do I download duplicates of imported contacts in the past month?

I'm afraid those are gone.  By definition, those items aren't saved anywhere.


To clarify, they are two ways of accessing the api over the net, the REST interface (that uses the keys) and the ajax one (that is used for the front end js, and doesn't need the keys)

So if it's client js, the authentication is done through the CMS, so via the cookie session. You shouldn't use the keys.

What we recommend is to always use POST when we use the REST, not matter the action, precisely to avoid having the keys in the GET params, so it's not left in the logs and a bit more protected in general

X+


Can I add fields to the "New Individual" popup window?

Yes you can.

This form is actually a configurable profile. To edit it:

Go to Administer > Customize Data & Screens > Profiles
Click on the "Reserved Profiles" tab.
Find the "New Individual" profile and click "Fields" to add or modify the list of fields:


Change quick search ACL from "Access CiviCRM" to "Edit all Contacts"

Time for a custom extension! I'd
hook_civicrm_navigationMenu this bad boy - just hiding it in the JS won't help you from a security perspective.


How do I create and access a database for civiCRM

For testing purpose, it could have been nice to install it locally using a virtual box for example following this documentation: http://wiki.civicrm.org/confluence/display/CRMDOC/WordPress+Installation+Guide+for+CiviCRM+4.5.

But since you have stated that you have no experience in software/programming/IT, your best bet will be CiviCRM hosting providers: https://civicrm.org/providers/hosting


Rich html CiviMails can send from a Mac but not Windows?

I haven't heard any other issues like this so I suspect this has been solved by now. Please upgrade to the latest version and try again.


I don't have enough rep to comment and this isn't exactly the answer you were looking for, but I also had the same question a few months ago and research led me to the answer No. Instead, we are using Salesforce to manage sales leads (in our case, prospective members). I talked with a few people who have a lot of experience integrating CiviCRM for nonprofit orgs, and based on the small size of our staff they did not believe it would be worthwhile to customize CiviCRM to the extent needed, when an out-of-the-box solution would work just as well. I'm in the U.S. so I don't know much about Salesforce in the UK, but here there is a free version for nonprofits.


scheduled mailings dont send - civicrm4.1

Generally I have found that, if a mailing is stuck as "running", but does correctly run when "execute now" is clicked, that you have a permissions problem.

When you "execute now" the mailing is executed using the permissions of the currently logged in user.

The cron job however usually runs as a different user. This user needs minimally to have a few permissions set: view all contacts, access CiviCRM, access CiviMail.

I would first track down your cronjob to find out what user is referenced in it.  Without more details on your hosting platform its a little difficult to help you with that.  If you have SSH access, try issuing a command line: crontab -l.  If your hosting provided gives you cpanel or similar, you may be able to view the cron jobs with that.


How can I display the members of a group?

There's more than one way to view the contacts added to a group, here are a few, all of them will list the contacts belonging to the searched group.

Option 1) Navigate to Search -> Find Contacts, select your group filling the field in any group, leave the rest of the fields blank and hit search.

Option 2) Navigate to Search -> Advanced Search, select your group from the Groups field and hit search.

Option 3) Navigate to Contacts -> Manage Groups, here you can search/create/delete groups, on the right hand side of the screen there's a Contacts button for each created group, click it.


CiviEvent - How to Template Profile Fields and Price Set Questions In Custom Groups

I think jQuery is the best way to achieve this at the moment, rather than trying to customise the template, or load a custom template for an individual event. Doing this in jQuery also keeps the logic separated out.

If it's critical that the questions appear in this order, then you can use the introductory message and some creative CSS / JS to hide the entire booking form unless JS is enabled. This is the approach we sometimes take.


Use the hook civicrm_alterMailParams.

Inspect the $params that are passed in, and if you don't want the message sent, set $params['abortMailSend'] to '1' (or any non-empty value).

See lines 71-77 of CRM/Utils/Mail.php to see how this is processed by CiviCRM. This doesn't work for CiviMails but works for other emails sent by CiviCRM.


Aggregate of activity duration in Drupal Views

This is more of a Drupal question - you can do what you're looking for with the Views Conditional module.


There are many ways you can do this

Create contribution page and price set for each currency. Provide a list of contribution page to user and based on currency they can use the contribution page
Create contribution page and price set for each currency. Add currency field on each contribution page using buildform hook and on selection of currency load the respective contribution page.
Create a price set with radio field and have all the currency as options with same membership type. Using buildform or buildAmount hook change the amount or field label to include currency(not necessary if can add it price field option label). On submit of 1st page set currency in postProcess hook in $form so that right currency is set to send it to payment processor.

HTH

Pradeep


Notification if a member cancels their membership?

As petednz suggested the CiviRules extension should be able to help you with this. Are your memberships cancelled from a profile? Or in the CiviCRM user interface? Then it will certainly help you. You should test first, I do not know if people used it for cancelling memberships yet.

The CiviRules extension is here: https://civicrm.org/extensions/civirules
Documentation is here: https://docs.civicrm.org/civirules/en/latest/


Using a Variable/Token for Config Directories to Get Site Root Path

Take a look at issue CRM-19371. It a small bug and fixed in CiviCrm 4.7.13. I fixed my 4.7.12 installation by using this patch.


API CSV Import -> for ActivityContact -> invalid value for record_type_id

API explorer says "Activity Assignees". And as noted in comment it must have the upper case A's.


I wouldn't have thought that just a membership would be deceased. As for logic, I've always made the assumptions that it's a safeguard from 'accidentally' soliciting membership renewals.


How to alert an admin that a credit card used for recurring payments is coming up to the Expiry Date

You could try using our Expired Credit Cards extension:
https://civicrm.org/extensions/expiredcreditcards
https://github.com/agileware/au.com.agileware.expiredcreditcards

This is a CiviCRM extension that automatically creates a new Activity,
Credit Card Expired based on the Credit Card Expiry Date for a stored
credit card token. The Activity Date for the Activity is set to the
1st day of the month after the Credit Card Expiry Date. The Credit
Card Expired, Activity can then be used to set up Scheduled Reminders
to notify the Contact that their credit card is about to expire or has
expired.


When does civicrm-webform remove you from groups?

Webform-CiviCRM will remove you from a group:

Only if you are logged-in or following a checksum (or otherwise selected as an existing contact)
Only if the group is presented on the webform as a checkbox/multiselect field and you deselect it.

In other words, the user has to make an active choice. Filling out the form as an unknown user, you're not consciously choosing to un check the box (it just defaults that way) so in that instance the module will only add, not remove you from groups.

BTW it works that way for all webform fields. The module will not delete any data from a contact record unless that contact has already been identified and the data was pre-filled on the form and the user made an active choice to erase it.


The formal title is used for an additional prefix. For example, in German someone might be called Herr Dokter Suchandsuch, where "herr" stands for "mister" and "Dokter" for doctor. So it can be used for those kind of cases.

If you want it to be visible on the contact summary you can switch it on with Administer>Customize Data and Screens>Display Preferences>


Self referential Smart Group - good idea?

I've been reading the code, and I think this is pretty safe, at least on server with MySQL 5.7.5+ or MariaDB 10.0.2+ (if your database is older than this, it's pretty old).
The code that updates smart groups has various checks in place to make sure it only does each group once in a request.
All the contacts in a smart group are stored in a "cache" table. (A cache is a temporary store of data that can be recreated as needs be, e.g. when updating the smart group). The cache is entirely separate from the manually added/removed contacts; the cache contains and only contains all the contacts in the group, whether they were included manually or because they match the criteria.
The process is:

Delete all the cache records for this group. This is important in the example of this question, since it means the search for "contacts whose related contact is in the group" will only be looking at the related contacts that are manually included in the group

Creates a temporary table to store new cache entries.

Add to the temporary store by running the search, excluding any that are manually removed. In this question: this means we'll be adding the individuals that are related to the local campaign groups, unless they have been manually removed from the group for whatever reason.

Add to the temporary store a copy of all those manually added. Of course these contacts may already be in there (from step 2), but that's fine, it ensures every contact is only included once. By now, the temporary store has a copy of everyone that should be in the group. In our example, it means the temporary store now includes:

All the local campaign groups (and possibly other contacts) that were manually added to the smart group.
All the activists related to the local campaign groups, unless they had been manually removed.

But it goes on if this group has any child (sub) groups. This is not relevant to this question but I thought I'd include it for completeness' sake...

For each child group, it looks up the contacts in that, exclude any manually excluded from our group, and adds these to our temporary store (again, ignoring any duplicates).
It will also refresh the cache of any child smart groups, so if there was a smart group within the child groups that referenced our main smart group (!) it would not result in an infinite loop because it knows we've just updated [are updating] that, but I'm unclear what contacts it would see because:

if it goes on the cache table, that's empty at this point.
if it goes on (manually added + cache table) then it will see the manually added contacts only.

Finally, it empties our group's cache (again? I wonder why...) and copies all the entries from our temporary store into the cache table, and we're done!

So: I think, miraculously, this should actually work and be safe for the purpose stated in my original question!
Please comment, or post other answers though if you have any experience to share.


Generating extension menu when extension is installed

It's strongly recommended you use the navigationMenu hook in your extension.php file.

function civisocial_civicrm_navigationMenu( &$params ) {
    $maxKey = ( max( array_keys($params) ) );
    $params[$maxKey+1] = array (
        'attributes' => array (
            'label'      => 'Civisocial',
            'name'       => 'Civisocial',
            'url'        => null,
            'permission' => null,
            'operator'   => null,
            'separator'  => null,
            'parentID'   => null,
            'navID'      => $maxKey+1,
            'active'     => 1
    ),
        'child' =>  array (
            '1' => array (
                'attributes' => array (
                    'label'      => 'Settings',
                    'name'       => 'Settings',
                    'url'        => "civicrm/admin/setting/preferences/civisocial"
                    'operator'   => null,
                    'separator'  => 1,
                    'parentID'   => $maxKey+1,
                    'navID'      => 1,
                    'active'     => 1
                ),
                'child' => null
            )
        )
    );
}

This will add a entry Civisocial in your navigation table along with a child called Settings.


How to prevent fraud attempts on Contribution pages?

How hard this will be depends on how determined the service abuser is to adapt to the defenses you introduce, and how easy a target your site is compared to other sites available to the attacker. If you are seeing a significant level of abuse, this indicates that your site is one of the lower hanging fruit.

Here are a couple of options I've seen have good effect -

fail2ban - We've used fail2ban effectively for assorted spam and abuse prevention. An approach to this looks like:

Add a custom form validation hook to your contribute form.
In this hook, error_log to some logfile.
Add a fail2ban jail with this logfile which uses iptables to ban addresses that look suspicious.

There is a risk of banning legitimate IPs here, eg a single IP which many supporters sit behind (maybe you are a union and half your members are behind a certain corporation's firewall) or your own head office if they make a large number of transactions. So this is an approach to use with some considerations.

This approach is more effective if you are seeing repeat abuse from the same IP addresses; you can identify this by inspecting your webserver logs for the contributions (grep for POST requests hitting civicrm/contribute/transact then group by IP and count requests).

custom spam checks - I've seen form abuse drop off entirely simply by adding an additional required question. You can add this to your form, then use JS in your page to hide the field and populate it. This can be more effective than reCaptcha because reCaptcha is common enough to be worth automating for a botnet, but if your form is one of several they are outsourcing their CC checks to, then you only need to make your form less easy to abuse than others.

This approach is effective against abuse where the attacking engine is less sophisticated than a web browser (ie lacks the JS engine in the browser). It's easy to test out.


Scheduled Reminders for 'on behalf of' Memberships

It seems that the Memberships must be INHERITED by the permissioned employee as well.


Best Approach to Series of Events - Sold as a Package

As I understand the price of the event is the same, regardless the classes the participant wants to attend. You can extend the participation with a custom field that registers to register the classes.


How to include validation fields to find user for a contribution page to avoid duplicate?

Your question suggests you may need to reread https://docs.civicrm.org/user/en/stable/common-workflows/deduping-and-merging/ and then set up your matching rule as you describe and use that. if they match then it will add data to the existing contact rather than create a new one


"Access denied" after IP address change (WAMP; Drupal)

Setting up a new database isn't necessary.  For folks who encounter similar issues in the future:  after checking your BASE_URL setting in civicrm.settings.php, delete your templates_c folder (found here), clear all CiviCRM caches, and rebuild your menus.  Details on the latter two items are available here.


Where is the link between a CiviCRM contact and Wordpress user stored in the database?

Great question!
The matching between the CMS user and the CiviCRM contacts relies, like most "relationships" between entities in CiviCRM, on an additional table that maps the IDs between the two entity types.
For the Contact to CMS User match you're looking for the civicrm_uf_match table. This table has the following columns:

ID - this is the Unique ID of the match record.
DOMAIN_ID - this is the Unique ID of the CiviCRM domain in a multisite setup.
UF_ID - this is the User's ID in the "UserFramework (UF)" (this is what CiviCRM calls the CMS).
UF_NAME - this is the User's Username or Email address in the UserFramework.
CONTACT_ID - this is the Unique ID of the CiviCRM contact that matches to the User.

Hope this helps!


How to send A and B messages at the same time?

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

drupal_root=/var/www/drupal

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


When I go to run the API, I get errors looking for examples

Git history shows this bug to have been already fixed on 6th June 2015. Please upgrade to the latest version of CiviCRM and try again.


How to add relationship at the time of new user creation in drupal?

You could create a Drupal rule to achieve this provided you have that functionality turned on.

Could use the 'Civicrm contact has been created' event.

Checkout the Drupal 7 rules module: https://www.drupal.org/project/rules
Civicrm comes with Civicrm rule intergration module which you can enabled (although you may not need to enable this).


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

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


Setting up rule to link CiviCRM contact with Drupal 7 account

First, make sure you have Drupal Rules module and CiviCRM Entity module installed and enabled.

Next, you must name your rule and select an event first and click save, then the condition and action options will be opened up to you.

When you get to the action part, you will see options for how to assign the username (such as "use email address" or "first name.last name", etc. and you can chose if the contact is emailed or not. If you chose for the contact to be emailed, they will be emailed a one-time link to log in and set a password.

Alternatively, you can import the rule instead, using this code:

Go to Administration » Configuration » Workflow » Rules and click "+ Import Rule". Then, paste the following code in and click import:

{ "rules_create_drupal_account_from_civicrm_contact" : {
    "LABEL" : "Create Drupal Account from CiviCRM contact",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "civicrm" ],
    "ON" : { "civicrm_contact_edit" : [], "civicrm_contact_create" : [] },
    "IF" : [
      { "NOT civicrm_entity_user_exists" : { "civicrm_contact" : [ "civicrm_contact" ] } }
    ],
    "DO" : [
      { "civicrm_entity_action_create_user" : {
          "USING" : {
            "civicrm_contact" : [ "civicrm_contact" ],
            "is_active" : "1",
            "notify" : "1",
            "signin" : "0",
            "username_format" : "email"
          },
          "PROVIDE" : { "civicrm_user" : { "civicrm_user" : "Created Drupal User" } }
        }
      }
    ]
  }
}

Note: this code will do the following: Upon updating a contact record in the CiviCRM, it will check to see if the user has a Drupal account and if not, it will make one using the contacts email address. Then it will email them a one-time link to set their password. You can use this code and then edit the rule to tweak the activity.