1

Ran the update script and said it upgraded successfully... however, when running the Wordpress page where my subscription form was, got a No Such Field error...

It seems that the civicrm_custom_group_xx_XX views are not updated to include the is_public flag... The civicrm_custom_group table is updated, but not the views...

4
  • Note that I am using PHP 7.1 ...
    – Serge
    Commented May 22, 2017 at 20:36
  • is there another word that could be used instead of 'views' to avoid confusion with eg Drupal Views?
    – petednz - fuzion
    Commented May 23, 2017 at 6:18
  • ok. now i am curious. this field got introduced in 4.7.x? I might fire up a new question.
    – petednz - fuzion
    Commented May 23, 2017 at 6:23
  • The proper name for them is MySql views actually...
    – Serge
    Commented May 24, 2017 at 11:58

2 Answers 2

2

While the patch in https://github.com/civicrm/civicrm-core/pull/10399/files will fix the issue for future site upgrades, it won't help with site that are already experiencing this issue. Running the following will fix sites affected by this issue:

drush eval 'civicrm_initialize(); $domain = new CRM_Core_DAO_Domain(); $domain->find(TRUE); if ($domain->locales) { $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales); CRM_Core_I18n_Schema::rebuildMultilingualSchema($locales, NULL); }'
1
  • I would imagine there is similar way of doing eval stuff using wp-cli for those on wordpress, I'm not sure about joomla but they could also look into cv as well
    – Seamus Lee
    Commented May 23, 2017 at 21:14
1

In case others have the same issue, you need to fix the views manually by redefining them to include the 'is_public' field... You need to do this for each language in your database...

For example, I updated my fr_CA language (civicrm_custom_group_fr_CA) view as so:

CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`coalitioncivi`@`localhost` SQL SECURITY DEFINER VIEW `civicrm_custom_group_fr_CA`
AS SELECT
   `civicrm_custom_group`.`id` AS `id`,
   `civicrm_custom_group`.`name` AS `name`,
   `civicrm_custom_group`.`extends` AS `extends`,
   `civicrm_custom_group`.`extends_entity_column_id` AS `extends_entity_column_id`,
   `civicrm_custom_group`.`extends_entity_column_value` AS `extends_entity_column_value`,
   `civicrm_custom_group`.`style` AS `style`,
   `civicrm_custom_group`.`collapse_display` AS `collapse_display`,
   `civicrm_custom_group`.`weight` AS `weight`,
   `civicrm_custom_group`.`is_active` AS `is_active`,
   `civicrm_custom_group`.`table_name` AS `table_name`,
   `civicrm_custom_group`.`is_multiple` AS `is_multiple`,
   `civicrm_custom_group`.`min_multiple` AS `min_multiple`,
   `civicrm_custom_group`.`max_multiple` AS `max_multiple`,
   `civicrm_custom_group`.`collapse_adv_display` AS `collapse_adv_display`,
   `civicrm_custom_group`.`created_id` AS `created_id`,
   `civicrm_custom_group`.`created_date` AS `created_date`,
   `civicrm_custom_group`.`is_reserved` AS `is_reserved`,
   `civicrm_custom_group`.`title_fr_CA` AS `title`,
   `civicrm_custom_group`.`help_pre_fr_CA` AS `help_pre`,
   `civicrm_custom_group`.`help_post_fr_CA` AS `help_post`,
   `civicrm_custom_group`.`is_public` AS `is_public`
FROM `civicrm_custom_group`;

Did the same for my en_US view... and all is working... hope that is the only issue...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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