wigs Posted August 13 Share Posted August 13 (edited) I fresh installed prestashop 9, after a lot of trial and error it works but I get these css errors. Any idea how to fix them? I don't even know what's causing them/what should be happening instead of throwing the errors. My shop's url is alegro.gr (used to be test.sixtir.gr) Uncaught TypeError: can't access property "style", a is null as https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 as https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 as https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 <anonymous> https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 u https://test.sixtir.gr/themes/core.js:11 l https://test.sixtir.gr/themes/core.js:11 setTimeout handler*263/</Deferred/then/a/< https://test.sixtir.gr/themes/core.js:11 c https://test.sixtir.gr/themes/core.js:11 fireWith https://test.sixtir.gr/themes/core.js:11 fire https://test.sixtir.gr/themes/core.js:11 c https://test.sixtir.gr/themes/core.js:11 fireWith https://test.sixtir.gr/themes/core.js:11 ready https://test.sixtir.gr/themes/core.js:11 Z https://test.sixtir.gr/themes/core.js:11 263 https://test.sixtir.gr/themes/core.js:11 263 https://test.sixtir.gr/themes/core.js:11 263 https://test.sixtir.gr/themes/core.js:11 a https://test.sixtir.gr/themes/core.js:15 <anonymous> https://test.sixtir.gr/themes/core.js:15 <anonymous> https://test.sixtir.gr/themes/core.js:289 <anonymous> https://test.sixtir.gr/themes/core.js:289 Edited September 8 by wigs (see edit history) Link to comment Share on other sites More sharing options...
wigs Posted August 18 Author Share Posted August 18 I found out it's because my main menu (nav bar) has no dropdowns. The theme tries to edit the dropdown's style (show, hide) but the dropdown can't be found and this error is thrown. Simple bug. Link to comment Share on other sites More sharing options...
Mehdi Bourechka Posted August 19 Share Posted August 19 On 8/13/2025 at 12:29 PM, wigs said: I fresh installed prestashop 9, after a lot of trial and error it works but I get these css errors. Any idea how to fix them? I don't even know what's causing them/what should be happening instead of throwing the errors. My shop's url is https://test.sixtir.gr/ Uncaught TypeError: can't access property "style", a is null as https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 as https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 as https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 <anonymous> https://test.sixtir.gr/themes/hummingbird/assets/js/theme.js:63 u https://test.sixtir.gr/themes/core.js:11 l https://test.sixtir.gr/themes/core.js:11 setTimeout handler*263/</Deferred/then/a/< https://test.sixtir.gr/themes/core.js:11 c https://test.sixtir.gr/themes/core.js:11 fireWith https://test.sixtir.gr/themes/core.js:11 fire https://test.sixtir.gr/themes/core.js:11 c https://test.sixtir.gr/themes/core.js:11 fireWith https://test.sixtir.gr/themes/core.js:11 ready https://test.sixtir.gr/themes/core.js:11 Z https://test.sixtir.gr/themes/core.js:11 263 https://test.sixtir.gr/themes/core.js:11 263 https://test.sixtir.gr/themes/core.js:11 263 https://test.sixtir.gr/themes/core.js:11 a https://test.sixtir.gr/themes/core.js:15 <anonymous> https://test.sixtir.gr/themes/core.js:15 <anonymous> https://test.sixtir.gr/themes/core.js:289 <anonymous> https://test.sixtir.gr/themes/core.js:289 This error happens because the Hummingbird theme tries to call .style on an element that doesn’t exist yet in the DOM. Disable JS minification (in Advanced Parameters → Performance) to see which file throws the error, then wrap the selector like this: const el = document.querySelector('selector'); if (el) { el.style.property = 'value'; } Link to comment Share on other sites More sharing options...
wigs Posted August 21 Author Share Posted August 21 (edited) On 8/20/2025 at 1:08 AM, Mehdi Bourechka said: This error happens because the Hummingbird theme tries to call .style on an element that doesn’t exist yet in the DOM. Disable JS minification (in Advanced Parameters → Performance) to see which file throws the error, then wrap the selector like this: const el = document.querySelector('selector'); if (el) { el.style.property = 'value'; } There is no minification choice in advanced parameters -> performance, at least not in my installation Edited August 21 by wigs (see edit history) Link to comment Share on other sites More sharing options...
Mehdi Bourechka Posted August 21 Share Posted August 21 11 hours ago, wigs said: There is no minification choice in advanced parameters -> performance, at least not in my installation The Hummingbird theme is not yet stable on PrestaShop 9, which explains the error. For now, switch back to the default Classic theme. A stable update is planned by the end of September according to the last live session. Link to comment Share on other sites More sharing options...
wigs Posted Friday at 07:38 AM Author Share Posted Friday at 07:38 AM I tend to not cut off my hand when it hurts. Instead, the doctor fixes it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now