开发者

Symfony admin generator generated module has no style

开发者 https://www.devze.com 2022-12-19 23:44 出处:网络
I am using Symfony 1.31 for a brand new project. I have just created a module in the backend app, using the admin generator. To my suprise, it seems no theme ((At all) has been applied to the pages. A

I am using Symfony 1.31 for a brand new project. I have just created a module in the backend app, using the admin generator. To my suprise, it seems no theme ((At all) has been applied to the pages. As I mentioned before, this si abrand new project - I have not even modified the /app/backend/layout.开发者_如何学Cphp file yet.

I rember having a similar problem before - I dont remmber how I solved it (I think I had to run a task or copy some files over to the /web folder before the styles/images etc came into efect. Can anyone refresh my memory?


You might need to run the plugin:publish-assets command:

php symfony plugin:publish-assets

This will create symlinks to your plugins' web/ directory inside your project's web/, thus enabling access to sfDoctrinePlugin's (or propel depending what ORM you use) admin-gen styles.


Check your apache configuration and files permissions, and especially the alias to the /sf/ subdirectory. It seems that the .css file corresponding to sf_admin pages are not accessible. You can fix it by adding an Alias to your virtualhost configuration, or allowing symlinks.

(By the way, hint: check your html source, find out the .css url, and try to access it directly with your browser)

0

精彩评论

暂无评论...
验证码 换一张
取 消