[TYPO3-ttnews] tt_news and mssql problem

Christiana christiana.volkmar at creative-sites.de
Fri May 30 09:44:36 CEST 2008


Hi!

I have successfully installed typo3 version 4.1.6 with mssql database and 
everything works fine.

But tt_news doesn't work in frontend. In backend there are no problems. When 
I choose list or lates view the message "no itmes found" appears in 
frontend. The configuration/ setup is correct.

Because of using dbal for working with mysql, querys are convertet.

The select query for list items in this case looks like

SELECT COUNT("DISTINCT(tt_news.uid)") FROM "tt_news" WHERE "tt_news"."pid" 
IN (55) AND 1 = 1 AND "tt_news"."sys_language_uid" IN (0,-1) AND 
("tt_news"."archivedate" = 0 OR "tt_news"."archivedate" > 1212070120) AND 
"tt_news"."deleted" = 0 AND "tt_news"."t3ver_state" != 1 AND 
"tt_news"."hidden" = 0 AND ("tt_news"."starttime" <= 1212070120) AND 
("tt_news"."endtime" = 0 OR "tt_news"."endtime" > 1212070120) AND 
("tt_news"."fe_group" = '' OR "tt_news"."fe_group" IS NULL OR 
"tt_news"."fe_group" = '0' OR ("tt_news"."fe_group" LIKE '%,0,%' OR 
"tt_news"."fe_group" LIKE '0,%' OR "tt_news"."fe_group" LIKE '%,0' OR 
"tt_news"."fe_group" = '0') OR ("tt_news"."fe_group" LIKE '%,-1,%' OR 
"tt_news"."fe_group" LIKE '-1,%' OR "tt_news"."fe_group" LIKE '%,-1' OR 
"tt_news"."fe_group" = '-1'))

I was looking for the mistake successfully. The problem is a query in line 
803 in file "class.tx_ttnews.php".

 $selectConf['selectFields'] = 'COUNT(DISTINCT(tt_news.uid))';

Because of using a field for the "count",  quotation marks are created in 
select query.

This part of the query

COUNT("DISTINCT(tt_news.uid)")

causes that the query does not return a result. (I tested the query in sql 
server management.)

If I remove the quotation marks that the part of the query looks like

COUNT(DISTINCT(tt_news.uid))

the query is successfull an returns the right result.

Does anybody has a patch or another solution to fix the bug and make tt_news 
work with mssql?

I'm lookong forward to hear from you!

Greetings,
Christiana








More information about the TYPO3-project-tt-news mailing list