我设法让FOS UserBundle与Sonata Admin / UserBundle一起使用本指南:
Integrate FOSUserBundle and SonataUserBundle Easily
然而,当我点击仪表板中的“启用”或“锁定”任何选项时,我会获得此html /日志代码,而不是启用,禁用,锁定,解锁等用户。
我该如何解决这个问题?
config.yml的代码如下---见下面和屏幕截图:
config.yml
# FOS UserBundle
fos_user:
db_driver: orm
firewall_name: main
user_class: Test\UserBundle\Entity\User
# user_class: Sonata\UserBundle\Entity\BaseUser
group:
group_class: Sonata\UserBundle\Entity\BaseGroup
group_manager: sonata.user.orm.group_manager # If you're using doctrine orm (use sonata.user.mongodb.user_manager for mongodb)
service:
user_manager: sonata.user.orm.user_manager # If you're using doctrine orm (use sonata.user.mongodb.group_manager for mongodb)
# doctrine:
#
# dbal:
# types:
# json: Sonata\Doctrine\Types\JsonType
# Sonata AdminBundle
sonata_block:
default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
sonata.user.block.menu: # used to display the menu in profile pages
sonata.user.block.account: # used to display menu option (login option)
sonata.block.service.text:
sonata.block.service.rss:
# Sonata UserBundle
sonata_user:
security_acl: true
manager_type: orm # can be orm or mongodb
sonata_block:
blocks:
#...
sonata.user.block.menu: # used to display the menu in profile pages
sonata.user.block.account: # used to display menu option (login option)
sonata.block.service.text: # used to if you plan to use Sonata user routes
parameters:
sonata.user.admin.user.entity: Test\UserBundle\Entity\User
sonata.user.admin.user.class: Test\UserBundle\Admin\UserAdmin
services:
sonata.user.admin.group:
abstract: true
public: false
错误代码
</li>
<li><code><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">finishRequest</span><span style="color: #007700">(</span><span style="color: #0000BB">$request</span><span style="color: #007700">, </span><span style="color: #0000BB">$type</span><span style="color: #007700">);</span></code></li></ol>
</div>
</li>
<li>
at
<strong>
<abbr title="Symfony\Component\HttpKernel\HttpKernel">HttpKernel</abbr>
->handle
</strong>
(<em>object</em>(<abbr title="Symfony\Component\HttpFoundation\Request">Request</abbr>), '1', <em>true</em>)
<br />
in <abbr title="/var/www/html/test/app/">kernel.root_dir</abbr>/bootstrap.php.cache at line 3058
<a href="#" onclick="toggle('trace-0-8'); switchIcons('icon-0-8-open', 'icon-0-8-close'); return false;"><img class="toggle" id="icon-0-8-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: none" /><img class="toggle" id="icon-0-8-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: inline" /></a> <div id="trace-0-8" style="display: none" class="trace">
<ol start="3055"><li><code><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">container</span><span style="color: #007700">-></span><span style="color: #0000BB">enterScope</span><span style="color: #007700">(</span><span style="color: #DD0000">'request'</span><span style="color: #007700">);</span></code></li>
<li><code><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">container</span><span style="color: #007700">-></span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'request'</span><span style="color: #007700">, </span><span style="color: #0000BB">$request</span><span style="color: #007700">,</span><span style="color: #DD0000">'request'</span><span style="color: #007700">);</span></code></li>
<li><code>try {</code></li>
<li class="selected"><code><span style="color: #0000BB">$response </span><span style="color: #007700">= </span><span style="color: #0000BB">parent</span><span style="color: #007700">::</span><span style="color: #0000BB">handle</span><span style="color: #007700">(</span><span style="color: #0000BB">$request</span><span style="color: #007700">, </span><span style="color: #0000BB">$type</span><span style="color: #007700">, </span><span style="color: #0000BB">$catch</span><span style="color: #007700">);</span></code></li>
<li><code>} catch (\<span style="color: #0000BB">Exception $e</span><span style="color: #007700">) {</span></code></li>
<li><code><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">container</span><span style="color: #007700">-></span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'request'</span><span style="color: #007700">, </span><span style="color: #0000BB">null</span><span style="color: #007700">,</span><span style="color: #DD0000">'request'</span><span style="color: #007700">);</span></code></li>
<li><code><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">container</span><span style="color: #007700">-></span><span style="color: #0000BB">leaveScope</span><span style="color: #007700">(</span><span style="color: #DD0000">'request'</span><span style="color: #007700">);</span></code></li></ol>
</div>
</li>
<li>
at
<strong>
<abbr title="Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel">ContainerAwareHttpKernel</abbr>
->handle
</strong>
(<em>object</em>(<abbr title="Symfony\Component\HttpFoundation\Request">Request</abbr>), '1', <em>true</em>)
<br />
in <abbr title="/var/www/html/test/app/">kernel.root_dir</abbr>/bootstrap.php.cache at line 2308
<a href="#" onclick="toggle('trace-0-9'); switchIcons('icon-0-9-open', 'icon-0-9-close'); return false;"><img class="toggle" id="icon-0-9-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: none" /><img class="toggle" id="icon-0-9-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: inline" /></a> <div id="trace-0-9" style="display: none" class="trace">
<ol start="2305"><li><code>if (<span style="color: #0000BB">false </span><span style="color: #007700">=== </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">booted</span><span style="color: #007700">) {</span></code></li>
<li><code><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">boot</span><span style="color: #007700">();</span></code></li>
<li><code>}</code></li>
<li class="selected"><code>return <span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">getHttpKernel</span><span style="color: #007700">()-></span><span style="color: #0000BB">handle</span><span style="color: #007700">(</span><span style="color: #0000BB">$request</span><span style="color: #007700">, </span><span style="color: #0000BB">$type</span><span style="color: #007700">, </span><span style="color: #0000BB">$catch</span><span style="color: #007700">);</span></code></li>
<li><code>}</code></li>
<li><code>protected function <span style="color: #0000BB">getHttpKernel</span><span style="color: #007700">()</span></code></li>
<li><code>{</code></li></ol>
</div>
</li>
<li>
at
<strong>
<abbr title="Symfony\Component\HttpKernel\Kernel">Kernel</abbr>
->handle
</strong>
(<em>object</em>(<abbr title="Symfony\Component\HttpFoundation\Request">Request</abbr>))
<br />
in /var/www/html/test/web/app_dev.php at line 28
<a href="#" onclick="toggle('trace-0-10'); switchIcons('icon-0-10-open', 'icon-0-10-close'); return false;"><img class="toggle" id="icon-0-10-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: none" /><img class="toggle" id="icon-0-10-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: inline" /></a> <div id="trace-0-10" style="display: none" class="trace">
<ol start="25"><li><code><span style="color: #0000BB">$kernel </span><span style="color: #007700">= new </span><span style="color: #0000BB">AppKernel</span><span style="color: #007700">(</span><span style="color: #DD0000">'dev'</span><span style="color: #007700">, </span><span style="color: #0000BB">true</span><span style="color: #007700">);</span></code></li>
<li><code><span style="color: #0000BB">$kernel</span><span style="color: #007700">-></span><span style="color: #0000BB">loadClassCache</span><span style="color: #007700">();</span></code></li>
<li><code><span style="color: #0000BB">$request </span><span style="color: #007700">= </span><span style="color: #0000BB">Request</span><span style="color: #007700">::</span><span style="color: #0000BB">createFromGlobals</span><span style="color: #007700">();</span></code></li>
<li class="selected"><code><span style="color: #0000BB">$response </span><span style="color: #007700">= </span><span style="color: #0000BB">$kernel</span><span style="color: #007700">-></span><span style="color: #0000BB">handle</span><span style="color: #007700">(</span><span style="color: #0000BB">$request</span><span style="color: #007700">);</span></code></li>
<li><code><span style="color: #0000BB">$response</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">();</span></code></li>
<li><code><span style="color: #0000BB">$kernel</span><span style="color: #007700">-></span><span style="color: #0000BB">terminate</span><span style="color: #007700">(</span><span style="color: #0000BB">$request</span><span style="color: #007700">, </span><span style="color: #0000BB">$response</span><span style="color: #007700">);</span></code></li>
<li><code>
</code></li></ol>
</div>
</li>
</ol>
</div>
<div class="block">
<div class="logs clear-fix">
<h2>
Logs
<a href="#" onclick="toggle('logs'); switchIcons('icon-logs-open', 'icon-logs-close'); return false;"><img class="toggle" id="icon-logs-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: none" /><img class="toggle" id="icon-logs-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: inline" /></a></h2>
<div class="error-count">
<span>
1 error
</span>
</div>
</div>
<div id="logs">
<ol class="traces logs">
<li>
INFO - Matched route "sonata_admin_set_object_field_value" (parameters: "_controller": "sonata.admin.controller.admin:setObjectFieldValueAction", "_route": "sonata_admin_set_object_field_value")
</li>
<li>
DEBUG - Read SecurityContext from the session
</li>
<li>
DEBUG - Reloading user from user provider.
</li>
<li>
DEBUG - SELECT t0.username AS username1, t0.username_canonical AS username_canonical2, t0.email AS email3, t0.email_canonical AS email_canonical4, t0.enabled AS enabled5, t0.salt AS salt6, t0.password AS password7, t0.last_login AS last_login8, t0.locked AS locked9, t0.expired AS expired10, t0.expires_at AS expires_at11, t0.confirmation_token AS confirmation_token12, t0.password_requested_at AS password_requested_at13, t0.roles AS roles14, t0.credentials_expired AS credentials_expired15, t0.credentials_expire_at AS credentials_expire_at16, t0.id AS id17 FROM user t0 WHERE t0.id = ? LIMIT 1
</li>
<li>
DEBUG - Username "admintest" was reloaded from user provider.
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController".
</li>
<li>
DEBUG - SELECT t0.username AS username1, t0.username_canonical AS username_canonical2, t0.email AS email3, t0.email_canonical AS email_canonical4, t0.enabled AS enabled5, t0.salt AS salt6, t0.password AS password7, t0.last_login AS last_login8, t0.locked AS locked9, t0.expired AS expired10, t0.expires_at AS expires_at11, t0.confirmation_token AS confirmation_token12, t0.password_requested_at AS password_requested_at13, t0.roles AS roles14, t0.credentials_expired AS credentials_expired15, t0.credentials_expire_at AS credentials_expire_at16, t0.id AS id17 FROM user t0 WHERE t0.id = ?
</li>
<li class="error">
CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Notice: Undefined index: enabled in /var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php line 390" at /var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php line 390
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener::onKernelController".
</li>
<li>
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController".
</li>
</ol>
</div>
</div>
<div class="block">
<h2>
Stack Trace (Plain Text)
<a href="#" onclick="toggle('traces-text'); switchIcons('icon-traces-text-open', 'icon-traces-text-close'); return false;"><img class="toggle" id="icon-traces-text-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: none" /><img class="toggle" id="icon-traces-text-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: inline" /></a> </h2>
<div id="traces-text" class="trace" style="display: none;">
<pre>[1] Symfony\Component\Debug\Exception\ContextErrorException: Notice: Undefined index: enabled in /var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php line 390
at n/a
in /var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php line 390
at Symfony\Component\Debug\ErrorHandler->handle('8', 'Undefined index: enabled', '/var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php', '390', array('property' => 'enabled'))
in /var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php line 390
at Symfony\Component\Validator\Mapping\ClassMetadata->getPropertyMetadata('enabled')
in /var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php line 171
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateProperty(object(User), 'enabled', null)
in /var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php line 116
at Symfony\Component\Validator\Validator\RecursiveValidator->validateProperty(object(User), 'enabled')
in /var/www/html/test/vendor/sonata-project/admin-bundle/Controller/HelperController.php line 273
at Sonata\AdminBundle\Controller\HelperController->setObjectFieldValueAction(object(Request))
in line
at call_user_func_array(array(object(HelperController), 'setObjectFieldValueAction'), array(object(Request)))
in /var/www/html/test/app/bootstrap.php.cache line 2947
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
in /var/www/html/test/app/bootstrap.php.cache line 2909
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
in /var/www/html/test/app/bootstrap.php.cache line 3058
at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
in /var/www/html/test/app/bootstrap.php.cache line 2308
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
in /var/www/html/test/web/app_dev.php line 28
</pre>
</div>
</div>
<script type="text/javascript">//<![CDATA[
function toggle(id, clazz) {
var el = document.getElementById(id),
current = el.style.display,
i;
if (clazz) {
var tags = document.getElementsByTagName('*');
for (i = tags.length - 1; i >= 0 ; i--) {
if (tags[i].className === clazz) {
tags[i].style.display = 'none';
}
}
}
el.style.display = current === 'none' ? 'block' : 'none';
}
function switchIcons(id1, id2) {
var icon1, icon2, display1, display2;
icon1 = document.getElementById(id1);
icon2 = document.getElementById(id2);
display1 = icon1.style.display;
display2 = icon2.style.display;
icon1.style.display = display2;
icon2.style.display = display1;
}
//]]></script>
</div>
</div>
</body>
</html>