Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Notice after update to 2.2
loliserver
New
I get this Notice after update to 2.2
Trying to get property of non-object in /www/vanilla/applications/vanilla/views/categories/all.php line 14
0
Comments
Make sure all your files got updated and that you don't have an old version of that file.
Im following this guide:
Backup your database, .htaccess and conf/config.php file somewhere safe.
Upload the new release's files so they overwrite the old ones.
Go to yourforum.com/utility/update to force any updates needed.
If it fails, try it a second times by refreshing the page.
and... same problem
Now I get this:
vanilla/applications/vanilla/models/class.categorymodel.php line 631
Help?
re-install the 2.2 files again.
then post Complete error messages
after you copy all the files again.
also do you have a very large forum?
what php version are you using?
what OS are you using.
did you disable all your plugins and switch to the default theme.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
My forum is a fresh install with version 2.2rc1, then I update to 2.2 core.
I reinstalled and same error:
PHP Version 5.6.12
Windows Xampp
Turn off debugging and the "Notice" should disappear, if it truly is a notice and not a fatal error, you might be ok.
although ideally notices in vanilla with fresh install should not appear.
if you are not actively debugging a problem , make sure you turn off debugging in conf/config.php
$Configuration['Debug'] = false; to your /conf/config.php file.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@loliserver I suspect the file in question did not get properly updated on your server when you upgraded.
the reason why I think this is notice with the core install is because I have seen it on 3 server installs with no plugins on various hosts and 2 OSs with different versions of php.
perhaps it is not a file update issue. (unless the core zip in the addons is wrong).
if someone could download a fresh install of 2.2 and goto the categories link and turn on debug in config.php. it will be interesting for someone to corroborate or prove me incorrect.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@Linc but I have replaced the file with all.php from core 2.2
I made a fresh install and works fine, I don't have errors in the debug:
This is weird, these errors only are showed when I upgrade Vanilla 2.2rc1 to 2.2 core.
The plot thickens!
I have no idea. It sounds like you'd need to do serious PHP debugging to find that glitch and that's pretty difficult to accomplish over a forum, which likely isn't worth it when it's probably safe to ignore.
Nvm is showed:
with
$this->data('Category')->Depth
implies$this->data('Category')
is not an object/or doesn't return anything, or at least not in this case.$this->data('Category.Depth', 0)
would be safer.if you look at
CategoriesController
Index
method.$this->SetData('Category', $Category, TRUE);
is only there when there is category identifier.@loliserver compare pages
/categories/
with/categories/all
grep is your friend.
also compare with
/categories/general
grep is your friend.
The problem seem obvious but I need to go to bed, will test in the morning.
grep is your friend.
fyi @x00 without any code changes
and using the links
/categories/
/categories/all
/categories
all display the notice
and
with your change in applications/vanilla/views/categories/all.php
the notice disappears.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
???
$this->data('Category')
in all.php can't see that$MaxDisplayDepth = c('Vanilla.Categories.MaxDisplayDepth') + $this->data('Category.Depth', 0);
this worksI realised that all wouldn't work, becuase it returns NULL category you can't have an attribute of null. You need an actual category.
This is why I develop with notices on to catch problems like this.
grep is your friend.