Author Topic: Error in 1.7.5 to 2.0 upgrade  (Read 92333 times)

skyer2000

  • Freshman
  • *
  • Posts: 20
    • View Profile
Error in 1.7.5 to 2.0 upgrade
« on: March 23, 2012, 11:03:41 am »
Just ran the upgrade script and received this:

    Config file found and loaded.
    File '/config/config.php' exists and is writable
    Folder '/config' exists and is writable
    Folder '/cache' exists and is writable
    Folder '/tmp' exists and is writable
    Folder '/upload' exists and is writable
    Extension 'mysql' is loaded
    Extension 'gd' is loaded
    Extension 'simplexml' is loaded
    Upgrade script has connected to the database.
    Test query has been executed. Its safe to proceed with database migration.
    Database schema transformations executed (total queries: 319)

    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/elemntd/public_html/office/public/upgrade/library/functions.php on line 192
    Finished generating Object Members
    Feng Office has been upgraded. You are now running Feng Office 2.0.0.8 Enjoy!


Everything to that point seemed to work, however when I logged in, all of my companies were there but all tasks, notes, documents were deleted. Rolling back.......

« Last Edit: March 23, 2012, 11:16:25 am by skyer2000 »

skyer2000

  • Freshman
  • *
  • Posts: 20
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #1 on: March 23, 2012, 11:15:36 am »
Found this in my error log:

Code: [Select]
Session "default" started at 2012-03-23T14:04:33+0000

#1 DEBUG: SQL ERROR: Query failed with message 'Table 'elemntd_office.og_plugins' doesn't exist' - SELECT * FROM `og_plugins` WHERE  is_installed = 1 AND is_activated = 1  

#2 FATAL: exception 'DBQueryError' with message 'Query failed with message 'Table 'elemntd_office.og_plugins' doesn't exist'' in /home/elemntd/public_html/office/environment/library/database/adapters/AbstractDBAdapter.class.php:386

    Stack trace:

    #0 /home/elemntd/public_html/office/environment/library/database/adapters/AbstractDBAdapter.class.php(304): AbstractDBAdapter->prepareAndExecute('SELECT * FROM `...', NULL)

    #1 /home/elemntd/public_html/office/environment/library/database/DB.class.php(213): AbstractDBAdapter->executeAll('SELECT * FROM `...', NULL)

    #2 /home/elemntd/public_html/office/environment/classes/dataaccess/DataManager.class.php(277): DB::executeAll('SELECT * FROM `...')

    #3 /home/elemntd/public_html/office/application/models/plugins/base/BasePlugins.class.php(111): DataManager->find(Array)

    #4 /home/elemntd/public_html/office/environment/classes/dataaccess/DataManager.class.php(315): BasePlugins->find(Array)

    #5 /home/elemntd/public_html/office/application/models/plugins/base/BasePlugins.class.php(126): DataManager->findAll(Array)

    #6 /home/elemntd/public_html/office/application/models/plugins/Plugins.class.php(39): BasePlugins->findAll(Array)

    #7 /home/elemntd/public_html/office/environment/classes/hook/Hook.class.php(30): Plugins->getActive()

    #8 /home/elemntd/public_html/office/application/application.php(16): Hook::init()

    #9 /home/elemntd/public_html/office/init.php(151): require_once('/home/elementd/...')

    #10 /home/elemntd/public_html/office/index.php(9): require('/home/elementd/...')

    #11 {main}

Time since start: 0.014867067337 seconds

My working copy of 1.7.5 does not have a og_plugins table.
« Last Edit: March 23, 2012, 11:18:52 am by skyer2000 »

skyer2000

  • Freshman
  • *
  • Posts: 20
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #2 on: March 23, 2012, 12:10:12 pm »
I tried this all again but manually created the og_plugins table according to the sql included in the install script. I ran the upgrade and again and got this:

Failed to execute DB schema transformations. MySQL said: Table 'elemntd_office.fo_members' doesn't exist

I have a standard install of 1.7.5 with no modifications, you guys really need to work on this upgrade script.

siagris

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #3 on: March 26, 2012, 10:16:58 am »
i have about the same as the previous topic problem

    * Config file found and loaded.
    * File '/config/config.php' exists and is writable
    * Folder '/config' exists and is writable
    * Folder '/cache' exists and is writable
    * Folder '/tmp' exists and is writable
    * Folder '/upload' exists and is writable
    * Extension 'mysql' is loaded
    * Extension 'gd' is loaded
    * Extension 'simplexml' is loaded
    * Upgrade script has connected to the database.
    * Test query has been executed. Its safe to proceed with database migration.
    * Failed to execute DB schema transformations. MySQL said: Table 'fo_administration_tools' already exists
    * Error upgrading to version 2.0.0.8


franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #4 on: March 26, 2012, 02:49:00 pm »
Have you guys read my post in this thread?
http://forums.fengoffice.com/index.php?topic=14846.0

"On a side note, something that we missed in the ReadMe:

If you are upgrading your installation - please remember to backup everything in case something goes wrong as it takes quite a lot of time if you have a lot of data -, once the ugprade is done you should change the TABLE_PREFIX from og_ to fo_ in the config.php file."

Greetings,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

skyer2000

  • Freshman
  • *
  • Posts: 20
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #5 on: March 26, 2012, 03:18:58 pm »
franponce87, I did that, however all of my tasks, notes, and documents were gone. I had a backup so I'm running on 1.7.5 until this is all sorted out.

supadoctor

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Email
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #6 on: March 30, 2012, 02:16:13 am »
franponce87, I did that, however all of my tasks, notes, and documents were gone. I had a backup so I'm running on 1.7.5 until this is all sorted out.

Fully agree with skyer2000!

freeraider

  • Freshman
  • *
  • Posts: 10
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #7 on: April 01, 2012, 02:32:28 am »
I also lost data. I see it on widget, but nowhere else

zigojacko

  • Freshman
  • *
  • Posts: 15
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #8 on: April 02, 2012, 07:55:10 am »
test - my posts aren't staying live  ???

zigojacko

  • Freshman
  • *
  • Posts: 15
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #9 on: April 02, 2012, 07:56:22 am »
Exactly the same problem as the original poster.

Was running 1.7.5 with no modifications or 3rd party plugins at all. 1.7.5 was running fine.

Also didn't have an og_plugins table in the database. But now since upgrading to version 2, the log file just contains tons of references to this table that doesn't exist...

Code: [Select]
Session "default" started at 2012-04-02T10:11:18+0000
#1 DEBUG: SQL ERROR: Query failed with message 'Table 'db_name.og_plugins' doesn't exist' - SELECT * FROM `og_plugins` WHERE  is_installed = 1 AND is_activated = 1  
#2 FATAL: exception 'DBQueryError' with message 'Query failed with message 'Table 'db_name.og_plugins' doesn't exist'' in /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/library/database/adapters/AbstractDBAdapter.class.php:386
    Stack trace:
    #0 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/library/database/adapters/AbstractDBAdapter.class.php(304): AbstractDBAdapter->prepareAndExecute('SELECT * FROM `...', NULL)
    #1 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/library/database/DB.class.php(213): AbstractDBAdapter->executeAll('SELECT * FROM `...', NULL)
    #2 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/classes/dataaccess/DataManager.class.php(277): DB::executeAll('SELECT * FROM `...')
    #3 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/models/plugins/base/BasePlugins.class.php(111): DataManager->find(Array)
    #4 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/classes/dataaccess/DataManager.class.php(315): BasePlugins->find(Array)
    #5 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/models/plugins/base/BasePlugins.class.php(126): DataManager->findAll(Array)
    #6 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/models/plugins/Plugins.class.php(39): BasePlugins->findAll(Array)
    #7 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/classes/hook/Hook.class.php(30): Plugins->getActive()
    #8 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/application.php(16): Hook::init()
    #9 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/init.php(151): require_once('/var/www/vhosts...')
    #10 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/index.php(9): require('/var/www/vhosts...')
    #11 {main}
Time since start: 0.0075869560241699 seconds

The error given at public/upgrade script was identical to the one in the OP...

Code: [Select]
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/public/upgrade/library/functions.php on line 192

(All other steps were the same as OP too).

I then couldn't load the complete_migration.php script (just a blank white page), I can't load any other pages either - just a blank white page. I changed the table prefix in config.php but made no difference.

Really frustrating as I've spent three hours trying to upgrade this today and now I'm going to have to give up and roll back to 1.7.5 as we require feng running for daily operations.

As others have said, there is clearly an issue with the upgrade process you have provided, it shouldn't be referencing a table that never existed in the first place after it has created a load of new tables with the fo_ prefix - switching on debugging doesn't even output the problem either.

Can an admin/dev provide a fix for this please?

