When using the PHP Tidy Library (More Specifically, The tidy_repair_string function) I keep getting the following error: Unsupported node type:8. what does this error mean, and what can I do to get around this?
The best I could figure out with my google-fu is I believe node type 8 is referring to comments. Seeing what you're feeding tidy_repair_string()
that's making it fail would help.
Perhaps you could fiddle with tidy's comment config options, fix_bad_comments
and hide_comments
?
I could be completely off, but that was as much as I could uncover with what you've stated. Some more info would help greatly. Such as an example of code that's specifically producing the error.
I also googled this issue without viewing anomareh's answer, and came to the same conclusion. tidy's nody type should use the same integers as the DOM node type inteegers. 8 stands for comment.
Watch out for parts of <!-- -->
. I would look out for the source location of the error. If tidy doesn't give you a line number, reduce your string by manually splitting it. If a chunk is ok, investige the next chunck. This way you can locate the problem.
It is most probaby a malformed tag that looks like a comment to tidy. Maybe you have nested comments?