admirorgallery.php error

Admiror Gallery 5.x.x for Joomla 3.x. support forum.
Post Reply
Message
Author
philadler
Komusubi
Komusubi
Posts: 25
Joined: Tue Dec 10, 2013 8:54 pm

admirorgallery.php error

#1 Post by philadler »

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: Select all

$AG->articleID = $row->id;
any idea why this is only happening in this module and not any of my articles?

Thanks,

Phil

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: admirorgallery.php error

#2 Post by Vasiljevski »

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: Select all

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

philadler
Komusubi
Komusubi
Posts: 25
Joined: Tue Dec 10, 2013 8:54 pm

Re: admirorgallery.php error

#3 Post by philadler »

I added the code you posted and I am still getting the same error message. Please advise

philadler
Komusubi
Komusubi
Posts: 25
Joined: Tue Dec 10, 2013 8:54 pm

Re: admirorgallery.php error

#4 Post by philadler »

Do you have another suggestion for this? The code you provided did not remove the error.

Thanks

Phil

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: admirorgallery.php error

#5 Post by Vasiljevski »

Can you post your file so I could check?

In the meantime, remove that part of code and just set :

Code: Select all

$AG->articleID = 0;
This must remove the notice :)
Help Admiror Gallery become even better,
give us a review on JED

Admiror Gallery 5 - Fundraising Campaign

philadler
Komusubi
Komusubi
Posts: 25
Joined: Tue Dec 10, 2013 8:54 pm

Re: admirorgallery.php error

#6 Post by philadler »

well i thought i posted the file but i guess i forgot so here it is
Attachments
admirorgallery.zip
(2.96 KiB) Downloaded 1194 times

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: admirorgallery.php error

#7 Post by Vasiljevski »

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

philadler
Komusubi
Komusubi
Posts: 25
Joined: Tue Dec 10, 2013 8:54 pm

Re: admirorgallery.php error

#8 Post by philadler »

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

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: admirorgallery.php error

#9 Post by Vasiljevski »

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

Admiror Gallery 5 - Fundraising Campaign

philadler
Komusubi
Komusubi
Posts: 25
Joined: Tue Dec 10, 2013 8:54 pm

Re: admirorgallery.php error

#10 Post by philadler »

I re-uploaded the file and the error is gone. Not sure what I did wrong the first time.

Thanks For the Awesome Support!!!!

Post Reply