Project

General

Profile

Actions

Bug #93609

open

Wrong URL generated by router returned by sitefinder in scheduler task

Added by Aimeos no-lastname-given over 3 years ago. Updated over 1 year ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2021-02-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
scheduler, router, multi site
Complexity:
Is Regression:
Sprint Focus:

Description

Given the following page tree:

site1 (site configuration "site1" with domain test.com)
- page1
- page2

site2 (site configuration "site2" with domain example.org)
- page3
- page4

When retrieving the router for page4 in a scheduler task and generating an URL for page3, the site router returns an URL for page1 when using this code:

$siteFinder = GeneralUtility::makeInstance( SiteFinder::class );
$router = $$siteFinder->getSiteByPageId( <ID page4> )->getRouter();
$url = $router->generateUri( <ID page3> );

Result: https://test.com/page1
Expected: https://example.org/page3

Actions

Also available in: Atom PDF