Author Topic: Upgrade from 2.3.1.1 to 2.3.2 failed  (Read 7355 times)

WillyW

  • Freshman
  • *
  • Posts: 15
    • View Profile
Upgrade from 2.3.1.1 to 2.3.2 failed
« on: September 30, 2013, 06:07:47 am »
After running the upgrade scripts, FengOffice tells me the upgrade failed because of the following:
MySQL said: Duplicate entry 'mail' for key 'name'
Does anybody know how to solve this?
« Last Edit: October 02, 2013, 07:22:17 am by WillyW »

steveg

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failled
« Reply #1 on: October 01, 2013, 12:15:34 pm »
No clue - but, as I have recommended before - just backup your db and files, upload a fresh copy of 2.3.2.1 and then restore from backup.  This should solve the issue, and really shouldn't take much time at all.

I personally run all files stored in the db so it makes backing up easy (and subsequent re-install if required).  I have backing up automated - I keep a synced copy of the db on a backup mysql server in case of failure, I just need to re-point.  I also do a daily backup of the db to a backup server.  All three servers are different.

As files accumulate - your db may grow large, but so far this has not proved to be problematic - we're not quite at a GB yet.  FO itself takes very little room in the db...  files are what adds up.

WillyW

  • Freshman
  • *
  • Posts: 15
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #2 on: October 02, 2013, 07:15:24 am »
Unfortunately that didn't work either.
I had a look into the log.php. This is the latest error message:

Session "default" started at 2013-10-02T10:04:03+0000
#1 DEBUG: SQL ERROR: Query failed with message 'Unknown column 'member_id' in 'where clause'' - SELECT * FROM `fo_application_logs` WHERE action <> 'login' AND action <> 'logout' AND action <> 'subscribe' AND created_by_id > '0'AND (rel_object_id IN (
             SELECT object_id FROM fo_sharing_table
             WHERE group_id  IN (SELECT permission_group_id FROM fo_contact_permission_groups WHERE contact_id = 2)
             ) OR ((rel_object_id = 0 AND member_id <> 0) AND member_id IN (
                         SELECT member_id FROM fo_contact_member_permissions WHERE
                               permission_group_id IN (SELECT permission_group_id FROM fo_contact_permission_groups WHERE contact_id = 2)
                               AND member_id = fo_application_logs.member_id))) ORDER BY created_on DESC LIMIT 0, 100
#2 FATAL: exception 'DBQueryError' with message 'Query failed with message 'Unknown column 'member_id' in 'where clause''' in D:\xampp\htdocs\fengold\environment\library\database\adapters\AbstractDBAdapter.class.php:389
    Stack trace:
    #0 D:\xampp\htdocs\fengold\environment\library\database\adapters\AbstractDBAdapter.class.php(307): AbstractDBAdapter->prepareAndExecute('SELECT * FROM `...', NULL)
    #1 D:\xampp\htdocs\fengold\environment\library\database\DB.class.php(213): AbstractDBAdapter->executeAll('SELECT * FROM `...', NULL)
    #2 D:\xampp\htdocs\fengold\environment\classes\dataaccess\DataManager.class.php(282): DB::executeAll('SELECT * FROM `...')
    #3 D:\xampp\htdocs\fengold\application\models\application_logs\base\BaseApplicationLogs.class.php(114): DataManager->find(Array)
    #4 D:\xampp\htdocs\fengold\environment\classes\dataaccess\DataManager.class.php(320): BaseApplicationLogs->find(Array)
    #5 D:\xampp\htdocs\fengold\application\models\application_logs\base\BaseApplicationLogs.class.php(131): DataManager->findAll(Array)
    #6 D:\xampp\htdocs\fengold\application\models\application_logs\base\BaseApplicationLogs.class.php(133): BaseApplicationLogs->findAll(Array)
    #7 D:\xampp\htdocs\fengold\application\models\application_logs\ApplicationLogs.class.php(251): BaseApplicationLogs::findAll(Array)
    #8 D:\xampp\htdocs\fengold\application\widgets\activity_feed\index.php(4): ApplicationLogs::getLastActivities()
    #9 D:\xampp\htdocs\fengold\application\models\widgets\Widget.class.php(58): include('D:\xampp\htdocs...')
    #10 D:\xampp\htdocs\fengold\application\controllers\DashboardController.class.php(292): Widget->execute()
    #11 D:\xampp\htdocs\fengold\application\views\dashboard\main_dashboard.php(15): DashboardTools::renderSection('left')
    #12 D:\xampp\htdocs\fengold\environment\classes\template\Template.class.php(85): include('D:\xampp\htdocs...')
    #13 D:\xampp\htdocs\fengold\environment\classes\template\Template.class.php(56): Template->includeTemplate('D:\xampp\htdocs...')
    #14 D:\xampp\htdocs\fengold\environment\classes\template\template.php(35): Template->fetch('D:\xampp\htdocs...')
    #15 D:\xampp\htdocs\fengold\environment\classes\controller\PageController.class.php(115): tpl_fetch('D:\xampp\htdocs...')
    #16 D:\xampp\htdocs\fengold\environment\classes\Env.class.php(135): PageController->getContent()
    #17 D:\xampp\htdocs\fengold\init.php(168): Env::executeAction('dashboard', 'main_dashboard')
    #18 D:\xampp\htdocs\fengold\index.php(9): require('D:\xampp\htdocs...')
    #19 {main}
