Feel free to enter here the bugs you just found.
Diff algorithm
Very simple, needs a lot of improvement as it is far from only showing minimal differences.
I setup Wiclear using MySql 5.0 and the history page failed to display full history (just listed current page). I tracked it down to the SQL query in wiki.class.php
(...snip)
function getHistory($content_id) { $content_id = $this->con->escapeString($content_id); $query = <<<SQL SELECT wc_history.id, wc_history.title, wc_history.alternate_title, wc_history.content, wc_history.commit_msg, wc_history.minor_major, wc_history.ip, wc_history.timestamp, wc_lang.id, wc_lang.code, wc_lang.description, wc_lang.flag, wc_content_hierarchy.parent_content_fk, wc_content_lang.related_content_fk, wc_user.id, wc_user.login, wc_user.firstname, wc_user.lastname, wc_user.email FROM wc_history JOIN wc_content on wc_content.id=wc_history.content_fk JOIN wc_lang on wc_lang.id=wc_content.lang_fk JOIN wc_user on wc_user.id=wc_history.user_fk JOIN wc_content_hierarchy on wc_content_hierarchy.content_fk=wc_content_lang.related_content_fk JOIN wc_content_lang on wc_content_lang.content_fk=wc_history.content_fk WHERE wc_history.content_fk='$content_id' ORDER BY wc_history.timestamp DESC; SQL;
(snip...)
This sql returned the error
Unknown column 'wc_content_lang.related_content_fk' in 'on clause'
To fix it I swap these two lines JOIN wc_content_hierarchy on wc_content_hierarchy.content_fk=wc_content_lang.related_content_fk JOIN wc_content_lang on wc_content_lang.content_fk=wc_history.content_fk
To
JOIN wc_content_lang on wc_content_lang.content_fk=wc_history.content_fk JOIN wc_content_hierarchy on wc_content_hierarchy.content_fk=wc_content_lang.related_content_fk
MySql 5 now seems to join tables in order and you cannot reference a table that has not yet be joined.
The same needs to be done to
- function getHistoryVersion($history_id)
- function getHistoryByDate($node_id, $timestamp)
David : wow, I must say I'm definitly impressed ! That's the first time I get a bug report that precise. Thanks very much, if everybody could do the same... Anyway, this already has been fixed on the dev version. There is also the comment sql query for comment feed and another query I don't remember which happened to have the same problem. I did not know this was linked to MySql 5 though. I discovered it because here on free.fr I happened to choke on the same bug : they must have upgraded to MySql 5...
Version 0.9.tgz download
- the admin panel says 0.9-beta1
- the file "VERSION" as states 0.9-beta1
This also seems to be in the download for 0.9-beta3.tgz
David : Yep, error from mine, I'll fix it in next 0.10 release (very soon I expect)
Excellent program by the way. It is fast and easy to use, it works the way I expect it too (and I've used a few that don't). Thanks for all your time and effort.
David : Thanks very much, I mean it. I seldom receive thanks and it's always nive to have some.
Steve : Well you deserve it, I have tried loads of wikis and this one is more what we need than mediawiki and phpwiki. It's easy to keep the site structured with the parent node/sub node feature. The template system is nice to use and easy to customize. I've spent the day intergrating Wiclear in to my departments intranet, I've even managed to tie Wiclear to our authentication DB/System, so the user is automatically loged into the wiki if allreay logged into our intranet db. So thank you, I think my department is going to find your software very useful for mantaining documentation, etc. Got another bug for you, but you may have already caught it.
The sql script to create the contents table (contents.sql), specifies the contents colomn as "blob" rather than "text", which causes your search feature to only search page title and not the contents.
Currently
CREATE TABLE wc_content ( id int(6) NOT NULL auto_increment, title char(100) NOT NULL, alternate_title char(100), content blob, //this bit minor_major int(1), commit_msg varchar(200), timestamp int(8), ip char(15), creation_time int(8),
user_fk int(6), lang_fk int(6),
PRIMARY KEY (id), INDEX (title) );
should be
CREATE TABLE wc_content ( id int(6) NOT NULL auto_increment, title char(100) NOT NULL, alternate_title char(100), content text, //this bit minor_major int(1), commit_msg varchar(200), timestamp int(8), ip char(15), creation_time int(8),
user_fk int(6), lang_fk int(6),
PRIMARY KEY (id), INDEX (title) );
Also, not sure if you know, MySQL has a "full text search" feature, which might be usefull. I used this in my last job to build an index of fault reports and allow bolean logic searching. Deffinetly one of MySqls better features.
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
Now a feature request/idea, rather than a bug.
To get Wiclear to use a prefix on the session variables like it does with the database tables?
i.e. SESSION 'wiclear_user_id'
I have a few programs sharing the same session on our intranet (well one I've written and phpOpenTracker). The both use prefixes, so as not to accidentally overwrite each others variables. I've caught out by things like this before and thought it might be a good idea for Wiclear.
Once again thanks and hope you have a good weekend. Steve