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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.1 Release Testing »
  • Upgrade error Drupal / WAMP install
Pages: [1]

Author Topic: Upgrade error Drupal / WAMP install  (Read 19155 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Upgrade error Drupal / WAMP install
September 10, 2008, 08:53:16 pm
I got an error on trying to re-enable after upgrading - it quite correctly told me there was not locales field in the civicrm_domain table

When I ran the upgrade script I got this error:
Quote
Warning: Smarty error: unable to read resource: "CRM/error.tpl" in C:\wamp\www\html\sites\all\modules\civicrm\packages\Smarty\Smarty.class.php on line 1092

This seems not so surprising as the path to error.tpl is templates\CRM\form\error.tpl

I have just upgraded to Drupal 6.4 and here's my server config:

Server Configuration
Apache version :
Apache/2.0.59 (Win32)
 
PHP version :
5.2.0
 
Loaded extensions :
bcmath, calendar, com_dotnet, ctype, session, filter, ftp, hash, iconv, json, odbc, pcre, Reflection, date, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, apache2handler, mbstring, mysql, mysqli, PDO, pdo_sqlite, SQLite
 
MySQL version :
5.0.27-community-nt


After upgrading I get the following:

backTrace

C:\wamp\www\html\sites\all\modules\civicrm\CRM\Core\Error.php, backtrace, 138
, handle,
C:\wamp\www\html\sites\all\modules\civicrm\packages\PEAR.php, call_user_func, 912
C:\wamp\www\html\sites\all\modules\civicrm\packages\DB.php, PEAR_Error, 966
C:\wamp\www\html\sites\all\modules\civicrm\packages\PEAR.php, DB_Error, 574
C:\wamp\www\html\sites\all\modules\civicrm\packages\DB\common.php, raiseError, 1903
C:\wamp\www\html\sites\all\modules\civicrm\packages\DB\mysql.php, raiseError, 898
C:\wamp\www\html\sites\all\modules\civicrm\packages\DB\mysql.php, mysqlRaiseError, 327
C:\wamp\www\html\sites\all\modules\civicrm\packages\DB\common.php, simpleQuery, 1216
C:\wamp\www\html\sites\all\modules\civicrm\packages\DB\DataObject.php, query, 2394
C:\wamp\www\html\sites\all\modules\civicrm\packages\DB\DataObject.php, _query, 442
C:\wamp\www\html\sites\all\modules\civicrm\CRM\Core\BAO\Setting.php, find, 153
C:\wamp\www\html\sites\all\modules\civicrm\CRM\Core\Config.php, retrieve, 337
C:\wamp\www\html\sites\all\modules\civicrm\CRM\Core\Config.php, _initVariables, 183
C:\wamp\www\html\sites\all\modules\civicrm\drupal\civicrm.module, singleton, 245
C:\wamp\www\html\includes\common.inc(1547) : eval()'d code, civicrm_initialize, 15
C:\wamp\www\html\includes\common.inc, eval, 1547
C:\wamp\www\html\modules\php\php.module, drupal_eval, 82
, php_filter,
C:\wamp\www\html\includes\module.inc, call_user_func_array, 450
C:\wamp\www\html\modules\filter\filter.module, module_invoke, 450
C:\wamp\www\html\modules\node\node.module, check_markup, 1040
C:\wamp\www\html\modules\node\node.module, node_prepare, 1081
C:\wamp\www\html\modules\node\node.module, node_build_content, 1002
C:\wamp\www\html\modules\node\node.module, node_view, 1739
, node_page_default,
C:\wamp\www\html\includes\menu.inc, call_user_func_array, 346
C:\wamp\www\html\index.php, menu_execute_active_handler, 18

Sorry. A non-recoverable error has occurred. The error trace below might help to resolve the issue

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT  config_backend, locales 
 FROM civicrm_domain
 
 
 
 
 
 [nativecode=1054 ** Unknown column 'locales' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT  config_backend, locales 
 FROM civicrm_domain
 
 
 
 
 
 [nativecode=1054 ** Unknown column 'locales' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT  config_backend, locales 
 FROM civicrm_domain
 
 
 
 
 
 [nativecode=1054 ** Unknown column 'locales' in 'field list']"]
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Upgrade error Drupal / WAMP install
September 11, 2008, 12:36:45 am
Quote
Warning: Smarty error: unable to read resource: "CRM/error.tpl" in C:\wamp\www\html\sites\all\modules\civicrm\packages\Smarty\Smarty.class.php on line 1092
The reason could be that upgrade script noticed some problem while doing the upgrade and wanted to display that error using the error-template which is templates/CRM/error.tpl in CiviCRM v2.0 and templates/CRM/common/fatal.tpl in CiviCRM v2.1.

While/before upgrading, your code-base is 2.1 but config still has old values. And when an error is encountered during/before upgrade it tries to display it using "templates/CRM/error.tpl" file which in v2.1 has actually changed to "templates/CRM/common/fatal.tpl".

Upgrade script does try to update config values at the end of upgrade script, which looks too late for this case. We 'll fix it as soon as possible.

Your temporary solution could be copy templates/CRM/common/fatal.tpl as templates/CRM/error.tpl and re-run the upgrade script to check for errors upgrade-script wanted to notify you.

Quote
it quite correctly told me there was not locales field in the civicrm_domain table
May be because upgrade didn't run successfully, you noticed this error.
« Last Edit: September 11, 2008, 12:38:47 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Upgrade error Drupal / WAMP install
September 11, 2008, 01:02:13 am
Thank you - it is complaining about the database version - where is this held?

Sorry. A non-recoverable error has occurred.

Database check failed - the current database is not v2.0.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Upgrade error Drupal / WAMP install
September 11, 2008, 01:08:11 am
Here's a dump of the civicrm_domain table:

<?xml version="1.0" encoding="utf-8" ?>
<!--
-
- phpMyAdmin XML Dump
- version 2.9.0.3
- http://www.phpmyadmin.net
-
- Host: localhost
- Generation Time: Sep 11, 2008 at 08:04 PM
- Server version: 5.0.27
- PHP Version: 5.2.0
-->

<!--
- Database: 'dbname'
-->
<dbname>
  <!-- Table civicrm_domain -->
    <civicrm_domain>
        <id>1</id>
        <name>Wellington Circus Trust</name>
        <email_name>Wellington Circus Trust</email_name>
        <email_address>email@emailaddress</email_address>
        <email_domain>**Removed**<email_domain>
        <email_return_path>**Removed**</email_return_path>
        <config_backend>**Removed**<config_backend>
        <version>2</version>
        <loc_block_id>1</loc_block_id>
    </civicrm_domain>
</DB name>
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Upgrade error Drupal / WAMP install
September 11, 2008, 01:19:40 am
Ok - edited the version per about from '2' to '2.0' and the upgrade succeeded (nb I'm running 2.0.4)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Durruti

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
    • The Kindling Trust
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.2.17
Re: Upgrade error Drupal / WAMP install
October 29, 2008, 09:49:07 am
Hello there,
I have exactly the same problem with missing "locales" and "config_backend" fields in the table "civicrm_domain" on an upgrade from 2.0.3 to 2.1.1. I have verified in phpmyadmin that they are not there, either in the version that crashed mid update (and that now outputs the backtrace to the screen) or in my working backup of the database from civicrm 2.0.3.
I am unsure about where the database version needs to be changed, looking at the version number in the table itself (civicrm_domain) it is already set to 2.0. My backtrace output is identical to your issue as far as I can see, but I attach it anyway, in case I'm missing something. Any ideas how I can fix this.

Many, many thanks for any advice that you might have,
Cheers,
durruti

Code: [Select]
backTrace

/data01/mrsn/public_html/directory/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 138
, handle,
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 912
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 966
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 574
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2394
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 442
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php, find, 153
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/CRM/Core/Config.php, retrieve, 345
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/CRM/Core/Config.php, _initVariables, 183
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/drupal/civicrm.module, singleton, 245
/data01/mrsn/public_html/directory/sites/all/modules/civicrm/drupal/civicrm.module, civicrm_initialize, 150
, civicrm_block,
/data01/mrsn/public_html/directory/includes/module.inc, call_user_func_array, 450
/data01/mrsn/public_html/directory/modules/block/block.module, module_invoke, 473
/data01/mrsn/public_html/directory/includes/theme.inc, block_list, 1530
/data01/mrsn/public_html/directory/themes/chameleon/chameleon.theme, theme_blocks, 27
, chameleon_page,
/data01/mrsn/public_html/directory/includes/theme.inc, call_user_func_array, 597
/data01/mrsn/public_html/directory/includes/common.inc, theme, 365
/data01/mrsn/public_html/directory/index.php, drupal_not_found, 24

Sorry. A non-recoverable error has occurred. The error trace below might help to resolve the issue

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT  config_backend, locales 
 FROM civicrm_domain
 
 
 
 
 
 [nativecode=1054 ** Unknown column 'locales' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT  config_backend, locales 
 FROM civicrm_domain
 
 
 
 
 
 [nativecode=1054 ** Unknown column 'locales' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT  config_backend, locales 
 FROM civicrm_domain
 
 
 
 
 
 [nativecode=1054 ** Unknown column 'locales' in 'field list']"]
)
[/code]
http://feedingmanchester.org.uk

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Upgrade error Drupal / WAMP install
November 01, 2008, 07:25:46 pm
Quote
Your temporary solution could be copy templates/CRM/common/fatal.tpl as templates/CRM/error.tpl and re-run the upgrade script to check for errors upgrade-script wanted to notify you.

Doing the above step meant that I was able to see the error causing the script to fail. The problem we had in common was the error reporting. The underlying problem may be different.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

kyle.vh

  • Guest
Re: Upgrade error Drupal / WAMP install
November 20, 2008, 03:41:04 pm
I have this same problem. Not using WAMP setup, though.
I'm upgrading Drupal 5.x to 6.x and trying to take Civicrm with me from 2.0 to 2.1.
I get the same error. I'm going to try Deepak's solution.

kyle.vh

  • Guest
Re: Upgrade error Drupal / WAMP install
November 20, 2008, 03:44:54 pm
for what it's worth, I updated my base url, that was wrong. That fixed the fatal error. now I'm getting the civicrm failure:
"Database consistency check failed. FK constraint names not in the required format..." I'm going to look into that now.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.1 Release Testing »
  • Upgrade error Drupal / WAMP install

This forum was archived on 2017-11-26.