Civicrm altering contribution page I have been struggling for weeks now trying to figure out the best way to prepare a form where :

user selects province, apply a tax based on the province
user selects the membership priceset
total updated with the new membership price and tax according to the province selected.

is there any reference of key of achieving this? is this possible or not possible? I have been trying to use civitax but that's not the way to use it, and I tried adding mulitple tax field or trying to find conditional methods but that is not populating.

I am thinking of setting up the form in drupal custom form, then after that populate it via custom submit where when it submits, it manually db insert the transactions and all of that? but is that possible, as I search no clue of programmatically inserting/creating new user with membership info and so on.

thank you

How many different tax rates are involved?

It there aren't too many, a no-tech solution would be to create a different price set for each different tax rate and have province-based links on your call to action page.

Added later:

I don't know a lot about the tax feature but I put down what I think might work. (This is all untested so could be totally wrong.) Assuming you have already ticked enable  tax and invoicing at Administer > CiviContribute > CiviContribute Component setttings, I would have thought you might need to:

create three different financial account with the different tax rates say tax2, tax3, tax4.
create three different financial types member_dues2, member_dues3, member_dues4
edit the three different financial types  to link each to the appropriate sales tax account
edit the three different financial accounts you will now have, to set the account code to the same value for each so that that membership revenue can totalled across aall the provinces using a line item report  (if this is a what you need.)
-Create a price set for each province lined to the correct financial type.

If this doesn't work, my apologies, but it may help you on your way somehow.


CiviCRM 5.9.1 Cannot Read Database Information CiviCRM 5.9.1 WordPress 5.0.3 PHP 7.2

Upgraded after migration between servers from 4.7.29 w/o issue. When I went inside the CiviCRM it asked me to redo everything like a new install. I went to the MySQL tables and all of my data is there; however, it is not "read" by the CiviCRM. I even added the :3306 to localhost in the civicrm.settings.php and am simply stumped. I have verified that the database info in the DSN section is identical to the database itself. I am running on Business Cloud so I have access to cPanel, phpMyadmin, and terminal. There are NO entries in the error log file. Server runs LightSpeed; however, I have added comments addressing it for WordFence.

The two images show that there are Contacts in the DB (along with everything else) and that the CiviCRM instance does not find anything other than what I filled out. I have also taken a screenshot of the civicrm.settings.php to show that it is set to access my database and one of the database settings itself.

ANY help is GREATLY appreciated as I have tried for over a week to set up an account with Mattermost and it still will not send me an email link.

Your DB connection specifies mysql://, and you are using PHP7.2. The MySQL extension was deprecated in PHP 5.5 and removed in PHP 7.0.

Try switching the two DB connect strings in civicrm.settings.php to use mysqli:// instead of mysql:// and see if that resolves the issue.

I would also remove any other changes (eg the addition of port :3306), to eliminate issues caused by other attempts to fix things.

If this resolves it, the cause was the migration from a PHP5 server to a PHP7 server, not an upgrade to CiviCRM 5.9.1.


Searching based on members that have a twitter website address Is there a way via the advanced search query to return all contacts that have a twitter website address entered?

Currently the only search item appears to just be "Your website" but I cannot see anywhere that just gives the twitter option.

I would have thought that there would be a drop down somewhere in the search criteria. Essentially we just want it the search results to list all contacts that have a twitter social media address listed.

Thanks as always for your help.

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

Hi, Ive gone through some search build options but it still doesn't seem to pull through any contacts as required. Please see the attached images - One of the contact showing the contact type (Community Group) and the Twitter Website field. The other images are examples of the Search Build criteria

enter image description here

When you say "return all groups" I presume you mean return all contacts, as I don't see a way to associate a website with a group, but please clarify. From what I can see, there doesn't seem to be an option to search on website at all in Advanced search, but I think you can achieve what you want in Search Builder with

record type: contact
field: website
operator: like (or maybe a more precise regex)
value: twitter.com


Extension: UK Phone Number Validator - permissions Cool little extension. I am about to trial it on a site. I'm new to extensions so am trying to work out how this is permissioned. On the wiki I see "At this time, permissions for extensions are not influenced by CiviCRM's ACL system so we need to rely on the underlying permissions of the CMS to allow or deny access to an extensions pages." I can't find any info on the specific extension page/post but from the wiki it seems like extensions are usable by anyone with the 'administer CiviCRM' permission and/or 'access Contact Dashboard'. BUT, I'm masquerading as a user with neither of these permissions, and I can still access the admin screen for this extension at mysite.org/civicrm/phonevalidator.

Help appreciated.

I think the remark is for the installation of extensions. You are accessing the admin screen WITHIN the extension. You then rely solely on what the developer has checked within the extension, and apparently there is no permission checking in the extension. So you would have to add that if that is required?


System Status Page Error after 5.3.1 Upgrade I was simply updating from 5.3 to 5.3.1 and got the following error on System Status Page -

  Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  You have requested a non-existent service "civi_flexmailer_required_tokens".

This error replaces the entire System Status page. I resolved it somehow by disabling flexmailer and mosaico and then re-enabling them.  Quite odd.

Update: This error also occurred when updating from 5.3.1 to 5.6

I resolved it by disabling Mosaico, then Flexmailer; and then re-enabling them in the opposite order: Flexmailer then Mosaico (the order is important!).

I used the Administration screen to manage CiviCRM extensions; but you could also use Drush if your Civi is on Drupal.


Create programmatically a ACL logic I have a need to create  programmatically (from a csv) a complete ACL structure.
In detail for each csv line i need to create

the CMS user (Joomla) with a specific role
the connected contact
the connected group
all the 3 ACL record (ACL, Roles and User assignments)

I'm using CiviCRM 4.7.24 and Joomla, I'm thiking to utilize API.

Questions:

is the API the right approach or it's better to write directtly into DB?
which APIs to use for each of the archives above?

Thank's

Yes, the API is definitely the correct approach.  Writing via SQL may work for now, but isn't guaranteed to in the future.

For the first item (creating the Joomla) user, I can't offer help, since that's not CiviCRM.  There are plenty of pages that indicate how to create a Joomla user programmatically.

Don't forget about the API Explorer (Support menu » Developer » API Explorer) to help with determining how to implement your solution.

Also consider the CSV API Import tool, which may provide a no-coding (or low-coding alternative.

Create the contact (step 2) with the "Contact" API.
Connect it to the group (step 3) with the "GroupContact" API.  Use the "Group" API if the groups don't currently exist.

Step 4 needs the OptionValue API to create the role (set "Option Group ID" to acl_role).  Use the Acl and AclRole API to set the rest.


Which Payment Processor should we use? We are using Civi 5.0.1 on Wordpress 4.9.1

Recently I asked if anyone is using Payflow as your payment processor.  Not a single person could answer.  So I don't believe anyone is using Payflow on their civi install.    Also after a lot of troubleshooting, I have come to the conclusion that Payflow is no longer compatible with Civi.

OUr organization needs a reliable payment processor that can process credit cards and recurring payments.  We are a U.S. based non-profit.   Can anyone tell me what is the most popular processor to use with Civi?  I looked into IATS Payments.  Are they a reliable options?

Thank you.

There likely isn't one clear winner here.

But authorize.net has been my go-to recently. That and PayPal Pro are built-in to Civi out of the box.

The Stripe payment processor extension is operating on 855 installs. iATS Payments is on 602 installs.

Here is a very helpful review from Gingko Street Labs which also addresses the 4 aforementioned processors: https://ginkgostreet.com/content/evaluating-payment-processor-options.

I'm on WP as well.


CiviSEPA payment page asking for credit card informations I updated CiviCRM to 4.4.19 and the civisepa module through git. Since then, instead of the BIC/IBAN informations required for SEPA payments, the contribution page displays a non-functioning credit card selector:

I cannot find anything wrong in the payment processor config, which is correctly set as sepa_dd.

The problem was that the existing payment processor had the wrong payment_type (historical reasons) and civicrm didn't display the direct debit block but defaulted to the "dummy card" one.

Changing the payment processor type to direct debit (2) solves the problem


Display Custom Fields in Activities in Views I'm on Drupal 7 and CiviCRM 4.6.10. In Views, I am trying to show all the activities and their custom fields (multiple choice options). However, I'm not able to get any results, the custom field was added but the field is blank. Is this an expected behavior?

Nope.  That is not expected behavior.

If you have two separate databases, one for Drupal and one for Civi, then you'll need to add the tables to the settings.php file.  Until you add them, Views will show the fields as available but will display an error that the table could not be found.

Every time you add a new custom set of fields, you'll need to go to Admnister/System Settings/CMS Database Integration, copy the code there and paste it into your settings.php file.


CiviEvent - Confirmation takes a long time CiviEvent takes a very long time (arounf 120 seconds) to confirm a registration.

From "Confirm Your Registration Information" to "Thank you for registering", the visitor can be lost. What's odd is that CiviCRM is pretty responsive in general.

We're not using any payment processor.

When debugging issues like this, experience says "round" numbers in a delayed request (like 120s for two minutes, or 300s for five) are indicative of hitting a timeout somewhere in the hosting stack.

This might for example be -

a reverse DNS lookup that is failing (server lacks working DNS)
an HTTP or SMTP request triggered within CiviCRM or custom code which fails after some time (eg: email is timing out, server can't connect to your analytics engine, POSTs make connection to a spam analytics tool which isn't responding, ...)
"things like that ..."

Something is wrong here; that's not how CiviCRM works out of the box (try it on a demo site). But from the details here I can't tell you what's wrong.

Making specific guesses risks leading you astray even as it is likely to be of assistance. That said: You might want to check if this bug affects all situations where CiviCRM sends an email, or where CiviCRM processes a form submission.

This may require some debugging expertise I think - check out civicrm.org/providers if you don't have an existing team to lean on for this.

Do report back on the solution you find!


Unable to change contribution status using API I am attempting to update a contribution's status but I am getting the error "Cannot change contribution status from Pending to In Progress." I am doing this through the API. I understand there may be some specification bug where In Progress is intended for pledges, not contribution's -- but I can't think of any better way to represent the data I am getting using the available contribution statuses :-S In Britain, a contribution or payment of any kind can have multiple states and frequently goes through multiple state changes. I understand this is different to, say, the US system which I have limited experience of. I am using the contribution status 'Pending' to mean "The direct debit mandate has been created (but not submitted by the payment gateway to the banks)". I am trying to use the contribution status 'In Progress' to mean "The direct debit mandate has been submitted to the banks (but not yet paid)" I believe this is in keeping with expected behaviour for these terms in this context.

For the why on restrictions - see: Reasons for restricting changing contribution statusses?

I'm co-maintaining the iATS extension and we're doing Uk direct debit - so I hear you. And I also have a status = Returned that I need to be able to get in for North American ACHEFT processing. ACHEFT here can go from Pending -> Completed -> to Returned. And Returned is not a refund. It's also not quite a Canceled either.


Exporting membership data including chosen price set Our charity offers a range of memberships for organisations with the price based on their size. For each type of membership we have a price set including 3 options. So you can be a service provider (small, medium, large); a training provider (small, medium, large) or a supporter organisation (small, medium, large).

We have recently moved over to CIVI want to invoice members who have just joined and those who are due for renewal (yearly).

We want to be able to create invoices using a mailmerge from excel  including info like organisation's name, member type (service provider, trainer, support org), member start date, end date, and of course what it will cost them to renew assuming they are still the same price set ie (small, medium, large). We can search memberships to find those who are due for renewal but we can't find out what price set they chose when they joined.

We tried to export data but can't find price set as a field under member data or payments/contributions. I can't even see it when clicking into an individual member's details. The price sets are active as we've tested joining and you need to select the option - it works for PayPal but we can't process PayLater at present. I've noticed when creating profiles it says that contribution and member data cannot be included on the same profile. So wondered if that is part of the problem. Is there a work around?

We're on CIVI 4.5.8

If I am not wrong - you have imported data from your previous system to civicrm and started using price set. But you couldn't find the old price set in the new system because you couldn't view membership amount in the membership record --

This problem is due to data import you have civicrm_membership but you haven't created civicrm_membership_contribution records.

while creating contribution records and line item you will be adding price set Id and price field Id correctly. then this will get picked up in civicrm price set


Tips for using CiviCRM on Amazon EC2 Is someone running CiviCRM on the Amazon EC2 (Part of the Amazon Webservices)? I would like to know:

What instance type is selected?
Is the operating system AWS Linux (supported by Amazon)?
Are there other Amazon Services in use (for example Amazon RDS, of Amazon EC2)?

I'm not running Civi on EC2 but I am running other things on it and I can assure you it behaves just like any Linux server.

Personally I prefer Ubuntu to AWS Linux (it's one of the choices) - but Civi will run on either. I just like to use ubuntu because it's familiar and better documented. I use Apache web server (which you have to install using "apt-get") but you can use other web servers if you prefer.

My instance type seems to be "t2.micro" but I suspect it's the default - I don't know what it means, so I won't have picked it on purpose.

Takeaway message - no specific settings are needed for Civi over and above being a standard Linux server with a sensible web server running on it!


Registering someone who had a friend buy the tickets I have someone who purchased three tickets and I know the names of their guests and they are in the contacts. But, the ticket prices are discounted due to the group rate and was purchased by one person. What is the best way to make sure I have record of someone attending an event if someone else paid for their ticket and the purchase already affected the total count for the event?  I thought of maybe adding them in as a comp, but that would affect the guest count. I want to be able to record in a way that I can make sure they are included on an attendee report.

I am not sure if there is a way to tag additional contact in a particular registration somehow?

you can add "free" participants from the backoffice to get them on the list. I'm not sure I understood your need about the number of seats, but you could create a status "paid elsewhere" that you set as not counted as taking a seat.

In theory, you can link these participants to the paying "main" participant, but I don't think you can do it from the user interface, you'll have to use the api explorer or code.

Does it solve the problem?


How to patch / add a plugin to Joomla CiviCRM? We have the CiviCRM Admin Bar showing up on the Front-End of our site and I've found a possible solution/patch, 'https://github.com/civicrm/civicrm-core/pull/13820, but I don't know how to install the patch. I've downloaded the .zip of the patch from github. Now what do I need to do to get it installed on our site? Thanks in advance for any assistance you can provide.

What version are you on now?  That patch is in 5.12.0 so your easiest option may be to upgrade to that version.


Soft credit / honoree info in a token for Thank You letters? I have hunted and not found anything so I am assuming that this does not exist -- but thought I'd ask just in case. I'd like to be able to reference the soft credit / honoree information in Thank You letters but can't find this as a token.

I guess it's tricky to do this as a token since it relates to a specific contribution and not the contact in general. What is the best way to try to do this?

Here's an attempt to address this with a token that can be used with Fuzion's CiviToken extension. With that extension installed, this token file can be added to a tokens directory in your custom PHP folder to provide a "Latest Contrib Soft Credit Name" token. (It checks the latest contribution and if there is a soft credit adds the name(s) in this token). The caveat being that it only checks the latest contribution and won't work for previous contributions.

https://github.com/laryn/nz.co.fuzion.civitoken/blob/master/tokens/latestcontribs.inc

File: tokens/latestcontribs.inc

<?php

function latestcontribs_civitoken_declare($token){
  return array(
    $token . '.softcredit_name' => 'Latest Contrib Soft Credit Name',
  );
}

function latestcontribs_civitoken_get($cid, &$value, $context){
  $params = array(
    'sequential' => 1,
    'contact_id' => $cid,
    'options' => array('sort' => "receive_date DESC", 'limit' => 1),
  );
  $softcredit_formatted = "";

  $softcredit_name = civicrm_api3('Contribution', 'getsingle', $params);

  if (isset($softcredit_name['soft_credit'])) {
    $connector = "";
    $i = 0;
    $total = count($softcredit_name['soft_credit']);
    foreach($softcredit_name['soft_credit'] as $softcredit) {
      $i++;
      $softcredit_formatted .= $connector.$softcredit['contact_name'];
      if ($i == ($total-1) ) {
        $connector = " and ";
      } else {
        $connector = ", ";
      }
    }
  }
  $value['latestcontribs.softcredit_name'] = $softcredit_formatted;
  return $value;
}


Using Webform CiviCRM for a contribution form and allow "on behalf of an organization"? Drupal 7.63
Civi 5.4.1

We currently use a Civi Contribution Page for our donation form. However, I am looking at changing to using the Webform CiviCRM Integration module. However, our current Civi Page allows an organization donation using "On Behalf of".

But I do not see on behalf of in the webform options. But I can set the form to allow for Individual or Org contact type.

Any ideas how to do "On behalf of" or a simple way to have first option be Individual or Org and then display the proper Contact Form?

I have played with the Webform Node Element module (allows you to add a node as a webform component). But in order to use conditionals with it, you have to put the nodes (webform for individual and webform for orgs) into seperate fieldsets and show based on selection of Ind or Org question. Then because you have a full form within another form you have 2 Submit buttons. I can hide one with CSS but then I run into multi-page issues which seems to be required to process contributions.

I have also looked at the component keys for the Civi Contact components when set for Individual vs Org. I thought maybe they used a different key depending on if the form contact was individual or org. But that does not seem to be the case.

Any ideas out there of how to handle this?

Instead of have 2 links in my menu to two different webforms, I made an image of a Yes Checkbox.

At the top of my form I added a Markup component and put in the following code

This donation is from an organization

This still feels like it is part of the form to donors but it actual is a link to my other form.


Localization and Address settings disappeared after domain change We recently changed a site url. After the URL change and making changes in the settings file there was an issue loading so I cleared the cache and reset the paths.

Everything came back OK except all of the settings in localization, display settings and address settings are gone and fields just have 1 in them. See the screenshot below.

Has anyone seen this? If there is a way to get them back that would be great. Otherwise I can reenter them. They were all on the defaults for the most part.

Running CiviCRM 4.7.27 with WordPress 4.9.4

I haven't seen it - it seems odd because the defaults are correctly defined here https://github.com/civicrm/civicrm-core/blob/master/settings/Core.setting.php#L124


Unable to Change Selections on Event Registration, Error: "Expected one Contribution but found 0" We just updated to 4.7.30 and the latest Drupal 7 version. Now, when viewing participant records that include a contribution record, the following error is in the Fees section:

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Expected one Contribution but found 0

As far as we can tell, participants are able to register just fine since the update. In the Selections section, the appropriate selections are there, but if we click the Change Selections link, we get the error: Network Error: Unable to reach the server. Please refresh this page in your browser and try again. Refreshing does not help.

We are still able to edit the contribution records that are displayed on the participant record. We can register new participants manually and the error does not appear. The error also seems limited to events...does not appear in membership.

We have no Civi Extensions on this site.

This seems to be resolved with the commit from March 2, 2018 here: https://github.com/civicrm/civicrm-core/commit/b512c92fe8bbe9a8ef71ae9ba5adbcfe7500d81c

With that change applied, we longer receive the error and everything works as expected.


How can I expose CiviPetition signatures to the public? I don't see any option to show the results of a petition publicly. How do I set this up?

This isn't a function out of the box. If you are in drupal, you can use view to display the list of activities (a petition signature is "simply" an activity of type "petition signature". They are others ways to fetch data out of civi on other CMSes, but might need to write some code.

As a side note: please don't display the full name of the signatories, that might be a risk for them. It happened not so long ago that a right wing group took a list of a progressive petition and started to dox them (find their address and contact details...), contact them...

X+


Smart group with manually added contacts A smart group is a result of a search. The contacts in the group change dynamically depending on the criteria.

Though, I have several use cases where i want to be able to force some contacts in the group even if they don't meet the criteria in the search. For example, i want to send a newsletter to people that subscribe but also automatically to members.

It seems to be possible to manually add some people to a smart group like if it were a standard group. But is it a good practice ? Is there any known caveat ?

You should think of a smart group as two parts:

A static group (and all the tables it involves)
A query and its associated tables

The final list of contacts is the union of the above two (minus the contacts who have been explicitly removed from the static group)

I think the above design allows a lot of flexibility and power. I think the main issue with smart groups is being smart about when and how to cache the results. Civi does a fairly basic job of this right now and can be improved considerably (IMO)


Search Custom Template Directory first when using Smarty {include} I'm sure this is easy but the answer has escaped me. On a drupal install CiviCRM is installed at:
/webtree/mysite/htdocs/sites/www.mysite/modules/civicrm

I have a Custom Template File directory set to
/webtree/mysite/htdocs/sites/www.mysite/files/civicrm/templates

I'd like to store a custom template file "someText.tpl" in the Custom Template File directory that, depending on some logic, may get included in the Online Event Registration system workflow message using the command:

{include file="someText.tpl"}

If I place the file at:
/webtree/mysite/htdocs/sites/www.mysite/modules/civicrm/templates/someText.tpl
it is read just fine, but I haven't been able to find a way to place it at
/webtree/mysite/htdocs/sites/www.mysite/files/civicrm/templates

I've tried assorted dot notation, full paths, etc. but can't seem to read and include a template that isn't in the module/civicrm/templates path. I'd rather not store my custom files there because it creates extra steps during upgrades.  Any suggestions?

You can find some information about overriding templates and the Custom Template Directory in the developer guide here... along with the recommendation that you don't do that but use extensions instead.


Is it possible to force user log out if idle for a defined time? We are using Drupal and CiviCRM 4.6.20.0.  We have some shared computers in our office and CiviCRM Users do not log out and just close their browser.  They do not get logged off CiviCRM.  If someone else interacts with CiviCRM from the same device expecting to be an unauthenticated person registering for an event or making a contribution, CiviCRM identifies them as the person who was logged on.  This is creating a problem where a users contact record is being updated with event registrations and contributions for others.

Can Drupal or Civi terminate the user's session if they are idle for a specified time and/or if they close the browser.

This is really a Drupal question, since Drupal handles user login/logout and not CiviCRM. I suggest you ask at https://drupal.stackexchange.com/


Does Email Signature extension work on CiviCRM 4.7? Is anyone successfully using Email Signature extension on CiviCRM 4.7?

https://civicrm.org/extensions/email-signature

Current usage is 8 - that may include some old dev/stage installs by the authors - and almost certainly are 4.5 installs by current CiviCRM users (latest stable release for that extension).


Autocomplete filter in Drupal Views I have a view created that has Organisation Name and a contacts Display name shown.

Now I want to be able to use auto-complete/ajax to enable the end user to filter by Organisation Name.  This helps the end users not having to remember the exact name of an Organisation.  In the future we will have 50+ organisations in the system.

At the moment my only other choice it to initially manually add all the organisations to the filter and use a drop-down.  But as more organisations come on board, this will soon end up unmanageable.

To add more clarity to my VIEW setup

RELATIONSHIPS

  CiviCRM Contacts: CiviCRM Relationship (starting from contact A)
  (CiviCRM Relationship (starting from contact A)) CiviCRM Relationships: Contact ID B

FIELDS

  CiviCRM Contacts: Organization Name (Organization Name)
  (CiviCRM Contact B) CiviCRM Contacts: Display Name (Display Name)

FILTER CRITERIA

  CiviCRM Contacts: Display Name (exposed)

This gives results (shown in a table) with Orgnisation Name in left column and Contacts Name in right column.

But no matter how I change the filter properties (apart from changing it from Single to Grouped and typing in the Organisation names to produce a drop-down) it has the issues described above.

I did a similar auto-complete feature on a Civicrm-based view with 'Search Autocomplete' https://www.drupal.org/project/search_autocomplete.
I liked that you can filter the data shown in the autocomplete list with a view, so you can filter to items related to the user.

I made a view 'search_name_or_email'  based on CiviCRM Contact with

among other fields

'contact ID', 'sort name', 'email address',
a custom text field named 'autocomplete text' that contains '[[id]] [sort_name] :: [email]'
a 'CiviCRM Contacts: Text Link' that points to the contact page

exposed filter Operator 'Contains'
'Choose fields to combine for filtering': 'name' and 'email address'
in 'More' the 'Filter identifier' is 'term' (this one was important)
(here add more fields and filters according to what you want to display and list, by example filter on Contact type for Organizations only)

the view format is 'Autocomplete JSON' with

group fields by: 'Contact ID'
input label: 'Contact ID'
input Link: 'Text Link'
Ouput Field: 'Autocomplete Text'

The view is limited to 10 items. Path: '/contact-id-autocomplete'

I made another display on the same view
that has input label 'Name' instead of 'Contact ID'
so when we click on the autocomplete list it fills the field with the contact name rather than the ID.
Path: '/contact-name-autocomplete'.

In the admin/config/search/search_autocomplete settings I made 3 forms

'contact in relationship with' to have in a 'relationship contact B' views exposed filter with

HOW: 'Auto Submit' unchecked and 'Auto Redirect' unchecked
WHAT: callback url: /contact-id-autocomplete
ADVANCED: 'ID selector for this form': '#edit-contact-id-b-'

'contact name' to have in a 'contact name' views exposed filter

HOW: 'Auto Submit' unchecked and 'Auto Redirect' unchecked
WHAT: callback url: /contact-name-autocomplete
ADVANCED: 'ID selector for this form': '#edit-name'

'quick search' to have in the page header with

HOW: 'Auto Submit' checked and 'Auto Redirect' checked
WHAT: callback url: '/contact-id-autocomplete'
ADVANCED: 'ID selector for this form': '#edit-search', to be set depending of your page content

For the ADVANCED: 'ID selector for this form', you have to find a unique jQuery selector for your html input field

To style the autocomplete list, and have only one line by Contact, I made a custom autocomplete style named 'atd'
with a css file in my custom theme
and chose it in the search autocomplete settings in 'Select a theme for your suggestions'

/* AUTOCOMPLETE */
input[data-sa-theme="atd"].ui-autocomplete {
  position: absolute;
  cursor: default;
}
* html input[data-sa-theme="atd"].ui-autocomplete {
  width: 1px; /* without this, the menu expands to 100% in IE6 */
}

input[data-sa-theme="atd"].ui-autocomplete.ui-menu {
  background: none;
  border-radius: 0px;
  color: #2c2c2c;
  border: 1px solid #c8c8c8;
  box-shadow: 2px 2px 2px -1px rgba(128,128,128,0.6);
  position: absolute;
  background-color: #ffffff;
}

/* AUTOCOMPLETE MENU */
ul[data-sa-theme="atd"].ui-menu {
  font-size: 1em;
}
ul[data-sa-theme="atd"].ui-menu {
  list-style: none;
  padding: 0px;
  margin: 0;
  display: block;
  float: left;
  min-width: 650px;
}
ul[data-sa-theme="atd"].ui-menu .ui-menu {
  margin-top: -3px;
}
ul[data-sa-theme="atd"].ui-menu .ui-menu-item {
  margin: 0;
  padding: 0;
  float: left;
  clear: left;
  width: 100%;
}
ul[data-sa-theme="atd"].ui-menu div.ui-autocomplete-field-group {
  display: none;
}
ul[data-sa-theme="atd"].ui-menu .ui-menu-item a {
  text-decoration: none;
  display: block;
  padding: 0;
  font-weight: normal;
  margin: -1px;
  border:none;
}

/* Interaction States */
ul[data-sa-theme="atd"].ui-menu a.ui-state-focus {
  background: none;
  background-color: #BAE4F6;
}
ul[data-sa-theme="atd"] .ui-autocomplete-fields {
  padding: 5px 6px;
  overflow: hidden;
}
ul[data-sa-theme="atd"] .ui-menu-item-first {
/*  border-top: 1px solid white;                   // <= change here */
}
ul[data-sa-theme="atd"] .ui-autocomplete-field-title {
  text-align: left;
  font-size: 1.3em;
}
ul[data-sa-theme="atd"] .ui-autocomplete-field-term {
  font-weight: bold;
}


How to Create an extension? I am really finding it difficult in creating an extension in CiviCRM.

I just want to create a section in contacts Called DSearch like , when we click in contacts we get differeent sections like Address , Notes, Communication Preferences etc.

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


Should a second receipt be sent when payment method is ACH with iATS? Using the iATS payment extension, credit cards and ACH transactions are going through just like they're supposed to.  The only hiccup is that one-time ACH transactions are generating a second 'online' receipt when the transaction is later moved from Pending to Completed via the iATS Payments Verification scheduled job.  Is that supposed to happen?  If not, any ideas on how to track down what is causing it?

Further Details

When the ACH transaction is first submitted (upon the donor hitting the Submit button on the contribution page), a receipt is issued with all relevant details and the contribution is marked as Pending in CiviCRM (as it should).  Later that day or the next business day, iATS receives the okay from the donor's bank and marks the transaction as OK:BankAccept in their system (as it should).  When the iATS Payments Verification scheduled job next runs (it runs hourly), the contribution is changed to Completed in CiviCRM (as it should) and a second receipt is generated (??).  The second receipt has the basic information (amount, date of transaction, transaction id) and our profile we include in the Online Receipt message template, but none of the financial information nor the billing address info.

The receipt time and date for the contribution is updated to the time of the second receipt and matches when the iATS Payment Verification job ran, so it would appear that is the link.  There are two activities in the contact's record, one for the actual contribution when it first occurred and then a second activity for when the contribution status got changed from Pending to Completed.

What causes the online receipt message to fire?  Could the recording of the second activity be causing the 2nd receipt?

Civi 4.6.14 (will be updating to 4.6.20 before go-live); Drupal 7.44; iATS Payments extension 1.5.3

What do you have for:
Enable email receipting for each recurring contribution.

on:
/civicrm/admin/contribute/iatssettings

is it checked?


Home page redirecting to event page on Wordpress I'm running Wordpress 4.4.1 and CiviCRM 4.6.11

The main page of our site http://www.mltawa.asn.au is redirecting to an old event's page (http://mltawa.asn.au/2015-agm-registration/?page=CiviCRM&q=civicrm/event/info&reset=1&id=7). When I disable the event, it goes into a loop or, if logged in as admin, I get the pop-up message in the back-end:

  The event you requested is currently unavailable (contact the site
  administrator for assistance).

Ideas of where to start looking to fix this? :)

Create an empty Wordpress page, name it what you want, for example "civi".
Add that name to the "WordPress Base Page" in
Administer - System Settings - CMS Database Integration.

For more info see:
http://wiki.civicrm.org/confluence/display/CRMDOC/Displaying+Public+Forms+in+WordPress+Frontend+Sites

Does that work?


How do I exclude the "click here" from mail header on the generated web page? Mail sends out with a header that contains click here to view online and links to http://www.example.com/civicrm/mailing/view?reset=1&id=77

Within their email client, the link takes them to the appropriate page, however that page includes click here to view online which links to http://www.example.com/civicrm/mailing/%22http://www.example.com/civicrm/mailing/view?reset=1&id=77%22.

This incorrect links takes them to a CiviMail search page.

Preferably, I'd like to hide the header and the footer from the generated web page rather than correct the url, but I'd be happy either way.

Try wrapping those items in <span class="hiddenElement"> </span>. Civi's css will hide it on your website, but email clients will not.


Unable to use ckeditor after upgrade to 5.3.1 After an upgrade from 4.7.28 to 5.3.1:

Text areas (e.g. editing an event description) have a blank part of the screen in place of the normal editing box.
The configure page of the ckeditor is also broken.
Both of those pages show a console error:

Uncaught TypeError: Cannot read property '17' of undefined
    at Object.keystrokeToArray (ckeditor.js:36)
    at Object.keystrokeToString (ckeditor.js:35)
    at CKEDITOR.ui.button.render (ckeditor.js:636)
    at G (ckeditor.js:647)
    at a. (ckeditor.js:649)
    at a.h (ckeditor.js:10)
    at a. (ckeditor.js:11)
    at a.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire (ckeditor.js:13)
    at b (ckeditor.js:326)
    at a. (ckeditor.js:325)

They also show console errors of missing css files, which appear to be missing from the monoo-lisa skin directory of the ckeditor directory of my drupal libraries, i.e. not the one civicrm has bundled or should use. I presume this is just a side effect of the above error.

I have a very similar site that went through the same upgrade that does not have this issue (and both sites use Drupal's ckeditor via the wysiwyg module). This site notably has a very large CRM variable defined in javascript, but it doesn't show any other errors.

Do you have the Boxes contrib module enabled on your Drupal site?  If so, your problem may be this:

Issue #2175471: Incompatible with CiviCRM - CKEditor WYSIWYG does not load

There is a patch available from the above link that resolves the issue.


Reccuring Notice in Civicrm I am getting this recurring error in CiviCRM when I do various task, is this something I should be worried about?

  Notice: Undefined index: path in
  CRM_Core_BAO_Navigation::getMenuName() (line 474 of
  /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/BAO/Navigation.php).

this is not something to be worried about. It is a warning that somewhere in the code a syntax rule is not correct, but this does not affect the actual processing. You should be worried if you get a yellow message with 'Error', 'Notice' is irritating but nothing to get worried about.


jquery datepicker missing (wordpress) after updating to 5.26 from 4.6.33? A site I inherited a while back finally needed to be updated to a much more modern level including PHP version, MariaDB version and Wordpress version along with CiviCRM.
Seen first in the LYBNTY report - the date range fields are simply dropdowns with entries like 'Yesterday', 'Last week', etc. but no ability to actually pick a date range.
I have checked Access Control which all looks good (but I am administrator so should have all those already).
Checked the header links for jquery and seems I have access to them.
Is there a setting somewhere to turn jquery entities off/on?  Or could I be missing a path even though the update was in place and not moved?
Everything else seems to be working just fine.
I might add that the Summary Fields extension is still quite old and is marked as needed an update.  Could this have anything to do with this as in not being compatible with the 5.26 version of CiviCRM?
I'm stumped here so any suggestions would be fantastic!
TIA!

Never mind - all working now.
I modified the CiviCRM Resource URL from the default that was in there of [civicrm.root]
to be the full URL http://example.com/wp-content/plugins/civicrm/civicrm and the choice of 'Choose Date Range' showed up in the drop down giving the functionality needed.
Or it is entirely possible that Choose Date Range was there the whole time and I just missed it.  Been such a slog of updating this ancient site that that is entirely possible.
Strangely, that jquery error is still showing up in the console, though.  But I will look at that tomorrow.


Did anyone have a problem with CKEditor after 4.6.22 upgrade? After updating my Civi installation from 4.6.x to 4.6.22, my CKEditor was broken (blank screen in edit window, all areas).

After checking my js console, I found my justify plugin folder was missing:

../civicrm/packages/ckeditor/plugins/justify  <= folder missing

I downloaded the plugin from here: http://ckeditor.com/addon/justify

Expand the .zip in plugins folder, it will create the justify folder and fixes the problem.


Is it possible to notify a staff coordinator for offline/backend contributions? On online contribution page setup there is a the ability to send email notifications to different email address using CC & BCC. Using that, our coordinator receives the notifications for each donation submitted using contribution pages.

I am wondering is there a similar option for Offline/Backend contributions submitted by the users?  If not, is there any way to facilitate that?

CiviRules is available and you can use it to do what you want. There is documentation as well :-)

If you want to use CiviRules to send an email you will also need the send email API (and please pull the civirules branch): https://github.com/CiviCooP/org.civicoop.emailapi

Once you have that you create a Rule, select the trigger for the rule as an event and come up with conditions. In your case the event will probably be 'new contribution' and the condition might be the source or the financial type, depending on how you are going to distinguish a back end contribution.

The action will then be 'send email', or could possibly also be 'create an activity'. It would make sense to me not to send lots of internal email but instead to create a specific activity type with a dashboard so the user can see his daily workload. But perhaps your end users have other preferences.


Disappearing CiviCRM menu and Network Error Recently I upgraded a from 4.7 to 5.1. All was well and then after a weekend suddenly the CiviCRM menu has disappeared and the dashboard and most other pages are displaying the error bubble:

  Network Error Unable to reach the server. Please refresh this page in your browser and try again.

Thinking it was some dastardly upgrade gremlin i decided to upgrade to 5.2 which has made no effect. I've checked the base url - with and without HTTPS. Any other troubleshooting tips I can try to resolve this?

UPDATE:

Struggling to turn on debugging via the UI so I enabled define( 'CIVICRM_DEBUG_LOG_QUERY', 1 ); but I am none the wiser as no entries are marked [error].

F12 on the browser yielded no JS errors, but having the console open produced this

Any ideas?

This error typically means there's a JavaScript error.  Open your Developer tab in your browser (by pressing F12), go to the Network tab and reload the page.  Consider filtering by "XHR" requests, since it's almost certainly a problem there.  Look for the one with a status that's an error and click on it, then check the "Response" tab.  You'll find a more detailed error there.  The error will probably be more detailed if you enable Debugging and Backtrace.  Hopefully that should be enough to solve your problem, or at least update your question with more details!


"Is deceased" checkbox and Views We have a simple directory built with Views and a few exposed filters for searching. One of the (non-exposed) filters is intended to make sure all listed contacts are not marked as deceased. However, the filter does not have a negate option so instead of Is Deceased NOT TRUE we have to do Is Deceased FALSE. We may have even had to set the 'Is Deceased' field to 0 in the database directly, I can't recall. That part was working fine.

However, we also have a simple profile set up to allow editing of the contacts, adding a photo, and marking as deceased as necessary. What we've found is that when a contact is edited (to update the address or add a photo for example), the "Is Deceased" field is reset to NULL and this excludes them from the directory (because the field does not equal FALSE anymore).

What is a better way to handle this?

In the end, I removed the "Is Deceased" option from the profile we use to edit the contact's information and created a separate profile which contains only that field. It's a little clunky to present two edit links:

Edit contact information
Mark contact as deceased

...but it works for now. I would have tried it in a Webform (with Webform CiviCRM) but I don't think the image handling pushes back into CiviCRM.


possible bug: when using External ID as matching method, imported contributions can get matched to contacts in the trash--would expect error instead I have a client whose accounting team has run into the following issue (admittedly an edge case but causes a lot of confusion and troubleshooting time for the team so we want to fix). Following the bug reporting instructions I have replicated this in two demo instances (dmaster and wpmaster) and now want to know if anyone else has experienced this. Here are the conditions/steps. To your knowledge is this a known issue?

The import matches contributions to contact by External ID
A given contact has been de-duped and the External ID needed for correct contribution matching has been overwritten by a different External ID
The contact record with the correct External ID is in the trash
The contribution import runs without throwing any error message
The contribution does not appear in the contact record because its External ID does not match, and it DOES appear on the contact record that is in the trash (soft delete).

To summarize: When contributions are imported matching to External ID, expected behavior to get an error message and failed import line if I import a contribution that matches to a contact that is soft-deleted. Instead I get no error message and a successful import matched to a soft-deleted contact.
System info: The client is running Civi 5.31.0 on WP 5.5.3 but since I replicated on dmaster and wpmaster that seems less relevant.
Other relevant info: When using other methods of matching to a contact, the system behaves as expected (i.e., gives an error message and does not import the contribution):

Email address as matching method gives "No matching Contact found for ([EMAIL ADDRESS])"
Contact ID as matching method gives "Invalid Contact ID: contact_id 204 is a soft-deleted contact."

I suggest you create an issue at https://lab.civicrm.org/dev/core/-/issues
I'd think it should be treated in the same way as if you matched on a contact id that was soft-deleted.
The message you quote appears to be generated from CRM_Contribute_Import_Parser_Contribution::deprecatedFormatParams() but given the name, a quick fix to that function to handle external id is not the answer.


custom fields not adding to Drupal views I'm trying to build a drupal view and pull in rm custom data
For both contact (client) and case
(view for case contact, relationships include case contact id-case id, and case contact id- contact id)

From add fields- all the data sets I need are visible

After selecting fields and clicking add, I'm taken back to the views edit screen without the option to edit the field label etc. And the field does not appear in the field list.

This is not consistent... for example from data set "x"
fields, a, b c, d and e are all available to choose. Fields b and d, can be added to the view. Fields a,c and e fail to materialise.

Anyone seen anything like this? Anything else I should be looking at?

(Drupal 7.60, civi 5.3.1)

settings.php file has been updated

The views cache, drupal cache and civicrm cache have been cleared several times

One of the custom field sets in question

Selecting fields to include in view

Only 2 fields out of 7 end up in views table (end columns)
Other Details and Project

It sounds like it is missing from your Drupal settings.php file. Here's where you get the information to add to it:

https://www.yourdomain.com/civicrm/admin/setting/uf?reset=1

That will give you all the information that needs to be added. Each time you add custom fields/profiles to CiviCRM, it is a good idea to update that listing in your settings.php file.


Cron Job returning 404 in Joomla This is a new install CiviCRM 4.7.29 on Joomla! 3.8.3 on Hostgator Shared.
The Cron File is returning a 404 Error message.
I can access the file itself when I run it from the Cpanel but somehow it is returning this error.

I changed the permissions on the Bin folder and cron.php (755,755) as was suggested in another post but still no success.

I created a specific user/group with the suggested permission just for the cron job. But now I'm testing with the Super Admin.

Any help is appreciated. Thanks

Update: I commented out: 'ini_set('session.use_trans_sid', '0');' in joomla.php file which fixed the error and the Cron Job is now working. (as posted here)
However. I'm not sure how this change might affect other functions in Joomla.


Unable to make backend contributions with non-default payment processor (sometimes) "no class provided" error As per the title, here's how it happens:

Create a payment processor instance (i.e. add payment processor here
/civicrm/admin/paymentProcessor?reset=1)
Create a second one of the same type, different credentials. Leave the first one as default.

When trying to use the second payment processor on a 'backend/admin' contribution form (ie. /civicrm/contact/view/contribution?action=add&cid=etc.), we get an error at
/CRM/Contribute/Form/Contribution.php, line 1165
(this is using civicrm 5.6.1, we had the same issue on 5.3.1).
As far as we know this behaviour was introduced sometime shortly before 5.3.1 (that was the security update in the summer), i.e. this is new behaviour on several upgraded, existing installs.

I can see that the payment_processor_id value is getting to the server (I can see it in the submit values in the stacktrace).

To make matters a bit more confusing, we can't reproduce it reliably (but do have it reproduced on three separate sites, but not a fourth, new install), so there is some additional aspect going on here.

These tests are all using the iATS payment processor (of course ...), but I don't think that actually comes into play, since the code breaks before it can identify which payment processor is responsible for the payment.

Okay, first remind me to never exclude my iATS extension from being part of the problem ...

Karin tracked this down to the point in the (core) code where the list of available payment processors are reloaded a second time.

It occurred to me that the iATS extension interferes with this form for two reasons:

in order to remove the iATS ACH/EFT processor if any,
(or) to remove all but the swipe processor if it's the default

i.e., it's having to do some non-supported changes to core.

But ... it looks like the way it does this, by removing entries from various parts of the form, no longer works.

I think the best solution would be that instead of removing the payment processors from the option lists, the code will just disable them, (assuming that's possible).

And it turns out that this is easy, and you can try it out with the next iATS extension release or this commit/patch:

https://github.com/iATSPayments/com.iatspayments.civicrm/commit/2bf9dcdb1537fb75649aa6304cdab991a8a9d1eb


suspicious activity HTML error When our members are trying to register with us they are presented with a HTML suspicious activity error.

Can anyone advise why?

I've searched through sites and all I can come up with is a IDS issue but i'm unsure how to turn this off.

Your CiviCRM logfile (instructions to locate) should show details about the rejected form submissions.

Would be interested to hear details of what submitted data was triggering CiviCRM's IDS to reject registrations - if you can excerpt some details of a rejected submission from the logfile, someone might be able to give an informed reply to your question.


How do you visually update a select2 widget? I'm trying to select the value of a select2 widget using js. I can change the value ok:

jQuery('#excludeGroups').val("846").trigger("change");

The problem I'm having is that this doesn't update the display. It does work in that when you submit the form it's the correct value - so it's working behind the scenes. But it doesn't actually change the display - the new value doesn't appear in the widget. The documentation suggests trigger("change") should do it. I'm not getting any console errors. Is there a trick?

Figured this out. I needed to wrap my jQuery code in:

CRM.$(function($) {

});

The change trigger - and other select2 events - started working once I did this.


How do I translate the "On behalf of Label"? Using a multilingual install, on the configuration page of a contribution page, the "On behalf of Label" doesn't provide a multilingual option.
Switching languages and inputting the translation into this box just overwrites the previous one.
Similar issue with the "Honoree Section Title".
Using Drupal 7 + CiviCRM 5.28.4

This is a civicrm core bug, fixed in 5.30, as per Demerit's comment below.
These labels live in the table civicrm_uf_join as the 'module_data' field.


Can I apply a CiviDscount discount when embedding a contribution page in a WordPress page? It took me a while, but I figured out how to get CiviDiscount to work when providing the link directly to the contribution page, however I'm trying to use a shortcode to embed the CiviCRM contribution page into a WordPress page.

The generated shortcode looks like this:

[civicrm component="contribution" id="2" mode="live" hijack="0"]

I modified it to look like this:

[civicrm component="contribution" id="2" mode="live" discount="pkpwpabs7" hijack="0"]

I took a guess, but my guess was wrong. Is there a way to do this?

CiviCRM only picks out a discrete list of shortcode parameters: see the code here.  Adding an additional shortcode parameter will not make CiviCRM recognize it and add it to the rewritten request.

Unfortunately, without rewriting CiviCRM's WordPress integration, you won't be able to get this to work via shortcode.  You'll have to use the big long URL instead.  If you're trying to generate a friendly URL, you might have to manually set a rewrite.


Making the Event Registration icon larger How do I make registration icon on an event page larger? Is seems to be a bit small and is it possible to move it around?

You need to start from a basic familiarity with how to style webpages. I suggest googling a few simple tutorials on css.


Dashlets and SSL in multiple secure virtualhost environment I've identified what may be bug or feature request, or at least a case of another item to add to the list of things which can make dashlets fail.

I have an Apache 2.4 server which has multiple virtual hosts using different SSL certificates.

Apache used not to support multiple SSL certs from different domains at all, but now it does it in effect because browsers specify which domain they want the SSL cert for. If a server has two certs installed "domainone.com" and "domaintwo.com" the user's browser needs to specify it wants to use the cert for "domaintwo.com", otherwise the server will provide whichever one comes earliest in the server config. This is apparently called Server Name Indication (SNI)(https://en.wikipedia.org/wiki/Server_Name_Indication)

If using wget or cURL, SNI does not happen by default.

Therefore, in my situation where I am using CiviCRM over an https connection, the dashlets will not load because they are loaded via cURL (I believe), and cURL will receive an error because it is using the wrong SSL certificate to connect.

In theory this could be because of an old version of cURL installed on the server, but I have checked and that isn't the case.

I believe it's more likely to be that the code needs to use something like SSL context options SNI_enabled boolean and SNI_server_name (http://php.net/manual/en/context.ssl.php), although I'm not sure how that integrates with using PHP's curl functions.

As you can see, I haven't delved into the code to work out if this is all right.

Could someone give me their thoughts on whether they agree this is the problem, and whether a code change would be beneficial?

On a completely separate note - given that dashlets seem to be a persistent issue that can conflict with server configuration or minor user config file errors - wouldn't it be better to just rewrite them to use AJAX?

This problem has been assigned to a CiviCRM bug which requires funding to resolve. The suggested fix is an AJAx solution.

See:
https://issues.civicrm.org/jira/browse/CRM-17663


My custom fields are not visible on Contact's Activity Log I try to show (first for the admin user) all changes for a contact. That works on Contact's Activity Log page. I can see the date and time of modifying my custom fields, but the old and the new values are not shown. In the databases log table for the custom field are the changes logged.

How can I fix this?

Thank you.

Have you enabled detailed logging (this is disabled by default)?

If no, you can enable this from the Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.) menu option -

/civicrm/admin/setting/misc?reset=1

This feature records a full history of all changes made.

Please note the below before this feature is enabled -

Detailed logging (aka "logging") allows you to maintain a full history of all changes made to everything in CiviCRM. It's a powerful feature which is turned off be default — because it's a bit overkill for most organizations, and it comes with some downsides too.

Full details can be found HERE


Print PDF Envelope for single contact I am looking for a way to add an action or link that will automatically print(generate pdf) an envelope for a contact from the summary tab in civicrm. This would bypass the selection of a template. Any thoughts on a module or link i can use?

The only thing that comes to mind is to write an extension to do this. The only way to do it "out of the box" would be to utilize the Print PDF Letter option and utilize a template that would size to an envelope.


Can't create new events from template after upgrade to 5.9 I recently upgraded to CiviCRM 5.9, WordPress 5.0.3 and PHP 7.2. Now when I try to create a new event from a template, after clicking 'continue' the template is cloned and I'm thrown into a template editing page. The new event is never created.

This happens both with pre-existing templates and with a completely new template. It does not happen with new events created without a template.

It is essentially the inverse of this bug that was patched last February - not sure if this is an unintended side-effect, or if I've set something up weird.

Looks like this is indeed a bug: https://lab.civicrm.org/dev/core/issues/653


CiviEvent 4.7.7 Issue with Repeating Event I cannot find any reference to this issue in 4.7.7 mentioned here. My "Repeat Event" tab appears different than in test - with additional options.

Situation: As expected, there should be an enforced error check between radio buttons "Repeat On" and "Repeat By". Repeat On is once a week or once a month or year, or whatever day you select. Repeat By could be the 1st of each month, the First Sunday of every month, etc. The two options (Repeat On and Repeat By) are mutually exclusive.

HOWEVER - the error check is looking at the two options within "Repeat By" and ignoring the fact that Repeat On is selected. It throws the error that I must select one option (see attached pic) in what appears to be the Repeat By section.

There is not an option in Repeats By for "Every" - only specified regular intervals excluding weekly. Options are First, Second, Third, Fourth, Last. No option for EVERY.

FURTHER - when I select "Repeat By" and hit Save, despite what appears to be a successful save, IT IS NOT SAVED. No errors. No repeating event confirmation. And the tab is cleared

The behavior I expect is that I can select Repeat Every 1 Week Repeats On Sunday Ends On or After.

Or am I missing something?

Thanks

Unfortunately I wasn't able to recreate this error on the demo site (4.7.8), or on our installation. I also couldn't see an issue related to this in JIRA.

It looks like the JavaScript that conditionally displays those settings fields isn't working correctly on your site. You could check your JavaScript errors console to see if any problems are coming up.

Eg: in Chrome, press F12, go to the 'console' and then reload the settings page and try to make your changes.


Fatal error: Class 'CRM_Core_Resources' not found in if ($formName == 'CRM_Contribute_Form_Contribution_Confirm' && $form->_id == 1) {

   CRM_Core_Resources::singleton()->addScriptFile(drupal_get_path('module','custom_water') .'/',
     'custom_water.js');

}

When I use the above code as mentioned in the link
https://wiki.civicrm.org/confluence/display/CRMDOC43/Resource+Reference#ResourceReference-Introduction

Add a Javascript file
PHP
CRM_Core_Resources::singleton()->addScriptFile('com.example.foo', 'bar.js');

I get an error : Fatal error: Class 'CRM_Core_Resources' not found in

I am using drupal 7 with CiviCRM

if it is on drupal module add civicrm_initialize(); method above that line


What are the pros and cons of using external xml files for CiviCase configuration? In CiviCase since 4.5-ish there's been an admin screen for configuring case types. Before that it was done using external xml files, and they will still work. What are the pros and cons of each method?

I decided not to submit this as an official documentation update because here it can be a bit looser with the language and this also allows tweaking it a bit first.

CONS:

If you hate xml you might not want to use xml files.

  ASIDE: If you're wondering why it wasn't done in some other format, note that at the time xml was widely used and json had only been proposed as an RFC spec and support for json wasn't included in stock php. XML was already used in Civi for the schema templates. Using .ini files is awkward with nested/multivalued settings. Using .php files wouldn't have been portable to non-civi systems which was a grander vision at the time (yes, really).

Upgrades that require changes to the definition can't be done by the standard civi upgrade if the webserver doesn't have write access to the files.
None of the "pro" reasons below matter to you and you prefer a GUI.
If you really like making typos and/or not testing changes before putting on a live site you can bork your site more easily.
Forgetting to transfer them when you move or duplicate a site. Although if you store them in the custom templates folder which you manage with git/svn then unless those are the only customizations in there you'd be less likely to forget.

On the PRO side:

There's all the reasons people use external config files for other software, including:

Versioning via git or otherwise, and regular diff'ing tools work.
Mass updates easily done with command line tools, e.g. if you want to add a new activity type to all your case types and you have 10 case types it's 50 clicks plus some scrolling in the UI. That's not terrible, and you don't usually do it that often, but it's easier to do with text files. Or for example if you want to add a case type that's similar to an existing one, then copying the file and making a few changes is easier.
(Partial) Portability between installs. Not just copying a site, but between two otherwise different sites that might want to share some of the same configuration. The original plan was to be able to take your file, plop it into another civi site, and have it automatically work. That was never fully implemented, but it does work with some extra steps. (See a separate discussion about being able to export/import all CiviCRM configuration settings, which would be a more general solution.)
More granular permissions on configuration, e.g. prevent junior admin users from making accidentally bad configuration changes.

Custom settings are (relatively) easy to add and use. For example, in the CaseRoles section you could do like this:

<CaseRoles>
  <RelationshipType>
    <name>something</name>
    <mythings>
      <mything>thing1</mything>
      <mything>thing2</mything>
    </mythings>
    ... etc ...

In some sections it's even automatically picked up by the api, e.g. when you do an api call to CaseType get, the above comes through as:

[caseRoles] => Array
  (
    [0] => Array
      (
        [name] => something
        [mythings] => Array
          (
            [mything] => Array
              (
                [0] => thing1
                [1] => thing2
              )
          )
     )

Even if it's in a section where the api doesn't pick it up, since you're doing custom stuff anyway you can load and parse the xml file. (You can still do custom data using database storage, you just need to store the custom data in a different table and reference it separately.)

Why is there no documentation?

I don't know why the old wiki docs weren't transferred over, but it is still available and mostly still true on the old wiki at e.g. https://wiki.civicrm.org/confluence/display/CRMDOC43/CiviCase+Configuration#CiviCaseConfiguration-Step-by-step.

  The part that is no longer correct is at https://wiki.civicrm.org/confluence/display/CRMDOC43/CiviCase+Configuration#CiviCaseConfiguration-CaseTypes, since case type identifiers are no longer option values and are now in the civicrm_case_type table, and unfortunately that link also demonstrates some of the confusion regarding name vs label in the past. Ignore that part. Pleeeeeeeese ignore that part.

Converting xml files to database storage

If you have an existing site already using xml files, this is as simple as visiting administer - civicase - case types and clicking edit on your case type and then clicking save. The files will get converted and will now be ignored.

You should probably then move the file out of the way to avoid confusion over which definition is in effect.

Preventing converting xml files to database storage

If somebody does the above and didn't mean to, this could be confusing if somebody else later edits the file thinking it still controls the definition. If you want to prevent converting, then in the xml file add <forkable>0</forkable> near the top of the file, e.g.

<CaseType>
  <name>housing_support</name>`
  <forkable>0</forkable>
  ...

Converting database storage to xml files

In your database in the civicrm_case_type table in the definition field there will be some xml.
Copy and paste or otherwise put that data into a file with the same name as the name field in that row, e.g. housing_support.xml. The file should be in your custom templates directory as described at the above wiki documentation link.
Then put NULL into the definition field in the database.
From then on it will use the configuration in the file.
Also see the section above about preventing someone accidentally converting it back to database if you want to prevent that.

Using xml files from scratch

Ironically, the way history has unfolded probably the easiest way to do this now is to use the UI to create the type and then do the same as converting database to files above.


Deleted contacts considered duplicate in mailing Some weeks ago clients reported problems of mass mailings not being delivered to a part of the destinees. After doing some research it occurred that the problem lied in contacts that had been merged.
When contact A is merged in contact B, contact A gets deleted (still in the database but status 'is_deleted'). When creating a mailing both A and B seem to be added to the destinees.
When sending the mailing contact A obviously doesn't receive the mailing because 'is_deleted' but contact B also doesn't get the mailing because the mail is regarded as a duplicate mail.
After some looking around I found https://github.com/civicrm/civicrm-core/commit/48b1ff58 which solved the issue for us on multiple installs.
Now I hoped this would quickly find its way into the releases, but when I just took a look at the freshly released 5.34.0 it clearly hasn't.
The error is so obious though that I feel I must be missing something myself, so I hesitate to file a bug report...

The release process means it takes a while from a PR being merged until it appears in a release.  You can find details of the process here.  The commit you mentioned will be in 5.35


Can't get through initial install - dashboard error page Well, I thought this would be a fairly simple, two-beer process: set up wordpress, install civicrm, and call it a day. Now I'm stuck and out of beer. I got wordpress installed fine (via the web host's one-click install process), but after activating civicrm and doing the "check requirements and install," when I am taken to the dashboard for the first time, I am met with these errors:

System Status: Error
Cron Not Running
Timestamp Mismatch
Configure Default Mailbox
Complete Setup
View details and manage alerts

[

I'm on the following:

civicrm verson 4.7.2
php 5.6
MariaDB Server 5.5.44-MariaDB-cll-lve
wordpress 4.4.2

This should be a pretty standard install - I quite literally installed wordpress and then civicrm. I've seen the cron and mailbox errors before, but the timestamp and "complete setup" are new to me. I figure if I can push through those somehow, I'll be in business.

This is a fresh install of both the domain and hosting, so civicrm has not worked previously here. I've gotten civicrm running on a personal vm to learn the install process, but this one's throwing me for a loop. If I click on "View details and manage alerts," I am simply taken back to this same screen. No top civicrm menu appears, either, so I can't click around to various parts/modules within civicrm. Clicking on configure or refresh dashboard does takes me back to this screen, as well. I cannot for the life of me get past this screen. The server is hosted in Amsterdam. I have updated the PHP timezone settings to Europe/Amsterdam and Wordpress to +1:00.

I'm not sure where to start with this one - what log files to dig into, etc. I can successfully access other pages I know exist, such as www..com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact, where I can search for contacts (though my db doesn't contain any user content yet). I have the same db user configured for the wordpress db and the separate civicrm db (not sure if this follows best practices, but I'm just trying to get past this install screen first). I've given the db user all the necessary permissions and am not receiving any errors indicating db connection issues. I originally had a separate db user for civicrm and wordpress, but in troubleshooting have since blown everything away and started fresh (removed the databases, db users, wordpress install - everything).

Apologies if this is a dumb issue, but I've searched for answers and have so far been unsuccessful. Where do I start with this one? Thank you for any help.

I followed the instructions on Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus and was able to add the following immediately after the initial <?php line of my wp-content/uploads/civicrm/civicrm.settings.php file:

global $civicrm_setting;
$civicrm_setting['Directory Preferences']['customTemplateDir'] = 'public_html/wp-content/plugins/civicrm/civicrm/templates/';
$civicrm_setting['Directory Preferences']['customPHPPathDir'] = 'public_html/wp-content/plugins/civicrm/civicrm/php/';
$civicrm_setting['Directory Preferences']['extensionsDir'] = 'public_html/wp-content/plugins/civicrm/civicrm/extensions/';
$civicrm_setting['URL Preferences']['extensionsURL'] = 'https://www.<website>.com/wp-content/plugins/civicrm/civicrm/extensions/';
$civicrm_setting['URL Preferences']['imageUploadURL'] = 'https://www.<website>.com/wp-content/uploads/civicrm/persist/contribute/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://www.<website>.com/wp-content/plugins/civicrm/civicrm/';


CKEDITOR is undefined when form is being loaded in model frame outside of /civicrm/ path Yet another question regarding JS resources load outside of civicrm. We load contact edit form via CRM.popup from a page outside of /civicrm/ path (from custom  dashboard page created in drupal). So far [it was] so good; recently we've mentioned that javascript goodies have stopped working on the form; only related message in a browser console is CKEDITOR is undefined. It all goes back to normal after disabling WYSIWYG at "Display Preferences" (we've got same error with TinyMCE enabled).
Is it something we could "cure" via configuration tinkering or it is something to report as an error?

Since you are using 4.6, the answer is that you need to ensure templates/CRM/common/wysiwyg.tpl is being loaded and that the smarty variable $includeWysiwygEditor is set to true.

Or since you are hacking around CiviCRM anyway, just keep it simple and stick something like this in your page source:

<script type="text/javascript" src="/path/to/civicrm/packages/ckeditor/ckeditor.js"></script>


How to show time zone in event details page and registration confirmation page I would like to show the event timezone on the page that lists event details and the page that a registrant gets as confirmation after they register.  Today my events are all in the same time zone but that will change in the future.

I can capture the time zone in a custom field but how do I get that custom field to show up

a) on event details pages

b) on registration confirmation pages

c) on event confirmation e-mails  (I have read this page re confirmation e-mails which was very helpful, but I do not know how to access a custom field from within a smarty template)

Preferably the solution would not require changes that break upgrades.

Any ideas?

Thank you

a) This will happen automatically, assuming you want the "Event Info" page.  In fact, it's far more common for folks to ask how to disable or style this.  See my next answer for info on that.

b) will require programming knowledge.  You can write a CiviCRM extension, or hire someone to do it.  Use hook_civicrm_buildForm to look up the custom field, inject it into a PHP variable, and to load a template snippet to display it.  Maybe also a little bit of jQuery or CSS to alter its appearance/location on the page.

c) depends on whether the custom field is already loaded into the template (I'm not sure).  To check, insert {debug} into the template and send yourself a test message.  If it IS there, great!  Just copy/paste the token.

If it's not there, see this answer: How do I pass a variable to a smarty template?


Does civicrm support mysql sockets? My wordpress is installed and uses localhost:/run/mysqld/mysqld/socket
but civicrm only works if I point to localhost

Is there a way to install civicrm through file socket ?

You can set the DSN in the civicrm.settings.php file using this format:

mysqli://user:password@unix(/path/to/socket)/databasename

Use the actual word "unix" in the string to indicate sockets.


Re-ordering search results changes results Has anyone else seen this bug or reported it?

I ran a Participant Search with the search criteria set to the event name and event type (exhibition). The search returned 22 bookings.
But if I reorder the list by clicking on any of the column headers the results change to include bookings from our differently named conference (different event name and type).

I'm using Drupal 7 and Civi 5.13.4.
I have replicated the bug on https://dmaster.demo.civicrm.org

This is https://lab.civicrm.org/dev/core/issues/981 with a fix included in 5.14.0


Message: "CiviCRM does not have permission to write temp files" after login into back-end Joomla My host updated PHP to 5.5. last night. Now, I can't login to my Joomla back-end because of an error. It says that CiviCRM does not have permission to write temp files.

What can I do to make sure that I can login to Joomla again? I was thinking about:

a) Deleting all files in media/civicrm/templates_c  or

b) Disabling all CiviCRM folders

Any help or tips would be great.

They may have changed how they're running PHP for your hosting, which could lead to your old templates_c files being unwritable to the new PHP process.

As Lobo's comment advises, removing the files and ensuring that the templates_c is world-writable should resolve the permission issue.

It'd be ideal if templates_c belongs and is writable only to the new PHP process.


Detailed Contribution Info Not Displayed CiviCRM Version: 4.6.15
CMS: Drupal 7.43

I'm running into a weird bug and I'm not sure how to track it down. All of our old contributions (Pre 2014) don't show when you click on the the [contact] > [contributions] tab. It shows that they have made a contribution but doesn't list the detailed information.

I can confirm the data is in the civicrm_contribution table in our database. Is there anywhere else I can check?

Thanks

Check that your older financial types have the financial accounts that the system automatically associates when creating new financial types (e.g. income account, A/R account, etc.) - I have see this type of wacky sort of there but sort of not appearance occur when account relationships are not in place. After you add the required accounts, check to see if you see the older contributions on the contributions tab - if not, then it might be a different issue altogether.

Hope this helps!


How do I set default for phone type? I want to auto default phone type as home - can't locate where/how to manage that. Any help appreciated. Thank you.

One sets the default location type for all contact info (phone/address/email).  They can't be set separately unless you write an extension.  You can change it at Administer menu » Customize Data and Screens » Dropdown Options » Location Types.  Click "Edit" next to "Home" and check the "Default?" box.


Need help setting up Scheduled Reminders I want to use the Scheduled reminders to send emails to all members who are not already members for the upcoming membership cycle. We have a fixed membership cycle that begins on September 1 each year. But we accept memberships starting on June 1 for the new cycle since we don't want people paying for only 1/4 year worth of membership. Anyone joining on June 1 or after will be listed as a member for September 1, 2016 - August 31, 2017.

On August 1 I want a scheduled reminder to go out to members who are not yet paid for 2016/17. Not sure what settings to use. I also want to send another message on September 1, October 1 and December 1 throughout the membership enroll season.

Anyone willing to help me with this? I'm not a programmer. I am just a board member who unfortunately agreed to be Treasurer and in charge of memberships. Ugh!  I have one Scheduled reminder set up but not sure at all that the settings are correct.

Thanks if you can help me with this.

That depends on how you record your renewals.  The "correct" way to renew a membership doesn't create a second membership, but changes the end date on your original membership.  However, that's not workable for many organizations for a variety of reasons.

However, if you do renewals the "correct" way, then you could set your August 1st scheduled reminder to go out 1 month before the membership end date.  See screenshot.  October 1st can be one month after membership end date, and so on.


AJAX problem in CiviCase - Administer Case Types I'm getting the same effect as reported here. I'm trying to set up CiviCase, and all seems fine except when I try to Administer->CiviCase->Case Types I just get blank screen.
The JavaScript console shows a series of errors as shown below. I've been through all the standard trouble-shooting things, and am stumped now.

Joomla 3.3.6, CiviCrm 4.6.5

Any ideas much appreciated. Thanks.

Javascript console output:

option=com_civicrm&task=civicrm/a/:109 Uncaught SyntaxError: Unexpected

?option=com_civicrm&task=civicrm/ajax/l10n-js/en_US&r=0KJad:5
Uncaught TypeError: Cannot set property 'userFramework' of undefined
(anonymous function)    @   ?option=com_civicrm&task=civicrm/ajax/l10n-js/en_US&r=0KJad:5
(anonymous function)    @   ?option=com_civicrm&task=civicrm/ajax/l10n-js/en_US&r=0KJad:5

?option=com_civicrm&task=civicrm/ajax/angular-modules&format=js&r=0KJad:11
Uncaught TypeError: Cannot read property 'modules' of undefined(anonymous function) @ ?option=com_civicrm&task=civicrm/ajax/angular-modules&format=js&r=0KJad:11(anonymous function) @ ?option=com_civicrm&task=civicrm/ajax/angular-modules&format=js&r=0KJad:19

?option=com_civicrm&task=civicrm/ajax/menujs/2/en_US/1/oQmyf7Hm:110
Uncaught TypeError: Cannot read property 'resourceBase' of undefined(anonymous function) @ ?option=com_civicrm&task=civicrm/ajax/menujs/2/en_US/1/oQmyf7Hm:110(anonymous function) @ ?option=com_civicrm&task=civicrm/ajax/menujs/2/en_US/1/oQmyf7Hm:111

angular.js:38
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.17/$injector/modulerr?p0=crmApp&p1=Error%3A…vicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3D0KJad%3A17%3A381)(anonymous function) @ angular.js:38(anonymous function) @ angular.js:4154q @ angular.js:326g @ angular.js:4115bb @ angular.js:4041d @ angular.js:1455xc @ angular.js:1476Od @ angular.js:1370(anonymous function) @ angular.js:26438m.Callbacks.j @ jquery.js:3148m.Callbacks.k.fireWith @ jquery.js:3260m.extend.ready @ jquery.js:3472J @ jquery.js:3503

OK, I found the problem. It was the same issue as reported here. It wasn't a CiviCRM problem at all. The JavaScript errors were caused by the K2 component, which alters the HTML output after CiviCRM does. K2 was passing text containing quotes (specifically 'prefix="og: http://ogp.me/ns#"') to JavaScript, so these quotes ended up unescaped. More info here. The solution was to apply this patch to K2 (or, in my case, to remove K2 altogether, since we decided not to use it).


Importing data with households I've been attempting a data import for households and contacts on a new civi install, and cannot for the life of me figure out how to import the data and keep civi from creating duplicate records of contacts and/or households along the way.

I've followed the instructions provided here: http://wiki.civicrm.org/confluence/display/CRMDOC/Importing+Households+and+Household+Members

And about any number of combinations of data uploads, but am having no luck.

Does anyone have tips or instructions they like to follow for importing of contacts initially, when contacts need to be associated with households?

Thank you!

Your dedupe rules aren't probably tight enough so instead of seeing that the contact exists already, it creates a new one.

The fact that your getting dups also probably says you are doing multiple imports with the same CVS.  When I do imports I often do run the same file more than once, but the key difference is if the contact already exists and you are say adding them to a household, you should check the update box on the import instead of the default.

So having said all that, if I'm importing new hh and individuals and trying to create the relationships, I will import the hh and ind and give them an external id.  The external id can be anything, number, letters, a combination.  Then I use that external id as the link for creating the relationships, importing contributions, etc.  The external id has to be unique unlike names and email so it won't create new contacts when it doesn't match like it does with just names.


How to debug variables inside function invoked via ajax call? I want to debug a function on this file
https://github.com/Project60/org.project60.banking/blob/9dc6bdcc486753f70948edfd4ea36df0eb9d2f86/extension/api/v3/BankingTransaction.php

/**
 * Analyses the given bank transactions
 *  used as AJAX call
 *
 * @param  list    list of bank_tx ids to process
 * @param  s_list  list of bank_tx_batch ids to process
 *
 * @return  array api result array
 * @access public
 */
function civicrm_api3_banking_transaction_analyselist($params) {
CRM_Core_Error::debug_var ('params', $params);

}

The above function is invoked by button which has onclick event
https://github.com/Project60/org.project60.banking/blob/9dc6bdcc486753f70948edfd4ea36df0eb9d2f86/extension/templates/CRM/Banking/Page/Review.tpl

The code is as follows

{ts}Analyse (again){/ts}

But  I dont see anything on the log files, how can I get the variables
I have checked it under sites/defaut/files/civicrm/ConfigandLog/
I dont see any civicrm.log files or any other files ending with .log dont have value of debug which I have entered
Also debug settings has been set to Yes

The sites/default/files/civicrm/ConfigAndLog/ directory should contain your CiviCRM debug log (and some other files), provided that you're using Drupal, that your Drupal multisite directory is "default", and that the webserver is able to write to that directory. If you're not seeing that, you could:

Check assumptions of what CRM_Core_Error::debug_var() will do with the input you're handing it (eg, check that if you pass in a string like SNORK instead of an array, you see that same word appear in a logfile). ::debug_var() looks like it does print_r
tail -f /path/to/*.log might reveal which logfiles are being printed to when you hit that endpoint.
Check the multisite directory is what you think (should be the same as your settings.php and civicrm.settings.php)
Check again for typos (I see defaut in your question, but that's probably not it!)
Check that the sites/default/files/ directory and its descendant directories are writable to the webserver (typically user www-data, httpd, _www etc)
Double check usage of the debug functions - there have been docs inconsistencies which might lead you astray.
Check out CiviCRM docs on debugging
There are other SE questions on debugging, eg tips on debugging when you can't view page output also applies well to AJAX callbacks etc where you can't/shouldn't modify page output.

CiviCRM has a more modern log interface available in Civi::log()->debug('debug info'); (see How to print variable/debug data from your extension.php? for an answer on that).

If even that doesn't work, you could fall back to "stock" PHP debugging methods like error_log() and file_put_contents() if CiviCRM debugging isn't working.


Report: Records that have been updated by owner Is there a way to go through and create a report (either in Civi or using Drupal Views) that shows what records have been updated by the owner themselves? Such as them going in and updating an employer or address?

There is no such report that filters by logged in user and no integration with views as well AFAIK.

If you want detailed change log than you (system has logging enabled) then you can use Extended logging report. And manipulate report parameter like

/civicrm/report/contact/extendedloggingsummary?reset=1&force=1&display_name_value=abc&display_name_op=has

Inbuild report

/civicrm/report/logging/contact/summary?force=1&reset=1&display_name_value=abc&display_name_id_op=has

If you don't have logging enabled than you can use Database log report and build report parameter

/civicrm/report/contact/log?reset=1&force=1&sort_name_value=abc&sort_name_op=has

If you want to support filtering by logged in user in one of the two above report than you add filter using selectWhereClause or alterReportVar hook.

Support to views won't be difficult by writing an module extending to civicrm entity module. If you can extend views module to support change log than you can filter or retrieve various data of the contact.

Thanks

Pradeep


Why Are My Event Reminders Not Being Sent? I should have received an event reminder I had scheduled to go out today, but didn't.

I have confirmed that the email was saved under the "schedule reminders" tab of the event.

I did notice that it didn't appear on the scheduled mailings here - /civicrm/mailing/browse/scheduled (but I'm still new to civi so not sure if they're supposed to show there or not).

I don't think I have configured everything for bulk mailing properly yet, but some emails do go out (like registration or membership confirmations).

Drupal 7.38
civiCRM 4.4.15

Is your Scheduled Jobs for Send Scheduled Reminders enabled at civicrm/admin/job?reset=1 ? If so, does the View Log Job have any info? /civicrm/admin/joblog?jid=8&reset=1.

If not, and if you want to confirm if your cron is running, then enable a Scheduled Job and then check back later, when it should have run, and see what the Scheduled Job shows as the last time it ran. If it hasn't run then you probably need to check your cron set up http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs


How do I redirect back to the same tab after submitting a form? I'm creating a custom tab for events. I've used hook_civicrm_tabset to add a tab to the event management pages. In that tab, I have a form generated using civix. Upon saving the form, my operations are successfully completed and I'm redirected back to the event management "Info and Settings" tab. I would like to end up back on the same tab instead.

How do I end up back in my custom tab after submitting my form?

I figured it out.

When creating the array for the tab, add "ajaxForm" to the "class" index.

$newTab = array(
  'title' => 'New Tab',
  'link' => 'url',
  'class' => 'ajaxForm', //<---- The important part
  //etc
);


CiviMail - when Track Click Throughs is enabled, links result in a white screen with warnings We are creating a mailing and trying to track click-throughs. When 'Track Click-Throughs' is enabled, clicking on any of the links results in a URL like this: https://mysite.org/sites/all/modules/contrib/civicrm/extern/url.php?u=55&qid=2261 and does not go to the link itself.  This is what shows on screen:

  Warning: date(): It is not safe to rely on the system's timezone
  settings. You are required to use the date.timezone setting or the
  date_default_timezone_set() function. In case you used any of those
  methods and you are still getting this warning, you most likely
  misspelled the timezone identifier. We selected the timezone 'UTC' for
  now, but please set date.timezone to select your timezone. in
  /mysite.org/sites/all/modules/contrib/civicrm/CRM/Mailing/Event/BAO/TrackableURLOpen.php
  on line 92

  Warning: Cannot modify header information - headers already sent by
  (output started at
  /mysite.org/sites/all/modules/contrib/civicrm/CRM/Mailing/Event/BAO/TrackableURLOpen.php:92)
  in /mysite.org/sites/all/modules/contrib/civicrm/CRM/Utils/System.php on
  line 423

If I do not enable Trackable Click Throughs, then the links work.  It appears to be two different issues, but I'm not sure how to resolve either, and if fixing one will take care of the other.

I'm on Drupal 7.38 and Civi 4.5.8.

I've doubled checked civicrm.settings.php (per CiviMail Tracked URLs) and my BaseURL is

  define( 'CIVICRM_UF_BASEURL'      , 'https://mysite.org/' );

I've looked at the links in civicrm_mailing_trackable_url in my database and at the permissions of civicrm/extern/url.php (per Why do track click through).  The links look correct and the permissions of url.php are 644.

Any help or direction on either of the warnings is greatly appreciated!

Richard's answer is correct.  While this seems unrelated, look at this answer for an explanation of what's happening here, except instead of a PDF header, it's redirect code.  You're getting an unrelated warning, and you can't send a warning and then send a redirect header.  In fact, I'm guessing that you can't currently generate PDFs right now either.  Fixing the "unrelated" warning will fix this problem, and the problem is that your webhost hasn't defined a timezone for PHP.

Note that Richard's answer is only one way to set a PHP setting, and doesn't work if your webhost disallows it.  I would take up with your webhost the best way to resolve this.  Another way that works in almost any environment is to use an ini_set command anywhere in your civicrm.settings.php file.


Alerting Users of CiviCRM Maintenance I thought I had seen, and used, this feature in the past, but perhaps it was a different CRM product I was testing.  How do I put a scrolling alert up to inform users of system maintenance, or new feature improvements, or a friendly "replace the used toilet paper rolls" message?  (Ok, if you do the last one, you may need to seek help, but you get the idea.) I can't seem to find it via menu diving or Google-Fu.

(I'm using Wordpress, but I would think it would be a core feature.)

I'm not aware of such a feature.

A (somewhat drastic) workaround would be to remove "access CiviCRM" permission from your users during maintenance.

You could probably customize the "access denied" message that WP gives, to be a bit more friendly.


Uploading files through the API I see an older thread on the forum about potential improvements to the API to allow file uploads, but I'm not sure that ever happened. Has anyone ever uploaded files in CiviCRM using the API?

I see in the API Explorer that there is a File > Create with a parameter for File Contents but I'm not sure if you feed in the MIME contents, a URL, or...?

Yes, it did happen and it's called the "attachment" api. You can look up the docs for it in the api explorer:


information on how to translate the component for joomla where can I find the italian translations of the civicrm component for joomla?
or how can I do the translation in Italian?

List item

CiviCRM has its own setting to set default language. To configure CiviCRM to use an translation:

Download the translations distribution -
civicrm--l10n.tar.gz - from the CiviCRM downloads page. This
tarball contains all files for the latest available translations.
Uncompress the tarball and you will see a directory called civicrm,
containing two subdirectories called l10n and sql. The l10n directory
contains a set of sub-directories named using their local codes.
(Example: the Italian translation files will located in
/civicrm/l10n/it_IT).
Copy this l10n directory, together with all its subdirectories into
your CiviCRM codebase root directory.(note if creating the l10n
folder manually it should be ell-ten-n, not capital-I-ten-n)

For Joomla this would be site_root/administrator/components/com_civicrm/civicrm. So if you wanted the it_IT language it would look like this site_root/administrator/components/com_civicrm/civicrm/l10n/it_IT/

To enable the default language

Login to CiviCRM (as a user with "administer CiviCRM permissions").
Go to Administer » Localization » Languages, Currency, Locations.
You should now be able to see and select all the localization options
in the Default Language and drop-down menu. If you don't, and instead
can just see the default 'English (United States)' option, check the
preceding steps as the drop-down options are set by the directories
under your l10n directory. Also be sure to confirm that the l10n
directory is correctly named as l10n (that is: el-ten-en and not
eye-ten-en).

HTH

Pradeep


Mange Event > Configure > Dithered Options I am attempting to send emails to participants that are registered for events.  When I access Manage Events and select Configure - the option for Schedule Reminders is dithered out and not sure why.  Any advice would be greatly appreciated.

This is a known issue that happens with the Shoreditch theme. It is due to a problem between Core and Shoreditch/Bootstrap, that I've written about here.
You can still click the top option and then use the top tabs to navigate to the page you need.


How hard is it to obtain PCI compliance? I want to preface this by saying that I am aware that no one here can tell me authoritatively whether I am PCI compliant, since only licensed people can do that.

Instead, I'm asking what your experience was in seeking out compliance. My site is run on Drupal 7, CiviCRM 4.6, and we use Authorize.net for our payment processor. We have SSL. Do you have any helpful intel on how hard or easy this will be for us?

edited to add: We are hosted by CiviHosting

A great explanation of PCI compliance and things an organization should consider relating to PCI compliance is available from this CiviCon Denver 2015 talk: CiviCon Denver Data Security and Payment.  See my answer here for other relevant info: https://civicrm.stackexchange.com/a/10453/105

We also use Drupal 7 and Civi 4.6, but are hosted on MediaTemple and use iATS for our payment processor.  The biggest issue will be whether you take payment directly onsite or offsite (I'm not familiar with Authorize.net).  In and of itself, a MediaTemple VPS is not PCI compliant.  We had to take steps ourselves to make sure our server met the PCI criteria.  iATS has their clients enroll in PCI Smart which is a PCI compliance testing and reporting program through TrustWave. We used those scans as guidance for what we needed to adjust technically on the server to meet PCI guidelines and the self-report to determine in-house processes to meet the PCI criteria.