- Posts: 6
COMMUNITY FORUM
K2 Notice on the front page [Solved]
- Khlouk Rada
- Topic Author
- Offline
- New Member
Less
More
11 years 7 months ago - 11 years 7 months ago #110416
by Khlouk Rada
K2 Notice on the front page [Solved] was created by Khlouk Rada
Hi everyone! I'm new to K2. I just installed K2 and add the first article. Unfortunately, when I view the article on the front page, there is a notice above the article:
Notice: Undefined property: stdClass::$image1 in .........\components\com_k2\views\item\view.html.php on line 463.
Please kindly help me out. Thanks.
Notice: Undefined property: stdClass::$image1 in .........\components\com_k2\views\item\view.html.php on line 463.
Please kindly help me out. Thanks.
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
11 years 7 months ago #110417
by william white
Replied by william white on topic Re: K2 Notice on the front page
Joomla - Global Settings -Server Tab - Error reporting - None
Please Log in or Create an account to join the conversation.
- Khlouk Rada
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
11 years 7 months ago #110418
by Khlouk Rada
Replied by Khlouk Rada on topic Re: K2 Notice on the front page
Thanks for instant reply. But is there any other way round to tweak this notice if we don't want to turn the error message off?
Please Log in or Create an account to join the conversation.
- Khlouk Rada
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
11 years 7 months ago #110419
by Khlouk Rada
Replied by Khlouk Rada on topic Re: K2 Notice on the front page
I think it's best practice to solve the errors, warnings or even notices than to hide them.
Please Log in or Create an account to join the conversation.
- Khlouk Rada
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
11 years 7 months ago #110420
by Khlouk Rada
Replied by Khlouk Rada on topic Re: K2 Notice on the front page
I have found the solution. If you don't want to turn off the error reporting, you can do this to fix it.
Open this file: \components\com_k2\views\item\view.html.php
At line 463: change this codeto
Hope this can help others and very grateful for any replies.
Open this file: \components\com_k2\views\item\view.html.php
At line 463: change this code
if ($item->$facebookImage)
if(isset($item->$facebookImage))
Hope this can help others and very grateful for any replies.
Please Log in or Create an account to join the conversation.
- Diego Mascheroni
- Offline
- New Member
Less
More
- Posts: 1
10 years 10 months ago #110421
by Diego Mascheroni
Replied by Diego Mascheroni on topic Re: K2 Notice on the front page [Solved]
thank you Khlouk Rada, this line solved the problem :D
Please Log in or Create an account to join the conversation.