How can I clear all contacts (as if they never existed) without touching any CiviCRM settings? After having put a lot of time into customizing a CiviCRM installation, I want a way to replicate the configuration / customization / installed-extensions, but start from scratch on the contacts (so that newly added contacts -- after the admin contact and organization -- have contact-ids of 3,4,5,...).  Deleting all contacts via the UI doesn't seem to "reset" the next-contact ID counter.

Perhaps one way this could be possible is if there were a means by which all configuration / extensions could be backed up and restored, independent of the data in the system (e.g. contacts, memberships, contributions, etc.).  Is this possible somehow?  Or is there another way to achieve my goal of "starting over" with non-configuration data?

I would suggest to perform deletion of contact from UI and then reseting the auto increment value through mysql command. Truncating database might loose contact that are not suppose to be deleted like logged in contact id or Default organization contact id or they might be possible to have orphan data for contacts if we directly truncate the table. Here is what i would do

Find Contact
Select All contact
From Action list i will select 'Delete Contact permanently'

Shell in for mysql or in phymyadmin through web and run ALTER TABLE civicrm_contact AUTO_INCREMENT = 1

  Note: Backup database before deleting contacts.

HTH

Pradeep


CiviVolunteer Permissions vs CiviCore Permissions Getting an error CRM_Volunteer_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) on line 151 of CRM/Volunteer/Permissions.php.  Pops up on front end Events with volunteer options and back end.

I'm at my wits end.  Followed along some other threads which seemed to be similar errors with Permissions.php but no luck.

Wordpress 5.0.3, CiviCore 5.9.1, CiviVolunteer 4.7.31-2.3.1

Thanks!

This issue is fixed on the latest version of CiviVolunteer. If not, try adding this patch https://github.com/civicrm/org.civicrm.volunteer/pull/477 to your ext.

There is only a single file change in the patch so you can do that manually by modifying CRM/Volunteer/Permission.php


How can I change the currency of my sandbox authorize net merchant? I'd like to change my currency at my sandbox authorize net merchant. I can only see one currency on my sandbox virtual terminal. What should I do?

Welcome to SE CiviCRM, The question you raised is basically for Authorize.net support team instead here. You will need to contact Authorize.net support team to change the currency for your merchant account.


CiviCRM Dashboard and Menus disappear after upgrade and GoCardless extension disabling I was running CiviCRM 5.16 on top of Drupal 7.69, atop Debian 9. I tried installing the GoCardless extension (after discussion at CiviCamp Birmingham) using the built-in extensions manager and couldn't quite get it to work. I figured it might be because my CiviCRM was a bit too old, so I tried removing it and upgrading Civi to 5.23.1, then reinstalling the extension.

Somewhere in this upgrade process, I've got to the point where the CiviCRM menu bar and dashboard no longer appear on my site. Everything seems to work if I can remember the URLs, but this is obviously very frustrating. Any idea where to look? I'm not getting any browser errors, and the last thing in ConfigAndLog/CiviCRM.*.log is the database upgrade to 5.23.1

This is because your cms.root doesn't match properly with civicrm.root variable and you might be using variables in Resource url for 'CiviCRM Resource URL'.

You need to make sure paths are correct in your system

Check the Document root path in your apache or nginx config of site.
It should match exactly with the path of $civicrm_root and template_c path in settings.php

For some cases you add below two line at the end of the file you will need to change

$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . 'sites/all/modules/civicrm/';
$civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . 'sites/all/modules/civicrm/';


How to clean the Contacts and relevant Users Though I use Captcha and reCaptcha, I have a lot of dummy users and Contacts which I can identify by the fact that their sort_name = display_name = email (or sort_name contains an "@").

How can I delete those Users and Contacts ?

My original idea was to create a Dynamic Group of those, then delete them after exporting their list to excel to delete the relevant Users. But, how to create such a Dynamic Group (based on what search criteria ?) ?

An alternative would be to create a View (filtered on "sort_name contains '@'"), then use VBO to add them to a Group : I tried, but could not succeed).

I tried using the Search Builder, but it is broken : I have openned a new post for that : Search Builder is broken (Civi 5.4.0 / Drupal 7.59)

You could use Search > Search Builder and search for Individuals whose First Name and Last Name are NULL (when this is the case, Civi will use the email address as the Display Name), select all of the search results and then create a Smart Group. You would then periodically review the contacts of the smart group by navigating to Contacts > Manage Groups and then clicking on the Contacts hyperlink to the right-hand side of the group and perform the desired actions.


File attachment lost during merging of records i encountered a situation that when I merge 2 similar records, i would get an error with the duplicate record has a file attachment.  The records will remain but the duplicate record would have lost its file attachment.  This would not happen if I flip the 2 records and have the record that has the file attachment be the main record instead.  If I merge it this time, the file attachment stays without any error as expected.

Would this be a bug ?  Also, in the case where the file attachment is lost in the error, would the file attachment be still inside the database and how can that be located ?

I am on CIVICRM 5.10.4 Wordpress 5.0.3

thanks.

What you describe sounds like this bug https://lab.civicrm.org/dev/core/issues/723

  File custom fields cause a fatal error when trying to merge
  If you are trying to merge a contact with a custom field that is a file, if the contact that will be deleted is passing a file to the remain contact, the merge will fail, generate a fatal error, and lose all the custom data in the set including the file.

  To recreate:

  Create a contact custom field that accepts a file.
  Add files to one or two contact records.
  Merge a contact with a file into another contact
  Fatal Error occurs. All files are no longer attached to the custom fields. The contact to be deleted loses all the custom fields. While the remaining contact looses only the file.
  If the contact that is to remain has no image the error message is

  No record found for given file ID - 0 and entity ID - 203

I'm also seeing this in CiviCRM 5.10.3. So I would say this is a known bug which has not yet been fixed.


How can I display detailed Authorize.net error code info from civicrm_system_log in the Civi interface? We're on Civi 4.6.21 and Drupal 7. We use Authorize.net for payment processing.

Error messages from Authorize are displayed in civicrm_system_log in the context field as json encoded data. The error messages are useful for determining exactly why a transaction failed - a card was declined, the billing address info is wrong (an "AVS mismatch") or other reason.

I'd like to be able to see the error message info in the Civi interface, without having to go in to the back end MySQL table - civicrm_system_log - as I do now.

There is a way to see the system_log data using the API - see the screenshot below.

I want to be able to include the error message info in assigned Activities to renew a membership, ideally using a rule created using CiviRules as part of a membership renewal workflow, and for the assigned caller to be able to easily see exactly why the previous transaction did not go through - the card was declined, the billing address is wrong, etc - and to get the correct info from the target/member.

So how can I do this?

I might be on deep water here, but I would propose this workflow:

You create a new CiviRules trigger to trigger on System_log created. That would probably be as simple(?!) as to copy another trigger like Contact created or Contribution created, and replace the values with details on system_log.
You have a condition on field value comparison for a value in system_log that is unique for failed Authorize.net-payments.
Action is to schedule an activity to the appropriate staff member, and include in the activity detail the URL for the API Explorer site, filled in with tokens to show the value for the corresponding system_log (the same way as checksum is used)


Cannot Find Solution For “Membership status cannot be calculated for ” Renewal Error! I have read the related thread and tried many iterations to find a solution for the error

  The membership cannot be saved because the status cannot be calculated for start_date: 20190701 end_date 20200630 join_date 20190701 as at 2019-06-18 07:16:08

I know a lot has been written on this but none of it is working to solve my problem.  I apologize if I am missing something simple.  I am running 5.13.14 in Drupal 7 using PHP 7.2.

I am trying to import members with a contact ID, start date, and membership type ID.  I have tried using an end date as well but that does not help.

Here are my membership rules.

New

Current

Grace

Any help in figuring out what is wrong here is greatly appreciated!

Thanks,
Josh

The error message shows future start and join dates.  Civi is attempting to the determine the status as of the time of import, but none of the default status rules cover that scenario hence the error message.  'New' only applies from the 'member since' / 'join date' so is not applicable.

One option is to change your join dates to be the current time so that the memberships show as 'New'.  Your memberships would then be regarded as 'current' despite being before the membership start date.

Alternatively, you could create a 'future' status with start event of 'start date' with eg a '-1 month' adjustment, and an end date of 'start date'.  That should let you import the membership which will be inactive until the start date is reached.  (Not tested extensively but seems to work on a quick test.)


hash_equals(): Expected user_string to be a string, null given in Contact/BAO/Contact/Utils.php on line 232 Has anyone else seen this error under Joomla and CiviCRM 5.10.4 when viewing a contact via the front end?

Warning: hash_equals(): Expected user_string to be a string, null given in /.../administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php on line 232

I am also receiving this error but on Wordpress 5.2.1 and civiCRM 5.13.4. I have not found a solution to this either.


CKEditor Multi-Site Configuration Problem After updating to 4.7.23 from 4.7.20, I can now use the CKeditor Configuration and the changes are saved based on the changes made at https://issues.civicrm.org/jira/browse/CRM-19303, but the wysiwyg doesn't show up. The Drupal log error message reports "page not found" and that it is looking for

http://staging.focusdc.org/sites/focus/sites/focusdc.org/modules/civicrm/js/wysiwyg/crm.ckeditor.js

when I believe it should be looking for

http://staging.focusdc.org/sites/focusdc.org/modules/civicrm/js/wysiwyg/crm.ckeditor.js

I'm not sure how to go about changing this.  Everything else seems to be working correctly as my Resource URL's and Upload Directories look correct.

Thanks in advance

8/15

After some further sleuthing I discovered my production site running 4.7.20 reports:
[civicrm.root]  https://focusdc.org/sites/focusdc.org/modules/civicrm/

whilte my staging server running 4.7.23 reports:
[civicrm.root] http://staging.focusdc.org/sites/focus/sites/focusdc.org/modules/civicrm/

They have identical civicrm.settings.php outside of the one having SSL and one referencing "staging".

Did the $civicrm_root settings change in civicrm.settings.php between 4.7.20 and 4.7.23? Any other thoughts?

You should be able to fix this by defining the CIVICRM_CMSDIR constant.  Since you're using multi-site, you'll need to define that on a per-site basis.


Upgrading CiviCRM that is set up outside of the Drupal docroot with symlinks I am finally upgrading the CiviCRM on a website I didn't develop. It is running on Drupal 7.50, (upgraded from 7.37), and is currently version 4.3.8. Planning to upgrade to 4.7.13.
Here's the thing: it was set up outside of the Drupal docroot, using symlinks and some other setting changes. It works, but it's more complex than the usual setup. Due to the already heavy nature of our Drupal site, it is my understanding that this setup would help with performance issues. I want to both upgrade it and move it into the Drupal sites/all/modules directory.
Aside from the usual steps to perform the upgrade up so many versions, I wanted to see if anyone could anticipate any upgrade problems I might have and evaluate my plan outlined below to complete the upgrade, due to this unique situation? Let me know if this is out of the scope of this forum, and I'll remove it, though it might be helpful if someone else finds themselves in the same boat. I am going to try these steps out on a dev copy before attempting it on production.
The Setup:
CiviCRM root is in /var/www/html along with our Drupal Docroot, and all components are as such:

CiviCRM Home: /var/www/html/civicrm/v.4.3.8-d7

Drupal Home: /var/www/html/drupal/docroot

CiviCRM Settings: <drupal home>/sites/default/civicrm.settings.php

CiviCRM Files: <drupal home>/sites/default/files/civicrm

Symlink to Codebase: <drupal home>/sites/all/modules/civicrm -> <civicrm root>/v.4.3.8-d7

Settings_Location.php:  <civicrm home>/v.4.3.8-d7/settings_location.php
   define( 'CIVICRM_CONFDIR', '/var/www/html/drupal/docroot/sites' );

The Plan:

Back up the Drupal and CiviCRM codebase and database into '/var/www/html/backups'

Login to Drupal site and put website into maintenance mode; stay
logged in

Disable Drupal CiviCRM integration modules

*Delete symlink in <drupal home>/sites/all/modules

Make the <drupal home>/sites/default directory writeable to the
server

Download and unpack v4.7.13 to <drupal home>/sites/all/modules

Backup and move civicrm.settings.php file

Clear browser cache and all files in <drupal home>/sites/default/files/civicrm/templates_c/

Run the install: http://<drupal home>/civicrm/upgrade?reset=1 (for
clean URLS)

Update the CiviCRM Resource URL

Re-enable Drupal CiviCRM integration modules

Check Drupal role settings

Pull the site out of maintenance mode

*extra or modified steps I added to the usual ones listed in the upgrade guide:
Resources
https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Drupal+7

This looks overall good!  A few suggestions though:

I would advise moving Civi 4.3.8 into the sites/all/modules folder separately from the upgrade.  Since this is a fairly unique setup, it would be good to eliminate it so that if something goes wrong, you know this isn't the issue.  You should be able to do that just by enabling maintenance mode, removing the symlink, and moving the CiviCRM folder to where the symlink was.  Make sure there are no references to the incorrect location in civicrm.settings.php or in Administer menu » System Settings » Directories or Administer menu » System Settings » Resource URLs.
I'm not sure what settings_location.php is, that's probably specific to your setup
Depending on how abused your database is, you may encounter upgrade errors going from 4.3 to 4.7.  If so, don't forget when rolling back to drop your CiviCRM database and create a new blank database before restoring!  A restore will not delete newly-created tables, and CiviCRM upgrades choke when they try to create a table that already exists.


Problem with CiviCRM registering a new Wordpress user I'm running WP 4.9.7 Multisites, CiviCRM 5.3

I've created a profile with the information I want to gather from people. I've enabled the option to create a Wordpress user.

I go to the contribution page containing the profile, and it shows me all the appropriate fields to create a new WP user, as well as all the other profile fields.

I go through the process, and it all seems to work. It inserts an entry in CiviCRM. But it doesn't create the Wordpress user... Not even a pending user.

Have I missed something somewhere?

Thanks

It might sound obvious, but I'll admit getting caught by this on one occasion because I didn't test as an anonymous user!


CiviMail DKIM signature failure We have DKIM configured with the MTA we are using with CiviCRM, and it appears to be working.  However, the DKIM signature fails consistently; using a checker it appears the mail has been altered after being signed.  Has anyone else experience of this?

I've done some more investigation.  I have an IIS based development system. Configuring SMTP leads to the test email failing DKIM. Sending a CiviMail test environment passes DKIM.  Sending a CiviMail test from Linux Apache based test environment leads to a DKIM failure.  Webmail and Thunderbird SMTP both lead to DKIM passes.  Any suggestions?

We did experience that for specific mail providers. Local delivery and most mail providers were fine or not having any non 7bit encoded characters.

We ended up forcing a downconversion to 7bit encoding on our MTA prior to signing with DKIM as described here for postfix: http://postfix.1071664.n5.nabble.com/On-DKIM-and-Content-Transfer-Encoding-tp68767p68769.html


Adding Field to Advanced Search CIviCRM Contribution I'm trying to add Notes field to the advanced Contribution search so that I can do wildcard search on the basis of notes but the DAO throwing error: "unknown column", as it's not able to locate civicrm_note table.

Here's my extension file

function MyExtension_civicrm_buildForm($formName, &$form) {
    if ($formName == 'CRM_Contribute_Form_Search' || $formName == 'CRM_Contact_Form_Search_Advanced') {
        $form->add('textarea',
          'contribution_note',
          ts('Note'),
          ['rows' => 4, 'cols' => 40],
          FALSE,
          array('class' => 'crm-form-textarea')
        );
    }
}

Custom template file

    {$form.contribution_note.label}

    {$form.contribution_note.html}

After debugging I found the query is not making a join to civicrm_note table. Here is the query I got on debugging.

