Keyword

Notice: Undefined property: stdClass::$author ... Trying to get property of non-object

  • Paul Bauder
  • Paul Bauder's Avatar Topic Author
  • Offline
  • New Member
More
14 years 9 months ago #86132 by Paul Bauder
At the top of all k2 items (in item view) I receive the notice:Notice: Undefined property: stdClass::$author in ..\components\com_k2\views\item\view.html.php on line 58 Notice: Trying to get property of non-object in ..\components\com_k2\views\item\view.html.php on line 58I have the most recent version of k2 (v2.3) installed.Does anyone have a solution?Thanks in advance,Paul

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #86133 by Lefteris
Hi. This is just a notice. You can set error reporting to "None" or "Simple" through Joomla! configuration to get rid of it. Of course it has been fixed for the next release. Thanks for reporting.

Please Log in or Create an account to join the conversation.

  • Paul Bauder
  • Paul Bauder's Avatar Topic Author
  • Offline
  • New Member
More
14 years 9 months ago #86134 by Paul Bauder
Could you be more specific as to how to set error reporting to 'none' or 'simple'? I assume you mean through Global Configurations, but I see no error reporting within the global configuration.

Thanks in advance.

Lefteris Kavadas said:Hi. This is just a notice. You can set error reporting to "None" or "Simple" through Joomla! configuration to get rid of it. Of course it has been fixed for the next release. Thanks for reporting.

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #86135 by william white

Please Log in or Create an account to join the conversation.

  • Paul Bauder
  • Paul Bauder's Avatar Topic Author
  • Offline
  • New Member
More
14 years 9 months ago #86136 by Paul Bauder
Oh, I see. Much thanks William.

William White said:check the server tab

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #86137 by Petitsuisse
Lefteris Kavadas said:Of course it has been fixed for the next release. Thanks for reporting.

Do you have any idea of when this new release will be available? or is there a patch available?

thanks,

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #86138 by Marek Wojtaszek
I need this patch too. Someone?

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #86139 by Marek Wojtaszek
Turning off error reporting doesn't help.

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #86140 by Valentine
Check Usergroups and user assigment to groups from K2

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #86141 by Nerijus Jovaras
I've checked "Check Usergroups and user assigment to groups from K2"
but my changes didn't remove the error.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #86142 by Jennifer Spencer
What steps will reproduce the problem?
1. Create a K2 article with author set to hidden (and php's error reporting is set to notice).
2. View the article in item layout
3. In some cases I got a notice message.

What is the expected output? What do you see instead?
I got 2 notice massages:
Notice: Undefined property: stdClass::$author in (...)\components\com_k2\views\item\view.html.php on line 58
Notice: Trying to get property of non-object in (...)\components\com_k2\views\item\view.html.php on line 58

What version of the product are you using? On what operating system?
2.3

Please provide any additional information below.
The line should be changed as follows for safer execution:
if (isset($item->author) && is_object($item->author->profile) && $item->author->profile->id > 0) {
(or load the author profile in any case in the model's prepare Item method)

Found on (code.google.com/p/joomlaworks/updates/list)

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #86143 by ruigato
is there any fix available for this?

Jennifer Spencer said:What steps will reproduce the problem? 1. Create a K2 article with author set to hidden (and php's error reporting is set to notice).
2. View the article in item layout
3. In some cases I got a notice message.

What is the expected output? What do you see instead?
I got 2 notice massages:
Notice: Undefined property: stdClass::$author in (...)\components\com_k2\views\item\view.html.php on line 58
Notice: Trying to get property of non-object in (...)\components\com_k2\views\item\view.html.php on line 58

What version of the product are you using? On what operating system?
2.3

Please provide any additional information below.
The line should be changed as follows for safer execution:
if (isset($item->author) && is_object($item->author->profile) && $item->author->profile->id > 0) {
(or load the author profile in any case in the model's prepare Item method)

Found on (code.google.com/p/joomlaworks/updates/list)

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #86144 by thejamkit
I tuned off Error reporting in Joomla! Global configuration under the server tab.... well actually set it up to default which I think is minimal, and doesnt show to the public end viewers. It may show up if you are logged in as an Administrator in the front end.

A patch or hack to this php file would really help though before the next release... any takers?

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #86145 by Ruud
Same here today after fiddling around with the Item View settings. Setting Error reporting in Joomla to Default solved it for now. Running K2 V2.4.1, patch would help!

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #86146 by stavroch

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #86147 by Birg

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #86148 by dvlancer
Just upgraded to 2.4.1 and have the same issue. Adding isset($item->author) fixed it.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum