Notifications
Clear all

Trouble fixing category counts

13 Posts
3 Users
0 Reactions
1,822 Views
(@guest7536)
Posts: 0
 

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!


 
Posted : 02/11/2010 9:44 am
(@honeybee_pa)
Posts: 23
Eminent Member
 

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. 🙂


 
Posted : 13/11/2010 5:10 pm
(@tammy)
Posts: 2577
Member Moderator
 

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).


 
Posted : 13/11/2010 6:36 pm
(@honeybee_pa)
Posts: 23
Eminent Member
 

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.


 
Posted : 13/11/2010 7:06 pm
(@tammy)
Posts: 2577
Member Moderator
 

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.


 
Posted : 13/11/2010 9:23 pm
(@honeybee_pa)
Posts: 23
Eminent Member
 

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.


 
Posted : 13/11/2010 10:51 pm
(@tammy)
Posts: 2577
Member Moderator
 

But are you getting that error message when you try to run it? 


 
Posted : 13/11/2010 11:29 pm
(@honeybee_pa)
Posts: 23
Eminent Member
 

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: ()


 
Posted : 13/11/2010 11:52 pm
(@tammy)
Posts: 2577
Member Moderator
 

But you don't get an error message when you run it in phpmyadmin?


 
Posted : 14/11/2010 1:25 am
(@honeybee_pa)
Posts: 23
Eminent Member
 

Nope! No error message. It works as it should.


 
Posted : 14/11/2010 8:00 am
(@tammy)
Posts: 2577
Member Moderator
 

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.


 
Posted : 14/11/2010 9:07 pm
(@honeybee_pa)
Posts: 23
Eminent Member
 

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.


 
Posted : 14/11/2010 11:01 pm
(@honeybee_pa)
Posts: 23
Eminent Member
 

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.


 
Posted : 16/11/2010 2:29 pm
Share: