Update problems
- Status
- Closed
- Subject
- Update problems
- Version
- 1.9.x
4.x - Category
- Error
- Feature
- Installer (profiles, upgrades and server-related issues)
- Resolution status
- Out of Date
- Submitted by
- dclaar
- Lastmod by
- drsassafras
- Rating
- Description
I'm sure that nobody is really trying this, but the doc claims that an upgrade from 1.9 to 4.1 should work. When running the DB upgrade, I've hit four errors:
PHP Fatal error: Call to a member function fetchRow() on a non-object
in /var/www/tiki/installer/schema/20090923_mod_change_category_defaults_tiki.php on line 11, referer: http://dc-dev/spwiki/tiki-install.php
PHP Fatal error: Call to a member function fetchRow() on a non-object
in /var/www/tiki/installer/schema/20091004_last_tracker_items_modules_merge_tiki.php on line 11, referer: http://dc-dev/spwiki/tiki-install.php
PHP Fatal error: Call to a member function fetchRow() on a non-object
in /var/www/tiki/installer/schema/20091019_article_by_rating_modules_merge_tiki.php on line 11, referer: http://dc-dev/spwiki/tiki-install.php
Call to a member function fetchRow() on a non-object
in /var/www/tiki/installer/schema/20091019_last_articles_modules_merge_tiki.php on line 11, referer: http://dc-dev/spwiki/tiki
-install.php
Oops, didn't have alter privs on DB. Not sure if that's why this failed.- Solution
The solution (or at least workaround) is to check if the query returned anything. I have no idea if these functions should return any rows, but they're not with my DB. Here's a hacky fix for the first one. I tried while ($result && $result->fetchRow()), but I guess php doesn't do partial eval?? (I'm more of a perl guy...)
patch for first problemCopy to clipboard*** /var/www/tiki/installer/schema/20090923_mod_change_category_defaults_tiki.php.orig 2010-01-13 18:33:36.000000000 -0800 --- /var/www/tiki/installer/schema/20090923_mod_change_category_defaults_tiki.php 2010-01-13 18:35:09.000000000 -0800 *************** *** 8,19 **** function upgrade_20090923_mod_change_category_defaults_tiki( $installer ) { $result = $installer->query( "select moduleId, params from tiki_modules where name='change_category'; " ); ! while( $row = $result->fetchRow() ) { ! $params = $row['params']; ! if (strpos($params, "multiple=") === false) { ! if ($params) $params .= "&"; ! $params .= "multiple=n"; ! $installer->query( "update tiki_modules set params='" . $params . "' where moduleId=" . $row['moduleId'] . "; " ); } } } --- 8,21 ---- function upgrade_20090923_mod_change_category_defaults_tiki( $installer ) { $result = $installer->query( "select moduleId, params from tiki_modules where name='change_category'; " ); ! if ($result) { ! while($row = $result->fetchRow() ) { ! $params = $row['params']; ! if (strpos($params, "multiple=") === false) { ! if ($params) $params .= "&"; ! $params .= "multiple=n"; ! $installer->query( "update tiki_modules set params='" . $params . "' where moduleId=" . $row['moduleId'] . "; " ); ! } } } }- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2986
- Created
- Thursday 14 January, 2010 18:18:41 UTC
by dclaar - LastModif
- Thursday 17 November, 2016 03:37:45 UTC