Can't view contact groups page: "DataTables warning" We can't view the main groups page -- a popup error appears and no groups are shown. The error is:

DataTables warning: table id=DataTables_Table_0 -
Invalid JSON response. For more information about
this error, please see http://datatables.net/tn/1

In this case, turning on logging (civicrm/admin/setting/misc?reset=1) and looking in the CiviCRM log reveals a fatal error related to mapping and geocoding:

  Proximity searching requires you to set a valid geocoding provider

Somebody had tried to set up a proximity group based on zip codes, but the mapping and geocoding settings had not been configured. Configuring the geocoding (civicrm/admin/setting/mapping?reset=1) to use Google as the provider fixed the issue.


Security Configuration and Programming Guidance I'm a security person. I have a non-profit that wants to use CiviCRM. What are the nitty-gritty details that I need to know? I will handle the hard technical stuff for them. The only information of value they  are trying to protect is user real name and email address. But, they are considered very sensitive and high value. No money is exchanged with users. Their activity history is not considered sensitive, just the fact they are associated with the site. There will be millions of users and high site visibility.

Thank You

CiviCRM is a good system if you want your data to remain secure. I would recommend installing on a hardened server following the normal instructions, and ensure you keep the security patches for your CMS and CiviCRM applied when they come out. Drupal, WordPress and Joomla! all have security announcement lists you can subscribe to. See https://civicrm.org/security for CiviCRM's.

During configuration you will want to ensure that the permissions are configured to prevent inappropriate access to data (eg see http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1 after logging with user demo password demo). For example, CiviCRM: view all contacts and CiviCRM: edit all contacts should be reserved to Administrative users, and CiviCRM: skip IDS check should be disabled for all users (IDS is Intrusion Detection System).


Wordpress CiviCRM 4.7.10 - Sorry an error occurred and your information was not saved Just upgraded 4.6.9 to 4.7.10 and get the following message:
"Sorry an error occurred and your information was not saved" when creating a new mail message.

Click Mailings, New Mail and then enter a mail name. Click the recipients, select my test group and wham the message above is displayed. This message can occur at random in this form and is not specifically related to the recipients selection. No matter what you do it does not send the email or save the record.

Other web hits indicate that you can bypass this security check by enabling the 'CiviCRM: skip IDS check' permission'".
Tried this on and off and no joy.
This is using the Admin role which should have full access.

Anybody got any clues?

Have just turned off a security plug and the mail function is now working so for anyone with this issue in Wordpress you might want to check your plugins and switch some off.


Syntax for drush command civicrm-sql-dump My attempt to backup my civicrm database using mysqldump has failed after a very rocky CiviCRM upgrade process, or it is taking way too long, so I am trying the drush command, drush civicrm-sql-dump in drush 7.0.0 on what I hope is finally CiviCRM 4.7.13 but the command is just dumping to the screen. What other information should I provide?

If you run drush civicrm-sql-dump --help the output is:

Prints the whole CiviCRM database to STDOUT or save to a file.

Examples:
 drush civicrm-sql-dump        Save SQL dump to the directory above Drupal root.
 --result-file=../CiviCRM.sql

Options:
 --data-only                               Dump data without statements to create any of the schema.
 --gzip                                    Compress the dump using the gzip program which must be in your $PATH.
 --result-file                             Save to a file.
 --tables-list                             comma-separated list of tables to transfer.

So since you want it in a file rather than on your screen, use the --result-file option and tell it what file you want to write to.


CiviCRM Mailings external links forbidden Some people who received our big mailing get a forbidden message when they click on a link that goes to an external site. Most people are not getting the error.

  Forbidden You don't have permission to access
  /sites/all/modules/contrib/civicrm/extern/url.php on this server.

I've tested while not logged in to our website. I've tested on various IP addresses. I've tested while logged in as several types of roles with varying permissions. It's clearly a firewall issue, but if I post it somewhere else, I may push back about it being a CiviCRM issue. Why does my server think that this harmless CiviCRM external link tracking process is a SQL injection concern?

CiviCRM 4.7.15 Drupal 7

Apache SSL Error log reports:

[Tue Oct 10 23:45:07.760744 2017] [:error] [pid 27564:tid 140558165042944] [client 107.77.xxx.xxx] ModSecurity: Access denied with code 403 (phase 2). Pattern match "(^[\\"'`\\xc2\\xb4\\xe2\\x80\\x99\\xe2\\x80\\x98;]+|[\\"'`\\xc2\\xb4\\xe2\\x80\\x99\\xe2\\x80\\x98;]+$)" at REQUEST_COOKIES:ajs_user_id. [file "/usr/share/modsecurity-crs/activated_rules/modsecurity_crs_41_sql_injection_attacks.conf"] [line "64"] [id "981318"] [rev "2"] [msg "SQL Injection Attack: Common Injection Testing Detected"] [data "Matched Data: \\x22 found within REQUEST_COOKIES:ajs_user_id: \\x224622165\\x22"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy "8"] [tag "OWASP_CRS/WEB_ATTACK/SQL_INJECTION"] [tag "WASCTC/WASC-19"] [tag "OWASP_TOP_10/A1"] [tag "OWASP_AppSensor/CIE1"] [tag "PCI/6.5.2"] [hostname "www.fosterclub.com"] [uri "/sites/all/modules/contrib/civicrm/extern/url.php"] [unique_id "Wd1bg857a7YAAGus-PcAAADK"]

I'm stumped because I can't reproduce the error. The error log only shows a few of these but the access log shows several times the link was successfully accessed. Can't find a pattern.

Here is a screenshot that someone sent me.

Edit: the file permissions for /sites/all/modules/contrib/civicrm/extern/url.php:

-rw-rw-r-- 1 drupal-user server-group 1707 Apr 17 04:44 url.php

Link in email:

https://www.example.com/sites/all/modules/contrib/civicrm/extern/url.php?u=123099&qid=4531881

CiviMail translated that link from what we put in, which is the ultimate destination. Should be an auction site.

You're correct, this is not CiviCRM-related.

Your Apache log is showing that mod_security is the culprit here.  mod_security is a "web application firewall" - it sits between the user and Drupal/CiviCRM.  It's used to block access to the application when it thinks the interaction is malicious.

From the log, I can see that it's blocking part of the cookie associated with ajs_user_id.  A quick Google search says that ajs_user_id is probably tied to segment.com's analytics.js.  Does that ring a bell?

The answer is to go to your webhost/sysadmin and show them this error; they should be able to change the mod_security logs.  If they refuse, I recommend changing webhosts.  If that's not an option, disable analytics.js.


CiviEvent Fees not displaying Using Drupal 7.7.1/Civi 5.26.1 I've set up a paid event with two price options (Waged/Unwaged), with no 'Pay Later' and Stripe as payment processor.

When I use the registration page for this event (test or live) in a logged in browser, the prices display OK and registration succeeds, but the prices don't display on the live registration page for a browser that is not logged in. All the other elements on the page seem fine.

Anonymous users' permissions to 'register for events' and 'view events' are set.

Log messages are

  Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in CRM_Event_Form_Registration->buildCustom() (line 550 of /var/www/clients/client4/web5/web/sites/all/modules/civicrm/CRM/Event/Form/Registration.php)

and

  Notice: Undefined variable: fields in CRM_Event_Form_Registration->buildCustom() (line 550 of /var/www/clients/client4/web5/web/sites/all/modules/civicrm/CRM/Event/Form/Registration.php)

I see in Registration.php @550 that this error may(?) relate to profile fields, but these seem to be displaying & filling OK.

Advice gratefully received.

When I modified the event to use a price set, it worked perfectly.


Extension install failed, now cant get the functions to work or reinstall successfully. How to fix please? I am on CiviCRM 4.7, Php 5.6, drupal 7. When installing GDPR extension, it failed. After that whenever I try to uninstall and reinstall, CiviCRM shows error "Found Name, activity_type, civicrm_option_group". Nothing happens after that. GDPR settings menu or manually not accessible. A custom data group is created for contacts but when clicked it shows error message "Unable to reach server, Please refresh this page on your browser and try again".

I have tried manually removing the custom data using sql that was in the extension. but no luck. How can i resolve this please?

Some extensions don't fully clean up behind themselves when they are uninstalled causing problems when you attempt to install again.  You will need to look at what the extension is trying to do when it installs and find what is failing.  If the fields/options etc already exist you can comment out that part of the installation process.  Alternatively, remove them - but if possible use the API rather than direct SQL to reduce the chances of leaving things in an inconsistent state.

If you can't install, uninstall and then reinstall an extension cleanly then it is worth logging an issue in the extension's issue queue.  I have just tested that sequence with the GDPR extension without problem.

And please get your 4.7 system upgraded!


My Summary Overlays are bad after upgrading to 4.7 On two separate sites that were upgraded to 4.7, the "Summary Overlay" function seems to have been uglified.

Specifically - in the past, when hovering over the person icon on the left of many contact listings, you would get a nice little black-background pop-up with additional information about the contact.

Now, those popups are filled with what appears to be a collection of many profiles.

There is a reserved Summary Overlay profile, that I would assume is the only one that should display here.

On a new 4.7 install, I am not seeing this issue.

Am I missing some undocumented configuration, or is this a bug?

The issue appears to have been caused by some sql that was posted as a solution to a different problem, here https://civicrm.stackexchange.com/a/18547/233.

If you also ran the bad sql, you can fix it by running the sql command:

update civicrm_uf_group set name = 'summary_overlay' where name LIKE 'summary_overlay_%';

Specifically, the bug arises because that overlay is generated from a snippet with what should be the summary_overlay profile, but because the name was altered, the overlay is using all available profiles.


Paypal Item Title Prefix In the information transmitted to Paypal for payments, Civi adds a prefix to the "Item Title".
E.g. Donations through the "Donations" contribution page have a Paypal Item Title such as this: 603-607-Donations.
Is there any way to stop the prefix from being included? It's interfering with our use of the PayPal reports and sorting donations according to the source (contribution page).

Not through the UI i guess. You can make use of the https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterPaymentProcessorParams/ in your extension and have something like -
$params[`item_name`] = 'your custom title';


Same custom field name at Contact Form seems to be different for each logged in user We've tried to alter some custom fields display (namely, make some fields display data only, not editable text field). It seems that all custom fields logic is inside templates\CRM\Custom\Form\CustomField.tpl file
So, we've tried to do something like this

{if $element.data_type neq 'Date' AND $element.element_name eq "custom_358_437"}
{$element.element_value}

where custom_358_437 is a field name picked via form html code inspector.
All seems fine till another logged in user looks at the same form; it turns that the field gets "random" another name  (say, custom_15_415 for other user and custom_47_412 for yet another user), which seems to be pretty odd.

Not sure if it's "by design" (yet not sure why same field name should be changed for each user); if it is so, is there any logic in field name generation (may be current user ID is being used, although it doesn't look like this)? In a broader sense, how do we target custom field for making changes, if not by field name?

Not  the exact answer, just a workaround one may find useful: field label stays unchanged even if field name changes, which makes possible element catch by label, e.g.:

 AND ($element.label eq "Element label")


Advanced search using and Hello my search builder is out of action and I’m trying to use advanced search to give me everyone in group A and group B - in the section above (search settings)  the ‘and’ radio button is selected. But the search results are an “or” set not an “and” set. Is it possible to do this in advanced search?

I believe the AND OR operators you're referring to only control the relationship between different criteria (i.e. contained in X group AND had an activity of a certain type) not more than one option in the same criteria.

A workaround for sure but perhaps you could add all contacts from one of the groups to a tag and try searching all the belong to group A AND the newly created tag.


Custom Group and Fields using API v3 I'm trying to query the API on CiviCRM 4.4.6 for a Custom Field (Attachment) on a Case and an Activity.

I've tried the examples here: http://wiki.civicrm.org/confluence/display/CRMDOC/Using+Custom+Data+with+the+API
but couldn't get it to work.

I can see the custom fields available here;
SELECT * FROM civicrm_value_attachments_52

I can also see the entity_type for the case and file ID here:
SELECT * FROM civicrm_entity_file

What query do I write to extract the attachment for a case or activity?

you could try using the latest version of the API explorer to give you an idea of the API call. In general, if the custom field is attached to that entity you can just get it using the custom field number. The custom field number is the ID of the field, eg:

$result = civicrm_api3('Case', 'get', array(
'sequential' => 1,
'return' => "custom_315",
'id' => 1,
));

or REST:

/sites/all/modules/civicrm/extern/rest.php?entity=Case&action=get&api_key=yourkey&key=sitekey&json={"sequential":1,"return":"custom_13","id":1}


Mailing sending to removed users I had 50 people in a group and I had to remove 5 before i sent a mailing.
I removed the 5 and they all had the red removed next to them, so when I went to send the mail I had 47 recipients.

How do i stop those 2 getting the email?

The list of recipients is created during the mailing creation process (i.e. when you assign the groups to the mailing). This is primarily to avoid any permissioning issues when sending the mailing.

The easiest approach is to edit and save the mailing again, which will create a new set of recipients from the groups.

Alternatively if the mailing is still in scheduled stage, you could delete the relevant entries from civicrm_mailing_recipients


'DB Error: no such field' for all (free) event registrations Using CiviCRM 5.20.2 on Drupal 7.69.

Having a new error whenever someone tries to register for an event through CiviEvent on our website. This happens for all events: private or public; those with custom fields and those with no custom fields; with confirmation screens turned on or off; with thank you emails turned on or off. The event is free/no payment processing.

The user sees this screen:

The registration does not pull through on the back-end either.

This is the error message in the error log:

$Fatal Error Details = Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle ) [code] => -19 [message] => DB Error: no
such field [mode] => 16 [debug_info] => INSERT INTO
civicrm_contact_push_notification_messages (contact_id , data ,
message , entity_table , entity_id ) VALUES ( 6820 , 'Array' ,
'%display_name has created participant.' , 'Participant' , 2699 )
[nativecode=1054 ** Unknown column 'data' in 'field list'] [type] =>
DB_Error [user_info] => INSERT INTO
civicrm_contact_push_notification_messages (contact_id , data ,
message , entity_table , entity_id ) VALUES ( 6820 , 'Array' ,
'%display_name has created participant.' , 'Participant' , 2699 )
[nativecode=1054 ** Unknown column 'data' in 'field list'] [to_string]
=> [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO
civicrm_contact_push_notification_messages (contact_id , data ,
message , entity_table , entity_id ) VALUES ( 6820 , 'Array' ,
'%display_name has created participant.' , 'Participant' , 2699 )
[nativecode=1054 ** Unknown column 'data' in 'field list']"] )

Any clue how to fix this?

Fixed by upgrading to Civi 5.23

However this may also be relevant: SOLVED CiviMobile: DB Error in adding a Participant to an Event


Viewing a Personal Campaign Page before approval We've recently started using the PCP feature, and all of our supporters' PCPs must be approved. However, I haven't found a way to view/edit the PCP they have created before approval, which seems important. When Managing PCPs, unapproved pages are greyed out, and clicking on Edit takes me to the public contribution page with the error that the PCP isn't available.

Is there something I'm missing? Shouldn't admins be able to view before approval?

Joomla 3.7.5, Civi 4.7.21

You should be able to view the page before approving it. (I just tried this on CiviCRM 4.7.24 by disabling a page and then viewing it. It worked for me.)

My guess is that your user does not have the necessary permissions to view unapproved PCPs. From looking here, it appears that you need the "Administer CiviCRM" permission. If you're using Drupal, you can grant this permission by visiting /admin/people/permissions. Steps vary on other CMS platforms.


How to extract field from an array returned from an API3 call I am trying to extract a custom field from a contact record. The API returns an array of the following form:

Array (
    [0] => 0
    [1] => 3
    [2] => array (
        [0] => array (
            [value 1] => 123
            [value 2] => 456
            [value 3] => 789
)))

Using php how can I extract value 1, 2 or 3?

Later information

This is the actual array

Array (
[0] => 0
[1] => 3
[2] => 1
[3] => 2911
[4] => Array (
    [0] => Array (
        [contact_id] => 2911
        [civicrm_value_aru_data_1_id] => 2586
        [custom_64] => 2014848
        [id] => 2911

)))

and I want to extract the value of custom_64. I am using:

$rugby_id = $arrayvariable[4][0][custom_64];

which returns nothing and I can't see where I am going wrong.

Even later information

I am still struggling with this issue. In an attempt to simplify things I have changed the CiviCRM API call to 'getsingle' and stored the result as follows:

$results = print_r($result, true);
echo $results;

which leads to the following:

Array (
[contact_id] => 2911
[civicrm_value_aru_data_1_id] => 2586
[custom_64] => 2014848
[id] => 2911
)

If I now try to extract the value of custom_64 using:

$rugby_id = $results['custom_64'];

The value returned is 'A'. I have researched this to death but have not found the cause of the problem.

In the example you have given the way you would is

$arrayvariable[2][0][value 1] etc etc.

You can see an example here for usage from CiviCRM API v3 https://docs.civicrm.org/dev/en/latest/api/options/#sequential


Setting primary email and phone upon contact update We want to update a bunch of contacts with e-mail adresses and phone numbers, for which previously these did not exist. The import works fine, as a result the contacts now have a Home (for example) e-mail and phone, but these are not set as the Primary ones. Because of this, the new e-mails and phone numbers do not show up in reports, and cannot be used in contact search. Only when I view one of the updated contacts, click into the Email field and then, without changing anything, press Save, the email is set to Primary.

It appears that when the contact is first created, in case there is no e-mail or phone, the Primary flag is not set. During contact update, the address/phone is updated, but the Primary flag is left missing. Is it possible to set the e-mail and phone to Primary during import if these did not exist previously?

We're currently using CiviCRM 4.7.14.

That sounds like a bug - can you confirm you ran the import via the CiviCRM GUI?

On fixing this for you - do you have access (or work with someone) who has - to phpMyAdmin or MySQL?


Drupal custom module civicase is creating but it is returning null value? In my drupal custom module I am creating a case object via

$result = civicrm_api3('case', 'create', $params);

This function on debugging api.php file is returning the case id but in my module it is returning the null value

I want it to return the case id. How would i do so?
Here code Snippet

function form_test_form_submit($form, &$form_state)
$params = array(
    'subject' => 'Test case',
    'contact_id' => 64771,
    'case_type' => 'test',
);

$case = testcase_create($params);

function testcase_create($params){
    civicrm_initialize();
    require_once 'api/api.php';

    try{
        $result = civicrm_api3('case', 'create', $params);
    }
    catch (CiviCRM_API3_Exception $e) {
        $errorMessage = $e->getMessage();
        $errorCode = $e->getErrorCode();
        $errorData = $e->getExtraParams();
        return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
    }
    return $result; // the value of $result is NULL, where as in api.php it was not NULL as seen in debugging
 }

This may be a permissions issue, depending on who is the logged-in user when your code runs and whether they have permission to create cases. If you want your code to run anyway regardless of who is logged-in, you could add 'check_permissions' => FALSE to your api $params.


Relationships are shown twice I am using CiviCRM 4.5.5 with Drupal 7.

When I go to add a relationship the  custom relationships show up twice.

Please help.

Thanks,
Josh

As per the code the select list loads all relationship types of corresponding Contact's contact Type. So for instance [Employee of (Individual type), Employer of (Organization Type)] Relationship Type(RT), if you are going to add relationship for Individual Contact A then on you will only see 'Employee of' (not 'Employer of') RT.

In your case "other projector contributor' and 'other project contributor is' are both related to same contact type thats why you are able to see both on select list.


Why are relationships limited to two degrees? I have a structure in which an umbrella organization has a few dozen clubs which have members. And it has some departments some of the members have a relation to.
Now if I would want one of the admins to have some access to information in the departments, I would have to add the department as a relationship with the proper access rights. This is a tedious job and might lead to faults. I would like to have an intermediate level grouping and departments, but then I am limited to the two degrees
I have tried to draw a picture.

The "why" question is fairly straightforward in an open source, community supported and community developed software world: because so far no one wanted more levels badly enough to develop or fund the development of an extensions for it :-)
But I would certainly recommend playing with the extension that @petednz recommended, and check if you can achieve your requirements.
And obviously you are very welcome to develop/fund the development of an extension that introduces more levels.


Unable to install CiviCRM 5.0.1 as Drupal site admin Just been trying to install CiviCRM 5.0.1 in Drupal 7.58, and when I try to run the install script, I get a message saying I don't have permission to do so:

"You don't have permission to access this page
The installer can only be run by a user with the permission to administer site configuration.

Refer to the online documentation for more information: Installation Guide"

It's a fresh installation of Drupal, and only has the initial admin user - there's nothing unchecked in the Drupal permissions for administrators (but obviously it doesn't have anything related to CiviCRM as the module isn't enabled).

Below link might be useful for work around

Getting permission error when installing CiviCRM under Drupal

HTH

Pradeep


Upgrading to 4.7.21 on Wordpress get uncaught exception on status page After uploading the 4.7.21 plugin the CiviCRM admin pages loaded ok with the status at bottom indicating new version and of course with a red 'System Status' warning. On clicking this to get to the status page to update db etc, got this error:
Uncaught exception: You have requested a non-existent service "asset_builder".

Tried installing clean copy again. Same result. Resolved issue by manually entering the upgrade page url. This brought up expected option to upgrade db. All well after this.
https://xxx/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

Question: is this just our installation or have others had same behaviour, and did this fix resolve?

Status page failed to load, giving an uncaught exception error.
Loaded the upgrade url directly -->https://xxx/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1.
This ran the update
Status page now loaded, with option to rebuild indices


Details des imports contact evenement et activité Bonjour,

Où peut on trouver la dicumentation qui détaillent les dfférence entre les champ d'import pour les contact activiy et

Documentation est ici: https://docs.civicrm.org/user/fr/latest/common-workflows/importing-data-into-civicrm/

Le plupart concernent l'import des contacts, mais il y a instructions pour activites et evenements a la fin.

Please excuse my french


System Status Notice about Timestamps and Timezones I've update my CiviCRM from 4.7.24 to 4.7.29 (my CiviCRM system on WordPress), everything seems ok but I have System Status Notice:

Timestamps and Timezones

This MySQL database stores certain fields with data-type "DATETIME". To improve timezone support, you may want to change these from "DATETIME" to "TIMESTAMP".

civicrm_subscription_history.date (New sites default to TIMESTAMP in v4.7.27+) [CRM-21157] (https://issues.civicrm.org/jira/browse/CRM-21157)

Changing should improve data-quality for organizations working in multiple timezones. However, if you do change, then you may need to re-test any customizations or processes that reference these fields. Changing is suggested but not required.

For further discussion, please visit https://github.com/civicrm/org.civicrm.doctorwhen

How can I do to pass this notice?

I've found link go to Doctorw Wen in CiviCRM (WordPress version) by go to Administrator Menu and fix the notice "Timestamps and Timezones", Thanks!


Domain Access and CIVICRM ACL of data and drupal I have CIVICRM Drupal 7 install with several sub-domains. It's working fine until I have tried to control access to contacts based on the subdomain/drupal users and their roles.

I have tried following the guide from the CIVICRM documentation here

However, I am finding it a little confusing as it appears to refer to both ACL "users" and "roles" and CMS "users" and "roles" interchangeably though they clearly are not.

I am trying to achieve more-or-less the exact example case given on the page:

  A charity based in Chicago has three regional offices, and needs to give its fundraising staff the ability to create and edit contact records for prospective donors. They have decided that the fundraising department in each office can only have access to its local contacts. While the permission add contacts can be granted to authenticated users in the CMS (Drupal, Joomla! or WordPress), if view all contacts and edit all contacts were also assigned in this way, there would be no way to differentiate between the three groups of donors (locations). This could only be achieved with a CiviCRM ACL

I would like to also have certain groups of contacts - created by specific drupal roles - also propagate to all users.

The article explains in some detail how to create CIVICRM groups anf ACL roles but not how to link them to Drupal roles or the domain of origin of a contact.

How would I do this, or is there a reasonable guide to achieving such a setup?

It sounds like what you want is CiviCRM multi-site capabilities with the multisite extension.  This will give you most of what you want without ACLs, and integrates well with Domain Access.  I've also written an extension to properly handle creating new user logins via CiviCRM profiles with Domain Access.

To handle the "propagate some groups to all users" scenario - with multisite, every subdomain will have a "master group".  Any contact in that group will be visible to all contacts on that subdomain.  If you set a master group as the parent of another group, all those contacts become visible to those domain members.  Since a group can have multiple parents, simply make the "visible to all" contacts have all the master groups as parent groups.


Should I change mysql.connect_timeout variable in php.ini? MySQL has been losing connection on me while trying to complete the upgrade. I am wondering if I should change the php.ini variable mysql.connect_timeout = 60 to a value of -1 (unlimited) and if this will help?

I have definitely altered this variable for upgrades, but my notes show I only increased the values to 1800.

I don't recall whether this was because I found that -1 didn't work, or because I preferred to not allow a connection to remain open indefinitely.

So yes, I think you should alter it if necessary to complete upgrade.

If you find setting to -1 works, make sure to change it back post-upgrade!


Webform Select List using Existing Contact I have used "Existing Contact" Field in the Webform.
I want to list few contacts using select box instead of AutoComplete using Filter.
Edit Field show different Widget to show the contacts, one of theme is 'Select List'.
Once you save the 'Select List' Display format, front end form does not display/generate select element and its options.

I am using Laster Webform CiviCRM module under Drupal 8.
Anybody have idea of this, I tried same thing D7, its not working there too.

This looks like a bug! Can you/Skvare help put a PR together to fix this issue?


CiviCRM for Outlook - Invalid Credentials I set everything up for the civicrm for outlook extension according to these instructions http://www.vedaconsulting.co.uk/outlookforcivicrm-release. I am using the api extension to generate the api key. But i keep getting the "Invalid Credentials" error message in outlook when i try to connect it. Any thoughts on what could be causing this to not be able to connect?

I'm not a civi expert by any means, but thought I would share my experience - I had a similar issue, and it turned out to be a firewall issue - civi was hosted on a machine on the net, and my Outlook client was on our corporate network. When I was connected to our company network, I would get that error. When I took the machine home and tried connecting there - it worked fine.

Other things that got me to start with - in the URL path, make sure you have the trailing / on the path   (check by copying the url and trying to access the url in a browser), and make sure you're using the correct site key from the civicrm.settings.php file

Hope something here helps!


Change Column Name in a report Where would I go to change a column name in a report? I need an event summary report. There are 2 columns that list out the Registered/Attended/Pending etc. Those column names are very long and I would like to use this report on our dashboard. It would be nice if I could just say Participant Count.

There are a couple of ways to do this - but the easy no-coding way is to use the "Word Replacements" function.  Go to Administer menu > Customize Data and Screens > Word Replacements and put in the phrase you want to replace, along with what to replace it with.  Don't forget to check "Enabled", and next time you reload that report page, you should see your change.

For the official documentation, check here: http://gitbook.civicrm.org/initial-set-up/customizing-the-user-interface.html


Batch Update Permissioned Relationships We have a specific contact/organization relationship type that should be a permissioned relationship for the contact to edit the organizations record.  When we converted to Civi many of these contacts did not get the permissioned relationship check box checked. Is there a way to update the Permissioned Ralationship check box for this specific relationship type in bulk?

Unfortunately, there is no way to batch update relationship via the user interface b/c relationships are reciprocal. Using the Import Contacts wizard and selecting "Update" doesn't allow you to designate a relationship as permissioned either.

If you have a programmer on hand, this type of update would be easy to do using an SQL query directly on the database:

Assumptions:

Relationship Type ID = 4 (in my environment, this is the ID for Employee/Employer)
Contact A = Individual
Contact B = Organization

Query:

UPDATE civicrm_relationship SET is_permission_a_b= 1 WHERE relationship_type_id= 4

Alternatively, if you have sufficient permissions, you could use API Explorer as documented HERE, but this should only be done by someone who has good knowledge of the CiviCRM database structure.

Good luck!


Expose CiviDiscount Fields to Drupal Views I'm creating a Drupal view and would like to reference the discount end date field created by the CiviDiscount extension, but the only thing associated with that extension that's available as a field is the "Default Discount Fee ID".
Is there a way to access the other CiviDiscount fields from Drupal Views?

If you're on D7, you can use the Views CiviCRM Expose Tables module.


Message: "Fatal DB error, exiting, seems like your schema does not have civicrm_setting table" Running WordPress 4.4.2 and CiviCRM 4.6.11

Haven't done an upgrade recently and have been using CiviCRM all day with no problems to suddenly encounter:

  Fatal DB error, exiting, seems like your schema does not have civicrm_setting table

We did migrate servers yesterday and disabled Cloudflare but it just suddenly stopped!

Where to start looking?

I would start looking at corrupt tables.

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.


Change Email Address on Renewal Can a user log in to Drupal, fill out a contribution form to renew their  membership, and change their Email address when contributing? Looking for an optimal workflow here. If the email address on the contribution page auto fills with their CiviCRM primary email, and they change it on the form, will that change the address in CiviCRM and/or their linked Drupal account? If not, how could I make this easiest. What happens in my org is that members sometimes have old AOL emails and want to change it with something new when renewing.

Petednz is correct.  If a user is logged in, then they can change their CiviCRM e-mail address on a contribution form.  This won't change the Drupal address AFAIK; I'd be very surprised if it did.

If you also want to change the Drupal e-mail address, you'll need to write an extension (or hire someone to do it).  My Domain Access CiviCRM module is conceptually similar and will get you about 80% of the way there.  You can also check out CiviCRM Wordpress Profile Sync for inspiration, since that's the functionality you're looking for, but for Wordpress.


Complex event creation Setting up a complex event in either CiviEvent or webform

There are three time slots and 5-6 sessions/time slot. Each of those sessions would have a max participation count that when reached, the system would no longer show it as an option to pick.

Would I have to set up three different price sets and events in order to achieve the max participation rule, or is there a way using a webform that the max participation can be enforced?

Welcome to CiviCRM SE!

If I understand your scenario correctly there  are three time slots and you want participants to choose a session in each one. You can accomplish this with a single price set and a price field for each time slot using radio buttons for the line items (session options). You can set Max Participants for each line item. Once that is reached the line item option will become unavailable.

The Extended Reports extension has a line item report which is handy for getting counts per session.

Hope this helps.


unsubscribe via email token gives wrong address The unsubscribe via email does not use the correct email address. I have "myname"@gmail.com but when I send a test it adds this strange email address u.77.3.61020d9ae6a273d5@gmail.com as the email address.

in order to use civimail, you need to have your own domain name for to manage the bounces, and it's the same address used for the unsubscribe (it adds to the address that weird u.xxx string that you see to be able to distinguish between your contacts who is actually unsubscribing or bouncing, it's called VERP).

It doesn't use any of your "normal" mailboxes, it needs a dedicated one to handle automatically bounces and unsubscribe.

For what I see, you haven't properly set-up your email account in civimail and use a gmail address (and didn't fill the local part)

http://book.civicrm.org/user/advanced-configuration/email-system-configuration/


How do I send an email to all event participants immediately? I know you can schedule reminders, but you can't choose a date and time, only a date (when does it send if you choose the same day?), otherwise you have to choose a time before the event or after the event.
I just want to send an email right now and I don't want to have to create a group to do it.
This is a basic feature in competing platforms - is there something obvious i am missing?

Can you create a activity reminder of type event registration and send the reminder after 0 hour of activity date time?


Joomla: Warning: Missing argument 1 for CRM_Utils_System_Joomla::getDefaultSiteSettings() This is a new install Linux - shared hosting with Godaddy.

Joomla 3.5.1

PHP 5.4.45

CiviCRM 4.7.6

I have uploaded and installed CiviCRM. No errors. When I go to Adiministrator>Components>CiviCRM, I get:

  Warning: Missing argument 1 for CRM_Utils_System_Joomla::getDefaultSiteSettings(), called in /home/username/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php on line 687 and defined in /home/username/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php on line 698

I get CiviCRM Home, with Configure Your Dashboard link, and the Loading Icon.  Also, System Status Errors:

Cron Not Running
Timestamp Mismatch
Configure Default Mailbox
Complete Setup

I have spent countless hours on this today, installing, uninstalling and installing over and over. Same result, every time. I'm fairly certain it must have something to do with the config file and variables, and I've gone over them time and again. Any ideas??? HELP!

Line 698 in Joomla.php:

public function getDefaultSiteSettings($dir) {
    $config = CRM_Core_Config::singleton();
    $url = preg_replace(
      '|/administrator|',
      '',
      $config->userFrameworkBaseURL
    );
    $siteRoot = preg_replace(
      '|/media/civicrm/.*$|',
      '',
      $config->imageUploadDir
    );
    return array($url, NULL, $siteRoot);
  }

The issue was reported on JIRA here: https://issues.civicrm.org/jira/browse/CRM-18411

The patch can be found here: https://github.com/civicrm/civicrm-core/pull/8164

The patch was merged in, so it is fixed in 4.7.7 onwards.


How to fetch Profile gid from hook_civicrm_post included in a Contribution Page? I am using profile object inside

function hook_civicrm_post($op, $objectName, $objectId, &$objectRef){

}

How can I fetch the Profile gid from the above variables? or is there any way to implement it ?
I want to create a household on submission of a Profile A using custom fields and similarly create an Organization on submission of a Profile B using custom fields.
So I need a Profile ID which will distinguish between Profile A and Profile B using gid.

The $objectRef variable has the following structure for Profile

Array
    (
        [qfKey] => f6a85f995860db13425c24378f05c98d_9488
        [entryURL] => https://example.com/example-registration/?page=CiviCRM&q=civicrm/contribute/transact&
        [email-Primary] => check@gmail.com
        [first_name] => check
        [last_name] => gmail
        [phone-Primary-1] =>
        [street_address-Primary] => abc
        [supplemental_address_1-Primary] => a
        [city-Primary] => cci
        [postal_code-Primary] => 30200
        [country-Primary] => 1013
        [state_province-Primary] => 1640
        [1] => 1
        [2] =>
        [3] =>
        [4] =>
        [custom_16] => Array
            (
                [1] => 1
                [2] =>
                [3] =>
                [4] =>
            )

        [custom_17] =>
        [5] =>
        [custom_1] => Array
            (
                [1] => 1
                [2] =>
                [3] =>
                [4] =>
                [5] =>
            )

        [custom_18] =>
        [custom_19] => Partner check
        [payment_processor_id] => 0
        [priceSetId] => 8
        [price_12] => 40
        [selectProduct] =>
        [cms_create_account] => 1
        [cms_name] => familycheck
        [cms_pass] => test
        [cms_confirm_pass] => test
        [MAX_FILE_SIZE] => 20971520
        [ip_address] => 192.51.248.26
        [amount] => 65
        [amount_level] =>
        [selectMembership] => 2
        [tax_amount] =>
        [currencyID] => AUD
        [is_pay_later] => 1
        [invoiceID] => 0c6d15e48854236861cdc16a4a8222e9
        [is_quick_config] => 1
        [email-5] => check@gmail.com
        [description] => Online Contribution: Family Registration
        [accountingCode] =>
        [addressee] => 1
        [email_greeting] => 1
        [postal_greeting] => 1
        [updateBlankLocInfo] =>
    )

You can use profiles directly to create an Household. When you add a field to a profile you have first select the entity, which could be contact, Individual, subtype of Individual, Household, Organization and others.

So there is no need to program this.


Event part payment & multiple registration We run courses that has different modules. For example

Module A
Module B
Module c

A participant can chose to attend Module A now and pay.

But couple of months down the line would want to sign up for Module B or C.

Issue I am facing is when registering online for 2nd time, its coming up with a message saying "Oops! You have already registered for this course".
Is there a way to solve this problem using civievent please?

PS:We cannot use contribution due to policy within organisation not to mix course payments & donation.

Tapash,

I believe CiviCRM allows one to register for same event with same email address multiple times, if the setting 'Same email address?' under 'Online Registration' is enabled for the event.

HTH

Pradeep


SOLVED is Civicrm compatible with Litespeed technology? I just upgrade my service provider from apache to litespeed webserver and Civicrm stop to work.
The error is in a lot of page:
Sorry but we are not able to provide this at the moment.
We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.

Gli amministratori del sito: Questo errore può indicare che gli utenti accedono a questa pagina utilizzando un dominio o URL diverso da quello configurato dall' URL di base. ESEMPIO: URL di base è http://example.org, ma alcuni utenti l'accesso alla pagina tramite http://www.example.org o un alias di dominio come http://myotherexample.org.

tipo di errore: Impossibile trovare una chiave di sessione valido.

That is seems related to the url base configuration, but it is the same of before and it worked perfectly. I had a similar problem when used Varnish cache that solved removing that cache.
But now the pages are no cached with litespeed.
I cannnot also configure the backend in order to set civicrm in debug mode.
Have any suggestion in order to check if the problem is related to litespeed?

Example page of error:
http://www.grag.org/civicrm/?page=CiviCRM&q=civicrm/profile/create&gid=16&reset=1

Here is a hint of the problem: if I use a demo site: http://wpmaster.demo.civicrm.org/wp-login.php (user demo/demo) and then the link http://wpmaster.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmember%2Fsearch&reset=1 using the search button I have in the query string the following http://wpmaster.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmember%2Fsearch&_qf_Search_display=true&qfKey=6709b858d58d2f669a89cae4c9d06171_4657

but on my site after the http://www.grag.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmember%2Fsearch&reset=1 pressing the searrch button I have the following link and the error http://www.grag.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmember%2Fsearch the variables is missing.

Now it is solved thank to the service provider that modified the server configuration

I am using the webhosting service of Rochen, and they use a LiteSpeed Web Server.
Civicrm runs inside a Joomla 3.7.5 website quit okay. (The the current Joomla version of 3.8.2 and Civicrm do not work together okay, because there are still several issues due to changes in the Joomla 3.8.* versions.)

So as to your main question: Litespeed can be setup to accommodate Civicrm.


How do I change an incorrect contribution status to Completed? An EFT/ACH contribution was made last week via a Civi Contribution page with no price sets.  Normally EFT transactions go through just fine, but this one hit a snag and was marked Pending and then Failed by our vendor, iATS.  The iATS website gave a reject code I didn't recognize (113), so I inquired with their customer service.  Turns out it was an temporary communication issue with their system and the bank, and so the Failed status wasn't actually true.  It was a successful transaction.  iATS corrected the status in their system yesterday.

Our issue now is that Civi still says Failed.  I tried to edit the transaction via the Civi UI, but my only options now for the Contribution Status are Failed, Partially Paid, or Pending Refund.

Is there a workaround in the UI to edit this transaction and make it Completed?
Or do I need to edit the transaction in the civicrm_contribution table with the contribution_status_id field?  (It is currently 4; I would change it to 1.)
Are there any potential issues with changing the contribution status directly in the database?

Drupal 7, Civi 4.6, iATS extension 1.5.3

To my knowledge:

As far as the contribution hasn't exported to any sage or anything you are ok - you can directly change the contribution status against the DB which will be an easy fix.

But if the transaction has been exported already then we shouldn't be change the status instead we should be creating an new transaction for the contact also mention the reason against the source which will help.

I guess this helps!!!


Can I expose CiviCRM contacts to Drupal Linkit? We have an intranet for a small membership organization with a wiki done in Drupal 7 and a CiviCRM 4.5 installation for member information. Everyone with access to one has access to the other, so we looked into the idea of linking directly to CiviCRM contacts from the wiki as appropriate (e.g. "for ad hoc reports, contact Nilesh").

Linkit is a Drupal module that makes it easy to insert links into content, whether through a WYSIWYG editor or at the field level. To simplify, it provides an autocomplete field that allows the content author to choose from possible destinations, then automatically generates the canonical link. This would be ideal for authors, to avoid having to look up CiviCRM contact IDs.

According to the module page,

  Linkit links to nodes, users, managed files, terms and have basic support for all entities by default.

(emphasis in original). It does not, however, interface with CiviCRM contacts that should be recognized as Drupal entities when CiviCRM Entity is installed and active.

Is the fault here on CiviCRM Entity or on Linkit? Is there a better practice for linking CiviCRM contacts from CMS content?

Have you tried the CiviCRM Contact Reference Field module?  It ships with Core but needs to be turned on separately.


Trying to remove old version and install new CiviCRM was causing an error 500 on the site.  I renamed the com_civicrm directory in root joomla and in administrator folders I now get Warning: require_once(/hsphere/local/home/kencostore/yesmilwaukee.org/administrator/components/com_civicrm/civicrm.settings.php): failed to open stream: No such file or directory in /hsphere/local/home/kencostore/yesmilwaukee.org/plugins/user/civicrm/civicrm.php on line 103 Fatal error: require_once(): Failed opening required '/hsphere/local/home/kencostore/yesmilwaukee.org/administrator/components/com_civicrm/civicrm.settings.php' (include_path='.:/hsphere/shared/php55/include/php/PEAR') in /hsphere/local/home/kencostore/yesmilwaukee.org/plugins/user/civicrm/civicrm.php on line 103

Can someone please let me know where else there's a reference to civicrm that needs to be removed.  I plan on reinstalling and I have backed up the site's database

It looks like your civicrm.settings.php file may still be looking in the com_civicrm directory for your Civi files.  You will also need to make sure that your "CiviCRM Resource URL" directory on the Settings-Resources URL screen has been updated (Top black menu > Administer > System settings > Resource URLs).


MySQL Master-Master Replication on 2 servers For our installation in a "Third World Country" we need 2 replicated Master-Master Mysql-Servers:

one in a European data center to serve the public website and allow access from mobile devices to CiviCRM
one local server to serve the office staff (as the internet line of the office often does not work and the staff cannot depend on the server in the data center)

We run 2 "master-master-replicated" MySQL-Server

one with auto_increment_offset = 1
the other with auto_increment_offset = 2
both with auto_increment_increment = 2

in my.cnf so that one server uses odd ids and the other one even ids when inserting record. This works perfectly in other PHP/Mysql based software we are using. We do not have a problem with the replication of our running servers.

When installing CiviCRM we received the message

"An auto_increment_increment value greater than 1 is not currently supported. Please see issue CRM-7923 for further details and potential workaround."

https://issues.civicrm.org/jira/browse/CRM-7923 not really is helpful with that issue - it explains how to undergo the configuration of replicated servers which does not help in our case as we need the master-master replication with CiviCRM. This pages also shows that this topic seems to exist since several years without any change.

We googled a lot and did not find any solution for this important feature to use CiviCRM on 2 (or even more) replicated master database servers.

So I address the following questions:

why CiciCRM only supports id increments of 1 when inserting records? Which technical reason defines this limit?
are there any modules to change this handicap? if not:
where in the code, where is the point to change this behavior? We have a team of PHP developers to work on this problem if we would know where to start
is there - may be - a plan to change this problem in the near future e.g. in 4.7?
what other recommendation do you have for our organizational need of 2 servers - without setting up CiviCRM on 2 database servers with "master-master replication"?

Kind regards and thanks a lot for your answer!

This is an interesting approach!

As you rightly noted, that bug report was wrong a long while ago and didn't get traction.

As you mentioned you have developers able to help, I would suggest you do a quick evaluation to identify if the install procedure (without installing sample data) breaks still with an autoincrement >1

Obviously, in a separate install that you might end up trashing.

in your install/index.php line 1007 or so alter  requireMySQLAutoIncrementIncrementOne so it's first line is

return; // bypass the test, the sky might fall, but at least we'll know how exactly.

I think the general plan for inclusion of a new feature is: if you do the work of identifying the issue and code the fix(or fund the work if needed), it's likely to be accepted ;)

Assuming that it doesn't have any impact for "normal" users that have an increment of 1, I personally would want to try (or at least master-slave for a starting point)


Create Drupal user for contact joining as Organisation Running Drupal 7.43 and civicrm 4.7.12.

We sell memberships to individuals and organisations.

The creation of an Individual works fine. The contact is created and the Drupal account created.

When signing up as an organisation with a name/address/email/create drupal profile, I get the error:

DB Error: already exists.

And the fatal error in Drupal logs:

$Fatal Error Details = Array ( [callback] => Array ( [0] =>
CRM_Core_Error [1] => handle ) [code] => -5 [message] => DB Error:
already exists [mode] => 16 [debug_info] =>
   INSERT INTO civicrm_uf_match (domain_id, uf_id , uf_name , contact_id)
   VALUES ( 1 , 1229 , 'user@ns9.com' , 2603 )
[nativecode=1062 ** Duplicate entry 'user@ns9.com-1' for key
'UI_uf_name_domain_id'] [type] => DB_Error [user_info] => INSERT INTO
civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,
1229 , 'user@ns9.com' , 2603 ) [nativecode=1062 ** Duplicate entry
'user@ns9.com-1' for key 'UI_uf_name_domain_id'] [to_string] =>
db_error:
message="DB Error: already exists" code=-5 mode=callback
callback=CRM_Core_Error::handle prefix="" info="INSERT INTO
civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,
1229 , 'user@ns9.com' , 2603 ) [nativecode=1062 ** Duplicate entry
'user@ns9.com-1' for key 'UI_uf_name_domain_id']"] )

Weird thing is that it seems to work fine.

Organisation is created and given membership.
Individual is created with relationship to organisation
Drupal account is created for Individual

But they are just given the error and not logged in.

I can get them to manually create an account after creating membership and link it to their civicrm contact, but it seems like an unneeded extra step for users.

Maybe I need to use civicrm_entity and trigger a rule?
Thanks

In the database table that links CMS users to CiviCRM contacts, we store a few things:

The CMS user ID (in Drupal's case, the "uid")
The CiviCRM contact ID
The email address that both records have in common.

Crucially - all three must be unique!  For instance, you can't have a single CiviCRM contact linked to two Drupal user accounts.

The error you're seeing says, "Hey, Civi tried to create a link between a Drupal user and a Civi contact, but we found that another record in this table already uses that same email address."

Based on that - I'd guess that something about your setup is causing Drupal to try to create two user accounts at once - one connected to the individual and one for the organization.

Without knowing more about your setup, I can't tell you the exact steps to fix it, but hopefully this will make the solution clear to you.

One last thing: In CiviCRM, there's a philosophy of not creating "organization" accounts.  "Organizations" can't log into websites; individuals can.  So if what you're trying to do (it's not 100% clear from the question) is create two logins, consider instead using the relationship permissions to allow the individual to edit the organization instead.


Price set is required but “-none-” option remains As the title says, we have a price set - its required, but the none option remains. This is being used for a membership sign up contribution page. Sorry I did not clarify earlier.

Civi 5.1, wordpress 4.9

Update: we ended up creating a new price set, making the options required, and a new contribution page and it all worked out.

One way to avoid such behavior is to write hook_civicrm_buildForm and use contribution page id as a trigger in if condition and use jQuery to remove 'None' option from dropdown/radio.


Importing localized content to Civicrm database I have tried to use the import process in civicrm for importing my urdu data fields into civicrm. After I map the fields in my csv to fields available in civicrm db i get error file. I am attaching the image from my error file.
Please note that the data is in urdu. I want civicrm to display the data in its fields like first name will contain the name of my contact in urdu.
My import verification came like this

I appreciate any help from the community.

You need to have (first name and last name)  or (email) columns not empty data. Also make sure your csv has character set to Unicode UTF-8 and is separated with correct delimeters


Are there any tricks to importing contact data if you include a column for 'is_deceased' Are there any tricks to importing contact data if you include a column for 'is_deceased'?

I am asking primarily so I can answer and give others a warning!

If you import contacts with an 'is_deceased' column, then as well as having a 1 for everyone who is deceased, i recommend you use 0 instead of blank/empty for everyone else.

The reason is that some civi code checks whether someone is deceased or not, and a value of NULL creates problems.

This hit us with Scheduled Reminders. Seemed they were not going out to most folks, and jitendra tracked it down to the fact that Scheduled reminders only load contact with "is_deceased" is set to 0 - and therefore ignores NULL ones.

I expect we will get this patched for this scenario but chances are that other functions might do the same - so best to ensure you have a 0 in your living contacts when you import.


Financial Type on Contributions - Receipt (on-line) template We would like to add the contribution Financial Type to the Contribution (On-line) receipt template, so we communicate clearly to our donors where their money has gone.  (Our Financial Types are named after certain funds: General Fund, Child Sponsorship Fund, Building Fund, etc.).  We're not using Price Sets.  We're on Civi 4.6 and Drupal 7.

In the Contribution (Off-line) template, there is this section of the template code:

  <tr>
  <td {$labelStyle}>
   {ts}Financial Type{/ts}
  </td>
  <td {$valueStyle}>
   {$formValues.contributionType_name}
  </td>
  </tr>

Because the "off-line" New Contribution screen specifically asks for which Financial Type the transaction is, the above code is pulling the Contribution Type into the receipt template from the input value in the form. I'm tracking with that.

But for the Online contribution template, the Financial Type isn't being selected from the form itself. Rather the Financial Type is set on the Manage Contribution screen for each contribution page.  Financial Type isn't listed as a token in the template screen, so I tried the answer from Is there a token for contribution type?, {contribution.financial_type}.  I'm afraid that didn't work.  I checked debugging with &smartyDebug=1, but I couldn't find anything loaded in the contribution form that might work.

How is the Financial Type being transmitted to the Online Contribution page? Any ideas for a token or option I'm not seeing?

In your question you state "We're not using Price Sets." In that case you must have multiple contribution pages, one for each financial type.

You can edit the online contribution receipt to include something like:

{if $contributionPageId eq "4"}

      {ts}Donation to General Fund{/ts}

{elseif $contributionPageId eq "3"}

      {ts}Donation to Child Sponsorship Fund{/ts}

...

{/if}

I would place it in the receipt table just under the "Payment Details" header.

I realise it is a somewhat rudimentary solution, but "quick and dirty" is effective if you are struggling with tokens.


Survey Questions vs Contact Info CiviSurvey has two types of information we could collect - 'Contact Info' and 'Questions'. Is there any difference between these two from an implementation perspective? Would it make any difference if I add a profile in Contact Info vs Questions?

There are limitations in CiviCRM profiles mixing Contact and Activity fields (survey responses are stored as activities).  If your profiles work as you expect during testing, there won't be any hidden side effects, but having two profiles on a survey is meant to allow you to ask for both contact-specific and survey-specific information on a single survey.


Does the Civi GoCardless extension use the GoCardless API? We're a charity running CiviCRM 4.6 on Drupal 7. Last year, we moved all of our direct debits to GoCardless, which is running nicely. However, we're wanting to feed information from GoCardless back into Civi to state whether a recurring contribution has been paid or declined or cancelled, etc. At the moment, this is a very slow manual process, downloading a statement from GoCardless and then finding the corresponding contact in Civi line by line.

There's some information about the Civi GoCardless extension here (http://www.vedaconsulting.co.uk/gocardless), but this seems to be showing how to set GoCardless up as a payment processor.

Does anyone know if the GoCardless extension (or a different extension) can be set up in Civi to receive information back about contributions made through GoCardless, and if so, how does one go about configuring and running it?

Thanks

I am guessing that the only way civi would know about the information automatically if is the payment was set up via a civi contribution page in the first place.


502 Bad Gateway Error I am getting a 502 when I try to access CiviCRM from my site. Is the server down? What does this mean and how can it be corrected?

This error indicates that the web server is trying to connect to another service in order to respond to your request but is unable to. A common scenario is web server software such as nginx, which does not incorporate a PHP interpreter, contacting a service such as php-fpm (typically running on the same server) in order to process PHP.

php-fpm might be unavailable because it is currently handling too many requests and has no free processes to handle your request. Or it is configured with too low a limit on the number of processes.

Alternatively if you access the web via a proxy server, the error might indicate that the proxy server is unable to contact the server where your site is hosted.

Does this error only occur on CiviCRM pages, can you access the rest of your site?

If you don't manage or have access to the server yourself, then best to contact your hosting provider.


Error: Can't Access CiviCRM Extensions Following upgrade to 4.7.14 we are seeing two errors in lightboxes when opening Civi:

  Unable to download extension from
  https://civicrm.org/extdir/ver=4.7.14|cms=Drupal/single. Error
  Message: SSL connect error

  The CiviCRM public extensions directory at
  https://civicrm.org/extdir/ver=4.7.14|cms=Drupal could not be
  contacted - please check your webserver can make external HTTP
  requests or contact CiviCRM team on CiviCRM forum.

I have used wget on the server to check that it can access the address, which it can, and the SSL certificate for civicrm.org seems predictably valid! Has anyone else seen this error?

Problem resolved itself / cleared without further action - guess it was a server or connectivity issue.


Logged in user registers for an event on behalf of a colleage, unintentionally overwrites their contact record details We have recently required users to be logged in to access member-only discounts when booking events.

We are finding that some people are logging in and then booking on behalf of a colleague.  They don't book for / attend the event themselves.  They're currently missing the "Not X, or want to register a different person?" link at the top of the booking form.

So they are overwriting their own pre-filled details in the profile.

When they submit the form, eg at:
https://culturalenterprises.org.uk/?page=CiviCRM&q=civicrm%2Fevent%2Fregister&id=288&reset=1

it then updates some details. Most commonly it will update the title, and email, but leave the contact first name and last name unchanged.

Is there any way I can stop CiviCRM from doing this on event registrations?  When I look at the profile settings it is set to update the matching contact when it detects a duplicate, and I'm wondering if that's what is at issue here. (Though obviously I don't want to turn that off!)

I am guessing that this is intended behaviour as CiviCRM assumes the logged in use is providing updated information for themselves?

Thank you

CiviCRM 5.13.4 on Wordpress.

Here’s the solution to the issue you're facing –
https://civicrm.org/extensions/no-overwrite


What version am I running? The latest version of civicrm no longer prints the version in the footer. Is this correct? How do I find the version I am running?

You can also check the version from the file: civicrm-version.php
in the downloaded folder of civicrm.

File path : civicrm/civicrm-version.php


Is calling the api in a report template 'bad form'? Just a small question - but I've been asked to add 'Address Location Type' as a column in a report. At least as of our civiCRM version (4.7.13) the address seems to me to only contain the location type ID - which doesn't make much sense to users.

I wasn't able to readily find a pseudoconstant function available to handle location type id -> location type name like there are for things like State/Province and Membership Type... so I have it working with the api as below:

if (array_key_exists('civicrm_address_location_type_id', $row)) {
        if ($value = $row['civicrm_address_location_type_id']) {
          $rows[$rowNum]['civicrm_address_location_type_id'] = civicrm_api3('LocationType', 'Getvalue', array('id' => $value, 'return' => 'name'));
        }
        $entryFound = TRUE;
      }

My question is out of curiosity because I haven't run across an api call in alterDisplay like this (maybe it exists and it's fine) but... is there a better way to do this / is it bad form to get at the location type name this way?

EDIT: Here is what i've ended up with (working) based on Coleman's answer below:

        //Inside alterDisplay but outside foreach($rows) loop...

$results = civicrm_api3('LocationType', 'get', array('sequential' => 1, 'return' => array("name")));
$locationTypes = array();
  foreach ($results['values'] as $item) {
    $locationTypes[$item['id']]=$item['name'];
  };

        //now for each row it's just...

if (array_key_exists('civicrm_address_location_type_id', $row)) {
  if ($value = $row['civicrm_address_location_type_id']) {
    $rows[$rowNum]['civicrm_address_location_type_id'] = $locationTypes[$value];
  }
  $entryFound = TRUE;
}

EDIT 2: Even better version without 'sequential' or the foreach loop based on Coleman's comment below.

            //Inside alterDisplay but outside foreach($rows) loop...

    $results = civicrm_api3('LocationType', 'get', array('return' => array("name")));

            //now for each row...

    if (array_key_exists('civicrm_address_location_type_id', $row)) {
      if ($value = $row['civicrm_address_location_type_id']) {
        $rows[$rowNum]['civicrm_address_location_type_id'] = $results['values'][$value]['name'];
      }
      $entryFound = TRUE;
    }

This will result in one api call per row, which can add up to a lot of queries on the db.

A lighter-weight solution would be do do a single api call before the loop to look up all location types and store them in a local variable, then you can use array_search or similar for each row to get the proper value.


modify contribution for price set Is it possible for the admin to modify a contribution record amount for a Price Set field.

For example, if a user signs up and selects the contribution type/price, this seems static in the resulting contribution record.

I've found updating contribution amounts as Ramesh says is pretty weird for us, since we use price sets and offer lots of different deals and partnerships on events... the contribution status usually changes itself to partially paid or pending refund, which we don't want. I believe it's for people who want to use civicrm for financial reconciliation but since we dont, it makes things a bit complicated.

For one-offs, I usually go to the API explorer (yoursite.org/civicrm/api/explorer) and do a contribution create, including the contribution ID parameter to update the amount and the status (to completed) at the same time.


What is purpose of the Tell A Friend "Info Page Link" When setting up an event, in the Tell A Friend tab there is a Info Page Link. What is the purpose of that link? It does not store that information in the event table so I do not think it is even used.

The tell a friend information is stored in another table called civicrm_tell_friend. The help text for the Info Page Link says -

  A link to this Event Information page is automatically included in the email sent to friends. If you ALSO want to include a link providing general information about your organization, enter that link here (e.g http://www.example.org/)

So basically its purpose should be to include an additional link(eg your organization) along with the message you send to the contacts from Tell a Friend form.


HOWTO reliably set default Country on Import? We are trying to understand why importing contacts from CSV files with Address, City, State, Zip but no Country results in addresses with countries like Uruguay (for some CA residents), Yemen (for some South Dakota residents), and today, for the first time, for a bunch of CA residents, they were assigned "Guinea-Bissau". Although we have different staff doing different imports, the majority (e.g. ~3000 out of ~3060) of our imports DO end up with Country="United States"

In "Adminster > Localization > Languages, Currency, Locations" we have Default Country set to "United States". That was set when we first configured Civi long ago.

Is there some other setting that deals with setting the default country on import? Should we solve this by always adding a Home-Country column to CSV imports? That seems cumbersome, but will do if that's the only solution.

BTW, we're running WP 4.8.2 and CiviCRM 4.7.22.

I think the problem can happen if you import your 'State' as the Abbreviation. If you look in table civicrm_state_province you will see lots of States with Abbreviation CA - and unless you specify the right country it can have unexpected out comes possibly depending on which Countries you have enabled.

I think this jira address the core issue

The workaround for this issue is to ensure that, when importing address data, that a valid country is always specified when there is data in a State/Province field.


Connecting existing contribution to pledge WITHOUT Development When someone makes a pledge, they may use a different contribution page to fullfil that pledge.

I see an API question about assigning an existing contribution to a pledge here: Connecting existing contribution to pledge.

Is it necessary to create an extension to assign an existing contribution to fulfill a pledge?  Perhaps this is a feature request to add an "assign to pledge" section on the contribution edit form.

Yes, this currently requires writing an extension (or submitting the code as a patch to be included in the core).


Upgrading CiviCRM 4.0.1 to 4.1.0 I am having an issue whenever I run the upgrade for 4.0.1 to 4.1.0.  The issue is below:

Cannot execute CREATE TABLE `civicrm_setting` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`group_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'group name for setting element, useful in caching setting elements',
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unique name for setting',
`value` text COLLATE utf8_unicode_ci COMMENT 'data associated with this group / name combo',
`domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this menu item for',
`contact_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Contact ID if the setting is localized to a contact',
`is_domain` tinyint(4) DEFAULT NULL COMMENT 'Is this setting a contact specific or site wide setting?',
`component_id` int(10) unsigned DEFAULT NULL COMMENT 'Component that this menu item belongs to',
`created_date` datetime DEFAULT NULL COMMENT 'When was the setting created',
`created_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_contact, who created this setting',
PRIMARY KEY (`id`),
KEY `index_group_name` (`group_name`,`name`),
KEY `FK_civicrm_setting_domain_id` (`domain_id`),
KEY `FK_civicrm_setting_contact_id` (`contact_id`),
KEY `FK_civicrm_setting_component_id` (`component_id`),
KEY `FK_civicrm_setting_created_id` (`created_id`),
CONSTRAINT `FK_civicrm_setting_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ON DELETE CASCADE,
CONSTRAINT `FK_civicrm_setting_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE,
CONSTRAINT `FK_civicrm_setting_component_id` FOREIGN KEY (`component_id`) REFERENCES `civicrm_component` (`id`),
CONSTRAINT `FK_civicrm_setting_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL )
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1:
DB Error: already exists

