In-Portal Issue Tracker - In-Portal CMS
|
Viewing Issue Advanced Details |
|
ID:
|
Category:
|
Type:
|
Reproducibility:
|
Date Submitted:
|
Last Update:
|
1289 |
[In-Portal CMS] Front End |
bug report |
always |
2012-05-17 04:59 |
2012-07-25 05:30 |
|
Reporter:
|
alex |
Platform:
|
|
|
Assigned To:
|
alex |
OS:
|
|
|
Priority:
|
normal |
OS Version:
|
|
|
Status:
|
closed |
Product Version:
|
5.1.0 |
|
Product Build:
|
|
Resolution:
|
fixed |
|
|
ETA:
|
none |
Fixed in Version:
|
5.2.0-RC1 |
|
Reference:
|
https://groups.google.com/d/topic/in-portal-bugs/qtuydmyarlU/discussion |
Change Log Message:
|
Fixes cron broken link problem |
Estimate Points:
|
1 |
|
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:
|
|
Relationships | related to | 0000849 | closed (5.1.1) | alex | Link, created from cron always use "localhost" instead of site url | related to | 0001005 | closed (5.2.0) | alex | Incorrectly Detected BASE_PATH in Cron |
|
Attached Files:
|
wrong_links_build_from_cron.patch (468) 2012-05-17 04:59 http://tracker.in-portal.org/file_download.php?file_id=1663&type=bug |
|
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 |
Notes |
|
(0004649)
|
alex
|
2012-05-17 05:01
|
|
Will test all together later. |
|
|
(0004650)
|
alex
|
2012-05-17 05:01
|
|
Fix committed to 5.2.x branch. Commit Message:
Fixes 0001289: Incorrect link are build from cron |
|
|
(0004651)
|
alex
|
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. |
|
|
(0004899)
|
alex
|
2012-07-25 05:30
|
|
Since 5.2.0/1.2.0 versions was released. |
|