[TYPO3-english] cooluri and tx_news - wrong url for non-localized records
Dirk Wenzel
wenzel at webfox03.de
Tue Apr 16 12:05:13 CEST 2013
Hi,
Cooluri produces wrong urls for some tx_news records when they aren't
localized. For instance:
[..]/en/credentials/projects/detail/'70'/
This url results in an 'page not found' error.
When I perform the DB query manually the result is as expected for both
languages. It returns the news title in default language (german) for
non-translated news:
SELECT title
FROM tx_news_domain_model_news
WHERE (uid='70' OR l10n_parent='70')
AND sys_language_uid='0'
SELECT title
FROM tx_news_domain_model_news
WHERE (uid='70' OR l10n_parent='70')
AND sys_language_uid='2'
Any Hints?
CoolUriConf.xml:
[...]
<uriparts>
<part>
<parameter>tx_news_pi1[news]</parameter>
<lookindb>
<to>SELECT title FROM tx_news_domain_model_news WHERE deleted='0'
AND hidden='0' AND (uid=$1 OR l10n_parent=$1) AND
sys_language_uid={L=0}</to>
<t3conv>1</t3conv>
</lookindb>
</part>
<part>
<parameter>tx_news_pi1[@widget_0][currentPage]</parameter>
<t3conv>1</t3conv>
</part>
</uriparts>
<predefinedparts>
<part>
<parameter>tx_news_pi1[controller]</parameter>
</part>
<part>
<parameter>tx_news_pi1[action]</parameter>
</part>
<part>
<parameter>cHash</parameter>
<lookindb>
<to>SELECT
CONCAT(tt1.title,IF(tt2.number>1,CONCAT('-',tt2.number),'')) FROM
tx_news_domain_model_news as tt1, (SELECT COUNT(*) AS number FROM
tx_news_domain_model_news WHERE title=(SELECT title FROM
tx_news_domain_model_news WHERE uid=$1)) AS tt2 WHERE tt1.uid=$1</to>
</lookindb>
</part>
<part>
<parameter>no_cache</parameter>
</part>
</predefinedparts>
<valuemaps>
<valuemap>
<parameter>L</parameter>
<!-- L is empty of 0, result is empty -->
<value key="">0</value>
<!-- L is 2, result is "en" -->
<value key="en">2</value>
<!-- L is 3, result is empty -->
<value key="">3</value>
</valuemap>
</valuemaps>
Kind regards
Dirk
More information about the TYPO3-english
mailing list