SELECT civicrm_contribution.id, contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`, civicrm_contribution.id as contribution_id, civicrm_contribution_recur.id as contribution_recur_id, civicrm_contribution.contribution_status_id as `contribution_status_id`, civicrm_contribution.campaign_id as `contribution_campaign_id`, civicrm_contribution.receive_date as `receive_date`, civicrm_contribution.total_amount as `total_amount`, civicrm_contribution.currency as `currency`, civicrm_contribution.thankyou_date as `thankyou_date`, civicrm_contribution.source as `contribution_source`, civicrm_contribution.is_test as `is_test`, civicrm_contribution.is_pay_later as `is_pay_later`, civicrm_product_en_CA.id as product_id, civicrm_product_en_CA.name as `product_name`, civicrm_product_en_CA.id as `contribution_product_id`, civicrm_contribution.financial_type_id as `financial_type_id` FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id LEFT JOIN civicrm_contribution_recur ON civicrm_contribution.contribution_recur_id = civicrm_contribution_recur.id LEFT JOIN civicrm_contribution_product ON civicrm_contribution_product.contribution_id = civicrm_contribution.id LEFT JOIN civicrm_product_en_CA ON civicrm_contribution_product.product_id =civicrm_product_en_CA.id WHERE ( civicrm_note.note = 'check' AND civicrm_contribution.id != 0 ) AND (contact_a.is_deleted = 0) GROUP BY civicrm_contribution.id ORDER BY `receive_date` desc, `contact_a`.`id` LIMIT 0, 50;

Do I require to use QueryObject hook to override the BAO ?

Also, if I use "note" as the field name instead of "contribution_note", it's doing the lookup for notes associated with the contact rather than contribution notes.

If you go to search - custom search - fulltext search, it already searches this field. Does that fit your needs?


Alerting admins when certain fields are changed via profile & checksum? Drupal 7, CiviCRM 5.10

I'd like to send out an "update details" email to contacts - a profile with checksum. It will include some other custom field questions but i want to be alerted specifically if the general contact fields are updated - Address, phone number etc.

I can put those who completed the profile into a group but that won't distinguish between those changed and those whose contact details remain the same..

I don't think i can create a duplicate to dedupe later if using checksum?

The only other idea i had is to have two profiles - one for my custom field questions and another for "change contact details" and rely on contacts only submitting that form if things have been altered - Even then it would be useful to know which field specifically had changed but perhaps that's my only option?

Thanks!

If you have hosting that allows you to turn on Detailed Logging, there are two extensions that provide address history.  One is in Extended Reports; the other is Joseph Lacey's Address Log report.  It should be relatively simple to extend either one to support phone/email/etc.

Another option, low-tech but effective, would be to export the contact details ahead of time, then export again after folks have filled things out.  Paste the two spreadsheets into one and use a simple formula.  E.g. if old email is in column C and new email in column H, =IF(C1 != H1, "Changed", "") in a new column will label any records where the email changed.


outbound mail smtp password gets corrupted on wordpress I have a CiviCRM on WordPress site and every now and again - maybe once every few months - without me doing anything obvious, the SMTP password gets corrupted in Settings - Outbound Mail.

I'm not sure what is causing this to happen. This is the only site I have that it is happening on. Any ideas?

I might have found the answer while browsing https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-extensions.

  PHP Mcrypt [is] required for SMTP credentials and other credentials in the database. If you add Mcrypt on after running CiviCRM for a while you will need to re-save your passwords to the database. [... php7.2] does not support mcrypt and if mcrypt is not installed the smtp password (if entered) will need to be re-saved once you update your php version to 7.2.

I'm reasonably sure that this happened to me multiple times on the same time (that has only been upgraded to php7.2 once) but it certainly feels like a pointer in the right direction.


Thank-you Sent same as Recieved Date I'm hoping someone can help me with this issue I'm having. All contributions on the Dashboard and Find Contributions screen have the exact same date and time for the Received date and Thank-you Sent date. Attached is a screen shot. The top has a Thank-you Sent date of June 18th, 2017 12:00 AM and the second does not have a Thank-you Send date set.  I am currently running the site on Amazon AWS Linux with Drupal 7.55 and CiviCRM version 4.7.20. I am getting the "missing indices on some tables" performance warning and try to Update them but it errors out in the logs.

How do you fix this? I looked at the CiviCRM demo and the same issue is happening. Is this a bug? or is it just me? This is a screenshot of the html on the Contribution Dashboard page, the second receive is suppose to be Thank you date.

There is an open issue related to your question https://issues.civicrm.org/jira/browse/CRM-20894. It also happens to me with a recent upgraded CiviCRM from 4.8 to 4.7.22 and it can also be replicated in dmaster.

[EDIT]

Seems it's already solved here https://issues.civicrm.org/jira/browse/CRM-20773


CiviCRM on Wordpress - Suppressing 'Administer' Menu items Top Menu  --> "Administer"
I'd like to suppress ALL the menu items like "Administration Console" through "System Settings" but allow all the other menu items like :

Civi Campaign
Civi Case
Civi Report
Civi Discount

Thanks.

Some of the menus will change based on the permissions you set for each user role in WordPress Access Control under 'Administer>User and Permissions>Permissions (access control)'

Then under 'Administer>Customize Data and Screens>Navigation Menu' you can set permissions for each menu item by right clicking on the item and selecting edit.

You should be able to get the menus setup for each role as you need them. May take a bit to tweak it.

Hope this helps.


Using buildkit on MAMP but hitting "Fatal error: Call to a member function getDriver() on null" I am trying to install buildkit on a Mac with MAMP, but am hitting this wall:

  Fatal error: Call to a member function getDriver() on null in phar:///Users/user/buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58

What am I missing?

I have been following the buildkit readme and have gone through this thread about setting up with MAMP but am not sure where I went wrong because I get the error when I actually try to use it.

MacOSX:dmaster.localhost user$ civibuild create dmaster
[[Download dmaster (type 'drupal-demo' in '/Users/user/buildkit/build/dmaster')]]
Already downloaded dmaster
[[Install dmaster/default (type 'drupal-demo' in '/Users/user/buildkit/build/dmaster')]]
[[Execute /Users/user/buildkit/app/config/drupal-demo/install.sh]]
++ source /Users/user/buildkit/app/config/drupal-demo/install.sh
+++ amp_install
+++ _amp_install_cms
+++ echo '[[Setup MySQL and HTTP for CMS]]'
[[Setup MySQL and HTTP for CMS]]
+++ cvutil_assertvars _amp_install_cms CMS_ROOT SITE_NAME SITE_ID TMPDIR
+++ _cvutil_assertvars_back=ehxB
+++ set +x
++++ mktemp.php ampvar
+++ local amp_vars_file_path=/Users/user/buildkit/app/tmp/ampvar3Oj48j
+++ local amp_name=cmsdefault
+++ '[' default == default ']'
+++ amp_name=cms
+++ '[' -n http://dmaster.dev ']'
+++ amp create -f --root=/Users/user/buildkit/build/dmaster --name=cms --prefix=CMS_ --url=http://dmaster.dev --output-file=/Users/user/buildkit/app/tmp/ampvar3Oj48j --perm=admin
PHP Fatal error:  Call to a member function getDriver() on null in phar:///Users/user/buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58

Fatal error: Call to a member function getDriver() on null in phar:///Users/user/buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58

This may indicate that either:

The PHP runtime is missing the PDO or MySQL extensions.  This may help: https://wiki.civicrm.org/confluence/display/CRMDOC/Setup+Command-Line+PHP (At time of writing, I'd avoid PHP 5.6 for CLI dev -- GenCode may have issues with it.)
The DB settings haven't been configured (e.g. the step for running amp config was skipped).
An incompatible or incorrect value was used in the DB settings.

For reference, I believe these are the settings for use with a typical MAMP. (Note: The line is long.)

amp config:set --db_type=mysql_dsn --mysql_dsn='mysql://root:root@127.0.0.1:3306' --httpd_type=apache --httpd_restart_command='/Applications/MAMP/Library/bin/apachectl graceful' --hosts_type=file  --perm_type=osxAcl --perm_user=www

However, if you didn't run amp config before, it's still good to run it to see more complete instructions (esp. regarding httpd.conf).


/civicrm/civicrm/CRM/Case/BAO/Query.php Reported to Contain Malware by Wordfence I'm testing Wordfence a WordPress security plug-in on our site.  It reports that /civicrm/civicrm/CRM/Case/BAO/Query.php contains suspected malware.  Is this true? We are running CiviCRM 4.7.2.

Here's the Wordfence message:

No, this is a false positive.

The line flagging this is:

  $from .= " $side JOIN civicrm_option_value recent_activity_medium ON
  (case_activity.medium_id = recent_activity_medium.value AND
  option_group_activity_medium.id =
  recent_activity_medium.option_group_id ) ";

Suggested courses of action:
1. Get rid of Wordfence.
2. Tell Wordfence about this false positive and request they fix it.


Is there a way to make the contact preview easier to read? Here is what I am seeing with both Chrome and Firefox on CiviCRM 4.6.4 with Joomla 3.4.1. It's hard to read and a bit jumbled. Is this a bug or can it be adjusted somewhere?

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


Installing Civi as a standalone site vs part of your existing site I was just looking for some opinions regarding installing Civi in a current wordpress webpage (the non-profit's front facing regular ole website) versus creating a separate Wordpress installation to specifically house Civi.

Are there any major pitfalls to a separate directory?

If the CiviCRM is installed on a different Wordpress site, important features and functions would be completely crippled by not being connected to the front-end website:

Letting users input and manage their own contact information either deliberately or through contribution and sign up forms
You wouldn't be able to take donations through the CiviCRM through the front-facing website
Users wouldn't be able to sign up for events or memberships and be managed through CiviCRM
You wouldn't be able to collect user email addresses or get newsletter sign ups through the front-facing website to be managed through the CiviCRM.
Staff would have two different company websites to sign into for managing different things, instead of just one

I can't think of many pros for doing it this way. Even if there are features you aren't planning to use now, you might want to grow into them.


Custom date field throwing DB constraint error "cannot be null" I have a date field associated with a particular case type. When I try to create a new case, it is failing because the dates are empty. However, when I created the custom data, I did not make them required. There is one custom field that seems to work but it submits the empty field as '' (an empty string) as opposed to null.

Why is there a not null constraint on those fields, and ok to fix this by manually setting all those columns to allow null values?

We are using Drupal 7, CiviCRM 4.7.4

I guess that shouldn't be a problem in set the column to null in the DB because those are custom field

I did manage to do the same testing against lower version in 4.6.15 and mysql version 5.6.25 - Which works as excepted

I guess this may be a issue with mysql version or in the code so just check with the lower version or wait till the next release and if you have the same issue then please raise an issue

I guess this helps !!


"Created by" field of CiviMail pulls the name of the latest subscriber I am a new user of CiviCRM. My organisation uses CiviCRM 4.6.36. and I have a small problem: for some reason, CiviMail shows the name of the latest subscriber in the "created by" field when I create an email. It is not a big issue but causes some confusion. I went through the settings but was unable to resolve the issue. My question is: what might cause the problem?
Thank you very much in advance for your help!

CiviCRM 4.6 has not been supported for some time. It has known security issues and PHP compatibility issues.
There may still be people in the community with CiviCRM 4.6 sites who can assist in troubleshooting but you should absolutely raise within your organisation that they should be upgrading CiviCRM to a supported version.
The end of life for CiviCRM 4.6 and 4.7 was announced on 2018-12-02 here: https://civicrm.org/blog/josh/extended-security-release-update


Is there a URL that can open a contact search? I'd like to know if it's possible to craft a URL that performs a Contacts search – Something akin to typing a name into the search box in the navigation menu.  For a non-functional example of what I mean, to search for "joe":

http://www.mysite.org/drupal/civicrm/?search=joe

The goal would be to have this URL result in the same page that results when I manually type "joe" into the search box in the navigation menu, and hit "enter".

I'm trying to develop a script in my operating system (at our organization, Mac OS and we all use apple iphones that I can use Workflow to make scripts for) that allows me to select text, like "joe", right-click it to open a menu, select the script that I've titled "CiviCRM Lookup", and then a browser window opens, and enters a url that includes "joe".  I can do all the above, except figure out what kind of URL would execute such a search in CiviCRM!

I'm using Civi 4.6.2 and Drupal 7.

You can do this via full text search which gives you slightly different results than contact, but might meet your needs. If you are logged in to the demo server,check:

http://d45.demo.civicrm.org/civicrm/contact/search/custom?csid=15&reset=1&text=joe&table=Contact&force=1


How do I set up CiviCRM? This is literally the most basic of questions. I am looking for a free donor management software for the nonprofit I work at, and after all my research, CiviCRM looks like the best option! But I have no idea where to begin.

What does it mean when the start up guide refers to "hosting"? We have a Drupal website hosted by someone in Texas. Would he be able to host CiviCRM? Can I host it from my own computer? What does hosting even mean? Am I able to download the program and run it on my computer? Or is it web based and that is why it needs to be hosted? In that case, does it need its own domain name?

I've played around with the demo online and I like what I see, but I'm 100% lost in the world of open source and just looking for a simple step-by-step on how to set this up. Thanks so much!

CiviCRM needs to be hosted on a webserver that meets the proper hosting specs. See http://book.civicrm.org/user/getting-prepared/hosting/

Technically you could host it on your own computer, this would not be practical for an organization.

I believe that your CiviCRM installation should be hosted where your website is hosted.

Depending on the size of your database (how many contacts) and which features of CiviCRM you would be using (civimail, civicase, civicontribute etc...) the current hosting for you website might not be adequate.  For example, many commodity hosting companies that offer shared hosting cannot really support CiviCRM.

Your best bet for learning about hot to setup civicrm is on the wiki, or in the book http://book.civicrm.org/user/initial-set-up/installation-and-basic-setup/

If you have never installed a web application on a server, though, I would urge you to speak with the vendor who built/supports your website, or the company that hosts it, or find a vendor that specializes in CiviCRM.  Installing CiviCRM is not like installing an app on your phone or computer.


Error while saving new contribution I have recently migrated my CiviCRM installation from one server to another server.
Now facing an issue in saving new contribution. If I save the contribution without checked "Send Receipt?" it will be saved  properly. If I checked this "Send Receipt?" option it will give me an error.

Error : CiviCRM-001 - An error has occurred.

The error message indicates that the utility "wkhtmltopdf" was not found at the expected location. This is configured at Administer -> System Settings -> Misc (/civicrm/admin/setting/misc?reset=1), "Path to wkhtmltopdf executable".

You will need to find whether this utility is installed on the new server and if so, enter the full path to the wkhtmltopdf executable. If it's not installed, you can leave this field blank and CiviCRM will use the default PDF generation method instead. However this has performance issues and may cause errors from exceeding PHP memory limit or timeout.

If you don't actually need a PDF copy of receipts, you can disable this with the "Attach PDF copy to receipts" setting on the same form.


How can I set up anchors in Mosaico mailing? I am trying to set up anchors in my MOSAICO mailing so that at the top of the mailing I can have links to headers further down.
Any advice welcome?
(P.s. not a programmer, so please keep it lay!)

looks like there is no way to do this via the limited 'what you see is what you get' (WYSIWYG) editor, so this would have to be done in the code of the block you are working in, by clicking onto the source button < > And then using the html for an anchor link.

For example your first anchor link can be called 'one'

You would use it as follows. If you had a list of heading points at the top of the email as such.

1) My heading one

2) My heading two

3) My heading three

Then you would put the anchor in like this:

        My first heading

        My second heading

        my third heading

1)
My section one here

2)
My section two here

1)
My section three here


Best practice for dealing with electoral district / constituency? I'm new to the forum, so let me know if I should ask elsewhere.
We are a campaigning organisation and much of our campaigning is based on electoral consituency, but I'm not sure how best to capture this info.

How many members we can mobilise in that area, who is the current political representative (MP here in the UK), contacts for the local political parties etc?

I've been playing with the They Work for You API so I can get the constituency based on postcode, but I'm not sure what best to do with it. I'd considered setting the constituency as like an organisation level and the relavent relationships but there are a number of disadvantages to this.

It occurred to me that many other organisations must be in the same boat and wondered if anyone had any experience to share? I'm using latest 4.7 Civi with Latest wordpress.
Many thanks,

It sounds like you want to look at the Electoral API extension and at Using CiviCRM for e-advocacy more generally.

The Electoral API extension is in beta - we have it in production for a few clients.  However, we haven't written support for any APIs except the New York Times and Sunlight Foundation, which are both US-centric sources.  Please feel free to extend it to work with UK-based sources!


Civicrm manage organizations Is it possible to use CiviCRM if I am a federation that wants to manage his associations with his members? How do I manage organizations and households in such a case? Thanks.

You can create your associations as organisation (or create an organisation sub-type "association") and create relationships between your main organisation (the federation) and the associations.

Another way might be to use civimember, if you have to deal with membership fees, but it depends on how you handle your membership structure, and you should probably read the chapter on civimember in our book and experiment


Changing display on CiviCase search results Currently, when I search using Find Cases on CiviCase, the results are displayed in 9 columns: Client, Subject, Status, Case Type, My Role, Case Manager, Most Recent, Next Sched., Actions.
We don't involve assigning Civi activities much in our workflow so these fields are pretty much useless to us: Most Recent, Next Sched.
I would also like to add a results column that includes the Case Start Date.
How can I make this change?

You've picked a hard one to customize since there's multiple technologies involved on that screen and the results load after the rest of the page but without an easy way to hook into it to change it. You might want to instead go to Reports - Case Reports and use the Case Details report to select your fields and then on the Filters tab choose the criteria.


Can numeric version naming conventions for CiviCRM extensions use the Drupal module naming conventions? I like the numeric naming conventions for Drupal modules - Drupal version number then module version number. For Drupal version 6 modules, it follows something like  6.x-2.1, for example. For Drupal version 7, something like 7.x-1.1, for example.

For CiviCRM, naming conventions for extensions could be 4.4-1.0 and 4.7-1.0, for example.

I think this would be really helpful for clarifying which extensions (should) work with which Civi versions.

The current system is a little vague, and it's sometimes unclear which extensions should work with which Civi version.

Also, extension version update info does not always get updated on the Civi website extensions page, but is sometimes buried in a GitHub repo issue discussion, or in a blog post elsewhere on the CiviCRM website, or issues.civicrm.org, or another website entirely.

Thoughts?

It's hard to apply the Drupal model to CiviCRM because the release cycles are so very different. Drupal releases a complete overhaul every 3-5 years, with nothing but bugfixes in-between. Civi's release cycle is more frequent and incremental, with some big changes in each major release but a lot of stability too. Drupal intentionally breaks compatibility with all modules with every new major version, whereas it's not uncommon for a single copy of a CiviCRM extension to work equally well with 4.4, 4.5, 4.6 & 4.7. For this sort of thing, the Drupal versioning convention would be too rigid.

Currently each release of an extension explicitly declares which version(s) of Civi it is compatible with in its info.xml. You can see this at a glance by looking at the extension's page on CiviCRM.org - each release has one or more compatible versions listed.

The only downside I've seen is that often times extensions continue to work fine with a new version of Civi but their info.xml hasn't been updated to show it. E.g. once 4.7 is released, the majority of 4.6-branded extensions will probably work fine, but you won't be able to automatically download them until someone manually tests, verifies, and bugs the maintainer to update their info.


Zero fee for a paid event I host a donation-based event, and allow people to register online using a PayPal Payment Processor.

I want to have different options for donations, but also none at all (zero amount).

I tried to use Regular Fees with one of them set to zero, I tried Price Sets, I tried CiviDiscount. But all have the same problem - once the amount to pay is zero, the 'Pay' button of PayPal disappears, and instead there is no button to register free from charge.

I also tried to name the 'Pay Later' label as '€0', but then the user still has to choose one of the normal fees, and then choose the '€0' payment processor rather than the PayPal one, which is very confusing.

How can I do that choosing the zero fee will simply allow to continue and register without paying anything?

If you make a price set, create a price field and make the field not required, you should be good to go. The person simply wont choose a price option and registration will continue as normal. You should also be able to add a no cost (value 0) fee and registration will also continue as normal.

Can you explain more about your setup?  CMS, CiviCRM version, what you mean by 'Pay' button of PayPal disappears.


How do I import an activity with multiple target contacts? Has anyone got tips for the best implementation for this that's friendly to a savvy end-user?  I can script it in an ETL tool, but that's not an option for them.

"Import Activities", as best I can tell, will only import a single contact ID.
You can import more contacts via the ActivityContact API (with API CSV GUI Import extension) but this is hard, because there's no good way to match the imported activity to the CSV you imported from.  Activities don't have an "external identifier" field.

The only real choice I see is to hijack an field I'm not using like "Engagement Level" and use that as a temporary "external identifier" - but that's pretty ugly.

Any other approaches short of building a custom import?

I've tried various ways of importing complex entities. At the end of the day, the best tip I have to offer you is to write a small program to create the entities via the api.

You can either run it on the server (php) or run it over REST (php or my current favorite, node.js)

I found it much easier to deal with edge cases, errors, weird matching logic...

If you are on drupal, check Eileen work to integrate with the migration module

If you are prepared to invest a significant amount of time learning kettle, amnesty spain has shared a module to make it easier to pull or push data from civicrm.


Who is 'backup_Mk047aB'@'%' from the error 'The user specified as a definer ('backup_Mk047aB'@'%') does not exist' While the back-end is working - e.g. I can add fields to profiles, etc. -, I see form data perfectly fine when calling pages, I cannot modify or add contacts resulting in

Sorry but we are not able to provide this at the moment. DB Error: unknown error

The log shows the following:

#6 /*/wordpress/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist")

Searching the CiviCRM database - I cannot find a reference to a user called "backup_Mk047aB" (not anywhere in Wordpress databases either).

A previous post notes that

  You will get more details in civicrm log file (*/file/civicrm/ConfigAndLog). Also the main reason of this type error is, we are using few fields that are disabled. check custom fields status that are using for contact. see here

I then tried using my webpage form and populated all available fields of all profiles and then get

Database Error Code: The user specified as a definer ('backup_Mk047aB'@'%') does not exist, 1449

Additional details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_value_eda_individual_characteristic_2  ( name_of_affiliation_10,address_line_1_11,address_line_2_12,entity_id ) VALUES ( '','Henriette','',2 ) ON DUPLICATE KEY UPDATE name_of_affiliation_10 = '',address_line_1_11 = 'Henriette',address_line_2_12 = '' [nativecode=1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_value_eda_individual_characteristic_2  ( name_of_affiliation_10,address_line_1_11,address_line_2_12,entity_id ) VALUES ( '','Henriette','',2 ) ON DUPLICATE KEY UPDATE name_of_affiliation_10 = '',address_line_1_11 = 'Henriette',address_line_2_12 = '' [nativecode=1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_eda_individual_characteristic_2  ( name_of_affiliation_10,address_line_1_11,address_line_2_12,entity_id ) VALUES ( '','Henriette','',2 ) ON DUPLICATE KEY UPDATE name_of_affiliation_10 = '',address_line_1_11 = 'Henriette',address_line_2_12 = '' [nativecode=1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist]"]
)

Although I've been back-upping my site - this error just came along...

I'm lost und would love to meet user:backup_Mk047aB - any ideas!?

OK - This is really heinous!!!
I've been trying all day - posted the query and after doing that read following set of instructions on how to do Alternate Moving the database using phpMyAdmin -> see the link and look at the heading Post Import Activities.
It reads

Very Important: If you have custom data profiles set up in your civiCRM, they may be present but for some unknown reason not be active. Go to your Administer >> Customize >> Custom Data and select "View and Edit Custom Fields". Select "Edit Field" for any one of the custom fields in the group and save it without making any changes. This will make civiCRM aware of the custom data fields and everything should be back on track.

I've got two set of custom fields, did what I'd been tolded = didn't work; did it again with the second set = and voila, everything works again.
There's two things on my mind:
1.) Can any of the more tenured members comment on what the problem is - it must be a bug, it can't be by design!?
2.) Who the heck is user:backup_Mk047aB???


Two payment processors options on one webform Different payment processors offer different options that we would like to have available from a single form. Is it possible to have different payment processors engaged from different form options on the same form? So e.g. if you select a recurring payment the form uses GoCardless, and otherwise it uses Paypal?

You can use multiple payment processor on a contribution or membership or event registration online forms. However the user will need to manually select which payment processor he would like to choose or you can add custom javascript to hide payment processor selection and set the payment process based on the selection of recurring option or membership they choose. This is same on offline forms as well.

HTH

Pradeep


Where is extension data stored? I am looking to upgrade an extension - for now I have been updating extensions by disabling - then uninstalling the old extension - and then installing and enabling the new extension.  While that has worked for the most part, when I was going to upgrade Mosaico, I was worried if by using my typical method - I would lose all the templates I created.  With that being said - is there a better way to upgrade the extension - and if I do what I typically do, will I lose any data?

Its a bad idea of upgrading as uninstall and install new version of extension. You can upgrade the extension either one of the following two ways:

If the extension is listed under CiviCRM extension page with auto-download as true then under CiviCRM extension page of your site you should be able to see an option for updating the extension(if option not available than make sure you have Resource URL set for extension correctly, CURL, WGET, ZIP extension installed on server).
You can also upgrade the extension manually by replacing the extension folder/files and then visit CiviCRM extension page in your site and click on refresh button. If the new extension requires db changes than you will be prompted with an option on top right of the browser to run db upgrade. Run the upgrade and its ready for use.

CiviCRM stores extension settings in civicrm_setting and civicrm_managed table. But some extension have their own install code to store data in various table, uninstalling the extension will lead to loss of such data as incase of mosaico extension. It is recommended to follow upgrade pattern for upgrading any extension.

Note: Always take backup of db and files before performing upgrade.

HTH

Pradeep


Upgrade Civi first, or Drupal first? I have a Civi 4.4.4 install on a Drupal 7.37 and I want to upgrade both: the Drupal to 7.59 (which I think is the latest in D7?) and Civi to the latest 5.6.0 if possible. I am totally new to both of these products, but I've upgraded Wordpress before, if that experience will help me at all :P

I just saw a very recently updated post in this forum in which some people describe the process of making long-distance upgrades, going back and forth between upgrading Civi and upgrading Drupal to intermediate versions, alternating, and it sounds like it would be pure hell.

My question here is: should I do Drupal first, or Civi first? I realized that I'd better ask because whatever my intuition is might be wrong. I'm really hoping there will only be one upgrade each, since the "distance" is not that far off. Help is much appreciated.

Kotodharma,

Welcome to stack exchange. Its a huge pain to upgrade CiviCRM from 4.4 to 5.6. If your site has lots of customization then the upgrade might tend to break at some point if you're not lucky enough. Upgrading Drupal or CiviCRM first doesn't matter. But yes while upgrading CiviCRM I would suggest you to perform incremental upgrade so that if anything breaks you don't need to start it all over again. Here is what i would suggest

Upgrade to last version of 4.5
Upgrade to last version of 4.6
Upgrade to last version of 4.7
Upgrade to 5.6.0

  Note: Take backup at every stage so that you can revert it back if upgrade fails.

HTH

Pradeep


How do I automatically create a case on inbound email? I feel like this is an incredibly basic question, but I have read through the user guide, the admin guide, and searched stackexchange and google, and I have not found the answer.

I have set up an e-mail account to receive inbound emails, and I have successfully configured CiviCRM to check that account, pull in email, and turn those emails into Activities on the contact record.  So far, so good.

But what I want is for any inbound e-mail to become a case in CiviCase.

I have read in the docs that inbound email will be tagged to an existing case if it contains a subject line field.  And I have also read here:

  In the CiviMail chapter the Email Processor was described as a way to
  get inbound and outbound emails into CiviCRM as non-case activities.
  When you enable CiviCase, a new action will be available that allows
  you to file any non-case activity onto a case.

Where is that new action?  I edited the Scheduled Job for Process Inbound Email, and it doesn't have an option to put new emails into a case.

Thanks for your help.

CiviCRM 4.7.20 on Drupal if that matters

It can't do that out of the box but you could theoretically write an extension to use hook_civicrm_emailProcessor to create the case when an email comes in. But unless you always want the client to be the From address, you'd have to figure out how to decide who is the client if there's multiple To/Cc's. You'd also have to decide what to do when the client/case already exists for an incoming email or you might get duplicate cases.

For the second part of your question, there used to be a link that appears on the far right-hand side of activity search listings, and a button at the bottom of the page when you view activities, but it looks like maybe this has changed in the latest version. But I can see it under search results in the dropdown under Actions (e.g. after doing Search - Find Activities).


How to setup bounced processing on CiviCRM for a Gsuite account? I am trying to setup Gsuite as bounce processing for CiviCRM using this guide https://civicrm.org/blog/dahndy/leveraging-civicrm-email-to-activity-processing-in-gmail

But keep getting the following message when schedule job is ran.  Any idea how to fix it please?

One thing in the log, it says "webadmin@imap.gmail.com" but it should have said "webadmin@our.domain" as per my sessings below, is that right?

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

Full message:
Finished execution of Fetch Bounces with result: Failure, Error message: Could not connect to MailStore for webadmin@imap.gmail.com
Error message:

An error occured while sending or receiving mail. Failed to connect to the server: imap.gmail.com:993.

So I just ran into a similar issue. Our bounce handling stopped a few months ago and nobody noticed. We also use GSuite, and our email address appears in a similar fashion in the log. I thought it looked strange at first too, but since we changed nothing and it went from working to not working, I knew that wasn't the issue. I also tried changing the email account password to see if that would fix the problem.
It turned out that Google turned off access for less secure apps automatically, effectively blocking access to the return email account from CiviCRM. As soon as I toggled that switch, bounce handling started working again. This is the link that worked to turn it back on: https://myaccount.google.com/u/5/lesssecureapps?hl=en


Event RSS Error Code When I click on the RSS icon for my events in Civi, I get the following error.

error on line 2 at column 6: XML declaration allowed only at the start of the document

From searching, it appears that this happens most commonly when there's added white space in a file.

I've tried editing ./civicrm/templates/CRM/COre/Calendar/Rss.tpl to no avail.

Where else can I look to see if there's added white space?  Any other ideas?

Thanks in advance.

Edit:

The RSS links to https://focusdc.org/civicrm/event/ical?reset=1&list=1&rss=1

From your screenshot, I was able to test this same functionality on two test sites (a good general troubleshooting tactic!).  The problem does NOT replicate itself there.  The issue is specific to your site, or (less likely) reflects a bug in an older version of CiviCRM than the ones I'm testing.

I was able to use your link to see the exact error - and you're correct, the issue is a blank line.

Since you're using Drupal, I would look for a blank line at the end of settings.php and template.php.  I would also try testing whether the problem disappears if you change themes (preferably on a test copy of your site).  That will help you isolate whether the problem is in your theme.


Bogus Error Mandatory fields first name and last name OR email address missing from form Event registration form on Civi 4.7.15 (WP 4.7.1) keeps throwing this mandatory fields missing error, even though all fields are filled in with good values.

Happens on empty cache and regardless what values I put in the form fields. I'm stumped.

(See also this thread.)

Did a bit of googling and figured this one out -- I didn't realize I needed to visit the access control screen [Administer / Users and permissions / Permissions (access control)] in order to enable the form to accept user input on submit.


Missing display option in dashlet I am not able to see any display option in civiCRM 4.6.10 Version of Joomla to show report on dashlet in bar/pie format under access tab in report instance. Please help from where i can activate the bar/pie option. I am getting tabular report when i check option

Available for Dashboard?      Users with appropriate permissions can add this report to their dashboard.

The option you're looking for isn't under the Access tab.  It's below all the tab data.  See the attached screenshot.

Note that most reports do NOT offer the ability to view a chart - make sure your report does!  If you'd like to test, use the "Contribution Summary" report, which supports charts.

After you've changed the view, press the "Update Report" button, and on the dashboard, press "Refresh Dashboard Data" and you should be in business.


CiviPledge custom styling In which file can I find and edit CiviPledge CSS styling to make the form look more in line with the rest of my site? Thanks!

It's best to not edit the files directly, but to create your own file. Otherwise it will get overwritten with each upgrade you do. In the version I'm using, I can set the custom CSS file here:

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

I use the "inspect" option in Chrome to see what CSS is being applied, then I copy it into my custom css file, and edit it.


Drupal View adding trailing zeros to Activity ID I have a Drupal View displayed as a block, which includes a link to a webform using the Activity ID and the Contact ID for logged in users. It's been working fine but now I find that it's adding trailing zeros onto the aid, e.g. https://my.site/volunteer-role?cid2=540&aid=78668.0000

This is the link in a global custom text field: "volunteer-role?cid2=[contact_id]&aid=[id]"

Any ideas how I can remedy this?

I fixed it! While getting a screengrab, I noticed there was some aggregation on the Activity Field which I must've set it in error!

I reset this to the default and it's working.


CiviVolunteer - View Volunteer Roster The View Volunteer Roster for a CiviVolunteer Project indicates it should only be displaying the Assignments for the current day and future days.  However, it lists the assignments which are in the past.  How do we eliminate the past assignments?

In addition, the "Back to Manage Volunteer Projects" button at the bottom of the window does not work.

Drupal - 7.54
CiviCRM - 4.7.17
CiviVolunteer Extention - 4.6-2.2.1

I think I have seen this before when the volunteer opportunity has no end date. When creating the opportunity, did you select "Open-Ended" for the "Schedule Type?"


Where did my price field go? It's missing! After a recent civicrm upgrade, one of my pricefields in a price set just 'disappeared'. There were no errors showing and the pricefield appeared to be correctly configured.

I solved this by looking in the civicrm_price_field table and noticed that the missing price field had an expiry date of '000-00-00 00:00:00' vs. NULL for other expiry dates. Setting the price field expiry to NULL allowed the price field to be redisplayed.
On the configuration screen, those two values both appear the same.
Conclusion: a '0000-00-00 00:00:00' in a price field row expiry field should be considered invalid/error.


CiviVolunteer - Functions Not Working after Security Update to Civi 4.7.21 on Drupal We started using the CiviVolunteer extension with success.  However, after we upgraded to the security release 4.7.21 some of the CiviVolunteer functions do not work.  Or they cannot be accessed from the navigation menu.

We cannot access the following functions;
- New Volunteer Project
- Manage Volunteer Projects
- Search for Volunteer Opportunities

In addition, the CiviVolunteer menu items cannot be seen on the Navigation Menu editor (Administration > Custom Data and Screens > Navigation Menu)

Ron. This is a known issue. CiviCRM made some changes to its Angular (a JavaScript library) integration that CiviVolunteer needs to catch up with.

CiviVolunteer is maintained by an independent consultancy, Ginkgo Street Labs. We would like to resolve this problem as soon as possible, but we have a full slate of projects that, as a small business, we need to prioritize ahead of unfunded work. If your organization is able to contribute developer hours or funds toward resolution of this problem, please contact us.


Merge all duplicate contacts (running version 3.4.6) I'm helping out a nonprofit with their CiviCRM.  They have thousands upon thousands of duplicate contacts.  These contacts are being pulled from an email service, that is sending the same email, sometimes 12+ times, to the same address.

Is there any way to merge all duplicate contacts automatically?  Or a way to export all contacts, sort them in, say, Excel, and re-import?

Merging each contact one-by-one using the rules would take weeks.

Thanks!

One Option: The easiest way I have found (in 4.6.4) is to export like you said, with contact ID, do your manipulation in excel to pull out the records you would like to keep, and re-import the records into a group, choosing 'update' when you do so.

If you need to merge information, you could put it on the line with the contact ID you will be keeping.

Then you can grab all of the contacts in your group (or all contacts not in your group, depending on which way you selected) and delete them.

To export these contacts, search for all, select all, and choose 'action>export'.

The import tool can be found under 'contacts>import contacts'.

One thing I have found on our setup is if I import a large dataset (say, more than 10k records at a time) I will get a timeout and the import will stop with 'db error', which is frustrating, so I usually break these up into smaller sheets to import.

Another Option: I believe you can do this programmatically with the API if you are more comfortable doing that. I haven't used this approach though so I don't know how well it works.

Possibly related: Batch merge automation of big data set


How to relationships field on the contact profile I want to create a relationships field on a contact profile like the 'Current Employer" field.  I want to be able to access this new field rather than using the 'Relationships' tab.

Why?
I want to retain the 'Current Employer' field.
My client, Navy Sailing has over 180 branches around the world. We assist with the management of contacts that belong to those branches (organization), and creating a contact relationship with those branches seems to be the best way to manage the requirements.  I need the field on the profile in order to make it easier administrators to edit and to view, rather then multiple clicks to use the tab. (and needs to be an obvious piece of data on the profile)

Is there anyway to get a relationships field on the profile, e.g. directly under the 'Current Employer' field OR in a custom field set elsewhere on the profile???

Carl

The "Current Employer" field is special in that the employer_id is actually stored on the contact record (in the civicrm_contact table on the underlying database).  All other relationships are stored only in civicrm_relationship.

Nevertheless, you could fake this:

Create a custom field of type "Contact Reference".  This by itself might meet your needs - do you still need a relationship if you have a contact reference field?
If so - you can write an extension (if you're not a coder, you can hire one to do this for you) that fires on hook_civicrm_custom.  When they contact reference field is changed, a corresponding relationship can also be updated.


Drupal Email address ends up in Billing not Home I am running CiviCRM 5.13.4, and have the following scenario.

•   Administrator creates an Individual Contact offline, without any email address.
•   The User then registers for an online account through Drupal, which includes entering an email address.
•   The User can then log on as usual.

The system successfully deduplicates with the original contact, using the name and postcode (collected on the registration Profile).
BUT the email entered by the User ends up as the Billing Email Address, not the Home address, and the Billing Email becomes the Primary email, which is not what is wanted.

It looks as if the linkage with Drupal is just picking up the first entry on the list of location types, and not taking note of the Default type which is set to Home.

This is a quite possible scenario when we migrate our existing membership database, and some of them start to use the online capability for the first time.

Is there any fix or workaround?

With thanks, Tony

I believe this is now fixed as part this PR. Can you please try patch from here if it fixes your problem?

Cheers

Pradeep


How to write unit tests for methods thsat echo instead of return (e.g., AJAX call handlers) There are several methods in CiviCRM that just print their output directly to the buffer and then exit, because they're just sending an HTML snippet or other response for an AJAX call. For example, CRM_Event_Cart_Page_CheckoutAJAX::add_participant_to_cart().

What are best practices for (or existing examples of) unit tests that cover such methods?  I could, I suppose, use ob functions to capture the output, but then I'd need an external library to parse and test the HTML. Are there better ways, and are there examples already in place?

I'm a bit out of date on the current status of the civi test framework, but if WebTests are still available I would do this as a WebTest.
https://wiki.civicrm.org/confluence/display/CRM/Setting+yourself+up+to+work+with+Selenium+tests

Include a line that waits for some element you are expecting to appear, then test its value using the webtest api.


Notes next to contact phone numbers I work with homeless and their phone numbers change.  We need to keep all their numbers but add small notes to them.  Like busy signal, no voicemail, Old/Wrong Number... stuff like that.  Because we deal with so many phone numbers when I was importing the csv list I had to create new fields to accommodate this or it would wind up on the same line. If there was a way to add notes on the contact summary page to quickly reference what's going on with the phone numbers next to the phone number?

One option that wouldn't need any custom code would be to store phone numbers in custom fields instead of in the normal phone fields. Then you can have whatever fields you like for each phone number (phone type, notes, etc). You can set the fieldset to be default open on the contact page, so it would be fairly visible. Otherwise, you'd need to find someone to code this up for you, I'd think.


Private content for event participant? My scenario is quite simple to explain :

When a person register on an event (paid or free), we would like to give him an direct access to private content (by email or by direct redirect) (like documents to download or links ..).

how do you achieve something like that in WP ?

Actually i'm thinking of using CIVI custom field in events, then checking in the single event template for the "participant" status.. OR do you think there's another smarter way ?

I would use the CiviRules extension, you could structure it something like - if registered participant of 'X' event, send email of 'X' template.

With this you could just create an email template for each event within Civi with the links you would like them to access and it would automatically send to anyone who registers for the event.


Organization Listing - can I show logos I have a profile configured to list out related organizations from the Contacts database on the front-end web site.  It works great and provides the details I want, however, I would also love to show the org's Logo from their contacts entry - is this possible?  I can't seem to find a matching field in the Profile configuration.

Thanks!
Norm

The field your are looking for is called 'image url' it is a contact field.

You should be able to select it in the profile setup. The image will display scaled to 100X100 pixels.

Hope this helps...


Civicrm upgrade problem - will clearing cache help? Trying to run upgrade script on wordpress civicrm gives me a new login screen followed by another chance to click the upgrade button follow by another login screen. civicrm 4.6.9 from 4.6.8 wordpress 4.3.1

How do I flush cache on Wordpress?

Warning: Illegal string offset 'type' in /home/mygriefandloss/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Setting.php on line 613

Warning: Illegal string offset 'group_name' in /home/mygriefandloss/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Setting.php on line 516

These errors happen when I just try to access civicrm from menu.

The answers here list a few different ways to clear cache: How to clear the caches in WP / Wordpress or Drupal via url? including on WordPress.


Current employer not exporting to CSV I have tagged a group of contacts and am exporting them to a CSV file. When I do this, of the 30 contacts only about 25 show the current employer in the CSV file. I checked the remaining five and they have a current employer listed in the contact record, but it does not export. How can I fix this? Thank you.

CiviCRM populates current employer based on what is stored in civicrm_contact.current_employer rather employee/employer of relationship. While adding employee/employer of relationship relationship the form provide is_current employee option, if ticked  civicrm_contact.current_employer is stored with organization name and also same field is used in add/edit contact form.

For some reason the data for 5 contacts didn't had civicrm_contact.current_employer saved properly, resaving them might populated the field correctly.


Thank You page on contribution form. Print option for the PDF that is emailed as "receipt.pdf" When completing a contribution, an email can be sent out with an attached PDF called "receipt.pdf". Is it possible to have this PDF printable on the Thank You page? I currently have a sloppy Print Button on my ThankYou.extra.tpl file, but it is not clean because I am using: $('#crm-main-content-wrapper').before('

Print

'); , which is basically printing the entire webpage. I also tried the &snippet=2 approach in the URL, but that is also too sloppy for the client.
Does anyone know of how to hook into that PDF generation code and spit it out into the ThankYou template?

Not tested yet, but can you try calling /civicrm/contribute/invoice?reset=1&id=<contribution_id>&cid=<contact_id> in the href instead of javascript:window.print()?
Note that the token <contribution_id> is the payment id that was created after you submitted the contribution form. <contact_id> is the id of the contact to which contribution belongs. Check if you can already get this in the thankyou template variables. More info - https://docs.civicrm.org/dev/en/latest/tools/debugging/#in-smarty-template-files
Also, make sure you've permission to download the invoice. I think civi requires either access CiviContribute or view my invoices.
UPDATE - For Joomla - The url is - /index.php?option=com_civicrm&task=civicrm/contribute/invoice&reset=1&id=< contribution_id>&cid=<contact_id>


Live contribution pages coming up blank I've recently updated our CiviCRM install to v4.7.9 (was 4.7.6 IIRC). Now it seems our contribution pages aren't filling with anything -- the theme parts show, but the main part of the page is empty:

I've looked at the page source, and can see that various CiviCRM script links are in there, but there's no sign of the contribution form fields. Is there something I need to reset to get the fields back, or have I got a bigger problem...?

Versions: Wordpress 4.5.3, Twenty Fourteen theme, CiviCRM 4.7.9

Edit: Looks like profile pages are doing the same thing. It's all working in Test Drive/Preview, but not on "live" pages.

There have been a few questions on this site relating to:

CiviCRM not displaying pages under certain WordPress themes, or
CiviCRM showing only CiviCRM content - without the theme!

In particular I'd recommend checking out this question which, while it describes different symptoms to what you're reporting, may help point you in the right direction.

There is also a question on which WordPress themes are thought to work well.

My suggestion would be to try other "stock" WordPress themes first, and see if the page contents start appearing. If so, then you have a good reference point to analyse the problem. If not, then you might be looking at a CiviCRM bug.

Twenty Fourteen theme is a "core" (if older?) Wordpress theme that CiviCRM is likely to have been tested with. Other WordPress plugins might be a factor still, so if you have the same issue with all themes then look into the possibility that a plugin is interfering.

Some other questions which seem similar or related to issues with CiviCRM in WordPress themes:

The contribution payment verification page has lost the site theme styling
Why does CiviCRM render a validation failure without the Wordpress theme?
CiviMail Unsubscribe link goes to an empty Wordpress page
Wordpress Theme on Contribution pages (maybe)


information about the underlying data-model behind civicrm (version 4.6) where can I find that? I have a good knowledge of databases, so this information would help me a lot in modeling the civicrm-data with either contact-tags, groups.

There is some data information on the wiki:

https://wiki.civicrm.org/confluence/display/CRMDOC/Database+Reference    -
https://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+data+architecture
https://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+4.4+ER+Diagram

I hope this helps you!


Can Drupal be used to send an email if an existing contact's name is changed I'm wondering if it is possible to use the Drupal Rules module with CiviCRM Entity to send me an email when, for example, someone has taken an action (like made a donation) that updated the contact record and (for example) changed their first name. I can see a trigger "Before updating a civicrm contact" that then offer "Changed" and "Unchanged" values which could be compared (Condition: data comparison) but, that trigger does not seem to work? Any ideas?

The extension CiviRules is maybe an option. You can find it in the extension directory https://civicrm.org/extensions/civirules and the latest documentation is at https://docs.civicrm.org/civirules/en/latest/ .


How do i add parent information to a teenage volunteer profile? How do i add parent information to a teenage volunteer profile so that when a new volunteer fills out their profile, it creates a parent relationship and contact as well.
I am using Profile-Create Mode to allow the data input on our website.

You would need to created an extension using civicrm hook 'hook_civicrm_postProcess' which gets invoked when a civicrm form is submitted as you want the actions to be taken upon profile submission so this should work for you. In the hook you can create the relationships through the API call.

Detailed documentation on hook.

Hope this helps.


How do I move registration to another event I have a member signed up to the wrong event. I can't find a way to switch to the right event through the back end. I see Transfer - but it transfers to another person; not another event. Is it possible?

This is not possible via the UI.

There is a table civicrm_participant_payment which links the Participant and the Contribution records.

If you have access to that, and know the contribution_id then you should be able to edit participant_id


Importing Household Address if Already Exists I've seen several requests for this, but some seems outdated.
Goal: Import contacts and households and update existing records.  I'm using http://forum.civicrm.org/index.php?topic=29506.0 as a reference.  Should it work for contact updates?

Using 4.6.3 and import GUI.
Import household contact with primary home address (complete)
Associate relationship for contacts as Member of household (complete)
Associate relationship for contacts of Spouse (TBD but suggestions welcome)
Associate contacts as having Master Address belonging to household

This seems like a very common use case and I'm almost there...now attempting steps 4 and 5.

Status:

Created csv with household info and imported successfully.
Used mysql to collect master address record id.

When importing individuals:

Selected Update method
I selected "Master Address Belongs To..." and included the Address ID from mysql
- Import successful but Address is not updated for existing contact addresses and does not belong to household

Could this be related to: CRM-16588?

So now I have some related addresses (although I have to manually save to show them properly in view screen) but others belonging to individuals.  I suppose I could delete all the individual addresses and reimport but don't like that idea ....

BTW perhaps this could drive a rather large feature request/refactor:
Rather than import master address belongs to ... use the same relationship method but enable an option like "Let Household fields override Household Member"  Perhaps this could work like relationship permissions.  This could mean any updates to a contact address would update the linked field (consistent with how event pricesets/address work...)

A workaround is to import the address along with the Master Address ID. So import like you are importing a new address but also include the Master Address ID, mapped to the "Master Address Belongs To" field.  It links them and populates the address.


Mosaico with WordPress Unexpected errors I am working with the Mosaico extension in WordPress with Civi 4.7.20.

If I go to build a template the template builder loads OK. I get several errors when working on the template.

When a template loads the image placement areas do not show an image and if I upload an image I get an internal server error.
When I try to save an template I get an unexpected error, please contact us. This only occurs on the versafix-1 template the tedc15 template saves OK.

Not sure if it is a bug or configuration issue.

This is a bug - and it looks like it has been reported upstream:

https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/160

The temporary fix is to add an Alias to your Apache or Nginx configuration. I added the following for nginx:

location /templates/versafix-1/ {
  alias /srv/longshore/platforms/ourpowerbase-d7-c4.7.19/sites/all/extensions/uk.co.vedaconsulting.mosaico/packages/mosaico/templates/versafix-1/;
}


How do I make profile submissions more reliable, or at least not silently fail? When a profile is submitted without a valid cookie, the submission is lost (no data saved in the database) and the site redirects to the front page of the website.  This occurs on Joomla when:

An HTML snippet is used (I'm working around this by embedding an iframe loading a standalone profile page, with CSS display:none to hide it)
You load a profile, then delete the cookies for the site
You load a profile, then wait a few hours before submitting it

We just had the 3rd condition trip up someone trying to fill out a form on our website.  She loaded the page, let it sit overnight, and tried to submit the form 8 hours later.  I don't know how to prevent this besides adding a note by the Save button to the effect of "If it has been more than an hour since you loaded this page, please reload it before saving the form".  This seems really clunky, and will potentially lose the long answers users have entered into the form, if their browsers don't handle the reload well.

Is there a way to remove the dependence of the form submission on a cookie?

If not, is there a way to control what I assume is a cookie timeout, to reduce the incidence of the 3rd condition?

If not, is there a way to redirect the failed profile submission to an error page instructing the user to go back and try again?  As it is, with no error given and the site redirecting to the front page of the website, the user has no idea anything went wrong and that their submission has been totally lost.  This seems like a serious problem.

I think I've tracked down the problem on my site to the uk.co.vedaconsulting Mailchimp plugin. Removing that seems to fix my issue on my test server, making my hack of embedding an iframe unnecessary (described at Why won't data entered into CiviCRM profile html snippet save? ). Hopefully it also fixes my timeout problem described here...testing that now.

EDIT Sept 22 2015:

Nope, i was wrong...misled by confusions in reloading pages and accidentally making it work with the background-loaded embedded form hack. Disabling Mailchimp or other plugins does not in fact change anything.

The approach I'm now using, successfully so far, is to load the embedded iframe hack at the time of form submission, rather than when the page is first loaded.  So there's no danger of the page sitting too long , having the magic cookie (or whatever it is) time out.

1) user loads profile or page with HTML snippet

2) user eventually clicks "submit"

3) iframe hidden with CSS loads a small profile to set the magic cookie

4) when iframe finishes loading, it uses javascript to submit the original form

To accomplish this, I:

1) Embed javascript function in the head of each page with a profile:

<script type="text/javascript">
function loadHack() {
  var ifrm = document.createElement('iframe');
  ifrm.setAttribute('id', 'embeddedhack'); // assign an id
  document.body.appendChild(ifrm); // to place at end of document
  ifrm.setAttribute('src', '/en/?option=com_civicrm&task=civicrm/profile/create&gid=21&reset=1'); // assign url
}
</script>

2) use the alterContent hook (and manually edit HTML snippets) to make the submit button call the function above instead of submitting:

if($tplName == "CRM/Profile/Form/Edit.tpl")
  $content = str_replace('id="_qf_Edit_next"', 'id="_qf_Edit_next" onClick="loadHack(); return false;"', $content);

3) use the alterContent hook to add a callback to the embedded hack profile, to submit the original form once it's finished loading the iframe:

if ($object->getVar('_gid') == 21) //hack form
        $content .= "<script type=\"text/javascript\">window.onload = function() {\n    parent.document.getElementById('Edit').submit();\n}\n</script>";

This is all ugly, but seems to work.  I think this really needs to be addressed in core code, though.


Why do I suddenly get unkown error when try to log in through Civimobile? I used to be able to log in into my Joomla based CiviCRM with Civimobile, but last week I logged out on Android, and can't log back in. It finds the site, I think, but when typing in credentials it says "unknown error".
It might be some permission related problem but don't know where check and change these for Civimobile.
Turned off firewall, reinstalled both the app and the extension, didn't help.
I need help here I think.

The solution was to click "logout from mobile" under my contact summary page/mobile tab;-)
It recreated the API that started working.


How do I regenerate the text version of an email after editing the HTML draft? As asked in title. Thanks for your time!

Welcome to Stack Exchange, CiviMail will create a plain text version of your email for those using a plain text client. So there is no need to enter content in the plain test area unless you wish folks using plain text to have a specially formatted message or you just want to send your email in plain text that is when you would use the plain text field.

If you have already entered text, delete it and it will be re-generated.

Here is a link to more info: https://docs.civicrm.org/user/en/latest/email/mass-mailings-using-civimail/#mailing-tab

Hope this helps


How do I find the ID of a custom field, contribution, option value, etc.? Many answers posted here involve finding an ID number for a custom field, or a group, or something else.  How do I do that?

The easiest way is to hover your mouse cursor over a link that refers to the item in question.  In the link that apppears in the bottom of the browser, look for the part that says &id= and note the number after it.

For instance, in the first screenshot, I hover over the "View" link to see that the contribution's ID is 45:

In this example, the custom field ID is 3:

In a few cases, there won't be any &id=.  For instance, with groups it will be &gid=.  They should all have "id" in them though!  Just make sure you don't pick the wrong one - e.g. in the first screenshot above, "cid" is the contact ID, not the contribution ID.


CiviMail - SMTP error when sending test email I am running CiviCRM 4.6.8 on Wordpress 4.3.1.
I have configured my hosting providers SMTP details (as provided by them) under outbound email settings and when I click on "Save & Send Test Email", the email is sent successfully.

When I compose a new mailing under Mailing -> New Mailing, and click on the "Send Test" button to send a test email to myself, I get this error:

  Error in call to Mailing_send_test : Failed to set sender:
  b.167.72.4a390771944bc4a6@ [SMTP: Invalid response code received from
  SMTP server while sending email. This is often caused by a
  misconfiguration in Outbound Email settings. Please verify the
  settings at Administer CiviCRM >> Global Settings >> Outbound Email
  (SMTP). (code: 501, response: : domain missing or malformed)]

What is the problem here and how do I resolve it?

This is a problem not with your SMTP but with your Mail Accounts settings in CiviCRM. When using CiviMail (as opposed to other emails from CiviCRM), the headers are altered so that the message comes from a unique address.  If a message bounces, CiviCRM can know exactly which recipient of which message generated the bounce.

The unique address is generated from the account in Administer - CiviMail - Mail Accounts selecter for bounce processing. It's made up of the Localpart (if set), a "b" followed by random string of numbers and dots, an "@" sign, and the Email Domain.

Looking at the address shown in your error message, it's missing the domain, and that's what the error is complaining about. Check your Mail Accounts settings to be sure you have the domain set.

Incidentally, while you're at it, you should double-check the whole bounce handling system:

Mail to random addresses at the domain you set should end up in a single mailbox.
Your IMAP or POP settings in Mail Accounts should work for checking that mailbox.
Your scheduled job for fetching bounces should be running.

See the page on book.civicrm.org for more information.


Activity emails aren't sent when using sender's primary email address I am looking for an option where a signed in volunteer can send an email to a contact using his primary email address - when I select "send an email" from the actions drop down I do see the default as the signed in user's primary email address, however, if I use that to send an email there doesn't seem to be any email sent even though an activity is registered and i get a notification of a successful email being sent

On the other hand I have added an email to the "From Email addresses" section under civimail (this coincides with the registered domain as well) - if I select this email address and send an email it successfully goes through

any help would be appreciated

Thanks

Are your volunteers are using an email from an external provider as their main address?

If it's the case, say john.doe@yahoo.com or john.doe@gmail.com, it's "normal" that the emails are automatically filtered and flagged as spam:
It's a feature for pretty much any big mail provider to whitelist what servers are authorised to send emails on their behalf (SPF) in order to limit spam and prevent "rogue" servers to try to impersonate one of their user.

Obviously, your civicrm server isn't one of the authorised servers, so it ends up directly into the spam, or even simply discarded.

The way emails are sent with civimail is different (no matter what you put as the from sender, it's the email that you defined as bounce that is used to really send the email) so it might be why you experience something different there

Try to use as the sender for "regular" emails an email from a domain you control (your own), the email should be sent properly


Membership status changing from Grace to Expired a day later than expected CiviCRM 5.24.5, Drupal 7.72
The job "Update Membership Statuses" is set to run once per day. According to the log, it ran on July 1st but no records were updated. I expected to see all memberships that were in status 'Grace' change to 'Expired', instead this didn't happen until July 2nd.
The membership:
Fixed, 1 year, starts January 1st
fixed rollover day of June 30th.
Grace period:
Start Event: end date, no adjustment
End event: end date
End Event Adjustment: 6 months
Expired:
Start Event: end date
Start Event Adjustment: 6 months
Thanks for any insight as to what may be causing the 1-day delay.

The 'Fixed Period Rollover Date' relates to the start of memberships and is not relevant here.
This is about date maths ...
Grace is defined as End Date (Dec 31) to End Date + 6 months. So what date is "6 months" after Dec 31?  If you increment the month and leave the day of month fixed, you get "June 31".  That doesn't exist, but if we think of "June 31" as the day after June 30, you get to the last day of Grace being July 1 (not June 30).
So then changing to Expired on July 2 makes sense.
Intuitively we think of Dec 31 as 'end of December', and so 6 months later is 'end of June' - but that's not how it is calculated.
See Example #3


Is there a way to see the actual change performed by the entry in the change log? The change log as it stands seems pretty pointless if you only can see that someone has changed something (anything) for a contact.

Is there any way to see what was changed?

You can switch on the advanced logging in the Administer/System Settings/Misc, that will show you far more detailed logging. I expect it will impact your performance, so it is probably worthwhile to test it first.


Cron failing on Update Membership Statuses and Send Renewal Reminders We're running Civicrm 4.7.11, Drupal 7.56 on Cpanel.

I'm running cron via a custom php script that calls the url as per the civicrm cookbook.

All the jobs seem to get called except "Update Membership Statuses and Send Renewal Reminders" which fails with:

PHP Fatal error:  Call to a member function delete() on null in /home/sitename/public_html/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php on line 659

Same error happens when running from drush, and when trying to execute manually via admin page I get a WSOD 500 error, which i guess is the same problem.

The issue seems to have occurred when moving to a new cpanel server which is using easyapache PHP instead of Cloudlinux.

Any ideas? PHP error? Civicrm? Drupal?

I've been holding off updating Civicrm due to a Leaflet maps issue with drupal.

Thanks
Joe

I solved the issue with the help of xurizaemon on the Mattermost chat channel.

The script was failing because it was trying to delete a membership that looked like it was already deleted.

Hints below:

  so "call to member function delete() on null" means that CiviCRM
  expected there to be an object and called a method on it - but the
  object didn't exist

  i'd guess that
  here(https://github.com/civicrm/civicrm-core/blob/master/CRM/Member/BAO/Membership.php#L631)
  Civi tried to fetch a membership

  then
  here(https://github.com/civicrm/civicrm-core/blob/master/CRM/Member/BAO/Membership.php#L665)
  Civi tried to delete the membership

  but it didn't look to see if the first thing failed - and so when it
  tries to call delete on null, it falls over.

  IMO it makes sense to inspect the result of line 631 before it treats
  it as an object

  ie if ($membership = $memberships[$membershipId]) { /* do all the
  stuff with $membership */ }

  or (easier to read) if (!$membership = $memberships[$membershipId]) {
  /* bail out / throw exception */ }

So I downloaded a DB dump to a dev environment. Checked the error was still there.

Then ran the task from the scheduled tasks page. With a vardump in the membership.php script just after the lines noted above.

var_dump($membership);

and then

var_dump($membershipID);

The memberships in the dump were both linked to the same parent membership, so I deleted that parent membership and recreated it from scratch.

Membership scheduled task is now running as usual.

I think the db may have been corrupted a bit on a recent server move.


There is no valid default from email address configured for the domain I have set Sendgrid up to send emails in Civi (smtp.sendgrid.net). I have set the from email address as my domain email address - john@johnsales.com.au. This is the same admin address set in WordPress. I have tried many different configurations. When I click Save and Send Test Email in Settings Outbound mail, I get "There is no valid default from email address configured for the domain. You can configure here ..." I have tried many things to rectify this but am not getting anywhere. Thank you.

You would need to setup your FROM email by going to the menu item Administer > CiviMail > From Email addresses
Address format should be like
"My organization" myemail@myorganisation.com


Unable to access volunteer functionality With Drupal 7.64 CiviCRM version 5.10.4 & civivolunteer version 4.7.31-2.3.1
Created a new event. Under the Volunteer tab in event configuration, there are three buttons Log Volunteer Hours button is working and other two buttons Define Volunteer Opportunities, Assign Volunteers not working after clicking on those buttons nothing happens.
Anyone facing the same issues?

There are many reasons why this may fail, You can use troubleshoot method below to find cause of the problem.

Make sure you don't have any JS error on browser console.
Check if you have set extension url in Administer >> System Settings >> Resource URL
Clear template_c by running cleanup caches(Administer >> System Settings >> Cleanup Caches and Update Paths)

Thanks

Pradeep


How can I see the quota (number of participants which can still register) under the manage events section? How can I fetch the number of participants(quota) who can register for an event and
the max number of participants in an event  if the event has not started on the manage events

There is a BAO function in CiviCRM which returns the available slots for registration

CRM_Event_BAO_Participant::pendingToConfirmSpaces($eventId);

You can use api to get the max number of participant for an event

$result = civicrm_api3('Event', 'getvalue', [
  'return' => "max_participants",
  'id' => 1,
]);

To answer your question in detail, you canuse pagerun hook on event page and then get the variable assigned in smarty using $rows = $page->get_template_vars('rows'); override the variable to add or remove values and then assign it back to smarty using $page->assign('rows' $rows);

HTH

Pradeep


Why doesn't creating a case from API work? I think this is a bug.

From the API Explorer, I can successfully run this to create a new case, and it is auto-populated with the default Sequence:

$result = civicrm_api3('Case', 'create', array(
  'sequential' => 1,
  'contact_id' => 4243,
  'case_type_id' => "member_application",
  'creator_id' => 1033,
  'subject' => "Application",
  'medium_id' => 6,
));

But running that same code as a hook fails with the error:

CiviCRM_API3_Exception: "source_contact_id is not a valid integer"

It actually does create the case and the initial Open Case activity, but seems to fail while trying to create the first activity in my Sequence, which is not created.

I can fix it by editing api/v3/utils.php and adding this at line 1956:

if ($fieldValue =='user_contact_id')
  $fieldValue = 1033;

I think what's happening is that somewhere along the line, it sets the value of source_contact_id to 'user_contact_id'.  The _civicrm_api3_validate_integer function is supposed to replace this with the currently logged in user.  This works correctly when running from the API Explorer, but not when running from a hook.

The proper solution would be to pass the API "creator_id" through to "source_contact_id" for the extra activities, but I don't know how to fix that.  My hack to hard code the contact works for me for now.

Thanks for sharing this, I agree that it looks like a bug. Instructions on filing a bug report here: https://civicrm.org/bug-reporting


How Can I send mailing with AWS SES API instead of SMTP? I want to send mailing with the help of AWS SES API instead of SMTP. I am using CiviCRM 5.32.2 and drupal 7.

This extension may be of interest, but it doesn't allow sending via API: https://github.com/mecachisenros/aws
I think you would need to write your own code to integrate with the SES API. But AWS works perfectly fine via SMTP.