简体   繁体   English

Dev在app_dev.php中可见,但在app.php中不可见

[英]Dev visible in app_dev.php but not visible in app.php

I work on an app in symfony 2 which uses the sonata-admin bundle. 我在使用sonata-admin软件包的symfony 2中开发了一个应用程序。 I added 6 vars in my entity, and I can edit their value in my back-office to see the result in the front office. 我在实体中添加了6个变量,然后可以在后台编辑它们的值以在前台查看结果。

Everything works fine when I go to my website in app_dev.php (and app_dev.php/admin for the back office) 当我访问app_dev.php中的网站(以及后台的app_dev.php / admin)时,一切正常

But when I try to access to the website within the app.php, the changes don't show in my front office and I have a 404 error in the back. 但是,当我尝试访问app.php中的网站时,更改未在我的前台显示,并且我的后面出现404错误。 If I explicite the vars's typos in the $formMapper of the sonata admin's configureFormFields function, I can see my form but it doesn't get back the values already stored in the database. 如果我在奏鸣曲管理员的configureFormFields函数的$ formMapper中显式显示vars的拼写错误,则可以看到我的表单,但它不会取回已经存储在数据库中的值。

I must precise I tried all clear cache options possible, with --env, --no-debug, and I tried to delete the app/cache/prod folder, create it again with the permissions. 我必须精确地说,我尝试使用--env,-no-debug尝试所有可能的清除缓存选项,并且尝试删除app / cache / prod文件夹,并使用权限再次创建它。 Apache logs do not show anything in particular. Apache日志没有特别显示任何内容。

Thank you for your help. 谢谢您的帮助。

尝试清除缓存

 php bin/console cache:clear --no-warmup --env=prod

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM