Forums | Mahara Community

Support /
Recovering from deleting a Mahara 19.04 installation


11 July 2019, 2:44

Hello,

While trying to make a new OpenSSL version work, we accidentally deleted the whole Apache folder (/opt/app/apache/). We're running on Red Hat 7.6 with Apache 2.4.39 and PostGres 9.2.24. Our sysadmin then mistakenly restored a backup with the 18.10 version and not 19.04 version, so when accessing mahara, we had a version mismatch error (database at 19.04, app at 18.10). Restoring a backup of the database that would match the 18.10 version of Mahara would lose a lot of data, and hence be tried in last resort only.

I've since tried the following :

 

1. Downloaded Mahara 19.04, replaced the 3 files we had modified (config.php, /lib/mahara.php, module/lti/webservice/functions/module_lti_launch.php), restarted Apache : now getting the following error : "Site unavailable - A nonrecoverable error occurred. This probably means you have encountered a bug in the system".

2. Tried changing the $cfg->productionmode = false; in config.php -> same error

3. Tried navigating to page URLs directly -> same error.

4. In the error logs, we now see the following :

[WAR] 40 (lib/web.php:1444) Undefined index: name
Call stack (most recent first):
* log_message("Undefined index: name", 8, true, true, "/opt/app/apache2439/htdocs/lib/web.php", 1444) at /opt/app/apache2439/htdocs/lib/errors.php:520
 * error(8, "Undefined index: name", "/opt/app/apache2439/htdocs/lib/web.php", 1444, array(size 2)) at /opt/app/apache2439/htdocs/lib/web.php:1444
 * sideblock_template(array(size 13), array(size 1)) at /opt/app/apache2439/htdocs/lib/web.php:190
* smarty(array(size 0), array(size 0), array(size 0), array(size 1)) at /opt/app/apache2439/htdocs/lib/errors.php:681
 * MaharaException->handle_exception() at /opt/app/apache2439/htdocs/lib/errors.php:546
* exception(object(SystemException)) at Unknown:0
[DBG] 40 (lib/errors.php:691) Exception thrown by smarty call while handling exception:
[DBG] 40 (lib/errors.php:691) [MaharaException]: The sideblock name "" is already in use. Please choose a different one.

 

At this point, I've googled the errors above, but can't find anything pertinent. I've tried adding the following to config.php to get more verbose logs, to no avail.

$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;

Any ideas?

Thanks,

François

Robert Lyon's profile picture
Posts: 756

11 July 2019, 9:14

Hi

 

The first thing I'd do is check your version of /lib/mahara.php against the one supplied in 19.04 to see if the isn't a mistake in the changes as the problem looks to be this: The sideblock name "" is already in use

 

in htdocs/lib/web.php inside the function sideblock_template($sideblock, &$sideblock_menu) { ... } is where that error is being created.

You could try adding the lines:

log_debug($sideblock);

log_debug($sideblock_menu);

To see what is causing the sideblock to have an empty name

Cheers

Robert

12 July 2019, 2:05

Hi Robert,

The only change we have in mahara.php is to comment out the check for the PHP GD extension, as it somehow throws an error when we try to install / upgrade mahara otherwise :

    // Check for freetype in the gd extension
//    $gd_info = gd_info();
//    if (!$gd_info['FreeType Support']) {
//        throw new ConfigSanityException(get_string('gdfreetypenotloaded', 'error'));
//    }

I added the lines below in htdocs/lib/web.php as you suggested :

  • log_debug($sideblock);
  • log_debug($sideblock_menu);

The error log was then repeating the errors in my previous post and nothing new. I went for an angular method : upgraded another Mahara instance from 18.10 to 1904 that was a clone of this one, copied the /htdocs folder over, set the config.php, mahara.php and LTI module over, and it started working.

Thanks for the help,

François

3 results