What to do with "mcrypt" message after upgrading to PHP 7.2 What should I do about the following message in my CiviCRM status page, after upgrading to CiviCRM 5.3.0, PHP 7.2 from 5.6, and also upgrading my OS from Debian 8 to Debian 9:

  PHP Missing Extension "mcrypt". Your PHP does not include the
  recommended encryption functions. Some passwords will not be stored
  encrypted, and if you have recently upgraded from a PHP that does
  include these functions, your encrypted passwords will not be
  decrypted correctly. If you are using PHP 7.0 or earlier, you probably
  want to include the "mcrypt" extension.

Rather than downgrade to PHP 7.0, how do I know if I need this extension, if I was using it before, and what I can do to make sure I'm taken care of with regard to encryption? If I am on PHP 7.2, can I just ignore this message? Can I use something else since it was deprecated in 7.1 and removed in 7.2?

Upon trying to install it with the PECL library, I get:

  php-mcrypt : Depends: php7.2-mcrypt but it is not installable
  E: Unable to correct problems, you have held broken packages.

What is throwing me off is that part that says,

  "If you are using PHP 7.0 or earlier"

And if I'm not on PHP 7.0 or earlier, what should I do, install it anyway? Thanks!

As the author of that message, let me try and clarify ...

The mcrypt extension is (only) used to encrypt selected passwords, and "selected" as far as I know usually only includes the smtp password, (which you may not even be using).

The message is there that so that if you upgrade your php version and the new one doesn't include mcrypt, you are aware that your encrypted passwd(s) won't be unencryptable, and you'll have to re-input them.

