Event registration with participant approval: missing e-mail notification when rejected If I check an events registration option "Require participant approval" and change the participant status from "Pending from approval" to "rejected", no e-mail notification will be sent.

If I check this forms option "Send confirmation" the user is receiving an e-mail but with the wrong template (I guess it's "Events - Registration Confirmation and Receipt (on-line)"). This e-mail should only be send to approved participants and it is really misleading if you change the status to "rejected" or "cancelled".

This whole approvel thing is realy unclear to me and the documentation lacks information. So I'm asking:

What do those participant status mean? (e.g. "cancelled" vs "rejected")?
How do I reject a participant waiting for approval the right way?
Is it possible to notify the participant about the recejection of his registration?
If yes, can I send individuell messages with some details about the reason of the rejection?
For which mailings are those templates used:

Events - Pending Registration Expiration Notice
Events - Receipt only
Events - Registration Cancellation Notice
Events - Registration Confirmation and Receipt (off-line)
Events - Registration Confirmation and Receipt (on-line)
Events - Registration Confirmation Invite

PS: I know that I should separete this questions into multiple SO questions but they are closely related.

I don't know of any magic that happens if you use the "Rejected" status.  I think it's probably no different than if you created "Flaky" or "In absentia" as statuses: most participant statuses are just there for you to keep track of attendees and cause no special behavior.

Consequently, CiviCRM won't really do anything different whether you are saying someone is "rejected" versus "attended" or "no show" or whatever.  In particular, there is no "rejection notice" email template in the System Workflow Templates that would be triggered.  (In contrast, there is a "cancellation notice" for canceled registrations.)

Unfortunately, that means that the default registration email is what would automatically go out, just as if you had approved the registration.

I would suggest that you leave the box unchecked and manually send an email to the rejected applicant(s) explaining the situation.  I suspect that the reason there is no "rejection notice" template is that few organizations would want to send out generic, antiseptic notices to the effect of

Your registration for the Rain-forest Cup has been rejected.

Sending an email manually would let you be cordial and detailed.  You could send the same message to everyone you cancel (all at once, and they'll receive individual messages), or you could be as specific as you'd like for each rejected participant.

As for the different templates, here goes:

Events - Pending Registration Expiration Notice: if you run the scheduled job to process pending registrations, and the pending participant expiration field is set on an event, this will let people know they've been dropped by the scheduled job.
Events - Receipt only: this is what you get if the site has the event registration in cart mode and you register for one or more events.
Events - Registration Cancellation Notice: automatically sent when the status is "canceled" and (I'm pretty sure) the event is in the future.
Events - Registration Confirmation and Receipt (off-line): generated if you register someone as an admin and check the receipt box.
Events - Registration Confirmation and Receipt (on-line): generated by regular online event registration.
Events - Registration Confirmation Invite: if you're on the waitlist, and a spot opens up, when the scheduled job to update participant statuses automatically bumps you to "pending from waitlist" status, this lets you know you're now allowed to go register.


Require non-custom fields? Question:  How do I require the first and last names on Individuals?

I need to require some global fields in the CiviCRM backend GUI.  Specifically, I need to require the First and Last name for individuals on the standard individual create/edit backend webforms.

I thought there was an admin page to set this, but can't find it right now and I suspect other people will be interested in the answer too.

You can make any fields "required" when they are part of a profile.

Admninister > Customize data and screens > Profiles > Fields > Edit


Upgrading Custom Extension for PHP 7: How to I instantiate a mysqli data object I've just upgraded a site from CiviCRM 4.6.38 LTS to CiviCRM 5.7 because we upgraded the server to PHP 7.1.x. As a result 2, custom extensions are warning me because they used mysql_real_escape_string().

PHP 7.1.x doesn't support mysql_real_escape_string() so I need to change to mysqli_real_escape_string() and pass my mysqli data object. The issue I have is that these extensions use the old PHP/MySQL connection as in:

$dao = CRM_Core_DAO::executeQuery($sql);

Is there some documentation I can use to quickly get up to speed on updating my code and acquiring a mysqli connection object?

CiviCRM has its own database abstraction layer that can handle the escaping for you, so you don't have to use low-level functions like mysqli_real_escape_string. You can use it in 2 ways:

Parameterize your query like this:

CRM_Core_DAO::executeQuery('SELECT * FROM civicrm_contact WHERE id = %1',
  [1 => [$id, 'Integer']]
);

Escape your variables beforehand with CRM_Utils_Type::escape().


Case Activity does't respect 'Do not notify assignees for'? When submitting activity from case, assignee contact still gets email even though the activity type is included in 'Do not notify assignees for' setting under Display Preference. However it obeys the setting when sent from Activity form. Is this intentional?

It's not intentional but it's come up before. See https://lab.civicrm.org/dev/core/issues/1582 and https://lab.civicrm.org/dev/core/issues/1649

UPDATE:
@pradeep-nayak submitted a PR https://github.com/civicrm/civicrm-core/pull/16800 so it will restrict for case activities too in version 5.25.


Gradebook Grades acting weird We have a site that is using the gradebook. The teacher has submitted a final grade. When you view the activity, it shows the grade in the Activity Info section. However if you go to edit that record, the grade field doesn't show up. We are running CiviCRM 5.10.3. This only started after upgrading from 5.3.1. Any help would be appreciated.

Here is the activity view, showing the grade

Here is the activity edit, not showing the grade.

I looked in the console while loading this in a new tab as well as the modal there wasn't any errors.

There's a bit of extra information that may help us:

Firstly, when you say "doesn't show up" - that's not very clear. Ideally please paste a screenshot (with names & email addresses redacted).

Secondly, please open "Console" in Google Chrome (or Developer Tools in other browsers) and see whether there are any errors.

Next (if you're on Drupal), please look in your Drupal watchdog for any errors.

Finally, if you have server access, please look in your Apache / Nginx logs and   in your ConfigAndLog CiviCRM error files.

Thanks!


Chain API call cascade, pass second value as third call argument, "id is not a valid integer" While making a cascade API call, a roadblock has been hit, here's a code:

$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'return' => "id",
  'id' => array('IN' => array(168, 169)),

 // Second call

    'api.Relationship.get' => array(
      'return' => "contact_id_a",
      'contact_id_b' => "\$value.id",
      'relationship_type_id' => 4,
      'is_permission_b_a' => "1"),

          // Third call

        'api.Contact.get' => array('id' => array(
           'IN' => array("\$value.api.relationship.get"))), // <-- here
));

It returns

{
    "error_field": "id",
    "type": "integer",
    "error_code": 2001,
    "entity": "Contact",
    "action": "get",
    "is_error": 1,
    "error_message": "Error in call to Contact_get : id is not a valid integer"
}

What exactly returns third call and how these results should be properly "plugged in" to get correct output? Thanks anyone for any bit of advice!

so you are trying to fetch the details of contacts that are related to the ones you search for first?
The $value refers to the last call in a nested one.

$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'return' => "id",
  'api.Relationship.get'
   => array(
     'contact_id_a' => "\$value.id",
     'api.contact.get' => "\$value.contact_id_b"),
));

If you want to give more params to the inner api.contact.get:

$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'return' => "id",
  'api.Relationship.get'
   => array('contact_id_a' => "\$value.id",
     'api.contact.get'
      => array(
        'id' => "\$value.contact_id_b",
        'sequential' => 1,
        'return' => "display_name"
      )
    ),
  )
);


Which version of Angular/AngularJS does CiviCRM use? I'm working on learning Angular/AngularJS for use with CiviCRM and confused about which version I should be learning. How can I see which version CiviCRM is using?

How to check your Angular version

Go to the default Angular base page for your site at http://example.org/civicrm/a
Open a browser console
Evaluate angular.version within the console:

Notes about Angular versions

1.x is called "AngularJS" and has documentation at docs.angularjs.org
2.x (onwards) is called "Angular", has significant changes from 1.x, and has documentation at angular.io/docs
CiviCRM (as of version 4.7.x) use AngularJS 1.x
Within AngularJS 1.x there are some changes between minor versions


Timestamp mismatch between MySQL and PHP Every time I log in to CiviCRM I get the following error message:

  Timestamps reported by MySQL (eg "2015-11-06 13:44") and PHP (eg "2015-11-06 11:44" ) are mismatched.

I am using CiviCRM 4.6.10 and Drupal 7.41.

The host (CiviHosting) has said that the MySQL server timezone is set to "Europe/Sofia" and can't be changed.

I have set the PHP timezone via php.ini to match this:

date.timezone = "Europe/Sofia"

However, I am still getting this error message.

The date section of phpinfo shows the following:

date/time support   enabled
"Olson" Timezone Database Version   2013.3
Timezone Database   internal
Default timezone    Europe/London

Directive   Local Value Master Value
date.default_latitude   31.7667 31.7667
date.default_longitude  35.2333 35.2333
date.sunrise_zenith 90.583333   90.583333
date.sunset_zenith  90.583333   90.583333
date.timezone   Europe/Sofia    Europe/Sofia

(Note that the 'Default timezone' is different to the 'date.timezone'.)

Any idea how I can fix this?

Thanks for your help.

I have flagged a similar problem with Joomla as an issue a long time ago and submitted some code to solve it:

https://issues.civicrm.org/jira/browse/CRM-15656

The CiviCRM team reckon it will be fixed in 4.7.7.


Enabling CiviVolunteer 2.0 Volunteer Opportunity Listing How do I enable the public listing of volunteer opportunities for visitors to my civicrm website?

There's a link under the Volunteer menu "Search for Volunteer Opportunities" that you can copy to a menu option or a button:

http://address-to-your-site/civicrm/vol/#/volunteer/opportunities

You also need to make sure that the permission "CiviVolunteer: register to volunteer" is granted for the Anonymous role if they're not going to be logged in (or another role if they are).

There's some additional information at
http://civicrm.github.io/org.civicrm.volunteer/docs/

Note that Angular Profiles should be installed an an extension in the CiviCRM extensions directory and then enabled.


Managing multiple CiviCRM relationships in a Drupal View: A case study for A->C plus B->C relationships Here is the fruit of my journey so far with multiple CiviCRM relationships in Drupal Views.

My original question that sparked this question is here:
How to create a drupal 'contact me' link where the user is a contact reference field of Contact B in a civi relationship

I wanted to create a landing page for each organisation where my gang has members, so I needed a single Drupal View that would do three things:

Display fields from an organisation (name, logo, motto, website, etc.)
Display a list of members of the organisation (photo, name, etc.)
Link a 'Campus contact' person for the organisation to its Drupal user, so that I could create a 'Contact me' link using the built in Drupal Contact module

With Point 3, the real issue is how to expose the fields of that 'Campus contact' person to the view, so that I could rewrite their name as a link like 'user/[drupal_id]/contact' in order to open a contact form.  That is, I needed the Drupal user ID of the Campus contact person.

The basic problem is how to expose the data from three different, but related, CiviCRM contacts in one view.

In my case, the arrangement of the relationships is A->C and B->C.  I have two different contacts related to the same organisation each by a different relationship.

For a quick and dirty tutorial for handling a chain  of relationships, like A->B->C, e.g. Parent->Child->School, see petednz's answer here:
How to create a Drupal View with multiple CiviCRM relationships?

If you struggle to connect all those dots because of certain gaps in your understanding of how CiviCRM relationships work, either in Civi itself or in Views, then I recommend you come back to my answer here, as I intend to make the background and logic explicit, before following those instructions.  Hopefully, with the information below, you will be able to customise your own views to suit your own specific needs.

Okay.  Have to run.  I will get around to the answer about 5 hours from now.  Hold tight!

Here's my solution for achieving the three goals outlined in the question.  I may edit this a bit as I find errors and where commenters declare confusion.

First, the caveats.  Second, some info about relationships in CiviCRM.  Third, building the view.

Caveats

I am writing this as a tutorial as if you are following along.
Obviously you won't have the same data to work with, but this will
work for any arrangement where you have multiple contacts who are
related by the same relationship type to a single organisation and
where that organisation is related to a third contact, e.g. a CEO, a
secretary, a captain, a fundraiser, via a second relationship type,
e.g. a sports team with players and a captain or a committee with
members and a chairman or a company with employees and a CEO.
We will use a contextual filter in the view, but I am not explaining
the guts of filters.
I'm sure there are modules other than Views required to make this
work, CiviCRM integration modules at the very least, but I can't
remember what they might be.  If someone wants to track down all the
modules that are being used here and edit this post, that would be
brilliant.
I am also not going to get into formatting, but can later if people
are interested.
I am showing you how to rewrite the results of a field to create
your own custom link, but will not be going into detail.  The
rewriting feature is how you would create links to the organisation
pages themselves from, say, a page where all the organisations are
listed in a table, but I am not going to take you through how that
would work.

The CiviCRM relationship alphabet

CiviCRM tracks relationships from two sides, Side A and Side B.

I am an 'Employee of' The University of New South Wales, Side A -> Side B.

The University of New South Wales is the 'Employer of' me, Side B -> Side A.

When you create a new relationship type in CiviCRM, you have the choice as to which side of the relationship is going to be A and which side B.  For the relationship types that 'ship' with CiviCRM, the A side is the individual and the B side is the organisation or household, that is, the group.

You can see how it works at Administer->Customize Data and Screens->Relationship Types.  Here's a snapshot of my set up.  For the sake of the rest of this tutorial, note lines 2 and 5, 'Campus contact at' and 'Employee of'.

Individual (A) is 'Campus contact at' organisation (B), so this is a relationship starting from Contact A.

Organisation (B) 'has Campus contact' individual (A), so this is a relationship starting from Contact B.

While tedious in its repetition, this is the most important information to have firmly fixed in your head as you create your view.

Create whatever relationship types you need for your data structure and add relationships to contacts as required.  I've created a few dummy contacts and will use a university where my mob don't have contacts in order to keep this anonymous.

Create your view

Create a new view - Show 'CiviCRM Contacts', 'Display format' doesn't really matter, but you want a list of 'Fields' of some description.
After saving the new view, open up the 'Advanced' column on the right hand side of the view display.
You will be adding several relationships and the order matters because context is king in views, i.e. one relationship creates a new context for the next, and knowing which B is related to which A is essential.
Click to 'Add' your first relationship.  Check the box for 'CiviCRM Contacts: CiviCRM Relationship (starting from contact A)' and click Apply.  That takes you to the field settings window.

In the 'Identifier' box, you'll see the name of the relationship you just selected.  Click in the drop down for 'Choose a specific relationship type' and select the required relationship type.  This defines the first two types of contacts that your view will be handling.  For me, I will select 'Employee of|Employer of'.  This gets me access to all employee data and all employer organisation data in my database, and allows me to accomplish the first two goals, display organisation fields and display a list of members (employees) of those organisations.

Now add some fields to the view.  Let's add the employer display name and the display names of employees of that organisation.  Click to Add a field.  Type 'display' in the search box and select 'CiviCRM Contacts: Display Name'.  Click Apply.  You can leave the Configure Field box alone, so click Apply again.
If you look at the auto-preview at the bottom of the views interface, you are likely to see both individuals and organisations listed.  Remember when you added the display name field, there was no way to indicate which side of the relationship you meant to display.  We need to add another relationship.
Add relationship.  Type 'id b' in the search box and select the 'CiviCRM Relationships: Contact ID B' relationship.  You may think we should now also add the data from Contact A; however, this is where the alphabet soup breaks down, but we'll explain that when we get to adding other fields later.
Click Apply to bring up the Configure field window.  There is a new 'Relationship' option.  Click the drop down and look at the options: 'Do not use a relationship' and 'CiviCRM Contacts: CiviCRM Relationship (starting from contact A)', which is the relationship you added earlier.  Select that option in order to tell views that the Contact B data you want is from that particular relationship type, that is, employer organisations.  Click Apply.

Now go back to Fields and click on the field you already added, display name.  You will now see the same Relationship option in this window as in the previous configure relationship window a minute ago.  Click the box and look at the options.  You should see 'Do not use a relationship' and 'CiviCRM Contact B'.  Select 'CiviCRM Contact B'.  Click Apply.
Now look at the auto preview.  You should see a list of employers only because you have told views that the display name you want to display is that of Contact B from the relationship starting from Contact A defined as an Employee/Employer relationship.
Add another field.  Add display name again, but this time select the 'Do not use a relationship' option for Relationship. Click Apply.  You might expect we should be choosing the display name of Contact A of the relationship we set up earlier, but views takes Contact A of the first relationship you create to be the default Contact for the view, so when you want to display fields from that contact, views says you are not using a relationship.  That is, that data is treated as the data views would display, if you had never set up a relationship in the first place.  From now on, displaying employee data will mean choosing 'Do not use a relationship'.
Check the preview.  Things will likely look rather messy because views is displaying all employer names and all employee names in no particular order or grouping.  Don't fret.  We need to add a Contextual Filter to help views make sense of what we want.  Remember, I am creating a landing page for an organisation, so I want to see data from one org per page, but with all the employees listed for that org.
Add a Contextual Filter.  These filters will be arguments in the url for the page.  In this case, we need to tell the view which org page we want to see, so the url might be http://example.com/employers/9728, where employers is the path to the view and 9728 is the Contact ID of a particular employer.  The filter interprets the number it finds in the url as a field of one of your contacts.  When the url is parsed, we want that number to be understood as the Contact ID of a CiviCRM employer organisation.
In the 'Add contextual filters' window, select the 'CiviCRM Contacts: Contact ID' option and click Apply.
In the configure field window, select 'CiviCRM Contact B' for Relationship.  Click Apply.  That will mean the argument in the url is now interpreted as the Contact ID of an employer organisation.

Before checking the results in the preview, go into Civi and find a Contact ID number of one of your employer organisations to use for the filter.  Then enter that number in the box 'Preview with contextual filters' and click Update preview.  I am using Bond University which has Contact ID 9728.

The preview should now have org names alternating with employee names (I've changed the labels to make it easy to see).  The org names should all be the org with contact id you entered into the filter and the employees should all be from that org.  Obviously, this isn't the way you would display the page, but we are just trying to make the data available, not format anything.

We've accomplished goals 1 and 2 and tidied up the output with a filter to display data from only one organisation per page.  All the concepts are in place and we just need to get the third contact involved, the Campus contact.  Campus contact is related to our existing Contact B in the same kind of relationship as employee to employer and you could imagine we would create another A->B relationship where A is defined as the Campus contact.  Here's where I plead ignorance!  It doesn't work and I'm not 100% sure why, but it may be some kind of confusion with the fact that it already has an A and B related in the same way and can't make sense of the query.  Don't know about that, but I do know how to make it work in an equally intuitive fashion.
Add relationship.  Select 'CiviCRM Contacts: CiviCRM Relationship (starting from Contact B)' and click Apply.
Select relationship 'CiviCRM Contact B' to ensure views knows you want to use the existing Contact B as the basis for the new relationship.
Choose the 'Campus contact at|has Campus contact' relationship type.  Click Apply.
We know from the previous work that in order to be able to access data from the Campus contact, we will need to add a relationship to that contact, which is now defined as Contact A in our new relationship.
Add relationship.  Check 'CiviCRM Relationships: Contact ID A'.  Click Apply.
In the configure relationship window select 'CiviCRM Contacts: CiviCRM Relationship (starting from Contact B)' as the relationship, so that Contact A will now be the Campus contact.  That should be the end of adding relationships for my purposes.

Add a field.  Add display name a third time, but select CiviCRM Contact A as the relationship.  Check out your preview.  You should see three lines for each employee: org name, employee name, and campus contact, and the org name and campus contact should be the same for each different employee.

We now have access to data from three different contacts in the one view.  Congratulations!  The last item is to link my campus contact field to the Drupal contact form for that user.  Child's play compared to what you've just been through!
Add a field. Add the 'CiviCRM Contacts: Drupal ID' field and click apply.
I want the Drupal ID of CiviCRM Contact A, so select that relationship and click Apply.
Learning moment.  Back in the Views control panel click to edit the display name field for Campus contact.
We need to rewrite the output of that field to make it a link to the contact form.  For that we need access to the Drupal token [drupal_id], so that we can create the url user/[drupal_id]/contact.
Scroll down and expand the 'Rewrite results' section.  Scroll down again to 'Replacement patterns' and expand that section.  You will see several tokens for display name, but no Drupal ID.  What those tokens have in common is that they are for fields above the Campus contact field in the field list.
Context is king in views.  We need to move the Drupal ID field up in the list until it is above where we want to use it, so anywhere above the Campus contact field.
Click the arrow next to the Add field button and move the Drupal ID above the Campus contact field.  Apply.
We don't need to display the Drupal ID either, so I would edit that field and check the Exclude from display box.
Edit the Campus contact field again.  Look at the replacement patterns under rewrite results and you should see [drupal_id] as an available token.
Scroll back up and check the 'Rewrite the output of this field' box and the 'Output this field as a link' box.
In the link path input, type user/[drupal_id]/contact.  Apply those changes.
Now gaze in wonder at your preview.  The Campus contact field is now a link.

Click the link and, if you have the contact module turned on, it should take you somewhere like this.  We've achieved all three goals!  Well done.

If you would like me to add some more about how to do some quick and dirty formatting for this kind of view/page, just ask, but I can't do it now.
I hope this has been helpful.


Add legal_identifier field to contact page and form? I tried add legal_identifier field by custom tempelate. It worked for pages, but not for forms.
Then I added this code to sites/all/modules/civicrm/CRM/Contact/Form/Edit/Organization.php:

$form->addField('legal_identifier');

Now it works good in organization contacts, but I'm not shure if this is correct. Can I edit this file? What will happen after update?
Is there some better way? Can I use some hook? How?
Thank's, I'm getting started with civiCRM.

Why not simply a civicrm custom field, that you could use in a Profile or a Webform (if you are based upon Drupal) ?


Civicrm menu is hidden After upgrading civicrm to the latest version 4.6.8 for drupal6 site, my civicrm menu is hidden. Kindly help me to fix the issue I am new to civicrm.

Try this steps :

1) Rebuild the menu by hitting this url <your_site_name>/civicrm/menu/rebuild