zigojacko

  • Freshman
  • *
  • Posts: 15
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #10 on: April 02, 2012, 07:57:41 am »
Exactly the same problem as the original poster.

Was running 1.7.5 with no modifications or 3rd party plugins at all. 1.7.5 was running fine.

Also didn't have an og_plugins table in the database. But now since upgrading to version 2, the log file just contains tons of references to this table that doesn't exist...


Session "default" started at 2012-04-02T10:11:18+0000
#1 DEBUG: SQL ERROR: Query failed with message 'Table 'db_name.og_plugins' doesn't exist' - SELECT * FROM `og_plugins` WHERE  is_installed = 1 AND is_activated = 1 
#2 FATAL: exception 'DBQueryError' with message 'Query failed with message 'Table 'db_name.og_plugins' doesn't exist'' in /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/library/database/adapters/AbstractDBAdapter.class.php:386
    Stack trace:
    #0 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/library/database/adapters/AbstractDBAdapter.class.php(304): AbstractDBAdapter->prepareAndExecute('SELECT * FROM `...', NULL)
    #1 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/library/database/DB.class.php(213): AbstractDBAdapter->executeAll('SELECT * FROM `...', NULL)
    #2 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/classes/dataaccess/DataManager.class.php(277): DB::executeAll('SELECT * FROM `...')
    #3 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/models/plugins/base/BasePlugins.class.php(111): DataManager->find(Array)
    #4 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/classes/dataaccess/DataManager.class.php(315): BasePlugins->find(Array)
    #5 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/models/plugins/base/BasePlugins.class.php(126): DataManager->findAll(Array)
    #6 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/models/plugins/Plugins.class.php(39): BasePlugins->findAll(Array)
    #7 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/environment/classes/hook/Hook.class.php(30): Plugins->getActive()
    #8 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/application/application.php(16): Hook::init()
    #9 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/init.php(151): require_once('/var/www/vhosts...')
    #10 /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/index.php(9): require('/var/www/vhosts...')
    #11 {main}
Time since start: 0.0075869560241699 seconds


The error given at public/upgrade script was identical to the one in the OP...


Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/domain.co.uk/subdomains/projectx/httpdocs/public/upgrade/library/functions.php on line 192


(All other steps were the same as OP too).

I then couldn't load the complete_migration.php script (just a blank white page), I can't load any other pages either - just a blank white page. I changed the table prefix in config.php but made no difference.

Really frustrating as I've spent three hours trying to upgrade this today and now I'm going to have to give up and roll back to 1.7.5 as we require feng running for daily operations.

As others have said, there is clearly an issue with the upgrade process you have provided, it shouldn't be referencing a table that never existed in the first place after it has created a load of new tables with the fo_ prefix - switching on debugging doesn't even output the problem either.

Can an admin/dev provide a fix for this please?

zigojacko

  • Freshman
  • *
  • Posts: 15
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #11 on: April 02, 2012, 08:10:15 am »
grrr stupid forum isn't even accepting my proper reply!

please see attached image for a screenshot of my reply in this thread


skyer2000

  • Freshman
  • *
  • Posts: 20
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #12 on: April 02, 2012, 09:32:32 am »
I have not given the upgrade another try after looking into the code. There is absolutely no error checking, and when looking back at my 1.7.5 installation's provided sql scheme, there is no plugins table. So when this upgrade script runs, it does not check for a plugins table, it assumes there is one, breaks the script, then says it completed successfully. Does the rest of the application have no error checking as well??

zigojacko

  • Freshman
  • *
  • Posts: 15
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #13 on: April 02, 2012, 09:34:37 am »
That's exactly how I see it is happening too.

Anyone from Feng care to jump in with a fix for this? It's clearly an error with the upgrade script you've provided..

Thanks skyer2000

dansmith65

  • Freshman
  • *
  • Posts: 11
    • View Profile
Re: Error in 1.7.5 to 2.0 upgrade
« Reply #14 on: April 03, 2012, 07:23:36 am »
Didn't anybody see Fancisco's post? (the 4th one)

Quote
once the ugprade is done you should change the TABLE_PREFIX from og_ to fo_ in the config.php file

...although that got me into FengOffice, none of my tasks are showing up (they do exist in the fo_project_tasks table, though).

Even though my installation said it completed successfully, it didn't seem update the current version installed. If I go back to /public/upgrade after the install, it still says my current version is 1.7.5.