[TYPO3-project-formidable] Problem with using <compiledatasource> inside LISTER

Paweł Bandura gawelx at gmail.com
Fri Jun 8 19:04:22 CEST 2007


Hi

I'm trying to list some data from several tables (using the 
"compiledatasource/view" structure) and it even works, everything is 
displayed as I want it to be displayed :]
The problem is that whit this list I always get those 4 warning messages:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL 
result resource in 
D:\TYPO3_4.1.1\htdocs\Konsultacje\t3lib\class.t3lib_db.php on line 987

Warning: array_merge() [function.array-merge]: Argument #1 is not an 
array in 
D:\TYPO3_4.1.1\htdocs\Konsultacje\typo3conf\ext\ameos_formidable\api\base\dh_lister\api\class.tx_dhlister.php 
on line 604

Warning: reset() [function.reset]: Passed variable is not an array or 
object in 
D:\TYPO3_4.1.1\htdocs\Konsultacje\typo3conf\ext\ameos_formidable\api\class.tx_ameosformidable.php 
on line 2943

Warning: Variable passed to each() is not an array or object in 
D:\TYPO3_4.1.1\htdocs\Konsultacje\typo3conf\ext\ameos_formidable\api\class.tx_ameosformidable.php 
on line 2944

And I don't know why..
I thought that the sql query might be a problem and I tried it whith 
simple "SELECT * FROM table.." query, but the messages didn't disapear.
I'm trying to resolve this problem from couple of hours and I'm running 
out of ideas :]
Could anyone more expirienced then I help me, please? ;]

This is my XML file:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<formidable version="0.7.0">

   <meta>
     <name>Konsultacje pracowników</name>
     <form formid="lista_konsultacje" />
     <displaylabels>true</displaylabels>
     <debug>false</debug>
   </meta>

   <control>

     <datahandler:LISTER>

       <tablename>user_kons_kons</tablename>
       <keyname>uid</keyname>
       <labelname>nazwisko</labelname>

       <compiledatasource>
         <view>
           <select><![CDATA[
SELECT
   prac.uid AS uid,
   IFNULL(
     tyt.tytul,
     '') AS tytul,
   prac.imie AS imie,
   prac.nazwisko AS nazwisko,
   prac.uwagi_prac AS puwagi,
   IFNULL(
     jedn.skrot_nazwy,
     '') AS jednostka,
   IFNULL(
     term.data_term,
     'brak') AS data_term,
   IFNULL(
     CONCAT(term.term_od_godz, ' - ', term.term_do_godz),
     '') AS godziny,
   IFNULL(
     CONCAT(term.miejscowosc, ', ', term.adres, ', sala ', term.nr_sali),
     '&nbsp;') AS adres,
   IFNULL(
     term.uwagi_term,
     '') AS tuwagi
FROM
   user_kons_prac prac
   LEFT JOIN user_kons_tyt tyt ON ( prac.tytul = tyt.uid )
   LEFT JOIN user_kons_jedn jedn ON ( prac.jednostka = jedn.uid )
   LEFT JOIN user_kons_term term ON ( prac.uid = term.uid_prac )
WHERE
   term.data_term IS NULL
   OR term.data_term = (
     SELECT
       MIN( data_term )
     FROM
       user_kons_term
     WHERE uid_prac = prac.uid )
ORDER BY
   nazwisko ASC,
   imie ASC,
   tytul ASC;
           ]]></select>
         </view>
       </compiledatasource>

       <template>
         <path>EXT:user_kons/pi6/tmpl/lista_konsultacje.html</path>
         <subpart>###LIST###</subpart>
       </template>

       <pager>
         <rows>
           <perpage>30</perpage>
           <alternate>###ROW1###,###ROW2###</alternate>
           <active>##ROWACT###</active>
         </rows>
         <template>
           <path>EXT:user_kons/pi6/tmpl/lista_konsultacje.html</path>
           <subpart>###LIST_PAGER###</subpart>
         </template>
       </pager>

     </datahandler:LISTER>
     <renderer:STANDARD />

   </control>

   <elements>

     <renderlet:HIDDEN name="uid" />
     <renderlet:TEXT name="tytul" label="Tytul" />
     <renderlet:TEXT name="imie" label="Imie" />
     <renderlet:TEXT name="nazwisko" label="Nazwisko" />
     <renderlet:TEXT name="jednostka" label="Jednostka" />
     <renderlet:DATE name="data_term" label="Data">
       <datetime format="%A%n%d-%m%Y" />
     </renderlet:DATE>
     <renderlet:TEXT name="godziny" label="Godziny" />
     <renderlet:TEXT name="adres" label="Adres" />
     <renderlet:TEXTAREA name="tuwagi" label="Uwagi - termin" />
     <renderlet:TEXTAREA name="puwagi" label="Uwagi - pracownik" />

   </elements>

</formidable>


More information about the TYPO3-project-formidable mailing list