Sitemap Module
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6
Back to this add-on's main page
View Other Add-ons From Brian Litzinger
Trying to get property of non-object ... Line 128
Support (Resolved)
fc
|
Posted: 25 April 2012 06:42 PM |
# 16
|
|
|
I’m having the same issue.
Works when I stick a @ on line 128. I’ll report back with anything I find.
FWIW I just upgraded from 2.5 to 2.5.1.
UPDATE
Not so sure I understand your logic on that line.
// check if this channel has no settings or it should be included if ($settings->num_rows == 0 || $setting->included == 1) { // wrap statuses in quotes for mysql $statuses = "'".str_replace(',', "','", $setting->statuses)."'"; }
How would a single $setting->statuses ever return a proper object if the num_rows of $statuses == 0. That’s what’s causing your warning.
I don’t think sticking @ in front of it hurts but the logic needs to be rethought here. I pondered a bit on it but couldn’t figure it out.
|
|
|
PutYourLightsOn
|
Posted: 26 April 2012 06:29 AM |
# 17
|
|
|
the logic is “if there are no settings OR if there are and the included setting is 1” so it should be correct. can you paste the exact warning you get with 2.5.1 please?
|
|
|
fc
|
Posted: 26 April 2012 12:41 PM |
# 18
|
|
|
PutYourLightsOn - 26 April 2012 06:29 AM the logic is “if there are no settings OR if there are and the included setting is 1” so it should be correct. can you paste the exact warning you get with 2.5.1 please?
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: sitemap/mod.sitemap.php
Line Number: 128
This occurs only when you have a channel that has no status group assigned.
|
|
|
dvl
|
Posted: 06 May 2012 10:51 PM |
# 19
|
|
|
Hey - we are having the same error as well. I have gone through all the channels twice to confirm that they have a status group assigned (and I updated the channels when I did this). Here’s my error message:
<h4>A PHP Error was encountered</h4>
<p>Severity: Notice</p> <p>Message: Trying to get property of non-object</p> <p>Filename: sitemap/mod.sitemap.php</p> <p>Line Number: 128</p>
I’ve got Sitemap 2.5.1 and EE v2.4.0 - Build: date 20120123.
Any help would be greatly appreciated!
|
|
|
PutYourLightsOn
|
Posted: 07 May 2012 05:45 AM |
# 20
|
|
|
could you try uninstalling and then installing the module from within the CMS? please note this will delete your settings so make a note of them first. should solve your issue though…
|
|
|
Peccavio
|
Posted: 19 May 2012 01:11 AM |
# 21
|
|
|
Hate when I get to the end of a resolved thread without being resolved.
Newbie issues sometimes are hard to see by someone that it works for.
This error does not hve to be a bad channel status…
could be thesitemap is not intiaized
Clicking on “Update Channels” fixed this error for me
|
|
|
Jubair Saidi
|
Posted: 25 May 2012 12:27 PM |
# 22
|
|
|
in the conditional statement adding && !empty($setting->statuses) would also fix this issue.
|
|
|