Why the change in how Soft Credit information in exports? After recording contributions in Civi, I always export those contributions. All soft credit information used to be included with the primary "Hard Contribution" data, but now (perhaps as of 4.7?) you have to specifically export the soft credits, too, but even then the soft credit info still doesn't show up on the hard contribution line of the CSV file, only in a separate line for the soft credit. Any insight into why this is the case?

I believe https://issues.civicrm.org/jira/browse/CRM-17286?focusedCommentId=80228&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-80228 will provide you with the answer as to why there are now two lines in the standard contribution export. That said, a couple of things that you can do to get around the issue:

Use the "Contribution Detail" report and include the column for "Contribution OR Tribute?" as well as any additional columns you need - when you export to CSV, you can filter/sort on the "Contribution OR Tribute?" column with the understanding that for every soft credit listed in the report, there will be an additional line for the "hard" contribution - depending on what you use the soft credit information for, you may want to save an instance of the report that will list only contributions and another that will list only tributes and then export each separately.
If the first option doesn't allow you to display all of the information you need, and if the the number of contributions with soft credits that you deal with is relatively few on each import, after exporting to CSV, CTRL + down arrow in one of the soft credit columns to arrive at the first soft credit in the export, then delete the corresponding contribution line that does NOT contain the soft credit information (from what I can tell, it is typically the line above the one with the soft credit).

Hope this helps!


Why do i have to reenter the 'new organization' name when I have already entered it in the 'current employer' field At some point the way 'new organisation' was created from the 'current employer' field on New Individual was changed/improved/updated.

If no match is found now (4.6/4.7) you can use a 'new organisation' link to create one. But having typed the name in to the 'current employer' field, the pop up then appears with the Organization Name field empty and it has to be retyped.

Seems like a functional regression since in the past you would type in the name only once.

I recall tons of duplicate organisations created on < 4.6, because people wouldn't wait until the list of organisations was properly loaded and so on.

So in general, having a bit more control before creating a new organisation, and give it the chance to be more than an empty one makes sense IMO.

As your specific point, it would be better indeed that the field is pre-populated. PR welcome and all that ;)


CiviMail not sending mails in 4.7.6 / Drupal 7 "DB Error: syntax error" Since upgrading to 4.7.6 we have two CiviMail bulk emails with the status "Running" that have not actually been sent.  In the scheduled jobs log there is this message:

  Finished execution of Send Scheduled Mailings with result: Failure,
  Error message: DB Error: syntax error

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

  Full message:  Finished execution of Send Scheduled Mailings with
  result: Failure, Error message: DB Error: syntax error

In ConfigAndLog The full error is shown here, but I'm struggling to locate the actual fault / corrective action.  Any help greatfully received.

If you'll notice (as per your Google Doc you posted), the last VALUE that the query is trying to insert is ( 1668, , 3537, null, '78ed5224ae6ab7d9' ).  The second argument is missing, and therefore the Query is invalid.

Double check if Contact with ID 3537 has an email address associated with it.  I don't know why Civi wouldn't catch this error, but that seems to be the issue.


Search Profile troubles Is there a way to create a search profile that just brings up results on a webpage without having to manually start the search on the page?

Add &force=1 to the url. You can also specify the search terms by the field name, e.g. to pre-specify a search on First Name use
http://dmaster.demo.civicrm.org/civicrm/profile?gid=1&force=1&first_name=Errol&reset=1


Wordpress Server Migration sorry for what is probably a ridiculous question.
Our wordpress site was migrated to a new server by our host, the domain is unchanged. Now several of the CIVICRM features are not working anymore. Such as payment processing for example or signing up to our newsletter. One of the issues for example is our stripe webhook failing as it now can't reach https://example.org.au/?page=CiviCRM&q=civicrm/payment/ipn/3. When I try to go to the live links for contribution pages, it just shows: "Do not delete this page. Page content is generated by CiviCRM."
I've cleared the cache and reset the paths and looked at the civicrm.settings.php files but couldn't find a place where I had to link to a new IP address. I've also looked for a guide on the CiviCRM page but was unable to find clear instructions on what to do.
If someone can point me in the right direction it would be super appreciated,
thank you for the help
cheers,
David

DNS changes can take up to 48 hours to propagate, and the time can vary widely for each computer trying accessing your site due to the many stages of caching involved. Your payment processor might not have received the new DNS records yet, so wait a day or two. Most/all will retry each payment notification for a number of days/weeks, so you will not lose any information if the card was actually charged.


get name and email in exchange for free PDF We would like to get leads by offering a free PDF in exchange for name and email.  Ideally, would like to eliminate bogus/spammy leads before either emailing them the PDF or allowing them into an online library where they could download it themselves. Any suggestions about the best way to go about this?

WordPress 4.8.1

CiviCRM 4.7.21

For emailing the PDF my approach would be to use a mix of Forms(WP plugin)/Profiles and Scheduled reminders or CiviRules. For granting access to an online PDF library I suggest you ask a separate question.

Setup

Create a custom activity type ie PDF request, and a couple of message templates, one for the welcome/thank you email on request (ie activity status Scheduled) and second one with the actual PDF or link to the PDF, when approved (ie activity status Completed).
You can go cray cray and create your own, more descriptive, statuses ie For review.
Set up a Scheduled reminder or CiviRule for the PDF request activity with status Scheduled to send the welcome/thank you email.
Set up a Scheduled reminder or CiviRule for the PDF request activity with status Completed to send the PDF/link to PDF email.

Workflow

User fills in form/profile and submits it, contact and PDF request activity with status Scheduled is created on form submission, user receives welcome email, admin is notified, admin reviews contact/lead and approves the lead updating activity status to Completed, lead receives PDF/link to PDF email. With CiviRules you can create even more powerful and crazy workflows!

Implementation

The Profile path would need a bit of custom development, using the appropriate form/profile hooks in an extension to create a PDF request activity type with status Scheduled on form submission that would trigger the described workflow.
Using Forms you have a couple of options, the Gravity Forms CiviCRM integration (paid add-on for Gravity Forms) and the Caldera Forms CiviCRM integration (free and open source), both will allow you to create an activity on form submission without the need of custom development.

Disclaimer: I'm the developer of the Caldera Forms CiviCRM integration.


best practices for demo-site replication of a membership bug? I think I've encountered a veeeeeery use-case-specific bug with online user-driven  membership renewals and I'm trying to replicate it on the demo server to confirm. We're on drupal 7 and the issue pertains to users renewing their own on-behalf memberships as logged-in CMS users. The demo site is (rightly) nerfed from sending emails, so new drupal users never get their activation emails, so I can't find a way to fully create a new CMS user and log in as them to test. What's the best practice for doing this?

As you are in Drupal, i recommend using the drupal module masquerade which let you act as if logged in as another user.

Otherwise, with drush you could generate a one-time login for the user you want without sending an email. So from the command line, type : drush uli user-name and you will get a link that will log-in as the user user-name


Change log - user permissions to view Is there anyway to give users permission to the see the full change log without giving them administrator permissions? (they definitely cannot have these!)
We would like them see the details and see who made the change, in order that  they can fully curate the records across the team.

We are on Wordpress/Civi 4.6.12 (soon to be version 4.7.10)

Any help appreciated.

By default the Report Contact Logging Report (Summary), that is used to display the detailed logging, requires the permission CiviCRM: administer CiviCRM.

You can change it to a permission that you feel comfortable with for your subset of users and save the report. Otherwise you need to create a new specific permission with an extension https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/.


Search for address of person contacts through current employeer I'm looking for a way to search for contacts for which we have an address of their current employeer on record. How do I do that?

I often find myself in this situation, wanting to find contacts based on the fields of an other contact, one relation "distant". Is there a simple way to do these searches or is that always a programmed "Custom Search"?

As a bonus question, we tend to not add address information on the person, but keep that on the organizations. But it seems CiviCRM is built for "single contact" handling, rather than relation-based searches. Is there a way to handle this in a practical way?

At the top of extended search you can chose the type of result to search for. There's an entry like "Relationship to contact". Take this one and select 'Employee' relationship below. Your search input now applies to your organizations but the displayed results will be their employees.


