Loading...
 
Architecture / Installation

Architecture / Installation


Whole site broken - Please help - unknown columns database query error

posts: 3

Hi,

I really hope someone can help me with this. I've been running a tikiwiki site for almosta year now on 1.9.10.1, as installed through Fantastico. Yesterday I logged in to cpanel and it told me I needed to upgrade to tikiwiki 2.2 (something I'd been intending to do anyway). So I created a backup of the database and some other folders and told Fantastico to get on with it.

After a while my site was a mess, after trying all kinds of things to get it working I've manually reinstalled 1.9.10.1 and imported my backup database through phpMySQL. Everything now looks ok (and it appears that the content is there), but I get this error on every page:


__An error occured in a database query!

Context:
File tiki-index.php
Url tiki-index.php
Query:
select `user`,`attId`,`page`,`filename`,`filesize`,`filetype`,`downloads`,`created`,`comment` from `tiki_wiki_attachments` where `page`=? order by `created` desc
Values:
0 HomePage
Message:
Error Message Unknown column 'downloads' in 'field list'__


Through phpMySQL I've checked the table 'tiki_wiki_attachments' and there is a field called 'downloads', so I don't know why it can't find it. I've also looked at tiki-index.php to see whether I could just change the query (I read something about changing the ` marks to '), but I can't find this query in it. I guess the query must be from a script that the page calls, but as you've probably guessed I'm really at the limits of my knowledge here. Any help would be much appreciated. If you want to see what this looks like for yourself, please go to www.schoolcouncilstandard.org.

Asher


posts: 3

Hi Rick,

I don't know Fantatico did, I expect it didn't run that script and that's what messed things up initially.

What I'm trying to do now though is restore the database I backed up before doing anything to do with upgrades. What I've got is the 1.9.10.1 software and a database that was created by that software and it's throwing up the errors seen above.

Thanks for your help with this.

Asher


posts: 3665 United States

Not sure, but here's what I would try:

  1. Restore the Tiki files from 1.9.x
  2. Restore your 1.9.x database
  3. Run the 1.9 installer (tiki-install.php) and select the UPGRADE option.
    This will/should fix and DB errors and make sure your database reflects the 1.9.x structure.




HTH,

-Rick
Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage


posts: 3

Hi Rick,
thanks very much for your help. I thought I'd already done what you said before I posted here, but it seemed silly to ask for help and then not follow it. So I deleted everything and gave it another go, exactly following what you laid out above, and hey presto it's fixed.
So, thanks so much, I'm hugely relieved.
Now I've just got to do the upgrade without messing it all up again.
Asher