Notice: Trying to get property of non-object
- JAN
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
6 years 8 months ago #1
by JAN
Notice: Trying to get property of non-object was created by JAN
Hello,
When i click on a list and go ti its page i get this message :
Notice: Trying to get property of non-object inpublic/components/com_myshortlist/models/myshortlist.php on line 52
When i click on a list and go ti its page i get this message :
Notice: Trying to get property of non-object inpublic/components/com_myshortlist/models/myshortlist.php on line 52
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
6 years 8 months ago #2
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic Notice: Trying to get property of non-object
Hello JAN and thank you for posting.
It's strange that you got this message.
You can probably solve it by creating a hidden menu item of type "MyShortlist Default". I also changed a line in the code, so that it certainly doesn't occur, but it is only going to be included in the next release.
So, in the meantime, you may also try to change the line 52 of the file /components/com_myshortlist/models/myshortlist.php
from
to
Thanks again.
It's strange that you got this message.
You can probably solve it by creating a hidden menu item of type "MyShortlist Default". I also changed a line in the code, so that it certainly doesn't occur, but it is only going to be included in the next release.
So, in the meantime, you may also try to change the line 52 of the file /components/com_myshortlist/models/myshortlist.php
from
Code:
$module->language = $db_item->language;
Code:
$module->language = ($db_item) ? $db_item->language : 'en-GB';
Thanks again.
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
- JAN
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
6 years 8 months ago #3
by JAN
Replied by JAN on topic Notice: Trying to get property of non-object
Hello, thank you !
even if i dont use english lang as default language ?
even if i dont use english lang as default language ?
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
6 years 8 months ago #4
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic Notice: Trying to get property of non-object
Feel free to write something different if you don't use English as the default language, but it will be overwritten with the next update. The best way is to create your own hidden menu item and this setting won't even matter any more.
In fact, this is only used with certain components that store the language in their DB tables, like Virtuemart: #__virtuemart_products_en_gb
So, in general it won't be a problem even if you just leave it like that.
In fact, this is only used with certain components that store the language in their DB tables, like Virtuemart: #__virtuemart_products_en_gb
So, in general it won't be a problem even if you just leave it like that.
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
- JAN
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
6 years 8 months ago #5
by JAN
Replied by JAN on topic Notice: Trying to get property of non-object
Awesome, i ll leave it as its now and create a simple menu.
Please Log in or Create an account to join the conversation.
Moderators: Christopher Mavros