Does anyone have a recipe for Commerce / Rules / CiviCRM integration? I'm helping a group that has a small Commerce store on the site (Drupal 7, CiviCRM 4.6.9) and I'd love to be able to push data from Commerce purchases back into CiviCRM. I have seen some general talk about CiviCRM Entity and Rules integration being able to do this, but I'm curious if anyone has a recipe that is working for them that they would be willing to post -- including the Rule's event(s), condition(s), and action(s) to do this.

I'm assuming the event should be upon successful checkout in Commerce, but I haven't determined the best way to handle conditions and actions.

Ideally I'd love to be able to do the following:

Push first name, last name, billing address into the CiviCRM contact that is already created (but just contains email address)
On a product type basis (or if necessary, a line item basis) push a contribution onto this contact record, tagged to the appropriate contribution type. (e.g. we have set up the ability to 'add a donation to your order' in the Commerce shopping cart, so we'd like to be able to split apart the physical product purchase into a 'store purchase' contribution, and push any add-on donation as a 'donation' contribution).

Exported Rules:

The description of what I'm trying to do is below, and you can download (and/or pitch in) on the current versions of the Rules below at this GitHub repo.

Problem Areas:

In creating the CiviCRM Contribution record, I haven't been able to figure out how to set the Receive Date. I can't input the token for the date of the order because that is of type Date and the CiviCRM Receive Date field only allows data of type Text. Pointers/ideas welcome as currently it leaves the date off completely in the inserted contribution record.
Also less than ideal is leaving Fee amount and Net amount blank...
This seems not to work unless the purchaser is an administrator so I've got some further digging to do on permissions

With a lot of trial and error, I have a start on this. This is a work in progress, so feel free to chip in on remaining items if you have an idea or have thought of a better way.

Needed Modules:

Rules
Commerce
Commerce Donate (if you want to allow a donation to be added in a shopping cart, so they don't need two checkouts)
CiviCRM Entity
Conditional Rules (to add some conditional logic to the rule)

Working Elements:

Add some contact info to the CiviCRM contact
Add separate contributions to the CiviCRM contact depending on type (store item, donation, shipping fee)

Instructions:

Set up Commerce Donate and have a pane on your checkout to allow someone to add a donation to a store order:

Now go to Rules (Configuration > Workflow > Rules) and create a new rule. I ended up breaking this into two separate rules but after I discovered the Conditional Rules module I'm pretty sure I could have done it in one.

First rule: Add contact info to CiviCRM on store order

Events: Completing the checkout process
Conditions: I don't think any conditions are needed. I have a few in there from testing currently but I don't think they affect anything.
Actions:

Fetch entity by id with Entity type = "CiviCRM Contact" and Identifier = "commerce-order:owner:civicrm-contact:id"

Fetch entity by id with Entity type = "User" and Identifier = "site:current-cart-order:uid"
Fetch entity by id with Entity type = "Commerce Customer profile" and Identifier = "site:current-cart-order:uid"
Set a data value selecting "civi-contact:first-name" and using the value "[customer:commerce-customer-address:first_name]" (do likewise for any other information you want to pull from the Commerce profile and insert into the appropriate CiviCRM field)

Second rule: Add contribution info to CiviCRM on store order

Events: Completing the checkout process
Conditions: Same as above; I don't think any conditions are needed. I have a few in there from testing currently but I don't think they affect anything.
Actions:

Fetch entity by id with Entity type = "CiviCRM Contact" and Identifier = "commerce-order:owner:civicrm-contact:id"

For each contribution type (e.g. donation, store product, shipping fee) do: Add a variable to capture the total amount for that type. (e.g. donation_total) and set it to 0 to start.

After all variables are added, Add a loop to the rule's actions
Within this loop, Add a switch on Data to match against = "line-item:type" (switch functionality is provided by the Conditional Rules module; this is assuming your store products are set up as different types -- e.g. Donations as a donation type)

For each contribution type again, within this Switch, add a Case (again provided by Conditional Rules) and select the type of product in the Data value. Select "Fall through" as False.

Within each of these conditional Cases, add two new actions. The first one is to Calculate a value (input value 1 as the respective variable you set up above, e.g. donation_total, and input value 2 as line-item:commerce-total:amount-decimal and the operator as + for addition). The second action within this case is to Set a data value on the donation_total variable, using the value you just calculated.

After all of the Cases have been added to the Switch, add a new root level Conditional for each product type, to make sure the total for that type is greater than zero before creating a Contribution record. To do this, choose Add conditional and then within this conditional, choose Add if with a "Data comparison" to make sure it isn't empty (or is greater than zero).
Within this final If, we can add a new action to Create a new entity, selecting CiviCRM Contribution. Within here, I've added a number of direct input/hard coded values such as:

Financial Type ID = 1 (for donations, adjust as needed for other types such as a custom 'Store purchase' financial type within CiviCRM)
Total Amount: use the variable that you created and have updated for this type, e.g. total_donations
Contact id: civi-contact:id
Payment Instrument ID: kind of hackish but I've just entered a hard-coded value for credit card purchase (4)
You can add a direct input value in the "Contribution source" field and "note" field if you like


Internal links in a Mosaico template? Using CiviCRM 4.7.22.

My customer wants to have internal links in the newsletter template. They could do this in the 'old' CiviMail editor using the flag symbol.

It is not obvious to me if the same functionality is available in Mosaico and if so, how to achieve this?

By "internal links" do you mean anchor links? A link that would go to another spot in the email? If this is the case, it might be answered here: How can I set up anchors in Mosaico mailing?


How to create a recent new contacts report? I'm trying to create a report of recent new contacts, ideally to make it available to our team as a dashboard widget.
I've managed to get a report with the results I want using the Contact Logging Report (Summary) template, but the columns in that (Action, Log Type, Altered By) will be fairly meaningless to the team, so I want the same results displayed with useful information each contact: things like Job Title, City, e-mail, phone, etc.
I've found an old answer that suggests the ability to add columns to templates doesn't exist in CiviReport. Is this still true? And if so, are there any work arounds or extensions that can achieve the same result? I've checked the Extended Reports extension, and even in there I can't find any templates that include both the contact fields and the logging information needed to get a list of recently added contacts.
I'm flexible as to how recent a list I get, as long as it can be sorted with most recent first. And I'm flexible as to exactly which columns I end up with, as long as they're ones that are meaningful to my users.

I am not sure if there are any extension that you do your job using reports but you certainly achieve this via other methods

If you are on Drupal than you can use views to create the list by sorting created date by descending order.

You can also use Data Processor extension to create dashlet or search report with your own columns and  sort by created date by descending order.


Error message in CiviMail: "Mailing has not been saved, Content maybe out of date, please refresh the page and try again" After upgrading to CiviCRM 4.7.28 in WordPress, when users are trying to draft mailings in CiviMail using a template (which contains unsubscribe/opt out/resubscribe/subscribe tokens, the {domain.address} token, and URLs to our website and Facebook), when CiviMail tries to autosave the draft, the user gets this error message:
"Mailing has not been saved, Content maybe out of date, please refresh the page and try again"
This error does NOT occur when not using a template, but if you use a template when you start a message, and then delete it, the error does continue to occur. It seems like it's related to the template but I can't really understand why.
Anyone have any ideas on why this would be occurring and how to fix it?

I puzzled over this problem after a 4.7.28 upgrade for hours before reading this post. Turning off and on Ckeditor worked for me, which gave me another idea.

Since this happened to me with two sites, I tried clearing all caches on the second site and that did the trick. I suspect changing the ckeditor setting flushes a cache, and flushing the cache is the real fix.

I flushed all the caches I have so I'm not sure which is the one that really does the trick:

drush cc all (only works on drupal)
Rebuild the menus: http://yourdevsite.org/civicrm/menu/rebuild?reset=1
I deleted all the files in files/css/, files/js/, and /files/civicrm/templates_c/en_US/*


How to copy a Custom Field in a related Contact's Custom Field? I use a Webform to register both Parent and related Children to an Event.

I would like them to share a common Participant Custom Field information : this does not seem possible, since each Participant has his own.

I think of different options, but I don't know if they are possible :

Option 1 : in the Webform : set Child field i to Parent field j Value : but, as far as I know, this is not possible with the standard Webform Conditionals ; is there any Webform extension to do that ?

Option 2 : independantly from Webform : create a Rule (?) (and a CRON Job ?) to copy Parent field j Value to his related Children's fields i. But I don't know wether this is possible, nor how to do that.

Any help or suggestion is welcome (I am not a developper)

The option of creating a rule is a probably an easy solution. There is a Drupal module to have a tirgger in civirules when a webform is submitted (https://lab.civicrm.org/partners/civicoop/webform_civirules)

Why do you want to store the information twice in your system and only ask once?


How to use Gsuite Relay as SMTP for CiviCRM bulk mailing? I have Gsuite email setup with our own domain (name@ourdomain.com). I have tried to use mailgun with gsuite. Although it worked ok ish, as the number of contact increasing, bills are also increasing.

Since there is Gsuite relay service available which allows 10000 emails per day, we would like to setup our CiviCRM with it, so we can use it's full potential.

I have read this post How to use G Suite / GMail as your CiviMail Provider but not able to get SMTP working at all from civicrm's side.

We are currently using cpanel hosting and SMTP mailserver already setup on there which allows only 250 emails. Not very efficient and not sure if that causing any issue while setting up gsuite relay.

Did you manage to successfully setup Gsuite and currently using without any issue? If yes, would you please share some thoughts or tips what issue you have encountered and how you have solved it?

EDIT: I have tried to follow the steps as per the instruction on above tutorial and getting this results. I have tried different combination of ports and authentication settings on Gsuite, but no luck. I am using the email with our domain for signin example@ourdomain.com, and app specific Password to set the SMTP

It seems there is a difference between sending via Gsuite and Gsuite SMTP Relay ...

For sending via Gsuite, and comparing the connection details in the post you linked to with a site using this, the difference is that it uses SMTP host ssl://smtp.gmail.com

The main practical limitations are the limits and that all mails get sent out with the sender of the Gsuite account, not the address you configure in Civi.

I haven't tried Gsuite SMTP Relay


Can "Find Activity" automatically shows result with set parameters without going into selection every time? For my volunteers I want to create an activity search based on set parameters, i.e. Phone, email. & scheduled. So they do not need to select parameters everytime.

If I enter &force=1 in the url the search automatically executes search function. Is there any shortcut like this for above criteria?

You can do this with an Activity Report. Reports menu > Contact reports > Activity Report. Set your parameters then save as a new report.


Countries with Multiple World Regions Is it possible to have a country with more than one world region?  I like the functionality of the world region search but I would like for some regions to be smaller (North America vs. South America) but also have them grouped together as in the current world region (America South, Central, North and Caribbean).

One way of getting around this situation is to create a group of contacts in each county and then creating a regional group that includes all of the appropriate country groups.  I'm hoping that there is a different way to accomplish this same task.  Thanks.

You can also have a look at the area extension (https://civicrm.org/extensions/areas)
In the area extension you can define custom areas and automaticly assign them to a contact based on his address data.

For example if you have the area Benelux, which consists of the countries Belgium, Netherlands and Luxemburg. You configure the area Benelux to be applicable when the country of the contact is either Belgium, Netherlands or Luxemburg.

Below a screenshot of the contact card and areas for east coast and washington dc.

See the extension page for more examples.


Royal Television Society payment problem I am trying to register for the RTS Virtual Careers Fair 2021, but no matter what card I try, I keep getting a denial message. Can you please help? I am accessing the payment from this page, empowered by you https://rts.org.uk/civicrm/event/register?id=446&reset=1
Thanks.
Kind regards,
Gergana Georgieva

We are the support providers for the Royal Television Society, we'll take a look and come back to you.


How to load my page in a popup window? I want to load my page (Generated by extension which is created by me) in a new popup window. Someone please tell me how to do this?

You can use "crm-popup" class. you just need to add this class to your a tag. just it!

Just like this:

...

For more information please follow the Documentation: https://docs.civicrm.org/dev/en/latest/framework/ajax/


Image cropping with TinyMCE in Mosaico Does anyone have image editing enabled in Mosaico through TinyMCE?
I assume it is possible through Mosaico Toolbar Configurator.
Additionally, what would be truly wonderful is if there was a way to crop images within Mosaico to a specific aspect ratio. One big problem we have is users who are unable or unwilling to crop images on their computer, especially to a specified aspect ratio. If there were some way to make this possible in Mosaico, that would save a lot of headache.
As far as I can tell, this isn't possible in TinyMCE image editor. In MoxieManager for TinyMCE, it is in theory possible to specify the width of an image and then crop to a specific height, but that relies on either carefully selecting exactly the height you want or entering it (which doesn't allow you to select the image area to crop to).

I implemented an image editor which you can grab here: https://github.com/lcdservices/biz.lcdservices.mosaicoimageeditor
I built it for a specific client and have not yet tested how portable it is in other installations. But at the very least it should get you started.
Actually -- just reviewing it, and the method for storing the image via API is client specific. At some point I'll generalize it so it's useful for the community. It implements: https://github.com/scaleflex/filerobot-image-editor


How can I find contacts who have multiple home email addresses when on hold? I would like to be able to easily check contacts with emails on hold designate other emails as primary, so the contacts continue receiving emails. I can make a profile to show primary and home, billing, other etc email addresses to quickly see which contacts have other email addresses. However, I can't figure out how to easily see if a contact has more than one home email address, as the search view only displays the first one. Is there any way to make this visible in a search view or even searchable?

There isn't any UI in vanilla civicrm install that provides a way to find multiple same email address or phone or address for a contact. You can either use Mysql knowledge to get all the duplicate records or create an extension to manage from UI


Show default country and state for public proximity search I'm trying to figure out how I can set public-facing proximity searches in 4.7.25 to default to civiCRM's default country?

Currently, the user is required to select a country and state, but 99% of our searches happen within the same country.

is there a way to set this?

The profile search fields respect the system-wide default country.  To set the default country:

Administer menu » Localization » Languages, Currency, Location.
Default Country is located about halfway down the page.

Screenshot:


How do I configure SMTP with STARTTLS? I know that CiviCRM can send e-mail using SMTP and SSL by prefixing ssl:// to the SMTP server name, but my organization uses Office365, which only supports SMTP with TLS. Is there a way to get CiviCRM to work with the Office365 SMTP server (ideally without resorting to Postfix and sendmail)?

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.


Report of activities with sums on custom fields I am quite new to CiviCRM but I have programming skills with Drupal so I am looking for a best practice for our needs - and if programming is needed I would appreciate any links / information / hint how ro so that well in CiviCRM.
We have some custom fields on activities where we store some data like campaigns (this data is stored in three simple text fields where campaign names are saved - it has nothing to do with Civi) and for newsletter unsubscriptions we store the reasons why people unsubscribe (this is stored in Activity details field).
What we now need is a report showing us the sums of Activities gained by campaigns and unsubscription reasons. For that Civi need to sum up the Activities of the current month by the values in the fields.
In short: we need a list of the values stored in a period in a custom field of the activities with the sum of activities which have this value in the corresponding field.

I think you can do this with  https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport extension


I don't see any Dashlets I just installed CiviCRM.
Now I wanted to input a Dashlet into the Dashboard.

But when i click on Configure Your Dashboard  it shows nothing.
I also created a report with the option make available in dashboard.
Am I doing something wrong?

Dashlet problems can arise when you have the wrong settings in either

Cleanup Caches and Update Paths (Administer - System Settings - Cleanup Caches and Update Paths)
Resource URLs (Administer - System Settings - Resource URLs )

Differences can be as small as http vs https and with or without www.


Civisualize: Creating Your Own Visualization concept question Is CiviVisualize and the CRM API designed so that when someone wants to create their own visualizations, they only have to create a template in templates/dataviz/? Then, using the CRM API they can call a SQL Search Query in the template.tql file to customize which data they want to represent. Or, is there more files that must be created?

for creating a new visualisation, you only need to add a template into template/dataviz indeed.

You will need to fetch some data to display it. They are two ways for that, either you are lucky and what you need can be taken with an existing API, and you simply have to

var data={crmAPI entity="Something" param1="42"}

but more often than not, you will want to aggregate data or do more sql massaging, in that case, you will need to create an extra queries/lizzy.sql

and then you can use it as

var data={crmSQL query=lizzy}

and voila ;)


Why is date_created field is ignored for Contact creation via API? when I attempt to import historical data to seed the CRM, created_date is ignored and today's date/time is used instead. Using the API explorer, it looks like the date should be saved, but, when I do a subsequent get, it has today's date:

https://somewhere.com/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","created_date":"2018-01-01","first_name":"Peteww"}

returns:
{

"is_error": 0,
"version": 3,
"count": 1,
"id": 288,
"values": {
    "288": {
        "id": "288",
        "contact_type": "Individual",
        "contact_sub_type": "",
        "do_not_email": "",
        "do_not_phone": "",
        "do_not_mail": "",
        "do_not_sms": "",
        "do_not_trade": "",
        "is_opt_out": "",
        "legal_identifier": "",
        "external_identifier": "",
        "sort_name": "Peteww",
        "display_name": "Peteww",
        "nick_name": "",
        "legal_name": "",
        "image_URL": "",
        "preferred_communication_method": "",
        "preferred_language": "en_CA",
        "preferred_mail_format": "",
        "hash": "74c74a58f64681a6e3a4f8d9ccd32bfd",
        "api_key": "",
        "first_name": "Peteww",
        "middle_name": "",
        "last_name": "",
        "prefix_id": "",
        "suffix_id": "",
        "formal_title": "",
        "communication_style_id": "1",
        "email_greeting_id": "1",
        "email_greeting_custom": "",
        "email_greeting_display": "",
        "postal_greeting_id": "1",
        "postal_greeting_custom": "",
        "postal_greeting_display": "",
        "addressee_id": "1",
        "addressee_custom": "",
        "addressee_display": "",
        "job_title": "",
        "gender_id": "",
        "birth_date": "",
        "is_deceased": "",
        "deceased_date": "",
        "household_name": "",
        "primary_contact_id": "",
        "organization_name": "",
        "sic_code": "",
        "user_unique_id": "",
        "created_date": "20180101000000",
        "modified_date": ""
    }
}

}

but when I do:

https://somewhere.com/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=get&api_key=userkey&key=sitekey&json={"sequential":1,"return":"created_date","id":288}

I get:
{

"is_error": 0,
"version": 3,
"count": 1,
"id": 288,
"values": [
    {
        "contact_id": "288",
        "created_date": "2019-04-15 18:00:01",
        "id": "288"
    }
]

}

Mike,

Unfortunately you can't set created_date in create api of Contact since there is a trigger which will over-ride your created_date value

DELIMITER $$
CREATE TRIGGER `civicrm_contact_before_insert` BEFORE INSERT ON `civicrm_contact` FOR EACH ROW BEGIN
SET NEW.created_date = CURRENT_TIMESTAMP;
 END
$$
DELIMITER ;

Either you can delete this trigger or update the contact using same api by passing contact id to set created_date after its been created

https://somewhere.com/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","last_name":"test","first_name":"Peteww"}

https://somewhere.com/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"id":"288","created_date":"2018-01-01"}

Thanks


How to embed or attach a list of contacts in an email? My users want to send an email from Civi that will have a particular group of contacts embedded in it or as an attachment. The group is featured in a report, so emailing the report seems like the solution, but they want to preface the report with some words.  How to embed or attach the contact list or report into an email sent from Civi?  This is using Drupal so perhaps Views is an option?

Sounds like you're looking for CiviCRM Views Token.

This is a Drupal module which allows you to place a token in your CiviMail that will be replaced with the output of a Drupal View.

To use it:

Install and enable CiviCRM Views Token
Build your view of contacts in Drupal - keep the output simple, eg a table or an unformatted list.
In your CiviMail edit screen, look for "Configured Drupal View" in the token selector.
Place the desired view in your email, eg {civicrm_views_tokens.viewcontactlist}


How to share the user profiles with other users? The requirement is if Contact A's specific field values(custom fields) are matching with Contact B field values then Contact C(Admin) should b able to share
Contact A's profile with contact B by civimail. The profile should be of drupal view page of type Civicrm Contacts
I tried Fuzion tokens extension to attach the user id and use the link as template for civi mail-
"http://localhost/example.com/profile-page-view?uf_id={user.id}" but this will attach their own profiles(Recipients own profiles)
Admin will be finding the matching contacts using advanced search and find matches and sends email
Any help would be appreciated.

You could use the custom field value as a Contextual Filter and hence only show results to B for contacts where the other contacts' custom field matches that of B. I am not quite clear on how to do this but getting the value from B and applying it as a filter on the view seems like it should be entirely feasible.

Alternatively could you consider basing this on Relationships between B and A.


Using hooks -- simple please I am excited to be working with civicrm, but I am quite frustrated at this point and so I hope someone can help me.

I can see how valuable hooks are, and it seems like they are actually very basic to implement, but I need a small amount of pre-knowledge to use them.  I have read every link I could find about hooks to change forms and yet I find myself lost.

I did find one example that fit my needs exactly, and would be a great learning experience ... but the description leaves out a lot of necessary information for someone as new as me.

Can someone walk me though implementing this? It comes from How can I set “Assigned To” for an Activity to default

The extension mentioned in the comment above is:

function myextension_civicrm_buildForm($formName, &$form) {
  if ($formName == 'CRM_Activity_Form_Activity' && $form->action == CRM_Core_Action::ADD) {
    $form->setDefaults(array('assignee_contact_id' => $form->_currentUserId));
  }
}

How do I find the 'create activity' form this relates to?

  I got that answer myself -- CRM _ Activity _ Form _ Activity
  means the php file is in

  /var/www/drupal/sites/all/modules/civicrm/CRM/Activity/Form
  and then activity.php

Do I copy the form to my /var/www/drupal/sites/all/modules/civicrm_extensions directory?
Do I put that function inside the form I copied?
Do I create that as a file?
If a file, what do I name it?
Where do I put the extension once I create it?

You are all very helpful and I appreciate it. Thank you in advance for any help you can give me on this problem I face.

Just a note about searching for answers: About a month or two ago I found a web page that explained some of this to me but for the life of me I fail to find that page today. I did find a lot of links that looked like they could help but a whole mess of them led to (Page Not Found) on http://wiki.civicrm.org/confluence/display/CRMDOC/. Seems a lot of pages were deleted or renamed.

Thanks again.

To use a hook, you can:

Write a CiviCRM extension.  This is the preferred method.
Write a Drupal module.
Write a Joomla or Wordpress plugin.

The easiest way to write a CiviCRM extension is to install civix and run civix generate:module org.myorg.myextension.  Then you can edit myextension.php and paste in that code.

However, as that page says - this presumes that you have a basic knowledge of PHP, Unix, and object-oriented programming.  If that's not a skill you're going to learn today, and you want to cheat a little - take an existing extension and hack it!  Download an existing function, preferably one that does very little, and modify it to your needs.  I just uploaded an extension to Github that fits this need exactly here.


Pledge payment off contact dashboard: "DB Error: No Such Field" Drupal 7 / CiviCRM 4.7

When I create a Pledge and view it in my contact dashboard, I can see all of my pledge payments and their dates. If I select "Make Payment" it sends me to a page like: civicrm/contribute/transact?reset=1&id=31&pledgeId=3 and then errors out, "DB Error: No Such Field".

Is this implemented currently in CiviCRM, or is there a configuration missing?

This is a known bug and is documented and fixed at CRM-21465.  You will need to apply the patch to fix the problem or will need to wait for 4.7.30 release.


Formatting of formatted text in print case and activiy audit I'm sure this shoudl be fairly straight forward.  I think i'm looking in the wrong place.

When I try to print the report of a case (civicrm/case/report/print?) or undertake an activity audit of a case, any text that has been entered usinjg the WYSIWYG editor is displayed as raw text.  So any paragraphs are enclosed within  brackets etc.

Practically, this prevents these functions being used as the printed reports are nearly illegible (due to no line breaks and lots of angle brackets everywhere).

Hope this is clear and someone's got a quick solution.

I'm thinking i'll need to recreate these functions as a complete drupal view of the case, but would appreciate any other suggestions / approaches

I see - a custom field, not the main details field.

A couple things I think. There is a security issue with not escaping the fields, so in that sense it is being correct to escape the brackets etc, but better would be some type of sanitizing that leaves formatting but removes malicious parts. I'm not sure if this is the job of the wysiwyg editor itself or the civi code that handles the data.


What is the server IP in database trigger definitions? We just did a MySQL server migration. I completely cleared out all the triggers and executed

  https://test.sdcbcdream.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1&triggerRebuild=1

This rebuilt the triggers. When I examine them, though, they all have for the definer field

  sdcbc@173.236.128.0/255.255.128.0

The IP for the new MySQL server is 208.97.161.77. Where is the rebuild trigger function getting the other IP? I believe that was the old IP, but am unsure as that server has been decommission by our host service.

We are running CiviCRM 5.10.3 on WordPress 5.1

Thanks for any help

Thanks to comments by Demerit, my confusion arises from the fact that our MySQL server and web server (with core CiviCRM files) are separate. The 173.236.128.0/255.255.128.0 mask matches our web server and so that definer field in the trigger just indicates the server from which the triggerRebuild command was executed. There was nothing wrong with our website operation. I just didn't understand the source of that IP, thinking it should match the IP of the MySQL server, which is wholly different. A good argument for a true VPS where you have full control of both Apache and MySQL on the same server.


System Status page empty and status remains 'critical' after updating from 4.7.8 to 4.7.11 on Drupal 6 This is a Drual 6 site with internationalization enabled for CiviCRM. There are no extensions installed. Site was updated from 4.7.8 to 4.7.11.

After running the db update script, the System Status in the footer has remained "Critical", despite the only red flag prior to the update being that the site needed to be updated.

When visiting the System Status page, it no longer displays any setting statuses, including the usual greens for php version, etc.

After running the db update script for 4.7.11 there were no errors on the update screen - back on the dashboard, however, the widgets failed to load and there was a DB error, but refreshed the page and it went away (and widgets came back) and hasn't come back since. The logs showed the DB error was due to a timezone error (I can paste the log details if desired).

The timezone issue is not appearing in a pop-up as (like I've seen on other sites), it is unknown if the error is the cause of what's breaking the system status page as I have been ignoring the timezone issue since it's not critical. Either way, this does not explain why the system status is now displaying as critical.

Thanks for any suggestions!

Update: issues still present in 4.7.14

For some the answer has been to resolve the Timezone error, if it is present - see: http://civicrm.stackexchange.com/questions/14841/error-datetimezone-construct-unknown-or-bad-timezone-7200

If you have stumbled upon this thread more recently - we found a blank status page after a recent upgrade from 4.6.30 to 4.7.27 where there was no timezone error, in fact, no errors at all in the logs. The solution was to change "Asset caching" from "Auto" to "Disable" (/civicrm/admin/setting/debug?reset=1).


Cannot Assign Multiple Roles to Case Using CiviCRM 4.6.

In CiviCase I was unable to assign a second role on a case. I need to have a Case Coordinator AND a second assignee.

In this case, an Event Rep. If I set the Case Type to use the Case Coordinator as the assign To default, my name appears in the case, but I cannot add a contact name to the Event Rep role.

If I set the Case Type to use the Event Rep as the default Assign To, my name shows there when I open a new case, but I cannot then assign a contact to the Case Coordinator role.

Always limited to just one Assignee. I saw some similar issues posted here late last year, but following that case they were supposed corrected.

I checked the code fix on this file: CRM/Contact/BAO/Relationship.php
(ref "Fix for multiple role assignment between same contact cases #6439" ).

My Relationship.php file matches the updated file, so I'm guessing it is something else.

Short screen vid showing what I am experiencing (1:37 min) here:

https://youtu.be/vYLhkqB9kY8

I'd appreciate any suggestions. Thanks in advance.

I believe the issue, certainly as per the youtube video, is because the Case Contact is not of type Individual, while the Relationship you are trying to use, Benefits Specialist, is only for Individual to Individual. This unfortunately results in a silent failure. So if there is any 'fix' required here, it would be to provide an error msg saying "this Relationships is not available due to mismatching Contact Types".

We hit a similar 'why can't we reassign a case to a new case manager' and the issue in our case was that Case Manager relationship was set to be Individual to Individual but in this case the Case Client was an organisation.

The reason we were able to create the Case Manager in the first place was because these were added via webform which seemed to create the Relationship despite the Contact Type not being appropriate.


Letter Templates Pre Populate with Membership Fields I have email and letter templates that has the following

{contact.first_name} {contact.last_name}

{contact.contact_id}

{membership.end_date}

Now all these only show when you search for memberships and print from the search.  The membership end date does not show when the 'print pdf' option is selected from the contact.

Is there anyway they can all show when you go to print from pdf on the contact.

thanks,
andy

you need to write an Extension for the membership tokens to be available in the contact summary  - please use the below link to know more

http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension

if you need more help please let me know - thanks


Can CiviCRM be managed as a group of companies, where there is a parent company of the group of child companies? An example of this Group of Financial Companies, which is the Parent company, then below it, are the other daughter companies, but that each one is granted their independent clients and their personalized invoices with their logo of each one, so , that is related to the group but that they handle their data separately within the same CiviCRM structures in a single and single installation.

I do not think this is possible out of the box with CiviCRM, with the customized receipts and invoices being the biggest stumbling block AFAIK.

However I have built integrations with other invoicing software and you might be able to solve your issues that way, but it will require development.


Install Error DB Error: extension not found Using "upload package file" or "install from folder" on a clean new Joomla 3.5.1 installation without any other extension I get this error :

Cannot open mysql://XXX:YYY@localhost/XXX?new_link=true: DB Error: extension not found

Tried 4.7.7 and for testing even CiviCRM 4.6.16 LTS -> same error

PHP Built On Linux dd36620 3.13.0-85-generic #129-Ubuntu SMP Thu Mar     17           20:50:15 UTC 2016 x86_64

Database Version mysqli 5.6.27-nmm1-log

Database Collation   latin1_swedish_ci

Database Connection Collation    utf8mb4_general_ci

PHP Version  7.0.4-nmm1

Web Server   Apache

WebServer to PHP Interface   fpm-fcgi

Joomla! Version  Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45
   GMT

Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ]
   24-Apr-2013 00:00 GMT

User Agent   Mozilla/5.0 (Windows NT 10.0; Win64; x64)
   AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94
   Safari/537.36

Tried as suggested in the WIKI

php_value memory_limit 128M

php_value register_globals off

php_value max_execution_time 600

Maybe someone has an idea what I could do to get it installed, thanks

Have you installed php-mysql?

sudo apt-get install php-mysql

To me, it sounds like PHP doesn't have the MySQL extension installed.

Meanwhile, at this point, CiviCRM doesn't support PHP 7, so if you do get this working, you'll run into that problem next.


Exporting multiple choice fields Does anyone know how to export a multiple choice field into a spreadsheet in a way that filters each response into a different column?

For example, a field has options:

apple
banana
pineapple

A contact record has "apple" and "banana" selected for the field.

In exporting their record, I would like three columns to represent the data in the field, one column for apple, one for banana, one for pinapple.

Is there a way to do this in CiviCRM, or would I need to export and then run a script in Excel?

Thanks!

I do not know of anything that can be done via CiviCRM UI to address this, so I think you would be better to manipulate it after exporting.


How to send email report FROM other than default email address? I have a report that is sending successfully every week. Only issue is I was not able to set FROM email address for the report. It’s always sent from default email address, but I need to send from different email. Can anyone suggest how to solve this issue please? Or whether it’s even possible at all? Thanks

parameters for API call is currently like this

instanceId=50
format=print
sendmail=1

I don't think it has this feature. One possibility is make an extension and use hook_civicrm_alterMailParams to check if the email is your report and then change the from.


Webform-CiviCRM recurring contributions Error? When submitting a recurring contribution on a Webform, If I select recurring for 12 months (for example), Instead of the total amount being charged and scheduled for every month. The form divides my total amount by 12 and charges 1/12 of the amount every month.
Then in Civi it records the total amount as 1/12 of the total amount but the non-deductible amount remains the actual total amount.
See screenshot

Ad 1) installments: that’s not an error - that’s a feature! It allows you to extend the concept of recurring contributions to eg paying for an Event in installments (day care centre fees eg - $4000 -> paid in 10 installments - monthly - $400/mo recurring contribution.

Ad 2) non_deductible amount - I remember fixing that - will have to check if that bug has resurfaced.

PS - If you’re looking for a classic start recurring series -> open-ended you can set installments = 0 (as per CiviCRM convention) - then the amount shown will be transacted monthly as is.


Membership Report (Detail) not showing organizational members I am using CiviCRM 4.6.2 under Drupal 7. When I run the "Membership Report (Detail)" report, it does not include the organizational members (by relationship). I can't seem to figure out how to include them in the report. Thanks for any help.

This may be because the details report has a default filter that limits results to those with a contribution status of completed.  Because memberships by relationship do not have a contribution, they would be excluded.  You can click on the Filters tab within the report, and then deleted the Completed value from Contribution status...then re-run the report.

An alternative is to use Find Memberships (directly under the Memberships top level menu), instead of the details report.  That gives you the option to select Primary Members (select Yes), Related Members (select No), or both (do not select anything.)


How to query "delivery status = unknown" on CiviMail report I am trying to see all the emails, where the delivery status was "unknown". I have been trying to change the URL parameter "delivery_status_value" to "unknown", but that gives a fail as a response. Which value should I use for querying? Or is there another way of filtering the recipients, which's delivery status is unknown? I would have downloaded the excel/CSV file, but that does not seem to work on our system.
The version we use is 4.6.36.
Thank you very much for your help!

Welcome to SE!  The first thing to note is that if you're on 4.6.36 you really need to upgrade.  There have been numerous security fixes and functionality enhancements since then.  You will also need to upgrade your version of php.  But that's not what you asked...
I needed to investigate mails with a status of 'unknown' recently.  The standard reports did not show what I wanted but the SQL behind them is a useful starting point.
From the Mailings > Scheduled and Sent Mailings screen, find the mailing of interest and click on Report.  On the Successful Deliveries line, click on Report and then go to the Developer tab.  From there you can copy the SQL, modify it a bit and paste it into a SQL session. How you modify it depends on what you want to know, but you will want to remove the 'where' clause that limits it to successful mails.
Things have changed a lot since 4.6 so this may not work for you.


First CiviCRM API call is slower, are unnecessary resources loaded? We're looking at importing a lot of data via the API call. But we've noticed that on a page load the first API call is significantly slower than following ones. Eg:

$result = civicrm_api3('Contact', 'get', array()); // Slow
$result = civicrm_api3('Contact', 'get', array()); // 10x faster
$result = civicrm_api3('Contact', 'get', array()); // 10x faster

I thought this might be because CiviCRM has to autoload a number of classes the first time it is called. However, the same classes (inspected using get_declared_classes()) seem to be called when using lower-level and faster functions, which don't have a slow first query like:

$dao = CRM_Core_DAO::executeQuery($query); // Fast
$dao = CRM_Core_DAO::executeQuery($query); // Fast

Obviously the raw SQL will always be faster, but does anyone know what could be causing this initial slowness on first API calls, or have any tips on how to debug it?

It would be great if we could optimise this since REST calls are all single page requests it can be quite slow.

They are several distinct issues:

Calling civicrm_api3, this isn't REST, and (unless requested) the code runs as admin, so probably not linked with authentication

Here, a common issue is the database access, the first time you access the underlying tables (civicrm_contact and co), mysql might not have kept them in the cache, but the second time they are and it will be several order of magnitude faster.

My guess would be that most of the difference in time is due to the database layer (that might has well be kept some cached in the DAO layer) but mostly the difference between an empty mysql cache.

When you compare with running directly the executeQuery, which one do you run? They are likely quite a few sql queries inside the api call. Do you run them after having called the api?

if you want to dig into the detail of where the time is spent, I'd recommend you to use a profiler, because it's hard enough th it, and black magic and speculation without

The REST interface. It's always going to be slower, both because of the overhead of the network and the extra authentication step (based on the keys you provide)
It will be faster if you provide a return param to the api call, to specify which fields you want. by default, it will returns tons of fields that you probably won't use, some that are from related joined tables (eg. email, phone, address, name for options or pseudo constants...).

adding a return="first_name,last_name,email" would avoid fetching stuff you don't need.


Job scheduler not working after Joomla update The Joomla 3.4.7 update changed the session handler (mentioned in this LinkedIn posting )

The job scheduler fails. Looking at the error log here
/administrator/components/com_civicrm/civicrm/error_log shows errors like the following:

[24-Dec-2015 05:24:01 America/Chicago] PHP Fatal error: Call to a member function get() on a non-object in /home//public_html/libraries/joomla/session/session.php on line 448

I also mentioned this in this other stackexchange posting but I think that posting is considered answered.

Do I need to file a bug report anywhere else?

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


CurrentUser function in Reports? I'm wondering if it is possible for the "Assignee Name" field in a report to have a Current User function. My goal is to create 1 report for the CiviCRM Dashboard where users can see all the activities assigned to them without creating a filter for each person.

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.


New Organization Button Missing On CiviCRM 4.7.22 Drupal 7, I'm missing the "New Organization" button under Current Employer. I can't seem to find figure out whether this is a settings problem or not. A previous version of CiviCRM had it.

And I haven't made any changes to the contact types or relationships.

I also checked the reserved profiles. No changes on "new_organization".

Ran into this upgrading to 4.7.22

For some reason (which I have not investigated) the reserved profiles for New Individual, New Organization, etc got their profile ID appended to their "name".

If you query the UFGroup entity in the API explorer like this:

$result = civicrm_api3('UFGroup', 'get', array(
  'sequential' => 1,
  'title' => "New Organization",
));

You should have a result like:

{
    "id": "5",
    "is_active": "1",
    "group_type": "Organization,Contact",
    "title": "New Organization",
    "add_captcha": "0",
    "is_map": "0",
    "is_edit_link": "0",
    "is_uf_link": "0",
    "is_update_dupe": "0",
    "is_cms_user": "0",
    "is_reserved": "1",
    "name": "new_organization_5", // note the appended ID, 'new_organization' should be the value here
    "is_proximity_search": "0",
    "is_error": 0
}

Digging here, here and here found that when the method to get the profile links is called with no params, the profiles names are hardcoded to the default 'new_individual', 'new_organization', 'new_household'

To fix it you'll need to revert back the profile "name" either via the API explorer:

$result = civicrm_api3('UFGroup', 'create', array(
    'sequential' => 1,
    'id' => 5,
    "is_active": "1",
    "group_type": "Organization,Contact",
    "title": "New Organization",
    "add_captcha": "0",
    "is_map": "0",
    "is_edit_link": "0",
    "is_uf_link": "0",
    "is_update_dupe": "0",
    "is_cms_user": "0",
    "is_reserved": "1",
    "name": "new_organization",
    "is_proximity_search": "0",
));

Or if you have access to and you feel more comfortable, querying the database directly:

update civicrm_uf_group set name="new_organization" where id=5;

Hope that helps.


Error deduping with custom file field when deduping contacts holding a custom file field, we're a facing the following error:

One of parameters  (value: 5667c1677bca0_3f2cb71777b83d7a5ed1cca5e7dff69f.jpg) is not of the type Integer

From a first glance at the code I think there may be a bug. As you can see in the stacktrace below, CRM_Core_BAO_File::paperIconAttachment() is feeded with the field's value while it requires the field's id as param.

Could that be?

StackTrace:

Apr 12 10:49:36  [info] $backTrace = #0 CRM/Core/Error.php(366): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 CRM/Utils/Type.php(369): CRM_Core_Error::fatal("One of parameters  (value: 5667c1677bca0_3f2cb71777b83d7a5ed1cca5e7dff69f.jpg...")
#2 CRM/Core/DAO.php(1335): CRM_Utils_Type::validate("5667c1677bca0_3f2cb71777b83d7a5ed1cca5e7dff69f.jpg", "Integer")
#3 CRM/Core/DAO.php(1254): CRM_Core_DAO::composeQuery("\nSELECT    CF.id as cfID,\n           CF.uri as uri,\n           CF.mime_typ...", (Array:2), TRUE)
#4 CRM/Core/BAO/File.php(309): CRM_Core_DAO::executeQuery("\nSELECT    CF.id as cfID,\n           CF.uri as uri,\n           CF.mime_typ...", (Array:2))
#5 CRM/Core/BAO/File.php(691): CRM_Core_BAO_File::getEntityFile("*", "5667c1677bca0_3f2cb71777b83d7a5ed1cca5e7dff69f.jpg")
#6 CRM/Core/BAO/CustomField.php(1233): CRM_Core_BAO_File::paperIconAttachment("*", "5667c1677bca0_3f2cb71777b83d7a5ed1cca5e7dff69f.jpg")
#7 CRM/Core/BAO/CustomField.php(1139): CRM_Core_BAO_CustomField::formatDisplayValue("5667c1677bca0_3f2cb71777b83d7a5ed1cca5e7dff69f.jpg", (Array:44), NULL)
#8 CRM/Dedupe/Merger.php(1411): CRM_Core_BAO_CustomField::displayValue("5667c1677bca0_3f2cb71777b83d7a5ed1cca5e7dff69f.jpg", 88)
#9 CRM/Contact/Form/Merge.php(186): CRM_Dedupe_Merger::getRowsElementsAndInfo("266847", "252170")
#10 CRM/Core/Form.php(519): CRM_Contact_Form_Merge->preProcess()
#11 CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#12 packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Merge), "display")
#13 packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "display")
#14 CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#15 CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#16 CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Kontakt zusammenführen", NULL)
#17 CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#18 CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#19 drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:3))
#20 [internal function](): civicrm_invoke("contact", "merge")
#21 /d/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#22 /d/index.php(21): menu_execute_active_handler()
#23 {main}

For anybody running into this: fixed in 4.7.6


Major Performance Hit After 4.6 Upgrade I recently upgraded from 4.4 to 4.6 using Drupal 7 and since then I have had some major performance problems (Search Builder responds to everything with a Timeout now.) Even simple queries for users in a group will often timeout.  Before the upgrade I had no problems. Has anyone else run into performance problems with 4.6.10? Any suggestions?

Updates

Searches were fine before the update
I am using smart groups

You may be running into performance issues if you have groups in your Search Builder queries.  See CRM-16483.


Participant quantity passed to Additional Participant pages On an event registration form I need to tailor a Price Set field (ticket type) for all participant pages, based on what is selected in the Participant count on the first page.

This is doable on the first page (buyer) in a Register.extra.tpl file because the participant count field is visible on that page so the form data is accessible in JQuery, but how do we interrogate the Participant count value for all subsequent Additional Participant pages please?

I don't know if this can answer your question, but :

If you are based upon Drupal and use Webform Integration, you can, in a webform, register several participants and build conditionnals between any fields of the webform, thus set any field value (e.g. Price) depending upon any other fields values (e.g. participant count).


Login Failed with eWAY Recurring Payment Processor I have installed the eWay Recurring Payment Processor (version 1.2) in my site and it processes one-off payments fine. However when I processes a recurring payment I get the following error: "9010: Failed to create managed customer - result (faultcode, faultstring) is (soap:Client, Login failed. )".

When I contacted eWay regarding this error they gave the response that I was sending the request to an incorrect URL (https://www.eway.com.au/gateway/managedpayment/CreateCustomer).  Is anyone else getting this error? If this extension is out of date is there a new one?

We had the same issue when setting up recurring payments for the first time. This is how we resolved it. Note: This is for Australia only.

Login to MyeWay and create an API Key and password.
In CiviCRM, modify or create an eWay recurring payment processor with the following:
Username: your usual eWay username (ie. email address).
Password: The new API password you just created in Step 1.
Site URL: https://www.eway.com.au/gateway_cvn/xmlpayment.asp
Recurring Payments URL: https://www.eway.com.au/gateway/ManagedPaymentService/managedCreditCardPayment.asmx?WSDL

Also to confirm we are using the 1.2 version of the eWay Recurring Payment Processor and it does not require any update to get it working.


Order API + Payment with multiple line items creating wrong financial trxn record? Say I have two price fields, thumbtacks at $1/unit and ketchup at $20/unit (it's very good ketchup). Suppose they each have a different financial type, such as "Office" and "Condiments".
If I use the order api to create a contribution where you've bought one of each this looks fine. I get correct looking records in civicrm_line_item etc. The problem is when I record the payment. It properly records two items in civicrm_financial_item corresponding to the line items, but then in civicrm_entity_financial_trxn, it properly creates two records, but the entity_id for both of them points to the same entry in civicrm_financial_item. This then shows up in the UI on the contribution as "Condiments, Condiments" for the payment instead of "Office, Condiments".
When I record the same contribution from the start using the UI and the price set, it has entity_id pointing to the separate items, as I'd expect, and in the UI shows "Office, Condiments" for the payment.
The code looks something like this:
$result = civicrm_api3('Order', 'create', [
  'contact_id' => 17,
  'financial_type_id' => 'Donation', // this seems irrelevant
  'receive_date' => date('YmdHis'),
  'contribution_status_id' => 'Pending',  // this is required according to the docs - the payment below completes it
  'line_items' => [
    [
      'params' => [],
      'line_item' => [
        [
          'label' => 'line 1',
          'qty' => 1,
          'unit_price' => '1',
          'line_total' => '1',
          'financial_type_id' => 22, // Office
          'price_field_id' => 12, // this seems almost irrelevant - using "1" has the same effect but then oddly doesn't show the line item breakdown when viewing the contribution
        ],
        // It doesn't seem to make a difference if I put the 2nd line item here or as a separate array in the outer array.
        // It's the payment part that is creating the wrong entity_id.
        [
          'label' => 'line 2',
          'qty' => 1,
          'unit_price' => '20',
          'line_total' => '20',
          'financial_type_id' => 23, // Condiments
          'price_field_id' => 13,
        ],
      ],
    ],
  ],
  'api.Payment.create' => ['total_amount' => 21],
]);

As per this old issue and PR
https://github.com/colemanw/webform_civicrm/pull/58#issuecomment-289561525
you want to specify the price_field_value_id or else CiviCRM will try and be clever and guess one for you and will often get it wrong. I think it's using the same mechanism it uses when you specify values for a payment page without using a real price set - i.e. it access a hidden price set that it uses for the purpose.


Upgrade to Drupal 4.7.12 failed (while upgrading from 4.7.11 to 4.7.21) Trying to upgrade from 4.7.11 to 4.7.12 but failed.

Here is debug info:

[Error: Add Data Type column to civicrm_option_group]
Error Field Error Value
Type    DB_Error
Code    -19
Message DB Error: no such field
Mode    16

UserInfo:
    UPDATE `civicrm_option_group_en_US` SET `data_type` = 'Integer' WHERE name IN ('activity_type', 'gender', 'payment_instrument', 'participant_role', 'event_type') [nativecode=1054 ** Unknown column 'data_type' in 'field list']

DebugInfo
    UPDATE `civicrm_option_group_en_US` SET `data_type` = 'Integer' WHERE name IN ('activity_type', 'gender', 'payment_instrument', 'participant_role', 'event_type') [nativecode=1054 ** Unknown column 'data_type' in 'field list']

However, field data_type DOES exist.

The solution is to manually create data_type field in log_civicrm_option_group table.

ALTER TABLE `log_civicrm_option_group` ADD `data_type` VARCHAR(128)
CHARACTER SET utf8 COLLATE utf8_unicode_ci
NULL DEFAULT NULL
COMMENT 'Data Type of Option Group.';


How do I prevent CiviSMS from converting my URLs to longer clickthrough-aware URLs? CiviMail and CiviSMS both default to tracking click-throughs.  To do so, it converts a link like http://www.cnn.com to something much longer, like https://www.example.com/wp-content/plugins/civicrm/civicrm/extern/url.php?u=91701&qid=2521100.  That's fine in CiviMail, when you a) can turn it off, and b) you can hide it behind a hyperlink - but it can be really annoying in a text message.

Since there's no "track click-throughs" checkbox when creating an SMS, how do I fix this?

You can install this extension: https://github.com/PalanteJon/coop.palantetech.nosmsurltracking.  This will automatically turn off click-through tracking on all mass SMS messages.  There's no checkbox (unless someone codes one in), so it turns tracking off on ALL messages - but if you need tracking on a single message, you can disable the extension temporarily.


REST API - json and chaining issues I am having two issues w/ the REST api via curl.

1) API is ignoring json attribute.   If I do not urlencode, I get a "Unable to decode supplied JSON" return msg.   When I do encode, as shown below, I get past issue, but it seems to ignore any of the conditions set in json attrib.  It just return all contacts,  w/out restricting by external_identifier or applying return filters set in json object.

$curl_post_data = [
    'debug' => 1,
    'version' => 3,
    'entity' => 'Contact',
    'action' => 'get',
    'json' => urlencode (json_encode ( ["sequential"=>1,"return"=>"id,do_not_mail","external_identifier"=>777] )),
    'api_key' => '1234',
    'key' => '1234',
];

If I take out conditions & filters out of json attrib, it works fine :

$curl_post_data = [
    'debug' => 1,
    'version' => 3,
    'entity' => 'Contact',
    'action' => 'get',
    'json' => 1,
    'api_key' => '1234',
    'key' => '1234',
    'external_identifier' => 777,
    'return'=> 'id,do_not_mail'
];

However, everyone else seems to be using this json attrib. I would like to get that working.

2) Second issue is chaining.

$curl_post_data = [
    'debug' => 1,
    'version' => 3,
    'entity' => 'Contact',
    'action' => 'get',
    'json' => 1,
    'api_key' => '1234',
    'key' => '1234',
    'external_identifier' => 777,
    'return'=> 'id,do_not_mail',
    'api.Contact.create' => urlencode (json_encode(['do_not_mail'=>0]))
];

Using api.Contact.create / replace, etc will trigger an undefined field error : undefined_fields":["api_Contact_create"].

I am json_encoding the field value in this example, but get the same issue by just passing an array.   It just doesn't seem to recognize the chaining directive at all.

Any help much appreciated.

Not everyone else use only the json, I find it easier to read and fix to use separate params ;)

I think the error is on the json you provide is not correct. Instead of:

["sequential"=>1,"return"=>"id,do_not_mail","external_identifier"=>777]

it should be

{"sequential":1,"return":"id,do_not_mail","external_identifier":777}


Smarty Error when setting Organization Name in civicrm-4.6.8-wordpress? I just setup civicrm 4.6.8 on Wordpress 4.3 "Billie".  I setup my database, and username for Civi to access, and now I'm on the CiviCRM Home screen where it is asking for my Organization Name, Email Address, and Default CiviMail Mailbox.

When I click Go next to Organization Name I am presented with the following error:

Organization Address and Contact Info

Warning: Smarty error: unable to read resource: "CRM/common/stateCountry.tpl" in /srv/www/wordpress-default/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1094

Warning: Smarty error: unable to read resource: "CRM/common/stateCountry.tpl" in /srv/www/wordpress-default/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1094

Fatal error: Smarty error: [in CRM/common/formButtons.tpl line 38]: [plugin] modifier 'crmBtnValidate' is not implemented (core.load_plugins.php, line 118) in /srv/www/wordpress-default/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1094

Looking in my <wordpress>/wp-content/plugins/civicrm folder does not reveal a packages directory, so I'm uncertain what includes are being requested here.

It looks like some files might be missing in your install. How did you install civicrm plugin?

Packages folder is at /srv/www/wordpress-default/wp-content/plugins/civicrm/civicrm/

Can you check if /srv/www/wordpress-default/wp-content/plugins/civicrm/civicrm/templates/CRM/common/stateCountry.tpl file exists?


"API error: DB Error: constraint violation" when installing Stripe extension With debugging and back tracing turned on, I receive the following error on our Drupal 7.38 and CiviCRM 4.6.8 site when trying to install the CiviCRM Strip 1.9.1 extension:

Exception: "API error: DB Error: constraint violation"

#0 …civicrm/CRM/Core/ManagedEntities.php(265): CRM_Core_ManagedEntities->onApiError("Dashboard", "create", (Array:6), (Array:4))
#1 …civicrm/CRM/Core/ManagedEntities.php(168): CRM_Core_ManagedEntities->updateExistingEntity(Object(CRM_Core_DAO_Managed), (Array:4))
#2 …civicrm/CRM/Core/ManagedEntities.php(141): CRM_Core_ManagedEntities->reconcileEnabledModule(Object(CRM_Core_Module), (Array:3))
#3 …civicrm/CRM/Core/ManagedEntities.php(122): CRM_Core_ManagedEntities->reconcileEnabledModules()
#4 …civicrm/CRM/Core/Invoke.php(403): CRM_Core_ManagedEntities->reconcile()
#5 …civicrm/CRM/Extension/Manager.php(246): CRM_Core_Invoke::rebuildMenuAndCaches(TRUE)
#6 …civicrm/CRM/Admin/Form/Extensions.php(195): CRM_Extension_Manager->install((Array:1))
#7 …civicrm/CRM/Core/Form.php(345): CRM_Admin_Form_Extensions->postProcess()
#8 …civicrm/CRM/Core/StateMachine.php(164): CRM_Core_Form->mainProcess()
#9 …civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), "next", "Next")
#10 …civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), "next")
#11 …civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), "next")
#12 …civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("next")
#13 …civicrm/CRM/Core/Page/Basic.php(395): CRM_Core_Controller->run()
#14 …civicrm/CRM/Core/Page/Basic.php(174): CRM_Core_Page_Basic->edit(1, NULL)
#15 …civicrm/CRM/Admin/Page/Extensions.php(125): CRM_Core_Page_Basic->run()
#16 …civicrm/CRM/Core/Invoke.php(312): CRM_Admin_Page_Extensions->run((Array:3), NULL)
#17 …civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#18 …civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#19 …civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
#20 [internal function](): civicrm_invoke("admin", "extensions")
#21 /home/oursitename/www/www/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
#22 /home/oursitename/www/www/index.php(21): menu_execute_active_handler()
#23 {main}

On the extension page, it appears as if the CiviCRM Strip extension has installed, but Stripe is not available as a payment processor.

Is anyone able to give guidance on next steps to troubleshoot?

I fixed this particular problem.  I haven't been able to recreate the problem so I can't state the source, but the following steps allowed me to install the extension.

1) remove all other extensions from the extensions folder (including ones which were not installed).
2) truncating the civicrm_extension  table
3) truncating the civicrm cache tables

Note that just trying v1.92 of the extension was not effective, nor was deleting the Stripe extension record in the civicrm_extension table.


Event participants registrations expires for participants that decide to pay later with cash We offer event registration where the participant can register and pay later with cash.
However when participants choose to register and pay later, thus on participant status "Pending payment later", CiviCRM simply expires their registration after 24 hours. We are running version 4.6.20 on Drupal 7. Any ideas why this is happening and how I can solve it?
In the meantime I have set the "waiting list" to zero should in case this is triggering the expiration of the registered participants. This setting was previously set to 24 hours. It will be weird if the Event waiting list is automatically expiring registered participants who are in status "Pending Payment Later. I need your brilliant brains. Thx.

This is a configurable option in the event settings.  Go to Events menu » Manage Events, click Configure menu » Online Registration next to the event in question, and put a "0" in the "Pending participant expiration (hours)" box to disable this.  See screenshot:


Conditional logic in Thank You letters I recently took over the donor thank you letter process at the organization I work for and saw that Civi has the ability to create thank you letters for donors.

The organization I work for has 5 separate funds that members can contribute to. We want to be able to be able to send an automated thank you letter to contributors that reflects all of their contributions.

Is there a way to add an "if...then" sort of logic to these letters?

For instance:

Member One donates $10 to Fund A
Member Two donates $10 each to Fund
B, C, and D
Member Three donates $10 each to Fund B and E

We want to be able to automate letters that would say:

Dear Member One, thank you for contributing $10 to Fund A.
Dear Member Two, thank you for contributing $10 to Fund B, $10 to Fund C, and $10 to Fund D.
and so on

I see tokens that auto populate for name, date, and address, but not for our individual funds themselves. I also don't see a way of specifying most recent contribution -- only total all-time or total last year.

Are there tokens I can use that will automatically pull from a member's contributions? Something like:

  Dear {firstname}, Thanks for donating {Fund A donation amount} to {Fund A}.

Or is this functionality not possible on Civi?

Thanks!

Civitoken extensions provides additional tokens for contact. It would be worth trying the extension.

There are also few others

Contributions Table token
Payment Tokens


Connecting Power BI to Civi Has anyone tried to connect Civi to Power BI?  I'm considering using this platform for some more in depth analytics.

I don't believe anyone has, but Power BI has a MySQL connector component, so it appears that would be all you need:

https://powerbi.microsoft.com/en-us/integrations/mysql/


How do I limit the number of ticket to be sold in events We have a event created, where the maximum participants are set to 120. But since a single participant can buy a multiple ticket, I am not able to find a way to limit ticket to be sold to 120.

You can use price sets to track purchased tickets instead of just registrants.

See this reference (down the page to 'complex event fees with price sets'

http://book.civicrm.org/user/current/events/creating-an-event/


How to troubleshoot the wordpress issue when the site is migrated from one host to another? My original website name was www.xxx.com. However, I am not using that anymore. I am now using raspberry pi as a web server. After migrating to new database and domain - www.xxx.blogsite.xyz, I see that my website is not getting launched. I don't even see the dashboard for myself. How can I debug or troubleshoot this. I see that my apache is running fine. Also, I have tried restarting it. I can't access myphpadmin using public address or hostname. However, I can use myphpadmin using local IP address. Is something wrong with my dynamic dns setting?

Have you reviewed the "Moving an Existing Installation to a New Server or Location" here:

https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location

?


CiviCRM core now includes Flexmailer: how to remove old flexmailer extension? I have Flexmailer 1.1.1 installed as a "non-core" extension , but since upgrading to 5.35.1 Flexmailer 1.1.2 is included with core. (This probably came in before 5.35.)
The extensions page shows 1.1.1, implying the newer core version is not in use.

I thought that if I removed the non-core extension dir Civi would have a hunt around and find the core version, but when I removed that dir, CiviCRM crashed complaining that it can't find it.

I thought that if I disabled the extension then it might find the new one, but disabling flexmailer requires disabling mosaico, too, since it's a dependency. And disabling that would also require disabling mosaicomsgtpl too. I'm a bit worried that disabling extensions might lose some configuration values along the way, which I might not notice until it's too late?!

I thought that I could symlink from the old location to the new core location, but again this causes a crash:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Civi\FlexMailer\Services' not found

I thought I remembered that the filepath to an extension was in the db somewhere, but I searched and only found a reference to it in civicrm_extension - that table does not seem to have filepaths in it.

Here's how I did it: Delete the cache files
From within the site's extensions dir:
EXT_DIR=/var/www/mysite.org/sites/default/files/civicrm/ext/
CONFIG_AND_LOG_DIR=/var/www/mysite.org/sites/default/files/civicrm/ConfigAndLog
BACKUP_DIR=~/just-in-case

mkdir -p "$BACKUP_DIR"
mv org.civicrm.flexmailer $BACKUP_DIR/.
cd $CONFIG_AND_LOG_DIR
rm Cache* # Remove cached container/ExtLoader files.
cv flush # runs cleanly
cv ext:upgrade-db


Confirm From Email Error in Configure Event I get this error while in the Configure Event -> Online Registration tab and trying to enable the Send Confirmation Email feature:

Warning: idn_to_ascii() expects parameter 3 to be integer, string given in /home2/nymissionary/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Rule/Email.php on line 58

A screenshot is shown below. I need your help so I can use this feature.

~ Ron

It looks like this issue has been reported and fixed here: https://lab.civicrm.org/dev/core/issues/1469

With this patch https://github.com/civicrm/civicrm-packages/pull/271.patch

To apply.

First make up a backup of the file.

Then option one - if you have command line access you would want to

navigate to

/home2/nymissionary/public_html/administrator/components/com_civicrm/civicrm/packages/

Download the patch using wget

wget https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-packages/pull/271.patch

This will create a file called 271.patch

Then you want to apply the patch using the patch command

patch -p1 < 271.patch

( What this does

use the patch command
strip off the first 1 bit of the path when searching for the files (in this case the a and the b from a/HTML/QuickForm/Rule/Email.php b/HTML/QuickForm/Rule/Email.php )
and read in the file you downloaded to get the instructions on what to do.

)

In this case it looks like a pretty simple patch that you could do manually if you were more comfortable.

Again make a backup of the file then edit the file: HTML/QuickForm/Rule/Email.php

Then look at
https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-packages/pull/271.patch

What you want to do is add any line (without the +) that starts with a plus and remove anything with a minus.

You want to add the code between the lines without the pluses above and below so the first chunk will go in about line 37.

after

class HTML_QuickForm_Rule_Email extends HTML_QuickForm_Rule
 {

but before
     // switching to a better regex as per CRM-40

Then the second bit you just need to swap

$part = idn_to_ascii($part, 0, INTL_IDNA_VARIANT_UTS46);
for
$part = self::idn_to_ascii($part);

If you get any errors after saving just revert to your backup.


Keep getting HTTP ERROR 500 since upgraded to 4.6.16 Since I have upgraded to 4.6.14 > 4.6.16 everything is so messed up on my website. Events that are not yet finished they are not appearing on the dashboard, Cant change the event end date, clicking save button returns only endless CiviCRM logo loop. Cant renew membership. Keep getting the message "The Contact Sub Type does not match the Contact type for this record".

@Tapash - I tried to reproduce one of the specific issues that you reported post upgrade to 4.6.16 : Fatal Error when renewing membership after Upgrading to 4.6.16

But I can not - it's all working fine on our 4.6.16s - I also don't have any reports of any of our projects experiencing issues on 4.6.16 I'm wondering if perhaps something went wrong during your recent upgrade?

General recipe for this is to restore both code base (files) & databases back to 4.6.14 and then to run the upgrade script [to 4.6.16] again. If you can: run it via drush - it may give you some warnings/errors that give you some insight as to what's going on.

  sudo -u apache drush civicrm-upgrade-db


Do Webform Contributions allow for using Grid Widget? This is a simple yes/no question, but to explain:

Since price-sets aren't integrated into webform, I'd like to recreate a price-set directly in the webform. The civicrm webform integration help (screenshot below) seems to indicate that this is possible, as does this thread on the integration support request queue.

However, I don't see the grid widget as an option when I look for it, and am wondering whether I should go looking for the issue in my setup or whether grid is simply unsupported by the current integration module. (screenshot below)

I'm using Drupal 7, CiviCRM 4.6.18, Webform 4.12 and Webform CiviCRM Integration 4.14. Does anyone know if there is a setting I'm missing?

Ah, that was a bug in the webform_civicrm module. I've just pushed up a fix, which will be part of 7.x-4.16. Or you can grab the latest -dev release from drupal.org/project/webform_civicrm now.

Update: 4.16 has been released. Enjoy.


How to display remaining event participants? If you want to display the number of remaining event participants (based on their role, too) until an event is fully booked, you could implement the following in EventInfo.tpl:

Participants

{crmAPI var="ParticipantS" entity="Participant" action="get" role_id="1" sequential="1" event_id=$event.id }
    {if $event.max_participants<=$ParticipantS.count}
        0&nbsp;remaining
    {else}
    {math equation="x - y" x=$event.max_participants y=$ParticipantS.count}&nbsp;remaining
    {/if}

Watch out: role_id="X" > adjust to your needs.
Tested and working.


Wordpress multisite capabilities I'm setting up an association website integrated with CiviCRM (used for membership management among other features).

The wordpress site is a multisite install: a main site, where CiviCRM is active and showing, and a ecommerce subsite where CiviCRM is active but not showing (using the CiviCRM admin tool).

On the main site I'm using capabilities associated with membership types. For example, membership type 1 adds automatically to wordpress users the civimember_1 capability. Then I use this capabilities to restrict access to some special pages where only active members should be authorized to see.

While on the main site it works great, on the subsite dedicated to the store, those capabilities are not showing. There are a couple of civicrm-related capabilities showing on the groups plugin, but the membership-related capabilities don't and therefore I can't restrict some articles to active members.

How can I do in order to have the civicrm capabilities also on site 2?

From what I read I'm not interested in a multisite CiviCRM as different domains don't mean different groups or organisations, I just want CiviCRM to communicate specific capabilities to all my wordpress sites (they are using the same DB, of course).

Can anyone help?

Cheers
João

João: By design WordPress user capabilities are restricted to a single site because many Multisite instances treat sub-sites as entirely separate entities. So in order to achieve what you want, you'll have to:

explicitly propagate users and their capabilities to the sub-site(s)
propagate the Groups plugin sync to the sub-site(s)

Task 1 is fairly straightforward: you'd use the civi_wp_member_sync_add_cap hook to detect when a capability has been added to a user. First add the user to your sub-site(s) with add_user_to_blog(), then switch_to_blog() and add the capability to the user before switching back to the current site.

Task 2 is a little more tricky. The Groups plugin states that "All features are supported independently for each blog in multisite installations". As a result (as you've discovered) the CiviCRM WordPress Member Sync plugin only syncs capabilities to the Groups plugin on the main site. To propagate that sync to the sub-site, you'll need to use the family of civi_wp_member_sync_rule_*_capabilities hooks and sync the capabilities to the Groups plugin instance on the sub-site(s) yourself. If it makes life easier, I can add some do_action calls in the relevant places so that you can guarantee that your code will run when expected.


Is there a way to bulk create (and connect) drupal users from CiviCRM Organizations? With Drupal and CiviCRM it is rather straight forward to bulk create Drupal users from CiviCRM individuals and connect them at the same time:

Export the individuals from CiviCRM
Import them into Drupal using the module User Import

It works really nice: Drupal accounts are created and at the same time connected with the CivicRM contacts. And the Drupal module gives you a lot of nice options such as sending out an email with a one-time login or defining user names.

If you try the same approach with CiviCRM organizations, it will create Drupal User records but wont connect them with the according CiviCRM contacts.

I made sure that the matching/dedupe rules should not be a problem (email only) and disabled CiviCRM profiles (the default name and address profile contains individual only fields) - but no success.

Any ideas on how to bulk create organizations? Preferably using Drupal user import or anything that is doable via the UI and/or not too complex?

That is indeed how the Drupal / CiviCRM user integration works: Users = Individuals.

We stick to this way of working so we're not restricting ourselves to having to maintain a customisation like this which would be business critical if it stopped working after an upgrade.

Having accounts linked to an individual is also good, as it shows who in the organisation did something, like apply for membership.

It also means things like event registrations work as expected as a person will be attending those.

Using webforms, you can easily expose information about a person and their related contacts so they can update their details as well as their organisation's at any time. Keeping contact 1 as the logged in user makes this easy.

There is also this blog from Whitefuse Media which explains a similar situation and how they handled it (see the section: Drupal Users Synced to CiviCRM Organisations)

http://www.whitefusemedia.com/blog/civicrm-development-case-study


How can I identify DB error? Suddenly an error appeared out of nowhere when managing groups.

  "Count data for smart groups is not currently calculated. You may click Update >Smart Groups to generate it. Be aware this can cause significant server load." (screenshot 1)

When I try to Update Smart Group Count or click on Contacts of any group, there is the error:

  Sorry but we are not able to provide this at the moment.

  DB Error: unknown error

  Return to home page.

  (screenshot 2)

Meanwhile, the database is NOT down. I can access contacts through search.

What could have happened? Where do I start looking for solutions?

CiviCRM 4.7.14. on Drupal 7.52

Detailed instructions are available in the "More detailed errors" section of the troubleshooting guide.  In short: Either turn on debugging AND backtrace, which will give you a more detailed error; or view the appropriate errors in your CiviCRM log.

If you need help interpreting those errors, I suggest opening a new question here.  It's also a good practice to paste the text of the error instead of (or in addition to) a screenshot of the error - it makes it easier for others to search, and easier for someone to troubleshoot.


Restoring groups and linked contacts 50 groups were deleted by mistake. Please don't ask how.

So from a 2 weeks old backup, we're able to extract a CSV from civicrm_group and civicrm_group_contact

group_id, name, contact_id, email

We would like to reimport the groups and their assignation to contacts. The contacts are already in the system normally. We would not want duplicate users

Afraid of simply going to the civicrm_group_contact table and just filling it through phpmyadmin

Any tip? Thanks!

If you are confident the users are all there, you could do an import with the CSV dump you mentioned, using the Group ID and Contact ID.

1) Batch import the groups using the API csv Import module.

2) Assuming the Group IDs could be imported and match up, you could import the users via their internal IDs. Instead of selecting "Group" for the Entity To Import (as in step 1), you can import "GroupContact" and match up the Group ID field and the Contact ID field.


Is it possible to use Civimail without unsubscribe / opt out option? Our organisation uses Civimail to communicate with our members on a regular basis. Email is the only realistic way we have of communicating with them and informing them of legal notications, ballots etc as well as news and alerts. The presumption is that in ajoining as a member they agree to receive email communications from us.

A number of members use the opt out link on our mailings which then means they no longer receive any communication at all from us as their email address is now disabled in Civi.

Is there a way of either removing the opt out / unsubscribe links since by accepting membership they have opted in or a way of getting round the issue of members who have cut themselves off from the organisation they have joined.

We are using CiviCRM 5.14 Drupal 7

Yes you can. There is an override option under Admin > CiviMail > CiviMail Component Settings
ie at civicrm/admin/setting/preferences/mailing?reset=1

Disable check for mandatory tokens
Don't check for presence of mandatory tokens (domain address; unsubscribe/opt-out) before sending mailings. WARNING: Mandatory tokens are a safe-guard which facilitate compliance with the US CAN-SPAM Act. They should only be disabled if your organization adopts other mechanisms for compliance or if your organization is not subject to CAN-SPAM.


How to create extension using phpStorm 2018.2.5 I want to create an simple extension.How can I do that using phpStorm? Please guide me with steps.

You can study about creating CiviCRM extensions here: https://docs.civicrm.org/dev/en/latest/extensions/

You would need to use Civix to create extensions and can use PHPstorm as text editor to write code i guess.

Thanks


Anyone using Aegir to manage sites? Not really a Civi specific question but someone here might have suggestions on the best place to discuss.
Got the basics working.  Now I need to figure out how to best add in or update modules and themes

There are definitely folks using Aegir with Drupal 8/CiviCRM, and more using Drupal 7/CiviCRM.  You can connect with them on https://chat.civicrm.org in the ~sysadmin channel.


Free option on a paid event We're running 5.10.4 on Drupal. We have an event where some folks will be requesting a scholarship and therefore need to be able to choose a $0 option. We also have an optional field where people can put in the amount they want to donate towards the scholarships. However, people cannot submit the page unless they have at least $1 in event fees.

https://www.zendust.org/civicrm/event/register?reset=1&id=283

You have the value ‘1’ in the minimum amount field of the price set that you are using.

Visit the settings section of the price that’s being used and remove this value. It’s not mandatory.


Where is the Detailed Logging setting stored? I am attempting to turn on detailed logging for a site (Administer -> System Settings -> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.), the Logging option. When I save the change, I'm getting a gateway timeout, and am working with the hosting company to resolve that.
In the meantime, where is that setting saved? I don't see a place in civicrm.settings.php nor in the civicrm_setting table. But I suspect that's because No is the default.
How and where can I add that setting manually? So far, my Google Fu is failing me.
Thanks!

It's in civicrm_setting but if it's never been turned on it won't be there. But also it's more than just a setting - you would need to rebuild the schema and triggers.
If you have cv installed you can do cv ev "Civi::settings()->set('logging', 1); $s = new CRM_Logging_Schema(); $s->enableLogging();" to do it from the command line manually.


Which contacts in Civi are wordPress user as well? I have 500 contacts on my CiviCRM groups and also I have 250 users for my WordPress, I am wondering to know is any way to find which one of my civiContacts are in WordPress?

You should be able to search via Adv Search and find a button called CMS User.


How can I search contacts and run a report of contacts with no activity I'm struggling to find a list of conatcts with no activity records, could someone help me on how to achieve this?

Use search builder to search for all contacts with the activity field: activity date of "not null" and add them to new group "has activities". Use the include/exclude custom search to find any contact not in the "has activities group and add them to a new group "no activities".


Can I automatically replace the "civicrm" from all URLs with another string? (drupal7 + civicrm 4.7.4) How can I replace the '/civicrm/' portion of all site URLs automatically? I want change all the URLs so I cant do it one by one with a Drupal "URL alias".

Could I somehow swap the name 'civicrm' for a different string such as 'myOrg'? (eg: if someone visited /civicrm/admin?reset=1 they would be redirected to /myOrg/admin?reset=1 )

There is no easy way to do this.

You might be able to create a drupal module that is able to get the myOrg urls and then renders the CiviCRM version of it.

But then you still have the problem that the internal links that CiviCRM creates will be in the /civicrm/* form.

To solve that you could first get the CiviCRM page as a string in the drupal module, then do a search/replace and output it.

Very hackish, probably not possible to get it 100% right. I would advise not to.


cumulative donation report I need to find those who have donated $1000 or more in a certain time frame. How can I prepare a cumulative report for businesses or individuals that will automatically total all donations?

Karen, check out and install @Jamie 's excellent Summary Fields extension at https://civicrm.org/extensions/summary-fields - it will do what you want, and more.


Header Issues On Wordpress Installation I am getting the following errors when doing various tasks in and around CiviCRM only

Warning: Cannot modify header information - headers already sent by (output started at .../public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:1) in .../public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 912

When hitting save on things like clearing cache and updating paths. If I just hit refresh the page loads right up, but won't on the original button press.

and

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at .../public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:1) in .../public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Session.php on line 127

When running cron jobs. I know these are probably related, but would really love to get them fixed as the last one is blocking cron from running via url.

Wordpress Version: 4.7.4
CiviCRM Version: 4.7.19

I am not sure WHAT was different, but I just went back and reloaded the System.php file again, and it is working now.


How to become an CIVICRM AMBASSADOR i hope you are well. i just want to know how to become an ambassador of civicrm in my countr
Best regards

There is this blog post describing it: https://civicrm.org/blog/josh/community-ambassadors-needed
I would go to https://chat.civicrm.org and in the Community channel post a message to Josh.


WordPress: Creating new WP Users from CiViCRM Contacts My situation is I have an Individual database of 11,344 Contacts in Drupal Civi, and I want to turn them all into WP Users. I know I can convert Users into Contacts, but I want to do it the other way around.
 I have pointed my WordPress CiViCRM to a drupal Civi database which I need very much. I want the CiViCRM members to show under WordPress users but this isn't working. I have downloaded the plugin  CiviCRM WordPress Profile Sync; but I can see the plugin on button on my dashboard to even try something. Can you please help me? I really need this issue solved. Thank you

How i would do is

Export contacts with email address that want to be user.
Install Wordpress export/import user plugin.
Change the un-supervised dedupe rule to have only email address
Import users via Wordpress screen using exported csv from CiviCRM
Switch back un-supervised dedupe rule

Thanks

Pradeep


How to update "wpLoadPhp" setting for CiviCRM WordPress when moving/migrating installation? On my Civi WordPress multisite installation, I just discovered that there is a wpLoadPhp setting in the CiviCRM settings for each Civi domain that contains the absolute filesystem path to wp-load.php (for example: /home/myusername/sites/mydomain.org/wp-load.php). So this setting needs to be updated if I move WordPress+Civi to a new location, or move a copy of the Civi database to a development or test installation.
I discovered this setting when the Civi cv CLI tool misbehaved—it tried to load settings from the wrong WordPress installation for a cv api setting.create ... command. (However, using the WP-CLI  wp cv api setting.create ... worked correctly. It must override the Civi wpLoadPhp setting.)
What is the correct/best way to update the wpLoadPhp setting—preferably via a script for automation? Is wp cv api setting.create ... best? It seems to work OK: e.g. wp cv api setting.create wpLoadPhp=/home/myusername/sites/mydomain.org/wp-load.php.

You can safely ignore this setting unless you're hitting scripts in civicrm/extern or civicrm/bin or using cv directly. In that case I'd recommend switching to routes that go via WordPress e.g. the REST API or wp cv instead - they are much more reliable in WordPress.


Using a profile with custom fields for event online registration new to CiviCRM.  Have set up a profile that I would like to use for online event registration.  It looks very ugly and I was wondering if there was a way to make it look better?  I'm using a mixture of text boxes (they look ok) and some questions have radio buttons and check boxes.  It's the radio button and check box questions that look very cluttered.  Any ideas?  Thanks.

Try a theme for CiviCRM, like Shoreditch.


How to make a Participant Listing menu link in Joomla Bit of newbie question since we don't work with J! much. This is J! 3.4.3 in case that makes a difference.

I need to make a Participant Listing link. I have enabled it on the civi event, and the instructions there say

  Then create front-end links to the Participant Listing page using the Menu Manager. Select Participant Listing Page and enter 1 for the Event ID.

So I added a Menu, and added a Menu Item which allowed me to set the Menu Item Type to be Participant Listing (from a select) and that added a path in the Link field index.php?option=com_civicrm&view=Events&layout=participantlisting

Looking around for where to add '1' for the Event ID, I find under Options a "select event" but it shows no options in the selector and I have no idea if that is referring to civi events or some other 'concept'. Any pointers?

Aaagh - got it. I had done everything right - just my only events were in the past, and hence none showed in the selector.


Why does this custom file field uploaded on profile not download from the emailed link? I created a custom profile (to use as a form on my website) with a custom file field...When the user fills out the form, they upload a file, and the form is sent to the admin email address. When I open the email and download the attached file, I am unable to open it; the file becomes corrupt. However, if I use FTP and navigate to ".../files/civicrm/custom" and download the file from there, the file opens and is not corrupt.

The website is using wordpress.

Any help is much appreciated. Thanks in advance.

Please make sure you are closing the file properly before attaching to the email - any file which is open and been attached to email will have this issue


CiviCRM admin screens don't display icons/special chars See screen snippet below. The question marks and other graphical items normally displayed throughout the CiviCRM UI are showing as squares with the unicode. This is a dev instance, copied (codebase and databases) from a production instance using the instructions here. The symbols show correctly in the production instance. What did I mess up?!?

CiviCRM 5.23.1 and Drupal 7.69.

Based on comments the problem was civicrm.settings.php still had old settings.


WordPress CiviCRM Map Contacts WordPress v5.1.1 - CiviCRM v5.10.4 Trying to display a map of my Contacts. Created SmartGroup of all Current Members. Click Map Contacts from SmartGroup. Only displays myself on the map. Created Google API Key and set up billing (worried as I don't know how much this costs but says I get a $200 credit/mth).

Any help would be appreciated including whether or not I need this Google API to get the geocoding done!

What ended up working was that I manually installed the OSM Extension which IS NOT in the Extensions Directory (built in) and located here:

https://github.com/bjendres/de.systopia.osm

Crazy that a) the OSM Extension is not a STANDARD and BUILT IN Extension; and b) that the Google API does not work.


Restricting Access to Contribution Module Is it possible to restrict access to the contribution module section of CIVICRM yet giving a person access to all the other portions of the program including contacts/groups, etc.?  We only want certain individuals entering contributions and seeing who gave what.  Thanks.

Yes, Its possible to give access to Contribution component to specific roles. You can set the permission to access different components at

For Drupal:

Navigate to CiviCRM >> Users and Permissions >> Permissions(Access Control) and click on **Drupal Access Control**.

For Wordpress:

Navigate to CiviCRM >> Users and Permissions >> Permissions(Access Control) and click on **Wordpress Access Control**.

HTH

Pradeep


Where is the mailing template for the automated membership renewal reminder we have an email set to be sent out to members as a reminder for membership renewal 6 weeks prior to the end date of membership. I am trying to locate a specific template, as it needs the signature updated and, more importantly, has some broken links, as we've upgraded some forms on our public site. I have looked under Mailing Templates, Headers, Footers, and Automated Messages, as well as anywhere else i can think of but cannot locate the email.

Any assistance locating the automatic email would be greatly appreciated.

Thank you!

Saba
SSaleem@nonprofitoregon.org

Maybe you can find it in Schedule Reminders. Go to Administer -> Communications -> Schedule Reminders or use http://<server>/civicrm/admin/scheduleReminders?reset=1