How to remove Stripe without problems A client stopped using Stripe in Civi (they're not using Civi for payments now) and switched to using Stripe only through their website (bad idea). So I disabled the extension, only to receive emails from Stripe saying that the webhook endpoint was failing. Enabling the extension made that problem go away but now I see error messages in the log like this: "[message] => Error relating this subscription id (sub_CdRU43deMhfO6T) to the one in civicrm_stripe_subscriptions"  I have no idea what this means so does anyone have a guide about what to do when removing Stripe from Civi?  It seems there are things to do that I haven't done.

You need to login to the stripe dashboard and disable the webhook.  It has nothing to do with the CiviCRM side.


Wrong headings diplaying on contact search results Using CiviCRM version 4.7.20 on WordPress 4.8 the headings are wrong on the results of Find Contacts and also Advanced Find. They are all shifted three places to the left, cyclically. The links on the headings match their names.

I've added a few custom fields and profiles, but not changed any code.

Very odd and looks like I'll have to reinstall it all again.

This was i believe fixed in 4.7.21 See https://issues.civicrm.org/jira/browse/CRM-20644


How to make fields on webforms mandatory I am registering for events through webforms. However if people do not leave their phone numbers we cannot contact them. Is there some options I am missing here to make this a mandatory field?

Yes, you can make a field mandatory in a webform. You will need to go under Webform tab of a webform. Click on edit besides the Phone field. On Edit phone scroll down till you see 'VALIDATION'. Check the 'Required' check box and save the form.


Is there a hook for writing a record to an export batch? My organization uses QuickBooks Online Plus, and implemented the Classes system.  We also use Campaigns as Campaigns in CiviCRM, so all the previous solutions do not work for us.

So, we came up with a possible solution, but it would require a change to the export function.  We are thinking that we use the Financial Account name to hold both the Account Name and the Class Name.  For example, we have two Financial Accounts: Member Dues:National and Member Dues:Chapter.  The colon separates the account from the class.   But for this to work in the export, I need to get the journal entry transaction before it gets written.

We can't use the Campaigns feature for this because we do have fundraising campaigns as well as petitioning and membership campaigns.  The name seems to be our best solution, but we're not sure how to get it to work.  It's beginning to look like it would be a patch to core. ::shudder::

Yes, its possible to alter the content of exported files. Either you can create your separate export type or can use combination of hook_civicrm_batchItems and hook_civicrm_batchQuery


Problem with open_basedir restriction in effect Issue began with -

Wordpress 4.2.2
CiviCRM 4.6.2 (later 4.6.3 - see below)
Php 5.4.33

About 5 days ago on Wordpress installation we were suddenly unable to click into the CiviCRM dashboard via Wordpress backend. The only thing that may have happened that we can see is that a automatic backup may have been attempted but there was not enough server disk space for the back up. The disk has been cleaned out and there is plenty of space now.

When attempting to head to civi - the dashboard icons never stop spinning and there is a Warning at top of page that reads:

  Warning: file_exists():
  open_basedir restriction in effect.
  File(/home/wp-includes/version.php) is not within the allowed path(s):
  (/home/bmeeco:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp)
  in
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php
  on line 386

With no civicrm menus, I did have partial functionality via URLS of some admin pages such as to Admin / Settings / Upload directories - nothing appears wrong there - but almost nothing works..

Cron was also spitting me the full warning:

  Warning:  file_exists(): open_basedir restriction in effect. File(/home/wp-includes/version.php) is not within the allowed path(s): (/home/bmeeco:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 386

  Warning:  session_start(): Cannot send session cookie - headers
  already sent by (output started at
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:386)
  in
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Session.php
  on line 132

  Warning:  session_start(): Cannot send session cache limiter -
  headers already sent (output started at
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:386)
  in
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Session.php
  on line 132

  Warning:  file_exists(): open_basedir restriction in effect.
  File(/home/wp-includes/version.php) is not within the allowed path(s):
  (/home/bmeeco:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp)
  in
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php
  on line 386

__

I note two similar cases - both seem unresolved:
http://forum.civicrm.org/index.php?topic=36378.0
where the file is exactly the same - File(/home/wp-includes/version.php)

And there is also the post here:
How do I correct the fault causing "file_exists(): open_basedir restriction in effect"
- But this is a different file - and there is no response how that went.

SO - I attempted to upgrade to latest CiviCRM 4.6.3
- There was a warning to update some customised receipt templates, but then the upgrade failed with the warnings:

  Warning: file_exists(): open_basedir restriction in effect. File(/home/wp-includes/version.php) is not within the allowed path(s): (/home/bmeeco:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 394

  Warning: Cannot modify header information - headers already sent by
  (output started at
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:394)
  in
  /home/bmeeco/public_html/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php
  on line 413

Note the new line numbers..

I am stuck for ideas - any help greatly appreciated

Chris

Another potential cause is that Civi's WordPress.php file is incorrectly guessing the path to your WP install. You can force the path in your civicrm.settings.php file, like so:

define('CIVICRM_CMSDIR','/home/bmeeco/public_html/wordpress');

Edit: I think you've actually found a bug (CRM-14987). The way it guesses the WP path can cause warnings (it's almost guaranteed to if you are on cheap shared hosting). My solution will get you by, however.


Update Indices fails on 4.7.29 With successful update from 4.7.25 to 4.7.29 there is a Performance warning: Missing Indices in CiviCRM System Status. When I click the Update Indices button, the error appears

Operation failed: Update Indices
DB Error: unknown error

Enabling debug mode does not provide any additional info.

We had similar problem this before and had to manually run mysql commands to fix the indices. This link might be useful to solve the problem.

HTH

Pradeep


Email report via cron gets moved every time it runs! I have scheduled job (daily) to email a report to myself. I would like to receive it on a specific time everyday. Although I have set the time when it should run, every time it runs on a different time and keep getting moved forward 20-30 min ahead of when it ran yesterday.
Is it an issue can be fixed easily? Thanks in advance.

If you want the jobs to execute at exactly the same time every day, swich it to disabled in the UI and then call that job with its params from a system crontab instead. We do this often for recurring contribution jobs e.g.
Here's an example from one of our clients who in addition to executing the usual CiviCRM scheduled jobs mails out a report at a very specific time -> params are: instanceId=44 and format=pdf (just like in the CiviCRM UI). Note that the /usr/local/bin/vcv-production-all (it's our way to call civicrm's cv) and secureexampleca is this site example and is specific to our docker set up - but crontab is not - it's a UNIX command.
5 * * * * /usr/local/bin/vcv-production-all api job.execute auth=0
1 09 * * * /usr/local/bin/vcv secureexampleca api job.mail_report instanceId=44 format=pdf


How do I run PHP Unit Tests w/ XDEBUG from within PHPStorm [on Mac]? My tools:

Instance generated with buildkit - civibuild: $ civibuild create
dmaster --url http://d47.localhost --admin-pass mypass
Mac OS + PHPStorm 8.0.4 + MAMP (/Applications/MAMP/bin/php/php5.6.10/bin/php)

I've been close to getting this to work a number of times - but still coming up short. I've looked at Eileen's: https://wiki.civicrm.org/confluence/display/CRMDOC/Tests+in+phpstorm and at Tim's How can I use Xdebug with CiviCRM unit tests? - but something is always slightly different.
UPDATE - after buildkit and phpstorm updates -> I’ve posted new slides in the answer below!

Here are the steps/complete set of screenshots of a configuration that now works for me:
1) from command line ensure you can run buildkit -> civibuild
$ civibuild create dmaster --type drupal-demo --civi-ver master --url http://dmaster.localhost --admin-user myuser --admin-pass mypass
2) from command line ensure you can run tests - that all is working properly
karins-macbook-pro:civicrm sysadmin$ pwd
/Applications/MAMP/htdocs/buildkit/build/dmaster/sites/all/modules/civicrm
$ cd /path/to/civicrm
$ env CIVICRM_UF=UnitTests phpunit4 ./tests/phpunit/CRM/AllTests.php

Installing dmastertes_7by9i schema

Installing dmastertes_7by9i database
PHPUnit 4.8.21 by Sebastian Bergmann and contributors.

...............................................

.......
^X^C

3) Ensure you can fire up a http://d47.localhost/ in a browser and debug/set breakpoints anywhere in PHPStorm / step through code in your Drupal/CiviCRM code base - e.g.

4. PHPStorm: Preferences -> Languages & Frameworks -> PHP:

5. PHPStorm: Preferences -> Project: Directories:

6. PHPStorm: Preferences -> Language & Frameworks -> PHP -> PHPUnit:

7. PHPStorm: Run -> Edit Configurations -> Default -> PHP Unit:

8. Run the test by right clicking on the test itself:

9. Et voila:

UPDATE JULY 2018
After updating buildkit:
cd ~/buildkit
git pull
./bin/civi-download-tools

I had to make some edits as some of the paths have changed. The edits I made are:
ad 4:

ad 5:

ad 7: note you want to Include parent environment variables

And we're up and running again:

UPDATE AUGUST 2020
After updating buildkit and PHPStorm -> here's the new screenshots!

Running a test via the command line also using phpunit5 now:
karins-MBP:civicrm sysadmin$ env CIVICRM_UF=UnitTests phpunit5 --filter testSubmitWithTax ./tests/phpunit/CRM/Member/Form/MembershipRenewalTest
Parsing schema description /Applications/MAMP/htdocs/buildkit/build/dmaster/web/sites/all/modules/civicrm/xml/schema/Schema.xml
Extracting database information
Extracting table information
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
.                                                                   1 / 1 (100%)
Installing dmastercivi_rb7eb database
Time: 9.92 seconds, Memory: 58.50MB
OK (1 test, 18 assertions)


Send certain welcome message after subscription to certain mailing list I think this is an obvious feature, but I can't find it anywhere.

I can set several custom "Welcome" Automated Messages but I would like to be able to assign certain custom "Welcome" automated messages to be sent after a user signs up for a certain mailing list.

For example:

User signs up for mailing list "dogs" and in the body message (sent after successfully double opt-in) is "Thanks for subscribing to Dogs!". But if the user subscribes to "cats" the message is sent containing "cats" in body text.

I've tried using CiviRules, but Civirules is not respecting double opt -in. It sends e-mail even if user won't confirm subscription.

Has anyone figured it out?

I've tried using CiviRules, but Civirules is not respecting double opt -in. It sends e-mail even if user won't confirm subscription.

Try adding a Linked Condition of Field Value Comparison:

Entity: GroupContact
Field: Group Contact Status
Operator: Is equal to
Compare Value: Added


Prevent sending event registration confirmation emails When we register a group of contacts to a Civi event we don't want a confirmation email to be sent (as the registration is for internal purposes).
If you register one person at a time the checkbox can be unchecked, but for mass registration this doesn't seem possible.  I can see there was an extension back in 2015 which appears to offer the solution but it doesn't appear in my list of extensions now.  Is it still valid or is there an alternative solution now?
Thanks

If you are on 5.26+ CiviCRM version, when you find contact, select list of contact and use 'Register participants for event' from the action list. It takes you to the Create participant form. When you select the event, there will an option for 'Registration Confirmation and Receipt' at the end of the form where you can select or unselect send receipt option.
You can try on https://dmaster.demo.civicrm.org/
HTH
Pradeep


403 error accessing PDF view of report We're running CiviCRM 4.7.13 on Drupal 7.51 on a shared server.

I am the administrator for our site and AFAICT, I have admin privileges for everything.  However, whenever anyone, myself included, opens a report (eg Membership Detail report), we can view the results on screen, page through them etc., but we can't print the report, print to PDF or export as CSV, all we get in each case is the 403 "Forbidden" error.

My main problem trying to work out the cause of this problem is finding some sort of error message.  Thanks to how do I find error log to see what is causing the error and pages linked from that question I've been able to locate our PHP log file and our CiviCRM log file but neither shows any entries that are obviously related to this problem.

I believe this is a symptom of some broader issues we have with the Organic Groups module on our site so I am mainly looking for tips on increasing the usefulness of existing logs (or any other logs I should be looking for).  Other questions on those topics haven't helped me so far.

TIA,

I would suggest that you talk to your hosting provider.  It is possible that they may be incorrectly marking this as suspicious activity and hence giving you a 403 error.  Hosting companies are continuously updating their server monitoring rules that seek to prevent malicious activity. Occasionally this creates false positives.  If this is the case they should be able to whitelist your site.


Managing Large Conference Sub-Programs in CiviCRM I work for an organization that has a long history of putting on large conferences and we want the workshops and panels of these conferences to stored in CiviCRM connected to those who spoke and attended. Where would be the best place to do this? Should I create a Custom Field for Programs or should they each be activities so I can have more than one contact record connected to it?

CiviEvent works marvellously for conferences. As Erik suggests use different roles for your delegates, speakers etc. From Civi help: "Participant Role:
The Role you select here is automatically assigned to people when they register online for this event (usually the default 'Attendee' role). You can also allow people to choose a Role by creating a Profile with the Participant Role field. Then include that Profile when you configure the Online Registration page for this event.


Mailchimp Extension - not recognising API key I've installed mailchimp on a site (drupal 7.59, civi 4.6.33)

I have
Created an API key in Mailchimp
Copy/pasted API key to mailchimp settings in CiviCRM

And on clicking save/test get the following message

Could not use the Mailchimp API - API Key required. You will see this message If you have not yet configured your Mailchimp acccount.

Anyone else had this issue? Which blindingly obvious step have I missed out?

Looked on the github issues column and found this

https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp/issues/300

Latest version of mailchimp extension (2.0.1) not necessarily compatible with civi 4.6


Real-time dashlet of contacts without certain activity I would like to create a dashlet listing contacts who do not have a certain type of activity scheduled.

I've tried a comnbination of smart groups and include/exclude search, which works but does not update in real time.

Volunteers need to see the immediate result if they make an appoitment for a client, the client needs to disappear from the list. Otherwise they will be worried that they haven't done it correctly, and it won't inspire confidence in the system.

I've looked at Views but if I create a view with Contact as the main entity, I try to add a relationship to Activities but Activities does not come up as an option.

I'm about to write a hook that tags and untags contacts when the appointments are made, completed or cancelled. Do I really have to do this? It seems there must be another way!

If the smart group approach is working other than the update latency, you could reduce the Smart Group Cache Timeout at Administer > Customize Data and Screens > Search Preferences.  Beware that it is likely to increase load on the system, but that may be worthwhile in your case.

See https://docs.civicrm.org/user/en/stable/organising-your-data/smart-groups/#smart-group-caching


Emails get stuck on send. How do I debug it? I can send emails individually, but bulk emails never seem to work right. I've had no luck troubleshooting it, so I created a test group and added my own contact user to it and verified that it has my email set to home and primary. I created a new mailing to the group and sent it, and it says it started sending, but it hasn't sent anything, and the completed column is still blank. I clicked report on it, and it shows one recipient, but when I click on intended recipients, it says "There are currently no Intended Recipients". So I created another contact with a different email address, added it to the group, and sent another bulk mail. When creating the mail and selecting recipients, it shows the two expected contacts. Then I used "send test to group" to the same group, and both contacts received the test email immediately. So I submitted it, but it still didn't send to either user. The report shows 2 recipients, but when I click to see them, it says there are none. I checked a previously successful email, and it does list the recipients correctly. I turned on debugging, but I guess I don't know how to use it, because it didn't show anything. The scheduled job log shows the same generic success messages down the page, no errors or anything useful. Anybody know what's going on or how I can get some visibility into it? Is there a log file besides the cron log, or is there a way to get more messages into it?

This is known issue reported by Andy. Quick fix would to remove the $mailer->disconnect() function at line 77 in src/Listener/DefaultSender.php file


Avoiding automatic creation of civi contact upon drupal account creation How can I avoid contact creation when a drupal account is created?

My problem is:

Sometimes the contact already exists as an organization. If I add a drupal account, that contact gets duplicated as an individual.

There is no way via the standard config to do this afaik. In theory, if the drupal contact that is created matches a unique email for a civi Individual (that has no drupal user yet) then the match should be made.
Otherwise you have to drive that type of clean up via your dedupe workflow.
Also just spotted you said Organisation. So in theory, again, Drupal users can only be Individuals - since organisations find it hard to use the keyboard. Perhaps that is part of the issue you are needing to resolve?


CiviCRM identifies itself over SMTP as 'localhost' while sending CiviMail via CLI CiviCRM should say ...

EHLO example.com

... in the SMTP dialogue as it sends email. And it does when the email is being sent via a browser.

But when the email is being send via a CLI batch job, CiviCRM says ...

EHLO localhost

... which some email hosts interpret as a SPAM source.

Any thoughts?


How would we implement a monthly prize draw database? Our charitable group runs a monthly prize draw. Volunteer collectors call on the members to collect the entry fee each month, but some people may not be at home so won't be entered. Some members pay for one month. Others pay for several months at a time. So entry in to each draw depends on whether a member is paid up that month. Each collector is assigned a set of members to call on.

Has anyone implemented something like this in CiviCRM?

It sounds like the issue is partly about how you record fact that Mary made one payment which covered entry for April + May + June and therefore you need to ensure she is in the result for your search of folks who bought a ticket for each of those months.

I would suggest doing this as a Membership for a Monthly period, and therefore some who pays for 3 months gets 3 'cycles' of Membership and therefore will be returned as being 'in the draw' for each of those months.

Then do the rest per Jaap's suggestion


How to cure empty config screens in civi? We are getting two Civi config screens which show a header, but no content. The screen loads but is empty - no options, no fields, no instructions.

One is when wanting to delete a custom field -
here's a video of what happens

One is on the Results tab when wanting to set up a Survey -

Any ideas how to cure this?

CiviCRM 5.1.2 Drupal 7.67

This looks like a problem with your compiled templates - try deleting templates_c.  You can do this in-app, or manually.

That said, templates_c errors are often indicative of a misconfiguration (most commonly, that your cron jobs don't run as the webserver user) so it's likely you'll need to delete manually because the webserver user lacks permission to delete the template in question.  If this problem recurs, you'll want to identify its root cause.


Pending from incomplete transaction Registrants have status recorded as  Pending from incomplete transaction
even after PayPal has collected fee and confirmed payment

I have been over the PayPal processor setup multiple times and believe I have followed the text.

I have created an event and assigned the PayPal processor to it.
When I do a  registration civicrm accepts the registration and presents me to the PayPal site. the payment is made , charging the registrant and completing the payment to my merchant account, PayPal returns me to the registration page with the message "Your registration payment has been submitted to test ( test is the name of the fees for this event) for processing. Please print this page for your records."
 PayPal merchant account sends out a notice to both my PayPal merchant email and the registrant email confirming the transaction.

when I look in the event registration list to view the registrants, there are no attendees paid.
Only when I look in Pending from incomplete transaction do I find the listing with the pending notice attached.

CiviCRM version:     4.6
CMS version:     wordpress 4.3.1
MySQL version:     5.5.42
PHP version:     4.0.10.7

Check PayPal IPN is configured properly or not.


Is there a way to prevent CiviCRM profile fieldsets from nesting inside each other? I'm working on a site using Drupal 7 with CiviCRM, and I created three CiviCRM profiles and added them to the Drupal user registration/account forms. I was expecting this to add three groups of fields (one with first and last name, one with the address, one with phone numbers) to the form, each with their own title. Which is what it initially appeared to do...

But when I added a bit of styling to the fieldsets — specifically, setting each one off in its own shaded box to make them more visually distinct — to my surprise it turned out that each fieldset was nested inside the previous one! So rather than three boxes in a row, I have a box inside a box inside a box. Needless to say, it doesn't look good.

Why is it structured this way? And is there any way to change it so that the three fieldsets are sequential instead of nested?

BTW, if anyone's curious why I made three profiles instead of just putting all the fields in one, I am trying to have the form visually broken up into small bite-size pieces with friendly titles ("What's your name?", "Where do you live?", etc.) for greater ease of use, which is a priority on this particular site.

Update: I think I've identified that the template that generates this form is /templates/CRM/Profile/Form/Dynamic.tpl, so theoretically it should be possible to make a custom version of it... But having perused the template, I still can't see what in it is making it nest the fieldsets that way! And I have no idea why it would be setup that way in the first place.

I'm wondering if using a webform might be a better solution. You could have a paginated webform using webform civicrm, that gets the data into CiviCRM. Then on the webform adnaced, do a redirect to the Drupal registration form with the email address prefilled using the Drupal Prepopulate module.


What's the best way to make use of the GDPR extension's capabilities via webforms in Drupal? I've generally used webforms integrated with CiviCRM on Drupal sites for mailing list sign-ups. Been looking at how to simply link those with the GDPR extension so that the acceptance of privacy policy etc. is logged. Anyone got a slick solution?

There's a drupal module available here https://github.com/tapashdatta/webform_gdpr/tree/5.x ,


Allowing user to update their contact details while renewing their membership I am trying to figure out how to allow user to update their contact details, such as address, VAT number and allowing them to upload necessary documents such as health and safety policy etc.

I also want renew page to be multi step such as step1: update details, step2: upload necessary document, step3: view total cost and final do the payment.

I would be thankful, if anyone can help me. I am now trying the hook: civicrm_buildForm to add various additional field in the membership renew form. But I am still not sure how to make it multi steps.

If you are using Drupal with a no-redirection payment processor, your best chance to do this is by using Webform CiviCRM. Webform comes with a lot of functionnality like multisteps, fields grouping and conditional fields.

Otherwise, if you are not in Drupal or want to have a cross platform solution, i can see 2 possibilities :

you do a contribution page with profile containing all the fields you need and then you add javascript to make it multistep (e.g. jquery steps). You might find it difficult to make CiviCRM embedded javascript to work in all context.
you do a contribution page that is the first step of the process and then redirect to a profile to let the user update its information when the payment is done (the user won't be able to see the thankyou page so you might want to add a thank you message in the profile). You should be able to do so using CiviCRM hook_civicrm_buildForm like :

function myextension_civicrm_buildForm($formName, &$form) {
  if ($formName == 'CRM_Contribute_Form_Contribution_ThankYou') {
    $formId = $form->getVar('_id');
    if ($formId == FORM_ID) {
      ...
      $url = CRM_Utils_System::url('civicrm/profile/edit', "gid={$gid}&id={$indId}&reset=1&context=thankyou" . $checksum, FALSE, NULL, FALSE);
      CRM_Utils_System::redirect($url);
    }
  }
}


Can I use CiviCRM to print mailing labels etc? I'm using MS Access now, which works admirably for our simple purposes: keeping track of 140 or so members, creating the odd phone list, and printing mailing labels quarterly and sending a personalized (merged) letter once a year. It's a standalone database, not connected to a website at this point.

Is CiviCRM suitable for this sort of activity? What would be the advantages?

It looks to me as if this app is meant to be used in conjunction with a website, which I suppose might be useful in our future.

Thanks.

Doug

While I'm as big a proponent of CiviCRM as anyone - it's worth considering why you're looking to switch if your current tool is working for you.

CiviCRM opens up many possibilities that aren't available with Access - from mass e-mailing to allowing members to sign up/renew online to offering members-only content on your site and more.  However, it won't make you an expert in membership management or plan your renewal campaign.

If you're looking to make your organization more effective by growing membership or making better use of your member data, you'll need a strategy to do so.  That might include upgrading your database.  However, organizations who adopt fancier tools without a strategy often have buyer's remorse, even for a free tool.


Unsubscribe error message If the Civi user isn’t logged into their account then they get the following error when clicking token inside their email footer:

Sorry, due to an error, we are unable to fulfill your request at the moment. >
You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
A fatal error was triggered: is not of type Text
Return to home page.

The link being generated in the mailing is:
https://example.org/civicrm/mailing/optout?reset=1&jid=15266&qid=6919138&h=e77ea82acfec8278
Is this expected behavior?

I figured it out with the help of the back trace from the error.

It was the CiviAlerts extension which I had installed apparently, I really liked this CiviAlerts too because it let me give my mail admins a message window to see when I wanted all of them to do something differently (like use a different smart group for example in a mailing).

Anyway I just went in and turned off that Extension then redid my test and guess what?  The form showed up with the email (and a few asterisks) and a confirmation page.  Problem solved.  Thanks for the assistance.

The changes described in this Pull Request for the CiviAlerts extensions should resolve the issue: https://github.com/mr-vara/me.vara.civialerts/pull/1


Data Importation Issue Procedural question... I have a record set of individuals related to various organizations.   The employee/individual info set is handled well, EXCEPT FOR organization name... i can get work phone, work address, work city, work state, work zipcode.  And, in organization, there rightly are no individual information fields.

So, what comes first, chicken or the egg?

Assume it best practice to import organization info first, then the individual info???  As this makes sense.  But, I cannot find answer on how to get the "organization name/Employer" field into the individual recordset so I can then toggle the individual/organization relationship.

Hopefully, I'm missing something simple.

PS  I've imported 100k records for individuals so far, thou no employer/employee relationship.  Now the "vender" database set is coming on, thus another riddle.

thx

In your spreadsheet, you should have the organization name and all organization info on the same row as the individual/employee info.

When mapping the import, for all the organization fields first select "employee of". another drop down menu will appear to select the field (org name, email...)

This will import both contacts with their relationship.
Note that you can only import 1 relationship per import.


How to prevent Smarty secure_mode activation? I hope my silly question will get answers from some of you...

I'm just trying to send an email using smarty basics functions such as using {php} tags and playing php in smarty tags {if strstr($email, '@')}.

But each time I try to send the template Smarty activate secure_mode and everything's ruined...

I found where Smarty put the secure_mode but I can't understand why... (in CRM/Core/Smarty.php line 202).

If someone ever run into this and solved it pleeeease help me  :'(

PS : I defined this in my settings file => define( 'CIVICRM_MAIL_SMARTY', 1 );

Still working on it !

I hope i'll find the solution  ;D

Allowing arbitrary php to be executed from an email string can potentially cause security issues from un-trusted users and hence the security mode of smarty is enabled for all string based resources.

I dont think there is an easy work-around for this :(


Restricting field options in a profile on a contribution page I have a Contribution page for Membership Registration. In this form users create their Drupal account and made payment off-site, so using the Contribution page is the best option for me - webforms doesn't have everything I need :)

Membership is only open to UK residents and we don't want them to be able to choose another country.

However, database contact are from other countries. So we do need to have additional countries enabled.

Is there a way we can restrict the available option on this profile / contribution without disabling all on the site?

You can set a field in a profile to be "View-only". So:

(If you haven't done it already) Set your Default Country to United Kingdom on Administer > Localization > Languages, Currency, Location.
In the profile on your membership page set the "Country" field to be "View-only".


Webform CiviCRM contribution "other amount" I've setup a webform with CiviCRM integration that ties back to a Contribution page. This creates a "Contribution Amount" field in the form that I've populated with a number of user selectable options that have assigned dollar amounts. I'd also like for there to be an "other amounts" option that allows the donor to type in a custom amount, just like in the standard CiviCRM contribution page options. I don't see such an option in the Webform settings. Can anyone advise how this is accomplished?

If you want to preserve a predefined values and let the donor the option of entering another amount, Select (or other) Drupal module works nicely with Webform CiviCRM and payment amounts.


Installing IParl extension I have installed the extension to work with IParl. I am at the stage in the intructions where I want to test whether the API is working.
The instructions https://github.com/artfulrobot/uk.artfulrobot.civicrm.iparl
The instructions you can test it using curl or http. Where would I actually write this script? I do have access the command line on the server but I'm not overly familiar with it yet. Would I create the script in a small file and run it from the command line?
curl -k -L 'https://yoursite.org/civicrm/iparl-webhook'
-d secret=helloHorseHeadLikeYourJumper
-d name=Jo
-d surname=Bloggs
-d email=jo@example.com
-d actionid=1
or, with httpie
http --verify no -f POST 'https://yoursite.org/civicrm/iparl-webhook'
secret=helloHorseHeadLikeYourJumper
name=Jo
lastname=Bloggs
email=jo@example
Thanks for your help.

While these commands are split into multiple lines for readability, that curl statement is a single command.  You can paste that straight into your command line; depending on your shell, you might need to remove line breaks so it's all on a single line.


Validation radio custom fields on civicrm_validateForm hook does not work I have a custom field on contact in radio type format, not required field. I'd like to set up custom error on this field by using hook_civicrm_validateForm when the field is null.

// hook in extension
function hook_civicrm_validateForm($formName, &$fields, &$files, &$form, &$errors) {}

$fields array doesn't contain a key for this custom field. After setting $error['custom_xx'] the form is reloaded without displaying the error.

What I found:

$form->_elementIndex contains all needed keys, including this for radio. So I suppose this is not a problem.

I think that problem is caused by using _submitValues[] as a list of fields because _submitValues doesn't contain null radio custom fields:

// CRM_Core_Form->validate():
CRM_Utils_Hook::validateForm(
  get_class($this),
  $this->_submitValues,
  $this->_submitFiles,
  $this,
  $hookErrors
);

// my hook
function example_civicrm_validateForm($formName, &$fields, &$files, &$form, &$errors) {
  if ($formName == 'CRM_Contact_Form_Contact') {
    if (in_array('AA', $fields['contact_sub_type'])) {
      $fieldIndex = 'custom_70-1';
      if (!in_array($fieldIndex, array_keys($fields)) || !$fields[$fieldIndex]) {
        $errors[$fieldIndex] = 'For AA contact type this field is required';
      }
    }
  }
}

Edit:

Here is my workaround - add missing keys to _submitValues[] array
https://github.com/caltha-eu/civicrm-core/commit/b4ee607334f3f091bffc2c32a87d862e4a3d7493

foreach ($this->_elementIndex as $elementIndex => $index) {
  if (!in_array($elementIndex, array_keys($this->_submitValues))) {
    $this->_submitValues[$elementIndex] = NULL;
  }
}

Make the field required all the time. Add another choice to the radio called "Not Required". In your validate hook check if the contact subtype is AA and if they chose Not Required set the $errors variable on your radio field to show your error. Since you made it a required field it will be in the fields array.

For inline edit the formName is CRM_Contact_Form_Inline_CustomData and you will need to look up the contact subtype using the api, e.g. civicrm_api3('Contact', 'get'...). Use the contact id from $fields['cid']. (Go to /civicrm/api in your browser - it's very handy for getting the api syntax correct.)

Also note your custom field in edit mode will have a different name. It won't be custom_70-1 it will be custom_70-3838 or something like that, so you'll need to either look it up from $form first (e.g. in the groupTree element) or do something like loop through the $fields keys and compare substr($key, 0, 9) == 'custom_70'.


Hide profile icon when using Profile in listing mode We're using a Profile to create a members directory that is only accessible when members are logged in. The profile search is working fine, and we've restricted access so users only see what we want them to see.

However, in the search results listing, the leftmost column contains a little person icon, and when you hover over it, it shows that person's contact details.

If I'm logged in as an Administrator, I see everything, but if I'm logged in as a user I see nothing except when hovering over my own entry.

I should specify that we're not using a shortcode in a WordPress page, we're linking to the "Listing Mode" of the profile directly.

Is there a way to disable this icon so that it doesn't appear in the listing results?

We're running CiviCRM 4.7.6 on WordPress 4.4.2.

Yes, there are at least two ways to disable this icon that I can think of.

The first is not very authentic, but requires less work and code modification. You use CSS to avoid the display of the icon. You'd need to include in your CSS file something like:

.crm-profile-name-<your-profile-name> .Individual-icon {
display: none;  }

Also, you'd need to repeat the CSS selector to Organization-icon and others types of contacts if that's your case. Mind that one can make the icon show up in the browser changing the CSS on the fly and so, would access the overlay information if it is still there. So, this method is not good to secure the data, you should first be sure that data is correctly protected, not showing up publicly in the overlay box.

The second method is much more gentile, but requires you to change the Listing template code. It's referenced by Dave Greenberg in this thread and the code stills work nice, I just tested it.

If you have never customized templates, I would say you should first read this page, as I'd be too long to explain every step to do this here.

Once you are good to go, copy the file civicrm/templates/CRM/Profile/Page/Listings.tpl to your custom templates directory, keeping the folders structure. Edit the file from line 59 to look like this:

      {foreach from=$columnHeaders item=header name=headers}
        {if $smarty.foreach.headers.iteration GT 1}

        {if $header.sort}
          {assign var='key' value=$header.sort}
          {$sort->_response.$key.link}
        {else}
          {$header.name}
        {/if}

        {/if}
      {/foreach}

      {counter start=0 skip=1 print=false}
      {foreach from=$rows item=row name=listings}

      {foreach from=$row key=index item=value name=cells}
        {if $smarty.foreach.cells.iteration GT 1}
        {if $columnHeaders.$index.field_name}
          {$value}
        {else}
          {$value}
        {/if}
        {/if}

      {/foreach}

      {/foreach}

    {/strip}
    {include file="CRM/common/pager.tpl" location="bottom"}

{elseif ! $isReset}
    {include file="CRM/Contact/Form/Search/EmptyResults.tpl" context="Profile"}
{/if}

This would make the column of profile overlay icon to go away.

Also, in an that old Forum thread there were a word from Dave Greenberg saying that setting all Summary Overlay profile fields visibility to 'User and User Admin' would disable the overlay, but in the actual CiviCRM version, this profile is reserved, so you can't change the visibility of the field. Hence, the above methods looks necessary to me.


How to Add Menu Item to Parent Using Civix I'm trying to add a menu item for my extension to the existing "Memberships" menu. The documentation suggests the following:

  Use the Civix implementation

  Civix comes with helper functions
  _EXTENSION_NAME_civix_insert_navigation_menu and _EXTENSION_NAME_civix_navigation_menu that simplify the process of inserting menu items. Consider using these functions rather than using
  the examples below or writing your own implementation of this hook.

What it doesn't do is give you any clue how to do this. I found an example here: https://github.com/totten/civix/blob/master/UPGRADE.md.

Regardless, there is no info on how to actually add a menu item to an existing menu using this method.

Could someone please enlighten me on how to use the civix method to add a menu item as a child to an existing menu?

Example:

/**
 * Implements hook_civicrm_navigationMenu().
 *
 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu/
 */
function dmfactuurlink_civicrm_navigationMenu(&$menu) {

  _dmfactuurlink_civix_insert_navigation_menu($menu, 'Administer', array(
    'label' => E::ts('Domus Medica Factuur Link Instellingen'),
    'name' => 'dmafctuurlink_setting',
    'url' => 'civicrm/dmfactuurlink/form/setting',
    'permission' => 'administer CiviCRM',
    'attributes' => [],
    'operator' => 'OR',
    'separator' => 0,
  ));
  _dmfactuurlink_civix_navigationMenu($menu);
}


CiviCRM Recurring Contributions Report with Campaign I'm trying to find a way to get a report on all the Recurring Contributions and what campaign they are attached too. Has anyone else done this? The Recurring Contributions report can give me the donations but there is no Campaign column.

Thanks

I was able to add this to the bottom of the alterDisplay in the Recur.php file to change the Campaign Id to the Campaign Title.


How to make my custom report template appear? This is CiviCRM 4.6.22 / Drupal 7 where I used civix to copy one of the give contact reports:

  civix --copy=CRM_Report_Form_Contact_Summary generate:report MCat null

It also appears registered in the Report manager. However I cannot find and therefore not use it when I look in Reports > Contact Reports

I tried reinstalling the module, looked for clues in the log file. Any helpful advice is appreciated!

(Expanding comment as an answer...)

Reports > Contact Reports shows the Reports that have been created from Report Templates.  Your extension adds a Report Template, so from Report > Contact Reports, click 'New Contact Report' to see the templates. Select your template, configure and save as a new Report.


Unable to load the recipients group when sending mailing with Civimail I am running CiviCRM 5.17.4 on Wordpress 5.2.3. The problem I am facing is that
 I am unable to send mailing to mailing lists (defined as groups) via CiviMail.

When I try to enter the group in the Recipients box I get Loading Failed message and none of the available groups is loaded (see image below). The problem appears for existing and new mailings.

Interestingly when I re-use the existing mailing I can still send it to a previously used group (though I cannot change the recipient lists). The groups load normally in manage group page.

Any advice on the problem or debugging suggestions would be very welcomed.

Turns out this was caused by some server settings by my hosting provider (apparently they did some changes to the firewall). They managed to fix it and it seems to be working fine.


I need some help resolving db error:unknown error CSV Import helper when selecting a CSV from my desktop I prepared a CSV for upload. I'll have to make multiple passes on the upload  because I have single entry items and multiple  entry data in the spreadsheet. I have created all of my custom fields. I can do a standard contact import with the unsupervised rule.
I see that I need an ID number for the multi-record import. I installed the CSV Import Helper to prepare for the multi-record import. When I select the CSV (I'm using the ; for my field delimiter) I get the DB error: unknown error from CiviCRM.
I'm on WordPress with CiviCRM 5.20.1
The only error I see in the Civi error log is :

[26-Feb-2020 16:20:05 UTC] PHP Notice:  Undefined index: SERVER_NAME in /home/websiteweb/public_html/wp-content/plugins/LayerSlider/classes/class.km.autoupdate.v3.php on line 75
[26-Feb-2020 16:20:06 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm.php on line 364

My end goal is to merge the contact IDs into the data set so I can proceed. Any advice is welcome.

The issue was unrelated to the log error, which we will debug at a future time.

The problem was caused by my preferred use of a semicolon ";" as a delimiter instead of a comma ",". I frequently use the semicolon because clients frequently include commmas in names and addresses. Apparently this disambiguation was a problem for the CSV Import Helper.


How can I generate a search results page from a list of contact IDs, programatically? I have an extension that lets people filter contacts in various ways. I'd like them to be able to click to show these contacts in a standard Civi results page - with the action box at the top etc. So that they can manipulate them in the normal ways, by adding to groups and such.

Is there a recommended way to do this, programatically?

We have done work that is hopefully heading to Civi core which makes the following possible:

Below is the table of field name vs params that can be used in the URL to force the search results.

Contribution Tokens

Field Name > > Param in URL

contribution_page_id > > pid

financial_type_id > > fid

contribution_status_id > > status

is_pay_later > > pay_later

receive_date_from > > (receive_date)    start

receive_date_to > > (receive_date)  end

Eg of complete search URL -

"civicrm/contribute/search?reset=1&force=1&status=1&fid=2&pay_later=1&start=20181206&end=20181210"

Membership Tokens

Field Name > > Param in URL

membership_type_id > > type

membership_status_id > > status

start_date > > start & start_high

end_date > > end & end_high

Eg of complete search URL -

"civicrm/member/search?reset=1&force=1&type=1&status=1&start=20181002&start_high=20181004&end=20181103&end_high=20181109"

Participant Tokens

Field Name > > Param in URL

event_id > > event

status_id > > status

role_id > > role

is_pay_later > > pay_later

register_date_from > > register_start

register_date_to > > register_end

Eg of complete search URL -

"civicrm/event/search?reset=1&force=1&event=1&status=2&role=3&pay_later=1&register_start=20181210&register_end=20181214"

Activity Tokens

Field Name  Param in URL

activity-type id > > type

activity_status > > status

has a follow-up activity > > hasFollowUp

is a follow-up acivity > > isFollowUp

start date > > dateLow

end date > > dateHigh

Eg of complete search URL -

civicrm/activity/search?reset=1&force=1&status=1&hasFollowUp=1&isFollowUp=1&dateLow=20181210&dateHigh=20181212&type=3

Here is the link to the gitlab ticket https://lab.civicrm.org/dev/core/issues/252


Extending "get" action with custom WHERE clause Is it possible to define a new api (v3) endpoint which has a specific WHERE clause but that still leverages the flexibility of the "get" action in terms of defining parameters, options, pagination, chained api calls etc?

What I'm trying to achieve is to define an endpoint that returns all records that match a WHERE clause which looks something like this

(entity.field1 = 1 AND entity.field2 = 'a') OR
(entity.field1 = 2 AND entity.field2 = 'b') OR
(entity.field1 = 3 AND entity.field2 = 'c')"

but at the same time I still want the endpoint to be able to accept all the parameters and options that the "get" options accept, because a consumer of this endpoint would want to further filter the records or to sort them, paginate them, etc.

It doesn't seem that the built-in actions have support for OR clauses, so this endpoint would have to be a mix of api methods and a manually built SQL query (if it's even possible?)

The options depend on the version of Civi.

In v4.5/4.6, most API's correspond to a BAO class (e.g. Activity API ==> CRM_Activity_BAO_Activity). You can define a function setApiFilter() which examines $params and mixes in arbitrary bit of SQL.

The query-builder used there had several weaknesses, so v4.7 uses a different approach. We had some drafts/discussions which would have made this more hookable, but the hook ultimately went a different direction.

As it stands, to do this as an extension in v4.7, I think you'd have to make custom API (Myentity.mycustomget). The API would then pass-through the request to _civicrm_api3_basic_get(). _basic_get() is the engine which drives query-building in the majority of APIs. You can find ~100 examples by grepping for _civicrm_api3_basic_get. Loosely, the code would look like:

function civicrm_api3_myentity_mycustomget($params) {
  return _civicrm_api3_basic_get($bao_name, $params, $returnAsSuccess, $entity,
    $sql, $uniqueFields)
}

Note that one of those parameters, $sql, can be a fragment of arbitrary SQL (WHERE, JOIN, GROUP BY, etc), e.g. let $sql be:

CRM_Utils_SQL_Select::fragment()
  ->where('(start_date >= CURDATE() || end_date >= CURDATE())');


Issue exporting and importing Contacts / Membership data first time posting and really hope someone can help me!

We are trying to EXPORT our data from an old installation of CiviCRM on a drupal server IMPORTED into a new installation of CiviCRM on WordPress. All of the data has been exported using CiviCRM's built in export so we have all of the fields etc.

When importing Contacts using the CiviCRM import option you of course have to match all the fields to what is in your spreadsheet and here is where we run into a problem ... we have exported the contact ID and have contact ID for all contacts but there is no field Internal Contact ID to select / match to when importing data!

When we import Members there are TWO required fields, internal contact ID AND external contact ID ... we can't import internal contact ID to internal contact ID here, because since there was no option to do that when importing Contacts, all the contacts we imported were given different auto increment contact ID's.

We were thinking that when we import contacts we will map Internal Contact ID -> External Contact ID (since there is not an Internal Contact ID option to import to) .... then when we import members we again map Internal Contact ID -> External Contact ID .... then the External Contact ID will be the same for both members AND contacts .... effectively connecting them ... so that is what we tried ...

When importing contacts we mapped Internal Contact ID -> External Contact ID. Then we made a blank column in the spreadsheet we were importing, which we named Contact ID and which was blank for every row, and when importing mapped the this blank field -> Internal Contact ID and the ACTUAL Internal Contact ID's from the old system -> External Contact ID's ... this way external id's would match for contacts and members, linking the two .... but we got error that Internal Contact ID's do not match (the blank value in the members import does not match the auto-incremented ID in the contacts table).

I did a test where I tried importing only one Membership record, where I took the new auto-incremented Contact ID and replaced the Contact ID that from the old system and this imported, properly linking the Contact and Member.

How come when you are importing though there is no option to import Internal Contact ID? Without using some complicated MySQL Query, only using the CiviCRM export / import, how am I able to do this without having to manually match every Member Record Internal Client ID with the newly created auto-incremented Internal Client ID created when I imported the clients?

I Hope this all makes sense.
Please help!

EDIT:
Thanks for your responses guys!

I know my post was a bit confusing so I'll try to explain it again more simply. We had CiviCRM on a Drupal system. We want to import the existing data into our new WordPress system (fresh install of CiviCRM).

When we import the contacts (which were exported from CiviCRM so we have all the fields) there is no option to import the internal contact id, so all the contact id's are now auto incremented and not the old ones. Then when we import members the contact id's don't match.

Because of this, on import we mapped the old contact id's to the external id field. Then when we import members though, even though we have mapped the contact id -> external id field for both (so they could sync that way) we saw that contact ID was a required field with asterix next to it .... but mapping the new auto incremented contact id's would require a TON of manual work!!!

I THINK WE GOT IT WORKING THOUGH!!!!

At first we tried making a new blank column that we would map to the "required" contact id when importing members but that gave an error that the contact id's were not valid (because they were all blank).

What we tried next, which I can't believe worked, was just setting the "required" contact id field to NOT IMPORT .... and it SEEMS to have imported all of the members records and properly synced them by their external id's!

I don't know if that made any more sense unfortunately.

We had a similar problem importing from an old (non CiviCRM system) and I wanted to make the old membership numbers the Contact ids on the new CiviCRM system. Fortunately membership numbers 1 & 2 were not in use so no clash with the initial admin and organisation contact records. There were some gaps in the old membership numbers and I was also quite happy that new Contact ids would also include none members. All I needed was for them to be unique and increasing.

In my contact import file, I added dummy records for all the missing Contact ids (except 1 & 2) and added an "ZZZZ" in the last name field with the rest of the fields in a valid format, but meaningless. I imported real and dummy records matching Contact Id as (new) External Id and then deleted the records with "ZZZZ" in the last name. All the kept new records have the same Contact Id as the old system membership numbers (or old Conact Id in your case.

If the expanded import file is very large, you will probably need to split it to avoid timeouts.

You can then use the Contact Id to match the membership records.

Hope that helps.


Recalculating final payment value on Civicrm Webform I'm trying to recalculate the final payment value of a contribute page that I'm using on a webform.

Depending on the value of certain fields recorded when submitting the form (the fields are custom fields attached to contacts), the membership fee needs to increase or decrease.

I've looked at the civicrm preprocess and postprocess hooks although it seems they're only called when the form is finally submitted. I need to chance the value before the form is submitted so the correct payment value is passed to the payment processor.

Webform conditionals might work for you, if you:

Add the membership fee field as a hidden field
Set the value of it via conditional rules

Conditional rules can be along the lines of:

  if custom_field_color is blue then membership fee = $100

  if custom_field_color is yellow then membership fee = $50

Unfortunately they can't perform math so if you needed to combine multiple values you'd need something more sophisticated like custom code.


Adding a user to configure templates Looking to give access to a technician to help with message templates configuration eg offline receipts. What is teh best way to add a user and give access to this area only
Thanks in advance

It is not possible to give a user access to only this area. On what CMS did you install CiviCRM? You could have a look in your cms to the available permissions.


Smart Group searching event participants not saving We use CiviCRM 4.7.8. My organization hosts a childrens' activity every year during the summer. For this I created smart groups to see which children are signed up and who of our volunteers have responded/signed up.
As we are preparing for the new event this year, I wanted to update or make new saved searches for this year's event. But when I try to update the smart group's criteria or even when I try to make a new smart group from an advanced search, the criteria get reset to just 'participant is not test' and everything else I selected is removed from the search.
The only way to get my information now is to re-do the searches by hand every time.
I tried to reproduce the issue on the demo site, but was unable to do so. The demo-site however is running 4.7.10, which is not available for download.
I've tried clearing caches to no avail.
Can anyone else using 4.7.8 confirm this issue? My search is for contacts that are listed as registered or present in the role of volunteer at a specific event.

You can try to use Search Builder to make your Smart Group as a work around for this problem


How do I enter new contact from "New Case" form using a contact subtype? When I click in the Client field, I can start typing the name of an existing contact or I can click on "New Individual," "New Organization," or "New Household."

However, it doesn't list our "Hotline Caller" Individual sub-type, which is the only option I would like to have listed.

Yes you can.

Go to Administer -> Customize Data & Screens -> Profiles
Click to the "Reserved Profiles" tab
Find the "New Individual" profile and click "Fields" then "Add Field"
Field type "Contact" field name "Contact SubType"
Save the field with whatever label, help text, etc. you wish.

You will then be able to specify the contact sub-type on any New Individual popup form.

Note: I just tested this and the resulting field uses a rather ugly multiselect widget. I've just posted a fix for this which will get into the next release.


How can I set a Membership to Next Year? The business rule is that if people join after September this year, their membership becomes effective for the next calendar year.

Can this be done within CiviCRM?

At the moment we are adjusting the dates with a hook.

civicrmprofile_civicrm_postProcess {
  if ($join_date_month > 9) {
        $end_date = date("Y-m-d", strtotime($join_date_year + 1 . "-12-31"));
        $start_date = date("Y-m-d", strtotime($join_date_year . "-01-01"));

Yes - in Membership Types you can set membership type plan to be fixed, and then set the Start Day and also set the Rollover day

  Membership signups on or after this date cover the following calendar year as well. Example: If the rollover day is November 30, membership period for signups during December will cover the following year.


Remove Prefix from Addressee We are on Civi 4.7.29 and Wordpress 4.9.5

We are making badges for the upcoming conference.  We need just the First and Last name to show up on the same line, such as: John Doe.  However, when we select to use the Addressee short code, it shows up as Mr. John Doe.   We really don't want the Mr. part in there as many of our members did not choose a prefix when they signed up and that will look wrong.
If we choose to use the First and Last name shortcodes separately , we get:

John

Doe

That won't work either.  Is there a way we can remove the Prefix from the Addressee shortcode?

Thank you

You might try the display_name short code (assuming it exists as I do not use WP mysqlf)? You can control the way the display name is built in Administer>Customize Data and Screens>Display Preferences.

Alternatively you can set customized addressees for your contacts? That is a lot of work if you have to do it manually but you could also create a scheduleld job to do this with the API if you have any development skills available?

If you want to make sure the prefix is not in the display name you change the settings for display name. Standard they will probably be:

{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}

Change into

{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}


How do I expose a civicrm profile to collect data from anonymous user (an application form) on a drupal node? I have created a civicrm profile with the basic data I need. I have set all the fields to "public and listing," made them searchable. I have also set the form to add users to a group and to limit users to another group in listings. But now I am looking for the html code snippet so I can place the profile on a node in D7. I don't see anything but "Preview, Profile Create Mode, Profile Listings Mode,disable, Delete and Copy Profile" in the "more" link. Where is the html? I want this to be exposed to anonymous users so they can fill out and submit as an application form.

On Drupal -> how about simply use the URL - e.g.

civicrm/profile/create?reset=1&gid=30

and then add blocks with visibility settings show on civicrm/profile/create etc to dress up the page?

I would not recommend HTML code snippets - I do highly recommend webform_civicrm! :-)


How can I expose event creation fields on Drupal 8 front end without CiviCRM Entity? A key feature and service of our Drupal 8 site (in development) is to allow users to create their own events. I want to expose some of the event creation fields to them on the front end. Is there a way to do this in Drupal 8?

When I research, I see solutions that involve CiviCRM Entity and Webforms, but Entity does not appear to have a stable Drupal 8 release (the latest is 8.x-3.x-dev, updated on August 14th).

If the event creation fields were available when creating a profile, I would do it that way. Since I don't have sufficient programming experience to properly build an extension, my backup is to style the admin interface and CiviEvent creation form to look as much like our public-facing site as possible, but that's a last resort.

I apologize if this question has been answered already, and I missed other proposed solutions. Thank you in advance for any help you can provide.

If an extension isn't on the table, then I think that CiviCRM Entity is the way to go, despite the lack of a stable release.

For what it's worth, it's not terribly uncommon to have sites in production with modules that don't have stable releases.  It means more testing ensuring it works for your use case - but that testing also helps build toward the common solution that in a few months will be the standard way of doing what you're describing.

You may also research the Form Processor extension - but this relies on having a Drupal module like CiviMRF, which doesn't have a D8 version.

Finally - I would chat with the folks behind both of these solutions.  In particular, https://chat.civicrm.org has a "CiviCRM Entity" channel where you can talk with the authors.  They may also be open to a sponsorship to prioritize the features you need.


How can I export civicrm contribution along with its price set fields? I want to export the civicrm contributions. I want the priceset fields to be included in the report. I am trying to export them in Contributions->Find Contributions->Export Contributions
While selecting the fields I want all the priceset fields in the option. How can I achieve this? Any help would be appreciable. Thanks in advance.

Have a look at eileen's Extended Report Extension which includes

Extended Report - Contributions with Price Set data
Extended Report - Price Set Line Items


Creating a copy of an previous event I am copying a previous event but the registration page shows the old date and address. I have updated the event in Event Location, but it will not change. How can i change this?
Thanks

how are you copying/duplicating the old event?

if you have an event that you do often, it's best to make an event template and then you can create new events based on the template and edit the details that change (like date) but the ones that don't get populated automatically


Failed to locate template for civicrm.config.php I'm trying to generate DAO and SQL files,
when I run "php ./GenCode.php" in my xml path, I get this error in my console.

$ php ./GenCode.php

civicrm_domain.version := 5.1.alpha1

Parsing schema description schema/Schema.xml
Extracting database information
Extracting table information

Fatal error: Uncaught exception 'Exception' with message 'Failed to locate template for civicrm.config.php' in
C:\wamp64\www\drupal\modules\civicrm\CRM\Core\CodeGen\Config.php:35

Stack trace:

#0 C:\wamp64\www\drupal\modules\civicrm\CRM\Core\CodeGen\Config.php(10): CRM_Core_CodeGen_Config->setupCms()
#1 C:\wamp64\www\drupal\modules\civicrm\CRM\Core\CodeGen\Main.php(115): CRM_Core_CodeGen_Config->run()
#2 C:\wamp64\www\drupal\modules\civicrm\CRM\Core\CodeGen\Main.php(100): CRM_Core_CodeGen_Main->runAllTasks()
#3 C:\wamp64\www\drupal\modules\civicrm\extern\membership\xml\GenCode.php(39): CRM_Core_CodeGen_Main->main()
#4 {main}

thrown in C:\wamp64\www\drupal\modules\civicrm\CRM\Core\CodeGen\Config.php on line 35

when I look to the config.php file, it seems correct

elseif ($this->config->cms !== 'joomla') {
  $configTemplate = $this->findConfigTemplate($this->config->cms);
  if ($configTemplate) {
    echo "Generating civicrm.config.php\n";
    copy($configTemplate, '../civicrm.config.php');
  }
  else {
    throw new Exception("Failed to locate template for civicrm.config.php");
  }
}

but it gives the same error, can you help me please? Thanks
Fidi

I had this same problem today.  While this may be too late for you, what I found was that somehow, the git repo in <webroot>/sites/all/modules/civicrm/drupal was set to the master branch and not the 7.x-master branch.  Once I checked out 7.x-master and did a git pull my problem resolved.


Can I set a premium for a $20 minimum on a recurring contribution, but $80 for a one-time contribution? It seems like premiums only work on the minimum amount, without regard for other settings.  Is there a way to get around this?  I see the EFF has this option, but their contribution page seems not to be generated by CiviCRM anymore.

I just came across this question and we have solved a similar problem a few years ago, i.e. we want to count the total value of recurring contributions (e.g. a $10 recurring should count as much as a $120 one time).
What we do is to rewrite the function used for computing the premium amount. The javascript is in templates/CRM/Contribute/Form/Contribution/PremiumBlock.tpl (copied in a custom extension).
Simply adding the following to the function get_amount do the trick :
var isrecur = $('.is_recur_radio-section input:checked').val();
if (isrecur == 1) amount = amount * 12;

I suppose it's possible to add some more complex logic.
The fact that we need to update a core template file is not ideal for maintenance but it's a rather small change so it's easy to keep track of it and re-apply the change when we upgrade CiviCRM.
EDIT 2021-03-22
The solution above is not enough: there is validation in CRM/Contribute/Form/Contribution/Main.php that require adjustment.


Drupal broken after upgrade to CiviCRM 4.6.16 Site was happily working under 4.6.15 - ** Running Drupal 6 ** - Drupal 6 broken after upgrade.

Every time (Tried 3 times now) I try to upgrade in my development environment I get this message:

Fatal error: Cannot redeclare phptemplate_preprocess_page() (previously declared in /srv/bindings/619ae4403404445daf26537c92800797/code/sites/all/themes/*****custom_theme_name_changed_to_protect_id_of_website****/drupal6_theme_methods.php:8) in /srv/bindings/619ae4403404445daf26537c92800797/code/themes/garland/template.php on line 42

I've renamed the path above to my custom template to protect the id of the website concerned.

Any ideas anyone? 4.6.16 has security patch(es) so I'm under pressure to upgrade. Thanks!

I don't think that error is related to your CiviCRM upgrade, at least not directly. That error message is telling you that a duplicate function exists in your custom theme's drupal6_theme_methods.php file and garland's template.php file. Neither of those files are in the CiviCRM directory, which is the only code you replaced during the upgrade, right?


"Create User Record" - possible to ignore required Drupal User custom fields? From the back office admin, creating a user is impossible if there are Drupal fields attached that are required. The workaround has been to temporarily unmark the fields as required, but this is tedious. Is there some modification we can make for it to ignore required Drupal fields when we use this function?

Editing for clarity:

Users register on the Drupal front end - there's a CiviCRM Membership Profile form that asks for additional information.
On top of the Profile (which updates the CiviCRM record), we have a Drupal User field (image below) that allows the User to join an Organic Group at registration (required field).

Because this field is required, we cannot use the "Create User Record" function on the CiviCRM Contact record because of the validation error on the required field.

I think this is a symptom of a structural issue: you have Drupal fields on a contact. Perhaps they're best brought into Civi?

The quickest option is to give those Drupal fields default values for when they haven't been filled in.

An alternative is to create some kind of custom extension or custom module that prevents this issue for you.


How to create entity in CiviCRM I am trying to create the Entity in CiviCRM with my extension. But I am struck here. Unable to find the XML folder in my CiviCRM installation. After running the below command civix generate:entity MyEntity nothing to do in the installed CiviCRM

I read the document and followed the steps. I strut in the below steps
https://docs.civicrm.org/dev/en/master/extensions/civix/

enter preformatted text here

I read these questions also none of the solutions helped

How to automatically generate DAO classes for my DB tables

How do I add a new table to my extension?

Please let me know is there any alternative way to create entity while creating an extension

It looks like like perhaps you are developing your extension within a normal CiviCRM installation instead of a development installation.  If this is the case, you'll need to set up a development installation in order to get the xml folder (and other things too).

The best way to set up a development installation is to use the civibuild tool which you will get if you install buildkit.


How to streamline setting up a multi-day class I'm using CiviCRM for, amongst other things, recording registration and attendance for short (1-2 week) adult education classes. I would like to be able to register each learner for the class and then be able to record their attendance on each day.

I can set up repeating events for each day, but whether I set the repeat up first then register the participant, or the other way round, the participant is only registered on the specific event chosen and not the others in the repeating set. If I make one event span the multiple days, I only get one attendance status for the whole thing.

I can just register them for each day, but that's extra work for our staff and adds potential for mistakes, so I'd rather not do that if there's a better way.

The registrations will be done only by our staff, there's no 'self service' online registrations.

CiviCRM 4.7.15 on Drupal 7.53.

One solution might be to create a custom field for participants with check boxes for each day. Then you could record attendance without having multiple events. You could use the Batch Update via Profile feature to make recording attendance easier for you staff.

Not sure how many events or exact setup. If you use a generic field labels (Day 1, Day 2, Day 3, etc.) you could re-use the custom field and not have to create ones for each event.

Hope this helps.


How to disable possibility to enter past date in activities? I have a custom field of type Date used for activities, even though i have set years prior to current date to 0, it still allows users to select past day and month of the current year.

Is there any quick fix for this, can anyone give me a hint?

CiviCRM 4.6.33

I think you'll need an extension for this.  Use the hook_civicrm_validateForm if you just need to prevent prior dates from being entered on the back-end activity form.  If you need to block ALL forms of adding a prior date, you may want to use the hook_civicrm_pre hook (this will block Webform-CiviCRM, API, etc.).

You may want to set exclusions for administrators if you do this!


CiviCRM uses mail server account address as sender I log in as a user of CiviCRM.
I then go to a contact and send an email as activity. Even if my mail address is shown as sender in the mail, when the mail is recieved - the sender is the account used to log in to the mail server (GMail). It seemingly does not use "By default, CiviCRM uses the primary email address of the logged in user as the FROM address when sending emails to contacts. "

How do I keep my CiviCRM user mailaddress as the sender on the recieving end?

As Martin said, this would appear to be a gmail thing.

I know that gmail accounts can be configured to send email on behalf of other accounts. If you were able to set that up gmail settings, it might allow you to send on behalf of that person.


Multiple Choice Custom Field Not saved on creation of new contribution I am running CiviCRM 4.4.4 on WP 3.6.1

This is a problem with entering new contributions.

I have a custom field tied to a multiple choice menu.
The same menu is used for 4 different custom fields,
one of which is required.

If you do not fill in the required field an error is generated upon submit.

If you select one of the options, and submit a valid contribution,
then immediately view the contribution, the fields tied to this
menu are empty.  (including the required one)

The final piece to the puzzle.  If I go back in and edit the contribution
and re-enter the data, the second time it sticks.

What could be causing something like this?

Could you try to reproduce this bug on the 4.4 Demo Site by creating a similar custom field/contribution setup? If it's a bug there then you could report it to the LTS team (although noncritical bug fixes for older versions don't get high priority).

You could also try to reproduce it on the 4.6 Demp Site which would be a good idea for 2 reasons:

If it is still a bug in 4.6 it will get more attention.
If it is not still a bug in 4.6 you could solve your problem by upgrading :)


Membership status rule - restart at 'New' I would like the membership status to revert back to 'New' if someone renews/rejoins once their existing membership is 'Expired' (rather than 'Current').

We're looking at CiviRules for this (likely with a custom action?) but thought I'd ask if anyone has a suggestion on a configuration option that may be more end user friendly that I just can't think of?

Thanks in advance,
Rebecca

We have gone with a CiviRule and created a custom action:

trigger - 'membership is changed'

field value comparison on 'membership status' from (original value) 'expired' to 'current'

The custom action then changes that status immediately to 'new' with a status override for 6 months from the renewal data.


How do I create a profile listing of multiple-record user relationships? I am trying to generate a profile that lists and allows the user to edit his employment/education history in their Drupal My account page. I was hoping to get something similar to what is described in:

http://wiki.civicrm.org/confluence/display/CRM/Multiple-record+Custom+Data+Sets+in+Profiles

The issue is that I have no idea how to do it. I tried Views, but that one does not allow data editing. I also tried advanced search but I don't know how to limit the search results to the contacts related to the current user.

Any help/advice will be very appreciated.

Interesting question. I was about to launch in to my usual - do this with either webforms, or Views, CiviEntities, VBO etc but knowing that the VBO interface is not 'great' for general users I wondered what could be done via multiple record fields and profiles.

You hadn't specified if you were thinking of using Civi Relationships, though the word is in the subject. But I don't think civi can give a user access to edit their own relationships particularly easily.

A Webform could be the solution since it does allow you to manage your start / end date etc so may be worth exploring more.

ANyhow, on demo site (which will of course be refreshed within 24 hours and lose this set up) I set up a multiple record field set with 2 types of 'employer fields' in case Contact Reference would be an option too (seems not from my testing based on the existing permissions for 'demo')

http://d46.demo.civicrm.org/civicrm/admin/custom/group/field?reset=1&action=browse&gid=8

There is also a profile set up with this used for View/Edit

So now if you go to

http://d46.demo.civicrm.org/user/2/edit/Employment_History_16

you will see the fields, and the user can Edit and Add new records to these fields.

Not sure how close this gets to answering your question since it does not use the Current Employer field, and does not use civicrm Relationships.

But i thought I would go down this route as I need to familiarise myself with what is now possible with multiple record fields in the newer versions. ;-)

Also noting that the Contact Reference field works fine in the civicrm tab on the contact record eg for http://d46.demo.civicrm.org/civicrm/contact/view?reset=1&cid=202 but not when it is used in a Profile which may be a well known limitation but just mentioning it here in case it might just be permissions or less likely a regression


Updating Repeated CiviEvents in 4.7 and 5.0 Having an issue updating details of recurring events.

This is happening on a clients site (was happening in 4.7 versions and still occuring after upgrade to 5.0)

Have just recreated issue on sand box

1) Create event with 12 weekly repeats
2) Add event custom data
3) I can update the custom fields in one event instance, and get the dialog box to update all/ future events. If I select to update all events I get a confirmation notice that the event has been updated. But when I look at future events the changes haven't been saved there only on the event instance editted.

Has anyone seen anything like this before? Know of a quick fix

Not sure if it's related to issues raised here or not
Backbone javascript conflict causing Configure Event / Repeat to fail

Conversely, when they set the event each session had a £20 session fee. They want one session to have a £25 session fee.

When they update the specific session fee tab and select update only this event, on saving fees for all events are updated.

I've  been able to recreate that in sandbox also. Add a fee for the first event instance, and create recurring events.

Updating a fee in a later event instance, and saving this event only updates fees for all instances.

The client was using repeat events in their 4.6 install, and apparently these features worked fine. I've not used repeat events myself that much so have no experience prior to this.

I can assure you that custom fields never carried over to repeating events in Civi 4.6 - I had to write a lot of custom code to deal with the fact!

The issue you're describing is CRM-16902.  It's marked as closed, but that's incorrect - a related issue, CRM-20787 was recently fixed.

Before CRM-20787 was merged, it WAS possible to change a single price on a repeating event.  This might be the changed behavior your client is noticing.  If selecting "this event only" isn't possible now, that's a regression and should be reported.

That said - dealing with price changes and price sets is very thorny.  If I change event 3 (only) to have a different price, then I change a different event's price and say "change all events" - does event 3 have the new price?  Or just the unchanged events?

In short - it's not a quick fix.  It needs code to be written.


Update results in failed DB check In trying to upgrade to Civi 4.6.3, I did a backup using Drupal 7.35 (I know, updating that was next) Backup and Migrate, then copied the Civi code files to my desktop, deleted the old Civi, copied in the new Civi, and got an error message that says "Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again."
So I did that, using both the backup I had just made and a previous one. Same error message both times. In delving into the Advanced Settings on B&M, it appears that the default only backs up the Civi database. I modified it (I think) to backup the Drupal database as well, backed up the whole site (with the reportedly incomplete database), hoping that what was "incomplete" was the Drupal portion. Same error message every time I start Civi.
What can I do, short of asking my ISP to restore the whole site to a time when I wasn't messing with it (I'm even more ignorant with MySQL).
I know it advises always trying updates on a development site first, but my desktop is Windows and the ISP is Linux. IF I have to, I'll upgrade my contract to give me another site, but I'd probably run into the same problem there.
Civi seems to work just fine, but there is that disturbing error message and I am disturbed enough as it is.
Thanks for any help.

Are you sure the problem isn't already on the "old" site?

Could you try to (without changing any code) go to the civicrm upgrade page on the old site (/civicrm/upgrade). do not upgrade, just look at what's on the screen

Do you have a message saying you are already at the correct version and nothing to be done?

Sorry but we are not able to provide this at the moment.
Your database has already been upgraded to CiviCRM [your version]

... or do you already have a message saying database check failed?

If the later, it means that you had a partial update already that was never properly sorted. It's recoverable, but you might have to dig into sql more than you'd like (or hire an expert to help you, probably an easier option to help you untangle the situation)


Considerations when activating WordPress Multisite I have Civi for WordPress installed on the main domain of our site and have multiple other WordPress installations on various subdomains. To streamline things a bit, I'm preparing to enable WPMS. I was wondering if there are any special considerations I need to make to ensure Civi doesn't get broken somehow. It doesn't need to share data with any of the other sites.

You only need to be aware that Civi doesn't fully work with WPMS as yet. You can Network Enable it, but the Civi backend will not function as expected on sites other than the main site. There are workarounds, but since you aren't using on sub-sites then you should be fine if you just enable it on the main site.


What is Krumo, and why should I care? What is Krumo, and when enabled, what does it do for a CiviCRM site?

Krumo is part of the Drupal Devel module.  If you want to print out debugging statements in Drupal, you can put this line in your code:

dsm($myvariable);

It will print out the variable info with much more nicely-formatted HTML than just print_r() or similar.

In CiviCRM, I don't use this - I prefer

require_once 'CRM/Core/Error.php';

CRM_Core_Error::debug('variablename', $variablename).

There are variations on that available here: http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=33129619

Though this page seems to suggest that maybe the variations are deprecated.


Paypal recurring payments failed after merging the contact. How to fix? 2 contacts were crated for the same person due to some typo of the donor while given donation online. one of the contact record had a recurring payment setup. I have merged them both using the menu. But i think i have merged the wrong way around. now paypal is not able to process the payment because there is no contact record by ID 1212 (it was deleted permanently, not available in trash).

Newer contact record ID is 1313. is there a way to change the ID of this new one to 1212 so the payment gets processed?

This is from civi log

Jul 04 14:04:05  [info] $POST = Array
(
    [payment_cycle] => Monthly
    [txn_type] => recurring_payment_skipped
    [last_name] => Entc
    [next_payment_date] => 03:00:00 Jul 09, 2015 PDT
    [residence_country] => GB
    [initial_payment_amount] => 0.00
    [rp_invoice_id] => i=e45c4d0dad9c6a9a0693799f8c99d38f&m=contribute&c=1212&r=4&b=17212&p=6
    [currency_code] => GBP
....)

    Jul 04 14:04:05  [info] Could not find contact record: 1212 in IPN request: Array
    (
        [component] => contribute
        [invoice] => e45c4d0dad9c6a9a0693799f8c99d38f
        [txnType] => recurring_payment_skipped
        [paymentStatus] =>
        [amount] =>
        [reasonCode] =>
        [first_name] => Eli
        [last_name] => Entc
......   )

Could you create a new contact with just a first and last name (no address, phone, or anything else that might go in a separate table somewhere) and then change that new contact's ID in the database to 1212? Then you could merge again, making sure to keep the new contact and transfer all of the other information over during the merge. (Try on a copy of the database of course)


Migrating Drupal to wordpress redirect existing links After migrating from Drupal to wordpress links to event info pages for example no longer work - as these have been shared already is there a way to redirect these?

You can keep the URLs you're currently using - as long as you're using a recent version of CiviCRM - simply by adding this to your wp-config.php file:

define( 'CIVICRM_CLEANURL', 1 );

This will create URLs in the same format as Drupal ones, i.e.

https://domain.com/civicrm/event/info?reset=1&id=3

This does assume that you are using the default base page named "CiviCRM" with the slug civicrm. If this page doesn't exist, then create it and add the slug to the setting in the CiviCRM "CMS Database Integration" admin page. You may also need to visit the WordPress "Permalinks" page to refresh your rewrite rules so that Clean URLs work as expected.