-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme does not render in Moodle 4.2 #10
Comments
@gjb2048 I think that could also be implemented in M 4.1. Is it possible to change to the new navigation API? |
Dear @dasistwas, Possibly, will need to look though as M4.1 Boost has the 'Drawer', with is more involved - i.e. Adaptable changed from the old Classic style to Boost's Drawer. But it could be the case that wouldn't look good on Squared and will be a case of adapting what was used for primary navigation as Squared already has the newer secondary and tertiary navigation. G |
Boost's primary navigation is the Navbar, which Squared how has, including secondary and tertiary. The issue here, is more the fake Navigation' block that Squared generates that is more akin to the Course Index navigation in the Drawer in Boost, but its more so as this works like what it used to be and beyond courses. Adapting to the Course Index, I believe would reduce the navigation functionality that Squared provides. Therefore there is the thought that to keep things coherent, that the Course Index could be employed in the future within an added Drawer, that keeps it separate and reduce any duplication in Squared. For now the best way, a transitional one perhaps, is to have Squared contain the code that produces the flat navigation as it clearly still works but has a 'deprecation' message stating that it's likely to be removed. However, if when looking at the code, its based upon more stable API functionality, then it should last much longer. |
In ec83871 I've transposed and separated out the core code that generates the Flat navigation, such that only standard core navigation node classes are used. Tested on M4.2, before and after the changes and the deprecation messages in the PHP log files do go away. However, cannot replicate the assertion 'does not render at all' before the changes are implemented. To test, switch to the https://github.com/Wunderbyte-GmbH/moodle-theme_squared/compare/master_ownflat branch, but make sure you have a 'Purge all caches' screen available or can run via the command prompt, as a new namespaced file is added. This won't be required when releasing as I'll up the version number when integrating into the main branch. Feedback please. |
OK uploaded the ec83871 version of the theme, purged the caches. |
@bollycanuk What's in the server's PHP log please? |
@bollycanuk Please reply with evidence that it is an issue with the theme, then I'll be able to get on and rectify it. Otherwise, logically there is no further issue and this can be closed. |
I did a fresh install of Moodle 4.2.1+ and installed the Squared theme and it works as it should. Not sure why it is not working on an existing site. I'm installing all the plugins I have on the previous site onto the new site to see if any conflicts arise. |
@bollycanuk Did you look in the log as I suggested? |
@bollycanuk Please respond so I can resolve this issue one way or another. |
I'm not sure how to view the PHP log but this is what I found in the PHP log via the cPanel. [09-Sep-2020 18:44:42] WARNING: [pool astenjohnson_university] server reached max_children setting (5), consider raising it php error logs: [Thu Jul 20 11:48:06.955140 2023] [:error] [pid 25620:tid 47309412914944] [client 213.109.202.66:55072] File does not exist: /home/astenj5/public_html/aju/index.php |
Dear @bollycanuk, Comparing my Apache and PHP logs, the log you've posted is in the Apache (web server one) and not the 'PHP log'. Ok, try looking at these links to help: I don't use cPanel for Moodle though, so don't know exactly how to find the log. |
OK found it - thanks. Here you go: text/x-generic ajeu.astenjohnson.training-Jul-2023 ( ASCII text, with very long lines ) 194.113.235.171 - - [30/Jun/2023:09:54:58 -0400] "GET /ty.php HTTP/1.1" 301 246 "http://astenjohnson.university/ty.php" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" |
Dear @bollycanuk That's the Apache access log! The first one was the Apache error log! Please try again! i.e. something like: [14-Jul-2023 12:24:36 Europe/London] PHP Warning: Undefined property: stdClass::$numsections in F:\moodledev\moodle42\course\format\grid\lib.php on line 770 |
Sorry, I'm new at this. I'll look into it later this afternoon. Have other pressing issues right now. |
@bollycanuk Any news on this please, as I'd really like to get to the bottom of this and understand if its a fault in the code I have written (so that I can fix it) or if it transpires to be a specific issue pertaining to your installation. |
@gjb2048 Sorry, I have been unable to get the PHP logs that you requested. I jusy don't have the technical knowhow to do it. Because the issue doesn't exist with a fresh install of Moodle I have to assume the problem is specific to my existing Moodle instances. Thank you for your help on this. I wouldn't waste any more time on this unless someone else reports the same problem. |
@bollycanuk Thank you for getting back to me. @dasistwas Can this be closed as complete please? |
Installed on a Moodle 4.2.1+ (Build: 20230623) site running on PHP 8.0.29 but when selected the theme does not render at all; just text.
Debugging report:
Flat navigation has been deprecated in favour of primary/secondary navigation concepts
Function has been deprecated with the deprecation of the flat_navigation class.
Flat nav has been deprecated in favour of primary/secondary navigation concepts
Function has been deprecated with the deprecation of the flat_navigation class.
Flat nav has been deprecated in favour of primary/secondary navigation concepts
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Flat nav has been deprecated in favour of primary/secondary navigation concepts
Function has been deprecated with the deprecation of the flat_navigation class.
Flat nav has been deprecated in favour of primary/secondary navigation concepts
Function has been deprecated with the deprecation of the flat_navigation class.
Flat nav has been deprecated in favour of primary/secondary navigation concepts
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Function has been deprecated with the deprecation of the flat_navigation class.
Flat nav has been deprecated in favour of primary/secondary navigation concepts
The text was updated successfully, but these errors were encountered: