Moodle Dashboard error

Moodle Dashboard error

by Fabio Gasi -
Number of replies: 6

Hello, I have the following problem: The Moodle Dashboard shows the following errors in dev mode:

line 449 of /lib/outputfactories.php: coding_exception thrown
line 2425 of /lib/outputlib.php: call to theme_overridden_renderer_factory->get_renderer()
line 1011 of /lib/pagelib.php: call to theme_config->get_renderer()
line 3451 of /calendar/lib.php: call to moodle_page->get_renderer()
line 53 of /blocks/calendar_upcoming/block_calendar_upcoming.php: call to calendar_get_view()
line 337 of /blocks/moodleblock.class.php: call to block_calendar_upcoming->get_content()
line 231 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1231 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1289 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 4179 of /lib/outputrenderers.php: call to block_manager->region_has_content()
line 50 of /theme/boost/layout/drawers.php: call to core_renderer->blocks()
line 1486 of /lib/outputrenderers.php: call to include()
line 1412 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 179 of /my/index.php: call to core_renderer->header()

When I checked the error log (FTP), this main error was listed:

[09-Apr-2024 03:12:13 America/Boise] PHP Fatal error:  Uncaught Error: Class "core_component" not found in /home3/japanhal/public_html/medicalenglish/moodle/admin/index.php:103

thought that perhaps the path in the index.php file is incorrectly specified? Can anyone help me with this?

Thank you very much.

Average of ratings: -
In reply to Fabio Gasi

Re: Moodle Dashboard error

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Which Moodle version do you have? Have you recently upgraded?

You've posted the stack trace (line 449 of /lib/outputfactories.php …, etc.) which is great but you haven't actually posted the error. Perhaps a screenshot might help us understand the problem.

[09-Apr-2024 03:12:13 America/Boise] PHP Fatal error:  Uncaught Error: Class "core_component" not found in /home3/japanhal/public_html/medicalenglish/moodle/admin/index.php:103

This is from over a month ago and doesn't look like an error on the dashboard.

In reply to Leon Stringer

Re: Moodle Dashboard error

by Fabio Gasi -

"Which Moodle version do you have? Have you recently upgraded?"

We recently updated the Moodle version to 4.3.3 . However this update was  done by a fiverr guy. Since then we have issues with the dashboard and the error in the console.

I have just recently been introduced to this project, so I am not very familiar with Moodle. I am attaching the two screenshots. These are the only clues I have so far.

Thank you for your fast response.

Attachment Bildschirmfoto 2024-05-23 um 21.21.38.png
Attachment Bildschirmfoto 2024-05-23 um 21.24.27.png
In reply to Fabio Gasi

Re: Moodle Dashboard error

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

What's the exact build number shown for the Moodle version on the Notifications page?

Is file calendar/renderer.php present? Does it contain the core_calendar_renderer definition:

 33 class core_calendar_renderer extends plugin_renderer_base {

The red error in your screenshot is reporting this cannot be found. If this file is present try purging all caches and see if that fixes the error.

In your screenshot of the log file, the right hand side is truncated so we can't see the file name and line numbers. If you could copy and paste these maybe we can work out what is causing them. Just one instance of each error should be fine.

In reply to Leon Stringer

Re: Moodle Dashboard error

by Fabio Gasi -

"What's the exact build number shown for the Moodle version on the Notifications page?

I think there's also a loading error in the notifications dashboard. I had to look at the version.php file on ftp (see attachments). 

"Is file calendar/renderer.php present? Does it contain the core_calendar_renderer definition?"

There's a calendar folder but no renderer.php file.calender folder

"If this file is present try purging all caches and see if that fixes the error"

I purged all caches, nothing changed .

"If you could copy and paste these maybe we can work out what is causing them."

[09-Apr-2024 03:12:13 America/Boise] PHP Fatal error: Uncaught Error: Class "core_component" not found in /home3/japanhal/public_html/medicalenglish/moodle/admin/index.php:103
 
[09-Apr-2024 03:12:13 America/Boise] PHP Warning: Attempt to read property "dirroot" on null in /home3/japanhal/public_html/medicalenglish/moodle/admin/index.php on line 99
 
[15-May-2024 00:51:44 America/Boise] PHP Notice: This page should be using theme moove which cannot be initialised. Nor can the site theme moove. Falling back to boost<ul style="text-align: left" data-rel="backtrace"><li>line 727 of /lib/outputlib.php: call to debugging()</li><li>line 1853 of /lib/pagelib.php: call to theme_config::load()</li><li>line 1978 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()</li><li>line 32 of /message/output/airnotifier/settings.php: call to bootstrap_renderer->__call()</li><li>line 98 of /lib/classes/plugininfo/message.php: call to include()</li><li>line 77 of /admin/settings/messaging.php: call to core\plugininfo\message->load_settings()</li><li>line 8781 of /lib/adminlib.php: call to require()</li><li>line 19 of /admin/settings.php: call to admin_get_root()</li></ul> in /home3/japanhal/public_html/medicalenglish/moodle/lib/weblib.php on line 3406
 
[15-May-2024 00:53:31 America/Boise] PHP Deprecated: is_dir(): Passing null to parameter #1 ($filename) of type string is deprecated in /home3/japanhal/public_html/medicalenglish/moodle/lib/classes/plugin_manager.php on line 1040
 
Thank you 
 
 
 
 
Attachment Bildschirmfoto 2024-05-24 um 13.10.03.png
Attachment Bildschirmfoto 2024-05-24 um 13.14.52.png
In reply to Fabio Gasi

Re: Moodle Dashboard error

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

So you have at least two files missing (calendar/index.php and calendar/renderer.php) and at least one file with the wrong contents since Moodle 4.3.3 (Build: 20240212) does not throw an exception on line 449 of lib/outputlib.php (should be line 447).

If these three files are wrong/missing there maybe other files affected too so it would be better to download a fresh copy of the Moodle source code.

This would be a process of:

  1. Go to the plugins overview page, click the Additional plugins link and make a note of any additional plugins. If this page doesn't work don't worry we can find this information out afterwards.
  2. Create a backup folder and move the current contents of the moodle folder into this.
  3. Download the Moodle 4.3.4 source code zip file. I'm suggesting Moodle 4.3.4 since it's the latest 4.3.x version.
  4. Extract the zip file's contents into the moodle folder.
  5. Copy file config.php from the backup folder into the moodle folder.
  6. Download and extract the 4.3 versions of any plugins noted in step 1.
  7. Log in to perform the update from Moodle 4.3.3 to 4.3.4.
  8. See if the dashboard error is now fixed.

Once that's done we can see if there are still errors in the logs.

Maybe you have the option of getting the Fiverr guy back to put this right, although maybe these issues indicate this guy wasn't up to the job.

Average of ratings: Useful (2)
In reply to Leon Stringer

Re: Moodle Dashboard error

by Fabio Gasi -

Okay we just put the missing files on to the Server (calendar/index.php, calendar/renderer.php). Now the Dashboard is working.  I'm not completely sure that the third file mentioned (lib/outputlib.php) needs any action. But I guess it's working now. The next thing is I need to figure out why all but 1 H5P activity is missing - probably 50 total over the 8 months. But that I figure it out myself. Thank you very much for the help!