e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: theme_library for frontend theme is influencing admin theme too #5243

Open Jimmi08 opened 1 month ago

Jimmi08 commented 1 month ago

What e107 version are you using?

v2.3.3, Latest Github version (just updated)

Bug description

I needed to remove jQuery from the frontend theme. I used the theme_library addon for this. Unfortunately, it has an impact on the admin theme too.

How to reproduce

Check how theme library addon works

This fixed it :

function config_alter(&$libraries)
    {
        if(defined("e_ADMIN_AREA") AND e_ADMIN_AREA) {

        }
        else {
            $libraries['cdn.jquery'] = array();
            $libraries['jquery'] = array();
            $libraries['cdn.jquery3'] = array();
            $libraries['jquery3'] = array();
        }

    }

Expected behavior

Load javascript for bootstrap3 theme only

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

8.1