Civi CRM Expert in Europe wanted i (Austrian based company) am looking for a CIVI-CRM-Expert in Europe (preferred) for helping with various implementations on a basic level  (customizing invoices, create profiles for a kind of portfolio of members...)

Please send your references and rates to gerald.koellersberger@k-con.net

I am looking to hear from you!

Gerald

Please refer to this link https://civicrm.org/partners-contributors to get/contact a CiviCRM expert in your area


What can be done to improve loading of Activity searches and tabs on databases with gazillion civicrm_activity_contact rows Digging in to why one of our larger clients is suffering more from slowness of Activity searches or loading of Activity tab for contacts.

Comparing it to other dbs what stands out for this database is the sheer number of rows in civicrm_activity_contact - and while they also have a lot of Activities, they have no where near as many as other databases. A sample of data below where A is the db that is grinding slowly

| db | Activities | Activity Contacts | average contacts per activity |

| A | 626,145 | 22,270,065 | 36 |

| B | 180,000 | 5,680,000 | 32 |

| C | 3,718,634 | 7,722,346 | 2 |

And it is DB 'A' that is seriously slow running Activity related queries.

Most of the Activity Contacts are on 'bulk mail' Activities

The activity search makes use of multiple joins of civicrm_activity, civicrm_activity_contact and civicrm_contact table. It leads to millions and millions of rows again and again which causes an indefinite loop of the query which never finishes or takes much longer time to complete. A sample query which is executed by hitting the search button on Find Activity form.

SELECT count( DISTINCT ( civicrm_activity.id ) ) as rowCount

FROM civicrm_contact contact_a
  LEFT JOIN civicrm_activity_contact ON ( civicrm_activity_contact.contact_id = contact_a.id )

  LEFT JOIN civicrm_activity ON ( civicrm_activity.id = civicrm_activity_contact.activity_id
     AND civicrm_activity.is_deleted = 0 AND civicrm_activity.is_current_revision = 1 )

  INNER JOIN civicrm_contact ON ( civicrm_activity_contact.contact_id = civicrm_contact.id and civicrm_contact.is_deleted != 1 )

  LEFT JOIN civicrm_option_group option_group_activity_type ON (option_group_activity_type.name = 'activity_type')

  LEFT JOIN civicrm_option_value activity_type ON (civicrm_activity.activity_type_id = activity_type.value
      AND option_group_activity_type.id = activity_type.option_group_id )

  LEFT JOIN civicrm_activity_contact ac ON ( ac.activity_id = civicrm_activity_contact.activity_id AND ac.record_type_id = 2)

  INNER JOIN civicrm_contact source_contact ON (ac.contact_id = source_contact.id)

WHERE  (  civicrm_activity_contact.record_type_id = 3
    AND civicrm_activity.is_test = 0
    AND civicrm_activity.status_id IN ("1", "2") )
    AND  ( 1 )
    AND  (activity_type.component_id IS NULL OR activity_type.component_id <> 5)
    AND  (activity_type.component_id IS NULL OR activity_type.component_id <> 7)

I do not know why this is so slow but we developed an extension together with Matthew Wire that improves some of those problems. Information can be found here.


Selecting location type or multiple email/phone fields in Reports Is it possible to select a location type for default contact reports, or is it just hard-coded to use the Primary address/email/phone? Also, would it be possible to list a report with multiple email addresses or phone numbers (e.g. a column for Home, Work, etc.)?

Old question but for a CiviCRM only solution, I found that Extended Report has a Report Extended Report - Flexible contact report that does an aggregation of all the phone numbers.
As of version 5.8, you have to use the following PR to make it work : https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/pull/461
To use this method :

install Extended Report and patch with the PR
in Reports -> All Reports, create a New Report and choose Extended Report - Flexible contact report
choose the column Phone

You should have something like that in the phone column for each contact :


SMTP Socket Error or failed to set sender error....Recipient address rejected: Domain not found; CiviMail keeps trying When a CiviMail job is running, if one of the recipients has a bad email address, the CiviMail processor throws a set of errors into the Drupal watchdog log, with this message:

SMTP Socket Error or failed to set sender error. Message: Failed to add recipient: ted@jessicommunity.org [SMTP: Invalid response code received from SMTP server while sending email.  This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 450, response: 4.1.2 : Recipient address rejected: Domain not found)], Code: 10005

There seem to be two problems.

First, the error message seems to be misleading by suggesting that the problem is a misconfiguration in Outbound Email settings, which doesn't offer any settings related to handling unfound domains.

The more serious problem is that CiviMail will keep trying this address every time the CiviMail processor runs, thereby it will never complete the job and fills the watchdog log with error messages. The only way to stop the loop without actually cancelling the mailing job is to delete the relevant row in civicrm_mailing_event_queue (and then put the offending email on hold to prevent it from happening in the future).

It seems like the proper behavior would be for CiviCRM to treat that error like a bounce; but certainly not to keep trying it over and over.

Is that the appropriate behavior?

I was just encountering the same problem ...

There is already an issue on github: https://github.com/civicrm/org.civicrm.flexmailer/issues/23

It would be really helpful to get that solved. Currently, as workaround, I am switching to PHP mail(), which I expect to cause problems regarding spam reputation...


Upgrade from 4.6.20 to 4.6.21 fails with fatal error (sqlfile not found) We're using D7 / Civi 4.6.20, attempted to upgrade to 4.6.21 following the Civi upgrade documentation.  The upgrade errors out with this error:

Exception: "A fatal error was triggered: sqlfile - 4.6.21.mysql not found."

I tried reloading my pre-upgrade database and repeating, but got the same error.

Backtrace:

#0 SITEROOT/sites/all/modules/civicrm/CRM/Upgrade/Form.php(432): CRM_Core_Error::fatal("sqlfile - 4.6.21.mysql not found.")
#1 SITEROOT/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourSix.php(86): CRM_Upgrade_Form->processSQL("4.6.21")
#2 [internal function](): CRM_Upgrade_Incremental_php_FourSix::task_4_6_x_runSql(Object(CRM_Queue_TaskContext), "4.6.21")
#3 SITEROOT/sites/all/modules/civicrm/CRM/Queue/Task.php(88): call_user_func_array((Array:2), (Array:2))
#4 SITEROOT/sites/all/modules/civicrm/CRM/Queue/Runner.php(214): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#5 SITEROOT/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(52): CRM_Queue_Runner->runNext(TRUE)
#6 SITEROOT/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php(106): {closure}()
#7 SITEROOT/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(54): CRM_Queue_ErrorPolicy->call(Object(Closure))
#8 [internal function](): CRM_Queue_Page_AJAX::runNext()
#9 SITEROOT/sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
#10 SITEROOT/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#11 SITEROOT/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:5))
#12 SITEROOT/sites/all/modules/civicrm/drupal/civicrm.module(482): CRM_Core_Invoke::invoke((Array:5))
#13 [internal function](): civicrm_invoke("upgrade", "queue", "ajax", "runNext")
#14 SITEROOT/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:4))
#15 SITEROOT/index.php(21): menu_execute_active_handler()
#16 {main}

I searched and couldn't find a file called 4.6.21.mysql but I did find /sites/all/modules/civicrm/CRM/Upgrade/Incremental/sql/4.6.21.mysql.tpl.

Any advice?  Thanks in advance!

I would recommend you grab this file https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Upgrade/Incremental/sql/4.6.21.mysql.tpl and then save it into same path within your civicrm dir i.e. in CRM/Upgrade/Incremental/sql/

Once you have done that re-load your pre-upgrade database and run the upgrade again.

Should be all good then


Drupal Views needs settings file update for 5.24 I upgraded a client to 5.24 and it broke Drupal Views - my various views all had broken items.  Views message was "This view has been automatically updated to fix missing relationships". However, while saving one view worked, another didn't. Not sure if the right place to alert people to this, but here goes.  Previously the client was on 5.19.4 so your situation may vary.  My answer is below

The answer is to update the Drupal settings file with the tables listed in menu Administer/System Settings/CMS Database Integration.  There have been new & removed tables. I then cleared the Views cache, and all was well.


Include organization name in employee's postal address It's a pretty common scenario -- we'd like to print mailing labels addressed to individuals at their workplaces. For example,

Angela Davis
UC Santa Cruz
1156 High Street
Santa Cruz, CA 95064

What is the best practice for doing this in Civi? We could just put the organization name in "Street Address", and move the "real" address lines down into "Supplemental Address" fields. In fact, this is what we do -- but it doesn't seem quite right for a couple reasons:

In Civi's database schema, the "street_address" column is described as Concatenation of all routable street address components (prefix, street number, street name, suffix, unit number OR P.O. Box). The organization name doesn't seem to belong there, really.
This is a relational database, so why are we storing the organization name twice (once in the org's own record and once in the employee's address?) There should be a more elegant way to handle this.

Other CRMs include a special "Company" address field, distinct from the "Street Address" field, but again this would be duplicative.

1/ to get Organisation name you should be able to use the token {contact.current_employer} at /civicrm/admin/setting/preferences/address?reset=1 (assuming you have them set up with the employee/employer relationship)

2/ if multiple individuals have same Employer address then use the 'share address' feature if you don't already know about that (so


Can't delete contribution page We have reassigned a number of our contributions to one single contribution page - as the source was good enough for our record keeping purposes.

You cannot delete this Contribution Page because it has already been used to submit a contribution or membership payment. It is recommended that your disable the page instead of deleting it, to preserve the integrity of your contribution records. If you do want to completely delete this contribution page, you first need to search for and delete all of the contribution transactions associated with this page in CiviContribute.

The page no longer has contributions associated with it. Even test ones - I searched for them all - no memberships were ever processed via that page either.

Can you run the following SQL directly in the database? The code that does the delete check looks for something like this:

select * from civicrm_contribution where contribution_page_id=<put the page id here>

There is maybe some phantom entry still.


How can I pass CiviCRM first name and last name fields to Drupal API user_save I am calling the Drupal API "user_save" to create a brand new Drupal user. This does create a new Drupal user. But this user does not have the CiviCRM first name or last name fields set. How can I pass first name and last name to the Drupal API "user_save"?

I investigated how CiviCRM handles passing the firstname and last name when someone registers online (which includes a profile that collects first name and last name). CiviCRM only has a mechanism to deal with this situation when someone is online, not using the API, per code in the CiviCRM core file /sites/all/modules/civicrm/drupal/civicrm_user.inc

This issue causes problems with my CiviCRM dedup rule, which is set to check for first name, last name and email. Since for any Drupal user created via the API does not pass the first name or last name, a new CiviCRM contact is created as well. (In addition to the Drupal user)

In my scenario I have a civicrm contact called "testfirst", "testlast", "test@test.com" in the backoffice. I create a Drupal user for this contact (using the API user_save). This contact does get associated with the new Drupal user. However, there is also a brand new contact with the email address "test@test.com" but no other data. This brand new contact is getting created because the unsupervised dedup rule is checking for all 3 fields (first name, last name, and email).

The user_save() function can't take CiviCRM data.  CiviCRM injects a profile into the user creation page when you create a user through the UI.

To handle your scenario, you'll want to:

Call user_save().  It will return a user object, including the UID.
Call the CiviCRM UFMatch.get API to get the corresponding Civi contact ID.
Call Contact.create on the contact ID to insert the first/last name.


Civibuild Vagrant - drupal-case build? Hey all Just found the Civibuildkit using Vagrant - made my day as they have a build that was useful for me to test and work on for my site.

My question is: Is there some one out there that can help me figure out how to create (load) the drupal-case (which is Drupal8 with the latest Civicrm build) without sample data.

I have tried to go through the files to figure it out, but if someone can point me in the right direction it would be great.

Update: BuildKit currently cannot build Drupal 8 sites because of the composer requirement.

To build a Drupal 8 Clean site with CiviBuild you would use the command:

Note: CiviBuild cannot currently build Drupal 8 sites with the demo data.

civibuild create d8-master or civibuild create <NAME> --type drupal8-clean

Note: This will create a Civi 'master' site using the latest bleeding edge CiviCRM code. To build using a specific CiviCRM version use --civi-ver e.g. --civi-ver 5.6.0

The full command to create a Drupal 8, CiviCRM 5.6.0 without demo data and named d8c560 with the URL http://d8c560.test is:

civibuild create d8c560 --type drupal8-clean --civi-ver 5.6.0 --url http://d8c560.test

The build you refer to dcase or ==type drupal-case builds a Drupal 7 site for testing the CiviCase v5 extension.

CiviBuild Docs

The CiviBuild documentation is worth reading:
https://docs.civicrm.org/dev/en/latest/tools/civibuild/#build-types

CiviCase v5

Information on CiviCase v5 (it's awesome!) and the associated dcase build is here:
https://github.com/civicrm/org.civicrm.civicase


Any way to limit geocoding to city or zip? For privacy purposes in making a public member map - I'd like to set up the geocoding not by the full address, but by the city or zipcode. Is there a way to do this without creating a custom geocoder?

Thanks!
Harold

Sorry no, You will need to create a custom geocoder.

Creating a custom geocoder should be as easy as copying the current one you want to imitate, renaming it (to avoid confusion and keeping things clear for your successors) and dropping it in your custom php directory in CRM/Utils/Geocode/ (since u dont want to modify the core directories)


Multilingual support and database issues -- how many languages? I am considering enabling multiple languages (in CiviCRM 4.6.12 with Drupal) and would like to hear from those of you who've done so about your experiences. Specifically, how many languages are you using, and have you observed any database problems as a result?

I read in a discussion here that enabling more than 2-3 languages can lead to database problems. This presentation from CiviCon 2013 gives the number as 3-4. Has anyone successfully used more than 4?

Are there other pitfalls of multilingual support I should be aware of, even if I stick to only 2-3 languages?

So the problem is that each new language is stored as a separate column for each translated field (eg title, body...), so the more fields that are translated and the more new language you add, the sooner you will hit a limit of mysql on how many columns can be set. As for the exact number, it depends as well on the type of content you store, mysql has a longer explanation, but 2 or 3 is what I've tested without reaching that limit:
http://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html

Other than that, works pretty ok, but keep in mind that because the structure of the database is changed, it becomes impossible to revert to a single language version.


How to clear the caches in WP / Wordpress or Drupal via url? How does one clear the caches in Civicrm via a URL?

I just found this, so thought I'd post it :)

The URL to clear all Civi caches in Drupal is [site-url]/civicrm/clearcache

The URL to clear all Civi caches in Wordpress is: [site-url]/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/job&action=export&id=13&reset=1

this can be found by going to "Administer > System Settings > Scheduled Jobs" and saving the link url of the "edit > execute now" link of the Clean Up Temporary Data and Files job (via right click?).

One can also execute the scheduled job there....


CiviContributions > New Contribution Page with an ANONYMOUS USER and no Login Display in Drupal (CiviCRM 5.25.0 / Drupal 7.70) This is a multipart question:
1. I have added the following permissions for the anon user:
-CiviCRM: profile listings and forms
and
-CiviCRM: access all custom data
My desire is to block any other access to CiviCRM - I just want individuals to access the page and make a donation. Am I missing any security implication?

2. I have set up a profile to collect First / Last and Email address, but Drupal is still adding a login - this would be confusing to my users and I would like that not to appear, but not sure how to turn off that from displaying:

I think 1 will take care of #2
Profile listings and forms are NOT for your public users. Only trusted users. You want to change that one
Here are the permission you need for Anonymous and Authenticed Users
CiviCRM: profile create
CiviCRM: profile edit
CiviCRM: profile view
CiviContribute: make online contributions


Is Iframe based payment gateway integration with civicrm possible? Is it possible to integrate a payment gateway which gives an iframe to collect user details.I tried it almost 2 years back and failed for some reason I dont remember now. If it's possible and someone has a sample code please do share, it would be a great help!

I don't think it's easy. I have tried without success a couple years ago.
The return page will go to the iframe rather than the parent page and i didn't find a way to close the iframe and having the Thank you page on the parent page.

I know that there is a lot of work that is being done lately regarding payment refactoring but i don't know if it tackle this kind of problem.


In CiviDiscount 3.1 why is there both a Membership section and Membership in Automatic Discounts? In CiviDiscount 3.1 it seems you can set up discounts based on Membership ('Discounts for memberships') as well as in Automatic Discounts (discount for members of type, membership statuses).  Why isn't membership + status just in the 'Membership' section? (and why no selection for Contact subtype in Automatic Discounts?)

To answer the first question, the difference between the two is that the Discounts for memberships is where anyone with the code can get a discount when purchasing a membership (Civi help: "Discount the price of purchasing memberships. Only active memberships with start and end dates defined will appear in this list."). Automatic Discounts, on the other hand, is where any contact that meets the conditions outlined will get an automatic discount applied; no code required. And the discount will be applied to either memberships or events.

It might be clearer with a couple examples. In the first case, someone visiting the site can enter a code into the box and then get a discount on a membership they want to purchase. In the second case, someone might get a unique URL by email and Civi will know which contact it is. If, say, that contact meets the condition of being over 65 years old, they will get an automatic discount on an event. Or maybe they'll get a discount for an event because they're a Lifetime member.

To answer your last question, why no selection for Contact subtype: this does indeed look like a missing feature. I suggest posting an issue to the extension in github: https://github.com/dlobo/org.civicrm.module.cividiscount/issues It might be possible to get the contact subtype by using the api field that you see when adding a discount, but that is certainly not for a beginner.


Is there a way with webforms when submitting a new entry to have it only save the stuff that was actually touched by the user? I have a webform that has a lot of custom fields.  These fields should probably have been set up as boolean but they weren't.  They each have one checkbox, which results in a "Y" being saved in the table.

This works great for new entries, but if an anonymous user who has already submitted the form then goes and submits it again, maybe they decided they now also want to volunteer for X, all the things they selected the first time gets wiped out or really overwritten with a null unless they select all the same things again.  (The form is set to match existing contacts based upon first, last and email)

Fields that aren't check boxes work this way.  If you leave the address or phone number blank it doesn't overwrite what's already there.

So I'd like it to not save any check box the user didn't touch.

If there is information that you don’t want people to override/edit - you probably want move to towards issuing Drupal User Accounts - so you can start creating forms that are serving purposes like Update My Profile, Update My Volunteer Shifts, Update My Conference Registration. When a user is logged in - Webform CiviCRM module can display current information stored for that contact and it’s immediately clear they are overriding/editing or adding.


Award Drupal User points after contribution I would like to create a Drupal Rule to award Drupal userpoints upon a civicrm contribution being added to a member record through membership sign up.

Ideally the points awarded are dependent on which price field (price set) is selected, ie bronze member = 10 userpoints, silver member = 20 userpoints etc

I have been playing around with rules but can't seem get this one...any pointers would be most appreciated.

(pasted from answer/comment)

I thought it would be a simple rule. When a contribution is saved, of a specific type userpoints are added to the record. But no...

So far...I created a price set with the required price options for both membership and contribution.

Then went to Drupal Rules and made various attempts at setting up a rule to award userpoints on either signing up to a membership or making a payment. A combination of the following;

In terms of the event I have tried; after saving a new civicrm contribution, after saving a civicrm price field, price field value etc

Condition: I have tried Data comparison, entity is of type, list contains item etc based on price field id, price field value id

Action; Award user points.

Non of the above (or combinations) have given me a result when adding a contribution or membership to the user record.

So I'm pretty much lost. Help...!!!

To make this work I’m pretty sure you’ll need CiviCRM Entity module. We’ve used that to create Drupal accounts after/when a Contact purchases a Membership.


Transaction Date in Extended Report Using the "Bookkeeping with extra fields" template, I noticed I was occasionally missing some transactions whenever I filtered on Transaction Date. I believe the issue is caused by the filter using only the date and not the time.

For example, if today is February 10 and I filter Transaction Date on "Yesterday", the WHERE clause looks like:

  ( financial_trxn.trxn_date >= '20190209') AND ( financial_trxn.trxn_date <= '20190209' )

Any transaction that isn't exactly at midnight is lost. Comparing to the Date Received filter, it uses date and time:

  ( contribution.receive_date >= '20190209000000') AND ( contribution.receive_date <= '20190209235959' )

Perhaps I'm misinterpreting the use of the filters. I can run the same query directly, but with the time included for Transaction Date, and it seems to return the correct results.

CiviCRM 5.10.0
PHP 7.2.13
MySQL 5.7.23
Wordpress 5.0.3

EDIT - originally this Q referenced ExtendedReports 3.5 but turns out it was a core report

The issue has been reported in https://lab.civicrm.org/dev/report/issues/7.


How should I go about proposing (and then possibly creating) a new CiviCRM feature? I have an idea for a small new feature. I think this feature would be useful to a significant portion of the Civi user community. I'm willing to build it. Is there a standard process for proposing my feature, getting approval (from the community? from the Civi core team?), and then developing it?

(To give an example, I'd like to expose "Payment Processor" as a search criterion on the Find Contributions form. No change to the database schema, not a huge change to the UI, and probably not a lot of new code. This feature would probably be useful to a larger portion of the Civi community than just the client who requested it.)

Is the process any different if I won't be building the feature myself?

How is the process different for features of different sizes? (And how is it determined whether a feature is "big" or "small" -- or what constitutes a "new feature" versus an "improvement on an existing feature"?)

Noah - hi - am sure there will be better answers for this but this might help get the ball/conversation rolling. A lot of discussion about 'is this something that can go in core' happens on https://chat.civicrm.org/civicrm/channels/dev

There is an ongoing debate about what new features should go in to core versus Extensions that ship with core, versus other Extensions.

There is a real focus on tests coming with any new PR.

If you aren't building it yourself? Well if you are commissioning the core team or one of the Partners then they will worry about such things on your behalf. If you are shipping the idea off to freelancer or some such then it is probably the same as if you are doing the dev, ie you are responsible for providing the tests and the arguments for why something should be a fix/add to core versus an extension.

Other resources that might help you answer this more yourself, but expect you have already trawled for them but may be useful for others who read this

https://wiki.civicrm.org/confluence/display/CRMDOC/Develop
https://docs.civicrm.org/dev/en/master/


How do I change the layout and style of a contribution page displayed on a wordpress website? I've got premium options included which display as toggle framed text and not with tick boxes (which I want) and it's using Times as the default font (which I don't want). Also, I need the Profile section (name, address etc) to be at the top of the page, not the bottom. Any pointers?

Probably the easiest option for you would be to use Caldera forms plugin with the CiviCRM connectors. That way you could style your caldera forms to your needs and still have the submission into CiviCRM


How to import to multi-record set custom fields I am trying to import records to a custom multi-record set of fields.
I read somewhere that it was a new feature for 4.5.8 but now for the life of me I cannot find where I read it - pretty sure it was the release notes, but may have got the version wrong.

Would appreciate a pointer in the right direction. (we are currently on 4.6.4)

Many thanks

Steps:

Contacts > Import Contacts
Click the help ? at the end of: "The Import Wizard.... them here."
Click the link on here at the end of: "If you need to import Multi-value Custom Data for contacts.... from here: /civicrm/import/custom?reset=1 .

You should see the multi-record field to import


Is "Total Paid" in a report really supposed to show Amount Paid plus fees? I am for the first time retrieving payment data for event participants through CiviReports. One of my columns is Total Paid, but for those who registered and paid online, this column shows numbers like "$409.10", which is the amount they paid $400 plus the $9.10. The Net Amount correctly shows $390.90.

I'm thinking this is a bug, but maybe there is another field I should use?

[edited to add:]
I'm very sure this is a bug at this point, and I'll add it to the issues board. I'm running 4.6.8 and I can replicate it on the demo site:
http://dmaster.demo.civicrm.org/civicrm/report/instance/39?reset=1

This sounds like it could be a bug. Can you please edit your question to include what version of CiviCRM you are using and what report you are running.

Are you able to duplicate this result on the master demo site?


Fixing null sort and display names In one of the systems we support there are some contacts with NULL display and sort names. This means they don't show up in searches. How do we fix these?

Make sure you back up first.

The display name field for the site concerned only contained first_name, last_name and prefixes. I assume in some case you might also want to append suffixes?

trim and replace are used to remove additional whitespace in cases where their was a null first or last name.

UPDATE civicrm_contact AS c LEFT JOIN civicrm_option_value AS ov ON c.prefix_id = ov.value AND ov.option_group_id = 6 SET c.display_name = trim(replace(concat(ov.label, " ", c.first_name, " ", c.last_name), "  ", " ")) WHERE c.contact_type = 'Individual' and c.display_name is null and (c.first_name is not null or c.last_name is not null);

Check if any contacts have no first or last name - but an email.

SELECT e.email FROM civicrm_contact as c LEFT JOIN civicrm_email as e on c.id = e.contact_id and e.is_primary WHERE c.contact_type = 'Individual' and c.display_name is null and c.first_name is null and c.last_name is null and e.email is not null;

in this case there was none so no need to do a further update.

The same for organizations

UPDATE civicrm_contact as c SET c.display_name = c.organization_name WHERE c.contact_type = 'Organization' and c.display_name is null and organization_name is not null;

Then you want to do the sort name

The select

SELECT c.id, CASE when c.last_name is not null and c.first_name is not null then concat(c.last_name, ", ", c.first_name) when c.last_name is null and c.first_name is not null then c.first_name when c.last_name is not null and c.first_name is null then c.last_name when c.last_name is null and c.first_name is null then e.email END from civicrm_contact as c left join civicrm_email as e on c.id = e.contact_id and e.is_primary where c.contact_type = 'Individual' and c.sort_name is null and (c.first_name is not null or c.last_name is not null or e.email is not null);

and the update

 UPDATE civicrm_contact as c set c.sort_name = CASE when c.last_name is not null and c.first_name is not null then concat(c.last_name, ", ", c.first_name) when c.last_name is null and c.first_name is not null then c.first_name when c.last_name is not null and c.first_name is null then c.last_name END where c.contact_type = 'Individual' and c.sort_name is null and (c.first_name is not null or c.last_name is not null);

Here I used case to resolve issue with multiple cases with both names, only first name only last name.

And finally organizations

SELECT count(c.id) from civicrm_contact as c where c.contact_type = 'Organization' and c.sort_name = null;


Webform-civiCRM equivalent for Wordpress? I'm new to CiviCRM and I have a colleague who's using it with Drupal and loving the Webform-CiviCRM integration. I myself use Wordpress and would like to be able to stay with Wordpress but I understand that Webform-CiviCRM is Drupal based. We'd be using forms as a way for new users to register with our organization and I'm wondering how we can achieve similar functionality with forms while staying with Wordpress. Please advise. Thanks!

CiviCRM has a built in form builder which are called Profiles. It's not as powerful as Webform integration, but may fit your needs.

If not, the equivalent for WordPress would be Caldera Forms with CiviCRM integration.


can't sort search result table by column when the column shows a custom field this has me stumped, and wondering if anyone else has encountered it.

I have a profile search results page where the result table includes both standard fields and custom fields.

I am able to sort the table successfully on the standard fields by clicking the arrows/column headers, but the custom fields column sort fails. I see one of two errors:

If I click the up/down arrows next to the column header text, a popup "Network Error Unable to reach the server. Please refresh this page in your browser and try again." appears, and a 500 server error is registered in the web server error log.
If I click the column header text, I get a 404 page with the error message "Class name must be a valid object or a string"

You can see this in action live at https://www.fawco.org/index.php?option=com_civicrm&task=civicrm/profile&force=1&gid=18&reset=1&crmRowCount=100&Itemid=388
("Name" and "Country" are default fields, "FAWCO Region" is a custom field.)

Per my testing:

Search itself works properly.
There are no errors in the CiviCRM log or the Joomla log.
Joomla and CiviCRM debug modes have not shown any errors.
web server logs report as described above, 500 for the sort request via arrow, 404 for the sort request via text.
Adding and removing different default and custom fields to the results makes no difference: default columns consistently work and custom consistently fail.

System is Joomla 3.9.10 with CiviCRM 5.15.1.

Has anyone seen this before, or could someone give me a hint where I could start troubleshooting?

For 5.15.1 you can add these lines just before line 6373 in CRM/Contact/BAO/Query.php.

if (empty($fieldSpec['bao'])) {
  continue;
}

There will also be a similar workaround put into 5.18.2 when it is released. https://github.com/civicrm/civicrm-core/pull/15454


Problem with Date Range in searches There seems to be a bug in doing searches on date ranges - specifically in Advanced Search and in Find Contributions. We're using Drupal and Civi 4.6.2.

When I type into Adv Search's Member Since date range fields OR Find Contribution's contribution date range fields only 2 digits for the year (1/1/14) I get a nonsensical number of records back. No error msg, just an obviously wrong set of data. I confirm by looking at several records but they do not match the date range in either Member Since or Contrib Date.

However, when I type in all four year digits, then I get the expected results.

I have tested this in the demo Civi and received the same results for both - only 2 digits gets bad results, 4 digits gets correct one.

I used to be able to type in only 2 digits (since we started using Civi in 11/12).

Please add in an error message or change the field instructions.

Thank you.

Thanks for taking the time describing the problem.

As it seems to be a bug rather than a question, i think you should create a new issue in the issue tracker rather than using Stack Exchange.


Custom field group weight order on contact summary page? As far as i can tell, the weight of custom field groups is not respected in the order they are displayed on the contact summary page - is that accurate?

I can't find anything obvious that controls that order - if anyone knows otherwise i would appreciate it!

Civi v 4.7.27 and drupal 7

The 'order' only controls a field set in respect of other Custom Field sets, it does not relate to Core field sets that show on Summary.

Eg on demo I just made a new field set for Contact. It showed to the right of Constituent Information.

I then edited the order to push my new set to the 'top' and it then showed on the left which Constituent Information then showed on the right.


Customizing Menu Quirks Certain plugins such as CiviMobile and CiviVolunteer create menu items automatically.  Unfortunately those menu items aren't managed by Administer >>> Customize Data and Screens >>> Navigation Menu.  In order to give non-admin users CiviMobile menu access - I had to add it to the menu manually - which gives non-admin users a menu - but admin users double civimobile menu items. CiviVolunteer on the other hand cannot be managed via the same menu - if I want to nest it under another category - or simply change its position - I have to recreate all the menu items.  There has to be a better way - is there?

CiviVolunteer is adding menu items in the recommended way for Extensions.

We are looking for guidance on how to support menu customization. I did not find any in the developer docs.

If anyone knows the secret, or can point to an extension that menu customization works for... it would be a help.


How can I filter click-through reports by date range? long time user of civicrm. Have 4.7.6 installed on Drupal 7 in a linux environment and I'd like to look at an old email's metrics. I see I pull up specific URL click-through metrics, but it shows me ALL the clicks since I sent out the email to-date. I'd like to filter those results to only include a specific date range, but am having difficulty in finding how to do this. I would even be comfortable exporting all the results myself and then filtering in excel, but the export doesn't include dates at all. Am I the only one who needs this kind of thing? If I have to go into the DB tables to find what I'm looking for, where can I find it?

There is currently no date filter on the mailing reports.

Adding date filters to the mailing reports and submitting a patch back to core would be one way to solve your problem. https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Form/Mailing/Clicks.php shows the code that generates the clickthrough report. Adding a date filter to that might not be too difficult to do.

It would end up being similar to the date time filter in the activity report: like the https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Form/Activity.php#L261 but from the looks of things you'd have to do a bit more playing around with the Report class than just adding it.

The mysql tables you are looking for are civicrm_mailing_event_trackable_url_open (which has a timestap) and civicrm_mailing_trackable_url


Recommended way to deal with delete action in a page? When developing extensions I have always followed this path when I had a page listing stuff (for example books) and an action link to delete the book:

Create the page and add a link to the form CRM_Utils_System::url(/ "civicrm/myext/form/myform", "action=delete&reset=1", TRUE)
In the form, pick up the delete action in the preProcess method like so:

if ($this->_action == CRM_Core_ACTION::DELETE) {
//do my stuff
$url = CRM_Utils_System::url("civicrm/myext/page/mypage", "reset=1", TRUE);
CRM_Utils_System::redirect($url);
}

I understood that I should not use the CRM_Util_System::redirect() but should use the CRM_Core_Session::singleton->pushUserContext($url) instead. But what is then the recommended way to ignore the rest of my form processing so that the controller returns to the userContext (being my page)?

The way I did it

In my most recent extension with a fair amount of CRUD happening via the UI, I used a different form at a specific URL (civicrm/sms/conversation/confirmdelete) for deleting. This gave the  user the chance to see what they were deleting and confirm it.

I then set the context in preProcess of that form, deleted the entity in postProcess, and let the controller handle redirection.

$this->context = CRM_Utils_System::url('civicrm/sms/conversation/view', "id={$this->conversationId}");
$this->controller->_destination = $this->context;
$session->pushUserContext($this->context);

IIRC, it was setting $this->controller->_destination = $this->context; that enabled the magic to happen in postProcess, and mean that I didn't have to add any calls to CRM_Utils_System::redirect().

FWIW I generalised this form to allow it to delete any of the entities that my extension was creating.

See the form here:
https://github.com/3sd/civicrm-sms-conversation/blob/master/CRM/SmsConversation/Form/ConfirmDelete.php

Is this the CiviCRM way?

Since I wasn't sure how 'CiviCRM' this method was, I just had a quick look at how we handle deleting contacts and membership types.

Contacts

For contacts, the URLs look as follows:
civicrm/contact/view/delete?&reset=1&delete=1&cid=2 which maps to CRM_Contact_Form_Task_Delete, i.e. a special form, just for deleting contacts, which (although I haven't looked in details) seems to be a bit like what I did.

Membership types

civicrm/admin/member/membershipType/add?action=delete&id=1 maps to CRM_Member_Form_MembershipType. Looking at the class and its associated template

preProcess sets an appropriate context (this is where you would put your URL to your 'page listing stuff', I think).

$url = CRM_Utils_System::url('civicrm/admin/member/membershipType', 'reset=1');
$session->pushUserContext($url);

It also assigns the action to the template

$this->assign('action', $this->_action);

buildForm checks to see if this is a delete action, and if so, just returns, since it doesn't need to add any form elements

if ($this->_action & CRM_Core_Action::DELETE) {
  return;
}

postProcess does a similar check

public function postProcess() {
  if ($this->_action & CRM_Core_Action::DELETE) {
    try {
      CRM_Member_BAO_MembershipType::del($this->_id);
    }
...

And the template has a similar if else

{if $action eq 8}

    {ts}WARNING: Deleting this option will result in the loss of all membership records of this type.{/ts} {ts}This may mean the loss of a substantial amount of data, and the action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}

 {include file="CRM/common/formButtons.tpl"}

{else}

So what is the right way?

No comment :) You decide.


How do I partially hide Ajax supplied content? I tried hiding the edit, delete, enable and disable links in contact relationships writing an extension in the hook _civicrm_alterContent and injecting jquery:

  $content= $content . "
    <script type='text/javascript'>
      CRM.$(document).ready(
        function($) {
          $( '.crm-contact-relationship-links span a:nth-child(2)' ).remove();
          $( '.crm-contact-relationship-links span:nth-child(2)' ).remove();
        }
      );
    </script>
  ";

The data I want to hide is supplied through Ajax and apparently out of Jquery's reach because I don't see the desired effect.

Then I tried it using the dataTable API:

        <script type='text/javascript'>

      CRM.$(document).ready(
        function($) {
          var table = $('table.crm-contact-relationship-selector-current').DataTable();
          table.$( '.crm-contact-relationship-links span a:nth-child(2)' ).remove();
          table.$( '.crm-contact-relationship-links span:nth-child(2)' ).remove();
        }
      );
    </script>

Without success!

Any suggestion to still reach my goal?

Please see the Civi JavaScript reference , specially this:

CRM.$(function($) {

// Your code here

 });

  Remember that CRM.$ is our alias of jQuery. So the first line is shorthand notation for CRM.$('document').ready(function($) {
  The function receives jQuery as it's param, so now we have access to jQuery as the familiar $ for use in our code.

Also make sure you are targeting the right template:  CRM/Contact/Page/View/RelationshipSelector.tpl

A different approach would be to create a custom template as explained here and disable the actions links based on $context

Update: according to dataTable API, you could do this:

CRM.$(function($) {
    var table = $('table.crm-contact-relationship-selector-current').DataTable();
    var column = table.column('.crm-contact-relationship-links');
    column.visible( false );
});


How can I set the maximum number of processes? I thought I had a fix, but I'm still getting a 500 error on importing a batch of 16 organizations. Host tells me CiviCRM is spawning more than 30 processes, which is the host's limit.

Trying to get Civi to work on my current host. It's a shared server with a decent host with their top tier plan. Moving everything for Civi isn't an option I'll consider since I have 40+ dev and low traffic sites set up on the account that are all working well within plan limits. I installed Civi there for my education. So if I have to buy Civi-specific hosting, I'd prefer to poke around first.

Any ideas how I can limit the number of processes Civi spawns on import?

I don't know of any way to limit the processes. Importing is a large task since it's hitting so many fields, tables, etc. That means a lot of processes regardless of how many records you're importing. Shared servers often times have too low of limits to be able to fully use CiviCRM without running into issues. It's why we finally ended up just getting our own server, setting it up so that its minimums would still be more than enough for Civi, and then using it for all our sites.


Event register page style bug I'm using 4.7.29 CiviCRM with latest Wordpress version.
On my event register page, I've an issue with scroll menu (set with Price set option) :

The option is cut. And it is also when I select an other in the listing.
Can I resolve it myself or it's a general bug ?
I've already try severals browser.
Thank you !

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

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


CiviMail tracked URLs give "Missing input parameters" from /extern/url.php Any mailing that I send through CiviMail converts URLs to links in the form of:

http://mysite.org/sites/all/modules/civicrm/extern/url.php?u=193&qid=52

But when I visit this URL I get a white page with "Missing input parameters" and the address is http://mysite.org/sites/all/modules/civicrm/extern/url.php

Curiously I looked at some old CiviMail mailings and those URLs still work!

I don't think this is related to Missing Input Parameters Error

I'm running 4.6.3. Thanks for your expert insight and helpful suggestions.

It seems your host configuration is the problem, as it forces redirection from https to http and somehow lost the parameters in the convertion

Can you try to access the https version with the parameters?

https://mysite.org/sites/all/modules/civicrm/extern/url.php?u=193&qid=52

In any case, if you want to use https, be sure your configuration is set with https (CIVICRM_UF_BASEURL in your civicrm.settings.php), so it directly creates the right url and avoid a redirect


Mailing_send_test - job_id is not valid I am having a "Error in call to Mailing_send_test : job_id is not valid : 14" when I send test email in Mosaico (to one email or to a group) whereas email settings are working perfectly.

My mailing id seems to be 16, 14 have been deleted weeks ago. Why the test functions are stuck with job_id 14 ? How to release it ?

Any idea ?

Civicrm : 5.5.1 - Wordpress 4.9.8
Mosaico : 2.0-beta4.1528762072
FlexMailer : 0.2-alpha5

EDIT :
If I don't use mosaico, test mails and mailing are working perfectly.

This is the log related to the error :

[info] $Fatal Error Details = Array
(
[callback] => Array
    (
        [0] => CRM_Core_Error
        [1] => exceptionHandler
    )

[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , hash ) VALUES ( 14 ,  97 ,  97 , 'beba286cbb5ec019' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`database`.`civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE CASCADE)]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , hash ) VALUES ( 14 ,  97 ,  97 , 'beba286cbb5ec019' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`database`.`civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE CASCADE)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , hash ) VALUES ( 14 ,  97 ,  97 , 'beba286cbb5ec019' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`database`.`civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE CASCADE)]"]
)

I found out when I uninstall nz.co.fuzion.transactional plugin it is working.

I can't reinstall it to be sure it's the real cause because the plugin setup want to create an exiting DB ! If some developers used to work with Fuzion can help on that it could be great.


How do I add custom fields to Personal Campaign Pages I bet that's a question that some people have asked before!

The answer is you can't currently.

But how would someone add this capability?

This diff is against 4.5.0  .  It doesn't display the custom field values on the PCP view page, but it adds the capability to create custom field groups on PCP entities, and save values on add/edit pages.

diff -r original/civicrm/CRM/Core/BAO/CustomGroup.php new/civicrm/CRM/Core/BAO/CustomGroup.php
1102a1103,1104
>       case 'Pcp':
>         $tableName = 'civicrm_pcp';
1168a1171
>       case 'Pcp':
1521a1525
>
1698a1703,1704
>       case 'Pcp':
>         return 'civicrm_pcp';
1721a1728
>
diff -r original/civicrm/CRM/Core/SelectValues.php new/civicrm/CRM/Core/SelectValues.php
179a180
>       'Pcp' => ts('Personal Campaign Pages'),
diff -r original/civicrm/CRM/Custom/Form/CustomData.php new/civicrm/CRM/Custom/Form/CustomData.php
54c54
<   ) {
---
>   ) {
145c145
<     }
---
>     }
diff -r original/civicrm/CRM/PCP/BAO/PCP.php new/civicrm/CRM/PCP/BAO/PCP.php
85c85,92
<
---
>     //start custom field code addition
>     //store custom data
>     if (!empty($params['custom']) &&
>       is_array($params['custom'])
>     ) {
>       CRM_Core_BAO_CustomValueTable::store($params['custom'], 'civicrm_pcp', $dao->id);
>     }
>     //end custom field code addition
diff -r original/civicrm/CRM/PCP/Form/Campaign.php new/civicrm/CRM/PCP/Form/Campaign.php
63a64,87
>
>     //start custom field code additions
>     //check for custom data type.
>     $this->_cdType = 'Pcp';
>     $this->assign('cdType', FALSE);
>     if ($this->_cdType) {
>       $this->assign('cdType', TRUE);
>       $this->set('type', 'Pcp');
>       $this->set('entityID', $this->_pageId);
>       $this->set('cgcount', 1);
>       CRM_Custom_Form_CustomData::preProcess($this);
>     }
>     //end custom field code additions
>
>         // when custom data is included in form.
>     if (!empty($_POST['hidden_custom'])) {
>       $this->set('type', 'Pcp');
>       $this->set('entityID', $this->_pageId);
>       $this->set('cgcount', 1);
>       CRM_Custom_Form_CustomData::preProcess($this);
>       CRM_Custom_Form_CustomData::buildQuickForm($this);
>       CRM_Custom_Form_CustomData::setDefaultValues($this);
>     }
>
70c94,99
<
---
>     //load only custom data defaults.
>
>     if ($this->_cdType) {
>      $defaults = CRM_Custom_Form_CustomData::setDefaultValues($this);
>     }
>
93c122
<
---
>
103a133,140
>     $this->assign('customDataType', 'Pcp');
>     $this->assign('entityID', $this->_pageId);
>
>     if ($this->_cdType) {
>       CRM_Custom_Form_CustomData::buildQuickForm($this);
>     }
>     //lets assign custom data type and subtype.
>
229c266,274
<
---
>
>        //process custom data.
>     $customFields = CRM_Core_BAO_CustomField::getFields('Pcp', FALSE, FALSE);
>     $params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
>       $customFields,
>       $this->_pageId,
>       'Pcp'
>     );
>
232d276
<
Only in new/civicrm: groupcountsearch.txt
diff -r original/civicrm/templates/CRM/PCP/Form/Campaign.tpl new/civicrm/templates/CRM/PCP/Form/Campaign.tpl
97a98,120
>
> {* load the custom data *}
> {if $cdType}
>     {include file="CRM/Custom/Form/CustomData.tpl"}
> {else}
>
> {* include custom data js *}
> {include file="CRM/common/customData.tpl"}
>
> {literal}
> <script type="text/javascript">
>   CRM.$(function($) {
>     {/literal}{if $customDataSubType}
>       CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
>     {else}
>       CRM.buildCustomData( '{$customDataType}' );
>     {/if}
>     {literal}
>   });
> </script>
> {/literal}
>
> {/if} {* load custom data *}
99a123
>


Problem with upgrade from 4.5.5 in drupal I am trying to upgrade from civicrm 4.5.5. I follow instructions of https://docs.civicrm.org/sysadmin/en/latest/upgrade/drupal7/ but any time I do the upgrade I get the screen with skip or retry buttons that doesn't work. I don't know if the ugrade was completed.

Then if I go to the civicrm page I see the new version number (4.6.34) but menu disappeared and I can't continue working with the previous data, contribution pages, mailing, etc.

what could be the problem?

[

The problem overcomes when deactivated AT Commerce 7.x-3.2 as the enabled theme. Then buttons and menus worked. Upgrade was successful finally.


Price set for Golf Event Needing to have a single golfer price of $100
OR
Foursome at $80 each and collect data on each person.
I can turn on Addtl Participants
BUT
How do a "make" them enter four people and not more or less when choosing Foursome.
I'm guessing this would have to be a custom built page?
THANKS for any input.

If you are using Drupal, I would guess you can do this with Webform-CiviCRM. For example, you might be able to use Webform Conditionals (which comes built in with Webform) so that if they select the "Single golfer" option on the payment amount it hides the other three contacts, and if they select "Foursome" it shows the additional contacts (and those fields can be marked required in the Webform Components section).


“Network Error Unable to reach the server” recording Contact activities We have a CiviCRM 5.15.0 installation under WordPress 4.9.10 and 2 MySQL db: one for Wordpress data and one for CiviCRM data.   We manage more than 6500 contacts.

Going inside a contact we have this error message with a blank popup adding a meeting or phone call in the contact summary:

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

There are NO ERRORS adding contributions, registering for events, adding pledges, sending emails.

Analyzing logs we have no errors on Apache, but we found a

CRM_Core_Error::backtrace("backTrace", TRUE)

on

wp-content/uploads/civicrm/ConfigAndLog/

last file

You can see how the errors come out on this video https://youtu.be/lrMq6A2t9Uk

You have custom plugin or extension that is interacting with Activity type which expects custom fields in the system and is either disabled or deleted.

Solution:
1. Turn off the extension if the system no longer needs it.
2. Enable/Add the custom field or custom group back into the system

Cheers

Pradeep


Anonymous user filing out a profile unintentionally remove themselves from groups When an anonymous user fills out a contribution or other form with a profile that includes the ability to select groups, the user may leave those checkboxes blank, like so:

If the anynomous user leaves a checkbox unchecked for a group and that anynomous user is deduped with an existing contact, who is currently a member of the same group, during the processing of the form, then the contact will be removed from the group.

If those groups are used as mailing lists, it is normal for users to leave the box unchecked (as they would not think that they need to check a checkbox to remain on a mailing list they have already signed up for). This is confusing for the user, who unintentionally removes themselves from a group. It is also confusing from the backend as it does not function the same as other fields (e.g. if the user leaves a phone number blank, their phone number is not erased).

This same behaviour is found with a custom field that uses checkboxes or multiselect, while it isn't the same in a custom field using select.

To me, this looks like it isn't the intended behaviour, as it is inconsistent with the behaviour of other fields. Perhaps it has to do with the order in which the deduplication happens relative to the groups. It is also inconsistent with how merging contacts normally works, where groups are added to, but not removed from, the merged contact.

Is this a bug? If it isn't a bug, is there a way to change the behaviour so users aren't removing themselves unintentionally from groups?

I think using a custom field and a smart group would likely solve this problem, but perhaps there is a better way—or this should be changed in general.

Checkboxes are inherently a confusing html element, because when not selecting them, no value is sent (i.e. not even a null or empty placeholder value). So I can imagine that the core code that this is using is trying to handle that kind of situation from other contexts.

If that analysis is correct, then I suspect the empty box is triggering an unsubscribe, and that unsubscribe is getting merged.

To be fair, in some worlds, that might be the right answer - e.g. if that contact was authenticated when filling in the form, it would be checked, and actively unchecking it should remove the contact from the group. I'd bet you can find an issue of a description like "unsubscribing from a group via a profile not working".

Given your observations, I'd say that an anonymous contact should not be generating those unsubscribes, and if you can figure out where this code happens, it could be improved.


Is there an Import option to allow overwriting fields with null (empty)? I'm trying to do a bulk tidy-up of Address fields in CiviCRM 4.7 by exporting the data, manipulating it in a spreadsheet and re-importing it. This involves moving some values around between postal address fields, requiring some to be blanked. The Import option for Duplicate Matching can only be 'Update'. However, if I include a null value for any field it does not overwrite (blank out) an existing value, resulting in duplication. Only non-null values are considered to be updates.

Example: trying to move "121b Baker Street" from 'Supplementary Address 1' to 'Street Address' using Import/Update results in both these fields containing "121b Baker Street".

My problem is a more general case of the question at Uploading null email address which refers only to blanking of email addresses.

Unless I'm missing something, I'd like to propose another option for Duplicate Matching (alongside the current Skip / Update / Fill / No duplicate checking) called 'Edit'. It would allow the removal of existing values by overwriting with a null string but would otherwise behave in the same way as Update.

Although I still think the best solution is to have a new 'Edit' option for Duplicate Matching, Clear data from supplemental address on update provides a sufficient workaround for now. The use of "null" in CSV imports should be documented carefully.


Inline editing of website field deletes it When inline editing a website field, it deletes the field completely.

Inline adding a website does work, and it doesn't occur when editing the complete contact. I cannot find anybody else having this issue. Everybody can reproduce this on the demo site at:

https://civicrm.demo.civihosting.com/civicrm/contact/view?reset=1&cid=205

but it also occurs on my own 5.11.0 (In Drupal 7.65) site. Does anybody have a solution for this?

Steps to reproduce:

open an existing contact with filled website field, or create one
click on 'Add or edit website' next to the url
edit the url and press Enter or click 'Save'

The website field is empty now.

Michael,

Have logged an issue for this here and have also provided a fix for this issue. Can you please apply patch from here and test if it solves your problem? Also please try to comment on PR if the patch works for you. This will fasten process of merging PR into core so that it can be available in next release.

HTH

Pradeep


Backend Registrations face group-based pricing (extension) selections https://github.com/zengenuity/civicrm_groupprice/issues/7

Does anyone have a creative work-around or fix for this? Basically, when we make a back-end registration, we want to see all price set fields/options, regardless of the group-based pricing. The staff member doing the registrations, as it currently stands, only sees price sets based on the groups they may or may not be a part of.

CiviCRM 4.7.x (sigh:I know)

It should be working, but isn't. The user has 'Administer CiviCRM' permission assigned to their role.

 // If the user is an admin, just put a message next to the "hidden" options.
  // Otherwise, really hide them.
  if ($hide) {
    if ($isAdmin) {
      $amount[$amount_id]['options'][$priceOption['id']]['label'] .= ' (visible by admin access)';
    }
    else {
      $removed = $amount[$amount_id]['options'][$priceOption['id']];
      unset($amount[$amount_id]['options'][$priceOption['id']]);
      if ($removed['is_default'] && !empty($amount[$amount_id]['options'])) {
        $amount[$amount_id]['options'][reset(array_keys($amount[$amount_id]['options']))]['is_default'] = 1;
      }
    }
  }

Solved: they have to be in the CiviCRM group 'Administrators' to see the price fields restricted by group.

This wasn't documented as far as I noticed...but obvious in the code. Thanks extension creator! /civicrm/group/search?reset=1&force=1&context=smog&gid=1


Can I convert a smart group to a static group by editing the db directly? We have a bunch of smart groups that a lot of other smart groups rely on. I'd like to turn these former groups into regular groups and then generate them once a day, to improve performance. But deleting them and reconfiguring all the other groups with the replacements will be quite fiddly, so I'm wondering if I can convert them.

Has anyone tried this? Can I just edit civicrm_group to remove the:

saved_search_id
where_clause
select_tables
where_tables

? Just wondering if there are any gotchas I need to be aware of.

Unfortunately NO, updating saved_search_id to NULL will actually convert it to normal group but no contact's will get added into this group since for smart group the contact are calculated from civicrm_group_contact_cache table which is rebuild periodically and for normal group its from civicrm_group_contact which is static. So you will need to first rebuild the contacts for a group and then move data from cache to static table like

INSERT IGNORE INTO civicrm_group_contact (group_id, contact_id, status)
SELECT group_id, contact_id, 'Added' FROM civicrm_group_contact_cache
  WHERE group_id IN (1);

HTH

Pradeep


Contribution form issue: cannot submit donation It's Giving Tuesday and this donation form on my client's website won't allow credit card donors to submit their donations :o

https://apprenticelearning.org/civicrm/?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=3

When I've filled out all the information and try to submit a donation, this shows up (once Inspected):

VM625:1 Uncaught TypeError: Cannot read property 'id' of undefined
    at v (eval at  (jquery.min.js?r=Z0KlZ:2), :1:694)
    at w (eval at  (jquery.min.js?r=Z0KlZ:2), :1:1555)
    at Object.eval (eval at  (jquery.min.js?r=Z0KlZ:2), :1:1450)
    at Object. (jquery.min.js?r=Z0KlZ:2)
    at i (jquery.min.js?r=Z0KlZ:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?r=Z0KlZ:2)
    at x (jquery.min.js?r=Z0KlZ:4)
    at XMLHttpRequest.c (jquery.min.js?r=Z0KlZ:4)

Any help would be so appreciated!

Stripe uses javascript to submit the credit card credentials to the stripe server (so that they're never handled by the CiviCRM server). The console is showing that it's unable to do that because of javascript errors.

A browser may or may not stop processing if it encounters javascript errors, it depends on the browser/settings.

On your referenced page, it's CiviCRM loading the jquery.min.js file, so that suggests it's a purely CiviCRM issue - there's likely some Civi or extension javascript running that's trying to execute some jquery and getting an error.

As per Pete's comment, I'd start with thinking about what has changed since it was last working (e.g. a CiviCRM or extension update, a change with WordPress, etc.).


CiviCRM Extension: SMS Inbox Requirements Does anyone have any prototype/working SMS inbox functionality?

What would you ideally like to see in an SMS inbox?

So far I've:

Mark message as read.
Attach SMS to contact.

Other suggestions welcome!

If you remember, we almost did, but we'd have had to pay for the tagged VMN service (a bit like extension numbers). That or have more than one line. Otherwise if you're dealing with inbound SMS, you know who it's from, but not who it's to, because you only have one line.

Mark as read could be either the status, or a custom field on the activity.


How to disable Drupal's module update check for CiviCRM? A previous question asked about the "No available releases found" warning that Drupal shows in the Modules Update page. An answer said that this is caused by the fact that CiviCRM doesn't use Drupal's release infrastructure.

Previous thread

In any case, Drupal still emails me with the warning that "There was a problem checking available updates for your modules or themes."

Given that I like my sites to run without errors, the OCD part of me cringes at this. How might I correct this so that Drupal and I are happy?

Thanks.

There are a few options:

CiviCRM could use Drupal's infrastructure to ship CiviCRM downloads. Current CiviCRM / Drupal development process prevents this, and that's a much bigger topic and best discussed outside of this SO question!
CiviCRM could somehow suppress the update notifications from the Drupal update status page. This would hide the warning, but arguably be a worse outcome. I don't think this would deliver what you want.
CiviCRM could supply a project feed to match the existing Drupal.org infrastructure, so that Drupal can check that alternate feed URL for updates.

IMO the last option is the best balance of outcomes - it could provide accurate update notifications to Drupal-oriented administrators who might not see the in-app warnings in CiviCRM. There's a JIRA proposing this over at CRM-15769.


Event profile(s) field/table In what table are the online event registration profiles stored? They don't appear to be in civicrm_event where I would expect to find their profile IDs.
Thanks, Karen

Profiles are stored in civicrm_uf_group and the fields are in civicrm_uf_field. Search the column uf_group_type in civicrm_uf_group to see what the profile is used for or just lookup a particular profile id.

To search by an event id you will also need to look in civicrm_uf_join and use something like:

SELECT group_id where module = 'CiviEvent' AND entity_id = {my_event_id}


AH01797: client denied by server configuration [Tue Jul 12 21:36:24.720900 2016] [access_compat:error] [pid 5387] [client 192.158.31.162:44948] AH01797: client denied by server configuration: /var/www/XXX/sites/def
ault/files/civicrm/custom/delete-this-yeIAcdkLVh

Hi

I'm getting this in my apache logs when trying to delete some custom data fields left over from a bad extension installation. On screen it spins forever when trying to delete.

Anyone know where to start troubleshooting?

Thanks

The message that you're seeing in your Apache error.log may just be coincidental with your custom field issue. Those error.log messages are created when Civi checks itself to make sure certain directories and files are not accessible via the web. For more information, see Access denied errors by server itself on uploaded files?.


How do I create a new folder for reports? How do I add a new folder to the Reports menu, then move some of my custom reports to that folder?
Thanks!

Go to administer > custom data and screens > navigation menu > add a new menu item.


How to set up a lifetime membership? We want members to sign up and either auto-renew (it's free) or be lifetime members so there is no expiration date.  Which is the best approach?

What distinguishes a member from a non-member?  Is it basically being on your mailing list?  If so, you might consider not using CiviMember at all.

The paradigm of membership in CiviCRM is a dues-paying membership with a term.  While there are features to handle variations on that (free memberships and lifetime memberships, for example), there isn't much reason to go through the trouble of setting them up if they're both free and lifetime.

Instead, consider setting up a group.  You can have a profile add people to the group, you can search for everyone in the group, and you can mail to the group.  There's even the history of when someone was added to the group, if that matters to you.

The word "member" trips users up a lot, and it's common to see people think that CiviMember is the way to handle their free forever memberships in CiviCRM.  You can just turn it off by going to Administer > System Settings > Enable CiviCRM Components.


CiviEvent & Wordpress I formerly used CiviCRM with a Drupal website and recently moved over to the same Civi install on a Wordpress website. The CiviDB is the same, but the CMS has changed.

Previously, when using CiviEvent, there was a dropdown calendar for selecting the time. Also, when choosing the event location, I could select a formerly used event and it would auto-populate the fields with the event data from that previous event.

Now, on Wordpress, those functions do not work. I have to manually enter the time and date, and while I can select a previously used event, it does not auto-populate the fields (I have to manually re-enter the info, and it will erase any fields that are left blank in the other events that share the location).

My question is whether this is a limitation of the Wordpress version of CiviCRM, or if something was messed up when moving from Drupal to Wordpress. Do other Civi/WP users have this problem?

This sounds like a problem on your site specifically.

You can always verify this by checking the public CiviCRM/WP demo site.

To me this sounds like a general javascript error on your site, likely caused by a bad WP plugin or theme. Check the javascript troubleshooting guide for more details.


Upgrade Wordpress CiviCRM Version from 4.5.2 to 4.6.5 I have a good installation of CiviCRM on Wordpress, but now i want to upgrade to version 4.6.5 and when ik upgrade, the upgrade stops at 4.6.alpha7

I am trying for 4 hours to get an solution So i have tried to export the structure and data end make a new database  with the original structure imports. But nothing will work..

EDIT:
I have checked all the tables with a compare program,
Left= Current version 4.5.2 / working civicrm (Backup / before Upgrade)
Right= Original civicrm.mysql version 4.5.2

RESULT:
Only tables civicrm_value_**** are not in the right (original) version.

EDIT 2:
I can upgrade to version 4.5.8 without problems. If i want to upgrade then to 4.6.6 It will also stop at 4.6.alpha7 (error below)

I have also checked if there is a table civicrm_mailing_abtest but this table does not exist.

I hope someone can help me to solve this problem.

Thanks a lot. It is a fantastic plugin!! ( CiviCRM )

With kind regards,

Mark

This is the error:

[Error: Upgrade DB to 4.6.alpha7]
Fout Veld   fout waarde
Type    DB_Error
Code    -1
Message DB Error: unknown error
Mode    16
UserInfo    ALTER TABLE civicrm_mailing_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD CONSTRAINT FK_civicrm_mailing_abtest_created_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL [nativecode=1215 ** Cannot add foreign key constraint]
DebugInfo   ALTER TABLE civicrm_mailing_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD CONSTRAINT FK_civicrm_mailing_abtest_created_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL [nativecode=1215 ** Cannot add foreign key constraint]
PEAR_Exception: DB Error: unknown error in unknown on line unknown
- DB_Error: DB Error: unknown error in unknown on line unknown
Exception trace

I had a similar issue upgrading from 4.5.8 to 4.6.4, what worked for me was to manually remove the civicrm_mailing_abtest table from the database.
Restore your database backup before the upgrade and login to mysql

Update:
To restore your backup database:

mysql -u root -p // login to mysql

drop database civicrm; // delete the current database, the one is failing to upgrade

create database civicrm; // create a new empty database

quit // logout from mysql

Restoring the database backup

mysql -u root -p -h localhost civicrm < /path/to/your/database/backup/civicrm-database-backup.sql // write the backup to the new empty database

Replace "/path/to/your/database/backup" with your backup directory and "civicrm-database-backup.sql" with the name of your Civicrm backup SQL file.

Check for the existing civicrm_mailing_abtest table

mysql -u root -p

use civicrm; // replace civicrm with the name of your database

show tables; // it will give you a list with the civicrm database tables

If the civicrm_mailing_abtest is listed in the output, remove it, as it shouldn't be there, the A/B Test mailing was introduced in CiviCRM 4.6

drop table civicrm_mailing_abtest; // this will remove the table

After that proceed with the upgrade again.

Hope this helps

Update 2:
If you have permission errors after the restore, you will need to grant permission to the civicrm mysql user

mysql -u root -p

grant all on civicrm.* to 'username' identified by 'password';

flush privileges;


Bulk re assigment of relationships If you have a large number of contacts managed by one 'volunteer rep' as a relationship, when that rep leaves then there is a lot of cumbersome manual data entry.

I have looked and I can't find any built in reassigment function.

All I have worked out is as potential approaches
1.  user heavy  - run the relationship report - download a csv, change something and import
2. do it in the database directly

both not really satisfactory

Any ideas / approaches / am I missing something?

More of a thought than an answer (and really off the top of my head) - try using the Merge Contacts option, have the person with existing Relationships on the left, newbie on the right, untick all boxes other than Relationships, Merge.

Revisit your 'deleted' contact and undelete them - does it restore the relationships to them (I don't think so). Does this achieve what you need? Pls report back.


For my situation, what accounting package would fit with CiviCRM? I have civiCRM 4.6 installed on Drupal 7, and I'm looking how this fits together with any reasonably well known accounting package for either international or USA accounting systems.
In the latest version of CiviCRM there are some features that support the linking to financial accounts.
What accounting packages currently have integration with CiviCRM? Either commercial or open source.
Thanks

We built some integration for Xero which is an online accounting system. The code isn't quite 'plug and play' but once set up it does the synch between contacts and transactions in both systems. Read more about Xero here https://www.xero.com/ and a blog about the integration here http://www.fuzion.co.nz/blogs/civicrm-integration-xero


I get a bunch of identical messages "Notice: Trying to access array offset on value of type int in element_children() ..." My system upgraded from MySQL 5.7.30 to 8.0.
After that, CiviCRM was broken and I had to downgrade. I did it to Mysql 5.7.31 and the database ran again, but with a bunch of identical error messages at the top of my pages:

Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /usr/share/drupal/includes/common.inc).

I still have to perform some upgrades from CiviCRM 5.26.0 to 5.30.0
My additional question is: is it sufficient to upgrade CiviCRM to make the errors disappear or do I have to fix first the errors. In case I have to upgrade, I would like to know if it is better to upgrade in one shot from 5.26.0 to 2.30.0 or will I do it step by step?

There are a few items here:

It's safe to upgrade CiviCRM from 5.26 to 5.30 in a single step.   As always, back up your database first, and if you need to restore it, it's safest to drop the existing contents before reimporting the backup.

Notices should not be configured to appear on a production site, they're mainly of concern to developers.  Since you use Drupal you can turn notices off from the UI.  Other should change their php.ini.

Regardless, notices shouldn't prevent an upgrade, and moreover, the notices appear to be coming from Drupal, not CiviCRM.
Finally - I noticed that MySQL 5.7.31 doesn't like to export data unless you a) grant all privileges, or b) pass --no-tablespaces to mysqldump.  Either approach is fine.


How do I center images or align text via CKEditor? Can I add more functionality? I am trying to center images and align text via CKEditor but the options aren't there - why? I want to have access to more functionality with CKEditor.

A frustration I have had with CiviCRM has been the inability to center images or align text without modifying source code.  This frustration was recently resolved by visiting

Administer -> Customize Data and Screens -> Display Preferences -> Configure CKEditor

At the top of that page you will notice you can customize the skin (I recommend Moono-Lisa) and to the right of that - Plugins. You can search for CKEditor plugins and add them to CKEditor. You can also customize each toolbar for CiviMail and Events - or choose to have them mirror the default.

In order to justify text - I recommend the Justify plugin and the Image2 plugin.  Now you should be able to justify text and images as you like.

There are other plugins that provide other functionality, but do your research before adding them. the CKEditor site has explanations of each plugin.

Note: you will likely have to clear your local cache in order to see these changes.


New Profile adding custom fields issue I created a new Contact Type, Parish, based on Organization. No data added yet. I will display this as a  field in a Contact Records as a Parishoneer of relationship.

I am following a tutorial screencast of Roundearth CiviCRM Profile Forms. I wanted to create a Parish Sponsor Leads profile. I have First Name, Last Name, Email, Phone Number and Notes.

When I try to use Parish as a custom field, to be the first field in the form, in the new Parish Sponsor Leads profile I get this error:
Cannot add or update profile field type "Parish" with combination of "Individual".

CiviCRM doesn't allow you to add contact fields or custom fields of different contact type or contact sub type. The processing of mix profile is still not handled in CiviCRM.

You can create custom field for individual and then use hook to create organization contact and relationships.


How to setup CiviCRM to proper send authenticated (DKIM) emails? i want to make sure that all emails send out through CiviCRM have the proper authentication (DKIM). Currently I use (ticket@yogamela.org) as email from address for online event registrations. The same email I created also as mailbox in CiviCRM. But tests show, that the mail is sent with wrong DKIM signature. How to configure it in the right way?
Is CiviCRM using the mailbox i configured for sending out the email if the email address is the same, or do i need to change anything else?

Mails send directly through using webmail have the proper DKIM signature.

Here the test result if the mail is send through Event Registration in CiviCRM:
https://www.mail-tester.com/test-fp3hn&reloaded=1

Could it be that i have the same problem like described here:
CiviMail DKIM signature failure

Or did i just set it up wrong?

UPDATE:

For now i try to setup one authenticated email. Later i may want to add more. In case so can I add them all as Outbount Mails?
Sitegound provides both email hosting and server hosting.

As suggested I setup now an new Outbount Mail using SMTP:
Administer --> Settings - Outbound Mail

ssl://c15801.sgvps.net    (i tried also without ssl://)

465    (i tried also 25 without ssl:// and authentication: no)

Authentication? Yes

ticket@yogamela.org

Then this error comes after clicking save and test:

The site administrator needs to enter a valid 'FROM Email Address' in Administer CiviCRM » Communications » FROM Email Addresses. The email address used may need to be a valid mail account with your email service provider.

In the FROM Email Addresses I just entered ticket@yogamela.org.

Is my smtp server setup wrong, or my FROM email setup? The email address / password is a valid email with sitegound the port and server (without the ssl:// part) is what siteground recommended to use.

Is CiviCRM using the mailbox i configured for sending out the email if the email address is the same, or do i need to change anything else

For outbound mail, CiviCRM uses whatever you have configured at Administer > System Settings > Outbound Email (SMTP/Sendmail). How do you have that configured?

From a quick look at the source code of the email you linked to, my best guess is that you have it set up with the mail() option, which is likely not going to handle dkim (though that does depend on your webserver set up). If you have SMTP details for tickets@yogamela.org you could choose SMTP option there, add your details and then your SMTP server will then take care of DKIM.

Choosing SMTP and adding your details is likely the simplest route if you want to just get it working. That said, there are a few different ways that outbound mail can be configured so it is hard to give the best advice without knowing a bit more about your set up. Answers to questions like:

Who provides your email?
Do you want to email from multiple addresses or just tickets@yogamela.org?

would help provide a better answer.

Depending on your email provider, the SMTP details you have may allow you to send email from any email that ends @yogamela.org. Otherwise, if you want send email from lots of different email addresses ending @yogamela.org, you might want to look at a third party provider like Sparkpost or Sendgrid.

UPDATE:

That error message you pasted is a a bit wrong. The text does not match with the link. The text references FROM Email Addresses (civicrm/admin/options/from_email_address?reset=1) but the link you shared points at /civicrm/admin/domain?action=update&reset=1. What do you have set in /civicrm/admin/domain? (see picture below). Try adding tickets@yogamela.org there.

I suspect it will then work.


Pay later instructions don't show on membership contribution This one has me baffled. I've got a membership contribution page that works just fine with paypal standard payments (membership is processed and everything ends up correct, no problems.) It also has a pay later option. This works in so far as a pending transaction and membership is created. It does not, however, show the pay later instructions at any point to the user. It does not send any email from the contribution page, I think it should. When you manually enter payment then it will send a receipt.

I'm stuck for things to look for. I can't find any errors in any drupal logs or the civiCRM log file that look remotely relevant. There is no custom code being used anywhere, everything is straight up configuration of civiCRM. There is no customization of email templates.
 The only thing I've done that is unusual is this used to be a civiCRM installation on Joomla that has now been moved to Drupal. I thought the pay later instructions were being displayed correctly when I fist did the transfer to Drupal, but maybe I saw things that were not there, not sure. I've added more extensive instructions since then and they don't show. The same instructions for pay later do show on event bookings (I've used the same text copy and paste.) Pay later works as expected on the events and sends emails and everything.

The civiCRM version currently running is 4.7.2 after just upgrading from 4.7.1 - there was no change with this upgrade.

Any ideas on where to look next? Do I need to turn on debugging and stat looking for things that way? Is there an obvious answer I've overlooked? I welcome all ideas.

Just Managed to test the same against CiviCRM 4.7.2

Membership has been created with an contribution pending status

But in pay later option their is no email sent in Civicrm 4.7.2
Where as when payment is made using dummy payment processor an receipt is been sent out

I guess this is an Bug in this version so you should wait till the next release or you need to roll back to CiviCRM Version 4.6.10 where this option is working fine - Please raise an issue for the same so this gets fixed in next release

I guess this helps


How can people cancel their membership? We have a membership type that auto-renews every month. People pay via Authorize.net, Paypal, or they give us their info from their check and an automated draft is created over via Authorize.net.

However, I can't find a way to tell people how to go about ending their own membership other than contacting the organization and having them do it for the person.

How do people go about ending their membership on their own?

If you are using Drupal, you could set up a webform that allows people to change their membership status. This would not require any custom code, the functionality is all there in the Webform-CiviCRM module. You'd just want to carefully select which membership statuses you want to allow people to give themselves by editing that field and deselecting inappropriate options after adding it to the form.


No Active Recurring Contributions on civi record but stripe has the data. Is there a way to resend IPN? Due to a webhook problem, we have a few recurring donations that are now being processed by Stripe, but are not being recorded in our CiviCRM contribution table.

Is there a way to resend an IPN, or manually adjust Stripe so future donations get recorded in CiviCRM?

We are interested in having future payments from these people recorded in civiCRM. We can manually enter the missed records.
Is there a way to have next month's donations to get transferred back to CiviCRM from Stripe?

Should I be asking this question differently?

Yes.  In Stripe, go to Developers menu » Events.  Items with a pending webhook will have an icon next to them as indicated in the screenshot below:

Scroll to the bottom of the page and click "Retry all webhooks".

I'm not sure how long you can retry for - with PayPal it's 30 days, not sure about Stripe.


Upcoming activities in Case Control Panel - extend time span? In the control panel for CiviCase by default you see activities scheduled for the next two weeks under "My upcoming activities".

Is it possible to extend or control this timeframe? If so, how?

The definition is hardcoded in the view. See CRM_Case_BAO_Case::createCaseViewsQuery().

So you need to change the mysql view definition in the database. Copy and paste the "CREATE OR REPLACE..." code in the above function into phpmyadmin (or whatever) and change the 14 as desired. But it might get changed on upgrades if that view definition changes.

The original spec said "default", but then making it configurable I expect was just time/budget/priority.

See also How can I modify what is displayed on the civicase dashboard?


DB Error at Installation I have been runnning civiCRM for more than 2 years until now ; but I meet some problems (phone number cannot be saved).

So I try to install a new CiviCRM (4.7.11) on Drupal 7.50, the simplest way : install Drupal via Cpanel, upload civicrm tar.gz, and then install via sites/all/modules/civicrm/install/index.php (fetching Data Base credentials inside settings.php).

I have made several trials (http or https, same or separate database(s)) : all of them end with a

  "Sorry but we are not able to provide this at the moment. DB Error: unknown error".

However, all the civicrm tables are created, and the CiviCRM Menu can be displayed, but whatever I want to do (e.g. create a new contact), I get this DB Error again, and the info is not saved.

My hosting is based upon PHP 5.5, MariaDB 10.0.27 (supposed to be fully compatible with MySQL) (and a friend of mine, who uses the same hoster, has no such installation problem)

The significant error information is:

  DB_Error->DB_Error(-1, 16, (array:2), "SHOW function status WHERE db = database() AND name = 'civicrm_strip_non_numer...")

and

  DB_common->raiseError(-1, NULL, NULL, NULL, "1728 ** Cannot load from mysql.proc. The table is probably corrupted")

A backtrace from when I try to create a new contact is shown below.

Any help would be highly appreciated.

Finally, I found that this was due to a .htaccess jam (between drupal and civicrm) : inconsistencies and contradictions in "rewriterules", used to https:// the site, delete initial www., and redirect (and keep) to the pertinent civicrm directory.


How can I make External ID a searchable field? Or create a directory that displays all recorded external IDs?

when you click in the QuickSearch (white search box very top left) you should see a drop down of 'what do i want to search for' and External ID is in there. So you can select that and then just enter the Ext ID that you are looking for.
You can also add the Ext ID field to a Profile which you have set up for Search or Listing if you want this more public eg I set this up on demo.

This link for a user to 'edit' their own (which you wouldn't want I guess ;-) but you may need to check if that url is available and set the field to View Only
http://d46.demo.civicrm.org/civicrm/profile/edit?gid=16&reset=1

This to 'view' it
http://d46.demo.civicrm.org/civicrm/profile/edit?gid=16&reset=1

This to 'search' for it
http://d46.demo.civicrm.org/civicrm/profile?gid=16&reset=1

And this (or may be another url for this) to View the listing
http://d46.demo.civicrm.org/civicrm/profile?_qf_Search_display=true

External ID is also available from Advanced Search and Search Builder like most other fields.


How do I make "on behalf of" user proof? There is no nicer way to say this. My client's end users couldn't follow instructions if they were tattooed on their hands.

It's time to renew memberships. All members are organizations, so all contributions are "on behalf of." The users can't be trusted to enter the names of their member organization correctly. Is there any way to make the "organization name" into a drop down based on relationship?

I can't think of another way to keep users from entering initials instead of the proper organization name. I swear, they will be so creative with input that I can't even design a dedupe rule clean up afterwards.

Help and guidance is greatly appreciated.

This is how we solved this problem for a client that has teachers as their constituents who all belong to a School Board/District. We're using the autocomplete functionality that webform_civicrm module provides to force teachers to select rather than to type. You can only imagine how many ways one could type "Grande Prairie Roman Catholic Separate School Disctrict No. 28" before we locked this down...


Creating a summary of contents on civil mailings Wondering if there is a feature in a civi mailing to create a summary of the various stories that are being included in a mailing whereby each story title in the summary is clickable and takes you further down in the email to the corresponding story.

There isn't an automatic feature but this is what html anchor tags do. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Linking_to_another_section_on_the_same_page

So at the top of your html mail you can put

Thing 1

and repeat for each title/summary, and then use the id in your stories lower down like

Here is the actual story.


How do I test Online Contribution Receipts? How do I test the edits I make to online contribution receipts? Is making a test contribution using the online form the only way, or recommended way?

I would recommend you only TEST LIVE; Just delete the contribution that you have created afterwards; a $1 LIVE transaction that you can follow all the way though into your Payment Processor - will guarantee you that things are working as expected.

Added: You'll have tokens for total_amount etc, right? This is how you test it. You can also plug in TEST credentials for your payment Processor in LIVE payment processor config. Then you can test LIVE CiviCRM pathways with fake VISA cards.


Are there potential problems with per-subdomain installs? I'm being forced to break up one CiviCRM (in Drupal) database into several separate ones, and it seems that using subdomains would be the most elegant way to do so. That is to say I would copy website.com to one.website.com, two.website.com, and three.website.com. Then I'd change the base URL and have them exist separately from thereon. They would not share the same Drupal frontends either.

My questions are these: Would I face any unforeseen consequences in doing so? Can these installations exist side-by-side in harmony? Would my SMTP service (CiviSMTP, in my case) throw a fit? Is there a smarter way to go about this?

I have done 1 CiviCRM per subdomain in a big project. About 20 separate subdomains with their own CiviCRM.

If settings are all correct then there is no side effect. They all just work.
With copying a CiviCRM to another Drupal instance (subdomain or not), you need to think about

the connection between Drupal users and CiviCRM contacts
the CiviCRM table settings in settings.php
the user uploaded files, you probably want to copy all to 2nd CRM

Those subdomain Civis all handle their own SMTP. No issue there either.

I don't know CiviSMTP, maybe you need an account per subdomain, maybe they can share the account.


Contact Tabs links gone away When clicking on Pager Next/Prev/Page Change under My Custom Tab for Contact Here is my code of .tpl file:

...

{include file="CRM/common/pager.tpl" location="top"}
{strip}

            ...

        {foreach from=$rows item=row}
            ...
        {/foreach}

{/strip}
{include file="CRM/common/pager.tpl" location="bottom"}

{include file="CRM/common/jsortable.tpl"}

and Code for setting up Pager:

/**
 * Setting up $_pager for pagination support
 * Used CRM_Utils_Pager & CRM/common/pager.tpl to handle pagination
 */
public function pager() {
    // Setting up parameters for Pager that we are gonna create
    $params['status'] = ts('Some Entity %%StatusMessage%%');
    $params['csvString'] = NULL;
    $params['buttonTop'] = 'PagerTopButton';
    $params['buttonBottom'] = 'PagerBottomButton';
    $params['rowCount'] = $this->get(CRM_Utils_Pager::PAGE_ROWCOUNT);
    if (!$params['rowCount']) {
        $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
    }

    // Getting all Some Entity by Contact ID. if $_contactId is null then it return value for all Contact.
    $params['total'] = civicrm_api3( 'Entity', 'getcount', array( 'contact_id' => $this->_contactId ) );;

    // Setup Pager object and assign into template so it can be used by CRM/common/pager.tpl
    $this->_pager = new CRM_Utils_Pager($params);
    $this->assign_by_ref('pager', $this->_pager);
}

Thanks.

I have found the Problem, Problem was inside pager.tpl
pager.tpl generate some js to handle ajax page loading When pager.tpl location variable != top
That's js look like this without compiled(in pager.tpl):
{if $location neq 'top'}

#crm-main-content-wrapper is the main container of All tabs link and tab content. that's why it's html/content replaced by ajax response html.
To fix this what I have done:
Here is my .tpl file code(after fixed):
<form class="Your_Unique_Class_Name">

...

  {include file="CRM/common/pager.tpl" location="top"}
  {strip}

        ...

    {foreach from=$rows item=row}
        ...
    {/foreach}

    {/strip}
    {include file="CRM/common/pager.tpl" location="bottom"}

{include file="CRM/common/jsortable.tpl"}
</form>

and Code for setting up Pager:
/**
 * Setting up $_pager for pagination support
 * Used CRM_Utils_Pager & CRM/common/pager.tpl to handle pagination
 */
public function pager() {

    $this->assign( 'form', array( 'formClass' => 'Your_Unique_Class_Name' ) );

    // Setting up parameters for Pager that we are gonna create
    $params['status'] = ts('Some Entity %%StatusMessage%%');
    $params['csvString'] = NULL;
    $params['buttonTop'] = 'PagerTopButton';
    $params['buttonBottom'] = 'PagerBottomButton';
    $params['rowCount'] = $this->get(CRM_Utils_Pager::PAGE_ROWCOUNT);
    if (!$params['rowCount']) {
        $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
    }

    // Getting all Some Entity by Contact ID. if $_contactId is null then it return value for all Contact.
    $params['total'] = civicrm_api3( 'Entity', 'getcount', array( 'contact_id' => $this->_contactId ) );;

    // Setup Pager object and assign into template so it can be used by CRM/common/pager.tpl
    $this->_pager = new CRM_Utils_Pager($params);
    $this->assign_by_ref('pager', $this->_pager);
}

It's taken me long hours to find out this problem solution;
I think it will help you so that's why sharing with you!
Thanks