OVH: Cron not detected by CiviCRM I'm working on a drupal website with a CiviCRM platform which is hosted by OVH. My cron seems to be working,

but CiviCRM is not detecting it. Is that normal ?

Thanks in advance for your advices.

I recommend following the documentation to configure your cron entry.

https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#commands

This page documents method for using built-in CLI commands (cli.php) and externally packaged CLI tools (drush or cv).

The method shown in your screenshot does not appear to match those docs:

The task is initiated from within the bin directory rather than CiviCRM website root (this might or might not be a factor)
The task uses cron.php using CLI SAPI, not the CLI tools documented. (cron.php uses $_REQUEST for its inputs)
The task does not specify a CiviCRM scheduled job (eg Job.execute)

Following the docs is probably the best next step. If that doesn't work, update your question to include the amended command and output as a text for further guidance.

cron.php is documented as intended to be called over HTTP in that page, which you can also do using other CLI tools like curl.


How to allow "Bank Transfers" I am trying to install a new payment processor.  Right now, visitors to my site only have an option to give their credit card, but I also want them to have the option to do a "Bank Account Transfer."  How would I do this?

Unless William has addressed your "Bank Transfer" question, and you actually mean you want users to pay by entering their bank details, often known as ACH transfer.

You will need a merchant that allows that, an example post on this: https://civicrm.org/blogs/adixon/iats-next-generation-payment-processor-acheft

The link William provided indicate IATS and Vanco offer ACH,


Credit Card Processing Fee Field I have a volunteer project I am doing and the organization it is for wants to be able to show donors the estimated cost of their credit card processing and then let them add it to their total.  I know we can do this an extension but I am trying to come up with another way. Any ideas are appreciated.

Thanks,
Steve

I would tuck these into a priceset; so two fields: donation and processing cost; then add some Javascript to the contribution page to do the math and dynamically populate the processing field based on the value in the donation field.

Add another field to the contribution form via a profile (yes/no radio button) and use that in your Javascript as a switch ($0 or do the processing cost calculation).


Reassigning Case Role Gives DB Constraint on Membership I recently moved to a new webhost with Drupal 7 and upgraded to CiviCRM 5.21.0. Everything seems to be working fine, I have no errors in the Administration Console. However, when I go to cases, and I reassign a case role, I get an error:

"DB Constraint Violation - membership_contact_id should possibly be marked as mandatory for Membership,get API. If so, please raise a bug report."

I don't even have CiviMember or CiviCampaign enabled. I ran the upgrade script again, no issues. I disabled and re-enabled CiviCase again. Clear cache, deleted everything in template_c. I don't know what else to try. Any ideas?

Based on chat discussion there was a missing database field for unknown reasons. Running this helped:

ALTER TABLE civicrm_membership ADD COLUMN status_override_end_date date DEFAULT NULL COMMENT 'Then end date of membership status override if ''Override until selected date'' override type is selected.';


How do I eliminate the error "Timestamp Mismatch"? I see a lot of related questions, but none that quite handle the following:

System: Ubuntu/Wordpress 4.9.8  Civi 4.7.23

I'm about to upgrade Civi but the error about "Timestamp mismatch" is making me worry.

The MySQL time stamp is correct and matches "date" on the server.

The Wordpress time setting is correct and matches "date" on the server.

The PHP time setting as exposed in phpinfo() is correct although it of course doesn't spell out a time, just a timezone, which is correct.

So why is this error persisting?

[UPDATE - IS FIXED]

I fixed this by revisiting WordPress's settings and changing the Timezone setting from "UTC -5" to "Chicago".  Both of these settings reflect the same time zone, so why these two settings are seen as different I can't say, but Civi no longer complains.

So I guess the lesson is: if you want to get rid of this error and you're showing no actual disagreement on timezone between the server, PHP or WordPress, go to WordPress and pick the timezone that is named for the city you're aiming at.

Hope that helps someone.


How can I add Recaptcha Version 2 for civicrm 4.3 "You are receiving this email because you are registered as a website
  administrator using reCAPTCHA, and your website is still using
  reCAPTCHA v1, which will be turned off on March 31, 2018. We announced
  the reCAPTCHA v1 deprecation in May 2016. Starting in November 2017, a
  small percentage of reCAPTCHA v1 traffic will begin to show a notice
  informing users that the old API will soon be retired. Any calls to
  the v1 API will not work after March 31, 2018. To ensure continued
  functionality, you’ll need to update your website to a current version
  of reCAPTCHA. You can learn more about reCAPTCHA v2, Invisible
  reCAPTCHA and reCAPTCHA Android API in our Developer’s Guide. The new
  APIs are simple to implement and will streamline the captcha
  experience for your users. If you need help, you can engage in the
  reCAPTCHA Google Developer Group or post to Stack Overflow with the
  ‘recaptcha’ tag."

How can I update the recaptcha in civicrm to v2 , where should I make the changes in the code and in frontend to make the recaptcha functionality to work in tandem with v2 ?

I was able to apply these patches directly to CiviCRM 4.5.4.  Looking at the code, this version is virtually identical in the ReCAPTCHA code, so it should work fine (although you may need to manually apply the patches).

Update this file:
/civicrm/packages/recaptcha/recaptchalib.php

with:
https://github.com/civicrm/civicrm-packages/pull/92/files

Update this file:
/civicrm/CRM/Utils/ReCPATCHA.php

With:
https://github.com/civicrm/civicrm-core/pull/5015/files

In browser go to:
https://www.google.com/recaptcha and update / create a V.2 key for the website.

then go to:
(Administer -> System Settings -> Misc)
civiURL:  /civicrm/admin/setting/misc?reset=1

Update the Public / Private keys with the new keys.

Cleanup caches: via your civi URL:  /civicrm/admin/setting/updateConfigBackend?reset=1


Ways for an extension to determine how (by which form/screen/API) a Contribution was created? I'm creating an extension. It should:

intervene when a Contribution is created, and make some changes to the data
only intervene if the Contribution was created via a public-facing Contribution Page, or via the Import Contributions UI
not intervene if the contribution was created through the back-office UI, batch data entry, a public-facing event registration form, or any other method.

My plan was to use hook_civicrm_pre or hook_civicrm_post to intercept the Contribution at the time of its creation... but I need to know which context the Contribution is being created/updated in, so I can make sure I'm only modifying the data in the desired contexts.

How can I determine, within my hook implementations, what context the Contribution is being created in?

(Bonus points for determining contexts other than the ones I listed above. For example, CLI or REST API.)

In hook_civicrm_pre, the params passed to your function include qfKey and entryURL — at least sometimes. The entry URL is in a format that's pretty obvious, but it seems like depending on URL parsing would make for brittle code. So what about qfKey?

qfKey is a form key based on form name, the current user session ID, a private key unique to the current user session, and optionally a sequence number to distinguish between multiple instances of the same form in the same session. The form name might give you the context information you need! But it is encrypted, so your extension can't just use a simple comparison operator on it.

To find out whether an entity was created in the context of a given form, you need to use CRM_Core_Key::validate(). For example:

function myextension_civicrm_pre($op, $objectName, $id, &$params) {
  if (CRM_Core_Key::validate($params['qfKey'], 'CRM_Contribute_Form_Contribution', TRUE)) {
    // This entity is being created in the context of the back-office contribution form.
    // Do stuff.
  }
}


Scheduled emails failing - HELP Configuration: MacOS, MAMP, Wordpress, CiviCRM
Individual mail works fine.  Messages show up in log.
Minimal test config with users and groups marked as not-hold and bulk mail.
  Users in groups are the same as the ones that work for individual mail.

System cron set and working.  Mailing job being executed manually (for now).

Debugging and logging are turned on.

I use New Mailing to create a new mailing job.  Recipient group shows members (the same one used for individual mail). Sending to single recipient shows completion with no errors and no log messages.  Sending to group shows the same.  Following through to schedule the message shows success.  Manual triggering of job show success.  Job log shows:

2020-02-03 11:31:09 Send Scheduled Mailings
Entity: job Action: process_mailing
Summary
Finished execution of Send Scheduled Mailings with result: Success (a:1:{s:9:"processed";i:2;})
Details

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

Full message:
Finished execution of Send Scheduled Mailings with result: Success (a:1:{s:9:"processed";i:2;})

Nothing is in the CiviCRM..log

Any suggestions or help would be much appreciated.

Lots of digging here:
The culprit is Bluehost shared hosting AND VERP (variable envelope return processing), which is an interesting hack and very useful for massive systems.  (I am a colleague of Ray Tomlinson and something of a dinosaur when it comes to email protocols ...)

Bluehost is my shared hosting provider (no VERP) and VERP is - well, a hack.  VERP SHOULD be handled with extra header settings but is done as a sender NAME which violates all kinds of identity-based authentication protections - but then I'm a security expert and so I do have opinions.

Technical answer:
Bluehost (and most others) do not support VERP unless you pay for a VPS or better plan.

CiviCRM - being intended for big players - requires VERP to handle bounces and other issues when dealing with large mailing lists.   (Kudos to CiviCRM)

My 501(c)3 is neither a big player (fewer than 20 recipients) nor willing to pay for a VPS (because we're small ...) and not willing to pay for a for-profit CRM (because we're small).

The answer for people in a similar situation to me is to edit out a portion of smtp.php (in the civicrm folder) and comment out:

/*if (!empty($headers['Return-Path'])) {
        $from = $headers['Return-Path'];
    }*/

smtp.php = (cd civicrm folder; exec find . -name smtp.php -a -print;)

The CiviCRM people (bless them for their efforts !) will rightfully claim that my, and other's, 'solution' is a hack (VERP is a hack too, but useful ...) that should be deprecated with excessive force, but they should also allow the ability for us small folks who have *NO OTHER FREE AND OPEN SOURCE SOLUTIONS* an option as part of the configuration.

Love an kisses ...


How do I do a mass email to all volunteers? I am very new to civi and am needing advice on now to do a mass email to all volunteers. I have the language that is to be used in the body of the email. I will copy and paste this to the "Group" or "Mass" email. Thank you for the help!!

welcome to CiviCRM!

How are your volunteers defined in the CRM? I.e.how do you create a volunteer instead of a regular contact?

When you know that, log in, go to search -> advanced search. It's worth getting familiar with these options. Look to see if volunteer appears under contact type.

If you need more info post back!

John


Check Payment processor is not working for CIVIEVENT I am having an issue with my Check Payment Processor.
I am trying to setup the Check Payment method as a default payment processor for the registration of my events.

I have set only check as a payment processor. There is no other payment processor added yet. But when I try to register myself for the event, it asks me to add the credit/debit card option for the billing.

I have also set check payment as a default payment option.

Thanks in advance.

If you need the payment through "Cheque" you don't need to enable payment processor -

All you need is to enable "is pay later" option in your event config page - Payment processor are used only when you do online payment using credit or debit cards.

So, disable your payment processor and select "is pay later" option and then give a try - that should work correctly

Refer: https://docs.civicrm.org/user/en/latest/events/creating-an-event/

I guess this helps !!!


Change Member Listing Layout in Worpress I was wondering what the best approach would be to change the layout of a member listing.
I'm using wordpress, and have inherited the maintenance of this association website - and believe civiCRM could really help with their internal processes, but a key to this is a public searchable list of members.
I've mocked up in wix (don't judge me :)  the sort of layout/styling and functionality I was hoping for.

https://sirbrad.wixsite.com/iakpproposal/IAKPPractitioner/find

I'm still getting my head around wordpress, and civicrm, and am not sure of the best practice/approach for creating something like this?
Would this be an 'extension' that I would need to create? Or should I work out how to create a wordpress page that uses ajax to call the civicrm methods to retrieve the data and display it using javascript or something?

Any tips, or suggestions as to further reading would be much appreciated.

Warmly

Brad

@Brad that's a pretty broad question - I'm not sure anyone would be able to give you a complete guide here. However, a good first step would be to see if the CiviCRM Directory plugin fits your needs. It's not very well documented, but you should visit its Settings page (where you need to fill out API keys if you want mapping) and explore the "Directories" content type which the plugin creates.

Each "Directory" will allow you to use a CiviCRM Group as the source for the listings. Layouts can be templated in the usual WordPress manner of placing files in your child theme's directory to override the default markup. In combination with some CSS in your child theme, you should be able to get a long way towards your goal.


How to automatically generate DAO classes for my DB tables I have about 22 DB tables for my extension and more are coming in as I work on the extension, I need to be able to  automatically generate the DAO and BAO files to access these tables from my code, I followed this thread How do I add a new table to my extension? and it seems to be worked for the author of the post but I need more light on how generate the xml schema files if they can be generated and where do I run the xml/phpGencode.php  specified in the comment to get the DAO files.

Installing civix and generating Extension using civix is the correct way you can find more details in the below link
http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension

Or

For shortcut create an hook_civicrm_install and use the statement
 $sql = "CREATE TABLE ";
 $dao = CRM_Core_DAO::executeQuery( $sql );

The above code will do the trick - but always try to use the first method using civix


creating a Smartgroup out of post held in an organization I created an organization type called "Extension centers". Each extension center will have a post called President. I have already uploaded all the extension centers and the president details into CiviCRM. Now I would like to create a smartgroup of all the presidents. how do I go about it?

One solution. Create a new Relationship Type of 'President is/of'. Use that relationship to link your Presidents to the Extension Centres (can be done in bulk via Actions from a Search). Then do an Advanced Search using Relationships. Then save as a Smart Group.


When does civicrm-webform remove you from groups? If you use civicrm-webform, you can add civigroups to your form. You can choose 'user select' to have the user select one or more groups. In the form component, you can choose 'static' to show only a few of all possible groups.

So say you have two newsletter groups and two agegroups. You use the above method to only show the newsletter groups to existing contacts.

Will that remove the the contact from the agegroups if s/he fills out the form ?

Webform-CiviCRM will remove you from a group:

Only if you are logged-in or following a checksum (or otherwise selected as an existing contact)
Only if the group is presented on the webform as a checkbox/multiselect field and you deselect it.

In other words, the user has to make an active choice. Filling out the form as an unknown user, you're not consciously choosing to un check the box (it just defaults that way) so in that instance the module will only add, not remove you from groups.

BTW it works that way for all webform fields. The module will not delete any data from a contact record unless that contact has already been identified and the data was pre-filled on the form and the user made an active choice to erase it.


Can CiviCrm be used for membership and financial management? Can it be used for the following ?

each month a paper document is submitted to the Head Office of the non-profit; attendance, donations, finance. User wants all this to be submitted as a softcopy.

Currently data on the non profit is stored in the cabinet room but there is no database that allows convenient access to the data, i.e. allow access from all locations with internet connection. User wants all this data to be a conveniently accessed database.

Here are some additional responsibilities of the finance department

Maintain financial records,
organize and reconcile weekly collections, expenses, and receipt payments.
High level budgeting and comparing the budget with the actual financial condition of the nonprofit

The financial controllers wants the following

Identify who is sending the money
pay salaries electronically
Search function to find WHO is paying WHAT, and HOW much was paid.

The system must be able to sync all the departments, especially  the financial department so that any change;  deletion, addition,  or minimal adjustment to the data is seen by all and is accessed by all.

At core the software must be a collaborative instrument to help sections of a company operate well, and help companies in dissimilar locations behavior as If they are in the same location working on the same task in the same room with the same tools

You may need to use an accounting system such as Xero which has integration with CiviCRM to fully achieve the goals.

You can find some documentation about the integration here and here


What's the best way to handle a matching donation? We often receive annual appeal donations that include a matching gift from the donor's employer.  Is there a better way to handle these other than creating a record for the employer, and soft-crediting the match to the donor?

This is highly dependent on your development department's workflow - but I'd say what you described is the most popular approach.

If you do go this route, you may want to consider installing an extension I wrote called Auto Matching Gift.  It's mostly a labor-saver: When you enter the original gift, you select the Matching Gift organization from a list.  A pending contribution will be created on their record, and it will be soft-credited to the original donor.

Note that this was developed for an organization that pays for a service of all organizations that match gifts - so if you have to create the organization first, it's not much of a time-saver.  Hopefully one day I (or someone else) will improve it to allow adding organizations on the fly.


Configuring Repeated Events I can configure an event with regular repetition, and each instance stands as an isolated event.

Is there a way of configuring a series of related events, ie a course of n classes that users can sign up to x out of n classes.

Or would that be one event n weeks long with a price set field per class.

This is a speculative question, rather than searching for an immediate fix. I'm interested in if/how anyone else has configured events for similar scenarios.

So it looks like the answer is.... It Depends!

In CiviEvent Component Settings you can set the site to use an event cart functionality, so instead of a register button events have an add to cart option.

It looks like this applies as a blanket to all events on the site so I don't know if that's the right way forward here.

Or I could build webforms for courses, the event booking tools on webforms allow you to be incredibly fine grained and pull in event id's into the url's. So if i have 6 events as part of 1 course I can configure a webform per course.

I think this can get complicated quite quickly. Wil need to estabilish paramteres with client before attempting a test form.

Will the user be allowed to book other participants onto the same events?
If so, how many additional participants are you expecting the user to book on. (Looks like the webform maxes out at 9 participants per form)
Also looks like form settings expect contact 1 to be the payee and the main partcipant throughout. So payee has to be a participant.

And then will need to configure the payment screen.

Con's here it looks like the initial set up will take aaaaaaages. But once done we can clone for future courses, or use one central form and find a way of rewriting the url link to include specific event id's.


Give a Wordpress User Only rights to his clients and report first of all i want to say CiviCRM is a wonderful!!

I have a CiviCRM installation with a lot of clients in it. Also there are 20 users. I use a Wordpress bases installation of CiviCRM. And each user has his own report.

Now all the users can see all the reports, and can find all the sales of other users and so on..

Is there a way to give for example User_A only rights to see:
- The report of User_A
- The search results only from what has to do with User_A

The User_A has a Custom Field, with i filter on in the report to see.

I hope someone can give a good solution for this problem.

With Kind Regards,
Mark

You should be able to get what you need by using ACLs (Administer>Users & Permissions>Permissions (Access Control)). This will allow you to create roles, assign users to those roles and create ACLs to provide permissions for certain actions to those roles. You can assign access permissions on reports to specific roles also.

You will need to create some Access Control groups for your users and their clients to manage your ACLs. It will take a bit of planning but should be doable.

You should also assign your users a role in WordPress and assign them permissions on the CMS level.

There are details here: https://docs.civicrm.org/user/en/stable/initial-set-up/permissions-and-access-control/


Is it possible to print badges with priceset fields? I use civicrm 4.6.4 on drupal 7.38.
My event includes dinner with 2 meal types: fish and meat. Along with other options I created a priceset.

I'd like to define event badges (Administer>CiviEvent>Event Badge Layout>New Badge Layout) where the meal type is indicated on. However I didn't find any priceset fields in the list. Only event fees (not using pricesets) are available.  Is it possible to make pricesets fields visible on badges? How do I do that

Many thanks

Johan.

You could use hooks to create custom tokens:

http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+(and+Custom)+Tokens

Or you can see if the Fancy Tokens extension adds the tokens you need:

https://civicrm.org/extensions/fancy-tokens


Can webform be used to terminate one Case Role and create a replacement? Scenario:

A case has a Purchasing Partner role. Sometimes that needs to be changed and we want to do so via a webform (from a View with links containing whatever cid1 etc it needs).

My testing shows that if I try with just the cid1 (who is case client) and cid2 (who is existing PP) in the url and add a third cid for the new partner, when we submit the form we hope it will

terminate the Relationship between cid1 and cid2 (which seems to be how I can do this on a contacts record directly in civi itself and the only way i can approach this on the webform since there is no option to eg specify 'remove existing case role') and
create a Case Role for cid 3

the outcome is that

the original relationship between cid1 and cid2 remains untouched, and a new disabled (due to End Date) relationship is created between cid1 and 2
a new case role and relationship is created for cid 3

Should we be able to do this as webform code stands? Does adding the caseid=x help (i did test that but saw no difference)

This is not currently possible so I have opened issue here.


Error: Call to undefined function bccomp() in CRM_Financial_BAO_Payment::isPaymentCompletesContribution() CiviCRM 5.16.3
Event uses price sets

Background: We offered a $40.00 price set option for an event that later became free. We created a new price set option for $0.00, disabled the old one, and updated the registration to select the new one. After this, the contribution changed status to 'Pending Refund'. We click more > record refund, the refund due is $40.00, we enter the date, payment method, transaction ID, fee amount, etc. and click 'Record Refund'. The green triangle spins forever, nothing happens, and we do not see an error message in the Civi log viewer or in our error.log from apache. Suggestions for how to proceed?

Update - 9/6/2019. We can make a test contribution as 'Check' and it refunds without a problem. We also created another registration for this event, and paid by check, going through the same pattern, and it was unable to be refunded (same error). Thus, it does not seem to be limited to a payment processor error?

I followed this guide (https://docs.civicrm.org/dev/en/latest/tools/debugging/) and then enabled various forms of debugging and eventually got the page to display the error:

  Error: Call to undefined function bccomp() in
  CRM_Financial_BAO_Payment::isPaymentCompletesContribution() (line 545
  of
  /srv/www/www.biodynamics.com/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/Payment.php)

Apparently our PHP installation was missing the bcmath package which bccomp() needs. By installing the package via php7.1-bcmath we were able to then process the refunds accordingly. Did not see it here (https://docs.civicrm.org/sysadmin/en/latest/requirements/) but I could be missing something?


Does anyone have a working example for CiviMail bulk emails on Wordpress and 4.7.x Do you have a CiviCRM installation with bulk email working on the latest wordpress and CiviCRM 4.7.x, using a cron job set up in cPanel? I have been unable to get cli.php or wp-cli.php to work recently. The cron job fires without error but no email is sent. Cli.php with cron was working up to about 6 months ago or so, but we made the rookie mistake of upgrading CiviCRM... We would appreciate a step by step recipe to get this working again.

I found the problem. There was a breaking change in CiviCRM over the past year. We were just using the access CiviMail permission for the wordpress user used for sending bulk mail. But it turns out you now need 3 permissions. (I found this in a 3 year old forum posting.)

CiviCRM: view all contacts
CiviCRM: access CiviCRM
CiviMail: access CiviMail

Both of the following cron job commands work now. cli.php still works contrary to what I posted before -- and this is the easiest to use since you don't have to learn and install SSH or wp-cli.phar. Our wordpress system is on inexpensive shared hosting.

/usr/local/bin/php -d extension=phar.so /home/example/wp-cli.phar --user=CiviMailUser --url=http://example.org --path=/home/example/public_html civicrm process-mail-queue job.execute auth=0

/usr/local/bin/php -q /home/example/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -j -s example.org -u CiviMailUser -p password -e Job -a process_mailing


Embedding CiviCRM Event form in an Iframe I used to be able to embed CiviCRM forms in Iframes without issue.
Recently, I haven't been successful and getting this error:

Refused to display 'http://website.com/civicrm/event/register?id=2' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Drupal core is now protected against clickjacking by default:
https://www.drupal.org/node/2735873

You can install Security Kit module -> and then add specific allow-from domains.


How to delete a contact through the command line (CLI) How can I delete a contact through the command line?

If you're on Drupal and have drush installed you can do

drush cvapi Contact.delete id=17 skip_undelete=1


Add another position to a contact or enable fullt-text search for position field in CiviCRM running on WordPress I had to recognize that it creates problems when filling in two positions into the position field when adding a contact. The main problem is that you've got to type the exact name of the position when searching for a certain contact that's got that position. If this contact has got two positions, however, CiviCRM won't show that contact unless you search for both positions. Then, however, the search does not make any sense, since you would have to know all position of your contacts in advance...

Am I making a mistake here or is there a solution to that problem?

Thanks a lot for looking at this!
Best regards
Jannis

Edit: I am using the German translated version where the field 'position' is called 'Funktion'. So in an earlier version of this post it said 'function' instead of 'position'. Thanks a lot, @jitendrapurohit, for pointing at that problem! :)

You can use placeholders for this.

'%' for any number of characters
'_' for exactly one character

Searching for '%CEO%' will find all contacts that have that substring somewhere in their position field.


Using CiviCRM with Security Pro iThems plugin - page not found for contribution pages after SSL certificate loaded I'm running the security pro plugin, created by iThemes, as I do with many of my wordpress sites. One of my many security steps I run through is "Hide Login Area" however once changing the standard wp-admin directory it seems my CiviCRM plugin has difficulties processing secure SSL forms due to that plugin wanting to access the now non-existent "wp-admin" connection.

It comes to a not_found page and only started happening after the ssl certificate loaded and civicrm told to redirect contributions pages to ssl.

Is there a way to work around this in CiviCRM?

Check the URL set in CIVICRM_UF_BASEURL in your civicrm.settings.php matches the updated location of your site.

Protocol may now be https:// instead of http:// - I'm not familiar with Security Pro plugin; it may need to be improved to account for CiviCRM URLs also.

There's no harm in making the entire site SSL, which keeps configuration simpler ... just redirect all HTTP traffic to the encrypted URL.


What's the story behind the name 'CiviCRM'? Last week, we finally deployed CiviCRM in our organisation. Hurray! :-)

One of the questions I get from our users, is 'what does the civi in CiviCRM means'? And I have no idea.

Does anybody knows something about the name CiviCRM, about where it comes from?

The canonical explanation is that Civi comes from "civil society", ie " "aggregate of non-governmental organizations and institutions that manifest interests and will of citizens."

Over the years, I've heard various other explanations, one is that Dave and Lobo are extremely polite borderline canadian, so when they built a crm, they wanted it civil.

After the first civicon, at the end of a long night involving lots of tequila shots, I've heard a sinister plot that Dave is an 5-star general in the army that is going rogue and wants to take control of the UN. According to the legend, the cividog has fought back and protected the civilians. Those knowing Dave (or Scout) would take that explanation with a pinch of salt.


Cron not working after forcing https TL;DR: Does anyone know why forcing https would break CiviCRM's cron jobs?

A few days ago, I edited my .htaccess file to rewrite URLs to always use https, using the following code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

That change stopped CiviCRM from running its scheduled jobs (nothing being logged, emails not triggering, etc.). Running them manually still works.

The day this problem came to light, I changed the corresponding cron job URL to https instead of http. No change.

Subdomains with separate databases that don't force https are unaffected. "Force secure URLs" was on without incident before this problem started so I don't think that's a factor.

I'm running CivCRM 4.7.14 on Drupal 7.53.

Edits prompted by answers:

My OS is CentOS 6.9
Certificate has a clean bill of health
I configure my cronjobs via cPanel. The entry for this job, anonymized, is:

GET 'https://example.com/sites/all/modules/civicrm/bin/cron.php?name=actualname&pass=actualpassword&key=longhexidecimalkey'

The most likely causes for breakage with this change are:

Cron job is pointing to HTTP only

curl by default will not follow 302 redirects, while wget will. If you're using curl, it won't work automatically when pointed to the non-SSL URL (not without -L, anyway). The 302 redirect can make this less obvious, since everything else that points to http "just works".

(Your question says you've addressed that already, but I'm including this for others who face that issue.)

OS certificate chain does not recognise your new SSL cert

Another possibility is that curl or wget is rejecting the SSL certificate provided by your new URL. This can happen if the OS CA chain is outdated or misconfigured; it can also happen if your SSL installation is incomplete (and might not appear to be a problem if your browser includes CA components which your OS lacks).

Debugging further

I would:

Check if your OS has updates available to certificate authority certs (in Debian distros, package is ca-certificates).
Include in this question the output of the cron task you have configured.
Review (and include in this question) the webserver access logs for your cron task accessing CiviCRM.
Review your site's SSL against a service like Qualys SSLLabs and verify that the SSL configuration is good. (You don't need a perfect score - but this may make some issues visible.)

When doing so, make sure to anonymize the URL and sensitive data like API keys, as you've done in your initial .htaccess snippet.


Check custom data field value change to trigger activity status change How would you recommend to check data change (with pre and post values) on a custom field (attached to a case) and then to mark an activity in that case as completed?

I have looked at hooks like hook_civicrm_custom and the _pre/_post hooks, but having difficulty getting this to work.

Thank you!

I am not sure if it can already do exactly what you want, but my advice is to first look at the CiviRules extension.

https://civicrm.org/extensions/civirules


Warning: in_array() expects parameter 2 to be array, null given in CRM_Event_BAO_Event::checkPermission() (line 2053 of BAO/Event.php) Running into a crazy error that came to me out of the blue. I have a simple page with a few views showing CiviCRM entities.

When I view this page as an administrator, or as the user showing the warning, everything looks and works just fine.

The issue is that the non-administrative users get this blaring error and I can't seem to figure out why...

Any ideas as to what permissions issue this might be?

Cheers!

Warning: in_array() expects parameter 2 to be array, null given in CRM_Event_BAO_Event::checkPermission() (line 2053 of /public_html/sites/all/modules/contrib/civicrm/CRM/Event/BAO/Event.php).
Warning: in_array() expects parameter 2 to be array, null given in CRM_Event_BAO_Event::checkPermission() (line 2053 of /public_html/sites/all/modules/contrib/civicrm/CRM/Event/BAO/Event.php).
Warning: in_array() expects parameter 2 to be array, null given in CRM_Event_BAO_Event::checkPermission() (line 2053 of /public_html/sites/all/modules/contrib/civicrm/CRM/Event/BAO/Event.php).

This is likely due to trying to pull a view to a user that isn't allowed to see it. Can you restrict access to those views to only the user and admin user so that other users can't see the views?

If that isn't the intensional effect, check the following permissions:

views permission (in the views settings)
CiviCRM permissions (in People > Permissions on the Drupal side)
block permissions (in the block settings)
permissions on any custom fields that the view uses (in Drupal or in CiviCRM profiles)


Error on CiviCRM Activation. Can't Install CiviCRM I’m trying to install a new copy of CiviCRM for Wordpress on Plesk Onyx. I get the following error when I try to activate CiviCRM after uploading the files to my server:

Warning: require_once(CRM/Core/ClassLoader.php): failed to open stream: No such file or directory in /var/www/vhosts/ruinsideca.org/infoportal.ruinsideca.org/wp-content/plugins/civicrm/civicrm.php on line 877

Fatal error: require_once(): Failed opening required 'CRM/Core/ClassLoader.php' (include_path='.:/opt/plesk/php/7.2/share/pear') in /var/www/vhosts/ruinsideca.org/infoportal.ruinsideca.org/wp-content/plugins/civicrm/civicrm.php on line 877

I don’t know why this error is happening or how to fix it. I’ve never come across something like this before. As a result, I can't even install CiviCRM on my server.

I'm running PHP 7.2.22, Wordpress 5.2.3, and CiviCRM 5.17.3.

Thanks for your help

Same happened to me. On installing new test CiviCRM under WordPress. The "CiviCRM Contribution Page Widget" plugin caused same error. Civi 5.27.1, WP 5.4.2,  php 7.2.24 on ubuntu 20.04 LTS


Can I use CiviRules to send a notification to the administrator when an email gets bounced? Often when sending bulk mailings, a few addresses will bounce, for various reasons. these bounces are not very noticeable. In many cases the on hold flag doesn't get turned on, but in many cases it is important that some admins are alerted.
I'mnot too familiar with Civirules, but was wondering whether it could be used to send an email notification to admins whenever an email gets bounced from a bulk mailing, pointing them to the contact/s in question.

I don't think you can do this (at least without development). Most significantly, there isn't any trigger from within the bulk mail system in Civirules so you would not be able to catch the bounces that don't put the email on hold. I suspect that adding that functionality would be very difficult as I doubt that these email bounces go near the sort of things that Civirules for a trigger. There isn't even an option to catch the change to email on hold. The trigger "contact changed" with the condition "field value comparison" doesn't off the email on hold status as option, though I think adding this would be relatively straight forward if you want to write some code.


Problem with upgrade to 4.7.0 (Wordpress 4.4.2) I recently upgraded our site to 4.7.0. The upgrade seemed to go well, but now there is a problem when starting it up fresh.

The first time I try to start it, the initialisation seems to get lost in an infinite loop in the routine .../civicrm/civicrm/CRM/Utils/File.php on line 680. Using a debugging statement, it seems to be looking for the file pattern "info.xml".

The weird thing though is, that it starts OK if one tries for a second time without closing the browser.

What could the issue be? I have done no special customisations to my installation (as far as I know)

David, I've seen a few things with the 4.7 upgrades on WordPress that made me double-check the clearing CiviCRM cache's and the browser caches.  It hasn't always been apparent that it's been vital in the past, and I'm sure I've been sloppy with it.  Is that what you are experiencing?


Signing up for an event returns 500 error I am using CiviCRM version 5.13.4 on Drupal 7. PHP version is 7.1.

When trying to sign up for an event, once the continue button is clicked to confirm the registration, the page loads for a minute or two and then returns a 500 Internal Server Error.

The person does get signed up for the event but they don't receive a confirmation email which is causing issues as they try and register multiple times which creates duplicate bookings.

Before clicking the continue button, this warning appears:

Warning: A non-numeric value encountered in CRM_Event_Form_Registration_Confirm->buildQuickForm() (line 264 of /public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php)

We are also getting this notice a lot although I'm not certain it's related:

Notice: Undefined offset: 0 in CRM_Grant_BAO_Query::where() (line 116 of /public_html/sites/all/modules/civicrm/CRM/Grant/BAO/Query.php).

My guess is the first warning is the one to take notice of so I've put a little bit of the code below that may be of use which includes line 264 for reference (the middle line in the snippet):

/*CRM-16320 */
      $individual[$k]['totalAmtWithTax'] = $this->_amount[$k]['amount'];
      $individual[$k]['totalTaxAmt'] = $individualTaxAmount + $v['tax_amount'];
      $this->_totalAmount = $this->_totalAmount + $this->_amount[$k]['amount'];
      if (!empty($v['is_primary'])) {
        $this->set('primaryParticipantAmount', $this->_amount[$k]['amount']);

Any advice would be greatly appreciated, feel free to ask any follow up questions for clarification!

So after much digging, I found it was due to Civi trying and failing to send an PDF receipt.

After disabling this in Administer > System Settings > Misc (civicrm/admin/setting/misc?reset=1), the error resolved, the 500 Internal Server Error disappeared and the emails started sending with the email receipt instead of the PDF.

Attach PDF copy to receipts: No


Multiple Participants data entry on event not working I have an event setup to allow registration of multiple participants but the participant number drop down does not show

The following html is within the page so ought to show
<select onchange="allowParticipant()" name="additional_participants" id="additional_participants" class="crm-form-select">
    <option value="">1</option>
    <option value="1">2</option>
    <option value="2">3</option>
</select>

I have tried on multiple themes
Php 7.3.27
Civicrm 5.36.0
Drupal 7.78

Eventually I discovered a {display:none} css style in a custom.css that was being applied to this field


installation canary Error Message upon installation Can someone help me figure out what is going wrong?  thanks]1

update:  this is what it says inside the php file manager: public_html/democratizetheentperprise/wp-content/plugins/civicrm/civicrm/civi/core/installationcanary.php

what do I do with it?

http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
 */

namespace Civi\Core;

use Civi\Core\Event\SystemInstallEvent;

/**
 * Class InstallationCanary
 * @package Civi\Core
 */
class InstallationCanary {

/**
   * Check whether the install has run before.
   *
   * Circa v4.7.betaX, we introduced a new mechanism for tracking installation
   * and firing a post-install event. However, it's fairly difficult to test the
   * edge-cases directly, so this canary should fire if there are any problems
   * in the design/implementation of the installation-tracker.
   *
   * This should not exist. It should be removed in a future version.
   *
   * @param \Civi\Core\Event\SystemInstallEvent $event
   * @throws \CRM_Core_Exception
   */
  public static function check(SystemInstallEvent $event) {
    if (\CRM_Core_DAO::checkTableExists('civicrm_install_canary')) {
      throw new \CRM_Core_Exception("Found installation canary. This suggests that something went wrong with tracking installation process. Please post to forum or JIRA.");
    }
    \Civi::log()->info('Creating canary table');
    \CRM_Core_DAO::executeQuery('CREATE TABLE civicrm_install_canary (id int(10) unsigned NOT NULL) ENGINE=InnoDB');
  }

}

The message itself gives a quite bit of info that the installation wasn't done correctly or there would be something missing from the process. Make sure you followed the docs correctly while installing CiviCRM.

I've seen this on doing a page relaod while the installation is still in progress.

If you think the process is done correctly and just want to get rid if this error - try deleting civicrm_install_canary table from the database and reload the page.


Why does the mailer processQueue method 'shuffle' the array of possible locks? https://github.com/civicrm/civicrm-core/blob/a2976e7c0c2515379e98ee9b5ebcf51acde4e540/CRM/Mailing/BAO/Mailing.php#L2867

  $lockArray = range(1, $mailerJobsMax);
  shuffle($lockArray);

  // check if we are using global locks
  foreach ($lockArray as $lockID) {
    $cronLock = Civi::lockManager()->acquire("worker.mailing.send.{$lockID}");
    if ($cronLock->isAcquired()) {
      $gotCronLock = TRUE;
      break;
    }
  }

Why do we randomise the order of the array using shuffle()? Is there a good reason for doing this?

I don't know the original authors' intent but can find some background and share a theory:

Background: To figure out the origin of some code, it sometimes helps to spot-check the branches in the old Subversion repository. This can require a bit of digging (to trace through incidental merges and cleanups in the history), but ultimately the shuffle() originated in r35243 and CRM-8460. Alas, there's no commentary in there about this detail. You could ping the original author.
Theory: Statistically, shuffling reduces the number of lock-acquisition attempts in one typical scenario. Suppose you're starting up a bunch of workers at the same time. (Maybe you're starting 5 workers, but you've set a limit of 10 workers.) Compare what happens with and without random polling order:

(Without shuffle()) When worker #2 starts and tries its first attempt at lock-acquisition, there's a 100% chance of failure, so it will have to do a second lock-acquisition attempt. Similarly, when worker #3 starts and tries its first lock-acquisition, there's a 100% chance of failure.
(With shuffle()) When worker #2 starts and tries its first lock-acquisition, there's 10% (1/10) chance of failure. Similarly, when worker #3 starts, there's a 20% chance.

Now, even if we accept this theory, it might not amount to much. In a typical Civi deployment, you have a single server with maybe 1-10 workers, and locks are acquired infrequently. The total overhead isn't very high (esp. in comparison to the work being done). However, if one had thousands of workers, or if the communications channels were slow, or if you had to acquire the locks frequently (every second), then it would add up... so it wouldn't be surprising if some folks viewed it as a generally good practice to shuffle when polling.


first CiviCRM request of each session takes 4 minutes, afterwards works fine I have an issue where the first CiviCRM request of any session takes 4 minutes to load.  This can be a request for the dashboard, or an administrative screen, it doesn't matter.  There are no errors on screen and no errors appearing in the CiviCRM runtime logs. The first pageload simply takes four minutes, then everything works fine -- until the user logs out, and logs in again. Then the first request takes another 4 minutes.

I've been trying to research this and have come across several other questions that are relevant but don't exactly match my situation (Slow to open at first daily use, https://civicrm.stackexchange.com/questions/12886/civicrm-dashboard-hangs-for-5-minutes?rq=1,https://civicrm.stackexchange.com/questions/14343/civicrm-dashboard-hangs-for-5-minutes-part-2?noredirect=1&lq=1)

Based on info in the many answers, I've discovered the following:

removing all dashlets/reports from the dashboard doesn't improve speed.  Dashboard still takes 4 minutes to load -- but so do the other requests (except, strangely, for searches, which load right up)
hosting provider has confirmed we don't have a NAT Fire setup and that internal requests should be working normally
database doesn't seem to be the issue because 1) it's not maxed out, and 2) 2 concurrent sessions making the same requests one after the other exhibit the same behavior

I'm pretty sure this is an environment problem, because I have two CiviCRM installs on the same server which are exhibiting the same behavior (two different versions: 4.7.24 and 4.7.29). Clones of these environments do not have this problem on my local test servers.

It smells like a timeout, but I just can't for the life of me figure out where to start looking for what is timing out, and why only on the FIRST request of a session!

Seen in two installs of CiviCRM on the same server:

1st: Joomla 3.6.5, CiviCRM 4.7.24, PHP 5.6
2nd: Joomla 2.5.28, CiviCRM 4.7.29, PHP 5.6

I had a lot of trouble tracking down a problem that sounds the same. We ARE behind a firewall so pingbacks to CiviCRM etc WILL timeout. The last piece of the puzzle (once normal version checks were disabled) was adding this to civicrm.settings.php

global $civicrm_setting;
  $civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = FALSE;


Sending a CiviContribute form that's not coming from a standard donation page I'm contemplating building my own donation page completely, to have full control over the look and feel. The page should send a donation form to the civicrm server that includes the same form fields as the standard donation page does.

Could someone tell me if this approach is viable? Or am I bound to run into problems at some point?

I am especially interested if the form must include some special codes (in hidden form fields) that I would have to generate myself when creating the custom donation page.

There IS a viable approach to this, but I don't think it's quite what you're imagining.  Sending the form fields to CiviCRM isn't going to load the CiviContributionPage session object, where much of the data is stored.

Approaches you could take include:

Use template overrides to change the template.  It sounds like you've explored this approach.
Build the form using Webform-CiviCRM integration, which gives you much greater control over the look and feel.  This requires Drupal.
Modify the existing template's HTML after it's rendered using hook_civicrm_alterContent.
If none of these will satisfy, instead of submitting all the same form elements, instead use the Contribution API to submit your values.

Check out the Simple Donate extension as an example of folks who took the last approach.  They're using AngularJS, so the other options weren't on the table for them.


How do I set text width in CiviMail? I have centered text in a mailing that I'm setting up. The line length is too long for easy readability. How do I set up a maximum text width? Here's how it looks now:

Insert a table with one row and one column and choose the desired width of the column when creating the table. Paste your plain text into the table - not an image with text, which will not appear correctly in some e-mail programs.


Civicrm - Use profile create mode only works 50% of the time I'm using CiviCRM 4.6.10 with Joomla 3.4.8

I have a profile form setup for public view for volunteers to register.

50% of the time the form works great, submits the new contact to the database, sends an email, and forwards the submitter to the thank you page.

The other 50% of the time, once submitted, it does not send an email, does not submit the contact to the database and does not forward to the thank you page. It actually just redirects to the main page of the website.

Does anyone have any idea why this might be happening? It seems pretty random. Any help would be appreciated. And of course let me know if I left out any essential details.

Thank you in advance for your help!

I was actually able to correct this issue. The problem was: if someone accessed the site with www. in the url it worked fine. If they did it without the www, the form would not submit, but also gave no error.

On the registrar end, I just had it redirect traffic that does not enter www. to the site with www.

I hope that's clear. Thanks


Unable to hide PHP 'notice' warning We are moving our CiviCRM site over from Drupal to Wordpress.  We have this fully working on our developer's server (nginx), but on our live server (Apache), we see an error when loading some CiviCRM pages.

Notice: Undefined index: path in /var/www/etcetcetcetc/wp-content/plugins/civicrm/civicrm/Civi/Core/Paths.php on line 200

You can see the error at https://culturalenterprises.org.uk/?page=CiviCRM&q=civicrm%2Fevent%2Finfo&id=285&reset=1

It also appears on some back end screens (attached below).

I have asked our developer to look into what is causing the error in the first place, but I am also completely unable to prevent display of the 'notice' error.

In wp-config.php I have:

ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

In civicrm.settings.php, I have added:

ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );

In php.ini, I have set:

display_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

And I have also tried disabling all plugins other than CiviCRM in case one of them is overriding these settings.

Debug is off in CiviCRM settings, and it is 'Production' mode.

Is there anything else I can do!?

Thanks

CiviCRM 5.13.4
Wordpress 5.2.1

Resolved it - it was an ancient and unused bespoke CiviCRM extension. Disabling it solves the problem.


CiviMembership not on Administer Menu My CiviCRM does not seem to have CiviMembership. It is not listed on the administer menu on the top menu.

How do I proceed if I want to use CiviMembership?

Go to administer > system settings > components and enable it.


How can I integrate custom fields in CiviCRM? Is there any way to integrate custom fields in the CiviCRM. If yes how can Integrate the fields in the CRM? as I am having a Bulk SMS service website I want to add some custom fields in the CRM

Under the "Administer" menu there is a "Customize Data and Screens" option. You can add custom fields there.

In future I recommend searching through the menu before posting :)


Does CiviCRM work with Ninja Forms? In wordpress, when setting up a ninja form text block I get the following error. It shows up next to the "Add Media" button so I assume that it is trying to add a Civicrm button and fails.

  Notice: Trying to get property of non-object in /var/www/wordpress/wp-content/plugins/civicrm/includes/civicrm.shortcodes.modal.php on line 170 Call Stack: 0.0000 239040 1. {main}() /var/www/wordpress/wp-admin/admin-ajax.php:0 0.1404 4172272 2. do_action() /var/www/wordpress/wp-admin/admin-ajax.php:89 0.1404 4173800 3. call_user_func_array() /var/www/wordpress/wp-includes/plugin.php:503 0.1404 4173944 4. ninja_forms_new_field() /var/www/wordpress/wp-includes/plugin.php:503 0.1940 4190192 5. ninja_forms_return_echo() /var/www/wordpress/wp-content/plugins/ninja-forms/includes/admin/ajax.php:193 0.1940 4207304 6. call_user_func_array() /var/www/wordpress/wp-content/plugins/ninja-forms/includes/functions.php:7 0.1940 4207768 7. ninja_forms_edit_field() /var/www/wordpress/wp-content/plugins/ninja-forms/includes/functions.php:7 0.1941 4207952 8. do_action() /var/www/wordpress/wp-content/plugins/ninja-forms/includes/admin/edit-field/edit-field.php:6 0.1941 4209592 9. call_user_func_array() /var/www/wordpress/wp-includes/plugin.php:503 0.1941 4209760 10. ninja_forms_edit_field_output_li() /var/www/wordpress/wp-includes/plugin.php:503 0.1958 4214568 11. nf_output_registered_field_settings() /var/www/wordpress/wp-content/plugins/ninja-forms/includes/admin/edit-field/li.php:123 0.1987 4218784 12. ninja_forms_edit_field_el_output() /var/www/wordpress/wp-content/plugins/ninja-forms/includes/admin/edit-field/li.php:419 0.1993 4221088 13. wp_editor() /var/www/wordpress/wp-content/plugins/ninja-forms/includes/admin/edit-field/edit-field.php:132 0.1995 4230840 14. _WP_Editors::editor() /var/www/wordpress/wp-includes/general-template.php:2565 0.2024 4238472 15. do_action() /var/www/wordpress/wp-includes/class-wp-editor.php:222 0.2096 4250120 16. call_user_func_array() /var/www/wordpress/wp-includes/plugin.php:503 0.2096 4250272 17. CiviCRM_For_WordPress_Shortcodes_Modal->add_form_button() /var/www/wordpress/wp-includes/plugin.php:503 0.2096 4250344 18. CiviCRM_For_WordPress_Shortcodes_Modal->post_type_has_button() /var/www/wordpress/wp-content/plugins/civicrm/includes/civicrm.shortcodes.modal.php:101

It prevents the text field from being saved in the form.  In this case I don't need any civicrm processing in the form so it does not need to be there but I don't know how to remove it.  Has anyone dealt with this before?

Versions: Wordpress 4.3.1, Civicrm 4.6.8, Ninja forms 2.9.28

Fixing this will require a change to the Civi-WP plugin. In the meantime, put the following code on a new line below the one that reads $screen = get_current_screen(); which should be at line 164 of 'civicrm.shortcodes.modal.php'.

if ( ! isset( $screen->post_type ) ) return;

That should mean your fields are saved again.


Can my extension know when other extensions become enabled or disabled? My extension makes reports based on the Civisualize extension. I'd like to make dashlets out of the reports, but I only want it to be available when Civisualize is also enabled.

It's easy to see if Civisualize is already enabled when my extension becomes enabled, but I don't see a way to find out when Civisualize becomes enabled or disabled after my extension has become active.

My extension does not depend on Civisualize, it works perfectly without, but it only gives some extra nice reports.

So I would like to use some kind of hook_extension_enabled which will be fired when other extensions become enabled so I can add my dashlets to the system when Civisualize becomes active and remove the dashlets when it gets inactive.

Looking at the Civi API Explorer, you could reference the Extension entity.

The help text for the Key parameter (API explorer uses full_name in the code) says "Fully qualified extension name". If you got the Key parameter full_name="eu.tttp.civisualize", you could load your dashlets conditionally based on whether CiviVisualize is enabled.


Problem with CiviRules 2.13 Field Value Comparison I am running on CiviCRM 5.21.1, and have just upgraded CiviRules from 2.11 to 2.13.

I have several Rules which test for the Type of a Contact by using e.g. "Field Value Comparison  Contact.contact_type=Individual"

After the upgrade this rule does not fire, and the Condition appears on the Rules Management screen as "Field Value Comparison  Contact.contact_type=".  If I try to recreate the condition I get the same result, and I can see no other way of making this test.

I will have to stay on CiviRules 2.11 until this is fixed.

Tony

Try after applying patch from here on latest version of rules.


How can I move my Form Processor configuration between two sites and/or reorder my actions? I see an Export link when I go to Administer menu » Automation » Form Processors, but it seems like you need to write an extension to move the form between sites.  Is this my only option?
As a related question, can I reorder my actions?

An alternative method for quick copies is this:

Press the Export button.  Save the resulting JSON text to a file.
Copy the file to the new server.
Go to Support menu » Developer » API Explorer v3.
Select an Entity of FormProcessorInstance and an Action of Import.
In parameters, set Specification File to the absolute file path (on disk) to the JSON file.
Press Execute.  Note the value returned for new_id.

To break the connection to the file (so it can safely be deleted), remove the source_file value for the corresponding record using the new_id above:

In API Explorer, change the Action to Create.
Set ID to the new_id value from above.
For your second parameter, select Other and enter source_file for the name.  Leave the value blank. See screenshot below.
Press Execute.

Reordering actions
You can export your form processor as above, and manually edit the JSON to reorder your actions.  Be careful about putting actions below another action that depends on its output.  Once you're happy with your edits, import per the instructions above.


