Extension talk:TableEdit

Downloading issues
Hi,

I downloaded this extension and unzipped (untarred, I guess) it using winrar. The file created was tableEdit.0.5, and that's it. What am I supposed to do from this point?

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)
 * You could make this a global variable by declaring it in TableEdit.php (right after hooks registered?) then allow an override in LocalSettings.php after the "require_once($IP/extensions/TableEdit/TableEdit.php)" statement.

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?)
 * To give flexibility for other configurations (not necessarily /wiki...) First two lines should be:

global $wgScriptPath; $figspath = "$wgScriptPath/extensions/TableEdit/docfigs";
 * 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?
 * Thanks for finding these.
 * Hmm...I'm not sure that $uniq-prefix is actually doing anything!
 * Line 64, TableEdit.php $marker = "$uniq_prefix-$element-" . sprintf('%08X', $n++) . '-QINU';
 * $page_name in the insert statement should be changed to $pagename
 * Line 148 should probably changed to

if (isset($wgHooks['EditFilter']) && in_array('wfCheckProtectSection',$wgHooks['EditFilter'])) $replacement = " ".$replacement." ";
 * Is the URL malformed in the Create Table Here link?
 * --23:43, 11 June 2007 (UTC)

Line 147 should be changed to: $replacement = " [$wgScript?title=Special:TableEdit&id=$box_uid&page=$page_uid&pagename=&type=$type ".wfMsgForContent('newTableHere')."] "; HOWEVER, this still doesn't solve my problem, now it just gives the documentation - working this through now. --jdpond 15:22, 12 June 2007 (UTC) $box->page_uid is not being set in SpecialTableEdit.body.php which causes the $title object to not be instantiated. Full URL Now looks like: http://wiki.montcopa.org/TestWiki/index.php?title=Special:TableEdit&id=d3a6b49cf9c217b1f256739e7f6a1fa4.21.1181664727&page=21&pagename=TestPage&type=0

1.10 error getDBKey --Dtsig 20:38, 14 June 2007 (UTC)
Fatal error: Call to a member function getDBkey on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\wiki\extensions\TableEdit\SpecialTableEdit.body.php on line 52

This was working in 1.9

Bulk load from a CVS or XML file
It would be great if you add the capability to read in a CVS or XML file

Having problems installing this extension...
I can't get it to work at all. I've gone through all the instructions, but I'm not really sure how it interacts with the database I created. I see the commands, but I see nothing that calls for the user name or password for the new DB which I created. I'm also not getting any errors.

I also tried the alternative, Property Table, but it isn't working either. I'm adding the 'require' code to my Local Settings page and checked all the file permissions within my hosting package. Is there anything else I need to do to activate extensions?

Any thoughts?

Thanks. Jim.

MySQL creation problems
Hi, I'm having a little difficulty in following the instruction. When I type 'grant SELECT,INSERT' etc, mysql says 'Query OK, 0 rows affected (0.00 sec)' Then, when I type 'source wikibox_db.sql', I get 'ERROR: Failed to open file 'wikibox_db.sql', error: 2'

What am I doing wrong? What can I do to fix this? Thanks. 61.8.101.1