Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: novill on October 02, 2012, 12:52:26 PM

Title: Undefined index: postcountFile
Post by: novill on October 02, 2012, 12:52:26 PM
I have lot of error in my forum error log.

http://.../index.php?action=post;msg=****;topic=**.****: Undefined index: postcountFile: /..../Sources/Post.php
Line: 2736

I have checked the post.php file, this is the mentioned line:

// Censor, BBC, ...
      censorText($row['body']);
      $row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg'], NULL, (int) $row['poster_id'], (int) $row['postcount']);

What can cause this error?
Title: Re: Undefined index: postcountFile
Post by: Kindred on October 02, 2012, 01:38:38 PM
do not hijack someone else's thread.
Your issue is completely different from the OP.
Title: Re: Undefined index: postcountFile
Post by: novill on October 02, 2012, 01:45:07 PM
Ok, thank you to moved this post to a new thread. :-[
Title: Re: Undefined index: postcountFile
Post by: TheListener on October 02, 2012, 06:38:11 PM
Which mods are installed on the forum?

Looks as though a mod has been installed more than once.
Title: Re: Undefined index: postcountFile
Post by: novill on October 03, 2012, 03:33:09 PM
I have lot a of mods. :

Locked topics Bottom    1.0     
Topic Solved    1.1.1     
Additional Profile Permissions    1.0.0     
Add Social Media Icons To Profiles    1.0.5     
Menu_Icons    1.0     
simple pictures upload    1.1.0     
Join date and Location in Posts    1.3     
Reputation system    1.8.3     
Tagging System    2.4.2     
Pm_Informer    3.0     
Simle Ads    1.0     
Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.1.0     
Welcome Topic    2.1     
MetaTags Modification    1.5     
SimplePortal    2.3.5     
Anti-Spam Linkek    1.0.1     
Today's topics    1.1     
Disable Signatures on replies    1.0     
FancyBox 4 SMF    0.5     
TopicStarter Mod    1.7     
SMF 2.0.2 Update    1.0     
Contact page    3.0     
Search Focus Dropdown    1.6.1     
Custom Copyright    1.2     
Custom Buttons    0.5     
Auto Merge Double Posts    1.3-fixed     
Related Topics    1.4     
Topic Rating Bar    0.7     
Users Online Today    2.0     
Global Headers Footers    2.0   
Facebook Slide Like Box    2.0.3     
Topic View Log    1.2     
Sitemap    2.2.0     
Simple .htaccess Bot Blocker Mod    1.1     
Happy Birthday    0.3     
Register Redirect    1.0   
Footer Menu v.1    v.1     
Mobile Device Detect    0.2.2     
YouTube BBCode    2.6     
Smart Pagination    0.8     
Global Headers Footers    2.0.1     
CSS Message Box    1.1     
Adk Snow Effect    2.0     
View Voters at Polls    1.0     
Separated Birthdays from Events   
SA KB    1.0.2a     
Avatar for banned members   
Top 10 Posters and Topic Starters Stats
ShowBannedMessage   
Ultimate Profile    0.9.1     
Board Icons Multiboard    0.1.0     
Simple .htaccess Cache Mod    2.6     
Links Title   
Stop Forum Spam     0.6     
Tidy Child Boards    1.4     
Thank-O-Matic V2.0 by SMFsimple.com    2.0     
Remove Help From Menu    1.0     
RSS Feed Icon    1.1     
Month User By Smfsimple.com    V1     
Spoiler Tag    1.04   
Menü System    0.2.5 


I have long time not looked the error log, i have no idea how long this error exist.
The last installed mod is the FancyBox 4 SMF.
Title: Re: Undefined index: postcountFile
Post by: Kindred on October 03, 2012, 03:43:29 PM
yeah.... there's a pretty good chance that one of those mods is responsible.

you should always install one mod at a time and test between installs.
Title: Re: Undefined index: postcountFile
Post by: kat on October 03, 2012, 04:52:42 PM
Just a hunch...

Auto Merge Double Posts

Whatever version I put into the parser, though, I get a bloody stupid error. So, I can't check that.
Title: Re: Undefined index: postcountFile
Post by: novill on October 04, 2012, 12:37:51 PM
Quote from: K@ on October 03, 2012, 04:52:42 PM
Auto Merge Double Posts

I have uninstalled the mod, but the error still exist. It seems the Auto Merge Double Posts is not the problem. Any idea?  :)
Title: Re: Undefined index: postcountFile
Post by: kat on October 04, 2012, 12:55:05 PM
So... Was the error manifesting itself, before you installed Fancy Box?

This is how that section looks, in the standrd file:

// Censor, BBC, ...
censorText($row['body']);
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']);


This is yours:

// Censor, BBC, ...
censorText($row['body']);
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), NULL, (int) $row['poster_id'], (int) $row['postcount']);


So, we need to figure-out where the:

, NULL, (int) $row['poster_id'], (int) $row['postcount'])

has come from.

Are there any comments, in that file, to help identify the mod?
Title: Re: Undefined index: postcountFile
Post by: kat on October 04, 2012, 01:09:06 PM
Just had another thought.

Did you uninstall a mod that did something "Post-count", sometime?

Maybe, if you attach the file to your next post, we can take a look?
Title: Re: Undefined index: postcountFile
Post by: Shambles on October 04, 2012, 01:14:48 PM
Quote from: K@ on October 04, 2012, 01:09:06 PM
Did you uninstall a mod that did something "Post-count", sometime?

Call me a saddo if you like.

In fact, I recommend it.

I just downloaded around 75% of the above listed mods (that seemed partially relevant to extracting post details) and checked their installation instructions - not one implemented that change to Subs.php, leading me to think it's a leftover from an uninstalled mod (ie, isn't in the list supplied above). Or maybe I wasn't sad enough and missed it on my trawl through.

I did say you could call me a saddo...
Title: Re: Undefined index: postcountFile
Post by: kat on October 04, 2012, 01:15:48 PM
Maybe you ought to look at Post.php, mate. ;)

(I've been doing the same, which made me wonder about a mod that's been uninstalled.
Title: Re: Undefined index: postcountFile
Post by: Shambles on October 04, 2012, 01:17:31 PM
Yeah I meant Post.php
Title: Re: Undefined index: postcountFile
Post by: kat on October 04, 2012, 01:18:58 PM
Phew. I had visions of you trashing your keyboard, then. ;)
Title: Re: Undefined index: postcountFile
Post by: Shambles on October 04, 2012, 01:20:38 PM
It might be useful if Mr Novill could show us a list of the contents of his Packages directory, so we can see if any extant mod zips are listed in there.

How's about it Novvy?
Title: Re: Undefined index: postcountFile
Post by: novill on October 04, 2012, 01:31:21 PM
The only mod that i have deleted is the sa facebook.


Quote from: Shambles™

I just downloaded around 75% of the above listed mods (that seemed partially relevant to extracting post details) and checked their installation instructions - not one implemented that change to Subs.php, leading me to think it's a leftover from an uninstalled mod (ie, isn't in the list supplied above). Or maybe I wasn't sad enough and missed it on my trawl through.

That is not a bad idea, i will check in a new install (localhost test site) all my installed mods which one is modifying the mentioned section and file.
Title: Re: Undefined index: postcountFile
Post by: Shambles on October 04, 2012, 01:53:17 PM
What's this mod? I can't seem to locate it...

Quote
Today's topics    1.1     
Title: Re: Undefined index: postcountFile
Post by: kat on October 04, 2012, 02:15:43 PM
Nearest I can find is this one:

http://custom.simplemachines.org/mods/index.php?mod=2682

Nothing gets done with Post.php, with that, either. :(
Title: Re: Undefined index: postcountFile
Post by: Shambles on October 04, 2012, 02:18:50 PM
I still cannot locate a package with an <Id> of "Todays topics".

Title: Re: Undefined index: postcountFile
Post by: kat on October 04, 2012, 02:28:56 PM
Me neither.

Maybe it's from another site, or something.
Title: Re: Undefined index: postcountFile
Post by: novill on October 04, 2012, 02:41:06 PM
Quote from: K@ on October 04, 2012, 02:15:43 PM
Nearest I can find is this one:

http://custom.simplemachines.org/mods/index.php?mod=2682

Nothing gets done with Post.php, with that, either. :(

It's the same.  ::) Lot of mods name are translated to my language. I have back translated to the original language that everyone knows what mods are installed :)
Title: Re: Undefined index: postcountFile
Post by: Shambles on October 04, 2012, 03:03:13 PM
It might be a red herring, as novill's post from 29th Jan (http://www.simplemachines.org/community/index.php?topic=466985.msg3263477#msg3263477) suggests it's also known as "Today's topics / replies    1.1" and no mention of "undefined index: postcount" was made, but I'd still like to see it.
Title: Re: Undefined index: postcountFile
Post by: Shambles on October 04, 2012, 03:05:07 PM
At the end of the day, you could just remove those bits from Post.php and see if anything misbehaves on your forum.
Title: Re: Undefined index: postcountFile
Post by: kat on October 04, 2012, 03:05:34 PM
Well, as I said, that doesn't edit Post.php, anyway. So, I doubt it's that. (I could be wrong, though).

Sure is weird, this one.

Quote from: K@ on October 04, 2012, 01:09:06 PMMaybe, if you attach the file to your next post, we can take a look?
Title: Re: Undefined index: postcountFile
Post by: novill on October 06, 2012, 01:17:58 PM
Quote from: K@ on October 04, 2012, 03:05:34 PM
Quote from: K@ on October 04, 2012, 01:09:06 PMMaybe, if you attach the file to your next post, we can take a look?

I have overlooked this post, i have attached the post.php file.

Edit:

I have checked which mod is modifying the mentioned section and i find that the Anti-Spam Links 1.0.1 is modifying the next section.

this
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']);

to this
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg'], NULL, (int) $row['poster_id'], (int) $row['postcount']);
Title: Re: Undefined index: postcountFile
Post by: kat on October 06, 2012, 01:33:06 PM
We may have something to work with. :)

That line of code is in a block with the following comment:

// Start of Anti-Spam-Links mod

Looks like that hasn't installed, properly.

Read my sig, first. ;)

Try uninstalling it and installing it, again. (After you've backed-up)
Title: Re: Undefined index: postcountFile
Post by: novill on October 06, 2012, 02:28:05 PM
I make always backup. :)
I have uninstalled and then install again, the error is still there. When this modification is removed there is no error, so it causes the errors.

That's meaning that this mod has a bug? I know that is a RC5 release, but it seems to working, just creating lot of errors. I know errors are there for a reason.

http://custom.simplemachines.org/mods/index.php?mod=2404
Title: Re: Undefined index: postcountFile
Post by: kat on October 06, 2012, 02:33:05 PM
I checked-out the support topic and I didn't see any reference, there, to this error. :(

If I were you, I'd post in the topic, to see if the author has any ideas. You can always put a link to this topic, to save you typing everything out, again. :)
Title: Re: Undefined index: postcountFile
Post by: novill on October 06, 2012, 02:55:37 PM
Thanks for your help, i will write to the support topic. :)
Title: Re: Undefined index: postcountFile
Post by: kat on October 07, 2012, 06:33:12 AM
(http://www.katzy.dsl.pipex.com/Smileys/c014.gif)