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

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Bug-reports    Topic: mod_jcomments publish_on timestamp comparison bug?
Pages: [1]   Go Down
  Print  
Author Topic: mod_jcomments publish_on timestamp comparison bug?  (Read 2174 times)
0 Members and 2 Guests are viewing this topic.
debruer
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« on: June 01, 2010, 07:27:57 »

Hello,

I just started using Joomla a few days ago and found your Jcomments solution and so far it has been working mostly great.  However, after doing a fresh install of a new site with the Jcomments component and latest comments module, I found that the site doesn't display the latest comments right away.  Looking further, I found that the sql that is used to retrieve the comments to display does a check against the publish_on value of the parent content object, comparing it to the current mysql server time.  The problem is, I set the timezone of my site to be UTC -07:00 Mountain Time, so all of my publish_on values are 7 hours into the future.  This causes none of the comments for any article to appear in the latest comment module until 7 hours after the article is published because it fails the publish check.  I did a quick hack to get things working, modifying line 77 of mod_jcomments.php:

default:

. "\n   AND (c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= now())"

modified:

. "\n   AND (c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= date_add(now(), interval 7 hour))"

I was wondering if this is a known bug (couldn't find any other posts related to this) and if there is a better solution out there (i know this is just a temp hack).

Using Joomla! 1.5.17 Stable and Jcomments 2.2.0.0

Thanks
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: June 01, 2010, 13:05:56 »

Thank you! I'm going to release new JComments Latest version soon and this bug will be fixed there...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Bug-reports    Topic: mod_jcomments publish_on timestamp comparison bug?
 
Jump to: