Page 1 of 1

phpWiki Problem

Posted: Wed Jan 04, 2006 10:22 am
by Kemp
Hi. I just set up a phpWiki for something I'm doing and it is all working fine. That is, with the exception of the WantedPages page/plugin. If I supply it with a page= parameter then it'll fetch the broken links from that page as it should, however if I don't supply the parameter (the default way it is used on the WantedPages page and the way it is used in the OSFAQ) then it dies with this error:

Code: Select all

Fatal Error:

lib\WikiDB\backend\PearDB.php (In template 'body' < 'html'):1024: Error: WikiDB_backend_PearDB_mysql: fatal database error 

DB Error: no such field 
(SELECT page.pagename,linked.pagename as wantedfrom FROM link,page as linked LEFT JOIN page ON(link.linkto=page.id) LEFT JOIN nonempty ON(link.linkto=nonempty.id) WHERE ISNULL(nonempty.id) AND linked.id=link.linkfrom AND linked.pagename NOT IN ('PgsrcTranslation','InterWikiMap') LIMIT 0, 300 [nativecode=1054 ** Unknown column 'link.linkto' in 'on clause'])
My assumption currently is that not supplying the parameter means it is trying to fetch invalid data from the database, but I don't see why when it works on all the other phpWiki based Wikis I can find.

Does anyone have any thoughts on this?

Re:phpWiki Problem

Posted: Wed Jan 04, 2006 10:30 pm
by Solar
Did you try to field this question in the phpWiki forums / Wiki?

Re:phpWiki Problem

Posted: Thu Jan 05, 2006 6:05 am
by Kemp
I've added the question to their Wiki, awaiting a possible reply. I'm gonna try hacking around in the WantedPages plugin code and see what I find.

Re:phpWiki Problem

Posted: Thu Jan 05, 2006 7:28 am
by Solar
If I were you, I'd rather approach that differently:

Code: Select all

DB Error: no such field 
(SELECT page.pagename,linked.pagename as wantedfrom FROM link,page as linked LEFT JOIN page ON(link.linkto=page.id) LEFT JOIN nonempty ON(link.linkto=nonempty.id) WHERE ISNULL(nonempty.id) AND linked.id=link.linkfrom AND linked.pagename NOT IN ('PgsrcTranslation','InterWikiMap') LIMIT 0, 300 [nativecode=1054 ** Unknown column 'link.linkto' in 'on clause'])
Does you database have the necessary fields? The DB error seems to point to a corrupt DB...

Re:phpWiki Problem

Posted: Thu Jan 05, 2006 7:37 am
by Kemp
Yeah, the field that it says is missing is actually there (t'was the first thing I checked ;) ). Like I said, if I tell it a particular page to find broken links on then it fetches them quite happily, it's just when it's asked to do all pages.

Edit:
Looking at the SQL it says is the problem (not at the webserver right now so I can't check the code), it looks like roughly the same query has to be executed whether it's looking at one page or all of them.