CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.1.5 to 4.3.5 halts part way through upgrade from JS error
Pages: [1]

Author Topic: Upgrade from 4.1.5 to 4.3.5 halts part way through upgrade from JS error  (Read 1270 times)

m4olivei

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 2
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: MySQL 5
  • PHP version: PHP 5.3
Upgrade from 4.1.5 to 4.3.5 halts part way through upgrade from JS error
August 12, 2013, 07:21:14 am
Hello,

Trying to upgrade from 4.1.5 to 4.3.5.  When I run the upgrade page at /civicrm/upgrade?reset=1 it works for the first few steps, but then stops from a JS error part way through.  The JS error I get is "Uncaught SyntaxError: Unexpected token < ".  It seems to be because the upgrade script expects a JSON response from the AJAX requests it's making along the way but is getting an HTML response on the last request before is fails.  The contents of that HTML response is:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <base href="/sites/all/modules/civicrm/" />
  <style type="text/css" media="screen">@import url(/sites/all/modules/civicrm/css/civicrm.css);</style>
  <style type="text/css" media="screen">@import url(/sites/all/modules/civicrm/css/extras.css);</style>
</head>
<body>
<div id="crm-container" class="crm-container" lang="en" xml:lang="en">
<div class="messages status no-popup">  <div class="icon red-icon alert-icon"></div>
 <span class="status-fatal">Sorry but we are not able to provide this at the moment.</span>
    <div class="crm-section crm-error-message"></div>
            <hr style="solid 1px" />
        <div class="crm-section crm-error-message">DB Error: no such field</div>
            <p><a href="http://local.bbi.com/en/" title="Main Menu">Return to home page.</a></p>
</div>
</div>
<script language="JavaScript">
function toggle( element ) {
    var className = element.className;
    if ( className  == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') {
        element.className = 'crm-accordion-wrapper  crm-fatal-error-details-block';
    } else {
        element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block';
    }
}
</script>

</body>
</html>

Which if you look at the text delivered in that response, it's:

"Sorry but we are not able to provide this at the moment."
"DB Error: no such field"

Has anyone seen this issue?  How can I get past this?  How can I even find more information about the error?  Is there a log, or something I can check for more information?

Thanks,
Matt

m4olivei

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 2
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: MySQL 5
  • PHP version: PHP 5.3
Re: Upgrade from 4.1.5 to 4.3.5 halts part way through upgrade from JS error
August 12, 2013, 07:57:11 am
Did some more debugging and found a more detailed error message when it fails.  The following MySQL error is thrown:

Code: [Select]
Unknown column 'civicrm_custom_field.label' in 'field list', 1054

This is the query it's trying to run:

Code: [Select]
SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Individual', 'Contact')
  AND civicrm_custom_group.extends_entity_column_value IS NULL
 AND civicrm_custom_group.id = 1 AND  ( 1 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label

My CiviCRM install is a localized one and looking at the DB schema, the civicrm_custom_field table doesn't have 'label' columns, what is does have are 'label_en_US', 'label_en_CA' and 'label_fr_CA'.  Is there something special you have to do for localized CiviCRM installs?

m4olivei

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 2
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: MySQL 5
  • PHP version: PHP 5.3
Re: Upgrade from 4.1.5 to 4.3.5 halts part way through upgrade from JS error
August 12, 2013, 09:30:18 am
Figured it out.  I had a feeling this was an obscure issue, and so it appears to have been.

Using xdebug I stopped at the error and went back through the call stack and found that the offending query above was triggered as part of the views module rebuilding it's cache.  I then noted that this trail was triggered early by CiviCRM's breadcrumb rendering stuff.  So what i did was in the file /sites/all/modules/civicrm/CRM/Core/Menu.php, line 635 (CiviCRM v4.3.5), I unset the breadcrumb, so that it wouldn't go off on that path that runs the bad query, ie change:

Code: [Select]
return $menuPath;

to

Code: [Select]
unset($menuPath['breadcrumb']);
return $menuPath;

After that I hit the upgrade path and it finished through to 4.3.5.  Yay!

I imagine another solution might be to disable all Drupal contrib modules and try the upgrade that way.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.1.5 to 4.3.5 halts part way through upgrade from JS error

This forum was archived on 2017-11-26.