Delete multiple contacts from a list input Civi is a great platform and I started to use with the first action to organize some old contacts. I could import them fine and I see them in the system.
The problem is that we are doing some cross-checking for the accounts' current validity and at some point we need to delete some of them but based on a list of items, let's say emails that should be inputted somehow.
So the question is: is there an option like that? An input area like the "import contacts" where we can upload a file (maybe csv or text) with the emails to delete, then the script would just remove the contacts found.
Thank you very much!
Andy

You could easily import a list of emails, add the contacts to a group when you import, and the delete all the members of the group.
The only potential hurdle is if you have more than one contact with the same email address, in which case the contacts will be imported as new contacts. In that case, I would suggest finding duplicate contacts of any members of your newly created group with a email matching rule and you can merge as appropriate to delete those contacts or simply deal with the matching contacts manually. If you want to delete all contacts with email addresses on your list, you could simply merge all the duplicate contacts found and then delete.


How to create a relationship if a contact marked with multiple subtype? I have 3 contact subtypes.

Contributing member
Volunteers
Patron

some of members have multiple subtypes associated to their record. When I try to create a relationship of a "Patron" with a contact marked "Contributing member & Volunteer" it does not work, if relationship A-B are set to the contact subtypes. It only works if selected relationship A-B are both Individuals and not the subtypes. Anyway to fix it, so that I can use the contacts that uses multiple contacts subtypes?

I am not sure if I understand, I have a relationship on my install between subtype 'Suplier' and subtype 'recruiter'? Can you explain what is different?


Smart Group for Soft Credit Name Is there a way to create a smart group that contains contacts that have made a contribution with a specific soft credit name?  I see that I can run a Soft Credit Report and add contacts to a group but I would like to make that group dynamic.  We're using Civi 4.7.17.  Thanks.

Jon G - Megaphone Tech has written an extension Soft Credit Custom Fields which, amongst other things, adds a "Soft Creditee's Name" field to the Advanced Search. This should be used to create the smart group.


Bulk merge creating multiple address (and email) records of same location type I'm pretty sure this is not an intended behavior, but I want to make sure.

When I try to add a second address of the same location type I get an error and civi will not let me (Image 1).

If I use the merge tool and I try to merge contact A (Image 2) with contact B (Image 3), I am told moving/merging the home address to the home address of the destination contact will cause an overwrite (Image 4).

In the merge tool I see no conflicts even though contacts have home addresses that differ (Image 5). If I use the [Batch Merge All Duplicates] button I end up with 1 contact with 2 different address records of the same type (Image 6). Same issue with email addresses, although civi will let me add two email addresses of dame location type (which I don't think should happen).

Bug?

*note, this was tested on civi demo site.

Image 1

Image 2

Image 3

Image 4

Image 5

Image 6

The address aspect of this has recently been raised as a bug here:
https://issues.civicrm.org/jira/browse/CRM-18455

And has been patched as part of:
https://issues.civicrm.org/jira/browse/CRM-18338

As for the rest of the merging logic - where it creates many email addresses (phone numbers, and other 'location blocks') of the same type, I agree this doesn't seem desirable; but deciding which phone/email to keep isn't always straightforward. The current logic is:

When force merging if there are any conflicts the 'main' record takes precedence, otherwise any information from the 'other' record is added to it. Ie: all emails would be added. If there were two addresses of the same type then the 'main' one would stay on the record.

I also posed this question on the civicrm-dev mailing list as to whether this is the desired behavior and I've created a follow-up thread on the forum: https://forum.civicrm.org/index.php?topic=37165

Please feel free to get involved =] It would be great to improve this tool and have it working as desired - once we know what 'as desired' looks like.


Installing Civicrm on Drupal 7 site I have uploaded Civicrm 5.12.0 on a Drupal 7.65 site via FTP. After upload was completed, I attempted the installation script, but nothing happened. Is there a step that I forgot to do or wasn't aware of?

Look at the error log file of the webserver (probably apache2). If you see an entry like PHP Warning:  POST Content-Length of 21426352 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
you will have to adapt the /etc/php/7.2/apache2/php.ini file in order to rise the value of two parameters to v.gr. 32M:

upload_max_filesize = 32M
post_max_size = 32M

Don't forget to restart apache after updating php.ini at the command line interface by issuing:

sudo service apache2 restart


Membership Signup Form - add "Phone Number" field (required) For this membership signup page:

https://connectionpractice.org/membership/

I want to add "Phone Number" as a required field for people signing up for a membership.

I can't find where I can configure the fields for the payment section.

I tried going to Contributions > Manage Contribution Pages

I do find this page there, and I was hoping to find a tab where I could configure these fields, but I don't see anything like that.

Have also gone to Administer > CiviMember but didn't find anything relevant there.

The payment gateway is Click & Pledge. I also looked at this item there, but don't see a place to configure these fields there either.

WordPress 4.8.1

CiviCRM 4.7.21

Any hints will be most appreciated!

To add to Rowan's answer, go to Administer>Customize data and Screens>Profiles and choose the profile that is being used in your Contribution Page.  On the right hand side of that screen you will see a button called "Fields".  On clicking that button you will be taken to a page called Profile Fields where there is another button called "Add Field".   Select the type of CiviCRM record and the field you want to include in this Profile ("Phone" is an option under "Contacts" and you can make it required).

Voila!  Hope it helps.


Spark - Case management & Calendar? I'm looking at starting up with CiviCRM Spark. I'm wondering whether Spark include Calendar and Case Management?

Thanks

Spark should include Case Management, yes.  Whether it provides a "calendar" depends on what you need in a calendar.  If you need a report that shows upcoming deadlines in order of date, you can set that up within Spark.  If you want integration with your Outlook calendar or a website's calendar, that would require an extension, which isn't available with Spark.

However, Spark is a great way to see if CiviCRM meets all your other needs.  If it does, then you can always move off of Spark to your own CiviCRM instance and install the extensions you want.


Managing collection tins and buckets I am relatively new to civi and have an install that we are using for a new project. We are using it to manage our support groups and volunteers initially. Starting with a small part of the tasks that we will want to use it for we are just using civicore but will use other bits as we use it for more workflows.

One of the taks we want to use it for is managing collection tins that we allocated to fundraisers. Wondering if there is some method that people are already using for  this sort of thing. Thought of an additional contact type and relationships or using CiviCase but wondering what others do?

TIA

In Civi we have a Contact named Cash that we use for this. This is an Individual contact type, no need for an additional Contact Type.

We use Price Sets (Line Items) to record Designations so we just have one "Cash" donor. Even if you use Campaigns, you could still get by with just one "Cash" donor.


CiviContribute & Paypal Business Account I'm running Civicrm 4.7.0 on Wordpress and a paypal business account. I'm having problem configuring the payment processor with paypal. 1) is  not possible add paypal button in html, 2) configuring live and test parameters civicrm save test parameters same as on live 3) standard and pro paypal version not working. What's the solution?

Thanks

You should setup Paypal in CiviCRM (via Admin > System Settings > Payment Processor ie at path civicrm/admin/paymentProcessor?reset=1) and then use Contribution pages with the paypal payment provider.


I cannot find Participant Count and Max Participants in Edit Price option for price sets WordPress In Drupal, I have the option in a price set, price option to limit the number of people who can book at a certain price.

I do not see this option in a wordpress install (civi version 5.13)

Do I need to turn this option on somewhere?

My mistake.. I had configured the price set as a contribution, not an event fee.


WP Base Page not working as expected I'm on version 4.6.11 of the CiviCRM plugin for WordPress, WP version 4.4.1.

I expect this has something to do with shortcodes, hijacking, and maybe some other things related that I'm having trouble understanding.  Here's what's happening:

I have created a WP page template called page-civiform.php.  It is intended to be used by site admins to create event registration pages and donate pages, and it has some custom fields and specific styling/branding.  Admins use the main content WYSIWYG editor to paste a shortcode from CiviCRM that creates their event registration form or donate form.  All is well, and these pages look good.

Then, once a user registers or donates, the URL of the very page is appended with a query string, and it appears to be retrieving the default page.php sidebar (which is called in page.php).  BUT, the body classes are not those of page.php.  Instead, the body classes are exactly the same as those of the previous page where the shortcode was pasted - that page which is using page-civiform.php template. That's a problem, because it ends up creating an unprofessional appearance with a wonky layout.

I created a page with slug 'civicrm' and in WordPress Base Page setting, it is set to use that page, which does indeed use page.php as its template. On top of that, per the answer here, I put a filter into functions.php file to specify using page.php. None of this appears to have any effect.  Removing that filter and changing the WordPress Base Page (to anything else) also appears to have no effect.

Seems the wires are crossed here.  I did see this issue, discussion of which sounds unpromising.

I need the Civi-generated pages to be style-able differently from the pages where shortcodes are pasted; I can't do that when the selectors are identical.

Could this issue be related? Is there a setting somewhere that I am unaware of?

Im answering my own question and I'll probably go overboard in explaining everything exhaustively, but I sunk too much time into this to just let my understanding disappear into my own forget.

In this particular site, site admins use the custom page template 'page-civiform.php' whenever they want to create a page which will contain a CiviCRM form, inserted via shortcode, and this page template allows them to also insert additional content via a custom field which will display in a column alongside the form.  Looks nice.

End users submit the form, and then CiviCRM automatically generates each subsequent page (thank you page, event registration confirmation page, etc).

These pages will have the same body classes as the page where the shortcode was inserted.

BUT these Civi-generated pages do NOT use the same content as the page with the shortcode. And by content, I think this means everything in between get_header() and get_footer(). Instead, they use the content from another page, and there are three ways to specify which page they will use:

If there is no other method utilized to specify which page to use, CiviCRM will use the home page. Again, content, not body classes (that was the source of my confusion).
In CiviCRM > Administer > System Settings > CMS Database Integration, the WordPress Base Page can be set to a specific URL.  Then that page's content will be used.
It is also possible to specify the page via a filter which would go into functions.php or a plugin.  And here's code for that:

add_filter( 'civicrm_basepage_template', 'my_basepage_template' );

function my_basepage_template( $template ) {

return 'page.php'; //whichever template you want

}

The path of least resistance here is to have ALL of these pages (pages with shortcode inserted as well as any resultant civi-generated pages) have the same template, because then this whole situation wouldn't matter.  But on this site, we want some content in a column next to the shortcode-generated form, so that's why we have a separate page template with a custom field ('page-civiform.php').

Here is 'page-civiform.php' so you can see how the custom field is conditionally included or not.  The presence of that conditional statement would actually allow me to set this page as the WordPress Base Page, and it would yield the same result, which in this casse is two columns on page with shortcode, one column (just Civi's content) on auto-generated pages.

Basically, this all comes down to having different design/layout for pages with shortcodes vs civi-generated pages.


Unable to add membership types dropdown field to registration form I have created a Registration form using "Profiles", however when I add the membership types I get this message on the frontend: "Profile search, view and edit are not supported for Profiles which include fields for more than one record type.". The field is type "Membership", the other fields are type "Contact" (as seen on the screenshoot) What am I missing, what is the approach for adding a membership type dropdown?

the only way membership types can be used is via contribution pages


CiviVolunteer - Log Hours (requires not zero value) The Log Hours feature of the CiviVolunteer extension lists the lists all the available and scheduled volunteers within a volunteer project.  We have scheduled the volunteers out several weeks and would like to record the hours for the completed days (past days).  However, it is requiring us to enter a value greater than zero for all volunteers listed, even those who are schedule in the future.  The Actual Duration field is required.  Do we need to wait until all the volunteer roles are completed before we enter the actual hours?

Drupal - 7.54
CiviCRM - 4.7.17
CiviVolunteer Extention - 4.6-2.2.1

You're not doing anything wrong -- that's just the way the form was designed.

I think it's time this form got an overhaul. Conditional validation would be helpful in this case as well as some others. As an example, I seem to recall someone else pointed out that if you mark a volunteer as a no-show, you still have to enter a non-zero value for the actual duration. Clearly, that's nonsensical.

Full disclosure: CiviVolunteer is primarily maintained by a small development shop of which I am a part. Unfortunately we are not in a position to do unfunded work, but we'd be happy to improve this feature with funding or to help whatever developers you might have at your disposal, provided they contribute the improvements back to the project.


How to set password on backend user-creation? Is it possible to set the password on backend CMS user-creation in CiviCRM?
I think I saw this in an older CiviCRM-version...
Form ID = Useradd

In 5.37 there was a bug that hid the password field. This is fixed in the 5.37 branch but 5.37.3 hasn't been released yet, otherwise it will be in 5.38. If you're on 5.37 you can just replace the CRM/Contact/Form/Task/Useradd.php file with this one: https://raw.githubusercontent.com/civicrm/civicrm-core/5.37/CRM/Contact/Form/Task/Useradd.php
Note that in wordpress if the wordpress configuration says to allow anyone to register, then the password field is intentionally hidden because it was decided that the user should set their own password using the link in the email.


civibuild create permission error Running this:

civibuild create marc --type drupal-demo --url http://marc.localhost

Gives me this:

...
#33 /home/civicrm/buildkit/vendor/drush/drush/drush.php(16): drush_main()
#34 {main}
    [is_error] => 1
    [error_message] => DB Error: unknown error
)

+++ drush scr /home/civicrm/buildkit/src/drush/perm.php
Could not find the permission: register to volunteer                                                                                [error]
Could not find the permission: register to volunteer                                                                                [error]
civicrm@civicrm-dev-vb:~/buildkit/build

This is https://issues.civicrm.org/jira/browse/VOL-299

The workaround documented there works.

Connect to your MySql server as root
Run these two statements

SET sql_mode = '';
SET GLOBAL sql_mode = '';
Try again


Yes, you can, though it's not well-documented!

I recalled that there was some sort of "sort" option, which I confirmed by checked the Using the API documentation.  However, the documentation is incomplete (I'll fix that in a minute).

Fortunately, I found the code that handles this, and saw that you can sort by various field options.  See my screenshot below; I also confirmed that sorting by last_name desc also works.  You should be able to sort by any field.


'Create Linked Drupal User Account' problem - bug or user error? I am trying to set up a rule to create a Drupal User when a Contact is created.  The obvious approach is to fire on the event 'CiviCRM Contact has been created, check for the correct Contact subtype, and that a User does not already exist, and then use the action 'Create Linked Drupal User Account'.

This does not work on creating a Contact, giving an error message: Cannot create user, email: invalid!!

The Rules debug information in this case is:

0 ms Reacting on event CiviCRM Contact has been created.
2.397 ms Evaluating conditions of rule Test Rule. [edit]
2.473 ms The condition civicrm_entity_contact_is_subtype evaluated to TRUE [edit]
6.878 ms The condition civicrm_entity_user_exists evaluated to FALSE [edit]
6.88 ms AND evaluated to TRUE.
  Rule Test Rule fires [edit]
    0 ms Rule Test Rule fires.
    0.041 ms Evaluating the action civicrm_entity_action_create_user. [edit]
    232.936 ms Rule Test Rule has fired.
239.83 ms Finished reacting on event CiviCRM Contact has been created.

The only messages in the Drupal log are copies of the error message and the Rules debug log.

BUT if one then updates the same Contact, using the same webform and the same Rule with the Contact Updated event added, it works and the User is created.  (This says a timing or sequencing problem to me, or a difference I haven't spotted in the syntax required in the two cases.)

What is going on?

The Rule export is:

{ "rules_test_rule" : {
    "LABEL" : "Test Rule",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "civicrm_entity", "civicrm" ],
    "ON" : { "civicrm_contact_create" : [], "civicrm_contact_edit" : [] },
    "IF" : [
      { "civicrm_entity_contact_is_subtype" : {          "civicrm_contact" : [ "civicrm_contact" ],
          "contact_subtype" : "xxxx_Member"
        }
      },
      { "NOT civicrm_entity_user_exists" : { "civicrm_contact" : [ "civicrm_contact" ] } }
    ],
    "DO" : [
      { "civicrm_entity_action_create_user" : {
          "USING" : {
            "civicrm_contact" : [ "civicrm-contact" ],
            "is_active" : "1",
            "notify" : "0",
            "signin" : "1",
            "username_format" : "firstlast"
          },
          "PROVIDE" : { "civicrm_user" : { "username" : "Created Drupal User" } }
        }
      }
    ]
  }
}

Configuration includes:
CiviCRM  5.3.2   (including CiviCRM Rules Integration);
Drupal 7.59;
CiviCRM Entity  7.x-2.1;
Rules  7.x-2.11;
and dependencies.

(I have looked at the answers to various related questions and cannot get any joy.  Those that are using the same approach don't seem be any help in getting mine working.  Some suggest setting a Tag and then firing a rule off the Tag creation event - the CiviCRM Tag entity does not show up in the event selection list on my system, so I can't use that.

I have done something similar to the Tag suggestion using the Relationship created event, which does work (as far as I have tested it so far) but it's clearly a kludge (apologies) workaround.  Should not the straightforward approach work?)

Thanks in advance,
Tony

This could be caused that in CiviCRM an e-mail address is its own entity and created after the contact has been created.

Meaning that at the point the trigger contact created is fired there is no e-mail address in the database (yet). That one is added afterwards.

CiviCRM has functionality which is called profiles and which also create a user account. So maybe you can use a profile to create the contact and its related user account.


Send mail when my grant status has been changed I am try to send mail when grant status has been changed. For this I am using CiviRules . I create a rule Trigger(Grant is changed). Then I try to add my status condtion but not find it. Can anyone suggest me what I am doing wrong.

Thanks

CiviRules is a work in progress. Maybe this condition is not implemented yet. But you can do it yourself. The following manual describes how:

https://docs.civicrm.org/civirules/en/latest/create-your-own-condition/


unserialize(): Error at offset 11218 of 25832 bytes in CRM_Core_BAO_Cache::getItem() First of all, thank you for the support. I hope I can help anybody sometime!

I have Civicrm 4.7.12 installed in Drupal 7.51, and sometimes I get the error:
Notice: unserialize(): Error at offset X of Y bytes en CRM_Core_BAO_Cache::getItem()  (X and Y are integer values)

It begun after I upgraded to Civicrm 4.7.11, and no matter what I test... I can't resolve it.

Can anybody help me?
Thanks a million!

I just got this happening also, on a 4.6 install. It's due to an issue with your civicrm_settings table. That piece of code you reference is pulling out settings type values from that table and caching them. The code assumes that the values in there are objects or arrays and have to get serialized and unserialized as they get stuffed in and pulled out of text fields. The error is due to the code's inability to unserialize the value, which can happen if it gets serialized badly, or was never serialized in the first place.

In your case, it looks like it's really big and exceeds the space available (since it's pulling out 24K bytes from that poor little field). In my case, there was some non-serialized data in there, possibly from a previous code version.

All I did to fix it was to look through my civicrm_settings table and saw a lot of entries for the name 'navigation' with a non-serialized string, and removed them (they were in the Personal Preferences group and were all the same, so it seemed innocuous).

For your case, you could find all the entries with a value length bigger than 20K and it'll probably be evident.

I suspect you might be misusing one of your fields/features.


What exposure would my CiviCRM campaign receive? I was preparing to create a GoFundMe page for an project at an orphanage my son runs in the Philippines, and someone suggested I use CiviCRM instead.  I am not at all familiar with CiviCRM (or any CRM site), but I am familiar with GFM.  Would CiviCRM be better in any way, and if so, how?  I know I can get a lot of exposure on GFM and it has several similar pages to what I would create that have been very successful at fundraising.  Can anyone sell me on using CiviCRM instead of GFM?  Thanks!

GoFundMe and CiviCRM are very different things.  If you want to build your own fundraising platform like GFM you might start with CiviCRM but if your interest is just to raise funds for your son's orphanage then GFM or similar is a much easier route.


How to add Option Group to Event Online Registration? I've made a new Option Group, but I'm struggling to add it to the Online Registration of an Event. How can I do this?

As an example, say I've created an Option Group to record a Participant's favourite colour for an Event. I can see that an Event's Online Registration includes a Profile. The Profile is made up of Fields. These Fields are made up of Options Groups. I can't seem to find how to associate Option Groups with Fields. I'd greatly appreciate any help!

Shaun, Welcome to CiviCRM SE,

You will need to

Add a custom group extending participant (CiviCRM >> Administer >> Customize Data and Screens >> Custom fields)
Add custom field of type select/radio/checkbox in a custom group created in #1.
Include this custom field in your profile which you are thinking to include for event.

Note: Custom field UI doesn't provide option to select existing option group which is not part of any custom field, you can either re-enter the options again or save the form without options and using api/sql update the option_group_id(with the option group id you have already created) column in civicrm_custom_field table for custom field you created at #2.

Thanks

Pradeep


How to enter an activity ID in the API Explorer? I know the numeric IDs I want to query, but I can't enter them. e.g. on entity ActivityContact, I want to use the Contact ID params, and the Activity Id.

(I'm wanting to issue this request, which will only give me back what I already know, as a way of validating that the record exists.)

On the Contact ID I get a Contact search, but I can't figure out how to bypass this to enter the numeric ID. It's not such a problem because I can always go look up the contact's name and type that in and select it.

But I'm flummoxed by the Activity Id selector. I know the Activity Id I want, but I can't type a number in (it says not found), but I don't see what I would type in to locate it any other way?

Is there a way to override those new GUI elements (old explorer provided a workaround)? I tried using 'other' parameter and entering activity_id manually but it's too clever and noticed this and presented the GUI again!

(I can run this in code, but I'm trying to get in to the much promoted habit of using the explorer for answers first and wondered if I was missing something.)

Thanks.

To answer your different questions:

  I don't see what I would type in to locate it any other way?

You would locate it by typing in the activity subject. Admittedly, this isn't perfect because some activities might have no subject, and therefore can't be located via autocomplete.

  Is there a way to override those new GUI elements

Update: now the answer is yes :)
As of CiviCRM 4.6.9 an EntityRef in the Api Explorer will accept any integer.


Hosting a paid event with a member ticket and a non-member ticket Consider the following situation. Martin is a member of our non-profit organization and would like to register for a seminar that we host. We offer either a member ticket of $150 and a non-member ticket of $250. Obviously, Martin opts for the member ticket. How does CiviCRM control whether Martin is indeed a member and is allowed to register for the $150 ticket?

You could use the cividiscount extension and set up automatic discounts of $100 on the relevant events based on membership.  Non-members pay $250, those with the automatic membership discount pay $150.  Members need to log in before booking so that their membership status is known.


For events that require participant approval, where do I change the pop-up message? We have a free event that requires participant approval. We are manually approving and sending confirmations to those who are allowed to attend, however there's some confusion because a message pops-up during the process that says they will receive an email to complete their registration, and that doesn't happen (we don't need it since there's no payment and we've already collected all information). We already have this option turned off, but the message is confusing registrants. Where do I find this message to edit/override it?

Screenshots of the message below, which displays on the Confirmation page and the Thank You page:

Sounds like a job for grep. Use grep -r "Once approved, you will receive" templates in your civicrm folder, and it will tell you it's templates/CRM/Event/Form/Registration/Confirm.tpl. Similarly grep'ing for the other one it's in ThankYou.tpl in the same folder.


membership source field not displaying in reports or exports sometimes When doing a find or an export,  the 'source' fields for memberships is blank for some records. For the records where it displays, its obviously been populated automatically when the membership is set up offline. For the records where it is blank, if I view the record, the value is there and is the same automatically created values as the ones that did display. If I edit and then save without making any changes, then that membership behaves as it should.

I'm using CiviCRM 4.7.24 but can't see anything in subsequent release notes that relates. It would be difficult to try on the demo system because most of the registrations come through correctly.

The fact that the record displays correctly on save suggests that there's a difference between how correct and incorrect values are recorded in the MySQL database.  I've seen this happen on multi-select custom fields when you import values with a comma rather than a value separator.  The field LOOKS ok, but it's not stored correctly - but on save, the form corrects the data.

If you view the underlying MySQL table in a tool that supports showing hidden characters, I'm guessing you'll find one missing (or present) in the incorrect records.

UPDATE: To see if you can view hidden characters, try inserting one into the database.  E.g.:
INSERT INTO civicrm_worldregion (name) SELECT CONCAT('a', UNHEX(01), 'b');

If I view that in the MySQL CLI client, I can't see it:

mysql> SELECT name FROM civicrm_worldregion ORDER BY id DESC LIMIT 1;
+------+
| name |
+------+
| ab  |
+------+
1 row in set (0.00 sec)

I also can't see it from my command line:

~/ » mysql temp -e 'SELECT name FROM civicrm_worldregion ORDER BY id DESC LIMIT 1'
+------+
| name |
+------+
| ab  |
+------+

However, if I pipe to vim then it appears as:

name
c^Ab

That ^A is in blue, which indicates it's not actually "caret then A" but rather "control character 0x01".


Thinking of Creating MobileAPP for CiviCRM I am thinking of creating a MobileAPP for CiviCRM using IONIC Framework

Before I start just need to ask. Do we have any MobileAPP that works for CiviCRM? (I know we can view on mobile phone using themes)

Also Need some help for my first Phase- (everything will only be read only)

I am thinking of displaying - Contact, membership and contribution details

What are the details we can display?

I am thinking of releasing the Mobile APP to community

Any suggestion / comment will be much appreciated

Thanks

Per Demerit's comment - there has been a new App developed as described in this blog


How do I identify the right .php page Trying to modify the template and translate some hard coded Strings on Drupal 7, I couldn't really easily find the architecture of a page. With the debug mode I can read in the code which .tpl is being used but nothing for the .php files.

Is there something like that in the documentation that I haven't yet found? or somewhere else?

Sometimes you can get clue from .tpl file form view source page. The other option is to find the page callback of the the url. Each CiviCRM url defined in menu xml file has a callback. The page callback gives the clue which file is being invoked. For eg civicrm/activity/view

If you a grep 'civicrm/activity/view' on CRM/ and open the xml file you will see something like this

<item>
     <path>civicrm/activity/view</path>
     <title>View Activity</title>
     <page_callback>CRM_Activity_Form_ActivityView</page_callback>
     <access_arguments>access CiviCRM</access_arguments>
  </item>

Which means the file CRM/Activity/Form/ActivityView.php is called in this situation.

HTH

Pradeep


How can I detect potential duplicates in a CSV I want to import? I have a list of about 1000 contacts I'd like to import.  Unfortunately, there's no definitive way of linking the people on my spreadsheet to the contacts already in the database like an external identifier.  So I'd like to generate a list of potential duplicates so I can go over them by hand.

Does anyone have a good way to accomplish this?

I like Allen's answer but it seems there should be an approach at the point of import that would work. Esp if you had a gazillion contacts in the db already. Is the issue here is that the potential matches are more complex than any matching rules?

If there is a Matching Rule or a series of them that can work for you - then start with the loosest rule and then rerun and tighten them - and set your import to SKIP.

Eg, if you first run the import with First Name match, then every record that has a matching first name will be reported back to you. Then run it with eg First AND Last, or First AND Phone etc.


Adding a Privacy Option For the contact field Communication Preferences> Privacy

How difficult would it be to add a new option "Do Not Voicemail"

One of our clients is a counselling service. So this would be useful for them.

They have a stopgap solution usign other custom data fields- but this is in a separate section of the record to the communications info.

What is the process for making requests for this kind of amendment in core?

Is anyone able to pitch a rough cost?

Would this feature be useful to anyone else?

If I can get the client's approval I can look at the Make It Happen process.

You could do this fairly easily with the Contact Layout Editor extension (assuming you're on CiviCRM 5.x).

Use the extension to remove the existing Communication Preferences block from the Summary page.
Build a custom block that includes the normal communication preferences fields plus "Do Not Voicemail".
You'll probably want to remove "Do Not Voicemail" from the custom field block in a similar manner so it doesn't appear twice.


Unable to delete contacts permanently I have an org that has split into two. They already were working with two payment processors -> we're all sorted out - contacts and contributions have been migrated over into the spin-off CiviCRM database.

What we can't do is permanently delete the Contacts that have been moved into the spin-off CiviCRM database, because "This contact(s) can not be permanently deleted because the contact record is linked to one or more live financial transactions. Deleting this contact would result in the loss of financial data".

And that's ok with us as we've got all that into their spin-off CiviCRM database now. In fact right now we have double the monies. Is there any way around this - via the GUI?

You can turn off this check by setting hidden setting 'allowPermDeleteFinancial' to TRUE either in civicrm.settings.php or using api explorer

global $civicrm_setting;
$civicrm_setting['CiviCRM Preferences']['allowPermDeleteFinancial'] = TRUE;

or

HTH

Pradeep


Event contribution summarized by price set We use price sets for all of our events, and make extensive use of the price set header to display a "call to action" asking people to give generously/consciously/etc.  We have a variety of wording for these, and we would like to do some A/B testing and measure results.

What I would like to do is use database queries or the Pivot Report extension or even Google Data Studio to create a view showing how effective a particular price set is.  (The price set is a proxy for the call to action.)

I'm having a hard time getting contribution amount per event or per price set.

I can get total contributions, but I don't seem to have a way to link contributions to individual events.
I can't figure out how to get the price set from event data.

Can anyone help me figure out what fields I need to link together in order to be able to get something like "sum of contributions for events by event price set"?

Thank you

Edit:
A few more details on our use case:

All of our events are by donation.
We use the header portion (pre-help text) of price sets to provide a call to action, encouraging the user to make a donation or to make a larger donation.
We have a variety of call to action text samples, and we are developing more.
What we are looking to analyze is how effective our different call to action text samples.  Which ones drive donations up?  Which ones are less effective?  Which ones turn people off?

Definitely open to learning about other ways to manage and measure this rather than using price set help text.

There’s a custom search available in CiviCRM called Price Set Details for Event Participants which may be of use for your enquiry.

Search > Custom Searches > Price Set Details for Event Participants

/civicrm/contact/search/custom?csid=9&reset=1

This search allows you to filter on an event and also gives you an option to export your results.


Import Fails After Reporting Success I am trying to import 200 activities to contacts and the import shows that all records are imported but if I go to the contact and look at their activities it is not shown.

Any help is appreciated.

Thanks,
Steve

I had about 25 fields I was skipping in the import map. I deleted these fields and it worked like a charm.


Online Registration not able to be enabled Installation Details

WordPress 4.7.3
CiviCRM 4.7.17
CiviVolunteer 4.6-2.2.1
Angular Profiles 4.6-1.0.2
SparkPost 1.1 (verified working)

Problem Description
I have a CiviEvent set up. I check the box to Allow Online Registration, and after filling everything in, it won't allow me to save the changes. It tells me that I need to select a profile, but the section under "Include Profile (top of page)" there is no form field, no popup, nothing. I tried turning off CiviVolunteer to see if that was conflicting, but no dice. I do have profiles created, but none are showing. (Again, no text field, no popup, etc.)
EDIT: Added Screenshot

@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!


multiple organizations? we downloaded and installed civicrm a few years ago, and have a recollection of being able to manage multiple organizations through one installation... is that still "a thing"? We are envisioning creating a central arts database in our community and collaborating more closely on fundraising among all the arts organizations who would like to participate.

we would, of course, want to be able to keep the contacts (and donations) for each organization separated, and track which org referred which donor to who...

please advise if i am completely delusional :)

A lighter-weight solution to this (imo) is to use the Permissioned Relationship approach, which can be used to limit User A - who has a Permissioned Relationship to Organisation A - to only access Contacts that Org A has a permissioned relationship over.

This deploys very well without the wiring involved in multisite (imo) and hence is more approachable for 'beginners' (and for advanced folk who need a lighter weight solution.

Beauty of this solution is that it can scale really easily afaik. And for Drupal sites, together with Webforms and Views and whatnots can let delegates of Orgs manage their contacts without actually ever needing to set foot on the civi side.


Contacts not appearing on mailing labels Have a strange situation where 2000 contacts have been imported with address details. The addresses look fine but when you create a mailing label neither the contacts nor the addresses chosen appear. But when you go and edit/save the contact that contact does then appear on the mailing label, V strange.

I've tried clearing caches and I also though the scheduled job 'Update Greetings and Addresses' may be connected but this made no difference. Something happens when you save the contact but I can't see what it is.

Olly

This was due to an import bug. During the import some contacts were set as deceased (value 1). The remaining contacts were then set to null by the import tool. But all the elements like Do Not Email if Deceased require a value of 0 for the deceased field. So they wouldn't show on the mailing labels as the system thought they were deceased. A simple export of all individuals (contact ID and deceased value), remove those who are deceased and re-import with a value of 0 on the deceased field solved the issue. –


Deprecated function in CiviEvent error logging (Drupal 7) Running Civi 5.10.4 and Drupal 7.65.

One of our staff reported that they received an error message when they tried to send out a mailing to attendees at one of our events, through CiviEvent > Email all participants.

She sent out the email at the same time that our monthly newsletter was going out (2500 contacts), and we have a limit set on how many emails are sent per hour. (Settings are below.)

I checked Drupal error logs and found this log but I have no clue what it means:

Deprecated function CRM_Event_BAO_Event::checkPermission, use CRM_Event_BAO_Event::getAllPermissions. Array ( [civi.tag] => deprecated )

I'm thinking our staff member got an error message because she sent out the email at the same time that we had our newsletter queued for delivery, but haven't been able to find any confirmation of this (or any information on why her CiviEvent email to 12 people wasn't just queued to be delivered after the newsletter was delivered).

Would appreciate help on interpreting that error message, or modifying settings so that this doesn't happen again. I guess a workaround solution is to ask staff not to send emails out at certain times to allow the newsletter to go out, though ideally I'd be able to do this without affecting other staff member's workflows.

EDIT: The adjacent error messages are as below (with a variety of referrers, all 'page not found' errors):

sites/default/files/civicrm/css

That message shouldn't affect your usage of CiviCRM.

A deprecated function is typically one that works, but is no longer recommended for use.  The message is only applicable to developers.

To take an example with a visible component: You may have noticed that CiviCRM has two different calendar widgets.  The older one isn't accessible to folks using screen readers (i.e. Braille or text-to-speech).  However, each date field needs to be converted separately - a lot of work!  Rather than do them all at once, we have both calendar widgets in CiviCRM, but the first is marked "deprecated" so folks are warned not to use it in new code, and to remove it from old code when they touch that section.  In time, that code will be removed - but for now, it works as it always has.

Unless you have an extension that uses this deprecated function, there's no action you need to take.  While it's unlikely you have an extension that uses this, you can double-check by searching your extensions directory for the text CRM_Event_BAO_Event::checkPermission.


How to generate a receipt when Pay Later contribution is received I am using a Contribution page to take payments for Memberships, and wish to use the 'Pay Later' option.  I can set this up and it records the contribution OK, and a administrator can record the Paymant when it arrives, thus actually starting the Membership.  However:

The system emails the user an Invoice when the Contribution page is completed, but I cannot get it to send a Receipt (or anything else) when the payment is confirmed.  Apart from anything else I want to (automatically) send an email at this point which will act as a membership card.

I have also tried the CiviRules extension, but can't find an appropriate combination of Trigger and Conditions to get the right result - i.e. only on Pay Later (Card payment generates a receipt immediately, fine), not if the administrator does the whole process off-line, and covering both initial Membership Payments and Renewals.

Thank you.

There are 2 ways of recording a pay later contribution

Find related contribution, click on more link and then record payment. Or on view contribution page click on 'Record payment link'. Fill in the details and tick 'send receipt' checkbox.

Edit the contribution and change the status from pending to completed with 'send receipt' checkbox ticked.

Note: #1 is a new method for recording pay later payments and will be same in coming days however #2 will be removed in future.


Report with calling form A user handed me a printed sheet from a previous database and asked me to recreate it. It contains contact information, a list of contributions, the most recent memo, and several blanks to be filled in during a renewal call (call response, pledged donation, written notes, some checkboxes, etc.). And it must be printed as a hard copy.

So I think what I'm looking for is a way to combine report data and fill-in-the-blank fields in one sheet. The "Constituent Detail" report works well for the former, but I'm stumped on getting the latter included on the same page. Anyone have a clever suggestion?

Go to Administer > Communications > Message Templates
Add New Message Template
Give your message a title
Insert the tokens needed to get the donor info needed.
Add the bottom fillable response card.

Here is a very helpful posting about this https://github.com/civicrm/civicrm-user-guide/blob/master/docs/contributions/manual-receipts-and-thank-yous.md


Dashboard Issue after attempted Installation on Wordpress 4.5 Attempting to install CiviCRM 4.7.6 on WP 4.5. Plugin activates fine. All checks on Installation screen are fine/OK.

On finish, there was a note about "Cron not running", but no error that was obvious.

The civicrm.settings.php file is not present in the installation.

When I click on CiviCRM to view the dashboard - It opens, but does not display the dashboard and no menu. None of the links go anywhere.

Any help is appreciated!

Near the bottom is an error message:
Powered by CiviCRM 4.7.6. System Status: Error
The Error link is a dead end/circular to the same page.

The civicrm.settings.php file is not present in the installation.

you can use the command "locate civicrm.settings.php " on your command line  to see if you can find it because on wordpress you can have the settings file floating somewhere probably and the installation cannot run to completion if the settings file is not there "( so i think )"

you could also get to see some compatibility issues which have been stated Wordpress plugin incompatible with CiviCRM  to see if you have an issue related to those.

If it takes so much time, you can take a lesser time to follow this Installing CiviCRM on wordpress which is very explicit and well elaborate


How to create a hook in an extension? I want to give others the chance to do something when certain events happen in my extension.

So to be clear: I'm not wanting to use existing hooks in my extension, I'm wanting to create a new hook that my extension will invoke and other code may choose to react to.

I couldn't find anything in the developers' guide about this. Looking at the source makes me think that maybe I should be doing something with CRM_Utils_Hook or perhaps \Civi::dispatcher()->dispatch('hook_my_new_hook', $some_event_object)?

Is there a standardised way to do this? Are there any good examples?

EDIT
This answer is now deprecated, you should use @bgm's answer instead.

All thanks to the code example link in Eric's answer here's a simplified example of how to offer up a hook (my_new_hook) which takes one argument, $the_argument:
CRM_Utils_Hook::singleton()->invoke(
  1, $the_argument,
  $dummy, $dummy, $dummy, $dummy, $dummy,
  'my_new_hook');

Then other extensions can include functions like
function myextension_my_new_hook($arg) {
  do_something_with($arg);
}

The $dummy is just because we must pass a variable (since it's passed by reference), but this hook does not need it. If you had a hook that took two arguments, you'd use 2 in place of 1 and replace the first $dummy with your actual second argument etc. up to 6.
Nb. this code assumes CiviCRM 4.5+, but obviously you're not using anything older than that these days, right?!


CiviCRM 4.7 - Showing Empty home page in wordpress editor I installed CiviCRM 4.7.31 in WordPress for one of my testing purpose. After i activating the CiviCRM plugin, CiviCRM is proving a blank interface. Can i why the menus are not appearing and how should i resolve it ?

My currect PHP version is 7.2.24 and Wordpress version 5.4.1

These are the output of the console

Some cookies are misusing the recommended “sameSite“ attribute 4
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. admin.php
The script from “http://localhost/wordpress/wp-admin/admin.php?page=CiviCRM&q=civicrm/ajax/l10n-js/en_US&r=iLhO1” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.

SyntaxError: expected expression, got '<'

Short answer: that third line from your console means your page is failing to load some javascript that it (probably) requires to display properly.

You might be able to test this theory by adding "&q=civicrm/admin" to your url and see if it shows something.

My best guess is that your civicrm 'assets' (css/js) aren't being loaded properly due to some base url settings.


How can I tell what the query that is executing when I do an Advanced Search looks like? When I perform an advanced search I would like to see the query that is created based on the criteria I have chosen in the Advanced Search. Is there a way to see the query that is created?

In civicrm.settings.php, you can enable:

define('CIVICRM_DEBUG_LOG_QUERY', 1);

Then run the "Advanced Search" and look at the output in files/civicrm/ConfigAndLog/CiviCRM*log*. This will output for several queries; to avoid accumulation of junk data, you should probably disable the CIVICRM_DEBUG_LOG_QUERY after running the query.

There's some more discussion of this and other debugging techniques at http://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers


Migrating domain to new server. mysql migration Error 1881 Wordpress 4.3.1

CiviCRM 4.5.5

Old host: Apache 2.2.26 - PHP: 5.3.28 - MySQL: 5.1.73

New host: Apache 2.2.29 - PHP: 5.3.29 - MySQL: 5.6.23

My only export options on the old host are via phpMyAdmin or cpanel export on the old host. I basically get a data.sql.gz file.

When I do this in ssh on the new host:

mysql -u username -p -h localhost DATA-BASE-NAME < data.sql

I'm getting this error:

ERROR 1881 (HY000) at line 48: Operation not allowed when innodb_forced_recovery > 0.

What can I do with my sql file or from the old host's phpMyAdmin so that the data import properly into the new host?

It appears from this other StackExchange answer that the MySQL on the new server may be set to read only. Try opening the my.cnf configuration file for MySQL and changing the setting.


Add CiviDiscount code "field" to a particular event on site We are running several events and while I understand how to create the discount code for each event I am still wondering how one goes about adding the field, to the page, for the user to submit the code that was created.

That field just gets added to your Event Registration page if you've got everything configured properly!

Make sure you multi-select all Fields within all PriceSets (and or other options) that you'd like to attach the Discount to.


Can CiviCRM be used in a HIPAA context? I was talking to somebody over the weekend regarding a site that seemed a perfect match for CiviCRM -- including donations, event registration, contact/relationships, case management. When I mentioned that CiviCRM handled all of these things, their first response was that the case management features would need to be HIPAA compliant.

Has anyone used CiviCRM in a HIPAA context? If so, can you detail any special set up considerations and requirements that are needed?

Mostly. See

https://forum.civicrm.org/index.php?topic=7788.0

AND

https://civicrm.org/blog/charlescampbell/civicrm-civicase-ehremr-crisis-response-system

The part about who views records wasn't implemented from within CiviCRM, but depending on the definition of "your personal records" in your context it could just mean page hit tracking from within drupal, since it records the logged in user.


Change Event Report fee level filter so operator offers 'contains' rather than 'is one of' In the Participant Report there is a filter for Fee Level. The operator for this is either 'Is one of' or 'Is not one of'.

Is it possible to provide users with the option to search with the operator: 'contains'?

The behaviour appears to be the same in the normal participant report as well as in the Extended Report Extension's participant report.

The reason we want to do this is because we want to make participant lists for each of the various options in our price set.

We're on Civi 5.3.1 and Drupal 7.58. Thanks

Yes, Its possible to do it using hook_civicrm_alterReportVar hook. You can create your own filters using this hook.


Three self-canceling financial transactions for a single recurring contribution? For recurring contributions, I am getting unusual results in the civicrm_financial_trxn table. Three very similar entries are created for each contribution, two of which cancel one another out.

Am I failing to grasp something about double-entry accounting, or are two of these records simply unnecessary?

Or perhaps my financial types are configured to do weird things. Perhaps there should be three entries, but at least one account code other than 1150 and 455-11 should be in play. If this is the case, how do I go about identifying the culprit financial account?

Below is a screenshot from the Bookkeeping Transactions Report:

Some notes:

It's probably not sensitive, but I've changed the transaction number out of an abundance of caution. Note that the original number was the same for all three rows.
Note that the first and second rows cancel one another out (the amount in the second row is negative).
Note that the payment method is blank for the third row.

Below is a screenshot of the civicrm_entity_financial_trxn entities that feed into the report:

Possibly of note:

There is a four-second delay between the first record and the other two.

System Details:
CiviCRM verion: 4.7.29
CMS: Drupal... ahem... 6
Payment processor: Authorize.net

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.


Error loading module file () - Wordpress I have just upgraded a CiviCRM install on Wordpress. Went from Civi 4.5x to 4.6.5. The site uses L10n (EN / FR).

I had two error messages when I first finished the upgrade. One was:

"civicrm Unknown extension: net.ourpowerbase.sumfields"

That one seems to have resolved itself.

The other is:
"Error loading module file (). Please restore the file or disable the module."

This error appears both in the admin area of CiviCRM and on the front end where profile forms are used.

I have no idea where to start looking to fix this! I found one post about drupal, but that didn't help.

Any assistance would be greatly appreciated.

Thank you.

This typically happens when either a) an extension is deleted, or b) the location of the extension changes.

First, make the easy fix.  Go to Administer menu > System Settings > Cleanup Caches and Update Paths.  Press "Clear Caches", and reload the page TWICE.  Hopefully that fixes the error.  If not - check that page and make sure the paths are 100% correct.

If that doesn't work, go to Administer menu > System Settings > Manage Extensions and look for anything amiss.  Take special note of missing extensions - see if they're actually missing in the file system.

This should get you all cleaned up, or at least on the right track!


Event Attendance tracking We want to use Events functionality in Civi CRM . As part of our requirement we need to provide attendance for tracking.

Is there a way to track attendance of event participants ?

Participant records have a status field, and one of the standard statuses is Attended, so yes. And you can search for participants with a certain status and reports can include the status.

See also https://docs.civicrm.org/user/en/latest/events/keeping-track-of-events-and-participants/#changing-event-registration-selections-for-an-existing-participant

and

https://docs.civicrm.org/user/en/latest/events/reports/#event-and-participant-reports


Sync WordPress users to Organizations instead of Individuals? We're using the WordPress integration of CiviCRM.

When we create a new WordPress user, civiCRM creates a new Contact - Good.

However, when it does this is creates an Individual type Contact. I want civiCRM to create Organization type Contact when I create a new WordPress user.

Is this possible? If not, am I able to convert Individuals into Organizations? I've seen an extension for it on the site but didn't know if it worked well or if there were alternatives.

Thank you for any advice

I have used the Contact Editor extension to change households to individuals.  It should change individuals to organizations but I have never tried this.

I can't speak towards changing CiviCRM contacts synced to WordPress users.  This could have an adverse effect so I would proceed cautiously.


Ability to add International Addresses Currently, I'm unable to add anything except for U.S. addresses. I'mm using Civi 5.2.3. How can I add international addresses to existing contacts? I've tried Administer menu » Localization » Address Settings but am not able to add a country from there or on the edit page of each contact. Thanks!

You have to set the available countries in Administer>Localization>Language and Currency.


Enforcing the uniqueness of fields/entities (e.g. phone numbers) I'd like to ensure that phone numbers of a certain type (let's say Mobile) are unique across our Civi instance. A given contact should be able to have no more than one Mobile number, and no two contacts should have the same Mobile number. We'd still like to take advantage of Civi's existing infrastructure around phone numbers -- in other words, we don't want to use a custom field instead of the phone number entity.
Ideally, the uniqueness rules would be enforced when data comes into Civi. But there are many ways that data comes in: backend forms, contribution pages, event registration forms, import, api, etc. If we wanted to alert users about duplicates during the various GUI-driven workflows, and also handle situations where a user isn't directly controlling the process (e.g. automatic syncs using the api), we'd need to create several different mechanisms.
Has anyone tried to do this, particularly with something like phone numbers which have a many-to-one relationship with contacts? (A question from 2015, Enforce uniqueness of custom field, is related, but I'm asking a broader question. Civi and its ecosystem of extensions have also evolved in the last 5+ years.) Are there best practices for enforcing uniqueness of a field/entity in CiviCRM, in a way that gives users a chance to correct duplicates during data input whenever possible?

I think hook_civicrm_check with the following SQL would handle notifications of duplicates:
SELECT phone FROM civicrm_phone GROUP BY phone_numeric HAVING count(*) > 1;

For back-end forms, you could modify the Supervised dedupe rules, though this wouldn't catch non-unique numbers belonging to different contact types.


CiviEvent Access Code on price set Civi 4.6.4 / Drupal 7.38

Goal: Require users to input an access code in order to register for an event.

Use Case: Athletes are encouraged to sign up for events before the registration end date, however, there are often exceptions.  We currently use access codes to allow for those exceptions.  The athlete must contact the coach, who can then provide the code so the athlete can register.  Similar to the approval process within Civi, however less of a burden on the coach (he can manage simply via email) and also easier on athlete as they do not have to request, wait, then register and pay.

Our current solution (outside of civi) implements these codes at the equivalent of a civi price set.  This seems a logical place, as it can work cohesively with start/end dates (ie. The code is required and shows up only after a "standard" price set expires.

Before I build, has anybody solved (either in a price-set or in another way within Civi?)

Thanks,

--Ken

This is an interesting use case!  I can see the advantages over the approval workflow.

If I were asked to do this, I'd probably:

Create a custom field "approval code" on the event;
Use hook_civicrm_buildForm and jQuery to hide the page except for an approval code submission field;
When the entered code matches the stored value, show the page.

This isn't completely foolproof if you rely too much on client-side jQuery though.

If you decide to go the price-set route, you might want to use CiviDiscount instead.  The "discount" code can be the approval code.


Price Sets for different groups I've installed the group based pricing extension and enabled it, however I can't seem to get it to kick in. The two extra fields that are supposed to show don't appear. I'm using 4.7.7 and Drupal. Has anyone managed to get this extension to work?

Do you mean this extension:
https://github.com/zengenuity/civicrm_groupprice/blob/master/info.xml

It's info.xml says it's compatible w/ 4.4 - I think that explains why you're having difficulty to get it to work on a 4.7.x

If this functionality is very important to you - the general guideline is:

contact the author of the extension
check with them on possible plans for an upgrade of the extension to a newer civicrm version
and what kind of funding it may take to get it there


cron setup failing in new Wordpress installaion New installation of 4.7.14 into a WordPress 4.7 site located in a subdomain (e.g. sub.domain.com) hosted at A2. Everything good except for the "Cron Not Running". Created a new WP user with admin privileges, but still get "ERROR: Invalid username and/or password". Happens when trying to run from the command line as well.

php /home/me/public_html/sub.domain.com/wp-content/plugins/civicrm/civicrm/bin/cli.php -s sub.domain.com -u WP-user -p WP-password -e Job -a execute

What am I missing?

I'm not sure about this but it sounds like a permissions problem and you may need to update the permissions in root/wp-content/plugins/civicrm/civicrm/bin/cli.php to be executable. Hope this solves your problem.


What contribution dates does the default iATS recur job process? Does it only run recurring transactions from the current day the job is run (by default) based on the 'next contribution date' field, or does it attempt to run scheduled transactions from past dates as well?

We ran a limited trial and experienced it running a few contributions from days prior to the current date.

The recurring contributions job will process all recurring series that have a status in progress and that are due or are past due (i.e. have a next scheduled contribution date either today or in the past).


Improve the speed of civimail I'm trying to be able to send as much emails as possible. Beside doing more stuff in parallel (eg run several cronjobs in parallel on separate batch of contacts), I'm trying to find a way to improve civimail

One easy win seems to use the smtp delivery mechanism and keep the smtp connection open for the duration of the batch. The library we use offers this option with keepConnection=true but I don't see it used in civimail

Am I missing something? Is this a path that has been explored?

I think at some point we did do that. However, we also noticed that some smtp mailers are not very good at reporting back errors and jobs would hang / not deliver email. We put in some code to get around that and periodically check for the connection to be alive and valid

We do check the 'persist' flag in the mailer library.Check

CRM_Core_Config::getMailer

for more details


How can I disable a reserved profile? I have a profile that was created by some user and and went into "Reserved Profile" List. The bots are attacking the profile and creating contacts, since the form is public facing and no captcha was added. The form also does not give a option to disable or delete or settings. Can anyone suggest how do I remove this form completely? If can be done using mysql which table and values should be altered?

Thanks

You can use api explorer(civicrm/api) to disable the reserved profile

or if you have access to database then run sql to update the profile

UPDATE civicrm_uf_group SET is_active = 0 WHERE id = 10;


Confirmation email - providing a WYSIWYG so users can add HTML-ified content? How do you go about having HTML in your confirmation email? I don't mean the part that you can edit under Message Templates. I mean the part that you can customized on each event's "Online Registration" tab. It shows as just a plain text box. I need to be able to add some html in that field so that there are some bolded headers in there.

I've included a screenshot of the spot that I mean.

Thanks!

EDIT: I mean a WYSIWYG editor like pretty much every other email box within CiviCRM has. Not hand coding since most people have no idea how to code HTML.

UPDATE: Ok, so I hit another snag on this. On the event's settings page for the confirmation email, I can manually input html. That's not great since the people using it don't know HTML, which means I have to do all the changes. But now I've found a second part of the problem - that same text is copied into the field when a registration is manually entered by an admin or where they finish a registration (like taking a payment over the phone and then marking an incomplete registration as complete). However, that field can't have HTML in it. Any text there gets sent out as plain text, even though the email it is inserted to is HTML. So people see the html written out for that section instead of it being in HTML.

You can put basic HTML in the text box you have pictured above. Bold  works for email clients. The majority of email clients don't support every type of HTML content you see on the web. Web browsers are able to display scripts, animations, and complex navigation menus, while your typical email inbox isn't built to handle this type of content.

Safe to use for most email clients:
static, table-based layouts

HTML tables and nested tables

template width of 600px-800px

simple, inline CSS

web-safe fonts


Performance Warning: Missing Indices. Mismatched Index Key Just upgraded to 4.7.23 and am receiving a Performance Warning: Missing Indices.

The warning states:

The following tables have an index key with a mismatch in value. Please delete the key indices listed from the below table and then click on 'Update Indices' button.

Then the following is listed

Table Name - civicrm_case_contact

Key Name - UI_case_contact_id

Fields - case_id, contact_id

I found the Table in my database with phpMyAdmin. Nested inside are Columns and Indexes. Inside Indexes is what looks like the Key Name of: UI_case_contact_id, and also something labeled: FK_civicrm_case_contact_id.

Will simply deleting UI_case_contact_id resolve this issue?

Or, do I need to delete the Field: FK_civicrm_case_contact_id?

Or is there another approach?

My Civi is definitely slower so looking to see resolving this would help.

Attached an image of the Table from PhpMyAdmin

Thanks in advance

Tim

I suggest you delete the UI_case_contact_id index as suggested by CiviCRM, and then refresh the system status page. It should then present a button which will automatically add missing indexes.


How to bulk renew membership We are a trade union with several hundred members paying their dues on a monthly basis. They pay via their bank or through check-off from their employer. We have to keep their contributions and membership status up to date.

We have membership status rules set up so that we know who is a financial member and who has lapsed.

My question is this: how to bulk import contributions in a way that will automatically renew the membership?

Batch data entry seems to achieve this - but it requires putting in the names one at a time.

Importing a csv file enables bulk import of contributions, but does not seem to automatically renew membership.

Using profiles does not seem to renew membership either.

So ... suggestions would be much appreciated.

We've done this sort of thing in our Direct Debit extensions. From memory if there is a recurring record and the membership is set to auto renew then it works fine i.e. renews the membership as needed. If you are a techie you could take a look at the code.


Blocking Double Click on Form Submit Button I have a pop-up that loads a form. Currently the user can double click the submit button on the form which results in multiple submissions. This can cause some serious issues depending on the purpose of the form.

Any suggestions on the best way to block double click of submit buttons on forms loaded within pop-ups?

I was able to disable double submission of the form by adding the following to the bottom of the form's TPL file:

{literal}
  <script type="text/javascript">
    // PREVENT DOUBLE SUBMISSION OF FORM
    CRM.$(function ($) {
      $(document).ready(function () {
        $('form').preventDoubleSubmission();  //block double submission of form
      });

      // jQuery plugin to prevent double submission of forms
      $.fn.preventDoubleSubmission = function () {
        CRM.$(this).on('submit', function (e) {
          var $form = $(this);

          if ($form.data('submitted') === true) {
            // Previously submitted - don't submit again
            console.log("Form Previously submitted - don't submit again");
            e.preventDefault();
          } else {
            // Mark it so that the next submit can be ignored
            console.log("Form NOT Previously submitted");
            $form.data('submitted', true);
          }
        });

        // Keep chainability
        return this;
      };
    });
  </script>
{/literal}


Wrong compiled [civicrm.files] variable in Resources URL My issue is [civicrm.files] variable in Resources URL contains full real absolute path on our server '/var/www..' etc.

It constructs as such:

https://www.website.com/var/www/wp-content/uploads/civicrm/

All variables in Upload Directories currently set as portable.

I'm using CiviCRM 5.14.3 on Wordpress 5.1

This usually happens when your site directory is using symbolic link. To fix the variables you will need to make sure that the docroot specified in apache/ngnix config should match exactly with $civicrm_root and CIVICRM_TEMPLATE_COMPILEDIR in civicrm.settings.php.

Try updating if its different and clear CiviCRM cache.

Cheers

Pradeep


Cron Job for WordPress on siteground I needs some help please, I am trying to set up a CRON job in the Cpanel of my Siteground hosting with the following string with the admin username and password for my WordPress install.

 /usr/local/bin/php ~/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s http://www.promedical.com.vu -u USERNAME -p PASSWORD -e Job -a execute

However is keep getting "ERROR: Invalid username and/or password<!-- deferred 0 scripts, deferred 0 styles & minified html in 0 seconds -->"

I have checked both multiple time and the username and password are correct, I am not where to from here?

any help would be appreciated

On Siteground I use the wp-cli method as I find that more reliable:

/usr/bin/wp --user=USERNAME --url=https://EXAMPLE.ORG --path=/home/CPUSER/public_html --timezone="PHPTZ" civicrm api job.execute auth=0

replace CPUSER with the cpanel username , USERNAME with your WP Username, make sure the url is your site's canonical url and set the php timezone (eg America/New_York)

you may have to login via ssh and do a which -a wp to dtermine the path to the wp-cli script.  It's always been /usr/bin/wp for me, but I would double check


Why does the link from Membership Dashboard give a search with the wrong results On Membership dashboard you can click on numbers in right column to 'see details' but the number of results is different to that on the dashboard.

This may also affect other Dashboard click-throughs such as on Events.

The url is /civicrm/member/search?reset=1&force=1&status=1,2,3&type=1&owner=1

which suggests the results should filter by Status and Primary but the Status filters are not applied on the search, hence you see 'all' results, rather than just the New, Current and Grace.

Have added a Jira issue for this bug and hope to provide patch at some point.


Report or export in xml format I work for a small nonprofit. Our funding body previously required reports in csv format. they now want them in xml. Of course they are not providing any funds!
Can this be done via a custom report or would it be an extension?
Would Drupal views combined with the views Data export module work?
any assistance or pointers greatly appreciated

As you've noted, your best bet is to use Drupal to generate the XML (whatever shape that might take as Alan Dixon commented).

Views Data Export, Views Datasource or Services Views will work if you require the flexibility of Views filters, etc.  It really depends on what data need to be in the reports.  As Eli noted in the comments above, using Services by itself could work, but depending on how the data is coming in, a Views solution is probably your best.

Another module to consider (again, depending on the data you need) is CiviCRM Entity. It will open up a lot more CiviCRM data to Drupal Views.


How can I restrict a users ability to edit a custom field I am trying to restrict a set of users to edit specific fields. The fields I want to restrict are all custom fields (but it would also be useful to restrict edit privileges on standard address fields).

I am going round in circles on Wordpress user accounts/permissions, ACL roles, profiles, groups etc.

So essentially i want some fields editable, others view only.

Unfortunately I don't think this is possible through the UI. As far as I know the ACLs for custom fields only have a combined view/edit permission - it's both, or nothing. Similarly I don't think it's possible to hide address data out of the box.

If you wanted to stop them viewing the custom fields altogether, you could turn off their access to custom data, then create ACLs for any custom fields you do want them to see:

Assign the users to a particular role within WordPress. By users, I mean the WordPress users - so the usernames they use to log into the website.
Go to WordPress Access Control and make sure they don't have the 'access all custom data' permission
Create a new group in Civi with the type 'Access Control'. Add the Civi record of all the above users to it (Each user login should have an associated record in Civi)
Go to 'Users and Permissions' -> 'Access Control' -> 'Manage Roles' and create a new role. For example, we have 'Office users', 'Home users' etc.
Go to 'Access Control' -> 'Assign Users to Roles' and assign the group from #3 to the role in #4. You could add multiple groups to this role if you wanted.
Go to 'Access Control' -> 'Manage ACLs' and add an ACL. Use the role from #4, the Operation 'Edit', the type of data 'A set of custom data fields', then select the appropriate custom fields.
Remember that these users will only be able to access the custom fields that you specifically allow them to on this screen. So you may need to create multiple ACLs, and create new ACLs when you create new custom fields in future.

It's probably worth playing around with ACLs just to check there's no way to set a view-only permission, just in case the functionality is there but the UI hasn't caught up.

It might be possible using permission hooks, though - I'll leave that for someone better informed than me.


Error uploading CiviCRM contacts. Can I revert? Does anyone know how I can revert a contact import (via the upload contacts script included in the site). The process included merges with existing contacts.

To revert an import done with the import functionality at Contacts > Import Contacts, you will need to restore from your backed up database file. As far as I know, there is no automatic "undo" on imports.

To your point, it might be worthwhile to add a new warning to the import "Are you sure" verification message that pops up right before the import fires:

For example, "Are you sure you want to import now? Be sure you have backed up your database as there is no 'undo' for this." (Update: I submitted a patch so if the core team agrees this will be added in future versions)


Custom fields not showing in import and export filter I have two sets of custom fields related to two sub-types of the same type (organization). Both profiles are active and I can see the custom fields in the contact summaries and in the advance search tool.

If I want to import a file and try to map fields choosing the proper sub-type, in one case I have the custom fields proposed and in the other case not.

The field mapper also shows the right relationships related to each sub-type.

I compared parameters for the custom fields and I can't see any difference.

Is this to be set somewhere else deep into CiviCRM?

best regards,
Guillaume

EDIT 1: the required custom fields are searchable:

EDIT 2: I can see the same difference when I try to export contacts and select the custom fields.

EDIT 3: I also encounter this with custom fields for Individual type.

Deleting the custom fields sets and creating them again solved this issue. :-{


What's the right way override the default source on a contribution page? If I add this to the inbound link: https://mysite.org/civicrm/contribute/transact?reset=1&id=1&source=facebookcampaign123

Will my source addendum be added to the contribution record?

One of our clients has done something similar to this answer:

How can I pass in the contribution amount via URL?

but using a campaign selector or a custom field on the contribution page. Not sure from memory whether they did it with JS or Smarty, but the end result was an invisible field which tracked this.


Token Example Module I am working on an extension that is going to use a custom token from Drupal content. I found the great example blog post from CiviCRM 4.1 but it appears that in CiviCRM 4.7 tokens switched to using Civi\Token\TokenProcessor. I have looked at a few extensions that do not appear to be using this model. Is there a good example (other than the documentation) of the new model.

Thanks,
Josh

I think it's fair to say the new Civi\Token\TokenProcessor model is still evolving, but the older method still works and is the easier option for now unless it is not sufficient for your needs.

You can find a range of extensions doing things with tokens here


How do I add to the Wiki? I have been learning a lot about bugs and issues with CiviCRM with my recent install on Wordpress.  There are areas of the Wiki, such as WordPress plugins/themes incompatible with CiviCRM that I have some workarounds to contribute.  However, I am unable to add them to the Wiki, could someone help me figure out what I am doing wrong?

When I try to login to the Wiki, I get the following error:

"Sorry, a network error occurred trying to log you in. Please try again, and contact your administrator if the problem persists."

Expected behavior

If everything is working correctly, you should be able to edit the wiki by (1) logging in, and (2) clicking on an "Edit" link that displays with a pencil icon to the right of the green page title.

Getting help from an administrator

If you can't log in or you don't see the "Edit" link after logging in, then something might need to be fixed with your account or with the whole wiki. In this case it's best to ask one of the administrators for help by doing the following:

Log in to Mattermost
Go to the infrastructure channel
Post a message in that channel with the problem you're experiencing. Include your wiki username (if you have one) in the message. This is a relatively low-traffic channel that's monitored by administrators who will see your message soon, so there's no need to issue any notifications in your message.


How to get the WordPress Username in a contacts or membership export Is it possible to include the WordPress username in the export of contact & membership details? We would like to include it in a mailmerge for new members who joined by post.

Thanks

Steve

This isn't possible with the built-in export, no. Do you have sql access to the CiviCRM database? The connection between CiviCRM and the CMS is stored in the table civicrm_uf_match.


Is CiviHR an extension or a separate application? Hello I am interested in CiviHR. Is this an extension of CiviCRM or should this be a separate instance?

I see here it has to be a separate installation. https://forum.civicrm.org/index.php?topic=33429.0

I tried to find the demo, but all of the links to the demo sites I have found do not go anywhere. Is there a live CiviHR demo available somewhere?

When I last looked at CiviHR, it uses CiviCase's functionality to achieve to a lot of things. So having it as an extension on CiviCRM would cause conflict. It is designed to be a standalone application.

Demo links are indeed broken, you can signup for a demo here


What are best practices for bad postal addresses? I work with a number of organizations that do a lot of outreach via postal mail. What is the best way to handle the bad addresses when returned mail is received? I do not want to simply delete the address as there may be a need to easily reference it in the future (for NCOA updates or to avoid re-adding it from another source).

There doesn't seem to be a way to simply mark an address as bad or inactive like the On Hold field for emails. One idea I had would be to just use a new Address Location Type but I'm wondering if there are other approaches.

I think a location type of something like "Rejected" will give you great flexibility. If you want to get a bit more elaborate, combine the location type with a custom field that tracks the reason for nondelivery.

By using a location type, it simplifies searching, exporting, and importing when you want to run those addresses through NCOA or have a user work through a spreadsheet of bad addresses. When good ones are found and it's time to import, use the API csv Import GUI extension so that you can overwrite the address records, change their location type, and wipe the custom field in one pass.


wrong currency on contribution pages - how to correct? I have set default currency to GBP, created memberships with GBP amounts, and set GBP as the currency within my contribution page.

But membership fee displays in USD on the contribution page and when sending payees to paypal (my only payment processor) attempts to charge of a USD amount.

What am I doing wrong please?

thank you:)

Try re-saving the contribution pages so that the new default currency is updated. You can cross check the currency used for contribution page using api explorer, it might be helpful to track the error.

HTH

Pradeep


Card Printing Systems compatible with CiviCRM Can anybody recommend a membership card printing system which will enable printing of standard credit card sized plastic membership cards which will draw data from CiviCRM and add a photo to the card using a camera, in real time. The photo may optionally be then stored in CiviCRM if we so choose.

The other option to print Membercard is using  an extension developed by Webaccess Global which generates card in pdf format.

https://github.com/kurund/com.webaccessglobal.membershipcard


Issue with adding price field options to admin price field CiviCRM 5.1.2, Drupal 7.59

We're attempting to add a price field option to an admin-only price field, and we're getting this error: "You must choose "Admin" visibility..."  As you can see here (https://www.screencast.com/t/9n3VBhi9FTY ), I've clearly chosen admin.  I also tried choosing public on the off chance the logic got reversed.  (FWIW we've not been able to replicate this on the demo site; there are no error messages recorded in the log and no backtrace error was generated when I turned it on and tried again.)  The client was previously on 4.6.x; has any logic around price sets changed substantively?

Thanks in advance.

Can you try after upgrading CiviCRM to 5.2.1? It might be possible it was an issue with previous version of CiviCRM.

HTH

Pradeep


Profile search/listings not working in 4.6.3/4? I updated to the 4.6.3 version of CiviCRM for Wordpress, and discovered that I'm not able to bring up a listing/search page via the 'Use Profile-Listings Mode' - I get taken to a page on the front-end of WordPress with a message 'No fields in this Profile have been configured as searchable. Ask the site administrator to check the Profile setup.'

The listings/search option seems to work fine in the Drupal installation I usually use, which is on 4.6.2, but the problem does seem to happen in both the Wordpress and Drupal demo versions of CiviCRM 4.6.4.

As far as I'm aware there's only two places to set searchability - on the field itself, and in the Profile fields edit list. In 4.6.2, I get the error message if I forget to set the Profile fields as searchable, but when I edit them to be searchable, the search listing works fine - as far as I can tell, I've not done anything different when trying it in 4.6.3.

For a profile field to appear in the search settings, it needs to be:

Have the "is searchable" option selected
Have the visibility, set to: "Public pages and listings"

the latter is needed, so that everyone can see the fields and hence search on it.


Displaying a Views block with a CiviCRM-enabled webform As an alternative to "How can I display an info only field in a webform", we are displaying a read-only View block on a CiviCRM-enabled webform page via Context because one of the fields of the View block is an embedded View (via the Views Field View module).

We are linking to the webform from another view so that we can supply a Contact ID in the URL, allowing the webform to auto-fill with a contact's information.  Per the instructions for Generating URL arguments from Views, our link is as follows: /family-info?cid1=[id].

The link correctly supplies the contact ID to auto-fill the webform fields, but does not return any results for the View block that is on the page.  I confirmed that the View block is setup correctly because I can supply a contact ID in the View preview in the Views UI and the block information displays correctly.  There seems to be a difference between how the webform is reading the URL argument and how the Views block is reading it.  Any ideas on how to make the two work together?

Drupal 7.41; Webform 4.12; CiviCRM 4.6.6; CiviCRM-Webform Integration 4.14

After much trial and error, we discovered that the webform and Views block both populate correctly with a supplied link of /family-info?cid=[id].  By removing the 1 between cid and =, the View contextual filter works properly and the webform still auto-fills.  I don't know the implications if one were to try to have multiple contact id's, but for our purposes of only one contact id, this resolves the issue.


Way to display non-public events to employees Our organization has a variety of public events as well as private events. In many cases, I need volunteers/employees to see the private events so they can register to assist, etc.

Is it possible to have a means that when an employee logs into the website, the non-public events are listed in upcoming events?  I am somewhat familiar with ACL and have an employees ACL rule that works in other aspects. I would like a way to have the employee log-in and see all events.

I think you could do this with an additional acl.

tested this on a client's site and it seemed to work

But I don't know you exact needs, you might want 'all' instead of 'edit' in the form


Paste from Text and Paste from Word in WYSIWYG Editor Throws Error On CiviCRM 5.5.1 and Drupal 7.

When creating a Civimail, if you click "Paste from Text" or "Paste from Word" buttons in Google Chrome 70 (64 bit) you receive an error:

"Press Ctrl+Shift+V to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option."

How can we fix this or remove the buttons?

You can customize the CKE editor under Administer > Custom Data & Screens > Settings > Display Preferences, you can remove those buttons from the wysiwyg interface if you like.


What timezones should we use on the server and database? We run a Civicrm installation that spans a continent (a long way from UTC).

What is the best practice?

What time should our server be set to?
How do we manage user timezones?
What time should go in the database?

As long as your PHP and MySQL settings are correctly set (CiviCRM should warn you if they are not), you can set the server time to your preference. Using UTC for the server is probably more convenient on the long term, but it's not a CiviCRM requirement. For example, lets say you are in UTC-8, but next year a new sysadmin joins your team and is in UTC+6, UTC-8 will probably be pretty annoying (CiviCRM servers were initially on PCT time, before being changed to UTC).

The biggest issue with time in CiviCRM is with CiviMail scheduled mailings and with scheduled reminders.

If you are using Drupal or WordPress, CiviCRM should use the user's timezone settings and adjust time inputs/outputs accordingly. Otherwise you will have issues with the mailings not being sent at the right time (from the point of view of the user).

Eileen and Jamie have posted a good wrap-up of this issue here:
https://issues.civicrm.org/jira/browse/CRM-9683?focusedCommentId=67732&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-67732

There is one detail with the timestamp field type that I do not really understand. i.e. if it's necessary to convert the field so that the fixes already committed work. Hopefully someone else can chime in.


Import Multi-value Custom Data Fails for Household Contact Type The "Import Multi-value Custom Data" fails when importing data into a multi-value custom field set that applies to only a Household contact type or Household sub-types. When the field set was change to "All Contacts" the import works. I didn't test it with multi-value custom field sets restricted to "Individual" or "Organization" contact types. It may fail with these also.

The Import Errors file show "Invalid value for field(s) : field ID; ; field ID; ; field ID; field ID" as the reason for the error when four fields are imported.

We use CiviCRM for WordPress.

To duplicate this setup a simple multi-value custom field set restricted to Households. Then try to import data into it.

I think this might be the relevant JIRA issue
https://issues.civicrm.org/jira/browse/CRM-18959


How do you sync developments to a live site? Live site, customer has 100,000's of records of data.  Has been doing their own thing like editing message templates, users configuring dashboards, editing and adding reports and probably a whole bunch of things I don't know about.

In the meantime, I've been developing some new enhancements which include additional custom data, both in existing tables and add-on tables.  Some more message templates, a new dashlet and editing/adding reports.  Plus about 80 other items, some in code some in the database.

I happen to know where the dashboard table is, I know where the message template table is - but I don't know which version of each template to keep.

So the code part is easy, but how the hell are you supposed to synchronise the two databases?
There is no timestamps or other identifies in the records.
There is no way of identifying what changes have been made on the live site
There is no way of identifying what changes have been made on the development site.

Seriously - how are you guys doing this in the real world?

Have I missed something?

So a few things, if you turn on logging then you'll get a full timestamped history of changes to all tables in the database. If you had this on both environments then you would now be able to see all the changes.

However what your describing is a workflow issue, i.e. having changes happening in two environments without being clear on how changes will be released from Dev -> Prod seems like an oversight and not one CiviCRM will solve (Sorry - not trying to be rude).

In our pre-prod implementations we always define where customers are doing their prod configurations, where we're doing our dev and which environment is for playing. This way we have a clear release process from Dev -> Prod. We also introduce staging environments at the right time.

Hope that helps!


Civicontribute radiobuttons without "none", where the "Other" contribution field deselects radiobuttons This is a Theming/UI question for CiviCRM.

I've done some theming to turn the radiobutton's into clickable options.

When I select an amount it updates the 'Regular Amount' field.

However, when I select other amount, the previous option stays selected and they are added together.

What jQuery/js can I use to make the 'Other Amount' field de-select/unset the contribution amount choice?

I've tried code like this but for the life of me I can not get it to deselect anything!

$( "#price_78" ).focus(function() {
$('#CIVICRM_QFID_408_2').prop('checked', false);
});

Can you help me come up with a viable solution? We do not want to use the 'None' field on the contribution amount. I tried SimpleDonate but it did not work well for our implementation. We want the focus of the 'Other Amount' field to deselect any contribution amount.

This code worked for me:

CRM.$(function($) {
  $('input[type=text]', '#priceset').on('keyup', function() {
    if ($(this).val()) {
      $('input[type=radio]:checked', '#priceset').prop('checked', false).each(function() {
        calculateRadioLineItemValue(this);
      });
      calculateText(this);
    }
  });
  $('input[type=radio]', '#priceset').on('change', function() {
    if ($(this).is(':checked')) {
      $('input[type=text]', '#priceset').val('').each(function() {
        calculateText(this);
      });
    }
  });
});


How to set a contact's gender using API? If I do a civicrm_api3('contact', 'getsingle', ['id'=>123]) I get lots of data, including gender.

However when I try to set the gender like:

civicrm_api3('contact', 'create', ['id'=>123, 'gender'=>'Male'])

It reports no error, but neither does it do anything(!).

(Nb. I'm using v4.4.16 LTS)

Experimenting with the API explorer, I found that 'gender_id' => 'Male' worked.


Draft mailings appear as scheduled? 4.6.2: Wordpress 4.1

If I save a new mailing as draft by clicking the Save Draft button, the mailing appears in both the scheduled and unscheduled lists. Seems to me it should not appear anywhere in the scheduled list.

can you upgrade to 4.6.3 and try again. Quite a few bugs were fixed including one that sounds similar to the above

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