All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
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:
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.
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...
Every good solution is obvious once you've found it.
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.