Dark Blue 2.0 error when upgrading

Dark Blue 2.0 error when upgrading

by Scott Karren -
Number of replies: 2

All

I am trying to upgrade to the latest version of the Dark Blue theme (2012051500),  I am using 2.1.6 (Build: 20120514).  I replaced the existing theme dir with the new one and went to go to the notifications page to trigger the upgrade.  The background of my site loaded, along with some of the block elements but the main content just showed a blank area.  I retraced my steps to make sure I did not do anything wrong and recieved the same results.

I traced the error to a line (around line 88) in the general.php file.  The new file contains this code:

<div class="region-content">
<div id="mainpadder">
<?php echo $OUTPUT->main_content() ?>
</div>
</div>

Whereas the old file contains this code:

<div class="region-content">
<div id="mainpadder">
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</div>
</div>

If I remove <? php echo $OUTPUT ->main_content() ?> and replace it with <?php echo core_renderer::MAIN_CONTENT_TOKEN ?> everything works fine.  

I recall somewhere that Moodle 2.x themes use renderers which would lead me to believe that the new code is incorrect, am I wrong in this thinking?

Scott

Average of ratings: -
In reply to Scott Karren

Re: Dark Blue 2.0 error when upgrading

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

The theme version you are using is for Moodle 2.2+ However if you were to change the $OUTPUT code to the MAIN_CONTENT_TOKEN code from your old copy of this theme then it will work. 

HTH

Mary

In reply to Mary Evans

Re: Dark Blue 2.0 error when upgrading

by Scott Karren -

This is exactly what I did to resolve the problem.  The download page shows that this version is for 2.1 and 2.2.

Scott