-
Notifications
You must be signed in to change notification settings - Fork 114
Flooding of warning saying: "element span: validity error : ID login_btn already defined" #21
Comments
This message is not put out by nokogiri. It seems to be a problem in libxml2. Issue sparklemotion/nokogiri#1208 was closed with a message that sparklemotion/nokogiri#1196 was re-opened. Issue sparklemotion/nokogiri#1196 was closed saying open a new issue. |
On further investigation, it appears that libxml2 changed, and nokogiri had to change to capture these messages, and that a similar fix is necessary to nokogumbo. |
I'm still new to github, but i think i understand that your commit should now supress these messages. |
hold back for the moment, this fix is broken, I'm still chasing down what the real fix should be. |
Roger that, I'm not home at the moment but thanks for the heads up |
@rubys Let me know if I can assist in any way, having been through a few iterations of this fix on Nokogiri already. ;) |
Reproducible test case for the problem, with no Nokogumbo:
|
Opened as sparklemotion/nokogiri#1262 |
Isn’t this back? I’m having such warnings when using Nokogumbo only, not with plain Nokogiri. require 'nokogumbo'
Nokogiri::HTML5('<p id="foo"></p><p id="foo"></p>')
# => element p: validity error : ID foo already defined require 'nokogiri'
Nokogiri::HTML('<p id="foo"></p><p id="foo"></p>')
# => nothing Nokogiri: 1.6.7.2 UPDATE: This is gone from later versions. |
"borrowed" from 1696dc8 Fixes rubys/nokogumbo#21
Hi
I'm using nokogumbo as a parser and I'm getting flooded with warnings/messages saying:
element span: validity error : ID login_btn already defined
I boiled down my code and was able to reproduce it with the following code:
require 'open-uri'
require 'nokogumbo'
file = open('http://www.motogp.com/en/Results+Statistics')
doc = Nokogiri::HTML5(file)
The error comes out 2x after performing the 'doc = Nokogiri::HTML5(file)' command.
Would it be possible to supress this message/warning?
Thanks for the help!
Cheers
The text was updated successfully, but these errors were encountered: