EMERALD (extended): JS Uncaught TypeError & Expand/Collaped boxes - Printable Version +- D&D Forums - MyBB Plugins & Themes (https://developement.design/forum) +-- Forum: MyBB Ressources (https://developement.design/forum/forumdisplay.php?fid=5) +--- Forum: Premium MyBB Themes (https://developement.design/forum/forumdisplay.php?fid=9) +---- Forum: Support (https://developement.design/forum/forumdisplay.php?fid=18) +---- Thread: EMERALD (extended): JS Uncaught TypeError & Expand/Collaped boxes (/showthread.php?tid=27981) |
EMERALD (extended): JS Uncaught TypeError & Expand/Collaped boxes - Vitor Costa (APDCA IT) - 11-28-2022 Hi guys :-) I found that on EXTENDED VERSION OF EMERALD every time I click to expand or collapse the tabs on the user CP it generates a JS error. I tested also here to validade if it was me only or so, but seems that the same error occurs here in this forum ... Don't know also if that could be related with the fact that when we revisit the user CP the browser don't "remember" the last expanded/collapsed state. Maybe not supposed to... don't know. Code: general.js?ver=1804:690 Uncaught TypeError: Cannot read properties of undefined (reading 'replace') EDIT: A bit replying to myself ... I tracked the funcion a bit in the general.js file. I think It can be something to do with the fact that the theme is not using images to represent the maximized and minimized, and its using font awesome icons to make those representation so the tag "img" a his "src" are null. Also then, as it fails, it doesn't run the saveCollapsed function etc etc... Code: if(expandedItem.length) EDIT again... last time. By now I edited the file general.js, and in the "expandCollapse: function(element)" I made a check typeof to test if it is undefined before procede. All work now without erros and the state of the boxes keeps "remembered" as it is saved in the cookie. RE: EMERALD (extended): JS Uncaught TypeError & Expand/Collaped boxes - AmazOuz - 11-30-2022 Thanks for your investigation and solution for this ^^ These are of course harmless JS errors but it's always better to clean them |