An Unusual Error for DISQUS on AJAX (JQuery) based site

324 views
Skip to first unread message

Suman Kundu

unread,
Feb 2, 2012, 12:54:33 AM2/2/12
to disqu...@googlegroups.com
Hello,

I am getting an unusual error.. I installed DISQUS with the Gallery Server Pro, which use JQuery to display images of the photo album. It took some time to integrate DISQUS with the AJAX system as it is not well documented in the developer section. Now it is behaving somewhat I wanted. Means it is loading the comment for the next or previous image upon clicking the "next" or "previous" button.

But I found the following issue:
When I submit a comment it appears but now if I click the "next" or "previous" button, it does not work any more. The old comments and comment box are showing. Interestingly it is working when I was logged in and submitted a comment.

Web Application: http://theunspokenwords.net/fotos/gallery.aspx
How to Reproduce: Post comment as Guest. Try to view "next" or "previous" image.
Error: Comments and Comment Box do not refreshing
Browser: Firefox 9.0.1, Chrome 16.0.912.77, Opera 11.50
Remark: As error is not visible for logged in user (Tested for Moderators and a Facebook connect) the probable cause may be due to some Java Script/HTML error.

Code: First Time Load:

<script type="text/javascript">         
          /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */   
var disqus_shortname = '<app-short-name>';
          var disqus_identifier = 'gsp_' + '<%=Request.QueryString["moid"].ToString()%>';
          var disqus_url = 'http://www.theunspokenwords.net/fotos/gallery.aspx?moid=<%=Request.QueryString["moid"].ToString()%>#!gsp_<%=Request.QueryString["moid"].ToString()%>';
          var disqus_developer = 0;

          /* * * DON'T EDIT BELOW THIS LINE * * */
          (function() {         
          var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;   
          dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
          (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
          })();     
</script>

For Java Script:
function getMediaObjectHtmlCompleted(results, context, methodName)
{
_moInfo = results;
/*... Other Codes ...*/
DISQUS.reset({
          reload: true,
          config: function () { 
            this.page.identifier = 'gsp_' + _moInfo.Id; 
            this.page.url = 'http://www.theunspokenwords.net/fotos/gallery.aspx?moid=' + _moInfo.Id + '#!gsp_' + _moInfo.Id;
          }
 });
}

Please help me on this.

Regards,
Suman Kundu
email: su...@theunspokenwords.net
web: theunspokenwords.net




Suman Kundu

unread,
Feb 3, 2012, 2:27:18 AM2/3/12
to Disqus Developers
The test case modified a bit.. The error is also reproduced if someone
logging from the modal window open by clicking "Post as..." button.

I also found where the error is firing.. DISQUS.reset(.....) returns
"TypeError: g.parentNode is null"

Please help how can I resolve the issue. Thanks..

-- Suman Kundu

On Feb 2, 10:54 am, Suman Kundu <sumankundu.n...@gmail.com> wrote:
> Hello,
>
> I am getting an unusual error.. I installed DISQUS with the Gallery Server
> Pro, which use JQuery to display images of the photo album. It took some
> time to integrate DISQUS with the AJAX system as it is not well documented
> in the developer section. Now it is behaving somewhat I wanted. Means it is
> loading the comment for the next or previous image upon clicking the "next"
> or "previous" button.
>
> *But I found the following issue:*
> When I submit a comment it appears but now if I click the "next" or
> "previous" button, it does not work any more. The old comments and comment
> box are showing. Interestingly it is working when I was logged in and
> submitted a comment.
>
> *Web Application: *http://theunspokenwords.net/fotos/gallery.aspx
> *How to Reproduce: *Post comment as Guest. Try to view "next" or "previous"
> image.
> *Error: *Comments and Comment Box do not refreshing
> *Browser: *Firefox 9.0.1, Chrome 16.0.912.77, Opera 11.50
> *Remark: *As error is not visible for logged in user (Tested for Moderators
> and a Facebook connect) the probable cause may be due to some Java
> Script/HTML error.
>
> *Code:* First Time Load:

knzshirox

unread,
Jul 9, 2012, 4:31:38 AM7/9/12
to disqu...@googlegroups.com
I faced this problem too, so i end up using iframe to show different comments on the same page. 
Reply all
Reply to author
Forward
0 new messages