DMASCoreDeclan / PRD-PP4-Blog

Blogstar for PP4
0 stars 1 forks source link

Testing Bug: Chrome Console errors #46

Closed DMASCoreDeclan closed 8 months ago

DMASCoreDeclan commented 8 months ago

Uncaught TypeError: Cannot read properties of undefined (reading 'classList') at Ie._isAnimated (modal.js:333:26) at Ie._initializeBackDrop (modal.js:206:24) at new Ie (modal.js:84:27) at script.js:1:25 _isAnimated @ modal.js:333 _initializeBackDrop @ modal.js:206 Ie @ modal.js:84 (anonymous) @ script.js:1

DMASCoreDeclan commented 8 months ago

_Uncaught TypeError: Cannot read properties of undefined (reading 'classList') - Bootstrap CDN .js file - won't fix this at Ie._isAnimated (modal.js:333:26) - Bootstrap CDN .js file - won't fix this at Ie.initializeBackDrop (modal.js:206:24) - Bootstrap CDN .js file - won't fix this at new Ie (modal.js:84:27) - Bootstrap CDN .js file - won't fix this at script.js:1:25 - fixed in project .js __isAnimated @ modal.js:333 - Bootstrap CDN .js file - won't fix this initializeBackDrop @ modal.js:206 - Bootstrap CDN .js file - won't fix this Ie @ modal.js:84 - Bootstrap CDN .js file - won't fix this (anonymous) @ script.js:1 - fixed in project .js file

DMASCoreDeclan commented 8 months ago

As a result of fixing:

It is replaced by this error: Uncaught TypeError: Class constructor Ie cannot be invoked without 'new' at script.js:1:35

I'm putting "new" back ,.js

These lines will return at script.js:1:25 - unfixed in project .js (anonymous) @ script.js:1 - unfixed in project .js file

DMASCoreDeclan commented 8 months ago

On advice from Mentor, the problem was that script.js was being loaded where it could not work.

It was part of the base.html

We created a {% block extras %} {% endblock extras%} in base.html

and in the required pages, where a delete confirmation was required, we entered {% block extras %}

{% endblock extras%}

The error no longer appears