Backbone javascript conflict causing Configure Event / Repeat to fail Problem with a Civi 4.7 installation on WordPress 4.7.2 -- due to other complications involving Backbone, we are NOT running JetPack.

I found a related question in CiviEvent 4.7.7 Issue with Repeating Event while trying to discern why the Repeat tab in Event Configuration fails to behave as it should. Specifically, I'm unable to make an event repeat weekly. User has selected a Repeat-every value (e.g. Tuesday). Instead of verifying that either a Repeat-every value or a Repeat-by value was selected, the javascript requires user to select one of the Repeat-by values -- which it obviously shouldn't. And even when user has done this (pretending, for the sake of argument, that user does not want a weekly repetition), the Save button simply clears the form. No error messages appear, but the Chrome javascript console shows four Uncaught Type errors on the page, of which three are in Backbone:

Uncaught TypeError: Cannot read property 'Application' of undefined
    at HTMLDocument.<anonymous> (crm.designerapp.js:11)
    at j (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at Function.ready (jquery.min.js:2)
    at HTMLDocument.J (jquery.min.js:2)
backbone.collectionsubset.js:225 Uncaught TypeError: Backbone.CollectionSubset is not a constructor
    at child.Backbone.Collection.subcollection (backbone.collectionsubset.js:225)
    at HTMLInputElement.<anonymous> (jquery.crmProfileSelector.js:34)
    at Function.each (jquery.min.js:2)
    at m.fn.init.each (jquery.min.js:2)
    at m.fn.init.$.fn.crmProfileSelector (jquery.crmProfileSelector.js:25)
    at HTMLInputElement.<anonymous> (jquery.crmProfileSelector.js:89)
    at Function.each (jquery.min.js:2)
    at m.fn.init.each (jquery.min.js:2)
    at HTMLDivElement.<anonymous> (jquery.crmProfileSelector.js:88)
    at HTMLDivElement.dispatch (jquery.min.js:4)
backbone.collectionsubset.js:225 Uncaught TypeError: Backbone.CollectionSubset is not a constructor
    at child.Backbone.Collection.subcollection (backbone.collectionsubset.js:225)
    at HTMLInputElement.<anonymous> (jquery.crmProfileSelector.js:34)
    at Function.each (jquery.min.js:2)
    at m.fn.init.each (jquery.min.js:2)
    at m.fn.init.$.fn.crmProfileSelector (jquery.crmProfileSelector.js:25)
    at HTMLInputElement.<anonymous> (jquery.crmProfileSelector.js:89)
    at Function.each (jquery.min.js:2)
    at m.fn.init.each (jquery.min.js:2)
    at HTMLDivElement.<anonymous> (jquery.crmProfileSelector.js:88)
    at HTMLDivElement.dispatch (jquery.min.js:4)
backbone.collectionsubset.js:225 Uncaught TypeError: Backbone.CollectionSubset is not a constructor
    at child.Backbone.Collection.subcollection (backbone.collectionsubset.js:225)
    at HTMLInputElement.<anonymous> (jquery.crmProfileSelector.js:34)
    at Function.each (jquery.min.js:2)
    at m.fn.init.each (jquery.min.js:2)
    at m.fn.init.$.fn.crmProfileSelector (jquery.crmProfileSelector.js:25)
    at HTMLInputElement.<anonymous> (jquery.crmProfileSelector.js:89)
    at Function.each (jquery.min.js:2)
    at m.fn.init.each (jquery.min.js:2)
    at HTMLDivElement.<anonymous> (jquery.crmProfileSelector.js:88)
    at HTMLDivElement.dispatch (jquery.min.js:4)

So my question is this. How do I get this working properly in Civi 4.7.16?

The root cause of this is that civi uses backbone.js, but not in no-conflict mode. There is an issue open at https://issues.civicrm.org  for this. Once that issue is resolved, this plugin will start to work.


How to debug Smarty mail template codes, broken after upgrade I have a few Mail Templates that have conditional smarty codes like:

{capture assign=pp_scan}{contact.custom_74}{/capture}{if $pp_scan}You have already provided{else}You have not yet provided{/if} a scan of your passport.

This code ran just fine until I upgraded to 4.7.27 (from 4.7.21). Don't know if it is related to the upgrade or just a coincidence. Now, this code resolves to

  {capture assign=pp_scan}{/capture}{if $pp_scan}You have already provided{else}You have not yet provided{/if} a scan of your passport.

in the text of the email.

How do I debug the smarty code in mail templates? I tried adding {debug} to the mail template, but that didn't help.

Any chance in your settings file the "CIVICRM_MAIL_SMARTY" just needs to be turned back 'on'?


Find Participants - pulling up too many names not related to the class Find Participants - pulling up the names but when you hit one of the buttons above name to put them in alpha order it pulls up everyone that has taken a class.

I hit FIND PARTICIPANTS

I add pull down the menu to find the specific

I think you are on very old version of CiviCRM, Similar issue was reported 10 months ago and was fixed in 5.14.1

You can either upgrade CiviCRM to latest or apply patch


Is it safe to remove INDEX keys for multi language installation? We enabled multi language support in Civi 5.21.1 then tried to create a new custom field group with Select or Radio options. The error from the DB is below (***edit: This doesn't happen when adding fields to an existing Group):-

[db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_custom_field (custom_group_id , name , label , data_type , html_type , default_value , is_required , is_searchable , is_search_range , weight , help_pre , help_post , is_active , is_view , options_per_line , text_length , start_date_years , end_date_years , date_format , time_format , note_columns , note_rows , column_name , option_group_id , filter , in_selector ) VALUES ( 77 , 'Test_2' , 'Test 2' , 'String' , 'Radio' ,  NULL ,  NULL ,  NULL ,  0 ,  2 ,  NULL ,  NULL ,  1 ,  NULL ,  NULL ,  255 ,  NULL ,  NULL ,  NULL ,  NULL ,  60 ,  4 , 'test_2' ,  204 ,  NULL ,  0 )  [nativecode=1062 ** Duplicate entry '77' for key 'UI_label_custom_group_id_en_GB']"]

After doing some digging, it seems that two tables now have additional keys:-

custom_data_group has the key 'UI_title_extends_en_GB'
custom_data_field has the key 'UI_label_custom_group_id_en_GB'

After disabling multi language support, the keys remain and we are still unable to add options.

Removing the keys from MySQL using the commands below resolves the error:-

alter table civicrm_custom_field drop index UI_label_custom_group_id_en_GB;

and for the group:-

alter table civicrm_custom_group drop index UI_title_extends_en_GB

Is it safe to enable multi language support without these keys?

CiviCRM adds indexes to custom field only if its searchable(checkbox ticked for is searchable field). Removing it might impact performance if your system has lots of records but you won't notice if its only 1k to 10k records.

But you trying to remove index which is not being used, so that should be fine.


Workflow for New Event Registration When I create a new event, I want someone to be notified via email when it is saved.  How best to do this?

I see in the admin console that there is System Workflow Messages under Message Templates, but how do I create a custom System Workflow?

To my Knowledge this is not a straightforward thing - but can be done -

You need to create an extension and use post or postprocess hook

whenever an Event is been saved against database you need to trigger an action to send an email

Install Civix

Extension creation:
https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension

Hook reference:
https://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference

I guess this helps!!!


How to get all the groups for a contact Starting from a contact ID, i need to find all the groups to which the contact belongs.

I know that i can use api GroupContact but it doesn't work for smart groups (in CiviCRM 4.5)

Is there any api calls that will retrieve all groups at once ?
Otherwise, what would be the best way ?

To get the Groups, you can use the GroupContact API

$result = civicrm_api3('GroupContact', 'get', array(
  'sequential' => 1,
  'contact_id' => <contact_id>,
));

To get all the smart groups to which the contact belongs, you can use this BAO function defined in GroupContactCache.php

$smartGroup = CRM_Contact_BAO_GroupContactCache::contactGroup($contactId);

returned $smartGroup will be the list of smart_groups for the contactId passed


Contact Summary Hook Implementation I am trying to add contact created date in contact summary. I am sure that https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_summary/ helps the requirement. But I'm not getting how to implement this hook.Any help please?

As already pointed out, the created date is shown on the summary anyway - but since your question is more about using hook_civicrm_summary(), here's an simple example to add the date above the existing summary content:

function demo_civicrm_summary($contactID, &$content, &$contentPlacement) {
  // Lookup 'created_date' for the specified contact
  $dateCreated = civicrm_api3('Contact', 'getValue', array(
    'id' => $contactID,
    'return' => 'created_date',
  ));

  // Set $content to what we want to display
  // Can add html with classes for formatting ...
  $content = 'Date created: ' . $dateCreated;

  // Set $contentPlacement to specify where our content is displayed.
  // The default if we don't set this is to display below the existing summary
  $contentPlacement = CRM_Utils_Hook::SUMMARY_ABOVE;
}


After creating/saving an activity, re-opening it to edit won't allow links and drop-downs to be changed We're using 5.4.1 on Wordpress 4.9.8 with php 5.6.34.

The following issue seems to have started with 5.3.x and we still cannot solve it.

When we create an activity, we include:

a hyperlink in the details
a status using the dropdown box

All works as it should when we create an activity. However, when we choose to edit it (wrong hyperlink, change the status, etc.), we are unable to do so.

The hyperlink properties box does not come up when clicked
The dropdown box will not come up when status is clicked

In both cases the anticipated pop-up windows show up behind the active window, but -- in addition to being the wrong behavior -- they still don't work.

My work-around is to edit in HTML (vs WYSIWYG) and changing statuses via searches and applying changes by profile. But this is time-consuming and not all of our team can easily do it. And it's not how Civi is supposed to work.

We're using Chrome/Windows. I thought we solved it by clearing Chrome's cache (but the result is sporadic at best). We've also tried Firefox with same issue.

Does anyone know what's going on here?

Thanks!

P.S. The correct functionality does appear to be present in 5.6.alpha1 in the demo sandbox. Can anyone verify if this is a known bug? If not, I'm concerned the issue may be our database rather than Civi.

Here are screen shots showing correct behavior with creating activities. Note that the dropdown box for assigning status and hyperlink box for providing link details pop up in foreground and can be completed and saved:

Here are screenshots of the incorrect behavior after saving this activity and attempting to edit it. Note the dropdown and hyperlink dialog occur behind the activity screen (I've move the Activity screen to reveal them). Even after revealing them, they do not function.

[

I'm happy to report that the original issue was resolved with an update to 5.5.1. With this update made, the errors illustrated in my original post are no longer occurring.

Because we've long used CiviCRM without this error and first noticed it with 4.7.31 (and consistently with subsequent upgrades), we believe that this new upgrade has returned the functionality enabling us to again edit activities from a popup window opened from search results.

@RayWright, thank you for suggesting the java review and screenshots which helped us see that the issue was limited to "pop up" edit windows (i.e., activities opened from searches) rather than full-screen edits (i.e.,activities opened from reports). The latter may especially be helpful as a workaround if future users see this issue.


Payment Processor Error 9003, and logging I have the same issue that this person did, though I'm updated to 4.6.10 The issue is that when submitting payments, I get the 9003 error code, which says "MD5 Verification failed."  I've reset the MD5 code from both sides, and am confident that they match. It's possible that my issue could be solved with the answer that I linked, but I don't know enough to apply it. It's also possible that Authorize.net tech support could help me, but they won't do anything without the log and I'm unsure where it lives. So...

1) Do you know how to fix this error?

Or failing that,

2) Where are CiviCRM's payment processor logs?

Answering (2) only here.

CiviCRM's payment processor logs vary in their location based on the CMS in use. These logfiles include a unique string per site, as the logfiles are  located within the webroot and a hard to guess filename offers some defense against attackers viewing debug output.

This is documented @ -

https://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers#Debuggingfordevelopers-Logfiles
https://wiki.civicrm.org/confluence/display/CRMDOC/CMS+Standard+Directories+and+File+locations

WordPress

4.6 and below: wp-content/plugins/files/civicrm/ConfigAndLog/CiviCRM.HARDTOGUESS.log
4.7 and above: wp-content/uploads/civicrm/ConfigAndLog/CiviCRM.HARDTOGUESS.log

Joomla

media/com_civicrm/ConfigAndLog/CiviCRM.HARDTOGUESS.log (1) or
media/civicrm/ConfigAndLog/CiviCRM.HARDTOGUESS.log (2)

Drupal

sites/<sitedir>/files/civicrm/ConfigAndLog/CiviCRM.HARDTOGUESS.log


CiviCRM on Debian 10 gives warning about PHP MySQL Driver (libmysqlclient) Recently moved my CiviCRM install to a server running Debain 10 which brings:

php7.3
MariaDB 10.3.17

Everything seems to be working fine, except that in the system checks I'm now seeing this error/warning:

PHP MySQL Driver (libmysqlclient)
It is recommended, though not yet required, to upgrade your PHP MySQL driver (libmysqlclient) to >= 5.5.3 for utf8mb4 support.

The check seems to get its info from mysqli_get_client_info which on my server emits the following:
mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23

This is surprising - 5.0?! What to do?

Thanks to @Dermerit, the answer seems to be to upgrade!

This code change:
https://github.com/civicrm/civicrm-core/pull/14864/files

Seems to have removed the erroneous warning.


How to prevent the accidental the deletion of contacts, when an obligation exists to keep their records? In the Netherlands, the taxpayer can deduct gifts to charities from his income tax. The tax authorities take samples and can ask a charity to report the gifts it received from a particular contact. The length of the period they can ask this is seven years. So the records of this contact must be kept in these years.
Is there an elegant way to prevent deleting, or trashing a contact that gave a contribution in the last seven years?

I assume writing a little extension that picks up the delete with the civicrm_pre hook is a fairy elegant way?


Is there a way to get a stand-alone Tell a Friend page? We are trying to send an email to recent donors asking them to tell a friend about a current campaign. I know TAF pages exist as part of the donation page flow, but do they exist outside of that at all, or is there an easy way to make one?

Tell-a-friend has been implemented for donation (including membership), participant, and pledge pages.

I'm not quite sure how you want to use them. If you have a technology provider in-house or a CiviCRM consultant they could look over and adapt the Smarty template code at https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Friend/Form/Friend.tpl. See also the related php code at https://github.com/civicrm/civicrm-core/blob/master/CRM/Friend/Form/Friend.php, as well as the template at https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Friend/Friend.tpl and its similarly matching php code.


How do you restrict a CiviContribute page using roles I have a CiviContribute page which was intended to only be accessed by people renewing a specific type of membership.

We have found though, that it appears on a Google search and indeed a completely random person has signed up for the membership.

I have a Drupal Role for this membership type and also have a Group which we use as a mailing list; so would it be better to build it into a webform controlled by Access Control?

Idea for a possible workaround:

Create a group and role for the non-eligible users
Set up a Drupal block that only shows on this page and only for this role
put no visible content in the block, but create some JavaScript functionality to prevent non-eligible users to access the form


CiviMember price sets are depending on CiviContribute? When only CiviMember is enabled as active component, setting new price sets (civicrm/admin/price) throws am DB syntax error.

When CiviContribute is also enabled, setting new prices works.

Since these are two distinct components, I consider this as a bug. Please advise.

I'm on the lates CiviCRM version of 5.9.1

welcome to CiviCRM StackExchange!

Price sets are meant to create/interact with contributions which require CiviContribute to be enabled. Hence it makes sense that they only work if you have CiviContribute enbaled.

However it would make sense to not show any price set options in the UI as long as CiviContribute is enabled. You could create an issue for that on https://lab.civicrm.org/dev/core


Membership doesn't expire for short periods of membership We have standard membership that lasts one year and a trial membership that lasts one week.  The standard membership works fine, but we have found that the trial membership doesn't expire after a week but remains as 'New' for three months.

Looking at the membership status rules, I think I can see why.  'New' membership is set to start on the 'Member Since' date and ends three months after the 'Member Since' date.  Because this rule is listed first the membership remains on the 'New' status for three months even if we have moved past the 'End Date'.

We are using CiviCRM 4.6 on WordPress, but I have also tested this in the demo site running CiviCRM 5.5 on WordPress so I don't think this is version specific.

Has anyone else had this issue?  How did you resolve it?

I am considering changing the order of the status rules as follows:

Grace - from End Date to End Date + 1 month
Expiry - from End Date
New - from Member Since to Member Since + 3 months
Current - from Start Date to End Date

Does that sound sensible?

Your revised order would give them a month of Grace after the one week trial which may not be what you want either.

As per petednz's comment, one set of status rules shared between multiple membership types is limiting.

You could use Status Override to force Expired at the end of the one week membership, possibly with the 'Override until Selected Date' option.


Open CiviCase via Webform with manager role assigned We are trying to set up a webform to open a case and assign a case role (manager).
I configured two contacts - coordinator and client - and assigned them to the case in the webform. The client as client and creator and the coordinator to the managing role of the case. For the coordinator contatc I set a static field with a default contact value.
The open case part works fine, but assigning the coordinator as manager does not work. Instead, the first contact (client) is also assigned as manager.
I also tried opening a case without a manager being set. But in this case, the manager role is also assigned to the client contact.
Does anyone have an idea what the problem could be?
System
CiviCRM v5.28.2
Drupal v7.78
Webform CiviCRM Integration v7.x-5.4

Finally it is working!
Two where important:

Disable "Enforce Permissions" for the contact field in the webform config, filled with a default value.

Look out for the field "Update Existing Case" on the CiviCRM tab. It was set to a case status value, so it would change an existing case.

Many thanks to @AndyClark and @RayWright!


Accessing a user's search history It seems as though one of the members of my organization has used their access to our contact information in a way that they shouldn't have. I've been tasked with proving that they searched for, and accessed the email addresses of contacts and then copied or exported this information.

Is it possible to find a record of "who searched what" in drupal CiviCRM? I am open to either using the interface or mysql backend directly.

CiviCRM does not store information of who accessed what, for better and worse.

If you have the advanced logging turned on, you can see changes users made.  The CMS may have a record of when they last accessed the site, if that's helpful.  There's also an extension that adds a permission to restrict exports.  While any of those might be helpful, none are what you're looking for, because it doesn't exist - sorry!


Is the postSave hook a supported hook? This is different than the post hook, which is officially documented. The only real reference to the postSave hook I can find is CRM-7850, so I'm just wondering if it's supported or if it might disappear in future?

Reading the code and that issue, the hook exists and someone just forgot to add it to the wiki. Here, I've just added it:

http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_postSave_table_name


QuickForm Error w/ CiviCRM 5.33.0 Right after the update to CiviCRM 5.33.0, many pages (as civicrm/case/add or civicrm/mailing/browse/scheduled?) throws the following error - QuickForm Error: the rule does not exist as a registered rule
Is there a quick fix for this QuickForm ?
There is some details in the logs w/ a xssString :
[debug] $backTrace = #0 /PATH/vendor/civicrm/civicrm-core/CRM/Core/Error.php(205): CRM_Core_Error::backtrace("backTrace", TRUE)

#1 /PATH/vendor/pear/pear-core-minimal/src/PEAR.php(944): CRM_Core_Error::handle(Object(HTML_QuickForm_Error))
#2 /PATH/vendor/civicrm/civicrm-core/packages/HTML/QuickForm.php(2107): PEAR_Error->__construct("the rule does not exist as a registered rule", -2, 16, (Array:2), "Rule 'xssString' is not registered in HTML_QuickForm::addRule()")
#3 /PATH/vendor/pear/pear-core-minimal/src/PEAR.php(575): HTML_QuickForm_Error->__construct(-2, 16, (Array:2), "Rule 'xssString' is not registered in HTML_QuickForm::addRule()")
#4 /PATH/vendor/pear/pear-core-minimal/src/PEAR.php(236): PEAR::_raiseError(NULL, NULL, -2, 16, (Array:2), "Rule 'xssString' is not registered in HTML_QuickForm::addRule()", "HTML_QuickForm_Error", TRUE)
#5 /PATH/vendor/civicrm/civicrm-core/packages/HTML/QuickForm.php(1109): PEAR::__callStatic("raiseError", (Array:7))
#6 /PATH/vendor/civicrm/civicrm-core/packages/HTML/QuickForm.php(689): HTML_QuickForm->addRule("title", "Illegal characters in input (potential scripting attack)", "xssString")

`

@ichi that rule shouldn't be existing anymore because it was removed in 5.33 https://github.com/civicrm/civicrm-packages/commit/148eb5483caa1059d031f11aaf32b391bead1c66 I would suggest applying that patch onto your system and that should fix the problem


Is there a way to add a custom field to the Inbound SMS activity type? I'm working on a Drupal site that includes a view showing unanswered SMS messages. The view shows activities of the Inbound SMS type that have not been revised or deleted, plus a custom PHP filter that restricts it to inbound SMS activities from contacts who don't have an outbound SMS activity with a later date.

The client would to be able to mark off messages that they don't need to answer, and have those no longer show up in the list - basically a way of marking them as read and not in need of a reply. I tried to add a custom field for this to the Inbound SMS activity type - but it doesn't show up as an option! When I choose activities under the "used for" dropdown on the form for creating a custom field, it brings up a second list of specific activity type, but Inbound SMS isn't on it.

Does anyone know if there's any way to get this activity type to show a custom field? Or failing that, any other ideas for how to provide this functionality (a checkbox for marking SMS messages as read, which can then be used as a filter for the view)?

How about adding another activity status? Like "Unread" or "Read".

Depending on how skilled you are, maybe it is possible to have inbound sms set to "Unread" as default. Then your staff could change it to "completed" when they have read it.

If not, you could add the activity status "Read" and then change the status from "Completed" to "Read".

In both ways, you could have a report showing only the default activity status, and after they have changed the status, it diseappers from the report.


Membership tab will not display On a multisite with civimember enabled on that domain, the membership tab  on the contact summary screen does not show. I have ruled out Contact Layout Editor as a cause by disabling it. I have tried disabling and re-enabling the civimember component and clearing the caches.
I have a valid membership type on that domain too (not that that should matter)
What would be the cause for it not to show?

I would check:  https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fpreferences%2Fdisplay&reset=1  and see if Membership is 'unchecked'


Strange 'Permission Denied' message when browsing to CiviCRM home page On a site I've been working on for several years, when I log in to the site, I find that when I browse to the CiviCRM home page /civicrm?reset=1 I get a weird message: "Permission Denied: You do not have permission to view this contact record. Contact the site administrator if you need assistance."

If I simply ignore it and carry on then all seems fine. In the error log I see the following lines:

[Tue Jan 26 10:46:17 2016] [error] [client 81.95.52.80] client denied by server configuration: /home/mysite/sites/default/sites/default/files/civicrm/ConfigAndLog/CiviCRM.b94a921de7121c494a80645638b20a34.log
[Tue Jan 26 10:46:17 2016] [error] [client 81.95.52.80] client denied by server configuration: /home/mysite/sites/default/sites/default/files/civicrm/upload/delete-this-VJYWu2ovE4
[Tue Jan 26 10:46:17 2016] [error] [client 81.95.52.80] client denied by server configuration: /home/mysite/sites/default/sites/default/files/civicrm/custom/delete-this-uYgWNHRSxL
[Tue Jan 26 10:46:17 2016] [error] [client 81.95.52.80] Attempt to serve directory: /home/mysite/sites/default/sites/default/files/civicrm/persist/contribute/

The files mentioned in the second and third lines above don't exist.

If anyone has any advice about how to tackle this I'd be grateful.

EDIT: CRM-18300: "Permission denied" message re contact on CiviCRM dashboard

The errors in your log that you note are not a problem, they are CiviCRM doing a little security check for you (and succeeding).

I've seen this occasionally on my servers, and especially on my staging server. I believe that the cause is indirectly related to the errors you are seeing, in that:

If you're logged in, CiviCRM does a fair amount of these checks before rendering the page.
If you have production-type settings on a not-super-fast server, then you can get timeouts of various flavours that aren't necessarily going to show up in your apache/webserver logs.

As you probably also experience, just reloading the page will solve the issue, presumably because CiviCRM and or the webserver is using some kind of caching so it doesn't take so long.

In my case, extending the default backend timeout in my varnish configuration eliminated the problem.


Cannot install on live Joomla site Have attempted many times to install 5.35.1 or later 5.36.0 on live Joomla site. Find little info anywhere. Must not be many Joomla installations. Followed instructions explicitly and kept getting php error on file not found which was civicrm.settings.php. Not writing that file to the folders. Removed all files and extracted locally, then FTPed into tmp folder.  Install failed, this time the above mentioned file was written, however got a unknown database error failing to create table:
Cannot execute CREATE TABLE `civicrm_extension` ( `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Local Extension ID', `type` varchar(8) NOT NULL , `full_name` varchar(255) NOT NULL COMMENT 'Fully qualified extension name', `name` varchar(255) COMMENT 'Short name', `label` varchar(255) COMMENT 'Short, printable name', `file` varchar(255) COMMENT 'Primary PHP file', `schema_version` varchar(63) COMMENT 'Revision code of the database schema; the format is module-defined', `is_active` tinyint DEFAULT 1 COMMENT 'Is this extension active?' , PRIMARY KEY (`id`) , UNIQUE INDEX `UI_extension_full_name`( full_name ) , INDEX `UI_extension_name`( name ) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC: DB Error: unknown error

Just about given up this.  Anyone suggest what to do?
Well, I loaded WordPress in a subdirectory and then tried to install Civicrm per the instructions. Everything looked like it was working until it gave a fatal error and stopped with failure to create tables AGAIN. What I get is:
An error of type E_ERROR was caused in line 204 of the file /home1/flscv/public_html/wp/wp-content/plugins/civicrm/civicrm/setup/src/Setup/DbUtil.php. ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC: Specified key was too long; max key length is 767 bytes in /home1/flscv/public_html/wp/wp-content/plugins/civicrm/civicrm
I use HostGator with Mysql 5.6 for this site and think now it is a host issue (what else is new?)  I can create a new db and actually created the subject table with no issue.  The Joomla db was created several years ago and has not presented any problems. The wp db was just created, yet both dbs have the same problem.  My Wamp server is running 5.7.  I am going to contact hostgator support and hopefully learn if I can get this resolved.  May end up going to another host like I have done with other sites due to HostGator issues.
Considered the input in the answer and comments, I have reached the conclusion that at least part of the problem does indeed lie with the MySql configuration settings in HostGator. The version is 5.6 and one of the Innodb settings is set to off and should be on. Talked with HostGator support and they will not make any change to the configuration nor are they considering upgrading the shared server MySql version to 5.7.  Bottom line, I cannot use CiviCRM on this server.  I use another host and checked that one as well and determined that the MySQL version has the same configuration as HostGator.  I have reached out to them to see if they will either make the change and upgrade the version. I am willing to move to another host if I can find one that can meet the CivCRM requirements while keeping costs reasonable. This is for a small non profit organization that has limited funding so working under other constraints as well.

Welcome to StackExchange!   There are fewer installations of CiviCRM on Joomla than Drupal or WP, but it does work, and for most of what it does, Civi doesn't care which CMS it sits on.
You may be hitting problems described here with HostGator. In general, I'd only try to run CiviCRM on a hosting provider that explicitly supports CiviCRM.
The end of the error message simply says "DB Error: unknown error" - which is not much use to you or us!  Do your log files provide any more information about the error?
If the logs don't provide further info you could try connecting to the db directly (either command line or phpmyadmin) and copy/paste in the create table statement and see what error it gives.


Adding Social Network Buttons to Events How do you add a new social network button such as Instagram to a Event as part of its publication? Currently what is available is Twitter, FB and LinkedIn. Thanks.

What CMS are you using? Because it is not possible to add new social buttons. The reason for asking for the CMS is that you can create views in Drupal and so your own Event Page and then it is easy to add additional social buttions


Is this a paypal bug, or is this just fantasy? An odd one this!  We have taken around 50 online event bookings today with no trouble, except for one.

We happened to notice that one contribution for £300 was showing as complete, but in fact the transaction at PayPal (using Website Payments Pro) was for £0.

The contribution has been set to the 'Accounts Receivable' Account, rather than the Payment Processor Account.

A submit credit card payment link has appeared, so Civi seems to know something is up, but to all intents and purposes the transaction appears successful so it was only by chance that we noticed.  Is this a bug, or have I missed some intended behaviour?

Thank you!

We have got to the bottom of this - due to an unforseen combination of selections, the customer's basket value at the time of transaction was indeed £0. The £300 item was added later.


Add new case: "Case Type is a required field" When I try (on 4.6.18) to create a new Case, I get an error saying Case Type and Case Start Date are required, but no fields exist on the form to specify these?

I have Case Types defined and enabled at civicrm/a/#/caseType and I've tried adding a case from the menu Cases » New Case and from the Cases tab.

There's no javascript errors showing, nothing in Drupal's watchdog log. Hmmm. Am I doing something daft?

This was due to permissions in the templates_c folder. Some entries in there were not deletable by the user that Apache was running as. I discovered this by attempting to clear caches at civicrm/admin/setting/updateConfigBackend?reset=1 which generated lots of errors.

Removing these files/or correcting their permissions and clearing the cache fixed it.


Can someone help me understand smart group caching so I can prevent these deadlocks? I know that the Civi devs have been struggling with this issue so I am not complaining or asking for it to be fixed - I just want to understand how it works, so that I can work aroud it.

I am constantly getting complaints from users that data is missing from their dashboard, and when I look in the logs it is invariably due to deadlocks in civicrm_acl_contact_cache. The logs show that these deadlocks happen when the system is trying to INSERT into that table. Only rarely is it trying to delete. This is the opposite to what Eileen says here, i.e. that flushing the cache is more problematic than building: https://civicrm.org/blog/eileen/478-group-contact-cache-deadlocks-improvement

Users have reports on their dashboards that rely on smart groups for their filters. For this reason I set the smart group cache timeout to 0, so that   when, for example, someone completes an activity (and the target contact goes into a different smart group as a result) the resulting change is immediately visible. Otherwise users will worry that the change they have made has "not saved" or "not worked".

I followed Eileen;s advice (in the blog post I link to above) and turned off opportunistic caching. But I found I did not have to run the cache flush as a scheduled job either - everything seems to work without it, presumably because the cache timeout is zero.

It has not helped with the deadlocks, though.

Is a timeout of 0 simply not supported?

I think I would be able to deal with this much better if I understood how  the ACL cache relates to the smart group cache. Does the smart group timeout affect both? When does the ACL cache get flushed / filled? Do I have control over that? If someone could explain this paragraph from Eileen's blog it would help:

  If your smart group cache time out is every 5 minutes and your cron
  only runs every 10 minutes your cache will be 15 minutes old most of
  the time. I would expect you would want to run the cron every minute
  (& possibly reduce your time out by a minute).

I am confused about two aspects of this:
1. She is talking about a cron job that flushes the caches, but that paragraph seems to relate to building them
2. It makes sense that the ACL cache build will depend on the smart group cache. So yes, if the smart group cache is old, and the ACL cache gets built, it will have old data in it. But that assumes that the cron setting is about the ACL cache, not the smart groups. Yet the setting that turns off the opportunistic caching pertains to smart groups, and it is that setting that she says we can replace with the cron.

How can there be a difference between when the cache is flushed and when it is built, anyway? Surely refilling the cache means first you flush it, then you fill it. They cannot be separate

And for one last extremely confusing thing: I turned off the cron job. Why is the ACL cache still trying to update?

I cant answer everything but I think I can help clarify a few things;

  How can there be a difference between when the cache is flushed and when it is built, anyway? Surely refilling the cache means first you flush it, then you fill it. They cannot be separate

The answer to this lies in the state of the cache, there are in fact two states;

Current - does not need clearing or rebuilding
Invalid - this is either empty (as an operation flushed it or expired due to time/cron)

Important bit of information is that an action may chose to flush the cache without rebuilding it - as its not needed by that action but the action would affect it. A good example is a new contact being created - the ACL may be affected but in the create action the cache only needs to be flushed so that the ACL action can then build it.

  And for one last extremely confusing thing: I turned off the cron job. Why is the ACL cache still trying to update?

All caching has a expiration time, regardless of the cron if that time expires the next action will try to rebuild the cache. The idea of the cron is to carry out that action offline therefore reducing the time taken on the user action.

I'd like to work through the issue with you so please do keep this conversation going - we have some large customers running ACL without major cache issues so it should be a good case to establish exactly whats going wrong.

Perhaps you could share some numbers i.e. How many ACL groups/rules, smart groups, size of contacts etc. All of these factors will play in important part of the diagnosis.


Mailing stopped working after CiviCRM, PHP and Drupal upgrade Recently I upgraded:

Drupal core to 7.57

PHP from 5.6 to 7.0.28-1

CiviCRM from 4.7.27 to 4.7.31

Since I've done so I can't send mailings.
Basically I get the same thing like in the post described here

When I select a group to send the mailing to, it says no recipients. And when I click send the mailing is listed as completed with 0 deliveries.

This is what I get in my php error log

  [Tue Mar 27 10:02:14.592307 2018] [:error] [pid 10110] [client
  ip:45513] PHP Fatal error:  Uncaught Error: Call to undefined function module_invoke_all() in
  /var/www/mysite/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php:857\nStack
  trace:\n#0
  /var/www/mysite/sites/all/modules/civicrm/CRM/Utils/System.php(1413):
  CRM_Utils_System_Drupal->onCiviExit()\n#1
  /var/www/mysite/sites/all/modules/civicrm/extern/url.php(62):
  CRM_Utils_System::civiExit()\n#2 {main}\n  thrown in
  /var/www/mysite/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php
  on line 857, referer:
  https://mysite.org/civicrm/mailing/view?reset=1&id=709

I tried cleaning cache (drupal and civicrm) but it doesn't fix it. Rebuilding the smart groups didn't help either.

EDIT

This problem seems to be groups related and not mailing related. CiviCRM log is clean, and single mails work just fine.

EDIT2

However when I'm selecting mail recipients if I select recipients from previous mailings it counts them as it should but it doens't for groups (smart or regular).

EDIT 3

This seems to be an issue with multilingual installations.

The issue can be replicated by adding another language and then turning on Multiple Languages Support. After this the problem appears and disappears again when Multiple Languages Support is switched off.

4.7.27 was working, not sure whether the problem first appeared with 4.7.28, 4.7.29, 4.7.30 or 4.7.31

I updated this issue on Jira

The issue was affecting multilingual installations.
If the multilingual support is turned off in the settings everything works.

Applying the fix solves the problem for multilingual installations.

You can see the @monishdeb's fix on github, the fix will be included in the next version.

And here's the patchfile I used

131c131
<              ->where('mailing_id = #mailing_id AND entity_table IN ("!groupTableName", "civicrm_mailing")')
---
>              ->where('mailing_id = #mailing_id AND entity_table IN ("civicrm_group", "civicrm_mailing")')
133d132
<              ->param('!groupTableName', CRM_Contact_BAO_Group::getTableName())


Can someone help me fix a "greyed out" save button for a new contribution? Using D7 civiCRM 4.7.22. The "save" button is greyed out in the back end new contribution form (and the "confirm contribution" button in online forms) after upgrade to 4.7.22. This happens as soon as I select a payment method other than default in the back end. e.g. the default is "check", if I select "cash" then the save button is greyed out. This also happens in the online form (no payment method is available for selection, but if the default isn't set as "credit card" then the "confirm contribution" button is greyed out).

This was all working as expected in 4.6 before upgrade.

Thanks for your thoughts!

This is likely to be a resource URL issue - the way these fields are calculated has changed in CiviCRM 4.7.

Please look at Administer menu » System Settings » Resource URLs and Administer menu » System Settings » Directories.  Please ensure that both of these look correct.  Note that you might see a token (e.g. [cms.root]) as part of your URLs and paths - you can press the little question mark in the blue circle at the top of the page to see what those tokens expand to.

[See comments below for my final fix which was to to go to system settings -> clean up caches and update paths - JR]


Adding settings with form to my extension - what am I missing? I would like to add a settings form to a new extension to hold some extension-specific settings.

I've put together the extension and form using civix, and am testing in civiCRM 4.7.17 on local MAMP.

After reading the docs here and here, i've tried to copy the setup for settings in this repo (metadata form example from docs), and also looking at this repo.

I've looked at this question, but the issue i'm having is getting the settings array returned from settings/'myextension'.settings.php to actually populate anywhere in the first place.

For example when installing/enabling the extension, hook_alterSettingsFolders fires with the same code as in the above repos, but if I try to find my settings with the apiv3 call like this form (the one I used as well) does, the settings group has not been added, and so my form only populates with submit buttons and a var_dump of $_settings is empty.

I'm not seeing anything obvious in the civicrm or php logs.

Is there some key step i'm missing to get civicrm to recognize these settings?

Thanks!

Perhaps another example will help you along:

The Form:
https://github.com/jake-mw/CDNTaxReceipts/blob/master/CRM/Cdntaxreceipts/Form/Settings.php

And some of the settings are retrieved here:
https://github.com/jake-mw/CDNTaxReceipts/blob/master/cdntaxreceipts.functions.inc#L73


Tags, relationships, or custom fields to record custom data? Apologies if this isn't the best place to ask, I'm completely new to CiviCRM and could do with some advice on the best way to store custom data.

I'm building a database of churches. For each church I want to record the denomination. Depending on the denomination, there are other details I also want to record. For example, for anglican churches I want to record the diocese, and for some dioceses I want to record further administrative subdivisions that churches belong to. But other denominations don't have those structures, and might have completely different ones. And some churches belong to more than one denomination, so might need the full structure details for two or even three of them.

As far as I can see there are three different ways I could organise that data:

Using custom fields. I could create a multiple record fieldset allowing me to record more than one denomination for each church. But then how would I store the different structures for the different denominations?
Using tags. I could create tags for every different level of every denomination in the database, so for example a church could be tagged with 'Anglican, Leeds Diocese, Bradford Episcopal Area'. But then the tags would exist for any contact in the database, not just churches, which could lead to a lot of clutter and confusion among users, particularly as the database grows.
Using relationships. I could create organisational contacts for denominations and dioceses, and then use a relationship to associate, e.g. X church is a member of Methodism, or Y church is a member of Southwalk Diocese which is a member of Anglicanism. But I think that will also be confusing for users, particularly when adding a church from a new diocese/denomination, and could lead to lots of shadow contacts that only exist for the purpose of categorisation rather than as actual contacts.

I'm leaning towards custom fields, but the only way I can see of getting the result I want would be to have a different contact type for each denomination, and then a fieldset for the relevant structural information on each contact type. Which would mean the denomination would have to be filled in by users in a box headed 'Contact Type' instead of a box headed 'Denomination', and that it would be mixed in with other non-church contact types.

What would be the best practice method?

The best architecture would be to create Organisation sub type and then have relationship with subtype contacts. This would be easy to related contacts such as in your case. Adding relationship will be consistent and easy to add custom ACL.

If you want to use custom fields than you will need to create multi-value custom field of type contact reference for each contact sub type. This field will pull contact(s) from specific contact group which can be smart group or normal group having contacts of specific contact type. In this way you can create hierarchy of relationship using contact type.

But i believe you will need to add some custom code i.e either building custom report or restricting contact CRUD operation for user belonging to specific denomination.


Bug datepicker field when more than one on contribution page I have civicrm installed on wordpress
I have a issue with datepicker field
When i put only one datepicker field it's works well
But if i insert more than one datepicker field in a form, the datepicker field are breaked.
I have try with a fresh install on new versions of civicrm and wordpress and i have the same problem.

Could you help me to solve this issue

Thanks !

Hello you can see here the way my datepicker field are displayed when two are on the same form.

This bug is also present with a fresh install

Thanks for help


Can multiple websites be synchronized under the same CRM installation I am very new to CiviCRM so I'm sorry if this sounds silly.
I want to ask if you can install the CRM on one website, but manage/gather/synchronize the activities from another one. As an idea, I will try it on Wordpress, but the question is generic.
For example, the main website is one of the main organization (which has various activities, products etc.), where Civi would be installed, then there is another one, like an online shop for example (with products mngmt., sales, marketing actions etc.) which needs to send its activities to the main website too.
Can that be achieved?
If yes, is it possible with just one Civi instance or there needs to be an instance on each wesite?
In any case, I'm really excited about this platform that I recently found out about and it seems absolutely amazing.
Thanks for any feedback.
Andy

It is possible to have a single civicrm wired to several CMS instances.
There is some documentation here
https://docs.civicrm.org/sysadmin/en/latest/install/multi-site/
There are hurdles to get over, for example, how to synch users across the various CMS
There are other approaches to pull in data from other sites without wiring CiviCRM in to it including

Remote Forms

Profiles using HTML snippets

using the RestAPI

Some good answers here
Perhaps best if you want more input on this Q+A to add more info to your Question detailing a bit more including how you see logged in users functioning across the sites


I have installed eventcalendar extension in civicrm I am following the steps provided in the Readme as given in the link below.

  Introduction
  ------------ Event Calendar Extension allows you to view all CiviCRM events in a Calendar by month,day,week.The setting page allows us to
  select which events should be shown on Calendar with the color we want
  for particular event type.The setting page configuration for event
  types filters allows us to filter by particular event types on
  calendar.

  Installation

  Move the downloaded extension to your extensions folder.
  Goto civicrm/admin/extensions&reset=1  -- install the extension

  If you are new to CiviCRM Extension you can get help about extension
  from

  http://wiki.civicrm.org/confluence/display/CRMDOC42/Extensions

  Library
  --------------- Extension uses the fullcalendar library. Add the fullcalendar library
  https://github.com/fullcalendar/fullcalendar/releases/tag/v1.6.7

  Usage

  Click Administrator->CiviEvent->Event Calendar Settings menu (civicrm/eventCalendarsettings) -- change the setting if required.
  Click Events->Show Events menu (civicrm/showevents) -- to view Event Calendar with Events as per settings.

https://github.com/osseed/com.osseed.eventcalendar

I have followed the installation steps #1 and #2 given below.
Also where should I add the fullcalendar library ?
In the Usage as mentioned, I don't see Administrator -> CiviEvent -> Event Calendar and also Events -> Show Events.
Kindly help me debug on what is wrong ?

The fullcalendar is the plugin called "WP Calendar", if you have WordPress you install and activate it in the WordPress plugin area.

For the other issue, you may want to either disable/reinstall the civicrm extension, (works for some people), or take a look at answer to How to use event calendar extension with civievents

Also there is another step that you didn't list, to copy over the folder mentioned in the "Note" section of the README.


How to search PCP by date created? Is there any way to search Personal Campaign Pages by the date that the campaign is created? On /civicrm/admin/pcp page, you can sort by starts and end dates, but these are for the donation/event pages, not the campaign page itself.

So for example, I created a campaign page in February 2016 for an event which is open since July 2014. Is there a way to find all campaign pages that are created in February 2016?

Great idea. Unfortunately there is currently no way to do this.

Personal campaign pages don't even store the date that they were created.

Enabling database-level logging would allow you to store this type of data, but you would need to build a custom search or report to see it.

I agree this would be a great feature though!


Contact image not displaying I updated civi to version 4.7.25 (from 4.7.8) and now instead of seeing the contact image there's the text "custom" with a link that I can't open

It should display the profile image coming from the civi db (civicrm_contact.image_URL)

the "custom" link is https://[website]/civicrm/file?reset=1&filename=custom&mime-type=image/

Any ideas?

I am encountering the same problem, but only with images uploaded via Webform; if I edit the profile, delete the image reference, and re-upload the file, it displays as expected.

The reason is that Webform CiviCRM inserts the image_URL value in the database as the path to the webform upload, e.g. /sites/default/files/webform/NNNN.ext. The CiviCRM handler (CRM/Utils/File.php) expects CiviCRM-style image URLs of the form /civicrm/contact/imagefile?photo=NNNN.ext, and so mangles the path twice, once on reading it and then when it runs getFileURL on it.

Thus, anything dependent on $imageURL will break for images uploaded through Webform or other external mechanisms.

The issue is reported on Webform CiviCRM Integration as Contact Image Upload field integration not working with 4.7, first reported by goron on 29 November 2017, with no activity since. I did not find any corresponding issues filed in JIRA. I am using a hacky workaround but it is specific to our particular environment and installation.


How to turn off the prompts for additional participants in event registration I have an event with a $10/head admission fee.  I have "register multiple participants" and "same email address" boxes checked in the setup.  The profile is just first name, last name and email.  The problem is that each registrant is still taken to a profile screen for each person they are registering.  So if Suzie is buying 6 tickets, she will be prompted to enter data on all six people.  They may be optional, but they are still annoying to the user.  How do you turn that off so Suzie can just say she wants 6 tickets, enter her own data, pay the fee and be done?

Create a price set with options set at 1 Ticket $10, 2 Tickets $20, 3 Tickets $30 and so on.

Uncheck Register Multiple Participants, and use the price set you just created.


CiviMail/Cron Fails using BeeFree template Interesting situation... we use BeeFree to compose responsive emails, however they are failing to send, resulting in a scheduled/sent email as "running". We use EasyCron to trigger the scheduled jobs, however when using a BeeFree template, only the starting job is visible in the log, hence we see:

  Entity: Job Action: process_mailing Summary Starting execution of
  Mailings scheduler Details Parameters parsed (and passed to API
  method):  a:1:{s:7:"version";i:3;} Full message:  Starting execution
  of Mailings scheduler

But we never see the "finished execution" message. I suspect this is why the status of the emailing is perpetually set to "running". If we try to then trigger the cron via the URL, the result is an internal server error 500.

Here's where it's interesting... if we compose a new HTML email and just drop some text in there, along with the require tokens, everything works perfectly. If we review the cron logs provided by EasyCron we see that the only difference between the successful and failed jobs (in the logs) is that the successful job log has this additional line:

  X-Proxy-Cache: BYPASS

The log of the failed job does not have this line. I know this is probably way out there as far as an issue, however any insight into this would be great. We're running CiviCRM 4.7.11

I think this might be related to the CSS brackets {} in the <style></style> tag a the top of your email source code, and/or Smarty enabled in CiviMail.

Removing entirely the style tag should fix the issue.

I think BeeFree already does inline styling, so it should not affect the formatting of the email.


DB error on tag page after installation I'm new to CiviCRM and just installed it (v. 4.7.17) on Wordpress 4.7.3

When I access the tag management page (wp-admin/admin.php?page=CiviCRM&q=civicrm%2Ftag&reset=1), I get a DB Error + a display bug.

Error is

Expression #12 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'civicrm.child.id' which is not functionnally dependent on columns in GROUP BY clause ; this is incompatible with sql_mode=only_full_group_by, 1055

And debug info is in the image attached.

Does anybody know how to sort this out?

thanks

Thomas

ok, finally got it working by adding the following lines to the config file located at
/etc/mysql/my.cnf

[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

But looks like a bug anyway..?!


Omitting soft credits from reports I need to omit soft credits from some reports. Financial reports currently double the amount of some contributions when the contributions include a soft credit. For example, matching donations are entered with soft credits to the original donor, but these matching donations should not be included in the report totals.

There is a default criteria in (some of the reports) that can be checked for contributions only, or soft credits only.

But difficult to be more specific, unless you state your Civi-version, and the name of the report.


Lookup field for parliamentary constituency Hello I would like to have the ability to lookup the parliamentary constituency of a person when they put in the postcode. The data should return into a custom field. The data source would need to be an external database (probably sql) I am aware that there is regional lookup extension (does it work on 4.7?) and there is county lookup (can that be tweaked to lookup a different field). Does anyone have any views on this? Are there other extensions I'm not aware of?

Thank you!

For interest's sake in the end I went with a solution that sat outside civicrm (for now). I used PHP to look up and return the MP name from a sql table which I created by uploading data from http://www.list-logic.co.uk/lists/parliamentary-constituencies/list-of-uk-constituencies.html

The list of people who submitted the form are being manually uploaded into civicrm daily.


How can I record an offline contribution with multiple line items? My use case is a donor who makes a donation that needs to be allocated to multiple funds.  For instance, a check for $20,000, with $10K for general operating expenses and $10K for a special program fund.

While I'm clear how to make an online contribution page that allocates funds to multiple line items, I'm not sure if there's a way to do this from an offline contribution page.

Create a Price Set for contributions pointing to the multiple funds needed. Each fund should have a price of 1.00.  You could include additional funds besides the two in question so that the Price Set is ready to be used like this in the future for other potential donation splits.
If the donation needs to be attributed to a certain contribution page, create that contribution page.
Enter a 'New Contribution' under 'Contributions' menu.
Once the price set is created, next to the amount field, you should have the option to choose a Price Set.
Choose your new price set, and split the donation as needed to each fund.
Enter the check info and other pertinent contribution info.
Pick Contribution Page under 'Additional Details' if needed.


I have 2 button (Register Now) for CiviEvent I would like to add Events and Also website user and the public user could register for events.
The problem is registration part: I have two registers now button on event page?

Two "Register Now" buttons is by design.

When you add more info to the event such as a formatted description, a picture,  a location map etc then the page can get quite large so the idea is that your users can easily get to a 'Register' button at the top and bottom of the page with minimal scrolling.

If you really don't want both buttons you can customise the event display.  See various answers here on SE such as this


How do I use cv to run database upgrades from the command line? I'd like to run the database upgrades from the command line. I know I can do with with drush civicrm-upgrade-db but I'd like to know a way to do it in a CMS-agnostic way (that will work for Wordpress and Joomla).

I see there is cv ext:upgrade-db which claims to "Apply DB upgrades for any extensions". Is there a corresponding cv command for CiviCRM core?

The cv upgrade:db command from https://github.com/civicrm/cv/pull/2 was recently merged for v0.2.3. This revision hasn't been broadly deployed or tested yet, but it provides a richer upgrade experience:

By default, there's a progress indicator.
With -vvv, you can get a detailed report/log of the upgrade steps as they execute.
With -vvv --dry-run, you can see a detailed preview of the upgrade steps.
With --retry or --skip, you can resume after an upgrade failure.
With --quiet, you can limit output to particularly interesting information.

I've found that -vvv and --dry-run are helpful when developing patches for the civicrm-core upgrade logic, and they may also be helpful with large or temperamental upgrades.

(Note: PR #2 also anticipates several more subcommands for identifying/downloading upgrades and for reporting successes and failures. However, these are not live at time of writing)


"Log Volunteer Hours" form required permissions? I've installed the CiviVolunteer extension on CiviCRM 4.6.6 on Drupal 7. I can create an event, enable volunteer management, assign volunteers, etc., from both the site's administrator account and from accounts part of the more permission-limited "staff" roll. As the site administrator I can also use the "Log Volunteer Hours" form without issue. However, when I try to use this form as a "staff" user, the form comes up and is populated, but the spinning "loading" triangle never goes away, and my cursor turns into an hourglass over the form. According to the browser console, when I run the page (and the form) as a "staff" user, there is an uncaught TypeError related to the jQuery "each" function (specifically, it is being supplied with an undefined object); this doesn't happen when run as the site administrator.

What permissions does a user have to have to be able to use the Log Volunteer Hours form?

CiviVolunteer's "Log Volunteer Hours" dialogue relies on API permissions that appear to be missing (which is why it works for users with "Administer CiviCRM", since they have full API access). I've filed a bug report here: https://issues.civicrm.org/jira/browse/VOL-138


How are spam bots making submissions to civiCRM? I ALREADY had reCaptcha enabled in civi and on my Profile type, but it seems that spam bots were still making submissions to civiCRM and creating contacts (and got assigned to a group).

I only recently caught it because I turned on role synching between civi and drupal and saw spam accounts popping up assigned a role other than "authenticated".

After going back through the particular group in question (in civi), I noticed that there were contacts that had civi IDs but not Drupal (I'm assuming submissions before I turned on role syncing. I didn't load sample data when I installed civi)

I'm not even sure what the URL would be for the form where bots could create a contact record...

If you have a CiviCRM profile assigned to "Drupal User Registration" (as "Name and Address" is by default, I believe), then spam bots that apply for an account on Drupal will also be inserting fields from that profile into their associated CiviCRM contacts.

If you aren't using the account functionality you can turn it off in Drupal (admin/config/people/accounts) by allowing Admin only account creation. Otherwise you can look into Drupal-specific spam blocking modules such as Honeypot.

There are also some CiviCRM-specific fraud prevention suggestions that may be of interest to you.


Contributions - Follow up alerts Looking for a way to have follow up alerts after a donation is received.
e.g. If no custom activity "Sent Receipt", alert admin with email or have alerts on dashboard

Any suggestions on how best to do this.

Tks
Alan

Wordpress & CiviCRM latest versions

It sounds like the CiviRules extension might fit your requirements
https://civicrm.org/extensions/civirules

This extension allows to you trigger actions when certain events happen. If x happens then do y.

There are some good examples in the 'cookbook' - linked to from the page above - that should help you get started.


CustomGroup Create API Not Passing Param extends_entity_column_id I am using the API to create a custom group that extends "Participant". I want to set it to be based on Participant (Event Type).

I set the "extends_entity_column_value" and "extends_entity_column_id".
However, it does not seem to pass the "extends_entity_column_id" parameter on the call.

Here is the call I am making:

$result = civicrm_api3('CustomGroup', 'create', array(
  'debug' => 1,
  'sequential' => 1,
  'title' => "Membership Bible Training",
  'extends' => "Participant",
  'collapse_adv_display' => 1,
  'extends_entity_column_id' => 3,
  'extends_entity_column_value' => 19,
));

Here is the result of the call:

{

"is_error": 0,
"undefined_fields": [
    "style",
    "is_active",
    "title",
    "collapse_adv_display",
    "extends_entity_column_id",
    "extends_entity_column_value",
    "extends"
],
"version": 3,
"count": 1,
"id": 79,
"values": [
    {
        "id": "79",
        "name": "Membership_Bible_Training",
        "title": "Membership Bible Training",
        "extends": "Participant",
        "extends_entity_column_id": "",
        "extends_entity_column_value": [
            "19"
        ],
        "style": "Inline",
        "collapse_display": "",
        "help_pre": "",
        "help_post": "",
        "weight": "1",
        "is_active": "1",
        "table_name": "civicrm_value_membership_bible_training_79",
        "is_multiple": "",
        "min_multiple": "",
        "max_multiple": "",
        "collapse_adv_display": "1",
        "created_id": "",
        "created_date": "",
        "is_reserved": ""
    }
]

}

Notice how "extends_entity_column_id" is empty. Why is this?

I figured it out.

You have to set

'extends' => "ParticipantEventType",

By doing that it will set the proper value for 'extends_entity_column_id'.


How to create a custom dashlets? I want to create a custom dashlet but I don't know how to do that.Please guide me to build a new dashlet. Any github reference or any source.
Thanks in advance.

Start with civix generate:page. Optionally assign some smarty variables in run() in the autogenerated php class and edit the autogenerated .tpl with your html.

Then you need to insert an entry in civicrm_dashboard that links the url you chose in generate:page. See the function addGettingStartedDashlet() in CRM/Upgrade/Incremental/php/FourSeven.php, just note the columns have changed slightly if you're on a later version.


Adding a Facebook Conversion Pixel Code to the contribution confirmation screen To track the efficacy of a Facebook ad campaign, my users want to insert a Conversion Pixel to some (but NOT all) contribution confirmation pages.  What's an effective way to do this?

You could override the Thank-you smarty template. Copy the one from templates/CRM/Contribute/Form/Contribution/ThankYou.tpl. Then you could do something like this:

{if $contributionPageID == 20}

    <script type="text/javascript">
    {literal}

      function doFacebookStuff(){
      };

    {/literal}
    </script>
{/if}


Drupal-8 / Civi 5.32 -- In D8 I see some civi blocks for me to use. Where are they defined? I've been spending a lot of time in the Civi galaxy learning the ropes.  Now I am moving back to the drupal galaxy.  I know they reside in the same universe and there are some blocks pre-built to expose Civi to Drupal.
Users are one area with overlap.
But Views...  I see some pre-built civi views for me to place in Drupal.  Where are they defined??
There is a pre-built view for upcoming events and I would like to tweak that to only show upcoming events where event type ==x.
Any help would be appreciated!
Thanks

It's not a "view" in the drupal meaning of the word. It's coming from here: https://github.com/civicrm/civicrm-core/blob/6960dd4c1e5e99f8e0b3564dcc15269184d7702d/CRM/Core/Block.php#L523
I think the "right" way to customize this would be with your own drupal module that creates a block that does the same thing but calls that CRM_Event_BAO_Event::getCompleteInfo(date("Ymd")); function with the 2nd parameter which allows you to specify type.
I don't know if there's a hook that would allow you to more easily customize it in a supported way. If you want to hack it, just add a second parameter on that line to specify the type.
UPDATE: You could also do this as a drupal "view" if you install civicrm_entity. Views can be displayed as blocks.


How to use full unicode on custom fields There's an API call System.utf8conversion which will change all your tables to MySQL/MariaDB's utf8mb4 format, i.e. full unicode with emoji support, rather than the incomplete utf8 implementation of old.
I ran this and it worked fine but then found that when I add a custom fieldset, that table is set to the old UTF8 charset.

It's still the case as of v5.30 that the incomplete UTF8 support is hard coded into the core code.
The solution for now seems to be to re-run the System.utf8conversion routine after any time you create a field/fieldset.


Front-end Profile View Issues I feel like I've run into these issues before but for the life of me cannot remember the solution.

I have a front-end profile listing, when you go to view the full profile, all the fields are clickable but the actions after the click are inconsistent. For example:

Click on a website URL - goes to the website
Click on an email link - goes back to the profile list search results for that email address.
Click on a custom field (note type) - goes back to the profile list search results for that field.

Obviously, the problem with the Bio field is the worst, and even though the field is set to NOT be searchable, you're able to click on it and search by it. Setting it to View Only didn't do anything.

Wordpress 4.3x
CiviCRM 4.6.10

Since I'm not allowed to comment (what's up with that?), I'll ask for clarification here.

What results are you expecting for each type?
What do you mean by the 'Bio' field? Can you post a link?


Solved: How do I allow all tags in CKeditor How do I set mailings to allow all tags? I'm using the latest D7 and Civi and have
tried setting this via the GUI, but the editor still filters the code :-(

Below is the generated crm-ckeditor-civimail.js file (in files/civicrm/persist.):

/**
 * CKEditor config file auto-generated by CiviCRM (2017-02-13 20:10:38).
 *
 * Note: This file will be overwritten if settings are modified at:
 * @link http://ir.association.works/civicrm/admin/ckeditor
 */
CKEDITOR.editorConfig = function( config ) {
    config.toolbarGroups = [
        { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
        { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
        { name: 'forms', groups: [ 'forms' ] },
        '/',
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
        { name: 'links', groups: [ 'links' ] },
        { name: 'insert', groups: [ 'insert' ] },
        '/',
        { name: 'styles', groups: [ 'styles' ] },
        { name: 'colors', groups: [ 'colors' ] },
        { name: 'tools', groups: [ 'tools' ] },
        { name: 'others', groups: [ 'others' ] },
        { name: 'about', groups: [ 'about' ] }
    ];

    config.skin = "moono";

    config.allowedContent = true;
};

UPDATE:
A fix for multisites and Aegir setups will come out in CiviCRM 4.7.21.
See https://issues.civicrm.org/jira/browse/CRM-19303

After much work we managed to solve this. It was definitely a multisite / Aegir issue.

We had to go through some hoops and down some rabbit holes but you can find our solution detailed here: Solved: Is this a bug - [civicrm.files] variable


Confusion about theming and version - Shoreditch? I need some advice on the theming of my instance of CiviCRM.  I have done some research and have seen this theme and I'm not sure of the following

Is it version based?
Is it CMS based - depending on the CMS you are using?
Or is it a setting inside CiviCRM - I am currently using 5.25.0

I'm looking to move from the before to after.
Thanks in advance for the advice,
E
:

The system requirements are listed at https://github.com/civicrm/org.civicrm.shoreditch#requirements. It's an extension you would need to install.


Importing Contacts, Memberships and Contributions in 2020 I need to import from an external database 1500 contacts with their memberships and contributions.

Everything I read about it in Stackexchange was written between 2015 and 2017.

Is the following still up-to-date?

I can't import everything within a single .csv file, CiviCRM is not build this way
It takes 3 steps:

import contacts with external id connection prevents to look up for contact ID within Civicrm
import memberships with external id field
import contributions with the proper membership_type

Using CSVimporter is the proper tool

Should I do this way or do is there a quicker way?

best regards,

Guillaume

The "normal" import tools tend to focus on a single entity (contact, contribution membership, participants...) indeed, so as you identified, it needs several separate imports and trying to find some common keys so civi knows how to link them

If you have complex/composite structures to import, it might be easier to write a simple php script that calls all the needed apis to create the entities. If you are familiar with php and the civicrm apis, it might be simplier (and it makes it way easier to "replay" the import)

good luck!


Error "Unknown Error" when uploading a file with CKEditor In CiviCRM 4.6.5, I'm not able to upload files with CKEditor.

I get the very informative error Unknown error

It's seems to be a permission or problem like that when copying the file but without more information, it's difficult to find what it is.

I have found the forum post https://forum.civicrm.org/index.php?topic=26908.0 but my problem is not one of those described.

After digging, i have found that the problem was in the function packages/kcfinder/core/class/uploader.php :: checkFilePath

This function forbids an upload if you have a symbolic link in your path.

There is also a related issue in CiviCRM JIRA : https://issues.civicrm.org/jira/browse/CRM-15607

EDIT:

Probably not a very good solution but you can patch kcfinder.

In my case it's complicated to remove the symbolic link so I used this as a temporary fix.

Add the following line as the first line of the function checkFilePath to avoid the verification:

     protected function checkFilePath($file) {
+        return True;
         $rPath = realpath($file);
         if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN")
             $rPath = str_replace("\\", "/", $rPath);
         return (substr($rPath, 0, strlen($this->typeDir)) === $this->typeDir);
    }


Disabling Web Site type label (work) wondering if someone could assist with this naggging issue (small thing that we've spent 4 hours attempting to figure out).

In civi, there are options for phone types, website types etc, and similar the quetion asked in Website Display in Directory listing

we are wondering : how the heck do we disable (work) the label for the web site 'type" in parentheses??

Know we've done this before but can;t for the life of us remember how (?)

Going to profile > then the field > as suggested by the ticket above does not give is that option.

Any assistance appreciated!!

D

It is a 'dropdown option' which you can find via Admin > Customise > Dropdown options, or via Admin > System Settings > Option groups

eg

http://dmaster.demo.civicrm.org/civicrm/admin/options/website_type?reset=1


Error messages galore from contact.php and mailing.php, but eveything works? Should I worry? how do I fix it? I've just migrated a civiCRM instance from Joomla! to Drupal. Everything I've tried so far works and it's the best thing ever. I find everything we want to do so much easier to get around in Drupal.

One problem:

When a user makes a new account, using a civiCRM profile I've made, I get all these errors:

  Notice: Undefined index: contact_sub_type in
  CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2010 of
  [redacted]/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).
  Warning: in_array() expects parameter 2 to be array, null given in
  CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2011 of
  [redacted]/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).
  Notice: Undefined index: contact_sub_type in
  CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2012 of
  [redacted]/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).
  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 763 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).
  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 767 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).
  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 777 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).
  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 781 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).

They are filling in custom fields at this point of registration, and some of them are multi valued if that has any bearing on anything.

Also when updating details of a user I get:

  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 781 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).
  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 767 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).
  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 777 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).
  Notice: Trying to get property of non-object in
  CRM_Mailing_BAO_Mailing->getTemplates() (line 763 of
  [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).

Again, we are updating those custom multi valued fields using a profile. No, I tell a lie, there are still custom fields, but not multi valued ones here.

This does not happen updating user details using the civiCRM administrative interface. Everything is fine there.

Any hints what the issue could be? does it matter? I'm yet to find anything that does not work, it just regularly throws these errors up. It does matter from a user experience point of view, I at least want to hide these messages. I have not quite finished testing everything though.

This is also on new hosting, so databases have been restored and such. Possibly there is something this host is not doing? but I can't think what it could be.

[edit] Found something that does not work. Removing contacts from a group. When I remove a contact from a group they are immediately added back with a status of "Added (by API)" Date added being the time you removed the group. You see this immediately in the administrative interface. Not sure that this is possibly related.
[edit again] no, only some groups. Some groups remove just fine, I think this is group thing is a drupal group sync thing (greatest thing ever by the way!)[edit again] yes, group sync thing, I had an extra rule making a bit of an infinite loop: not related to the above problem. ignore this please.

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

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

Long answer on Drupal Answers.

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


Is there a way to set up PCPs without the user having a login? As the question suggests we are aiming to use PCPs for an event of ours but would rather not have user logins enabled as we don't need them for anything else. Unfortunately all the text on the PCP set up pages tells users they can change things after and login etc, is there an easy way to change these so the users know when they finish its fixed and they will have to contact us for a change as this seems easier than setting up user account sign up just for this one use?

Alternatively if somebody can give me some quick pointers to set it up so the users can sign up for accounts while creating PCPs I'd be happy with that?

I've already spent a few hours searching on this subject so hope I haven't missed something obvious and I'm not wasting everybody's time, really hope somebody can help and thank you in advance!

Sam

I've encountered this issue before - and found it easiest to go with allowing user registration.  I agree it'd be better if this wasn't necessary, but haven't found anyone willing to fund that improvement.

You haven't specified your CiviCRM version or CMS, which makes it a little more difficult to answer, but the general approach is to create a profile that you intend to use for PCP signup, go into Advanced Settings for that profile, and enable user registration there.  This will enable signup directly on the PCP page.

Note that if you're using Drupal, and you've disabled user registration altogether within Drupal, the user registration block won't appear on the profile.  I assume it's the same for Joomla/WP.

However, since you're enabling user registration, that also means that the default user registration page will also be enabled.  I like to use theming to break the normal user registration page - that will drastically cut down on the number of spam user registrations you'll see.


Receipts Sent to Customer for Current Donation Include Previous Donations Ok, I'm hoping I can explain this so it makes some sort of sense :)

In CiviCRM, we have a customer who has custom profile fields that donors can enter the amount of their contribution that they want to go to a specific cause

The issue is that the receipt is including the contribution the donor just made as well as the previous amount(s) they chose to designate the last time they made a contribution (since it's the same donor with the same email address).

Is there any way to remove the amount from the previous contribution the donor made? It's not helpful for our customer because they don't know what amount/designation applies to what year when they view the receipt that's sent and the customers are concerned that they are being charged twice.

Any help with this would be GREATLY appreciated because this is one of our my vocal customers. :)

If you need any additional information, please let me know.

Thank You,
Nicole

DRUPAL 7
CIVICRM 4.6.8

The custom fields that allow you to specify who the donation should go to should most likely be attached to the contribution, not the contact.  Change the data model and the receipts should fix themselves.


How can I set up a two part sign up form, where first submit leads to second with more fields? My client doesn't want to scare potential subscribers off with a long form.

Is there a way to capture, and save, the name, email and phone of a subscriber and then redirect this user to a form that collects more information (like address, employer etc..)?

I could hide half the form with javascript but this means the first half wouldn't be saved.

I was thinking I could use the redirect field to redirect to a new form but then this information wouldn't be added to the same contact.

I'm using civiCRM with wordpress.

Thanks for your help!

Edit: I am looking to do this without the user having to create an account (with username, password). Just two profile forms that follow on from each other and are saved to the same contact.

To implement this purely in CiviCRM with WordPress:

Create a standalone profile form to collect name, email, etc.
Create a second profile form to collect other information. If you want it to record an activity, you can set it up as a "Petition" form. If you want it to register the contact for an event, embed it in an event registration page.
Back to the first profile, edit and click the "Advanced Settings" tab at the bottom - set the "redirect url" to the public url of the second form.
Create a page or post in WP, and click the CiviCRM button to insert a shortcode for the first form.

Note that users must be logged in for Civi to already know who they are on the 2nd form. You have 2 options with this:

Users are already logged-in prior to filling the 1st form
On the 1st form, (also under "Advanced Settings") you can have Civi create a user account for them.


is it possible to switch languages on a page manually? I have a Civi install that needs to support multiple languages for a few forms. The site itself is not multilingual, so I've not enabled the option to inherit the CMS language, and the language-switching should be available to anonymous users, so I can't make use of the language preference field. I'd like to be able to allow the visitor to switch the language dynamically -- presumably with a URL parameter. Is there a way to do this?

This is done by appending &lcMessages=fr_FR to the URL (where fr_FR is the desired language code).

When multiple languages are enabled, there is a language switcher block that becomes enabled. What threw me off is that in Joomla that is a fixed block in the admin interface left sidebar -- but is not available to the public side of the site. In Drupal it is a block, which is more configurable. But all the language switcher does is reload the current URL with the appropriate language value.


Recurring Payment Issues I have a site that is using PayPal Standard as their Payment Processor and WordPress as the CMS.   After the upgrade from 4.4.x to 4.5.8 Recurring Payments are no longer working.

Could this be related to issues where the PayPal IPN callback fails?  I suspect that the issue is that PayPal is not communicating properly with the site.  Where can we find the code that would handle this?

Currently this is working on my development site:

Code removed as the actual solution is now in CiviCRM v 4.6.3

The first part is gets the payment status to flip to completed, the second section lets the IPN call back complete and send the email.   This is by no means perfect as if wp-load.php is NOT in the doc root it will fail.

It is a working solution for now.  Will comment if a better more flexible solution can be found

Patches for this problem are documented here:  https://issues.civicrm.org/jira/browse/CRM-15629

CiviCRM version 4.6.3 for WordPress fixes the issue


Error in CRM_Contact_Form_Relationship->setEmploymentRelationship() when saving an edited relationship When editing and then saving a relationship, the AJAX overlay hangs with the spinning symbol. If the page is refreshed, the 'Relationship record has been updated." notification is shown and the change is saved in the DB

Console shows:

POST http://www.example.com/civicrm/contact/view/rel?action=update&cid=1234&id=4321&rtype=a_b&snippet=json 500 (Service unavailable (with message))

In syslog I'm getting the error:

http://www.example.com/civicrm/contact/view/rel?action=update&cid=24068&id=6749&rtype=b_a&snippet=json|http://www.example.com/civicrm/contact/view?reset=1&cid=24068|2386||Error: Call to undefined method CRM_Contact_BAO_Relationship::isCurrentEmployerNeedingToBeCleared() in CRM_Contact_Form_Relationship->setEmploymentRelationship() (line 654 of /var/www/html/sites/all/modules/civicrm/CRM/Contact/Form/Relationship.php).

This used to work correctly and seems like it may have stopped working after 5.x upgrade, though the server was also updated about the same time.

Appreciate any ideas on how to resolve this

The error claims that civi is not able to find the isCurrentEmployerNeedingToBeCleared() function in CRM/Contact/BAO/Relationship.php file.

It is not possible as this change was merged recently with the function being declared and used in the same PR https://github.com/civicrm/civicrm-core/pull/12032.

Quite possible that one of your custom extension OR custom php directory might be overriding CRM/Contact/BAO/Relationship.php file and is not updated to the latest 5.x version.

If you can check and update that file or simply disable the extension that overrides the file - the error should be fixed.


Edits not being saved for custom fields on relationships When editing a relationship with custom fields and changing a value, the value does not get saved.

When creating a new relationship however, values entered into the custom field at that point are saved.

I have tested it with all extensions disabled.

I have created a new set of custom fields on a different relationship type and this also has the problem.

We are running version  4.7.17 and this was a problem in the previous version too.

This was a bug in said version, but is now fixed.


CiviCase activities: cursor jumps in wrong order Iam adding a new activity within a case, filling out only the fields
A) subject
B) details.
Then going to change the status and clicking in, the cursor jumps back to subject.
If i change the flow, clicking in the akkordion "follow up" or others, the behaviour is as it should be, the cursor does not jump back to top.
Tried in different civicrm's 5.28.3. Anyone who can confirm that? I guess its coming with one of the latest update (at least 5.21.x or earlier).

As a workaround you can turn off popups at Administer - Customize - Display Preferences, near the bottom there's a checkbox "Enable popup forms". The cursor doesn't jump then.


Why can't I save draft in contact email? I am not using CiviMail but trying to email directly out of a contact record. The only options available are "Send Email" or "Cancel". My agency needs to be able to save a draft to edit and send at a later date. Is this possible or am I missing something? It seems that CiviMail only uses groups. I need a function to save drafts from individual contact. Any input is greatly appreciated.

Thanks!
Erin

I think you are correct that this functionality is missing. Workarounds that might serve you well include:

writing and saving the draft as a meeting note for the contact, then copy-pasting into an actual email when ready.
creating a new activity type that is called "email draft" and doing the same.
using an actual email client, such as gmail, to write and save a draft, and when ready, send, bccing civiemails so that the email is logged in the contact's activity. (this will require setup of email-to-activity if it hasn't already been configured)

I hope one of these helps!


CiviCRM and Caldera Forms I have a general question really.

I am working with a client who is using CiviCRM. He has a membership joining page, donation pages, main donation and sub donations ie. £4, £6, £10 as well as a contact form. We have had problems using the CRM forms on the website so I am looking at using contact form 7. I understand that contact form 7 has an integration with the CiviCRM.

Can I build the forms with contact form 7 which would include checkboxes, dropdowns, text fields and will all this data go to the CiviCRM, and will it still work if I make multiple forms, will they all send data to the CRM?

The Contact Form 7 integration basically takes all fields from the form and sends the data to CiviCRM. So basically you have 2 options when creating forms:

Use one of the standard CiviCRM API calls, and make sure the fields on your form are named as required by the API call
Develop an extension with your own API calls and use those (with the field names) on your form.


Access Denied on one computer, but not another using same user I am getting an access denied when looking at the report statistics in a mailing on one computer, but when I log in using another computer but the same user I can see the report just fine. Any ideas? One computer is apple and one a pc.

Are you sure the two computers access the same address? It's a common mistake to have both www.yourdomain.org and yourdomain.org (without the www) that display the same pages.

Unfortunately, connecting to one doesn't automatically connect to the other, even if they look exactly the same. It's the same with the protocol, so login on http:://yourdomain.org doesn't mean you are authenticated on https://yourdomain.org.

Check what is the main domain name and protocol, the one put into civicrm.settings.php, it must me the "official" one and it's where you have to do and login to work properly. That's probably what was done on the computer that works but you are logged to the "wrong" domain on the second one.

X+


When profile matches on email and the email that matches is not the primary, it overwrites the primary giving the same email repeated We have a profile for registering people.  It is set to match on email.  If an existing contact fills out the form but say uses their billing email address and not the one set as their primary, it matches fine.  Great, but then it overwrites the primary with what they just entered.  Now we've lost their "primary" email address and have the same email address listed twice, once as billing and once as home.

Is there some nice easy way around this?  I'm I missing something?

I suppose I could create another type and set the profile for that.  Would still end up with the same address twice but wouldn't loose the other.  Or maybe a db trigger to skip the write to the email table if the email address already exists for that user.

Ah, the tangled web we create when we allow contacts to mess with their data.

When you create a profile and add Email fields, you can choose which email address the field should represent (Home, Main, Work etc). You could provide both email address fields in the form and label them accordingly. It's not perfect, but might at least make some users more aware of which email address they are supplying.


CiviEvent book multiple event at a single checkout EDITED: We are using Eventcalender extension to display all events on one page.

For example Yoga Classes happens every week on Monday. Now for an attendee who would like to book 1st week, then 5th, 9th, 15th, 22nd and some more weeks of the year has to keep registering for each week. It could be frustrating for attendee to come back every-time & enter same details to register. We thought of creating repeating events. but that does not allow to register to select multiple events at single checkout. Is there any option where CiviEvent would act like a checkout? A good example of my idea is sagenda.com.  If not, how can I get an alternative checkout function like this? Or am I missing something in existing CiviEvent? Please suggest. Thanks

Just so you know, there's two extensions currently under development for CiviCRM, and specifically that integrate with CiviCRM's Event Cart feature, that might meet some of your needs. They're under active development, and you can check them out on CiviCRM's GitLab.