Configuring cron using wp-cli on local server with Mamp Pro I'm testing CiviCRM 4.7 in a WordPress 4.4.2 installation. I'm running this on a local server with Mac OSX 10.11.2 using MAMP Pro.

I'm trying to configure cron using the wp-cli method. I've installed, renamed and moved wp-cli and running wp --info in /Applications/MAMP/bin gives

PHP binary: /usr/bin/php
PHP version:    5.5.30
php.ini used:
WP-CLI root dir:    phar://wp-cli.phar
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 0.22.0
Phils-MacBook-Air:bin phillip$

wp help shows the WordPress commands

I'm now trying to implement

/path/to/wp --user=<cron> --url=<http://example.com> --path=</path/to/wp> civicrm api job.execute auth=0

In my case I'm trying

/users/phillip/Sites/thetestsite.dev --user=<philnicholl> --url=<http://thetestsite.dev:8888> --path=</users/phillip/Sites/thetestsite.dev> civicrm api job.execute auth=0

but I get

-bash: philnicholl: No such file or directory

(philnicholl is my WordPress administrator username)

I know I'm missing something obvious.

I'm have experience with WordPress and Mamp Pro but am new to both CLI and CIVICRM. Any help would be much appreciated.

Thank you.

Here's an example wp-cli command I use that works:

/home/ubuntu/wp-cli/wp-cli --require=/home/ubuntu/wp-cli/civicrm.php --path=/var/www/wordpress civicrm api job.execute > /dev/null

I hope that helps!

UPDATE: I see your problem!  "/path/to/wp" means, "path to wp-cli, including wp-cli".  I completely looked past that part at the beginning, since that's not generally where the problems are found.

Usually, "wp-cli" is aliased to "wp" so it can automatically include the CiviCRM extension - but with cron, I usually just use the require directly.

So log into your computer and type which wp-cli.  Let's say it returns /usr/bin/local/wp-cli.  Replace ONLY the first path to WP with that, so it looks like:

To forestall your next question about why it doesn't work - the  is a placeholder, and the angle brackets should NOT be included in the actual statement.  Angle brackets are a common way in documentation of command-line programs to say, "insert your value here".  So instead of <philnicoll>, just write philnicoll.

You should be left with something like:

/usr/bin/local/wp-cli --user=philnicholl --url=http://thetestsite.dev:8888 --path=/users/phillip/Sites/thetestsite.dev civicrm api job.execute auth=0


How can I provide mailing receipients an "Unsubscribe All" option? When recipients click "Unsubscribe" in my mailings, it takes them to a page where they can unsubscribe from every group the mailing was sent to. Is there a way to let them opt-out of one and not the other, and also is there a way to let them opt-out of all future mailings? Sorry if this is listed somewhere. I've searched and looked in the docs but haven't come across this.

There is no built-in "Unsubscribe All" function in CiviCRM, though there is a User Opt Out option from CiviMail, as well as a Do Not Email setting.
Unsubscribe
The unsubscribe link is provided by the {action.unsubscribeUrl} (URL) or {action.unsubscribe} (email) tokens.
The unsubscribe email, even if not provided as a token in the message, is supplied in the email headers as the List-Unsubscribe  address. Someone who unsubscribes by email is removed from every list used to send the message. For example, if you send a newsletter to two groups, Donors and Volunteers, and joe@example.net is on both, Joe would no longer receive messages from either Donors or Volunteers.
More commonly, people would click on the unsubscribe link, and be brought to a confirmation page to be asked

Are you sure you want to be removed from the mailing list(s) shown below …
You are requesting to unsubscribe this email address

The confirmation is in place to prevent accidental removals when people follow the link from forwards or replies. If confirmed, the contact is not deleted from the Group, but their group status is changed to Removed.
As of 4.6.5, there appears to be no way to unsubscribe from all groups at once, nor even to pass individual group IDs to the unsubscribe, unlike subscribing where group IDs can be passed to {action.subscribeUrl} as {action.subscribeUrl.gid}. On Drupal, it might be possible to handle subscriptions using Webform CiviCRM Integration and a bit of jQuery to select/unselect multiple checkboxes.
Because unsubscriptions are on a list-by-list basis, people unsubscribing from all current lists would not prevent them from being added to any newly created lists.
Opt-out
In contrast to the unsubscribe options, a user Opt Out ({action.optOutUrl} or {action.optOut} tokens) does not affect group membership status; it is an independent field on the contact itself. Contacts which have NO BULK EMAILS (User Opt Out) selected will be removed from all CiviMail mailings. So if you add the contact to any new mailing lists you create in the future, they will not receive messages from those lists, either.
The confirmation message for an opt-out link is different from that of an unsubscribe link:

You are requesting to opt out this email address from all mailing lists

There is no way to prevent an opt-out, though that feature has been requested in the past.
Do Not Email
A third option, which I believe can only be set by an admin or through a custom setup, not only prevents the distribution of CiviMail to a contact, but prevents an admin from sending a direct message as well.


Missing payment fields on membership renewal Hi,
for some reason the fields for payment of the renewal of membership are missing.
Is it something with configuration?
Version is 4.7, but the issue was there even before the upgrade
br,
M

In the screenshot the "membership organisation and type" field is empty.  Did you blank it out or have you disabled the relevant membership type?  Without  a membership type with an associated fee there won't be any payment fields.


Clean install on WordPress and blank dashboard After install on WordPress I am getting a blank dashboard and the "configure dashboard" button doesn't do anything. I tried deactivating all plugins except CiviCRM, that made no different. Any ideas what I should look at? All the settings seem to be correct.

I experienced something similar (not sure if the same situation), but I solved it checking database credentials and domain  in civicrm_settings.php on wp-content/uploads/civicrm, may you could check if so.


Install problem civicrm with wordpress Using civicrm 4.7.0 on the latest wordpress.
could not setup cron to run scheduled jobs because the settings file is missing.  did a fresh install of wordpress in a different path on the server and a fresh install of civicrm to try to see if it would create a settings file after the installation steps were complete.  it did not.

so i took the settings template file and created a settings file from that by hand, then with that in place it is possible to setup cron for scheduled jobs.

now, when i go to the civicrm dashboard nothing is displayed and the civicrm menubar in wordpress is missing.  i can make it work again by deleting my settings file but then cron doesn't work.

do you have any suggestions what in settings would cause civicrm not to work but cron to work?  thanks in advance.

In looking at this further, it appears on any external call or via cron, in version 4.7.0 CiviCRM looked for the settings file ONLY in the directory wp-content/plugins/civicrm if the CMS was WordPress.

In 4.7.1, this was changed to look in both '//uploads/civicrm' and '//plugins/civicrm'

Therefore on 4.7.0 with the civicrm.settings.php file in wp-content/uploads/civicrm you could get the failure on cron that you describe.

I would try updating to CiviCRM 4.7.1


Membership contribution page leads to "Not found" error When setting up a membership contribution page the Test Drive works fine - including successful adding of test members. The link to the Live Page leads to the server responding with a "Not found" error. Not sure where to look...
Using  CiviCRM 4.6.8. on a hosted Wordpress 4.4.1.
Regards - Stefan

Most likely, if the test drive page is working and the live page is failing, your CiviCRM base page isn't set up yet.  On Civi 4.6, this is supposed to happen automatically, but either a) you upgraded, or b) I've seen plugins that interfere with the alias naming process.

In CiviCRM, go to Administer menu > System Settings > CMS Database Integration.  Note the "Wordpress Base Page" setting.  Next, in Wordpress, go to Pages > All Pages.  Make sure that page exists.

Last time I had a plugin interfere with the naming process, Civi had created a base page called "CiviCRM", but I had to go in and manually edit the permalink to match the base page setting.

Hopefully this clears up your issue!


Is there a way to use css pagination / repeating elements with dompdf? Is there a way to use css pagination with the current version of dompdf shipped with CiviCRM? Like:
@page :footer {content: "page " decimal(pageno);}

The issue is that I want some content that is repeated on every page. In a dompdf issue on Github it is claimed that using fixed positioning is another way to achieve this. But we have tried this solution in CiviCRM PDF templates and it does not have that effect.

The dompdf in civi is the latest 0.8.6. If you're asking if dompdf itself supports pagination, I don't know offhand - that would be a dompdf question.


How to check if DB table exists? Is there a built-in way to check to see if a DB table exists via PHP? I'd like to add that to my API call and create the table if necessary.

Thanks!

There is a specific CiviCRM function (but all the ways in the other answers will be just as good :-)):

CRM_Core_DAO::checkTableExists($tableName)

This function will return TRUE or FALSE.


How to code a handler for  HTTP requests? I've managed to add a tab to "My Contact Dashboard". The way I did this was by adding my extension using civix and then a hook_civicrm_tabset hook to my extension.

Now, the URL that my tab button is pointing to is civicrm/contact/view/someaction?qstr. The Contact dashboard is making an AJAX request when I click on a tab button, and the server then returns the HTML code for that tab. But since I haven't added any code for that URL/action yet I'd expect either an error response or some default page. (It seems CiviCRM takes the default page action, civicrm/contact/view/someaction?qstr seems to return the same as civicrm/contact/view?qstr)

Can anyone tell me how to make my extension return the HTML for my newly created tab? Should I implement a hook for this somewhere? Or something else? Or perhaps register a route for civicrm/contact/view/someaction? I found https://wiki.civicrm.org/confluence/display/CRMDOC/How+to+Create+Your+Own+Action ("How To Create Your Own Action") which seems to be pretty close. But it says CiviRules module is required, and an optional module for this(adding my own action)..well, it seems sort of far fetched.

It seems CiviCRM takes the default page action, civicrm/contact/view/someaction?qstr seems to return the same as civicrm/contact/view?qstr

Civi's router uses a fallback search. (The wisdom of this can be debated elsewhere - I'm just reporting facts.) For example, if you request civicrm/foo/bar/baz, then it will look for the routes in this order:

civicrm/foo/bar/baz
civicrm/foo/bar
civicrm/foo
civicrm

The first matching route will handle the page-request.

  Or perhaps register a route for civicrm/contact/view/someaction

If I understand correctly, I believe this is what you want.

