CiviCRM CK editor trying to access Skins.js, and CSS resources from the Drupal 8 core assets instead of the Civi directories So I'm having a weird issue where when trying to create a new mailing or event. The wysiwyg editor does not show up, instead the html editor appears as blank. There are errors in console (404 errors) where the page is trying to load ckeditor/skins/moono/skin.js. However, it is trying to load it from the web root via the Drupal core.(['web_root']core/assets/vendor/ckeditor/skins/moono/skin.js)

This is the same with other assets like the editor.css file.

Naturally these assets do not exist in the Drupal core ck-editor directory. Is there a way to direct these to the Civi resources (that do exist) or fix these error.

I ran into this after fixing the Error name not resolved error with crm.ckeditor.js.  I followed the guide steps in this Civi stack exchange here.

crm.ckeditor.js not found

This allowed for the crm.ckeditor.js script to be found, but now it cannot find the aforementioned  assets. Which previously were not being loaded or called.

I also had this problem.  It happened ~95% of the time but not 100% of the time, leading me to believe there's a race condition present.  It started when I upgraded from Civi 5.12.1 to 5.12.3, but you experienced this problem sooner and I'm guessing it's tied to Drupal 8.6.15.  It also happened on my test site but not my dev site (haven't pushed to the live site yet for obvious reasons).

I was able to solve it by uninstalling/reinstalling the core ckeditor module via drush.  However, I'm not sure why that fixes it, but I've been unable to trip the issue.  In my debugging, it certainly seems that Civi's CKEditor is loading the paths of the Drupal CKEditor.  I'm not sure why though.


My site goes to maintenance mode spontaneously My site goes to maintenance mode spontaneously almost every day. I am advised by users.

Everything works fine when I put it out of maintenance mode.

Any explanation is welcome

(Drupal 7.59 / Civicrm 5.4.0)

I had a problem with the Backup and Migrate module where this would happen. There is a setting to put into maintenance mode while the backup is running. But the backup would error out and never turn off maintenance mode.


Translate Custom Profiles not appearing translated in Drupal When creating a Custom Profile in CiviCRM and attaching that to the Drupal Registration and/or Drupal user account the translations for Portuguese, French, and Spanish are not appearing based on the Inherit CMS value set

It took me about a half of a day to debug this thinking it was a bug in Core. In your civicrm.settings.php file there is a section that helps properly map Drupal and CiviCRM languages. This is especially important for Spanish, Portugues, English (Canada), and French (Canadian)

Edit this file and uncomment the appropriate lines as shown below:

/**
 * If you have multilingual site and you are using the "inherit CMS language"
 * configuration option, but wish to, for example, use fr_CA instead of the
 * default fr_FR (for French), set one or more of the constants below to an
 * appropriate regional value.
 */
// define('CIVICRM_LANGUAGE_MAPPING_FR', 'fr_CA');
// define('CIVICRM_LANGUAGE_MAPPING_EN', 'en_CA');
// define('CIVICRM_LANGUAGE_MAPPING_ES', 'es_MX');
// define('CIVICRM_LANGUAGE_MAPPING_PT', 'pt_BR');
// define('CIVICRM_LANGUAGE_MAPPING_ZH', 'zh_TW');

Doing so will immediately map these languages properly in your system and start to render the labels in the languages you have translated.


How to localize opt-out link in mailing My organisation has members who speak different languages, and we send them emails written in the language they speak.

These emails have an opt-out link, generated by the token {action.optOutUrl}. Our problem is that the link always leads to the English version of the form, while we would like it to be in the same language as the email. Same thing for the optout confirmation. So for example the token should generate www.example.com/de/civicrm/mailing/optout? when sending an email in German (our CMS is Drupal).

I can see two ways for CiviCRM to do that:

Use the preferred language of the user
Use the language used by the person who creates the mailing

Actually, it seems the second option is almost there: if I create the mailing from an interface in German (/de/civicrm/a/#/mailing/xxx), the Test mail has the link generated for German, but unfortunately the real mailing doesn't.

Is this something lacking from civicrm, or am I missing something? I would rather avoid having to create one token and one optout message per language, especially for the former as it requires development.

Yes, it's a know limitation. The language used is the language of the cron job. If you manually launch the scheduled task with the proper language, you should be able to send in the proper language.

The way we intend to solve it is to add some option to tell in which language we want the mailing to be send - cf. https://issues.civicrm.org/jira/browse/CRM-16352


Need to see latest incoming messages we are a small charity who would like to see all the latest incoming enquiries from our website in one place when we log on to civicrm in wordpress.
We have created a general enquiry form (Caldera Forms) which does send an email direct to the specified charity email address, and does create an individual record at the backend of civicrm, but none of them show up in the activities screen when we log in.
It would be very useful to be able to see in one place the messages that we need to deal with as they come in.
Grateful in advance for any help on this please.

As @petednz mentioned, it does sound like that your entries are being merged. You can check what dedupe rule Caldera form is using under the Contact 1 processor.  if you didn't create a dedupe rule that always create a new record, then it is likely that it will use an existing rule that merges the new entries.  To create a dedupe rule that doesn't merge, you need to get to CIVICRM and go to Contacts>Find and Merge Duplicate Contact and create a rule under the Individual Section.  Click Add Rules for the section and i suggest the following entries:
Rule Name = Always No Merge
Usage = General
Reserve = No tick
Field =    Address Name
Weight (same row as Address Name) = 10
Skip    the rest of    the rows
Weight Threshold to Consider Contacts    'Matching':100
the idea is to set a dedupe rule that will never be matched, more on how the dedupe rule works is here: https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/
then go back to Caldera Contact 1 Processor and refresh the browser.  You should see the new dedupe rule "Always No Merge" listed there for you to select.  Any new entries would be a new record now.  However, if the records do belong to the same individual, you would have the merge the records manually.


How can I log hours that I have contributed to the project? CiviCRM is contributed to by hundreds of people: users who report issues/bugs/suggestions; implementers; developers; people who take time to offer advice on this site or on chat.civicrm.org.

It's useful for the project to have a measure of this, so we can appreciate everyone's input. As well as helping build a picture of the work that goes into improving CiviCRM over time, people who contribute enough hours can be listed on the find an expert page.

How can this be measured and how can I record my time?

(Note: I'm listing this here with an answer because the information was very hard to find.)

You can log your contributions by either:

signing up for an account at lab.civicrm.org which is where most of the work goes on and many community discussions happen; then "joining" a project; then recording your time in a comment using a special code.

or
signing up for an account on https://civicrm.org and then using a special work log import form.

This process, as well as what is and isn't considered a "contribution" is set out in detail in a wiki page in the gitlab project called Community Engagement. The relevant page is:

https://lab.civicrm.org/community/community-engagement/wikis/Tracking-Contributions


GiftAid extension 3.1.0 compatible with CiviCRM 5.x? I'm running WP 5.4 / CiviCRM 5.24.3 / php 7.3.16 / gift-aid-extension 3.1.0 / uk-hmrc-online-gift-aid-submission 1.7.3

Just going to do my first GiftAid submission (now that I have some donations to claim), and the extension isn't working - drops straight to the default admin console.

Looking at the extension info page, and civi-5.0 isn't listed for ver 3.1.0 (though it is listed for 3.0.4). It this a typo on their part, and a reinstall on mine, or did something break with 3.1.0?
https://civicrm.org/extensions/gift-aid-extension-uk

Yes, version 3.1.0 of the Gift Aid extension (from Compucorp) certainly works with release 5.19.x and 5.24.x. As you've obviously upgraded fairly recently then try clearing caches?


Must my command-line tool be an extension? I have made a standalone tool which i start with the command-line to see possible updates in the database to use the actual translations, and a program to compare an existing database with a new installation.
Now you can use the sql-files in the localization-files only with a new installation and i use the new po-files to find possible updates after the normal upgrading in CiviCRM. The translated strings in the database are now never upgraded with new Transifex translations.
After making the programs i looked how extensions work, but this is not really an extension for users but may be something for the system administrator.
Are there other kinds of extensions?

If the tool is command-line only, it probably shouldn't be an extension.

If you need to bootstrap CiviCRM from the command line, and you can presume that the cv tool is in the path, and your tool is PHP-based, you can add the line:

eval(`cv php:boot`);

or just:

cv php:boot --level=classloader

This should give you the ability to call CiviCRM classes without creating an extension.


How to add options in autocomplete contact search options? We have contacts with the same First and Last Names. It is hard to identify person when we use Quick Search or add relationships. And default options doesn't help to identify person aswell. Is there any way how can we add additional fields (e.g. Birth Date) into autocomplete contact search options?

We are using CiviCRM 4.7.14 and wordpress.

Thanks in advance.

You can add easily add predefined fields into the autocomplete results by selecting fields under "Autocomplete Contact Search" under "Settings - Search Preferences".

Adding the Birth Date will not be as easy. Technically you could add an additional option group value to the option group contact_autocomplete_options, but that will be pretty much experimenting at your own risk since this is supposed to be a reserved option group.


CiviCRM upgrade from 4.6 to 5.3 > [warning] Both parameters should have an equal number of elements Relationship.php:2222 Subject says it all. Just wondering if anyone has seen something like this before?

This error is displayed when some Names for a relationship type do not match the Labels.

For example in civicrm_relationship_type table you may have something like

name_a_b = Mayor
name_b_a = Mayor
label_a_b = Mayor of
label_b_a = Mayor is

You can correct these either in SQL or via the UI

UPDATE

To identify the rows causing the issue

select name_a_b, label_a_b, name_b_a, label_b_a from civicrm_relationship_type where name_a_b <> label_a_b;
select name_b_a, label_b_a from civicrm_relationship_type where name_b_a <> label_b_a;

To fix we want to set the name = to the label

Make a temporary backup - this will be dropped when you log out of mysql.

create temporary table temp_civicrm_relationship_type as select * from civicrm_relationship_type;
update civicrm_relationship_type set name_b_a = label_b_a where name_b_a <> label_b_a;
update civicrm_relationship_type set name_a_b = label_a_b where name_a_b <> label_a_b;

Confirm that the number of rows updated matches result of the query.

(nb I just grabbed this from a ticket in our own system but hope it is helpful in your case)


Using CiviCRM API in Drupal View I am trying to use the Civi API within a Drupal view, in the global PHP field.

It is all working, except for when I try to use an "Available Variable" from the view, it throws and error.  When I hard code the variable's value, it works, though.

The variable I am using does contain the correct data; if I return just that variable, it returns the ID it should.

The code:

civicrm_initialize();
$start_date = civicrm_api3('price_field', 'getvalue', array(
  'return' => 'active_on',
  'price_set_id' => $row->price_set_id,
));

return gettype($start_date);'

Error
field active_on unset or not existing

I am using Drupal 7 and CiviCRM 4.6.28.

As far as your API call there goes...I don't see an 'id' => $row->price_field_id in there.  You'll need to query by id to get the value for each individual price field. I'm not exactly sure what the variable name on the object will be in your case...but the main thing is to query for the individual price fields data by id


alter/remove specific popup notifications What's the best way to alter or remove specific popup notification messages? I have a situation where the duplicate membership warning when creating a membership from the backend is not relevant for a client, and would like to suppress the warning so as not to confuse users or clutter the interface.

I've played with CRM_Core_Session::getStatus() but it doesn't appear to be aware of this notification (likely because it's triggered via the tpl file rather than PHP).

You are in the right path, if you look at the CRM_Core_Session class you'll see the method getStatus which takes a boolean as a parameter, if TRUEthen it will reset the status.

That said, I would create a extension or use an existing one and implement hook_civicrm_postProcess.

You'll need to know what is the class/form name of the form you are targeting, an easy way would be to inspect the source of the form/page from which you want to remove/replace the notification and search for .tpl

Example: CRM/Contact/Form/Task/Email.tpl, its class/form name would be  CRM_Contact_Form_Task_Email

Then in your extension:

function myextension_civicrm_postProcess( $formName, &$form ) {
    if($formName == 'CRM_Contact_Form_Task_Email') {
        $session = CRM_Core_Session::singleton();
        // Reomve status message from form
        $session->getStatus( $reset = TRUE );
        // Set your new message
        $session::setStatus(ts('This is a custom message.'), ts('Custom Message'), 'success');
    }
}


Is CiviCRM right for managing volunteers on clinical trials We need to keeping volunteers happy and engaged in trials. We would need segment our volunteers based on preferences for type of trials they want to participate in, whether they agreed to participate in a trial, rejected it or dropped out of a trial, whether they have completed all/some regular online tests.

That is the basics of the project.

I am afraid the information you are giving is far too limited to give a true answer if CiviCRM is right.

At the same time I am fairly convinced CiviCRM in combination with probably a Drupal website would support the kind of thing you are roughly sketching. But I recommend you do a prototype project first to establish what CiviCRM + website can do out of the box, what it can not do without customization and how important that is for you etc.

And probably contact a CiviCRM partner in your region to help you with that important first step. You can find an expert in your region here: https://civicrm.org/partners-contributors


Report for Unbatched Contributions We use Civi accounting batches to export our contributions to an external accounting program.  The office manager has asked me to create a report (in Drupal or Civi) that will show all contributions that have not yet been put into an accounting batch.  I've made some attempts, but have been unsuccessful.  Any help would be greatly appreciated. (Drupal 7; Civi 4.6)

Drupal attempt:

We use CiviCRM Entity in a few different ways, especially in Views. We love the module!  However, accounting batch data is not available in the current release, 7.x-2.0-beta3. A number of contribution and financial entities are now available in Views, but as far as I can tell, none of them make data from the Batch table available (either directly through their Fields or indirectly through Relationships).

CiviReport UI attempts:

Of the standard reports, it seems the Contribution Detail and Bookkeeping reports have access to Batch info already included.  Of those two, only the Contribution Detail report has 'Batch Name' included in the filters.  (The Extended Reports extension didn't seem to have any reports with extra/different options related to Batch data).  The filter type is CRM_Report_Form::OP_MULTISELECT so the only two options are "Is one of" and "Is not one of".  If I use "Is not one of" and select all of the Batch options, I can get the unbatched contributions, but that doesn't seem realistic, especially as the number of batches continues to grow.  Is there a way to automatically select all of the options?  Or do I need to dive into the report's code?

I found the solution by changing two lines of PHP for the Contribution Detail report (CRM\Report\Form\Contribute\Detail.php) and putting it in our Custom PHP directory.

The filters section for the batch name field reads by default (Civi 4.6.20) as follows:

  $this->_columns['civicrm_batch']['filters']['bid'] = array(
    'name' => 'id',
    'title' => ts('Batch Name'),
    'type' => CRM_Utils_Type::T_INT,
    'operatorType' => CRM_Report_Form::OP_MULTISELECT,
    'options' => $this->_allBatches,
  );

By changing the operator type and commenting out the options, I was able to get a widget with an "Is empty (Null)" option (thanks to the wiki, I knew to look in CRM_Report_Form for the possible values.)  My code now reads:

  $this->_columns['civicrm_batch']['filters']['bid'] = array(
    'name' => 'id',
    'title' => ts('Batch Name'),
    'type' => CRM_Utils_Type::T_INT,
    'operatorType' => CRM_Report_Form::OP_INT,
    //'options' => $this->_allBatches,
  );


What hook(s) can modify variables passed into Smarty templates? Recently I needed to modify Smarty variables being passed into a template from an extension. I tried a couple of likely hooks, but neither of them seemed to provide this functionality. The templates in question were Confirm.tpl from various locations.

Is there hook functionality (akin to Drupal's preprocess functions) which permits adjusting variables in templates?

Background: for the eWay Recurring payment processor when using clientside encryption (Github branch), the CC value is submitted as a long encrypted string. CiviCRM renders this as a thousand stars on the confirm template; I wanted to render this nineteen stars rather than a thousand stars followed by the last four digits of the encrypted string.

I was able to achieve this with template overrides in the extension (PR #11), but it doesn't feel like the best approach to do this - much chance of conflict with other customisations / extensions / CiviCRM changes being my concern.

I often use the buildForm hook to modify data that is then passed to Smarty, or even add my own Smarty variables to the form.


Is it feasible to use CiviPledge as a microloan management system? I haven't done much with CiviPledge but am curious about the potential of re-purposing it for a slightly different use to make CiviCRM work as a management tool for a nonprofit's microloan project. Would there be any downsides to doing something along these lines?

Rename it with string replacement so "CiviPledge" becomes "CiviLoan", "pledge" becomes "loan", etc.
Set up a "pledge" on an account when a microloan is given out.
Record a "pledge payment" when a loan repayment is received.

It could work, (but if there is an interest, as Laryn mentioned)

Two other tools you might want to look at:

1) civiCampaign: you could have one campaign per loan (with deadline an financial goal) and record the payments as donations associated to this campaign.

(probably easier than pledge if the frequency of the payments is not very regular)

2) civicase: if you have a lot of other activities around a microloan beside the financial one (eg if there is an approval process before the loan, if there is a set of action in case on delay on payments....)

have a look at civicase, it's a powerful tool that might take you some time to set up, but that will help you enforce consistent workflow to support your work


Exclude contacts from report based on membership they have I want to make a report that only shows contacts that don't have any of the listed membership id.

The following SQL code filters the memberships, but still lists contacts that have other memberships, including the ones I want to avoid (e.g.: it shows Joe with a membership type 8, but Joe also have another membership of type 7, so I want to exclude Joe from the report).

When trying to make this with Search Builder I got the same situation.

I'm using Joomla! on that, so Drupal Views are not an option. I have the last CiviCrm version.

  SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, membership_civireport.membership_type_id as civicrm_membership_membership_type_id, membership_civireport.join_date as civicrm_membership_join_date, mem_status_civireport.name as civicrm_membership_status_name

  FROM  civicrm_contact contact_civireport
                 INNER JOIN civicrm_membership membership_civireport
                            ON contact_civireport.id =
                               membership_civireport.contact_id AND membership_civireport.is_test = 0

  LEFT JOIN civicrm_membership_status mem_status_civireport
                            ON mem_status_civireport.id =
                               membership_civireport.status_id

  WHERE ( mem_status_civireport.id NOT IN (1,2,3,4,5,6,7) )

  ORDER BY contact_civireport.sort_name, contact_civireport.id, membership_civireport.membership_type_id

  LIMIT 0, 50

One solution could be to make a Smart Group (A) of those with Membership X or Y or Z, then have another Smart Group with the larger target group eg All Individuals (B), then use the Custom 'Include / Exclude' Search to do B not A.

This may not help you if your need an sql query but could be useful to others (if it works as I expect it would)


Keyboard shortcut to access contact Quick Search? Is there a way to activate the contact Quick Search form field at the top of each page, with a keyboard shortcut rather than moving the mouse cursor?

This shortcut and others can be found by clicking on the "Access Keys" help icon at the bottom of many CiviCRM pages.


Trying to get external cron working I'm trying to get the external url-based cron to run and I keep getting fatal errors. I don't really want to debug the PHP code. Can anyone help me?

The URL I use has the correct username, password and sitekey:

http://predigerforum.ch/wordpress/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx@xxx&pass=xx&key=xxx

I get the following message:

Fatal error: require_once(): Failed opening required 'CRM/Core/Config.php' (include_path='.') in /nhldata/631/106631/data/web/predigerforum/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/bin/cron.php on line 30

It looks like there is a path configuration error, but I cannot find any mistakes in the settings file. I've checked quite a few forum entries and things look correct...

Thanks for any help

David

After lots of messing around, I upgraded to 4.6.8 and then made a clean copy of the latest civicrm 4.6.8 files into the civicrm/CRM subdirectory, and the cron job ran properly. However, my Wordpress installation failed, because there are multiple Wordpress installations on the server and a search from the top root caused basedir restriction errors (and would probably have failed for that reason...).

The fix was to add the following lines to civicrm.settings.php, just before the section "do not add anything below this":

if (!defined('CIVICRM_CMSDIR')) {
  define( 'CIVICRM_CMSDIR', '/nhldata/631/106631/data/web/predigerforum/htdocs/wordpress/' );
}

It was important to include the "/wordpress/" at the end!

I'm not sure that this overriding parameter is really documented, though. I found it referred to in a forum post.


DB error: already exists on contribute page I'm on civi 4.6.2, with Drupal 7

I have a contribution page which is a contribution on behalf of an organisation, and also creates a user account for the website. I'm getting the error below on submit. Some searching suggests truncating the civicrm_uf_match table - but if I do that will the link between all the Drupal accounts on my site and their CiviCRM profiles be broken?

Thank you!

Robin

Sorry but we are not able to provide this at the moment.
DB Error: already exists
Error Details
Database Error Code: Duplicate entry 'rfenwick@googlemail.com-1' for key 'UI_uf_name_domain_id', 1062
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

[code] => -5
[message] => DB Error: already exists
[mode] => 16
[debug_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  702 , 'rfenwick@googlemail.com' ,  7582 )  [nativecode=1062 ** Duplicate entry 'rfenwick@googlemail.com-1' for key 'UI_uf_name_domain_id']
[type] => DB_Error
[user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  702 , 'rfenwick@googlemail.com' ,  7582 )  [nativecode=1062 ** Duplicate entry 'rfenwick@googlemail.com-1' for key 'UI_uf_name_domain_id']
[to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  702 , 'rfenwick@googlemail.com' ,  7582 )  [nativecode=1062 ** Duplicate entry 'rfenwick@googlemail.com-1' for key 'UI_uf_name_domain_id']"]

)
Return to home page.

It means you a trying to create a new account with an email that is already in use for another account.

Some CMS (drupal at least!?) don't allow two separate accounts with the same email, hence the (rather not too explicit) error message.

The simple solution is either to change the existing account so it uses another email address or create the new account with an email that isn't used already.

The not so simple but would be awesome for your karma solution is to contribute a patch to display an "end user friendly" error message and the option to put another email in the form if its invalid

X+


Need help with profile removal question It's these two items at the bottom. It came from when I was trying to set up profiles. Can someone tell me how to get rid of them? "who do you vote for" and "individual"

They are custom fields, You should see them under Administer >> Customize Data and Screens >> Custom Fields


Need help in getting quote for security upgrades We are a small non-profit using CiviCRM. We are currently being charged a lot for security upgrades and monitoring. We are trying to understand pricing and what we actually need. We want to change companies. Will we have to spend a lot on 'migration'? What elements do we need to get in a quote to compare apples to apples?

It can be time consuming and thus expensive to do security upgrades, especially on a site that has custom code. Monitoring requires some setup and sometimes an ability to respond quickly when something goes wrong.

Some providers bundle these services with hosting. Others provide them without the hosting.

I would compare the full cost of migration + hosting + security upgrades + monitoring between providers. You might also find that your site doesn't need every security upgrade - ask about options here since some providers want to upgrade all sites on every security release, while others will evaluate if the security vulnerability applies to your site given its configuration. And you might be willing to risk your site having troubles or being offline for a while before you notice in order to save some money on monitoring.

Migrating a site to a new server can be fairly simple, or sometimes not, depending alot on the server setups and the age of the site. Moving from an old server with an old CMS to a new one might cause issues with version of PHP for some custom or old Drupal 6 modules, etc. However, some hosting providers are willing to do the migration for free on the expectation that the costs can be amortized over the length of your time hosting with them.


Problem with Cividiscount and pricesets When setting up a cividiscount coupon, it doesn't work on events where a price set is used.  If I set up the fee directly on the events page then the discount shows up but not on events where price sets are used.
Any help is much appreciated.

Can you post a screenshot of your discount settings? You must make sure that you created a price set for the event (sounds like you did) and that you added the price set as an option for the code to work with in the coupon settings.


Civimail sparkpost extension stats / is my mail being delivered? We are using the cividesk sparkpost extension on civicrm 5.5.3 and wordpress 4.9.8.  In the last few days, we have sent 2 emails to the full list which is about 6,000 emails each, so it should be showing around 12,000. Civimail shows almost all of the mail is successfully delivered. However sparkpost's summary report for the last 7 days shows 167 accepted, 12 bounced, 0 rejected, 256 rendered, and 179 targeted.  What do those numbers mean?

Found the answer, thanks @MatthewWire for the hint.  Emails were going out using the "backup mailer" defined at civicrm/admin/setting/smtp because we had the wrong API key installed for sparkpost.


Get current contact id? I display the summary page for a civicrm contact and I need to get the current contact id. Is there any built in function for that?

I have this code where I explicitly refer to the civicrm id 4. Instead of doing that I would like to refer to the current civicrm contact.

$contact_id = 4;
$custom_name = array("custom_2","custom_3","custom_6","custom_7");
$params = array(
        'return' => $custom_name,
        'version' => 3,
        'id' => $contact_id,
);

$result = civicrm_api( 'contact','get',$params );

The answer davejenx is correct but no longer considered best practice.  Instead use:

CRM_Core_Session::singleton()->getLoggedInContactID();


How to allow a user to edit certain Civi contact records without seeing others I've been asked by a client if one of their members can be allowed to create and edit records for prospects (ie people who may or may not go on to become actual members).

The first part - creating a simple data entry form as a profile - was easy to do. I can give the member unique access to a webpage which contains that form.
But  what I'm not sure about is record editing. Does the member need to have access to Civi itself? I created a 'Prospect Admin' ACL and assigned it to the member through a Prospect Admin Group. But I'm not sure where we go from here. Is it possible to set it up so the member is able to access and edit prospect records without being able to edit the WordPress site?

Any advice would be welcome!

There are a couple of different ways you can go about this.

One would be to grant access to CiviCRM, and the bare minimum WordPress access needed to actually get into CiviCRM.  You would remove the "View all CiviCRM contacts" permission from this role (also "Edit all CiviCRM contacts") and then they only have access to contacts based on their ACL.  This method gives the member access to the CiviCRM interface.
The second method is conjecture based on a similar technique I've used with Drupal Webform-CiviCRM integration - but I'm guessing you could use a contact reference widget on Caldera Forms CiviCRM to let a (privileged) member pull up and edit existing records.  This is a bit more work, but lets you limit the interface that the member sees to the relevant fields.

If you go with the first approach, consider the Contact Layout Editor extension to give the member(s) a more limited view of the CiviCRM interface, so they can't view/edit fields/tabs they ought not to.


CiviCase not strictly adhering to permissions? I have a use case where 'volunteers' deal with casework on an area basis, with a 'supervisor' for each area.  Volunteers can add contacts, and view their own cases. Supervisors can view all cases.

Both roles' access to their area's contacts is limited by Civi's own ACL through each service user being assigned to an area group.

This works up to a point, in that neither group has permission to view cases outside their area, but supervisors' dashboards and dashlets show all cases, regardless of whether those contacts are visible.

Is this expected behaviour, or have I went wrong somewhere?

Drupal permission:

  CiviCase: access all cases and activities View and edit all cases (for visible contacts)

You might be right. The dashboard as far as I can remember has never used ACL's it just uses "my" or "all". The feature where ACL support for case was introduced might have been for a different need and doesn't seem to have included the dashboard (https://issues.civicrm.org/jira/browse/CRM-17645).

So yes and no to your question?


How to add captcha on Civicrm contribution pages and Events pages Can any one help me configure captcha on Contribution pages and events. I can only find recaptcha settings here: example.com/civicrm/admin/setting/misc?reset=1

You can include a Profile in your Contribution Pages and Events and include recaptcha for it.

To set up your reCAPTCHA keys visit Administer > System Settings > Misc (/civicrm/admin/setting/misc?reset=1)

Then to set it in your Profile visit

Administer -> Customise Data and Screens -> Profiles

Click on settings link for the profile added on your contribution page or event.
Expand the Advanced Settings tab
Enable the Include reCAPTCHA? checkbox and Save.


Install Mosaico in Windows I would like to install the Mosaico extension in a Windows server.
It's possible?
If yes there is a windows equivalent to setup.sh batch?
Thanks

The setup.sh is only necessary to build Mosaico, since it's still in beta.  You don't need it to actually run Mosaico.  Just download a pre-built version here: http://dist.civicrm.org/extension/uk.co.vedaconsulting.mosaico/latest/uk.co.vedaconsulting.mosaico-latest.zip


Is there an extension for adding a custom field type calculated field? Civi 4.6.9
Drupal 7.44

On many occasions it would be very handy to calculate the values of custom field sets and store that calculated value within Civi.

I'll use a survey for example.

I'd like to create a scored survey activity type tied to a custom field set. The field set would include multiple fields, each with select options. The final field within the set would be "Score." I'd like this field to add the values of all answers. Once we calculate the survey score we can do all kinds of fancy stuff.

I've done my due diligence but didn't find anything out there.

If there isn't one, is the extension route the most efficient method?

Ideally, I'd love to have "Calculated Field" be an option for data type when creating custom fields but that may be a pipe dream.

Thanks.

Paul, very interested in this idea as well. Don't have a great answer, but here's an idea - since you're on Drupal, I wonder if this would work - using Views, Views Calc and Views Aggregator Plus (perhaps along with webform-civicrm) to do the calculation - add the survey answers to get a score - then saving that score back into Civi in a custom field?


How to deactivate "update this field mapping" for users? I would like the users to have only permissions for saving a new export mapping, and not updating the existing ones. Where can I modify this permissions?

Thank you!

There is no way afaik to do this currently. You might need to make an extension that adds field to the civicrm_mapping table that would then permit you to create a Permission that you can then apply.


Event Contribution page missing trxn_id in template Contribution.tpl Not sure when this started-the Cancellation or Refund Information block is supposed to contain cancel/refund date, a note and transaction id:  the Smarty template has the code:

              {$form.refund_trxn_id.label}
              {$form.refund_trxn_id.html}

but it isn't shown - this is also the case in the latest Wordpress Sandbox, if you change a contribution status to cancelled or refunded, the trxn_id box should be shown.
I tried simply clearing templates to force recompile but that doesn't help.

It seems to depend on whether there was a transaction id set on the initial contribution. If there was one on the initial contribution then I see the refund trxn id on the refund. If there wasn't one on the initial contribution then I don't see a refund trxn id on the refund. This seems to be the same even in 5.5 as well as the public demo.


CiviEvent Live and Test Registration pages yield error when accessed I'm currently using Wordpress 5.5; and CiviCRM version 5.25.0
I'm getting the following error log when trying to access registration pages for any of our events:
Aug 18 14:46:20  [debug] $backTrace = #0 /home/example/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(419): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/example/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Contribute_Exception_InactiveContributionPageException))
#2 /home/example/public_html/wp-content/plugins/civicrm/civicrm.php(1479): CRM_Core_Invoke::invoke((Array:3))
#3 /home/example/public_html/wp-content/plugins/civicrm/includes/civicrm.shortcodes.php(295): CiviCRM_For_WordPress->invoke()
#4 /home/example/public_html/wp-includes/shortcodes.php(343): CiviCRM_For_WordPress_Shortcodes->render_single("", "", "civicrm")
#5 internal function: do_shortcode_tag((Array:7))
#6 /home/example/public_html/wp-includes/shortcodes.php(218): preg_replace_callback("/[([?)(civicrm)(?![\w-])([^]/](?:/(?!])[^]/])*?)(?:(/)]|](?:([^...", "do_shortcode_tag", "[civicrm]")
#7 /home/example/public_html/wp-content/plugins/civicrm/includes/civicrm.shortcodes.php(203): do_shortcode("[civicrm]")
#8 /home/example/public_html/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress_Shortcodes->prerender(Object(WP))
#9 /home/example/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, (Array:1))
#10 /home/example/public_html/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/example/public_html/wp-includes/class-wp.php(758): do_action_ref_array("wp", (Array:1))
#12 /home/example/public_html/wp-includes/functions.php(1285): WP->main("")
#13 /home/example/public_html/wp-blog-header.php(16): wp()
#14 /home/example/public_html/index.php(17): require("/home/example/public_html/wp-blog-header.php")
#15 {main}
the resulting page provides the following generic fatal error message:
"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. The page you requested is currently unavailable."
As far as I am aware, there have not been any recent changes to our setup that would have prompted the error, as it was working fairly recently. Any tips or direction would be greatly appreciated!

If you are on wordpress 5.5 than your CiviCRM version should be more than 5.25.x. Also can you check the shortcode that you have added in wp post/page has contribution id.


Change font-family in theme I am trying to change the font and the headings in theme 2016.

Do I need to edit the code?

The code says font-family sans-serif, I want it to be times-new-roman.

My answer is assuming you are referring to WP theme Twenty-Sixteen

Your question is not a CiviCRM issue, if you have other questions that are directly related to your CMS you should find a CMS specific forum to get more detailed help.

Here is a link with the instructions your are looking for.
https://www.geekypeak.com/how-to-change-fonts-for-twenty-sixteen-child-theme/
Again, you might need to find a CMS specific forum or try Google.


can't edit Contact Details for records with a custom subtype (Error: One or more contact subtypes have been de-selected from the list ...") I first posted this issue under another question (after upgrade, can't edit Contact Details fields (Custom Addressee and de-selected subtypes errors)) thinking two separate issues were related. But apparently they aren't.  Since a kind soul correctly solved one of my issues, I marked his answer accepted. But one issue still isn't resolved, I decided to open a new question just for it.

I have upgraded a site from an older CiviCRM version (4.4) to 4.7.29.  And now I can't edit the Contact Detail fields for any record with a specific custom subtype.

I have a type named "Member", which is a subtype of the "Individual" contact type.  When I open one of these records in the backend, I get the following warning:

"One or more contact subtypes have been de-selected from the list for this contact. Any custom data associated with de-selected subtype will be removed as long as the contact does not have a contact subtype still selected. Click OK to proceed, or Cancel to review your changes before saving."

If I click "OK" to continue saving, the record does save -- but all of the data associated with the custom subtype "Member" is deleted.

Here's what I know so far:

-- This problem only occurs with the one custom subtype I've created.  Other custom subtypes under "Organization" don't have this problem.

-- This problem only occurs in the administrative backend contact record screens.  Profiles that are used in the website frontend update all details for this contact subtype without problems.

-- The custom subtype does appear correctly in the "Contact Type" field for the record.

-- Searching for contacts with this contact subtype works correctly and returns all the right data.

-- Creating a new record of this subtype works just fine. However, afterwards trying to save the new record has the same problem.

-- I've confirmed this error is thrown by the file /civicrm/templates/CRM/Contact/Form/Contact.tpl where the Javascript does this check at line 228:

{if $oldSubtypes}{literal}
    $('input[name=_qf_Contact_upload_view], input[name=_qf_Contact_upload_new]').click(function() {
      var submittedSubtypes = $('#contact_sub_type').val();
      var oldSubtypes = {/literal}{$oldSubtypes}{literal};

      var warning = false;
      $.each(oldSubtypes, function(index, subtype) {
        if ( $.inArray(subtype, submittedSubtypes) < 0 ) {
          warning = true;
        }
      });
      if ( warning ) {
        return confirm({/literal}'{ts escape="js"}One or more contact subtypes have been de-selected from the list for this contact. Any custom data associated with de-selected subtype will be removed as long as the contact does not have a contact subtype still selected. Click OK to proceed, or Cancel to review your changes before saving.{/ts}'{literal});
      }
      return true;
    });
    {/literal}{/if}

So.....it seems that one of my legacy custom contact types is no longer recognized by some part of CiviCRM, but it IS still recognized by some parts of CiviCRM?  Help!

It seems to be problem with data how its saved in database. The settings for Custom group might have been corrupted during upgrade or some scenario are not being handle during upgrade. To debug or fix this you will need to do some troubleshooting

Check each Individual and sub types custom groups and re save the settings for each such custom groups so that the settings are saved correctly.
Check when updating contacts does the data from all custom data gets deleted or only the subtypes
Check if Contact subtype are pre populated correctly on edit screen of contact and also Custom group fieldsets gets loaded of subtype and non subtype.
Put debug statements to check what values are loaded in smarty variables for $oldSubtypes

HTH

Pradeep


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

For example the combo box for Event Fee(s), Registration Fee is too narrow - the amounts are cutoff on the right. I want to preserve my width setting of 20em.

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

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

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


Schedule Reminder executed but no email sent out I had a scheduled email reminder, which will trigger reminder email when it is 2 week(s) before Membership End Date. Repetition is enabled, to repeat every 1 hour until 1 day after Membership End Date.

"Send email" option is checked, with email subject and content.

When I execute this schedule reminder, it runs and below message is shown in job log:

Summary
Finished execution of Send Scheduled Reminders with result: Success (1)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Send Scheduled Reminders with result: Success (1)

No email is triggered for my test account, which will expire in 3 days.

However, other scheduled job (mail_report) is able to send out email.

I'm not sure what's wrong. Any idea to figure this out?

I'm using CiviCRM 4.4.6 in drupal 7.

A contact is added to the list of scheduled reminder recipients when they first meets the criteria you have specified and the reminders will be re-sent to that list on your repetition schedule.

If you ran your scheduled reminder for the first time when your membership end date is in 3 days then it won't be on the reminders email list.  Only memberships with end dates 2 weeks in advance will be added to the list.

You can confirm this is the case by adjusting the end date for your test record to 15 days away then wait for 1 day to see if the reminder is sent.

Also, although you haven't asked about this, are you sure you want to send 24 reminder emails to your members each day for 15 consecutive days?  That is what will happen with the settings you describe (assuming your cron runs at least hourly). It seems like a perfect way to annoy your members and get  blacklisted for spamming.

I also suggest you upgrade to 4.4.16 as there have been bug fixes and security updates since 4.4.6  .


WYSIWYG editor missing from Scheduled Reminders popup window in Civi 4.6.3 I recently upgraded to CiviCRM 4.6.3 from 4.4.XX. Since then, the WYSIWYG editor is missing when creating a new scheduled reminder or editing an existing one. To reproduce the error:
1. Click Manage Events
2. Click Configure an event, and choose Schedule Reminders.
3. Edit or create a new reminder
4. See the editor missing.

However if on step 2, you instead choose Info and Settings, then click Schedule Reminders, the WYSIWYG editor does appear.

I've verified the error with IE, FF and Chrome, and I see the issue 100% of the time. Using Joomla 2.5.28.

Anybody else see this issue?

Answering the question of how to install the TinyMCE editor extension:  It's marked as compatible with CiviCRM 4.7+.  I'm guessing it relies on functionality that doesn't exist in the current version of CiviCRM - but you could always e-mail Tyrell directly and ask him.

Assuming it works - it's submitted to the CiviCRM extensions directory, but hasn't been approved yet.  So first, make sure you have your extensions directory and URL defined (one is in Administer menu > System Settings > Directories, the other in Administer menu > System Settings > Resource URLs).  Then place the extension in a folder inside the extensions directory (use FTP or git or whatever works for you).  At this point, you should be able to go to Administer menu > System Settings > Manage Extensions and select "Install" for the extension.  If it works on 4.6, report back here please!


Article selection while creating a mailing? I'm using Civicrm into my Joomla 3.4.5 site.
Is it possible to select some articles into my joomla article's archive and insert them directly into a civicrm mail while i create a new mailing within the mailing template creation process?
Thank you!

Check out the Content Tokens extensions and see if it fulfill your needs, if that doesn't suits you can always create your own tokens, have a look at @Coleman's post.


CiviMail stuck on "Starting execution of Send Scheduled Mailings" WordPress installation. Upgraded web hosting to a VPS (Site5) and they said the cron job would work fine. I sent a test of this mailing to a group of 10. It worked fine. I So I sent the mailing to a group of ~4236 recipients and executed the "Send Scheduled Mailings." That was over an hour ago. The job log says:

Entity: Job Action: process_mailing
Summary
Starting execution of Send Scheduled Mailings
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Send Scheduled Mailings

Should I be worried or does this just take a long time?

so you should have the report accessible for this mailing, what do you see? you have the number of emails delivered, that should increase, more or less slowly depending on how you configured your cron


Change domain name (wordpress) I have civi crm 4.7.8 on wordpress 4.5.3 and I've changed my website domain name.
When I go to wp admin, i can see civicrm icon and go the taskboard, but I haven't civicrm menu.
I supposed there are some changes to do in database to set new domain name ?
Can you hep me ?

Below are the simplified instructions taken from Moving an Existing Installation to a New Server or Location, but specific to answer your question.

Open the file wp-content/plugins/civicrm/civicrm.settings.php in any text editor and change the value for CIVICRM_UF_BASEURL with your new domain name
For CiviCRM Version 4.7 open the file wp-content/uploads/civicrm/civicrm.settings.php
Login into WP and navigate to

http://[your domain name]/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/updateConfigBackend&reset=1

and clear cache and save the new base directory/path settings

Rebuild CiviCRM menu by navigating to

http://[your domain name]/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1


Scheduled Reminders - differentiating by contribution type In the User Guide it says that you can set up scheduled reminders to 'send to contacts who made a contribution of the selected financial type(s) with any combination of contribution statuses.'

However in the Scheduled Reminder interface if I select Contribution as the Activity I can see a drop-down menu for Status, but no way to specify the financial type.

I want an email to go out when contributions of financial type x, y etc are completed.

Any  help appreciated!

CiviCRM 4.6.24

Drupal

If I understand you correctly you have selected 'Activity' as the 'Entity' in the first drop down list.  Instead of 'Activity' you should select 'Contribution Type'.  You will then be able to choose the relevant financial types and contribution status (Ctrl-click to select more than one).

See the screenshot below (taken from the CiviCRM 4.7 demo site):

It sounds like you have already looked at the User Guide, but for the benefit of others here is the relevant page for more details: Scheduled Reminders

Please note that this functionality was added in CiviCRM 4.7.  It is not available in earlier versions of CiviCRM.  As you are using CiviCRM 4.6 perhaps you could consider upgrading to 4.7?


I need help finding an error in my installation I am mostly finished with moving our website from a Joomla installation to a Wordpress installation. I have been having problems getting the dashboard on CiviCRM to show, but I can access specific pages (such as the configuration page) by entering it directly.

In all this, I found I was getting an error in our hosting logs about accessing a directory that is no longer in use (a test directory that the new website was installed in). Upon contacting my host (Siteground) to determine what file(s) were giving that request, they recommended a plug in to Wordpress - Better Search and Replace.

I found that there were some 400 or more old links in CiviCRM tables to 'public_html/test' which was the test site. Since things are now moved to 'public_html', I changed all of those links in the database.

Now, when I click the CiviCRM link on the dashboard, I simply get "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.".

I pulled the CiviCRM logs after this found the following:

Jan 01 08:50:58  [info] $Fatal Error Details = Array
(
    [message] =>
    [code] =>
)

Jan 01 08:50:58  [info] $backTrace = #0 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(378): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(307): CRM_Core_Error::fatal()
#2 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:17))
#3 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#4 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm.php(1216): CRM_Core_Invoke::invoke((Array:3))
#5 [internal function](): CiviCRM_For_WordPress->invoke("")
#6 /home/nefc0709/public_html/wp-includes/class-wp-hook.php(286): call_user_func_array((Array:2), (Array:1))
#7 /home/nefc0709/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#8 /home/nefc0709/public_html/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#9 /home/nefc0709/public_html/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
#10 {main}

If anyone has suggestions, I would appreciate it!

Couple of things I usually do after migration

Check path and save Administer >> System Settings >> Directories.
Check path and save Administer >> System Settings >> Resource URL.
Delete template_c.
Rebuild menu and Trigger http://domain.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1&triggerRebuild=1
Run Cleanup and Cache.

(Also check if php CURL is installed on server)


How to find CiviCRM version in SQL from a database backup I have a backup of a CiviCRM database from some time ago that I'd like to inspect inside a test site. When setting up the test site, I want to use the correct release version to match the version at the time the backup was made. How can I execute an SQL query on this orphan database to determine which version of the CiviCRM codebase its schema is compatible with?

You could use phpmyadmin and look in table 'civicrm_domain' at field 'version' - the version is stored there.


CiviCRM 4.6.2 extra components in menu I just installed drupal 7 and then civiCRM on Linux Mint 17.1 in a VirtualBox

Install went smoothly.

I am only using CiviCASE and CiviReports moduals. Unfortunately, there are still menu items for Mailings and Campaigns.

Mailings and Campaigns are disabled components in my setup. The picture below shows the extra menu items and my list of enabled components.

I tried enabling/save/disabling but nothing got rid of those two menu items. The other component menu items did go away.

[edit] Here's what the drop down menu looks like for the extraneous Mailing menu item, as requested.

Any ideas on how to fix this? Is it a bug, a feature or easily fixed?

Thanks in advance for any help!

John in Oregon

There's a semi-documented "menu rebuild" commands that will probably help here. From your CiviCRM base URL, go to /menu/rebuild  e.g. on Drupal with Clean URLs, http://example.org/civicrm/menu/rebuild. Follow that with /cache/clear if necessary!


How do I set up a group mailing list I want to send a new event listing to all our members who have ticked a requesting information from us. At the moment when I choose the new mailing list option it's just a blank screen

The steps for creating a Mailing List are

create a Group of contacts (from a Search or other method)
set that Group to be used as a Mailing List

It is unclear what you mean by 'choose a new mailing list option'. It may help if you add some screenshots after (re)reading https://docs.civicrm.org/user/en/latest/organising-your-data/groups-and-tags/#group-settings-and-functionality to ensure we are all on the same page about what you are trying to do. Thanks


Using Search Builder to search on a field with custom location gives DB error On current CiviCRM demo site (4.6.10) if you

add a new location type, then populate a contact with an email address of that location type, then use Search builder to search for email address with location type, it gives error:

DB Error: syntax error

For completeness, my comment probably should have been an answer…

I think this is probably a bug.

It doesn't matter if you create a new location type or use a pre-populated one. The sql has a column that doesn't exists and it's going against the wrong table.
Here's the sql:

SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name
FROM   civicrm_contact contact_a
WHERE  ( ( LOWER(Home-location_type.name) = '8' ) )
AND    (contact_a.is_deleted = 0) GROUP BY contact_a.id
ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc

[nativecode=1054 ** Unknown column 'Home-location_type.name' in 'where clause'"

AlanGallery submitted a bug see comment above.


Upgrading to 4.7.7 gives Error "The website encountered an unexpected error. Please try again later." I am trying to upgrade from 4.6.16 to 4.7.7, although the upgrading process completes, and drupal site works perfectly fine, as soon as I go to civicrm URL i receive this error message. This happened when I tried to upgrade to 4.7.0 too.

Error: The website encountered an unexpected error. Please try again later.

I have followed upgrade instruction perfectly, all file permission is fine. Anyone knows where the problem may be?

Update: Log from civicrm

Feb 04 08:57:46  [info] $Fatal Error Details = Array
(
    [message] => Your database is not configured for version 4.7.1
    [code] =>
)

Feb 04 08:57:46  [info] $backTrace = #0 /www/demo/sites/all/modules/civicrm/CRM/Core/Error.php(366): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(191): CRM_Core_Error::fatal("Your database is not configured for version 4.7.1")
#2 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(81): CRM_Upgrade_Page_Upgrade->runFinish()
#3 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#4 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#5 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
#6 /www/demo/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:2))
#7 [internal function](): civicrm_invoke("upgrade")
#8 /www/demo/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:1))
#9 /www/demo/index.php(21): menu_execute_active_handler()
#10 {main}

UPDATE 2: Log when visited the upgrade url after the error message. Now i have Tried with 4.7.7, but still no luck.

 backTrace

#0 /www/demo/sites/all/modules/civicrm/CRM/Core/Error.php(367): CRM_Core_Error::backtrace()
#1 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(98): CRM_Core_Error::fatal("Your database has already been upgraded to CiviCRM 4.7.7")
#2 /www/demo/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(73): CRM_Upgrade_Page_Upgrade->runIntro()
#3 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#4 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#5 /www/demo/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
#6 /www/demo/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:2))
#7 [internal function](): civicrm_invoke("upgrade")
#8 /www/demo/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:1))
#9 /www/demo/index.php(21): menu_execute_active_handler()
#10 {main}

PHP Error message is quiet large one so its on pastebin
http://pastebin.com/wTZyNEf6

This looks like step 11 failed.  What happens when you visit:
* Point your web browser to the following URL (you should already be logged in to Drupal with administrator-level permissions):

*- If "clean URLs" are enabled
http://<your_drupal_home>/civicrm/upgrade?reset=1

*- If "clean URLs" are NOT enabled
http://<your_drupal_home>/?q=civicrm/upgrade&reset=1

Do you see errors after this?

(Sorry, I mixed posts in my head and missed the Drupal piece.  First version was for WordPress.)


Country selection UI in 4.7.x negative feedback I am in the process of upgrading sites from CiviCRM 4.6.x to 4.7.x.

One thing we have had to deal with in CiviCRM upgrades, is at each upgrade the list of selected countries always resets itself to United States only. Always I must make sure to stop in at URL:

Home » CiviCRM » Administer CiviCRM
Settings - Localization

/civicrm/admin/setting/localization?reset=1

And insure that all of the countries are in the selected / available list.

On previous versions of CiviCRM, this UI has been a simple HTML multiple pick list control. However with the upgrade to CiviCRM 4.7.x, now it is a fancy AJAX type pick list where I must click, click, click each country one at a time. This is a major PAIN / regression in functionality.

Please revert back to the simple HTML list control.

Oh, and the help text appears to not have been updated to the new UI. It is still as follows: "Available Countries - Which countries are available in the Country selection field when adding or editing contact addresses. Profile and Custom 'Country' fields also use this setting. To include ALL countries, leave the right-hand box empty. "

I am thankful,
Michael

Terrific! I found a work-around, and here it is! Using Firefox web browser, with the "Web Developer" tool bar extension, select Disable \ Disable JavaScript \ Disable All JavaScipt. Then reload the above specified URL. That will load the page WITHOUT the AJAX / JavaScript multi-select controls... and leave the basic HTML list controls. I was able to quickly select all the countries, and I am cruising along wrapping up this upgrade.


Donations linked with PayPal Members have profiles in CiviCRM database. Members have been donating monthly, and the donations register in PayPal but they are not registering in the CiviCRM. Why is this?

My first thought is that maybe your members are jumping straight to paypal-ing your email address rather than going through a civicrm contribution page such that civi could record the interaction. Cuuld that be the issue?

If that isn't it, perhaps you can provide more details as to your setup. What kind of page are your members using? What version of CiviCRM are you using? Are you on Drupal, or Wordpress? Tell us everything you can that might be relevant about your setup and hopefully someone can give you a hand.


How can I create early bird fees with Webform CiviCRM? In native CiviCRM I would do this with a priceset; how do I do this with Webform CiviCRM?

Add a field of type Date to the webform -> set it to default: now - and set it such that start date = now and end date = now; deselect the Enable popup calendar

Conditionals: example:

Hide the date field with CSS and hide your element with CSS - as you can see above mine is called today:

.webform-component--today {
  display: none;
}


How can I refresh a custom data tab in the contact summary? I want to store an email address (or phone or address) in a custom group when they are deleted. So if for contact John Doe the email address john.doe@example.org is deleted, it is stored in the custom group Former Communication Stuff. This works nicely on the pre and post hook but the custom group (which is Tab with table) tab is not refreshed when an email is deleted. And I would want the tab for the custom group refreshed when I delete an email address.

I have seen related questions here, notably Can I update/requery a custom field that got changed via another field on the same page?. However, this solution does not work for this case. I do not see any ID I can use in jQuery on the custom data tab, and if I do try to use one I get an error (just keeps running) either when adding the email again or when deleting the email.

I have one solution, which is to do a location.reload on the inline edit form, but that seems pretty rough. Any suggestions for another solution? And this is a going to be a generic extension, so anything that uses the random ID "#ui-id-17" does not work because the number could be different in many installs?

I think you can set something in postProcess hook to reload the tabs possibly below code but not sure, it does work for us when we update something in a form we update the contribution tab using below code

$form->ajaxResponse['updateTabs']['#tab_contribute'] = 1;

HTH

Pradeep


Sport organisation using CiviCRM I've been asked to help setting up CiviCRM installation for local judo association. Never used the system before so if I could get some guidelines how to setup the organisation in the system I'd be grateful.

I've purchased the 2 existing books for CiviCRM and most of the functionality is clear to me. But I'm not sure how to setup the association levels.
There are nationwide admins, then local clubs, their coaches and maybe extra secretary and at the bottom regular members (adults, kids and their parents).
Should I set up each club as separate "Organisation" level type or a group?
It is essential that coaches (and whoever is assign to particular club) only see their own club members and no-one else, obviously.

I'm using Civi on top of Drupal 7, if that's any help.

Any help appreciated.

Ralph

Welcome to civi. The approach I would recommend, having done it for several situations, is to use the Permissioned Relationship extension. This then allows you to daisy chain permissions so that local officer has a relationship to local club - and hence can see anyone how has the specified type of relationship to the club. Then you can also stack the local, regional, national (global) in the same manner, so a global officer sees everyone, the national sees everyone at or below the national level etc.

I have a diagram of this which may help explain the concept

So to answer the other part of the question head on, yes set up each club as an Organisation :-)

To extend that, what we have done is to then build drupal Views and Webforms which means the general club officer rarely has to actually go in to civi but get all their data, contacts etc from Views and Webforms (but that is jumping in pretty deep for a first time usage).

Happy to demo this quickly if it would help.


CivicCRM public event registration failing to display I am using Civi 4.7.9 and Wordpress 4.5.3.

When I create an Event and embed it in a Wordpress page, the entire Registration process is flawless, but only when I am logged in. When I test the process as the Anonymous User, it gives me the error:

Sorry but we are not able to provide this at the moment.
You do not have permission to access this page.

Return to home page.

I have insured, multiple times that the Wordpress Role permissions are correct. I have also insured that all the event settings are correct and that it is a public event. I have also insured that all custom registration fields are accessible to an anonymous user.

I think that my only recourse may be blow out all my permissions and ACL's and rebuild until I hit the error again. However, I thought I would post here in case anyone had seen this before and could give me options before I take this drastic measure. Any ideas?

I know that you said you've looked at this, but it sounds like a permissions issue.

According to the documentation you need the following permissions:

  View event info and Register for events:

  If you plan to use CiviEvent
  and want to allow online event registration, enable these permissions.
  Be sure to assign permissions for the "anonymous" role if you want to
  allow un-authenticated visitors to view and register for events.

If you have custom fields you will also need this permission:

  Access all custom data:

  You must enable this permission for any role which you want to view or
  edit custom data fields. EXAMPLE: If your site uses Profile(s) which
  include custom fields, make sure the role(s) that need to access these
  Profiles have this permission. Be sure to assign this permission for
  the "anonymous" user role if you want to collect information using
  custom profiles with custom fields.

You can find more information here: Permission and access control


How to Create a New Participant Profile I want to create a new Participants Profile which includes Participant custom fields. How can I do that ?

The only way I see is by copying/renaming the "reserved" Participant Status Profile, and adding my custom fields ; but I can't remove the Participant Status field from it, nor disable the original "reserved" Participant Status Profile.

So, when I want to multiple update (Action) some selected participants of an Event Search, I have the choice between those 2 Profiles which both contain the same Participant Status field (which is confusing).

As an alternative, how can I remove the "Participant Status" profile from this choice ?

You should be able to go to Admin > Customise > Profiles, then Add Profile, then add some Participant fields

There is a short lived example here http://d46.demo.civicrm.org/civicrm/admin/uf/group/field?reset=1&action=browse&gid=16


How can I preserve smarty date formating in message templates? I have a message template that we use to print letters for those joining our association. We want to include the end date for their memberships in the letter (This used to be printed on membership cards, but we have ditched them.)

If I search for the new members and display the results as memberships, I can include the token {membership.end_date} in the letter but it displays as, say, 2016-12-27 which is not commonly seen in Australia.

Our site settings include define( 'CIVICRM_MAIL_SMARTY', 1 ); so the following code gives the formating I actually want:

Your membership expires on:{capture assign=mem_end_date}{membership.end_date}{/capture} {$mem_end_date|date_format:"%d %B %Y"}

Unfortunately this is somewhat temperamental.  If I save the template when it is displaying the code and the next time I open it I select 'Source'  before opening the template, then the formatting is correct.

However, if I save the template when it is displaying the code and then open the template before I select 'Source' the next time I use it, the " is changed to " (see below) and I don't get any end date printed at all.

Your membership expires on:{capture assign=mem_end_date}{membership.end_date}{/capture} {$mem_end_date|date_format:&quot;%d %B %Y&quot;}

Is there some other way I can write things so that it will retain the formatting I want without the person who will be running the letters having to remember to select source before opening the template?

This is a Drupal7/CiviCRMv4.4.16 site.

You can stop ckeditor encoding quotes by editing ckeditor.js in /packages/ckeditor. There's a push command that begins 'quot,iexcl,cent,pound,curren,yen' - remove quot from this list. This isn't terribly elegant, and would obviously need doing on every upgrade, but I couldn't find anything equivalent in the ckeditor config files without disabling all html entities entirely.

Alternatively, if you don't need to use visual editor at all, you could separate the two entirely. Copy the content from the template into a .tpl file and put it in the templates directory somewhere (or in the templates folder in an extension). Then include in the visual editor with:

{include file=CRM/membership.tpl} (or as appropriate)

Then edit this file directly in whatever way suits.

(We had odd problems with the presence/non-presence of the $ sign in smarty tags when we included files like this, but that was a few versions ago so that bug may have been fixed by now.)


4.7.14 Wordpress 4.7 problem with contribution form Birth Date CiviCRM version: 4.7.14
previous version: 4.7.12
Wordpress version: 4.7

My contribution form experience problem at the "Confirm contribution" page.
Upon pressing Confirm Contribution, user is brought back to the "Confirm Contribution" page with error "Please confirm birth date"
The error does not make sense as a birthdate is already in place.
And multiple tries of replacing birthdate with a different value did not help

A forced downgrading to CiviCRM 4.7.12 resolved the issue - a contribution can now go through.

Please advise! :)

Hi there there was an issue due to a change made in 4.7.14, It has been fixed in the up coming 4.7.15 version however I would suggest probably the better option is to upgrade and apply the following patch to your code base. https://github.com/civicrm/civicrm-core/pull/9530/


Create Drupal users with custom usernames from Company Data? In my company members have a unique membership ID. Is it possible, that the Drupal users which are created by CiviCRM, can have this membership ID as the username and not the real name/email address as is used currently?

We would also like to use the members' date of birth as their password and set this automatically.

Thank you.

I am not sure if CiviRules allows the creation of a CMS user when a membership is created. But you could write a small extension that implements a hook to override the username (to use the member ID) and password (to use the Date of Birth) or implement a hook (post on membership) to create a CMS user when a membership is purchased (created),


Smart Group dropping search criteria on save I've searched the archives and see there are a number of posts pertaining to smart groups not saving criteria, but it seems those were bugs addressed in updates, and we are running the latest version of CiviCRM (5.9.1).
I have smart group made up of organizations whose membership is current (our memberships are company-based). However, I can't get the smart group to save the "Is a current member" search string. Instead, every time I update and save, it drops that setting and goes back to just "Contact Type In Organization" as the only criteria. This happens regardless of how I try to create or edit the smart group - it drops all selections from the Memberships tab. Is there a known bug or some other issue that could be causing this?
Edited to add - the smart group count is also not updating when clicked - all of the smart groups still say "unknown." Could this be a caching issue?
Edited 6/17/2020 - still observing the same issue on CiviCRM 5.25.0. Interested to know if anyone else is having this problem.

Had a test site upgraded to 5.10.0 today, and the smart groups settings (for case contacts- see comment above) are now working as expected.


Date field format changes when set to view only I made a custom field. The field type is a Date field. I set the date format to european (Dutch) settings: dd-mm-yyyy, with time = none.
I use the field in a profile that is published as a profile create form, where it works all right.
To allow a contact to view the data they sent trough this profile, I made a profile edit form as a menu item. After logging in, the contact can see this date field, but as view only.
In this last form the view only field presents the data as mm/dd/yyyy.

I checked all the places where date formats are set, changed everything everywhere to dd-mm-yyyy. This does not change the date-format in the view only field.

Is this normal behaviour, a bug or me doing something wrong?

It sounds like a bug, it should take the settings for the date/time, sounds like it does not.


Upgrade from CiviCRM 5.12.4 to 5.13.5 generates Sparkpost PHP fatal error We are running Wordpress 5.2.1 with CiviCRM 5.12.4. In trying to upgrade to 5.13.5, the database runs through the updates, but then we get the message: "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions." Afterwards, the bottom of the page says "Powered by CiviCRM 5.13.5", but under System Status we get the warning "CiviCRM 5.12 has reached its end of life." indicating the upgrade process didn't run through to the end. Looking at the error_log, there is a fatal PHP error and stack trace which looks like" "PHP Fatal error:  Uncaught Error: Class 'CRM_Sparkpost' not found in /home/britstatt/test.sdcbcdream.org/wp-content/uploads/civicrm/ext/com.cividesk.email.sparkpost/settings/Sparkpost.setting.php:8, referer: https://test.sdcbcdream.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fupgrade%2Fqueue%2Frunner&reset=1&qrid=CRM_Upgrade"

We have been using the Sparkpost mail extension since summer of 2016 and have never experienced an issue during the many CiviCRM upgrades since then, so I don't think this is a particular issue with that extension, although I will also ping cividesk. Since the upgrade process has always worked seamlessly, I wanted to throw this out there to find out what might be the matter.

Fwiw, I originally encountered the issue when upgrading from 5.10.3 to 5.13.5, but didn't dive into the error logs. So I ran the upgrade from 5.10.3 to 5.12.4 successfully, thinking doing the upgrade in steps might help. That worked fine, but the subsequent attempt to upgrade 5.12.4 to 5.13.5 generated the error again and I finally looked into the error log.

Our live site is running fine at 5.10.3, but I always run upgrades on a test mirror site, so this is not critical except we really want to move to 5.13.x which is supposed to be the next ESR, I thought.

See if https://github.com/cividesk/com.cividesk.email.sparkpost/pull/77 fixes your problem.  It's been merged but there has not been a release of the sparkpost extension since then so either pull from git or apply the fix manually - it's only one line of code.


Can CiviRules add a contact to an event? I've had a situation where we needed to offer a recurring payment possibility for an event. Hmmm... This is not at all native to CiviEvent as far as I can see. (I looked into using Webforms, as well as Repeating Events.)

The plan was to make a contribution page to create the recurring contribution subsription. So far so good! And then make a CiviRule to detect when a payment has been made as above. That's fine too.

And then use CiviRules to add the person to a specific event, preferably along with a statement in the Participant Fee Level fee.

However, it looks like CiviRules is not yet set up to registering people to Events. Is that true?

Thanks for your help.

Civi 5.24, Drupal 7.69.

Not at present - I've investigated this myself in the past.  You can find a complete list of actions in their repository (though of course other extensions add actions).

I considered writing the action but it turned out to be complex.  A rule that adds everyone to a pre-determined event is easy enough - but creating a UI that could handle actions like "Add contact to the next workshop" proved trickier and not worth the effort (for me, YMMV).


Can Civiccrm do this? I am volunteering for a non profit organization to implement the following functionalities in their WordPress website:

1.New members would have a registration form (with full range of personal, education, career and business fields including photo) for entering their complete profile

2.New members who have a front-end dashboard.

3.Members would have the ability to edit their profile through the front end dashboard

4.Members registration details would be fed into their profile and included in a general membership directory view-able to website visitors
I have never used civiccrm and since I have not found a full list of its features I wonder if it is capable to add them.

Thank you.

Welcome to CiviCRM

CiviCRM can do all the above listed features and more

But first you need know more about wordpress and CiviCRM - you can do this by palying around in Civicrm wordpress demo site which will give you more idea regarding your need

Demo Link: https://civicrm.org/sandboxes -
http://wpmaster.demo.civicrm.org/wp-login.php

refer: https://civicrm.org/will-civicrm-meet-your-needs

All the best for your CiviCRM Learning

I guess this helps !!!


CiviCRM Webform - Dedupe issue when using a shared address We use webforms to register adults and children for events and memberships within the organisation. We require that adults register with an e-mail address but for children we do not expect this.

We have been testing more advanced dedupe rules (first name and last name and post code) to make sure that when children are registered for events they are allocated to their original contact record in CiviCRM. For better user experience we want to only have the address inputted once.

For some reason when the child entry uses a shared address from the parent the dedupe functionality does not seem to work. This seems to have been a historic issue that which was fixed (https://www.drupal.org/node/1368534) and quickly reviewing the code the logic seems to be there.

Can someone help and let me know if this is something I am missing on the set-up or a genuine bug.

If it is a bug how do we go about submitting for this module?

Here is the commit originally made to fix that issue. I suggest you check the current version of the code to ensure that function is still working - seems possible that it may have been inadvertently broken during some restructuring around the way contact ids are stored.


can't delete Event Registration - web page hangs with spinning logo I am trying to delete several event registrations from an event, but each time I try with any of the contacts it fails. I get a pop-up warning that any corresponding payment transactions will be deleted and I click the tick/delete button but then I just get the spinning Civi logo and the webpage hangs like that.

The event registrations were created using a webform registering multiple people (parent and children) for the event at once. I turned on logging errors to the Drupal logs but there is nothing appearing there. When I refresh the webpage the participant listing is the same as before.

I can edit the participants and change their status to cancelled but cannot delete the registration. We're on Civi 4.6.5 and Drupal 7 with CiviHosting.

EDIT: I get this error message following @petednz advice:

Fatal error: Class name must be a valid object or a string in /home/../www/www/includes/common.inc on line 7963

Line 7963 is in bold below:

/**
 * Gets the entity controller for an entity type.
 *
 * @return DrupalEntityControllerInterface
 *   The entity controller object for the specified entity type.
 */
function entity_get_controller($entity_type) {
  $controllers = &drupal_static(FUNCTION, array());
  if (!isset($controllers[$entity_type])) {
    $type_info = entity_get_info($entity_type);
    $class = $type_info['controller class'];
    $controllers[$entity_type] = new $class($entity_type);
  }
  return $controllers[$entity_type];
}

This Drupal post is another recent user with error at the same line but different situation:

Viewing entity results in Fatal error: Class name must be a valid object or a string

Update to the latest version of civicrm_entity


Cache SqlGroup.php expiration_date-value not Positive Installed civicrm 5.20.1, Windows10, WP 5.3..
Install errors flag civicrm_cache.expiration_date, set in CRM/Utils/Cache/SqlGroup.php, in update and insert queries as FROM_UNIXTIME(%5) and FROM_UNIXTIME(%3) respectively, but no valid numeric arg values are supplied for expired_date like for created_date b/c $expires at line 133 isn't getting set correctly.

I replaced line 133 -134 in SqlGroup.php with this:
$ttl1 = microtime(1);
$expires = strtotime($ttl1) + self::DEFAULT_TTL;


How do I set up an API key for a user? The current documentation for creating an API key for user is on the wiki at https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers. Unfortunately there is not a release for the user friendly API Key extension for CiviCRM 4.5, 4.6 or 4.7. And the manual method is not very user friendly for those who are not programmers. How can a relatively non-technical user set up an API key that is needed for an extension, for example?

Hopefully a new release will be made for the API Key extension soon. Here are detailed instructions for creating one manually without needing to get access to your database through phpMyAdmin, mysql on the command line or some similar MySQL database administration tool.

Usually it is a good idea to create a special separate contact for each service that needs to use CiviCRM's REST API. Do this at Contact > New Individual, enter a name like Attentive.ly Service, and click Save. At the bottom of your page in small faint type and in the url you can get the Contact ID of the new contact.

Create a 16 character random value for the API Key, eg at http://passwordsgenerator.net/ with settings that exclude special characters, eg

Now use your CiviCRM installation's API explorer to set the API key for your user. Navigate to Support > Developer > API Explorer (/civicrm/api#explorer), and enter the following values then click on the Execute button. Note that the image shows Internal Contact ID as the fieldname. This is true CiviCRM up to version 4.6, but you'll need to select the Contact ID for versions 4.7 and above since it was relabeled in the API Explorer.

You will need to ensure that the contact is given a role that has the appropriate permissions required for the relevant Extension. At a minimum this will include 'Access AJAX API', and unless otherwise specified, 'Administer CiviCRM'.


CiviCRM Home says CURL is not installed but it is CivCRM version 4.6
PHP Version 5.6
CURL was installed with apt install php-curl

The CiviCRM home page insists that CURL is not installed but all indications are that is is installed. My phpinfo() shows that is it is. I can execute it from the command line.

I've searched for solutions but can't find it yet

CiviCRM has detected that the function curl_init is not available, and is showing a warning.

Commandline phpinfo() will show changes immediately (since PHP is started for each execution), while PHP in the webserver needs you to restart it separately to pick up new PHP modules. (These modes of running PHP also have different configurations loaded per default - but apt should already have enabled curl for each.)

You can verify this by checking phpinfo through the webserver (eg in Drupal, visit admin/reports/status/php; in WordPress you might need to use this phpinfo plugin or just create a phpinfo file in your site. If you see curl missing there, it could be a reload is all you need.

Depending on your webserver configuration (PHP can run as FPM, mod_php, etc), you'll need to restart the service (eg apache2, php-fpm) which runs PHP on your server. Most likely,

sudo service <your php service> reload

https://askubuntu.com/questions/6358/how-do-you-restart-apache
https://serverfault.com/questions/189940/how-do-you-restart-php-fpm


CiviCRM on Azure Not Finding the Server I am trying to install CiviCRM on Azure using the Wordpress for Linux web app and it appears CiviCRM is failing to find the MYSQL server. I've checked many times to see if the database information, including the MYSQL server information, inputted is correct and it's correct. I've even tried variations of the MYSQL server name, including using port numbers at the end, but it's had no impact.

I tried to install previous versions of CiviCRM to see if that would help, but the same error continues to show up. A similar question came up a few months ago, but I did not see a clear answer on how to resolve the problem.

Your database settings don't appear to be correct. All green, but still error!

I am wondering if this is a bug with CiviCRM that is specific to Azure or if it's something on Azure's side of things. I don't think it's on the Azure side of things because I can install Wordpress and use MYSQL bench with no issue using the same database information.

It looks like at the present time you will need to make a small hack to get the installer to be happy. The "does the server exist check" does NOT use the username/password and merely tries to connect as anonymous (https://github.com/civicrm/civicrm-core/blob/5.16.2/install/index.php#L1038). On azure this returns an error 9002, as opposed to the usual 1045 which gets skipped by the next line.

So you should be able to temporarily change that line to

$conn = $this->connect($server, 'username@com1group-mysqldbserver.mysql.database.azure.com', 'your password');

and then after install you can change it back. I don't have an azure database to test if that is sufficient, but just doing a command line test it returns the usual error 1045 so should work.


CiviCRM 4.6 - Duplicate memberships/memberships inheriting themselves. Screenshot included We have permissioned relationships where an Organization will own a primary membership and members will inherit this membership.

We've run into an issue where the Organizational membership will inherit its own membership and the only way to fix is to delete and re-create it. See the screenshot. Anyone experience this before?

There was a similar issue described for CiviCRM 4.3/4.4 posted on the CiviCRM forum here: https://forum.civicrm.org/index.php?topic=29822.0 -- but this does not seem to relate to our issue.

It could be that you have the Relationship setting on the Membership Type wired back to front. Can you pls provide details of the settings on the Membership Type, ie are you using Employer of, or Employee of, or something else, and please make it clear which is Contact A and Contact B in the Relationships


Civix: how to install and generate a skeletal extension (drupal) I've installed civicrm on drupal site (on remote virtual hosting). And I need to create an extension for civicrm.
As far as I know, civix is required for that. I've read https://github.com/totten/civix/ but can't install civix. I've downloaded archive, extracted it and put to /sites/default/files/civicrm folder and it doesn't work.
So where I have to place civix? Something else is reqired? Some executables or any other things?

And the next question: how to generate module extension using that civix? I've read https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Generateaskeletalextension - there are some things that I can't understand, for example "/var/www/extensions" - I have no such path in my civicrm.

The main civix download is a PHAR archive. You can generally execute a PHAR archive directly, without extracting it, as described in the README:

sudo curl -LsS https://download.civicrm.org/civix/civix.phar -o /usr/local/bin/civix
sudo chmod +x /usr/local/bin/civix

If it's a typical Debian/Ubuntu/RedHat server which you fully control, then putting the file in /usr/local/bin/ is handy. However, this is not required: as far as civix is concerned, you can put the file in any folder with any owner. For convenience, add the folder to the PATH.

Note: Some server admins/distros set up their own funky rules (e.g. via mount options or apparmor or disabling PHP extensions whatever) -- this is especially true on shared hosting. Unfortunately, only you and your admin can determine these types of things.


City shows 'contact.city' on Summary I'm not sure if this is a bug or a problem that I need to fix - one of my sites doesn't display the City on the Summary and only shows 'contact.city', e.g.

It's a multi-site running v5.10.4

I believe the 'Address Display Format' is not set properly in your system. Navigate to CiviCRM >> Administrator >> Localization >> Address Settings. Check values in 'Address Display Format' field. The contact.city should be inside open and closed curly braces eg {contact.city}.

Default value of 'Address Display Format'

{contact.address_name}
{contact.street_address}
{contact.supplemental_address_1}
{contact.supplemental_address_2}
{contact.supplemental_address_3}
{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
{contact.country}

HTH

Pradeep


Is it possible to apply an existing contribution to an event registration? My client runs camps which require a minimum $50 deposit. Campers send one or more additional payments until their registration is paid in full. Since CiviEvent doesn't support self-service for partial payments, we're considering not charging on the event registration page (set Pay Later and hide it), then redirecting the registrant to a contribution page after confirmation. A back office user will then apply that contribution to the pending registration.

I've tried editing registrations and contributions, but can't find a way to link them up after the fact from either direction.

Self service for supplementary payments for event registrations is not yet available in CiviCRM as of version 4.6.

As you likely know, it is possible to manually edit registrations to record additional payments, and to view all payments that have been made against a registration. When doing this it is possible to record notes to help document what is being done. As a work-around perhaps you could cancel the incoming supplementary payments of $50, and then apply them to the registration.

Alternatively, or in addition, we could set up a Make It Happen fundraising effort to get this into core.


Fatal Error on ClassLoader.php : undefined function stream_resolve_include_path() Has anyone received the following Fatal Error when installing CiviCRM?

Fatal error: Call to undefined function stream_resolve_include_path() in
/var/www/html/devCivi/modules/civicrm/CRM/Core/ClassLoader.php on line 194

My configuration is

OS: Linux
Drupal: 7.44
CiviCRM: 4.7.12
Php: 5.3.1

I am pretty new to all of this.

Thank you,

LAE

Your PHP version is not supported. The required PHP version is 5.5 (See CiviCRM PHP Requirements ). The function stream_resolve_include_path() was introduced in PHP 5.3.2. See PHP.net .


POST format for a chained create when I try to chain commands in the content body of a POST, the contact is created fine, but the chained address is not created. I am not OK with passing sensitive donor information as parameters in the URI (which is against the HTTP protocol specifications for a valid reason), so I need to figure out what the expected syntax is for body contents:

contact_type=Individual&first_name=joe&last_name=blow&api.Address.create={"location_type_id":"Home","street_address":"123 somewhere st"}

passed in the URI, the above works fine...

in the header I'm specifying Content-Type: application/x-www-form-urlencoded
and json=1 in the URI

CiviCRM allows you to send api params in POST by encrypting the params in json. Here is an example on how you can build api params used in REST call

http://www.domain.org/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","first_name":"test","last_name":"test","api.Address.create":{"location_type_id":"Home","street_address":"123 somewhere st"}}

You can use api explorer to build your params.

Thanks

Pradeep


Embed webforms into site that is custom php Our site is all custom php/html.  It is not built using tools like Joomla or Drupal.

Is it possible to embed webforms directly into our site?

CiviCRM standalone profile forms can be embedded anywhere. They are just cut-n-paste html snippets.
http://book.civicrm.org/user/current/organising-your-data/profiles/


How to force styles in CiviMail templates? When a basic user uses a template to write an email, is there any way to force the styles in the message? For example, the most common case is when the user creates links in the message body and these are set to default blue color links.
OK, when the template includes CSS styles in the message body these are applied correctly, but then, when you send it, there are some mail clients that do not display these styles and because they require inline CSS styles.

Any ideas or tricks?

You can force inline CSS with this extension.


Tax Label not updating in Price Set using _buildAmount Hook I have an extension in progress at https://github.com/jboeke/com.avietech.multitax

What I'm hoping to do is combine multiple tax rates into one. The extension properly rejiggers the tax values and actual amount as expected but NOT the visible price or description of the tax (i.e. - price-field-amount) to the right of the quantity input.

As you can see, my tax rate of 6.25% has been applied as expected and the Total Fee(s) reflects (20 * 1.0625). So why do I still see "$ 20 (includes Tax of $ 0)" when the expected value is "$ 21.25 (includes Tax of $ 1.25)"?

function multitax_civicrm_buildAmount sets, what I believe, are the relevant values:

$option['tax_rate'] = $totaltaxrate / 100;
$option['tax_amount'] = $option['amount'] * $option['tax_rate'];

Are there other values I need to set to change the description to accurately reflect the adjusted taxes?

I finally found my own answer. This is a known bug for text fields in price sets:

https://issues.civicrm.org/jira/browse/CRM-14823

Workaround as per the above link:

https://github.com/fuzionnz/civicrm-core/commit/3174c2e183bc8cfab9082353966a994a9a364bbb