Resource URL problem I'm having some problems with the CiviCRM Resource URL setting that I can't get my head around. Set as [civicrm.root]/ the System Status screen displays the error 'The Resource URL is not set correctly'. Set as [cms.root]/sites/all/modules/civicrm/ everything seems to work fine (until I try to upgrade). But surely both should resolve to the same place?

In the File System Paths section of civicrm.settings.php I have the following:

$civicrm_root = '/var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
  define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/sites/c/beta.example.net/public_html/sites/default/files/civicrm/templates_c/');
}

And in the Site URLs section I have:

if (!defined('CIVICRM_UF_BASEURL')) {
  define( 'CIVICRM_UF_BASEURL'      , 'https://example.net/');
}

Trying to load the with the [civicrm.root]/ setting results in a load of javascript errors, of which the following is an example:

[Error] Failed to load resource: The request timed out. (logo_sm.png, line 0) https://var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm/i/logo_sm.png

That looks as though $civicrm_root is set incorrectly, but it seems to be right in accordance with the examples given in the comments. What am I missing?

Edit: If I go to the CiviCRM Resources URLs page and click on ? I see the variables listed as:

[cms.root]  https://example.net/
[civicrm.root]  https://example.net//var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm/
[civicrm.files] https://example.net/sites/default/files/civicrm/

But if I got to the Directories page and do the same, I see

[cms.root]  /var/sites/j/example.net/public_html
[civicrm.root]  /var/sites/c/beta.example.net/public_html/sites/all/modules/civicrm
[civicrm.files] /var/sites/c/beta.example.net/public_html/sites/default/files/civicrm

Where are these getting calculated from that means they're producing different results? Particularly that random one with the /j/ in the middle, which I've never seen before anywhere!

In your civicrm.setting.php update the $civicrm_root and template_c path to use /var/sites/j/example.net/public_html instead of /var/sites/c/beta.example.net/public_html/

Thanks

Pradeep


Need help with export.php (CiviCRM 4.6 & Drupal 7) I'm using an older version of CiviCRM (4.6) with Drupal 7 on Linux and until now I've not really used the command line stuff for CiviCRM, only for Drupal.

But I now need to do exports & imports of contacts etc to & from CiviCRM and so I've installed Drush & got it working. I've tried doing an export with the export.php script with Drush and can manipulate the search results to some degree. But for some reason if only exports the first 26 rows ... is the a parameter that I should be using to get the full rowcount?

Also, where is the best place to get a more detailed list of examples, list of possible parameters, usage notes etc?

Any pointers appreciated, thanks!

Neil

There are a few things that can help you out:

Most importantly, the API Explorer (Support menu » Developer » API Explorer).  It will build your drush command for you through a GUI.
You can see there that adding an option with "limit=0" will return all records.
There's documentation built into the API explorer, but there's also API documentation in the Developer's Guide.
One major caveat!  drush and export.php don't really handle JSON inputs well - which you need to pass options.  Instead, use cv.
cv is like drush, but for CiviCRM.  This can take arguments similar to export.php but can also get JSON as an input, for instance:

 echo '{"options": {"limit":0}, "first_name": "Juliann"}' | cv api Contact.get --in=json --out=csv

To use cv with the API explorer for simple commands, just use the recommended cv command.  However, if the command includes JSON, use the format above, and grab the exact JSON from the JavaScript example API Explorer generates.


Is there a 'Token' for adding a date to a message template? Is there a 'Token' for adding 'today's date' to a letter template to avoid having to add the date manually?

There is no token available to add current date. You can create a custom token using following two hooks.

hook_civicrm_tokens
hook_civicrm_tokenValues

Please review documentation on how to create custom tokens described there.


Civix: command not found I have downloaded, then uploaded civix.phar to my www/www directory (where Drupal is installed).

Now, if I run civix civicrm:ping (from this www/www directory), the answer is :

-bash civix: command not found

(I also tried civix.phar civicrm:ping : I get the same answer)
(I also tried from other directories : I get the same answer)

I am not a linux expert ; what am I missing ? (permission is 775)

Use either php civix.phar or ./civix.phar or first update your PATH:

set PATH=$PATH:/path/to/folder/where/you/downloaded/it


Can I customise the columns on the 'Find Participants' page? I'd like to customise the columns on the 'Find Participants' page. I want to swap 'fee level' and 'amount' for 'employer' and 'job title'. Have I missed something obvious in Civi's customisation options? I feel like I've looked everywhere!

(We need to know this info to approve people for our events, and our current process is to export all in a spreadsheet, view the relevant info there, choose who gets approved, then load that info back into civicrm. It would be great if we could just do this all on one screen, without a separate spreadsheet.)

Details: Wordpress 4.9.8; Civicrm 5.4.0

Caveat: I'm not a (fluent/confident) coder or techie person...!

Yes, Its possible to alter the Columns in some search results of CiviCRM and definitely YES for participant search result.

You can create an extension and implement hook_civicrm_searchColumns hook. You can also find an example how to use the hook in the documentation.

Other alternate would be to create a report with same filters as Participant search but you won't be able to perform any action like how you can on participant search eg Update Participant status, Delete participants etc.

HTH

Pradeep


Is it mandatory to link Membership to Contributions in CiviCRM We have a whole bunch of contribution records to import into CiviCRM from our legacy database. The membership records already exist in CiviCRM. I can't find a way to link the new contribution records (to be imported) to the existing membership records. Is there a membership record no. that I could extract and use it to link the contribution record (to be imported) to the membership record.

If that is not an option, can I just import the contribution records without linking them to the membership records? The only downside I can see is I wouldn't be able to see the related contributions while I am on the membership screen. But they will all be visible in the Contributions screen.

I'd appreciate the community's thoughts on this. Thanks,

Raja Mukherjee

For the second part, yes - you can import the contributions Contributions > Import Contributions without linking to memberships which will then show under the Contributions tab.

Contributions are linked to memberships with MembershipPayment so when you have the membership id and contribution id you can link them with:

$result = civicrm_api3('MembershipPayment', 'create', array(
  'membership_id' => X,
  'contribution_id' => Y,
));

The challenge here is to get the right membership and contribution id's to pair up.  You could tackle this in various ways including:

1) if you don't mind a bit of coding, write your own import script to create the Contribution, find the relevant Membership then create the MembershipPayment.

2) if you prefer GUI, import your contributions via the UI, export the contributions and memberships (to get the id's), do some spreadsheet manipulation to produce a csv of contribution and membership ids, then use the API CSV Importer extension to import these as MembershipPayments


How to delete a membership report I have copied an existing report template for my own use with the intention to use it for my search options.
I don't understand how I can name it as I wish. How to rename a report when copying?
How to delete a copied report?

![Screenprint:
]1

When viewing the report, click on the Title and Format tab to rename it, from the actions drop down menu you have an option to delete –

Further documentation on reporting can be found here -
https://docs.civicrm.org/user/en/latest/reporting/set-up/


Name fields in Profile are Billing not Default On a WordPress site with CiviCRM 5.20.1 we have a Profile used for Event Registration. In that Profile we have "Individual: First Name" and "Individual: Last Name"

The problem is that if I register using my name John Doe and I pay with my employer's credit card and his name is George Washington then on the Thank You screen it shows George Washington as my First and Last Name and then my personal address and other details.

How can we have it show my name and not my employer's?

I think that is a fixed regression - https://github.com/civicrm/civicrm-core/blob/master/release-notes/5.20.3.md


How do we move our civicrm SQL database from the cloud to our network? We are running our CiviCSM system on a vendor's host with our database in the cloud.  We have a CiviCSM system built for our network that is not currently in use, but we want to move the database from the cloud to our network.  Can we Export/Import, Backup/Restore or Detach/Attach and which would work best?

If you have access to your server and database, and you want to move the whole installation this wiki page should provide all the information you need. If you only want to move the database, have a look at this page.

I am assuming you are talking about CiviCRM, not CiviCSM ;)


CiviCRM cron user rejected after update to 4.7.27 I've got a puzzle. After updating to CiviCRM 4.7.27 (from 4.7.23) on WordPress, suddenly the civicrm cron jobs stopped being run. With some digging, I found that the credentials for the user I had set up to run cron were being rejected ("ERROR: Invalid username and/or password").

I confirmed that the username, password and site key were all correct (none of them had changed), but I still can't get it to work. I even created a new user with a new password, but that also failed. Both users have the correct permissions to access CiviCRM, etc. as specified in the documentation. I am even able to log in directly to WP using these credentials; they are only rejected in the context of a call to run cron.php.

I use the URL method of calling cron.php, which includes the username, password and site key in the full URL.

This isn't critical - I can still run it manually from inside CiviCRM, but I have already spent a lot of time on this and don't want to spend much more.

CiviCRM 4.7.27
WordPress 4.8.3, with WordFence 6.3.21, all plugins up-to-date
CentOS 7, with the standard PHP 5.4.16 as supplied by the main CentOS repositories

Thanks in advance!

I'd try to run CiviCRM cron via the CLI. If your webhosting has CLI access, you can do this using wp-cli or cv. Both will let you execute CiviCRM's scheduled jobs. See Managing Scheduled Jobs > Command Line Syntax for setup instructions.

I can't say why you're running into issues, and I don't know why you'd have started having issues at the upgrade of 4.7.27 - that's worth looking into (and could be worth debugging - you'd start by checking the input variables are correct when that error is thrown in CRM_Utils_System::authenticateScript()).

It could be that WordFence is playing a part in this. CiviCRM's URL cron method involves putting the username and password into GET parameters, which isn't generally a recommended practice (those details can be leaked from GET, see note here). It wouldn't surprise me if WordFence detected and removed sensitive variables in GET params; another possibility is that WordFence might block a user if it detected them logging in every few minutes (as could be happening with URL cron). This is speculation; I don't know WordFence at all.

If CLI cron is available to you, that approach might mitigate this situation, and would at least avoid the possibility of leaking your CiviCRM scheduled job user credentials. It's not a guaranteed fix and I do recommend a shot at debugging what's actually happening, especially if it means resolving some new bug that's sneaked into 4.7.27!

