Hey everybody,

I'm trying to manually insert a record into the sys_template table of my TYPO3 
DB, using PHP. So, I have a few variables:

$template_id = <the next usable UID in the table>
$site_root = <the ID of the page containing the template>
$typoscript_constants = <2 lines of TS code>
$typoscript_config = <TS code, 3200 characters long>

... and then I slap that into the massive insert statement like this:

 $create_template_query = "INSERT INTO  sys_template ( uid, pid, t3ver_oid, 
t3ver_id, t3ver_wsid, t3ver_label, t3ver_state, t3ver_stage, 
t3ver_count,t3ver_tstamp, t3_origuid, tstamp, sorting, crdate, cruser_id, 
title, sitetitle, hidden, starttime, endtime, root, clear, include_static, 
include_static_file, constants, config, editorcfg, resources, nextLevel, 
description, basedOn, deleted, 
includeStaticAfterBasedOn,static_file_mode,tx_impexp_origuid) VALUES ( 
'$template_id', '$site_root_id', 0, 0, 0, '', 0, 0, 0, 0, 0, 1266097202, 256, 
1265252387, 1, '$template', '', 0, 0, 0, 1, 3, '77,57,43', 
'EXT:css_styled_content/static/', '$typoscript_constants', 
'$typoscript_config', NULL, NULL, '', NULL, '', 0, 0, 0, 0);";

However, the result is a failure. In particular, I've isolated the problem to 
be caused when trying to insert the contents of the $typoscript_config 
variable. 

When I checked the structure of the sys_template table, it says the "config" 
field is a text field, meaning it can support 64k characters. As mentioned, I'm 
well under that ... what else could be the problem?


This may sound like a MySQL question, but all my research seems to conclude 
there is no reason for MySQL to be the problem.


Any input is as always appreciated - thanks!
-Scott.



      __________________________________________________________________
Make your browsing faster, safer, and easier with the new Internet Explorer® 8. 
Optimized for Yahoo! Get it Now for Free! at 
http://downloads.yahoo.com/ca/internetexplorer/
_______________________________________________
TYPO3-english mailing list
[email protected]
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to