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 failed: 2.2.9 --> 3.3.3... DB Error: no such field
Pages: [1]

Author Topic: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field  (Read 2599 times)

wisco.disco

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 2.2.9
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.2
Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
January 27, 2011, 11:41:46 am
Hello,

I'm attempting to upgrade a 2.2.9 installation to 3.3.3.  I've followed the upgrade docs CRMDOC33/Upgrade+Drupal+Sites+to+3.3 successfully until Step 8 "Run the upgrade script".

At this time I get the message:

Sorry. A non-recoverable error has occurred.
DB Error: no such field
Error Details

I click on the "Error Details" link but nothing happens. 

If I look in the log file found here: default/files/civicrm/templates_c/en_US/ConfigAndLog/CiviCRM.5893095e80281def716f059f0f743948.log

The log tells me, in part:
host$ grep nativecode= *log | sort -u

      AND (civicrm_event.start_date >= 20110126 OR civicrm_event.end_date >= 20110126) ORDER BY   civicrm_event.start_date ASC [nativecode=1054 ** Unknown column 'is_template' in 'where clause']
      AND (civicrm_event.start_date >= 20110126 OR civicrm_event.end_date >= 20110126) ORDER BY   civicrm_event.start_date ASC [nativecode=1054 ** Unknown column 'is_template' in 'where clause']"]
      AND (civicrm_event.start_date >= 20110127 OR civicrm_event.end_date >= 20110127) ORDER BY   civicrm_event.start_date ASC [nativecode=1054 ** Unknown column 'is_template' in 'where clause']
      AND (civicrm_event.start_date >= 20110127 OR civicrm_event.end_date >= 20110127) ORDER BY   civicrm_event.start_date ASC [nativecode=1054 ** Unknown column 'is_template' in 'where clause']"]
 ORDER BY c.id [nativecode=1146 ** Table 'civicrm_prod.civicrm_contact_type' doesn't exist]
 ORDER BY c.id [nativecode=1146 ** Table 'civicrm_prod.civicrm_contact_type' doesn't exist]"]
 [nativecode=1054 ** Unknown column 'civicrm_preferences.domain_id' in 'where clause']
 [nativecode=1054 ** Unknown column 'civicrm_preferences.domain_id' in 'where clause']"]

So it looks like my schema (2.2.9) is outta sync with what I'm upgrading to (3.3.3).  Of course, one would think the upgrade script would be updating the schema for me.

Thanks for your help.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
January 27, 2011, 07:07:18 pm
Yes, the upgrade script should be running a bunch of commands to update the schema. You can probably view "Error Details" by doing view source even though the collapsed pane is expanding for you in the browser. If that doesn't shed any more light, a few things to check:

* Use this procedure to verify pre-upgrade schema integrity: http://wiki.civicrm.org/confluence/display/CRMDOC33/Ensuring+Schema+Integrity+on+Upgrades

* In your backup (pre-upgrade copy) of the db, check value in civicrm_domain.version. Set it to 2.29 if it's empty and try again.



Protect your investment in CiviCRM by  becoming a Member!

wisco.disco

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 2.2.9
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
January 28, 2011, 07:04:24 am
Thank you for the information.  I followed the steps precisely as described in your link.  Unfortunately, I continue to get the DB Error: no such field error when I attempt to run the upgrade URI

I've attached the view source error as a text file as I was having difficulty posting all that PHP/SQL dump.

What next?  :)


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
January 28, 2011, 09:53:52 am
Not sure what's happening :-( The upgrade URI should be running all the sql commands in the *.mysql files in CRM/Upgrade/Incremental/sql directory for files corresponding to versions later than 2.9. These include this command in  ./sql/3.0.alpha1.mysql.tpl:

Code: [Select]
ADD COLUMN is_template tinyint(4) default NULL COMMENT 'whether the event has template',
... and that doesn't seem to be happening. Not sure really whether any of the schema updates are happening. Some possible steps to debug:
- enable query logging in mysql and then check log file after running upgrade to see if expected update queries are running or /?
- check webserver logs for errors

Protect your investment in CiviCRM by  becoming a Member!

wisco.disco

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 2.2.9
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
January 28, 2011, 12:04:41 pm
Very strange indeed.  I restored everything and tried again.  This time I turned mysql query logging on.  The browser (safari) returns:
 
Safari can’t open the page “http://www.mydomain.com/members/?q=civicrm/upgrade&reset=1” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again.

I don't see any ALTER statements in the mysql general query log (attached).  Is it possible to run the upgrade scripts from a command line interface instead of the upgrade URI?  I'm very comfortable in MySQL and Unix CLI.

Thanks for your help so far.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
January 29, 2011, 02:13:57 pm
RE run from command line - not as far as i know.
Did you check your webserver logs? Seems like something is amiss in the site configuration (do check you have minimum versions of php and mysql etc.).

Another approach might be to set up the old site on a local box and do the upgrade there (I run multiple civ installs on my macbook pro).

Protect your investment in CiviCRM by  becoming a Member!

wisco.disco

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 2.2.9
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
February 02, 2011, 05:59:43 pm
Sorry for the delay...

I did find this in my apache error log:   [notice] child pid 1341 exit signal Illegal instruction (4)
I've been running 2.2.9 for over a year and half on this config with no issues.  I do meet the minimum PHP/MySQL/Drupal6 version requirements.

I'm testing in a VirtualBox VM that was created from backups of the actual server.  So this instance is the same as my production instance, with the exception of a different IP address.  I've testing the operation of CiviCRM in this VM quite extensively and it behaves normally, before I attempt the upgrade.

Since it's looking like a PHP error, I'm going to focus on that.  Will update this thread with my findings.  Thanks for your help and ideas so far!

onepixelpunch

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 2.2.8
  • CMS version: Drupal 6
  • MySQL version: MySQL 5
  • PHP version: PHP 5
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
May 16, 2011, 01:44:49 pm
I am having the exact same problem with the exact same unsuccessful attempts at fixing it.  The only difference is that I am going from 2.2.8 to 3.4.1.  Did you ever figure out how to get around this issue?  Thanks!

Louis

  • I’m new here
  • *
  • Posts: 4
  • Karma: 1
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
June 21, 2011, 10:04:00 am
I had the same problem going from 2.2.9 to 3.4.3
rolled back to 2.2.9 and upgraded to 3.0.4 - all worked purr fectly

then upgraded from 3.0.4 to 3.4.3  --> no errors, all seems good


RealMark

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
  • CiviCRM version: 3.4.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.91
  • PHP version: 5.2.17
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
June 29, 2011, 01:49:37 pm
Quote from: Louis on June 21, 2011, 10:04:00 am
I had the same problem going from 2.2.9 to 3.4.3
rolled back to 2.2.9 and upgraded to 3.0.4 - all worked purr fectly

then upgraded from 3.0.4 to 3.4.3  --> no errors, all seems good

Thanks Louis for this advice.  I was having same problem from 2.8 to 3.4.3 and used this two step approach.  Worked like a charm.  Nice to finally try out 3.4 version.

rooby

  • I’m new here
  • *
  • Posts: 2
  • Karma: 1
  • CiviCRM version: 4.1.6
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.3
Re: Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field
January 22, 2013, 04:19:38 pm
Just as further info for anyone that has to do this.

I had to upgrade from 2.2.9 > 3.0.4 > 3.4.8 > 4.1.6


I tried 2.2.9 to 3.1, 3.2, 3.4, 4.1, 4.0 and all failed, so definitely go 3.0.4 as mentioned previously on this page.

I also tried to go from 3.0.4 to 4.1.6 and that also did not work.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade failed: 2.2.9 --> 3.3.3... DB Error: no such field

This forum was archived on 2017-11-26.