Hot answers tagged

7 votes
Accepted

How do I use custom fields in Drupal views?

Saw the same issue here. We noticed that the field appeared twice in the list of fields. We'd selected it as CiviCRM Contact: My Field - but it also appeared as CiviCRM Custom: My Field. When we ...
davejenx's user avatar
  • 2,365
6 votes
Accepted

Ran direct SQL update to bulk update contact names, changes not appearing until editing and saving

It sounds like you imported the first_name and last_name values - but the value at the top of the record is the display_name. You have two options: Use your SQL script to update the display_name ...
Jon G - Megaphone Tech's user avatar
6 votes
Accepted

How to get "Last contribution amount" and "Last contribution date" into report?

The way we have approached this in the past is to install/enable the Summary Fields extension, and set that up so it calculates the Last Date and Last amount, which are then available as custom fields ...
petednz - fuzion's user avatar
  • 28.1k
5 votes
Accepted

How to remove "Extended Demographics"?

The easiest would be if you can find it in the CiviCRM custom groups? Using Administer/Customize Data and Screens/Custom Fields. If that does not work, check the table civicrm_custom_group. You will ...
ErikH - CiviCooP's user avatar
5 votes
Accepted

How to find CiviCRM version in SQL from a database backup

You could use phpmyadmin and look in table 'civicrm_domain' at field 'version' - the version is stored there.
Andy Clark's user avatar
  • 4,720
4 votes
Accepted

Error occurs : Unknown column 'relationship_civireport.contact_id_a' however not for "Super User" users

I just ran into this issue (on current Drupal, current CiviCRM setup) and confirmed that the way it's set now, a non-admin user needs the permission "access deleted contacts" to run this report. Hope ...
Eli Lisseck's user avatar
4 votes
Accepted

SQL Syntax Error - When starting civicrm with joomla

it seems php 7.2 is not compatible with 5.x.x or i do not know how to do the configuration i think downgrade the php would be the best solution but i wonder if there is other answer, and how to do it....
Jennifer Lee's user avatar
3 votes
Accepted

Why is this Activity Search failing?

I think this is the same problem as https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl/pull/14
Demerit's user avatar
  • 21.7k
3 votes

Trouble saving changes to a report

Check Drupal permissions at http://site/admin/people/permissions. It might be "CiviReport: save Report Criteria".
Demerit's user avatar
  • 21.7k
3 votes

Trouble saving changes to a report

Although it's not ultimately an answer to why the code is blowing up, the simplest solution to my problem was found in the report's settings. Under the Sorting tab, the report was set to sort on ...
Kotodharma's user avatar
3 votes
Accepted

Is there a function that will execute multiple SQL statements?

Yes, there is such a function; but you shouldn't use it. Make each query separately and check the result. Avoid functions which make multiple SQL queries in one action, as they make it harder for ...
Chris Burgess's user avatar
2 votes

Is there a way to encrypt a single field in Civi database?

We were recently asked to 'Encrypt one CiviCRM custom field' for one of our clients who uses Webform CiviCRM module as a GUI to view/edit/add custom field values to CiviCRM for their clients. I ...
KarinG - Semper IT's user avatar
2 votes
Accepted

Bulk delete of events - is such a thing possible?

General advice is don't use SQL directly - use the API. You don't have to write code if you use cv or API explorer.
Aidan's user avatar
  • 12.9k
2 votes

Fixing null sort and display names

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 ...
Luke Stewart's user avatar
  • 1,835
2 votes
Accepted

Make phone type value "mobile" for every individual

You might be running the manual query under a different mysql user than the one that owns the function, so you can check who the "definer" is using show create function civicrm_strip_non_numeric;. If ...
Demerit's user avatar
  • 21.7k
2 votes
Accepted

Debugging SQL - possible database problem

This particular error seems to be a recent regression in 4.7.23: https://issues.civicrm.org/jira/browse/CRM-21029 You can wait until the release of 4.7.24 or apply the patch from https://github.com/...
Thomas Schüttler's user avatar
2 votes

how to get an autoincrementing membership id with existing membership numbers

I would use the Contact Identity Extension and add a custom ID type for your membership number (https://github.com/systopia/de.systopia.identitytracker). Fiddling around with contact ID's in the ...
Jaap Jansma - CiviCooP's user avatar
2 votes
Accepted

How to split CiviCRM multiple database values with SQL?

For every option group (that is, set of multiple values) I created two SQL views: One for splitting the varchar field correctly, and one for combining the split values with other data. All of these &...
emma's user avatar
  • 463
1 vote

Constraint violation when viewing Mailing Detail Report (group_id the cause)

So I feel rather silly, all that was needed was to go into the report and edit the filters so that it was no longer looking at the group that no longer existed rather than going to the report via the ...
Jade's user avatar
  • 684
1 vote

Constraint violation when viewing Mailing Detail Report (group_id the cause)

Turned out to be a filter value in the report that was referencing a mailing group that no longer exists. It's 'id' was therefore missing from the civicrm_group table.
Michael Chaplin's user avatar
1 vote

How do you separate wordpress and civicrm tables?

First, I think this is a comprehensive list, though Demerit obviously uses some integration tricks I don't, and others may as well. Second, for concrete instructions on how to do steps 2-4 and 7, ...
Jon G - Megaphone Tech's user avatar
1 vote

How do you separate wordpress and civicrm tables?

Maybe if you have some plugin that uses $wpdb to access civi tables. For example there are several workarounds to try to get the functionality of drupal views that isn't in wordpress, and if they're ...
Demerit's user avatar
  • 21.7k
1 vote

Custom field default values at database level, not form level?

Hang on, there is a default_value column in the civicrm_custom_field table? I would assume changing that value would actually work....
ErikH - CiviCooP's user avatar
1 vote

Custom field default values at database level, not form level?

A possible downside, although unlikely, is an upgrade might do some kind of batch modify on all custom fields that would wipe your default value. What are you trying to do that can't be done with a ...
Demerit's user avatar
  • 21.7k
1 vote
Accepted

Fatal DB query syntax error on rules search - Civi 5.0.0 and recent Civirules

I do not know without checking on your site. I have recently tested 2.1 on an existing site and it worked there. You might want to check if the civirule_condition table is still populated? It might be ...
ErikH - CiviCooP's user avatar
1 vote

Query to get a list of contacts not tagged with a tag, but the user has multiple other tags

I don't know how this would translate to Drupal Views, but here is the SQL to do it: SELECT contact.id FROM civicrm_contact contact LEFT JOIN civicrm_entity_tag et ON et.entity_table = '...
Sean's user avatar
  • 3,158
1 vote

How to update to new SQL database username and password?

These values need to be entered in the civicrm.settings.php file (i assume this is the same for WP as for Drupal)
petednz - fuzion's user avatar
  • 28.1k
1 vote

New install, system status says "cron not running" and "timestamp mismatch"

The first thing I would check is the TimeZone setting in WP. Go to Settings--> General. That cannot be the default (UTC +0) as the default does not exist in php (UTC does, but not UTC +0). That ...
Kevin Cristiano's user avatar
1 vote

Error creating Custom Data - DB Error: already exists

Try creating the custom data fieldset with a completely different name. In the code, the fieldset name you provide gets converted into a 'safe' table name for the fieldset, and it's telling you that ...
Alan Dixon's user avatar
  • 6,644
1 vote

Dropping thousands of records into a batch via SQL

Well this is not really an answer but it is a workaround. We've found that when creating the batch, if we specify the Payment Instrument (e.g. Credit Card) then it works. So we can get around this for ...
Laryn's user avatar
  • 8,253

Only top scored, non community-wiki answers of a minimum length are eligible