0

I am using moodle for the first time today. I am to look at a site that was built with it. I was getting a blank white screen after login. Then I googled and put a debug line and now it says an error

Fatal error: Call to undefined method core_renderer_maintenance::get_header() in /.../../public_html/theme/genesis/layout/header.php on line 7

New to php too. What is the steps i need to take? ANy help is appreciated. Thanks. If you have questions, please ask.

RookieAppler
  • 1,517
  • 5
  • 22
  • 58
  • The first thing you should do is look in /version.php and find out what release number you are running (e.g. 2.5.3+) and report it here. The next thing to do would be to switch to the theme 'standard' (if you cannot do that via the UI, then open up the database using adminer/phpmyadmin or similar, look in the table mdl_config, find the value 'theme' and change it to 'standard' instead of 'genesis'. – davosmith Apr 04 '14 at 08:04
  • @davosmith. release number: '2.6.2+ (Build: 20140314). I changed the theme to standard in DB. Now when I log in it says Upgrading Moodle database from version 2.6.1+ (Build: 20140228) (2013111801.10) to 2.6.2+ (Build: 20140314) (2013111802.01) Your Moodle files have been changed, and you are about to automatically upgrade your server to this version: 2.6.2+ (Build: 20140314) (2013111802.01) Once you do this you can not go back again. Please note that this process can take a long time. Are you sure you want to upgrade this server to this version? – RookieAppler Apr 04 '14 at 16:15
  • All sounds about right then - looks like the theme was broken in some way - I suggest you contact the people who made it to report the bug. You should be fine to run the upgrade and continue. – davosmith Apr 04 '14 at 20:01
  • @davosmith.I just realised you answered my question on the moodle forums. Also there are 2 places to login. One of them points to /login/index.php and the other one to just /login. Its the header item login(register,login). I looked in the theme header.php, config.php but could not find where its pointed to . I am thinking its a button and button click href goes to that location.Where to find it? – RookieAppler Apr 04 '14 at 21:27
  • I'm not quite sure what you are asking. Web servers automatically send index.php (or index.html) if you miss the filename out. So login/ returns the file login/index.php – davosmith Apr 05 '14 at 07:35
  • @davosmith.So now site shows up. Some other silly mistakes. Now i need to change the domain name. I changed in the root/config.php the value to my new site and then while still logged in made a backup of Db, then went to /admin/tool/replace/index.php. changed the url from old to new and hit continue. Now when i go to that site it still does not show up. Did i miss something? Also when replace should I use the "http:\\" part?I tried both with and without http, no luck. – RookieAppler Apr 07 '14 at 18:47
  • @davosmith.Also i logged into cpanel and went to "preview domains", ->"Preview", it brings up a page saysing "Not a valid domain". When replacing i get this message "This script is not supported, always make complete backup before proceeding! This operation can not be reverted! Several tables are not updated as part of the text replacement. This include configuration, log, events, and session tables." – RookieAppler Apr 07 '14 at 18:50

1 Answers1

0

Be sure to have code that calls the core of moodle:

require_once (dirname ( dirname ( dirname ( __FILE__ ) ) ) . '/config.php');

(the amount of dirname depends on where you are) then you can use the the global variables like $OUTPUT, $PAGE without problem.

echo $OUTPUT->header ();
(your code)
echo $OUTPUT->footer ();
Marcelo
  • 429
  • 1
  • 6
  • 19