Since you mentioned civix, look at Create a Module Extension for instructions to "Add a basic web page". It describes the command civix generate:page <ClassName> <web/path>, which will generate scaffolding for a new route.

Aside: When I first read the title, I interpreted the question to mean "How code different handlers for (GET/POST/PUT/DELETE) HTTP requests?" In case that really is the question: Civi's router doesn't distinguish between HTTP verbs. You can just define one route and then use something like switch($_REQUEST['REQUEST_METHOD']).


Drush sql-sync and civicrm issue I wanted to quickly pull all the data (contacts, custom types, etc) from one Drupal CiviCRM install to another.

I got a little too clever for myself and used Drush sql-sync to do it. It failed. As I was in a hurry and it seemed to be a permissions issue I re-ran the import as the DB root. This worked, and the site appears to work fine. However, Drush sql-sync now always fails when I try to pull from live to staging or to dev servers.

After much digging I realised the original sql query included a number of triggers related to the user of the copied website, eg:

 1156 DELIMITER ;;
 1157 /*!50003 CREATE*/ /*!50017 DEFINER=`source_user`@`localhost`*/ /*!50003 TRIGGER civicrm_activity_before_insert before insert ON civicrm_activity FOR EACH ROW BEGIN
 1158 SET NEW.created_date = CURRENT_TIMESTAMP;
 1159  END */;;

I assume I want to change these entries, is there a "safe" way to go about that?

Is the presence of these bad for the site?

The source_user has no grants on the new site.

There are at least 60 or so references to the database user in civiCRM related triggers and definitions.

As an aside, Why does civi need to do this when there is a settings file?

Civicrm utilises sql triggers for a number of purposes - including but not limited to populating values into the log_civicrm_% tables - if you have logging turned on under Admin -> System Settings -> Misc

You can't alter triggers. Easiest to dump the database then strip out triggers using the following perl

perl -pi -e 's#\/\*\!5001[7|3].*?`[^\*]*\*\/##g' /path/to/mysqldump.sql

by way of Jon G and Chris Burgess on Why do I get "Access denied; you need (at least one of) the SUPER privilege(s) for this operation" when importing a SQL dump to CiviCRM?

after you import Civicrm will rebuild triggers as needed.


Is civicrm-buildkit safe to use in production? Background: I am recreating our CiviCRM installation on top of Drupal inside a Docker container. After a significant amount of research, I have decided to incorporate the best parts of civicrm-docker and the official Drupal Docker container. However, before I progress too far down this road, some questions came up.

Q1: Is it sensical to run a production site that has been built using civicrm-buildkit?

Q2: What is the update procedure for a civicrm-buildkit build?

Q3: Should Drush be used instead of civicrm-buildkit?

Q4: (open ended) Does anyone have experience they would like to share?

I will keep an eye on this thread, but if anyone would like to chat realtime, I can also be found in IRC.

Thanks!

Buildkit is not designed for production use but I can't think of any reason it can't be used that way. As your second question suggests, the upgrade procedure will indeed be different. Steps for upgrading on a buildkit install would be:

Backup your database
Do a git checkout tagname && git pull for all 3 git repos (civicrm-core, civicrm-packages & civicrm-yourcms).
Run setup.sh with the correct arguments to regenerate code and download dependencies.
Run the upgrader (can do this from the command line as well)

You'll probably want to create a little script to do this for you.


Drop down labels on front end CiviCRM forms not accessible (With solution!) Front end CiviCRM (5.21 and older) forms have drop down select list labels which are not accessible. When using a screenreader such as jaws, the reader reads the selected value of the control instead of the label.

This is counter to the way that the rest of the input controls work. The value should be read when clicking the control. Tabbing to it should read the label.

WARNING: latest version of select2 (4.0.2) breaks admin toolbar. Patch the one included with CiviCRM

Solution is to either patch the ../web/libraries/civicrm/bower_components/select2/select2.js and select2.min.js files

or

WARNING: select2 4.0.12 is not compatible with CiviCRM 5.21. The admin toolbar will disappear if you do the following. Use the patches. Do not bower install select2! ;-):

Move the select2 folder out of bower_components and run:

$ bower install select2

to get latest version of select2 (4.0.12 as of this writing) , which is accessible. I've not fully tested the latest version of select2, but it seems to be behaving on our stage server.

Patching existing select2 is the only option until regression testing is done by the CiviCRM folks, unless you want to patch latest version of select2 to fix toolbar issue.

Do this!:
patches (if you want to keep current version of select2)...

select2.js.patch:

--- select2.js.original 2020-01-24 13:55:52.164674038 +0000
+++ select2.js  2020-01-24 13:56:20.955011734 +0000
@@ -2269,7 +2269,7 @@

             // add aria associations
             selection.find(".select2-chosen").attr("id", "select2-chosen-"+idSuffix);
-            this.focusser.attr("aria-labelledby", "select2-chosen-"+idSuffix);
+            this.focusser.attr("aria-labelledby", "s2id_autogen"+idSuffix);
             this.results.attr("id", "select2-results-"+idSuffix);
             this.search.attr("aria-owns", "select2-results-"+idSuffix);

select2.min.js.patch:

