moodle-an-hochschulen / moodle-local_boostnavigation

Moodle plugin which tries to overcome some fixed appearance behaviours of Boost's nav drawer in a clean way
GNU General Public License v3.0
39 stars 27 forks source link

warning on settings page #113

Closed jimenez-b closed 10 months ago

jimenez-b commented 2 years ago

Hello we just found a little warning on your excellent plug. We're running v3.9 r6 on a 3.9.14 installation.

Too much data passed as arguments to js_call_amd("core/showhidesettings", "init"). Generally there are better ways to pass lots of data from PHP to JavaScript, for example via Ajax, data attributes, ... . This warning is triggered if the argument string becomes longer than 1024 characters.
line 1058 of /lib/outputrequirementslib.php: call to debugging()
line 163 of /admin/settings.php: call to page_requirements_manager->js_call_amd()

we did a little dump of said variable $opts and we found:

good

Array
(
    [dependencies] => Array
        (
            [s_local_boostnavigation_collapsecustomcoursenodesusers] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecustomcoursenodesusersicon
                                    [1] => s_local_boostnavigation_collapsecustomcoursenodesusersdefault
                                    [2] => s_local_boostnavigation_collapsecustomcoursenodesuserssession
                                    [3] => s_local_boostnavigation_collapsecustomcoursenodesusersaccordion
                                )

                        )

                )

            [s_local_boostnavigation_collapsecustomcoursenodesadmins] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecustomcoursenodesadminsicon
                                    [1] => s_local_boostnavigation_collapsecustomcoursenodesadminsdefault
                                    [2] => s_local_boostnavigation_collapsecustomcoursenodesadminssession
                                    [3] => s_local_boostnavigation_collapsecustomcoursenodesadminsaccordion
                                )

                        )

                )

        )

)
----
Array
(
    [dependencies] => Array
        (
            [s_local_boostnavigation_collapsecustombottomnodesusers] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecustombottomnodesusersicon
                                    [1] => s_local_boostnavigation_collapsecustombottomnodesusersdefault
                                    [2] => s_local_boostnavigation_collapsecustombottomnodesuserssession
                                    [3] => s_local_boostnavigation_collapsecustombottomnodesusersaccordion
                                )

                        )

                )

            [s_local_boostnavigation_collapsecustombottomnodesadmins] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecustombottomnodesadminsicon
                                    [1] => s_local_boostnavigation_collapsecustombottomnodesadminsdefault
                                    [2] => s_local_boostnavigation_collapsecustombottomnodesadminssession
                                    [3] => s_local_boostnavigation_collapsecustombottomnodesadminsaccordion
                                )

                        )

                )

        )

)
------
Array
(
    [dependencies] => Array
        (
            [s_local_boostnavigation_collapsecustomnodesusers] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecustomnodesusersicon
                                    [1] => s_local_boostnavigation_collapsecustomnodesusersdefault
                                    [2] => s_local_boostnavigation_collapsecustomnodesuserssession
                                    [3] => s_local_boostnavigation_collapsecustomnodesusersaccordion
                                )

                        )

                )

            [s_local_boostnavigation_collapsecustomnodesadmins] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecustomnodesadminsicon
                                    [1] => s_local_boostnavigation_collapsecustomnodesadminsdefault
                                    [2] => s_local_boostnavigation_collapsecustomnodesadminssession
                                    [3] => s_local_boostnavigation_collapsecustomnodesadminsaccordion
                                )

                        )

                )

        )

)
Array
(
    [dependencies] => Array
        (
            [s_local_boostnavigation_removecontentbankcoursenode] => Array
                (
                    [checked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_movecontentbankcoursenode
                                    [1] => s_local_boostnavigation_movecontentbankcoursenodebefore
                                )

                        )

                )

            [s_local_boostnavigation_movecontentbankcoursenode] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_movecontentbankcoursenodebefore
                                )

                        )

                )

        )

)
--------------------------------------------------------
bad
Array
(
    [dependencies] => Array
        (
            [s_local_boostnavigation_insertactivitiescoursenode] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_insertactivitiescoursenoderealicons
                                    [1] => s_local_boostnavigation_collapseactivitiescoursenode
                                    [2] => s_local_boostnavigation_collapseactivitiescoursenodedefault
                                    [3] => s_local_boostnavigation_collapseactivitiescoursenodesession
                                )

                        )

                )

            [s_local_boostnavigation_insertcoursesectionscoursenode] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecoursesectionscoursenode
                                    [1] => s_local_boostnavigation_collapsecoursesectionscoursenodedefault
                                    [2] => s_local_boostnavigation_collapsecoursesectionscoursenodesession
                                )

                        )

                )

            [s_local_boostnavigation_collapsecoursesectionscoursenode] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapsecoursesectionscoursenodeicon
                                    [1] => s_local_boostnavigation_collapsecoursesectionscoursenodedefault
                                    [2] => s_local_boostnavigation_collapsecoursesectionscoursenodesession
                                )

                        )

                )

            [s_local_boostnavigation_collapseactivitiescoursenode] => Array
                (
                    [notchecked] => Array
                        (
                            [1] => Array
                                (
                                    [0] => s_local_boostnavigation_collapseactivitiescoursenodeicon
                                    [1] => s_local_boostnavigation_collapseactivitiescoursenodedefault
                                    [2] => s_local_boostnavigation_collapseactivitiescoursenodesession
                                )

                        )

                )

        )

)

the last example, which we reference as 'bad', is the page showing the error on /admin/settings.php?section=local_boostnavigation_coursenodes

thanks

katcee commented 1 year ago

I am also getting this warning on the course settings page - it cuts off the page at exactly the point I want to use - the part where I can check for all course menu nodes to start as collapsed.

abias commented 10 months ago

This plugin has finally reached end of life now and will not be upgraded to Moodle 4.x.

I would like to invite you to have a look at our Moodle 4 theme theme_boost_union which supports several aspects of this plugin's feature set and is actively maintained and extended. Thank you for your understanding.

Against this background, I will close this issue.