I have no idea why it's doing this. I tired it automatic and manually and I'm getting errors both ways:
URL to your eFiction: http://meijitales.com
Version of eFiction: 2.0.7
Have you bridged eFiction, if so with what?: No
Version of PHP: 4.4.4
Version of MySQL: 5.0.24a
Have you searched for your problem: Yes
If so, what terms did you try: A fatal MySQL error was encountered., Error: (1091) Can't DROP 'category'; check that column/key exists
State the nature of your problem:
I'm upgrading and at step 19 when I select "automatic" I get the following message:
A fatal MySQL error was encountered.
Query: alter table fffanfiction_categories drop index category;
Error: (1091) Can't DROP 'category'; check that column/key exists
When I did it manually, first (FYI) I have ff before each table, so I had to add the ff to the optimize.sql file (if you want to make a note of that for others) once I got that problem solved this is the error I get from MySQL:
Error
SQL query:
ALTER TABLE fffanfiction_authorinfo ADD PRIMARY KEY ( uid, field ) ;
MySQL said:
#1068 - Multiple primary key defined
Do you have a test account for us? test - password is password
The site DOES seem to be working...but the blocks aren't activating and the stats are all showing zero even though there are definitely numbers for there.
My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
Since it looks like it installed your site despite the problems try these things:
Go to Admin->Blocks
Under Info, click Options and change it from Narrative to Chart
Then go to Admin->Archive Maintenance
And click the links for the following:
# Recalculate Reviews
# Fix Category Counts
# Fix Category Order
# Re-calculate Site Statistics
# Fix Panel Order
# Optimize Database Tables
See if any of that fixes your problem. At least that would be what I would try first.
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
Okay, I did all this and while it told me the action was successful...the numbers are still showing all zeros except for the member count and the newest user.
My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
Okay...updates on this. I've been messing around with it all day.
I submitted a test fic and a test review to see if that would somehow get the site stats to start working.
It...helped, but it didn't fix it.
Now it says this:
Members: 502
Series: 0
Stories: 1
Chapters: 2229
Word count: 7316833
Authors: 163
Reviews: 1
Reviewers: 84
Newest Member: aydiyel
It's giving me everything except my series, stories and reviews.
Also too, when I added the review I got this error:
Notice: Undefined index: rating in /home/.kayle/pserenity/meijitales.com/reviews.php on line 125
After I got SOME results with the stats, I went to the admin and checked off the re-calculate site statistics bit again. No change. I went to MySQL and repaired my tables, no change. I think that's the bulk of this. I guess the big issue right now is just that the site stats are all wonky. Help?
My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
I'd help you but I have no idea what's going on.
Did you have any problems upgrading? Maybe your database is missing some things.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
Well, like I said in my first post, my upgrade was stopped at step 19 with those errors. I don't know if there are steps after 19, or if that's it, but the upgrade didn't complete from step 19.
My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
You got that error because that table was already altered when you selected step 19 be done automatically until you got that first error with dropping categories from your categories table. Step 19 optimizes a number of tables, one of the things it does is change indexes. So when you ran the sql statements manually and ran the ALTER statement
ALTER TABLE fffanfiction_authorinfo ADD PRIMARY KEY ( uid, field ) , this had already been done. You can infer this because mySQL is throwing the error that you're trying to define more than one primary index and it's doesn't like that. You can verify by looking at the table in your db and looking in the lower left where it lists indexes. The thing with the upgrade script is that it doesn't skip steps if things have already been done. Ideally you wouldn't have to repeat a step, but things happen. When I ran into this problem I'd delete the indexes there and run the statement again. I've ddetailed step on how to verify the table's already been changed below.
To address your second error, Sounds like one of the ALTER statements for your reviews didn't take either since the error states the index is undefined. This would lend me to think it wasn't created. Looking at the optimize.sql file and the upgrade script for step 19, that looks to be the case. Try doing these steps [which for ease I'm copying/pasting from another thread that had some issues getting through step 19 as well], right down to editing the upgrade20.php script once you've run each statement in the optimize.sql .
Onto your step 19 errors:
Basically what's happening is the upgrade script is trying to alter the table by deleting something that it can't find. This is the drop error you had first which prompted you to try manual. When you get the primary key already exists error, this means that the table already has that index defined. It's ok to run the next statement. First though, take a look at your fffanfiction_authorinfo table and verify that your index was defined. It'll be in the lower left and should look something like this
Steps:
Access phpMyAdmin
Click on your fanfiction_authorinfo table
You should see an area that says Indexes in the lower left side of the screen
Just verify that you do have a primary index defined and it has the fields uid and field.
Now, onto doing the DB optimization manually. You'll be copy/pasting statements one at a time from optimize.sql. You've already put your prefix in front of the table, so you're good to go there. [I'm just keeping that step in there for anyone else that reads this and has the same problem]
Steps:
Access phpMyAdmin
Click the tab for SQL
You'll see a box.
Open the optimize.sql file in a text editor like notepad
Add your table prefix in front of each table name.
Copy/paste the first statement into that box, click go. Do this one at a time for each statement.
Make a note of the errors you get, so you can look at the table in question and verify any missing data is not there for statements that are dropping [aka deleting] information. Also make note of errors for things being altered. Chances are the table's already altered, and you'll prolly get an error stating duplicates for any ALTER statements you run or the multiple primary key error.
Now from this, looking at the upgrade script, I'm not 100% certain so perhaps Tammy, Carrissa, Jan_AQ et al can clarify.. it looks like a part of step 19 does some updating in addition to the sql statements in the sql file. What I would do [and I tend to do things the hard way first, so you may want to wait for another suggestion :P] is to alter the upgrade20.php to take out the optimizing queries you've just done manually and run step 19. I can detail that below if you want to try it.
Steps:
Make a copy of upgrade20.php [this will be your backup copy in case my suggestion doesn't quite work out. Backups are good, backups are wise :lol:]
Open upgrade20.php in a editor like notepad
Find the code that says:
case "19":
Then look for lines that follow after it that says
if(isset($_GET['install'])) {
if($_GET['install'] == "automatic") {
dbquery("alter table ".$tableprefix."fanfiction_categories drop index category;");
dbquery("alter table ".$tableprefix."fanfiction_categories drop index parentcatid;");
dbquery("create index byparent on ".$tableprefix."fanfiction_categories (parentcatid,displayorder);");
dbquery("create index forstoryblock on ".$tableprefix."fanfiction_chapters (sid,validated);");
dbquery("alter table ".$tableprefix."fanfiction_comments drop index nid;");
dbquery("alter table ".$tableprefix."fanfiction_comments add index commentlist (nid,time);");
dbquery("alter table ".$tableprefix."fanfiction_inseries drop index seriesid;");
dbquery("alter table ".$tableprefix."fanfiction_inseries drop index inorder;");
dbquery("alter table ".$tableprefix."fanfiction_inseries add index (seriesid,inorder);");
dbquery("alter table ".$tableprefix."fanfiction_inseries drop index sid;");
dbquery("alter table ".$tableprefix."fanfiction_inseries add primary key (sid,seriesid);");
dbquery("create index avgrating on ".$tableprefix."fanfiction_reviews(type,item,rating);");
dbquery("alter table ".$tableprefix."fanfiction_reviews drop index sid;");
dbquery("create index bychapter on ".$tableprefix."fanfiction_reviews (chapid,rating);");
dbquery("alter table ".$tableprefix."fanfiction_reviews add index byuid (uid,item,type);");
dbquery("alter table ".$tableprefix."fanfiction_series drop index owner;");
dbquery("create index owner on ".$tableprefix."fanfiction_series (uid,title);");
dbquery("alter table ".$tableprefix."fanfiction_stories drop index validated;");
dbquery("create index validateduid on ".$tableprefix."fanfiction_stories (validated,uid);");
dbquery("create index recent on ".$tableprefix."fanfiction_stories (updated,validated);");
dbquery("ALTER TABLE `".$tableprefix."fanfiction_inseries` DROP `updated`");
dbquery("ALTER TABLE `".$tableprefix."fanfiction_news` ADD `comments` INT NOT NULL DEFAULT '0'");
dbquery("ALTER TABLE `".$tableprefix."fanfiction_series` ADD `numstories` INT NOT NULL DEFAULT '0'");
$serieslist = dbquery("SELECT seriesid FROM ".$tableprefix."fanfiction_series");
You want to take out all the lines that start with dbquery since these are the statements you have just run manually. When you're done that section should look like this:
if(isset($_GET['install'])) {
if($_GET['install'] == "automatic") {
$serieslist = dbquery("SELECT seriesid FROM ".$tableprefix."fanfiction_series");
That should be all you have to change. Save the file, upload it to your server overwriting the copy that's already there. Then in your browser, put in this URL:
http://www.youreficURL/install/upgrade20.php?step=19
After that's done, access your archive. Go to Admin > Archive Maintenance and click on recalculate reviews, and recalculate site stats. See if that doesn't fix your site statistics problem.

Okay, I went to go through all your steps and THIS is what I found when I looked at the fffanfiction_authorinfo table:

Also too, I'm getting the following error when authors try to reply to a review:
Error!We encountered an error. Please go back and try again.
So...what should I do to fix this table?
My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
For the first error, delete the second listing. It should just be a Primary index listed on there. Then you should be fine.
For the second error, I'm not sure. It might clear up after the above fix, but I'm not certain. It prolly is best to post it as a another thread, giving your site's URL. I wouldn't know what to look for when going to your page to see what's causing it. But the others might and b able to offer up solutions.

How do I delete the second listing?
My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
When you access the table, looking at your indexes, you see the red X's? Click on the red X under the Action column in the row where uid is under the Keyname column. Red X is a hosrtcut to deleting something and the pencil there is a shortcut to edit something. They've got it so if you let your mouse hover over it, it'll say something like 'Edit' for the pencil and 'Drop' for the X.

Okay, I did that.
It still didn't fix the stats, so I went through all the other tables to have a look at them. There are four more that aren't correct. Can you tell me what to do for these too?
fffanfiction_chapters

fffanfiction_online

fffanfiction_reviews

fffanfiction_stats

My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
In comparing against my tables, that's how they're all supposed to be. So all good there it looks like.
Check to see if this also applies to you for your fffanfiction_stats table as described in this thread.
https://efiction.org/forums/index.php?topic=5049.msg27375#msg27375
See if the sitekey field in your _stats table has your site key in it. If it's blank, you can get your sitekey from your settings in your Admin panel [Admin>Settings], or since you're already looking in your db, you can retrieve it from your _setting table. Copy it and paste it into the sitekey field in your _stats table. Click go. Then check to see if your stats will display then.

The _stats table already has the sitekey in it. π
My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)
I'm stumped. I don't know what else to suggestion beyond posting a new thread for your Info block issue- since it's not showing the correct information and see if someone that knows more can help out. π

