[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TYPO3-dev] Bug in CONTENT rendering?



Hi list,

I would like to point your attention to a bug in rendering CONTENT 
objects described by Stefan Froemken (issue  11238). Stefan posted a 
solution for this bug too.
In essence, records which are querried more than once seems not to be 
displayed. I think this is a major bug as it fundamentally compromises a 
typoscript cObject.

My Scenario.
I tried to construct a hierachical list out of a database table like 
this one:

uid | cat1 | cat2
1 | A | a
2 | A | a
3 | A | b
4 | A | b
5 | B | c
6 |  B | c
7 |  B | c
8 |  B | d
9 |  C | e
10 | C | e

Result should look like this list:

A
    a
        1. record
        2. record
    b.
        3. record
        4. record

B
    c
       5. record
       6. record
       7. record
    d
       8. record

C
    e
       9. record
       10. record

Basically my ts looked like this one (obviously the same joined table is 
queried several times - not very nice perhaps, but it should work I think):

lib.my_example = CONTENT
lib.my_example {
  table = tx_table1
  select.join = tx_table2 ON tx_table1.uid = tx_table2.fid
  select.pidInList = 123
  select.orderBy = cat1
  select.groupBy = cat1
  renderObj = COA
  renderObj.10 = TEXT
  renderObj.10.dataWrap = <div class="heading_level_1">{field: cat1}</div>
  renderObj.20 < lib.my_example
  renderObj.20 {
    select.andWhere.dataWrap = tx_table1.cat1= "{field: cat1}"
    select.orderBy = cat2
    select.groupBy = cat2
    renderObj.10.dataWrap = <div class="heading_level_2">{field: cat2}</div>
    renderObj.20 < lib.my_example
    renderObj.20 {
      select.andWhere.dataWrap = tx_table1.cat2= "{field:cat2}"
      select.orderBy = content
      select.groupBy >
      renderObj.10.dataWrap = <div 
class=record_content">{field:content}</div>
      renderObj.20 >
    }
  }
}

This did not work at all with the regular CONTENT object. The list was 
only partially generated. The new CONTENT rendering by Stefan did the 
job very well.

Best regards,
Armin
_______________________________________________
TYPO3-dev mailing list
[email protected]
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev