Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: [solved] Comments are not received in the server
Pages: [1]   Go Down
  Print  
Author Topic: [solved] Comments are not received in the server  (Read 3549 times)
0 Members and 1 Guest are viewing this topic.
Woomla
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« on: January 23, 2010, 22:48:14 »

Hi,

I'm developing a website on my localhost. I've downloaded JComments 2.1.0.0  [07/08/2009] and display it on several articles. When I type in a comment and press Send, I only see the spinner for a short while, and then this disappears. No comment is added to the article.

In the server I see no log of the Ajax request that is made.

Unfortunately, now I have to debug this componen to get it ready.

Anyone any ideas where to start?

Thanks in advance,

Wo.
« Last Edit: January 24, 2010, 04:32:37 by Woomla » Logged
BBC
Full Member
***

Karma: 4
Offline Offline

Posts: 197



« Reply #1 on: January 23, 2010, 23:39:31 »

Activated System cache plugin can be reason for such problems, sometimes.
Do you use some cache extension?
Logged
Woomla
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #2 on: January 24, 2010, 02:50:46 »

No, not to my knowledge. I've Joomla! 1.15 and created a simple template. Some session/categories are set to have JComments. But no comment is ever added to the database on the server. I even don't know if the comment is received. I suppose I should debug JComments, but don't know how to do that.

Wo.
Logged
Woomla
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #3 on: January 24, 2010, 04:04:42 »

Here's something I've found.

My webserver is running on port 8080. The url with the new comment doesn't appear to have the port number in it.

It is: http://localhost/index.php?option=com_jcomments&tmpl=component

but I guess it should be

http://localhost:8080/index.php?option=com_jcomments&tmpl=component

Wo
Logged
Woomla
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #4 on: January 24, 2010, 04:31:56 »

Well, it looks like I've found something.

In JComments.init from jcomments-v2.1.js there's a check if the host name is still the same in the url as in location.hostname. This check doesn't count for port numbers in the hostname.

I've written a simple check to filter out the port.


original line 275 in jcomments-v2.1.js
Code:
var h=location.hostname,d,i1,i2;i1=r.indexOf('://');if(i1!=-1){i2=r.indexOf('/',i1+3);if(i2!=-1){d=r.substring(i1+3,i2);if(d!=h){r=r.replace(d,h);}}}this.requestURI=r;var th=this;jtajax.startLoading=function(){th.busy.show();};jtajax.finishLoading=function(){th.busy.hide();};},

my test
Code:
i2 = d.indexOf(':');if (i2 !== -1){d = d.substring(0, i2);}

I've inserted it just before replacing the hostname with the original one. This gives me the new line.

new line
Code:
var h=location.hostname,d,i1,i2;i1=r.indexOf('://');if(i1!=-1){i2=r.indexOf('/',i1+3);if(i2!=-1){d=r.substring(i1+3,i2);if(d!=h){i2 = d.indexOf(':');if (i2 !== -1){d = d.substring(0, i2);}r=r.replace(d,h);}}}this.requestURI=r;var th=this;jtajax.startLoading=function(){th.busy.show();};jtajax.finishLoading=function(){th.busy.hide();};},


So at least my comments now are send to the server  Roll Eyes

Wo.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #5 on: January 25, 2010, 18:51:15 »

Thanks for your fix, it already present in upcoming version. If you want I can send it to you for tests. If you want to test new version - just send me PM and I give you link to test build. Thanks!
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
capella
Newbie
*

Karma: 0
Offline Offline

Posts: 46


Email
« Reply #6 on: February 13, 2010, 03:18:43 »

i have the same issue but unfortunately this fix doesn't solve my problem. In case you want to have a look , this is the page which has issues - http://www.way2college.com/indian-school-of-mines-mba.htm
Logged
capella
Newbie
*

Karma: 0
Offline Offline

Posts: 46


Email
« Reply #7 on: February 21, 2011, 10:47:06 »

My issue was that i have jrecache component in which i was caching post commands also. Once i turned off caching post command, this got fixed.
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: [solved] Comments are not received in the server
 
Jump to: