Skip to content

Commit

Permalink
Variable admin does not exist in SonataUserBundle:Admin/Core:user_blo…
Browse files Browse the repository at this point in the history
…ck.html.twig at line 7
  • Loading branch information
Luismi committed Feb 5, 2015
1 parent 27987d7 commit bf46422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/Admin/Core/user_block.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set _bg_class = "bg-light-blue" %}
{% set _logout_uri = url('sonata_user_admin_security_logout') %}
{% set _logout_text = 'user_block_logout'|trans({}, 'SonataUserBundle') %}
{% set _edit_profile_uri = admin.generateUrl('edit', {id: admin.id(app.user)}) %}
{% set _edit_profile_uri = url('admin_sonata_user_user_edit', {'id':app.user.id}) %}
{% set _edit_profile_text = 'user_block_profile'|trans({}, 'SonataUserBundle') %}
{% set _user_image = asset(sonata_user.defaultAvatar) %}
{# Customize this with your profile picture implementation, see below for example #}
Expand Down

4 comments on commit bf46422

@Atko
Copy link

@Atko Atko commented on bf46422 Feb 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this change I got the following error message:

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "admin_sonata_user_user_edit" as such route does not exist.") in SonataUserBundle:Admin/Core:user_block.html.twig at line 7.

@lumilo8
Copy link

@lumilo8 lumilo8 commented on bf46422 Feb 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What link? In my project works :(

@Atko
Copy link

@Atko Atko commented on bf46422 Feb 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right after login:
/app_dev.php/admin/dashboard

@lumilo8
Copy link

@lumilo8 lumilo8 commented on bf46422 Feb 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, this is the correct solution, sonata-project#514

Please sign in to comment.