moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
55 stars 49 forks source link

smart menu needs better error checking. #550

Closed danmarsden closed 4 months ago

danmarsden commented 5 months ago

We have a client using smart menu with a menu item set to display for a specific role.

The role was deleted at the site level (had no users in it.) which took the whole site down as the smart-menu code was looking for a role that didn't exist, causing an SQL error - we had to force the theme back to boost, and delete the smart-menu item to get the site working.

didn't manage to catch the full error trace sorry - but hopefully there's enough info there for you to reproduce

(postgres Moodle 4.1 site running boost_union v4.1-r15 2023010528)

wiebkemueller-hsh commented 4 months ago

Hello @danmarsden,

Thank you for submitting this issue. We will have a closer look at this and check the conditions under which this can be reproduced as soon as possible.

Regards Wiebke

lucaboesch commented 4 months ago

This sounds like something better reproducible and checked for more ideally by PHPUnit and not Behat tests.

wiebkemueller-hsh commented 4 months ago

Hello @danmarsden Dan,

so far we haven't been able to manually reproduce this, with the Boost Union version you mentioned v4.1-r15. As a sample we used Moodle 4.1.5 and Moodle 4.1.9 For now the database is MySQL in our testing infrastructure.

Briefly - what happened was that the deleted role was automatically deleted in the smart menu configuration as soon as the role was deleted systemwide.

Could you specify the exact Moodle version? We will mount a testing infrastructure with postgres as soon as this is available.

Kind Regards Wiebke

danmarsden commented 4 months ago

If you can't reproduce it easily I'd be tempted to just suggest you close it as "couldn't reproduce" until someone is able to give more info - I didn't even manage to get a proper stack trace (fixing it fast on live server!) :-)

it was a client that self-hosts and gives us a call when they need help so it could have been something specific to their environment that we won't know unless we manage to get a stack trace... I'll see if the client can find a way to reproduce on their local testing environment but in the meantime feel free to close this as "can't reproduce".

wiebkemueller-hsh commented 4 months ago

Hello @danmarsden that was also our conclusion for the time being. Kind regards from Germany and Thanks for the issue anyway!