Civi doesn't encrypt all passwds, and it's not a terrible thing not to encrypt them (these aren't user passwds, btw!), so the warning is just a convenience to avoid confusion and delay.

Now that mcrypt is no longer included in php, the message should get updated.

Conclusion: I'd stay on 7.2 if it's working otherwise.


Who can develop payment processor for Bank of America Merchant Services Would anyone be able to develop a payment processor for the latest CiviCRM version to work with the Bank of America Merchant Services? Can you provide a quote? We're using Joomla but I believe most/all of the payment processors are CMS-agnostic.
(Sorry if this is not the forum to ask this question - happy to take it elsewhere ;-)
Thank you

You can commission an extension, using the Core-Team or a Partner/Contributor. I suggest you set up a issue in the issue tracker first to see if the Core Team can give you an estimate.

You should also look at the other payment processor extensions, the folks who wrote them are most likely to be able do another, they should also be rewarded for their previously contributed code, by getting new work.

Resource on how to create a Payment Processor Extension


Problem with membership import I completed a membership import. Online screen messages indicate that the import was successful, but none of the members appear on reports and contacts do not have membership relationship.  What could be wrong?

I solved this problem.

When I did the initial import, I used a dummy start date value of 01/01/1961 for members that had a null value for start date. I believe this date caused the problem.  I changed the date to 01/01/1995 and the import worked, plus I can see the data.


How do I view cookie or session information on the server? This question is because of troubleshooting I've been doing on Why won't data entered into CiviCRM profile html snippet save?  Loading a Profile makes otherwise malfunctioning embedded forms work, and I suspect something is happening on the server side to allow access/give permission to something.

So: how do I view what's happening with cookie data in CiviCRM on the server side?  I've tried rgrep to search all files in the web directory for the cookie name, and have dumped the CiviCRM database and the Joomla database and searched for the cookie name.  I can't think of anywhere else to look.  Thanks for any pointers!

More debug titbits.

Your question sounds like you're looking for the submitted/missing value name in the codebase - this form field name is probably not mentioned in the codebase if it's a value configured in the DB, as the form will then be generated.

Also, this name (say "volunteer_reason") may have been "munged" to a degree thanks to HTML_QuickForm's naming form inputs (you might see "contact_1_volunteer-reason_1" or whatever).

The most frequent cause of these not being populated as expected is when there is a mismatch between the originating and resulting request URLs. For those purposes, http://www.example.org and https://www.example.org are not the same thing; neither are http://example.org and http://www.example.org

This comment almost makes it sound like you're hitting session initialization issues - and that including the iframe prevents this. Weird.


WYSIWYG stopped working in title tab I have civicrm 4.7.27 installed on Wordpress 4.9.1
Everything was fine yesterday when I created new contribution pages.  Then this morning I noticed that the Introductory and Footer message textareas of the Title and Settings tab of the Contribution pages are not loading the WYSIWYG Editor.  As far as I can tell, this is only happening in this area, and not any other area that relies on ckeditor/WYSIWYG, but I am concerned that because this came out of nowhere, that it will show up in other parts of the install.  Does anyone know what is going on?  Is it possibly a known bug with 4.7.27?  See screen shot for error messages.

Thank you

Solved.  The problem was caused by the new theme we installed.  The theme Super Mag is not compatible with Civi and will break of the wysiwyg functions.  Once uninstalled it worked properly again.


Smart group interaction with "display results as" options in advanced search I would like to create a smart group of Members by membership status and display that as 'Memberships' via the "Display results as.." field in the Advanced search. I want the Memberships display because it offers easy access to the 'Renew' option for repetitive off-line renewals as well as offering different options for exporting templates.

If I set up the search in Advanced search with "Display results as.." set to Contacts, the results page gives me the option for 'New Smart Group' with no problem. However the same search with the Display results option set to 'Memberships' does not have the option for "New smart group' with the results.

Am I missing something, or is there no way to create a smart group for membership display?
CiviCRM 4.6.24, Drupal 7

If you first create your smart group with the 'contacts' view (groups are by definition groups of contacts)... you can then search on 'group'=your group and 'display as'='memberships'. In my experience that works for smart groups as well.


CiviContribute: customize "find contributions" default view I'm using CiviCRM 4.7.27 with Wordpress and am trying to figure out how to customize the default results table that is shown when "find contributions" is run. Normally, the search shows a table with the columns: name, amount, type, etc. I would like to customize which columns are shown for the search result but cannot for the life of me figure out how to do this.

I tried to create a profile with the columns I want to view and enabled "Used for: search views". However, when I tried to add a Contributions field to the profile, I got the error "Contribution cannot be used as a result column for profile searches."

Also, supposing I was able to create the profile with the fields that I want, it is not clear how to use it for the search view, since the "find contributions" page does not seem to allow a view to be chosen. Also, the "advanced search" page does not show the profile I created in the "Display Results As Views For Display Contacts" dropdown menu.

Any help would be much appreciated! BTW, this was the reference page I consulted to try to get this feature to work: https://wiki.civicrm.org/confluence/display/CRMDOC/Format+Advanced+Search+Result+Columns

Through UI there is no such settings to alter the columns of Components Search results such as Contribution, Membership etc. You can achieve this by using Search Column hook.

HTH
Pradeep


Setting up unsubscribe page Currently using CiviCRM 4.1.11 and Joomla 4.6.8.

We're looking to set up a newsletter and that will require an unsubscribe page. I gather that you use a token to set up an unsubscribe link but does that actually set up the unsubscribe page or do I need another way?

You can set up a profile that includes the field Contacts > Groups.

Then send the link to that profile in edit mode, in Joomla the url will look like: http://joomla.demo.civicrm.org/index.php?option=com_civicrm&task=civicrm/profile/edit&gid=1&reset=1

This url is the modified Create Mode (changing create to edit). To see how to get that click here

The user will need to be logged in to make changes. You can send a token in an email by adding &id={contact.contact_id}&{contact.checksum} to the url.


How do I access the JavaScript API via a WordPress theme template? I've taken a look at the docs here under "Use on Non-CiviCRM Pages" but I'm coming up empty when trying to access the CRM object via JavaScript.

http://wiki.civicrm.org/confluence/display/CRMDOC/Javascript+Reference#JavascriptReference-UseonNon-CiviCRMPages

In functions.php I've tried this:

civicrm_initialize();
$manager = CRM_Core_Resources::singleton();
$manager->addCoreResources();
$manager->addScriptUrl(path-to-ajax.js);  // looking around through the available scripts this seemed the obvious candiate

I can get it to load scripts via wp_enqueue_script, but I have no idea which scripts it needs. The docs appear to suggest that it should just magically load everything into the header but that isn't the case for me. The CRM object is never defined.

What I want to do is grab the event list in JSON format.

Any clues? What am I missing?

One way would be to write your own AJAX handler in the usual WordPress way and then grab the event list via the CiviCRM API. Untested pseudocode:

// add AJAX functionality
add_action( 'wp_ajax_my_civi_get_event_data', 'my_civi_get_event_data' );
add_action( 'wp_ajax_nopriv_my_civi_get_event_data', 'my_civi_get_event_data' );

/**
 * Get data from CiviCRM
 */
function my_civi_get_event_data() {
    civicrm_initialize();
    $civi_data = civicrm_api( 'event', etc etc );
    $data = my_process_civi_data( $civi_data );
    echo json_encode( $data );
    exit();
}


Smart Groups - cannot get smart groups to refresh I have read as much as I can about smart groups but I am having problems that I am not able to solve. I have a smart group which shows the same SQL as an Advanced Search but they produce different results.

If I refresh the smart group cache I get the same result.

Some clarification about 'getting smart groups to refresh'

I assume you are using the button 'update smartgroup counts' from the Manage groups screen. This could perhaps be better called 'calculate missing smartgroup counts' (although that wouldn't fit on the button.....) - that button causes the count to be calculated for all groups that the cache has not been built for.

Groups are only recalculated if they have aged out - by default the smart group timeout is 5 minutes. Pretty much whenever you save a contact it attempts to delete the cache for any smart groups that are more than those 5 minutes old (you can set the cache to less than 5 minutes or 0 for more caching). It will then re-fill the cache for that group next time you access it.

If you barely ever edit contacts I guess the cache might not get cleared as often as it 'should' - you can schedule a job (Job.group_cache_flush) to run however often you want - if you do this it makes sense to set the setting 'smart_group_cache_refresh_mode' to 'deterministic' to stop it from also clearing on contact edit (note that this is often good to do for performance reasons)


Why does the donation process not produce a receipt either on screen or dispatched by email to donor? We have joomla 3.6.2, CiviCrm 4.7.10 and PayPal Express (PP)
Donor receives an email from PP stating you sent a payment to ....
Donor should also receive an emailed receipt from CiviCrm but does not
Donor should also be returned from PP to an online receipt but is not, instead sees a red error page.

Where do I start looking for the answer!??

error message is
CiviCRM-001 -   @import url(/components/com_civicrm/civicrm/css/civicrm.css); @import url(/components/com_civicrm/civicrm/bower_components/font-awesome/css/font-awesome.min.css);    Sorry but we are not able to provide this at the moment. Failed to update contribution in database Return to home page.    function toggle( element ) { var parent = element.parentNode; var className = parent.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { parent.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { parent.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

'Failed to update contribution in database' tells us that your Contribution is never fully completed on the CiviCRM side of things - and hence it will not get to the part where CiviCRM sends out a receipt.

In other words - the monies are processed on the PayPal side of things - but when CiviCRM hears about it - and is trying to record that the transaction was successful - it runs into a Failed to update.


Contribution pages look strange on mobile We are having problems when viewing our contribution pages on mobile platforms, because of the width of the screen some of the text is shown on top of other text, making it hard to read:

We have the same problem in many other places on our contribution pages

Tested on iOS+Safari and on Android+Chrome

What is the easiest and most future-safe way to fix this problem?

Grateful for help and with kind regards,
Tord

Render all CiviCRM public pages in a responsive CMS theme (eg a bootstrap one) and then add some css for the labels - I typically position the labels above the input boxes (on form) and above the answers (on confirm and thank you) for small screen sizes.


Default header and footer is not being recognized CiviCRM 4.6.0

Default headers and footers are not being recognized so, unless I included the required tokens in the body of the email, Civimail will not send a test or schedule the email.

There was a typo in my original post. Version has now been corrected.

You can fix this by upgrading to the latest version of 4.6.

Specifically the issue is https://issues.civicrm.org/jira/browse/CRM-16237


"DB error: already exists" when creating a Drupal user who already exists as a Contact in CiviCRM I'm running CiviCRM 4.7.10 and Drupal 7.50.

I have had a Civi database for a while, but am now wanting to give people front end accounts in order to use some features there.

My problem is that when a user, who is already a contact in Civi, tries to create a Drupal account, they get the rather unceremonious "DB error: already exists".

I'm confused because I keep reading that Civi is set up to automatically merge new users with existing contacts on matching emails (or whatever criteria is set in the Unsupervised deduping settings for Individuals - mine is using email only at the moment).

I would love to understand how this is supposed to work and how to fix it when it doesn't.

Thanks,
Lewis

How are you trying to create these Drupal user accounts? We have used User Import module : https://www.drupal.org/project/user_import - for this and it works great. It's really neat in that you can export a Group of Contacts from your CiviCRM -> batch CSV upload them into Drupal using user_import module + create AccountNames (e.g. FirstNameLastName format) and/or dispatch links to everyone as you create their accounts.

For details please see here: https://wiki.civicrm.org/confluence/display/CRMDOC/Creating+a+Drupal+user+for+every+CiviCRM+contact


New install, system status says "cron not running" and "timestamp mismatch" Running CiviCRM 4.7 on WordPress 4.7.3, hosted on a shared Linux server at 1and1.com. The WordPress site is using PHP 7.0 but apparently the latest version I can use from the command line is 5.5.

Two problems (perhaps related?)

The system status screen says "Cron not running". Cron is running.  I currently have crontab sending me an email every 15 minutes using the cronTest.php file which contains this:

<?php mail('cronuser@gmail.com','Cron Job Test Script',phpversion()); ?>

That is working, sending me the email and reporting PHP version 5.5.38.

I'm also trying to use cli.php to execute the CiviCRM Job, but that doesn't seem to be working.

Here's my whole crontab (with sensitive info changed):

*/15 * * * * /usr/bin/php5.5 /mysharedserver/homepages/34/d11111111/htdocs/cronTest.php
*/15 * * * * /usr/bin/php5.5 /mysharedserver/homepages/34/d11111111/htdocs/mysubdir/wp-content/plugins/civicrm/civicrm/bin/cli.php -s mydomain.org -u cronuser -p cronuserpassword -e Job -a execute

I have also tried wget in crontab without success:

0 * * * * wget -O - -q -t 1 'http://mydomain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php'?name=cronuser&pass=cronuserpassword@&key=mysitekey

I also tried wget with the single quote after the site key.

The timestamp error in CiviCRM system status says:

Timestamps reported by MySQL (eg "2017-04-11 14:58") and PHP (eg "2017-04-11 18:58" ) are mismatched

I have checked the PHP time using date_default_timezone_get() in the folder where WordPress is installed, and using SQL CURTIME() and CURDATE(), the times and dates match -- both show the time and date in New York. I have also created a php.ini in the directory where WordPress is running, with a directive setting the time to America/New York:

date.timezone = "America/New_York"

So CiviCRM must be getting its PHP time somewhere other than in the directory where WordPress is installed? I thought maybe that would be the directory where PHP 5.5 is running, so I tried running the PHP function date_default_timezone_get() in /usr/bin/php5.5 and got:

X-Powered-By: PHP/5.5.38 Content-type: text/html date_default_timezone_set: America/New_York

Using this SQL command:

SELECT @@global.time_zone, @@session.time_zone

I get SYSTEM for both values. I haven't pursued the SQL question any further than that, since the SQL time seems correct (New York time).

I'm looks to me like the PHP time is the problem, but I'm not sure where to go from here.

The first thing I would check is the TimeZone setting in WP.  Go to Settings--> General.  That cannot be the default (UTC +0) as the default does not exist in php (UTC does, but not UTC +0).  That should solve the TZ mismatch.  Best to use one of these - http://php.net/manual/en/timezones.america.php  for NY I'd use America/New_York

As far as cron, I recommend that you set it using the wp-cli method as detailed here:  https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs


How to include an opt-out link (with token) in a reminder? I'm new to working with Scheduled Reminders, and am trying to figure out how to include our org's standard forward, opt out and sent-from info in each reminder, as we do with bulk Civi emails.

Our email template includes this:

====

To forward this to a friend {action.forward} To never receive any email from the RFC {action.optOutUrl} This email is sent from: {domain.address}

But those tokens don't seem to work when I copy and paste into reminders. I don't understand why, or how to properly set up forward, opt out and sent from address in reminders.

This can't be done - because that token was created with CiviMail in mind.  There was a sense that scheduled reminders wouldn't be used for something that required an opt-out - but of course, people always want to use the software in new and interesting ways!

Unfortunately, I don't think you're going to get this one unless someone writes an extension to do so, or submits a patch to core CiviCRM.


Can Webform CIviCRM module do Line Items (PS yes it can!) How can we sell a Membership and a Calendar (that we should charge Sales tax on) and let the user make a Donation all on the same Webform Civicrm page - in a way that only the Donation amount is eligible to receive a charitable tax receipt?

As of last week you can now create Additional Line Items with webform civicrm module (which is a Drupal/CiviCRM integration module). Coleman and I are thankful to Wilderness Committee (Canada) for sponsoring this new feature!

if you'd like to try this out before a next dev-release - you can download the latest webform_civicrm code from: https://github.com/colemanw/webform_civicrm.git
with the latest code in your Webform -> navigate to your CiviCRM tab -> Contribution tab and you'll see the new Configuration option 'Additional Line Items' at the bottom of that tab. In this example we'll use two and we'll let the user select their own financial type (of course you can configure that to any static financial type as well and/or hide these fields from the form the usual webform civicrm way)

Configure the new fields -> We need to charge Sales Tax on the Calendar - while ensuring the Donation is of type Donation so that it becomes eligible for a Charitable Tax Receipt. We have also configured the form such that the user can add a Membership (and be charged the proper amount for it).

View/fill out the webform:

Next Page:

Contribution created in CiviCRM!


Outlook iCal does not work? When an activity is assigned to a user and an email is sent to the assignee with the calendar appointment, the ical is attached. However, when I open the file in Outlook 2013, it says "Meeting cannot be found in the calendar." I'm unable to save/add the meeting date into my calendar. Is there a way to resolve this?

I've also tried the activity iCal module, and I haven't been able to find a solution to add activities to Outlook effectively.

I think this is resolved. After researching prior problems with icals, I found this reference: https://stackoverflow.com/questions/15084236/icalendar-does-not-create-an-event-for-organizer

By changing the METHOD: REQUEST to METHOD: PUBLISH in templates/CRM/Activity/Calendar - Outlook users are essentially inviting themselves to their events (and the possibility to including others who are not Civi users).

Note: However, it looks like the notes aren't being pulled into the ical, and I'm not sure if this should occur or not.


mailchimp extension error, php 7.1, civi 5.10.4, drupal 7.x with civi 5.10.4, Drupal 7.x and php 7.1 there is a warning that in some cases turns into a fatal error that will prevent the webhooks from working

Declaration of CRM_Mailchimp_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) in /path/to/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php

CiviVolunteer had a similar issue, following the example in that fix I was able to get mailchimp extension working. https://github.com/civicrm/org.civicrm.volunteer/pull/477/files

I'll submit a pull request soon but in the meantime if anyone is having the same issue the fix is

remove:    class CRM_Mailchimp_Permission extends CRM_Core_Permission {

add:    class CRM_Mailchimp_Permission {

and

remove:    return parent::check($permissions);

add:    return CRM_Core_Permission::check($permissions,NULL);

if interested, issue in the extension's github is https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp/issues/319

patch:

index 5b82f65e..76c816dc 100644
--- a/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php
+++ b/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php
@@ -1,6 +1,6 @@
 <?php

-class CRM_Mailchimp_Permission extends CRM_Core_Permission {
+class CRM_Mailchimp_Permission {

   /**
    * Returns an array of permissions defined by this extension. Modeled off of
@@ -35,6 +35,6 @@ class CRM_Mailchimp_Permission extends CRM_Core_Permission {
         }
       });
     }
-    return parent::check($permissions);
+    return CRM_Core_Permission::check($permissions,NULL);
   }
 }


How to make home address default? The billing address of the user is always the default in CIVICRM. I really need the home address to be default. Is there a way to do this?

The billing address is generated from the payment processor, so paypal standard or ubercart.

Drupal 7. CIVICRM 4.5.8.

Thanks,
Andy

You can set default Location Types From this menu:

Administer>Customize Data and Screens>Dropdown Options>Location Types


User Log-Ins at the same time Can you tell me how many people can log in at the same time with one user name?  We are setting up video training in which multiple users will need to log in.

I take it the video training is not what they are logging in to, but rather the CiviCRM system. There is no 'limit' but there will be server constraints. Depending on your server config, if you have 50 users and they all click on a complex query (such as an Include/Exclude Smart Group) then you may see smoke coming out of the screen ;-)

But fundamentally there is no limit to logged in users (which is a CMS issue rather than a CiviCRM issue anyway)


How to create joint accounts in CiviCRM contacts I am coming from a database that has support for joint accounts. Basically, it has First Name, Last Name fields and then a secondary First Name,Last Name for a spouse or partner in one donor record. It also has support for printing out "John and Mary Smith" in mailings and the like.
I have looked at Household accounts but that seems to only have a Last name for the household. It's not clear how to have a joint account.
How are couples handled in CiviCRM ?

The short answer:

When you want to store information about two people (e.g. "John Smith" and "Mary Smith") together, create a new household.
You can name the household whatever you like (e.g. "John and Mary Smith", or "Mary Smith and John Smith", etc)
Add shared information like home phone number (land line) and home address to the household record.
Also create individual records for each of these people. Now you have three contact records.
Create relationships between the individuals and the household. You can also set up the individuals to use the address of their related household.
Add other data to the individuals which is specific to them personally (e.g. cell phone, email, birth date, gender, etc.)

The long answer:

While you're in this phase of deciding how to store your data in CiviCRM, I would suggest first taking a step back and considering why you might need to store data associated with multiple people, and if it's worth it to use households at all (because some organizations choose to disable them entirely and only use individual/organization records). For example:

Contributions:

When using households: If you receive a check with two names on it, an intuitive approach is to store this contribution on the household record.
When using only individuals: Another approach is to store it on one individual and soft credit the other one.

Event participations:

Regardless of your household strategy, it's best to keep event participations on individual records.

Memberships:

You can store memberships on household records or individual records, or some combination thereof. How you choose to do so will likely depend on your overall membership strategy

Relationships

When using households: relationships are created between individuals and their shared household. This makes it somewhat cumbersome to navigate from individual to individual because you must first navigate through the household
When using only individuals: you can set up a relationship type like "Spouse" to store the connection between two people and easily navigate between their records

Combined solicitations:

When using households: If you are sending a paper mailing, you can use CiviCRM to generate a mailing list which uses households to group contacts together and avoid duplicate mailings.
When using only individuals: grouping related individuals into the same mailing piece will be more difficult and probably require some custom work
This, in my opinion, is the biggest argument for using households

Keeping your data clean:

When using households:

Creating the requisite relationships and extra records is more work
De-duping is somewhat more complicated
When two people split up, it can be a pain to figure out what to do with their household record

When using individuals:

De-duping is simpler
Setting up the relationships requires fewer steps
Relationships can be disabled (even with an end date)


free events with optional donations I want to offer a free event with an optional £5 donation. I can set this up easily with two different fee amounts, but it won't allow me to have the zero amount as the default which I feel is appropriate for an optional donation. I always hate it when a form has an optional donation pre-ticked and it actually discourages me from donating. How can I get round this?

You can do this with Webform CiviCRM module! I whipped up some screenshots for you to show you how. Participant Fee is entirely by Donation in this case. I registered twice: once leaving the Participant Fee at $0 and once deciding to donate $40 (in which case the user gets prompted to enter credit card details; in the $0 of course they don't).


Making name badges for an event I have a few Name Badge Formats entered in admin > system settings > option groups > name badge formats. One is a custom one that I've created and there are a few that were already there.

The Problem I'm having is that when I go to manage events and try to select a name badge format the select list has no options, I have no way of choosing anything. Is there something I need to do to enable these formats? If so, I'm not seeing that option anywhere.

I think you need to define your Name Badge formats at Administer menu >> CiviEvent >> Event Name Badge Layouts and not the "Option Groups" section.


PxPay Recur Payment gets stuck in pending mode CiviCRM 5.3.1 with Omnipay extension 2.5

Added a PaymentExpress PxPay processor. After setting up a recur contribution for a contact the first payment is done successfully without any errors.

The second payment run by the scheduled job ProcessRecurring only records a pending payment for the contact. The job log at civicrm/admin/joblog?jid=18&reset=1 shows only the starting of the execution message. There is no Finished indication of the job so it seems it errored in between and aborted the execution.

There is a success message in the ConfigAndLog file at the same time when the above job was started at 00:41:45-

Aug 10 00:41:46  [info] Contribution record updated successfully

Aug 10 00:41:46  [info] Success: Database updated

But, when I check the log tables, the contribution was never set to completed.

If I execute the job manually the recur payment is completed successfully.
If I manually run the completetransation API from the API explorer, it correctly completes the payment.

So there seems to be no way I can replicate this behaviour from my side. It is just that the automatic cron job fails to give the proper result. Shrug.

No error reporting in the system log table -

  295    payment_notification processor_id=11    {"q":"civicrm/payment/ipn/761/11","result":"00001100039341640bfef9f4cb5d3c06","userid":"****","IDS_request_uri":"/civicrm/payment/ipn/761/11?result=00001100039341640bfef9f4cb5d3c06&userid=****","IDS_user_agent":"***"}

Can anyone point out what is wrong happening here?

UPDATE: There is no system log entry for the recur payment. It seems the return URL is not triggered when the job is executed.

We contacted the payment express and asked them to setup the PxPost creds for the client and then the recur started to work properly. Seems it is a necessary config for recur to function correctly using the automatic cron execution. Below lines is from Rishabh(Payment Express team member)

  The PxPay 2.0 is only used to tokenized the card details and PxPost runs in the backend to rebill those tokens in automatic process.

  You will not be able to rebill the tokens automatically, until you have PxPost setup in the backend.

Thanks :-)


Multiple value field makes Listing loop I'm modifying /templates/CRM/Profile/Page/Listings.tpl to a specific customer need. The profile I need to show using that includes a Multiple Value custom field.

When I tried the Listing with a record (Contact ID) with more than one value in that custom field, is shown multiple times that Contact ID, each one with one value from the Multiple Value custom field.

I turned debug on and the $rows array really shows multiple entries, each one with one value from the Multivalue field.

No matter if I turn is_multi_summary => "1" on or off, it doesn't change anything.

The code from Listing.tpl I'm working on looks like that:

  {foreach from=$rows item=row name=listings}

{$row.2}

{$row.1}

{$row.5}

{$row.7}

  {/foreach}

Also, makes no difference if I use the original loop to show the values, like that:

  {foreach from=$row key=index item=value}
    {if $columnHeaders.$index.field_name}

{$value}

    {else}
      {* $value *}
    {/if}
  {/foreach}

Things still got duplicated.

Is it possible to says Smarty to show the Multivalue Field only once, with all the values inside? Like a localized "foreach"?

Answer or sort of.

First you cannot pass numbers as index ie. $columnHeaders.1.whatever smarty will print just $columnHeaders

Second, same applies for $rows, I guess it holds an array of arrays with perhaps an id for each array with the custom fields, or just an index, if that's the case you need to nest your loops.

Example:

{foreach from=$rows key=index item=row}
     {foreach from=$row key=field item=value}
        <p>{$field}: {$value}</p>
     {/foreach}
{/foreach}

Hope that gives you a hint and helps.


drush requires civicrm to be enabled when installing in saltstack I am trying to use saltstack to provision a centos 6.7 system that has drupal and civicrm. I have civicrm as a tar ball that I extract into sites/all/modules before trying to install. I am able to do all the provisioning without problem until I need to install civicrm with drush by running:

drush civicrm-install

This command works perfectly fine when I ssh into the target machine and execute it directly in the shell, but when the command is executed through saltstack I get this error message:

Command civicrm-install needs the following module(s) enabled to run: civicrm.
The drush command 'civicrm-install' could not be executed.

I have already tried clearing the drush cache using drush cc, I have tried putting the command in a bash script and running the bash script from salt, and I have already placed civicrm.drush.inc in ~/.drush with no luck. Can somebody tell me what drush is missing from the environment in order to execute correctly?

[edit] More detail on what I have already tried for clarity.

Turns out that when running in saltstack drush can't resolve the right environment variables to find ~/.drush. I put civicrm.drush.inc in my drush/commands directory and it fixed the problem.


Permissions error message using Profile (gid=12) in Online Registration The following Message is returned when Users click on the Link to register for an Event.
"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 requested Profile (gid=12) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance."
The Permissions for Anonymous users have been set to allow "register for events" and "view event info".
Using the Registration (test drive) the profile is accessed OK. When I also test by sending myself the link by email it also works OK. However for another user (with Data Manager role) the error message is returned.
The Profile (ID=12) is a standard profile - "Your Registration Info" setup for Events.
So I am not sure the message is describing the problem sufficiently. Any suggustions?

It sounds like you need to give anonymous and Data Manager users the 'CiviCRM: profile create' permission, and likely 'CiviCRM: profile edit' and/or 'CiviCRM: profile view' additionally.


What are typical drupal 7 absolute resource URLs? As the question says - what are the typical drupal absolute resource urls?

Is it:

CiviCRM Resource URL  https://example.org/sites/all/modules/civicrm/
Image Upload URL https://example.org/sites/default/files/civicrm/persist/contribute/
Extension Resource URL https://example.org/sites/default/files/civicrm/ext

or is it:

CiviCRM Resource URL  https://example.org
Image Upload URL https://example.org/civicrm/persist/contribute/
Extension Resource URL https://example.org/civicrm/ext

or is it something else

If you install a drupal 7 tarball and mostly keep clicking next, and then install a civi tarball and mostly click next, it's the first set you've listed.

It is definitely not the 2nd one.

But to be fully absolute you need to include http:// or https://


Targetting CiviCRM input field labels with css I can see how to hide an input field using custom css, but I cannot figure out how to hide the specific label for that field. All the labels on the contact form seem to have the same selector. I am missing something?

You can use an attribute selector in css, for example

  label[for="middle_name"] {   display:none; }

For more info see:
http://www.w3.org/TR/CSS21/selector.html#attribute-selectors
or
https://stackoverflow.com/questions/2599627/how-to-select-label-for-email-in-css

Does even work in IE, from version 8.


PCP is still active after contribution page is disabled The current behavior of civicrm keeps the PCP as active even if the contribution page related to it is disabled.

A real problem with this is you have someone who has made a P2P contribution page who might have no clue the page has been disabled by a site admin and is out promoting the page!

Thoughts on expected behavior?

Disable PCP manually when CP is disabled.
Keep PCP as it is and change the error message on PCP load.
Disable the PCP and send an email notification to the creator.
The current error is perhaps the correct and enough response to be shown to the user

Ok I was able to confirm this is also happening with Event PCPs - though the error message is a little easier on the eyes - which really helps (the red and black letters on the yellow background you get for 'not available' Contribution PCPs make it look like the site is broken).

Re: Answer as to what should happen may be different for Event PCPs vs Contribution PCPs - I'd be in favour that the PCP remain non-functional. Once you conclude an Event and have done your books/finances on it you want to be able to file it. Same with Contribution PCPs (which will often have a Campaign associated with it). There needs to be a date where you can say with confidence: this Event or this Campaign raised $x;

So my vote would be for option 4 [a nicer error message] - you may be able to get that into Core without too many issues.

For our Event PCPs we use Views to get people to their nice looking PCP page - which then with a Donate button links to the donate page that will show the 'currently unavailable' message. That means we have the option to notify donors ahead of time that the Event/Campaign is no longer active by filtering out non-active Events in the View - and in addition: people are naturally promoting their nice looking PCP page - which remains active/functional. But there we could grey out the button.


What do you use for captcha? Do you use captcha on your forms? If so, do you use Google Recaptcha or something else?

We don't want to get spam, but we also don't want to create a hurdle for people filling out the forms.

What's your recommendation?

Thanks in advance!

I like CiviHoneypot.

I don't know why the author says to use ReCaptcha first.  I find ReCaptcha too invasive and I've successfully used CiviHoneypot to solve carder attacks.


Can a profile submission redirect to a PDF? On CiviCRM 4.5/Wordpress 4.1, I'd like to create a profile that, when filled out, automatically downloads a PDF.  Is such a thing possible?  It didn't work when I put a URL to the PDF in the "Redirect URL" profile setting.  Is there another solution that's end-user friendly?  Could the Redirect Editor plugin be of assistance here?

How about redirecting the user to a page that has the pdf download link? Granted its not automatic...


Parse error just appeared Our volunteer group uses Civicrm. It runs under Drupal. We host with ..(cough cough) Godaddy. Recently their Cpanel automatically switched us from PHP 5.4 to 7 and our Civicrm 4.7.7 crashed with errors.

To cut a long story short after their techs told us it was a malicious attack, and we went into melt down changing passwords etc, we find it was simply the PHP version change.

So back on topic, we had our Civi working fine under 5.4php and after the crash we went back from PHP 7 to 5.4. Now just one of our reports throws an error:

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in at line 304

Here is the code around line 304

),
      'civicrm_membership' => array(
        'dao' => CRM_Member_DAO_Membership::class,
        'fields' => array(
          'membership_status' => array(
            'title' => ts('Membership Status'),
            'name' => 'status_id',
            'default' => TRUE,

This is line 304 specifically: 'dao' => CRM_Member_DAO_Membership::class,

After doing some reading i found a statement that the use of the word class in php is a reserved word and shouldn't be used. Not really sure what that means. However Our report that was working no longer works.

Am i missing maybe a duplicate here or is it something more than i can handle?

Cheers and Gday from Australia

You are using quite older version of CiviCRM, I would recommend you to upgrade CiviCRM to 4.7.31 or 5.2.1 rather fixing core code to handle php7. The newer version does support php7. And also since 4.7.7 there has been many security releases(since you had malicious attack) and includes many fixes.

HTH

Pradeep


Set Default Value for Custom Field I am trying to set custom fields in a Custom Group. Here is my code:

function dfi_civicrm_buildForm($formName, &$form) {
  if ($formName == 'CustomData') {
    if ($form->getAction() == CRM_Core_Action::ADD) {
      echo 'Hello World';
      $defaults['custom_160_-5'] = mt_rand();
      $defaults['custom_70_-5'] = '23/10/2019';
      $form->setDefaults($defaults);
    }
  }
}

I have added it as an extension. It is not working even the Hello World isn't showing.

Thanks

Moe's answer is technically workable - but oof ouch my performance!

Instead, something like this:

function getElementNameFromFieldName($fieldName, $elementIndex) {
  // This function could be further optimized so it's only called once, but meh.
  $elementNames = array_keys($elementIndex);
  foreach ($fieldNames as $fieldName) {
    if (strpos($elementName, $fieldName) === 0) {
      return $elementName;
    }
  }
}

if ( $formName == 'CRM_Contact_Form_CustomData' || $form == CRM_Core_Action::ADD) {
  $custom198ElementName = getElementNameFromFieldName('custom_198', $elementIndex);
  $custom197ElementName = getElementNameFromFieldName('custom_197', $elementIndex);
  $custom160ElementName = getElementNameFromFieldName('custom_160', $elementIndex);

  $form->updateElementAttr($custom198ElementName, ['readonly']);
  $form->updateElementAttr($custom197ElementName, ['readonly']);
  $form->updateElementAttr($custom160ElementName, ['readonly']);
}

if ($form == CRM_Core_Action::ADD) {
  $customid = rand (1,10000);
  $currentDate = date('d/m/Y');

  $defaults[$custom160ElementName] = $customid;
  $defaults[$custom197ElementName] = $currentDate;
  $defaults[$custom198ElementName] = $currentDate;
  $form->setDefaults($defaults);
}

Additionally -  your code (and mine) as written will set defaults on EVERY form's ADD action.  You probably want to limit it to those that have these custom fields.


How do the Rebuild Smart Group Cache scheduled job and the Smart group cache timeout setting interact? According to the UI (Administer > Customize Data and Screens > Search Preferences) the 'Smart group cache timeout' setting allows you to specify "the number of minutes to cache smart group contacts".

According to the documentation, Job.group_rebuild "rebuilds the smart group cache" and has a recommended frequency of 'every time cron job is run'.

Why do we have and need both these approaches to keeping our smart groups up to date? Isn't one enough?!

The rebuild job will build any smart groups that are not yet built. It is a good idea to run this job often if you hate your server or being able to see counts on the manage groups page is more important to you than your server not hanging. Otherwise the rebuild groups scheduled job has no benefit.

If you do not run that job then smart groups will be built on demand. This is particularly suitable if you have a lot of smart groups. If group has expired it will be flushed and rebuilt.

Note I DO recommend running the job that flushes expired groups by scheduled job - just not the one that rebuild them all, even the ones you don't really need

I've put up a PR on this https://github.com/civicrm/civicrm-user-guide/pull/397


CiviCRM Extended Security Release details We are all-in for the CiviCRM Extended Security Release (ESR) version 5.21.3. We've been big CiviCRM fans for a while. It sounds like a great deal. We just have a few questions, which I will post on this forum.
Does anyone know the proper contact person?
What is the maximum number of monthly or yearly support phone calls or emails?
Are there any support provider partners that can match the published ESR pricing below for small- to mid-tier?
Thank you!

Jamie

Pricing
https://civicrm.org/civicrm/contribute/transact?reset=1&id=64

https://www.civicrm.org/esr

There is better information coming which will include a statement along the lines of

  While Extended Security Release provides for longer term stability and fewer upgrades for subscribers, it does not include any additional level of support over and above what is provided via the community. For organizations that need professional support, we recommend working with an expert that specializes in CiviCRM ESR.


CiviRules and CiviCRM 4.7 For those that are using CiviRules, what has your testing on CiviCRM 4.7.x shown?  Is this something that is showing major issues, minor issues, seems to fine?  Having never used CiviRules, I've got no basis from which to begin test, but may have reason to use the extension now.

(CiviCRM 4.7.2 is the current stable at the time of writing.)

I'm in the same boat! Just about to install and enable as we need to trigger email to customer when they submit a profile from WordPress...

UPDATE
From initial testing it seems to work fine with 4.7.3 however I have only used the "Add to group" trigger and "send email" function. Both seem to work fine.

UPDATE 2
CiviRules is working on a live site now and performing well. Only have 10 rules which just send emails when people are added to groups. The delayed actions also work fine.

So to get it installed on 4.7.x, simply edit the "info.xml" file for the extension, adding <ver>4.7</ver> under the /extension/compatibility element and then installing as normal.

This is by no means a comprehensive test! Please perform your own prior to a live release!


Smart groups break when database is restored When we clone our production instance to staging, we restore the database with updated host information prior to restoring the database.

Querying a smart group returns all contacts in database, not just those in the smart group. Running the Rebuild Smart Group Cache scheduled job does not do anything.

Here Eileen says How do the Rebuild Smart Group Cache scheduled job and the Smart group cache timeout setting interact?

  Note I DO recommend running the job that flushes expired groups by
  scheduled job - just not the one that rebuild them all, even the ones
  you don't really need

Where is that job?

I don't see any such job, nor do I recall such a thing.

But: the contacts that are in smart groups are cached in civicrm_group_contact_cache so you should be able to clear that using the CiviCRM "cleanup caches" option (under Administer -> System settings).


Best way to cleanup CiviMail database tables? On CiviCRM installations that use CiviMail extensively, the mailing tables can become pretty big. For example, I'm looking at a database with a civicrm_mailing_recipients table that has 4 million entries since 2011.

Assuming that the stats from old mailings are not relevant anymore, what would be the best way to archive the data?

Ex: we are in 2019, stats from before 2016 could be archived elsewhere.

I did a bit of digging and found this old forum post which sounds like a good start. There was also this PR back in 2016 that helped avoid breakage of click-through links when mailing data was deleted.

Related SE question: Does archiving mailings do anything in particular.

If I'm understanding correctly, I'd say there are two possible solutions here.  The first is the easier one where you don't care about keeping the stats or history of the mailings in Civi.  If that's case, then you can probably use the API explorer to delete old mailings, which would be equivalent to clicking to delete them from the Scheduled and Sent Mailings management list.  This doesn't really archive them per se.  You're just deleting them, but doing so through the explorer seems cleaner than deleting through the MySQL cli.

The second option is what my clients want which is to keep the stats and remove the bloat, but this currently doesn't exist as far as I know.  The largest tables they have are civicrm_mailing_recipients, civicrm_mailing_event_queue and civicrm_mailing_event_delivered.  (The activity tables also get pretty big, but that's another issue.)   I've schemed a solution that would require transferring the stats data to another table(s) to be able to reference them at a later date (not all that difficult), but hooking those new table(s) into the search functions, reports and other areas where it's needed is a taller order.  I haven't really thought through this in any detail, so I'm sure there's lots I haven't considered.  Maybe there's an interim solution between these two.  Clicking Archive removes data from the some of the processing tables but keeps the stats tables in place?


How do I setup an import for the Do Not Email field? I am a newby.

Why would 'Do not Email' not be checked even though my import mapped and imported without error?

It says it didn't have an error, but it must have imported with an error. I was able to force an import error message with data like "Checked".

The import completed without error when the Do not Email column is Y. I think it even worked when it is YES. But the import hasn't actually changed the contacts' data.

How do I set up the import correctly for the 'Do Not Email' field?

Thanks.

Johnny

Welcome to CiviCRM!

For the import of Boolean fields (yes/no, true/false, check boxes, etc.) the correct syntax is 0 for no or false and 1 for yes or true. Use 1 instead of Y or YES, and it should work for you.

Be aware that your imports thus far may have created NULL values in the database. See this question and answer for reference: https://civicrm.stackexchange.com/a/7396/105

You'll want to check your database or have your admin check those values to make sure you've got 1s and 0s instead of NULL.


How to let CiviCRM not send a confirmation to a new Mailing Group member? I added Groups to a Profile for a Contribution Page.

The public Mailing Group is nicely shown on the Contribution Page.
Can I prevent CiviCRM from sending a confirmation email?

It's on a Donation Contribution page with a IPN Payment Provider, so I can not use a webform for this page.

I think you can check this on the contribution page? There is an option there:


How do you set the displayed text of a custom field ("view-only")? I am using Drupal and I have an extensions that I am running this code on.

I've seen several threads attempting to help with this. I haven't found any that really make it clear. From what I understand I set a hook, then update the value.

I have a custom field that I have set to "view only". This particular field is on a contact. When the contact is viewed I want the text I have generated to display for that field.

How do you actually do this? What hook? How do I update the displayed value? What specific API call?

You might want to expand the question a bit and be more specific about your custom field.  What does it depend on? When should it be updated?

To the general question:

A view-only custom field is just like any other custom field, except that you can't edit it via the GUI.  It exists in the database and is displayed just like a 'normal' custom field.

Which hook you need depends on what should cause an update to the custom field value. If for example, it is based on the contact's name then you could use hook_civicrm_post so that your code gets run after the name is created or updated.

For setting the value, you can use the Contact.create API as the field is on a contact.  Specify the existing contact id and the new value of the custom field - eg:

$result = civicrm_api3('Contact', 'create', array(
  'sequential' => 1,
  'id' => 203,
  'custom_2' => "M",
));

Your code relates to writing the value of the custom field to the database, not the display of it.

[Update]
Here's a quick demo:

create a new custom field group for contacts
add an Integer field 'Set me'
add a view-only Integer field 'Doubled'

Put the following in an extension and adjust the groupid and fieldids to match your values:

function viewonlydemo_civicrm_custom($op, $groupID, $entityID, &$params) {
  $groupid_to_watch = 15;
  $fieldid_to_watch = 31; // 'Set me' field
  $fieldid_to_set = 32; // 'Doubled' field
  if ($groupID == $groupid_to_watch) {
    foreach ($params as $cf) {
      if ($cf['custom_field_id'] == $fieldid_to_watch) {
        civicrm_api3('Contact', 'create', array(
          'id' => $entityID,
          'custom_' . $fieldid_to_set => $cf['value'] ? $cf['value'] * 2 : "",
        ));
      }
    }
  }
}

When you change 'Set me' you should see 'Doubled' updated to be twice the value of 'Set me'.

Be aware that the hook will be called when you update 'Set me', and also by the API call in the hook so you need to be careful not to get stuck in a loop.


What CMS integrations are available for CiviCRM? Many CRM platforms offer integrations with a CMS, where they can do things like the following:

Provide demographic groups to the CMS to use in personalization
Accept form posts from the CMS for lead entry
Identify CRM users on the website and track their website activities in the CRM

To what extent does CiviCRM have integrations like this for any CMS?

I've searched quite a bit, but the CMS integrations I see for CiviCRM are more of the "make CiviCRM run inside a particular CMS." Like, how to make CiviCRM run inside Drupal. (Or Joomla, or WordPress...)

If my CMS-powered website is separate from CiviCRM, what pre-built options does it have to integrate with any CMS?

I know it has an extensive API, and can all of this stuff can be custom-built, but are there are packages/modules/add-ons that bridge the gap between CMS X and CiviCRM in the ways I have described?

CiviCRM has a complete set of APIs that you can use for such purpose, but you would have to custom-develop the part that sits within this other CMS. So for example you can use (Contact, Get) with the email address of the logged-in user in the CMS to achieve function 1 in your list, or (Contact, create) to create leads in CiviCRM from a website form and achieve function 2 in your list, or (Activity, create) to track website activities in the CRM and achieve function 3 in your list.


Fields from CiviGrant as tokens? What is the best way of getting fields from grants available as tokens for mail/PDF-merge?
No native tokens?
Not available in form processor extension?

If the tokens for grants are not available in core (which I can imagine) and appartently the data-processor tokens extension does not work with them either, the option you have left is to create an extension that adds them as custom tokens.


Styling Contribution pages with buttons Some users may want to display Price Set options as standard buttons rather than as radio buttons.

I am sharing my CSS for this below.

See how it looks here (Joomla).

These styles change Radio buttons and checkboxes in Civi Price Sets into colored toggle buttons. Make this a separate file from your primary civi-custom.css so that these styles can be applied to individual price sets, rather than globally: i.e. for donation pages, but not for event registrations.

Add the following link tag <link rel="stylesheet" type="text/css" href="[path-to-civi-custom-css-directory]/civi-button-inputs.css">
 to the source text anywhere on the page, such as

the Contribution Page description (to deploy these styles only on that one Contribution Page) or
the Price Set (for all pages that use that price set). The Price Set Settings Pre-help is a sensible location for this, though if you don't have visible text in the pre-help section, there will be an empty div styled as your .help class). An alternate location in the Price Set is the pre-help for any field, which is less likely to have a visible empty div.

/* lines up top of all new buttons */
#priceset.crm-section  div.content {
    padding-top: 0px;}

/* prevents various sections from overlapping or wrapping weirdly if the description includes
images or divs, not a bad candidate for basic Civi css */
#crm-container.crm-public .crm-section, .crm-section {
    display: flow-root;}

/* Styling the buttons */
.price-set-option-content input[type="radio"],
.price-set-option-content input[type="radio"] + label,
.price-set-option-content input[type="checkbox"],
.price-set-option-content input[type="checkbox"] + label {
    float:left;
    width:180px;
    margin:4px;
    background-color:#e9e1ef;
    border-radius:4px;
    border:1px solid #D0D0D0;
    overflow:auto;
    padding:13px 6px;}

/* Styling the labels */
.price-set-option-content label,
.price-set-option-content label span,
.price-set-option-content input[type="checkbox"] + label {
    text-align:center;
    font-size: 32px;
    display:block;}

/* make Total Amount same size as button text */
#crm-container.crm-public .calc-value {
    font-size: 32px;}

/* Alternate text styles for the amounts, if both labels and amounts are shown for a field
(don't want everything to be large) */
.price-set-option-content input[type="radio"] + label .crm-price-amount-amount {
    font-size: 16px;}

/* puts the normal input controls out of sight */
.price-set-option-content input[type="radio"],
.price-set-option-content input[type="checkbox"],
span.crm-price-amount-label-separator {
    position:fixed;
    top:-50px;}

/* Style for hovered item */
.price-set-option-content input[type="radio"]:hover + label,
.price-set-option-content input[type="radio"]:hover + label .crm-price-amount-amount,
.price-set-option-content input[type="checkbox"]:hover + label {
    background-color:#eee6f4;}

/* Style for selected item */
.price-set-option-content input[type="radio"]:checked + label,
.price-set-option-content input[type="radio"]:checked + label .crm-price-amount-amount,
.price-set-option-content input[type="checkbox"]:checked + label {
    background-color:#663399;
    color:#fff !important;}


Need to reinstall a deleted contact I have accidentally deleted a contact and need to get all their information back, how do I do this?

Do you happen to know how it was deleted? Because there's actually two kinds of deleting - one is permanent, one is not.

Try the advanced search and turn on the option to search in the trash.

If they have been permanently deleted, then you won't be able to bring them back in the software - you'll need to find as much of the information elsewhere (backup of your database, emails you got from the system, etc) and manually recreate as much as you can.


Can a Custom Field be added to a Contribution Page or Financial Type? I have created a Set of Custom Fields called "Tracking" to be used with -any- Contributions.  The set includes Custom Fields called "Category" and "Job".

I would like to assign specific Category and Job codes to all payments made via a specific Contribution Page.  Can a Contribution Page be edited to add Custom Fields?

Alternatively, can a Financial Type be edited to add Custom Fields?

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


How do I hide wordpress and get pretty urls I know that "standalone" civicrm is not supported, but I'd still like to
get rid of the wordpress side menu, and just see the civicrm top menu.
i'd also like to have pretty bookmarkable urls like foo.org/contacts/98234
or at least foo.org/civicrm/contacts/9823
And if i go to foo.org, all that would be there is a simple login page for
either contacts or staff to use.
I'm sure i'm not the first to consider the cms-crm combo to be somewhat a fish-bicycle combo?
thanks.

-mda

If you don't want or need a CMS, Drupal works a little better than WordPress for this.  WordPress wants to make it as easy as possible to run a blog, so it makes decisions for you that can work against having a minimalist framework.

On the other hand, you can easily disable a ton of Drupal's functionality and even make CiviCRM the homepage.  Direct URLs to CiviCRM contacts aren't quite as pretty as you like, but they're much more concise than WordPress or Joomla: foo.org/civicrm/contact/view?cid=1234&reset=1 brings up contact 1234.

Working with Drupal also gives you a lot more flexibility in your page layout: you can use any theme, and there are a number of blocks (widgets in WP parlance), unavailable in WordPress, for CiviCRM admins that let you view the most recent contacts, quickly add new activities/contacts/etc., and more.

A friend mocks Drupal by saying that it's like going to the car dealer and being asked, "Would you like a steering wheel with that?  How about a brake pedal?"  WordPress makes it easy to build a basic website because it makes a lot of assumptions.  However, if you just want a stripped-down framework to render CiviCRM and let people log in, Drupal's lack of assumptions will make it a lot easier.


Retrieve all phone info through PHP object-oriented API How can I retrieve all the phone numbers for a contact using the PHP object-oriented API?  I'm only seeing the primary phone available in the API explorer.  I want to be able to create a directory of everyone in a certain group, including all their phone numbers, with labels like "home", "work", "mobile".

My query currently looks like this:

$api->Contact->Get(array(
             'group' => 6,
             'sequential' => 1,
             'rowCount' => 100,
             'return' => 'custom_4,display_name,email,phone,'.
                   'street_address,city,state_province,postal_code',
             'sort'=>'custom_4,last_name,first_name'));

Thanks.

If you look in CRM_Contact_BAO_Query, it looks like it takes the "location" return property into account when considering primary, but location is an array but using the api you'd have to somehow put it in the return string, so I'm not sure how you'd specify it.

If you're willing to stray a little from the official api, there is the less official CRM_Contact_BAO_Contact::retrieve(). So something like

$params = array('contact_id' => 4); // 4 is an example, use the desired contact id
$defaults = array();
$contact = CRM_Contact_BAO_Contact::retrieve($params, $defaults);

And then there's an array under $contact->phone


Date picker not appearing in 4.7.23 and Joomla 3.7.5 Not sure what's going on here. Inspecting code for a date field show's right markup (I think), but the date picker doesn't appear on profile date fields on frontend. In backend admin view of profiles, the date picker does appear.

The URL to the page is: http://www.cahpi.ca/demodate , and files in question have "Date" in their label.

I'm using a custom template (which is what you'll see at the above URL), but even when I use the default Beez3 template for Joomla, the date picker icon doesn't appear in the date fields.

I have multilingual civiCRM (English/French), but don't see that this would prevent date picker from appearing.

Any suggestions?

The problem appears to be a misconfiguration on your site which results in javascript files failing to load.
Inspecting the source of http://www.cahpi.ca/demodate shows a list of scripts which should be loading. For example, <script type="text/javascript" src="/components/com_civicrm/civicrm/bower_components/jquery-ui/jquery-ui.min.js?r=YiBsO"> but trying to open that url, http://www.cahpi.ca/components/com_civicrm/civicrm/bower_components/jquery-ui/jquery-ui.min.js?r=YiBsO results in a redirect to the homepage.
That's what you need to fix.


Is it possible to have a user that's only capability is to work with Mosaico. Specifically to Create/modify templates I'm a one man show and this is my first excursion into setting ACLs. I have a volunteer that wants to work with me on creating & editing Mosaico email templates. At some point they may also be granted priv to send mailings. I've gone through the process of creating ACLs but, they don't seem to have any way to give someone just that 'Mosaico' privilege. Is this possible? Thanks in advance!

Unfortunately there is no single Mosaico privilege. You would achieve what you want using a combination of CMS permissions and CiviCRM ACL.
I would do the following:

Create a special account for this volunteer, that they will use just for creating the the templates.
Create ACL so that the volunteer account has access to only one group of contacts, a testing group, where you will have a single contact. This is just for them being able to select a group when they want to create a new mailing ( this stem is option, i.e. if you want them creating the mailing and preparing everything for you to review and then just send it to the real group if you are satisfied. (If you want them just to edit templates Mosaico then this step isn't necessary)
Subtract all the unnecessary CMS permissions. I am not sure which permissions would that be, since I don't have a WP installation (I am on Drupal). You will want that user to have:

backend access
access to uploaded files
CiviMail access

Additionally, you can use the navigation menu settings (Administer -> Customize Data and Screens -> Navigation Menu) to add a permission requirement for any menu entry, effectively hiding any option you wouldn't like them to see in the menus.


Contribution Amount not displaying on Contact I am on civi v5.25 with Wordpress v5.5.3. After adding manual off-line contributions (no credit card) each with a different financial type to a contact, none of the amounts display on the contact's contributions. I also recorded additional payments on a couple of the contributions, and still no amounts display. The contribution detail report does not show the amounts, only the number of contributions, and oddly it also shows the number of contributions beside the amount, as in: Amount $ (3). Similar result on the contribution summary report. I've reviewed the financial account and type config and cannot see anything obviously wrong. I am new to civi so this could be something simple. Thanks.

As we were upgrading our civi software we learned that removing the values in the Monetary Value Display fixed the problem. It looks like petednz-fuzion was pointing me in the correct direction. After the software upgrade, the value shown in his screenshot below for Monetary Value Display (%!i) were automatically populated into my config, and this also worked.
Thanks for your help!


Is there a list of tokens anywhere? Is there a list of tokens that are available anywhere? Is it stored in some db table I haven't seen?

CiviCRM 5.20.2 on Wordpress

This is a bit tricky to answer, because there are three different token processors in CiviCRM.  The Smarty processor, the legacy token processor, and the new Civi\TokenProcessor processor.

Legacy Processor (aka CRM_Utils_Token)

For most messages - quick emails, PDFs, etc. - you're using the legacy token processor.  You can find most of these tokens in CRM_Core_SelectValues.  Note that contacts will provide all exportable fields as tokens, minus the ones explicitly excluded in that file.

You can also add tokens via extensions, so this isn't a complete list.  Note that with the legacy token processor, you can only add new contact tokens.

TokenProcessor

Currently, TokenProcessor is only available with Scheduled Reminders and Flexmailer.  Work is currently underway to bring TokenProcessor support to the rest of CiviCRM, which will allow you to use more fields, and define custom tokens that are based on contributions/activities/etc.  In the next month or so, I'd expect to see support for TokenProcessor for emails sent with Email API (i.e. CiviRules), along with PDFs/emails generated from activities, with contribution PDFs/emails not far behind.

Smarty

Smarty tokens are available only in System Workflow messages, and the tokens vary on a per-template basis.  You can also enable Smarty token processing if you're not using Flexmailer and/or Mosaico by adding define( 'CIVICRM_MAIL_SMARTY', 1 ); to your civicrm.settings.php.


How to create new Relative Date Filter? I've stumbled across the options in  Administer - System Settings - Option Groups and I read somewhere that you can create new ones.. so I tried using the syntax of existing options:

eg Previous 2 calendar years = "previous_2.year"
so I tried  Previous 3 calendar years = "previous_3.year"

but that didnt work- just returned empty results (tried lots of others and they all did the same)

any clues please?

Certain ones can work by just adding option values, but I don't think everything. For example @andy-clark you can do prior 6 months as "ending_6.month" which is supported by the default clause here https://github.com/civicrm/civicrm-core/blob/5.20.2/CRM/Utils/Date.php#L1660

Take a look through that function to get an idea of what works, in particular the default clauses in each section.


Redirect with a QUERYSTRING help - migrating site I'm moving our civi from Joomla to Wordpress and as a part of the process I wanted to set up some redirects for our existing PCP pages. As you all know civi URLs are kind of long: baseurl.com/sub_dir/index.php/component/civicrm/?task=civicrm/pcp/info&reset=1&id=XX

I've found several posts explaining query string redirects like this one (http://simonecarletti.com/blog/2009/01/apache-query-string-redirects/) but in all of them their variable is right after the "?". I have tried the following to no avail:

RewriteEngine on
RewriteCond %{QUERY_STRING} task=civicrm/pcp/info&reset=1&id=20$
RewriteRule ^sub_dir/index\.php/component/civicrm/$ /path-to-new-location/? [L,R=301]

Eventually, I do want to write it with variables (as we have several hundred PCPs but I wanted to get something working first.) Any help is greatly appreciated!!!

Apparently my above code was correct, save for I was putting it in our main directory's htaccess file. Once placed in the subdirectory's file (and "sub_dir" removed) all is right!


Password Reset emails being marked as spam Hi hope everyone is well.

We have come across a bit on an issue when requesting the password reset emails to go out. The emails come from my own email address as I am the only admin, but our O365 mail filter is classing these as spam.

I would presume that this is because the mail server (Office 365) thinks that Civi is spoofing my email address.

Has anybody else come across this and if so, was there any way around this.

Thanks, Terry

A couple of questions

What CMS are you using?
How do you have your outbound email set up?
Are other emails getting marked as spam?
When you view source of the email, are there any headers inserted by the receiving mail server that let you know why it was marked as spam?

Password reset emails are typically sent by the CMS, not CiviCRM and you will need to make appropriate changes there. Both Drupal (smtp) and WordPress (WP Mail SMTP) have SMTP plugins/modules that allow you to use a 3rd party SMTP server to send email.


How do contact hashes work, and how do I keep them secure? Currently we don't use contact hashes but we'd really like to.

My understanding is that contact hashes are exposed as a token that can be used in CiviMail where they are appended to links. They're unique to each user (stored in the contact table), and they look like they're an md5 of something.

We're able to use them fine, but my question is around they work.

Are they ever regenerated?

Are there best practices to keeping them secure?

From what I can gather they carry the same privacy considerations as a forgot password link. Though where a forgot password link give the link holder full control of the account, the contact hash only allows forms to be prefilled (still exposes PII).

I'm lead to believe contact hashes should be regenerated within a hour of being clicked (some people might stuff something up, and need to click the link again).

Can anyone shed any light on this?

(sorry for the brain dump)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Get or generate a contact checksum via API?

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

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


How to set a default value for a custom field EDIT: this is NOT working, at least in CiviCRM 5.24.2
EDIT: this is done automatically by CiviCRM from 5.18+

I have a custom fieldset on Contributions that uses an option list. The option list has a default value set, but when contributions are created by non-UI processes (e.g. API) they do not have this default value; the field is empty/null/not there.

The fieldset is created by an extension. How could I ensure the default is set for all contributions?

Seems the options might be:

Use hook_civicrm_post then use the API to make a call.
Or could hook_civicrm_pre be used for this? Can you set custom fields in this part of the process?
or a horrible way would be to write an API job to somehow create default entries and run this by cron. Perhaps this might be necessary to set a default for existing contributions though?

Anyone done this? If so, how d'ya do it?

Used to work, before CiviCRM v5.18

Here's how I've opted to do it. Please do submit alternative answers if there's a better way.

Use the civicrm_post hook like this:

Note that you need to replace N with your custom field's ID number

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

  if ($objectId && $op == 'create' && $objectName == 'Contribution') {

    // See if we have a field that belongs to the fieldset.
    $result = civicrm_api3('CustomValue', 'get', [
      'sequential' => 1,
      'entity_id' => $objectId,
      'entity_type' => "Contribution",
      'return.custom_N' => 1,
    ]);

    if ($result['count'] == 0) {
      // Create the default entry.
      $result = civicrm_api3('CustomValue', 'create', [
        'sequential' => 1,
        'entity_id' => $contribution_id,
        'entity_type' => "Contribution",
        'custom_N' => 'unknown',
        // custom_M ...
      ]);
    }

  }
}

Then when you create a Contribution, the defaults are properly set.

Interesting observations

My interest was in creating the default record when the contribution was created by the API. But I thought I'd look into how this works with using the UI too.

If you use the web UI to create a contribution then the code above gets in before the main process creates/sets the custom values. i.e. This is the order of things:

User creates a contribution record.
Contribution record created.
Our hook runs, no custom value exists so it creates the default record.
The user-entered values (inc. the defaults that were set up in the form) overwrite the default created by our hook.

The same process happens when you use the API to create a contribution but include values for the custom data also.

Why this no longer works

The above worked fine until sometime around CiviCRM version 5.18 at which point it stopped working. It stopped because during creation of a contribution this code would run, creating a custom data record, then the calling code would also try to create the same custom data record - causing a database error.

Works, if you don't need to use phpunit (so, doesn't really work!)

I found that I could acheive what I had been trying to do as follows:

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

  if ($objectId && $op == 'create' && $objectName == 'Contribution') {
     CRM_Core_Transaction::addCallback(
       CRM_Core_Transaction::PHASE_POST_COMMIT,
       'myfixercallback', [$objectId]);
  }
}

Then myfixercallback would do the same work. However, if you are using this then beware phpunit tests that use transaction interface: your code won't run until the test ends - which is too late!

However! it seems that CiviCRM - at least from 5.18, possibly earlier, now properly creates default custom data. So this hack is simply not needed any more. Sorry, certainly 5.24.2 does not do this.

API Wrapper solution (tested with 5.24.2)

You can implement an API wrapper, but you need to implement it for both API3 and API4.

function giftaid_civicrm_apiWrappers(&$wrappers, $apiRequest) {
  if ($apiRequest['entity'] === 'Contribution' && $apiRequest['action'] === 'create') {
    $wrappers[] = new CRM_MyApiWrapperContributionCreate();
  }
}

// ... Implement the class ...

class CRM_MyApiWrapperContributionCreate implements API_Wrapper {

  public function fromApiInput($apiRequest) {

    if ($apiRequest instanceof Civi\Api4\Generic\AbstractAction) {
      // APIv4
      $params = $apiRequest->getParams();
      if (empty($params['id']) && noneOfTheCustomFieldsAreDefinedApi4($apiRequest)) {
        $apiRequest->addValue('my_fieldset_name.my_field_name', '');
      }
    }
    if (empty($apiRequest['params']['id']) && noneOfTheCustomFieldsAreDefinedApi3($apiRequest)) {
        $apiRequest['params']['custom_1234'] = '';
      }
    }
    return $apiRequest;
  }

  public function toApiOutput($apiRequest, $result) {
    return $result;
  }
}

In this example

my_fieldset_name is the custom fieldset, in which my_field_name is a field that has '' as a default value, and an internal ID of 1234 which explains where custom_1234 comes from.
Rather than relying on setting a value to '' you could look up the default value for a field, but if you're doing this for a specific solution you can do it this way to be more efficient.
noneOfTheCustomFieldsAreDefinedApi3 needs to scan the params for fields named custom_N where N is the known ID value of each of your fields. And noneOfTheCustomFieldsAreDefinedApi4 needs to scan the params for keys beginning with my_fieldset_name.


Change event participant status by clicking on a link (via civimail) I created a new participant registration status called "Attending" for participants to let me know that they are actually planning to come to the event.

I currently do this by emailing registered participants a link to a Drupal Webform (that includes: ?cid1={contact.contact_id}&{contact.checksum})

Once they click the link, I have the form set so that if they click the submit button it changes their registration status from registered to attending without having to fill out any fields.

Is there a way to accomplish this just by having them click on the link in the email, without having to go to the webform and click submit?

Well, what you can do is to add in your webform a bit of javascript to automatically click on the submit button, eg in the body of the webform (or anyway you want to add some javascript):

<script>
jQuery(function($){
  $(".form-submit").click();
});
</script>


Print PDF Letter. Image not readable or empty When using the "Print PDF letter for Contacts" action, I tried to add an image and when I downloaded the PDF file, in place of the image, said "Image not readable or empty"

I've tried all the solutions listed here: https://stackoverflow.com/questions/25558449/dompdf-image-not-readable-or-empty and nothing.

Thks

Please try to add Image tool and upload your image using the Image tool that should work correctly - please try the same against Demo server


Prevent automatic login after registration When people register on my wordpress website using a civicrm profile, they get logged in automatically. As I first need an Administrator to approve the user, I would like users not to be logged in after registration is complete.

Is there a parameter I have missed or would I need to use a filter or whatever ?

CiviCRM relies on CMS(i.e WP) settings when creating users. By default WP doesn't provide any such settings so you may need to install some plugin which needs admin approval for newly created user. Probably something like User Approve plugin.


Mail-to-Account does not fetch mail, I have configured mail-to-activity but when I run the task to fetch mails, I get an error message in job's log (without any details) and this kind of message in IMAP server log:

Oct  8 14:00:01 bazylia dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=10.117.113.20, lip=10.117.113.5, TLS, session=<OrpYmpYhbQAKdXEU>

This mail is 'kontakt@mydmain.com'.
I have set user name ('kontakt') and password and obviously CiviCRM can connect to IMAP server.
How can I debug this?

According to this page, the most common reason for your error is that your server only accepts STARTTLS connections on port 143.

If this is your situation, then you can either connect over SSL on port 993 if your server allows it, or you can connect using STARTTLS.  Note that there are some caveats to connecting over TLS:  See here and here.


Discounts with Webform_CiviCRM and Event Registration On Drupal 7.x and CiviCRM 4.6 and using latest CiviDiscount, is it possible to offer member discounts on a webform?

Specifically, we are offering 5 Webinars (all CiviEvents), which are included in our Webform as components. We notice that when we make a CiviDiscount with an automatic member discount, it does not apply to our webform submission.

Is there an alternative way to enable this functionality? I've thought about having Member pricing be another select option and using jQuery to check the users role, but that is more effort to maintain. Any thoughts?

The ultimate goal is to have 1 form where people can sign up for many events at once, and come back and sign up for other ones later, with one payment. We looked at CiviEvent Shopping Cart but it has some significant design flaws currently.

According to the wiki Webforms do not support CiviCRM price-sets or discount codes.  You could try creating an issue and asking what it would take to get CiviDiscount supported.


problems with kcfinder image browser in Chrome There did not use to be a problem with the media browser in CiviMail when using Chrome, but it's broken now.

https://BASEURL/sites/all/modules/civicrm/packages/kcfinder/js/index.php 3.12

WORKS in Firefox: shows KCFinder: /image33 files (4 MB)

Does not work/Hangs showing "CIVICRM File Manager" as heading
Chrome Version 83.0.4103.97

Other reports of hanging while trying to upload or select images.

You don't mention CMS but if this is Drupal then I would recommend you upgrade to 7.71 due to

Fix for jQuery Form bug in Chromium-based browsers


How do I access civicrm.setting.php file? How do I access PHP files? I'm having the problem where when people try to click on a contribution page, this error comes up:

  Sorry but we are not able to provide this at the moment. We can't load
  the requested web page. This page requires cookies to be enabled in
  your browser settings. Please check this setting and enable cookies
  (if they are not enabled). Then try again. If this error persists,
  contact the site adminstrator for assistance.Site
  Administrators: This error may indicate that users are accessing this
  page using a domain or URL other than the configured Base URL.
  EXAMPLE: Base URL is http:// example. org, but some users are
  accessing the page via http://www. example. org or a domain alias like
  http://myotherexample. org.Error type: Could not find a
  valid session key.

I've found a few examples of the same thing happening and people keep suggesting that I make sure my base URL is the same as in the civicrm.setting. php file. I found the base URL (it looks fine, and we haven't changed the domain name or anything) but how do I access the file to compare it to? We're on Wordpress v 4.6.1.

If everything is installed in standard, that file should be located here: <wordpress>/wp-content/plugins/civicrm/civicrm.settings.php


Loading a page browser says Waiting for another URL (not mine) So when I'm waiting for CiviCRM to load in the bottom left of the browser it says Waiting for scorpioindustries.com.... (which is not my URL)

What could this be a sign of? Have tried loading in different browsers and different computers so it's not a browser or computer infection. I ran virus checkers on my site and nothing. I checked manually through the CiviCRM stack and couldn't find any reference to this URL. I ran a search in the MySQL database for "scorpio", "scorpioindustries" etc but nothing emerged from that.

Any ideas? I initially thought virus but I'm a little stumped now.... Maybe this is a Site Name sort of setting inside of CiviCRM?  Thanks :)

Use the Net tab within Firebug while loading the page.  It'll display all the page components that get loaded.  Something in your page (whether you put it there or not) is attempting to load something (an image, a script, who knows) from that domain.


Relationships not available on household imports We have an import that we do a few times a year that I set up about 2 years ago.  Until today, it's never had an issue.  We are using v4.6.3, and the last time we did it we were using a 4.5.x version.

When importing households, we have some custom relationships defined.  They are Individual to Household relationships. These relationships do not show up in the selector for the mapping the imported data.  Some relationships DO show up; Household member and Head of Household, plus two other relationships in which contact a type is not set.

The relationships that don't show up are useable in all other contexts that I have tried.  They are enabled.  I have gone so far as to compare the relationship type records in mysql and I see no obvious issues.

I've also searched the Jira to see if there's a known issue but I don't see any.

Suggestions?

We are having the same problem with relationship imports that have custom subtypes.  Our subtypes are Individual - Student and Organization - School.  The relationship is Student of (Student) - Student for (School).

The relationship does not show up for mapping during import.  My testing shows that it's the first part (a) that causes it not to show up.  If the (a) is changed to Individual it will show up, all other combinations do not.

I have also verified that this relationship does show up in 4.5.4.  This is the only 4.5.x version I could readily test with.  I have verified on the demo test as well.

I have created an issue: https://issues.civicrm.org/jira/browse/CRM-17544


CiviMail sending delayed - how do I configure a cron job? I am trying to set up CiviMail however I cannot seem to get my emails to go. They remain scheduled.However, when I execute them manually at administer->system settings-> scheduled jobs they go. When I click the edit button , no matter what selection I make on run frequency, that is hourly, daily or every time cron job is run, the emails are never sent.(Until I choose execute now option). I have tried reading on setting up a cron job and managing Scheduled Jobs but can not really understand. I am running CiviCRM 4.6.3 and Drupal 7. I have admin privileges and can access command line if need be.

I sounds like you either don't have a cron job configured to run the Scheduled Jobs at regular intervals, or you don't have it configured correctly.

What have you tried using as the cron command when you tried to set that up, and/or what errors does it give? (Edit your question above with further information)


Getting Apache 500 error when using CiviProxy Because I haven't seen this topic here, I assume I'm handling a rather basic configuration error, but I've been stuck for three days now:

I've downloaded the latest CiviProxy release (0.6.dev1) following the instructions on https://docs.civicrm.org/civiproxy/en/latest/installation/#installing-the-proxy-scripts-your-your-civiproxy-server and adapted the values for

$proxy_base     = 'https://civiproxy.mydomain.org';
$target_civicrm = 'https://www.mycivicrm.de/civicrm';

Basically, my setup seems to work. If I access

https://civiproxy.mydomain.org/index.php

I can see the Civiproxy page. I also adapted

// API and SITE keys
$api_key_map = array('civiproxykey1' => 'civicrmkey1');
$sys_key_map = array('civiproxykey2' => 'civicrmkey2');

and kept the already existing rule

$rest_allowed_actions = array(
  'all' => array(
    'Contact' => array(
      'getsingle' => array(
        'email' => 'string',
      ),
    ),
  ),
);

The target system is running CiviCRM 5.6.0.

If I run

http://https://civiproxy.mydomain.org/rest.php?entity=Contact&action=getsingle&key=erikhtestkey&version=3&json=1&api_key=testerikhapikey&email=pipotest@example.org

(with adapted key values of course), I get an Apache 500 error. Accessing CiviCRM directly (with adapted keys) returns some data, so it looks to me like every component is doing fine but the connection is not working. My basic key usage seems to be OK. At least I get an "invalid key" error if I intentionally use a wrong key.

In order to see whether CiviProxy is trying to contact CiviCRM in the first place, I ran tcpdump on the CiviProxy server and saw no data going out to CiviCRM. curl https://www.mycivicrm.de/civicrm is doing well, so my current assumption is that for some mistake I made in the CiviProxy setup, it is not even trying to connect to CiviCRM. I also tried installing CiviProxy on the CiviCRM server, but didn't succeed either.

The de.systopia.civiproxy is installed on the CiviCRM server. I can provide the configuration on that system as well, if needed.

Kind regards,

Anna

The key to this would be the actual error message. HTTP Error 500 usually means that PHP encountered a fatal error, which should end up in the webserver's error log. Could you have a look? It could be in /var/log/apache2/error.log, but it depends on your configuration.

Also two remarks (you probably already know this):

The de.systopia.civiproxy extension is only required if you want to send out mailings; it changes the contained URLs to the proxy
Installing the proxy scripts on the same environment is not what we had in mind, the ideal place would be a separate environment in the DMZ.

Cheers
Björn


advanced search - mailing fields not present I am having a "moment". On one of my civicrms when I use the advanced search I can search mailings. On one of my other civicrm installations the mailings are not available to be searched - the accordian is short of the "mailings" tab. I'm assuming it is somewhere in the configuration but I cannot find it, nor can I find it in the user guide.

Can someone point me in the right direction.

Thank you!

look in civicrm/admin/setting/preferences/display?reset=1

This is a bit counter-intuitive since the first place most would look is under Search Preferences - but it lives under Display Preferences as it is about what displays on the search screen. hth


Enabling Group description field for webforms The group description field is visible when using a profile for mailing sign ups.

Does anyone know of a way of including these in a civi enabled webform?

Ta!

The Drupal Webform (core) module does not natively support descriptions of individual checkboxes or select options, so there isn't a built-in way to achieve this. A workaround would be to type the description in yourself by changing "Live Options" to "Static Options" and placing the description in parentheses after the title.


CIVICRM Update to 5.13.5 triggers 'CiviCRM requires PHP 7.0.0' on PHP56 I am trying to move a CIVICRM installation up to the 'last' PHP56 supported release which I believe its 5.13.5 however it triggers the PHP7 check expected from 5.14 onwards?

So after running:  drush civicrm-upgrade-db I get:

  CiviCRM requires PHP 7.0.0+. Drush is running PHP 5.6.40.

Is this expected on 5.13.5?? Any help appreciated.

No mention of a PHP7 requirement on the patch notes: https://github.com/civicrm/civicrm-core/blob/master/release-notes/5.13.5.md#synopsis

Had to move just to 5.13.4 as that is the last 'supported' version.  5.13.5 doesn't but no information is given to suggest it's incompatible on patch notes.

Will test and move it up from this version :).