MODx Bug/Feature Tracker and Feature Requests
Welcome to the MODx CMS Tracker. Please choose the appropriate project from the drop down menu and provide as much information as possible regarding your server environment and browser. Thanks!
FS#915 — Documents cannot be published with a publish date "exactly".
Attached to Project —
MODx
Opened by Shobu UMEMURA (shobu) - Thursday, 12 July 2007, 07:14AM
Last edited by Brunaud (coroico) - Friday, 09 May 2008, 03:07AM
Opened by Shobu UMEMURA (shobu) - Thursday, 12 July 2007, 07:14AM
Last edited by Brunaud (coroico) - Friday, 09 May 2008, 03:07AM
| Task Type | Bug Report |
|---|---|
| Category | Core Distribution |
| Status | Closed |
| Assigned To |
Garry Nutting (garryn) |
| Operating System | All |
| Severity | Medium |
|---|---|
| Priority | Normal |
| Reported Version | 0.9.6 |
| Due in Version | 0.9.6.2 |
| Due Date | Undecided |
| Percent Complete |
|
Details
1. Set a (un)publish date to the document.(ex. 30/07/07 10:00:00)
2. Browse the site( and MODx are checking schedule.) on (un)publish date of the document exactly. (access just 30/07/07 10:00:00)
3. The document isn't published.
Solution:
/manager/includes/document.parser.class.inc.php
FUNCTION: checkPublishStatus()
this lines.
----------------------
$sql = "UPDATE ".$this->getFullTableName("site_content")." SET published=1, publishedon=".time()." WHERE ".$this->getFullTableName("site_content").".pub_date < $timeNow AND ".$this->getFullTableName("site_content").".pub_date!=0 AND published=0";
----------------------
$sql= "UPDATE " . $this->getFullTableName("site_content") . " SET published=0, publishedon=0 WHERE " . $this->getFullTableName("site_content") . ".unpub_date < $timeNow AND " . $this->getFullTableName("site_content") . ".unpub_date!=0 AND published=1";
----------------------
change to
----------------------
$sql = "UPDATE ".$this->getFullTableName("site_content")." SET published=1, publishedon=".time()." WHERE ".$this->getFullTableName("site_content").".pub_date <= $timeNow AND ".$this->getFullTableName("site_content").".pub_date!=0 AND published=0";
----------------------
$sql= "UPDATE " . $this->getFullTableName("site_content") . " SET published=0, publishedon=0 WHERE " . $this->getFullTableName("site_content") . ".unpub_date <= $timeNow AND " . $this->getFullTableName("site_content") . ".unpub_date!=0 AND published=1";
----------------------
cause:
checkPublishStatus() has below line.
if ($cacheRefreshTime <= $timeNow && $cacheRefreshTime != 0) {
If $cacheRefreshTime, $timeNow and pub_date(In SQL) are same value, above conditional line return TRUE and execute above SQL.
But, SQL with (pub_date < $timeNow) return FALSE and do nothing...
After this process, $cacheRefreshTime is incremented the next schedule...
This task depends upon
This task blocks these from closing
- Field changed: Status (Unconfirmed → Requires testing)
- Field changed: Due in Version (Undecided → 0.9.6.2)
- Field changed: Percent Complete (0% → 100%)
- Field changed: Due Date (Undecided → Undecided)
- Task assigned to Garry Nutting (garryn)
Fixed in SVN rev 3167.