boxoffice: Provides a lighter workflow for the CiviCRM Event Cart. Designed for a ticket box office (ex: where you do not need the names of other participants).

eventpack: Provides a way to bundle events together (at a discounted price) in the CiviCRM Event Cart (and the Boxoffice extension).


Check for Matching Contacts no longer gives an option to merge I'm not sure which version this behavior changed in.  When we edit a contact, and change the information so it matches another contact and click on the Check for Matching Contacts button, we get a pop-up that says, "Similar Contact Found", but below, it no longer gives us an options to immediately merge those two contacts.  It used to have this option, very easy for us to merge with.  Instead, admins have to save, leave the screen, and go into the Contacts menu to try and find the duplicate contacts.

I have tried this on the sandbox, and it is missing there as well.  See screenshot here: https://imgur.com/m11rScH

Any way to get this back?

It looks like the merge link was taken away in a recent update when the page was updated to use ajax for the matching lookup.  For those who may be looking for a temporary work-around (until hopefully this comes back into the core product), using the URL info from @Demerit in the comments above, I looked for a way to add the Merge link back into the popup notification when a person clicks on the Find Matching Contacts button.  This can be done by creating a custom Contact.tpl template and modifying one line in the "duplicates-msg-tpl" section.

The way I did it was to override just that template section, and then re-import the main Contact.tpl file (since I don't want to have to manage merging things every time that template changes). Not sure why, but I had to use the full path for that include call. Here is the example custom Contact.tpl file (you need to first define where your custom templates go and include that in the Civi Admin system settings).  You may need to change the rgid to whatever rule id you use (it may not even be necessary to have that param in the URL at all, but I kept it there just in case).  You may also want to switch your cid and oid values, depending on which contact you want to merge into the other.  In this case, I'm assuming the one being edited should merge into the existing one that shows up on the list.

 {literal}

{/literal}
{include file="/var/www/civicrm/sites/all/modules/civicrm/templates/CRM/Contact/Form/Contact.tpl"}


How can members change their data on their own? we have CiviCRM installed in WP. We want, that members change there data on their own. Data could be: bank information, email adr, etc.
Is there a solution in place?
Thanks
Regards
Edgar

If Members are also WP users then let them log in and have access to either a CiviCRM Profile (https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/) or a Caldera Form and you should be able to set up the fields you want them to have access to via the form

If Members are NOT WP users then you can send out a Mailing with a checksum link to a Profile so they can make their changes without logging in


prompted for password too often I am trying to run civicrm in my machine and access it through LAN from other machines. So I made a change in word press general settings like below:

WordPress Address (URL)  http://myipaddress/mysite
Site Address (URL)  http://myipaddress/mysite

After this, whenver I am doing a search/report/ any function in civicrm I am being prompted for password. And after that I am directed to civicrm home page and the loop repeats. Can anyone help me out?

changed the base URL in civicrm.settings.php . now works fine .

if (!defined('CIVICRM_UF_BASEURL')) {
  define( 'CIVICRM_UF_BASEURL'      , 'http://localhost/site/');
}

is changed to

if (!defined('CIVICRM_UF_BASEURL')) {
  define( 'CIVICRM_UF_BASEURL'      , 'http://myipaddress/site');
}