trema-tech / moodle-theme_trema

Theme trema, a Moodle LMS plugin.
https://moodle.org/plugins/theme_trema
GNU General Public License v3.0
40 stars 20 forks source link

Moodle 4.0 beta - Layout errors caused by call to moodle_page->__get() #115

Closed michael-milette closed 2 years ago

michael-milette commented 2 years ago

In Moodle 4.0 the Trema 4.0.0.0 (2022031800) BETA - MOODLE_40_ALPHA branch, I get almost a dozen errors with debugging set to DEVELOPER when I access certain pages such as Front page, Dashboard, All courses,

The two error messages are:

I believe that the lines which are generating the errors are the layout/*.php files:

For the frontpage.php layout, the source of the error comes from: line 135 of /theme/trema/layout/frontpage.php: call to moodle_page->__get()

For column2.php, layout, the source of the error comes from: line 86 of /theme/trema/layout/columns2.php: call to moodle_page->__get()

For the mydashboard.php layout, the source of the error comes from: line 101 of /theme/trema/layout/mydashboard.php: call to moodle_page->__get()

The actual line in each of these cases is:

$nav = $PAGE->flatnav;

Here are a couple of typical examples of the full error messages with traces:

Flat navigation has been deprecated in favour of primary/secondary navigation concepts line 4139 of /lib/navigationlib.php: call to debugging() line 839 of /lib/pagelib.php: call to flat_navigation->construct() line 948 of /lib/pagelib.php: call to moodle_page->magic_get_flatnav() **line 135 of /theme/trema/layout/frontpage.php: call to moodle_page->get()** line 1474 of /lib/outputrenderers.php: call to include() line 1400 of /lib/outputrenderers.php: call to core_renderer->render_page_layout() line 121 of /index.php: call to core_renderer->header()

Function has been deprecated with the deprecation of the flat_navigation class. line 453 of /lib/navigationlib.php: call to debugging() line 4202 of /lib/navigationlib.php: call to navigation_node->build_flat_navigation_list() line 840 of /lib/pagelib.php: call to flat_navigation->initialise() line 948 of /lib/pagelib.php: call to moodle_page->magic_get_flatnav() line 135 of /theme/trema/layout/frontpage.php: call to moodle_page->__get() line 1474 of /lib/outputrenderers.php: call to include() line 1400 of /lib/outputrenderers.php: call to core_renderer->render_page_layout() line 121 of /index.php: call to core_renderer->header()

Let me know if you need any help reproducing the issue.

Best regards,

Michael

VRSafety commented 2 years ago

have you found a fix yet?

michael-milette commented 2 years ago

Hi @VRSafety

I spoke with Rodrigo yesterday and he demonstrated an upcoming release of Trema where we confirmed that the issue was fixed. It is my understanding that he is just finishing up some QA testing and fixing, and should have a new release ready shortly.

Best regards,

Michael

michael-milette commented 2 years ago

Thanks for addressing these issues @rmady . Much appreciated.

Best regards,

Michael