In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001289 [In-Portal CMS] Front End bug report always 2012-05-17 04:59 2012-07-25 05:30
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Platform
Status closed   OS
  OS Version
ETA none Fixed in Version 5.2.0-RC1 Product Version 5.1.0
  Target Version 5.2.0 Product Build
Time EstimateNo estimate
Summary 0001289: Incorrect link are build from cron
Description By default cron (/tools/cron.php script) does it's job silently without sending any e-mail to anybody.

However if add a Scheduled Task that would, for example, send out latest added links on a website, then you'll notice soon enough that there are several problems in these links:
* links look like http://localhost/ (fixed in 0000849)
* links look like http://www.website.tld/tools/index.html (fixed in 0001005)
* links look like http://www.website.tld/admin/tools/cron.php?env=.... (when mod-rewrite is enabled)

This all is happening because of ADMIN constant being defined in cron.php script. Maybe it's defined to skip most of front-end specific code, which also includes mod-rewrite link building.

I'm proposing to remove this constant now and in code, that really isn't needed when cron is executed from PHP CLI place if with check for CRON constant it defined all the time.
Steps To Reproduce
Additional Information
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-bugs/qtuydmyarlU/discussion
Change Log Message Fixes cron broken link problem
Estimate Points 1
Attached Files patch file icon wrong_links_build_from_cron.patch [^] (468 bytes) 2012-05-17 04:59 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0000849closed (5.1.1)alex Link, created from cron always use "localhost" instead of site url 
related to 0001005closed (5.2.0)alex Incorrectly Detected BASE_PATH in Cron 

-  Notes
User avatar (0004649)
alex (manager)
2012-05-17 05:01

Will test all together later.
User avatar (0004650)
alex (manager)
2012-05-17 05:01

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001289: Incorrect link are build from cron
User avatar (0004651)
alex (manager)
2012-05-17 05:05

If you have a code that looks like this and is executed from cron:

$url_params = Array (
    '__MOD_REWRITE__' => 1,
    'pass' => 'm',
);

$url = $this->Application->HREF('path/to/template', '_FRONT_END_', $url_params, '../index.php');

then now it will start produce broken links.

You must remove any __MOD_REWRITE__, _FRONT_END_, and index.php mentions from it. At least it worked for me, when mod-rewrite was turned on. Not sure what links would be built from cron when mod-rewrite will be off.
User avatar (0004899)
alex (manager)
2012-07-25 05:30

Since 5.2.0/1.2.0 versions was released.

- Related Changesets
In-Portal CMS: 5.2.x r15344
Timestamp: 2012-05-17 05:01:49
Author: alex
Details ] Diff ]
Fixes 0001289: Incorrect link are build from cron
mod - /in-portal/branches/5.2.x/tools/cron.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-25 05:30 alex Note Added: 0004899
2012-07-25 05:30 alex Status resolved => closed
2012-05-17 05:05 alex Note Added: 0004651
2012-05-17 05:01 alex Note Added: 0004650
2012-05-17 05:01 alex Status reviewed and tested => resolved
2012-05-17 05:01 alex Fixed in Version => 5.2.0-RC1
2012-05-17 05:01 alex Resolution open => fixed
2012-05-17 05:01 alex Assigned To !COMMUNITY => alex
2012-05-17 05:01 alex Changeset attached 5.2.x r15344
2012-05-17 05:01 alex Note Added: 0004649
2012-05-17 05:01 alex Status needs testing => reviewed and tested
2012-05-17 05:01 alex Assigned To => !COMMUNITY
2012-05-17 05:01 alex Developer => alex
2012-05-17 05:01 alex Status active => needs testing
2012-05-17 05:00 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/qtuydmyarlU/discussion
2012-05-17 04:59 alex Relationship added related to 0001005
2012-05-17 04:59 alex Relationship added related to 0000849
2012-05-17 04:59 alex New Issue
2012-05-17 04:59 alex File Added: wrong_links_build_from_cron.patch
2012-05-17 04:59 alex Change Log Message => Fixes cron broken link problem
2012-05-17 04:59 alex Estimate Points => 1



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker