Forums

'Notice: Undefined property: stdClass::' Errors...

revive 23 Nov, 2008
Hey Guys,
Just installed a copy of a remote site on our MAMP server to do a 'rebranding' and I am getting these errors:

Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 96
Notice: Undefined property: stdClass::$sectionid in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 120
Notice: Undefined property: stdClass::$catid in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 120
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 120
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 96
Notice: Undefined property: stdClass::$sectionid in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 120
Notice: Undefined property: stdClass::$catid in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 120
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/**domain_name***/plugins/content/ChronoComments.php on line 120


I have error reporting set to max, Yes, they do go away when set to simple, but I would like to dig in and find out why these errors are being thrown..
Any thooughts??

INFO:

Running CC v1.2 Express Install. Had same issue with fresh localhost site using CC v1.2 Express Install so I deleted and re-installed the stand alone plugin and it worked for that site.. didn't for this one.
J
Max_admin 23 Nov, 2008
Hi revive,

I guess these errors appear only at the frontpage or blog pages ?

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 23 Nov, 2008
Hey Max,

Yes, that is correct... any thoughts?
Max_admin 23 Nov, 2008
Hi revive, this has been fixed here before, look for the error i think and you should find the fix, let me know if you couldn't find it!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 23 Nov, 2008
Hey Max,
I already search the forums and the errors I found that were similar weren't exactly the same.. that is why I posted๐Ÿ˜€
Do you have a link to the solution or a recommendation?
J
revive 24 Nov, 2008
Hey Max,
ok, I did as the post said and opened plugins/content/ChronoComments.php

But mine does not have this code anywhere in it:

    if((JRequest::getVar('option') == 'com_newsfeeds')||(JRequest::getVar('option') == 'com_contact'))return;


Ideas??
Max_admin 24 Nov, 2008
Hi JC,

Add it after this line:
global $mainframe, $addChronoCommentscripts;


Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 25 Nov, 2008
Hey Max,

What I'm saying is that my plugins/content/ChronoComments.php DOESN'T have that line.. so how can I add your line of code below it?? ๐Ÿ˜€
Max_admin 25 Nov, 2008
Hi JC,

add this :

if(!$row->id)return;


after

global $mainframe;


let me know!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 25 Nov, 2008
No change.. same error codes..

:-/
Max_admin 25 Nov, 2008
Hi JC,

of which menu type is this page ? I can't generate these error here!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 26 Nov, 2008
Hey Max,

It shows on a std article menu item, as well as a section blog page..
I found, don't know why my search didn't work the last few times, the $global mainframe item, see code from below:

It shows a total of 5 times:

Line 16: 	global $mainframe, $addChronoCommentscripts;
Line 108: 	global $mainframe;
Line 153: 	global $mainframe;
Line 290: 	global $mainframe;
Line 335: 	global $mainframe;


After which line shown above show I insert:

    if(!$row->id)return;
Max_admin 26 Nov, 2008
the first one!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 27 Nov, 2008
Ok, inserted as directed.. still get these errors:

Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 98
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 109
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 98
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 109



When at first I got these errors:

Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 98
Notice: Undefined property: stdClass::$sectionid in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$catid in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 98
Notice: Undefined property: stdClass::$sectionid in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$catid in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$id in /Applications/MAMP/htdocs/matlockfun/plugins/content/ChronoComments.php on line 122
GreyHead 27 Nov, 2008
Hi Max and revive,

I just updated to the latest download and noticed that the previos version had a line at the start of plgContentChronocomments() to check that $row->id was valid. It was something like
if ( !is_object($row) || !isset($row->id) || $row->id == "" ) return;
That check doesn't seem to appear in the latest version.

Bob

