Integration with G Suite I wonder what is the best configuration for CiviCRM if it is supposed to serve an organisation which uses G Suite?
Can I use any hosting company that handles Drupal?

Choosing a webhost:

Sounds like you are new to CiviCRM and you are starting a new site.  To your second - easier question - you can use any host for CiviCRM - if you have the budget - I would go with an expert that can implement everything to meet your needs on a VPS.  Otherwise if you are on a tight budget - these are two shared web hosts that I recommend (In No Particular Order):

CiviHosting - Supporting Partner of CiviCRM
Namecheap Stellar Business -  Not a partner of CiviCRM

I have used the above for different deployments and have been very happy. Alternatively - these are the requirements for CiviCRM, choose whatever hosting company you are comfortable or have experience with and make sure they meet the requirements for CiviCRM, any extensions you may use, and your CMS. In addition - I would recommend that you choose a web host that supports PHP imagemagick library.

CiviCRM - GSuite Integration

There has been a bit of work on this and I recommend you check these extensions out:

CiviGmail Integration with Gmail
Google Groups CiviCRM Integration
Google Apps Sync
CiviCRM - Google Script/Drive Integration
Integrating Email Client into CiviCRM
Inbound Email

Lastly - with all external integration - outlook, gmail, etc. - you should focus on getting your staff to use CiviCRM first. For example, don't place an item on your google calendar first - add it to Civi first - then you can have events assigned to you sync or be sent to your calendar. I am not sure what Google Drive integration would even look like - can't help you there.

Ill also say this - take baby steps - and you will learn how best to implement this for your organization. Maybe tight integration with G Suite isn't the best use of your time - maybe creating an interface in which Civi and G Suite are easily accessible from each other is an easier option. In the end - practice makes perfect.


New Fields Won't Save I'm using civicrm 4.7.17 on drupal 7.54.  Logged in with administrator rights.

When I try to add a new field, (admin -> customize data and screen -> custom fields) everything works fine.  I create a new set, no problem, but then when I add a new field to the set, and click on save, it just hangs, loading forever.

This seems to be a new thing as I've created lots of custom fields before.

Any ideas?

OK, so the civirules 1.2 extension was causing the problem.  The problem is documented a bit here: https://github.com/CiviCooP/org.civicoop.civirules/issues/132

Luckily I hadn't set up at civirules stuff so it was easy to just disable it.  Maybe in the future I'll use an updated version of it.


Drupal 8.0.1 compatibility with CiviCRM Is the newest version of CiviCRM compatible with the newest 8.0.1 version of drupal? I have loaded drupal on my VPS but wonder if I load CiviCRM into the module folder, if it will be reccognized. If I have to delete 8.0.1 and reload drupal 7 please advise. Thanks for your time.

I'm afraid CiviCRM doesn't support Drupal 8 yet.  You will need to install Drupal 7.

You can find more details here: Installation and Upgrades

See also this question: Does CiviCRM work with Drupal 8 and how can I help?


Webform-CiviCRM and the "my billing address is the same" checkbox On a core contribution page, if you add an address profile at the top of the page, a checkbox appears allowing the user to indicate that their billing address is the same:

On a Webform-CiviCRM form, my understanding is that the payment page is always a separate page and this box is not automatic. Is there any way to include a checkbox like this?

This feature has not been implemented in Webform-CiviCRM. If you do see that box in a webform, it's a mistake (and the fix is to remove profiles from the contribution page you are using for the webform).

Implementation of this feature would require writing some javascript to fill those fields from available data, and some php code to store the data across potentially multiple pages. The best place to put it might be in wf_crm_webform_preprocess::addResources.

Note that if the user is logged-in then the billing fields will already be pre-filled.


Sync name and address with drupal user page via civicrm webform I am trying to sync the CiviCRM first name and address fields to a Drupal user account page but I cannot figure out the configuration. I am hoping it is something simple that I am missing out.

Scenario - We have a user who submits a webform with the first name, last name, address and phone number fields from CiviCRM. This is attached to an Ubercart product and when submitted the user has successfully purchased the product which comes with access to drupal to add some content. However, when the user logs in all the Drupal User fields are blank i.e. they need to be refilled again. Is there a simple way to sync them.

I have tried to the profiles section in CiviCRM but it actually add new fields to the profile page and does not sync them. Perhaps the CiviCRM roles sync is the right way to go? Any advice will be appreciated.

I think that the instructions in this blog about setting up a webform so that it adds a 'tag' to the contact, and Drupal Rules then use that contact to create a Drupal User for the contact (and log them in instantly if required) might be helpful to you.


How to add a custom extension on navigation? I create a simple extension but I want to put it on navigation bar.A simple menu inside a events menu. How can I do that?

See the documentation for hook_civicrm_navigationMenu including the civix helper functions.


Can't install CiviCRM on Wordpress (error Database) I try a several times to install CiviCRM on my Wordpress. But the Check before show problems with the database. I checked everything a several times but no success.

Wordpress is running on a hosting at "Strato"
See the screenshot for more informations.

Can anybody help me whats going wrong?

Couple of observations:

You may need to double-check that you can reach your MySQL database, since CiviCRM apparently can't (it's confusing since it reports that it can't connect, yet various operations can be done)
Your MySQL user needs to be able to create triggers. You probably need to contact your host to request this capability.


CiviMailings stuck on 'running' We run CiviCRM 4.6.2 with Wordpress 4.2.3. I have run a couple of large Mailings recently and they get stuck 'running'.  I know some recipients have received them although the reports say 0% have been delivered.  I don't want to execute the cron job again as previously some recipients then received the mailing twice.

Any ideas?

You might check the mailing list itself, as we have seen mailings get stuck due to an improperly formatted/invalid email address on the list.  Another idea might be to split your list in half and send the mailing in two groups, in case the mailing size is an issue with your server.

Good luck,
Lesley


Upgraded to CiviCRM 5.34.0 and extensions broke I have upgraded to CiviCRM 5.34 and things seem to have gone astray. When loading the extensions page (Administer -> Systems Settings -> Extensions) the following error message is displayed:

Extension download error The CiviCRM public extensions directory at
could not be contacted - please check your webserver can make external
HTTP requests or contact CiviCRM team on CiviCRM forum.

I cannot refresh the extensions list, not install any new extensions (I guess since the catalogue cannot be reached). I fired up a terminal into the server and Curl seems to work, and I cannot see any PHP options which may prevent connections.
Any help here?

Looking at CRM/Extension/Browser.php where that error is generated, I would expect it to show a URL between the at and could in your message.  So Civi isn't calculating the repository URL.
Tracing the code a bit, it seems that the URL should be calculated in CRM_Extension_System::getRepositoryUrl(), which pulls it from the ext_repo_url setting.
Here's what I would try, in order:

Clear the CiviCRM cache, that's probably the issue anyway.
Confirm that <civiroot>/settings/Extension.setting.php defines ext_repo_url with the default value of https://civicrm.org/extdir/ver={ver}|cms={uf}.
Check the civicrm_setting table for a record with a name of ext_repo_url.  If one exists, this is overriding the default; remove it.
Alternatively, add a setting (via API Explorer, or in civicrm.settings.php - see Override settings in the docs) to set ext_repo_url to
https://civicrm.org/extdir/ver={ver}|cms={uf}.  This should force the correct URL to be generated.


civix civicrm:ping not printing any output I am running CiviCRM on Mac OSX 10.11.3, using the latest Bitnami CiviCRM/Drupal stack (bitnami-civicrm-4.6.11-0-osx-x86_64).
I have civix-15.04.1 installed as instructed (under $HOME/civix), and have it added to the path. Likewise I have updated the PATH to use the version of PHP provided by the stack.

While I can use civix successfully to run commands like:

$ civix generate:module

when I try and run the following command (as a pre-req to generating custom-xml):

$ civix civicrm:ping

I get no output whatsoever (ie silent failure).

I am running the command from within the web root.

Anyone experienced this before? Any pointers greatly appreciated.

I would try

civix civicrm:ping -v

or even:

civix civicrm:ping -vvv

as the first thing as that could show something useful in the future.

civix will fail silently if your civicrm.settings.php file:

is turning down phps error reporting and it hits an error
contains a die or exit command

Eventually I figured out the problem as here:

// civicrm.settings.php
// set up php to show errors:
if (isset($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'dev')) {
  error_reporting(E_ALL | E_STRICT);
  ini_set('display_errors', TRUE);
  ini_set('display_startup_errors', TRUE);
}
else {
  error_reporting(0); // <<< this is bad if you cant find your problem!!
}

Inserting this in the else section confirmed that $_SERVER['HTTP_HOST'] was undefined:

echo '$_SERVER: '.json_encode($_SERVER,JSON_PRETTY_PRINT)."\n";

So I was able to correct this just by setting up a mock value in bash to fix my civicrm.settings.php logic, and also to allow Drupal to find the right sites/XXX/settings.php file:

declare -x HTTP_HOST=contact-qld-dev1.myorg.example.com


Is it possible to record a copy of sent system workflow message emails as activities? Is there a way to do this, or an extension that offers it?
We want to be able to see what was sent to people when one of these was used.

We built this extension to help with this scenario: https://github.com/fuzionnz/nz.co.fuzion.transactional

This extension adds bounce handling and click tracking, and creates activities for CiviCRM's transactional emails (i.e event registrations, contribution receipts, invoices, scheduled reminders, and so on).

Out of the box, CiviCRM only does the things mentioned above when sending via CiviMail. This extension adds that functionality to all mail sent from CiviCRM.


Could not find a valid session key Since i installed CiviCRM on my Drupal site i can't save users anymore.

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. 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.
Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.
Error type: Could not find a valid session key.

