[TYPO3-english] RealUrl linking across domains problem with tt_news
Tymoteusz Motylewski
t.motylewski at gmail.com
Tue Nov 16 12:16:00 CET 2010
Hello
I have problem with configuring RealUrl properly to render friendly
urls for tt_news records across domains. The description below is
quite long, but I wanted it to contain all important information
I have multiple trees, each having it's own domain
page 1 id=40 (domain1.com )
- post id 22 (single view of tt_news)
- another-subpage
page2 id=48 (domain2.com)
- post id 15 (single view of tt_news)
- another-subpage
On each root-tree page (page1, page2) I have a content element which
shows the latest tt_news posts form different categories.
Typoscript configurations looks like this:
temp.news.shortLatest {
code >
code = LATEST
latestLimit = 6
templateFile = fileadmin/template/newsShortLatest.html
displaySubCategories = 1
latestWithCatSelector=1
singlePid = 4
categorySelection = 6
categoryMode=1
archive =0
excludeAlreadyDisplayedNews=0
}
temp.news.allNews = COA
temp.news.allNews {
20 < temp.news.shortLatest
20 {
singlePid = 22
categorySelection = 3
}
30 < lib.news.shortLatest
30 {
singlePid = 15
categorySelection = 5
}
}
So every links in temp.news.allNews.20 are pointing to domain1, and
links in temp.news.allNews.30 are pointing to domain2.
The problem is, that the links which are pointing to another domain
are not nice.
For example, if I'm on the page1 (domain1)
the links looks like this:
http://www.domain1.com/post/post-title (it's correct)
http://www.domain2.com/index.php?id=15&tx_ttnews[tt_news]=345&cHash=8c09d538236c3d00dc5b41db2f3d453a
the domain name for the link to domain2 is correct, but the rest of
the address isn't transformed by RealUrl.
My typoscript setup looks like this:
config.tx_realurl_enable = 1
config.typolinkEnableLinksAcrossDomains = 1
The config.baseURL is set properly for every domain. Template record
in root page in every tree has "Rootlevel:" checked. In the page
properties the option "Is root of website:" is not checked.
My realurl config:
$tx_realurl_config = array(
'init' => array(
'enableCHashCache' => true,
'appendMissingSlash' => 'ifNotFile,redirect[301]',
'enableUrlDecodeCache' => true,
'enableUrlEncodeHash' => true,
'emptyUrlReturnValue' => true,
),
[...]
'fixedPostVars' => array(
'post' => array(
array(
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array(
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
), ), ), ),
'postVarSets' => array(
'_DEFAULT' => array(
'article' => array(
array(
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array(
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
), ), ), ),
[...]
$tx_realurl_config_domain1 = $tx_realurl_config;
$tx_realurl_config_domain2 = $tx_realurl_config;
$tx_realurl_config_domain1['pagePath']['rootpage_id'] =40;
$tx_realurl_config_domain1['fixedPostVars']['22'] = 'post';
$tx_realurl_config_domain2['pagePath']['rootpage_id'] =48;
$tx_realurl_config_domain2['fixedPostVars']['15'] = 'post';
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
'domain1.com' => $tx_realurl_config_domain1,
'domain2.com' => $tx_realurl_config_domain2,
'_DEFAULT' => $tx_realurl_config
);
When I select "Is root of website:" in every tree-root page
properties, all links are transformed by realurl, but they are not
correct. They become
http://www.domain2.com/post/article/post-title - so the RealUrl is
using PostVar configuration instead of fixedPostVar configuration.
I use RealUrl 1.10.0 and TYPO3 4.4.4
Has anybody any clue, what is missing in my configuration?
Thanks for any hints.
Kind regards
Tymoteusz Motylewski
More information about the TYPO3-english
mailing list