[TYPO3-dev] Difference in sorting of content elements in Backend and Frontend
Philipp Wrann
philippwrann at gmail.com
Mon Mar 9 16:53:56 CET 2015
Hey,
out customer reported problems with the ordering typo3 generates for contents, i tracked down the problem a little and it seems the approaches typo3 uses to display content elements in frontend and backend are not compatible regarding the ordering...
The query generated in frontend:
SELECT * FROM tt_content
WHERE
tt_content.pid IN (2323)
AND colpos=0
AND (sys_language_uid IN (0,-1) OR (l18n_parent = 0 AND sys_language_uid = 1))
AND tt_content.deleted=0
AND tt_content.t3ver_state<=0
AND tt_content.pid<>-1
AND tt_content.hidden=0
AND tt_content.starttime<=1425914760
AND (tt_content.endtime=0 OR tt_content.endtime>1425914760)
AND (tt_content.fe_group='' OR tt_content.fe_group IS NULL OR tt_content.fe_group='0' OR FIND_IN_SET('0',tt_content.fe_group) OR FIND_IN_SET('-1',tt_content.fe_group))
ORDER BY sorting
The query genrated in backend:
SELECT * FROM tt_content
WHERE pid=2323
AND tt_content.deleted=0
AND (tt_content.t3ver_state <= 0 OR tt_content.t3ver_wsid = 0)
AND colPos IN (1,0,2)
AND sys_language_uid IN (1,-1)
ORDER BY sorting
LIMIT 1001
Is there some configuration i can set to force the same ordering as in the backend?
My content object setup:
tmp.contentNew = COA
tmp.contentNew {
10 = LOAD_REGISTER
20 = CONTENT
20 {
table = tt_content
select {
orderBy = sorting
languageField = sys_language_uid
includeRecordsWithoutDefaultTranslation = 1
}
}
30 = RESTORE_REGISTER
}
###
content < tmp.contentNew
content.10 {
maxImageWidth = 630c
maxImageWidthInText = 300c
maxImageHeightInText = 180c
defaultHeaderType = 2
totalWidth = 630
}
content.20.select.where = colpos=0
More information about the TYPO3-dev
mailing list