The error you posted says, "Hi, I'm trying to create a new table in your database, but that table already exists."

Most commonly, this happens when you do an upgrade, then restore a backup, then attempt the upgrade again.  My guess is that you got a similar-looking (but different!) error previously, restored a backup, then got this on a second upgrade.

The reason this happens is that restoring a backup puts OLD tables back the way they were, but doesn't touch any NEW tables that don't exist in the backup.  So if you upgrade, you can NOT restore your database to the previous version simply by reloading the backup.  You must first DROP <database_name> and CREATE <databasename> so that you're restoring to a clean slate.

Try doing a DROP and CREATE before restoring your database and mark this question solved if that clears this error!  If you have a separate error, please post that as a new question.


CiviCRM Groups Sync Plugin for Wordpress - No access to Settings I installed the CiviCRM Groups Sync Plugin after finding the CiviCRM Member Sync plugin is not currently syncing to the WP Groups.

It was all working and I set up a 'Guests' group in CiviCRM to sync to WP and it created the group 'Guests' in Wordpress. So that worked.

However, I registered as a Guest user via CiviCRM profile (which includes a create WP user account form) and was added to the Civi Guests group but not the WP Guests group.

I was just added to the default 'Registered' Group.

And now I've discovered I cannot access the CiviCRM Groups Sync plugin's Settings page. I get the dreaded 'Sorry, you are not allowed to access this page.'

