Converted Drupal to WordPress: Network Error when trying to save changes

Dammit!  The views code in the database saves the userid for the query, which changed when I moved things. There's a WordPress plugin that can fix it, though I exported the database and did a search/replace to change the old user to the correct one.


Is it mandatory to link Membership to Contributions in CiviCRM

For the second part, yes - you can import the contributions Contributions > Import Contributions without linking to memberships which will then show under the Contributions tab.

Contributions are linked to memberships with MembershipPayment so when you have the membership id and contribution id you can link them with:

$result = civicrm_api3('MembershipPayment', 'create', array(
  'membership_id' => X,
  'contribution_id' => Y,
));

The challenge here is to get the right membership and contribution id's to pair up.  You could tackle this in various ways including:

1) if you don't mind a bit of coding, write your own import script to create the Contribution, find the relevant Membership then create the MembershipPayment.

2) if you prefer GUI, import your contributions via the UI, export the contributions and memberships (to get the id's), do some spreadsheet manipulation to produce a csv of contribution and membership ids, then use the API CSV Importer extension to import these as MembershipPayments


Reason for no Views Relationship from CiviCRM Contact to Event Participant

We do have D7 VBO Views like this for clients -> key is to start with a CiviCRM Participant View - so that the base table is civicrm_participant - from there you can add a Relationship to the Contact to get at the Contact fields like Last Name etc.
Note there there is a bug in the API in that after updating participant status. It will change is_test to = NULL and that removes the Participant record from the CiviCRM UI.
One solution that jackrabbithanna pointed out is to expose the is_test field as well and then specifically add 0. I've not tried that yet though!


Civicase add timeline but activities not shown

This looks like another casualty from the button UI changes. Have added https://lab.civicrm.org/dev/core/-/issues/2292. Can you try this small patch? https://github.com/civicrm/civicrm-core/pull/19356/files
The way that dropdown works is a bit weird - changing the value clicks a hidden button, and the way buttons submit their name to the form has changed, so it doesn't recognize it.


How to customise the activities tab listing

You can't realy customise the main activities tab. However there are several other options to create other tabs which show activities which do allow more customisation.

Activity Tabs extension written by me, this offers a reasonably easy way to add tab(s) with filtered lists of activities and allows you to choose which fields (inc. custom) you want displayed.
Data Processor extension this is very flexible/powerful, but a bit more of a learning curve (well worth it!)
Extended Reports extension - I've not used this but I believe it allows its reports to be embedded as tabs on a contact record.


Best approach for a Drupal based CiviCRM would be using Views which is a Drupal module, then you can build up search/displays that will daisy-chain the relationships the way you describe.


Remove the login that appears at the bottom of a registration profile

I suspect it's the Drupal login block - so to not show that on your civicrm pages - get into your blocks configuration and in the visibility settings make it such that it does not display on civicm/* (or make that less generic if you like).


How will I maintain versioning of civicrm in github?

It's really bad idea to customize CiviCRM core files when you can do thing using extensions. If you feel your customization fixes core issues than you should try to submit pull request against civicrm-core. If your changes are client specific than you can either move those files into custom php or custom template(again bad idea since its very difficult to maintain for future upgrade) or implement JS/hooks. There are many hooks available in CiviCRM where you can alter the content of website or perform additional function that is missing for example sending emails to group admin when a contact is created or change the content of Thank you page of Contribution or Membership signup or Event registration.

If you want to maintain the versioning of db then I would suggest to create extension and implement install/upgrade hook to create/update/delete custom fields or any settings in this way you can version your extension and can deploy on various instances without any hassle. There are also various migration tools available in CiviCRM which is responsible to migrate custom fields, contact types etc from one instance to another. You can also use them to copy your custom fields over staging or production instances.

https://www.drupal.org/project/civicrm_field_migrate
https://github.com/CiviCooP/org.civicoop.configitems
https://github.com/catorghans/net.trinfinity.orgis.mi.dataquality
https://github.com/xurizaemon/civicrm-configexport


Where do I submit bug for summary fields extension?

As KarinG pointed out, best way is probably to raise the issue in GitHub: https://github.com/progressivetech/net.ourpowerbase.sumfields
In general, if someone created and shared an extension it does not automatically mean they will fix all bugs you report. It might mean they come back to you and ask if you would fund the fix. Just to manage your expectations :-)....


Fetch Node data from drupal into CiviCRM

On which forms do you wish to add the fields/logic?

I feel like there are two questions here:

1) How to build an arbitrary list of options from a third-party source of data (Drupal)

2) How to set the value of one field based on the value of another fields.

For (1), arbitrary lists, you can look into hook_civicrm_fieldOptions, which can dynamically modify the option list for any field. I believe the value still needs to be valid, but if it's a select that stores an integer or a string, I think it's OK.

For (2), I have an extension called fieldconditions, but it is not end-user oriented because it requires writing custom javascript (I would be happy to improve it, if anyone is interested).

Alternatively, CMS-specific form builders (Caldera for WordPress, Webform for Drupal7) might be able to help, until formbuilder is ready (also known as afform).


What does 'Enable global server wide lock for CiviMail' do?

From the comments in CRM/Core/Lock.php:

   * @param bool $serverWideLock
   *   Should this lock be applicable across your entire mysql server.
   *   this is useful if you have multiple sites running on the same
   *   mysql server and you want to limit the number of parallel cron
   *   jobs - CRM-91XX

So basically if you are running multiple civicrm instances on one box and want to limit the number of mailing jobs happening across all instances. This was funded by NYSS and was applicable to their installation.


Is there an accepted standard for storing data as a year?

You can achieve this in Webform by hiding the day and month fields as well as deselecting the enable pop-up calendar option on the webform component.  There you can also set how far back you'd like the years to go.

However, Civi still stores the entire date.  I believe the date will be stored as Today's date, 2015 12:00 am if you select 2015 for example.


Tracking on Civimail suddenly stopped working

That looks like a tracking image (it's 1x1 px and probably transparent), so you probably don't see it or get an error message.

Once after an upgrade, I somehow ended up with a space before the opening php tag in https://yoursite.org/sites/all/modules/civicrm/extern/url.php which broke tracking (can't have output before the header('Location: ' . $url);)


Does the Civi GoCardless extension use the GoCardless API?

I am guessing that the only way civi would know about the information automatically if is the payment was set up via a civi contribution page in the first place.


mailchimp extension error, php 7.1, civi 5.10.4, drupal 7.x

patch:

index 5b82f65e..76c816dc 100644
--- a/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php
+++ b/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php
@@ -1,6 +1,6 @@
 <?php

-class CRM_Mailchimp_Permission extends CRM_Core_Permission {
+class CRM_Mailchimp_Permission {

   /**
    * Returns an array of permissions defined by this extension. Modeled off of
@@ -35,6 +35,6 @@ class CRM_Mailchimp_Permission extends CRM_Core_Permission {
         }
       });
     }
-    return parent::check($permissions);
+    return CRM_Core_Permission::check($permissions,NULL);
   }
 }


Is it possible to import "Assigned to" data for Activities?

I've used this CiviCRM Extension for just that purpose, however, it looks like it's only be released up to 4.4

Might be worth checking if there is a 4.6 version that's not been released

https://civicrm.org/extensions/api-csv-import-gui


I'm not sure if civicrm uses the same words so I'm just going to guess a bit what you're asking:
What I think you mean is if the email address is wrong or the email bounces, does it stop sending to them. Yes in general. See https://docs.civicrm.org/user/en/latest/email/maintaining-healthy-email-lists/
If you mean removing duplicates, it has features for that - see https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/
If by scrubbing you mean cleaning up the data so it's more consistent, you may need an extension. Which one depends on what your concerns are. One example is https://civicrm.org/extensions/cividesk-normalize


Clicking Membership on View Contact Throws Error won't display page

Donald, Could you help us with

From which version of CiviCRM did you upgrade to 4.7.11?
Are you using any payment processor extension like iAts, etc?
Could you check in db if you get 0 results by running the query below

SELECT ccr.payment_processor_id FROM civicrm_contribution_recur ccr
LEFT JOIN civicrm_payment_processor cpp ON cpp.id = ccr.payment_processor_id
WHERE cpp.id IS NULL
GROUP BY ccr.payment_processor_id

Could you also paste the result of below query?

SELECT cr.payment_processor_id as ppID1, cp.payment_processor as ppID2
  FROM civicrm_membership mem
INNER JOIN civicrm_membership_payment mp  ON ( mem.id = mp.membership_id )
INNER JOIN civicrm_contribution       con ON ( mp.contribution_id = con.id )
LEFT JOIN civicrm_contribution_recur cr  ON ( mem.contribution_recur_id = cr.id )
LEFT JOIN civicrm_contribution_page  cp  ON ( con.contribution_page_id  = cp.id )

Thanks
Pradeep


Problem with incoerent local currency in contribution

Looks like the decimal delimiter present at civicrm/admin/setting/localization?reset=1 is configured as a comma (,) instead of a default ..

Civi might not be handling this correctly when the record payment form is loaded. The value of the total amount defaults to 1.0 instead of considering the delimiter configured for your site, i.e, 1,0. Either this might be a bug which needs to be fixed OR you can try using the default . in the above settings and check if it fixes for you.


I just found and fixed the same problem. There are two possible fixes to this problem, only one of which is available to you immediately.  As per usual, Chris nails it.

In your civicrm.settings.php file, there's a line $civicrm_root = /path/to/civicrm.  If you have a symlink in that path, then the [civicrm.root] is miscalculated.  So the easy fix is to fix your $civicrm_root to the non-symlink path to the file.

The longer-term fix is this line:
CRM/Core/Resources.php:          'wysisygScriptLocation' => Civi::paths()->getUrl("[civicrm.root]/js/wysiwyg/crm.ckeditor.js"),

This shouldn't call civicrm.root, it should use the resource URL.  I'll try and post a bug report (and maybe even a fix!) if I find a moment - but first, like you, I need to get my mailing out :)


How should I configure multiple Drupal sites to share a CiviCRM database?

You should read about Drupal multi-site feature. That's we can use the same database and same modules if the D2 is working as an parked domain for D1 website.

I would like to share the reference link https://www.drupal.org/documentation/install/multi-site

Please check that one.


How to turn off the prompts for additional participants in event registration

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.


GDPR and CiviCRM for a small but internationally operating and serving organisation

There is no individual resource as such that holds the answers to your question. There are currently still a significant amount of unknowns surrounding GDPR. Some of your issues can be resolved technically. By hosting your systems and data in a country like Switzerland which already has a so called "adequacy decision" with the EU and the US. Swiss law by default already sets the benchmark higher for privacy. But there are a number of things you have to do as a bare minimum: Data inventory. KNOW where your data is. HOW is that data used; domestic or commercial data processing? Be able to show how you are using the data and be able proof that that IS how you are using the data. The most important thing is that you are able to show you are TRYING to comply first and foremost. Secondly have a data-breach coping mechanism in place that ensures timely reporting to the correct authority. Hope this is helpful.


So I've done something similar (I used the group a user was a part of vs just a user) with a template 'extra' file that contained javescript and a quick call to the API. Not sure if this is the ideal method but it worked to show/hide some content.

https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates

Javascript Contact API - how do I 'do something' with results


Add Donations to Event Registration Form

Simply set up an additional line item for a donation in a Price Set.

This is how I do it... the Price Set definition:

And then how the 'Optional Donation' is defined:

And a preview of this in action:

Feel free to give it a whirl on my website - and make a donation if you like it! :-)
http://www.breinton.com/book/hipp-abbate


Upgrading from 4.7.25 to 5.6.0 breaks CiviCRM

Jack,

There seems to be problem with the extensions you have installed. Try upgrading CiviCRM after disabling all the extensions. Some extension might not be compatible with latest version of CiviCRM. As a best practice we disable all the extension or plugin of CiviCRM and then perform CiviCRM upgrade. Once finished with upgrade we turn on extension or plugin one by one.

HTH

Pradeep


Unable to create or edit a contribution record

civixero extension is build to use for CiviCRM version >= 4.7 so there might be compatibility issue when installing for 4.6.25 as some function may not be present.


Wordpress profile permissions to select contact reference field

The permission you're looking for is CiviCRM: access contact reference fields. You can view the list of permissions from civicrm menu too via Administer => Users and permissions => Permissions

and then click on WordPress Access Control link displayed on the page.


How to identify if a contact id is associated with an administrator role?

I don't think you can do this in a platform-independent way since "admin role" means different things in different CMS's. What you can do that is platform-independent is check specific CiviCRM permissions, e.g. CRM_Core_Permission::check('administer CiviCRM', $contact_id)
You can leave out $contact_id to check for the currently logged-in user.


With most extensions, the place to report bugs is on Github. In this case you want to go to https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport and click on the "Issues" tab at the top.


Viewing a Personal Campaign Page before approval

You should be able to view the page before approving it. (I just tried this on CiviCRM 4.7.24 by disabling a page and then viewing it. It worked for me.)

My guess is that your user does not have the necessary permissions to view unapproved PCPs. From looking here, it appears that you need the "Administer CiviCRM" permission. If you're using Drupal, you can grant this permission by visiting /admin/people/permissions. Steps vary on other CMS platforms.


How to display sort name with prefix/suffix in webform select list

Display Name and Sort Name formats are both configurable at Administer > Customize Data and Screens > Display Preferences.  The default format for Display Name includes the suffix.

On a test webform with an existing contact and autocomplete showing the Display Name, the suffix is included.


Input in Memo/Rich Text Editor custom field results in error "There is a validation error with your HTML input"

The error you're getting is from the IDS (Intrusion Detection System).  CiviCRM has a third-party IDS package that's bolted on, and it can certainly be overzealous.  Its purpose is to prevent people from, e.g., submitting spam URLs into public forms.

However, assuming that you're logged in as an authenticated user and having this problem, the easiest solution is to grant yourself the "CiviCRM: skip IDS check" permission.  You haven't specified your CMS, so I can't tell you where your permissions are, but grant your role that permission and you should see the error disappear.


Rereading - unsure if my other answer helps at all but will leave it for now. Price Sets may be more what you are after. I set one up here which you can see in action here

(note the above links will only be good till the site refreshes- but make a Price Set using "text/numeric", "Price = 1.00" and do not show 'Display Amount' - that will give you 3 fields where a person can enter the amount they want to give to each of the 3 parts - then set your Contribution Page to use the Price Set constructed above)

You can't use Campaigns on a per line item afaik so not sure that other suggestion helps but I think for reporting you can get what you need from  eileen@fuzion's Extended Report https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport which offers "Price Set Line Items" reports. HTH


The easiest way would probably be to override this value in civicrm.settings.php.
There should be a commented out line something like:

// $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = '....';

You can uncomment this line by removing the leading '//' and edit the url.
Make a backup of civicrm.settings.php first.

If you wanted to make a change in the database you can do this by editing the value of civicrm_setting for the row with name "userFrameworkResourceURL".

I'd recommend backing up the database or at least that table first.

If you have logging enabled via (Admin -> System Settings ->  Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.) )

You could find the previous value for this in the log_civicrm_setting table.


Listing mode in profile enables the user to do a follow up search for other records which also have that same field value.

For example, you might set City to Public Pages and Listings. After the user conducts a search and views the details for a record they can search on the city value and look for other field values present in the record.

FWIW, If you don't want to navigate the user to listing page on hitting the cancel button, you can add a custom URL for this button in profile settings. It also provides a flexibility to simply remove the cancel button from profile.

The above config is present in Advanced Settings pane in the profile settings form.


How to set up basic CiviCRM access for a user in WordPress?

See the Access Control (Permissions) in WordPress section of the documentation.  To access the backend you need the 'CiviCRM: access CiviCRM backend and API' permission.
You can create additional roles with other WP plugins.


Integrating iATS forms through CiviCRM (Drupal) onto website Wordpress

You can embed the Drupal site's form (any form, whether from Civi or Drupal) into your wordpress site using an iframe.

Here's an example of exactly that:
https://patientscanada.ca/donate/

There are three steps to make this work:

Create an alternative theme on the Drupal site that is suitable for embedding in an iframe. There's a Drupal theme here: https://www.drupal.org/project/entity_iframe_theme that will take you most of the way. I can share what I've used if you want.
Use theme_key or similar module to display the appropriate path using that theme.
Configure your settings.php to allow the wp site to iframe your drupal pages (by default, Drupal will not allow itself to be used in an iframe, as a security precaution).


Search for people who have NOT registered for an event

First, create a group of people who have registered.  Next, go to Search menu > Custom Searches, and select Include/Exclude by Group/Tag. Include the group of people who should have registered, exclude those who have already registered, and there's your list.

I believe you can also do a similar include/exclude search using Search Builder in Civi 4.6, but this was broken in earlier versions so I haven't tried.


Restrict location types available to specific contact subtype

You can not restrict location types to specific contact types in core CiviCRM.
Obviously you can develop and extension that does this.


I've taken a look in the code, and it looks like CiviVisualise/Civisualise/Civivisualise the missing CiviCRM visualisation extension (:P :P :P) uses direct SQL commands, meaning that certain CRM features such as ACL checks would be bypassed.

This would need changing at a code level, I'm sure Xavier would love to hear from you.

JohnFF


Three self-canceling financial transactions for a single recurring contribution?

Likely due to this issue.
Looks like there is a PR to correct this with a milestone of 5.4.0, so I guess this problem persists in the current 5.2.1 release.


How do I import an activity with multiple target contacts?

I've tried various ways of importing complex entities. At the end of the day, the best tip I have to offer you is to write a small program to create the entities via the api.

You can either run it on the server (php) or run it over REST (php or my current favorite, node.js)

I found it much easier to deal with edge cases, errors, weird matching logic...

If you are on drupal, check Eileen work to integrate with the migration module

If you are prepared to invest a significant amount of time learning kettle, amnesty spain has shared a module to make it easier to pull or push data from civicrm.


CiviCRM Administration areas unreachable even by direct link

Feel like an idiot now:

Used an old trick by visiting /civicrm/menu/rebuild?reset=1

Appears fixed. No browser errors!


Where / how is the {domain} token formatted?

I believe there are several domain tokens.  domain.Name, domain.Address, domain.email, domain.phone.

These are set on the Administer => Communications =>
Organization Address and Contact Info page.

The only one that I think is required is domain.address.  This has line breaks between the street address and the city, etc.  You can blank out address, the city and remove the zip but getting rid of the country and state may not be possible. (Well if you are in a country without states you can get rid of state)

The {domain.address} is a smarty.  You can do all sorts of things with smarties.  You might be able use regex to replace the line breaks or to remove parts of the address you don't want.  http://www.smarty.net/


How can i combine new person and a new contribution on the same page?

Generally you can go to the Contribution page, either incognito, or if logged in by using the "or want to do this for a different person" option at the top of the page, which takes you to the same url with cid=0 inserted (or just add this to your menu for quick access), then fill in the form same as 'they' might have.


Where is the civicrm.settings.php file on Wordpress 4.95 with CiviCRM 5.1.x

The /wp-content/plugins/civicrm/civicrm path is for CiviCRM versions older than 4.7.  For a new install you should find it under /wp-content/uploads/civicrm


These styles change Radio buttons and checkboxes in Civi Price Sets into colored toggle buttons. Make this a separate file from your primary civi-custom.css so that these styles can be applied to individual price sets, rather than globally: i.e. for donation pages, but not for event registrations.

Add the following link tag <link rel="stylesheet" type="text/css" href="[path-to-civi-custom-css-directory]/civi-button-inputs.css">
 to the source text anywhere on the page, such as

the Contribution Page description (to deploy these styles only on that one Contribution Page) or
the Price Set (for all pages that use that price set). The Price Set Settings Pre-help is a sensible location for this, though if you don't have visible text in the pre-help section, there will be an empty div styled as your .help class). An alternate location in the Price Set is the pre-help for any field, which is less likely to have a visible empty div.

/* lines up top of all new buttons */
#priceset.crm-section  div.content {
    padding-top: 0px;}

/* prevents various sections from overlapping or wrapping weirdly if the description includes
images or divs, not a bad candidate for basic Civi css */
#crm-container.crm-public .crm-section, .crm-section {
    display: flow-root;}

/* Styling the buttons */
.price-set-option-content input[type="radio"],
.price-set-option-content input[type="radio"] + label,
.price-set-option-content input[type="checkbox"],
.price-set-option-content input[type="checkbox"] + label {
    float:left;
    width:180px;
    margin:4px;
    background-color:#e9e1ef;
    border-radius:4px;
    border:1px solid #D0D0D0;
    overflow:auto;
    padding:13px 6px;}

/* Styling the labels */
.price-set-option-content label,
.price-set-option-content label span,
.price-set-option-content input[type="checkbox"] + label {
    text-align:center;
    font-size: 32px;
    display:block;}

/* make Total Amount same size as button text */
#crm-container.crm-public .calc-value {
    font-size: 32px;}

/* Alternate text styles for the amounts, if both labels and amounts are shown for a field
(don't want everything to be large) */
.price-set-option-content input[type="radio"] + label .crm-price-amount-amount {
    font-size: 16px;}

/* puts the normal input controls out of sight */
.price-set-option-content input[type="radio"],
.price-set-option-content input[type="checkbox"],
span.crm-price-amount-label-separator {
    position:fixed;
    top:-50px;}

/* Style for hovered item */
.price-set-option-content input[type="radio"]:hover + label,
.price-set-option-content input[type="radio"]:hover + label .crm-price-amount-amount,
.price-set-option-content input[type="checkbox"]:hover + label {
    background-color:#eee6f4;}

/* Style for selected item */
.price-set-option-content input[type="radio"]:checked + label,
.price-set-option-content input[type="radio"]:checked + label .crm-price-amount-amount,
.price-set-option-content input[type="checkbox"]:checked + label {
    background-color:#663399;
    color:#fff !important;}


What message triggers can be found in the dedupe process?

Is it this wordpress feature?
https://wordpress.stackexchange.com/questions/202783/fwd-website-name-notice-of-email-change

https://build.trac.wordpress.org/browser/tags/5.3/wp-includes/user.php#L2056

Short answer to prevent it: add_filter( 'send_email_change_email', '__return_false' );

Any time a contact record is updated, civi will attempt to update the corresponding user account in the CMS for name and email. So it would only be for contacts that have an associated user account.

You can also turn this sync off at Administer - System Settings - CMS Database Integration - Sync CMS Email, but then your users and contact records can get out of sync.


In order to use legal_name against your message template the best way would be enabling CIVICRM_MAIL_SMARTY to 1 in civicrm_setting.php
By doing this you can access {contact.legal_name} in your message template
I did made a test against Version 4.7.15 which worked. so please give a try
Reference: https://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+in+mail+templates
I guess this helps!!!


Enabling CiviVolunteer 2.0 Volunteer Opportunity Listing

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

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

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

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

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


I'm afraid this is a known bug (at least by me), which I reported a while ago at https://issues.civicrm.org/jira/browse/CRM-14860. I think it is related to the CKEditor version, and to the CKEditor upstream bug http://dev.ckeditor.com/ticket/10604.


The problem was caused by installing an old version of Mosaico. I installed the orginal extension version and not the latest one. I  uninstalled the old extension and installed the proper one.


Trying to migrate data from Drupal 7 to new install on Drupal 9

This sounds a bit dicey, but fortunately I think there's a simpler solution.
My answer on migrating CiviCRM to WordPress is generic for moving CiviCRM to ANY new CMS - even the same CMS on a different site.
I would fix the civicrm_menu issue separately.  You should be able to restore a copy from a fresh install, then disable/re-enable any extension, which will re-add any "managed entity" entries - in practical terms, those added by extensions.


How can I show multiple repeating custom field values in a single cell on a report?

I've investigated this myself, but haven't had to do it yet.  Broadly, you would use the GROUP_CONCAT MySQL function.  You can see examples of this being used on core contribution reports for displaying multiple credit card types for contributions paid in multiple installments with different cards.

I also have a fork of the salutations extension that provides a UI for exporting multiple-record custom groups as part of an export.  Instead of putting all the data in a single cell, I break the data out into multiple columns, but all on the same row.

You could also use the SQL Tasks extension to generate the report using pure SQL, if you need a quicker solution and can trade off some configurability.


Security Vulnerability in Dashboard CiviCRM 4.6 for Drupal 7

You should look at the comment by cividesk, and make sure that if you uncheck the setting on Evan's relationship record to be able to edit the spouse contact, that Evan can't edit the spouse record.  If that works as expected then:

Discussed this issue with CiviCRM Security Team.  The consensus is that this is not a bug, more like a feature, or one way to look at it is that CiviCRM is just flexible/configurable in this manner. If you don't want to have the contact be able to their spouse from that form you either need to not enable the setting on the contact's relationship record to allow editing, or possibly use ACLs(Access Control Lists) or some custom code in an extension to modify this behavior.

Also as a side note, the permissions "edit my contact" and "view my contact" when enabled for a Drupal user role can cause performance issues in installations with large numbers of contacts.


Why can't I see different financial types in contribution reports

You're looking for some advanced reporting: install this extension: fuzion extended reports -> and then look for report template: Extended Report - Price Set Line Items.


Escaping quotes in ckeditor breaks smarty-syntax

Adding config.entities = false; to the ckeditor-config packages/ckeditor/config.js prevent ckeditor from escaping special characters.

This avoids the issue with smarty-syntax. But I am not sure if this doesn't produce other problems by not escaping anything...
If anybody has experiences with that please post them here.

EDIT: In CiviCRM 4.7 ckeditor will be configureable. So it probably won't be necessary to patch packages/ckeditor/config.js anymore.


Difference between 'active' and 'disabled'

The "Disable" and "Enable" menu items toggle the option's is_active field. The "Active?" checkbox does the same.


"Failed to locate template" error when building development environment

I'm seeing your path has three civicrms in it - that seems like it's not correct, normally there are two with Wordpress.

Second - if you're using Ubuntu, there's really no need for XAMPP.  You can just install your LAMP stack using apt-get or synaptic.  This is much closer to the standard setup, and you're likely to find better assistance that way!


Have you tried Reports > Contact Reports > Relationships? The contact IDs of both Contacts A and B are concatenated with the name in parenthesis, and you also have the option to add the contact ID for Contact A as a column as well as other fields you might need.

Hope this helps,
Tamar


How do I fix class not found in custom extension after upgrade?

Fixed by changing all the classes to be in the CRM namespace. e.g.

class CJT_Page_EmrJournaltracking_JournalControls

Becomes

class CRM_Page_EmrJournaltracking_JournalControls

Disable and re-enable the extension to load the changes.


Which url parameters did you try? cid? contact_id? etc..
Another solution which is working is using Drupal CiviCRM Webforms and link to a prefilled webform from within your view.


How do I write the _spec function for my custom API?

As per https://github.com/civicrm/civicrm-core/blob/master/api/v3/Dashboard.php#L64 you can set default values, You can also specify the type and even limit to specific options see https://github.com/civicrm/civicrm-core/blob/master/api/v3/Contribution.php#L552 also https://github.com/civicrm/civicrm-core/blob/master/api/v3/Contribution.php#L723. Also as per https://github.com/civicrm/civicrm-core/blob/master/api/v3/Contribution.php#L360 you can specify aliases or alternate field names for legacy or similar handling


How do I search for the exact string match using CiviCRM API

The Contact API is non-standard in APIv3; a major goal of APIv4 is to remove these quirks.  The behavior you're seeing on Display Name is non-standard.  It also seems that a lot of the other operators (e.g. "LIKE") don't work on Display Name.

If you can, you can search on First Name and/or Last Name, neither of which display the problem described here.


Its just an example used to set the url to avoid validation error. The stripe extensions uses correct api version and url while handshaking or communicating with Stripe gateway.


Get Temporary Files Directory value from my extension

You can get any settings values from the API and, you can see how, exploring the API through http://yoursite.site/civicrm/api URL.

To answer your question you can follow this screenshot:


CiviCRM_API3_Exception: "DB Error: no such table"

@trevorforrest I would check that your database has all the same tables as the old server, the error suggests you may have missed a table or something when transferring from the old server to the new server


In the reports you can use the Filters tab to select on only the members who are in the group you are interested in. You can create a new report that has the filter so you can use this for the automatic mailing. This will send the whole list if group members (you can cut down the fields. It will have the number of group members at the bottom of the pdf, but will also list all the members (which you may not want).


You can find where extensions are located by looking under

Administer>System Settings>Directories

The entry most likely has path variable such as [civicrm.files]. To find this location click on the "?" next to the following line in the info box on the top of the screen.

"You may configure these upload directories using absolute paths or path variables."

If you have installed Version 4.7 of CiviCRM the path to the extension folder is most likely: [wordpress folder]/wp-content/uploads/civicrm/ext


That's a good idea. Here is a refinement of your patch that works it into core using localStorage, which is not CMS dependent.

https://github.com/civicrm/civicrm-core/pull/8485


Online Registration not able to be enabled

@petednz-fuzion pointed me in the right direction with this link:

cannot select profile for online event registration after upgrading civi on Joomla

So it turns out it was the theme after all. I am using Ambition from ThemeHorse and when I tried switching the theme to see if it was a theme problem, I should've picked a default theme to test; I did not.

The offending chunk of code was somewhere in here, in functions.php:

function ambition_load_files()

I basically took the same approach in the link from @petednz-fuzion to prevent loading the functions.php file. The problem is that if the theme's functions.php isn't loaded on front-end pages where CiviCRM data is displayed (like on an event page) then the page doesn't load. So I prevented the functions.php file from loading only on backend pages like this:

function ambition_load_files()
{

    /**
     * ambition_add_files hook
     *
     * Adding other addtional files if needed.
     */
    do_action('ambition_add_files');

    /** Load functions */
    require_once (AMBITION_FUNCTIONS_DIR . '/i18n.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/custom-header.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/featured-content.php');
    require_once (AMBITION_ADMIN_DIR . '/ambition-metaboxes.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/custom-style.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/customizer.php');

    /** Load Footer Info */
    require_once (AMBITION_SHORTCODES_DIR . '/ambition-footer-info.php');

    /** Load Structure */
    require_once (AMBITION_STRUCTURE_DIR . '/header-extensions.php');
    require_once (AMBITION_STRUCTURE_DIR . '/footer-extensions.php');
    require_once (AMBITION_STRUCTURE_DIR . '/content-extensions.php');

    /** Load Widgets and Widgetized Area */
    require_once (AMBITION_WIDGETS_DIR . '/ambition-widgets.php');

    // ==========================================================================
    // We don't load functions.php if we're in the backend or else CiviCRM breaks
    $full_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    $uri = (parse_url($full_url, PHP_URL_PATH));
    if($uri == '/wp-admin/admin.php') {
        ; // don't include
    } else {
        require_once (AMBITION_FUNCTIONS_DIR . '/functions.php');
    }
    // ==========================================================================

}

Now it's working like a charm.

Thanks everyone for your help!


How to know if Smarty is really activated on WordPress?

easy answer indeed :
send an e-mail with this code

{$smarty.now|date_format}

{$smarty.version}

You should get something like:

Jan 14, 2021
2.6.31


Create Drupal user for contact joining as Organisation

In the database table that links CMS users to CiviCRM contacts, we store a few things:

The CMS user ID (in Drupal's case, the "uid")
The CiviCRM contact ID
The email address that both records have in common.

Crucially - all three must be unique!  For instance, you can't have a single CiviCRM contact linked to two Drupal user accounts.

The error you're seeing says, "Hey, Civi tried to create a link between a Drupal user and a Civi contact, but we found that another record in this table already uses that same email address."

Based on that - I'd guess that something about your setup is causing Drupal to try to create two user accounts at once - one connected to the individual and one for the organization.

Without knowing more about your setup, I can't tell you the exact steps to fix it, but hopefully this will make the solution clear to you.

One last thing: In CiviCRM, there's a philosophy of not creating "organization" accounts.  "Organizations" can't log into websites; individuals can.  So if what you're trying to do (it's not 100% clear from the question) is create two logins, consider instead using the relationship permissions to allow the individual to edit the organization instead.


Restricting Access to Contribution Module

Yes, Its possible to give access to Contribution component to specific roles. You can set the permission to access different components at

For Drupal:

Navigate to CiviCRM >> Users and Permissions >> Permissions(Access Control) and click on **Drupal Access Control**.

For Wordpress:

Navigate to CiviCRM >> Users and Permissions >> Permissions(Access Control) and click on **Wordpress Access Control**.

HTH

Pradeep


WordPress allows you to specify a redirect in the URL.  So if you make this their "Log In" link:

https://example.org/wp-login.php?redirect_to=https%3A%2F%2Ftest.9to5.org%2Fwp-admin%2Fadmin.php%3Fpage%3DCiviCRM&reauth=1

They'll drop into the CiviCRM dashboard upon successful login.  Replace example.org with your own URL, of course.


Should work fine. Best practice is definitely two databases.

IMHO it is easier to understand where data is stored and deal with update and rolling back changes when the databases are separate, but in some hosting environments you are forced to use a single database for both the Drupal and CiviCRM tables.

Using separate databases requires you to go to CiviCRM > Administer > System Settings > CMS Integration and copy the array generated to your Drupal settings.php file.


Why is 4.7.7 CiviMail failing trying to insert a row into civicrm_mailing_recipient?

See issue CRM-18543 and PR 8355.

CRM-18345 changed the behaviour of the foreign keys on civicrm_mailing_recipient when deleting civicrm_email or civicrm_phone. The email_id and phone_id columns are made NULL rather than the row being cascade deleted.

This means there can exist rows in civicrm_mailing_recipient where both these fields are NULL.

So the Mailing Job software needs to handle rows where BOTH email_id and phone_id are NULL.

I've supplied a patch that handles this case by ignoring such rows.


Dynamically Change QuickForm on EntityRef selection

This can be done by adding javascript directly to the TPL file associated with the QuickForm.

In the FORM php file The following are the elements that I add for selecting:

        $this->addEntityRef('field_dc_group', ts('Select DC for the Leader'), array(
        'entity' => 'group',
        'api' => array(
            'params' => array(
                //'tag' => GetCiviSetting('org.namelessnetwork.smallgrouptracking', 'small_group_leader_tag'), // filters results to just those with Small Group Leader Tag
                'parents' => array('IN' => array(34)), // this will get the DC we want to select
            )),
        'select' => array(minimumInputLength => 0),// auto populate results),
        'id' => 'field_dc_group'),
            true // require
    );

    $this->addEntityRef('field_sg_group', ts('Select Small Group Leader'),array(
        'entity' => 'group',
        'id' => 'field_sg_group',
        'select' => array(minimumInputLength => 0),
        ),
            true
    );`

At the bottom of the FORM tpl file I added the following javascript code (inside {literal} tag):

<script type="text/javascript">
    CRM.$(function ($) {

      console.log($("#field_dc_group").val);

      $("#field_dc_group").change(function() {
        $('#field_sg_leader').select2('data', {id: null, text: null}); // clear currently selected group
          console.log("DC Group ID: " + $("#field_dc_group").val());
        $('[name=field_sg_group]').crmEntityRef({
            entity: 'group',
            api: {params: {parents: $("#field_dc_group").val()}},
            create: true
        });

      });
      $( document ).ready(function() {
        $('#field_sg_group').hide();
      });
  });
</script>

Using this setup I am able to update the select2 fields dynamically as well as get the value in the FORM postProcess.


Civicontribution 'Failed to update contribution in database'

I feel its related to to CRM-21721. Can you please try after apply the patch?


In Advanced Search you can use the Change Log to enter the Admin's name in the  'added by' section and set it to 'Added'.

You have to put in the contact's "Sort Name" in the box for this to work (as of 5.7, at least) [citing Alan Dixon's comment from below].

Then you should be able to make a Smart Group from this.


No cron runs have been recorded (CiviCRM 4.7.25 on Wordpress 4.8?)

From your second image, I see that you have not yet set up cron for CiviCRM. The first entry in your crontab executes the Wordpress job. A second entry is needed to execute the CiviCRM job.

Here are the instructions for doing so: https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#choosing-a-method


How to disable sending an email after a recurring contribution?

Just a thought, but recurring givers may want to receive both the initial confirmation that their contribution was processed, and the monthly/quarterly/etc. notifications of additional payments being drawn.  A better option might be to remove the links to cancel/modify the recurring information from the relevant Smarty receipt templates.  That way they have their information but they're also not confused.


WYSIWYG editor not present with WordPress

Well, finally managed to get CKEditor going, but this is far from an ideal solutuion. The problem is that an extra component is being put into the URL for the editor. My main site that works is mysite.org and the problem is with test.mysite.org. This has all its files in a subdirectory of the main site and this confuses things. Looking up [civicrm.root] in the Resource URL admin page shows an extra "/test". So work round for now is to edit CRM/Core/Resource.php to replace "[civicrm.root]" with "wp-content/plugins/civicrm/civicrm/" in the call to the editor. A bit of trail and error and a bit odd as that isn't logical from what I epxected [civicrm.root] to produce.

I would love a better solution.

Another problem How can I fix [civicrm.root] variable on an addon domain? was useful in confirming that [civicrm.root] is the problem.


What is the better CiviCRM Administration theme on Drupal to apply shoreditch extension?

I found that Shoreditch had the least issues using the Seven Administration theme but I prefer Adminimal for my drupal side. My settings are as follows:

Administration Theme - Adminimal (also used for editing and creating content)
CiviCRM Administration Theme - Seven
CiviCRM Public Theme - Our main theme


Can you pull the emails collected through a "form" and dump them into a Civi CRM group?

Welcome to SE!  There are several ways to add email addresses to a mailing list. See this section in the User Guide.
What CMS are you using?  On Drupal, you can use webforms.  On WordPress you can use Caldera Forms or Contact Form 7
The GDPR extension also provides a page for people to choose which groups they want to belong to.


When did IIF amount formats change and how can I get it back to old format?

There's been some changes to support php 7.4 which doesn't have money_format() and also some work towards locales. Most likely that's the cause. I'd open a lab ticket.
I'd guess this line needs to be changed to match the other changes that have happened:
https://github.com/civicrm/civicrm-core/blob/33307b5a0da280c63ed0d8fa1f8a3e899a217ad0/CRM/Financial/BAO/ExportFormat/IIF.php#L354
Like this example: https://github.com/civicrm/civicrm-core/pull/19602/files


How do I eliminate the "civi Dashboard" tab

May be turning off 'CiviCRM: access Contact Dashboard' permission for user role should help


Be sure to update to the latest version of the stripe extension, quite a few things changed with SCA...

But for what it's worth, works fairly reliably for us

As for your question:

Paypal is SCA compliant (mostly because everything happens on their website, so they manage the confirmation step).

... but if you aren't keen on stripe, you might like paypal even less ;)

Good luck


CiviCRM Wordpress Migration: Stumped by the Database

There is some documentation here that should help: https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/

Are you copying the Wordpress database as well?

You are trying to switch servers and upgrade at the same time.  I would strongly suggest you do that in multiple stages: first move to the new server using the same versions of Wordpress and CiviCRM - make sure that is working correctly, and then upgrade.

Switching to a new server involves changes with URL's, directories, passwords etc so get that set of issues resolved first.  That is often more tricky than upgrading.

You are also going from 4.4 to 4.7 which is a big leap. Opinions vary as to the best way of doing that: a single upgrade should work, but you may be better to upgrade to the last 4.5, take a backup, upgrade to the latest 4.6, take a backup then go to 4.7. It is extra steps but may save you time in the end if things go wrong.

To your issues with passwords: to dump the databases from the old server, you need the password for the old server.  When you load it to the new server, you need the new password.  civicrm.settings.php needs to have the new passwords but the changes you need to make depend on which option you follow in the guide for copying the codebase (Step 4).

If that looks too daunting there are plenty of people at https://civicrm.org/partners-contributors who would help.  (Yes, I'm one of them!)


Request for help getting Stripe Payment Processor working in CiviCRM/Wordpress

Soooo....

I found the problem. My API key had managed to get spaces in it, presumably when I copied it from the Stripe interface. I didn't see the spaces because the text is obfuscated like a password.

The fact it had spaces was causing a Javascript error. Which didn't come up ANYWHERE in the interface, until I had the Chrome developer tools open. And I suddenly noticed the error on the console.

Ultimately, it would be really helpful if such errors were reported to the user. Possibly only when CiviCRM debug mode is on.

But not displaying those errors meant I wasted a whole bunch of time trying to track the problem down... :-(

Cheers,
Norman


I recommend you engage a professional to help you resolve the issue you experienced with 4.6.x, because then you'll have the bug fixed AND the security fixes which 4.5.x lacks.


the path suggests a problem which i can't suggest the fix for, but if it helps I would expect to have the civicrm module at

/sites/all/modules/civicrm

which it looks like you have but the settings file would be at

/sites/default

not at

sites/all/modules/civicrm/../../../default/civicrm.settings.php


Yep - you can use CiviCRM Discount extensions for that; however - for registration fees -> you would need to use CiviEvent. Discounts don't work on Contributions/Donations;


I was able to add a custom field to contacts and upload a signature file to relevant users and then use that generated url. This work around isn't ideal as it means tying the image to a custom field that may not be relevant and a relative location hex link that looks roughly like this:
mysite.civicrm.org/civicrm/file?reset=1&id=2&eid=28&fcs=54ef7e8c1d8fc5b70133338bb1872353e
but we do what works. I would appreciate a better solution if anyone has one.


possible to create Joomla user that is not automatically activated?

If you want this to apply for all the registrations you can do it the following way

Create a new user group and assign public as parent

and then add new users to the above group upon registration

afterwards your admin can go and move the user from public group to a registered group.

I haven't tested this but it should work


HTTP Error 500 during search request - CiviCRM 5.1.1

This is a known issue with CiviCRM 5.1.1 that was patched in 5.1.2.   The details of the issue are here: https://github.com/civicrm/civicrm-core/blob/5.1/release-notes/5.1.2.md#synopsis

Download the new version from https://civicrm.org/download and update your site.


Nicky welcome to CiviCRM SE. Your requirement seems to be very simple and straight forward and can achieved using CiviCRM without any writing any custom code(Can say less than a day for someone who is well versed with CiviCRM or a week or more for a newbie).
You can contact experts based on your country you living or the organization is setup for cost. Or if you want to do it by your self there are ample of tutorials available online which I believe is sufficient for your requirement.
https://docs.civicrm.org/
https://civicrm.org/videos
https://www.youtube.com/watch?v=XxexhDSzSME
https://www.youtube.com/watch?v=d40gJqV7qp0
https://www.youtube.com/watch?v=rEtclUjxBwA
Good resource for learning civicrm and drupal
CiviCRM training courses for beginners


Scheduled reminders working for some but not all

I believe this is a bug and I have submitted an issue: https://issues.civicrm.org/jira/browse/CRM-17880.

Basically, if there is a previous entry in the civicrm_action_log (like from last year) with the same action_schedule_id (same reminder) no new reminder is sent.


Call to undefined function civicrm_initialize() in sites/all/modules/contrib/civicrm_entity/civicrm_entity.module:488

I'll guess that you've got a server with insufficient php or mysql configuration, and that in the process of your upgrade, civicrm was disabled for one reason or another.
You can probably just use sql to re-enable it with something like:
update system set status = 1 where name = 'civicrm'

And then use drush to clear all your caches.
The origin of your issue could be one of these settings in php:
post_max_size
max_input_vars
or the mysql configuration of
max_allowed_packet


Error in CRM_Contact_Form_Relationship->setEmploymentRelationship() when saving an edited relationship

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.


Recording/ tracking time spent on Events

I would recommend you to create custom field associated along with participant record - where you can also specify the Event type

Once you have created the custom field as per your requirement then try to create a new profile for the participant custom fields

Then you can add the created profile against Event

Also while creating the custom field make it searchable so you can view the column in the report

I guess this helps !!!


Is it possible to view map of contacts from front end of the website in Joomla?

Yes, this is possible.

Have a look at "How to create member listings/directories/maps" on my post on profiles: https://aghstrategies.com/content/civicrm-profiles-beyond-contributions-registrations-part-1


Tokens for Custom Field Set with Multiple Records

You will need to create a custom token for this. Hook_civicrm_tokens is where you assign names to your tokens, and hook_civicrm_tokenValues is where you define the business logic. You will use the API to retrieve the custom field values for each contact, and loop through those values to build your HTML table. Below is an example of the basic API call, for contact 465 to return all the entries for Custom Field 12. Using CustomValue API is a bit different from the others as you'll see from the return.fieldname => 1 bit:

$result = civicrm_api3('CustomValue', 'get', array(
  'sequential' => 1,
  'entity_id' => 465,
  'entity_type' => "Contact",
  'return.custom_12' => 1,
));

This is a sample of the result:

{
    "is_error": 0,
    "version": 3,
    "count": 1,
    "id": 12,
    "values": [
        {
            "entity_id": "465",
            "latest": "Hope",
            "id": "12",
            "1": "Life",
            "2": "Hope"
        }
    ]
}


How to handle irrelevant employers we don't really want as separate contacts?

One of the distinct advantages of CiviCRM is that nobody is limiting your number of contacts.  Although there is admittedly a bit of overhead in maintaining organizations--mainly in merging different wordings and abbreviations of the same place--this is less trouble than you'd go through to prevent these contacts from being created.

Like the proverbial tree falling in the forest, a contact in your database doesn't make a sound if nobody's searching for it.  Mark your important contacts in ways that you'll find them, but a contact that's just in there as an employer won't clutter up your work unless you're making grossly over-broad queries.

(Besides, who knows if they'll end up as the employer of other contacts?  You might consider a workplace giving program.)

Most importantly, don't let the mere existence of a contact in your database signify anything to you.  Segment your data based upon location, activity, opt-ins to lists, and so forth.  If a contact is exclusively an employer of another contact, with no further information, they'll never have any of this other data--the information that you should really be basing your communications and analysis on.

In short, don't fight this core feature of CiviCRM.  It's innocuous, and it would be confusing and/or expensive to work around.


CiviDiscount is smart ... and will only display the membership option if you have created at least one membership type.

So...

Create your membership (Administer -> CiviMember -> Membership Types)
Create your discount

Note that your discounts can apply to more than one membership!


You cannot take any action on a report other than:

add to group
export as CSV
print

If you want to take action on contacts, you would do so by

search (find contacts, find contributions, etc)
use the 'actions' menu, choose 'delete'


CiviCRM does not have any mechanism which would allow you to make changes locally, offline, and sync later to the master database; what you envision is not currently possible.

A workaround might be to record the updates into a CSV file, then import the CSV file once online.

Theoretically, I suppose one could develop an HTML5 app that stores some subset of database records in browser storage, allows them to be updated, and reads the CiviCRM log or otherwise determines how to reconcile changes made to the live record since the last sync. Even if we hand-wave things like authentication, however, it sounds like a lot of work.


Enabling extensions - directory not found

You need an absolute path from the server's root (/), and I doubt that there's a directory /public_html in your setup.  More common situations are:

/var/www/public_html
/srv/www/yoursite/public_html
/home/someuser/public_html

or something similar.

You can tell by looking in your civicrm.settings.php file that's in wp-content/plugins/civicrm and scrolling down to the file paths.  One of them will be to the templates_c folder, which should normally be in wp-content/plugins/files/civicrm.  That path will be all the way to the root of your server, so you can just copy that and replace templates_c with custom_ext.

Of course, you could also look at the Temporary Files and Custom Files fields in your Directories admin page.  Under normal circumstances, those should also be pointing to sibling folders of your custom_ext folder.

While you're at it, make sure you set the Extension Resource URL under Administer - System Settings - Resource URLs.  You can probably use the Image Upload URL as an example, replacing persist/contribute with custom_ext.

Now, why CiviCRM doesn't just create the extensions folder and record its location when installing is totally beyond me.


Please check this related question Unknown mailing status on few mailings recipients to check if it fits to your case.

What version of civicrm do you use?


Error installing CiviCRM on GoDaddy-Hosted Wordpress Website

The answer is "yes", and "no".

I would strongly discourage using GoDaddy shared hosting (or almost any shared hosting) when running CiviCRM for any non-trivial use.  It's going to be slooow and possibly non-functional (as in your case).


How can I add PHP as content with HTML editor?

I believe its not possible to add php code in CiviCRM text area or ckeditor fields. I guess for security reasons it doesn't allow you to add any code snippets. Alternate solution is to use hook to alter the content of the field by using tokens.


Civicrm 4.7.20 Register event participant - pay by creditcard

From a Contact's summary page -> hit the Events tab

-> then hit the Submit Credit Card Event Registration button - and select an Event. If it's a paid event and you've got a Payment Processor setup/selected that handles Credit Cards - then the Credit Card fields will appear:


Can't find my extension option under administer>System settings

The extensions need code files that are not in your database, but your imported database will have a table called civicrm_extension with a list of the installed extensions.

So it will expect every extension in that table to be present (code files) in the correct spot. Obviously that is not the case. You need to either re-install these extensions OR also copy the extension directory from your source installation. Does that make sense?


Need help with export.php (CiviCRM 4.6 & Drupal 7)

There are a few things that can help you out:

Most importantly, the API Explorer (Support menu » Developer » API Explorer).  It will build your drush command for you through a GUI.
You can see there that adding an option with "limit=0" will return all records.
There's documentation built into the API explorer, but there's also API documentation in the Developer's Guide.
One major caveat!  drush and export.php don't really handle JSON inputs well - which you need to pass options.  Instead, use cv.
cv is like drush, but for CiviCRM.  This can take arguments similar to export.php but can also get JSON as an input, for instance:

 echo '{"options": {"limit":0}, "first_name": "Juliann"}' | cv api Contact.get --in=json --out=csv

To use cv with the API explorer for simple commands, just use the recommended cv command.  However, if the command includes JSON, use the format above, and grab the exact JSON from the JavaScript example API Explorer generates.


Reverting CiviCRM on Drupal 7 to last backed up state?

How to revert the CiviCRM to previous state:

Put Drupal into maintenance mode
Disable integration modules
Replace civicrm.settings.php with backed up copy and check permissions
Remove everything in <drupal_home>/sites/all/modules/civicrm and
replace with backed up version and check permissions
Drop civicrm database and import backup database
Clear caches and empty <drupal_home>sites/default/files/civicrm/templates_c and check permissions
Re-enable integration modules
Log in, test and debug

Command Line Cheatsheet for Drush and MySQL, Regarding These Steps:

Maintenance mode: drush vset maintenance_mode 1

Disabling and Enabling CiviCRM Integration Modules:

drush pm-disable [integration_module] or
drush pm-enable [integration_module]

Dropping, re-creating and importing a database in MySQL:

mysql -u [username] -p
use [database name];
DROP DATABASE [database];
CREATE DATABASE [database];
source path/to/backup.sql;

Clear caches: drush cc all

Dealing with templates_c: rm <drupal_home>sites/default/files/civicrm/templates_c/*


Customize Bookkeeping Transactions Report: Print custom field option value instead of name/label

I assume you're not asking how to customize reports in general, but what customization you can make to get your desired results.

You can use the alterDisplay() function to modify the output of your report.  Check out CRM_Core_PseudoConstact and its methods (getKey, getLabel, getName) one of those is likely to do it for you.


Error during Drupal installation: MySQL support not included in PHP

Recommend setting MAMP to use PHP5.6 if you have that option.

The screenshots show MAMP is set to use PHP7, but CiviCRM isn't ready for PHP7 yet.

(PHP7 removes ext/mysql in favour of ext/mysqli and ext/pdo_mysql. CiviCRM looks for ext/mysql, and the installer test is bailing out when it detects that this isn't supported.)

CiviCRM's PHP requirements are documented in the CiviCRM wiki.


DB Error on upgrade to 4.7: Duplicate entry activity_tab_filter for key 'index_domain_contact_name'

It seems that you have the same setting that is set twice on your database, and the upgrade to 4.7 enforce it won't happen.

You will need to list your settings as stored in the database, you should see more than one activity_tab_filter for the contact_id 571.

Delete the duplicate(s) and keep only one and then run the upgrade again and you should be fine

X+


How can I export a zip code with the suffix in the same field?

I wrote this little snippet of code in a larger extension, which will automatically append the postal code suffix to postal codes when exporting postal codes:

/**
 * On export, append the postal_code_suffix to the postal_code.
 */
function tweaks_civicrm_export(&$exportTempTable, &$headerRows, &$sqlColumns, &$exportMode, &$componentTable, &$ids) {
  // Primary postal code will have a sqlColumns['postal_code'] = 'postal_code'.
  // Non-primary will have the location type appended - e.g. work_postal_code.
  foreach ($sqlColumns as $key => $column) {
    if (substr($key, -11) == 'postal_code') {
      // Primary postal_code.
      if ($key == 'postal_code') {
        // Update the primary postal code.
        $sql = "UPDATE $exportTempTable " .
        "LEFT JOIN civicrm_address ca ON $exportTempTable.civicrm_primary_id = ca.contact_id AND ca.is_primary = 1 " .
        "SET $exportTempTable.postal_code = IF(ca.postal_code_suffix, CONCAT(ca.postal_code,'-',ca.postal_code_suffix), ca.postal_code)";
        CRM_Core_DAO::singleValueQuery($sql);
      }
      // Non-primary postal code
      else {
        $locationType = str_replace('_', ' ', substr($key, 0, -12));
        $sql = "UPDATE $exportTempTable " .
        "LEFT JOIN civicrm_address ca ON $exportTempTable.civicrm_primary_id = ca.contact_id " .
        "JOIN civicrm_location_type clt ON ca.location_type_id = clt.id AND clt.name = '$locationType' " .
        "SET $exportTempTable.$key = IF(ca.postal_code_suffix, CONCAT(ca.postal_code,'-',ca.postal_code_suffix), ca.postal_code)";
        CRM_Core_DAO::singleValueQuery($sql);
      }
    }
  }
}


Migrating CiviCrm to WordPress CMS from Drupal

Export a csv list from Drupal or phpmyadmin? Then import it into WordPress via a plugin like https://wordpress.org/plugins/import-users-from-csv/ You can disable/delete the plugin after you are done. You will also want to use the plugin https://wordpress.org/plugins/civicrm-wp-member-sync/ to create/sync the users in Civi.


What does the option "Always post to Accounts Receivable" in CiviContribute do?

There is probably a bug in storing the settings for this option, which prevents it from having any effect. See also here.


I don't know of any hidden export pages, but if you can talk the data into appearing in a report then you can export as CSV from there. We've created a few custom reports to allow this on our multi-record custom data.


Is there a copy of phpunit 4 documentation somewhere?

https://phpunit.de/manual/4.8/en/index.html still exists even though it's not shown as an option in the menu anymore.


Membership Name-Your-Own Price (above Minimum) on Contribution Page

I gather you are not looking for a development solution (ie. extension, custom template, etc.) since the API/template system is extremely extensible.

If that is the case you might consider creating a button or link on the form (if you are slick you might adjust the css or use jquery to place it in the price-set.) that takes the user to a separate contribution page with the name your own price.

I realize it does not match the mockup but it may serve the functional requirements.


How can I limit CiviDiscount codes to be used for a maximum number of participants rather than amount of times?

You might try installing the Redeem By Participant extension, which changes CiviDiscount's default behavior of only incrementing the use count by 1 no matter how many registrations are included in a single transaction. With this extension, if a sponsor purchases 10 tickets at the same time, the use count of the discount code would be incremented by 10 (rather than by 1), which may help your use case.

https://github.com/ginkgostreet/com.ginkgostreet.cividiscount.rbp

(I realize this is a very old question, and you may have solved this already, but this is an option that might help someone else.)


Custom Field doesn't show up in Advanced Search

Navigate to Administer - Customize data and screens - Display preferences and select the Custom field section listed under Contact search. After that you should see the Custom field accordion in the Advanced search


Which version of Angular/AngularJS does CiviCRM use?

How to check your Angular version

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

Notes about Angular versions

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


What does 'Number of Items to Process For Each Queue Item' mean when using the API Importer extension?

API CSV Import extension uses Job Scheduler to import the records in Civi. The job scheduler breaks down the whole csv into small batches(also known as queue item) to import to avoid timeout issue, memory excess and various reasons.
'Number of Items' is used to define how many records you want to process in single single queue. If you specify 2000 than there will be 25 queue item lined up in job scheduler to process 50k records with 2k in each queue. The 'Number of Items' you specify should respect the max time out and memory size of the server or it will always result in error. I prefer to set to 500 per batch for better results.
HTH
Pradeep


Multiple participant registration not tied to contribution for paid events?

After looking at this for a good while, I've discovered that clicking the contact name in the "Registered By" field on the additional registrations will bring up the original registration in a modal.

The way it appears now implies that it would take you to that contact's detail page and not their registration.


You can upgrade to 5.3.2 (and that will then automatically include 5.3.1 - the security release)


Change group after a mailing is scheduled results in mailing still being send to the original members

This is a duplicate of CiviMail and Smart Groups: when does CiviCRM identify the actual list of email recipients?.  I don't think your fix is likely to be accepted upstream for the reasons Lobo provided on that ticket.  That doesn't mean you can't use this fix if it works for you, of course, just that it can't be merged into the upstream code.


How can I create a mailing report with drupal views?

You can create list of mailing using views but you can't filter the results based on groups it was sent. To achieve this you will need to implement the handler or alter the query to filter result via hook.
Alternate method is to create a Mailing Summary civireport giving access to the specific report from the 'access' tab of the report.
You can create your own drupal permission via hook or custom permission extension and than selecting the permission from the access tab.


Should the API return code always be 200?

HTTP return codes are typically indicative of "plumbing" issues between the client through the web server. A malformed API call is more indicative of an underlying data issue so doesn't really fit the same scheme (IMHO).

Further, I think that error handling for plumbing issues (ala "Website not available") probably needs to be different than that for API errors. I know my coding would always handle things differently.

That said, this question really calls for no more than personal opinions so should probably be closed.


Can I dump all Caldera form submission data into the "details" of a CiviCRM activity?

You can use the Integration of CiviCRM's Form Processor with Caldera Forms. See https://wordpress.org/plugins/cf-civicrm-formprocessor/


How can I get rid of the "Name" field in a profile listing?

This question was asked 5 years ago on the old CiviCRM forum, here.

Here's a solution updated to work with CiviCRM 4.6.10:

templates/CRM/Profile/Page/Listings.tpl
@@ -59,26 +51,30 @@

       {foreach from=$columnHeaders item=header}
-
-        {if $header.sort}
-          {assign var='key' value=$header.sort}
-          {$sort->_response.$key.link}
-        {else}
-          {$header.name}
+        {if $header.sort neq 'sort_name' }
+          {if $header.sort}
+
+            {assign var='key' value=$header.sort}
+            {$sort->_response.$key.link}
+
+          {else}
+            {$header.name}
+          {/if}
         {/if}
-
       {/foreach}

       {counter start=0 skip=1 print=false}
       {foreach from=$rows item=row name=listings}

-      {foreach from=$row key=index item=value}
+      {foreach from=$row key=index item=value key=field}
+        {if $field gt 1}
         {if $columnHeaders.$index.field_name}
           {$value}
         {else}
           {$value}
         {/if}
+        {/if}
       {/foreach}

       {/foreach}


Why can't I add more CiviCase fields to my Profile?

(EDITED) When you set up a civicrm profile using lateset civicrm you can add Case fields and they all seem to be available. The below shows Profile with Case Subject and Case Status added and other fields still to add.


Change billing date of recurring contribution (PayPal payment processor)

Short answer: no, so long as you're using PayPal.

Recurring contributions come in two flavours, depending on your payment processor: token-based with the amount and schedule controlled by CiviCRM, or payment processor controlled. Some payment processors will allow either method.

PayPal is only controlled by the processor, so contrary to what you got as an answer, the only way to change the billing date is via PayPal. But if they tell you you can't, then you can't. In general, PayPal is very donor/customer oriented and it tends to put all the power into the hands of the donor/customer, not you the merchant/organization. So it's not usually the best option for large organizations that are used to managing the recurring contributions themselves. You can check out other options here:

https://wiki.civicrm.org/confluence/display/CRMDOC/Payment+Processors

Note that even if you're using a payment-processsor-controlled recurring schedule, there may be an API that lets you change the schedule indirectly via CiviCRM.


Modifying field types in CiviCRM is bound to create problems later on (e.g. with upgrades), so I wouldn't do that.

The straightforward approach would be to create a custom fieldset for relationships and add in a new custom field that is large enough for your data. I suspect there might be a few gotchas in terms of accessing this field, but if you're in Drupal, then the entity support in Drupal might solve this.

Apropos of this, here's an article about Drupal that points to how important this kind of fieldable relationship entity can be:
http://atendesigngroup.com/blog/drupals-weak-link


Disabling Scheduled Jobs, Transactions, etc (from command line)?

Setting the environment to Staging/Development will turn off all schedule job from running unless you explicitly specify runInNonProductionEnvironment=TRUE in job parameter and also no emails will be send out from CiviCRM to any contact(will be logged in a file on server disk)

You can set the option to Staging/Development using one of the below methods

CiviCRM >> Administer >> Debugging and Error Handling, Select option for 'Environment'
cv api Setting.create environment="Staging"
drush cvapi Setting.create environment="Staging"
Over-ride settings by adding below lines in civicrm.settings.php

:

global $civicrm_setting
$civicrm_setting['domain']['environment'] = 'Production';
define( 'CIVICRM_MAIL_LOG', '/Users/pradeep/Sites/drupal7/sites/default/files/civicrm/templates_c//mail.log');


The requested Profile (gid = 9 ) is disabled OR not set to be used

On the Contribution Page setup, below the checkbox to enable 'on behalf of' there is help text explaining that it uses the "On Behalf Of Organization" profile - unless you change it.  You are seeing an error relating to profiles when you enable the section that says it uses a profile, so that is a good clue as to the cause of the problem.

Let's step through the various causes suggested in the error message:

1) Is Profile (gid=9) disabled?

Go to Administer > Custom Data and Screens > Profiles  Click the Reserved Profiles tab.  Id 9 is 'On Behalf of Organization' in a default config (4.7) which corresponds with the help text.
 It is a reserved profile, so you don't have the option to disable it.  This is not the cause of the problem.

2) Is Profile (gid=9) set to be used as 'overviews'?

This is not obvious as there is no setting described as 'overviews'.  But since this is core behaviour and you can't change it, let's assume that is correct for now.

3) Does Profile (gid=9) exist?

Yes - we have just seen it in the listing. (Arguably this should be the first cause listed!)

4) Do you have access to the Profile?

This is the last of the suggested causes and also corresponds to the behaviour you are seeing that the problem depends on whether or not you are logged in.

Now we need to check permissions.  You don't mention which CMS you are using, but I'll use Drupal here.

Go to the Drupal People > Permissions page. In the CiviCRM section, look for settings relating to 'profiles' and see what permissions your anonymous users have.  It is not always obvious which permissions are relevant but we are using the profile to enter new data rather than view data so 'profile create' looks likely.

Is 'CiviCRM: profile create' enabled for anonymous users?  Probably not.  Enable it, save and try to view the contribution page again when not logged in.

Warning: Be wary of granting new permissions if you don't understand what they mean, particularly for anonymous users as you can inadvertently expose far more data than intended.  You can find confirmation that 'profile create' is appropriate in the documentation.


CiviMail > New Mailing > No recipients Error

This > check the Mailing list checkbox for Group Type

Solved this issue for me.


How to setup cron trigger in CiviRules extension

You can set the Membership status rule to end date as 40 days for pending status. But i am not confident that pending memberships are actually processed by 'Update Membership statuses' cron job.


You are missing -d x_subscription_id=21930455 in your curl command (just change it to your subscription_id).


Why am I getting problems with username & password for WP cron?

The problem was the single quotes around the path to cron.php, once I removed them it worked.  Also usr/bin/wget was incorrect, just needs wget. Here's the working crontab entry with output redirected for debugging.

wget -O - -q -t 1 http://example.org.uk/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=Cronjob\&pass=xxxxx\&key=2c3b60639d70ba87f61e819cb2cd0e67 > /home/example/www/wp-content/uploads/civicrm/ConfigAndLog/cronerrors.txt 2>&1


Upgrade Paystation processor to 4.7 compatible

Okay, I've just done a civix install using the developer guide and managed to get it done using the latest code formats. Things I did was:

Migrated the files to CRM/Core/Payment/...
Created a mgd file which automatically inserts the payment processor into the db.
Fix errors/warnings encountered during testing.

Sample upgrade commit - Link


You probabky have to give anonymous users the permission "CiviCRM: access AJAX API".


Getting problem while getting group id of current logged in user

I would use api to find groups of logged in user

$result = civicrm_api3('Contact', 'getsingle', [
  'return' => ["group"],
  'id' => 'user_contact_id',
]);

or

$result = civicrm_api3('GroupContact', 'getsingle', [
  'return' => ["group_id"],
  'contact_id' => 'user_contact_id',
]);

HTH

Pradeep


Contributions made via Charitable gift funds

This is specifically why soft credit types were introduced. Record the donation as coming from the fund and add a soft credit for the individual. Donor advised fund is one of the types available by default.


Expected information for iATS recurring contributions?

Please note that 1.5.3 (see XML file) is not compatible with CiviCRM 4.7.x; you must upgrade to the 1.6.x series.

PS - the issue you're referencing is re: 4.6 (completetransaction API does not create Financial transactions); for the 4.7 version we are able to use repeattransaction API - which does create Financial transactions.

PS2 - after updating to the 1.6.x you will be seeing payment information there (CiviCRM core recently has also added last 4digits of cc - in addition to $amount, financial type(s) payment instrument id.


Which template is used for receipts sent from admin entry and renewal of memberships?

It's this one

Memberships - Signup and Renewal Receipts (off-line)

I often get a bit confused too. Best thing to do if in doubt it to make a minor amendment and do a test. You can easily revert back to the default afterwards.


Email addresses being set to on-hold bounce due to Away responses

You can change the hold_threshold in civicrm_mailing_bounce_type table for Away to your own choice. By default it is set to 30. Not sure why your system is set to 3.

I dont think if there is any way to discard old bounces unless you delete from civicrm_mailing_event_bounce table. Probably good idea to write a script that runs on cron job to delete the entries of certain bounce type and X days old.

Cheers

Pradeep


Custom Data Set - Saves but does will not display

Sounds like a bug, which version of CiviCRM are you using? Which version of which CMS are you using?

Can you repeat it on
http://dmaster.demo.civicrm.org
or
http://wpmaster.demo.civicrm.org
?


It's true - looking at the code, I can see that Search Builder expects an integer if you're searching on an integer field.  An exception is made for using the IN operator, in which case it validates each value separately.

Trying to validate a regex to ensure it's non-malicious is a very difficult task, and I think the appropriate answer is to remove the regex function from the Search Builder on integers.  Work is being done on Civi 5.2 to remove operators from Search Builder that aren't appropriate.

However, to solve YOUR problem, you should use IN, separating your values by commas like so: 64,5917,5725,5892,5852,5818,5893,5850


ACHEFT-Debit possible with webform_civicrm?

That is now possible! For both CAD and USD.

Pull latest webform_civicrm module:
git clone https://github.com/colemanw/webform_civicrm
Pull latest iATS Payments extension:
git clone
https://github.com/iATSPayments/com.iatspayments.civicrm

Example of USD Checkout:


How to allow anonymous user to edit their contact details on CiviCRM?

The link is missing checksum parameter(cs). It should be

https://example.com/civicrm/profile/edit?gid=48&id=8949&cs=11e24e6f361dceacd63ea0120b00c871&reset=1

Thanks

Pradeep


how to remove blank rows in constituent summary report?

Selecting the Contact ID and Date Modified columns unsquished the rows, so I was able to delete the offending Contact IDs from civicrm_contact using phpMyAdmin, without triggering any FK violations. The report now looks normal, though I'd still be curious to know how 85 null contacts got added (all at once). Has anyone come across this before?


Include more than 2 profiles in Contribution Pages

i do not think this is available. It has come up for discussion several times. CiviEvents offers it and having the same for Contributions would be a good contribution but I gather it is a reasonable effort and no one has taken it on as a community project yet, or fundraised to get it built.


I would suggest that you download CiviCRM from the official download page:

https://civicrm.org/download


Changing background and button colours on public facing pages (like contribution) in drupal

In Drupal you could add a new theme, for example 'Bootstrap', and add the module 'Themekey' to Drupal.  Then in Themekey settings you can specify the Bootstrap theme to be used for a particular page. For example in the Themekey settings when 'drupal.node' = 'civicrm/something' then theme is 'Bootstrap'.  No coding required!


CiviCRM Contact Information Merging and Overriding Unrelated Users/Donors

Oh dear, yes that sounds like things are in a mess. Some suggestions

It sounds like you need to review the Dedupe Rules that are set up and in use. That should include checking that the 'threshold' has been set correctly
You should check if logging is turned on (civicrm/admin/setting/misc?reset=1) and hope that it is as that should let you use the Change Log tab to try and identify and restore changes
if you have access to the db and have access to some sql skills then you may be able to repair some of the problems


Yes, CiviCRM works fine with WordPress on Nginx. However, since Nginx doesn't use .htaccess you'll want to add any changes to your site-specific configuration.

For example, there are a few upload directories that have .htaccess files denying access to their contents. To do the same thing in Nginx, you'd want to add a location block to your site's configuration.

location ~* ^/wp-content/plugins/files/civicrm/(?:ConfigAndLog|custom|upload|templates_c) {
  access_log off;
  return 404;
}

See more details in my blog post: https://blog.rudeotter.com/install-civicrm-on-wordpress-with-nginx/


Customize basic find display to include membership status

You can not just configure that, you will need to develop a little extension to modify the behaviour.

That would mean finding out which search is involved (I think it is BasicSearch) and probably use the buildForm hook (see https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/) to add the column and the searchColumns hook (https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_searchColumns/) to modify the result.


Being given the contribution_id, how can I update the Contribution?

I do not know how exactly but I am sure there will be guys and girls around that do. But you should be able to link a Webform (with CiviCRM integration - check https://www.drupal.org/project/webform_civicrm) to a View and pass a contribution_id to that form.


Staff changes should happen on the live server.  This is doubly true if you have any public-facing pages, which will mean the database on the live server is updated by members of the public.

Traditionally, code travels from dev to staging to prod.  Data travels from live to dev/staging.

I prefer referring to "dev/test/live" server, since this better illustrates the flow, and is less jargon-y to non-tech staff.

Some changes don't flow well this way - for instance, you may want to create a contribution page on your test server, then transfer it to live.  In practice, this should be relatively infrequent, and you can redo your work on the live server.


In general, auto-recurring memberships are generated via an auto-recurring payment, whose mechanism depends on the payment processor, and most especially on whether the recurring payment schedule is managed by CiviCRM or the processor.

When the schedule is managed by CiviCRM, you have more direct control and could for example use some sql to just push forward the next scheduled contribution date one month (or so). You could also manually go in and edit each recurring schedule, updating the next scheduled contribution date. You'd also want to deal with the issue of the membership status - one way would be to extend the grace period, though mucking about with membership status rules can get you in weird trouble.

When the schedule is managed by the payment processor, as is the case with Stripe, (i.e. the payment processor will trigger the recurring payment according to a schedule stored on it's servers), then you'll need to depend on whether the payment processor extension gives you the ability to update that schedule. Based on one example I just looked at, that doesn't appear to be the case.

So you'd need to use the Stripe interface itself to make any changes to the schedules.


As I haven't seen your code, I can only suggest what worked for me:

function myext_civicrm_fieldOptions($entity, $field, &$options, $params) {

  if ($entity == 'Contribution') {
    if (isset($field) && $field == 'mycustomfield_123') {
      $myArray = [
        1 => 'Title 1',
        2 => 'Title 2'
      ];
      $options = $myArray;
    }
  }
}


CiviMail - How do I force crmMailing.$invalid to be false?

Well, it looks like I need glasses because there is no PHP in that bit of code. I was unaware you could do a conditional in HTML  . . . until I tried it and found out you can. Anyway, this may be one hell of a crude hack so use at your own risk.

Make a copy of sites/all/modules/civicrm/ang/crmMailing/BlockPreview.html
Track down the line starting with

  button crm-icon="fa-paper-plane" title="{{crmMailing.$invalid ||

Get rid of crmMailing.$invalid ||  . You'll be left with !testContact.email  . . .rest of line . . . crmMailing.$invalid appears twice in that line at ng-disabled. So set that to

  ng-disabled="!testContact.email"

Getting rid of crmMailing.$invalid. I'd still like to know why this is set incorrectly. Where/How is it set?


Not a report, but FYI the "Manage Tags" screen actually shows the usage count for each tag when you click on it:


The BAO is not required, but it is what we always used to do. So the standard approach is: the API uses the BAO/DAO functions to insert and select. You can find a pretty simple example here: https://github.com/CiviCooP/no.maf.oppgavexml/tree/master/CRM/Oppgavexml


How to change the default Activity dashlet to include activities other than "scheduled"?

You would need to change the code. But there is another way to get the Activities on your dashboard.
Go to Reports, select Contact Reports and then Activities. If you then set all filters as you wish and tick the 'Available for Dashboard' option, and save the report as "My Desired Activities" (or any other name :-)) you should have a new dashlet available for your dashboard with your settings for activities?


How can I bulk update a collection of recurring contributions to set the next scheduled contribution to a specific date?

Since yesterday you can now do that if you're using Drupal! @jackrabbithanna (Mark) added some code to CiviCRM Entity Project, which now exposes civicrm_contribution_recur as an Entity in Drupal so that you can manipulate it in Drupal like any other Entity. Will post some steps/screenshots here:

git clone https://github.com/jackrabbithanna/civicrm_entity.git

this is fresh - look for it soon on https://www.drupal.org/project/civicrm_entity

Enable modules: views, views bulk operations (VBO) and CiviCRM Entity
-> also Enable the CiviCRM Entity Actions submodule
Clear caches twice!
Add a view: Show: Recurring Contributions Profile; you will want it to Format: Show: Fields and Create a page for it.
Add Field: Bulk Operations: CiviCRM Contribution Recur

Select Modify Entity Values (as we're going to want to update values)

In action - go to your page

Hit Execute
Select Next Scheduled Contribution Date and assign the new value for it (this is the date/time/format that CiviCRM uses):
2017-05-01 00:00:00

Next and Confirm!
And check that it worked: it did - will transact on May 01, 2017:


Cancel/Transfer Registration Link in Contact Dashboard

This feature makes sense, but doesn't currently exist.  However, I created an issue in the CiviCRM issue tracker for this exact feature.
I have a client who wants this, but I think they're going to run out of money before we can do it unfortunately.
The good news is that they DID fund the biggest part of this - until two months ago, the self-service cancel/transfer code was only accessible from the self-service/cancel page.  They funded me to move the code to a central location.  In the next couple of weeks, I intend to clean this code up further, at which point it should be under an hour's work to add self-service transfer/cancellation links to the user dashboard.


How to give a group by default to a new contact?

One option is to do it with profiles. You can automatically add contacts to a specific group when they are entered via profile. Create two different profiles for your two groups, and have your users enter all contacts through their own profile page in Profile-Create mode. However, if you find yourself needing to create a unique profile for every user, then it's time to re-assess the need. An extension would be better at that point.


How to control access to a Panel or View in Drupal based on CiviCRM Activity or completion of webform

I'd handle this by adding folks to a smart group with the selection criteria being those who have the activity associated with the completed webform.  Then use Group-Role synchronization to add folks to a role, and restrict access based on role.


What is the most reliable method for merging records with memberships?

I looked into the code and seems like you need to enable the add new checkbox to move the membership to the newer contact.

Add New stands for adding a new membership on the main contact from the duplicate contact.

Case when add new is not needed:

This is not needed when both the contacts have a membership of same type and they need to be merged between the two contacts. For eg.

Contact A has a membership of type 1 with start date = 1/1/2018.
Contact B has a membership of type 1 with start date = 2/2/2018.

Now, when contact A is merged to contact B, the merge membership is done and all the field values of A membership is copied on to B. Here, no new membership need to be created. Hence, add new should not be checked.

But, in your case, as the membership on the main contact is not present and need to be "added" from the duplicate contact - we need to select the add new checkbox on the merge screen.

Agree it should be documented as I don't see it anywhere on docs.civi.


Donation recorded under the wrong contact name

If its a matter of updating one contribution than you can

use api explorer(CiviCRM >> Support >> Developer >> API explorer 3) to update the contact id for the contribution, see below image(use the contribution id to move the contribution)

2. Execute below sql statement in your mysql (below sql statement update contribution with 23 to set contact to id 103)

sql:

UPDATE civicrm_contribution SET contact_id = 103 WHERE id = 23;

You can use Move contribution extension to move contribution to different contact


Is it possible to reassign a contribution linked to a membership?

Through UI its bit difficult(impossible). If its a matter of single record then i would suggest you to use API explorer to do it.

Navigate to CiviCRM >> Support >> Developer >> API Explorer

Create Membership payment for old membership (23 is old membership id(without contribution) and 45 is contribution id)

Delete new membership.

  Note: Backup db before performing any api actions


How do I use a hidden column in a custom search template?

OK. I figured it out eventually. This is how I got it to work. It seems a little wonky but it functions

Add the column to the list of columns
Override the template
Alter the rows to add the link
AND unset the column in Alter rows

The constructor columns must contain

  ts('Org id') => 'org_id',

The override

  public function templateFile() {
    return "CRM/Contact/Form/Search/Custom/mySearch.tpl";
  }

The template

Add snippets in each of the column headers section and the rows section skipping an item in the loop. Eg. {if $header.sort neq 'org_id'}

For the headers:

 {foreach from=$columnHeaders item=header}
    {if $header.sort neq 'org_id'}

      {if $header.sort}
        {assign var='key' value=$header.sort}
        {$sort->_response.$key.link}
      {else}
          {$header.name}
      {/if}

   {/if}
{/foreach}

For the rows:

{foreach from=$columnHeaders item=header}
   {assign var=fName value=$header.sort}
   {if $header.sort neq 'org_id'}
     {if $fName eq 'sort_name'}
       <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=custom"}">{$row.sort_name}
      {else}
        {$row.$fName}
      {/if}
   {/if}
{/foreach}

The alter rows

Note the added unset line.

function alterRow( &$row ) {
  $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$row['org_id']}");
  $row['organization_name'] = "{$row['organization_name']}";
  unset($row['org_id']);
}


WordPress: Creating new WP Users from CiViCRM Contacts

How i would do is

Export contacts with email address that want to be user.
Install Wordpress export/import user plugin.
Change the un-supervised dedupe rule to have only email address
Import users via Wordpress screen using exported csv from CiviCRM
Switch back un-supervised dedupe rule

Thanks

Pradeep


Fatal error: Cannot redeclare _PEAR_call_destructors()

If you only have one copy of CiviCRM, try disabling the other drupal modules you have on the site. It is possible that some other module also uses PEAR and has its own copy of it which could cause the above error


How to use API to bulk delete contacts quickly?

Api4 will likely to be able to do this, but it is not yet released.
It is not possible with api3. You'll need to write a custom php script to loop and call the api repeatedly, or else execute a sql query.