(This isn't a very certain answer, but I hope it helps!)


How to output 'Event Source' field for attendees of an event? I am using the Event Source field to record table hosts for an event. However, the event reports do not have the option to select 'event source' as an output column...

Do I need to make a custom report? (A little past my experience level after finding https://sf2012.civicrm.org/sites/default/files/slides/CiviCRM%20Reports-Customize%20and%20Extend.pdf, but can be done).

Is there a better way to organize a table host event in CiviCRM? Or should I rather create a custom contact field and just use that?

"Source" is available in the reports as of Civi 4.7.2: see CRM-18042.

So one option is to upgrade to Civi 4.7.  Another option is to backport the patch, which is a lot less work than a custom report.  I'd give it a 95% chance that you can simply insert the lines from the patch into the appropriate file on 4.6 and it'll just work.


Invalid argument supplied for foreach in Report.php on line 264 I'm setting up some scheduled jobs to email csv reports on a regular basis. I set up the job in scheduled jobs and whether I select "execute now" or run it through a cron job, I get this error:
Warning: Invalid argument supplied for foreach() in //www/www/wp-content/plugins/civicrm/civicrm/CRM/Report/Utils/Report.php on line 264

I can go into Report.php and add a code check if the arguments sent to "foreach" are arrays (i.e. (is_array($rows)) ), and then it runs without any warning. But, I don't want to be administering a system that I have to go in and modify Report.php. I don't see anyone else with this error. Any ideas why I'd be getting it?

The "Constituent Details" report template is not designed for export to csv, so if that is wanted it is better to select "Constituent Summary" template to create the desire contact report. In this case, the csv is produced and emailed properly.

In my case, I still receive some run-time errors while the report is running, but it does not negatively affect the output that I need.


Failure in setting up Sparkpost for outgoing mail I've created a sending and bounce domain on Sparkpost, ccrmmail.vietfeir.com. This domain has been verified by Sparkpost. I have an api key with all grants. When I try to save and send, I get this error:

Could not check status for domain vietfeir.com (Exception Sparkpost error: Permission denied. Check that the API key is authorized for request https://api.sparkpost.com/api/v1/sending-domains/vietfeir.com.).

How can I configure this correctly to use ccrmmail.vietfeir.com instead of just vietfeir.com?

I got Sparkpost support to help me with this. I needed to add a DKIM TXT entry in my DNS for vietfeir.com and generate a new API key.


Get civiMail report by API I'm trying to get Report data about a Sent email through the API. I can see the report at:

www.example.com/civicrm/mailing/report?mid=388&reset=1

And I can get data corresponding to the email from the API explorer as follows:

But I can't seem to access the civiMail report with the API. I have tried a few options but can't seem to find it. Any tips?

I think you're looking for the ReportTemplate.getrows API call.  You can see examples of its use in the API explorer's built-in help (also available on Github).  More examples exist in the tests folder, since the most common use of this API is to create tests for reports.

UPDATE: As @demerit points out, this answer isn't really correct - but it CAN be :)  All(?) of the info on this mailing report is also available from the "Mailing Summary" report (for the stats) and the "Mailing Detail" report (if you need drilled-down data on click-throughs etc.).  So I recommend Demerit's answer if you're writing an extension, but my answer if you need to collect this data over REST.


Edit link in directory results not displaying I am working on a front end directory. I have created the profile and checked the box to "Include profile edit links in search results? " in the profile settings.

When I go to the directory page (as logged in user) and find my contact the "edit" link is not there in the search results. The account I am logged in as in an Admin account so it is my understanding the "edit" link should be there for all contacts.

I feel like I am missing something simple.

We are running Civi 4.6.25 with WordPress 4.7.2

In the shortcode when adding a Proile to WP Page/Post there is an option for Search/Public Directory, the shortcode would be something like this

[civicrm component="profile" gid="#" mode="search"]

Replacing the # with the ID of that profile. That provides a page that starts with a search to then view results.

If you include force=1 in the shortcode it will show all results and the search needs to be extended to use to them filter results.

[civicrm component="profile" gid="#" mode="search" force="1"]


Why do the exported contacts differ from the contacts presented on the Advanced Search using Display Results as Related Contacts? If you perform an advanced search using the Display Results As Related Contacts feature, the related contacts presented are correct but when you export but the original contacts are exported instead of the related contacts.

I expected that the contacts exported would match the search results, but this is not occurring. Is this correct?

This is a known issue: https://issues.civicrm.org/jira/browse/CRM-15682

As a bug that affects relatively few people, the core team with their limited resources hasn't allocated someone to investigate and fix this.  If you're a developer or have access to one, this shouldn't be terribly difficult to develop a patch for; alternatively, if you don't have a developer, you may want to submit this to the paid issue queue.


I have created a custom field but only admin users can see it Have created an inline custom field. Only admin staff can see it. All users should be able to see the view.

Karen, welcome to CiviCRM StackExchange.

Check user permission by navigating to CiviCRM >> Administer >> Users and Permissions >> Permissions (Access Control). Click on Drupal/Wordpress/Joomla Access control link(name is based on CMS you using).

Check for 'CiviCRM: access all custom data' permission for the user role. If uncheck, check the option under the role and save the permission. This will enable access to all custom field in your system for that user role. If you want to restrict specific custom group being visible to user than you will need to add ACl for the custom group to perform CRUD operation.


How about prioritized locations in export When sending mass mailings the recipient's email address locations may be handled prioritized if authors want to: Use location x and if contact doesn't hold such an address use main address.

It would be great to provide such a decision for exports: Export address of location x but if it doesn't exist, use main address.

What do you think?

When you specify the address fields to export, if you specify the location "Primary" you'll get the address that's marked as the primary in the contact record. There's also an address location field you can export so you can tell which location was exported.

If you need something specific (use work if it exists, otherwise use home), I'd export both locations and use spreadsheet formulas to select one or the other.


Been searching high and low... best approach for dispaying member information in WordPress? I'm working on a website that needs to display customized sets of membership information.

The kind of thing I’m going for:

CiviCRM custom fields indicate that member  serves in a particular
committee, and their role. Say, the Board of Directors.
On the WordPress site, the Board of Directors page lists a grid of    members, and their roles.
The site also shows those activities on a member’s profile page.

An example of the intended outcome: https://caims.ca/committee/executive/

I’ve been going through documentation to find a plausible approach, but I don’t see a clear path for the task as a whole. For each sub-task, there seem to be lots of possibilities, but no glowingly correct approach.

I’ve come across these possible steps, and possible tools:

Gathering “sets” of users (e.g., members who who are currently on the organization’s board
)

smart groups
saved searches
tags
member directories
Drupal-esque views

Packaging those sets up for transfer to WordPress

exports
saved searches
custom-coded WordPress plugin

Displaying those sets in WordPress

shortcodes
Pods custom fields
Toolset custom fields

I’m thinking about finding a developer to do some custom code to link things up.

At this point, I imagine I would have come across a recognizable method if there was one. But it seems prudent to make sure I’m not missing a direct solution. Thanks in advance for your help!

If you are looking to contribute funding, it would be best to direct some funding to those pursuing creating Drupal Views like tools for Wordpress. Please see this thread How do you approach "things that you would use Drupal views for" in WordPress?.


Text that doesn't appear on the contribution page For my contribution page: https://crm.teatronecessariogenova.org/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1  - I checked the option: "Pay later"; in the editor I put the "Pay instructions later", but what I wrote in the editor doesn't appear on the "contribution" page. Thanks

The text that you add to the "Pay Later Instructions' box should show per the following:

  Instructions added to Confirmation and Thank-you pages, as well as the confirmation email, when the user selects the 'pay later' option (e.g. 'Mail your check to ... within 3 business days.').

You said:

  what I wrote in the editor doesn't appear on the "contribution" page

Unsure if you incorrectly typed 'contribution' instead of 'confirmation', or if you meant what you typed, in which case the text is not expected to show.

The other text "Pay later label" should show on the Contribution page, but may only after an amount has been selected if (assuming more than one payment option is set up)

Please add any clarification you can to your original question via 'edit'


How to change order in billing address I'm using Civicrm 5.13.4 on Drupal 7.67.
I want to change the order of the address fields and bring "postal_code" upper in the list when using the "pay later option".
I was able to find for online payment but not for this option.
It's also already set in localization/address. Is there a way to modify this?

Thanks
Guillaume

If you want a quick hack, you can change it in CRM/Core/Payment/Manual.php in the getBillingAddressFields() function. Just rearrange the order in the return statement.

To do it without a hack you might be able to use the buildForm hook in an extension. You could also move it with some jquery but that's also a bit of a hack.


How to remove a contact from a group with Webform? Judging from various questions here it appears possible to remove a contact from a group using a webform. e.g. See this question. But 'how?'  I have added the group to the webform and want to give the user a checkbox so they have the option to be removed from the group. But I'm stumped as to the next step.  What component can be configured to link to the group? I've added a 'select options' component but can't see how it can be configured.

On the CiviCRM tab of webform, add a contact using Existing contact
Set Enable Groups and Tags to Yes
In the Groups box, choose -User Select-

If you don't want all the groups showing:

Go to the 'Webform' tab
Click 'Edit' for the Groups component
Select 'Static Options' and choose which groups to show

When the form is loaded with an existing contact, the checkboxes corresponding to the existing groups should be ticked.  Untick and save to remove from the group.


event full/waitlist problem I'm running CIVICRM (4.6.9) on a drupal 7 (current version) installation. I understand from my client (and I have not been able to duplicate this as it works fine at my end) that several of our participants are unable to complete registration (via Paypal) when they receive their email notification of being moved to "pending from waitlist." I'm trying to find out what participants are doing in case that may be the issue, but since it's consistent among 3 so far, am assuming the problem is real.

We don't use scripts or cron for this (or any other function in CIVICRM) - we change participants' status by editing it from within the participant listings.

Increasing the size of the allowable number of participants from 20 to 100, for example, does not change the "event full" status of an event either even though there are no where near that many registrants, regardless of status. Participants are still told the event is full and added to the waitlist when they register. Is this because there are still waitlist entries outstanding, or is it some sort of problem with CIVICRM?

Thanks!

Chris Hutcheson

Increasing the maximum number of participants only takes effect if you run the "Update Participant Statuses" scheduled job. If you don't run this in a cron job, you need to do it manually after increasing the size. Be aware this also updates the waitlist and moves people from pending statuses, if applicable.


How can I see a piechart breakdown of contributions by financial type this year? The "Donor Report (Summary)" produces pie charts, however these seem to be only by date, even if I choose group by Financial Type. Also, it complains "Do not use filter on Date if group by Receive Date is not used" if I turn off date grouping. But I need a chart that shows the data by financial type not date, but within a given range (e.g. this year).

The "Donor Report (Detail)" allows me to summarise the data in a text format - the data I want is in the headings; I can't find a way to have only this displayed, or in a pie chart.

Would I need to write a custom report for this functionality, or is there something I'm missing?

I'm on 4.4 LTS.

Have you tried civisualize? the contribution dataviz got you covered


How can we hide the CiviCRM System Status page? How do I hide CiviCRM System Status page (in CiviCRM) and Status Error pop-up messages from non-admin users? I am Using Drupal 7 with CiviCRM 4.7.

This can be fixed by removing the permission 'CiviCRM: administer CiviCRM' from these users.  You called them non-admin so they shouldn't need this menu?  If they don't have this permission they won't get the messages.


CiviCRM 4.7.8 error after upgrade on eWay Recurring I have just upgraded from 4.6.18 to 4.7.8. The upgrade was successful but when I try to open CiviCRM menu items I get the following error:

  Fatal error: require_once(): Failed opening required
  'CRM/Core/Payment/Ewayrecurring.php'
  (include_path='.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:/var/www/test/sites/all/modules/civicrm/vendor/tecnickcom:/var/www/test/sites/all/modules/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php:/usr/share/pear')
  in /var/www/test/sites/all/modules/civicrm/Civi/Payment/System.php on
  line 59

I can't find reference to this anywhere. Has anyone else seen this issue?

When I reverted to CiviCRM 4.6.18 and then attempted to disable eWayRecurring I got this error:

I have reverted to Civicrm 4.6.18 and when I attempt to disable eWayRecurring extension I get the following error:

  Fatal error: require_once(): Failed opening required
  'CRM/Core/Payment/Ewayrecurring.php'
  (include_path='/var/www/test/sites/default/files/civicrm/extensions/com.pogstone.contenttokens/:/var/www/test/sites/default/files/civicrm/extensions/com.cividesk.helptab/:/var/www/test/sites/default/files/civicrm/extensions/uk.co.vedaconsulting.mosaico-1.0-alpha4/:/var/www/test/sites/default/files/civicrm/extensions/com.pesc.sparkpost-1.1/:/var/www/test/sites/default/files/civicrm/extensions/coop.palantetech.nodrilldown-master/:/var/www/test/sites/default/files/civicrm/extensions/uk.co.vedaconsulting.mailchimp/:/var/www/test/sites/default/files/civicrm/extensions/org.civicoop.membershippayment-master/:/var/www/test/sites/default/files/civicrm/extensions/nz.co.fuzion.extendedreport/:.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:.:/var/www/test/sites/all/modules/civicrm:/var/www/test/sites/all/modules/civicrm/packages:/var/www/test/sites/all/modules/civicrm/vendor/tecnickcom:/var/www/test/si
  in /var/www/test/sites/all/modules/civicrm/Civi/Payment/System.php on
  line 52

Any help would be appreciated.

Regards
Martin Fuggle

It looks like you had at some point set up the eWay Recurring extension.  Looked at the list of paths, it doesn't seem to be installed currently.

I looked at line 59 in Civi/Payment/System.php, which your error references.  It seems like that function is running based on the payment processors you have configured.

The solution is to either:
a) Install the eWay Recurring extension it's 4.7-compatible); or
b) Go to Administer menu » System Settings » Payment Processors and delete your payment processor that uses eWay Recurring.


SSL/ Payment Processor Errors on payment form I'm having issues with this order form (https://www.aishla.com/myaish/israel-trip-payment-form/#.VXc3Gud4zmE) where people are trying to purchase a trip but when they try to process a card they get the following error:

  Payment Processor Error message
  60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

This is on a WPMU site using 4.5 of CiviCRM hosted on Lunarpages with Authorize.net as the payment processor.

Anuone know what steps I can take to correct this?

The issue is that the SSL certificate provided by your transaction processor is untrusted by your OS (or by the certs available to cURL).

The solution for a missing CA is -

to ensure the presence of correct CA certificates to cURL by installing system CA updates, or
to retrieve an old copy of the correct CA and make it available to cURL if the one used by your payment processor is invalid (see AGH link below).

Since the error message contains SSL3_GET_SERVER_CERTIFICATE, I wonder if this is happening because your payment processor extension is attempting to use SSLv3 (recently deprecated). You might want to check that if there are any references to CURLOPT_SSLVERSION in your payment processor, they are not set to 3. (You can set them to 0 as in this fix or simply remove the line.)

This issue was documented by AGH Strategies recently:

https://aghstrategies.com/content/SSL3_GET_SERVER_CERTIFICATE

Authorize.NET say that you should make available three root CAs ("production certificate upgrades") link below.

  "Please contact your solution provider and web hosting company to ensure your solution has these certificates installed and is capable of using them to secure your connection to Authorize.Net. In many cases the certificates may already be installed."

POODLE FAQs
Authorize.Net Begins Infrastructure and SHA-2 Certificate Upgrades
Production Certificate Upgrades begin May 27 2015


Updating the Security I received a notification to update my security but am unsure on how to do this. I've went to my notifications and it didn't say how to proceed. I also looked in my menu options. I'm honestly lost.

Whether you do this yourself or not will depend on how you are being hosted. If this is not a site that you set up, and don't have technical experience you probably need to talk to your IT support or hosting agency.


How To Manage a Webform and a Contribution page? I currently have a webform set up so that an individual, while renewing a membership for an organisation, is required to update the organisations details at the same time as processing a payment.

From my interpretation of CiviCRM (4.4.14) there are two different methods of achieving this:

Renewing the Membership as part of the webform. The user completes the detail update and then the contribution page appears as "page 2 of 2"
Updating the form and then putting the URL of the contribution page as the confirmation page, so essentially it saves all the updated details before accepting payment.

I am trying to work out though; which it better practice? I know that essentially both payment pages are the same, but are there any advantages (ie security, etc) to directing the user directly to the contribution page?

As far as Civi and the payment processor are concerned, both methods are the same. It's the same contribution page, just presented 2 ways (full-screen, or embedded in a drupal webform). So it just comes down to your preference about the user experience. The first option would present fewer screens to the user, since the 2nd option involves 1 page of webform + 2 pages of contribution form.


User lets membership expire, and then signs up again, membership stays as expired? I have a question about membership status. I'll attempt to explain this so it makes sense, any ideas/help much appreciated!

An existing paying member let their membership expire. They then went online and signed up again for membership but this time using GoCardless Direct Debit for the first time.

It found the existing record by the email address they used.

The Contribution made for the membership went into 'pending' state with an ETA completion of 29th November 2019 00:00. This is all expected to account for the time that GoCardless sets up the direct debit.

In the Membership tab on the contact, it's still showing as 'Expired' whilst it's waiting for the DD to set up. Is this expected behaviour?

When any user signs up for membership for the first time, the Membership goes to 'Pending' state and I think we expected a similar thing would happen when a user renews an expired membership.

We use WordPress Member Sync that looks for those in 'Pending' state and still allows them access to our member-only portal on our site. We did this because of the delay when setting up a direct debit with GoCardless, we wanted users to get access straight away, so we give access to those even in 'Pending' state.

So, this means that if a user has previously expired, and signs up again. They won't get access until the Direct Debit clears because it remains in 'Expired' state rather than changing to 'Pending' once the new contribution has been made.

Is this expected behaviour? Does anyone know why the Membership changes to 'Pending' on a new sign up, but remains on 'Expired' status when a user submits a new membership once it's expired?

I hope that all makes sense! Let me know if clarification is needed on anything. Thanks all for any help provided.

For anyone else that stumbles across this because they are facing something similar:

I got a response on mattermost from Matt @ MJW consulting pointing me to this issue - https://lab.civicrm.org/dev/membership/issues/18

Other people have come across this, there is a patch, but it hasn't been progressed yet.


DB Error when using dupe_check in rest API On version 5.6.0, using api v3. Not sure if something recently changed in our environment, but as of a couple of days ago, running the contact create api (via rest or the explorer) causes a "DB Error: no database selected" error when using the "dupe_check" parameter.

For example, if I run this call, the contact is created and api returns successfully:

https://domain.org/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","first_name":"pol","last_name":"vor","email":"povor@gmail.com"}

But if I run this call, which just has "dupe_check:1" added to it, it fails:

https://domain.org/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","first_name":"pol","last_name":"vor","email":"povor@gmail.com","dupe_check":1}

The error details are as follows (from the API Explorer, but it's the same running from a script):

    {
    "code": -14,
    "error_message": "DB Error: no database selected",
    "mode": 16,
    "debug_info": "DROP TEMPORARY TABLE IF EXISTS dedupe [nativecode=2006 ** MySQL server has gone away]",
    "type": "DB_Error",
    "user_info": "DROP TEMPORARY TABLE IF EXISTS dedupe [nativecode=2006 ** MySQL server has gone away]",
    "to_string": "[db_error: message=\"DB Error: no database selected\" code=-14 mode=callback callback=CRM_Utils_REST::fatal prefix=\"\" info=\"DROP TEMPORARY TABLE IF EXISTS dedupe [nativecode=2006 ** MySQL server has gone away]\"]",
    "is_error": 1
}

Any ideas on what may be causing this? I have a workaround in production for now, but this is a really useful feature to have in the API.

Try upgrading to 5.13.2 since there is lots of change in dedupe rule code since 5.6.

Cheers

Pradeep


Where to Download 5.13.7 ESR Where/how do I get the tarball for CiviCRM 5.13.7 ESR Drupal 7 edition.

I have two different $20/month membership subscriptions to CiviCRM. Logged in to my civicrm.org  account I have twice filled out a form asking for my email address and User name.

I see nothing in my email and no messages on my account page.

How do I get it?

Thank you for supporting CiviCRM! You can use this ESR form for members to request a download key.

There is more information in the FAQ on the ESR page.

When we launched Extended Security Releases (ESR) as a service, we were not sure how many people would sign up, so we started handling the requests manually. It seems like it's here to stay, so we are currently working on automating the process.


Added credit card not showing up I recently discovered that our payment processor does in fact accept a credit cared type that wasn't enabled before. I went to Administer > CiviContribute > Accepted Credit Cards and enabled the card (Discover). Then I cleared caches and CiviCRM caches but the credit card button isn't showing up. We are using Authorize.net.

In the screenshot below, you can see that it still only lists Visa, MasterCard, and American Express.

CiviCRM 5.0.0

Update: Strangely, on my test site, it works just fine on 5.1.2 so when I upgrade production tonight, the issue might just go away.

Looks like the issue was unrelated to the version of CRM I was running. The payment processor settings also needed to be edited to include Discover, after adding it to the list of accepted credit cards; Administer > CiviContribute > Payment Processors. After I cleared everything in the sites/default/files/civicrm/templates_c directory, I was able to see the settings to turn it on. Oop!


This webpage has a redirect loop I upgraded our test site to Civi 4.6.9 on WP 4.3.1 and all is ok.  I upgraded Civi on our live site and the upgrade was successful.  However, when I go into the Civi Menus sometimes I get "This webpage has a redirect loop   ERR_TOO_MANY_REDIRECTS".  On the Administer menu I always get this error.
What can I do to fix this problem?   (ps. deleting cookies, etc. didn't help)

This issue was a WP Plugin "WordPress HTTPS" was conflicting with Civi |Administer| Resource URLs and  Force Secure URLs(SSL) checked as Yes.

We deactivated the WP Plugin and all is ok!


Database update failing for CiviCRM upgrade in Joomla 2.5 I have installed Civi 4.2.19 in Joomla 2.5, to upgrade the 4.1.1 version. I cleared all cache and then tried to run the database update. I got this fatal error:

Fatal error: require_once(): Failed opening required 'CRM/Upgrade/Incremental/php/FourFix.php' (include_path='/home/xxxxx/public_html/j25/media/civicrm/custom/code:.:/home/xxxxx/public_html/j25/administrator/components/com_civicrm/civicrm:/home/xxxxx/public_html/j25/administrator/components/com_civicrm/civicrm/packages:.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/xxxxx/public_html/j25/administrator/components/com_civicrm/civicrm/CRM/Core/ClassLoader.php on line 126

It's referencing file "FourFix.php" which does not exist. I'm stuck and can't continue. I tried updating to 4.4.21, then the database update. Same result.
Anyone able to help??

Just found the issue. In the /CRM/Upgrade/Form.php file, I found this:

static $_numberMap = array(
    0 => 'Zero',
    1 => 'One',
    2 => 'Two',
    3 => 'Three',
    4 => 'Four',
    5 => 'Five',
    6 => 'Fix',
    7 => 'Seven',
    8 => 'Eight',
    9 => 'Nine',
  );

You can see 'Fix' where it should be 'Six'. I corrected that then was able to move forward.

ALSO, I found that I had to install version 4.2.0 before I could install 4.2.19 successfully. I also upgraded to 4.1.6 prior to 4.2.0. Not sure if that was required, but I was seeing what worked.

Hopefully this will help the next poor soul that gets stuck upgrading a 6 year old CiviCRM build in Joomla!


Creating reports with custom fields relating accounts and contacts - how does it work? I am looking for a CRM to install that can do the following:

Create custom field in account where I can select/link one or more contacts that are the founder of the account (firm)
Create a custom field in the account with the founding date of the firm
Create a school field in the contacts

And here comes the trick:

  I would like to create reports that show for example:
  all account/firm names that are founded within a specific date range with contacts linked in the custom founder field that have visited a specific school.

So in summary what I would like to accomplish is to generate a list of accounts that have been founded within a specific date range by founders from a specific school. I think I need custom fields since one founder can be the founder/employee of more than one account.

Does this work with CiviCRM and if so, how do I do it?

Thank you so much for your help!

Dennis

Welcome!

While a lot more information should be collected about your intended processes to set things up in the best way... my short answer would be "Yes, you will be able to accomplish this with civiCRM - but it's possible your solution may require some custom code for the report to look the way you want it to unless you're planning to use Drupal."

Without more information this is what I would start thinking about - it's possible that with more information, however, this is not the optimal solution :) ... only my fourth item mentions any custom code per-say:

I would use relationships from Organization <-> Individual to define the Firm <-> Founder relationships. Both firms and founders can hold multiple relationships of the same type.
Create a custom date field for Organization contact types "Date Founded" (or like)
School needs more information and might be trickier but doable, sounds like it should be either a custom field for individuals (founders) or a custom activity type (visit school), based on your two sentences about it. Can one founder ever have multiple schools listed? Will you collect more information about schools (contact reference field) or just the name (plain text, maybe even a school-named group or tag depending on functions you need)? etc.
I think your required 'report' as civicrm uses the term would require some custom code (many answers on this SE about how to go about that). You could probably generate this list using certain search techniques 'out of the box' but it would be slightly complex and depend on the level of comfort of your users. Using Drupal Views to generate this list may be an even easier way to go, if Drupal is a viable candidate for you.

Hope this is helpful!


CiviCrm Custom Fields - Random Number Generation Is there anyway to generate a random number using Custom Fields in Civi. any Ideas would be greatly appreciated

There is no built-in way to do that, but it would be an easy extension.  Could you give a bit of background about how you would use the random numbers?


Geocode and Parse Addresses problem I have the following error when I attempt to execute the geocode operation in civiCRM 4.7.31 on D7:

  Entity: Job Action: geocode Summary Finished execution of Geocode and
  Parse Addresses with result: Failure, Error message: Aborting batch
  geocoding. Hit the over query limit on geocoder. Details

  Parameters raw (from db settings):  geocoding=1 parse=0 start=1
  end=100 throttle=1

  Parameters parsed (and passed to API method):
  a:6:{s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"parse";s:1:"0";s:5:"start";s:1:"1";s:3:"end";s:3:"100";s:8:"throttle";s:1:"1";}

  Full message:  Finished execution of Geocode and Parse Addresses with
  result: Failure, Error message: Aborting batch geocoding. Hit the over
  query limit on geocoder.

I've entered my Google API map provider key in Settings - Mapping and Geocoding Providers. I've selected Google on the pull-down menus for Mapping and Geocoding Provider. I didn't think 100 records were too many to geocode.

In the Name (Frequency)/Description column, I have the following:
Geocode and Parse Addresses (Daily)
Retrieves geocodes (lat and long) and / or parses street addresses (populates street number, street name, etc.)
API Entity: Job
API Action: geocode

Any suggestions of changes in my settings?

The limits are listed here: https://developers.google.com/maps/documentation/geocoding/usage-limits

It looks like you've set throttling so it probably isn't a queries-per-second problem.

You can log into your developer console at google to see how much you actually are using. I'd start there.


Issues while geocoding Brazilan addresses with Google API on version 4.7 Geocoding is not working for my addresses, I tried everything I could find on the web.

We are using the CiviCRM version 4.7 with Wordpress 4.9.4. We are adding contacts mainly using the REST API.

I have Google geocoding setup with an valid and tested API Key.

My current address format is the default one, but my parsing is disabled.

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

When I run the scheduled job, it just says that it processed hundreds of contacts, but none of them was geocoded, displaying no errors at all.

Job params:

geocoding=1
parse=0
start=0
end=500
throttle=0

I have also tried with throttling.

Job Log:

Summary
Finished execution of Geocode and Parse Addresses with result: Sucesso (Endereços Avaliados: 483 Endereços Geodificados: 0 )
Details
Parameters raw (from db settings):
geocoding=1
parse=0
start=0
end=500
throttle=0

Parameters parsed (and passed to API method):
a:6:{s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"parse";s:1:"0";s:5:"start";s:1:"0";s:3:"end";s:3:"500";s:8:"throttle";s:1:"0";}

Full message:
Finished execution of Geocode and Parse Addresses with result: Sucesso
(Endereços Avaliados: 483
Endereços Geodificados: 0)

Also, when I add a new contact.. even if it has a valid address, it also doesn't work.

Can someone help me? I am really confused.

OBS: I have tried the OSM extension, but only 7 of 500 addresses were geocoded.

I have fixed the issue!

It seems that Google API does not support restricting DNS in server geocoding mode, I have created a new API key with IP restriction.

Beware people, it can cause you headaches.


Why is OpenStreetMaps in Civi 4.7.24 rendering a featureless grey map? I've just upgraded a site that was running Civi 4.6.30 to 4.7.24. I use OpenStreetMaps as the Mapping provider. My maps are now appearing as featureless grey maps rather than what I'd expect.

The same seems to be true when I test it on http://dmaster.demo.civicrm.org

My old site continues to render the map in full colour.

The template concerned (CRM/Contact/Form/Task/Map/OpenStreetMaps.tpl) certainly looks very different between the two versions of Civi that I've upgraded from/to.

As Graham has noted in a comment, the change in map reflects a change in terms of use and distribution methods in July 2016 that necessitated the removal of direct links to MapQuest tiles.

MapQuest Issue - Direct Tile Access No Longer Supported?
mapquest direct tile access discontinued (SO)

The plain map you are seeing is the Carto Light basemap from Carto, which was adopted as of 4.7.19.

On our sites, we do not use the built-in maps for the public, but a Leaflet implementation for Drupal Views. Thus, this change only affected internal users who use the mapping, which does not occur often in our use cases. But for those who do, you can override this choice by adding a custom OpenStreetMaps.tpl template, with the URLs appropriate to your tile provider of choice.

I am not sure if any Carto tiles other than the basic light and dark (with or without labels) are licensed for this kind of use, however. The OSM wiki does provide a list of tile servers where you can explore alternatives.


Changing/Updating old financial types I am new to the civi community and this is my first posted question. I was wandering if there was a way to change previous financial types. The situation is as follows: We have "X Campaign" we run every year. In the past, they labeled the campaign as "X Campaign 2010", "X Campaign 2011", etc. For the past 3 years there has not been a date tied to it and this is how we would like to do things moving forward. I know I can delete old financial types but that will effect my ability to search for them. I also see that I can rename them but then I would just have 6 "X-Campaigns" and one of the reasons for wanting to do this is trim back all unnecessary financial types that are cluttering things up. Is there a way to merge by batch? Thank you for any help.

Here's another option - for when you have tons and batch update via the GUI is daunting:

Export all contributions that have a financial type you'd like to change; Export contribution ID + Financial Type ID

Make the edit in the CSV that is generated

Re-import!


Warning and Fatal error updating from 4.6 to 4.7 com_civicrm/admin/configure.php on line 115 (Site information/versions at the bottom)
I have only used CiviCRM for event registration and entering other events in the calendar. More recently in anticipation of implementing membership capabilities, I had updated to the most recent version 4.6.11 and everything appeared fine. I received a message about running the update on the database and I did that. Everything was fine. But then when I logged on yesterday, I saw that 4.7 was out, so I went ahead and attempted to update to that version. I first just got the white screen. I went ahead and tried to reinstall the 4.6.11 version and got the following message:

Warning: require_once(/home/hobbits8/public_html/administrator/components/com_civicrm/civicrm.settings.php): failed to open stream: No such file or directory in /home/hobbits8/public_html/tmp/com_civicrm/admin/configure.php on line 115
Fatal error: require_once(): Failed opening required '/home/hobbits8/public_html/administrator/components/com_civicrm/civicrm.settings.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/hobbits8/public_html/tmp/com_civicrm/admin/configure.php on line 115

I tried uninstalling the component and reinstalling again, but once I uninstalled the component, I no longer had the menu entry for CiviCRM. I also followed the instructions for modifying the php (global settings off--already off, max upload--already at recommended level, time --I modified from 30 to 600). I've tried installing both the old (4.6.11) and the new (4.7) from a file upload and also from the tmp folder on the server and get the same result. I saw something about needing to compare settings with the old backup, and of course (dummy that I am), I do not have a backup.
I see someone asked a similar question, but the response to him did not fit either his or my scenario (not upgrading from an old version of Joomla or even an old version of CiviCRM).

Joomla 3.4.8
PHP 5.3.29
mySQL 5.5.45 (innoDB enabled)

Thank you.
Patti

It sounds like the civicrm.settings.php file may have been removed when the upgrade/downgrade was applied to your site? See Upgrading CiviCRM for Joomla in the section "Back up your CiviCRM database and settings file". Hopefully you have a copy of the file in your backup, and can restore it to the appropriate location.

CiviCRM recommends PHP 5.4 or greater, which might have caused the white screens when you tried 4.7. PHP 5.6 is the oldest supported PHP version at time of writing; as versions 5.3, 5.4 and 5.5 are no longer supported versions of PHP, I'd recommend updating your PHP if at all possible.


I need to migrate data from one CiviCRM on Drupal instance to a clean one. HELP? The person who was supposed to be maintaining my CiviCRM on Drupal instance flaked on my a while ago and my site has been sitting vulnerable. Due to hosting changes, I decided to just set up a clean new instance on the new host but I need help as to how best to move the Civi records (and also config if possible!) over considering my old MySQL database may have been compromised.

Help! Thanks a lot!

Before pronouncing the old database deceased, I would make sure the structure is correct and if not what is broken.  You can try this: https://github.com/progressivetech/civi-schema-harmonizer or http://wiki.civicrm.org/confluence/plugins/servlet/mobile#content/view/86213632.  The current dB may be ok.


Update capitalization of contact names I was hoping to find an extension that would correct the capitalization of first last names - for example, if someone entered a name in all lowercase or all uppercase, it would change the first letter of the name to uppercase.

It looks like the Capitalisation Corrector does just this. https://civicrm.org/extensions/capitalisation-corrector. But I can't find it as a scheduled job, or in the extension directory. I tried using the Normalise the Data extension but that does not work for my purposes.

I am currently using CiviCRM 5.18.2 with WordPress. Does the Capitalisation Corrector work with WordPress? Is there another way I can install it?

None of the extension you mentioned have schedule job or script to fix historical data, we had to write a script to update historical data when the extension was installed, and going forward extension managed to capitalize the name.


Can I see/export the total field mapping in use? I inherited responsibility for this small non-profit's database. I would like to be able to view and print a list of ALL the fields in use.

Good question. I am sure in the 'old days' you used to be able to work you way back to such a list via the breadcrumbs, or maybe i am confusing it with Option Groups. But i just gave it a go and couldn't find a way to it.

Your best bet is to jump in to the DB if you have access and grab a copy of the civicrm_custom_field table, plus the civicrm_custom_group table


Import Contribution Fails - Financial Type Trying to import contributions. The data file has integer for Financial Type. Import fails Error File says: "Financial Type is not valid: 1"

Everything I have read said to enter the Financial Type Id. My data table for Financial Type has IDs 1,2,3,4,5
How can 1 not be valid?

We’ve hit this too in the past -> solution is to use the Name of the Financial Type. eg Donation (instead of 1). PS - Also match the case.


Cannot create or edit emails or templates in Mosaico Just migrated a WordPress site to a new server. When we try to create, edit or adjust a template that uses Mosaico we cannot get the following (this is from the edit mosaico templates page and the console shows 404 errors.

We have done the following:

Checked both directories & resource urls settings. We have also put hte full paths in these settings
Cleared Cache
Reinstalled Mosaico & Flexmailer
Upgraded CiviCRM from 5.28.2 to 5.28.4

It seems Mosaico cannot load the requested

It turns out the issue was being caused by the resource url for the extensions directory. The path was set correctly but the resource url had a typo. The extension directory was not the standard /ext. Once the resource url was corrected and the cache cleared all works fine.


How to reset the headless test db? I'm using headless phpunit tests. I noticed that the first time I do this it pauses and says about installing schema for xxxx - a test database.

If you break stuff enough, you can end up with a corrupted/no-good test CRM database. How do you get a fresh one back?

I tried dropping the test database, but that just caused errors.

Thanks.

ah-ha!

In your test class edit the setUpHeadless() method which might look at first like this:

  public function setUpHeadless() {
    // Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile().
    // See: https://github.com/civicrm/org.civicrm.testapalooza/blob/master/civi-test.md
    return \Civi\Test::headless()
      ->installMe(__DIR__)
      ->apply();

But pass TRUE to apply(), ie

  public function setUpHeadless() {
    // Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile().
    // See: https://github.com/civicrm/org.civicrm.testapalooza/blob/master/civi-test.md
    return \Civi\Test::headless()
      ->installMe(__DIR__)
      ->apply(TRUE);

Ta-daa! And now your tests will run super slow as the schema will be reinstalled every time. But helps you out of  a spot, and you can of course remove that param.


Receipts for FL donors The state of Florida, USA requires a special statement on contribution acknowledgements & receipts. I am trying to edit the online and offline workflow template so that it will include that statement if the contact.state_province is FL. Can someone please help me get the code dialed in?
Thanks in advance
{if $contact.state_province eq 'FL'}

A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING TOLL-FREE (800-435-7352) WITHIN THE STATE. REGISTRATION DOES NOT IMPLY ENDORSEMENT, APPROVAL, OR RECOMMENDATION BY THE STATE.

{/if}

I tried it without the $ first. So... {if contact.state_province eq 'FL'}
I tried the code below but it put it on all receipts
 {assign var="florida" value="{contact.state_province eq 'FL'}{if $florida}
A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING TOLL-FREE (800-435-7352) WITHIN THE STATE OF FLORIDA. REGISTRATION DOES NOT IMPLY ENDORSEMENT, APPROVAL, OR RECOMMENDATION BY THE STATE OF FLORIDA.

{/if}

The state token is a token and not a smarty variable, so it has to just be on its own, and you can't use it in the middle of a smarty if statement. You have to capture it first into a smarty variable:
{capture assign=stateProv}{contact.state_province}{/capture}
{if $stateProv eq 'FL'}

A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING TOLL-FREE (800-435-7352) WITHIN THE STATE. REGISTRATION DOES NOT IMPLY ENDORSEMENT, APPROVAL, OR RECOMMENDATION BY THE STATE.

{/if}


Creating a single manage your subscriptions link for mails sent via CiviMail and Mailchimp We have a number of mailing lists, some of which are synchronised with mailchimp lists with emails sent via mailchimp (organisational culture means that they want to keep these with mailchimp). The others are sent via CiviMail.

We've created a manage my subscriptions page that contains all mailing list subscriptions. We can provide a checksummed link to this page from CiviCRM mailings I am struggling to see how we could create this from mailchimp. One thing we can do is create links in mailchimp of the form example.org/link-to-manage-my-subscriptions?email=email@example.org. And have this URL trigger an email to the recipient that authenticates them to example.org/link-to-manage-my-subscriptions.

I'm wondering if I am missing a trick that would allow us to create a checksum link in mailchimp and authenticate to that page without the extra email step.

Assuming you're using the mailchimp extension headed by Veda...

You cannot supply more data from CiviCRM to mailchimp, such as data from other fields, or calculated such as a unique URL or checksum.

Furthermore, there is no direct one-to-one link (e.g. ContactID) between the data at Mailchimp and the contacts in CiviCRM. Since integration means that people will always be able to subscribe directly at Mailchimp (or via another consumer of their API), it would be impossible to maintain a state of having a known ID in Mailchimp.

I recently quoted for implementing the first of these and it looked like a lot of work. The latter could be implemented with less work, but you would still have to deal with the cases of subscribers at Mailchimp that might not exist/have corresponding contacts in CiviCRM.

A practical solution might be to have a service that runs on a schedule to: fetch subscribers without this magic link (yet) using Mailchimp's API; then loop those, calculate the links and create a bulk API update call.

My CRM_Mailchimp_Api3 class has methods for submitting and waiting on a bulk Mailchimp API operation.

That way as long as your link does not need changing (it might, in the case of a subscriber changing their email address), and as long as the scheduled job runs frequently enough, you should be able to pull in that magic URL as a |*MERGE_TAG*|.


Adding New Volunteer project times out I installed CiviVolunteer extension 4.6-2.1.1 on Civicrm 4.7.8 drupal7.  From the volunteer menu, clicked link to add new volunteer project. After filling the form and submitting (save and done or continue), a black pop up shows saved.  After that the screen grays out with spinning triangle logo and does not move.

Navigating away by clicking on CRM main menu and returning to Manage project gives a blank screen after heading Civi Volunteer.

Tried with backtrace on, but nothing showed up. Have cleared caches, reset menu, etc, and tried again, no help.

MySQL db lookup shows entry created in civicrm_volunteer_project, civicrm_volunteer_project_contact and civicrm_volunteer_need table.

Any help in pointing how to troubleshoot further and resolve issue will be greatly appreciated.

Thanks

Same here.
Installed Drupal 7.50 / CiviCRM 4.7.11, fresh install. No other extensions.

Installed CiviVolunteer 4.6-2.1.2 and Angular Profiles 4.6-1.0.2

When i wanted to add a new project, it does not save anything. Tried with backtrace on, but nothing showed up. Have cleared caches, reset menu, etc, and tried again, no help.

Any idea what might be the case? I want to demo it to a client, so hopefully someone can help me.


Recording Separate Contributions in a Membership Webform Working on a Civi 4.5.5 site. I've configured a membership renewal contribution page to record a membership fee, and (voluntary) additional donation.

By setting the Contribution Page Financial Type to "Donation", and selecting "Separate Membership Payment" on the Membership tab. When entering a test payment, two contribution records were created with one of type "Donation" and one of type "Membership Fee". As expected.

Renewal is easy, because we are only capturing info for the Primary member.

The membership type extends by relationship to other family members. so the organisation want a membership webform to capture contact details of the related individuals (spouse//partner, and offspring) on initial sign up.

When testing the webform to collect an additional donation on sign up, only 1 contribution was recorded (equal to the value of the membership fee and the donation- but labelled as a donation).

Is it just that the create separate payments option doesn't work with the current civi/webform integration? In which case I need to discuss what is more important with the organisation.

Or am I missing something blindingly obvious? Has anyone been able to get this to work?

thought of this after pressing save
Should I collect related contact data in the webform, then re-direct to membership contribution page which will populate with Contact 1's data and allow the separate payments to work as expected?

Cheers

Craig

Webform-CiviCRM integration was designed to be able to sign up multiple members plus collect a contribution. It will save a single contribution record containing a separate line-item for each (2 memberships + a donation = 3 line items).

There are some key settings that are required:

Contributions (in Webform CiviCRM section): Should be set to your Donation Contribution page and not your Membership Contribution page if you created one
Memberships Tab (in Webform CiviCRM section): Should be set to one

With those settings above and any other data that you would like to collect you will be able to receive a donation and membership purchase on the same transaction.

Adding some examples:

So on a contribution level these look like Donations -> so you must pull LineItem reports; this one is a good one (from Fuzion's Extended Reports): civicrm/report/price/contributionbased?reset=1

Adding some more screenshots:

Contribution page config (also enabled a Payment Processor); but I don't even have Membership section enabled here;

Webform CiviCRM config [I've hidden Membership type as there really is only one];


Reasons for restricting changing contribution statusses? When we try to handle backend contributions sometimes we need manually change contribution statuses. Unfortunately some contribution status changes are restricted. From 'pending refund' we cannot change back to 'pending' or to 'in progress'. But even a more basic change like from 'pending' to 'in progress'.

I checked the wiki at http://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Data+Flow#CiviAccountsDataFlow-Otherchangestocontributionstatus but that does not seem totally up to date (pending refund / progress status)

Is there further documentation on an underlying reasoning and workflow logic of these restrictions? What would go wrong if this wasn't restricted? Could the check be a little too harsh?

BTW. They are handled by checkStatusValidation in CRM/Contribute/BAO/contribute.php

The state changes from one status to another prompt the creation of accounting transactions that reflect that flow. I don't think there is a definiton of what it means from an accounting perspective to implement some of the state transitions you mention. If that is agreed on then we could allow those transitions. The main thing is that we need to maintain the integrity of the financial information in several tables in the database.

FWIW, there is a GSoC project this summer that may fill in more refund functionality possibly along the lines of the cheque writing done by the grant programs extension, though it would likely also use refunds through online payment processors if they and their plugins support refunds.


How can I modify the existing report template? we use the [source] and [external ID] heavily. They are standard civi fields however they do not appear on the report template (detail or summary versions).

Pointers on where to go to update the standard template much appreciated!

These two fields would be generally useful to many CiviCRM users, so I'd recommend adding them to the core report just before https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Form/Contact/Detail.php#L85.

Here are some instructions on using GitHub to contribute to core CiviCRM: https://wiki.civicrm.org/confluence/display/CRMDOC/Contributing+to+CiviCRM+using+GitHub

You can get the names of the fields at https://github.com/civicrm/civicrm-core/blob/master/xml/schema/Contact/Contact.xml#L162 and https://github.com/civicrm/civicrm-core/blob/master/xml/schema/Contact/Contact.xml#L359.

Just adding the field definitions should be sufficient to add them as data columns...a bit more work is required to make them available as order by fields. Once you have tested the changes, please submit a PR. You can ask me for help reviewing the contribution by mentioning @JoeMurray in a comment on the PR. Good luck!


Cannot read unrecognized property CRM_Core_Config::$mapGeoCoding Has anyone encountered this error on a CiviCRM Event:

Sorry but we are not able to provide this at the moment. Cannot read unrecognized property CRM_Core_Config::$mapGeoCoding

I'm using civi version 4.7.13. I changed the Mapping and Geocoding Providers Settings. Google is the Geocoding Provider and I added a Geo Provider Key. When I save the settings the error disappears but the map does not display on the page and eventually the error returns

Removing $config->mapGeoCoding from the core EventInfo.tpl and then clearing the directories out of the */templates_c/En_us directory fixed the error message. I am now able to get the map to work correctly if I enter the longitude/latitude but I think there is an issue with the key.


Installing CiviCRM - best security practices I am new to CiviCRM and want to use it on a Joomla website.

The question I have is how is the best way to make sure, that the CiviCRM user data is secure?

I am thinking about installing CiviCRM in an second Joomla installation on an separate hosted account so that the main website and the CiviCRM data is completely separated and therefore the attack vector is as small as possible. Is this a too big overhead? How do others do that?
Mainly I want to use CiviCRM for global member / participants management.

Generally when evaluating security, you need to balance likelihood and severity of threats against the resources available to counter them. A human rights organization that was a client of mine had information on activists in their CiviCRM instance who could be imprisoned or killed by their governments, with sophisticated, well-resourced governments interested in getting that contact information: high threat, high consequences. In that kind of a context it might make sense to avoid exposing your CiviCRM system to the public web. Another client of ours, Nader for President 2008, also used an instance of CiviCRM hosted on a hardened server that was not exposed on the web, using custom software to migrate relevant contact information into CiviCRM.

For the last several years, the supported and generally available releases of CiviCRM require a CMS to be installed on the same server to manage user accounts and permissions.

In your case, I would recommend putting CiviCRM and Joomla! on the same VPS/server, and keeping your Joomla! software up to date with all security upgrades/patches. Follow the Joomla security best practices listed at https://docs.joomla.org/Security_Checklist. A more in-depth practical guide developed for Drupal but containing many generic sections can be found at http://openconcept.ca/drupal-security-best-practices-practical-guide.


Handling variable tax rates based on member's province In a country, where each province has its own tax rate, where some provinces have multiple tax rates (provincial and feral), how would one go about configuring so that:

Tax rate can be derived based on a member's province
Invoices / Receipts show both itemized taxes
Taxes are collected in appropriate financial accounts
Membership types are associated to their respective financial types.

For example:
Imagine two membership types.  Student Membership.  Regular Membership. There are financial types for each, based on a business requirement to track revenues based on membership types. Specifically, revenues for student memberships are tracked against financial account 4000, and for regular memberships against financial account 4100. So far, easy enough.  Now throw in Canadian taxes, where tax rate (and financial accounts) should be derived off on member's province, and it gets complicated pretty quickly!  Even more so if there are 10 provinces, 3 territories, and a dozen or so membership types.

It seems that the best recourse would be a "Canadian Tax" module.  A quick search doesn't reveal anything.  Surely there are lots of Canadian users with similar issues.  How is this being handled elsewhere?

I have an extension we developed for a client with simple needs in Quebec that is not yet ready for general use - https://github.com/JMAConsulting/biz.jmaconsulting.cdntaxcalculator . I just looked at it now and removed a bit of custom code to support shipping fees for physical items. I seem to recall that we used custom templates for the messages for purchases. I would love to talk to you about doing this in a more general way as another organization is currently interested in this as well.

Background: The extension uses billing address to determine province of buyer and use that to determine which taxes should apply. A more general solution would handle place of supply (the tax term for place which determines which sales taxes apply) for events based on venue location. For online events it would be buyer's location.

Unfortunately there are some complications in handling two taxes as this affects the display on contribution/membership pages, their confirmation pages, and a fair number of system message templates.

A longer specification is available at https://wiki.civicrm.org/confluence/display/CRM/Canadian+Sales+Tax+Extension


Double registration form on wordpress? I got something quite strange and do not how to solve it.
In my Wordpress 5.6.1 /CiviCRM 5.34 integration (my first WP integration but have am also working with D7/Civi for 8+ years)
I get a double registration screen. It shows in the main area AND in the footer.
I am using the native url and not the shortcode.
https://www.mydomain.nl/civicrm/event/register/?reset=1&id=12
UPDATE: it is only when I use a selected page as a footer in my enfold theme

You could use JetPack or another widget visibility plugin to prevent showing the page in the footer when you're on the CiviCRM Base Page.
EDIT: The following code prevents CiviCRM from overriding the content a second time:
add_action( 'civicrm_basepage_parsed', 'my_civicrm_disable_content_filter' );

function my_civicrm_disable_content_filter() {
    // Once the CiviCRM filter has run, remove it.
    add_filter( 'the_content', 'my_civicrm_remove_content_filter', 100 );
}

function my_civicrm_remove_content_filter( $content ) {
    static $done;
    if ( ! isset( $done ) ) {
        remove_filter( 'the_content', [ civi_wp()->basepage, 'basepage_render' ] );
        $done = true;
    }
    return $content;
}

This should mean that your second page renders as expected.


Get Contact id from Relationship to use in a Hook I want to display Contact B ID of a relationship for the current contact. I am building a hook and this is my code so far.

if ( $formName == 'CRM_Contactlayout_Form_Inline_ProfileBlock') {
        if ($form == CRM_Core_Action::ADD) {
            $ID= '190';
            $defaults['custom_189'] = $ID;
            $form->updateElementAttr('custom_189',array('readonly'));
    }

I want to replace 190 with a code that grabs the contact ID of that current users relationship.

Your help is much appreciated.

Thanks

This code worked for me:

$contactId = CRM_Utils_Request::retrieve('cid', 'Positive');


Which template is used for receipts sent from admin entry and renewal of memberships? If I go into CiviCRM and create or renew a membership as opposed to them doing it themselves online, which template is used for the receipt? Specifically I mean if you check the "send confirmation and receipt" box at the bottom of the membership form.

Is it "Memberships - Signup and Renewal Receipts (off-line)?" I think it's the "off-line" part that's throwing me off so I just wanted to confirm. Thanks!

It's this one

Memberships - Signup and Renewal Receipts (off-line)

I often get a bit confused too. Best thing to do if in doubt it to make a minor amendment and do a test. You can easily revert back to the default afterwards.


Error from CiviCRM code when I try to install other Drupal modules Drupal version 7.34, CiviCRM version 4.5.5

Hi,
When I try to install Views and CTools on our Intranet installation, I am getting the following error from Drupal:

Exception: API error: DB Error: already exists in CRM_Core_ManagedEntities->onApiError() (line 396 of /srv/www/htdocs/drupal/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php)

(currently, CIviCRM is the only module installed)

Is this something that upgrading both CiviCRM and Drupal will fix?

It looks like CiviCRM is trying to insert some "Managed Entities" which already exist in the DB. Certain actions within the Drupal CMS will trigger CiviCRM to attempt this, and enabling / disabling modules is one of them.

What I might do in this situation (if I had to fix it without upgrading CiviCRM) is:

Make a backup of your DB. Make two.
Look in CiviCRM's debug logfile for ManagedEntities_failed - this has additional information to the Exception message you posted above.
Review the entry which CiviCRM was unable to insert to the DB (because a conflicting entry already existed).
If the entry CiviCRM tried to insert matches closely to an entry in the DB, then remove the DB entry you find and hope that when CiviCRM re-inserts the same, it "sticks" the second time around.
You might need to repeat this process, so pay attention to any new errors in the same logfile, and see if they are clashing with new entries or the same one ...


What is the default data encoded in the Bar Code / QR Code? What is the default data encoded in the Bar Code / QR Code?

Is it possible to modify this data to use for event check in? i.e. on quick scan event participant status changes from registered to attended.

It contains a single number: 42. At least on all the civicrm installation that have a "DON'T PANIC" on the cover

On the others it's contact id + participant id + url to the participant view in your civicrm

There is a hook to alter what's encoded in the QRcode alterBarcode that you can implement from an extension and put something else (eg the name of the participant in clear)

Beware that there is a limit of how much text that you can put in a QR. Last time I checked, the proper way of formatting the content (eg. vcard if you want to put the contact details) so it was understood by all smartphones was a bit of a hit and miss.

Would be great you update us on the state of the art and what works or doesn't


Hook pre/post in pledge changed status On 5.6.0

After create a pledge.
If is created a new contribution that change the status of the pledge from "Pending" to "Completed" is not incoming in any hook_civicrm_post or hook_civicrm_pre with objectName equal to "Pledge" or "PledgePayment"

Which is the correct way to update the pledge programmatically?

I see this line in CRM_Contribute_BAO_Contribution:

//update pledge and pledge payment, CRM-3961
CRM_Pledge_BAO_PledgePayment::resetPledgePayment($id);

Looking at CRM_Pledge_BAO_PledgePayment::resetPledgePayment(), I see it calls the DAO method, not the BAO - which is why the hooks (which ARE present) are bypassed.

I think this would be a good enhancement for core CiviCRM.  CRM_Pledge_BAO_PledgePayment::resetPledgePayment() is a very short function, which could be easily refactored to instantiate the PledgePayment BAO instead of DAO, and call the add() or create() method instead of commit().  This would cause your hooks to fire.


Can one change the order of Groups shown on a profile? I would like to change the order of the set of groups that are displayed to a user.  In my case, I'm working with Mailing List groups, and all five are set to "Public Pages" visibility.  If they are shown on a profile using the "Group(s)" field, they come up in alphabetical order.

The same ordering default is exhibited on the Mailing List Subscription page, /civicrm/mailing/subscribe.

My goal here is to create a mailing list preferences profile that users would get to through a checksum placed in emails sent to them by CiviMail.  In my case, the default alphabetized order creates an awkward presentation for how my organization wants to relate to our community.

I'm currently running CiviCRM version 4.5.4 on Drupal 7.

To extend on peterdnz answer:

On drupal, you can install webform and webform_civicrm modules and build the form you want.

Once you have enabled civicrm on that form, you can choose the various fields existing in civicrm (first or last name, email... and groups)

For the list of groups, you can then chose which one(s) you want to display and in which order. You can even change the name of each group (on that form) without having to change the name of the group, so you can use shortcuts as you might call the group differently within the team and with your visitors.

It's fairly intuitive once you get into the logic of having to take the fields as available in civicrm and add them to the form (conceptually similar to profiles, but the interface is IMO clearer)


Bug or feature? Logged in, can't do event registration. Not logged in, Event Registration loads CiviCRM 4.6.2 on WordPress 4.2.1
When I'm logged into CiviCRM as an admin user, I cannot register for an event.  I get a page with multiple sections, some with Private: Event Name, others are just Event Name without the Private on the front.

Log out, click the Event Registration and everything loads beautifully with all the fields showing up correctly.

BTW:  Upgraded to CiviCRM 4.6.6 and WP 4.6.6 since then, same issue.  As an aside note, my dev site doesn't have this issue.  So it's something very particular to this one install.

Update:  My dev site exhibits the same behavior when a Post is created with CiviCRM embedded and marked as Private, as the the Answer points towards.

Also need permissions for Profile View and Profile Create?  That solved a similar problem in my case


Volunteer Report Error: Expression #2 of SELECT list is not in GROUP BY clause I'm trying to run a volunteer report on CiviCRM 5.5.2 on WordPress, and if I go to Reports -> Contact Reports -> Volunteer Reports, then click "Refresh Results" (no matter what criteria I seem to choose), I get the following error:

[nativecode=1055 ** Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'bitnami_wordpress.civicrm_contact_assignee_civireport.sort_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]

The full log entry is pretty long but here's the group by clause (through to the end of the query, right before the error above appears in the log):

GROUP BY activity_civireport.id  ORDER BY civicrm_contact_assignee_civireport.sort_name ASC  LIMIT 0, 50

In case this sheds any light on things, I'm pretty new to CiviCRM and I set up a project, then starting logging hours, but the people for whom I'm logging hours are NOT on the volunteer roster for the project. Not sure if that matters or not but thought I'd mention it since maybe that's not how you're supposed to do things.

I can provide more details or the full error as needed. Thanks for any ideas anyone has.

As you must be aware CiviVolunteer is not fully tested for 5.5.x version of CiviCRM. The last extension version was released for 5.0. This error usually occur when sql_mode for mysql is configured for only_full_group_by. I have just submitted a pull request for this fix.

You can either apply the patch from here or turn off only_full_group_by sql mode

HTH

Pradeep


How to use CiviX upgrade hooks? I'm developing an upgrade to an extension and when this version is installed it's going to need to update the database.

The module extension has been made with civix and I notice there's a CRM_XXX_Upgrader_Base class that looks useful but I can't figure out where I'd put the code I need to run.

Are there any good examples of extension upgrade hooks that I could learn from?

I've looked at a couple of popular extensions, but they don't seem to have used/needed them, so I'm stabbing in the dark a bit.

Here is an example of one I have used:

 public function upgrade_1002() {
    $this->ctx->log->info('Applying update 1002 (add country)id to civicrm_project table and renaming manager_id in civicrm_programme table)');
    if (CRM_Core_DAO::checkTableExists('civicrm_project')) {
      if (!CRM_Core_DAO::checkFieldExists('civicrm_project', 'country_id')) {
        CRM_Core_DAO::executeQuery('ALTER TABLE civicrm_project ADD COLUMN country_id INT(11) DEFAULT NULL');
      }
      if (CRM_Core_DAO::checkFieldExists('civicrm_programme' , 'contact_id_manager')) {
        CRM_Core_DAO::executeQuery('ALTER TABLE civicrm_programme CHANGE contact_id_manager manager_id INT(11)');
      }
    }
    return TRUE;
  }

Does this explain it a little? And obviously you also have to make sure your install query is fixed as this will be used when installing, not the upgrades.

And another one with the sql in a separate file:

  /**
   * Upgrade 1003 - add table civicrm_case_project
   */
  public function upgrade_1003() {
    $this->ctx->log->info('Applying update 1003 (create civicrm_case_project table');
    if (!CRM_Core_DAO::checkTableExists('civicrm_case_project')) {
      $this->executeSqlFile('sql/createCaseProject.sql');
    }
    return TRUE;
  }


Unable to Import, edit certain records and edit Group settings: DB Error: constraint violation I am unable to make certain edits to CiviCRM; unable to edit certain records and unable to edit the visibility of groups.

I think the problem is this:
Cannot add or update a child row: a foreign key constraint fails (`ea...")

The error message is referring to a group '58' which I deleted and replaced with group "62".

How do I find the exact problem and fix it?

I'm on WP 4.5.3 with CiviCRM 4.7.9.

Here is the error message:

  Database Error Code: Cannot add or update a child row: a foreign key
  constraint fails (xxx_civicrm.civicrm_group_contact,
  CONSTRAINT FK_civicrm_group_contact_group_id FOREIGN KEY
  (group_id) REFERENCES civicrm_group (id) ON DELETE CASCADE),
  1452

It seems you have some entries remaining in civicrm_group_contact which point to the deleted civicrm_group entry?

You can confirm this with a query to look for group contact entries which point to a missing group.

-- Show contacts who belong to a group that doesn't exist.
SELECT *
  FROM civicrm_group_contact
 WHERE group_id NOT IN (SELECT id FROM civicrm_group);

If entries are found with that query, you can clear them out (or update them to point to the new group, or export those contact IDs, or ...).

-- Standard disclaimers apply; back up your DB before doing this!
DELETE
  FROM civicrm_group_contact
 WHERE group_id NOT IN (SELECT id FROM civicrm_group);

If updating, you'll want to avoid creating duplicate entries by reassigning group_id without checking for existing group additions.


Export full state name - not abbreviation In the CiviCRM database the States have a full name and an abbreviation. e.g. New York, NY; Paris, 75; British Columbia, BC.
The contact export on CiviCRM exports the abbreviation for the state field not the full state name. This is fine for US and Canada but doesn't work fore UK and Ireland.
I've used CiviToken which has a token that adds the full name. But this is only good for labels and templates. I need an export to do an offline mail merge for a printer.
I've found this from searching but nothing since
https://forum.civicrm.org/index.php%3Ftopic=21897.0.html
https://forum.civicrm.org/index.php%3Ftopic=28789.0.html
Is there a way to do this?
Could it be added as a core feature. It's a function that anyone in UK and Ireland would need.
I'm on CiviCRM 5.14.1
All the best
James

The more general issue about state has come up before, e.g. https://lab.civicrm.org/dev/core/-/issues/724 and https://lab.civicrm.org/dev/core/-/issues/1709.
It's not a full solution but you can manually update the abbreviations in the database in the civicrm_state_province table, but you'd have to change the column size in the table definition, and someday an upgrade might wipe out your changes, although unlikely.


Wordpress & Mod Rewrite I have Wordpress installed in a subdirectroy on my site (mysite.com/wordpress) while the site is displayed using mod rewrite as just mysite.com

This works fine for the backend of CiviCRM, but it is causing problems on the frontend. CiviCRM writes up URLs as mysite.com/wordpress/civicrm?etc which works fine on the backend, however, upon clicking on the links on the frontend the URLs are rewritten to mysite.com/civicrm?etc, which causes the links to fail and takes the user to a WP Page that says

CiviCRM

Do not delete this page. Page content is generated by CiviCRM.

How can I fix this? Is there a way to prevent WP from rewriting those URLs? Or is there a way to properly Configure CiviCRM when WP is installed in a subdirectory?

Edit: It turns out I indirectly came across a solution to this in another question I asked. The URL is here: CiviCRM/Wordpress "Page" Integration

I found a way to make this work, though I don't know if it is a solution or a workaround...

I made a page called Wordpress, and made the auto-generated CiviCRM page a child page of that page. Therefore the URL of that page is mysite.com/wordpress/civicrm and I suppose because that page exists, WP does not try to rewrite it? For some reason, it works now...


Payment Processor Error message: 10525: Invalid Data This transaction cannot be processed. The amount to be charged is zero When using CiviCRM 4.6.4, we notice when adding a $0 (Free) item to a price set, and a user contributes, they are asked to confirm, but then get this error with our Paypal Website Payment Pro processor:

Payment Processor Error message: 10525: Invalid Data This transaction cannot be processed. The amount to be charged is zero.

When someone chooses a $0 amount, no Paypal payment method is presented on the form, yet it still seems to opt-in to using that processor. We have no other payment processors enabled.

How do we fix?

We also notice that when using CiviDiscount,if we make a 100% off CODE for a membership, it is also rejected by Paypal with the above error.

Update your site to CiviCRM 4.6.7

This was a bug, reported at https://issues.civicrm.org/jira/browse/CRM-14536

We had this problem on our site, and it was fixed as of 4.6.7.  Update your site to the latest version, and you should be all set!


Importing without changing primary address Is there a way to tell CiviCRM not to set newly-imported addresses as primary addresses?

For example, let's say I have a database where everyone has nicely-curated "Home" addresses. I make a new location type "Voter" to import voter file addresses. The import process will make "Voter" the primary, but I want "Home" to remain primary.

The only way I know of is to backup the civicrm_address table and revert them using SQL, but it would be nice to skip that step.

I don't know if there's a way to handle this through the User Interface. I added a function into a custom extension, which seems to solve the issue:

function myext_civicrm_pre($op, $objectName, $objectId, &$params) {
  if ($objectName == 'Address' && ($op == 'create' || $op == 'edit')) {
    if ($_SERVER['REQUEST_URI'] == '/civicrm/import/contact') {
      unset($params['is_primary']);
    }
  }
}


Civimail delivering AND bouncing at the same time - what's missing? I could use some help troubleshooting Civimail- I seem to have bounce processing working correctly except when a mailing goes out, all recipients bounce AND all recipients receive the email.

Any suggestions for where to start looking?

Using ()mail to send, and a return@domain.org google apps account for bounces.

Figured it out finally: bad default setting in php.ini.

The isp had this param added by default: mail.force_extra_parameters adding "SMTP = smtp.myisp.net" to every outgoing mail sent by mail().

This caused every email to bounce when civi called qmail.

Sheesh. I want those two days back.


Send scheduled reminder to group I am trying to send an Activity-triggered scheduled reminder to a group. These contacts will not be otherwise associated with the Activity.

Recipients > Send to group doesn't seems to be working and there's something in the documentation that suggests only members of the group that also meet some other criteria (Activity associated contacts?) will get the email, but this isn't clear.

So maybe it would work to use the 'Limit or Add Recipients' > 'Also include' option. But this doesn't exist in scheduled reminders only for Entity type = Activity.

Thinking about asking someone to write an extension to override this on our site, but want to check there's not some deep reason this is omitted for Activities.

Or maybe it's a bug, and Recipients > Send to group is supposed to work...?

Thanks for the help.

We ended up commissioning AGH Strategies to write an extension. Check out github.com/aghstrategies/com.aghstrategies.activityemail and the readme: github.com/aghstrategies/com.aghstrategies.activityemail/blob/… - that was the missing piece for us.


Drupal civicrm Contribution Form code into Drupal page content? Is it possible embed drupal civicrm Contribution Form code into page content?

Can any one please help me I was trying this for last 3 days, I can't find the solution.

Yes, you can install the Webform-CiviCRM module, and this allows you to embed contribution fields in a webform (which is a drupal content type).


GitHub Pull Request errors I have found that the best way to deal with pull requests that have failed validation due to coding standard error is to close the PR, delete the remote branch in Git and create a new one with the corrected code pushed to it.  This is, of course, a bit fiddly and one would rather get the standards right first time. Is this the correct approach?  Simply pushing a new commit causes grief in that the local and remote branches are out of sync.

You can add a second commit and push to the same branch, which is what I'd generally do. The PR will be updated with additional commits to the PR's branch.

git add --patch
git commit
git push REMOTENAME BRANCHNAME

If your branch hasn't been merged (and you're not concerned about others having worked on the same branch), you can also amend your commit and then force-push. But this is more likely to cause grief IMO.

git add --patch
git commit --amend
git push -f REMOTENAME BRANCHNAME

If you really regret a PR, you can delete the remote branch and start over. This will probably destroy the PR, but you can make as many branches and pull requests as you like.

A colon before the branch name will push "nothing" to that branch, deleting it.

git push REMOTENAME :BRANCHNAME


When enabling logging/auditing for multisite (multi-domain), does it need to be enabled for each site/domain? When enabling "detailed logging" for a multisite (multi-domain) installation, does logging actually need to be enabled for each domain ID? Or is it sufficient to enable logging only on the "master" site (with Civi domain ID 1)?
I've noticed that in the civicrm_setting table, the logging setting is stored with the domain_id. And, in the CiviCRM admin UI, when logging is "enabled" on the site with domain ID 1, it still shows as "disabled" on other sites unless I explicitly "enable" it.
Since logging works via insert/update/delete triggers on each DB table, I cannot see how logging could be "enabled" for one domain ID but not enabled for all other domain IDs. Nonetheless, the fact that the setting appears to be independent for each site (based on both the UI and on the domain_id value in the civicrm_setting table) is confusing, and I have not seen this documented elsewhere.
I'm running WordPress multisite (v.5.4.4) and Civi 5.35.1.

Edit: Out of curiosity, I dug deeper and inspected the database triggers on the civicrm_contact table after first enabling logging on both the main (domain ID 1) site and a child site, and then again after disabling logging on only the child site.
After enabling logging, there was a TRIGGER civicrm_contact_after_insert after insert ON civicrm_contact FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO ... defined on the civicrm_contact table. And after disabling logging on only the child site, that trigger disappeared from the civicrm_contact table. So this seems to confirm that logging is not specific to a domain ID. But, I don't know whether or how the codebase uses the @civicrm_disable_logging variable. Through that variable, it looks like it would be possible to disable/bypass logging on a per-site basis!
For the record, I enabled and disabled logging via the wp cv CLI rather than the UI using (e.g.):
wp cv api setting.create logging=1 --url=main.mydomain.org
wp cv api setting.create logging=1 --url=childsite1.mydomain.org
wp cv api setting.create logging=0 --url=childsite1.mydomain.org

I did not test to see if changing settings in the UI behaves differently.

You're correct that logging is at the database level.  It seems like a bit of a loophole that it can be enabled-disabled on a per-domain basis.  I would set it to TRUE on all domains to avoid unexpected behavior, but my guess is you'll only have a problem if you disable it on one site and expect it to continue working on others.


Unsubscribe group in scheduled mailings I want to send an email to a large group (>50) and have created a smart group for this. Using the scheduled mailing function I selected this group as the recipients but now an extra box appears with an unsubscribe group, what is this for and can I do the mailing without this?

The unsubscribe group provides a way for recipients to opt out of future mailings.  It isn't possible to send a mailing without this.

Please read the documentation for more information about how this works:  Mass mailings using CiviMail

Here's an extract that provides an overview:

  For mailings to search results, you are required to choose a Group
  from the Unsubscription Group dropdown menu. Here's why: Every mass
  mailing needs a way to track unsubscribe requests. A simple
  "unsubscribe" process is required by law in many countries and may
  help prevent your mailings from being treated as spam. Mailings sent
  to Groups have this capacity built-in. The next time a mass email is
  sent to that Group, anyone who has unsubscribed will not be included.
  However, mailings sent to search results do not have this built-in way
  to track who has unsubscribed, so you need to provide one.