[TYPO3-english] "Manually" insert in tt_content table

Tonyo tonyo.mail at gmail.com
Fri Mar 25 17:18:54 CET 2011


Hi list,
Thanks for your answers.

I tried a very simple thing to test what I learnt, i.e insert a basic
content in a page (uid : 19) with the following code :

 require_once(t3lib_extMgm::extPath('templavoila').'class.tx_templavoila_api.php');
  $templavoilaApiObj = t3lib_div::makeInstance('tx_templavoila_api');
  $templavoilaApiObj->debug = TRUE;
   $destinationPointer = array(
                      'table' => 'pages',
                      'uid' => '19',
                      'sheet' => 'sDEF',
                      'sLang' => 'lDEF',
                      'field' => 'field_content',
                      'vLang' => 'vDEF',
                      'position' => '0',
                      );
   echo
'<pre>'.print_r($templavoilaApiObj->flexform_getValidPointer($destinationPointer),true).'</pre>';
       $elementRow = array('CType' => 'text',
       'title' => 'Test Element',
       'bodytext' => 'Lorem Ipsum and so on');

   $uid = $templavoilaApiObj->insertElement($destinationPointer,
$elementRow);
 if ($uid == FALSE) echo 'Error<hr />';   else echo 'ID : '.$uid.'<hr />';


Nothing is inserted. I don't understand what's wrong...
For further information, I'm on a french typo 4.5

Any clue ?

Thanks in advance !


More information about the TYPO3-english mailing list