I've enabled the module, but I still have the problem to display disqus. I tried everything I know, clearing all cache, reinstall module, remove all IP denies and other than default redirects in my .htaccess, go back and forth between disqus and my site to no luck this far. I even installed garland to see if zen is the problem. Garland doesn't show it either. Then I wonder if it has anything to do with some HTML markup. I tried to validate through http://validator.w3.org/ and found about 12 Errors and 4 warning(s):
Validation Output: 12 Errors
1. Error XML Parsing Error
✉
* Line 331, column 34: XML Parsing Error: StartTag: invalid element name
<script type="text/javascript">//<[CDATA[
* Line 335, column 22: XML Parsing Error: StartTag: invalid element name
for(var i = 0; i < links.length; i++) {
* Line 337, column 73: XML Parsing Error: xmlParseEntityRef: no name
…'=' + encodeURIComponent(links[i].href) + '&';
* Line 340, column > 80: XML Parsing Error: expected '>'
…script" src="http://disqus.com/forums/http://gausartscom.disqus.com/get_num_r…
* Line 340, column > 80: XML Parsing Error: Opening and ending tag mismatch: script line 340 and unparseable
…script" src="http://disqus.com/forums/http://gausartscom.disqus.com/get_num_r…
* Line 342, column 14: XML Parsing Error: Sequence ']]>' not allowed in content
//]]></script>
* Line 342, column 2: XML Parsing Error: Sequence ']]>' not allowed in content
//]]></script>
* Line 342, column 2: XML Parsing Error: internal error
//]]></script>
* Line 342, column 2: XML Parsing Error: Extra content at the end of the document
//]]></script>
2. Error end tag for X omitted, but OMITTAG NO was specified
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
* Line 343, column 6: end tag for "script" omitted, but OMITTAG NO was specified
</body>
3. Error document type does not allow element X here
✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
* Line 340, column 143: document type does not allow element "script" here
….com/get_num_replies.js' + query + '"></' + 'script>');
4. Error marked section end not in marked section declaration
✉
* Line 342, column 2: marked section end not in marked section declaration
//]]></script>
5. Warning character X is the first character of a delimiter but occurred as data
✉
This message may appear in several cases:
* You tried to include the "<" character in your page: you should escape it as "<"
* You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&", which is always safe.
* Another possibility is that you forgot to close quotes in a previous tag.
* Line 331, column 33: character "<" is the first character of a delimiter but occurred as data
<script type="text/javascript">//<[CDATA[
* Line 335, column 21: character "<" is the first character of a delimiter but occurred as data
for(var i = 0; i < links.length; i++) {
* Line 337, column 72: character "&" is the first character of a delimiter but occurred as data
…+ '=' + encodeURIComponent(links[i].href) + '&';
* Line 340, column 144: character "<" is the first character of a delimiter but occurred as data
…com/get_num_replies.js' + query + '"></' + 'script>');
I disabled the module, then it passed.
Does it have anything to do with the display problem or simply a problem with disqus caching? I have installed the module for about 4 days and the problem remains. Does anyone know how to solve this just in case Rob is still busy? Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | disqusvalid.patch | 2 KB | robloach |
Comments
Comment #1
robloachThis uses their embed code, so there isn't really anything we can do. I submitted a bug report.
Comment #2
frodeste commentedSeems to me that some of the error should be easy to fix.
Error in
can be solved with replacing & with &
Here is a simple diff of my modified code with the original code
217c217
<
---
>
280c280
< query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
---
> query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
I would love to see this solved, but is new to drupal development.
Comment #3
frodeste commentedMore debugging: Found another error in the code. Here is the diff:
188c188
< $avatars = variable_get($delta .'_showavatars', TRUE) ? '&avatar_size='. variable_get($delta .'_avatarsize', 32) : '&hide_avatars=1';
---
> $avatars = variable_get($delta .'_showavatars', TRUE) ? '&avatar_size='. variable_get($delta .'_avatarsize', 32) : '&hide_avatars=1';
217c217
<
---
>
280c280
< query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
---
> query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
Comment #4
robloachI understand the other part of what's going on. Somewhere in the 6.x version of Drupal, inline JavaScript started adding the CDATA in for us. How's this?
Comment #5
frodeste commentedYour patch works great. Comit and close the issue. :))
Comment #6
robloachYay! http://drupal.org/cvs?commit=198434