Extension talk:TableEdit

More Styling Information
Is there more styling information you can include? Like adding attributes to the other cells besides the header, add a border around the whole table? Or refer to a style class?

Cant Add Column\Version number not incremented
Using MW 1.9.2 originally installed v0.5. The table editor does not display the option to edit the column headings or add columns. What can cause the table editor to not allow column additions? Tried upgrading to 0.6 by copying new files into extensions/TableEdit. Is this the correct upgrade procedure?

Also notice that the version number was not incremented from 0.5 to 0.6 in version 0.6. Respectfully, --Wheresmytab 18:21, 25 July 2007 (UTC)

I am not getting the option to add/edit columns either... any idea how I would go about fixing this...? --NicholasBorge 17:32, 1 August 2007 (UTC)

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

Installation Instructions --Dtsig 14:32, 18 July 2007 (UTC)

 * I notice a couple of 0.5 references including a link to the old code. I am testing this new version out and wonder if you want me to correct those 'typos' when i run into them?
 * Tried to get the sql from your link on ecoli but got a mac osX error
 * we're in the middle of a server migration. But the sql is in the distribution too.

Problems with MW 1.11a
I installed 1.11alpha from SVN, keeping my current set of extensions. Everything worked fine until I attempted to access Special:Specialpages - it crashed with an internal error. Commenting out extensions one at a time led to TableEdit (0.6) causing the problem. I'm not a programmer, so I don't know how to check for the conflict, and MediaWiki refused to show details of the error (even with $wgShowExceptionDetails = true set in LocalSettings.php as instructed by the error message) Rockerbaby 22:52, 19 July 2007 (UTC)
 * I haven't tried 1.11alpha yet. If you get a chance, reproduce the crash and then look in the httpd error logs. -- JimHu 17:35, 29 July 2007 (UTC)

Does anyone provide any help for anything here???
Not trying to be rude, but it's been a few days with some changes made still I can't get anyone to address my issue. I've followed the installation instructions to the best of my ability, which I think is pretty decent. I've downloaded and installed the file. I changed all the database references to reflect the name of the database I created. I've added the "require" tag. It's not working.

My email address is jwreamer@indy.rr.com for anyone who can provide any sort of help on this extension. I'm switching over to MediaWiki to deliver some content, and I'd like to get this extension up and running before I start converting information.

Thanks.

Apologies for lack of responses
I have this talk page on my watchlist, but for some reason I'm not getting the emails. I'll try to look into the problems reported since the last time I responded. I also try to respond to things on mediawiki-l -- JimHu 16:14, 29 July 2007 (UTC)

New TableEdit feature/enhancement --Dtsig 14:39, 6 August 2007 (UTC)
There should be a way to wrap it and have it create a table definition 2) If a user messes with the data or worse screws with the tag then we are really hosed For those who don't need the data in a DB for other use, wouldn't it be possible for the routine to parse out a generic table and process just as if it came from the db? I think this would be a great enhancement.  So a simple tage on the page would have the parser put the appropriate 'link' before each table.  I get that this wasn't the original purpose but would make MediaWiki much stronger.

HTTP 500 - Internal server error on using in MW 1.10
I tried to install TableEdit extension yesterday and did everything like it was said. My new database wikibox_db exists and includes the tableinformation from the skript. I also added check around line 253 in SpecialTableEdit.body.php. When I put  in one of my articles the tags are just displayed in preview and on saving the article I get "The page cannot be displayed - HTTP 500" What did I do wrong? How can I debugg the extension best or how can I get a more specific error message?" Thanks --Luna2504 06:55, 7 September 2007 (UTC)
 * Just after posting I found out that I had made a mistake with my DBuser- now everything works fine.

Missing argument error and several can't modify header errors -- Zebee Johnstone 06:29, 25 September 2007 (UTC)
Just upgraded from a pretty old version of mediaWiki (1.03) to the latest (1.11). Downlaoded the latest TableEdit (0.75) and followed the instructions, using the defaults everywhere. I also added the wrapper in SpecialTableEdit.body.php

Now when I attempt to save a page, any page, having done nothing with tables at all I get: Warning: Missing argument 8 for wfNewEditTable in /var/www/html/wiki/extensions/TableEdit/TableEdit.php on line 26 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wiki/extensions/TableEdit/TableEdit.php:26) in /var/www/html/wiki/includes/OutputPage.php on line 318 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wiki/extensions/TableEdit/TableEdit.php:26) in /var/www/html/wiki/includes/OutputPage.php on line 346 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wiki/extensions/TableEdit/TableEdit.php:26) in /var/www/html/wiki/includes/OutputPage.php on line 347 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wiki/extensions/TableEdit/TableEdit.php:26) in /var/www/html/wiki/includes/OutputPage.php on line 398

If I comment out the TableEdit lines in LocalSettings.php then I can save the page that refused to save. I'm PHP-clueless so have no idea where to start looking.
 * 1) for TableEdit extension
 * 2) require_once("$IP/extensions/TableEdit/TableEdit.php");
 * 3) $wgTableEditDatabase = 'wikibox_db' ;
 * Haven't tried 1.11 yet. I'm wondering if something changed in the hook parameters.  Try deleting &$flags from the arguments on line 26.  The other Warnings are due to sending errors to the browser instead of to a log. None of these should prevent saving though.  Did you adjust the permissions on wikibox_db?

Can't insert row in the middle neither
Hello it seems that I can't install neither a row in the middle of a table, is this correct? Oub 10:38, 7 November 2007 (UTC):
 * that's true in current versions. Note that the tables should be sortable, however.  --JimHu 19:01, 14 November 2007
 * Re: JimHuthanks, but how can I sort, I mean I do not see any bottom for that functionality. Oub 09:20, 15 November 2007 (UTC):

Watchlist not working for me
Apologies for not noting changes on these pages - for some reason the watchlist emails are not reaching me --JimHu 19:01, 14 November 2007 (UTC)

Question about advanced templates
I have installed TableEdit successfully and have been enjoying the product to create our tables throughout our Wiki's. We're now interested in going further with the table and are trying to set up the advanced features - the drop down lists, etc, that is outlined in the documentation.

Our company has attempted to get these advanced tables to work, but nothing has been successful. The script example given in the documentation is:

Qualifier||qualifier|select| |NOT GO ID||go_id|text GO term name||go_term|lookupcalc|SELECT page_title from go_archive.term WHERE go_id = '' ORDER BY term_update DESC LIMIT 1|page_title|split|_!_|1Reference(s)||refs Evidence Code||evidence|select|IC: Inferred by Curator|IDA: Inferred from Direct Assay|NR: Not Recorded [...]

My question is, how or where, or at what point, do you insert these script commands? Are they in the portal itself, such as:

[script commands]

Or, do you create the table, using the tag, then once you're in the table, somehow insert these script commands?

We have tried numerous different scenarios, different syntaxes, etc, but have come up with nothing. Going from the documentation, it seems to be related to the tag, but again, we don't know how or where to use these tags, if at all, to accomplish what we want.

If anyone has been able to get these advanced tables to work, please respond to this and let us know how you did it.

Thank you!