Error being thrown, GenericMenu template

Started by Grammy, July 18, 2022, 02:00:34 PM

Previous topic - Next topic

Grammy

2.1.2, Default.  The error is Undefined array key "label" and the line is 121, GenericMenu.template.php



<a ', !empty($sub['selected']) ? 'class="chosen" ' : '', ' href="', $url, $menu_context['extra_parameters'], '">', $sub['label'], !empty($sub['amt']) ? ' <span class="amt">' . $sub['amt'] . '</span>' : '', '</a>

It seems to happen when the user is modifying his account.

I couldn't find anything about it here, using the search feature. 

Arantor

You have a mod with a bug, that is trying to add an item to the profile menu but not doing it properly.

You could replace that line of code with:


<a ', !empty($sub['selected']) ? 'class="chosen" ' : '', ' href="', $url, $menu_context['extra_parameters'], '">', isset($sub['label']) ? $sub['label'] : 'MISSING TEXT', !empty($sub['amt']) ? ' <span class="amt">' . $sub['amt'] . '</span>' : '', '</a>

This would prevent the errors and you'd see which item had MISSING TEXT as its text in the menu so you could start narrowing down what caused it.

Grammy

Quote from: Arantor on July 18, 2022, 02:03:08 PMYou have a mod with a bug, that is trying to add an item to the profile menu but not doing it properly.

You could replace that line of code with:


<a ', !empty($sub['selected']) ? 'class="chosen" ' : '', ' href="', $url, $menu_context['extra_parameters'], '">', isset($sub['label']) ? $sub['label'] : 'MISSING TEXT', !empty($sub['amt']) ? ' <span class="amt">' . $sub['amt'] . '</span>' : '', '</a>

This would prevent the errors and you'd see which item had MISSING TEXT as its text in the menu so you could start narrowing down what caused it.

Thanks so much, Arantor!  I'm on it.   :)

Advertisement: