URL to your eFiction: http://gatchfanfic.com/efiction
Version of eFiction: 3.2.1
Have you bridged eFiction, if so with what?: No.
Any mods installed?: Challenges, Beta Reader, Summary length
Have you modified your eFiction?: Yes, solution for slash in series name
Version of PHP: 4.4.4
Version of MySQL: 4.1.21-standard
Have you searched for your problem: Yes.
When editing a long multi-chapter story, I deleted one chapter in the middle. I received the following error:
Warning: unlink(ttfolgatch/1/456.txt) [function.unlink]: No such file or directory in /home/jgatchfa/public_html/efiction/stories.php on line 776
A fatal MySQL error was encountered.
Query: UPDATE gatfanfiction_chapters SET inorder = (inorder - 1) WHERE sid = '24' AND inorder >
Error: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I went back and uploaded a new version of the chapter, but when I went to put it in place with the arrows, it started doing all sorts of strange things. Like jumping two spots, but just refusing to go in where I wanted it to. I signed in and out a few times and was finally able to get it to the order it needed to be.
But then something else strange happened. When clicking the title of the fanfic, it would go to a page that has only (example http://www.gatchfanfic.com/efiction/viewstory.php?sid=24 ):
[Reviews - 0]
Table of Contents
[Report This]
Admin Options: [Edit] [Delete] [Featured]
[Add Story to Favorites] [Add Author to Favorites]
Unlike before, the first chapter doesn't appear. To see the first chapter you have to click "Table of Contents" and then manually go down to the first chapter. And yet, brand new multi-chapter stories are displaying correctly. While testing this, I have found that any multi-chapter story before this event is having the same trouble as the story listed above. Any after are displaying correctly.
I have a feeling something is corrupted somewhere, but I'm not sure where.
I've gone into phpMyAdmin, and in the chapters screen, there is an error towards the bottom that says: "More than one INDEX key was created for column `sid`". Didn't know if that helped any.
I've tried resetting the "View Story Index" in both the admin area and in my preferences several times, just to see if something toggled. I've also performed all the Archive Maintenance options. I've tried uploading the very first chapter, just in case. I also reloaded story.php onto the server, just in case. I've also checked the permissions on the story folder and config file. So far nothing has fixed this.
Does anyone have any ideas?
Julieann
Julieann
Running 3.4.3 bridged with SMF and Coppermine
Mods: Challenges, cpg-art (not working), Limit Summary Length, Bio to Prefs, Top 20 instead of 10
Wants: Move Betareader to Prefs, Twitter
There is probably something wrong with the script when you delete a chapter. It seems like the order of the left over chapters were messed up.
What you need to do is go manually into your database and go into the chapters table. Search for all chapters with the Story id (sid) of the story (found by going to the story's url online, the sid is the number at the end of the url).
Then look at the chapters. Are they in order? Are you missing any numbers? Number them right. It should fix the current problem, but not what caused it.
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
Stupid me, I know better. I didn't turn debug on and I should have. Going to the story listed above, Debug is now showing the following errors:
Notice: Undefined variable: valid in /home/jgatchfa/public_html/efiction/viewstory.php on line 301
Notice: Undefined variable: chapid in /home/jgatchfa/public_html/efiction/viewstory.php on line 310
Notice: Undefined variable: chapid in /home/jgatchfa/public_html/efiction/viewstory.php on line 310
Notice: Undefined variable: chapid in /home/jgatchfa/public_html/efiction/viewstory.php on line 316
Notice: Undefined variable: chapid in /home/jgatchfa/public_html/efiction/viewstory.php on line 317
Notice: Undefined variable: chapid in /home/jgatchfa/public_html/efiction/viewstory.php on line 321
Notice: Undefined variable: chapid in /home/jgatchfa/public_html/efiction/viewstory.php on line 322
Notice: Undefined variable: inorder in /home/jgatchfa/public_html/efiction/viewstory.php on line 336
Notice: Undefined variable: inorder in /home/jgatchfa/public_html/efiction/viewstory.php on line 336
Notice: Undefined variable: chapid in /home/jgatchfa/public_html/efiction/viewstory.php on line 343
Notice: Undefined variable: chapterauthor in /home/jgatchfa/public_html/efiction/viewstory.php on line 348
Here is an example of a chapter that was posted after this event: http://www.gatchfanfic.com/efiction/viewstory.php?sid=222 . With debug on, this chapter is showing no errors.
Oh, and I uploaded a fresh copy of viewstory.php just in case. Same errors appear.
Jan, with what you said today, am I going to need to do that for every chapter now (since it's not just that one story affected)? That's well over 500 now.
Julieann
Julieann
Running 3.4.3 bridged with SMF and Coppermine
Mods: Challenges, cpg-art (not working), Limit Summary Length, Bio to Prefs, Top 20 instead of 10
Wants: Move Betareader to Prefs, Twitter
Are all those stories having chapter ordering problems after deleting a chapter? If not, then I would say no. Just fix that one story and turn debug off. Debug shows all errors, and stuff that might not be errors.
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
Yes, after deleting that one chapter, ALL multi-chapter story are now having the same problem as I described above (all except any posted after, that are brand new). That's what I don't understand. How could deleting a chapter in one story affect all the others? Very strange.
Poking around the chapters table, I do see that all the first chapters (of the affected stories) now have a inorder of 2 instead of 1. When that is changed to 1, then the chapter comes up as it should when the title of the story is clicked. Problem is, then I have to go into each chapter and up the inorder by 1. What a huge pain.
So, it looks like this can be fixed manually by taking a lot of time. Question is, how do I prevent this from happening again?
Julieann
Running 3.4.3 bridged with SMF and Coppermine
Mods: Challenges, cpg-art (not working), Limit Summary Length, Bio to Prefs, Top 20 instead of 10
Wants: Move Betareader to Prefs, Twitter
Were all the errors showing up for all the stories before you turned debug on? If there's a problem in the script, and debug is on, the errors might show up on all the pages, and not only when the error is present. So if the answer is yes, turning debug off might help.
I don't know why it's doing this- all your stories shouldn't start with 2 in the inorder field, they should start with 1.
Did you upgrade your archive recently? The old stories might not have been given the right order to start with. Otherwise, this occurs just now and that is very strange happening to ALL the stories.
I think that it is a bug.
You might have to manually change all the 2's to 1's. Do you have duplicate 2's for every story? like 2, 2, 3, 4, 5, ect instead of 1, 2, 3, 4, 5?
If so, you should be able to do a sql script that will change all the 2's in the inorder field to 1's, but I don't really know sql so I can't tell you how.
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
No, there were no errors showing up before turning on Debug.
I have not done an upgrade. This was a pristine install (with no problems and no errors) of the current zip.
In looking in the MySQL database, the stories after this event are logging correctly (i.e.: 1,, 2, 3, 4, 5).
Those stories from before this event are logged as 2,3,4,5,6. Everything is shifted one number forward. There are no duplicate numbers.
This problem did happen all of a sudden. I had poked around the database before, just looking at how it was layed out, and I don't recall seeing a numbering issue.
Julieann
Running 3.4.3 bridged with SMF and Coppermine
Mods: Challenges, cpg-art (not working), Limit Summary Length, Bio to Prefs, Top 20 instead of 10
Wants: Move Betareader to Prefs, Twitter
You had an error when you first tried to delete the chapter and then made it worse with each subsequent action. I don't know how it happened, but you tried to delete a chapter that didn't exist in the database. Maybe you refreshed the page after it deleted the chapter and the script tried to delete it again. Then trying to reorder the chapters further messed things up. I can't think of any way to correct this except manually as Jan said.
It took a while, but manually changing the numbering of all the chapters has everything working correctly again. Thanks! Marking this as solved now. π
Julieann
Running 3.4.3 bridged with SMF and Coppermine
Mods: Challenges, cpg-art (not working), Limit Summary Length, Bio to Prefs, Top 20 instead of 10
Wants: Move Betareader to Prefs, Twitter
