[SOLVED] Fatal MySQ...
 
Notifications
Clear all

[SOLVED] Fatal MySQL error fanfiction_authors and fanfiction_authorprefs

8 Posts
2 Users
0 Reactions
2,677 Views
(@guest6323)
Posts: 0
 

URL to your eFiction: http://peterandsusan.org/fanfic
Version of eFiction: 3.4.3.
Have you bridged eFiction, if so with what?: No bridges
Version of PHP: 5.2.9
Version of MySQL: 5.0.75
Have you searched for your problem: Yes, but there are no solutions.
If so, what terms did you try: I copied and pasted the error I was getting, this came up: https://efiction.org/forums/index.php?topic=6783.msg36337 but none of those solutions helped me.
State the nature of your problem:

I''ve recently moved servers, I just re-uploaded everything but I get the following error when I try to browse the Authors page:

A fatal MySQL error was encountered.
Query: SELECT count(author.uid) FROM fanfiction_authors as author LEFT JOIN fanfiction_authorprefs as ap ON author.uid = ap.uid WHERE ap.stories > 0
Error: (1054) Unknown column 'ap.stories' in 'where clause'

This is where I get the problem: http://peterandsusan.org/fanfic/authors.php?list=authors

Do you have a test account for us? I can't create new users with the current problem. Sorry.

Any help would be very much appreciated!  πŸ˜€


 
Posted : 24/03/2009 10:14 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

It's saying there's no stories field in fanfiction_authorprefs.  Are you sure you're at version 3.4.3?  You never tried upgrading to 3.5?  I think the stories field was added to authorprefs in 3.5, so it's making me think your browse.php (or some other file?) might be a 3.5 version.

You should definitely get a clean version of browse.php from the 3.4.3 download and overwrite it on what you've got running on your server.


 
Posted : 25/03/2009 12:18 am
(@guest6323)
Posts: 0
 

The first Efiction I ever installed was 3.4.3 but I upgraded to 3.5 on my previous server, I saved the MySQL and re-installed 3.5 on the new server and I got the problem I posted about, so I saw this thread: https://efiction.org/forums/index.php?topic=6783.msg36337 where the person apparently fixed it by downgrading to 3.4.3, but it hasn't really worked out.

Is there any way I can add the stories field to fanfiction_authorprefs manually? I've tried re-installing both version 3.4.3 and 3.5 but I get the same problem with both....


 
Posted : 25/03/2009 12:34 am
(@lyndsie)
Posts: 1263
Member Moderator
 

Hmm, maybe the update was done in 3.4.x.  That's what the update.php file seems to suggest.  In any case, from the update.php file the query to add the stories field is:


dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_authorprefs` ADD `stories` INT NOT NULL DEFAULT '0'");

That's line 216, one of the first in that section.  You should probably check that everything after there ran too; I think I had problems with one of my updates and the coauthors table wasn't created, which comes right before the step of adding stories to authorprefs.


 
Posted : 25/03/2009 1:09 am
(@guest6323)
Posts: 0
 

Thanks for your input Lyndsie! Here's what I tried to do:

I created the stories table at the fanfiction_authorprefs table manually and now all the member names show up but all I get is a zero next to the names of the authors instead of the number of stories they've written.

http://peterandsusan.org/fanfic/authors.php

Any idea on how I can fix this through MySQL?

I've also created a test account if anyone needs it:

http://peterandsusan.org/fanfic/user.php?action=login

user: test
password: test

Thanks for your help!


 
Posted : 25/03/2009 5:06 am
(@lyndsie)
Posts: 1263
Member Moderator
 

What you should do is first run all the recalculation tools in Admin > Archive Maintenance.  There are four or five of them.  Not sure which, but one of them should fix the story count.  I actually think the one that's labeled something like "recalculate stories" isn't the one (at the very least, the hover descriptions don't match the link/URL), but I haven't been able to test that.  Running them all is a good idea anyway since it'll fix stuff that you might not notice that could be calced wrong.


 
Posted : 25/03/2009 3:11 pm
(@guest6323)
Posts: 0
 

Thank you so much, Lyndsie! That seems to have worked! YAY!

Should I mark the topic as solved?  πŸ˜‰


 
Posted : 25/03/2009 3:27 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Sure thing.  Glad I could help. : )


 
Posted : 25/03/2009 4:05 pm
Share: