awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Number of replies: 15
Picture of Plugin developers

I am used to decaf, but after upgrading to 2.6 I got the error message:

'Unknown Type' when trying to open the .../my  - page or after login. Same as admin, when already logged in and add /my to the url.

There is a thread about this in the decaf forum, but I can not understand if there was a solution, that might apply here as well. Mary Richard Oelman upgrade from 2.3->2.4

I got this Error when I started with 2.5 - but it went away after modifying the 'defaulthomepage' setting.

Please help me to find a solution.

versions:

master or moodle 26 from

moodle 2.6  https://github.com/moodle/moodle.git

decaf, https://github.com/8cdev/moodle-theme_decaf.git

halboo: https://github.com/halbo5/moodle-theme_halboo.git

krystle https://github.com/roelmann/krystle.git

 

Default exception handler: Sonderfall - Unknown type Debug: \n  

Error code: generalexceptionmessage\n
  line 595 of /theme/decaf/lib.php: Exception thrown\n
  line 354 of /theme/decaf/renderers.php: call to decaf_expand_navigation-]expand()\n
  line 257 of /theme/decaf/renderers.php: call to theme_decaf_topsettings_renderer-]navigation_node()\n
  line 19 of /theme/decaf/layout/frontpage.php: call to theme_decaf_topsettings_renderer-]settings_tree()\n
  line 866 of /lib/outputrenderers.php: call to include()\n
  line 796 of /lib/outputrenderers.php: call to core_renderer-]render_page_layout()\n
  line 101 of /index.php: call to core_renderer-]header()\n

 

 

Average of ratings: -
In reply to Guido Hornig

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Guido,

Looking at 'navigation_node' in '/lib/navigationlib.php' it appears that the '$branchtype' in 'lib.php' method 'expand' of class 'decaf_expand_navigation' is not a known branch type as defined in 'navigation_node'.  I suggest debugging the integer value of '$branchtype' in decaf's lib.php to see if it is one of the types not catered for and if so, contacting the author of the theme with the information.

Cheers,

Gareth

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Picture of Plugin developers

Thank you Gareth,

the exception is thrown if the type is 'default' - and I do not understand the code - need to spand more time.

I commented out:    Line 597 in decaf lib.php: throw new Exception('Unknown type');

(as I did 6 month ago in another project - but because of Demenzia - I forgot my own well documented hacks)

but this is no final solution.

I will report this -  the same line in halboo (lib.php 601) and Krystle (line 653)

The only back draw: on the start page or my-page is no admin menue in decaf and in halboo it degenerates to simple link - but look and feel is still better than normal navigation/setting menu.

Thank you for the reply!

 

In reply to Guido Hornig

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Paul Nicholls -

Hi all,

I've just released Decaf v1.9.0 RC1 in the plugins database, which addresses this and a few other 2.6 compatibility issues.  It's an interim release until I have time to do a proper 2.6 version of Decaf - and as such, is not perfect (for instance, I've just disabled the Decaf "edit buttons" completely on 2.6 as it conflicts with 2.6's implementation of similar dropdowns).  I hope to have a full 2.6 version of Decaf available by the end of the year, but time is tight so it may not be until early next year.

-Paul

In reply to Paul Nicholls

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Picture of Plugin developers

Paul,

thank you. this is great news.

Guido

 

In reply to Guido Hornig

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Picture of Plugin developers
In reply to Guido Hornig

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Mary Evans -

Hi

You are using OLD code. The GITHUB version was last updated a month ago whereas the Decaf theme you need, is in the Plugins Database was updated2 days ago.

To download Decaf from the Plugin database CLICK HERE

Cheers Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Picture of Plugin developers

Thanks,

this woud be good news: there is fresh code

Bad news: I can not trust my good old automated  git - update machinery any more.

But after downloading the zip, I can not see any difference in the version numbers.

The git says it was updated by paul 7 days ago.

there is still no case for $branchtype = 11 in line 608 of decaf/lib.php

 

In reply to Guido Hornig

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Paul Nicholls -

Hi Guido,

Git should still be fine for updating Decaf - I add new versions to the plugin database via Git tags, so the code on Github has to be up-to-date before I can release a new version here.  If you can't see any difference in version number, you probably did already have the latest version.

I've just released RC3, though, which should finally fix your issue.  The branch type of 11 (TYPE_MY_CATEGORY) only seems to be used if you have categories enabled in My Courses and the user is enrolled in courses from multiple categories, so I hadn't encountered it (and the My Home page worked fine in my testing).  RC3 now handles TYPE_MY_CATEGORY nodes, and also includes a related fix to prevent duplication of nodes in the menu (which was triggering some further debug notifications for me).  You should be able to upgrade it either using Git or from the plugin database.

 

-Paul

Average of ratings: Useful (2)
In reply to Paul Nicholls

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Picture of Plugin developers

Dear Paul,

I'll take this as a Season's present!

($Season in my case: 'Christmas')

 

In reply to Paul Nicholls

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Picture of Plugin developers

Dear Decaf-MasterChief  Paul,

no more errors or warnings, even with complex settings!

THANK YOU! smile

In reply to Guido Hornig

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Krystle also now updated with Paul's latest awesomebar code and should now be working on 2,6. It can be grabbed from GitHub https://github.com/roelmann/krystle. Will be updated on the database as soon as I can.

Richard

In reply to Paul Nicholls

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by David Sturrock -

Hi Paul

I'm having a problem that seems to be caused by the changes made in renderers.php for decaf RC3. As a logged in user, all the courses disappear from the awesome bar My Courses listing as does the listing of activities against the current course topic section.

If I revert to renderers.php from RC2 it seems to work fine.

The change to RC 3 renderers.php insert the following from line 344

               if ($branch === false) {
                    if (!$expanded) {
                        // re-use subnav so we don't have to reinitialise everything
                        $subnav->expand($item->type, $item->key);
                    }
                    if (!isloggedin() || isguestuser()) {
                        $subnav->set_expansion_limit(navigation_node::TYPE_COURSE);
                    }
                    $branch = $subnav->find($item->key, $item->type);
                }

Anyone else having the same issue and if so have any ideas?

Cheers
David

In reply to David Sturrock

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Paul Nicholls -

Thanks for bringing this to my attention.  I think I made that change to reduce unnecessary calls and get rid of some DEBUG_DEVELOPER level warnings (saying that the node already exists), but evidently that's not the best way to do it as it breaks the "my courses" menu.  I'll look into that one further - hopefully I can make the same improvements without having to resort to overriding a whole bunch more classes and methods.

In reply to David Sturrock

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Paul Nicholls -

I've just released Decaf v1.9RC5 in the plugins DB - it should fix this issue (plus a z-index issue with the filepicker when launched from the image chooser in TinyMCE).

Average of ratings: Useful (1)
In reply to Mary Evans

Re: awesome-bar problem in decaf, krystle and Halboo with moodle 2.6: 'Unknown Type' generalexceptionmessage

by Guido Hornig -
Picture of Plugin developers

Dear Mary,

I want to say thank you for the 5-6 million posts and comments you gave us during the last year. Your support here in the forums  is a very valuable source of knowledge for me. This is the fuel that makes moodle a formula-1 community.

(And looking at it with a six-sigma quality scope: it can be called 'Perfekt!'  smile )

THANK YOU!