psychobunny / nodebb-plugin-blog-comments

Lets NodeBB act as a comments engine/widget for your blog
BSD 2-Clause "Simplified" License
98 stars 55 forks source link

Uncaught TypeError: Cannot assign to read only property 'className' of 1 #27

Open HLFH opened 9 years ago

HLFH commented 9 years ago

Hi,

I got this issue with the last version of your plugin:

Uncaught TypeError: Cannot assign to read only property 'className' of 1

on plugins/nodebb-plugin-blog-comments/lib/ghost.js:99

psychobunny commented 9 years ago

Hmm. On all pages or a specific one, and is it for published or unpublished pages?

(If your blog is live I can have a look at it myself)

HLFH commented 9 years ago

@psychobunny Hi, I only got this issue (in the JS console...) on every post, not on the frontpage/index. Furthermore, the issue is: "Uncaught TypeError: Cannot assign to read only property 'className' of 0 (anonymous function) And sometimes, it is also at the end 'className' of 4, and not 1 or 0... You could see here for example. https://dinepont.fr/couleurs-du-temps/

psychobunny commented 9 years ago

The comments are loading for me, and I don't see any errors. Maybe its a browser specific issue? What are you using?

HLFH commented 9 years ago

@psychobunny It seems to be small JS warning/error. screenshot 2015-04-20 at 22 05 57.

I'm running Chrome 43.0.2357.19 dev (64-bit) on Chrome OS Dev Channel. So it's related to these lines of code on ghost.js, especially the line 99 lists[list].className = ' ';:

setTimeout(function() {
                var lists = nodebbDiv.getElementsByTagName("li");
                for (var list in lists) {
                    if (lists.hasOwnProperty(list)) {
                        lists[list].className = '';
                    }

I don't know if there is something related on Google

giantkingsquid commented 8 years ago

I'm having the same problem on mine using Safari. See error below.

screen shot 2016-03-04 at 9 53 08 pm

screen shot 2016-03-04 at 9 53 54 pm

You can have a look at at https://qldformulaford.org/the-2016-queensland-formula-ford-series/ if you wish. Not sure if it's related to the other issue with the profile pics going 404?

I also tested this in Firefox and did not get an error.