It is currently Fri Dec 15, 2017 2:49 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: admirorgallery.php error
PostPosted: Thu Feb 27, 2014 11:07 pm 
Offline
Komusubi
Komusubi

Joined: Tue Dec 10, 2013 8:54 pm
Posts: 25
Hi all just upgraded to joomla 3.2.2 and gallery 5.0 my other galleries seem to be working properly but i am getting this error in one of my modules.

Notice: Undefined property: stdClass::$id in /home/bluegreyarmy/public_html/new/plugins/content/admirorgallery/admirorgallery.php on line 68

line 68 of that file is:

Code:
$AG->articleID = $row->id;


any idea why this is only happening in this module and not any of my articles?

Thanks,

Phil


Top
 Profile  
 
 Post subject: admirorgallery.php error
PostPosted: Thu Feb 27, 2014 11:07 pm 
Top  
PostPosted: Sat Mar 01, 2014 2:39 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
The module doesn't provide $row->id;.

You see when you use gallery in the article $row is actually and article object and it has it's ID ($row->id;)
In module case, $row is some other object (wonderful Joomla, doing things wrong) thus you get the error :)

One fix would be to ad a check:
Code:
if(isset($row->id))
{ $AG->articleID = $row->id;}
else
{$AG->articleID = 0;}

It will remove the notice. Also if you know what could be used as unique id in module case, please let me know. :)

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
PostPosted: Tue Mar 04, 2014 4:25 pm 
Offline
Komusubi
Komusubi

Joined: Tue Dec 10, 2013 8:54 pm
Posts: 25
I added the code you posted and I am still getting the same error message. Please advise


Top
 Profile  
 
PostPosted: Tue Mar 11, 2014 3:38 pm 
Offline
Komusubi
Komusubi

Joined: Tue Dec 10, 2013 8:54 pm
Posts: 25
Do you have another suggestion for this? The code you provided did not remove the error.

Thanks

Phil


Top
 Profile  
 
PostPosted: Wed Mar 12, 2014 12:43 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Can you post your file so I could check?

In the meantime, remove that part of code and just set :
Code:
$AG->articleID = 0;


This must remove the notice :)

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
 Post subject: Re: admirorgallery.php error
PostPosted: Wed Mar 12, 2014 12:43 pm 
Top  
PostPosted: Thu Mar 13, 2014 7:47 pm 
Offline
Komusubi
Komusubi

Joined: Tue Dec 10, 2013 8:54 pm
Posts: 25
well i thought i posted the file but i guess i forgot so here it is


Attachments:
admirorgallery.zip [2.96 KiB]
Downloaded 262 times
Top
 Profile  
 
PostPosted: Fri Mar 14, 2014 11:47 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Are you sure that you receive the same error again?

I just checked with original admirorgallery.php and I can see the error:
Notice: Undefined property: stdClass::$id in /opt/lampp/htdocs/joomla323/plugins/content/admirorgallery/admirorgallery.php on line 69

When I used the file you sent, there is no Notice. So you did add the fix correctly.

Can you please check again?

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
PostPosted: Sat Mar 15, 2014 2:44 am 
Offline
Komusubi
Komusubi

Joined: Tue Dec 10, 2013 8:54 pm
Posts: 25
I will try it again I see your error was on line 69 and mine was line 68. I will let you know the results


Top
 Profile  
 
PostPosted: Sat Mar 15, 2014 5:03 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
It is the same code, I just added a debug print so the line was pushed to 69 :)

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
 Post subject: Re: admirorgallery.php error
PostPosted: Sat Mar 15, 2014 5:03 pm 
Top  
PostPosted: Mon Mar 17, 2014 2:56 pm 
Offline
Komusubi
Komusubi

Joined: Tue Dec 10, 2013 8:54 pm
Posts: 25
I re-uploaded the file and the error is gone. Not sure what I did wrong the first time.

Thanks For the Awesome Support!!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group