This is the page being accessed https://somesite.com/wp-admin/options-general.php?page=civicrm_groups_sync_parent

I'm logged into WP as Administrator.

I'm not seeing any errors in the PHP error log, and have WP DEBUG on but not showing any errors.

Help!

Cheers,
Tracy

UPDATE:

UPDATE: Also, this plugin does not really help with removing the user when their Civi Membership lapses. So really the member sync plugin would be ideal as it works with the differing Civi Membership states.

I registered as a Guest user via CiviCRM profile (which includes a create WP user account form) and ... [snip] ... now I've discovered I cannot access the CiviCRM Groups Sync plugin's Settings page

I can't be entirely sure, but I think you may have been confused by the process of registering "as a Guest user via CiviCRM profile". When you do this and create a user account at the same time, CiviCRM will automatically log you in as that user. (FWIW that's one reason I don't use this functionality since there's no way to prevent that from happening) If you subsequently browse your WordPress site as that user, you'll find (depending on the default user role you have set) that you cannot access parts of it. You'd need to log out of WordPress and log in as your admin user to restore your capabilities.

  Also, this plugin does not really help with removing the user when their Civi Membership lapses. So really the member sync plugin would be ideal as it works with the differing Civi Membership states.

As I said in response to another question of yours on SE, this is on my to-do list. Please be patient and remember that the joy of free software is that it's free. My time, on the other hand, is limited - especially in the summer holidays. Luckily for you, funding has indeed been found and set aside to implement this - when I have the time to do so!


