URL to your eFiction:
http://thedelphicexpanse.com.p8.hostingprod.com/efiction/index.php
Version of eFiction:
3.5.3
Have you bridged eFiction, if so with what?:
No.
Version of PHP: can be found out from your host
5.2.12
Version of MySQL: can be found out from your host
MySQL client version: 4.1.14
Have you searched for your problem: (yes/no)
Yes.
If so, what terms did you try:
Category Counts, Category Count Bugs, Maintenance,
Maintenance Bug
State the nature of your problem: Copy and paste any errors you are receiving.
The site maintenance function "Fic Category Counts" gets the following error message: A fatal MySQL error was encountered.
Query: SELECT count(sid)
FROM fanfiction_stories WHERE
FIND_IN_SET('21', catid) AND validated
> 0
Error: ()
Instead of fixing the category counts, it resets them.
Do you have a test account for us?
Delphicadmin1, porthos
Thank you!
Update:
I'm Aquarius's partner, and I just went and hand counted the stories and updated them in the tables, both on the category and subcategory level.
However, the original bug/SQL error exists and the FIX CATEGORY counts function still does not work. If anyone has any clue whether this is a bug or whether we can fix it ourselves - let us know! Thanks. 🙂
Run that query in phpmyadmin and see what error it gives you.
SELECT count(sid)
FROM fanfiction_stories WHERE
FIND_IN_SET('21', catid) AND validated
> 0
I can't see anything wrong with it. My guess would be that there's something wrong with category 21 (Doctor Who) or it's parent category 20 (Crossovers).
I deleted those categories. Only one story existed in them, so it wasn't a big deal, but it didn't help.
I got:
A fatal MySQL error was encountered.
Query: SELECT count(sid) FROM fanfiction_stories WHERE FIND_IN_SET('19', catid) AND validated > 0
Error: ()
However, when I tried to re-add the Crossover Category, after I deleted, I also got a fatal error but I noticed that the new Crossover category did not have a category ID - so I added that and I was able to add a subcategory. But that subcategory was also added without a category id, which I went in and added manually. Could these two problems be connected? Every other category does have an id.
But - the category count fix is still not working.
First, please run that query in phpmyadmin and report back on the error message you're getting. Then go to the SVN and get includes/mysqli_functions.php and replace it on your archive.
I ran the query with both catid 19 and 21. I got no error message. It spit out the right values (as added by me) in each table.
I re-added mysqli_functions.php to the file manager, but the category counts are still not working. It still wipes out the numbers.
But are you getting that error message when you try to run it?
Yes! Same error message when I try and run it?
SELECT count(sid)
FROM fanfiction_stories WHERE
FIND_IN_SET('21', catid) AND validated
> 0
Error: ()
But you don't get an error message when you run it in phpmyadmin?
Nope! No error message. It works as it should.
I don't get it. You shouldn't be able to get an error in one without getting an error in both. You're running the same query after all. I am honestly stumped.
Very strange. I wish I could tell you more, but that's what is happening!
For now, I can fix the category counts manually - and they are adding and updating properly. I just know that hitting the Fix Category Counts will wipe everything out.
If any new info comes along, let me know.
One more little clue:
When new stories are added to categories that have subcategories, they update fine.
But when new stories are added to General, which has no subcategory - it doesn't add to the count.
Again, just piping up to see if anyone has a clue. It's very odd.
