Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
SP error log - Trying to get property of non-object
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 4, 2013 - 1:27 am

I've been keeping an eye on the SP error log since my recent issue and I am noticing the following re-occurring errors with three of the SP plug-ins:

file: cor8sh/public_html/eclasses/blog/wp-content/sp-resources/forum-plugins/admin-bar/library/sp-admin-bar-components.php
line: 520
function: sp_AdminBarDashboardPosts
Notice | Trying to get property of non-object

file: cor8sh/public_html/eclasses/blog/wp-content/sp-resources/forum-plugins/watches/template-tags/sp-watches-watch-button-tag.php
line: 54
function: sp_WatchesWatchButtonTag
Notice | Trying to get property of non-object

file: cor8sh/public_html/eclasses/blog/wp-content/sp-resources/forum-plugins/mentions/library/sp-mentions-components.php
line: 57
function: sp_mentions_do_new_post
Notice | Trying to get property of non-object

I don't see any effects on the actual forum or decreased functionality but am still wondering what might be causing those errors (didn't find any existing topic on this).

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 4, 2013 - 2:54 am

let's start by asking if you are up to date with all the latest SP updates? Core AND plugins that is...
This still suggests that some data has been deleted somewhere along the line outside of the SP UI. But let's look at these one at a time starting with the first one.

That notice suggests that your list of unread posts contains a topic ID that no longer exists. So - if you empty your personal unread post list does it reset itself to zero? And if it does - does that stop the notice being recorded?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 4, 2013 - 3:52 am

Yes, I am up to date on SP core and all plugins I am using.

I also just reset my unread posts. At first it would not clear all of them but kept showing 13 as still unread, no matter how often I clicked 'Mark All Topics As Read'. Once I emptied the admin postbag I was able to reset to 0. Will keep an eye on the error log and post feedback soon.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 4, 2013 - 4:10 am

Do you actually use the admin bar and the postbag? It is one of those things that if not used is best always left inactive. If it builds up to a long list it can slow performance for admins and moderators.

So yes - let's see if this one goes away before moving on please...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 4, 2013 - 4:28 am

Yes, I use the admin bar and postbag. I check messages several times a day right on the forum page and clear the postbag frequently. I find it to be a great admin tool, wouldn't want to miss it.

Unfortunately the previous steps did not resolve the issue, still seeing the same error messages.

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 4, 2013 - 4:34 am

Edited. Thought admin bar error had been resolved. But as of 20 minutes ago it re-appeared.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 4, 2013 - 10:07 am

admin bar error?  can you clarify?  or do you mean the notice from post #1??  a notice is not an error... just a nuisance...  like Andy though, unsure why you are getting it...

and you are only getting the notice on line 520?  not one also on 519?  if the topic did not exist, seems like both lines would throw a notice...

the watches notice is weird too.. also seems to imply you have a topic with no post...  not sure how that can happen...

your mentions one is odd too...  that line of code does not match the currently released plugin... earlier we asked if all your sp plugins were up to date...  but does not appear to be the case... mentions should be version 1.0.1... can you verify you have that version? 

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 4, 2013 - 10:24 am

I mean the notice from post #1. Since it's captured in errorlog I refer to it as an error though yes, it is declared a notice.

I can confirm that there is a notice for line 519 and 520 for admin bar.

So these notices indicate a topic without posts? We run this forum an our eCourse website. We run eCourses twice a year, 4 week duration with a 4 week extended access to the forum. After that we clear out the forum. Some topics are kept with just the initial posts by my wife and I for future courses. To clean these topics I use the move post feature and move the first non-admin post of those topics as well as all following posts to a dump topic for deletion (as it would otherwise be too time consuming to delete and rebuild the entire topics). Though I have not come across any issues doing this. But perhaps something went awry along the way during our last clean-up?

Note: out of curiosity went into phpmyadmin, pulled wp_sftopics and sorted by post_count. All topics have at least 1 post count.

Also, verified that mentions plugin is version 1.0.1.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 4, 2013 - 1:05 pm

so since both 519 and 520, that says you have a topic in your admin bar that does not exist (as Andy suggested - I thought otherwise based on only 520 comment)...  did you moderate any topics and delete theme from admin bar perhaps?

so in mentions file where you see the notice, what do you have for line 57? that should be:

    foreach ($names as $name) {

which wouldnt generate that notice...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 4, 2013 - 1:06 pm

but I could understand the potential for lin 59:

        $id = $user->ID;

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625