Snille / MMM-Modulebar

A module for the MagicMirror 2 that adds touch buttons for showing/hiding other modules.
MIT License
14 stars 10 forks source link

Youless2 module not working when modulebar is active #16

Open BlueForrest opened 2 years ago

BlueForrest commented 2 years ago

When modulebar is running, the MMM-Youless2 isn't calculating anymore. It shows "Undefined" in the youless module title.
When I disable Modulebar, Youless2 is working fine. Any idea how to fix this?

BlueForrest commented 2 years ago

In debug mode I see this error when Modulebar is active. When I disable Modulebar, no error appears. Hope this info is more helpfull. - Thanks.

TypeError: wrapper.gaugeMeter is not a function at Class.getDom (:8080/modules/MMM-YouLess2/MMM-YouLess2.js:78) at main.js:113 at new Promise (<anonymous>) at updateDom (main.js:111) at main.js:53 at Array.forEach (<anonymous>) at createDomObjects (main.js:20) at Object.modulesStarted (main.js:502) at startModules (loader.js:55) at loader.js:38 MMM-YouLess2.js:78 Uncaught (in promise) TypeError: wrapper.gaugeMeter is not a function at Class.getDom (:8080/modules/MMM-YouLess2/MMM-YouLess2.js:78) at main.js:113 at new Promise (<anonymous>) at updateDom (main.js:111) at main.js:53 at Array.forEach (<anonymous>) at createDomObjects (main.js:20) at Object.modulesStarted (main.js:502) at startModules (loader.js:55) at loader.js:38

Snille commented 2 years ago

Hi, my dev environment is down for the moment due to switching servers. I'll try to replicate the problem as soon as it's up again. I'm waiting for parts for the moment (chip shortage...)...

BlueForrest commented 2 years ago

Dear Erik, Meanwhile I have found the issue. Both Youless2 & Modulebar are using jquery.js but Youless2 was using another version than modulebar. this version difference created a conflict. It has been fixed by modify the code in Modulebar as follows:

initial code: // Loads the jquery library. getScripts: function() { return ["modules/MMM-Modulebar/js/jquery.js"]; }, modified code: // Loads the jquery library. getScripts: function() { return []; },

So now all is working fine, because jquery.js is already loaded by Youless2 module.

Thanks for taking care of my request. Kind regards, Johan

Op do 11 nov. 2021 om 07:33 schreef Erik Pettersson < @.***>:

Hi, my dev environment is down for the moment due to switching servers. I'll try to replicate the problem as soon as it's up again. I'm waiting for parts for the moment (chip shortage...)...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Snille/MMM-Modulebar/issues/16#issuecomment-966029242, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5SRJFZ3WP4HKLN7HQ7GKLULNPTNANCNFSM5HQYWRWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Snille commented 2 years ago

Hi again, good to hear! I'll keep that in mind if some one else havs an issue. Maybe in the future build some "check" if jq is already loaded os not. Thank you for debugging! :)