Forums | Mahara Community

Support /
Upgrade from 1.7.5 to 1.8.0 fails


anonymous profile picture
Account deleted
Posts: 2

15 April 2014, 2:28

Good Morning,

I have been messing around with this for a few hours and am having upgrade problems. I use GIT and have upgraded my code from 1.7.5_RC1 to 1.8.0_RELEASE

I am getting the following errors and cannot for the life of me figure them out. Help?

This site is not in production mode. Some data may not be available and/or may be out of date.

The site is temporarily closed for a database upgrade.

 

[DBG] 6a (lib/mahara.php:1626) Table collection_tag exists. Create skipped

[DBG] 6a (lib/mahara.php:1626) Field dropdownmenu exists. Create skipped

[DBG] 6a (lib/db/upgrade.php:2388) Update database for flexible page layouts feature

[DBG] 6a (lib/db/upgrade.php:2389) 1. Create table view_rows_columns

[DBG] 6a (lib/mahara.php:1626) Table view_rows_columns exists. Create skipped

[DBG] 6a (lib/db/upgrade.php:2397) 2. Remake the table view_layout as view_layout_columns

[DBG] 6a (lib/mahara.php:1626) Table view_layout_columns exists. Create skipped

[DBG] 6a (lib/db/upgrade.php:2406) 3. Alter table view_layout

[DBG] 6a (lib/mahara.php:1626) Field rows exists. Create skipped

[DBG] 6a (lib/mahara.php:1626) Field iscustom exists. Create skipped

[DBG] 6a (lib/mahara.php:1626) Field layoutmenuorder exists. Create skipped

[DBG] 6a (lib/db/upgrade.php:2418) 4. Create table view_layout_rows_columns

[DBG] 6a (lib/mahara.php:1626) Table view_layout_rows_columns exists. Create skipped

[DBG] 6a (lib/db/upgrade.php:2429) 5. Create table usr_custom_layout

[DBG] 6a (lib/mahara.php:1626) Table usr_custom_layout exists. Create skipped

[DBG] 6a (lib/db/upgrade.php:2439) 6. Convert existing view_layout records into new-style view_layouts with just one row

[WAR] 6a (lib/errors.php:736) Failed to get a recordset: mysqli error: [1054: Unknown column 'columns' in 'field list'] in adodb_throw(SELECT id, columns, widths FROM "view_layout" ORDER BY id , )

Command was: SELECT id, columns, widths FROM "view_layout" ORDER BY id

Call stack (most recent first):

  • log_message("Failed to get a recordset: mysqli error: [1054: Un...", 8, true, true) at /home/mportfolios/public_html/htdocs/lib/errors.php:93
  • log_warn("Failed to get a recordset: mysqli error: [1054: Un...") at /home/mportfolios/public_html/htdocs/lib/errors.php:736
  • SQLException->__construct("Failed to get a recordset: mysqli error: [1054: Un...") at /home/mportfolios/public_html/htdocs/lib/dml.php:477
  • get_recordset_sql("SELECT id, columns, widths FROM "view_layout" ORDE...", null) at /home/mportfolios/public_html/htdocs/lib/dml.php:433
  • get_recordset_select("view_layout", "", null, "id", "id, columns, widths", "", "") at /home/mportfolios/public_html/htdocs/lib/dml.php:397
  • get_recordset("view_layout", "", "", "id", "id, columns, widths", "", "") at /home/mportfolios/public_html/htdocs/lib/dml.php:586
  • get_records_array("view_layout", "", "", "id", "id, columns, widths") at /home/mportfolios/public_html/htdocs/lib/db/upgrade.php:2440
  • xmldb_core_upgrade("2013032217") at /home/mportfolios/public_html/htdocs/lib/upgrade.php:295
  • upgrade_core(object(stdClass)) at /home/mportfolios/public_html/htdocs/admin/upgrade.json.php:78

Performing upgrades...

You must enable JavaScript to perform an install or upgrade.

Component or plugin

From version

To version

Information

core

1.7.5

1.8.0

 Failed to get a recordset: mysqli error: [1054: Unknown column 'columns' in 'field list'] in adodb_throw(SELECT id, columns, widths FROM "view_layout" ORDER BY id , ) Command was: SELECT id, columns, widths FROM "view_layout" ORDER BY id 

Call stack (most recent first):

  • get_recordset_sql("SELECT id, columns, widths FROM "view_layout" ORDE...", null) at /home/mportfolios/public_html/htdocs/lib/dml.php:433
  • get_recordset_select("view_layout", "", null, "id", "id, columns, widths", "", "") at /home/mportfolios/public_html/htdocs/lib/dml.php:397
  • get_recordset("view_layout", "", "", "id", "id, columns, widths", "", "") at /home/mportfolios/public_html/htdocs/lib/dml.php:586
  • get_records_array("view_layout", "", "", "id", "id, columns, widths") at /home/mportfolios/public_html/htdocs/lib/db/upgrade.php:2440
  • xmldb_core_upgrade("2013032217") at /home/mportfolios/public_html/htdocs/lib/upgrade.php:295
  • upgrade_core(object(stdClass)) at /home/mportfolios/public_html/htdocs/admin/upgrade.json.php:78

artefact.comment

0.0.2

0.0.3

 

artefact.resume

1.0.1

1.0.2

 

auth.ldap

1.0.0

1.1.0

 

Successfully installed Mahara.

 

 

 

version 1.8.0 (2013101402), Copyright © 2006 onwards,

Aaron Wells's profile picture
Posts: 896

15 April 2014, 11:54

Hi Christopher,

It looks like the error that's currently causing your upgrade to fail (because VIEW_LAYOUT.COLUMNS is missing from the database) is because you've run the upgrade script multiple times.

If you took a backup of your database before attempting the upgrade, you should load up that backup and try the upgrade again. If it errors out, note what the error on the first attempt was.

If you did not take a backup... well, we could try manually skipping this step in the upgrade process. The part where your current backup is failing, is in the part where it converts all the page layouts from 1.7-style single-row layouts into 1.8-style multi-row layouts. You can probably tell if it ran through successfully on your first upgrade attempt, by checking in your database whether the "VIEW" table has a "NUMROWS" column. If VIEW.NUMROWS exists, then you're probably safe to skip this step, by updating your site version to 2013082100:

update config set value='2013082100' where field='version';

... but I would recommend taking a backup of your DB before you do that.

Cheers,

Aaron

anonymous profile picture
Account deleted
Posts: 2

15 April 2014, 12:53

Thanks Aaron, 

 I did what you suggested and had the same failure. So, what I ended up doing was going through the upgrade.php file line by line and checking all tables and  fields. Turns out the upgrade script had run properly the first time but for some reason the version number never upgraded. So, once I upgraded the version number to the one that matched the version.php file we were fine. I then took the site to 1.8.1 and ran the upgrade. We had a few fields missing and I fixed those. I then went to 1.8.2 and everyhing ran automagically. 

I am trying to think back to where the problem actully happend and I think I did an upgrade to a release candidate that failed around 1.7.2. Teaches me not to do that again.


-Chris

3 results