How to change the encoding in pdf documents?

I don't think it's the encoding it seems that none of the included fonts in dompdf support it. See also https://stackoverflow.com/questions/16384517/dompdf-character-encoding-utf-8. If you look in the vendor/dompdf/dompdf/lib/fonts folder there's a readme about DejaVu, and it says you can get the font from http://code.google.com/p/dompdf and copy it into your dompdf/lib/fonts folder. Then as the first link describes you need to change the font used by the Civi message template you're using, e.g. in the template under Administer - CiviMail - Message Templates if you edit the template you'll see either <font> tags or something like style="font-family: Arial", and you can change the font there. If you're pdf'ing reports you can edit css/print.css.

Note that clicking the .ttf files at the link above seem to be redirects to another page where you can actually download the real file. If you just save the .ttf files directly they aren't really ttf files.

Also in order to get it to recognize the .ttf I had to add this to the print.css file:

@font-face {
  font-family: 'DejaVu Sans';
  font-style: normal;
  font-weight: normal;
  src: url(https://mysite.org/path/to/civicrm/vendor/dompdf/dompdf/lib/fonts/DejaVuSans.ttf) format('truetype');
}
@font-face {
  font-family: 'DejaVu Sans';
  font-style: italic;
  font-weight: normal;
  src: url(https://mysite.org/path/to/civicrm/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-Oblique.ttf) format('truetype');
}
@font-face {
  font-family: 'DejaVu Sans';
  font-style: normal;
  font-weight: bold;
  src: url(https://mysite.org/path/to/civicrm/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-Bold.ttf) format('truetype');
}
@font-face {
  font-family: 'DejaVu Sans';
  font-style: italic;
  font-weight: bold;
  src: url(https://mysite.org/path/to/civicrm/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-BoldOblique.ttf) format('truetype');
}


Including Member Login to a CiviCRM Site

You have a few questions here so I will try to address them individually.

The login and user accounts are handled by WordPress. CiviCRM syncs with the WordPress user accounts so when a WordPress user is logged in it connects to a CiviCRM contact. If that user then goes to register for an event, make a contribution, etc. the form will populate with their current information and changes will be saved to the CiviCRM database.

There is a WordPress plugin called "Members" which allow you to create custom user roles and has a nice login widget.

You can use a combination of profiles & the user dashboard to allow logged in users to view and change their engagement with your organization through WordPress front end pages.

This plugin https://civicrm.org/extensions/civicrm-wordpress-member-sync will change a user's role based on their membership status. So if a you have restricted content or discounts based on membership and a membership for a contact expires the user's role will change to reflect their new status and content will be restricted.

There is a lot here but with some planning it is all doable.


GoCardless Direct Debit integration for CiviCRM: will this extension handle 5 year memberships?

I think thats perfectly possible within GoCardless. You would need to setup a plan for each of the differing membership collection periods you would like to collect for in order to use it as a traditional Direct Debit. FYI a Direct Debit is a UK equivelant of SEPA with some technical differences i.e. UK bank accounts only etc.


"This site can't be reached" error message when trying to

This error is unfortunately not enough information to go on.  I would suggest checking your CiviCRM log and perhaps your web server's error log as well.

If I had to hazard a guess though - it's possible that some element of your Joomla theme is adding text (perhaps a header or footer) to every page - and this is causing the PDF to be incorrectly formatted.  If that's the case, you should see this same error when you print any PDF.


Scripts not running in contribution pages

I couldn't find it as well, so what i did is in css of the template, I hid the label. This was my workaround.
.crm-section section-pricesetTotal  {
color: #ffffff;
font-size: 0px;
}

You may want to clean up your profile display in the template as well, have the labels and fields on the same line.


Can you change your default 'Activity Status' for adding a new activity?

Yes, if you have access to your database, otherwise I don't think so.

You can edit your database. Look for the table called civicrm_option_value and search for WHERE label LIKE 'Scheduled' and WHERE label LIKE 'Completed' and change the values of is_default to 1 or NULL

Here are the exact commands you can run:

UPDATE civicrm_option_value cov JOIN civicrm_option_group cog ON cov.option_group_id = cog.id SET cov.is_default = NULL WHERE cov.name = 'Scheduled' AND cog.name = 'activity_status';
UPDATE civicrm_option_value cov JOIN civicrm_option_group cog ON cov.option_group_id = cog.id SET cov.is_default = 1 WHERE cov.name = 'Completed' AND cog.name = 'activity_status';


Upgrade from 4.7.14 to 4.7.15 failed on Database Upgrade

I experienced this same error today.  In my case, I had mistyped a command into the version control system - so I had a Civi 4.7.15 database with a Civi 4.4 file system!

In Civi 4.7, the way that configurations were stored in Civi changed.  You would only get this error if the code that was running was old.  I would check to see if you have another copy of CiviCRM somewhere in your filesystem.  Feel free to comment on my answer if you'd like some followup on how to find what I'm describing; let me know how you access your filesystem.


(How) Is it possible to add text-links to a report?

In this case of altering an existing template - find the function that controls how the activities are displayed and setting the $viewLinks variable to True - as shown below.

public function alterDisplay(&$rows) {
    $entryFound = FALSE;
    $activityType = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE);
    $activityStatus = CRM_Core_PseudoConstant::activityStatus();
    $viewLinks = TRUE;
    $context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'report');
    $actUrl = '';


How can I let users specify which address is their preferred address (e.g. work or home) within a profile?

Adding as an answer since user never came back on this one.

This can be done via webform_civicrm for sites using Drupal where Location Type and Phone Type can be provided as 'user select' fields.


If you are after civicrm documentation the address is book.civicrm.org  (ie no "s" on book). That takes you to a page which directs you to various documentation.

(If you are looking for the user and admin guide for v 4.6 you can go directly to gitbook.civicrm.org.

Did you find that URL somewhere on the civicrm site?  If so, please let me know where it was so that it can be corrected.


Menu bar missing on fresh CiviCRM on Wordpress

The issue is the way WP Engine builds the user directory structure.   We have a proposed patch in : https://github.com/civicrm/civicrm-core/pull/8494

Until that is merged, you can use the answer listed here: Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus

Make sure the global $civicrm_setting; precedes $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://example.com/example-resource-url/';


CiviMail doesn't save when using Checksum event links

I just had this exact same problem.  (I'm on Version 5.25.0, posting over a year later, so an upgrade would not have been the answer)
What "fixed" my problem was to change the order of the parameters so that the checksum parameter was first after the ?
https://DOMAIN.com/WEBFORM?{contact.checksum}&cid1={contact.contact_id}
instead of:
https://DOMAIN.com/WEBFORM?cid1={contact.contact_id}&{contact.checksum}
It is odd that the checksum token inserts "cs=" before it, which breaks the URL validation.


Ok, I found it.

In CRM/Badge/BAO/Badge.php around line 101 it says:

// hack to fix date field display format
if (strpos($element, '_date')) {
  $value = CRM_Utils_Date::customFormat($value, "%B %E%f");
}

So I just re-hacked the hack and replaced "%B %E%f" with "%e %B %Y".


I've modify this css line to solve the problem :

    .select2-container .select2-choice > .select2-chosen {
    line-height: 15px;
    }


Change the root directory D8 [docroot > web]

Drupal itself doesn't care about its folder name (at least, not that I've found).  CiviCRM cares, and so does Composer.

When you rename your folder, find the installer-paths section in composer.json (in the webroot) and change docroot to web there.
You'll also need to change all instances of docroot in civicrm.settings.php.
Rebuild your Drupal cache and flush Civi caches as well.
If you have absolute paths (that is, not using tokens like [cms.root]) in Civi's Administer » System Settings » Directories or Administer » System Settings » Resource URLs menus, change those too.
Of course, don't forget to change your web server configuration :)


I would make "handover" an action rather than an event. Actions are things like meetings and phone calls, natively include two or more contacts and a timestamp, and you can add action types of your own by going to Administer > Customize Data & Screens > Activity Types. Play around with that and see if it works for you.


Price is not showing up on the registration page after Joomla to Wordpress integration

I'd try upgrading Civi to a more more recent version.

If that does not fix it, I'd look for a plugin/theme conflict. Disable all plugins except Civi and try it. If it works, start enabling plugins until it fails again. If it still does not work, try a basic WP twenty-something theme and see if it works.


Allow users other than Administrator to view report details

I found the issue, although it is a little confusing.   First I gave all permissions to the role and it worked, then I started working back to find out which permission needed to be checked.  It turns out that this one "CiviCRM: access deleted contacts " is the one that must be checked for other roles to view the details in a report.   Weird.


Error when trying to view profile list on frontend by public

Finally what I did is create a URL type menu (instead of a CiviCRM profile view menu) with the URL of the list once the "return to list" link is clicked. This way, a user does not need to be logged in to see the list.


Cron failing on Update Membership Statuses and Send Renewal Reminders

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

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

Hints below:

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

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

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

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

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

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

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

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

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

var_dump($membership);

and then

var_dump($membershipID);

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

Membership scheduled task is now running as usual.

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


Seems like either it was unfinished or the usual tracking was maybe intentionally left out. More info here https://github.com/civicrm/civicrm-core/pull/11411


'Household member' relationship type can't be (re?)activated through the interface?

Do you have any extensions that might have disabled it? Otherwise I'm not sure how that would happen either but if you want to live on the edge you can use phpmyadmin or equivalent to do:

UPDATE civicrm_relationship_type SET is_active=1 WHERE name_a_b = 'Household Member of';

You can also do it with api explorer (/civicrm/api3) and choose:

Entity: RelationshipType

Action: Create (yes, create - it means update)

Remove the suggested parameters and add a parameter Relationship Type ID = 8. You can confirm the id by hovering over the View link in the Relationship Types listing screen and looking at the url at the bottom of the browser, but it's always 8.

Then add a parameter Relationship type is Active = Yes

Click Execute.


How to control API4 permissions for CRUD operations?

Events

The API kernel broadcasts an authorise event.

Core permission check listener

The main API permission check subscriber will respond to the event by:

$apiRequest = $event->getApiRequest();
if ($apiRequest['version'] < 4) { /* blah */ }
elseif ($apiRequest['version'] == 4) {
  if (!$apiRequest->getCheckPermissions()) {
    $event->authorize();
    $event->stopPropagation();
  }
}

Adding your own listener

If the core logic doesn't meet your needs, it is possible to get the symfony event dispatcher service and add either a listener (for single events) or a subscriber (for multiple events).

For example, to add a subscriber:

$subscriber = new MySubscriberClass();
\Civi::service('dispatcher')->addSubscriber($subscriber);

When your listener/subscriber is called, then call the $event->getApiRequest() to find out the parameters you are being asked to authorise. If the event should be authorised then call $event->authorize().

SQL clauses

For actions based on get(),
the selectQuery->getAclClause() method will call $baoName::getSelectWhereClause($tableAlias) to add a where clause.

It doesn't seem possible currently to apply differing ACL logic depending on the action with this method.


How to Manage View Title according to Contextual Filters

I can't quite make out all your requirements from your description - but I do have an example that (possibly) comes close to this. I don't use contextual filters though - I use Exposed Filters to identify which of 150 Contribution pages - specific Donations belong to:

Note that the URL in this case is:
/donations-via-group-contribution-pages?financial_type=All&contribution_page=43

So you could pass in that URL (or for any other contribution_page_id) -> and then have a screen for a sub-organization;

Thus far I've only used contextual filters for Drupal Commerce Views -> with a Contextual filter for Drupal userid -> so that we can then have permissions to only show Orders that belong to a specific user;


HTTP Status Code error When Sending SMS in Civicrm-Wordpress

Check the phone number and see if there is the correct country code.  The code was not adding the 1+ for US/Canada yesterday, April 26th.  See comments on the file in GitHub for a temporary workaround:  https://github.com/PalanteJon/org.civicrm.sms.clickatell/commit/ef4e4119b76331ee90bf547044607822907aa323#commitcomment-17262754

Here's a PR request with the workaround:
https://github.com/gah242s/org.civicrm.sms.clickatell/commit/aa74097cf66510710b23c22bae5735db59c156db


You may find this wiki page helpful: Moving an Existing Installation to a New Server or Location


Mapping custom fields to CiviCRM's standard fields

The freelancer wasn't familiar enough with CiviCRM to realize that the municipality field we were looking for was already an integrated part of the CiviCRM through the county field.


Can I customise the columns on the 'Find Participants' page?

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

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

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

HTH

Pradeep


How do I add a contact to a group using the API?

Open API Explorer - Support menu > Developer > API Explorer and use GroupContact API to add contacts to group. See an eg in the screenshot below -

API formed for PHP is -

$result = civicrm_api3('GroupContact', 'create', [
  'group_id' => <group_id>,
  'contact_id' => <contact id>,
]);


How can you provide a volume discount on event tickets?

The hook hook_civicrm_eventDiscount runs at the right place where you could apply discounts based on the number of people in the booking ... but there is a caution in the documentation: "This hook is outdated - notable, CiviDiscount does not make use of it."  Maybe because of that there is no guidance on how to use it.

You probably want to investigate the implications of it being 'outdated' before you choose to use this and it would be useful if someone could weigh in with some background on the comment - and ideally update the dev docs too!


Show translated string in a template field (using smarty?)

I got it:

{if $tsLocale eq 'es_ES'}
    Spanish string
{else}
    Catalan string
{/if}

An easy way, useful to translate custom form strings used once, for example ;-)


Change or turn off the auto renew cancellation system email

This looks to me like text from the Recurring Start and End notification... did you check there perchance?


How to send conditional mail confirmation after completing payment using webform

You could use the CiviRules extension (https://civicrm.org/extensions/civirules) and the E-mail api extension (https://civicrm.org/extensions/e-mail-api).

You could setup a rule which is triggered when a contribution is added and add a condition the payment instrument (and probably also the financial type). You could then add an action which is send e-mail (this action is provided by the e-mail api extension).

Documentation of CiviRules is at: https://docs.civicrm.org/civirules/en/latest


An elegant solution really depends on having a reliable way to detect that someone is an existing member.  However, assuming you have such a method (e.g. members are logged in or can be detected via unsupervised dedupe rules), I would recommend using CiviDiscount to apply an automatic discount based on membership status.


Why is it important to define new Entities for new types of data?

The benefit of going through the pain of DAO and co is not obvious for me neither, and I have to confess skipping them and doing it the same way as you did.

One key reason would be to benefit from all the security that the DAO handles by default: are you sure your extension is done properly and you properly escape all the SQL?

On other reason might be documentation: it might be easier to find which fields exist/are mandatory based on the schema/BAO. Eg. on the API explorer, are all the fields for your extension properly shown and do they have their description?

I know that some work was done to use a more modern SQL abstraction than the one we have, but I don't think it is something that we could use in extensions. Would be super useful IMO.


CiviVolunteer might be a better fit for your requirements than CiviHR.  See also Volunteer Timesheet


Upgraded to 5.28.3 in WP - how to fix crash?

This isn't really a WP error, it's a file that's either missing or has the wrong owner/permissions.
Look for /home/fovps1e/public_html/wp-content/plugins/civicrm/includes/civicrm.compat.php.  Is it present?  If not, you may need to unzip another copy of WordPress.  More likely, it's present, but its file ownership/permissions make it unreadable by whichever user is your PHP user.


Status message "Thank you. Your information has been saved." is missing on profile submit

There might be JS error which is causing status message not to appear. Please check for any JS error on browser console. i feel some wp plugin might be conflicting with CiviCRM plugin.


Why can't all admins see all components?

When you enable CiviCampaign you may need to visit your Permissions and give the CiviCampaign permission to the required roles.


Can you edit webform submission values without invoking payment?

Here's another possible solution
https://www.drupal.org/project/webform_import


Which contacts in a mailing group are NOT recipients of a mass mailing?

The following are all different:

No bulk emails (User opt out): This is what happens when someone opts out using the link in a bulk mailing. This means they won't be included in any bulk mailing. It doesn't affect sending single messages to that contact.
Do not email: This means we can't/shouldn't email them at all, even singly. Actions > Send an Email won't be available.
Deceased: AFAIK works similar to "Do not email".
On hold: Set by the CiviMail bounce processing. Probably means a bulk mail to them bounced. This means the address is invalid/inaccessible, not necessarily that they don't want us contacting them.
Unsubscribe: This is a different meaning and a different link to "Opt out". This is not a flag that is visible from the contact summary, but from the groups tab. Bulk emails are sent to groups; unsubscribe causes the contact to be set as 'removed' from the group that caused them to get that email. It does not opt them out of all mail or even all bulk email.
(One of) their email address(es) should be marked as primary. This should happen automatically but if they don't have a primary email address this might cause issues.


I had a closer look at all the folders and saw there was a symlink in the templates folder pointing to the templates folder! This must have been preventing the upgrade. I think the symlink was there because earlier we had had problems with mailings not finding the social icons and had created a symlink to solve that problem and then forgotten about it!

Once I removed the symlink Mosaico upgraded fine.


Short version, assuming you mean they are just in Trash, is

go to Adv Search,
tick the box for 'search in trash'
select the ones to restore
then under Actions choose 'restore from trash'


Has CiviCRM ever undergone formal usability testing?

No, it hasn't.

The National Democratic Institute (NDI) did a bit of less than proper formal usability testing: https://www.nditech.org/blog/2014/08/testing-one-two-three with details of process at https://nditech.org/blog/2014/07/test. Their focus was on their staff using it for their specific purposes, so the results were skewed, and led more to tailoring for their specific needs than general usability improvements (see https://www.nditech.org/demtools/civiparty).

It would be A VERY GOOD THING to get formal usability testing for front end, back end, and admin/configuration workflows and forms. We should conceive of this as an on-going process, rather than a one time initiative if that is possible on your end. We would need to find resources to rework things in response to recommendations. It might be that 5.0 or 5.1 would be a good version to start incorporating feedback.

The Drupal testing was great and was taken very seriously by the core developers, which was essential to getting the resources to really change things for the better. The regret I had was that the testing was limited to what to do with a basic install; reasonable as a start but it didn't end up addressing and thus mobilizing resources to address the problem of staff usability doing daily work with a 'normal' Drupal installation that includes lots of contrib modules. This is a major reason why I am seeing organizations migrating from Drupal to WordPress when they redevelop their websites - the usability for experienced staff during on-going operations.

With CiviCRM the core functionality is much more extensive, and the extension ecosystem not quite as crucial to the daily staff workflows on a typical installation (at least at the moment). So I think it would be more feasible to do testing of representative workflows on core CiviCRM. I don't know enough about usability testing protocols to know how reasonable it is to focus on usability for experienced staff users in addition to the new users and the learning curve they face as either new staff people or as folks just trying to donate or signup or buy a ticket.

THANKS for the offer. Please get in touch with Coleman and Dave about this.


Using civi for big data sets (1 million plus)

I've never used Civi with a dataset that large, but there are some general scaling principles that apply to Civi as with any other system.

The most important one I learned is that work = size * complexity. Okay, that might be a bit of an exaggeration, and in some ways, size doesn't matter very much at all (e.g. you can simply scale your servers to some extent to handle the extra records), but in any real project, there will be exceptions and workarounds and custom bits, and those little bits will be magnified, sometimes exponentially, with the size of your dataset.

For example - suppose you're importing some data that isn't perfect. On a small contact dataset, you might load it into excel and do a search and replace so that USA is replaced by United States. And after doing an import you might have to clean up a few extra records. But that kind of process isn't feasible if you multiply your dataset by 1000.

In other words, scaling is not simply linear. There are some aspects that will scale almost magically, and overall Civi is well-designed to scale and there are certainly Civi installs out there with that kind of size. But with any specific install, especially one that has some kind of migration that includes custom data and idiosyncratic requirements, you're going to get various kinds of unexpected points in your scaling that will require new things to learn, new processes, and quite likely, custom code.


Using the link to Set up a Personal Campaign Page gives 404 page error

I was able to figure it out. I had deleted the CiviCRM page so that's why it wasn't working.

Thank you!


How do I access civicrm.setting.php file?

If everything is installed in standard, that file should be located here: <wordpress>/wp-content/plugins/civicrm/civicrm.settings.php


Change the permissions to access Volunteer tab in CiviEvent

The two places "Edit All Events" is defined as necessary is in the page callbacks in the router XML on lines 19 and 27.

You should be able to change those, then do a cache clear with menu rebuild to change the permissions.

Since CiviVolunteer is so AJAX-heavy, I'm pretty sure that's the right answer.  You can probably just remove the "Edit All Events" permission.  However, the better long-term answer is to do an event-level permission check in the PHP, because it's not uncommon for someone to grant permission to edit only some events via an extension.


When upgrading from 4.7.7 to 4.7.8 I get error "Specified key was too long"

This issue is CRM-18983: DB error on upgrade to 4.7.8. I ran into it on OSX also while testing an upgrade.

There is a PR at https://github.com/civicrm/civicrm-core/pull/8605 currently which addresses this by reducing the size of the key before increasing the column size. Not all sites will have the option of reconfiguring MySQL server settings to accommodate the DB change in 4.7.8, so it makes sense to me that we do this in the schema.

Applying the patch before running the upgrade works for me - please post feedback on the JIRA issue or PR if you find it helps.


CiviCRM theme not loading after URL change

I updated CiviCRM, and all seems fine now!


"no such field in civicrm_api3" after Upgrade from 4.6.4 to latest 4.7

I'm sorry for the troubles you have had (and I guess in the future you will backup before trying an upgrade).

It's very complicated to try to determine what completed, what didn't, and how to move forward from your situation. I'd generally recommend engaging the services of CiviCRM shop that has developer experience at this point.

An approach I would recommend in this situation is to create a new CiviCRM 4.7 site, then import the data from the 4.6 database. But you there is no standard script for doing this; hence the need for a CiviCRM developer.


How to go about making a Core Tab on the Contact Summary screen view Inline instead?

Rather than smarty, JavaScript will do the trick.  Those tabs are all separate pages, and you can load any CiviCRM page/form as a snippet instead.

First, in your extension, use a hook to include the Javascript and provide the contact ID for it:

$r = CRM_Core_Resources::singleton()

// Provide the contact ID (assuming you've got it handy)
$r->addVars('memberTabInline', array('contactId' => $contactId));

// Add the script
$r->addScriptFile('com.example.membertabinline', 'membertabinline.js')

Then in membertabinline.js:

CRM.$(function($) {
  $.get(CRM.url('civicrm/contact/view/membership', {
    reset: 1,
    force: 1,
    cid: CRM.vars.memberTabInline.contactId,
    snippet: 1
  }), function(result) {
    $('#mainTabContainer').append(result);
  });
});

You'll probably need to add a div or something and have this fill it so that you don't have the membership stuff appending multiple times, but this is the gist.

Alternatively, you might look at https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms to see if you can fill a wrapper with the tab and have it work.  I'm only familiar with this re: popups, but it looks like it might work within any element.


Views Bulk Operation (VBO) : Config List does not display a Custom Field

Some times when adding new fields to an existing 'set of fields' you will need to clear Drupal caches before these fields are available through the field chooser in the View.


I think I have discovered the answer to this.

If the 'Mailing List' box is ticked and the visibility is set to public the group is listed on a page (yourdomain.org/civicrm/mailing/subscribe) that allows people to subscribe to the mailing list.  If the box isn't ticked it won't be displayed on this page.

It doesn't appear to affect whether the group can be used to select recipients for a mailing, which is what I first thought it did.


you'll have to add a column -> with Financial Type to your Exported Data before you can import it into CiviCRM; First you make the Financial Type in your CiviCRM -> if you're not sure what these monies make a Financial Type: Legacy Monies; Then create a Financial Type column in your Exported Data -> and fill it with: Legacy Monies. That should work - and will not take too long!


CiviRules Multiple rules per trigger - What happens?

It should do both. I have two rules with the same trigger -  membership changed with different conditions- (a) membership status is one of the ones I consider active and (b) membership status is one that I do not consider active. Both are working. But I'd still do some tests on your precise requirement to see that it does what you want.


How to find out about changes in the latest Release Candidate?

This is an excellent question. Before trying to answer, let me note a bit of the context:

When defining a test plan, several organizational and technical factors can weigh-in (e.g. perhaps certain extensions or use-cases are more important or more within your expertise; perhaps there's a rotation of responsibilities). The question focused on how to examine the change-list -- that's not the only factor, but it is an important one, so we should have a good answer.
The RC releases and general releases are lined up on rolling monthly cycles. You can get more specifics by reading the schedule of releases. I usually think about the schedule in reverse (from the release date). For example, v5.3.0 will be released at the start of July. The testing period for the RC (v5.3.beta1) is the previous month, June. The development period for v5.3.alpha1 is the month before that, May.
CiviCRM development is managed in Git/Github -- this is where changes are submitted and reviewed. Most reports about changes are derived from this data.
In a typical monthly cycle, there are 80-150 accepted proposals (aka "PR"s or "pull-requests").

There is no one perfect way to list changes during the RC period, but there are a few tools/techniques available.

Release Notes: This is a curated document (usually written by Andrew Hunt and Alice Frumin).

Good:

The notes are nicer to read and don't require as much technical skill.

Bad:

It takes a while to put them together -- so they may not be available until too late.

Examples:

For v5.2, the release-notes are tracked under https://github.com/civicrm/civicrm-core/tree/5.2/release-notes
For v5.3, the release-notes will be tracked under https://github.com/civicrm/civicrm-core/tree/5.3/release-notes
Once a release is published (e.g. 5.2.0), the long-term/supported URL for the release-notes looks like http://download.civicrm.org/about/5.2.0

Comments:

During the RC period, you might be able to find a draft of the release notes. Look in the PR queue and filter on "Label" (for the given version).
For more info, chat with @agh1 on Mattermost.

Github PR Queue: All changes are proposed in Github by filing a "pull request" (PR).

Good:

The full list is available when you want it, and it can be loaded in a web-browser.

Bad:

The filter options aren't good for your use-case. You need to try a few different filters.
You may need to check multiple repos (civicrm-core is the main one; but sometimes interesting things happen in civicrm-packages, civicrm-drupal, civicrm-wordpress, civicrm-backdrop, civicrm-joomla).

Examples:

All closed PRs in civicrm-core labeled master - These are changes approved during normal development. However, it includes all development phases of all versions. If you're testing 5.3.beta1, then focus on items approved during May.
All open or closed PRs in civicrm-core labeled 5.3. These are late-stage corrections proposed or approved during the 5.3 testing period.

Comments:

We have an open issue to improve the infrastructure so that it's easier to filter Github data based the target version ("Milestone").

Git: Every individual change and every PR approval is available in the git database.

Good:

This is the most accurate and flexible way to filter a change list. It is always up-to-date.

Bad:

This requires more technical proficiency -- e.g. understanding git and the Unix CLI.
The text in git is written by many different developers. The text varies a lot in terms of length/language/quality.

This is more powerful and more technical, so I want to give a longer discussion of examples.

Git allows you to display developer notes over a range of versions. For example, when studying v5.3, you might to view notes after 5.2 and before 5.3. This range is called 5.2..5.3 -- or, more specifically, origin/5.2..origin/5.3.

You can review developer notes for the range:

# Get a list of all developer notes.
git log origin/5.2..origin/5.3

Additionally, you can filter based on the affected code/subsystem.

# Get a list of all developer notes relevant to the table definitions
git log origin/5.2..origin/5.3 -- xml/schema/

# Get a list of all developer notes relevant to the DB upgrade steps
git log origin/5.2..origin/5.3 -- CRM/Upgrade/

# Get a list of all developer notes relevant to the "Financial" subsystem
git log origin/5.2..origin/5.3 -- CRM/Financial templates/CRM/Financial xml/schema/Financial

# Get a list of all developer notes relevant to the APIv3 framework
git log origin/5.2..origin/5.3 api/ CRM/Utils/API/ Civi/API/

All those examples use git log to show developer notes, but the same filters (by range and by folder) can produce other types of output. Compare:

# Get a list of developer notes for a folder (as above)
git log origin/5.2..origin/5.3 -- CRM/Upgrade/

# Get the same list and display it in a GUI tool (on local Linux/OSX workstation)
gitk origin/5.2..origin/5.3 -- CRM/Upgrade/

# Get the same list and display in short, one-line, summary format
git log --oneline origin/5.2..origin/5.3 -- CRM/Upgrade/

# Get the same list and include the relevant code changes
git log -p origin/5.2..origin/5.3 -- CRM/Upgrade/

# Get cumulative diff reflecting all those changes
git diff origin/5.2..origin/5.3 -- CRM/Upgrade/

If you're a CLI guru, then you can do further filtering. This is usually easiest with the --oneline format.

# Get a summary list which identifies the approved pull requests
git log origin/5.2..origin/5.3 --oneline | grep 'Merge pull'

# As above, but only show the PR#
git log origin/5.2..origin/5.3 --oneline | grep 'Merge pull' | awk '{print $5}'

# As above, but show the URL for each PR
git log origin/5.2..origin/5.3 --oneline | grep 'Merge pull' | awk '{print $5}' | sed 's;#;https://github.com/civicrm/civicrm-core/pull/;'

Of course, there may be other tools, but that's the one I use on a day-to-day basis to examine change history.

(Update)
If this kind of reporting is useful on a regular basis, then you might want to put these commands in a bash script -- then you can quickly re-run the same report. Here is an example of a custom report.


welcome to CiviCRM Stack Exchange! In CiviCRM there is an option in the Contributions menu called "Import Contributions". This allows you to upload contributions from a CSV file. Can you give that a try?


Problem with CiviCRM configuration (auto_increment) with wordpress (4.x) website

Your hosting environment sounds unsuitable for running CiviCRM - CiviCRM does have some additional requirements beyond other PHP/MySQL apps like Wordpress and Drupal.

There are some places in CiviCRM code where it expects the database to increment IDs by 1. Where MySQL is running with eg replication, this will not be the case. There are also places where CiviCRM has checks for such settings, which are mostly to protect you against unexpected outcomes - even if there's no hard requirement for that setting to be the way CiviCRM "wants" it to be.

For your needs, the simple solution is not to address replication or patch CiviCRM, but simply to obtain hosting which is compatible with CiviCRM. Unless you are heavily invested in the existing hosting, switching hosts to someone who knows & works with CiviCRM will be a much more straightforward solution than trying to make CiviCRM and that hosting service work together ...

CiviCRM's page on hosting (not an advert, just trying to save you time, money and grief)

For more technical detail, there's a related question from a site which specifically wanted to use MySQL replication + CiviCRM together - JIRA issues linked there:

MySQL Master-Master Replication on 2 servers


Batch Data Entry payment_instrument is now required?

We had one client inform us that they could not save Batch Data - everything we tried to replicate the issue failed. In the end we concluded that it was due to browser caching which the client was able to confirm by testing with a different browser.

Refreshing the chrome caching (https://support.google.com/accounts/answer/32050?co=GENIE.Platform%3DDesktop&hl=en) sorted it for them.

May not relate to your situation at all.


Contacts visible in mailing list group, not on hold or otherwise dnd, but skipped by mail out

As I've added to my question, it turns out the problem wasn't with the emails or the DND settings - the missing contacts all had a NULL value for is_deceased, and apparently CiviCRM interprets this as them being dead (rather than just missing information). When you edit the entire contact record, this is flagged, but because I was just checking the emails and DND settings in place, I hadn't noticed this.

Setting all the null values to 0 fixed the problem - I ran the following SQL query on the civicrm_contact table:

UPDATE civicrm_contact SET is_deceased = 0 WHERE is_deceased IS NULL;

(As per the answer here: https://civicrm.stackexchange.com/a/7396/610 )

Following that, all the relevant contact records reappeared in the mailing list recipient count.

(Double checking the import field mapping, it turns out I didn't tell it to skip that field - CiviCRM exports the field as empty if is_deceased = 0, so I guess importing it did overwrite the existing values)


I've  been getting this issue too. The only thing I did that got it installed was removing the forced https. The installation finished on a new WordPress install without the ssl cert. Only after installing Civi could I use encryption.

Not sure if it's  directly related but that's  all I can conclude thus far.


How can I adjust the fonts and layout of PDF reports?

The PDF generator uses the HTML to create the PDF. So changing CSS will have effect. But.. to have a different font in the PDF, the font should be available on the server. If the font is not available on the server (and the pdf generator) then a fall-back font is used.

Here's some more info about DOMPDF (the tool CiviCRM is using for creating PDF's):

https://stackoverflow.com/questions/12581156/custom-fonts-for-dompdf
https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding


How To Manage a Webform and a Contribution page?

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


WordPress installation with MySql connection problem

First, thank you, Demerit, for helping me. I found a patch for the fatal error and it went away. However, the installation error remained.

At the end, turns out this error was due to MySQL password containing special characters. Once the password was changed, I was able to install without any errors. Hope this helps someone else.


How to display Individual Custom Fields in a Participants View

You should be able to achieve what is required by creating a CiviCRM Participants view and using the CiviCRM Participants: Participant's Contact ID as a relationship to bring in contact custom data –

Or import the belew view (I've removed custom data so this needs to be added yourself) -

$view = new view();
$view->name = 'individual_and_participant_view';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'civicrm_participant';
$view->human_name = 'Individual and participant view';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master /
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Individual and participant view';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '100';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
  'id' => 'id',
  'display_name' => 'display_name',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'id' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'display_name' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
);
/ Relationship: CiviCRM Participants: Participant's Contact ID /
$handler->display->display_options['relationships']['contact_id_1']['id'] = 'contact_id_1';
$handler->display->display_options['relationships']['contact_id_1']['table'] = 'civicrm_participant';
$handler->display->display_options['relationships']['contact_id_1']['field'] = 'contact_id';
/ Field: CiviCRM Events: Title /
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'civicrm_event';
$handler->display->display_options['fields']['title']['field'] = 'title';
/ Field: CiviCRM Contacts: Display Name */
$handler->display->display_options['fields']['display_name']['id'] = 'display_name';
$handler->display->display_options['fields']['display_name']['table'] = 'civicrm_contact';
$handler->display->display_options['fields']['display_name']['field'] = 'display_name';
$handler->display->display_options['fields']['display_name']['link_to_civicrm_contact'] = 0;

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'individual-and-participant-view';


Organization Membership Payment page not recording memberships

After much frustration and subsequent soul searching, contemplating the abyss of total consumption by the digital realm, a singular epiphany presented itself to me at the gates of Valhalla. It whispered in my ear, "you're using the wrong damn profile, you dimwit!"

I had built a custom profile where I should have used the default "on behalf of organization" profile. Much confusion ensued, until I figured out, what is now obvious.

Many thanks for all the help offered and time invested by those who guided this spirit quest.


How to stop Mailing Queue from civirules?

Rules run by delayed action should be in the civicrm_queue_item table.  Please be sure not to delete any other rows that may be in there!


The contribution payment verification page has lost the site theme styling

Do you see &snippet=1 in your contribute page URL?

That parameter can be used to deactivate the theme on a CiviCRM page.

Eg -

CiviCRM demo donate page as per normal & then without theme
CiviCRM profile page as normal & same without theme

If that parameter is present in the link to your contribution page, remove it and see if this restores the proper theme.

Does your contribute page still work without the theme?


Why does CiviCRM render a validation failure without the Wordpress theme?

I can't add a comment (doh, stupid reputation requirement) so I'm answering when Thomas Jaunism wrote: "Why would CiviCRM be trying to load the page.php and not the front-page.php that the form is on?"

The Civi plugin loads the WordPress theme's page.php template because many (if not most) themes define a homepage template which does not contain the_content() but rather collections of widgets and archive views. Loading page.php has proved to be the most reliable way to show Civi content on the front end.

If you want Civi to load a different template, there is a filter for this called civicrm_basepage_template. You can therefore load a different template with code such as the following in your functions.php file:

add_filter( 'civicrm_basepage_template', 'use_my_own_template_for_civi' );
function use_my_own_template_for_civi( $template ) {
    if ( some condition is met ) {
        return 'your-template-name.php';
    }
    return $template;
}


cron job stops running after upgrade to 5.17.4

After much trial and error, this command line seems to work in the Cpanel cron environment:

wget -q -t 1 'https:///administrator/components/com_civicrm/civicrm/bin/cron.php?name=&pass=&key='

instead of php trying to run cron.php.


Getting Groups Associated with Campaigns using REST API

You can download and install Campaign Group API3 extension, this extension should provide Campaign Group api which you can either use as chain api in Campaign api or you can use base as Campaign Group api and fetch all details of campaign by doing join on.
HTH
Pradeep


Create forwarding email address for mailing to members of a group

This problem has two parts - getting the email into Civi, and sending it out again to people in a group.  The first part is definitely going to be done with Inbound Email Handling if the person will be using their email client.

For the second part, I like Tim's idea of integrating with Sympa or Mailman, but unless you need the full-blown list management software, it seems like overkill.

Pete's CiviRules answer should be correct; however, just this week I tried doing almost the exact same thing (redirect incoming SMS to a team's email) but I couldn't get the tokens to work.  My client was on a tight budget so rather than troubleshoot I just repurposed an existing extension.  I would try this CiviRules approach first.

Another approach would be Scheduled Reminders (Administer menu » Communications » Scheduled Reminders).  You could set a reminder to trigger on an "Inbound Email" activity, and use the Select Group dropdown to pick the group.  Your token would just be {activity.details} to pick up the message body.  If you do this, you should make sure your cron runs reasonably frequently.  You would also want to increase the frequency of the Process Inbound Email and Send Scheduled Reminders jobs under Administer menu » System Settings » Scheduled Jobs.


Automatically create recurring donations from bank statements

I am not sure if Civirules does it(pretty sure it doesn't). Through an extension i would use pre hook to check and create contribution recur when a contribution is created. Here is small snippet

function extension_civicrm_pre($op, $objectName, $id, &$params) {
  if ($objectName == 'Contribution' && $op == 'create') {
    $bankTransferFinancialTypeId = civicrm_api3('FinancialType', 'getvalue', [
      'return' => "id",
      'name' => "Bank Transfer",
    ]);
    if ($bankTransferFinancialTypeId == $params['financial_type_id']) {
      // perform checks if contribution recur exists
      try {
        $recurringcontributionId = civicrm_api3('ContributionRecur', 'getvalue', [
          'return' => "id",
          'contact_id' => $params['contact_id'],
          'amount' => $params['total_amount'],
          'contribution_status_id' => ['IN' => ["Pending", "In Progress"]],
          'options' => ['limit' => 1],
        ]);
      }
      catch (CiviCRM_API3_Exception $e) {
        $recurringcontribution = civicrm_api3('ContributionRecur', 'create', [
          'contact_id' => $params['contact_id'],
          'installments' => '12',
          'frequency_interval' => '1',
          'amount' => $params['total_amount'],
          'contribution_status_id' => 'In Progress',
          'start_date' => date('YmdHis'),
          'currency' => 'USD',
          'frequency_unit' => 'month',
        ]);
        $recurringcontributionId = $recurringcontribution['id'];
      }
      $params['contribution_recur_id'] = $recurringcontributionId;
    }
  }
}

  Note: This snippet is not tested since i have just created it and is
  pure blind coding.

HTH

Pradeep


Integrating Wordpress account and CiviCRM contact details self-maintenance

The only way we have done this is with a WP plugin.  WP User Front end allows editing of a WP user's profile from the front end. https://wordpress.org/plugins/wp-user-frontend/.

If you are on CiviCRM 4.6.3 you can mix WordPress and CiviCRM content on the same page, so two shortcodes could be used. While I have not tried this, it may be possible.

I also recommend https://wordpress.org/plugins/civicrm-wp-profile-sync/  for keeping key data in sync between WP and CiviCRM (this requires CiviCRM 4.6)


How do I distribute CiviSurvey by email, and then analyze the results?

Although you're putting together a survey, the CiviCRM tool you'll want to use is the Profile.  Create a new profile with the custom fields along with any standard ones you want to include.

You'll then want to send an email with an automatically-personalized link to the profile--that way, everyone's responses will go on his or her own contact record without having to log in.  The full directions are here (follow the directions for Profile): https://aghstrategies.com/content/how-create-one-click-personalized-links-civicrm-emails

The analysis capabilities in CiviCRM reports are kind of crude, but you'll be able to export the results into a spreadsheet and do any kind of statistics you need.

A note about "surveys": this use case is collecting information into custom fields on the contact record, so that's a natural use for a profile in "edit" mode.  There is a feature in CiviCampaign called "survey" that is oriented toward collecting information through phone interviews or door-knocking.  You'll have the fields on the contact and/or the activity, and interviewers will fill it in.


It's strongly recommended NOT to delete data directly via SQL.  I don't think it's possible to say which tables you need to delete from - there are hundreds of tables, not including those added by extensions, and it's impossible for us to know which are in use for you.

Instead, consider the suggestions by Jitendra and Aidan above - the issue is that the server is misconfigured.  Alternatively, consider using the API.  Especially if done from the command line where there should be no max_execution_time set, this should resolve your issue much more cleanly without causing orphan database records.


Edit Line Item error: Tax for amounts above 999.00 = NaN.N

Fixed by https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/pull/42
Thanks for the help of Monish Deb and Joe Murray.


Is there a way to expose a CiviReport on a Wordpress page?

If you run your report and copy all the info after wp-admin/admin.php and paste that after your page URL it will drop the report in. The data you from the report url begins with a "?" and looks similar to this.

?page=CiviCRM&q=civicrm%2Freport%2Finstance%2F50&reset=1&force=1

So you URL to show the report on the WordPress page will look like this.

https://<<site URL>>/<<page slug>>/?page=CiviCRM&q=civicrm%2Freport%2Finstance%2F50&reset=1&force=1

Keep in mind you may need to adjust permissions depending on what user roles should be able to view this page.

Hope this helps.


Can we automatically make a users Drupal account inactive when their membership expires?

Making the account inactive is probably not the best user experience.  You could use CiviMember Roles Sync, permission your member content appropriately and show your inactive members the renewal page.


I think I might have figured out what's going on here... The tables that are trying to be used in the view have been created after the table details were taken from sites/all/modules/civicrm/install/index.php and pasted into
 the settings.php file (which was done initially when configuring the system).  So when the new tables are created they do not exist in the settings.php file (I'm unsure whether CiviCRM should do this by default or not), but if I go in and update the settings.php file with the new mapping it seems to address the issue and Drupal then looks in the correct database.


How to fetch activity including custom fields using API

Let's say $params is enough to find the single activity, e.g. $params = ['activity_id' => 123] where 123 is the known Id. But it could be any other API acceptable params.

$result = civicrm_api3('activity', 'getsingle', $params)
        + civicrm_api3('activity', 'getsingle',
                       [return:'custom_%,activity_type_id'] + $params);

The custom_% results in all custom fields being added. But this won't work without activity_type_id also being requested.

(You probably know, but the $array1 + $array2 stuff in PHP means extend array 1 with key/value pairs from array 2 when the key from array 2 does not exist in array 1.)

Alternative method

You can, list every field in the activity table as well as the custom stuff and in the return parameter to one API call.

However, this assumes that you know all the fields and that they won't change over time/upgrades. So the 2-call method above ensures that you're getting all CiviCRM has to offer on your activities. (Although you have to do extra calls to get the related contacts like targets and assignees etc. of course). It could be argued that you should only request what you want anyway.


Why am I getting "Invalid currency selection: USD for domain iatspayments.com" on submitting a paid event registration?

Okay. Fixed. I guess this is pretty simple. Needs the domain prefix "www" in the URL for the "Site URL" (in the Payment Processor Settings) or it won't resolve. Not sure why it throws the odd error description. But, hey, it's working now.


There's a semi-documented "menu rebuild" commands that will probably help here. From your CiviCRM base URL, go to /menu/rebuild  e.g. on Drupal with Clean URLs, http://example.org/civicrm/menu/rebuild. Follow that with /cache/clear if necessary!


Upgrade to 5.9.0 - 'From' address for e-mail confirmations has changed

This is now fixed and should be part of next release hopefully. You may wait for next release or apply patch manually from here.


I found the issue..  I tracked it down to the fact that I'm using custom templates to modify CiviCRM.

the civicrm/CRM/Core/Form.php file has been updated to a new version while my custom version I had in the Custom Template Directory was still using the older version.

I synced them up and everything is working fine now.


When are scheduled reminders for late registrants to events sent or not sent?

Good question with several permutations! Here's a partial answer from experience.

Case A: A contact registers after an event scheduled reminder was
sent, but before the event starts.

It is sent. The timing will be whenever your Send Scheduled Reminders scheduled job runs. It occurs when you set x time before and based on this answer specific time it will not.

Case B: A contact registers after an event scheduled reminder was
sent, but while the event is happening.

It is sent.

Case C: A contact is registered for the event after the event ends.

Not sent.
I've not seen a 24 hour test.


Are you sure that the path to cron.php is right on the new server? I recently had to set it up again on the new host (SiteGround), and the path was slightly different. What was surprising was that, by all indications, the cron job was executing successfully, but it silently didn't run the CiviCRM jobs. I still don't have a good answer on that.

In cPanel, you can go into File Manager and check the path.


"Groupings" of Option Values: are they actively used?

Feel free to use it, some other extensions (eg. CiviHR) are using the grouping field as well as the core

+-----------+-----+
| grouping  | t   |
+-----------+-----+
| NULL      | 872 |
| Absence   |   3 |
| Avery     |  11 |
| Closed    |   1 |
| Opened    |   2 |
| Timesheet |   9 |
| Vacancy   |  11 |
+-----------+-----+


Create a "Not Attending" Option for CiviEvent

You can create a custom "Participant Status" at civicrm/admin/participant_status (via the menu at Administer > CiviEvent > Participant Statuses).

I don't think there is a default way to expose the participant status on a core event registration form (they are typically for admins in the backend only), so you may consider using a separate workflow with a tag or group for those that are not attending, as noted by @Nicholai below. You might even be able to use Rules to automatically change their status to the new one you created based on the tag/group they are in.

However, if you are using Drupal with Webform-CiviCRM for the registration, it would be a nice clean solution to expose this new participant status on the form (allowing "Registered" or "Not Attending" as choices), and then use Webform's Conditional functionality to show or hide event registration fields as appropriate. This way they can indicate they are not attending without having to see/fill out any custom registration fields on the form.


How to restrict access to only one Contribution Page

Here's a quick and dirty drupal-ly way of doing it, but I still wonder about a CiviCRM specific methodology.

function civicrm_custom_access_civicrm_buildForm($formName, &$form) {
  global $user;

  $grant_access = 0;
  foreach($user->roles as $key => $role_name) {
    if($key == 3 || $key == 5 || $key == 4 || $key == 6 || $key == 7) {
      $grant_access = 1;
    }
  }

  if($formName == 'CRM_Contribute_Form_Contribution_Main' && $form->_id == 2 && !$grant_access) {
    drupal_access_denied();
    drupal_exit();
  }

}


Profile for Drupal User Registration not functioning

Check your Drupal CiviCRM permissions, particularly the following:

CiviCRM: profile create (anonymous users)
CiviCRM: access all custom data (anonymous and authenticated users)
CiviCRM: profile edit (authenticated users)

Also, check the profile settings: click "fields" and make sure none of them are "view only".


How to allow an active membership with payment pending?

For offering membership privileges on your site, you should be able to give the same privileges to pending as current. You should be able to give discounts to pending members too.

Drupal: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMember+Roles+Sync

WordPress: https://github.com/tadpolecc/civi_member_sync (this seems to be working correctly on CiviCRM 4.6.6)


CiviCase: Accordions not toggle ("Roles" "Activities"). Menu Options ("Add Activity" etc.) not "auto-trigger," Admin menus at top of screen not open

All my problems stemmed from one module I installed to make adjusting the new theme easier: SwitchTheme. After installing the new theme, I installed SwitchTheme 7.x-1.x-dev on all environments. I was so caught up in theme-tweaking that when I spotted this CiviCase error, I'd forgotten about SwitchTheme. Additionally, it's such a tiny, minor module, I really hadn't expected it to have such a big impact on site behavior.

Disabling SwitchTheme 7.x-1.x-dev in Drupal's Modules page immediately resolved the issue.


Finding contacts in Group A AND Group B?

You can use Search Builder (Search > Search Builder) to search for contacts in a group A and add another search field for contacts in Group B. See screenshot from demo.


Associate state and country fields when not tied to a particular address type

If I understand your question correctly, I may have just posted an answer to a similar question I had.  Hope it helps you.

https://civicrm.stackexchange.com/a/18093/2169

In summary, it's to use the civicrm_buildForm hook in order to tie your country and state fields together.  That will cause the states' list to be refreshed when you choose a country.


Inheriting memberships through Households

For all individual contacts of a household to inherit a membership from another member of the household, you need to add the relationship type between the individual contacts to the membership type (e.g. Spouse of, Household Member Is, etc.) but you will not be able to modify the membership type accordingly if there are membership records associated with it:

If you want to avoid having to create a new membership type and then updating all of your existing primary membership records with that membership type, you will need a programmer who can update the membership type directly in the database and then run a query to create the related memberships.

Good luck,
Tamar


So I figured out how to do this, for the future.

You need to import an Activity for each contact. Match as per any other import

Key import details:

source_record_id = petition id (you may have to look into the db to find this)
activity type = 32 (or the activity type id listed for Petition Signature in Administer > Customize Data and Screens > Activity Types)
subject = by default, this is the title of petition
data = date signed


How to search contacts with certain prefix say, "Dr"?

This is job for the Search Builder that you can find in the Search menu

Select Individual
Select Individual Prefix
Complete with = and the desired title.

When the results are shown you can create a Smart Group for this search.


What's the best strategy for upgrading CiviCRM?

Let me at least narrow some options for you:

The last idea of "sticking with 4.5.8." is not the way to go.  The Long-Term Support (LTS) version currently is 4.6 (and for the foreseeable future as of writing, see this question about the LTS jump from 4.4 to 4.6).  You will want to upgrade to at least that at some point (sooner rather than later since there are no more security updates for 4.5).  See this question for more about LTS.

If you want to try the latest and greatest, 4.7 is the one to use.  4.6 is the more stable route.


What about modifying the option list itself? So pick a hook that fires whenever the new mailing page is loaded (hook pageRun or something) and use the api to check if the current user's email is an option in that list. If not, add it

That gets you halfway there... not sure about setting it as the default. I suppose if you made it the default every time the hook fires, then it would temporarily be the default for whoever is composing a mailing.


Contact membership ID based on a pattern

I also used ContactID to hold membership ID for the same reason that a unique value is allocated by CiviCRM. There doesn't seem to me any standard way to have an autoincrement field in CiviCRM without doing some coding. You also have to think whether the membership ID should be in the membership record rather than the contact record, though because I had some historical data, I decided against this. To get the historical data in I created records for all the membership numbers up to the last one previously used, but tagged all that hadn't been used so that I could delete them all later. I think imported all these records and they were automatically allocated the matching contact id (fortunately I didn't have a membership 1 which was already allocated to the admin account. I then deleted the contacts for the numbers that hadn't been previously used. New contacts were autoincremented from the last one I had used. You might be able to do a trick to get your numbers starting 2019 etc, but that would mean creating a hell of a lot of records and then deleting them, so not sure its a sensible option, but you could try (maybe with just a 19 prefix, so you would be OK for the next 80 years).

I don't think that CiviRules has anything built in that will create an autoincrement field. Indeed I can't see something available off the shelf to set a custom field. I think you would need to write some code.


Is there a way to find contacts who have multiple active or expired memberships?

If you have sql access you can run this query.

SELECT c.display_name,
       count(*)
FROM   civicrm_contact c
JOIN   civicrm_membership m
ON     c.id = m.contact_id
WHERE  m.contact_id = c.id
GROUP BY 1
HAVING count(*) > 1

If you only want active memberships then add the following line between the where line and the group by line

AND now() between start_date and end_date

You didn't ask for this but if you want people with multiples of the same current membership type then you can use this code:

SELECT c.id,
       c.display_name,
       mt.name,
       count(*)
from   civicrm_contact c,
       civicrm_membership_type mt,
       civicrm_membership m
where  m.contact_id = c.id
and    m.membership_type_id = mt.id
and    now() between m.start_date and m.end_date -- current only
group by 1,2,3
having count(*) > 1
order by 3,1


Relationships not visible after migrating from Wordpress to Drupal

I had the same issue recently and the resolution was to ensure that the URL you use to access Drupal and CiviCRM must be consistent with what's entered in the CIVICRM_UF_BASEURL in civicrm.settings.php and the Resource URL in Administer CiviCRM >> Global Settings >> Resource URLs.


First create a custom field of type select or multi-select with empty options. From civicrm_custom_field table grab the option_group_id for the field.
You can use Option value importer extension to import all the options using csv or have a insert query to insert records in civicrm_option_value table using option_group_id from civicrm_custom_field.option_group_id


Unable to drop mydashlets on my Dashboard

I fixed it by pasting the file where it was looking for it. However, it is disconcerting that it is looking for the file in the wrong place.


How to avoid duplicates when donated using different email address or spelling mistake on names?

That is a difficult area. It touches on'the safest system is the one without users' :-) You can not avoid users making typos as far as I know, you will need to have a regular deduplication process in place. Here is the process we are discussing at one of my projects:

we want the data in the system asap, so we accept everything but all new contacts go in a separate group
we have a daily process for one of the employees, looking for dedupes on a daily basis (with a fairly strict rule first and a more fuzzy one second) and taking corrective action whenever required. If new contact is fine it is removed from the group.
I hope it helps :-)


Changing directory permissions to get Cron to work via drush

To answer non-programmatically for non-coders, the CiviCRM Cron module has been a life saver for us. This will run cron for Civi whenever Drupal's cron runs. Setup is minimal, just needs user, password and sitekey. This allowed me to skirt coding cron.

https://www.drupal.org/project/civicrm_cron


Renamed Contact type does not show on reports

Another option, and one that will probably make your life a lot easier, would be to use the CiviCRM word replacements feature and simply get the system to translate 'Individual' into 'Member'. Would save any core changes and word replacements wont affect upgrade paths etc.

As per Erik's comments, I wouldn't change the core type.


How do I create a Drupal View to display last activity date.

All right...I did it but just wanted to follow up.

Expand Advances in the View UI, click next to Aggregation on the word No.

Turn it on.

Now Add the Scheduled Activity Date field.

Click Apply, then the Aggregation options will pop up.

Select Maximum in the drop down list.

Then click Apply.

Here is part of my output (with other fields too of course).


cli.php can only be run from command line

Well, I seem to have resolved it by replacing cli.php with cron.php in the command line.  Of course it didn't do anything when I ran the command from the terminal, but I plugged it into the cron jobs list and it seems to be executing the jobs now.  I am just lucky I spotted the "cron.php" file in the bin folder, and took a chance on it being what I needed.

My sympathies to any novice like me who has to set up Cron Jobs for CiviCRM -- the instructions may make sense to a Linux expert or php programmer, but to complete this simple and essential task, it has taken me months.

Thanks for your help, folks!


Missing extension "moregreetings" after upgrade to CiviCRM 5.36

I'm guessing when you upgraded you somehow deleted your extensions folder. All you need to do is put the code files for the moregreetings extension back into that folder.


API call setvalue for is_primary does not make other values 'not primary'

There are lots of problems with the setvalue api. This is a good example of why everyone should stop using it.

The plan is to deprecate setvalue soon and remove it in a future version. See https://issues.civicrm.org/jira/browse/CRM-16643


Is there a setting to prevent Paypal Express overwriting contact details with provided Paypal billing details?

I found a solution for PayPalPro by editing the code at line 277 in \CRM\Core\Payment\PayPalImpl.php

  'billing_first_name' => 'firstname',
  'billing_middle_name' => 'middlename',
  'billing_last_name' => 'lastname',

ie I added "billing_" at the start of the three Civi field names.  This is how received information from PayPal is mapped to Civi fields. With my change the name goes into the billing fields and not the main/primary fields.

In my case there was not a problem for the address fields, ie they were getting through OK to the billing address.

I've done this as a customisation for my site. If it's correct then this should be converted into a bug report so it's incorporated into the main code.  Anyone care to test?


Not everyone has the skills to create extensions. But here are a couple of links that you might find useful:

https://github.com/totten/civix

https://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension


(How) can I add a footer fixed to the page of a message template for printing a pdf?

All you need to do is create a table in the first place - Add header in the top row and calculate the number of rows can fit in the page and add the footer to the bottom of the table

Now when ever you add content to the page make sure you add to the table row by row and any empty row should be filled with &nbsp;

By doing this you are always setting a set row and the footer remains in the same place

you need to create an extension for the same

I guess this helps !!!

If my suggestion is bit tricky - just wait for others to reply

Thanks


I don't have access to a 4.4 system, but I think the solution is the same as in 4.6. You would select the tagged activities in your search, and then choose an action of 'Untag activities (remove tags)'  This action will untag all the selected activities in one go.


You're on an insecure version of CiviCRM, you'll want to update it.
Page caching is not going to help, because form interaction is not (page) cached.
I'll assume you've got the usual production caching on, but if you don't, then start there.
If your site is otherwise reasonably responsive, your server is probably running out of resources, either cpu or RAM. You may be on a customized service that has implicit limits the number of concurrent connections (e.g. limiting the number of apache processes/children), or (more likely) you've hit a memory limit and your application is swapping memory to disk.
If you have no way of changing the server or operating system parameters, there's probably not much you can do.
In general, the best way to increase your form interactivity behaviour is going to be using some kind of RAM-based caching (Redis or Memcache), but that's a server thing, not something you can setup purely within Drupal or CiviCRM.


Logging can be turned on via Administer > System Settings > Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.).

You will find the relevant page on the Drupal demo site here

(NB, i am using the link to the master to give the url longevity)

You will also find explanation in the manual here


Manual contribution, add contact that is not found

It does show up the link to create contact when no match is found.

From your shared image it looks like the user has limited permission to create contact/access CiviCRM profile or also check if 'New Individual' Profile is enabled under Reserved profiles.


CiviDiscount - Automatic discounts for number of attendees

this can be achieved using an event price set. If you create a price set you can create a ticket option which takes up multiple "seats" at the event. You can create a 10 person ticket option and then set the price of that option.

Note however in that approach you cannot require that all 10 attendees submit separate registration details and you can only collect the details from the first participant who is buying the 10 person ticket.

Best


Based on your comments, I was able to use https://www.epochconverter.com/ and see that cron was last run at 5am (GMT) on August 30th.  You submitted that comment around 10:30pm GMT.  That strongly suggests your cron is a) working correctly, but b) isn't running at least hourly.  This causes the "Cron not running" warning.  It's possibly also the cause of the scheduled job not working correctly, though not definitively.

Please update your cron settings to run at least hourly (I recommend every 15 minutes if you use CiviMail).  Once that's done, either a) please let us know if it solved your problem, or b) edit your question to reflect the updated situation.


How to hide old contacts from default search? (best practices for old contacts)

CiviCRM has a "trash" feature which flags contact records as trash without actually deleting them. Contacts with the flag set to 1 are excluded from most reports, etc.

Their contributions, etc., will not be deleted but may be hidden from reports and interfaces as well. That may or may not be what you want. If you wish to see all the contributions, I don't think there is anything you can do without writing code to deal with most interfaces, but a lot of the reports have a filter to show/hide contributions from trashed contacts.

You can toggle this feature under Administer > System Settings > Misc, and there's a CMS-level permission "CiviCRM: access deleted contacts" that controls which users can see trashed contacts.

All said, I'm not sure that deleting or trashing contacts is the appropriate solution. It seems rather drastic to delete contacts for the purposes of returning manageable result sets. A better solution might be to hire a CiviCRM partner to build a custom search interface that better suits your needs. Or, a low-cost approach that occurs to me is to use your advanced-search know-how to build a Smart Group of current contacts as defined by you, then train collaborators to run their searches within this group.


Profile creation workflow message, where is it located?

Administer -> CiviMail -> Message Templates -> System Workflow Messages tab -> Profiles - Admin Notification

Looks like it, although personally I haven't tried this before.


How can I resolve an issue with [civicrm.files] following an update to 5.29

The information provided in the docs at https://docs.civicrm.org/sysadmin/en/latest/customize/paths/
explains how to set civicrm.files in the civicrm.settings.php file.


Bad redirection after registration for free event

Its a known bug, and there is a patch to fix it. You can follow the following steps to fix it:

Open file: civicrm/CRM/Core/Payment/PayPalImpl.php
Search for:

$sub = empty( $params['is_recur'] ) ? 'xclick' : 'subscriptions';

Replace with:

$sub = empty( $params['is_recur'] ) ? 'cgi-bin/webscr' : 'subscriptions';

It should be around line number 404

Hope it helps.


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


This issue is recorded here:
https://lab.civicrm.org/dev/core/issues/1064

And there is currently some work being done on this here:
https://github.com/civicrm/civicrm-core/pull/14591

If you are keen to get this merged into core recommend testing it and commenting on the PR.


The alert is incorrect.  As long as you are not having any other issues besides the alert, you can tell the alert not to remind you again.

In addition (now that I see the issue with Contribution pages - sorry I missed that), make sure you have the base page set under CMS settings in the CiviCRM administration settings.

In WP go to settings, Permalinks. Make sure that they are not set to Plain

Lastly make sure the base page is published.  the page '/civicrm' is added on install


Any best practices/tips for creating a query view against contacts to used with webforms?

Note this is purely a Drupal question at this point. Anyway, yes requiring the field can suffice. You can also use the Exposed Form to make a search block that has additional settings such as "Input required" (under the Advanced bit of Views on right)


CiviCRM Architecture - CiviCRM directory structure

this is still mostly valid, with the addition of the api folder that contains, you guessed it, the api goodness.

You might have several folders missing depending on how you install it. eg all the test and xml folders are only there if you install a full/development environment, not if you download the pre-packaged production version

What is missing or unclear?


WP-CLI using GMT/UTC Timezone on cron jobs

wp-cli doesn't bootstrap the settings, so doesn't load the timezone.

Because of this exact issue, I wrote a patched version of the CiviCRM extension for wp-cli to add timezone support.  It's available here.  As far as I can tell, the original author has abandoned the project, because they haven't merged any pull requests (including this patch) in over a year.

You can also use wget-based cron - but then you're subject to your webserver's PHP timeouts, as opposed to the CLI PHP timeout, which is usually higher (or non-existent).


Is it possible, using ACLs, for a group to have only 'create' access to contact custom data and another group to have 'edit'?

One way of doing this, if you were using Drupal, would be to use Views and Webforms. This is our 'go to' approach when needing to finesse who can see/do what.
I would use Contextual Filters to show the logged in users the data they should be able to access, and then use links to take that Contact ID over in to a webform_civicrm form for doing any editing.


CiviPledge "Next Payment Date" automatically set to Jan. 1, 1970

After updating to CiviCRM 4.7.14, this issue has disappeared. I am unable to replicate it on the CiviCRM Wordpress demo as well, so I think it must have just been an issue with my version being out of date.


How do I set up CiviMail on Wordpress CiviCRM plugin?

I would recommend testing if you have sendmail configured properly on your server by trying to send from the commandline (http://tecadmin.net/ways-to-send-email-from-linux-command-line/). Follow general sysadmin approaches to solve that problem, not least of which is to get the ISP support to help you. Once you know your sendmail is delivering from the commandline, you will want to make sure that the PHP run by Apache or Nginx for this site is using the same sendmail.

Hope these pointers help. Sorry it isn't a step-by-step recipe but OS environments vary significantly.

Another alternative worth exploring a bit before going too far down the rabbit hole of setting up sendmail on the server is whether one of the other mail sending options available on that CiviCRM page works.


Can I get a list of contacts without created case?

This might do it for you or point you in a direction
Create a Group of All Contacts (A)
Create a Group of All Contacts who have ever had a Case (B)
Use the Custom Search: Include/Exclude Groups and set it to A-B


CiviVolunteer - Where to put translations file on WordPress

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


Error: Database check failed when upgrading from 4.6.0 to 4.6.2

The upgrade failed the first time for some reason, and all subsequent attempts on the partially upgraded database give this message. Do you have a backup of the original database? Do you know what the original error was?


Version check error - Permission on Bitnami/Google Cloud

Looking at <civiroot>/CRM/Utils/VersionCheck.php, it looks like the file downloaded is version-info-cache.json.  On my installs, that's in the upload folder.  Since that looks like a Drupal install, check the permissions on <webroot>/sites/defailt/failes/civicrm/upload and see if the web server user has write permissions.


Profiles - Pre Field and Post Field Help

The pre- and post- field help areas will have identifying CSS classes from CiviCRM 4.7.

This was the issue: https://issues.civicrm.org/jira/browse/CRM-16328

And here's the patch / PR if you want to apply it to your current version of CiviCRM: https://github.com/civicrm/civicrm-core/pull/5667


Please check you have set your Fields to be Searchable. I think that if they are not Searchable, then they also do not show on Import. There is no difference, in terms of importing, between a Group of Fields that is set to Inline v one that is set to Tab.


The scheduled job for delayed civirules (Process delayed civirule actions (Always)) should be set to always. Can you check if your cron properly executes the CiviCRM scheduled jobs?


CiviCRM - Contribution page profiles JavaScript error

Try using one of the basic WordPress Themes like Twenty Seventeen or Twenty Sixteen. If it works with one of these themes, pick a new theme that you like.

You probably have to pick a theme from another company altogether. The theme designer probably has a base package that he/she uses and the problem will follow from theme to theme in their suite.


CiviCRM uses mail server account address as sender

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

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


Why do I suddenly get unkown error when try to log in through Civimobile?

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


CKEditor in WP 4.72 and CiviCRM 4.7.16 strips inline CSS for CiviMAIL

It appears to be by design.

The stripping of head tags has killed my designed templates and I have had to roll back to 4.7.13 until a solution can be found.

I get a little frustrated with undocumented features creeping into minor updates.


How to approach fuzzy dates (e.g. contact deceased in month/year)?

In this case the organizational needs were indeed for a simple custom text field attached to Individuals.


How can I extract email addresses from a Group?

After you perform a search or show the contacts in a group, you can select all contacts and go to Actions > Export Contacts.

On the next screen, choose which fields you want to export with the contacts or just select "Export PRIMARY fields." Then hit "Continue" and a save dialog box will pop up and save it as a .csv which you can import into a spreadsheet.


How do I setup an online contribution page linked to Mogiv?

You can export from Mogiv and import them in to civicrm using an External Identifier to match the contacts, or match on eg First + Last + Email by choosing the right 'matching rule' when you do the import.


configuration variables: where is the documentation?

In CiviCRM 4.6, but not in later versions, the source documents the following configuration variables:

$debug = 0;
$backtrace = 0;
$smartyDir = NULL;
$pluginsDir = NULL;
$templateDir = NULL;
$resourceBase = NULL;
$uploadDir = NULL;
$imageUploadDir = NULL;
$customFileUploadDir = NULL;
$imageUploadURL = NULL;
$extensionsDir;
$extensionsURL = NULL;
$cleanURL = FALSE;
$countryLimit = array('1228');
$defaultContactStateProvince;
$provinceLimit = array('1228');
$defaultContactCountry = '1228';
$defaultCurrency = 'USD';
$lcMessages = 'en_US';
$dateformatDatetime = '%B %E%f, %Y %l:%M %P';
$dateformatFull = '%B %E%f, %Y';
$dateformatPartial = '%B %Y';
$dateformatYear = '%Y';
$dateformatTime = '%l:%M %P';
$timeInputFormat = 1;
$dateInputFormat = 'mm/dd/yy';
$fiscalYearStart = array(
$moneyformat = '%c %a';
$moneyvalueformat = '%!i';
$currencySymbols = '';
$defaultCurrencySymbol = '$';
$monetaryDecimalPoint = '.';
$monetaryThousandSeparator = ',';
$gettextCodeset = 'utf-8';
$gettextDomain = 'civicrm';
$gettextResourceDir = './l10n/';
$userFramework = 'Drupal';
$userFrameworkVersion = 'Unknown';
$userFrameworkUsersTableName = 'users';
$userFrameworkClass = 'CRM_Utils_System_Drupal';
$userHookClass = 'CRM_Utils_Hook_Drupal';
$userPermissionClass = 'CRM_Core_Permission_Drupal';
$userPermissionTemp = NULL;
$userFrameworkURLVar = 'q';
$userFrameworkDSN = NULL;
$userFrameworkBaseURL = NULL;
$userFrameworkResourceURL = NULL;
$userFrameworkFrontend = FALSE;
$userFrameworkLogging = FALSE;
$maxImportFileSize = 1048576;
$maxFileSize = 2;
$localeCustomStrings = NULL;
$mapProvider = NULL;
$mapAPIKey = NULL;
$geoProvider = NULL;
$geoAPIKey = NULL;
$geocodeMethod = '';
$mapGeoCoding = 1;
$logging = FALSE;
$empoweredBy = TRUE;
$enableComponents = array(
$enableComponentIDs = array(1, 6, 2, 3, 4, 8);
$enableSSL = FALSE;
$fatalErrorTemplate = 'CRM/common/fatal.tpl';
$fatalErrorHandler = NULL;
$legacyEncoding = 'Windows-1252';
$fieldSeparator = ',';
$maxLocationBlocks = 2;
$captchaFontPath = '/usr/X11R6/lib/X11/fonts/';
$captchaFont = 'HelveticaBold.ttf';
$includeWildCardInName = 1;
$includeEmailInName = 1;
$includeNickNameInName = 0;
$smartGroupCacheTimeout = 5;
$defaultSearchProfileID = NULL;
$dashboardCacheTimeout = 1440;
$doNotResetCache = 0;
$includeAlphabeticalPager = 1;
$includeOrderByClause = 1;
$oldInputStyle = 1;
$formKeyDisable = FALSE;
$inCiviCRM = FALSE;
$componentRegistry = NULL;
$doNotAttachPDFReceipt = FALSE;
$wkhtmltopdfPath = FALSE;
$secondDegRelPermissions = FALSE;
$wpBasePage = NULL;

The 4.7 equivalent source is here


accessing CiviCRM dashboard link for first time fails

I did a re-install. Curiously, when I downloaded the instal again, there were more files. Anyway, I have now moved the problem on to getting a white screen. I guess that's progress. Will close this question.


This is a known issue for a quiet a long time and has been no progress on it. Alternate way of doing this would be to use global text (or use the event title field) and rewrite the output as a link and generate the link as civicrm/event/info?reset=1&id=[id].

HTH

Pradeep


API call to modify contact custom data fields fails without error

To try and reproduce this, I visited the CiviCRM.org demo site at https://dmaster.demo.civicrm.org/, logged in, and explored the API Explorer there. You might prefer to use a demo site that matches your platform / version (& note that some folk have found the CiviCRM.org hosted demo sites can be hard to spot beneath the partner-hosted sites on that page).

I found a contact via the regular CiviCRM UI and edited their "Marital Status" and "Most Important Issue" constituent info on the contact edit screen, then used the API explorer to return the custom data which had been set.

I then used the same process to try and update the custom data, setting "Marital Status" to "M" (the API explorer presents available options in a list).

This showed a successful result and I confirmed that the update worked by viewing the contact record and seeing that "Other" had now changed to "Married". This indicates that the CiviCRM.org demo site works for this use case (suggesting that the issue you're experiencing might be configuration or permission-dependent, or related to some other site-specific implementation detail).

By observing the network tab while testing these API calls, I could observe the response from CiviCRM. In the event where an API call via JS doesn't return a result, I'd look here to see if there was an unexpected response (either invalid JSON, which could possibly leave CiviCRM's JS API hung, or an HTTP response code other than 200, which might have similar results).

I see your posted code is PHP not JS, so it may be you aren't using the JS API and can discount the HTTP layer as causing your issues. In that case your next step is probably to inspect the result of the attempted API call, and to investigate error logging (also valid when you are using CiviCRM's HTTP/JS interface).

In that case, inspecting details recorded to the CiviCRM debug log, and your hosting environment's PHP and webserver logs can reveal if there's any indication of an issue there. This question has a detailed writeup on where to find the debug log and other logs, as does the CiviCRM docs.

There's a related question on setting custom data via API which suggests that custom data is not consistently supported by various entity types when modified using the API. That's an old question and might not be up to date.

Hope this is some help!


Error messages galore from contact.php and mailing.php, but eveything works? Should I worry? how do I fix it?

To suppress these messages, add the following code to your settings.php or civicrm.settings.php

ini_set('error_reporting', E_ALL & ~E_DEPRECATED & ~E_NOTICE);

Long answer on Drupal Answers.

CiviCRM generates a substantial number of E_NOTICE messages - these are notices, which is less severe than warnings. If they bother you, submitting patches to address them is a great way to start contributing code to CiviCRM!


Yes, if the problem is the stdout being sent to cron, I can avoid it appending "1>/dev/null 2>/dev/null" to the end of the command in the cron script called. This makes both stdout and stderr to be sent to null.


CiviCRM Webform : Select field used to use autofill

This is not exactly what you describe but may suit your purposes or at least give you something to go on.

In the CiviCRM tab of the webform builder, enable CiviCRM processing. For Contact 1, tick Existing Contact and a few other fields (try including some address fields for example).
Go to the Webform tab and click Edit next to the Existing Contact component. Set it to Autocomplete and then in the Contact Display Fields box, use Cntrl-Click to add a bunch of fields that match the ones you picked on the CiviCRM tab.

Go to View and now you should find that it works kind of like you describe. Start typing in the box and contacts should appear with First Name, Last name and email all in the box and when you pick one the other fields should populate.


After a long investigation, this seems to have been a hosting issue. For whatever reason, the rename operation in civicrm/packages/Smarty/internals/core.write_file.php was not occurring, possibly because the temporary files were created with 600 permissions. This only occurred when the templates were accessed by a front-end user. Templates accessed through the admin section were able to rename their temporary files.

Our hosting provider was unable to find a solution. We eventually migrated the site to Pantheon.io, and everything appears to be working well there.


How to use a different theme for a contribution page using Drupal

Themekey does indeed support this, as long as you are using Drupal.  I couldn't get this to work until I found that as well as creating a record of the page and the theme you want to use, you have to do a bit more.  You must have 'Themekey CiviCRM Integration' installed and you have to first go to Configuration/Themekey/Settings/Compatability then check 'CiviCRM Theme (Define alternate themes for CiviCRM.)'  See also my comments.


Blank System Status screen and invalid [civicrm.files] URL variable on fresh CiviCRM v.4.7.30 and WordPress v.4.9.4 install

The issue is that the file structure you are using is not accounted for in the installer.

We've covered the standard directory structures and detect them, however there are some use cases that we have not been able to both detect and set programmatically.  In these cases, you will need to override the values.

In your case you needed to override the URLs as the [civicrm.files] URL is appending /home/myorganization/www/sites/staging/crm.myorganization.org to the URL.

I have seen this before (mostly with symlinks or if both WP is installed in it's own directory AND wp-content has been moved).   Can you let us know who your host is and confirm your configuration?


Effect of address change on current employer

@AlainB I totally agree that this should not happen for all location types. Do I understand correctly that:

I change the address of John Doe
I tick the 'use another contact's address'
I then select organization CompanyB

and then companyB automatically becomes the employer of John Doe?

That sounds like unwanted behaviour to me, I would not expect the employer to change automatically even if I changed the work address.


Can i used different Database on remote server for civicrm logging?

Yes perfectly possible, we do it all the time. You can set the logging DSN in your settings file (CIVICRM_LOGGING_DSN) if its not set then CiviCRM falls back to the CIVICRM_DSN
Sorry - just read your whole question!
I would check that the user has permissions from the CIVICRM_DSN to the CIVICRM_LOGGING_DSN i.e. if the CiviCRM database user cannot access the logging database then maybe thats causing the issue.


The solution was to upgrade the database following my CiviCRM version update. Detailed instructions for doing this are at https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Wordpress#UpgradingCiviCRMforWordPress-4.RuntheUpgradescript

Once I had completed this relatively simple process, I was finally able to add payment processors without throwing errors. And just as exciting, the System Status in the Civi admin footer finally switched from "Critical" to "OK."


How to report on repeating custom fields

I think you can do this either by

Creating a report and controlling the whereClause().
Use hook and alter the sql to use OR/AND.

HTH

Pradeep


Sort function for Activities in CaseView

I think my mistake was using the functions array_push and array_merge, as they assigned new keys to the array elements (activity types). Therefore, the single activity types couldn't be found in the following code anymore.
I changed these two expressions to:
$new_array[$key] = $aTypes[$key]; /// instead of: array_push($new_array, $aTypes[$key]);

and
$new_array = $new_array + $aTypes; /// instead of: $new_array = array_merge($new_array, $aTypes);

With that, it seems to work now.


ValueComparison null error when adding 'Last contribution is more than n days ago or is n days ago' as condition

It might well be, but this is not the way I would specify the rule. This condition was for something pretty different, I do not recollect what exactly.

I would specify that the action is send email but the delay is xxxx number of days?

Like so:


Can't translate year(s)word for recurring contributions

This is a longstanding problem with no easy solution. See for example https://lab.civicrm.org/dev/translation/-/issues/53


creating a Smartgroup out of post held in an organization

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