5

I've updated from 4.7.29 to 5.0.0 The SQL update went well, but I've issues with JS/Pictures not loading. This is really blocking as for example, the "Create new contact" is not loading See screenshots below. Could you please advise ? Thanks

enter image description here enter image description here enter image description here enter image description here enter image description here

Error at "Create new user page"

CiviCRM_API3_Exception: "DB Error: no such field"

0 /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFGroup.php(3341): civicrm_api3("uf_group", "get", (Array:3))

1 /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Edit/Address.php(226): CRM_Core_BAO_UFGroup::getCreateLinks((Array:3), "shared_address")

2 /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Location.php(107): CRM_Contact_Form_Edit_Address::buildQuickForm(Object(CRM_Contact_Form_Contact))

...

2

I can see the problem (I saw this myself recently), but I don't have a 100% answer. However, the solution is usually to rebuild your multilingual schema.

This problem is characterized by:

  • Multilingual mode is activated on your CiviCRM site.
  • Error in the browser console show files not found at a path with the word "undefined" in it.
  • Also, "DB Error: no such field" errors (though this can also be caused by missing extensions or failing to upgrade the database after upgrading the CiviCRM files).

Based on these instructions, here's how you rebuild the multilingual schema:

From within CiviCRM (CiviCRM 5.1+ only):

  • Go to Support menu » Developer » API Explorer.
  • Set Entity to System and Action to rebuildmultilingualschema.
  • Press the Execute button.

From the command line (Civi 5.0.1 and earlier):

Drupal 7

drush php-eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'

Drupal 8

drush php-eval '\Drupal::service('civicrm')->initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'

WordPress

wp eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'

  • Hello, thanks for yr reply. I've checked the page linked to admin.php?page=Civic and here are the details : we.tl/Qhz1gPvzXv - I don't know where to check in this page. I've disabled all WP plugin one by one, and change the template, the error is still there. Any help would be very appreciated. – ITSupport ERELOS Apr 15 '18 at 8:04
  • Is this a multilingual site? There have been some issues on chat about needing to rebuild the schema after upgrade - those DB errors look suspicious github.com/civicrm/civicrm-core/pull/11967 – user4278 Apr 16 '18 at 4:04
  • Thanks for the feedback. We use civicrm in French only, I've kept the en-GB and fr-fr language from the l10n package. Any other idea ? – ITSupport ERELOS Apr 16 '18 at 6:08
  • I've seen something similar. Can you load the "System Status" page or does it never load the dynamic (Angular) portion? Do your Administration menu items have broken link pictures? I had to disable logging, disable Multilingual, enable logging, disable logging, re-enable Multilingual, re-enable logging. I'm not sure what information you will loose when you disable Multilingual, but there is a warning. – G H Apr 16 '18 at 12:38
  • Hello Jon, yes system status is broken, broken links pictures in menu. I cannot open the 2nd page of the configuration checklist 'Address and localization of the contact" -> "CiviCRM_API3_Exception: "DB Error: no such field" (see details here: we.tl/TANn6ZbCYk") Logging was not enable, neither multilanguage (only use French) / do you think a further update of civicrm will fix the issue ? this is very impacting : cannot create user, event... all pages with ajax are fully or partialy broken. Thanks – ITSupport ERELOS Apr 17 '18 at 4:42
0

The issue was due to the missing field "frontend_title" in "civicrm_uf_group" (mentioned in the DB error message"). To fix the issue I did drop the table and recreated it. No more JS error after that. Special thanks to @Jon G. for his follow-up, however : I could not access the APIv3 from civicrm (it uses JS and wasn't showing up due to the error), I don't know how to use CommandLine. By the way, the APIv3 is now accessible but once "system" is selected for "entity", the choice "rebuildmultilingualschema" for "action" is not proposed; maybe due to the fact that multilingual civicrm is not used on our domain. Thanks again, best regards

  • Seems that this was related to this issue github.com/civicrm/civicrm-core/pull/11508 / but in civicrm files package wp-content\plugins\civicrm\civicrm\CRM\Upgrade\Incremental\sql I can't see any "alter table" request to add the "frontend_title" field in civicrm_uf_group table in the 4.7.31.mysql.tpl nor 4.7.32.mysql.tpl files ... managed somewhere else maybe, or forgotten... – ITSupport ERELOS Apr 29 '18 at 14:54
  • Fix the issues of icons not loading and ajax search not working / ALTER TABLE civicrm_uf_group ADD frontend_title VARCHAR(64) NULL DEFAULT NULL COMMENT 'Profile Form Public title'; ALTER TABLE civicrm_uf_group ADD add_cancel_button TINYINT(4) NULL DEFAULT '1' COMMENT 'Should a Cancel button be included in this Profile form.'; – ITSupport ERELOS Aug 31 '18 at 11:50

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.