koninklijke-collective / my_redirects

TYPO3 Extension: Redirects management
https://typo3.org/extensions/repository/view/my_redirects
GNU General Public License v2.0
17 stars 20 forks source link

Using records as target does not work #84

Open fnagel opened 5 years ago

fnagel commented 5 years ago

I'm using TYPO3 8.7.27 with EXT:my_redirects 4.1.1

When using a link to a EXT:news record the redirect does not work but displays a 404. Message of the "Health" tab is: Response timeout

Redirect "Target" links looks like this: t3://record?identifier=tx_news&uid=123

My config looks like this and works perfectly fine for all other cases (RTE, header links, ...):

TypoScript:

config.recordLinks {
    tx_news {
        typolink {
            parameter = 123
            additionalParams.data = field:uid
            additionalParams.wrap = &tx_news_pi1[news]=|
            useCacheHash = 1
        }
    }
}

TsConfig:

TCEMAIN.linkHandler.tx_news {
    handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler
    label = News
    configuration {
        table = tx_news_domain_model_news
        storagePid = 456
    }
}

Any why this does not work?

fnagel commented 5 years ago

Fixed the issues. Problem was that ConfigurationUtility::getDefaultRootPageId($link) was not able to retrieve a proper rootpage as I did not set defaultRootPageId for this extension nor a $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']['pagePath']['rootpage_id'].

Now using a defaultRootPageId configuration, but I don't see how this will work when one of our other rootpages / domains is called with a news record. I think this will need some improvements.

Anyway, I run into another issues. It seems it's not possible to use something like this t3://record?identifier=tx_news&uid=123&L=1 in order to link to another language. Any idea how to solve this?