1

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

Hi gang,

I'd love to fix the above bug for the core. Does anyone know the best way to solve it, or where I should begin to look for anything that may cause it?

  1. Create a Drupal View using custom data from CiviCRM contacts.
  2. Save
  3. Run drush cc all on the command line
  4. Reload the admin page for the View
  5. Observe that the custom fields have gone missing, and are not available in the field list.
  6. Click save on the View.
  7. Observe that the custom fields are now present in the list.

This is observed in an instance where Civi and Drupal share a DB on 4.7.17.

Update 1 The bug appears to be that after drush clear CRM_Core_BAO_Cache::getItem('contact fields', $cacheKeyString); isn't returning custom fields in exportableFields sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php. It does upon clicking "save" in the view, however.

Does anyone know where these are populated from, or have any guidance about where to go from here?

John

  • John - is this only the case with separate dbs for Drupal v civicrm? I know I have seen this occasionally in the latter case, but suspected it was some unique situation with the hosting platform when we were trying Pantheon i think it was – petednz - fuzion Mar 17 '17 at 19:29
  • @petednz-fuzion I updated the quezzy for you my bezzy. – JohnFF Mar 17 '17 at 22:45
  • I seem to recall that drush cc all doesn't actually clear "all" caches, just all Drupal caches; I'm not sure of details or if even that much is true, but maybe something to look at. – TwoMice Mar 17 '17 at 23:08
  • I'm using drush lots and have lots of views w/ custom fields and I have not run into this yet 🤔 And we have separate dbs – KarinG - Semper IT Mar 18 '17 at 0:51
  • @KarinG-SemperIT What version of civi are you on? – JohnFF Mar 18 '17 at 15:15
1

I'm going to add an answer (don't want to bury this in the comments) that for a 4.7.17 - with two separate databases - drupal and civicrm; this is NOT an issue;

My view with custom data before and after and in-between:

[karin@louise bin]$ sudo -u apache drush civicrm-upgrade-db
Starting with v4.7.16 -> v4.7.17 upgrade ..                                                                                                      

Specifically trying to just drush cc all:

[karin@louise bin]$ sudo -u apache drush cc all

is fine - the way they were on 4.7.16 - with CiviCRM Custom field listed under Fields

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.