« Last Edit: October 02, 2013, 07:22:32 am by WillyW »

steveg

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #3 on: October 02, 2013, 09:58:57 am »
Can you specify what didn't work, when you outline "that didn't work"?  Do you mean the re-install from fresh? 

Are you meaning to have FO used files from your fengold directory, or do you have a new directory that you are supposed to be using with the fresh install?

This might be as simple as deleting the autoloader.php file in cache, as it may be directing FO to the wrong location for files.

WillyW

  • Freshman
  • *
  • Posts: 15
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #4 on: October 09, 2013, 06:18:15 am »
 ;D I got it to work after a fresh installation. The upgrade procedure didn't work because of the mentioned error.
After a fresh installation, I copied over the upload folder and migrated the database (MySQL Workbench). I even moved everything from a Windows server onto a openSuse server.
FO is working properly now.
From the DB migration, I excluded  the fo_application_logs table because this table caused problems during the upgrade.

steveg

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #5 on: October 09, 2013, 10:42:27 am »
Glad it's working for you!  Sometimes starting fresh is a good thing!

icy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #6 on: October 09, 2013, 01:10:36 pm »
I have the same problem:
Code: [Select]
# php fengoffice/public/upgrade/console.php 2.3.1.1 2.3.2
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.
2013-10-09 14:51:08 - Starting upgrade to 2.3.2
Error: Failed to execute DB schema transformations. MySQL said: Duplicate entry 'mail' for key 2
Error upgrading to version 2.3.2

The current setup started with v2.2.1, and have since been upgraded to v2.3.1.1


franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #7 on: October 11, 2013, 04:00:03 pm »
I have the same problem:
Code: [Select]
# php fengoffice/public/upgrade/console.php 2.3.1.1 2.3.2
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.
2013-10-09 14:51:08 - Starting upgrade to 2.3.2
Error: Failed to execute DB schema transformations. MySQL said: Duplicate entry 'mail' for key 2
Error upgrading to version 2.3.2

The current setup started with v2.2.1, and have since been upgraded to v2.3.1.1


Hi there!

Seems like it somehow corrupted? Any chance you tried upgrading it before and were not able to? May be you have yet to upgrade the plugins?

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

icy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #8 on: October 14, 2013, 12:42:59 pm »
Code: [Select]
# php fengoffice/public/install/plugin-console.php list
---------------------------------------------
NAME:           core_dimensions
VERSION:        6
STATUS:         Installed Activated
---------------------------------------------
NAME:           mail
VERSION:        3
STATUS:         Installed Activated
---------------------------------------------
NAME:           workspaces
VERSION:        7
STATUS:         Installed Activated

Plug-ins looks ok though, anywhere/anything else I should/can check?

It was upgraded from v2.2.1 -> v2.2.3.1 -> v2.2.4.1 -> v2.3.1 -> v2.3.1.1, and so far without errors until I try to go from v2.3.1.1 to v2.3.2.

Thanks!
« Last Edit: October 14, 2013, 12:45:20 pm by icy »

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #9 on: October 24, 2013, 10:24:17 am »
Yah, the plugins do look good.
What it calls my attention though is that according to that message you are missing the member_id column in the  fo_contact_member_permissions  table.
Can you please check this manually?

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

icy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #10 on: November 04, 2013, 07:36:15 am »
Code: [Select]
mysql> DESCRIBE fo_contact_member_permissions;
+---------------------+---------------------+------+-----+---------+-------+
| Field               | Type                | Null | Key | Default | Extra |
+---------------------+---------------------+------+-----+---------+-------+
| permission_group_id | int(10) unsigned    | NO   | PRI | NULL    |       |
| member_id           | int(10) unsigned    | NO   | PRI | NULL    |       |
| object_type_id      | int(10) unsigned    | NO   | PRI | NULL    |       |
| can_write           | tinyint(1) unsigned | NO   |     | 0       |       |
| can_delete          | tinyint(1) unsigned | NO   |     | 0       |       |
+---------------------+---------------------+------+-----+---------+-------+

So it does exist

icy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #11 on: November 27, 2013, 01:52:56 pm »
Upgrading from v2.3.1.1 straight to 2.4 seems to have worked without any problems.

Thanks guys, keep up with the good work!


iCy

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Upgrade from 2.3.1.1 to 2.3.2 failed
« Reply #12 on: November 27, 2013, 02:41:08 pm »
Upgrading from v2.3.1.1 straight to 2.4 seems to have worked without any problems.

Thanks guys, keep up with the good work!


iCy

Hi iCy!
Thank you very much for your feedback. Glad to know it worked :)

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