PS It's quite possible that's a line of code that I added in my local installation but have forgotten about :-(
revive 27 Nov, 2008
Hey Bob,
Great to hear from you... can you give me a play-by-play on what file and how to make this adjustment??๐Ÿ˜€

Thanks
Max_admin 27 Nov, 2008
Hi Bob,

Well, I can't remember this line or why it has been removed but may be we can try now again!๐Ÿ™‚

@revive, it goes just under the function start! Let us know!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 27 Nov, 2008
Ok, here is how I implemented it, please let me know if it is correct

function plgContentChronocomments( &$row, &$params, $page=0 )
{    if ( !is_object($row) || !isset($row->id) || $row->id == "" ) return;
	global $mainframe, $addChronoCommentscripts;


It cleared the errors on the blog pages, but there is still an error on the article itself,.
Notice: Undefined property: ContentViewArticle::$item in /Applications/MAMP/htdocs/matlockfun/templates/sanidine/html/com_content/article/default.php on line 49

Notice: Trying to get property of non-object in /Applications/MAMP/htdocs/matlockfun/templates/sanidine/html/com_content/article/default.php on line 49
Max_admin 27 Nov, 2008
whats line 49 ? if its the line you just added then try to replace $row->id with $row->get('id') ?

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 27 Nov, 2008
Hi Max.

Line 49 is in the template - just checking . . .
. . . not helpful - line 49 in this version is </span>

Revive: Please post the line from your version of the template file.

. . . or maybe ...return false; will do the trick?

Bob
Max_admin 27 Nov, 2008
Hi Bob, well, I'm missing more things recently!! ๐Ÿ˜ฒ

@revive, as Bob said, please post line 49 from that file!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 27 Nov, 2008
Hey Guys,
Sorry for the delay.. got caught up with another set of errors on a different extension.. here is line 49 from my template file in templates/sanidine/html/com_content/article/default.php:

		<?php echo JHTML::_('date', $this->item->created, JText::_('<span class="ja-month">%b</span><span class="ja-date">%d</span>')); ?>
Max_admin 27 Nov, 2008
Hi revive,

tell me please (may be again) your joomla version and the page type you are getting this error at!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 28 Nov, 2008
1.5.3
I get these errors on category blog layouts:

Notice: Undefined property: stdClass::$id in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 98
Notice: Undefined property: stdClass::$sectionid in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$catid in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$id in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$id in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 139
Notice: Trying to get property of non-object in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 142
Notice: Trying to get property of non-object in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 142
Notice: Trying to get property of non-object in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 142
Notice: Undefined property: stdClass::$id in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 98
Notice: Undefined property: stdClass::$sectionid in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$catid in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$id in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 122
Notice: Undefined property: stdClass::$id in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 139
Notice: Trying to get property of non-object in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 142
Notice: Trying to get property of non-object in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 142
Notice: Trying to get property of non-object in /home1/***/public_html/***/plugins/content/ChronoComments.php on line 142


And these on Article pages:

Notice: Undefined property: ContentViewArticle::$item in /home1/***/public_html/***/templates/sanidine/html/com_content/article/default.php on line 49
Notice: Trying to get property of non-object in /home1/***/public_html/***/templates/sanidine/html/com_content/article/default.php on line 49
GreyHead 28 Nov, 2008
Hi revive,

This all looks as though Joomla is trying to display an article that doesn't exist.

Bob
revive 28 Nov, 2008
Here's a link to the live site:
matlockfun.com,

the error is on the 'Blog' menu item as well as the articles below it ...
I am upgrading to 1.5.8 right now and will post back if the error persists.. feel free to check the site and let me know if you see anything..
Thanks Bob!

jesse
GreyHead 28 Nov, 2008
Hi revive,

Nice site! But I don't see any error messages at all, checked the blog menu and a couple of posts.

Bob
revive 28 Nov, 2008
Thanks Bob,

My bad, I turned the error reporting off... set to on again..๐Ÿ˜€

Let me know what you see....
GreyHead 28 Nov, 2008
Hi revive,

I see the line 49 error
<div class="article-meta">
<span class="createdate">
<br/>
<b>Notice</b>
: Undefined property: ContentViewArticle::$item in
<b>/home1/passanie/public_ht...ntent/article/default.php</b>
on line
<b>49</b>
<br/>
<br/>
<b>Notice</b>
: Trying to get property of non-object in
<b>/home1/passanie/public_ht...ntent/article/default.php</b>
on line
<b>49</b>
<br/>
<span class="ja-month">Nov</span>
<span class="ja-date">28</span>
</span>
</div>
It appears to be linked to the display of the created date image somehow. What should be displaying in the missing span?

Nothing to do with ChronoComments though as far as I can see.

Bob
Max_admin 28 Nov, 2008
Hi JC, problem is still there after the upgrade ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 29 Nov, 2008
Oh man.. Max,.. is there ever a problem after the upgrade. This problem though has nothing to do with ChronoComments. We were hosting this site with Bluehost. Who, for some reason stopped providing the backups that we have paid for, AND whose server had a software hiccup and dropped our complete public_html folder!!! Uggh.. So, directly from our local dev server to a new host it goes. 3 sites down. 2.5 hours of sleep.. but, we're still smiling. If you know anyone considering a host, please warn them of Bluehost. After this incident, I researched some of their issues online and it seems that servers going down, memory and CPU limits being exceeded and lost data are becoming normal for them.

A total bummer.

Hey, question.. do you (or other forum members) recommend a stable, reseller oriented host?? thinking of Mosso Cloud by Rackspace at this point.. :]

As for the error.. we'll see if it exists after the site is restored.

Until then...๐Ÿ˜€
Max_admin 30 Nov, 2008
Hi JC, you may try: https://www.liquidweb.com

if you will use them and get some dedicated server then let me know so I can give you my referrer link๐Ÿ˜€

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 30 Nov, 2008
Hey Max,
I looked into Liquid as well.. still haven't chosen between the ones we're looking at, but if we go with Liquid I'll drop you a PM for the affiliate link๐Ÿ˜‰

Thanks for the info!

Jesse
Max_admin 30 Nov, 2008
Great, thanks!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revive 30 Nov, 2008
Hey Max,..
I know this is off subject,.. but would you be open to checking this php code and helping me figure out why it is throwing an error (using DirectPHP to parse within an article)

<?php
$db->setQuery("SELECT * FROM #__content WHERE id=121");
$rows = $db->loadObjectList();
$r = $rows[0];
$hits = $r->hits;
echo "<div class='hits'>Hits: $hits</div><br />";
?>

Also, here's the DirectPHP file if you are interested in helping me debug this.. the original developer gave me this code, and now he's kinda not helping to figure out why it isn't working..๐Ÿ˜Ÿ

Thanks Max,

And if not, no worries,.. I know you're busy and this is asking a lot.!
GreyHead 30 Nov, 2008
Hi revive,

You don't say what error is being thrown. But looking at the code snippet maybe $db isn't defined??

Bob
revive 30 Nov, 2008
Hey Bob,

My bad,.. here is the error:


Fatal error: Call to a member function on a non-object in /home/***********/public_html/plugins/content/DirectPHP.php(49) : eval()'d code on line 1
GreyHead 30 Nov, 2008
Hi revive,

If the problem is on line 1 that's the <?php tag so try putting in the php without the <?php & ?> tags

Bob
Max_admin 30 Nov, 2008
hey J, you didn't add
$database =& JFactory::getDBO();
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 01 Dec, 2008
Hi revive,

I agree with Max - ignore the line 1 issue and go back to my earlier post:

But looking at the code snippet maybe $db isn't defined??



Bob
heldrida 08 Dec, 2008
Hi,
first of all thanks very much for this excelent working example of a good comment
system! Really good!

Unfortunately, I'm having the same issue. I'm currently working with WAMP, while
developing my Joomla page. I dont know if this has something to do with chrono,
or some diferent issue my page may have.

This only happens while listing item/articles on SECTION and by CATEGORY! I mean
( com_content/section/blog_item.php and com_content/category/blog_item.php );
It works great on com_content/article


Notice: Undefined property: stdClass::$id in .......... on line 96;

And after putting if(!$row->id) return; after:

global $mainframe;

I get the same error but in the line where it were added if(!$row->id)


---------------------------------------- EDIT -----------------------------------------

Without putting the if(!$row->id) return;, I get the following errors:

Notice: Undefined property: stdClass::$id in C:\wamp\www\joomla15\plugins\content\ChronoComments.php on line 96
wish means:
$pageid = $row->id;


Notice: Undefined property: stdClass::$id in C:\wamp\www\joomla15\plugins\content\ChronoComments.php on line 120
wish means:
if((in_array($row->sectionid, (array)$configs->get('comment_sections')))||(in_array($row->catid, (array)$configs->get('comment_categories')))||(in_array($row->id, (array)$configs->get('comment_articles')))){


I dont know, but maybe Chrono is not connecting to the Database, and cant understand whats the meaning of $row ?
This only happens to $row->?!?!


Any sugestion will be appreciated!

Thanks!
GreyHead 08 Dec, 2008
Hi helrida,

Please set Error Reporting to System Default, Simple or None in your site configuration and the messages will probably disappear.

Bob
heldrida 08 Dec, 2008
Hi G'

Listen, thanks a lot for your time and atention!

I've been looking at previous conversations you had and found this sugestion:

function plgContentChronocomments( &$row, &$params, $page=0 )
{ if ( !is_object($row) || !isset($row->id) || $row->id == "" ) return;
global $mainframe, $addChronoCommentscripts;


Wish solves the issue!

I've got a question, in blog view (Section / Category listing), how can I retrieve the
number of comments available in a article item ?

PS - I want to do something like:

Written by Author in 10/12/2008 | Comments ( 10 )
Max_admin 09 Dec, 2008
Hi heldrida,

you mean you need to get the total of comments under all the articles under this category/blog ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
clinterman 06 Mar, 2009
Thanks Heldrida. This fix or yours is very good.
This topic is locked and no more replies can be posted.