Support Forum

Subforum Notice

JS js
js
Member

I noticed a lot of these notices in the log, anything I can do to stop them?

file: /simple-press/forum/content/classes/sp-forum-view-class.php
line: 557
function: sp_forumview_build_subforums
Notice | Object of class spUser could not be converted to int

9 Answers

New Answer

JS js
js
Member

This one comes with it…. they occur when I click into a subforum.. I am using sp 5.3.1

file: /simple-press/forum/content/classes/sp-forum-view-class.php
line: 557
function: sp_forumview_build_subforums
Notice | Use of undefined constant _newposts – assumed ‘_newposts’

YS Yellow Swordfish
Yellow Swordfish
Member

The first one makes no sense to me at all as there is no variable/object named ‘spUser’ – only one named ‘spThisUser’.

The second one however is definitely incorrect and oddly, has been for a little while now. Would only be noticed by those with sub-forums I believe, which probably explains why it has been missed.

Are you up for a small code edit? If so then the plugin file you need is /simple-press/forum/content/classes/sp-forum-view-class.php – and the code line 557 in the function sp_forumview_build_subforums().

See this line of code (557):

if($spThisUser-_newposts && $spThisUser->newposts['forums']) {

That underscore in front of ‘newposts’ should be a right angle bracket as in:

if($spThisUser->newposts && $spThisUser->newposts['forums']) {

and I will make sure this is fixed up in the next update. Apologies fore that. It is odd how some of these things sit there for months unnoticed!

JS js
js
Member

No prob and thanks for the code, that stopped both of the notices from occurring :) . I am having another strange issue with subforums, after I upgraded from 5.3 to 5.3.1 I noticed if I am in group view it doesn’t display the last post author and title… maybe I edited something wrong in my sp theme…

subforum.png
MP Mr Papa
Mr Papa
Member

there wasnt anything in 5.3.1 that affected how subforums behaved (at least not intentionally)…

what does your template function usage look like in group view?  Should be something like this:                                sp_ForumIndexSubForums(‘unreadIcon=sp_SubForumUnreadIcon.png’, __sp(‘Sub-Forums’), __sp(‘Browse topics in %NAME%’))

but I will run a quick test and see if I can replicate your look…

MP Mr Papa
Mr Papa
Member

you said group view… but looking at your image, that wouldnt be what group view looks like…

can you elaborate where you are looking?  forum view or subfroum view?

JS js
js
Member

That’s the main forum page (homepage), I have the links that display the sub forums set to display:none;. I’m not sure how to recreate this because it happened upon upgrade but now if I have a forum with subforums and I post to the sub forum no user info appears on main page, I should mention the forum contains sub forums with topics but the forum itself has no topics….

JS js
js
Member

I recreated the problem on a test site, I will PM credentials so you can take a look if you want. I also have dead link when clicking the icon for “most recent topics with unread posts” on the main forum page but on all the inner forum pages clicking it does open the pop up…. weird…. I am using a new wp theme with sp and have had some bugs so I am assuming the dead “most recent topics with unread posts” is a javascript conflict? Maybe my subforum issue has to do with a wp theme conflict…

MP Mr Papa
Mr Papa
Member

well the subforum on group view shouldnt look anything like that… but it would look like that on forum view…  and didnt make it back last night to update but can see a problem on forum view and a ticket is open…

as to most recent, better to have different topic… multtiple issues in a single topic will confuse and get lost…  but are you using new page for it or popup?  if latter, probably a js conflict…

see:  http://codex.simple-press.com/codex/faq/troubleshooting/what-is-this-jquery-conflict/

MP Mr Papa
Mr Papa
Member

if you are going to send something, make sure its to BOTH yellow swordfish and mr papa… AND link back to this topic so we know what its about…

but not sure we need it since I ahve opened a ticket for the subforum view issue…