[Typo3] Database update fails upon extension installation
Nick Weisser
typo3 at openstream.ch
Wed Jul 6 00:55:32 CEST 2005
Hi there,
I've created a small frontend plugin that is supposed to display data
from two static db tables.
After creating the basic files with the extension kickstarter I modified
ext_tables.sql and ext_tables_static+adt.sql, as well as ext_tables.php
according to the static_info_tables extension.
When I install the extension everything seems to be o.k. The extension
manager says:
---------------------------------------------------------------------
Add tables
CREATE TABLE tx_openstreamgita_chapters (
uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
pid int(11) unsigned DEFAULT '0' NOT NULL,
title text NOT NULL,
title_english text NOT NULL,
PRIMARY KEY (uid),
UNIQUE uid (uid)
) TYPE=MyISAM;
CREATE TABLE tx_openstreamgita_verses (
uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
pid int(11) unsigned DEFAULT '0' NOT NULL,
chapter int(2) NOT NULL default '0',
verse varchar(8) NOT NULL default '',
text text NOT NULL,
text_english text NOT NULL,
PRIMARY KEY (uid),
UNIQUE uid (uid)
) TYPE=MyISAM;
Import static data
tx_openstreamgita_chapters Rows: 18
tx_openstreamgita_verses Rows: 676
---------------------------------------------------------------------
When I click on the "Make updates" button the extenson is installed, but
nothing is imported into the database.
If anyone could point me in the right direction or would be so kind as
to suggest any debbuging options, I would be very grateful.
Thanks,
Nick
P.S. Here is my ext_tables.php
<?php
if (!defined ("TYPO3_MODE")) die ("Access denied.");
$TCA["tx_openstreamgita_chapters"] = Array (
"ctrl" => Array (
"title" =>
"LLL:EXT:openstream_gita/locallang_db.php:tx_openstreamgita_chapters",
"label" => "uid",
'readOnly' => 1, // This should always be true, as it prevents the
static data from being altered
'adminOnly' => 1,
'rootLevel' => 1,
'is_static' => 1,
"tstamp" => "tstamp",
"crdate" => "crdate",
"cruser_id" => "cruser_id",
"default_sortby" => "ORDER BY uid",
"dynamicConfigFile" => t3lib_extMgm::extPath($_EXTKEY)."tca.php",
"iconfile" =>
t3lib_extMgm::extRelPath($_EXTKEY)."icon_tx_openstreamgita_chapters.gif",
),
// "feInterface" => Array (
// "fe_admin_fieldList" => "chapter",
'interface' => array (
'showRecordFieldList' => 'title, title_english'
)
);
$TCA["tx_openstreamgita_verses"] = Array (
"ctrl" => Array (
"title" =>
"LLL:EXT:openstream_gita/locallang_db.php:tx_openstreamgita_verses",
'readOnly' => 1, // This should always be true, as it prevents the
static data from being altered
'adminOnly' => 1,
'rootLevel' => 1,
'is_static' => 1,
"label" => "uid",
"tstamp" => "tstamp",
"crdate" => "crdate",
"cruser_id" => "cruser_id",
"default_sortby" => "ORDER BY uid",
"enablecolumns" => Array (
"disabled" => "hidden",
),
"dynamicConfigFile" => t3lib_extMgm::extPath($_EXTKEY)."tca.php",
"iconfile" =>
t3lib_extMgm::extRelPath($_EXTKEY)."icon_tx_openstreamgita_verses.gif",
),
// "feInterface" => Array (
// "fe_admin_fieldList" => "hidden, chapter",
'interface' => array (
'showRecordFieldList' => 'chapter, verse, text, text_english'
)
);
t3lib_div::loadTCA("tt_content");
$TCA["tt_content"]["types"]["list"]["subtypes_excludelist"][$_EXTKEY."_pi1"]="layout,select_key";
t3lib_extMgm::addPlugin(Array("LLL:EXT:openstream_gita/locallang_db.php:tt_content.list_type_pi1",
$_EXTKEY."_pi1"),"list_type");
?>
More information about the TYPO3-english
mailing list