Extension talk:SQL2Wiki

About this board

How to make this running again

FrankAltpeter (talkcontribs)

Hi,I recently had to update to mediawiki-1.25 and (obviously) the SQL2Wiki extension refuses to work anymore. I can't get away this error:

fatal] [5d2c6e93] /wiki/index.php/Domains   ErrorException from line 264 of /srv/www/htdocs/mediawiki-1.25.1/includes/exception/MWExceptionHandler.php: Fatal Error: Class 'Database' not found

I assume this has to do with the deprecated Database::newFromType() function but I'm unable to fix this for myself. Any help appreciated, since AFAIK this is the only way to dynamically put sql data directly into wiki pages.

FrankAltpeter (talkcontribs)

Ok, found the problem for myself... the undocumented setting "type" within the wgExSql2WikiDatabases() array was the problem. It is nowhere defined how this is to be set, just a reference to "oracle" is found on this page.

So, setting it to "sql" or "mysql" didn't work until I had a lucky guess and tried "mysqli" and now it works.

Reply to "How to make this running again"

How to include dynamic content in search results

1 (talkcontribs)

I am also using Wiki as aautomated program and db-dable documentation tool, a preprocessor extracts valueable comments for code and stores in a cache table. Sql2wiki extention reads these cached comments when rendering the page.

Unfortunately the search motor doesnt see the content from then cache table.

A daily cycle/or on-demand of refreshment would be the goal.

Reply to "How to include dynamic content in search results"

Escaping leading-space formatting on result strings

2 (talkcontribs)

I am using Wiki ad automated program documentation page. I have an external preprocessor , which extracts commented string from Oracle plsql source codes.

-- fictional code
IF --Comm4Wiki
   L_PARAM1 >100 THEN 

IF --Comm4Wiki

My preprocessor extracts everything between Comm4Wiki tags, inserting 2 lines in a table:

string 1, two lines starting with 4 spaces>

   L_PARAM1 >100 THEN 


My Wiki page extracts the lines with sql2wiki.

I do not want to remove leading spaces. How can I manage not to have string1 highlighted because of leading spaces? (talkcontribs)

I have recently realized that query resulting more than one row behaves strange.

I use inline, preexpand, expand, noheader = true options, in addition I encapsulate every line in <nowiki> tags

If I have to sql lines each of them starting with spaces then -the first line performs nowiki formatting, I mean it pops up normal, unformatted inline text; -the further rows are presented in box , because of the leading spaces.

Reply to "Escaping leading-space formatting on result strings" (talkcontribs)

Where has this Extension gone? The snapshot download doesn't find it anymore. Does anyone know where to download this extension or other versions of it? Thank you R.Colbach

Nick2253 (talkcontribs)
Reply to "SQL2Wiki download"
Agapetulus (talkcontribs)

I am using MW 1.16.2, my database is mysql,

on the page: Special:SQL2Wiki I have the error massage: Missing or invalid type,
and a query results in a blank page
in LocalSettings I wrote: $wgExSql2WikiDatabases["db1"] = array( "type"=> "mysql", "host" => "localhost", "dbname" => "myname", "user" => "myuser", "password" => "mypass");
( I am still using the old version of sql2wiki as xsql2wiki, and it works fine)
thank you
Bytesmiths (talkcontribs)

Hi, I don't think I can help you, as I don't have $wgExSql2WikiDatabases anywhere in my system.

I think you must be working on a branch of the SQL2Wiki.php that I worked on.

Agapetulus (talkcontribs)

Hello, thank you for the answer,

I'm confused, on the Extension page I can read :

3. Specify databases you want to access into

$wgExSql2WikiDatabases["db1"] = array( "type"=> "oracle", "host" => "tnsname", "dbname" => "scott", "user" => "scott", "password" => "tiger");

in my LocalSettings I wrote:

$wgExSql2WikiDatabases["db1"] = array( "type"=> "mysql", "host" => "localhost", "dbname" => "myname", "user" => "myuser", "password" => "mypass");

why shouldn't there be a $wgExSql2WikiDatabases ?, or did I get something wrong?

unfortunatly I cannot work on your branch of the SQL2Wiki, (things might change after a update of my mediawiki in January)...

in any case I wish you a merry christmas, and a happy new year

Bytesmiths (talkcontribs)

My version has the database information embedded in the extension -- which I admit is not wonderful.

Good luck with your problem, and if you become interested in my version (which has some interesting mods that never got into the version posted here, like ability to query and paginate), let me know.

Reply to "Missing or invalid type"

Problem: parameter in template

Alexandre Porto (talkcontribs)
Reply to "Problem: parameter in template"

Dynamic Query and Pagination mods didn't make it in...

Bytesmiths (talkcontribs)
Freakolowsky (talkcontribs)

ufff ... branched from that extension so long ago that i failed to notice the Talk page ... will have a look at it.

Reply to "Dynamic Query and Pagination mods didn't make it in..."
There are no older topics
Return to "SQL2Wiki" page.