I get the following error:
Notice: Undefined variable: user in nice_menus_block_view() (line 254 of C:\wamp\www\seven\sites\all\modules\nice_menus\nice_menus.module).
Notice: Trying to get property of non-object in nice_menus_block_view() (line 254 of C:\wamp\www\seven\sites\all\modules\nice_menus\nice_menus.module).

Comments

jcarlson34’s picture

Status: Active » Needs review
StatusFileSize
new670 bytes

Looks like this might be an easy fix.

All this patch does is change line 254's if ($output['subject'] == t('Navigation') && $user->uid) { from 'Navigation' to 'navigation'.

The field menu_name in the menu_custom table has the menus listed by lowercase.

jcarlson34’s picture

StatusFileSize
new671 bytes

Shoot. Added a patch for HEAD. Here's a patch for 7.x-2.0-beta1 instead...

jlporter’s picture

Also have the same notice. Please roll into new beta?

add1sun’s picture

Status: Needs review » Fixed

Committed to HEAD. Thanks!

jcarlson34’s picture

Cool my first ever patch was committed. Woot! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

as2’s picture

As I have translations on my page, this does not work
if (($output['subject'] == t('Navigation')) && $user->uid)

this is fine tough
if (($output['subject'] == 'Navigation') && $user->uid)

Michael.Kling’s picture

Version: 7.x-2.0-beta1 » 7.x-2.0
Status: Closed (fixed) » Active

Had this issue with Nice Menus 7.x-2.0 and German translation active

I could solve it with a merge of as2's solution:
Changing
if ($output['subject'] == t('navigation') && $user->uid) {
to
if ($output['subject'] == 'navigation' && $user->uid) {

astonvictor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks