Different default status for different activity types?

Not an answer but rather a kind of half temporary workaround, posting in case someone finds it useful, and beacuse you metioned you are familiar with creating an extension/module.

You can use hook_civicrm_buidForm to alter the form status id based on activity type_id/name, this soultion is not user friendly and it won't work from standalone context, ie when using Contacts -> New Activity, but it can do the trick if you can live with that and don't have a ton of Activities Types.

Hope it helps, and let me know if there's anything unclear.

// Implement myextension_civicrm_buildForm
function myextension_civicrm_buildForm( $formName, &$form ){
    if ( $formName == 'CRM_Activity_Form_Activity' ) {
        // Hook only when adding an Activity and the context is not standalone
        if ( $form->getAction() == CRM_Core_Action::ADD && $form->_context != 'standalone' ) {

            // The array that holds the Status and Activities that should have that status by default
            // and the only bit that you'll have to change/upadte when you add more activities and statuses
            $activities = array(
                'Completed' => array( 'Meeting', 'Phone Call' ),
                'No-Show' => array( 'Custom Activity' ),
                'My Custom Status' => ( 'Another Custom Activity', 'Yet Another Custom Activity' )
            );

            foreach ($activities as $status => $activity_types) {
                if ( in_array( $form->_activityTypeName, $activity_types ) ) {
                    // Get status_id by Label
                    $result = civicrm_api3('OptionValue', 'getsingle', array(
                        'sequential' => 1,
                        'option_group_id' => 'activity_status',
                        'label' => $status,
                    ));
                    // Set the default value in the form
                    $defaults['status_id'] = $result['value'];
                    $form->setDefaults($defaults);
                }
            }
        }
    }
}

EDIT
If you want to do the same thing when in standalone context you could add some jQuery/JavaScript to the form, see below updated snippet and JS snippet.

// Implement myextension_civicrm_buildForm
function myextension_civicrm_buildForm( $formName, &$form ){
    if ( $formName == 'CRM_Activity_Form_Activity' ) {
        // Hook only when adding an Activity and the context is not standalone
        if ( $form->getAction() == CRM_Core_Action::ADD ) {

            // The array that holds the Status and Activities that should have that status by default
            // and the only bit that you'll have to change/upadte when you add more activities and statuses
            $activities = array(
                'Completed' => array( 'Meeting', 'Phone Call' ),
                'No-Show' => array( 'Custom Activity' ),
                'My Custom Status' => ( 'Another Custom Activity', 'Yet Another Custom Activity' )
            );

            if( $form->_context != 'standalone' ){
                foreach ($activities as $status => $activity_types) {
                    if ( in_array( $form->_activityTypeName, $activity_types ) ) {
                        // Get status_id by Label
                        $result = civicrm_api3('OptionValue', 'getsingle', array(
                            'sequential' => 1,
                            'option_group_id' => 'activity_status',
                            'label' => $status,
                        ));
                        // Set the default value in the form
                        $defaults['status_id'] = $result['value'];
                        $form->setDefaults($defaults);
                    }
                }
            } else {
                // Make $activites available in JS
                CRM_Core_Resources::singleton()->addVars( 'myextension', array( 'defaultedActivites' => $activities ) );
                // Add JS script
                CRM_Core_Resources::singleton()->addScriptFile( 'myextension', 'defaultedActivites.js' );
            }
        }
    }
}

// in your JS script => defaultedActivites.js
// Same principle as above, there might a better way to do this JS-wise but that should do it
CRM.$(function($) {
    $( '#activity_type_id' ).change( function(){
        var defaultedActivites = CRM.vars.myextension.defaultedActivites; // Store defaultedActivites
        var activity = $( this ).select2( 'data' ); // Get the select2 Activity object, ie Activty type
        $.each( defaultedActivites, function( status, activityTypes ){
            activityTypes.map( function( currentActivity ){
                if( currentActivity == activity.text ){
                    // Get status_id by label
                    CRM.api3( 'OptionValue', 'getsingle', {
                        'sequential': 1,
                        'option_group_id': 'activity_status',
                        'label': status
                    }).done( function( statusId ) {
                        // Set default value
                        $("#status_id").val( statusId.value ).trigger("change");
                    });
                }
            })
        })
    });
});


page not found errors for javascript following upgrade to 4.6.13 from 4.6.10

Have you ensured that CiviCRM paths are set correctly? In the Civi menubar go to Administer -> System Settings -> Directories and ensure it matches what's in Administer -> System Settings -> Resource URLs


There's an extension for a very similar scenario: Member Only Event.  If your authenticated members have memberships this will do the trick.  There are similar options here: Is it possible to restrict event registration to members?  Ultimately, if none of these meet your needs a small extension might be in order.

One other option is to use Webform CiviCRM integration to make either your authenticated events (or more likely, the single unauthenticated event) a webform, which you can then restrict access to separately from your other event signup pages.


will ssl certificate on main domain work on subdomain

There is nothing specific about civi on your question, it is possible to use a wildchar certificate (*.site.com) or one that works for several subdomains.

If you want a simple and free certificate and that isn't offered by your hosting company, I recommend you "let's encrypt".


Embedding CIVICRM calendar extension output in a Drupal page

I can't help you in terms of the extension - but this blog tells you how do this directly with Views - and provides a starter one too.

Note you need the CiviCRM Entities module and of course the Calendar module

Happy Civi Day


Older CiviCRM that does NOT require TRIGGER privileges?

I'd recommend approaching the problem the other way round: find a hoster that works with the latest versions of Civi rather than find a version of Civi that works with your current hoster.  You will be missing out on many new features and security fixes if you choose to run an old version.  It will only bite you later.

Is there any reason not to move hoster?  As ErikH points out, there are several specialist CiviCRM hosting services - but not all are equal.  See eg How to evaluate hosted CiviCrm enviroments


I'm assuming you're using the default mailing Ux, not mosaico

The default editor is wysiwyg, if you want to put html tags, click on the view source icon, and paste the html code you want.

You can switch back to wysiwyg to see the result.

As for the images, be aware that quite a few recipients aren't going to display the image (for privacy reasons), so you should consider putting an alt text and dimensions (width and height) on your img tag


Can all contacts that share an email be unsubscribed at once?

Short answer: no.

An unsubscribe request is handled here:

https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/Form/Unsubscribe.php

The parameters to an unsubscribe request are translated into the corresponding contact, not the email address.

So what you're asking would require the code to scan the database for contacts with the same email address to unsubscribe, which in some circumstances wouldn't be the desired result.

Conceptually, unsubscribes/subscribes are stored/handled by contact id, not email address.

Your options would be to write your own unsubscribe handler, or (perhaps) to use civirules.


Its the CMS user that you have used to set CiviCRM cron needs some administrator permission to process your Schedule jobs. Please check the cron user role and assign necessary permission.

Cheers

Pradeep


I just did some testing on mine - it works the same way. It appears that "templates" are actually created and saved just like an actual event. So you'll find the data in the civicrm_event table just like all your other events. It looks like it saves it with a start date that is the same as the date you inputted the template (because date is a required field, but you aren't given the option to input one). The only way I can find thus far to change this is to go into your database, find that template, and edit the date. I just manually changed one of my templates via PHPMyAdmin and sure enough when I go to use it, that date is now the one selected. So at least then you wouldn't need to scroll so far back?

I wonder if someone has an edit they've done to make the date field available when creating a template.


How can I set up CiviMember to meet these requirements?

I would go for all different membership types.

And on the signup page to describe properly for who it is.

The problem with pricesets is that it is much more difficult to get priceset info to show up in searches, in exports, in reports, in batch imports. So if you would do all (or a few) with the same membership types, you often only see the paid price difference, and not the underlying reason why they paid differently. You obviously can guess, but often you would want to see the reason (different option chosen in the priceset).


Can we manually change recurring payment subscription statuses in the database if they're no longer linked to their original membership?

More frequently than not I find myself tweaking records in civicrm_contribution_recur precisely for the reasons you mention.

You will need to be sure, however, to account for any amounts not collected and perhaps create new recurring contributions or pledges so that those amounts are not entirely lost. Depending on how payments were recorded after the subscriptions became dysfunctional, this might be a lengthy task.

In the case of dysfunctional subscriptions, updating the the contribution_status_id to whatever is appropriate should not impact anything else.

Regarding recurring contributions associated with memberships - contributions per force must have a financial type, this would be the financial type used to create the subscription, so there should never be a case where money doesn't get allocated somewhere, there would indeed be a problem on reporting financials if this were not the case - could you clarify further?

Hope this helps,
Tamar


Can I save bulk update screens for future use?

You can use the search action designer extension to design your own bulk update actions.


How do you filter by campaign from the volunteer listing page in civivolunteer?

Pretty sure the code needs to be modified a little bit to allow you to do it by URL param. Shouldn't take but an hour or two.


Different membership receipts for 'New' and 'Active' members

In the smarty template the variable $mem_status is assigned. So it can be used to insert different text fragments in the template. Here is an example in code.

 {if $mem_status eq 'New'}
 Hello, you seem to be new so this is the text fragment for new members.
 {else}
 Welcome back - not new - so here is an active member text fragment.
 {/if}


The answer:

These lines allow CiviCRM tokens to be available to Smarty functions. The headerStyle value is contained within the {capture} item.

Documentation found here:

CiviCRM Wiki: Smarty in email templates
Smarty docs: {capture} tag


Why is OpenStreetMaps in Civi 4.7.24 rendering a featureless grey map?

As Graham has noted in a comment, the change in map reflects a change in terms of use and distribution methods in July 2016 that necessitated the removal of direct links to MapQuest tiles.

MapQuest Issue - Direct Tile Access No Longer Supported?
mapquest direct tile access discontinued (SO)

The plain map you are seeing is the Carto Light basemap from Carto, which was adopted as of 4.7.19.

On our sites, we do not use the built-in maps for the public, but a Leaflet implementation for Drupal Views. Thus, this change only affected internal users who use the mapping, which does not occur often in our use cases. But for those who do, you can override this choice by adding a custom OpenStreetMaps.tpl template, with the URLs appropriate to your tile provider of choice.

I am not sure if any Carto tiles other than the basic light and dark (with or without labels) are licensed for this kind of use, however. The OSM wiki does provide a list of tile servers where you can explore alternatives.


Trouble getting Activity Information with api

That is weird :-) I assume you have all permission for custom data? And have you tried using the actual ID's for status_id and activity_type_id?


Unfortunately you cannot control billing block fields through UI. There is no such settings since this fields are mandatory for some(infact many) payment processors. This fields are hard coded at https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L869

You can use buildform hook to remove the second name field.

  Note: You might get error from some payment processor if second name
  is empty

HTH

Pradeep


Glad to have been able to help - reposting my comment as a response and kindly requesting that you mark it as accepted given your findings.

  When you've got things running on different servers, there is a chance that dates and times may be mismatched - e.g. your mail server might be configured with a time zone that is different from the server on which your civi instance is installed and hence the time is incorrectly translated. Determining whether this is the case would be the first step.

Glad I could be of help!


How do I schedule a mailing to run in a couple of hours time with the CiviCRM API?

Can you double check if the other mailings have the same time in the database and in the UI? It's quite common that one or the other is not taking into account the same timezone, ie if your UI is assuming your database at GTM and your user is at GMT+2, it's normal it starts right away (or the other way around, timezones are always confusing ;)

X+


Anonymous user can't view CiviCRM user dashboard in WordPress

So, to close the loop on this, the answer is this:

inside WP, but outside CiviCRM, the checksum and cid need to be identified on the GET string as cs and id respectively
inside CiviCRM, the checksum stands alone (no separate variable, though it seems to work as cs too) and the client id must be cid as id is used for other purposes in CiviCRM.

I discovered no way to cleanly pass these values through a page. I used a PHP insertion plugin to Wordpress to extract the values from the $_GET global array and pass them back into the page.

Thanks to Demerit in helping me figure this out.


How to include Email address checking in event registration page to avoid multiple contacts entries?

you mean asking the user to type twice their email and check it's the same?

I can't find it right now, but recall reading that it wasn't that optimal as a UX (ie. people are not good enough to type without typo, but skilled enough to do a copy/paste of the email with typo ;)

One more elegant solution seem to compare the email against a set of existing common domain names (eg yahoo.com, gmail.com) and suggest a fix if the error is on the domain name, eg. if I type "xavier@gmal.com", suggesting "did you mean xavier@gmail.com"?

you could write an extension that add this feature by using this library https://github.com/Kicksend/mailcheck (I used it for a drupal extension long time ago, worked well, and shouldn't be too complicated to write a native civicrm one)


How do I sort the bookkeeping report by date?

It may be worth trying Fuzion's Extended Report extension which offers other reports eg "Bookkeeping with extra fields "


CiviCRM Upgrade from 4.5beta6 to 4.6.8 - CiviCRM Menu is not displaying/functioning

Its a core issue, civicrm/css/navigation.css doesn't gets loaded if drupal already has navigation.css loaded.
Check if your custom theme has navigation.css included, this would cause the error for menu not getting displayed

Fix includes in https://issues.civicrm.org/jira/browse/CRM-17234

HTH
Pradeep


Why do some contacts share the same Drupal user?

I'm not sure what is causing the contacts to share Drupal accounts, but to detach contacts from Drupal user accounts, you will need access to the civicrm_uf_match table in your CiviCRM database.

See the question How to disconnect civi contact record from Drupal user? and the answer I posted there on how to detach contacts.


Error "CiviCRM must be installed via composer" in Drupal8

I asked on Friday in chat.civicrm.org and it sounded like the current state is still like those other instructions you've linked. I wasn't able to get it working with the automated vagrant setup and haven't got around yet to trying those manual instructions with the latest code, but maybe someone else can confirm sooner.


Javascript Contact API - how do I 'do something' with results

To get the 'groups' result from the returned 'result' - I had to access the nested data. I referenced this great explanation here: https://stackoverflow.com/questions/11922383/access-process-nested-objects-arrays-or-json

I still struggled for a bit and realized that's because the groups result i was looking for was nested down two levels.

result Object { is_error: 0, version: 3, count: 1, id: 68525, values: Object }

   values Object { 68525: Object }

       68525 Object { contact_id: "68525", groups: "Administrators", id: "68525" }

On top of that to reference that last object by a number i had to enclose on quotes.

I still have work to do towards my ultimate functionality but my proof of concept holds true.

Here's what I ultimately used to get the contents of 'groups':

console.log(result['values']['68525']['groups']);


They haven't been any to my knowledge, but assuming whatsapp as an api to post messages, it shouldn't be too complicated to implement.

If you are interested, you could write an extension and use the searchtask hook to add a "send via whatsapp" action
http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_searchTasks


A way to continue a mailing that was cancelled?

This is not pretty, but you can use the API from your browser to un-schedule the mailing.

Find the ID of your mailing

Go to Mailings > Scheduled and Sent Mailings
Find your scheduled or canceled mailing within the list
Determine the ID of the mailing by hovering over Report and looking for the number after mid= in the URL

Open a javascript console in your web browser

Begin with your web browser on any CiviCRM page.
In Firefox go to menu > "Developer" > "Web Console". In Chrome, go to menu > "More tools" > "Developer Tools" > "Console".
If you can type 2+2, press Enter, and see 4, you're all set.

Execute some API commands to un-schedule the mailing

Copy-paste the following code into the console (but don't press Enter yet)

var mailingID = 0;
CRM.api3('MailingJob', 'get', {'mailing_id': mailingID}).done(
  function(response) {
    CRM.api3('MailingJob', 'delete', {'id': response.id});
  }
);
CRM.api3('Mailing', 'create',
  {'id': mailingID, 'scheduled_id': '', 'scheduled_date': ''});

Update the number 0 after mailingID to your own ID value determined above.
Press Enter to execute the commands.

See the results

Go to Mailings > Draft and Unscheduled Mailings and find your mailing here, waiting for you to Continue


Wordpress permission issue on a fresh install of CiviCRM

I have around  workaround for this issue - not an answer or fix to the permissions problem though....

If you scroll to the footer of the page and click on the "System Status: error" link.

http://localhost/xxxxxx/wp-admin/admin.php?page=CiviCRM&q=civicrm/a/#/status)

This will take to the config checklist screen.

Still need an answer to the permissions issue though - where do I set permissions for the config checklist page, and why would they have changed if I have not upgraded anything?


Is there a way to make the contact preview easier to read?

Here is the issue https://issues.civicrm.org/jira/browse/CRM-17484. This may help you to resolve issue.


Change the web version of an email / change a URL?

Changing the URL to redirect elsewhere is something that happens outside of CiviCRM.  If you have click-through tracking enabled, you could also probably change the URL in civicrm_mailing_trackable_url in the database, but I've never tried this.


You've correctly isolated the problem to your Bluehost server configuration - and also found that their shared hosting may not be up to your needs!  You may want to get a VPS (I like Linode and Koumbit), or you may want to find shared hosting that can support CiviCRM (like CiviHosting).  Your performance problems will only get worse as you increase the size of your database.

But back to your problem - check out this post to troubleshoot.  My guess is that Bluehost has mod_security or some php.ini setting that's causing an AJAX call to fail.  This page will help you identify exactly what's failing.  Note that if you're looking to move to another host anyway, this may not be worth your aggravation!


Can't create a new event template from an existing event template

I dont think cloning an event template was planned as a feature. I think event templates were meant to be used for creating new events.

So the above behavior is probably doing what was designed.


Can't view Exported Batches (DataTables warning)

Okay, solved. There was something awry with the latest Batch in that it had been exported, but the file didn't exist in the custom directory/filesystem. I changed that last batch status directly in the database from 5 (exported) to 2 (closed) and now the screens all load as usual.

I suppose line 335 of /path-to-site/sites/all/modules/civicrm/CRM/Batch/BAO/Batch.php is trying to load information about this non-existent file and causes the error somehow, but I don't fully understand how.

EDIT: The error recurred when we tried to re-export the problem batch, but I was able to get a more helpful error message this time:

  Error: [] operator not supported for strings in CRM_Financial_BAO_ExportFormat_CSV->formatHeaders() (line 166 of /path-to-site/sites/all/modules/civicrm/CRM/Financial/BAO/ExportFormat/CSV.php).

So this is in fact a PHP 7.1 bug. Issue in lab is here. PR is here.


Our dashboard reports are inaccurate - caching issue?

This one also throws me occasionally. You should reduce the dashboard cache timeout setting to '0' in /civicrm/admin/setting/misc?reset=1

Then it will load the reports dynamically each time you access the dashboard.


My Configure Your Dashboard stopped working after update

In CiviCRM 4.7.11 the issue could be solved by closing all widgets before configuring them.
In version 4.7.12 the issue does not present itself anymore: solved.


"System Status: Error" I updated to CiviCRM 5.12.0 hosted on WordPress internally on a QNAP TS-251+ Server. Where do I go from here?

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


If you're creating a link from elsewhere that pre-populates the information, you could use a Drupal Views block that displays the country field as read-only.  (For reference: Displaying a Views block with a CiviCRM-enabled webform)


API for Event Registration with Custom Fields?

Okay, I just figured it out. I just need to chain the API call with CustomValue create:

CRM.api3('Participant', 'create', {
  "debug": 1,
  "sequential": 1,
  "event_id": 145,
  "contact_id": 2,
  "role_id": "Attendee",
  "api.CustomValue.create": {"custom_223":3}
}).done(function(result) {
  // do something
});


Scheduled Reminder Ignoring the Year of Membership End Dates

This sounds like it could relate to when the Job for Update Membership Status runs compared to when the Job for Send Scheduled Reminders run.
Eg if the above are both set for daily then it is possible that the Update Memb Status runs after the Send Scheduled Reminders, and then the Reminder is created/sent before the Memb Status has been updated.


Welcome to SE!  Sorry to hear you are having problems installing CiviCRM.
Have you followed the installation instructions here?
Files are created automatically under the templates_c directory. The only thing you need to do there occasionally is to remove all the files.  (Normally that is taken care of by 'clearing the cache').
Is the file owner of the directory the same user as the one running your webserver?
Edit after the question update: yes, you'll need to talk to your hosting company about ModSecurity.


CiviCRM Cannot add or update a child row: a foreign key constraint fails error after upgrading from 4.7.30 to 5.0.2

A workaround to this is to comment out the SQL lines in the file that drop, modify and rebuild the FK.  /CRM/Upgrade/Incremental/sql/4.6.18.mysql.tlp

This will have to be done for every upgrade with a db that does not include the FK.


How to add memo type comment field for memberships?

You can set the data type to "Note" and the input type to either "TextArea" or, if you prefer a wysiwyg editor, "RichTextArea".


CiviMail not sending mails in 4.7.6 / Drupal 7 "DB Error: syntax error"

If you'll notice (as per your Google Doc you posted), the last VALUE that the query is trying to insert is ( 1668, , 3537, null, '78ed5224ae6ab7d9' ).  The second argument is missing, and therefore the Query is invalid.

Double check if Contact with ID 3537 has an email address associated with it.  I don't know why Civi wouldn't catch this error, but that seems to be the issue.


Is it OK to drop database triggers in order to run a process?

This is not a bug, we need the triggers to be dropped for performing the database operations in subsequent code lines without having a cascading effect on other tables (a lot of these triggers are on the DELETE operator).

You will notice the triggers are then rebuild before the function exits: https://github.com/civicrm/civicrm-core/blob/1e7702fee94c891c1c1b3ec4d43688991f96b6af/CRM/Contact/BAO/ContactType.php#L921


How do I set the margins on a PDF print out of a CiviReport?

As of CiviCRM 5.3 the margins on a PDF print of a CiviReport take their margins from the default PDF page format. This can be administered at:

Choose: Administer >> Communications >> Print Page (PDF) Formats

Then edit the format marked default and set the margins individually. The margins are set in the Unit of Measure of that page format.


you need to enable the civicrm theme module, that allows you to to set specific themes for backend and frontend pages. You don't need to download it, it's already there, you just need to enable it.

By default, it's the same theme that the other "normal" drupal pages and you need to have enabled the themes you want to assign to civi


Can I turn off Drupal cron while the CiviCRM upgrade script is running?

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


Main menu disappears after updating Summary Fields extension under wordpress

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


There's a field called "capacity" on the event income summary report. Is that what you're looking for?


Contacts age as a search criteria/smart group?

Although it doesn't help you right now, search by age will be in 4.7 - CRM-16160.  You can try it in on the demo: http://dmaster.demo.civicrm.org/


Problem with permissions to edit message templates

I've identified the source of the problem and suggested a hack to work around the issue.


Has anyone tried Stripe payments through OmniPay?

I think Stripe through the Omnipay extension is not working at the moment. We are looking into Stripe as well and will wait for the regular extension to be updated like Parvez mentioned.


It’s a warning (not an error) - so it should let you save the Contribution but nevertheless it should be logged as an issue.

On a production site you will always want display Errors/Warnings -> to none;

In Drupal 7 the setting for that lives:
/admin/config/development/logging


Does civiCRM support RequiredIf validation for Profile fields

This was proposed as a feature for CiviCRM, but it never really got any funding: 'Other' option for custom fields

As Ben says, if you are (or have access to) a developer, it's not too hard to write this extension.  Add both the dropdown and the "Other" field to your profile, then use jQuery to hide the "Other" field.  Toggle whether it's hidden based on the value of the dropdown.

Use hook_civicrm_validateForm to set "Other" as required if the dropdown value matches the "Other" option.  By default it should not be required.


Not a good solution but what you can do is disable Advanced Content Filter (ACF) in ckeditor by editing the config.js file in the ckeditor folder like this:

config.allowedContent = true;

See documentation for more info.

What I do is extend the ACF like this:

config.extraAllowedContent = 'html;head;body;span;ul;li;table;td;style;*[id];*(*);*{*}';

[ ] // for attributes

{ } // for styles

( ) // for classes

That way you prevent ckeditor from striping html, body, head, id's or any element tag or even attributes that you need, but it won't add the default html->head->body by default (the behaviour with fullPage = true). The downside is that you will have to add the line on each CiviCRM upgrade, and i don't belive it will work with header/footer templates, I haven't tried it though.


That's almost certainly a timeout issue - you can increase your timeout in php.ini, but I wouldn't use the UI at all for a million contacts.  Consider using a command-line import, where there should be no timeouts.

There are several approaches you can take.

Use the command-line API CSV import.  This is pretty solid but you need to import each file multiple times - once for contact data, once for postal addresses, once for phone, once for email.  If you script it, it's not bad.  I often use Hitachi Kettle to do this.
Use the Data Processor plugin and the REST API.  There's a recent blog post detailing this approach (using Hitachi Kettle actually).  This lets you import each file once.  However, the REST API is going to do something like 10 records/second, command-line import is far faster but requires command-line access to the server.
Write your own PHP script so you don't need to break the data up.


how to setup payment processors for multiple organiazations on one instance of Civi? for franchise type locations

not sure I totally understand but if I do what you want is to setup one "Financial Type" for each chapter and then on each donation page you can select which Financial Type the money will be assigned to. You can also, if necessary, setup multiple payment processors -- one org we work with has 10 different processor accounts and financial types in order to keep chapter funds distinct.

you also might look into the civicrm multisite extension


That is the expected behavior. The preview replaces tokens based on the the logged-in viewer. If you send the email, the tokens will be replaced appropriately for each recipient.


Implications of making Activity Fields (Subject, Duration, Location, Details) required

I think the best approach would be to use hook_civicrm_validateForm to make those fields required from the Activity screen only: http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_validateForm


Where is the file civicrm.settings.php in WP?

That sounds weird. The /wp-content/plugins/civicrm/ path is for CiviCRM versions older than 4.7. For a new install you should find it under /wp-content/uploads/civicrm. I hope you are looking in right directory.


Manually adding/removing contacts in a Smart Group

If you manually add a contact to a Smart Group, the system will maintain that information, similarly if you remove a contact the system will not add the contact back in automatically.


script cli code for importing contacts in civicrm

Welcome to civicrm stackexchange.

Couple of options here.

One option is to split your file into smaller chunks.
If you have the ability to alter the php settings on the server you can change
these to increase the time over which the import can run the option
you probably want to look at is max_execution_time  - in your php
ini file. Depending on your hosting this will be in different
places.
Depending on whether your site is live or not - if you are in the set up stage you could always look at exporting your site to a local machine which you can edit the php ini on. then copy the database back - however if you don't have a local dev environment set up this might require a lot of set up.
If you want to dive into the code - then you'll need to write some custom code to do this. You are probably best to import via the api - that way you can let civicrm take care of making sure everything in the database matches up correctly.  As a first step I'd checkout the api explorer under Support -> Developer Api Explorer v3. You might want to check https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport for inspiration  -> and don't forget you'll need to call civicrm_initialize() prior to making an api call. You can use drush,wp or cv to evaluate a file against the site.

If you really wanted to court disaster you could try importing contacts directly into the sql tables - but I wouldn't recommend this as a first step.


I found out when I uninstall nz.co.fuzion.transactional plugin it is working.

I can't reinstall it to be sure it's the real cause because the plugin setup want to create an exiting DB ! If some developers used to work with Fuzion can help on that it could be great.


If you are wanting a 'count' for each status, ie a small table showing eg
Member Type X, Status A 12
Member Type Y, Status A 5
Member Type X, Status B 15 etc

and if you are using Drupal, then I built a View to demo how you can do this which you can download from here

NOTE: you may need log in as user/1 (or Masquerade as admin) in order to access the Import View window.

NOTE: this was done in response to the stackexchange question


programatically delete an event that has participants

You can delete participants from an event using:

civicrm_api3('Participant', 'delete', array(
  'event_id' => $v,
  'options' => array('match' => 'event_id')
));

Once that's done you can proceed to delete the event.


CiviCase case closed and remove remaining activities

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

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

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


I guess Activity type ACL extension will do your job. This extension provides additional permission for each activity type. By default its set to false for all activity type.

HTH

Pradeep


We have done this for Drupal in the past just with a Views Block on the /user page, or wherever they go when they log in.

There is a write up about such a View (to show the users Membership details) in this blog


Importing phone/fax/mobile phone numbers from CSV.....best practices?

I'm assuming that home and work are location types in your Civi?  If that is in fact the case, the one question I would ask from what you included is what location type to assign to the mobile phone.  Home and work would be location types, and phone type would be phone, mobile, or fax.  You would then set up your mapping in the contact import to assign the correct location and phone types to each column. Here is a sample of what I mean:

(I chose home as the location type for the mobile but that might not be correct in your situation.)

Hope this helps,
Lesley


Can I put custom field tokens into a message template?

Yes it is possible to include custom contact fields for individuals in messages sent by CiviMail by just selecting the custom field from the list of tokens.

The help on the Insert Token widget for CiviMail explains how to do it for custom organizational contacts, and the same process works for custom household fields as well:

  Custom tokens (based on custom data) can be added for organizations as well. These tokens will not be displayed in the list of available tokens, but can be added manually. The format is {contact.custom_12} – where 12 is the ID of the custom data field. To find the custom data field ID, go Administer > Customize Data & Screens > Custom Fields and click ‘edit’ on the field you want to use. Look at the URL. The last part of the URL will be an equal sign and a number (=12). The number (12 in this example) is the id of that custom field.


I posted this to gitlab here https://lab.civicrm.org/dev/core/issues/250 and the issue turned out to be related to odd records in my database.

this query, from Elieen exposed the bad row

SELECT p.id, p.name, p.class_name, p.is_active, pt.id, pt.class_name, pt.name
FROM civicrm_payment_processor p
LEFT JOIN civicrm_payment_processor_type pt ON pt.id = p.payment_processor_type_id
+----+--------------------+----------------------+-----------+------+----------------------+---------+
| id | name               | class_name           | is_active | id   | class_name           | name    |
+----+--------------------+----------------------+-----------+------+----------------------+---------+
|  1 | Dummy Processor    | Payment_PayPalImpl   |         1 |   10 | Payment_Dummy        | Dummy   |
|  2 | Dummy Processor    | Payment_Dummy        |         1 |   10 | Payment_Dummy        | Dummy   |

so I updated the row in civicrm_payment_processor to change Payment_PayPalImpl to Payment_Dummy and everything works without the modification to civi code.


Does Paypal insist on an SSL certificate? Maybe yours is not compliant?


The apache solr module by default does not index civicrm tables. There is an integration with this module that indexes civicrm attachments:

https://github.com/civicrm/apachesolr_civiAttachments

This was work done for the New York State Senate. The next steps would be to get other civicrm tables indexed via this or other similar modules.

You might want to check the Drupal Entity  integration. This might make integrating with solr a lot easier

If you do make progress on this, please do share your work


Buildkit Site fails to load due to PHP ugrade from 5 to 7

It's on your php.ini config file. where it it depends on your OS, in ubuntu/debian it's under /etc/php5 and you have cli and fpm, check that the cli version enables the extension simplexml

FYI, CiviCRM is not yet super tested with php7 (was classified "experimental" two months ago

https://civicrm.org/blog/totten/civicrm-4712-rc-experimental-support-for-php-7-mysql-57

for the details: https://issues.civicrm.org/jira/browse/CRM-17789

X+


Can a Custom Field be added to a Contribution Page or Financial Type?

Under Administer > Custom Data and Screens, Create your Custom Fields
Under Administer > Profiles, Create a Profile that has your Custom Fields in it.
Under Conrtibutions > Manage Contribution Pages, select the Page you want it to appear on. Under the Include Profiles tab, add that Profile. You can add it at the top or bottom of the Contribution Page.


CiviCRM Dashboard Not Working - WordPress installation

Check the civicrm log in /../uploads/civicrm/ConfigAndLog or /../plugins/files/civicrm/ConfigAndLog

Check the error_log. phpinfo() will tell you where it is.

I had upgrade problems because the CONSTRAINT clauses were missing for my FOREIGN KEYS


I guess path (media/civicrm/persist/contribute/images/ ) works fine and you are getting issue with the image in path (media/civicrm/images/black_logo_250_150dpi.png") if this is the case please

check your file permission -


Is there a mistake in the Upgrading CivCRM for WordPress instructions?

The assumption that was made in the instructions is that you must extract the files into the /wp-content/plugins/ directory and then rename the resulting file to civicrm, just like the old directory was named. The previous step to this was to backup /wp-content/plugins/civicrm.

E.g. Back up and delete /wp-content/plugins/civicrm then extract the new version and name it civicrm and put it in /wp-content/plugins/, thus replace the previous.


Set Billing Address to be Not Required in Contribution Page

I am surprised that Authorize.net does not require a billing address!  I don't recall ever seeing that.

With that said, I would recommend you still require billing addresses.  Right now the volume of fraudulent credit card transactions on non-profit sites seems to be skyrocketing and anything you can do to protect yourself would be prudent. The last thing you want is to have Authorize turn off your account due to fraud and you won't get any contributions then!


How to transfer ownership of an extension

There are several places which rely on the full name of the extension:

Extension directory: One must create a new record for the new extension key. Ownership, release-history, etc, will be different.
Pingback stats: The old and new name will have separate stats.
Upgrades (downloading new code): Upgrades issued in the new name won't be displayed as upgrades on existing installations (which expect the old name).
Upgrades (tracking/updating DB schema): The schema versions of the extensions are separate.
Managed entities: If the old and new extensions insert managed entities, there could be uniqueness conflicts. (The ManagedEntities manager does not impose a global uniqueness constraint, but some specific entities do enforce uniqueness -- eg you can't simultaneously register two payment-processor-types with the same name.)

My recommendation: Don't think of it as renaming an extension; think of it as publishing a new extension (and reusing code from the old extension). The new extension should be designed around the old one (eg using different names throughout and/or migrating data).

Speaking in the abstract without a specific extension, it's not simple to rename or replace a extension. However, for specific extensions, there may be mitigating factors:

(No) DB content: If the extension only adds runtime functionality (via hooks) and does not insert anything into the DB, then it will be easier to rename/replace. If the extension does insert into the DB (eg via hook_install, via Upgrader, or via managed-entities), then expect some tasks or complications.
Private vs public extension: If the extension wasn't released to the public, then you may be able to hack through conflicts (eg manually changing over DB references), and you probably won't care about the extensions directory, the pingback stats, or distributing upgrades.


Can you use multiple payment processor on one form

I figured out the issue. It was the Autoptimize plugin that was causing the total amount not to show. I checked the setting: "Force JavaScript in ? Load JavaScript early, this can potentially fix some JS-errors, but makes the JS render blocking."

Now that I have this checked the total box shows and I get the payment options section to show. Yay!


There is the generic CiviCRM demo, but that only shows the back-office part (see https://civicrm.org/demo). I assume your client would be interested in the outside facing web part, and that entitely depends on what you can do with Drupal, Wordpress or Joomla. It will be hard to show you one example that gives you an idea of what the new member sign up looks like not because they are not there but because there are so many!


How to email a link to a confidential document in Civi

I would be building it as a View and setting the Roles for access to the View from there.


Is it possible to use Civimail without unsubscribe / opt out option?

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.


Invalid argument supplied for foreach in Report.php on line 264

The "Constituent Details" report template is not designed for export to csv, so if that is wanted it is better to select "Constituent Summary" template to create the desire contact report. In this case, the csv is produced and emailed properly.

In my case, I still receive some run-time errors while the report is running, but it does not negatively affect the output that I need.


I just successfully replicated this as well.  You've found a bug!

You can report this at http://issues.civicrm.org.  See the page "Reporting a bug", starting with step 7.

That said - "CiviCRM is free to use, but not free to write."  Given the limited resources of the core team, they're very unlikely to fix this without someone stepping up to help with either money or a fix.  That's the economics of free software!  So your choice from here is to:

Submit this to the paid issue queue.
Fix the bug yourself, or, assuming you're not a programmer, find someone to fix this bug for you.  Submit the fix to the core team via Github.
Work around the bug.  Maybe you can restructure your data.  If you were using Drupal, I'd recommend using Drupal Views integration, but unfortunately there's no real equivalent to Views for Wordpress.


When Paypal Standard pay as Guest (no paypal account) Session Expired message on Thank You

It turns out the existing Paypal account had its Primary Email set to one that was different from the Merchant Email used for Paypal login. Making these both the same fixed the pending contribution issue.


Allow Duplicate External IDs for later merge?

I do not think there is a (good) way to use duplictae external IDs in CiviCRM - if you want to use the external ID field to do so. You could however create a custom field, import your external ID in that one and then adapt your matching rules to find duplicates (/civicrm/contact/deduperules?reset=1).


CiviCRM will not recognize valid email address

The client-side validation in CiviCRM will flag any invisible or space characters which get pasted in along with an email address or URL. The non-printing characters are the trickiest to find, including things like carriage returns and line feeds that seem to get swept up in some copy-paste operations. I encounter this problem relatively frequently, but it is hard to pinpoint the exact combination of platform, browser, and source.

Therefore, if I have an e-mail address or URL which doesn't seem to take even though it appears to be well-formed, I "clear" the characters by pasting someplace else first, like the To: field in an e-mail or the URL bar in the browser. This strips out the non-ASCII characters, and I can then re-select the desired text and paste it into CiviCRM as usual.


A work around I use is to use simple text area instead of CKEditor.

It should be fixed in 4.7.5 according to this issue.


Search builder does not display date picker for contacts

There was a small bug introduced in the last version where the calendar icon didn't show up in search builder date fields, but the actual datepicker still works fine.

The screenshots and videos are misleading, as they use Contact:Created Date as the example field - this is actually not a date field (despite the name) it is a Timestamp which doesn't work with the datepicker widget, unfortunately, so I don't believe this is a regression.

Edit: I stand corrected. Previous versions did provide a datepicker for timestamp fields, however it didn't work very well since it didn't allow you to specify time. I've created a fix to restore the datepicker and add a timepicker for those fields: https://github.com/civicrm/civicrm-core/pull/13249


This 'sounds' like the angular issue hitting your site and you are likely to find similar tickets if you search Tags = Angular


We are seeing this same issue and reported it here https://issues.civicrm.org/jira/browse/CRM-21785?jql=text%20~%20%22resource%20url%22. It appears to be a false positive however.


How can I display variables for templates other than the top/main one?

To view debug output for the main page template, add &smartyDebug=1 to the url of your page.

To view debug output in a nested template, add the tag {debug} in the template itself.

Note that only users with the permission "view debug output" will be able to see debug info.


HTML & Event Pages: Unspecific IDs and Classes at the top

You can use the body_class filter, query CiviCRM's state and then add suitably named classes:

add_filter( 'body_class', 'my_civi_add_body_classes' );

/**
 * Add classes to body element if on CiviCRM basepage.
 *
 * @param array $classes The existing body classes
 * @return array $classes The modified body classes
 */
function my_civi_add_body_classes( $classes ) {

    // bail if no CiviCRM
    if ( ! function_exists( 'civi_wp' ) ) {
        return $classes;
    }

    // bail if not on CiviCRM's basepage
    if ( 'basepage' != civi_wp()->civicrm_context_get() ) {
        return $classes;
    }

    // get CiviCRM's arguments
    $args = civi_wp()->get_request_args();

    // bail if we don't have any
    if ( is_null( $args['argString'] ) ) {
        return $classes;
    }

    // check for event
    if ( isset( $args['args'][1] ) AND $args['args'][1] == 'event' ) {
        $classes[] = 'civi-event';
    }

    // check for listing
    if ( isset( $args['args'][2] ) AND $args['args'][2] == 'ical' ) {
        $classes[] = 'civi-event-list';
    }

    // check for info page
    if ( isset( $args['args'][2] ) AND $args['args'][2] == 'info' ) {
        $classes[] = 'civi-event-info';
    }

    // check for registration
    if ( isset( $args['args'][2] ) AND $args['args'][2] == 'registration' ) {
        $classes[] = 'civi-event-registration';
    }

    // ... add further checks ...

    return $classes;

}

Amend as per your requirements.

Cheers, Christian


mismatch between journal and contribution transaction ID

It’s 100% the same transaction. iATS reported they had an issue with Transaction ID numbering sequence for a portion of Nov. I’ll copy paste the Email thst went out to Partners:

Dear Valued Partner,
Please be advised that if your environment takes postbacks and/or runs morning download journals from the iATS system, your clients may have recently been impacted by duplicate transaction records caused by a logic error in creating and assigning iATS transaction ID's.
When did the issue occur?
From November 18th to December 2nd .
Has the issue been resolved?
Yes. Our development team has identified the root cause and made the necessary coding changes to correct any duplicate iATS transactions importing into your environment. We can confirm that this was due to our logic in creating/assigning iATS transaction ID’s and did not impact the number of transactions charged to account holders. This has been corrected and should not occur again, but as always, please keep us informed if you see any instances of this occurring.
What should you do?
There is no update needed on your part to correct the coding in order prevent this in the future. Clients are free to delete the duplicate iATS transaction from the environments without worry of impact. Note, clients should check the iATS portal to confirm which iATS transaction was processed and which one was the duplicate needing to be deleted.
If you have any additional questions, or should you need assistance in identifying these duplicate transactions, we are happy to assist you, or our mutual clients directly. They can reach out to our iATS Customer Care team for assistance with this process at iatscs@iatspayments.com or via phone at 1-888-955-5455 Option 1.
Sincerely,


Credit Card Payment after Editing Event Registration with more Choices

One option would be to delete their initial registration, then use the public registration form either Incognito or the 'register as other' and submit their new registration with their credit card payment.


Creating a public Member organisations directory with CiviCRM in Wordpress

The best practice for this is to create a profile (Administer menu > Customize Data and Screens > Profiles).  Check out this page in the section labeled "Displaying information on public pages", and also "Making directories with Profiles", further down that same page.


Why do Activities entered via a webform *not* marked as Completed get entered into Civi as completed?

If you use a webform condition (part of Drupal webform 4.x), with a question like 'Did you speak with the target?', you could hide the fields for Activities 2 and 3 if the caller enters 'No'. If the fields are hidden based on the condition, they will not process to CiviCRM.


How do i add a new checkbox in message template

You'll need to create an extension - see https://docs.civicrm.org/dev/en/latest/extensions/ to get started, and then you'll want to look at https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/ to add the checkbox and then https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postProcess/ to actually do something with it when the form is saved.

But also because the upload documents section is in a hidden section until you click the radio, if you want to add the checkbox in the same section you'll also need to look at https://docs.civicrm.org/dev/en/latest/framework/region/#region-reference to put it in the right place, or maybe insert some javascript there that also hides/shows your checkbox when the radio is clicked.


Modify unsupervised dedupe rule to ignore whitespace?

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


CiviMail error: "Sorry an error occurred and your information was not saved"

I've run into this error for three reasons:

1: I copied and pasted in text and there was a special character in there that CiviCRM did not like. I figured out which one it was by pasting in only pieces of the text and watching to see when it quit saving and instead gave me the error.

2: I'd upgraded CiviCRM and the permissions weren't correct on some files (I'm logged in as root and therefore have to change owner/group when I upload).

3: A modsecurity issue. My host was able to look at the logs and whitelist the URI that was causing the issue. Last time it was: /civicrm/ajax/rest


They are several places where you can use fonts (by order of complexity):

1) web pages (eg contributions)
This one is simple, it's a matter of changing the css and possibly loading an extra bit of code (if you use google font for instance)
It's easier to do it from the theme of the CMS around your civicrm

2) mails
you can request to use a specific font (but you will need to inline the font, as most mail clients ignore stylesheets). If that font is already installed into the computer of the recipient, it will work, if not, you're out of luck

3) pdf
you will need to register these fonts (as new files) and so probably have to code
My experience with pdf is that it has several limitations (eg it isn't always unicode and you might lost some accentuated characters)

The last one I haven't tried, but can point you to were you might need to change the code:
CRM/Utils/PDF/Utils.php
CRM/Utils/PDF/Label.php

CiviCRM uses http://www.tcpdf.org as the library to convert to pdf, check there first

If you have full control on your server, you can as well configure civicrm to use wkhtmltopdf, it should be as simple as the case 1 to add custom fonts to your pdf


Is it possible to not have a default country?

CiviCRM allows you to over-ride the settings through php. You can over-ride default value for Contact Country.

Add the below snippet in your sites civicrm.settings.php file

global $civicrm_setting;
$civicrm_setting['Localization Preferences']['defaultContactCountry'] = '';

Ref: Override CiviCRM Settings

HTH

Pradeep


Sage Pay is a tried and tested UK payment processor that works well with CiviCRM -

https://github.com/circleinteractive/uk.co.circleinteractive.payment.sagepay


Send rejected participants to wait list?

If you look at the participant statuses (Administer>CiviEvent>Participant Statuses) you can customize these any way you want. You can use the wait list by manually changing to that. The key is how they are counted. If you look at the class column you will see the following:

Positive - paid in full, etc.
pending - counted but awaiting payment, can from pay later or just moved off wait list.
waiting on wait list or some other state (not counted)
negative - rejected or not approved, etc.

You can manage the statuses in what ever way best fits your process. You want to make sure your reporting reflects how you decide to use statuses. Also, make sure you aware of which statuses are being counted against the participant total.

Hope this helps


Is there an automated way to check if a list of extensions is compatible with a version of Civi?

If you go to the CMS independent tab within the extensions direcotry  page, there's a field to filter by "CiviCRM Compatibility". Here are the extensions compatible with CiviCRM 4.7


I recently had a similar problem with the Manage Tags interface that was caused by a 'created_date' field in the tags table having a value of zero. Providing a valid date in the field solved the problem.


Recurring Contribution marked incomplete and no receipt sent but card is charged

There needs to be a silent post URL inputted into Authorize.net

  CiviCRM will need to be notified of the success of recurring
  contributions via a Silent Post URL. Within CiviCRM, get the ID number
  of your payment processor by looking at the URL of the form for
  editing your payment processor: it should read "&id=" followed by a
  number. That number is your ID. Within Authorize.net, go to Account >
  Settings > Silent Post URL (within the Transaction Format Settings
  section). On that page, enter the URL (the following examples are for
  payment processor ID 2):

Drupal: https://yoursite.org/civicrm/payment/ipn/2

Joomla!: https://yoursite.org/index.php?option=com_civicrm&task=civicrm/payment/ipn/2

WordPress: https://yoursite.org/?page=CiviCRM&q=civicrm/payment/ipn/2

  If you fail to do this, one-time contributions will succeed normally,
  and recurring contributions will be processed successfully by
  Authorize.net, but the contribution status will be stuck at Pending.

Source: https://docs.civicrm.org/sysadmin/en/latest/setup/payment-processors/authorize-net/


Can I send automatic, scheduled e-mails about expiring or just-expired memberships?

Multiple scheduled reminders are already possible out of the box using the "Scheduled Reminders" feature.
From the online book:

Creating and managing scheduled reminders
Scheduled reminders can be created from the administration page at Administer >
Communications > Schedule Reminders or during the creation of an
event.
From the administration page:

Click on Add Reminder.

Give your reminder a name that will help you identify it if you need to edit it in the future.

Select an entity for your scheduled reminder. This will bring up a further set of options relevant to that entity: activities have
activity types and statuses; membership gives membership types and
statuses, and so on. These secondary options are (usually)
multi-select fields, so you can choose to include more than one option
in each field.

Choose when to send the reminder. This can be a set date or an amount of time before or after the start or end of your chosen entity.

If you want to send more than one reminder, check the Repeat box. This gives you choices about the interval of repetition and when the
repetition should end.

Check Record activity for automated email if you want a record of the contacts who received this reminder.

Fill in From Name and/or From Email if you don't want this reminder to come from the default name and email address for your
site.

Refine or add to your recipient list. For more about your choices, see Limiting or adding to your recipient list in this chapter.

Choose to send your reminder as an email, an SMS or either depending on the preferred method(s) of communications for the
contact.

Compose your message. You can use Message Templates or write the message from scratch. Note that you cannot save your message as a new
template or modify an existing template from this screen, so if you
are writing a reminder for the first time and you think you will want
to re-use it, consider creating it as a Message Template instead.

Click Save when you are are done.

Reminders can be edited, disabled, or deleted from Administer >
Communications > Schedule Reminders.
IMPORTANT: Your system administrator will need to ensure that the
Send Scheduled Reminders scheduled job is enabled and runs at least once a day. Refer to the Scheduled Jobs chapter for configuration
details.


It adds them to CiviCRM and then you can search for them. You likely need to add a group or tag (I like a group, as I use it for mailing lists) to the settings for the profile that you are using. Then anytime someone fills out that form, they are added to your Volunteer group. Then inside CiviCRM you can easily run a search to pull the entire list of everyone who has signed up on that form.

And by using a group, you can then send them emails with volunteer opportunities - just make sure you select that it's for mailings when you create the group.


Is there a CiviCRM User Actions Log Feature?

The short answer would be "no" since CiviCRM is not responsible for authentication, the CMS is.
CiviCRM can be configured with various levels of logging, but as a general strategy, you'll want to make use of multiple tools when investigating security issues, which will depend on your individual setup.
For the specific issue of 'theft of user information', there is an extension that prevents administrators from downloading contact data unless given explicit permission, you might want your organization to use that going forward.
Other than that, if it's a bunch of data that was downloaded, then I'd comb the webserver logs for large downloads, find the originating ip and then look for matching login urls with the same ip.


What's the correct webhook for Stripe 5.2 extension?

Yes, The new webhook url should be https://www.example.com/civicrm/payment/ipn/1 where 1 is the payment processor ID.

Cheers

Pradeep


How can I assign one contact to one of the team workers?

ACL or Access Controls should be able to do that.
https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/

BUT... I've never worked with Joomla so can't offer any further advice


Can't get Cron to run on WordPress CiviCRM via Dreamhost - am I doing it right?

See the SysAdmin guide section on scheduled jobs for details of how to set up cron jobs.

For WordPress I use the wp method with a wrapper script:

#!/bin/sh
wp=/path/to/wp       # Path to the wp executable eg /home/X/private/bin/wp
url=https://mysite   # URL of your site eg https://example.org
base=/path/to/wphome # Path to the wordpress installation eg /home/X/www/www

out=`$wp --user=cron --url=$url --path=$base civicrm api job.execute auth=0 2>&1`

if echo $out | grep -qv '\[is_error\] => 0'; then echo $out; fi

Save the wrapper script somewhere, edit the wp, url and base settings, set up a cron user in WP with appropriate permissions, add a cron entry to call this file. Cron suppresses blank output so you only get a mail if something goes wrong.


Error upgrading database in WP: "Queue runner must be configured before execution

I saw a solution for this problem on a Drupal platform and decided to try it: you need to delete all the entries in the civicrm_cache table in your Wordpress database using phpmyadmin before you try and upgrade the database. This resolved the issue for me. Civi version 5.27.4


Redirect to dashboard instead of redirect to add form

Drp, Welcome to stackexchange!

I guess userdata link is the one you have created through extension/plugin and is also registered using xml and have menu rebuild. When menu link is not registered in CiviCRM it will default redirect to CiviCRM dashboard page.

If you haven't registered than

Register menu link using hook_civicrm_xmlMenu.
Rebuild menu by running /civicrm/menu/rebuild?reset=1 or Navigate to CiviCRM >> Administer >> System Settings >> Cleanup Caches and Update Paths >> Cleanup Caches.

HTH

Pradeep


How do I change my organisation's address in a mailing?

You can change your organization address by going to
Administer > Communications > Organization Address and contact info.

Alternatively and less recommended,you can disable the check for mandatory tokens in CiviMail by going to:
Administer > Civimail > Civimail component settings


Does CiviMail SMTP work with Amazon AWS SES?

The thread Lobo is referencing is out of date IMO.  I've set up AWS SES with CiviMail multiple times in multiple configurations.  My personal documentation is here.
I've also successfully set up Postfix locally on a VPS as a smarthost to relay to SES - this is nice because then all e-mail from your VPS (e.g. backup notifications, cron failures, etc.) go through SES.  I don't have good docs for that, unfortunately.
Finally - note that my biggest pitfall with SES wasn't SES itself but EC2 - Amazon severely limits outgoing traffic on SMTP ports from EC2 unless you request they manually lift their throttle!
EDIT: A bunch of us discussed our mailing tool at CiviCon today.  Mandrill seemed very popular, for a number of reasons - like subaccounts and the strength of the CiviCRM integration.  I wasn't the only SES person - but there was a strong argument that if you do, you must relay through Postfix.  If Amazon throttles you, CiviCRM won't retry - Postfix will.  You could lose e-mails.  Also you can lose e-mails when exceeding quota.  So it works - but I may try Mandrill next time!
ANOTHER EDIT: Forget Mandrill, SparkPost is the third-party mailer of choice in Civi-world these days now that Mandrill jacked up the prices.


We created a custom field to import it in so we had them on file, then as members renewed we switched over to using their contact ID's as member numbers and put a notice in their renewal emails that they would notice changes.


How can I edit how CiviEvent pricing is displayed?

You may be able to fix this with custom CSS. The following class is what you would need to adjust. Try setting the margin-left rule until the options line up. I have seen this when I am adjusting column widths on front end forms.

.crm-container .crm-section .content {
    margin-left: 17%;
}

Note: my edits are usually in WordPress. There may be interactions with your Drupal theme that override this.


Changing group_type to mailinglist fails with unknown db error / deadlock

This sounds like corrupt tables or a stuck MySQL process.

If you have access to phpMyAdmin, you can select all tables at the bottom and then choose "repair tables".

If you do not have phpMyAdmin, but you have access to ssh then you can use mysqlrepair (or mysqlcheck -r), see more at http://linuxcommand.org/man_pages/mysqlcheck1.html

If you have neither you should ask your hoster to do a repair for all tables.

Besides that, restarting MySQL makes sense.

If you need further MySQL tweaking, please look at http://mysqltuner.com/
Nothing I have seen beats that script.


How to have form not require billing address if zero fee in priceset is selected in Event?

Sounds like https://issues.civicrm.org/jira/browse/CRM-16929.
You might need to apply the 3 patch that were submitted to this issue -

https://github.com/civicrm/civicrm-core/pull/7191
https://github.com/civicrm/civicrm-core/pull/7286
https://github.com/civicrm/civicrm-core/pull/7289

The first two are pretty longer patch so not sure if they will be applied directly. Recommendation is to upgrade CiviCRM to the latest version.


There is no way to do this in the User Interface, you would have to develop a little extension that customizes the Contribution Summary Report by adding the Payment Instrument as an additional grouping. You can find some guidelines here: https://docs.civicrm.org/dev/en/latest/framework/civireport/

Or log a request at Gitlab for an improvement to the core report. You can do that here: https://lab.civicrm.org/dev/core/issues


You can only edit the email signature when you open the full edit screen for your contact, not when you do an inline edit for email addresses.

Go open the contact whose signature you want to set
Click Edit at the top of the contact's record
Then, scroll down and you'll see Signature below each email address.  You can set it there.


As you have surmised, the option to select a template when emailing an invoice from the contribution is not currently an available feature but it is an interesting feature request. I took the liberty of creating the feature request on JIRA on your behalf: https://issues.civicrm.org/jira/browse/CRM-19155

Kind regards,
Tamar


When the smart group cache is regenerated, are disabled smart groups regenerated?

Pretty sure that we only consider active groups to regenerate the cache:

CRM/Contact/BAO/GroupContactCache.php

also most smart groups are regenerated on demand. The scheduled job invokes the loadAll function with groupsIDs as null, which in turn restricts the query to is_active groups


As far as I know - If you dont need any specific action to be done on the form which you have created before you hit the submit button then you should be alright

For example:
If you enter a Postcode on the form and you need to populate address line of the postcode before submission then you need to write AJAX to fetch the records from Database

Links for civicrm Ajax: references

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

https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms

Also you can find a good example of Ajax used in the below extension

https://civicrm.org/extensions/civicrm-postcode-lookup

I guess this helps !!!


Create a deceased column. If a person is deceased give the value 1, otherwise give the value 0.

Generally, 1 is checked 0 is unchecked for the check boxes.


Summary Fields triggers settings not enabled

Sorry for the slow response - I am just now seeing this question.
The status should be: "Setting changes were saved on 2020-05-04, data calculation will be performed on every cron run." I'm not sure why that confusing message is displayed instead. Do you have the summary fields cron job enabled? If not, that could be the problem. When the summary fields cron job runs, it should create the triggers and calculate as needed.
For testing, you could also try updating the settings manually. In other words, where it says "When should these changes be applied?" - select "When I submit this form". Then click the save button.
If the status still says the triggers are not created, trying de-selecting one of the fields in the configuration and saving. Then, re-select and save again (summary fields pays attention to whether there are any changes in the list of selected fields and will only update the triggers if there is a change).


How do I reclassify a contact to be a household when it has been created as an organisation?

Helen, Welcome to CiviCRM stack exchange. The Contact Editor extension provides UI to change contact types.


Bulk Update Participant Status via REST API

The right place to experiment with possibilities of the API is API Explorer that you can find at Support -> Developer - API Explorer in your local CivCRM instance or on the Demo site.

All the participants of an event can be selected with:

http://dmaster.demo.civicrm.org/sites/all/modules/civicrm/extern/rest.php?entity=Participant&action=get&api_key=userkey&key=sitekey&json={"sequential":1,"event_id":3}

The update of status can be accomplished with the create action in combination with an already existing participant_id. For example:

http://dmaster.demo.civicrm.org/sites/all/modules/civicrm/extern/rest.php?entity=Participant&action=create&api_key=userkey&key=sitekey&json={"sequential":1,"id":3,"status_id":"Cancelled"}

moves the status to Cancelled.

Success with your app.


error: "Found installation Canary" while installing CiviCRM

Shashikant,

Were you able to complete the installation mentioned at https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+Wordpress ?

Kurund


Can you try by downloading the extension from here and replacing it with older one in extension directory and then visit the extension page on click on refresh.


That's not an error message. When the setup.sh script outputs "NOTE: Logout from your CMS to avoid session conflicts." then it has successfully completed. You may proceed to log in and begin using CiviCRM.


Changes not saving when using other contact's address

This has been confirmed as bug CRM-16588. Please consider marking this as the accepted answer, so that future Stack Exchange users with this issue can find the bug status to identify when the bug has been fixed.


I'm not sure about Divi but with Guttenberg you can use either the shortcode block or paragraph block.
Just paste the code in there e.g. [civicrm component="event" action="info" id="1"]


I don't think there is, but perhaps if you contact the team behind CiviVolunteer (Ginkgo Street Labs - inquire@ginkgostreet.com) they'd be able to update it for you :)

John


Create a Personal Campaign Page links to a page that does not exist

Please try to create a new page in wordpress and then include CiviCRM component in the wordpress page and then please try the same


Agree with JohnFF and JonG that it's good to look at buildkit/civibuild for this. If you review the main page for the test suite (http://wiki.civicrm.org/confluence/display/CRMDOC/Testing), you'll notice a common theme -- all the tests should work out of the box on new builds if you use civibuild. (They need to -- because the civicrm.org test infrastructure runs on civibuild.) A manual installation requires more work.

In this case, the instructions you've come across in Setting up your personal testing sandbox HOWTO are out-of-date -- those instructions apply from roughly v2.x - v4.6. The test-runner changed a bit in v4.7.

How it works in v4.6 and earlier: Civi included a fork of phpunit with several small patches, and the tests only worked if you used this fork of PHPUnit. This had several consequences like:

Every developers' copy of CiviCRM required an extra config file under test/phpunit/CiviTest.
Upgrading phpunit (eg to run in newer versions of PHP) was onerous.
Running a test-class in an extension was pretty hard. You needed a way to link your test with the Civi installation. (The location varies depending on the CMS and configuration.)
Running a test in an IDE was... hard? impossible? (I never did it 4.6 or earlier.)

How it works in v4.7: Tests are no longer special programs with a strongly-prescribed structure. Instead, we've addressed the broader problem of how to load Civi in your CLI scripts. You can use any test-runner (phpunit, codeception, behat, etc) with any package (civicrm-core, civicrm-drupal, or an extension). A "Civi enabled test" is just a plain-old PHP script which includes a line like this:

eval(`cv php:boot`); // or...
eval(`cv php:boot --test`); // or...
eval(`cv php:boot --level=classloader`);

The cv tool is responsible for loading/booting CiviCRM in your test.

When designing tests, there are different types of tests... such as bare unit-tests, headless database tests, and end-to-end tests. For more discussion about these concepts, see:

https://github.com/civicrm/org.civicrm.testapalooza
https://civicrm.org/blog/totten/developers-extension-testapalooza

If you haven't used civibuild, then pay particular attention to the README for org.civicrm.testapalaooza under "Setup: Option B: Manual".


your username has not got permission to Edit message template

so please try to view - Drupal Access Control

Administer -> Users and permissions -> Permissions(access control)

where you will see the following role and try to enable for your user group

  CiviCRM: edit message templates

If you don't have permission then please ask your admin or login to admin user and enable for specific user group

refer to link https://book.civicrm.org/user/current/initial-set-up/permissions-and-access-control/

I guess this helps !!!


Getting errors when moving D7/CiviCRM install form localhost xampp portable to another location

Had to change the path name in civicrm.settings.php from:

G:\XAMPP_2018\htdocs\crm4

To

C:\Core\XAMPP_2018\htdocs\crm4\

This is around LINE 180:

Code looks like this:

$civicrm_root = 'G:/August25/XAMPP_2018/htdocs/crm4/sites/all/modules/civicrm';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
  define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'G:/August25/XAMPP_2018/htdocs/crm4\sites\default\files\civicrm\templates_c\');
}

But the slashes also have to be forward like this "/", I searched from Windows path, that's why I couldn't find the code using find and replace!


How can I pass CiviCRM first name and last name fields to Drupal API user_save

The user_save() function can't take CiviCRM data.  CiviCRM injects a profile into the user creation page when you create a user through the UI.

To handle your scenario, you'll want to:

Call user_save().  It will return a user object, including the UID.
Call the CiviCRM UFMatch.get API to get the corresponding Civi contact ID.
Call Contact.create on the contact ID to insert the first/last name.


Formatting of formatted text in print case and activiy audit

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.


Following a CiviCRM checksum link doesn't populate civicrm tokens but logging in populates the tokens.

I assume the "page" you're referring to is using a Webform, If that's the case, then you should mention that in the title.
The link to the form should be of the format http://example.com/your_form?cid={contact.contact_id}&{contact.checksum}.
On the CiviCRM tab, in the Contact Field section, select Existing Contact, as well as all the fields you want to appear on your Webform.


How to set the CMS language as the preferred language of the contact?

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

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

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


How to search for emails "on hold opt out" and not "on hold bounce"

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

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

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

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

Hope that helps.


How do contact hashes work, and how do I keep them secure?

My understanding is that Lobo's answer above is slightly misleading (at least if you read it 100% literally--the gist what he is saying is exactly correct, as usual, but the exact terminology may lead some of us astray).

The contact hash is a value stored in the civicrm_contact table of the database (i.e., civicrm_contact.hash).

The contact hash is used to generate the contact checksum, which is more precisely what Lobo is discussing above. It's easy to conflate to two, because they are closely related.  To add to the confusion, the contact checksum is itself a type of hash--but a different one from that hash found in the database under civicrm_contact.hash.

The contact checksum isn't stored in the database but is generated afresh by a call to a CiviCRM function each time it is used. The checksum encodes the time it was generated and also the time it should expire, along with the pertinent civicrm_contact.hash to make a new hash. So the checksum is designed to be shared (e.g. with the contact associated with it) to allow temporary access to various parts of CiviCRM, and it expires after a set period.  By default, checksums that civicrm generates will expire after 7 days.  But tou can set that expiration time period to whatever you want, including infinite, when you request a checksum to be generated.

The civicrm_contact.hash, by contrast is a secret and shouldn't be shared publicly--probably not even with the contact.  It is something like the user's password, and someone with the contact hash could use it to permanently gain access to do anything with that contact that they could do with a valid checksum: edit that contact's information, view payment and general CiviCRM history for that contact, register for events or making payments on behalf of that contact, etc.

Also, as far as I know, the contact hash is never automatically regenerated.  (If it were ever changed or regenerated, it would immediately invalidate any checksums that happened to have been recently issued for that contact--generally not something that you would want to do.  If you want to give temporary access that expires, you would send them a checksum that expires, not change the hash.)

So leaking the hash is not quite as serious as, say, leaking a person's Drupal password, but it is still a privacy breach and something you'll want to avoid in almost all cases I can imagine.

Just for example, someone with the hash could generate a valid checksum to allow access to that CiviCRM contact at any time.

In short, when working to allow contacts temporary/non-password access to view or update their account info, you want to use the checksum--which is *based on the *contact hash** but not the hash itself.  The hash is a secret and you should keep it secret.

An example of how to get the contact's checksum & turn it into a URL that could be used to edit the contact's profile:

// initialize civicrm stuff
// Source: https://forum.civicrm.org/index.php?topic=21438.0
civicrm_initialize(true);
require_once(drupal_get_path('module', 'civicrm').'/../CRM/Contact/BAO/Contact/Utils.php');
require_once(drupal_get_path('module', 'civicrm').'/../CRM/Utils/Mail.php');

// try looking up the contact
$result = civicrm_api('Contact', 'get', array('email' => $email, 'version' => 3));
foreach($result['values'] as $contact) {
    // generate a url for this contact
    $checksum = CRM_Contact_BAO_Contact_Utils::generateChecksum($contact['contact_id'], time(), 24); // 24 hour checksum
    $query = "reset=1&gid=9&id=".$contact['contact_id']."&".$checksum;
    $url = CRM_Utils_System::url('civicrm/profile/edit', $query, true, null, false);

Code from CRM/Contact/BAO/Contact/Utils.php showing the header for the checksum generation function

  /**
   * Generate a checksum for a contactID
   *
   * @param int    $contactID
   * @param int    $ts         timestamp that checksum was generated
   * @param int    $live       life of this checksum in hours/ 'inf' for infinite
   * @param string $hash       contact hash, if sent, prevents a query in inner loop
   *
   * @return array ( $cs, $ts, $live )
   * @static
   * @access public
   */
  static
  function generateChecksum($contactID, $ts = NULL, $live = NULL, $hash = NULL) {

Header from Utils.php showing how to use the checksum validate function:

  /**
   * Make sure the checksum is valid for the passed in contactID
   *
   * @param int    $contactID
   * @param string $inputCheck the checksum to validate
   *
   * @return boolean           true if valid, else false
   * @static
   * @access public
   */
  static
  function validChecksum($contactID, $inputCheck)  ...

Sources: https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens

Get or generate a contact checksum via API?

https://drupal.stackexchange.com/questions/140841/how-to-ensure-civicrm-checksum-cid-are-valid-in-custom-drupal-module

http://backofficethinking.com/blog/civicrm-tip-did-you-know-you-can-use-checksum-tokens-webforms


Can I set a contribution page to have pledge selected by default with a default number of installments?

There isn't currently a setting to change this behavior. You will need to add JavaScript to your template file (or via an extension) to check if the donation page has pledge as an option, and if so, to select it.


How do you display cross-contact searches?

Try creating a smart group of the indiviuals - you should be able to search for all individuals with that particular relationship. You can then export the contact info.

When exporting, you'll need to select 'Individual' > Relatonship (e.g. 'Employee of')' > Organisation details for each of the address fields

Actually, thinking about it, that might be the problem with your attempt - try selecting the export field 'Organisation' > Relationship (e.g. 'Employer of') > Individual details.


how do I determine the specific instanceId for a given report

Its quite simple to get the Instance ID for a report through its URL. Consider an example of Contribution Summary report, the url for it is civicrm/report/instance/7?force=1&reset=1 So the instance id in this case will 7 i.e integer value anything after civicrm/report/instance/ will be your instance id or you can use api explorer to get the instance ID.

HTH

Pradeep


REST API - setting an activity's custom fields

You need to know the custom field ID of the field in question.  If the ID is 14, you can use:

<www_path>?entity=activity&action=create&activity_id=0&target_contact_id=0&custom_14=myvalue

In general, if you're asking these sorts of questions, you can answer them best by using the API explorer: Help menu > Developer > API Explorer.  You can use it to design your query, and it will build your REST string for you - including looking up custom field IDs.

To get the ID via the GUI, you can go to Administer menu > Customize Data and Screens > Custom Fields, then select "View and Edit Custom Fields" for the appropriate group.  If you hover your mouse over the "Edit Field" link, you'll see a URL that ends in "&id=x".  "x" is your field ID.

To get the field ID via the API, do a call to CustomField.get.  Here's a REST call to get the ID of a field called "Mail Designation":

/sites/all/modules/civicrm/extern/rest.php?entity=CustomField&action=get&json={"sequential":1,"label":"Mail Designation"}&api_key=yourkey&key=sitekey

Better still, use CustomField.getvalue to return just the ID:

/sites/all/modules/civicrm/extern/rest.php?entity=CustomField&action=getvalue&json={"sequential":1,"return":"id","label":"Mail Designation"}&api_key=yourkey&key=sitekey


CiviCRM_API3_Exception: '3' is not a valid option for field contribution_page_id

The fact that this works on a local server but not a production server sounds fishy. My guess is that your local server is a different platform and/or php version.

You can likely fix the issue by setting the contribution_page_id to the string "3".

But I'd suggest you're probably going in the wrong direction for this project - that's a lot of custom code, most of it kind of funky (e.g. the unused bao object, and setting the qfKey), which suggests you've been trying to reverse engineer and/or copy paste stuff. If you simplify your code and only use the api as intended, you'll likely hit fewer oddities like this. I'd also question why you want to set the contribution_page_id anyway, since this isn't getting set via the contribution page, i.e. you're kind of tricking it into an unpredictable state. You'd likely do better categorizing your contributions using other mechanisms (or maybe you don't need to categorize this any further that you already have).


How to allow multiple values on a civicrm contextual filter in drupal views

It's a limitation in CiviCRM views implementation.

If you are a developer and know views api, i encourage you to propose a patch for this. You can find all the code in drupal/modules/views/civicrm.views.inc or https://github.com/civicrm/civicrm-drupal

More precisely, the function civicrm_views_get_argument return a views_handler_argument_numeric for all numeric data type. You might want to try changing that to views_handler_argument_many_to_one. But it's really a guess : i don't know if it will work and even less if it will work for every fields.

Otherwise, still with some programming knowledge, you could do a drupal module that implements hook_views_query_alter but it's more a drupal question.


Yes, you do not need the params to be formatted as json, since they are all simple strings/numbers you can just place them in the url like subject=test&target_id=1529697 etc.

If you want your results back in json format, add &json=1 otherwise leave it off to get xml back.


Check your browser console log and check civicrm config log file after enabling the debugging and back trace. You will get more detail about this error.


Regular activities are like that too. Locking isn't widely implemented. It's not on purpose just hasn't been implemented.

In the first few years of CiviCase's life it used to always make new copies when you edited an activity. You'd still have no warning if two people edit, but you'd see the previous versions. It wasn't a good technical design performance-wise and in fact you couldn't turn it off. Then a feature called advanced/detailed logging was added that logs changes to all tables in civi, but it's not turned on by default. Again there'd be no warning, but you'd have the history for all records. Then at some point the case activity revisions feature was converted into an optional feature and turned off by default too. Then it stopped working. So, at the moment, as a partial solution you can turn on detailed logging (under Administer - System Settings - Misc, where it's just called Logging). Then at least you'll have the record in the database (it creates another set of tables named log_civicrm_XXX).


Automatically create scheduled reminders for recurring events?

Rather than create a scheduled reminder based on "Event Name", create it instead on "Event Type".  If you don't want to apply scheduled reminders to all events of this type, create a second type with a very similar name to use with events you want a scheduled reminder on - then attach scheduled reminders to only that event.

I can also see in the API explorer that there's a "cascade type", which seems to suggest that perhaps you could change the default cascade type to cause scheduled reminders to be cloned as well.  I'll let someone else speak to the feasibility of that.


Any way to avoid "deprecated function" messages in the Drupal dblog?

The types of PHP errors and warnings being logged to Drupal Watchdog typically reflect the level of error reporting set for the webserver.  If you can edit your vhost config or .htaccess, you could change the error reporting level. Refer to http://php.net/manual/en/errorfunc.constants.php for the different error levels.

Based on your request, you probably want to disable/exclude error reporting for the following level:

8192     E_DEPRECATED

In .htaccess, you'd add php_admin_value error_reporting 22527 to disable just E_DEPRECATED.

Should you find that you're still getting other deprecated warnings after applying the change (and possibly restarting server if change was made in vhost), you may want to also exclude the following error level/type:

16384 E_USER_DEPRECATED

See https://stackoverflow.com/questions/5628148/disable-e-deprecated-in-php-error-log for more background on how you can get the bitwise value (error level) for a custom combination of error types.


How to Export/Import all CiviCRM data from one website to another one

I think you are saying that you have a single database for CMS content on the old site and that you already have new CMS content in the database for the new site. I think you want to move the CiviCRM structure and data. If I have understood that correctly (it would be good if you clarified by editing the question) then you can do the following.

1) split the CMS and CiviCRM databases: KEEP A BACKUP! Create a copy of the combined database by dump, rename the original and then reload). In the original you delete the CiviCRM tables (with e.g. phpMyAdmin) and in the copy, delete the WP tables. You need to edit the civicrm.settings.php to change the name of the CRM database - it will have the same username when created this way. This last bit allows you to keep access to the old CiviCRM so you can check things.

2) on your new site, reinstall CiviCRM using the same version as the old site and the same database details. Now replace the CiviCRM database with the CiviCRM database from the old site. Have a look at the documentation first! https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/


Batch edit one contact field (source) with same information

Personally I'd write a tiny php script but you could use the api explorer under civicrm/api:

Chose entity contact and action get
Add your search criteria
Add option "limit" to something high enough (Defaults to 25) or combine with option "offset"
Hit "chain api call"
Chose entity contact and action create
Enter json like "{source: 'your source'}"
Run

You could test it with one contact by adding it's id in the get criteria.


Is it possible to limit membership renewals to next membership term?

I think this would require an extension that would add a field to membership types and membership for 'max terms' and then the code/logic would prevent folk purchasing beyond the current cycle


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

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

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


Dialing Contribution Aggregate by Relationship back a few year

Answering my own question:

My fix was to edit a file in "all", which isn't ideal since it'll get overwritten when updating CiviCRM, but I can always re-apply it.

Edit file: sites/all/modules/civicrm/CRM/Report/Form/Contribute/History.php

Change Line 61 from $yearsInPast = 4; to $yearsInPast = 20;


You didn't mention how you were making the Custom Search! Assuming it's in an extension:

1) Look in Joomla's and CiviCRM's logs for more information.

2) Try clearing CiviCRM's cache.

3) Check the extension's file permissions.

4) Did you rename some parts of your extension, i.e. files, object names, after creation? If so, there may be a piece missing... try regenerating the extension from scratch and copying the functionality over.


Where should I convert the birth_date string to a Date object?

Angular example using the same options with data model binding:

https://docs.civicrm.org/dev/en/latest/framework/ui/#date-picker


How do I force a reload after a CiviCRM summary action?

I know this is like two years later but I just went through a really similar problem and there's no answer here yet...

First off Coleman posts a good answer here for lots of situations: Can I update/requery a custom field that got changed via another field on the same page?

I couldn't get this to work with certain ajax-y elements like the "disable" button under the relationships tab (we had a tab of custom fields that calculate values from other contacts based on relationships, when those relationships aren't active the data recalculates and we want it to display current values).

I worked around this by adding a JS file in hook_civicrm_summary, where the JS asks our custom data to reload every time you click the tab, so you always get current values at a slight performance cost. I'd imagine you could do this with an inline header as well:

  CRM.$(function($) {
    $('#ui-id-22').click(function(){
      CRM.refreshParent($('#Site_Demographics_1_2760'));
    });
  });

Where '#ui-id-22' was our tab link and '#Site_Demographics_1_2760' was the panel we wanted to update.