![]() |
![]() |
30 Jun 2009
Posts: 35
I fix it running http://domain/setup but when try create tabledata again appear same error, why?
thx!
It's probably an error in the setup files for one of the plugins not correctly assigning a keyfield.
1 Jul 2009
Posts: 35
SELECT empresasid AS id, name, city AS display, '0' AS parent, '0' AS rollover FROM `` WHERE 1 Incorrect table name ''array(5) { [0]=> array(6) { ["file"]=> string(88) "/home/.atomic/dev_collad/dev.collad.com/jojocms/plugins/jojo_core/classes/Jojo/Table.php" ["line"]=> int(499) ["function"]=> string(11) "selectQuery" ["class"]=> string(4) "Jojo" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &string(119) "SELECT empresasid AS id, name, city AS display, '0' AS parent, '0' AS rollover FROM {} WHERE 1 " } } [1]=> array(7) { ["file"]=> string(80) "/home/.atomic/dev_collad/dev.collad.com/jojocms/plugins/jojo_core/admin_edit.php" ["line"]=> int(193) ["function"]=> string(10) "createlist" ["class"]=> string(10) "Jojo_Table" ["type"]=> string(2) "->" ["object"]=> object(Jojo_Table)
can you post the first section of the autoupdate file for the empresas table, the bit where it defines the tabledata (like this one for the articles table):
$default_td['article'] = array(
'td_name' => "article",
'td_primarykey' => "articleid",
'td_displayfield' => "ar_title",
'td_categorytable' => "articlecategory",
'td_categoryfield' => "ar_category",
'td_rolloverfield' => "ar_date",
'td_filter' => "yes",
'td_orderbyfields' => "ar_date DESC, articleid DESC",
'td_topsubmit' => "yes",
'td_deleteoption' => "yes",
'td_menutype' => "ajaxtree",
'td_help' => "News Articles are managed from here. ",
'td_golivefield' => "ar_livedate",
'td_expiryfield' => "ar_expirydate",
);
i suspect the
'td_name' => "empresas",
line is set incorrectly
If you haven't used an autoupdate file, you can fix it directly in configuration > edit tabledata
1 Jul 2009
Posts: 35
only i can see autoupdate check on legacy options when i try create a new tabledata, but its Yes on default.
It should have an 'install' folder in the plugin with (usually) at least two files - one called 'install_[pluginname].php' which creates the database table(s)
and one called 'autoupdate_[pluginname].inc.php' which tells Jojo how to display and handle the fields in the admin area.
If you don't have an autoupdate file, Jojo just guesses which fields are for what - often it does surprisingly well, but not always - and you'll need to edit Configuration> Edit Tabledata and Edit FieldData to tell Jojo what field types correspond to each field in the database.
Have a look at an existing plugin like gallery3 or articles, and how their install/autoupdate files relate to what's in the database and in Tabledata and FieldData, to see what I mean.
2 Jul 2009
Posts: 35
ok thx i looking arount gallery3 and articles plugin to learn plugin engine.
but .. to do it manually:
You'll need to run setup for Jojo to find that a new table has been added to the database
then set it up in tabledata and fielddata and make an admin/edit/tablename page that calls the Admin Edit plugin.
in edit tabledata, Jojo assumes that the primary key field is [tablename]id. If it's different, you need to tell it what the primary key field is. It may not look pretty, but that's all you should need to get it working.
Back to Forum Index : Back to Administration (backend and configuration) |
![]() |