I am getting thousands of these errors since the upgrade to 1.1.2.
Notice: Undefined index: mentions
Notice: Undefined index: unread_messages
You are not alone, these errors are all over the place
Report them is the first step to have them fixed. :)
That one I think it's part of:
https://github.com/elkarte/Elkarte/issues/3124
so removing:
$labels = array();
from sources/subs/PersonalMessage.subs.php will do the trick. :)
And if you have the cache enabled, then you'll need to cleanup the cache as well.
https://github.com/elkarte/Elkarte/pull/3150/commits/b3c2eca714720cd0ca551ab32017f914602ec3d3
Deleting that line and clearing the cache did not get rid of the errors.
Errors are now coming from:
Notice: Undefined index: mentions
File: /home/creedmoo/public_html/sources/subs/Menu.subs.php
Line: 627
Notice: Undefined index: unread_messages
File: /home/creedmoo/public_html/sources/subs/Menu.subs.php
Line: 608
Notice: Undefined index: mentions
File: /home/creedmoo/public_html/themes/default/Theme.php
Line: 845
Notice: Undefined index: unread_messages
File: /home/creedmoo/public_html/themes/default/Theme.php
Line: 844
I'm not sure what I read yesterday... of course are two different things.
Would you mind including also the URL part of the error?
It doesn't need to have the domain name if you don't want, but at least everything else so that I can see where the error occurs.
Here are URLs:
http://www.65creedmoor.com/index.php?
http://www.65creedmoor.com/index.php?http://www.65creedmoor.com/
Oook.
These are (IMO) actually two issues:
1) errors happening too early were failing very disgracefully because the database is not yet loaded,
2) the parsing of the request fails because having "http" in the query is "evil".
The first is fixed here: https://github.com/elkarte/Elkarte/commit/dfd04508ad058e2252389dfc86909bea3fd61ba0 it's a bit more than what I wanted to change for this, but this way it should be a bit more robust (I think... I hope :P).
The second... I still have to apply "the fix" because I prefer to verify a couple of things, but to me the check could very well be removed because pointless.
I applied the fixes and deleted the cache, but I am still getting the same errors:
txcas
Today at 10:18:07 AM
45.27.161.195
3AXM6MRDZnlU0ALdc3vltDQ19WGljOUK
Type of error: Undefined
Notice: Undefined index: mentions
http://www.65creedmoor.com/index.php?
File: /home/creedmoo/public_html/sources/subs/Menu.subs.php
Line: 627
txcas
Today at 10:18:07 AM
45.27.161.195
3AXM6MRDZnlU0ALdc3vltDQ19WGljOUK
Type of error: Undefined
Notice: Undefined index: unread_messages
http://www.65creedmoor.com/index.php?
File: /home/creedmoo/public_html/sources/subs/Menu.subs.php
Line: 608
txcas
Today at 10:18:07 AM
45.27.161.195
3AXM6MRDZnlU0ALdc3vltDQ19WGljOUK
Type of error: Undefined
Notice: Undefined index: mentions
http://www.65creedmoor.com/index.php?
File: /home/creedmoo/public_html/themes/default/Theme.php
Line: 845
txcas
Today at 10:18:07 AM
45.27.161.195
3AXM6MRDZnlU0ALdc3vltDQ19WGljOUK
Type of error: Undefined
Notice: Undefined index: unread_messages
http://www.65creedmoor.com/index.php?
File: /home/creedmoo/public_html/themes/default/Theme.php
Line: 844
Ohh... you have simple portal, that's an important bit.
And on top of that, you have a menu block on the front page, and that's a crucial bit.
The problem is in SP, open /sources/subs/spblocks/Menu.block.php and change:
if (empty($context['menu_buttons']))
{
setupMenuContext();
}
to:
if (empty($context['menu_buttons']))
{
setupThemeContext();
setupMenuContext();
}
@Spuds that's for you! :D
Done .. thanks !
Thanks guys. The SP fix took care of the errors.