--- select2.min.js.original 2020-01-24 13:53:46.859556059 +0000
+++ select2.min.js  2020-01-24 13:54:48.440139669 +0000
@@ -124,7 +124,7 @@
         null!==s&&this.container.css("width",s)}}),A=k(R,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html("   &#160;   <input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />

              <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'       aria-autocomplete='list' />

")
         return t},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var t,s,i
         this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),t=this.search.get(0),t.createTextRange?(s=t.createTextRange(),s.collapse(!1),s.select()):t.setSelectionRange&&(i=this.search.val().length,t.setSelectionRange(i,i))),this.prefillNextSearchTerm(),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),P.call(this,"selection","focusser")},initContainer:function(){var i,n,o=this.container,a=this.dropdown,r=L()
-        this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=i=o.find(".select2-choice"),this.focusser=o.find(".select2-focusser"),i.find(".select2-chosen").attr("id","select2-chosen-"+r),this.focusser.attr("aria-labelledby","select2-chosen-"+r),this.results.attr("id","select2-results-"+r),this.search.attr("aria-owns","select2-results-"+r),this.focusser.attr("id","s2id_autogen"+r),n=e("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.on("focus.select2",this.bind(function(){this.focus()})),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"))
+        this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=i=o.find(".select2-choice"),this.focusser=o.find(".select2-focusser"),i.find(".select2-chosen").attr("id","select2-chosen-"+r),this.focusser.attr("aria-labelledby","s2id_autogen"+r),this.results.attr("id","select2-results-"+r),this.search.attr("aria-owns","select2-results-"+r),this.focusser.attr("id","s2id_autogen"+r),n=e("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.on("focus.select2",this.bind(function(){this.focus()})),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"))
         var l=this.opts.element.attr("title")
         this.opts.element.attr("title",l||n.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&229!=e.keyCode){if(e.which===U.PAGE_UP||e.which===U.PAGE_DOWN)return g(e),t
             switch(e.which){case U.UP:case U.DOWN:return this.moveHighlight(e.which===U.UP?-1:1),g(e),t

Hope someone finds this useful :-)

Neil Davis

Developer

National Federation of the Blind


Private and public contacts How can I set up Civi so that volunteers have only see private contacts but cannot see their details or their interactions (emails, calls etc).

You're asking two different (but related) questions:

How can I hide a group of contacts from a set of users?
How can I show a group of contacts but hide their activities?

For the first question, you should:

Make sure the non-privileged staff have a CMS role that does NOT have the "View All Contacts" or "Edit All Contacts" permissions.
Add all the contacts they SHOULD have access to into one or more groups.
Use ACLs to grant access ONLY to the contacts the staff should see.

If you want to allow a set of users to see contacts but not their activities:

Install the Activity Type ACL extension.
It's called an "ACL extension", but really this adds CMS permissions to roles so that you can deny contacts access to certain activity types.


Contact layout editor db update crash on upgrade to 1.2.1 I upgraded a site to 5.7 and got a message to upgrade the contact layout editor to 1.2.1. After installation a database update has to be run which stops with the message [Error: Upgrade org.civicrm.contactlayout to revision 1000]
DB Error: no such field
I tried again on another site and got the same problem.  Uninstalling & re-installing the extension fixed the problem, but that might not suit those who had made many changes.  Is there a fix for this ?

Thanks for pointing out the bug in the upgrade code. I've pushed up a fix and published a new release: 1.2.2.

https://github.com/civicrm/org.civicrm.contactlayout/releases/tag/1.2.2


How to CSS style price set checkbox? I need help styling my priceset checkboxes on a contribution pages. I was able to style it, but when any of them are selected, the checked item doesn't show activated as per my css color. It maybe a simpletest thing for some, but I would very much appreciate if anyone can help please. Here's my CSS so far

#crm-container.crm-public .price-set-row .crm-price-amount-label {display: inline;}
#crm-container.crm-public .price-set-row {display:inline-block;border:1px solid #e0e0e0;width:48%;}
#crm-container.crm-public .price-set-row label {display: inline-block;}

#crm-container.crm-public .price-set-row:hover,
#crm-container.crm-public .price-set-row.selected,
#crm-container.crm-public .price-set-row:checked {background-color: #FFC107; color: #FFF;font-weight:700;}

Adding as an answer for future references

 #crm-container.crm-public .price-set-row input {position: absolute;opacity: 0;cursor: pointer;height: 0;width: 0;}
#crm-container.crm-public .price-set-row input.crm-form-checkbox + label{display: inline-block;text-align:left; padding: 8px 8px;
  cursor: pointer;border: 1px solid #e0e0e0;width: -webkit-fill-available; margin-left: 0;}

#crm-container.crm-public .price-set-row input.crm-form-checkbox + label:hover,
#crm-container.crm-public .price-set-row input.crm-form-checkbox + label.selected,
#crm-container.crm-public .price-set-row input.crm-form-checkbox:checked + label {background-color: #FFC107; color: #FFF;}
#crm-container.crm-public .price-set-row input.crm-form-checkbox:after {content: "";display: table;clear: both;}

#crm-container.crm-public .price-set-row .crm-price-amount-label {display: inline;}
#crm-container.crm-public .price-set-row {display: inline-block;width:49%;}

UPDATE: More comprehensive styling

Styling Contribution pages with buttons


How can i override Civicrm /CRM/Utils Files? Override Civicrm Utils file
/sites/all/modules/civicrm/CRM/Utils/ReCAPTCHA.php
to
/custom_code/CRM/Utils/ReCAPTCHA.php .
it is not working. I have cleared the drupal cache and also cleared /civicrm/admin/setting/updateConfigBackend?reset=1 cache. What thing is missing please guide me how can override civicrm files?

First of all, you should really customize CiviCRM by developing extensions. There is a developer guide that will explain you how this is done: https://docs.civicrm.org/dev/en/latest/

If you do want to override anyway, you should first of all navigate to Administer>System Settings>Directories to provide the path to the PHP files, have you done this? If you have it should work but I would still recommend to take the extensions route as this is by far the most used and supported route.


Bug in the scheduled update of Membership Statuses? There seems to be a bug in the scheduled task 'Update Membership Statuses' in 4.4.3.
We have just changed the rule for status 'Grace' to allow an extra month for the grace period. If I re-save a membership manually it changes the recently-expired membership back to a status of Grace. So far so good and it proves that the rules are in the correct order.
But I would now expect the scheduled task to change the others that have recently Expired back to Grace. It doesn't. It reports "Finished execution of Update Membership Statuses with result: Success (Processed 878 membership records. Updated 0 records.)"

Scheduled status updates have worked in the past.

I've looked at 'membership statuses not being updated' and 'Update membership status automatically' and even the very old 'Membership status not updating from pending' but these are all simpler cases.

Clearing the Civi caches didn't help.
Is the scheduled task logic different to the immediate logic?
CiviCRM is so damn fragile!
David

A real fix is still needed but the following procedure appears to provide a reliable workaround:

Set the Grace period to the new value;
Disable the status 'Expired';
Run the task 'Update Membership Statuses' so that memberships within the new Grace period are set to 'Grace'; (but don't just run Cron, as Cron only runs this particular update task once a day.)
Re-enable the status 'Expired';
Run the update task a second time to check that memberships that really should have expired do indeed correctly show as 'Expired'.

David


How can I find contribution pages or membership pages where Profiles are used? I can see a list of all custom profiles
It says

Name: Membership Details
Type: Membership::: : : : : : : : Teaching Member-EATA
ID:   13
Used For:   Standalone Form or Directory

When I click on Find Members link from civicrm menu
i.e. https://www.example.com/civicrm/member/search?reset=1

In the image(of Find Members link given above) below I can see CTA Member,Teaching Member,Teaching member EATA as profile fields in member search link given above.
But I need to find where is this profile used in
like a contribution page id 24 or something else
Is there anyway I can to find out ?

If you have access to your db then you can look for the field in the civicrm_uf_field and look for the uf_group_id, then look in the civicrm_uf_group table to see which Profile it is used for, and then look in the civicrm_uf_join table to see where those uf_group_id are used. EG you may see that uf_group_id xx is used for civicrm_contribution_page that has entity_id yy


How can I suppress parts of the date in a report I am modifying the activity report for use in a dashlet.

The activity date ('civicm_activity_activity_date_time') is currently displayed as November 18th, 2015 2:00 PM

I can change the format of a date using CRM_UTILS_DATE::customFormat, but since this is a report of this current week's activities, what I really want to do is shorten it all by suppressing the month and the year altogether - (and even converting the date to a day)

Is there a CiviCRM way to do this?

I would just revert to either to DateTime() or date('D', strtotime($dateField))


Copy CiviVolunteer volunteer needs when creating a repeating event When creating an event I am able to set the volunteer needs according to the regular schedule. If I set the event to repeat then I'd like it to copy those volunteer needs for each repeating event. Basically, I want a weekly volunteer schedule. Right now, none of the volunteer needs from CiviVolunteer copy for the repeating events, although you are able to edit each event's volunteer needs separately, which I'd like to keep.
 Does anyone know if this possible? If not, any tips on how to develop it? I am a novice programmer, so perhaps I could try to develop this functionality. Thanks much!!

I think you can find all you need about this question at https://issues.civicrm.org/jira/browse/VOL-37

Note also that CiviVolunteer 2.0 beta is planned for a release on September (2015) - https://civicrm.org/blogs/ginkgofjg/civivolunteer-20-whats-in-the-works.


Is there a roadmap for CiviCRM? This question will hopefully help people find their way to the big picture stuff.


"Error: Please set the API URL" when buying a Free Membership I have a contribution page that has six paid memberships and one free membership.  When the free membership is selected, it kept displaying the error that the Payment Type (Processor)was required.  After I deselected the required field requirement for Payment Processorm, the payment types disappear and they could make it to the "Continue" page, but then CiviCRM shows the "red banner" error page.

Is there a way to allow them to select a payment processor, even though the amount is zero?  Thats what it used to do before version 6.0 (I think).

I am using CiviCRM 4.6.2 on Joomla 3.4.1.  All paid memberships work great.  However when the free membership ($0.00) is selected, the Payment Types - includeds Paypal, Stripe and pay by check, all disappear, but seem to require one be selected before allowing them to sign up for the free membership.

UPDATE Aug19/2015: The fix is included in 4.6.7

This bug as reported at https://issues.civicrm.org/jira/browse/CRM-14536 seems to be fixed and in QA - if folks can test and report finding that would be great.

The fix is available at: https://github.com/civicrm/civicrm-core/pull/6441

Patch: https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/6441.patch

How to do a patch?


Alias for chained API calls? I have a query in which I need to chain api.Contact.getsingle twice, given that the entity I'm querying is linked to two different contacts for which I need to fetch the data.

The problem is that, given that both chained calls have the same name, it seems that the last one overrides the first.

Basically I need to do this:

$result = civicrm_api3('MyEntity', 'get', array(
  'sequential' => 1,
  'api.Contact.getsingle' => array('id' => "\$value.contact_id"),
  'api.Contact.getsingle' => array('id' => "\$value.manager_id"),
));

but with the ability to "alias" each chained call so that they don't get overridden

Is it possible to do it? If not, what a different approach would look like?

Thanks!

I believe there is a notation for issuing multiple chains by appending ".2", ".3", etc. For example, in api/v3/examples/Contact/ChainTwoWebsites.php, it uses:

'api.website.create' => array(
  'url' => 'http://civicrm.org',
),
'api.website.create.2' => array(
  'url' => 'http://chained.org',
),

As far as I know, there is no way to do aliases.

Note: The class which handles chaining is ChainSubscriber. In skimming that code, I don't see anything which explicitly processes the ".2" suffix as a number. It would be worth a try to use a prettier/symbolic suffix (e.g. api.Contact.getsingle.self, api.Contact.getsingle.manager) -


Blocking specific email users from registering for events We have had a particular email address used for registering a number of different participants for workshops in CIVIEVENT - and subsequently cancelling - that we believe is an immigration scam. Wondering if there is a way to disable this particular address from registering.

Thanks!

Did you check your log files to see if the fraudulent Event registrations originate from the same IP (or similar)?

If so then block that IP (or entire subnet) so that it can no longer access your server.

For those using iATS Payments there is another handy anti-fraud measure: you can block credit cards originating from certain BIN countries to go through;


How to communicate with the users of an extension? We are discussing about which version(s) to maintain compatibility with, and would like to be able to discuss that with the users of that extension. Is there an easy way to do that?

Eg. civicrm.org has already several ways to display a message to the civicrm users (eg. community message), would it be possible to plug into that and add a special message only visible to those that have a specific extension enabled?

The short answer is no.

Per this blog post, only the core team can control in-app messages.  I'd say you'd have to make your appeal directly to them.  I'm sure they'd be hesitant (with good reason), but you may be able to make your case.

However, that wouldn't do any good in your case.  I've just skimmed CRM/Core/CommunityMessages.php.  The pick method allows message display to be controlled by the permission of the logged-in user and by the components that are enabled (e.g. CiviMail) - but not by extension.


Civix not working Joomla! 3.9.3 Civix doesn't seem to work with Joomla! 3.9.3. According to this, Joomla! 3.9.3 doesn't allow loading of phar packed files. When I try to run civix, I get the following exception error in a red panel:

[TYPO3\PharStreamWrapper\Exception]
  Unexpected file extension in "phar:///usr/local/bin/civix/bin/api/class.api.php"

I reverted to Joomla! 3.9.2 and civix works again.

OK, it looks like it's a problem with Joomla 3.9.3. See discussion here. Fix should be included in Joomla 3.9.4, which is out on 12th March.


Can I reference the contact ID of the Current Employer with a Drupal entity token? I'm trying to create a link to a CiviCRM-integrated Drupal webform that passes the ID of a contact's employer

I'm trying to use

http://somedomain.org/node/9999?cid1=[current-user:civicrm-contact:employer-id]

but the token replacement is blank. [current-user:civicrm-contact:employer-id] also does not work. However, [current-user:civicrm-contact:current-employer] does replace with the name of the current employer.

We ended up using Markup field in the webform with some PHP code that made a CiviCRM API call:

<?php
$params = array(
  'version' => 3,
  'is_active' => 1,
  'sequential' => 1,
  'contact_id_a' => $_SESSION['CiviCRM']['contact_id'],
  'relationship_type_id' => 4,  // Employee Of
);
$result = civicrm_api('Relationship', 'get', $params);

if ( ! $result['is_error'] ) {
  $employer_id = array_shift($result['values'])['contact_id_b'];
}

if ( $employer_id ) { ?>
    <input onclick="location.href='/link-to-webform?cid1=<?php echo $employer_id ?>';" type="button" value="Manage Contacts" />
<?php }

I'm going to file an issue on the module.


Paypal Standard not working in embeded civi form Problems began after I updated from 4.6.7 to 4.6.10.
Checking out with Paypal standard doesn't work if the form is embedded in another site.

I get this message in the console:

Refused to display 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=************' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Any Ideas

Yes, it's a security measure of paypal, you can't use it in an iframe.

I would suggest that instead of embedding the donation form, you simply put a link to your civicrm contribution page.

You might have another payment processor that is willing to work from within a frame (try stripe if you want), but you might get blocked in the future, because trying to "hide" what is the real domain of the form asking for money is something scammers would do when trying to trick victims to send them money when they think they are paying someone else