Civi Resource urls for Civi is correct.
It happens when i create a user with a form.
Drupal: 8.4.0
CiviCRM: 4.7.28
Edit:
Because the original website was already built in Drupal 8 and it relies on some Drupal 8 features it will not be possible to switch to Drupal 7.

Same accepted answer: https://stackoverflow.com/a/51280077/4329215

If you build a custom form, Civi need some fields for when a new Drupal user is created.

1: Go to Civi profiles (/civicrm/admin/uf/group?reset=1) and select the desired profile you want to include in the form. I selected "Your registration form".
Go to settings of the profile and select "used for => Drupal User Registration"
In Advanced Settings check Account creation required

2: In your custom form, implement the function: 'civicrm_form_user_register_form_alter'.

public function buildForm(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
    $validators = array(
        'file_validate_extensions' => array('jpg jpeg png'),
    );
    $form['uname'] = array(
        '#type' => 'textfield',
        '#placeholder' => t('Username*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );
    $form['organisation'] = array(
        '#type' => 'textfield',
        '#placeholder' => t('Organisation name*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );
    $form['password'] = array(
        '#type' => 'password_confirm',
        '#placeholder' => t('Password*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );
    $form['name'] = array(
        '#type' => 'textfield',
        '#placeholder' => t('Full Name*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );
    $form['email'] = array(
        '#type' => 'email',
        '#placeholder' => t('Email Address*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );

    $form['street'] = array(
        '#type' => 'textfield',
        '#placeholder' => t('Street*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );
    $form['nr'] = array(
        '#type' => 'textfield',
        '#placeholder' => t('Nr*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );
    $form['zipcode'] = array(
        '#type' => 'textfield',
        '#placeholder' => t('Zipcode*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );
    $form['city'] = array(
        '#type' => 'textfield',
        '#placeholder' => t('City*'),
        '#required' => TRUE,
        '#attributes' => array('class' => array('form-control')),
    );

    //This did the trick!
    if( function_exists('civicrm_form_user_register_form_alter') ) {
        civicrm_form_user_register_form_alter($form,$form_state,'customRegistration');
    }

    $form['actions'] = array('#type' => 'actions');
    $form['actions']['submit'] = array(
        '#type' => 'submit',
        '#value' => $this->t('Create'),
        '#attributes' => array('class' => array('btn', 'btn-cs', 'btn-outline')),
    );
    $form['#validate'][] = array($this, 'regValidate');
    return $form;
}

2: In your template, add the fields with the field name from the Civi function:

{{custom_registration_form.civicrm_profile_register}}

You find the name in /modules/civicrm-drupal/civicrm.module

$form['civicrm_profile_register'] = array(
    '#markup' => \Drupal\Core\Render\Markup::create($html),
    '#cache' => [
      'max-age' => 0,
    ],
);

The fields from the profile will be included in your custom form and no problems with sessions key anymore.


How can I generate an internal URL to a CiviCRM page based on certain parameters? What functions exist within CiviCRM that make it easy for me to generate internal URLs?

In PHP

CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=$contactID")

See code-level docs for CRM_Utils_System::url for more details.

In Smarty

{crmURL p='civicrm/contact/view' q="reset=1&cid=`$contactID`"}

See code-level docs for CRM_Utils_System::url for more details.

In Javascript

CRM.url('civicrm/contact/view', {"reset": 1, "cid": contactID});

See code-level docs in civicrm/js/crm.ajax.js for CRM.url for more details.

This content was migrated here from the Cheatsheet wiki page as part of the 2017 wiki content migration project.


Can I auto update Civi data w/ data from my listserv? has anyone integrated an email listserv with CiviCRM? It would be nice to

have a Civi group of 'advisors' and also a listserv, and when there are changes to subscriptions on the listserv, it is reflected in civi, and
to be able to store email messages from the listserv in civi (as activities).

I found this thread on the forum, where the answer is "no" http://forum.civicrm.org/index.php?topic=8681.0 (and I am using Wordpress so there's no option for using Drupal Organic Groups), but it's from 2009 so I thought I'd ask again to see if there have been any changes or work-arounds since then.

Any links to resources, guides, articles on how to sync this kind of data would be really helpful. Thanks!

Thanks!
-Kristin

Assuming you mean a discussion listserv, not an announcement listserv (which would allow you to use CiviMail, or Mailchimp/Constant Contact with the relevant integration extension), you have the option of Mailman integration.  This method of Mailman integration requires that you have shell access on the Mailman server, but it works to sync your users from Civi to Mailman.  So if you wanted someone to unsubscribe, they would use a Civi unsubscribe page, and it would remove them from a group, which would in turn cause them to be unsubscribed from the Mailman group.

Ideally this wouldn't require shell access, but unfortunately, most listserv software simply doesn't have an API.  Mailman 3.0 will have an API, but that's been in development for many years.  I'd considered at one point creating a CiviMailman integration module using PHP-Mailman, but at this rate Mailman 3.0 might be out first!


help needed in importing multi value custom fields For the below custom fields, suppose a contact has two UG degrees B.Tech, BBA and two PG degrees M.Tech and MBA, I want to add additional set of custom field set, and then add the second degree. Like this I have 100 contacts, How to do through importing .csv file? ...

When I import I am able to only import the first set of degree, not the second one. I am configuring like the image in the second. However there should be some error in that. Not sure how to do it?

Not sure but I don't think you can import both the records in a single go. You might need to create two csv file with each value(B.Tech and BBA) of the custom field and import it one by one.


Translate Personal Campaign Pages / User interface I have a multilingual setup (2 languages), and I would like to create Personal Campaign Pages.

But some the user interface texts are not translatable:
 - The thermometer texts are not translatable: "x% towards our goal", "€ xxx raised", "Goal: xxx"
 - The texts about the Honor Roll at the bottom of the contribution page are not translated: "Show my contribution in the honor roll", "include my name and message", "list my contribution anonymously"
 - "Create your own fundraising page" link at the bottom is not translatable
- Text at the bottom of the contribution page "This contribution is being made thanks to the effort of xxxx, who supports our campaign..."

How can I get these texts translated?

Some of these strings are configurations, others are core-strings in the CiviCRM source code.

templates/CRM/PCP/Page/PCPInfo.tpl :
{$achieved}% towards our goal

This string is missing the {ts}...{/ts} to expose the string to the translation system.
It should also be noted that since this has a variable, the variable should be passed like this: {ts 1=$achieved}{$achieved}% towards our goal.{/ts} (in some languages, there might be a space before the '%' sign, and we can't assume that the string would always translate as "x% [rest of string]".

the other strings in that file, such as 'Goal', 'raised' are in "ts". Looking at Transifex, the strings seem to be there. In what language was it missing? Did you check in Transifex?
"Create your own fundraising page" this is a CiviCRM contrib page configuration, but the configuration does not seem to be flagged as a multi-lingual field. This would require a schema change and an upgrade function.
"This contribution is being made thanks to the effort of xxxx, who supports our campaign..." : looking at the code, this string seems to be mostly hardcoded. However, you can change it using a buildForm hook (change the variable/string assigned to the template).

More information about CiviCRM translation can be found here:
https://wiki.civicrm.org/confluence/display/CRMDOC/Internationalisation+for+Developers


GoCardless Direct Debit integration for CiviCRM: will this extension handle 5 year memberships? CiviCRM 5.31.0 - Wordpress 5.5.3 - PHP 7.3.24
I help run an organisation (non-profits) where we have individual memberships, lasting for 1, 2 and 5 years and where subscriptions are being currently collected, mainly through PayPal.  We are looking to create a further contribution page(s) to accept direct debits and see this extension as a possible solution.  Before trialling it, does anyone know please whether it and GC would cope with memberships of more than 1 year, where of course the interval between DD's could be anything up to 5 years?

I think thats perfectly possible within GoCardless. You would need to setup a plan for each of the differing membership collection periods you would like to collect for in order to use it as a traditional Direct Debit. FYI a Direct Debit is a UK equivelant of SEPA with some technical differences i.e. UK bank accounts only etc.


Showing Financial Transaction Data with Contributions I have created a drupal view of contributions. In this view i want it to show:

Date Contribution Created (CiviCRM Contributions: Date Received)
Financial Type (CiviCRM Contributions: Financial Type)
Fee Amount(CiviCRM Contributions: Fee Amount)
Net Amount (CiviCRMContributions: Net Amount)
Payment Date - This is the only data i can't extract as this is linked to the financial Transaction. I need the transaction date

I have added a relationship "CiviCRM Contributions: CiviCRM Line items" but it pulls in other transnational data not the txrn date.

When i create a view of "CiviCRM Financial Trxn" I am unable to add in a relationship therefore unable to pull in contributions data.

Any Ideas?

I have thought about putting a View within a View to pull that data and it works unfortunately it shows a duplication of the contribution as there is several financial transaction entries for that contribution.

Thanks

Unfortunately there is no relationship being handled in views between contribution and payment(financial trxn table). You can do this by writing a small module implementing hook_views_data() hook with civicrm entity module.


How can I modify what is displayed on the civicase dashboard? currently it shows Contact / Subject / Status / Type / Mt Role / Manager / Most Recent /

I want it to show
Contact / Subject / Activity Status / Custom field 1 / custom field 2

One way would be to use the technique described here:
http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in%2C+Profile%2C+Contribution+and+Event+Registration+Screens

The files you want to override are:

    templates/CRM/Case/Page/DashboardSelector.tpl
    and
    CRM/Case/Page/Dashboard.php

Getting custom fields can be done using the api, although you need to know the database id for the field definition. See http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API, and down where it says Custom fields.


Create Role in WP from Group in CiviCRM In WP 5.5/CiviCRM 5.29 I have only one membership type at the organization level and 2 groups of beneficiaries depending on some criteria. I have all the needed extensions from Christian Wach.
I need to synchronize the groups into WP Roles and not groups in order to let them access to personalized content defined with Elementor.
It seems that this is not yet possible but maybe I'm wrong.
Does anyone know about this setting?

You can go one better than syncing to roles using the CiviCRM Groups Sync plugin instead. It keeps Contacts in CiviCRM Groups in sync with WordPress Users in groups provided by the Groups plugin. That way you are free to adjust your users' roles without affecting the sets of permissions that they have which are related to CiviCRM or member-only content.


Find CiviCRM version programmatically? Within a CiviCRM extension, what's the best way to determine the current CiviCRM version in versions 4.6.x and above?

I'd use System.get API call. (source)

In the return values, there's a value for version which corresponds to the value in civicrm-version.php

$ cv api System.get name=version
{
    "is_error": 0,
    "version": 3,
    "count": 1,
    "id": 0,
    "values": [
        {
            "version": "4.6.20.0",
            "uf": "Drupal",
            "php": {
            // lots more info ...

Only worry about this might be how heavy that API call is - since I see data there from OS etc, it might not be suitable for calling frequently if rebuilding the data each time. There seems to be a bit of overhead to this API call (~0.07s per call in a randomly picked test environment), so for frequent use you'd want something lighter.


Use Email Templates instead of Automated Messages Need your help...I'm trying to send a custom email automatically when a contact is created via the 'Sign Up' page...I'm using a profile in the page with 'Add To Email Group' enabled and I've also enabled the Double Opt-In to send an email back to the newly signed up contact....I see that the message comes from the Automated Messages section...I want to use an email template instead so that I can include the Contact information in the email...Is there any way I can do this?

Have you looked at the CiviRules Extension?


Importing contact from excel file How can I import contacts to a group in CiviCRM from an excel file?

Kind regards,

Alexia

You can use Import contact screen to add contact in a group. On preview page of import i.e 3rd page, the screen provides ability to add imported contacts into group. Selecting group from the dropdown would add contact(s) to group.

HTH

Pradeep


Inbound email formatting differs in Activities compared to CiviCase Is it possible to include line breaks in activities created from inbound emails, given that this is implemented in CiviCase? If so are there any suggestions about how to go about implementing this?

Currently long emails, especially if replies are included result in a confusing block of text. This has previously been noted at Inbound Email - Formatting? (emails with HTLM code are ignored), However if the activity is saved to a case and then viewed the line breaks are shown.

To reproduce.
- Send an email (with line breaks/paragraphs) that will be recorded as an activity (https://civicrm.org/blog/dahndy/leveraging-civicrm-email-to-activity-processing-in-gmail details how to with gmail)
- View the associated activity on the associated contact (search for the email you send the email from)
- Note that the email has line breaks/paragraphs removed.
- Assign the email activity to a case
- View the case - scroll down to the activites tab - view
- The same content will be displayed with line breaks.

My understanding is that the contact record Activity View uses the following to display the body of the email:
{$values.details|crmStripAlternatives|nl2br}
civicrm-core/templates/CRM/Activity/Form/ActivityView.tpl:138

Where as the CiviCase Activity view is using:
{$form.details.html}
civicrm-core/templates/CRM/Case/Form/Activity.tpl
:64

In the database the detail field for inbound email the record is stored as two ALTERNATIVE ITEM's the first as plain text with line breaks, the second with the full html of the inbound email.

This bug has been fixed in RC 4.7.31 -> https://github.com/civicrm/civicrm-core/pull/11661


Migration error: “The user specified as a definer does not exist” I recently moved the site to a new server and changed from a remote to a local MySQL server with different credentials. Most things seem to be working fine, but even though I've flushed caches, editing phone numbers leads to an AJAX "Network Error" message and the following in my logs:

$Fatal Error Details = Array (
  [callback] => Array (
    [0] => CRM_Core_Error
    [1] => handle )
  [code] => -1
  [message] => DB Error: unknown error
  [mode] => 16
  [debug_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id )
    VALUES ( 200025 , 2 , 1 , 0 , '6464646464' , NULL , 1 )
    [nativecode=1449 ** The user specified as a definer ('OLDUSER'@'%') does not exist]
  [type] => DB_Error
  [user_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id )
    VALUES ( 200025 , 2 , 1 , 0 , '6464646464' , NULL , 1 )
    [nativecode=1449 ** The user specified as a definer ('OLDUSER'@'%') does not exist]
  [to_string] => [db_error: message="DB Error: unknown error"
    code=-1
    mode=callback
    callback=CRM_Core_Error::handle prefix=""
    info="INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 200025 , 2 , 1 , 0 , '6464646464' , NULL , 1 ) [nativecode=1449 ** The user specified as a definer ('OLDUSER'@'%') does not exist]"]
)

OLDUSER is nowhere in my configs and I have run both drush cc all and drush cvapi system.flush. Any ideas?

Xavier, your answer would have worked if I had had the luxury of re-importing.
It turns out that there is a single function in the CiviCRM DB that for some reason uses a hard-coded username and password. I went in to the DB, located the "civicrm_strip_non_numeric" function and updated the username and password. Problem solved.


Mosaico returns 403 error due to data-bind attribute in template html We get a 403 error by Wordfence Security on a wordpress site while creating a Mailing using Mosaico.
On little investigation - I see the error is due to the addition of data-bind attribute in the HTML. For eg. if the template html is -

  Don't want to receive any more email from us?

  Simply

    unsubscribe
   from our list.

The error in the console pops up not letting the template to be saved.

403 Forbidden
A potentially unsafe operation has been detected in your request to this site, and has been blocked by Wordfence.

If I remove the data-bind attribute from the anchor tag - the mailing is saved without any errors.
Also, if the Wordfence plugin is disabled - the 403 error is not shown - but this might not be the solution.
Any thoughts on why this error might be arising and ways to fix it?

Wordfence uses knockout.js for data binding. I see Mosaico adds data-bind attribute to the HTML input which is considered prone to XSS attack by knockout and 403 error is shown by wordfence.

I've disabled XSS in the Wordfence setting and the mailing is working correctly for now. Happy to look for answer if there is a way to avoid XSS attack in mosaico template builder?


CRM_Utils_Array::value how to set value to a hook_buildForm? There is a  https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_buildForm manual page, but not sure I've got it right.

Say, there is a value in a custom function, which should be set as default in a form, built using  hook_buildForm (where form itself opens in a modal frame and outside civicrm/ path).

I've a suspicions CRM_Utils_Array::value might be used to set a custom variable somewhere (anywhere) and get it later on wherever it  might be needed;

Have an attempt to set value outside of hook_buildForm like this:

$myVeryOwnPid = CRM_Utils_Array::value('myveryownpid', $contact['contact_id_b'], $contact['contact_id_b']);

and get it from inside hook_buildForm:

  $myVeryOwnPid = CRM_Utils_Array::value('myveryownpid', $_GET, '0');

..but, of course, nothing works, just because I clearly don't understand, how it should work. As they say, CRM_Utils_Array is the most often used feature in CiviCRM, but digging inside a source code Ive realized there is no forest for the trees (at least, for me). Any advice, please!

Found  an answer here https://wiki.civicrm.org/confluence/display/CRMDOC/Update+custom+fields+in+contributions+and+events+by+passing+variables+in+a+URL

Nothing to do with  CRM_Utils_Array though; just plain simple passing vars via an URL.


Can I track single emails with CiviCampaign? I understand that I can associate mass mailings with campaigns through CiviCampaign. However, it seems that I cannot associate a single contact interaction via email to a campaign. Is that correct?

Scenario: Our NGO regularly has to stay in contact with individuals, e.g. journalists, to promote our individual projects for time periods of usually 6 months. Therefore, we separate these into Campaigns. But as it looks, I cannot associate an individual contact interaction with such an individual campaign/project, right?

Thanks for your help,
Bijan

You're correct; the email UI (user interface) doesn't allow you to specify a campaign. However, the underlying database table is civicrm_activity, which DOES support storing an associated campaign.

You could write an extension (or hire someone to write an extension) that adds this functionality to CiviCRM, and because the underlying table supports what you're doing, it's relatively little work.


External Profile Support I am receiving a warning when I enter CiviCRM which seems to indicate that I have something called "external profile support" set.  Where do I find this option enabled?   I have looked but cannot find it.  I would appreciate an emailed answer if that is possible.

It's in Administer menu » System Settings » Misc, and it's labeled "Accept profile submissions from external sites".

That's a little obtuse, but most system warnings have a link on the System Status page, at Administer menu » Administration Console » System Status.  See screenshot:


Batch update participants by profile - show more than 9 fields I'd be grateful if anyone knows the answer to this:

I need to make a variety of batch update profiles that allow me to edit details of up to 40 custom participant fields on one screen. The batch update by profile is perfect for this.

However, while I can make these profiles exactly as I want them, when I use them for 'Batch update participants by profile' only the first 9 fields are shown on the batch update screen. I've tried this with a variety of different profiles, with different custom fields from different custom field sets and get the same result - only the first 9 fields show. This is also the case regardless of whether I am showing 4 or 22 rows. (My 2 test scenarios).

Is there a way to change this from 9 to 40 columns?

I'm on Civi 4.6.12, Drupal 7.43. We've long ago changed our php input variable limit to 4000 because we have many many blocks in our site, so it can't be this...

Thanks!

Try increase $_maxFields in:
CRM/Event/Form/Task/Batch.php

  /**    * Maximum profile fields that will be displayed.    */
  protected $_maxFields = 9;

This would be a core hack though! To do this properly -> copy Batch.php -> into a custom_php directory.


How to identify case activities in find activities or advanced search In Activity Detail Reports I can set a filter to include or exclude case activities.

Is there a way of filtering activity searches in a similar fashion?

The custom search called Activity Search shouldn't be too hard to update. (See Find - Custom Searches - Activity Search. The file is CRM/Contact/Form/Search/Custom/ActivitySearch.php.) It already includes some partial case-awareness.

In fact, if you run it and then select all records, and then from the actions dropdown choose export contacts (yes, contacts), it will then export the activity records and there'll be an unnamed column that has the case id. There's 3 unnamed columns - the last one is case id, and it's blank if it's not a case activity.


How to record a webform submission ID in a CiviCRM field? I'm using a webform to collect applications for an accreditation scheme. Usefully the webform submissions each have a unique submission ID that I can include in the webform-driven email notifications that get sent. And using webform-civicrm integration I can collect the data from the webform submission into CiviCRM for ongoing workflow.

What I want to do is to record the webform submission ID into a custom field in CiviCRM at the same time, so that I can then use it in further email notifications to the people involved. But the [submission] tokens are not available for form components - because the form isn't yet submitted so the values aren't available.

Any way to do this? Or alternatively create a unique ID number in CiviCRM, and then maybe use CiviRules to generate all of the emails?

It seems like such a trivial thing to have a unique reference number, but in Civi the only thing I can see that's useful is a Case ID number and I'd really rather not have to use cases for what is otherwise a very simple process.

there is an extension that allows you to create a CiviRule with trigger webform is submitted: https://github.com/CiviCooP/org.civicoop.civiruleswebform. That might help you, although you probably then still have to create a little CiviRule action that stores the submission ID in the CiviCRM custom field.

Drop me a mail if you want to take this further?


Drupal's Aggregate Javascript breaks CKEditor Config With Aggregate Javascript turned on under Administration » Configuration » Development » Performance, Civi's Configure CKEditor page doesn't display the editor's container or configurator.

Drupal 7.41/Civi 4.7

You're right, that was a bug. I poked around and found a spot for the js that doesn't break under aggregation:

https://github.com/civicrm/civicrm-core/pull/7711


Error returned on newsletter sign-up via profiles in Wordpress we are collecting email addresses for our newsletter via a profile sign-up on our website, where it is embedded as an iframe (no way around this).

This has worked fine until some recent update either from civi or Wordpress, which I cannot say for sure. However, addresses are still recorded but after submission, this is error message is returned:
"Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
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."

I have played around with the paths while trying to fix the issue but had no success. I made the following findings:

It used to work before in the same setting.
If the e-mail address already exist, there is an message stated saying that it is a duplicate and the abovementioned error doesnt show.
It works correctly if i am a signed-in in the Wordpress backend while signing up.

Our event registration works fine with the same setup.

Do you have any ideas or suggestions how to fix this?

Thank you in advance!
Dennis

Since this works when you are logged into WordPress it looks like it might be a permissions issue. Is the redirect after submission set in the profile advanced settings? You may want to check the page being redirected to to make sure anonymous users have access to it. Also check the permissions for anonymous users under 'Administer>Users and Permissions>Permissions (access control)' click on WordPress Access Control. Particularly the permissions around profiles.

What version of  WordPress & CiviCRM are you running? Since it was working OK prior to recent updates when was your last CiviCRM update?

Hope this helps.


Event Registration Form - Page Automatically Refreshing On our event registration form, where a user can register someone other than themselves.  When they select 'Yes' to register someone else, a field appears where they can search for the person they want to register.  However, once 'Yes; is selected, the page automatically refreshes in about 3 seconds.  After the page refreshes, the form goes back to the original view as if the user just opened the registration form.

This is the only field that is causing the page to refresh.

Any thoughts on why the page is automatically refreshing and how to correct it?

EDIT: We are using Civicrm 4.2.6 with Drupal 7.34

@stechsla,

Mate, that‘s a really old version of CiviCRM. There are literally hundreds of bugs on that that were fixed years ago. Definitely time you upgraded to 4.4 (there‘s a case to be made to get you all the way to 4.6!) - in my view there‘s little point in attempting to address this issue as an upgrade would likely fix this, a raft of other problems, and give you vital security upgrades, not to mention cracking new features, a faster system, and a slicker interface.

If you‘re interested in having your system upgraded then your sysadmin should be able to help you. If you would rather someone else do it, please contact myself (john@civifirst.com - proud presenter of a presentation called "upgrading your upgrade") or a CiviCRM partner agency, details of which are available on civicrm.org.


civiDiscount 3.5 and civiCRM 5.4.0 After upgrading to civiCRM 5.4.0, I cannot access latest version of civiDiscount via the civiCRM menu.

I see the option under Administer and Contributions, but when I click civiDiscount, I am returned to the civi Dashboard, instead of seeing the civiCRM interface.

There's no error logged by civiCRM.

I'm also running Joomla 3.8.11

Can you try to clean CiviCRM cache and do a menu rebuild?  You can do this by navigating to CiviCRM >> Administer >> System Settings >> Cleanup Caches and Update paths. Once you on the page click on Cleanup cache button.

HTH

Pradeep


Illegal characters in email signature field For some reason we sometimes get an error when trying to save contact information after editing. An error pop-up appears with Illegal characters in input (potential scripting attack) when trying to save. It turns out that this can be solved by deleting the contents of the Email signature field (even though there are no visible contents). So I assume that there must be some invisible character in this field, but how did it get there (we never use this field)? And how can I suppress the signature field, so that this problem doesn't happen again? Thanks.

Edit: Civi 4.7.3 (but also happened in earlier versions). Joomla 3.4.8. MySQL 5.5.47 PHP 5.6.18 Centos 6.6.

I think that you have a browser plugin installed which is interfering with CiviCRM.

For example, this page suggests that it may be a Firefox addon called "YouTube Auto HD".

Troubleshooting

For troubleshooting purposes, I'd suggest trying each of these to gain more info:

Try with a different web browser (i.e. Chrome vs Firefox).
Try the same browser, but with all extensions/plugins/addons disabled.
Try clearing your browser cache.

Diagnosing

Hopefully the above steps allow you to learn more about the root cause of the problem. So if disabling all your browser plugins did the trick then you could try disabling them one-by-one to find the culprit.

Fixing

Then if you do find that one plugin is giving you trouble with CiviCRM and keeping that plugin installed is important, then I'd suggest either:

contacting the plugin author to complain about its behavior
finding a suitable replacement plugin that doesn't have the problem

In theory you could submit a bug report to CiviCRM, but given the behavior you've described, I think it's unlikely that we'd be able to easily change CiviCRM to make it compatible with a browser plugin like this.


Replace Webform Date Select Dropdowns with Textfield I am using a webform to edit cases in CiviCRM. I have a date field which I want to display, but keep disabled (the case start date). I want to replace the three select fields (day, month and year) with a single text field.

The three select fields cannot be disabled and I do not want users to be able to change the date, but only to view it. It would also look a lot neater if it was just a single field.

I tried the solution given here, which uses a template suggestion to overide the webform template, but this doesn't work for integrated CiviCRM (date) fields.

The solution referred to above was to create a template called webform-calendar.tpl.php with the following code:

<?php
 $idKey = str_replace('_', '-', $component['form_key']);
?>
<input type="text" id="edit-submitted-<?php print $idKey ?>" class="form-text <?php print implode(' ', $calendar_classes); ?>" alt="<?php print t('Open popup calendar'); ?>" title="<?php print t('Open popup calendar'); ?>" />

And also adding the following css:

.webform-container-inline.webform-datepicker  div.form-item.form-type-select {
    display: none;
}

This would then get triggered for the webform date field. But this template does not get triggered for the CiviCRM date field.

Can anyone suggest how I can either adpat this method or use a different way to replace the select fields with a single text field for the date, or at least disable the select fields?

Following my comment, you can edit the case start date component and change the widget to be a textfield. I was also able to disable the field on my webform.

As you have a disabled text field, not sure what you mean by changing the date format. If it needs to be done in civi, you can navigate to Administer -> Customize Data and Screens -> Date Formats.


"DB Error: Syntax error" - after using false "find and merge duplicate" rule I've tested the following steps on the CiviCRM Demo...

...I've mistakenly filled in no fields and that's the message I've got, after I've used the rule.

So, if I cannot delete or edit the rule, how can I solve the problem??
After this, I'm not able to add a new inidividual...

Help, please!

Since you marked it as Reserved you cannot modify or delete it.  (It can be gotten rid of by directly modifying the database, but I think that is the only way.)

Your best bet is to ignore it, and create a new rule that you can use.  Just don't mark it as Reserved until you are sure that it is defined as you wish.

Note that you can edit the name and usage type, so you could rename it "DO NOT USE" and make it a General rule.


CiviCRM REST API Call I'm new to CiviCRM and REST API Calls. I'm attempting to create a new contact using POST via Postman. I'm submitting the following:

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

But I get the response back:

    Warning:  Invalid argument supplied for foreach() in
/wp-content/plugins/civicrm/civicrm/CRM/Utils/REST.php on line
167

<?xml version="1.0"?>
<ResultSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
      </ResultSet>

I glanced at line 167 - it seems to be about constructing the response. I know I'm getting some kind of connection - If I change a character in the site or API key, I get "failed to authenticate" - so that part seems to be working.

CiviCRM version 4.7.27, Wordpress version 4.9.1

Thanks for any pointers!

As kainuk mentioned, you don't have the right syntax for the json field, i needs to be json= instead of json:

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

(it needs to be post, not get for all operations like create that modify the database)

and I would strongly recommend you to do rest over an encrypted connection (https instead of http), otherwise you risk having your keys being read by someone else than civi

X+


Actions > Create User Record: created a new user account no email has been sent, why? We'd like to automate user account workflow a bit and send a standard Drupal Welcome email each time new User Record created from within a Contact Action drop down in CiviCRM.

Currently we've got only "created a new user account for USERNAME,  no email has been sent" message.

It seems pretty logical to send emails at each new Drupal Account creation "by default", especially if all corresponded check boxes at /admin/config/people/accounts are checked.

What are we missing? Any clue, please!

Drupal 7.50, CiviCRM 4.6.20

I don't believe any work has been done to enable this so a patch to core would be required.

The workaround we have often used is described in this blog - basically it uses a civi tag, that triggers a drupal rule, which then uses drupal default processes for creating a drupal user and hence sends out the email etc.

We developed that approach for different scenarios and is probably overkill but it works so we use it ;-)


How do I hide a div tag for a specific event or contribution page? I would like to hide a specific div tag for a specific event or contribution page ID. I am not good with JS. So prefer CSS display:none; method. Any help would be appreciated. Thanks

I was doing this the other day.  Have a look for the contribution page id div which wraps the form.
The following hides a section in the contribution page with id=2, but no other contribution pages...

div.crm-contribution-page-id-2 div.editrow_custom_8-section {
display: none;
}


Membership sets to Cancelled when Contribution Fails. Why? I have a situation where the Contributions are being set to Cancelled when the user contribution fails (payment processor fails the transaction). So, the user is blocked to try a new contribution until an administrator excludes that Membership with Cancelled status.

I took a look at documentation and understood that Membership Cancelled status would only be set manually, so I can't figure out why this situation is happening. I assured that "Override status" is not checked in the Membership edit panel, so it looks like something in the system is setting the Membership to Cancelled status. I wonder why and I need to fix it. Any clues?

Ps: The Payment processor IPN could be doing this?

PS2: I'm using Joomla! and the Payment Processor is PagSeguro.

This is the expected behavior in CiviCRM, when you have a Contribution related to a Membership, and you set its Contribution status as Cancelled (manually or automatically through a ipn payment processor) it will cancel the Membership too.
You can take a look to source code (4.6.x) where this is happening

https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Contribute/BAO/Contribution.php#L1512

You can patch civicrm core to avoid Membership to be Cancelled when Contribution around this line:

https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Contribute/BAO/Contribution.php#L1484

if (!$baseIPN->validateData($input, $ids, $objects, FALSE)) {
  CRM_Core_Error::fatal();
}

// ## Patch Begin ## Fix to not update membership status when updating contribution status
$memberships   = array(); //&$objects['membership'];
// ## Patch End ##
$participant   = &$objects['participant'];
$pledgePayment = &$objects['pledge_payment'];

There is a forum thread discussing this:

http://forum.civicrm.org/index.php/topic,34082.msg154608.html#msg154608


Can I have more than 4 Vacancies appear on the Dashboard in CiviHR? Using CiviHR, can I set the Vacancy Dashboard to show more than 4 Open Vacancies?

Not currently. I peeked into CRM_HRRecruitment_BAO_HRVacancy:getVacanciesByStatus(). It's hard-coded to return the four most recently created vacancies.


What can be done to ensure Stripe and CiviCRM are ready for SCA in Sept 2019 There is a comment at https://lab.civicrm.org/dev/financial/issues/41#note_14585 saying an MIH will be needed to ensure Stripe+CiviCRM is ready for this.

In Stripe Dashboard is shows

assuming via API was right option you get

and assuming i opted for right choice the next screen shows

and if i add recurring i get

There is a Stripe Make it Happen campaign here.

  Upgrade to Stripe Elements which simplifies PCI compliance for end-users and allows us to take advantage of the latest developments with Stripe - https://stripe.com/gb/payments/elements
  Support for SCA Payments - required in Europe for ALL credit card payments from September 2019. To be implemented by migrating to the "PaymentIntents" API: https://stripe.com/docs/payments/payment-intents
  Support for processing refunds from within CiviCRM.
  Support additional payment methods payment methods (eg. SEPA, iDEAL, Google Pay) - once we have switched to Stripe Elements we can implement these easily. If you wish to fund a particular payment method just let us know when you offer funding.


Where are CiviCRM's date preferences actually used? Under Administer > Customize Data and Screens > Date Preferences, CiviCRM offers a number of date classes for which an administrator can specify date formats. activityDate is described as "Date for activities including contributions: receive, receipt, cancel. membership: join, start, renew. case: start, end." activityDateTime is described as "Date and time for activity: scheduled. participant: registered."

Where are these settings actually used? I changed the date format for both of these, cleared CiviCRM's caches, and headed over to the contact summary, expecting to see the new date formats on the Activities and Contributions tabs. Instead, I found no change at all.

There are actually (at least) two places where you can change the formats. One is where you described, the other one (that affects most of the displayed date formats e.g. in the contact tab) is available at >>Administer >>Localization >>Date formats.

Below is a screenshot of settings we usually use for German language environments.


New account creation during profile sign-up not creating Backdrop (Drupal 7) Account [SOLVED] I am using the latest CiviCRM 5.18.4 and Backdrop 1.15.x-dev all up to date.

I am new to CiviCRM, but have used Drupal 6,7 and 8 over the years.
I have been following the excellent documentation, I am sure I have done everything correctly to create a Contribution Page with a profile to allow a visitor to create a CiviCRM Account in the 'host' Group I have created, because when I add a user he/she appears with all the correct data from the profile and in the correct Group, but the user is not added as a Backdrop User.

In the Profile I have 'Drupal User Registration' and 'View/Edit Drupal User Account' checked, so it should work.
I have looked all over this forum, and searched extensively on the internet, but cannot find an answer.

I have enabled debugging but there are no errors in the CiviCRM or Backdrop logs.
I can add a new user as a visitor in Backdrop, I have tested that. Works fine.

Any help much appreciated.
Is it something to do with the Backdrop Permissions? IF so what should those be?

I found out by accident, or trial and error really, that if I select a Price Set in the 'Contribution Page' -> 'Membership Tab' then the new user is not created, but If I do NOT select a 'Price Set' and just the 'Membership Type', then the Backdrop User is created.
Now to get that to assign the correct Role is the next task.


`json` parameter in the request API The parameters in the API are confusing, especially the depth + the json paramter.

I have seen these three combinations and my question is, which variant is wrong and which is not.

I can't figure out from the results what exactly is going on as most of my queries don't yet return what I'm expecting, so I want to get this clear first. I think Civi has some kind of fallback magic as in some requests I get undefined_fields but it returns correct results.

Entity related stuff goes into the root level, as seen in different (inofficial) files:

{
  'api_key': '...',
  'activity.id': 123,
  'json': {
    'options': {
      'limit': 1
    }
  }
}

The API Explorer suggest entity/attribute related stuff goes inside the json parameter:

{
  'api_key': '...',
  'json': {
    'activity.id': 123,
    'options': {
      'limit': 1
    }
  }
}

Variant without nesting and json beeing integer as seen on https://docs.civicrm.org/dev/en/latest/api/usage/ :

{
  'api_key': '...',
  'activity.id': 123,
  'limit': 1
  'json': 1
}

P.S I'm accessing the REST API via HTTP calls to /sites/all/modules/civicrm/extern/rest.php.

The last one look OK to me, the JSON parameter AFAIK is there just so I get the results in JSON format rather than XML format.

But are you doing your api call with the REST, in Javascript or in PHP? And did you check the API chapter in the Developer Guide? It can be found here: https://docs.civicrm.org/dev/en/latest/api/


email links not working - date.timezone function I have used my CiviCRM email for many years. Today I had the following error message when I sent an email with links in it clicking through to an event on an external site. I have resolved the problem temporarily by not tracking click-throughs, but what could be causing this?

  It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

I second Jon G's answer with this reference -- Jon actually helped on a similar issue I had.  The issue was indeed that the php.ini did not specify the time zone.  The answer on this question fixed it for me: https://civicrm.stackexchange.com/a/3589/105


CIVICRM mailing links not working properly in schedule job When a TEST mailing is sent with tracking link clicks enabled, then the URL DOES NOT include "public_html/"; however, when the mailing is scheduled and sent with tracking link clicks, then "public_html/" is INSERTED into URL.

Wordpress Version --> 4.9.2
CIVICRM Version --> 4.7.27

We are having this problem as well, also in WordPress 4.9.2. We have discovered that the issue arises because permissions get corrupted. According to SiteGround, our host, these permissions in particular are problematic:

./wp-content/uploads/civicrm/templates_c/en_US/%%31/313
./wp-content/uploads/civicrm/templates_c/en_US/%%D6/D67

We don't know what is causing permissions to break in the first place. For example, yesterday, we sent out three emails with trackable links within 1 hour. The first two worked perfectly. The last one didn't work - 'public_html' inserted into all the links.

Our solution has been to create a cron job in cPanel to reset permissions every 5 minutes.


Updating to civi 4.6 after this can't create new emails no text editor After upgrading I can't create new emails. Also the menu bar is not showing right. Please look at my screen shots. step 1 and step2. Maybe a problem with javasript?

Help is urgently needed since we can't use the email function. *Moderator: Please don't put me on hold again.

Thanks

Found a solution: The problems is K2. k2.php was not correct coded.

See plugins/system/k2.php - specifically this code section:

if (JString::strpos($response, 'prefix="og: http://ogp.me/ns#"') === false)
                    {
                            $searches[] = '';
                            $replacements[] = 'http://ogp.me/ns#" ';
                            $replacements[] = 'http://ogp.me/ns#">';
                    }

Change this to:

$app =& JFactory::getApplication();
            if ($app->isSite()){

                if (JString::strpos($response, 'prefix="og: http://ogp.me/ns#"') === false)
                {
                        $searches[] = '<html ';
                                $searches[] = '<html>';
                        $replacements[] = '<html prefix="og: http://ogp.me/ns#" ';
                        $replacements[] = '<html prefix="og: http://ogp.me/ns#">';
                }
        }

Thanks to "plethoradesign"

Now the editor appears but somehow all drop down box options are not clickable meaning you can't select a group nor templates and also you can't jump to the next step. Help is still needed. Best P


Get Temporary Files Directory value from my extension In my extension I need to write a temporary .csv file but (it's my first extension) I'm not able to get the configured "Temporary Files Directory" value.
How can I do it?
Thanks

Marcello

You can get any settings values from the API and, you can see how, exploring the API through http://yoursite.site/civicrm/api URL.

To answer your question you can follow this screenshot:


Declaring multiple maintainers for an extension? Can I declare more than one author/maintainer in an extension's info.xml file? Maintenance of one of our public extensions fell to me a while ago as the other dev who wrote it left, but I don't want to remove his name.

The real answer is no :-(

I just recently added two names between the author tags in the info.xml for a new extension - looks ok on Github!

Not sure if the CiviCRM automated listing will choke on it...


Add non-Primary email address to Group I have contacts with multiple email addresses. I want to assign non-Primary to specific Groups, ie, Billing different than Main (Primary).

Also, when using simple or Advanced Search, it doesn't find any other email address other than Primary for that contact.

Finally, using Full-Text or Search Builder, the former finds the Contact record but offers no additional functions while the latter finds the correct email address but will not allow it to be added to the group and defaults to the Primary tagged email address.

In CiviCRM you cannot assign email-adresses to groups but only contacts, including all their related information such as email-adresses.

Could you specify, what you want to do with the contacts in question (e.g. sending an email to a specific address, create a pdf-letter...)? Maybe there is another solution for your task at hand.

I think the non-primary email-addresses are not found by simple or advanced search due to performance reasons - there is an older threat here:

http://forum.civicrm.org/index.php/topic,16221.msg115088/topicseen.html#msg115088


If contact has multiple cases, how do I filter a view to show only case roles associated to that case type We have contacts that may have multiple cases, each with a case coordinator.

I have created a view for each case type that shows the associated case coordinator along with last activity date, links to add activities, etc.

Everything works great except if a contact has multiple cases, the case coordinator from a different case type may be listed instead of this particular case type's case coordinator.

I have a case type filter set to the specific type, but that doesn't seem to be enough.

Here are the relationships:

Here are the filters:

Thanks for the hint ErikH, you led me down the correct path.  We are trying to avoid coding and prefer to just manipulate the views as much as possible.

The view I was working on was a CiviCRM Case view.

I rebuilt it as a CiviCRM Relationship view and added these relationships:

After that, the Case Coordinators were listed correctly and I was able to add all other pertinent fields to the view.

The fields I displayed were:

Client Name (links to another view of client information)

Case Type

Case Coordinator

Case Status

Case Opened Date

Last Activity Date (turned on aggregation for the view and set only this field to Maximum)

View Case Activities (links to another view of activities filtered by contact id)

Add New Activity (links to a webform for that case type)


Adding individuals' event attendance as activity for employer? Is it possible to set up Civi so that when an individual attends an event, it also shows up as an activity for their employer?

I'd like to be able to get an overview of how many people from an organisation attended (or spoke at) events alongside the other meetings, phonecalls, etc attached to that organisation's Activities.

Or would I have to create a custom report for this?

There are a couple of ways to do this:

When creating an activity, add the Organization as a related contact.
Create an extension to automate adding the Organization (see below).
Create a custom report (not recommended).

As extensions go, it's pretty easy to write:

use the hook_civicrm_pre to hook created activities.
Use an API call to look up the contact.  Is the contact_type equal to Individual? Is the employer_id not null?
If so, add the employer as a related contact.

You'll have to consider edge cases: What happens if someone leaves an organization - does their attendance still count?  If someone joins an organization after the activity, does that count?  A custom report limits your ability to handle edge cases any way other than a "default" way, which is why it's not usually recommended.


How to position a custom top level menu before/after some menu? While this documentation tells how to add a custom top level menu, it adds to the last. Say, I want to add a new custom menu "My Menu" and position it right before "Administer" menu. How would I do this?

Pretty sure you need to GET weight of the "Administer" menu and then based on that you can SET the weight for "My Menu" - in the civicrm_navigation table. like in Drupal I think you'll be ok having two items with the same weight - no need to renumbering them all!


How to change the date on an exported batch I have exported a batch but the date in the title is not correct, so I need to change the date on the name of the batch, however I cannot seem to re-open the batch. Please can you help.
Thanks in advance,
Grace

A financial batch once exported cannot be reopened through UI. But you can reopen/update a batch using a api.

If you want to change only title of the batch than i would recommend you to change the batch only title using api rather reopening the whole batch.


Is CiviCRM available with German admin interface? Looking at using CiviCRM in an office based in Germany with German-speaking staff. Is there a localised version available, e.g. admin interface in German?

Yes there is, for more information about downloading translations please see: https://civicrm.org/download-translations

The installation instructions for localized versions vary depending on the CMS you will be using. But full information can be found here: https://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades


Civi CRM Sparkpost - pesc.sparkpost - Error Sending Group Subscription Welcome Emails So, I'm using the com.pesc.sparkpost CiviCRM/Sparkpost integration extension.  It is working really well so far for just about everything except for the welcome email for mailing list group subscriptions.  I've tried through a drupal webform and through a Civi profile (using checkmark boxes for public subscriber groups).  In both cases, the double-opt-in email gets sent properly, and the link in the double-opt-in email works properly.  Upon clicking the link I am sent to a confirmation page with an error message (bellow), but the welcome email is never sent, and the transactional email is shown as pending on the user's profile in Civi.

So, Transactional emails and Mass mail are definitely being sent fine through Sparkpost, and the subscription mechanism is working as intended.  So I'm pretty sure that my sparkpost smtp settings are working as intended, contrary to the error message.  So far it seems to be just these welcome emails that aren't sending properly.

  An error occurred when CiviCRM attempted to send an email (via SMTP). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt.

  The mail library returned the following error message:
  Failed to send data [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 550, response: 5.7.1 Unconfigured Sending Domain )]

  This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » System Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are:

  Your SMTP Username or Password are incorrect.
  Your SMTP Server (machine) name is incorrect.
  You need to use a Port other than the default port 25 in your environment.
  Your SMTP server is just not responding right now (it is down for some reason).
  The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.

  (i) Name (email@example.com) has been successfully subscribed to the mailing list.

Put

define('CIVICRM_MAIL_LOG', '/whereever/you/want/the/log');

in civicrm.settings.php and this will log what it's trying to send. If the from address appears incorrect then whatever it is appearing as might lead you to the problem.


Is there a Gift Aid (UK) extension compatible with 4.6+? There are several GiftAid extensions (ones I've found linked to below) for CiviCRM but I am having difficulty finding any that claim support for version 4.6+ and posts on many of them seem to be a few years out of date.

Is anybody using a Gift Aid extension they can recommend?

The two I've found are:
http://www.compucorp.co.uk/blog/civicrm-gift-aid-instructions-v43
https://civicrm.org/blogs/rajesh/civigiftaid-extension

Thanks in advance for any suggestions anyone can provide!

Big thanks for supporting GiftAid extension!

The Civi4.6 branch has been actively worked on in the past few months. A few improvements and new features have been added into the extension. Although the new version is still under testings, we decide to establish an alpha3 release from the latest changes so we can share the results with the community and we can help to push the progress further forward.

Latest changes:

CiviCRM 4.6.x compatibility has been implemented
Added line item support for contributions include more than one item
GiftAid Report improvement

The new pre-release can be downloaded here:
https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/releases/tag/v3.0beta

You can also follow our Github repository for the latest update.

Moreover, we have recently implemented GiftAid Webform Integration module for Drupal as well. We will open a Drupal project page for this soon. It can be found here:
https://github.com/compucorp/giftaid_webform_integration

Look forward to hearing feedback from you.


Change Joomla User Group After Registration I created custom profiles and have registration forms for these profiles. What I want to do is to assign people after registration to a specific Joomla user group.

For example:

If a visitor register on A profile, I want to assign him/her to Joomla's A user group.
If a visitor register on B profile I want to assign him/her to Joomla's B user group.

Is this possible?
Thanks.

Yes, you can do it by way of CiviCRM groups.  Two parts:

Create a CiviCRM group for each profile. Go into the advanced settings for each profile and select the corresponding group to have all contacts filling the profile automatically added to the group.
Install the CiviCRM Group Sync extension in Joomla. Configure it to sync up the appropriate CiviCRM groups to Joomla.

An added benefit is that you'll be able to filter by the groups within CiviCRM.


how do I make the FROM box on a bulk email show the same list as a single email? I toggled the yes/no box "Allow mail from logged in contact" to yes, but it doesn't affect the "new mailing" screen which is really the most important one for me. Can I change this somehow? Is there another yes/no somewhere? If not can I put in a feature request for it?

I guess the "Allow mail from logged in contact" option is for sending Email Activity or Contribution receipt but not bulk emails. Might be because if the bulk emails are not send using site domain address than it end ups in users spam box.

Its a good idea to raise for a feature request on https://lab.civicrm.org/ or you can implement an extension to include logged in users id.


how to get an autoincrementing membership id with existing membership numbers I've imported our membership list with existing membership numbers into CiviCRM.

The old membership numbers are currently under external ID.  I'd like an autoincrementing membership number.

The best solution I have found from digging around various threads and forums is to do the following in order to use the contact id as the membership:

Modify the database schema constraints to allow updating the contact id and to propagate those changes to all tables
execute a script that would update the contact id to be the same as the member external id

I might be able to figure out the second part given enough time, but the first bit for sure is a bit beyond my SQL skills.  Is anybody able to assist?  Or there a better solution available to what I imagine is a common requirement?

I would use the Contact Identity Extension and add a custom ID type for your membership number (https://github.com/systopia/de.systopia.identitytracker).

Fiddling around with contact ID's in the database could cause strange behaviour of your system because you have to check a lot of tables and changes something goes wrong are quite high.


Contribute Page with a Profile in Edit Mode - Not Create Mode? using wordpress/CiviCRM 4.7.

I have a contribution page with a profile attached (under the profiles tab for the contribution admin page).  The profile contains custom fields that can have multiple entries.  When a user goes to this page, it is populating the contents with existing data from that user - I want to present an empty form for this.
Any ideas how to do this?

You can do this by adding &cid=0 to the end of the donation page URL.  E.g. if your page URL is:
http://example.com/civicrm/contribute/transact?reset=1&id=1

Instead use:
http://example.com/civicrm/contribute/transact?reset=1&id=1&cid=0


recent CRON error on WP - after upgrade to 5.6.x Recently updated to 5.6.1 (skipped a couple of the 5.x versions but the rest of the upgrade seems to have been successful). Running WP 4.9.8 / php 7.1.5

After the update I started getting 'Cron not running' errors in Civi. I can force scheduled tasks from Admin - System Settings - Scheduled jobs, but the cron I've had running for (at least) a year has stopped.

From ssh I run the same cron command:

  /usr/bin/php-5.4-cli /var/sites/h/hbb.org.uk/wp-cli.phar --user=XXX --url=https://hbb.org.uk --path=/var/sites/h/hbb.org.uk/public_html/ civicrm api job.execute auth=0

and get the error below:

  Parse error: syntax error, unexpected '$this' (T_VARIABLE) in /var/sites/h/hbb.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php
  on line 1121

It doesn't look like something wrong with my cron but with DAO.php (which I admit I have no idea what it is)? Am I passing too many arguments / not enough? Doesn't look like that kind of error.

Did something change in the last upgrade or two? The docs still suggest the cron formatting I have.

Thanks in advance.

Based on https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-version php 5.4 is not supported in the latest 5.x version.  As 5.4 is a very old vrsion of php, any chance you or your host can get you to php 7.1?


condition on count from chained api call I am trying to use the api to get all contacts without an address with locationtype billing. For this I use the contact get api, and do a chained address get call. Is there a way to put a condition on the number of results from the chained call?

This is a non-working example of what I am trying to do.

$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'api.Address.get' => array('location_type_id' => "billing"),
  'api.Contact.get.count' => 0,
));

I don't think that is possible. The chained API works to extend the data on the contacts found.

Could you explain a little more on why and what you want to achieve functional?


Webform (Contact Create API) doesn't set Communication Style I have a webform set up as a Contact page that creates a civi contact and activity and assigns it. I have a scheduled reminder send out a "Thanks for contacting us...we'll get back to you asap..." email after the activity is created. There's an issue where Webform doesn't allow the Communication Format to be set and we use that in how we format our Email Greeting. We have Formal communication preference set as default option in Civi but when Webform creates the contact for some reason that default doesn't get set and so when the contact record is viewed there's no communication format at all.

What are the options to fix this? Can Webform be updated to be able to set the communication format?

If Communication Style is set to Formal -> is_default on:

civicrm/admin/options/communication_style?reset=1

Then that's what shows in the Contact record (see below); Are you saying that webform_civicrm removes this default for existing contacts; or that new contacts have their is_default set wrong?

Added: I've confirmed that creating a New Contact with the API leaves the Communication Style 'blank'. However one would expect it should be setting it to the default value that is specified in the Administer settings.

So it's an API issue - we could fix this in webform_civicrm - by explicitly passing on a value for Parameter Communication Style - but I think it should be fixed in CiviCRM Core itself.


Webform Error - Expected one PriceSet but found 25 I am using Webform with CiviCRM to enable a family to renew their memberships. On many of the submissions when I click View Contribution I get the following error:

CiviCRM_API3_Exception: "Expected one PriceSet but found 25"

#0 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Form/ContributionView.php(158): civicrm_api3("PriceSet", "getsingle", (Array:2))
#1 /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php(549): CRM_Contribute_Form_ContributionView->preProcess()
#2 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#3 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_ContributionView), "display")
#4 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_ContributionView), "display")
#5 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#6 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(214): CRM_Core_Controller->run()
#7 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(286): CRM_Contribute_Page_Tab->view()
#8 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(310): CRM_Contribute_Page_Tab->run((Array:4), NULL)
#9 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#10 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#11 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#12 [internal function](): civicrm_invoke("contact", "view", "contribution")
#13 /var/www/html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#14 /var/www/html/index.php(21): menu_execute_active_handler()
#15 {main}
Sorry but we are not able to provide this at the moment.
Expected one PriceSet but found 25

  Return to home page.

It does not happen on all submissions and I have not been able to diagnose the cause. Has anyone else experienced this issue?

Webform doesn't use pricesets.  Are you using a normal fully-configured contribution page that has a priceset?  If so, try a simple contribution page as described here: https://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration#WebformCiviCRMIntegration-Acceptingpaymentsthroughawebform


Free event with sessions with max participants We have a free event that has several sessions with a max participant limit of 15.  I've set that up with price sets with $0.00 amounts.  It works fine, but because price sets are designed for paid events, there's a bunch of work to hide the pricing information from the user (css to hide the amounts on the registration, confirmation and thank you pages, modify the confirmation email to hide the payment sections and write a hook so Civi doesn't add the $0 contribution which is added, or tell folks to ignore those $0 contributions and delete them at some point.)

Just wanted to make sure there isn't a better way to do this.  Any suggestions would be welcome.

I assume you're using price sets because you want to allow people to register for multiple sessions on a single event page?  Have you checked out cart-style event registration?  It's not maintained by core, but there seems to be a steady flow of people who ask questions about it, so it seems like it's getting use.

With cart-style event registration, each session is its own event, and you can dispense with price sets.

Finally - you did some amazing work on getting price sets to fit your use case!  If you could publish your work somewhere, that would surely benefit someone.


Error During "Find & Merge Duplicate Contacts" We recently upgraded to 4.7.16 and immediately starting having problems when checking for duplicate records.

I set up a very basic merging test -- same last name and email, I've tried picking a very small group (100 contacts), and I always get the same error.

No matter what Matching Rule or whatever group I create (even if it has a couple contacts), I always get the error.

My technical skills are very limited, so I was just checking to see if anyone else has experienced this.

Thanks!

The problem you are hitting may be the one that I think we recently provided a fix for here: https://github.com/civicrm/civicrm-core/pull/10442


How to get url for custom image field I have currently created a custom field in CiviEvents to upload an image for my event. When viewing the eventinfo page I can see the image in a collapsible field which shows the thumbnail of the image and when I click on the image it enlarges in a popup box.

All I need is the actual custom field url that point to the image so I can theme it correctly on my template.

I've dug deep into the CustomDataView.tpl and come across {$element.field_value} but again this loads the custom field in the collapsible pane.

Any suggestions?

Thanks in advance

For security reasons, CiviCRM does not expose uploaded files directly, but routes them through a php script which checks permissions before fetching the image. If you know the file id and the event id, then you can construct the url yourself:

yoursite.org?q=civicrm/file&reset=1&id=FILE_ID&eid=EVENT_ID


Does iATS payment requires SEPA Direct debit for ACH to work? We are in the UK and would like to process direct debit from Civicrm. I found iATS payment processor can process ACH/DD.  Just wondering is processing UK DD a built in feature of iATS payment? Does it require any other plugins to work? Thanks

We did build UK Direct Debit [with the mandate - the entire workflow] into the iATS Payments Extension but it wasn't used much and we have not actively supported it recently. And SEPA works well and is widely adopted by lots of European CiviCRM Clients. One does not need to be exclusive -> you can processing CC with iATS Payments and use SEPA for DD for the time being.


CiviCRM does not have permission to write temp files Two users are trying to access the temp files (where, for instance, the compiled templates are stored): www-data (when it's accessed from the website) and the sysadmin that run drush commands

By default, all these temporary files can only modified by the user that created it, so sometimes it's the sysadmin, sometimes it's the webserver user

Is there a way so all the temp files can be created/modified/deleted by only the admin user(s) and www-data?

One possible fix is a patch on drush, so it uses a separate templates_c folder than the one used by www-data. Could you test if it works in your environment/workflow?

https://github.com/civicrm/civicrm-drupal/pull/286

There's no single perfect solution to this, but there are several adequate solutions. To highlight some trade-offs among the approaches raised so far:

For each security principal, use separate data-directories (like bgm's answer).

Pro: Portable -- works in many different environments. Doesn't require any special tools or root permissions.
Con: Only works when data can be split apart by user. For example, it could potentially work for logs/caches (because they don't really need to be shared) but is more problematic for uploads/attachments (because both users should have read/write on the same objects).

Create a cronjob or daemon to adjust permissions (like Chris's answer)

Pro: Portable -- you can design the daemon or cronjob to build on the traditional POSIX UGO/RWX triplets. Works with all data (logs/caches/attachments).
Con: Requires installing/running a new root-permissioned service. Watch out for symlinks/hardlinks.

Use the operating system's ACL features (like amp's linuxAcl and osxAcl policies)

Pro: Works with all data (logs/caches/attachments). Doesn't require daemon or regularly running as root.
Con: Not standardized -- technical steps depend on the environment (OS/distro/filesystem). Sometimes applications try to be clever and override the permissions -- which breaks ACLs for specific files/use-cases.
(Note: amp tries to abstract this, but as with any abstraction, it's probably not worth the overhead unless you buy into the general vision.)


API - Create a contact from an external site I have the need to create/update a contact from an external site.
If I understand correctly, the only way to do this is to use Rest API. In my test I had no problem to read the database, but when using the "create" action, as in the following PHP code:

  $url='http://.../sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=...&key=...&json={"sequential":1,"first_name":"Gianni","last_name":"Predan"}';

  $responsestr = file_get_contents($url);

I obtain the error "All requests that modify the database must be http POST, not GET."

What should I do?
Thanks

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


How can I sync the Drupal User Profile image and the CiviCRM contact image? I'm trying to find a way to automatically update the CiviCRM contact image when a user updates their Drupal profile image.  I'm specifically looking for Drupal8.5/Civi4.7 but I'll take anything that can properly update Civi4.7 at this point, regardless of Drupal version.  It seems that the Drupal/Civi API functions are almost, but not quite, capable of making this easy, although it may just be a documentation deficiency -- I'm still digging in the code.

I found this discussion on the old Civi forum (circa 2011) which discusses it.
https://forum.civicrm.org/index.php%3Ftopic=22405.0.html

There is also some old code in the Civi site which directly updates the database and also doesn't seem to work anymore:
https://wiki.civicrm.org/confluence/display/CRMDOC/Adding+pictures+in+civicrm+profile+page

Is there anything as of Civi 4.7.30 which can do this?

If not, can someone point me to some docs/examples that demonstrate how to programmatically add a photo image to a contact in Civi?

I am not sure how to sync drupal profile image with CiviCRM contact image through UI. But you can add module and invoke hook to update the contact image.

Here is the snippet how to add image url to contact

$params = [
  'contact_id' => 2,
  'image_URL' => [
    'name' => '/var/www/html/drupal/sites/default/files/civicrm/custom/Screenshot_from_2018_06_19_15_46_08_1877c5451ed2e68a12816071e0006fef.png',
    'type' => 'image/png',
  ],
];
CRM_Contact_BAO_Contact::processImageParams($params);
civicrm_api3('Contact', 'create', $params);

HTH

Pradeep


can a search for the individuals in a group display notes instead of address, etc I would like to be able to read the notes for a group of individuals when I am looking at the resulting list of contacts from a search.

That might be a little visually difficult if they have 30 notes, but here's two options:

At the search results screen select some or all and then from the actions dropdown at the top of the list choose Export.
In the export screens choose "select fields for export".
When choosing the fields, include the field called "Note(s)".

If you want it on the screen instead of an export, and you're ok with only seeing the first note you can do like so:

Go to Administer - Customize Data and Screens - Profiles.
Click on the Reserved tab.
Click on "Fields" on the right side of the screen next to the Summary Overlay one.
Click Add Field.
For field name, select Contacts , and then the one called "Note".
Click save.
Do a search and in the search results list, if you hover over the contact icon in the 2nd column you'll see the first note in the popup that comes up.


CiviCRM Dashboard not working on local Win 10 install; live server okay I recently made a mirror on my laptop running XAMPP. Wordpress 4.6.1 + CiviCRM 4.7.14. Everything works fine on the front-facing site and everything seems to work fine in the back-end, except the dashboard that comes up. There is a message in the default image in the screenshot below that says
"The requested page "/welcome?prot=1&ver=4.7.14&uf=WordPress&sid=66b480f3fa29fea3920454ef21065ed5&lang=en_US&co=1228" could not be found."
Note that I also upgraded the Wordpress to 4.7 which is one of the reasons I created the local version - to uncover some upgrade issues that I resolved. The CiviCRM dashboard issue was there prior to the upgrade as well. I can easily restart with backups of our LIVE site where everything, including CiviCRM dashboard, is in good shape.

Anyone have an idea how to fix this? Thanks in advance...

Did you change the various URLs/paths in civicrm.settings.php and wp-config.php to match the new location?

See this section from How should I copy a site from production to staging? :

  Replace all the usernames, passwords, paths, etc. in settings.php,    civicrm.settings.php, and/or wp-config.php with the values appropriate to the staging server. If using git, these files are ignored in git, only local copies exist.
  There are a number of values we override in civicrm.settings.php on the staging server to use the appropriate paths...


Where is the API key? We want to connect CiviCRM with our payment processor (Twingle). We need to find the API key, the site key and the URL of the CiviCRM instance, but we can't seem to find them.

Where can we find them?

You can find the site key information you need in the System Administrator Guide: https://docs.civicrm.org/sysadmin/en/latest/setup/site-key/

The API key is in the database and needs to be set up for a contact that has access. You can install the API Key extension which will enable the API Key in the contact summary if you have admin rights: https://civicrm.org/extensions/api-key

The URL of the CiviCRM instance will be in your civicrm.settings.php. You can check it in the UI if you navigate to Administer>System Settings>Directories and click on the question mark in the green bit on the top of the screen. You will see a window in the right hand corner of the screen and the civicrm.root will be the URL for your CiviCRM instance.

Hope this helps!


Input in Memo/Rich Text Editor custom field results in error "There is a validation error with your HTML input" When I try to submit an HTML link in a custom field of the type Memo/Rich Text Editor, in some cases I get the error message:

There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting

The input is a hyperlink in the most simple form:

Link text

What's especially strange is that there are more fields of the same type in the same form that accept exactly the same HTML syntax.

I found no difference between using TinyMCE and CKEditor.

CiviCRM version is 4.4.19.

Any clues highly welcomed.

The error you're getting is from the IDS (Intrusion Detection System).  CiviCRM has a third-party IDS package that's bolted on, and it can certainly be overzealous.  Its purpose is to prevent people from, e.g., submitting spam URLs into public forms.

However, assuming that you're logged in as an authenticated user and having this problem, the easiest solution is to grant yourself the "CiviCRM: skip IDS check" permission.  You haven't specified your CMS, so I can't tell you where your permissions are, but grant your role that permission and you should see the error disappear.


Export participants with Membership data If I'm right it used to be possible to export participants as csv with Membership data.

But it is not there any more in 4.4 and 4.6.

Is there a way how that could be done nowadays?

We need participant info and the membership type in one export.

It is also possible that the participant has no membership.

The only solution I do see now is to create smart groups for all membership types and also a smart group for people without membership. Then go to advanced search, select 1 of these groups, select the right event, display results as participants and export the participant fields and repeat this for all the membership types and the no-member group. Then Add all these csv's to one excel with a column for the membership type.

This is cumbersome and misses one key wish: We also would like to export the membership end-date in this csv. Any solution for it?

Oh, it is a Wordpress site, otherwise I would have tried Views

Perhaps a slightly less cumbersome approach might be to create smart groups for the participants in each event for which you want to pull this information (that might be a useful thing to have in any case - for example, if you need to email your participants), and then run a membership report or search for contacts by event participant group.  You might even be able to get around the need to create multiple lists by trying the "Contribution and Membership Details" report, searching for people in your group with event fees (if you're charging for the event) and pulling the membership details for those folks.

Lesley


payment-processor for multiple (bulk) memberships I am trying to create a form to renew dues for multiple members at once. We do dues by member organization and not the individual.

I have a form working to do that, but need a way to bulk pay. I can't seem to figure out a API call to create a payment using a processor that doesn't create a contribution for the whole payment, since that is already being recorded at a individual level.

Does any one know if there is a CiviCRM native way to do this, or am I going to to have to write custom paypal code for this?

A couple of thoughts:

The data model where Payment is recorded from a Different Contact in CiviCRM (for Membership payments) does indeed exist natively in CiviCRM. You can use this to record a Payment From the Organization.

The data model where if an Membership Organization has acquired a Membership -> Memberships can filter down to a specific number of Individuals who have a current/specific relationship with that Organization also exists natively in CiviCRM.

The data model where the Contribution is recorded at an Individual level and subsequently the Organization is also invoiced for it - that's highly unusual as it will lead to double financial records. If the Organization is paying for the Membership but the Individual is paying/perhaps this would be a reimbursement from the Organization to the Individual?
(preface - love Webform CiviCRM module) - if you're on Drupal - you can have a single Organization purchase memberships for any number of Individuals on one page; The monies will be recorded in that Organization's Contact Record - all Individuals will get Memberships; Add in Soft-Credits for bonus points.


When a Case is set to Closed we would like all un-Completed Activities on the Case to have their Status changed (eg to Cancelled anyone have a working model of this. we thought about drupal/civi rules but may just add in an extension.

seems to us that it could be quite a generic solution, after all, when a Case is Closed you don't want to keep finding Activities that may be eg Scheduled

I would hook on https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_post/ to find cases being closed then do the work from there. I would follow the civicrm_option_value grouping field to determine if a status represents closed.

This seems like an opportunity for a nice small single purpose extension. Maybe 3-4h to develop and publish.


Hosting provider claims normal use of CiviCRM is "brute force attack" In using CiviCRM on a shared server with a local hosting provider, my IP address continually gets blocked by the server's security script. According to my provider my [legitimate CiviCRM] activity is seen as a Brute Force attack on the server.

My question: is this a problem related to the host, or is it related to some misconfiguration of my CiviCRM or Joomla CMS?

Sounds a bit like a problem with mod_security, see also

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

I have also asked a hoster once of one of my clients to switch it off for that site.
But this forum topic even gives options about how to configure mod_security rules to keep it switched on and still have CiviCRM working.


Why do ACL roles not appear in Reports 'Access' option menu? I want to restrict access for users so that they can only see certain contributions - just those for their own campaign.  It doesn't appear to me that CiviContribute is very ACL aware, so I'm looking at producing a contribution report that is restricted in the same way.  The 'Access' part of CiviReport has a menu where I can add an 'ACL Group/Role' - but it seems that only Drupal roles appear here - not ACL roles. Is this working as designed? Or is there something I'm missing?  It appears that with contributions either a user sees everything or nothing, but I hope that isn't the case. I'm using Drupal and 4.6

Not sure if it is or was possible but as an alternative, you can :

create a group in CiviCRM
synchronize it with a Drupal role using CiviGroup Roles Sync (civicrm_group_roles) module (provided with CiviCRM)
use this new role to limit access to your report