Recent Topics

1 Apr 26, 2015 02:41    

I found an old 1.10.2 mysqldump on an archive cd and am trying to upgrade it to 5.22 stable. I've created a new empty database, imported the 1.10.2 mysqldump, and then ran the instalation. The first thing I did was upgrade tables to UTF-8, and then I ran the installation itself as "Upgrade from previous version." I encounter the following error:

Upgrading b2evolution...
Checking files...

Preparing to install .htaccess ... Already installed.
Upgrading data in existing b2evolution database...
Loading module: _core/model/__core.install.php
Loading module: collections/model/_collections.install.php
Loading module: files/model/_files.install.php
Loading module: sessions/model/_sessions.install.php
Loading module: messaging/model/_messaging.install.php
Loading module: maintenance/model/_maintenance.install.php

Checking DB schema version... 9350 : OK.
Updating chapter url names... OK.
Updating Settings... OK.
Creating DB schema version checkpoint at 9406... OK. (Elapsed upgrade time: 0 seconds)
Moving general settings to blog settings... OK.
Upgrading blogs table... OK.
Upgrading groups table... OK.
Upgrading files table... OK.
Updating file types... OK.
Remove obsolete user settings... OK.
Creating DB schema version checkpoint at 9407... OK. (Elapsed upgrade time: 0 seconds)
Creating skins table... OK.
Creating skin containers table... OK.
Creating widgets table... OK.
Installing default skins... OK.
Updating blogs table... OK.
Installing default widgets for blog #1...
An unexpected error has occurred!

If this error persists, please report it to the administrator.

Go back to home page
Additional information about this error:

MySQL error!

Unknown column 'wi_enabled' in 'field list'(Errno=1054)

Your query:

INSERT INTO evo_widget( wi_coll_ID, wi_sco_name, wi_order, wi_enabled, wi_type, wi_code, wi_params )

VALUES ( 1, 'Header', 1, 1, 'core', 'coll_title', NULL ), ( 1, 'Header', 2, 1, 'core', 'coll_tagline', NULL ), ( 1, 'Menu', 5, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:4:\"home\";}' ), ( 1, 'Menu', 10, 1, 'core', 'menu_link', 'a:2:{s:9:\"link_type\";s:11:\"recentposts\";s:9:\"link_text\";s:4:\"News\";}' ), ( 1, 'Menu', 20, 1, 'core', 'coll_page_list', NULL ), ( 1, 'Menu', 30, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:12:\"ownercontact\";}' ), ( 1, 'Menu', 33, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:6:\"catdir\";}' ), ( 1, 'Menu', 35, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:6:\"arcdir\";}' ), ( 1, 'Menu', 37, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:14:\"latestcomments\";}' ), ( 1, 'Menu', 40, 0, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:5:\"login\";}' ), ( 1, 'Menu', 50, 0, 'core', 'msg_menu_link', 'a:1:{s:9:\"link_type\";s:8:\"messages\";}' ), ( 1, 'Menu', 60, 0, 'core', 'msg_menu_link', 'a:2:{s:9:\"link_type\";s:8:\"contacts\";s:10:\"show_badge\";i:0;}' ), ( 1, 'Menu Top', 1, 1, 'core', 'coll_search_form', NULL ), ( 1, 'Sidebar', 20, 1, 'core', 'coll_avatar', NULL ), ( 1, 'Sidebar', 40, 1, 'core', 'coll_longdesc', 'a:1:{s:5:\"title\";s:7:\"$title$\";}' ), ( 1, 'Sidebar', 50, 1, 'core', 'coll_search_form', NULL ), ( 1, 'Sidebar', 60, 1, 'core', 'coll_category_list', NULL ), ( 1, 'Sidebar', 80, 1, 'core', 'coll_media_index', 'a:11:{s:5:\"title\";s:12:\"Random photo\";s:10:\"thumb_size\";s:11:\"fit-160x120\";s:12:\"thumb_layout\";s:4:\"grid\";s:12:\"grid_nb_cols\";s:1:\"1\";s:5:\"limit\";s:1:\"1\";s:8:\"order_by\";s:4:\"RAND\";s:9:\"order_dir\";s:3:\"ASC\";s:7:\"blog_ID\";s:1:\"4\";s:11:\"widget_name\";s:12:\"Random photo\";s:16:\"widget_css_class\";s:0:\"\";s:9:\"widget_ID\";s:0:\"\";}' ), ( 1, 'Sidebar', 90, 1, 'core', 'linkblog', 'a:1:{s:7:\"blog_ID\";i:3;}' ), ( 1, 'Sidebar', 100, 1, 'core', 'coll_xml_feeds', NULL ), ( 1, 'Sidebar', 110, 1, 'core', 'mobile_skin_switcher', NULL ), ( 1, 'Sidebar 2', 1, 1, 'core', 'coll_post_list', NULL ), ( 1, 'Sidebar 2', 10, 1, 'core', 'coll_comment_list', NULL ), ( 1, 'Sidebar 2', 15, 1, 'core', 'coll_media_index', 'a:11:{s:5:\"title\";s:13:\"Recent photos\";s:10:\"thumb_size\";s:10:\"crop-80x80\";s:12:\"thumb_layout\";s:4:\"grid\";s:12:\"grid_nb_cols\";s:1:\"3\";s:5:\"limit\";s:1:\"9\";s:8:\"order_by\";s:9:\"datestart\";s:9:\"order_dir\";s:4:\"DESC\";s:7:\"blog_ID\";s:1:\"4\";s:11:\"widget_name\";s:11:\"Photo index\";s:16:\"widget_css_class\";s:0:\"\";s:9:\"widget_ID\";s:0:\"\";}' ), ( 1, 'Sidebar 2', 20, 1, 'core', 'free_html', 'a:5:{s:5:\"title\";s:9:\"Sidebar 2\";s:7:\"content\";s:162:\"This is the \"Sidebar 2\" container. You can place any widget you like in here. In the evo toolbar at the top of this page,

select \"Customize\", then \"Blog Widgets\".\";s:11:\"widget_name\";s:9:\"Free HTML\";s:16:\"widget_css_class\";s:0:\"\";s:9:\"widget_ID\";s:0:\"\";}' ), ( 1, 'Front Page Main Area', 10, 1, 'core', 'coll_featured_intro', NULL ), ( 1, 'Front Page Main Area', 20, 1, 'core', 'coll_post_list', NULL ), ( 1, 'Front Page Main Area', 30, 1, 'core', 'coll_comment_list', NULL ), ( 1, 'Mobile: Footer', 10, 1, 'core', 'coll_longdesc', NULL ), ( 1, 'Mobile: Footer', 20, 1, 'core', 'mobile_skin_switcher', NULL ), ( 1, 'Mobile: Navigation Menu', 10, 1, 'core', 'coll_page_list', NULL ), ( 1, 'Mobile: Navigation Menu', 20, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:12:\"ownercontact\";}' ), ( 1, 'Mobile: Navigation Menu', 30, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:4:\"home\";}' ), ( 1, 'Mobile: Tools Menu', 10, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:5:\"login\";}' ), ( 1, 'Mobile: Tools Menu', 20, 1, 'core', 'msg_menu_link', 'a:1:{s:9:\"link_type\";s:8:\"messages\";}' ), ( 1, 'Mobile: Tools Menu', 30, 1, 'core', 'msg_menu_link', 'a:2:{s:9:\"link_type\";s:8:\"contacts\";s:10:\"show_badge\";i:0;}' ), ( 1, 'Mobile: Tools Menu', 50, 1, 'core', 'menu_link', 'a:1:{s:9:\"link_type\";s:6:\"logout\";}' )

After this, I go back to the beginning and run it again, the second time, I get the following error:

Upgrading b2evolution...
Checking files...

Preparing to install .htaccess ... Already installed.
Upgrading data in existing b2evolution database...
Loading module: _core/model/__core.install.php
Loading module: collections/model/_collections.install.php
Loading module: files/model/_files.install.php
Loading module: sessions/model/_sessions.install.php
Loading module: messaging/model/_messaging.install.php
Loading module: maintenance/model/_maintenance.install.php

Checking DB schema version... 9407 : OK.
Creating skins table...
An unexpected error has occurred!

If this error persists, please report it to the administrator.

Go back to home page
Additional information about this error:

MySQL error!

Table 'evo_skins__skin' already exists(Errno=1050)

Your query:

CREATE TABLE evo_skins__skin (

skin_ID int(10) unsigned NOT NULL auto_increment,

skin_name varchar(32) NOT NULL,

skin_type enum('normal','feed') NOT NULL default 'normal',

skin_folder varchar(32) NOT NULL,

PRIMARY KEY skin_ID (skin_ID),

UNIQUE skin_folder( skin_folder ),

KEY skin_name( skin_name )

)

After this, if I go back to beginning and try again, it gives me the same error every time... Is it possible to go straight from 1.10.2 to 5.22 or do I need to upgrade to a lower version first? If so, which one?

2 Apr 27, 2015 08:28

Hi @jibberjab,

I didn't test it before, but it's amazing that an extreme upgrade as that (1.10 to 5.2.2) almost works :D Actually, I have been looking deeper, and clean updates are only possible starting from version 2.2 or so.

However, you can reupload your database to start the upgrade all over again. After that, just replace the file install/_functions_evoupgrade.php with the one I'm attaching to this comment and the upgrade will run smoothly (I hope so). I only moved a few code instructions to a different upgrade block to make it work, you can see the differences here: https://gist.github.com/mgsolipa/c933a2ebaecc24c95de3/revisions

Regards !


Attachments:

3 Apr 27, 2015 21:58

Thanks, that worked. I first updated the db to UTF-8 and then ran the installer with your replacement script. It completed without error.

A separate question: In the backoffice there is a function to declare comment spam bankruptcy. Does this delete all comments, including already-allowed comments, or only comments awaiting moderation?

4 Apr 28, 2015 20:59

Never mind. If only I had opened my eyes before asking :)


Form is loading...