How to add many event's participants to a single group Civi 4.5.8 - We have many Events with the same name but different dates.  For example.  "Build House A", Date March 4th 8am to 4pm.  "Build House A" March 7th 8am to 4pm.  "Build House A", Date March 8th 8am to 4pm.

We could have many of these Events for the same Build(Event Type).  Everything works fine until I try to build a list of all participants for the same Build or same Event Title.  Is there any way to group/list/report on all participants of an Event with the same Title?

couple of options

if you go to Participants for your event eg http://d46.demo.civicrm.org/civicrm/event/search?reset=1&force=1&status=true&event=3 then you can select all and 'add contacts to group'

or if you have the Event ID then Search Builder accepts the id for an = query on Event - ie entering 3 gets me

18 Contacts
Event = Rain-forest Cup Youth Soccer Tournament

So your query would be
Participant > Event > '=' > 3

in the example above.

Any help?


Can't Edit CiviContribute Pages after URL Change Our website is being hosted by CiviHosting, but our Domain and Email are with another hosting company. The other hosting company just changed the DNS to point to CiviHosting, so that our domain would work with the CiviHosting account, and now I can't edit the contribution pages I made (or create a new contribution page). Specifically, I went to contributions >> manage contribution pages and then chose "configure" and then "Title and settings" for one of the pages and it redirected me to the /wp-admin Wordpress dashboard.

I tried a different page same thing.

I tried creating a new page and it let me type everything in but when I hit "save" it took me back to the /wp-admin page.

I tried deactivating and reactivating the plugin. Didn't work.

I tried removing all the files from the server through FTP, and reinstalling a brand new installation of CiviCRM. Didn't work.

I removed the new installation and put my old civicrm files back. Didn't work.

I have been Google Searching for a while and I tried finding config.settings.php as many sites suggest, but the only thing I could find was config.settings.php.template which I did attempt to modify in the way they described (changing the base URL) and that didn't work either. I changed it back to the original and re-uploaded it via FTP.

I looked through civicrm.config.php in case that was the file I was supposed to modify, but couldn't find a place to change the URL.

I tried going through the settings menu of CiviCRM, specifically the resources and directories paths and they all look like relative references (see attached) so I'm not sure what I'd change.

If you go to the actual pages, they do work, but I have no way of modifying them... (here's an example live page: http://sweetfields.org/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1)

Any idea what broke and how to fix it?

Thanks!

UPDATE: I just noticed that when you click on the link I provided in this post, it is referencing an old version of the site... I removed the black login bar at the top of the page. If you go to sweetfields.org now you'll notice the black bar is gone but for some reason it's there for the CiviContribute page... the plugin must be somehow referencing old files?

UPDATE 2: Found the file! But, it already has the correct URL in it for the base_url: "  define( 'CIVICRM_UF_BASEURL'      , 'http://sweetfields.org/');" so I'm guessing that's not the problem?

UPDATE 3: Should I delete all tables in the database that start with "civicrm_" and delete all files and then try re-installing?

For a domain change, look at the civicrm.settings.php file the 'CIVICRM_UF_BASEURL' is the field you are looking for.

For CiviCRM version 4.7.x this will be in wp-content/uploads/civicrm/
For CiviCRM versions 4.6.x and lower this will be in wp-content/plugins/civicrm/

You may also need to make changes for WP, but this is what you'll need to start with for CiviCRM.  In addition, the CIVICRM_UF_BASEURL setting must match the Site Address (URL) in the WP General Settings.

Update:
Ensure that CIVICRM_UF_BASEURL  reads as below:

define( 'CIVICRM_UF_BASEURL'      , 'http://sweetfields.org');


How do I bulk import Communication/Privacy preferences? I want to import a large group of people and some of them have opted out of SMS communications and some have opted out of email communications. I have tried multiple ways of entering the fields in my CSV files and none of them will import properly.  For example, I created a column "Do Not Email" and in the field for those who wanted do not want to receive email I put "YES" and the file imported properly, but the contact record does not say Do Not Email. What is the correct way to add this information?

Use the number "1" for yes and a blank for no.

One way to see this is if you do an export and then look at how it outputs it.


When I go to run the API, I get errors looking for examples Civi version 4.6.3.
When I access the API, it loads but with errors related to the examples.

This is an IIS server.

  Warning:
  scandir(C:\inetpub\wwwroot\sites\all\modules\civicrmapi/v3/examples,C:\inetpub\wwwroot\sites\all\modules\civicrmapi/v3/examples):
  The system cannot find the path specified. (code: 3) in
  CRM_Admin_Page_APIExplorer->run() (line 55 of
  C:\inetpub\wwwroot\sites\all\modules\civicrm\CRM\Admin\Page\APIExplorer.php).
      Warning: scandir(C:\inetpub\wwwroot\sites\all\modules\civicrmapi/v3/examples):
  failed to open dir: No such file or directory in
  CRM_Admin_Page_APIExplorer->run() (line 55 of
  C:\inetpub\wwwroot\sites\all\modules\civicrm\CRM\Admin\Page\APIExplorer.php).
      Warning: scandir(): (errno 2): No such file or directory in CRM_Admin_Page_APIExplorer->run() (line 55 of
  C:\inetpub\wwwroot\sites\all\modules\civicrm\CRM\Admin\Page\APIExplorer.php).
      Warning: Invalid argument supplied for foreach() in CRM_Admin_Page_APIExplorer->run() (line 55 of
  C:\inetpub\wwwroot\sites\all\modules\civicrm\CRM\Admin\Page\APIExplorer.php).

There appears to be a missing slash in the warnings between the civicrm and api folders.

If I edit APIExplorer.php and add either \ or \/ the error goes away.

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


Webform CiviCRM - Update Recurring Payment Profile Let's say in 2018 someone uses the webform and creates a membership and a recurring payment - ongoing - for $5 at a certain membership level.

Let's say in 2019, they want to upgrade their membership level. They login and use the same form to choose the next level up and want to pay $10 ongoing. Great. They submit the form.

What happens to the first profile? Does the recurring profile get upgraded or disabled?

I believe a new recurring profile is created leaving the old one intact. We had similar issue where people upgraded from and to auto-renew membership from online and they had 2 recurring in progress i.e payment was deducted twice unless we had to manually cancel the subscription in payment processor for the old one.


Select and register multiple people for a pre-selected event In a Drupal/Civicrm setup, how do I create a page which

Lists all members of a group
Allows user to select certain members and register them for an pre-selected event to record attendance

This is how I envision it:

Please submit attendance for this week's event:

[ ] Bob Smith
[x] Jeff Mason
[x] Susan Collins

[Submit]

My thoughts so far:

I know #1 can be accomplished with a View, but how do I allow group
members to be selected and registered for a pre-selected event?
I know #2 can be partially accomplished with a Webform, but only by typing in group member names – not selecting them from a list.

Is there a way to combine Views/Webform to accomplish this?

The ultimate goal is to automatically email a custom link to this page to group leader to submit attendance after event each week.

Thank you.

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

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

Admittedly this method has a few drawbacks

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


How to get Participant Fee as Part of the Total Contribution, using Webform Integration Using Webform to register Event Participants, how can I get the Partipant Fee (and any other amount part) displayed as a Contribution Item of the "Total" in the Contribution page, like here-under (copied from Webform Event Fees in Combination) ?

Step1 on the post you referenced will expose the Participant Fee field to the webform List item
Step2 sets the amount for it

The lineitems are automatic from there on. I have webform_civicrms that add on a Contribution (Donation amount) as well as a Membership!

[UPDATED] - posting some additional screenshots: I hope this will help you!

End Result:

The Start page looks like:

Note that the Membership and the Event Participant webform fields live on the Start page; the Donation one lives on the Payment page.
Start page - webform Elements:

Membership -> I decided to present all live options - that means it will take the Membership Fee as specified in the CiviCRM Membership Type settings;

Event -> two pairs: _participant_event_id form key and _participant_fee_amount form key / one pair for each event - I've set these fields to hidden -> and I've specified a $ amount -> then when someone selects the event -> the fee is added automatically.


GitHub repository location for Import scripts via Kettle In post:
http://forum.civicrm.org/index.php?topic=35438.0

JonGold states that he'll share the import scripts for using Kettle to import via cli.php and then tag the new imports, again using cli.php.  Unfortunately I haven't found a link.  Anyone have that link?  (I've sent a PM to JonGold, but also said I'd create the question so that he could reply to the now locked post.)

check the repo located here,  you might need to search the repo further:
 https://github.com/PalanteJon/civicrm_kettle_transforms


How to automatically create relationship between Drupal role user and a group of civi contacts? I have webform where volunteers signup for newsletter. They land on group called "Volunteer".
Our volunteer co-ordinator users are in a drupal role called "Coordinator"
What I want is, those "Coordinator" users would ONLY be able to access the contacts from the group "Volunteer". I can easily achieve this by using related permission extension https://github.com/eileenmcnaughton/nz.co.fuzion.relatedpermissions .
But I am failing to automate the process of creating a relationship between the volunteers and Drupal users. If any new Drupal user is added to the same role, the relationship would automatically be created. I am open to alternatives. Any suggestion would be greatly appreciated. Thanks

Use the Silent User Registration extension https://lab.civicrm.org/extensions/silentuserreg This will create the user in Drupal
Before you install the extension, replace the Createcmsuser.php file in CRM > Silentuserreg > CivirulesAction with the code below. This will create the UF Match that you are looking for to link it to the user in Civi
Follow the extension instructions to set it up. I would have your CiviRule trigger off When contact is added to group or something like that.
<?php

/**

Carls Notes
This file is to create a CRMUser and then a UFMatch record. File Location=secure/sites/all/files/civicrm/extensionsions/silentuserreg-master/CRM/Silentuserreg/Silentuserreg
/
/*
Class for CiviRules Create User Action

@author Jon Goldberg (jon@megaphonetech.com)
@license AGPL-3.0
*/
class CRM_Silentuserreg_CivirulesAction_Createcmsuser extends CRM_Civirules_Action {

/**

Method processAction to execute the action

@param CRM_Civirules_TriggerData_TriggerData $triggerData
@access public

/
public function processAction(CRM_Civirules_TriggerData_TriggerData $triggerData) {
$cid = $triggerData->getContactId();
$userInfo = \Civi\Api4\Email::get()
->addSelect('id', 'email', 'contact.display_name', 'is_primary')
->addWhere('is_primary', '=', TRUE)
->addWhere('contact_id', '=', $cid)
->setCheckPermissions(FALSE)
->execute()
->first();
$userExists = (bool) count(\Civi\Api4\UFMatch::get()
->addWhere('contact_id', '=', $cid)
->setCheckPermissions(FALSE)
->execute());
if (!$userExists) {
$userParams['cms_name'] = $userParams['nickname'] = $userInfo['contact.display_name'];
$userParams['email'] = $userInfo['email'];
$userParams['cms_pass'] = CRM_Silentuserreg_Util::randomPassword();
$nid=CRM_Core_BAO_CMSUser::create($userParams, 'email');
// create the UF Match record
$ufmatch['uf_id'] = $nid;
$ufmatch['contact_id'] = $cid;
$ufmatch['uf_name'] = $userInfo['email'];
CRM_Core_BAO_UFMatch::create($ufmatch);
}
}
/*

Method to return the url for additional form processing for action
and return false if none is needed

@param int $ruleActionId
@return bool
@access public
*/
public function getExtraDataInputUrl($ruleActionId) {
return FALSE;
}

}


Captcha Alternative to ReCaptcha ReCaptcha can be one of the most annoying captchas out there. Are there alternative captcha solutions out there for native civi profiles and pages?

I like CiviHoneypot myself, especially on contribution pages.


How do I force a reload after a CiviCRM summary action? In our CiviCRM instance, the value of a some contact custom field can be retrieved by calling an external API.

So I implemented hook_civicrm_summaryActions. If the user clicks on a custom action I added, a popup form appears with the generated result (or error messages). The external API is called, and the result is saved in our custom field.

If the user then clicks 'OK', the form disappears, so the contact summary is shown again, but the value in the custom field is not updated until the user reloads the page in his browser.

Is anyone aware of a way to make the 'calling' page refresh after the user clicks 'ok'? Another option would be to replace the popup form by an ordinary full screen form (anybody knows how to do that for a summary action?), and redirect after the form has been submitted. Or maybe there are better ways to achieve my goal than with summary actions.

Any suggestion is much appreciated.

Thx,
Johan

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.


Countries of US addresses showing up as Foreign in some names I have a mailing list of about 1,500 names.  I have imported them into CiviCRM using a CSV spreadsheet file.  The country field for all these names in my spreadsheet are all labeled United States.  A good portion of my addresses after the import into CiviCrm are now listed as another country.  Some show South Africa, etc.  I've tried the import several times to no avail, but my original list is correct.

Any suggestions how to fix this?  Thanks

Mark

(You're relatively new here BTW so welcome!)  It sounds as though your import sheet did not specify a country, but your site allows for multiple countries and thus multiple states/provinces.  Even if the United States is your default country, I've found that the import routine will pick the first country it finds in the list of countries with similar state abbreviations, rather than hitting the correct one.  The workaround to this is pretty simple; include a column for country in your import and populate it with United States (or the appropriate country).

Hope this helps!


Menu bar missing on startup Drupal I am running 5.21.1 with Drupal 7.69 (latest at time of posting). It was fine until I upgraded to this version of Drupal. Now I have as issue with the menu bar. When you first log-in the bar does not appear. However, if you then refresh the browser page, the menu appears and works fine after that. I have read all the posts about "menu missing", cleared the caches etc. and checked the .htaccess files but no joy. If you close the browser and then start a new browser session the menu is fine as long as you are still logged in. Has anyone else seen this?

PHP ver is: 7.2.27-1+ubuntu18.04.1+deb.sury.org+1

Hi @yobba I would suggest you look at applying this patch https://github.com/civicrm/civicrm-core/pull/16177 in one site i was associated with this fixed the error for us.


CiviEvent - Members Only Pricing I was curious to know whether or not it was possible to add members-only pricing to an event. I have a few default prices for an event but I wanted to be sure if it was possible or not to be able to add specific prices for members-only.

I realize there is a question similar here: Permit member-only pricing but that was 2 years ago and I was wondering if anything ever changed, I can't seem to find anything else on the subject and I figure there has to be a way otherwise I feel more people would ask about this...

Thanks!
Matt

The easiest way to do this would be to use CiviDiscount.

Create a random code.
Place the discount amount - either as a monetary amount or percentage.
Add other settings to your desire.
Use drop down - discount for events - Select the event.
Use drop down Automatic discounts - use Automatic discount for existing members of type - chose the types.
Then under Automatic discount for Membership Statuses - choose the status - I would choose current and new - depending on your settings.
Choose price field options (under additional options) to choose the exact items you want discounted. Ignore this if all items are treated the same, such as 10% discount across the board. (thanks for reminder KilakwaBT)
Add any other settings to your desire.

If the member is logged in, all the discounts will be applied automatically if all of the conditions are met (no code needed).  As members tend to forget to login, you may want to write a note on the event page saying Members - Login for a special discount - or something to that extent.


getting this error: PDOException: SQLSTATE[23000] After installation I am getting this error:

    PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'civicrm_handler_field_custom_file-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4);
Array ( [:db_insert_placeholder_0] => civicrm_handler_field_custom_file [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_custom_file.inc [:db_insert_placeholder_3] => civicrm [:db_insert_placeholder_4] => 0 ) in _registry_parse_file() (line 179 of /xxxx/drupal70/includes/registry.inc).

I resolved this by truncating all the caching tables using mysql query.
I followed following steps:

1. Connect Sql server
2. Truncate the all the cache tables and they are as follows:
truncate cache;
truncate cache_admin_menu;
truncate cache_block;
truncate cache_bootstrap;
truncate cache_field;
truncate cache_filter;
truncate cache_form;
truncate cache_image;
truncate cache_libraries;
truncate cache_media_xml;
truncate cache_menu;
truncate cache_page;
truncate cache_path;
truncate cache_token;
truncate cache_views;
truncate cache_views_data;

By doing this above steps I can able to resolve this issue.