2) Clear Drupal cache using drush cc all

3) Clear browser cache -- mostly done with Ctrl+Shift+Del.


How to change Notes editor to HTML How can we change the editor for a contact's notes to an HTML editor instead of a standard textbox?

This might be a nice feature to add, but it is not something you can configure without rewriting code.

It would actually take more than just setting the editor: notes display plain text, so if you were to give the box a WYSIWYG editor, you'd see a bunch of HTML tags in the content.  Building the feature would require adding the editor, modifying the display, and making sure that old notes display properly after the upgrade.

However, if you want to work around this, you can build your own equivalent of notes:

Create a new set of custom fields, called "Comments" or "Improved Notes" or whatever.  Have it used for Contacts, allow multiple records, and have the Tab display style.
Add an Alphanumeric / Text field called "Subject".  Make it searchable.
Add a Note / Rich Text Editor field called "Comment".  Make it required and searchable.
Add a Date field called "Date".  Make it required and searchable.
Add a Contact Reference field called "Author".  Make it required and searchable.
Add a File field called "Attachment".  Add additional ones if needed.
Now, go to Administer - Customize Data and Screens - Display Preferences, and uncheck Notes in the Viewing Contact and Contact Search sections.

You should now have a tab for your new custom notes, and people won't see the standard notes (so you don't have to worry about people setting notes in the wrong place).  A couple of caveats:

You'll need to transfer any notes from the standard system.
The "privacy" feature isn't available--either you can view all notes or none.
The date and author will need to be set manually, though on the other hand, you now have the ability to backdate notes or write them on behalf of others.


changed the domain in Joomla I changed the domain in Joomla, in connection with which errors began to appear in crm.
She believes that this domain is invalid. Tell me how to fix these errors?

Review the page at https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/

Did the directory path change in addition?

Stuff to try:

look at your setting.civicrm.php file for any thing that needs updating
clear out your civicrm cache directory. typically at media/civicrm/templates_c Just get rid of everything in that directory (you can leave the .htaccess). But get rid of everything else including any subdirectories (e.g. en_US) (see above link for info)
if you can access your administrative page check your directories and resource_url settings
rebuild your menu's (described in above url)


Custom dropdown field not populated when selecting contact on contribution page I have an issue with special custom fields

I am logged in as admin on public contribution page on front end.

I click on "not Mister XXX XXX"

Then I choose the user I want to renew.

The text fields are well populated with information from database
But the dropdown fields and date fields are not populated.

I would like to know if this a known issue of CiviCRM or how to fix it ?
It's seem to be a ajax issue ?

It sounds like you may be wanting to renew the membership of another person as an administrator. To do that you should use a backend form rather than the front end one which has "not Mister XXX XXX". One way to do this is to find the contact to renew, click on their Membership tab on the Contact Summary page, then beside the membership to renew click More > Renew.


Manual registration not being recorded into workshop (price set) count. We have an event that has workshops (configured as a price set). When we do a manual (not member / user driven) registration of any person, that information is not being tracked in the workshop reports (price set count for workshop). Can anyone help tell us why this might not be being recorded?

Found the answer - it was in the report filtering. I cleared a few, and the missing records were found.....


CiviVolunteer - Reports Not Appearing I don't use this option a lot so forgive me if I'm just forgetting how this works, but last I knew in CiviVolunteer if you wanted to generate a report of the hours logged, you'd go to Contact Reports -> New Report and doing Volunteer Report would be an option from there. (Could have sworn I did this ages ago and saved it as a report, but that doesn't seem to be showing up either.)

I'm wondering if a recent upgrade might have hosed the CiviVolunteer reports? I'm on CiviCRM 5.22.0 running on WordPress 5.3.2.

I checked the CiviCRM logs and the only thing I see in there that I'm wondering might be related is this message:
Deprecated Path: There is a setting (generate_schema_and_data) not correctly defined. You may see unpredictability due to this. CRM_Core_Setting::setItems

Other than that functionality seems normal from what I can tell so I'm a bit flummoxed and would appreciate any ideas folks might have. Thanks!

In my case an upgrade to 5.22.1 fixed the issue.


how to write PHP Unit test for an entity using hooks I am to write a unit test for a simple extension using hooks with postprocess and formbuild. How can I do it? Please provide some example.

An example is in tests/phpunit/CRM/Contribute/Form/Task/PDFLetterCommonTest.php, testing that hook_civicrm_tokenValues works correctly on PDF letters.

You write a function using the hook, but you can name it whatever you want.  Then you call $this->hookClass->setHook, specifying the function name.


Assigning Drupal roles on removal of inherited membership I'm testing CiviMember Roles Sync to build a membership web site. The majority of our users are organisations, all of whose employees and volunteers should have access to the restricted nodes on the site.

I've set up Drupal roles for active members and expired members, and I've created the relevant organisation and individual memberships in CiviCRM. Then I've set up the association rules as illustrated (obviously 'church' is our organisation membership and 'supporter' the individual):

These rules seem to work just as expected for adding and removing individual members. But contacts who inherit their membership from an organisation never seem to get marked as expired themselves. So if a contact is removed as an employee or volunteer with their parent organisation they are stripped of their active member role without being reassigned the expired member role. Is there a way to sync roles on removal of the right to an inherited membership?

Postscript: When I stated writing this question, my test user didn't seem to have the active role removed when disabling the relationship to the parent organisation. As I've continued testing, that's started working even though I don't believe I've changed anything. But I still can't assign the expired role at this point, so any assistance gratefully received.

This is a workaround rather than an answer, as I've not figured out how to do what I originally asked. But I've avoided it the need for it for the time being by treating all users who don't have the active member role as expired. That might not work for more complicated membership structures, but I think it meets my needs for now.


Problem fixing missing indexes after upgrade to 4.7 When I run

cv ev 'print_r(CRM_Core_BAO_SchemaHandler::getMissingIndices())'

I get the following output:

Array
(
    [civicrm_case_contact] => Array
        (
            [0] => Array
                (
                    [name] => UI_case_contact_id
                    [field] => Array
                        (
                            [0] => case_id
                            [1] => contact_id
                        )

                    [localizable] =>
                    [unique] => 1
                    [sig] => civicrm_case_contact::1::case_id::contact_id
                )
        )
)

If I then go into db and try to delete the index in order to fix it I get an error:

mysql> alter table civicrm_case_contact drop index UI_case_contact_id;
ERROR 1553 (HY000): Cannot drop index 'UI_case_contact_id': needed in a foreign key constraint

Looking at the table, it appears the index is fine:

civicrm_case_contact | CREATE TABLE `civicrm_case_contact` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique case-contact association id',
  `case_id` int(10) unsigned NOT NULL COMMENT 'Case ID of case-contact association.',
  `contact_id` int(10) unsigned NOT NULL COMMENT 'Contact ID of contact record given case belongs to.',
  PRIMARY KEY (`id`),
  KEY `UI_case_contact_id` (`case_id`,`contact_id`),
  KEY `FK_civicrm_case_contact_contact_id` (`contact_id`),
  CONSTRAINT `FK_civicrm_case_contact_case_id` FOREIGN KEY (`case_id`) REFERENCES `civicrm_case` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_civicrm_case_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

What's required to fix this index or otherwise deal with the error message?

We have found that there are problems with both civicrm_option_value and civicrm_case_contact table indexes that have not been properly fixed by https://github.com/civicrm/civicrm-core/pull/10908 as of 4.7.25 or the rc's for 4.7.26 and 4.7.27 as of late October 2017.

When we encounter this we have been runing the following queries in the relevant MySQL database:

ALTER table civicrm_option_value DROP FOREIGN KEY  FK_civicrm_option_value_option_group_id;
ALTER table civicrm_option_value DROP INDEX index_option_group_id_name;
ALTER table civicrm_option_value ADD CONSTRAINT `FK_civicrm_option_value_option_group_id` FOREIGN KEY (`option_group_id`) REFERENCES `civicrm_option_group`(`id`) ON DELETE CASCADE;

ALTER table civicrm_case_contact DROP FOREIGN KEY FK_civicrm_case_contact_contact_id;
ALTER table civicrm_case_contact DROP INDEX FK_civicrm_case_contact_contact_id;
ALTER table civicrm_case_contact DROP FOREIGN KEY FK_civicrm_case_contact_case_id;
ALTER table civicrm_case_contact DROP INDEX UI_case_contact_id;
ALTER TABLE `civicrm_case_contact`
  ADD CONSTRAINT `FK_civicrm_case_contact_case_id` FOREIGN KEY (`case_id`) REFERENCES `civicrm_case` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_civicrm_case_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE;

After running these queries, we go to the Admin Status Console (civicrm/a/#/status) and click the button that calls the UpdateIndices api, which rebuilds the indexes properly. (In other words, we have not found that @Alan Dixon's step 4 is required after step 3.)

There are reports that some people have duplicate entries in civicrm_case_contact table on case_id and contact_id. You'll need to delete these duplicates.


CiviCRM 4.7.15 reports keep giving DB Error: syntax error The site was moved to a different server and updated from a 4.2.7 version to 4.7.15 and everything seemed to be working but every report we try to open just keeps giving this error: https://www.screencast.com/t/Lf589LhvhP and if I add a dashlet on the backend this shows up: https://www.screencast.com/t/aWMsujgz I've been looking everywhere if there is any other setting that might be causing this to happen but no luck, and this is the only log I get when I try to open the reports:

administrator/?option=com_civicrm&task=civicrm/report/instance/41&reset=1" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"

If anyone knows what might be happening let me know.

Thank you.

If you moved CiviCRM to a different server, make sure you follow the instructions in section #9 here: https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location.

Delete the following files:

Important Note: Please make an off-site backup of the following before you delete them, incase something goes wrong, such as incase you delete the wrong directory or in case you would still like to look at the log files.

Drupal:

<drupal-root>/sites/default/files/civicrm/templates_c/* i.e. everything inside templates_c, not the directory itself (cached
versions of Smarty templates that will be rebuilt)
/sites/default/files/civicrm/ConfigAndLog/Config.IDS.ini
/sites/default/files/civicrm/ConfigAndLog/* (Everything inside this directory; You can
clear all the logs if you get an error about parsing XML)
/cache/* (Everything inside this directory. Only if you get errors
after clearing the caches via the GUI) (See
http:///civicrm/admin/setting/path?reset=1 for location
of custom extension folder)

Joomla:

/media/civicrm/templates_c/* (everything inside templates_c)
/media/civicrm//civicrm/ConfigAndLog/Config.IDS.ini     Be
Careful If you have edited the IDS ini file to add any custom
exclusions then you need to edit the settings for the three paths in
the file, filter_path, tmp_path, HTML_Purifier_Cache.

If these paths are not accessible Civi pages will display blank.

Wordpress:

/wp-content/plugins/files/civicrm/templates_c/* (everything inside templates_c)
/wp-content/plugins/files/civicrm/ConfigAndLog/Config.IDS.ini


Joomla Backend (Admin), CIVI White Page after installation I have a fresh Installation of joomla and civicrm:
civiCRM = civicrm-4.6.2-joomla.zip

The Installation went well, however I just receive a white (blank) page calling civicrm from the admin_>Components->CiviCRM

the related link: http://mywebsite.com/administrator/index.php?option=com_civicrm

I have tried already certain suggestions from the old "CiviCRM Community Forums", but could not find a working solution. Database and PHP Version is >5.

May be someone can give me a hint where to start to investigate. Thank you!

B ert

System Information

PHP erstellt für    Linux Thot03 2.6.32.12 #5565 Mon May 11 02:12:06 CST 2015 armv5tel
Datenbankversion    5.5.42-MariaDB
Datenbankzeichensatz    utf8_general_ci
PHP-Version     5.5.25
Webserver   Apache
PHP-Interface für den Webserver     fpm-fcgi
Joomla!-Version     Joomla! 3.4.1 Stable [ Ember ] 21-March-2015 20:30 GMT
Joomla!-Plattform-Version   Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Browsererkennung    Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

A white screen (WSoD or "white screen of death") indicates that PHP is configured not to display errors, and has hit an error which it can't recover from. The result is an empty page.

Your next step is not to fix the error but to give yourself enough information to identify the source of the error.

Viewing errors in logfiles

The webserver can be configured to display errors to screen, but it also logs errors to files on disk. These files vary depending on your hosting environment, so you might consult your webhost's documentation to locate them. You might look for errors in some of these locations depending on webserver/php config -

/var/log/nginx/*err*log       # NginX webserver error logs
/var/log/apache2/*err*log     # Apache webserver & mod_php error logs
/var/log/*php*log             # PHP-FPM & PHP-CGI error logs
/var/log/php5/*log            # PHP-FPM & PHP-CGI error logs
/path/to/site/err*log         # Some hosting environments

And a CiviCRM specific file - location varies depending on hosting environment AND CMS -

path/to/site/path/to/civicrm/files/ConfigAndLog/CiviCRM*log

(The *s above represent a wildcard, not an actual filename. Eg the last entry might be public_html/error_log on Bluehost.)

Once you've located these files, you can download them to view, or you can use tools like tail or less +F to follow the files. I prefer to follow logfiles because you can watch the error appear each time.

Displaying errors to screen

You may prefer to display errors to screen. This is probably disabled on your site because it's a security risk to some degree - an attacker can see more information when errors are visible, so the default configuration is often to restrict visibility to people with server access (via the logfiles above).

To enable errors, either configure your PHP to display errors for your site via php.ini / .htaccess (see How can I get PHP errors to display OR add this code (you can add it in civicrm.settings.php or the top of the index.php of your host CMS).

<?php
  error_reporting(E_ALL);
  ini_set('display_errors', TRUE);
  ini_set('display_startup_errors', TRUE);

Making sense of what you see

Once you've taken one of the above approaches, try reproducing the actions which lead to a white screen. If all's gone well, you should see an error (on screen or in your terminal / SSH session).

This is where you can start debugging meaningfully. There's a good chance you're exhausting server resources (timeouts, memory exhaustion) or hitting some coding error, but once you have the relevant error message at hand you'll be much better equipped to track down the source of the problem affecting your site.

Further reading

Stack Overflow: How do I get PHP errors to display?
Where should one look for logs when debugging a new problem?
Drupal.org: Blank pages or White Screen of Death
Joomla SE: What is an efficient way to troubleshoot a White Screen of Death

Notes

If this is the first time you've looked, there may be other errors visible which don't relate to the problem at hand. You may need to discern what the actual problem is still.

If you're not familiar with UNIX, this may seem like a lot of effort. It's a lot of effort to guess your way through debugging a problem though!


Thank You Letter Report How can I include the "Thank you Sent Date" filed in a report

Indeed, I am not seeing the "Thank you date" field as an option to be included in the built in reports, but you could do a find on contributions - if you export the primary fields, the thank you date ends up around column CC (might depend on what version of Civi you are using), or you can and select the relevant fields for export, the thank you date being one of them.

Hope this helps,
Tamar


Looking for Webform Calculator Experience Has anybody experienced Webform Calculator Module with civicrm ?

Could it, for instance, enable conditions such as :

if field1= YES, then field3 = field2

or

if field1= YES, then field2=field2+30

Should (or can) field1, field2, field3 be civicrm field, or simple webform fieldsets ?

Coleman is listed as a maintainer for webform_calculator so there is a very strong chance that it works well with CiviCRM :-)


Access for Blind Users to CiviCRM Can you please tell me if CiviCRM is accessible by the blind using a screen reader ie; Jaws, Window Eyes or NVDA? If so were customizations required?

I am the Director of Organizational Technology for the National Federation of the Blind (the largest and oldest consumer organization of blind people in the US). We have used CiviCRM for a few years to collect data from our website. Since October 2015 it has become our primary member, donor, subscription, and event management database.

The majority of our users (blind or sighted) access CiviCRM through a “portal” we had custom developed. Mainly, this is because we are working to provide access to our affiliates and chapters  around the country and needed a way to containerize their access, but it did also provide a more accessible front end. However, myself and a couple other users do use the Civi backend with screen readers.

From the perspective of using Civi from the backend, I would say that an experienced screen reader user can learn the tricks required to use Civi. I’m a blind user and while I have encountered issues with the interface, I have successfully navigated most of them. In general, the following summarizes my experience with CiviCRM 4.6.5 and JAWS:

The menu bar is keyboard accessible, but awkwardly. Generally I find it best to focus on the first item then TAB (as opposed to arrowing) to the top level menu the user wants to interact with before pressing ENTER to activate the pop-up menu. You will then have to locate the HTML list element containing the menu choices. Often this element appears after the menu bar, or at the bottom of the virtual document (sometimes depending on the CMS theme, sometimes depending on, seemingly, the browser’s mood). In either case, it will not appear immediately “under” the activated menu.
The global contact search field has an autocomplete. While it does actually work with the keyboard, the information the screen reader reads when arrowing through the choices is the contact ID, not the name and other information that is visible on screen.
Accordion panels in the contact record cannot be expanded with the keyboard. In general, panels containing certain contact data (demographic information, address, etc.) are collapsed by default. It is necessary to use the mouse (JAWS) cursor in order to expand these panels.
Civi makes use of the Select2 library in a number of places to generate certain pop-up lists. Basically, the library creates an edit-combo box (one where you have both a pre-defined list of options, but can also type in to narrow this list). While these elements are keyboard accessible, there are occasionally focus issues. As an example, choosing a date range  filter on searches offers selections like, “previous year,” but also allows the user to choose a date range. When selecting the choose a date range option edit fields appear next to the dropdown allowing the user to enter a start and end date range. However, for a screen reader user, pressing TAB after selecting this option will focus on the next group of fields, bypassing the date range fields. Although they don’t use Select2, this behavior is also observed with combo boxes that dynamically populate other combo boxes (like on the import data screens).
I think there are a couple places where fields lack proper labels, but I would need to hunt up specific examples.

I believe most of these issues also persist in 4.7, though we haven't upgraded our production install yet.

I do have web accessibility and development experience and ideas for fixing the issues I've identified. I'm happy to get more involved in CiviCRM development and work with anyone interested in broadening accessibility. We've been pretty focused on getting our install up and our two Civi databases merged, but I should now have more time to start contributing on the accessibility front.

In the interim I'm happy to discuss how I get around the present issues with anyone who needs that advice.

Rachel


Best Practice for CiviEvent using Webform Integration? I have a complex registration process to have Parent + Children (1, 2, or 3) registered by an "Administrator", including Contribution Amount calculation (and on line payment (if possible)).

I use Webform Integration to manage the registration phase and the Contribution Amount calculation ; and I am quite happy with this (amazingly more than expected : I strongly recommend !).

But I am not sure that I fully understand how this Webform process integrates with CiviEvent : for instance : how to integrate :
- Event location and date (and map),
- Confirmation Page,
- Confirmation email,
- ...
which are defined in the Event definition ?

Is there a process Event to Webform and back ?

I use Webform CiviCRM for many Event and Membership registrations - as the key advantage (unlike in CiviCRM itself) you can expose multiple profiles and store them all with relationship - capturing Primary + Spouse + Children all on one page.

Online payment: yes is possible - generally works for inline Payment Processors such as PayPal Pro and iATS Payments (credit card only at this point - on my ToDo list to get this working w/ ACHEFT via Webform CiviCRM). To get online payment to work - you must set up a Contribution Page even if it's just purely for the purpose of the Webform integration - enable a Payment Processor - Webform CiviCRM will use that info to grab/display the Payment Fields and to submit the payment for processing.

Event: location/date/map -> if you go with Webform Integration - do all that in your Webform - add a Markup Element - and off you go. Once you enable Event Registration in the Webform CiviCRM section you can decide which events and how you'd like to sign people up. How to handle the max participants; if and how to waitlist them - etc.

Don't forget to use Webform Layout - to help make things easy to CSS - and also don't hesitate to use conditionals to pop up e.g. #civicrm contacts fields (kids) you'd like to register.

To add waitlist functionality:

enable Participant Status - on waitlist in your webform -> you need
to visit: /civicrm/admin/participant_status?reset=1 and enable both
On waitlist as well as Pending from waitlist
you need to reconfigure your webform_civicrm (Registration Status)
and/or Participant Fee (perhaps a smaller fee or no fee) if you're at
the point where you want to start waitlisting people


Event Registration-Duplicate names, Overwrite on Contact Records Due to using the same email, we have had tons of event contacts histories overwritten with another contact name besides duplicate name entries during registration of events.  With the upgrade to 4.6.10 I am monitoring same.  Currently I am still finding duplicate contact names in the system.  I am unsure of overwritten accounts until such a time where I discover same.  I know there is a few drop downs under duplicate emails in events/on-line registrations.  Which is the best to check off?  Right now it is on unsupervised.  Under Events-on line registration we also have checked off register multiple participants and same email address.

I have to go back 9 years to fix all records.  I would like to not have to do this anymore.

@Lesley Carter-BackOfficeI messed with the dedupe and things are now messed up, got this error:

An error has occurred.
 0   @import url(/administrator/components/com_civicrm/civicrm/css/civicrm.css); @import url(/administrator/components/com_civicrm/civicrm/bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css);    Sorry but we are not able to provide this at the moment. Supervised rule for Organization does not exist Return to home page.    function toggle( element ) { var className = element.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { element.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

Yes, adjusting and using the Unsupervised rule is your best bet to prevent this from continuing.  My philosophy for deduplication is I would rather default to having extra duplicate contacts that I can clean up later than having two people become intertwined and, as you've experienced, can be rather sticky to separate.
Ideas
There are a few ideas thrown around in the comments of this question: Dedupe Rule not working. (Full disclosure: I have an answer on that question). Lesley also has a great recipe in her initial comment to you up above.
Best write up about deduplication
The best free resource for Deduplication understanding and recipes is this blog post by spidersilk: Understanding CiviCRM Dedupe Rules. Section 6 is titled 'Some Recommended Rule Recipes' and section 11 is 'Tips for Setting up Effective Dedupe Rules'.  The whole article is excellent, but for a tldr; those sections are great.
An Extension that could help
The No Overwrite extension can help with accidental over-writes in certain cases and might be worth installing.  We have it installed on our CiviCRM setup.
How we do it
Lastly, just for another example, we have a lot of children in our organization being registered. A parent will often use his/her own email address to register a child, so we had to come up with a way that was more than just email.  Our unsupervised rule is as follows:

First Name; Length - 4; Weight - 5.
Last Name; Length - blank; Weight - 5.
Birth Date; Length - blank; Weight - 10.
Email; Length - blank; Weight - 10.
Weight threshold - 20

This allows matching if the birth date and email address are the same (the only scenario this doesn't work is identical twins, and I'm okay with that risk).  Also, if this is a normal adult registration (and adults normally don't provide their birth date), we can still have a match based on first four characters of the first name, the last name matching, and the email matching.
This catches a lot of duplicates, but certainly not all of them.  Thomas Smith and Tom Smith with the same email address is probably going to be the same person, but our rule will not catch it.  And I'm okay with that.  Again, I'd rather have extra duplicate contacts than incorrectly intertwined contacts.  As a matter of practice, every month or so we manually run General dedupe rules that are "Email only" or "First Name and Last Name" to catch the extra duplicates.  Yes, it's manual work, but it's way easier to take the time for that than separating two people who were not in fact the same.


Has anyone come up with an easy way to enter a household, the members, create the relationship, share the address, etc.? Civicrm is extremely flexible with relationships.  The downside of that is it's a pain to enter new household and their members.  My users complain bitterly about how many steps it takes.  Yes, there are some short cuts but it's still a lot of clicks.   99% of our households are husband wife and happen to live in the same house.

Some of the pain points mentioned are for hh to sort along with individuals in any list of contacts, you have to create the household with last name first, e.g. Smith, Barb and Steve.  This means you then have to manually create the salutation manually, e.g. Dear Barb and Steve.  They also complain about the address saying things like "why can't the individuals automatically inherit the hh address or if one of the ind has an address why can't the rest inherit it"

So has anyone create a form or maybe a webform that has something like this:

Contact 1:  First Name, Last Name, email

Contact 2:  First Name, Last Name, email (If last name same leave blank or prepopulate last name from contact 1)

Shared Address info:

Household info:  Prepopulate household name from contact 1 and 2 (e.g. c1 Lastname, c1 first and c2 first or if c2 last is different C1 Last, C1 first and c2 Last, c2 first)
Prepopulate the salutations from c1 and c2 (e.g. Dear C1 First and C2 first)

Then when you save it, it creates the three contact records and the relationships, with hh having the address and the ind sharing it.

We have setup a webform which enables the creation (or updating existing information) of

1) a household with its own data (phone number and physical/mailing address)

2) one or two adults with their own data (defaulting to our Spouse/Spouse relationship) and makes them share the address of the Household

3) 1-5 children with their own data who share the address of the Household and allows you to choose the relationship to Adults 1 and 2

The length of the Node Export was more than Stack Exchange allowed me to paste in, so you can find the CSV here: https://www.dropbox.com/s/e4vw5a9o15c1aiz/node-export-household-and-family-webform.drupal?dl=0

I don't know how this would work with importing back into your system with Node Export given that we'll have different relationships and tags and slightly different needs, but I think this will get you on the way.


How to email a link to a confidential document in Civi A client runs several night shelters for the homeless & uses Civi.  They want to email a 'daily activity' report to staff & volunteers - the content of which is confidential. All staff & volunteers have access to Civi. The report consists of information about who is duty manager, a list of guests with notes and some information about other local homeless accommodation - so much of it is fairly dynamic and could be in a message template, a Word document or spreadsheet. Because it's confidential we don't want to send the actual report in the email, because the receiver of the email would of course retain the email with the report in their account. To avoid this we want to just send an email with a link to the report that's somewhere in Civi. We tried Google Docs but ran into access problems.    Suggestions are very welcome on how this might be achieved in Civi, please!  We're using Drupal, Civi is at 5.19.3, open to using webforms & Views.

I would be building it as a View and setting the Roles for access to the View from there.


settings_location.php - is there an example I'm trying to browse images in wysiwyg editor (via the kcfinder) (for example Event description) but I get an error due to misconf.
I hits the file civicrm/civicrm/civicrm.config.php which loads civicrm/settings_location.php (which you have to create) but I'm missing something inside this file, Is there an example of it?

The settings_location.php file should not normally be required, but an example is described at:

https://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=83034188

The file civicrm.config.php should be able to handle bootstrap in most common configurations without settings_location.php. However, this depends on having somewhat plain/predictable directory structure, and it could break down when using things like (a) symlinks, (b) special filesystems, or (c) multi-tenant/multi-site installations.


Contribution Widgets Is anyone doing any work on Contribution widgets?  We use them all the time, but they have problems on our end - specifically they do not update immediately when new donations are made - we have to personally clear browser cookies in order to see updated information. (this is likely a local issue - not civicrm)

Is anyone working on a Contribution Widget plugin for core or wordpress (our current setup) - paid or otherwise? Something more visually appealing or dynamic than what we have now?

Many thanks!

Here is a plugin that makes embedding the widgets easier: https://wordpress.org/plugins/civicrm-contribution-page-widget/. But I'm guessing it may not meet your 'nicer looking' requirement as it is just using what widget settings you have but I started using this when I started having issues using the code snippet.

Working fine on my instances.


User Contact View at log-in I would like users to see their own CiviCRM Contact View straight away at log-in. I could create a Drupal module to do this, but what if I want the solution to be CRM independent. Can it be done in CiviCRM itself?

We have done this for Drupal in the past just with a Views Block on the /user page, or wherever they go when they log in.

There is a write up about such a View (to show the users Membership details) in this blog


Datepicker / CKEditor won't load unless "Access CRM" is granted Stumbled across this while setting up specific user roles. Created an "Event Manager" who requires access to creating events. ACL is just "Create Events".

User can access the Event creation URL just fine "/civicrm/event/add?reset=1&action=add".
They can edit the event (fill in fields, etc)
They can press "Continue" to save the event.

They CANNOT do the following until they are granted "Access CiviCRM" permissions:

Use CKEditor (it does not load)
Or the datepicker (it does not load)

It appears additional javascript (or other scripts) are loaded when "Access CiviCRM" is checked.

If this is not a bug, can anyone advise where to look? The reason why we do not want to grant "Access CiviCRM" permissions is because of the Quick Search bar - to which there doesn't seem to be an ability to disable if "Access CiviCRM" is enabled.

I think the best solution is to grant them "access CiviCRM" and implement a hook to remove the quicksearch bar for those users.


Hook to change the Success message after CiviCRM submits a form? I'm writing an extension implementing hook_civicrm_post to move contributions from individual to household if the individual is part of a household. However, I'd like the form to either redirect to the HOUSEHOLD summary or to display something about the household in the Successfully saved status message popup so the user doesn't think the contribution entry failed.

Any ideas how I can do either of those things from the extension?

Xavier's answer is generally right but because you are in the context of a form I advise don't use the function CRM_Utils_System::redirect because that is a rather blunt instrument, and breaks pop-ups and other ajax-based forms (which don't follow the normal round-trip webpage lifecycle). Instead from your hook you can call CRM_Core_Session::singleton()->pushUserContext($urlYouWant); and the form controller will take care of doing the actual redirect or other appropriate action.

So from your hook you'd do:

$url = CRM_Utils_System::url('civicrm/my/path', 'argumet=1');
CRM_Core_Session::singleton()->pushUserContext($url);
CRM_Core_Session::setStatus(ts('Your foo has been barred'), ts('Saved'), 'success');


Assign a group from logged in user contact group to new individual I am trying to assign a group from currently logged in user(One group in assigned only) to a newly created individual.

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

$getContactId = (int) CRM_Core_Session::singleton()->getLoggedInContactID();

try {
    $result = civicrm_api3('GroupContact', 'getsingle', [
        'return' => ["group_id"],
        'contact_id' => $getContactId,
    ]);
}
catch (CRM_Exception $e) {
    echo "error";
}

$getGroupId = $result['group_id'];
$recentContactId= '';
$query ="INSERT INTO `civicrm_group_contact` (`group_id`, `contact_id`, `status`) VALUES ('.$getGroupId', '$recentContactId','Added')";

But problem is that how will I get the id of recently added individuals;

If I understand it correctly you want to add contact (New individual) to a group of  logged in user, then i would write something like this

function search_civicrm_pre($op, $objectName, $id, &$params) {
  if ($objectName == 'Individual' && $op == 'create) {
    $groups = civicrm_api3('Contact', 'getsingle', [
      'return' => "group",
      'id' => 'user_contact_id',
    ])['groups'];
    foreach (explode(',', $groups) as $groupId) {
      $params['group'][$groupId] = 1;
    }
  }
}

HTH

Pradeep


How can I trigger a selection for a Select2 EntityRef element via javascript? The CiviCRM EntityRef form element uses a Select2 select box to make lots of CiviCRM forms more awesome. A user can, for example, search for contacts to choose one. Great.

I am building an extension where I would like to take an EntityRef element from a core form and select a use javascript to select a specific entity (or multiple entities in the case of a multi-select). Is there a javascript function I can call in order to trigger such a selection (by passing in the ID of the entity, for example)?

According to this related question, it should be possible to do this via:

$('#id-of-select2').select2('val', 'value-to-select');

or, if you want to select multiple items in a multiselect:

$('#id-of-select2').select2('val', ['value-to-select', 'another-value']);


Filtering search results to see only the most recent contribution by each contact How do I sort contributions in our database by the most recent contribution date? When I try to search this on the database, it brings up all contributions, not just the most recent and I want to target specific members who have not donated recently. Thanks!

Summary Fields Extension may be your friend. It will create calculated fields for 'latest donation' (and many other such fields) and these are then available in eg Adv Search.

Let us know if that helps with what you are after


CiviVolunteer - Where to put translations file on WordPress after some work on Transifex, we need to install civiVolunteer italian translation on WordPress. Where is the right place to put the .mo file?

Based on this https://github.com/cividesk/com.cividesk.l10n.update/blob/master/l10nupdate.php#L131 it looks like it needs to be within the extension folder in folders 10n//LC_Messages/volunteer.mo This line details the download path for the mo https://github.com/cividesk/com.cividesk.l10n.update/blob/master/l10nupdate.php#L130 the mo is the binary version of the .po files i believe


Memberships not recorded since mid April 2018 (using Webform) Civi 4.7.27

I use extensively Webform Integration to register Memberships.

Since mid April (precisely April 21st, but I don't remember when I did some Module Updates), memberships have not been recorded anymore, though no error message is displayed and Webform Mails are sent (and received).

Some information before further investigation :

My memberships have no associated Contribution and are for Life
They have some associated multi-valued Custom Fields
When they contain a new Contact, the new Contact is not created either
I have the same problem on a Test Civi 5.0.0 configuration

I will report this as a bug to https://www.drupal.org/node/add/project-issue/webform_civicrm, and keep this informed if I find other informations.

ok let’s figure this out:

add the webform_civicrm module version + civicrm version to your question
check if there are any drupal database updates to be executed
use (install if you don’t have it yet) node_clone module to clone your webform
on the cloned form: remove the multi-value fileds - check if the form works without them
use (install if you don’t have it yet) https://civicrm.org/extensions/civicrm-log-viewer to view any configandlog file entries;

Let us know what clues you can dig up.


One email, adapted to membership status I frequently send emails to a large mailing list. In this mailing list there a roughly two categories of contacts:
1) members
2) non members

Ideally all would receive the same email, but I'd like to include a block/message ("the block") in the email for non members that encourages them to either renew their membership or sign up for membership.

I currently use mailchimp to design my emails. If I were to create "the block" in mailchimp, I'd have to create a second version of the mail that doesn't include "the block" and split my mailing list in two parts so that everyone receives what I want them to receive. To me this sounds like a sub optimal solution and one that is prone to go wrong at some point.

Would it be possible to optimise this using CiviCRM? I know that Civi currently copies my organisations address details at the end of each email. Would it be possible to create a block such as described above that Civi automatically inserts in emails to non-members, but leaves out in emails to members without having to send multiple emails?

If so, is it possible to make such a block look nice? (Currently the address details that Civi inserts look really bare). My website is a drupal website.

Thanks in advance for your help. I'm also open to any other suggestions you might have!

Elise

We have a setup like this. It's possible if you're comfortable with the smarty template language. If you enable the smarty email setting, you can put limited code into your email template that, say, does an API call to see if someone is a member. Then display the appropriate 'block' depending on the result. This works, but is vulnerable to users breaking it if they edit the template. I'm certainly interested to see what other suggestions people have.


Invalid value for field(s) : Start Date 01/25/2021. I have also tried with 2021-01-25 I get the above statement when I try to import a membership. I have coded the date in different ways, and eventhough the fields match with my definition I get the same answer. Really I wonder why this field is mandatory and my import fail as a consequence. Can anyone help? I have already registered the Contact so this is step two.

It depends on the date format you have selected on Import Membership form when you try to upload the import file


Time increments in events only increasing by 15 minutes. Can't be specific I was wondering if we could set time to be 11:50 instead of always being reverted back to 11:45.

That’s a Drupal screen -> you need to go to Manage Fields (for the Content Type that this field is on) and hit Edit -> change its configuration


How can I customise site search settings to use a wildcard for a specific entityRef field? Is it possible to override the site search settings with respect to the wildcard search, for a specific entityRef field?

We have the site search setting configured with wildcard search disabled. On a particular custom form I'm injecting an entityRef field using the API to filter by Individual and group. I'd like to override that site setting and allow this to use a wildcard search.

Currently no, it cannot be overridden on a per-field basis. But I could add a core patch to do so if your organization can fund a couple hours work.


Why won't contact ID display in a profile? I want to display Contact ID as a View only field in a profile. I can add the field to the profile. Other View only fields display properly for a logged in user when they visit the relevant contribution page but the Contact ID field is blank. (The profile displays their name, address and phone number. Phone number is the only field they can edit.  They need to make all other changes by editing their Drupal user record.)

I believe I have tried all combinations of Drupal user account registration option? and What to do upon duplicate match under the Advanced Settings for the profile in case a specific combination was required.

The contact ID does show up in the email receipt, which is the most important part I suppose as the receipt is cc'd to someone who needs that contact ID.  However the "empty" Contact Id field on the contribution form will confuse the users.

Does anyone know if/how I can get the Contact ID value to display properly?

(Note: This non-appearance of the contact ID happens on our 4.4.20 installation and also on dmaster.demo.civicrm.org. I have only been able to check the contents of the email receipt on our installation.)

Since this is not available in core civicrm, for Drupal users you can have the contact_id displayed in a Webform : just change the Widget to "Textfield" (in the WEBFORM tab) to make it visible


How to manage AngularJS dependencies within an extension I'm creating an extension and using AngularJS within it. I've found a 3rd party AngularJS library that I'd like to use in my extension (in this case ngInfiniteScroll). What is the proper way to make my extension depend on this external library (and to ensure that the library is installed when the extension is installed)?

I'm pretty new to AngularJS development and CiviCRM development, so I still don't have a clear understanding of the difference between npm, webpack, bower, yarn, grunt, gulp, and browserify. Mostly I need to be pointed in the right direction.

An approach: composer-downloads-plugin

civicrm-core now uses the https://github.com/civicrm/composer-downloads-plugin for Javascript and CSS libraries. You can use the same technique in an extension. For example, suppose you have an extension civinfinite with a composer.json file which declares:

{
  "name": "example/civinfinite",
  "require": {
    "civicrm/composer-downloads-plugin": "~2.1"
  },
  "extra": {
    "downloads": {
      "ngInfiniteScroll": {
        "url": "https://github.com/sroze/ngInfiniteScroll/archive/1.3.4.zip",
        "path": "extern/ngInfiniteScroll",
        "ignore": ["test"]
      }
    }
  }
}

The zip file will be downloaded and extracted into your extension's folder (under extern/ngInfiniteScroll).

For example, suppose that you install civinfinite on a Civi-D7 site under:

sites/default/civicrm/ext/civinfinite

If you run composer install, then the assets will be at:

sites/default/civicrm/ext/civinfinite/extern/ngInfiniteScroll

At runtime, you can determine the URL as:

Civi::resources()->getUrl('civinfinite', 'extern/ngInfiniteScroll/src/infinite-scroll.js');

Similarly, if you're registering an Angular module for use in Civi (hook_civirm_angularModules or *.ang.php), then the registration can reference that path:

[
  'ext' => 'civinfinite',
  'basePages' => [],
  'js' => ['extern/ngInfiniteScroll/src/infinite-scroll.js'],
];

Critical analysis

There are many different techniques for managing JS/CSS assets in PHP projects -- D7 modules have libraries; Backdrop and WordPress modules tend to embed assets within modules; composer has various add-ons like installer-paths, asset-packagist, composer-npm-bridge, composer-asset-plugin, etc. Each of these has strengths and weaknesses.

I would submit that the relative strength of this technique is that it is easy for both developers and site-builders to reason about the behavior. (Tangentially, it's also faster than other composer-based techniques because it has no affect on the size of the dependency graph. But the main purpose is to make it easier to reason.)

For example: Consider that there are different ways in which people may deploy an extension:

One may download an extension as a *.zip file with all assets bundled in. (This is what happens when using the in-app extension UI or cv dl or Extension API.) One may not be running composer at all.
One may clone the extension's git repo and run composer install.
One may have a composer.json in a site-root (and some open-ended mix of dependencies, plugins, configuration options), and then you add the extension as a dependency.

As a developer, it's hard to predict which mix of techniques are being used by downstream site-builders. In the composer-downloads-plugin approach, you can rely on the JS/CSS assets always being in the same place (relative to your code).

As a site-builder, this approach does not require you to add (or change/update) any "repositories" or "plugins" or configuration-options in a composer root-project. You don't even need to have a composer root-project. (You probably should for other reasons... but the extension and its assets aren't going to force you into it.) If a developer changes some small detail of the assets in their package, then it's not your concern.

This approach complies with a simple, pre-existing contract:

The developer decides what code goes inside their extension.
The site-builder decides which extensions to get - and where to put them.

A developer is free to use composer-downloads-plugin without requiring any changes to that basic contract.


Mosaico menu items missing We recently installed Mosaico (and Shoreditch Theme and FlexMailer) on our CiviCRM 5.4 Wordpress installation.

None of the required Mosaico menu items are showing up under Mailings or Administer>CiviMail

I've cleared caches, etc.

Thoughts?

Which version of mosaico did you use, because I had the same issue with mosaico 1.1 (described as stable on  https://civicrm.org/extensions/email-template-builder), but actually it is not supported anymore and you should go with the 2.x releases.


Unable to download buildkit on ubuntu On a fresh Ubuntu system when running the command

  curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir ~/buildkit

as requested on the document on the repository, i get the following error

  bash: line 1: unexpected EOF while looking for matching `''
  bash: line 2: syntax error: unexpected end of file

and the download fails to proceed.

Discussed this a bit over Mattermost. For debugging this, it made sense to run the first half of the command and check the output, e.g.

curl -Ls https://civicrm.org/get-buildkit.sh

It should display a bash script. However, it actually displayed an error message about an IP restriction. A quick work-around was to download the script through a different URL, i.e.

curl https://raw.githubusercontent.com/civicrm/civicrm-buildkit/master/bin/civi-download-tools | bash -s -- --full --dir ~/buildkit


Foreign Key issues when restoring db When we export our db and try restoring to another server we get the foreign key issue below so cant progress. Is it safe to Disable foreign key checks when importing into the new server?
(we tried to fix the indexes through the api even)
ERROR:
SQL query:
ALTER TABLE `civicrm_activity`
 ADD CONSTRAINT `FK_civicrm_activity_campaign_id` FOREIGN KEY
 (`campaign_id`) REFERENCES `civicrm_campaign` (`id`) ON DELETE SET NULL,
 ADD CONSTRAINT `FK_civicrm_activity_original_id` FOREIGN KEY (`original_id`) REFERENCES `civicrm_activity` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `FK_civicrm_activity_parent_id` FOREIGN KEY (`parent_id`)
 REFERENCES `civicrm_activity` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `FK_civicrm_activity_phone_id` FOREIGN KEY (`phone_id`) REFERENCES `civicrm_phone` (`id`) ON DELETE SET NULL,
 ADD CONSTRAINT `FK_civicrm_activity_relationship_id` FOREIGN KEY
 (`relationship_id`) REFERENCES `civicrm_relationship` (`id`) ON DELETE SET NULL

MySQL said: Documentation

1452 - Cannot add or update a child row: a foreign key constraint fails (chercivi_life1.#sql-622_4c0a, CONSTRAINT FK_civicrm_activity_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign (id) ON DELETE SET NULL)

I think there might me some orphan data in your civicrm_activity table. Can you run the below query to check if you get any result?

SELECT * FROM `civicrm_activity` ca
LEFT JOIN civicrm_campaign cc ON cc.id = ca.campaign_id
WHERE ca.campaign_id IS NOT NULL AND cc.id IS NULL;

If you get result then probably you will need to delete this activity or make campaign_id to NULL for all this records.

  Note: Foreign key is important in CiviCRM, Many foreign keys are set to ON CASCADE DELETE or SET NULL. So its possible you might end up more orphan data in your database if you disable them which may have problem while upgrading CiviCRM in future.

You can use below query to either update the civicrm_activity.campaign_id or delete campaign activities

UPDATE `civicrm_activity` ca
LEFT JOIN civicrm_campaign cc ON cc.id = ca.campaign_id
SET ca.campaign_id = NULL
WHERE ca.campaign_id IS NOT NULL AND cc.id IS NULL;

OR

DELETE ca.* FROM `civicrm_activity` ca
LEFT JOIN civicrm_campaign cc ON cc.id = ca.campaign_id
WHERE ca.campaign_id IS NOT NULL AND cc.id IS NULL;

  Note: Backup your database before you execute above sql.

HTH

Pradeep


Fetch membership type along with the contact details with civicrm_api I am trying to create a lists of contact along with the membership type associated with each contact. Below is the code I have:

$result = civicrm_api3('Contact', 'get', array(
    'sequential' => 1,
    'return' => "tag,display_name,id,image_URL",
    'contact_type' => "Organization",
    'options' => array('limit' => 300),
  ));

I am not sure how to do join api call to both contact and membership, so that I can get all detail in one single api call.

so I am wondering if anyone can help.

So, far I have created another api call to each contact list returned form the above api call, like this:

foreach($result['values'] as $member){
    $ufmatch = civicrm_api3('Membership', 'get', array(
      'sequential' => 1,
      'contact_id' => $member['id'],
    ));
    $member['member_type'] = $ufmatch['values'][0]['membership_name'];

    $nodes[] = array(
      'node' => $member,
    );
  }

$members = array(
    'nodes' => $nodes,
  );

  return drupal_json_output($members);

But there are hundreds of contact list. So, it takes almost 2-3 mins load all data.

Can anyone please guide me in a right direction. Thanks in advance.

You need to do it the other way around. Membership is the main entity and then you join on Contact. The api explorer can help put it together but you're looking for something like:

$result = civicrm_api3('Membership', 'get', [
  'sequential' => 1,
  'return' => ["contact_id.id", "contact_id.display_name", "membership_type_id"],
]);


Spark Hosting Integration with Existing Wordpress Site I have an existing Wordpress Site. I would like to know how do I integrate my Spark hoested site with my Wordpress site. The documen

Check out this answer to a similar question and see if it answers your question:
https://civicrm.stackexchange.com/a/27915/181


User provided ratings of events and directory members Has anyone created a way for users to provide feedback in the way of ratings similar to the product reviews on Amazon or Angie's List? There are two scenarios where we may be looking to do something like this.We are working in a WordPress install with Version 4.6.4 of CiviCRM

A recurring class, workshop or other event. Past attendee feedback so prospective attendees could decide if it is good for them.
A directory listing where service providers could be rated to help visitors make a choice on who they may contact.

Just looking to see if anyone had done something like this before we dive in.

Under Drupal, you could do this with civicrm_entity to link a Drupal entity with your CiviCRM entity.  There's also the abandoned civicrmentity (no underscore) which lets you add Drupal fields directly to a CiviCRM entity without a corresponding Drupal entity.

AFAIK there's no equivalent functionality in Wordpress, so you'll have to find a Civi-native approach.  You may want to get in touch with this person to get the self-service CiviEvent update functionality into core - then you could add a "rating" custom field for participants to fill out after a class.  From there, a simple extension to calculate an average rating on the event would be trivial.

Doing this for contacts is a little trickier natively.  I might try to do it using a new activity type - "created by" would be the user submitting the rating. "With" would be the person being rated.  Again, you'd need an extension to average/count the ratings.


How to create custom opt-in email for webforms I've seen the option to double opt-in (send a confirmation email) when choosing a public group in webform, but I'd like to be able to:

customise the confirmation email sent
have a double opt-in for private emails

Is there a way to do that in webform civi?
I tried to find a checksum token to be used in a custom email, does it exist?

Alternatively, is there a webform specific confirmation page that I could use? eg. https://www.drupal.org/project/webform_confirm_email

You can daisy-chain webforms using checksums, so on form 1 you set up your fields to collect contact detail data, then set up a second webform which actually adds them to your private email group, and having set the second webform up you can find the url with checksum on the CiviCRM tab of the webform, and then set that as the link that goes out in the email from the first webform.


Using Google Analytics to track events We'd like to set up goals inside CiviCRM regarding people signing up for events. How would you go about doing that? I'm not sure what URL we would use for them.

Our events use price sets; take payments via Paypal or pay later (send check or call in with credit card info).

Drupal CMS. Currently it's on Civi 4.7.22, but we'll be upgrading to the lastest version soon.

UPDATE: Has there been any progress on this? It really seems odd that there doesn't seem to be a way to track conversions in CiviCRM. The only thing I've been pointed to is something that is 3 years old and therefore unlikely to work with the current CiviCRM.

There was some work done on CiviCRM integration with Google Analytics as a part of Google Summer of Code program.
This should be a good base. Check https://civicrm.org/blog/vishalagarwal/gsoc-completion-report-on-integrating-google-analytics-with-civicrm


Missing Input Parameters Error I've been seeing a few strange errors on one of my CiviCRM (4.4.4) site recently.

***ERROR***
Array
(
    [message] => Missing input parameters
    [code] =>
)
...
REQUEST_METHOD:     GET
QUERY_STRING:       reset%253D1%2526jid%253D69%2526qid%253D1605%2526h%253D077ec51a7e598906
REQUEST_URI:        //civicrm/mailing/optout?reset%253D1%2526jid%253D69%2526qid%253D1605%2526h%253D077ec51a7e598906
SCRIPT_NAME:        /index.php
PHP_SELF:           /index.php
REQUEST_TIME:       1428513094

Based on the error message, it looks like the optout request is somehow getting encoded, which yields a CiviCRM "Sorry but we are not able to provide this at the moment" error.

At first, I thought that there was a problem with the request, but I noticed that if I decode the request URI, I get a valid optout address.

It seems that there might be an email client out there incorrectly encoding the optout and unsubscribe tokens, but I haven't been able to reproduce this in testing both HTML and TXT email formats.

Any thoughts about what might be happening here?

This sounds like an issue a customer of ours encountered. In the end they resolved it at the device level.
From our issue tracker notes on the subject:

The issue is to do with character encodings. CiviCRM emails are sent with the following headers:

Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset=utf-8

Whereas it appears Exchange is re-encoding these as 'quoted-printable' when serving them to the iOS device:

Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Here was their final feedback to us

"You were right about this being something to do with legacy mailservers, etc. Sort of. I sorted out how to replicate this behavior on ANY iOS device. Simply create a new mail account on your iOS device using the "Exchange" option as outlined here: http://www.macobserver.com/tmo/article/how-to-set-up-gmail-on-ios-using-exchange-activesync
Although he isn't here today to ask, I believe our ED has his email setup this way on both his iPhone and iPad, and this is causing the issue. I will check in with the member who is experiencing the same issue and see if they are on an Exchange server or a Google mailserver set up in a similar manner.
I'm setting this to resolved, and we'll work internally to get all our people on the correct iOS settings.
Thanks much for your help!"


Civievent Confirmation Url Exit Page Hello is there a way I can have people redirected to a specific url after they register for an event.  It seems in the civi event registration I can only specify text and email.  It seems this would be an important feature to track registrations through Google analytics.  Any help would be great.  Thanks!

Happy CiviDay (well in NZ it is)

take a look at the Front End Page Options extension that Fuzion developed previously.

Note the requirement for the Entity Setting extension

Let us know how you get on and which Civi version you try it with.


Discount entry field not displaying on membership signup A discount entry field is not displayed on my membership signup form. I have created membership types and created a discount for one of the membership types. The discount is active.  The top of my signup form looks like this:

My discount looks like this:

I added the price field options in hopes that would make it work, but it didn't. Any ideas?

I have other discounts for events and they work fine. I am using civi 5.4.1.

For the particular client that reported this, it turns out that the issue was caused by a change made to a membership type after the price set was already associated with the contribution page, but the error was only presented if one clicked on the Save button of Memberships tab of the contribution page configuration.

To confirm whether this is the case to you - navigate to the Memberships tab of your contribution page and click the Save button to see if you are presented with the following error message:

  The membership price set associated with this online contribution allows a user to select BOTH an auto-renew AND a non-auto-renew membership. This requires submitting multiple processor transactions, and is not supported for one or more of the payment processors enabled under the Amounts tab.

Meaning - when using a price set, you can either offer auto-renew for all memberships on a given page, or none of them, but you can't offer a mix. On the other-hand, if you use the built-in membership fees section, you can select which membership types you wish to have the option (or be required) to auto-renew (so long as your payment processor supports auto-renewal).

If you don't have a payment processor that is configured to allow for auto-renewal:

Navigate to Administer > CiviMember > Membership Types
Ensure that the Auto-renew Option for all membership types is to to "No auto-renew option"
Navigate back to the Memberships tab of the contribution page and click the Save button - the message should no longer appear
Click on the Contribution Links button at the top and select Test or Live - the discount box should now appear (assuming that the discount code is configured accordingly).

Hope this helps!


Error on Stripe Payment Processor Am in the process of switching from Paypal to Stripe. (Joomla 3.4.8 & CiviCRM 4.6.10).

Everything appears to be correctly configured but something must be wrong as on clicking confirm contribution I get a reply:

Error Oops! Looks like there was an error. Payment Response:
Type:
Code:
Message:

Which is blank. When I check Stripe's log I can see that my info was received and then something returned:

Parsed Request POST Body:
key: "pk_live_[trimmed]"
payment_user_agent: "stripe.js/b3b3690"
card:
name: "[trimmed]"
address_zip: "HA3"
number: "***************"
cvc: "***"
exp_month: "11"
exp_year: "2018"

Response body:
id: tok_17SA6RHq4Z0Eyf9xt0WKzQvv
object: "token"
card:
id: card_[trimmed]
object: "card"
address_city: null
address_country: null
address_line1: null
address_line1_check: null
address_line2: null
address_state: null
address_zip: "HA3"
address_zip_check: "unchecked"
brand: "Visa"
country: "GB"
cvc_check: "unchecked"
dynamic_last4: null
exp_month: 11
exp_year: 2018
funding: "debit"
last4: "****"
metadata:
name: "[my name]"
tokenization_method: null
client_ip: "92.10.229.3"
created: 1452535755
livemode: true
type: "card"
used: false

The only thing I can think that's wrong is the webhook address for Stripe as this page suggests the path is different to the plugin's instructions: https://forum.civicrm.org/index.php?topic=27531.0

I've tried with the URL specified in the plugin instructions:
/index.php/component/civicrm/?task=civicrm/stripe/webhook
as well as
/media/civicrm/custom_ext/com.drastikbydesign.stripe-1.9.1/packages/stripe-php/lib/stripe.php
/media/civicrm/custom_ext/com.drastikbydesign.stripe-1.9.1/templates/CRM/Stripe/Page/Webhook.tpl
but nothings works. (I'm using full paths but can't paste them into Stackoverflow without more reputation)

Any help really appreciated.

Nic

Per our conversation, my current guess is a recent API change on Stripe's end is causing your issue.

My test install still works, but my API version is set to 2014-10-07.

Here is the CHANGELOG from my working version:
https://stripe.com/docs/upgrades?since=2014-10-07#api-changelog


How do we set up WordPress front end pages to allow our team to access CiviCRM admin tabs etc.? After viewing the video of this webinar, I'd like to emulate the page that Erik Hommel had shown. CiviCRM 101 for Newbies https://www.youtube.com/watch?v=a5bjr0s02NQ

It looks like he had a front end page to allow users to access the CiviCRM admin area.

We are exploring CiviCRM to see if it will meet the needs of our non-profit organization. We need users to access the contact and case modules primarily. We'd like to set this up as front end pages that would not be visible to the public but perhaps set up with role permissions and possibly limit some of CiviCRM functionality. They need to enter cases and contacts for clients who call with questions, asking for publications etc.

I've read about shortcodes for creating front end contribution and events pages, but nothing about the CiviCRM admin area with the tabs across the tops to create new contacts, cases, dedup contacts etc.

Does anyone have any information or links to where this might be in the documentation or if it's even possible?

Thanks in advance for any help offered.

One issue is that in Drupal, there isn't really a division between front-end and back-end.  The whole idea of an administration theme in Drupal is relatively new, and the default prior to Drupal 7 was that settings forms would look no different than content pages.

Meanwhile, WordPress (and, to an even larger degree, Joomla!) has a clear delineation between front- and back-end.  CiviCRM's main interface (the part for trusted users to see other contacts' stuff) is considered a back-end feature, and you have to access it via the WordPress administrative menu.

(That said, at least in WordPress it's a relatively smooth process to get to the back-end.  In Joomla! the login sessions are independent.)

To accomplish what you need, create a dummy user to serve as a prototypical case manager and do the following:

If you haven't already, install a role editing plugin for WordPress to allow you to define a new role for case managers.
Go to Administer > Users and Permissions > Permissions (Access Control) in CiviCRM and then click WordPress Access Control.
You should see a column for your newly-created role with a bunch of checkboxes.  Each row is a separate capability within CiviCRM, and by default, your new role will have none that are special.  You may need to experiment a bit with granting capabilities, but the ones I know you'll need to grant your new role are:

CiviCRM: Access CiviCRM
CiviCase: access all cases and activities

Most permissions have a description (shout out to Jane Hanley and Tommy Bobo for actually documenting all of them at a code and documentation sprint), so you can get an idea of what others you should grant.  Unless you grant specific ACLs (see below) for your users, for example, you'll probably want to also grant CiviCRM: edit all contacts and CiviCRM: view all activities to your role.
Use the "Private Browser" feature in Firefox (or "Incognito" feature in Chrome) to log in as that prototype user.  See if the permissions seem correct for that sort of user.  If not, go back to the WordPress Access Control page as an admin and adjust accordingly.  (When you, the admin, grant or revoke capabilities, you, the case manager user, should probably log out and then back in to make sure the permissions are working correctly.)

If you want to set up detailed permissions over subsets of contacts, fields, etc., you'll need to use CiviCRM ACLs to grant access.   Permission is additive, so if, for example, a user has the CiviCRM: edit all contacts capability, the ACLs for editing contacts will have no effect since that permission is already granted across the board.

Finally, check out the CiviCRM User Guide page for Permissions and Access Control for a more thorough guide to this.


How to add Thai language to CiviCRM in WordPress? I'm using WordPress v4.9.5 and install CiviCRM v4.7.31
I want to activate 'Thai' language to CiviCRM, but there is no option to include this one into system.
I try to check at Administrator > Localization > Language, Currency, Locations
There is only one available which is "English (United States)"

I also try to contribute to translate project at https://www.transifex.com/civicrm/civicrm/translate/#th_TH but there is no progress yet, it's about 5%

I download l10n from https://download.civicrm.org/civicrm-4.7.31-l10n.tar.gz but don't know how to install these folders to CiviCRM (there are multiple folders of l10n, and sql folder which does not have Thai files)

Could anyone help me?

Since it's below 20% they aren't included in the download. You can use the instructions in the Administrator Guide wiki to get the files into CiviCRM. There is also more information at https://lab.civicrm.org/dev/translation/wikis/home