Extension talk:TableEdit

The extension looks great, I am looking foward to testing it. --Gundestrup 14:35, 7 April 2007 (UTC)

Rational for off page data
I was just wondering what the rational was for storing data off page. In a case like this it would seem that data entered would not be accessible to the standard wiki search. Is this true? --Dtsig 02:59, 21 April 2007 (UTC)
 * the text gets stored in the wiki as if it was a regular table. There are two reasons for storing it in the external database.  The first has to do with asynchronous data mining of the table content. The idea is that middleware can be written to work on the external db without interfering with the wiki's db or having to go through the MW interfaces.  I'm working on that kind of middleware right now, but it's in Perl, not PHP.  The second is laziness/lack of imagination/coding skill on my part in terms of how to implement it if it was just saved in the wiki.  In hindsight, I probably could have spent more time adapting whatever the parser already does with tables.  -- JimHu 03:15, 21 April 2007 (UTC)
 * Is it possible to simply switch off the external storage? Possibly a variable set so the external db is not required.? --Dtsig 17:22, 24 April 2007 (UTC)
 * not yet. The table loads from the database, not from the wiki page.  That could change in the future, especially with contributions from other coders (hint, hint) JimHu 23:59, 24 April 2007 (UTC)

edit the databasename
Remember to match the database. The database name is hardcoded and must maaatche your database.

find and replace the name database.box and database.row to yourdatabase.box and yourdatabase.row


 * Should this be put in a parameter? Could put this in a parameter and IF null don't even do db bit?  What do you think --Dtsig 17:53, 24 April 2007 (UTC)
 * Sounds like a good idea...not sure how to implement it though. Another global in LocalSettings.php? JimHu 00:00, 25 April 2007 (UTC)
 * That is what I was thinking. Then that global could be used to determine IF using the DB at all.  Default setup would probably be the 'wikibox_db' currently used.  If this param is null then bypass the DB processes.  I will look at the db bits and see about a hack --63.82.135.122 13:03, 25 April 2007 (UTC)
 * I replaced wikibox_db with $wgDBname (in TableEdit and its class). $wgDBname is set in LocalSettings.php. that works fine!--84.190.16.85 17:19, 30 May 2007 (UTC)

Installation Question

 * Created db wikibox_db and ran the scripts against it
 * Unzipped file and put the TableEdit directory into extensions
 * Added copy/paste the 'require once' to localSettings making sure to change to extensions/tableEdit/tabledit.php

When we simply go to the main page we get the following (which gets overwritten by the top of the page):

Warning: call_user_func(tablesetup)[function:call-user-func]: First argument is expected to be valid callback in c:\program files\apache software foundation\Apache2.2 htdocs wikiSanMar includes\setup.php on line 219

Ideas? I have not tried to create a page with the table in it. Just trying to get the error msg to go away. --Dtsig 17:50, 24 April 2007 (UTC)
 * I don't see the string tablesetup anywhere in the current version. I probably tarballed the wrong intermediate.  Look in SpecialTableEdit.php. Make sure that lines 19-20 are

$wgExtensionFunctions[] = 'tableeditsetup'; function tableeditsetup { The function name in the registry has to match the actual name of the function.


 * Nope .. they are

$wgExtensionFunctions[] = 'tableeditsetup'; function specialtableeditsetup {

I will try to simply rename and see if that does it --63.82.135.122 13:07, 25 April 2007 (UTC)


 * Renaming does appear to solve this error --63.82.135.122 13:16, 25 April 2007 (UTC)
 * What did you rename? -JimHu 14:37, 25 April 2007 (UTC)
 * Renamed

this ->> function specialtableeditsetup to this ->> function tableeditsetup
 * It appeared from your response that that would be the correct move .. yes? --Dtsig 22:05, 25 April 2007 (UTC)
 * Yes -JimHu 22:07, 25 April 2007 (UTC)

Install Sql error
Now on save I get this error

Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "". MySQL returned error "1136: Column count doesn't match value count at row 1 (localhost)".

There is a 1 in the uppper left hand corner of the page.

Will try to work this out as I look at the 'global db' hack mentioned above. Ideas are welcomed  --63.82.135.122 13:16, 25 April 2007 (UTC)
 * The schema changed between 0.1 and 0.2. And it's going to change again in 0.3 It's experimental, remember! ;) The schema doc in the tarball should be accurate. - JimHu 14:37, 25 April 2007 (UTC)
 * I tried downloading again from "Download tableEdit0.2.tgz" but get a Mac OS X error. I used and checked my wiki_db against the one found in the link to your ecoliwiki page. In fact it looks like the tgz file i have is actually 0.1  Is it possible to get to your mac page .. thanks --Dtsig 21:18, 26 April 2007 (UTC)
 * I realized that I had changed the link in the summary box but not in the text of the page here. It should give 0.2 now...or you could wait for 0.3, which will require yet another schema change.  I'll upload that soon. -JimHu 21:45, 26 April 2007 (UTC)
 * If you think it will be in the next week or so I will wait .. thanks--Dtsig 21:46, 26 April 2007 (UTC)

SQL-TableEdit Problem?
In TableEdit.php Line 126 $sql = "INSERT INTO wikibox_db.box VALUES (,'$template','$page_name','$page_uid','$box_uid','$type','$headings',,'$prettytable','".time."')"; What is the correct set for "wikibox_db.box" ??
 * Change it to

$sql = "INSERT INTO wikibox_db.box VALUES (null,'$template','$page_name','$page_uid','$box_uid','$type','$headings','','$prettytable','".time."')";
 * -JimHu 13:29, 23 May 2007 (UTC)

0.3 Installation problem --Dtsig] 20:13, 9 May 2007 (UTC)
require_once("extensions/TableEdit/TableEdit.php");  Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
 * Download 0.3 and loaded into extensions directory
 * I have deleted the existing tables previously created and created with new sql script
 * I have added following to local settings
 * In new page i put
 * On save i get

(SQL query hidden)

from within function "". MySQL returned error "1366: Incorrect integer value: '' for column 'box_id' at row 1 (localhost)". This is similar to the last error I had gotten on the 0.2 release. My guess is something is missing. Thanks

Would really like to get this working --Dtsig 19:29, 20 May 2007 (UTC)
Any ideas? Have you had a chance to look at this? You can post to me off line if you would like. Be happy to try just about anything. Have tried on a secondary WIKI but same results Thanks DSig

Problem solved --Dtsig 13:46, 23 May 2007 (UTC)
Just noting here so viewers know that a fix was found .. [| ExtensionPage] defines the solution to this. Simple change of INSERT INTO claues (2) from using '' to using null. Thanks to Jim for the response and fix

Ignores PRE tags --Dtsig 15:54, 11 May 2007 (UTC)
In continued testing trying to work out problems noted above, I simply put PRE tags around the newTableEdit tag. It appears that you do not recognize this and attempt to create table anyway. Is this a problem?

Expected Behavior? --Dtsig 19:29, 20 May 2007 (UTC)
is this expected? How to document in page?
 * uh oh... it's ignoring nowiki too. This needs to get fixed, but I need to think about how to do it.  In the meantime, there are two ways to document.
 * Edit the doc page that displays from the Special Page
 * Use the devious method suggested by Platonides in another context: 

I've now got a fix for the nowiki behavior and it will be in the next release (0.4) - JimHu 22:52, 23 May 2007 (UTC)

Trouble with 1.10 --jdpond 22:32, 11 June 2007 (UTC)
There are a couple of undefined globals:


 * TableEdit.docs.php - needs "global $wgScriptPath;" before referenced (line 2?)
 * TableEdit.php - needs "$uniq_prefix, $page_name" added to end of global def line of function wfNewEditTable

Also receive the following PHP error:

[11-Jun-2007 18:21:05] PHP Notice: Undefined index:  EditFilter in C:\Inetpub\wwwroot\Wiki\TestWiki\extensions\TableEdit\TableEdit.php on line 148 [11-Jun-2007 18:21:05] PHP Warning: in_array [function.in-array]: Wrong datatype for second argument in C:\Inetpub\wwwroot\Wiki\TestWiki\extensions\TableEdit\TableEdit.php on line 148

After fixing these and reinitializing the table (except EditFilter error), still pops into the main page instead of going into table edit when clicking on "Create Table Here" - loss of session?