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)

0.8
The download link (http://trimer.tamu.edu/jh/tableEdit.0.8.tgz) is broken
 * fixed --JimHu 08:04, 23 July 2008 (UTC)

0.5
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 match 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   Does anyone Know how to fix this or hide the "edit table" link when a user is not logged on?

Question about lines showing in the table
This was addressed somewhat (above), but I am seeking more clarification. When I click the "edit table" link, it displays the borders no problem. But when the table is saved/viewed on the portal, no borders are displayed. Is there a way to make the borders visible? Above, it references modifying CSS properties, but I am lost as to where/how to do that. Is that modification made in the portal code itself, after the table is generated? If so, what and where do I insert in the code to make the borders appear (and does it have to be done for each and every table)?

In addition, another comment relates to using the PrettyTable template. On my wiki (MediaWiki), when I edit the page containing the table, it uses the PrettyTable template, but it does not exist on my wiki (IE, when I click on it's link there is no content/page is not created).

Other than this minor visual issue, we love this table product and use it extensively on our intranets.

If anyone could assist us with this, we would appreciate it. Thank you very much!

Examples?
I could only find this page on your wiki where it's used in a template on a page (at the very top) and it's broken. This page has one example (in German, but it's something).

This extension looks very cool, but I can't get my head around it on my first look, and would like to see where it has been used. -- Chriswaterguy 08:35, 11 June 2008 (UTC)

Installation: beware of «update_schema.php»
update_schema.php (from «TableEdit.0.8») is useless, because:
 * Works only under Linux (it use PHP function «getopt», it use some UNIX utilities, …);
 * «ENGINE=MyISAM» and «DEFAULT CHARSET=latin1» are hardcoded in SQL texts.
 * TableEdit_tables.sql contains some syntax errors (L18, L33, …).

Instead of running «update_schema.php», users must critically review TableEdit_tables.sql, fix errors and parameters («ENGINE», «DEFAULT CHARSET») and run it manually. --StasFomin 12:37, 28 July 2008 (UTC)
 * Note added to the installation instructions to note problems with update schema. We let the schema SQL docs and the installer get out of sync, since we're trying to reproduce schema adjustments we made manually, and I screwed up in manually editing the SQL (left out some commas). We're working on a new version of update schema, but it's not there yet (because I made some additional modifications - adding a timestamp to the metadata). We can try to make it more platform independent if you can give us some help; it was actually tested on Macs, not Linux --JimHu 15:30, 28 July 2008 (UTC)