我的assetic:dump命令有问题。这是主要的主管理模板模板:基本上管理员需要的所有资源都存储在CoreBundle中:
Twig admin_base:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% block title -%}<title>Admin</title>{% endblock %}
{% block stylesheets %}
{% stylesheets
'@CoreBundle/Resources/public/css/bootstrap-theme.min.css'
'@CoreBundle/Resources/public/css/bootstrap.min.css'
'@CoreBundle/Resources/public/css/buttons.bootstrap.min.css'
'@CoreBundle/Resources/public/css/datatables.min.css'
'@CoreBundle/Resources/public/css/fine-uploader.min.css'
'@CoreBundle/Resources/public/css/font-awesome.min.css'
'@CoreBundle/Resources/public/css/jquery-ui.min.css'
'@CoreBundle/Resources/public/css/jquery-ui.structure.min.css'
'@CoreBundle/Resources/public/css/jquery-ui.theme.min.css'
'@CoreBundle/Resources/public/css/main.css'
'@CoreBundle/Resources/public/css/rowReorder.dataTables.min.css'
'@CoreBundle/Resources/public/css/signin.css'
%}
<link href="{{ asset(asset_url) }}" rel="stylesheet">
{% endstylesheets %}
{% endblock %}
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
{% block menu -%} {% endblock %}
{% block body -%} {% endblock %}
{% block javascripts -%}
{% javascripts
'@CoreBundle/Resources/public/js/jquery-1.11.3.min.js'
'@CoreBundle/Resources/public/js/bootstrap.min.js'
'@CoreBundle/Resources/public/js/fine-uploader.min.js'
'@CoreBundle/Resources/public/js/jquery-ui.min.js'
'@CoreBundle/Resources/public/js/datatables.min.js'
'@CoreBundle/Resources/public/js/Buttons-1.1.0/js/dataTables.buttons.min.js'
'@CoreBundle/Resources/public/js/Buttons-1.1.0/js/buttons.html5.js'
'@CoreBundle/Resources/public/js/Buttons-1.1.0/js/buttons.bootstrap.min.js'
'@CoreBundle/Resources/public/js/JSZip-2.5.0/jszip.min.js'
'@CoreBundle/Resources/public/js/RowReorder-1.1.0/js/dataTables.rowReorder.min.js'
%}
<script src="{{ asset(asset_url) }}" type="text/javascript"></script>
{% endjavascripts %}
{% endblock %}
{% block readyjs -%}
{{ tinymce_init() }}
<script type="text/javascript" >
function post_order ( ord, url)
{
$.ajax({
method: "POST",
url: url,
data: { elem: ord }
})
.done(function( msg ) {
// alert( msg );
});
}
$(document).ready(function () {
var optionsDatatables = {
dom: 'Bfrtip',
buttons: [
'copyHtml5', 'excelHtml5', 'csvHtml5'
]
}
if($('#dattab').hasClass('allow-order'))
{
//if we want more properties
// optionsDatatables.rowReorder = {
//selector: 'tr',
// update: true,
// dataSrc: '.ord-id'
// }
optionsDatatables.rowReorder = true;
}
var table = $('#dattab').DataTable(optionsDatatables);
var order;
if($('#dattab').hasClass('allow-order')) {
$('#dattab').on('draw.dt', function () {
var rows = table.rows().data();
var ord = new Array();
for (var i = 0, ien = rows.length; i < ien; i++) {
ord[i] = rows[i].DT_RowId;
}
order = ord;
$('#save_sort').fadeIn();
});
}
$('#save_sort').click(function(){
post_order(order,$('#dattab').data('url'));
$(this).fadeOut();
});
$('.datec').datepicker();
});
</script>
{% endblock %}
</body>
</html>
我安装资产,然后尝试转储它们。
我查看了缓存,所以它试图在同一个包中找到它但没有css文件夹:
<?php
// CoreBundle:Components:edit_delete.html.twig
return array (
'53dc317' =>
array (
0 =>
array (
0 => '@CoreBundle/Resources/public/css/bootstrap-theme.min.css',
1 => '@CoreBundle/Resources/public/css/bootstrap.min.css',
2 => '@CoreBundle/Resources/public/css/buttons.bootstrap.min.css',
3 => '@CoreBundle/Resources/public/css/datatables.min.css',
4 => '@CoreBundle/Resources/public/css/fine-uploader.min.css',
5 => '@CoreBundle/Resources/public/css/font-awesome.min.css',
6 => '@CoreBundle/Resources/public/css/jquery-ui.min.css',
7 => '@CoreBundle/Resources/public/css/jquery-ui.structure.min.css',
8 => '@CoreBundle/Resources/public/css/jquery-ui.theme.min.css',
9 => '@CoreBundle/Resources/public/css/main.css',
10 => '@CoreBundle/Resources/public/css/rowReorder.dataTables.min.css',
11 => '@CoreBundle/Resources/public/css/signin.css',
),
1 =>
array (
),
2 =>
array (
'output' => '_controller/css/53dc317.css',
'name' => '53dc317',
'debug' => NULL,
'combine' => NULL,
'vars' =>
array (
),
),
),
'c985255' =>
array (
0 =>
array (
0 => '@CoreBundle/Resources/public/js/jquery-1.11.3.min.js',
1 => '@CoreBundle/Resources/public/js/bootstrap.min.js',
2 => '@CoreBundle/Resources/public/js/fine-uploader.min.js',
3 => '@CoreBundle/Resources/public/js/jquery-ui.min.js',
4 => '@CoreBundle/Resources/public/js/datatables.min.js',
5 => '@CoreBundle/Resources/public/js/Buttons-1.1.0/js/dataTables.buttons.min.js',
6 => '@CoreBundle/Resources/public/js/Buttons-1.1.0/js/buttons.html5.js',
7 => '@CoreBundle/Resources/public/js/Buttons-1.1.0/js/buttons.bootstrap.min.js',
8 => '@CoreBundle/Resources/public/js/JSZip-2.5.0/jszip.min.js',
9 => '@CoreBundle/Resources/public/js/RowReorder-1.1.0/js/dataTables.rowReorder.min.js',
),
1 =>
array (
),
2 =>
array (
'output' => '_controller/js/c985255.js',
'name' => 'c985255',
'debug' => NULL,
'combine' => NULL,
'vars' =>
array (
),
),
),
'103aba8' =>
array (
0 =>
array (
0 => 'bundles/core/css/bootstrap.min.css',
1 => 'bundles/core/bootstrap-theme.min.css',
2 => 'bundles/core/datatables.min.css',
3 => 'bundles/core/fine-uploader.min.css',
4 => 'bundles/core/font-awesome.min.css',
5 => 'bundles/core/jquery-ui.css',
6 => 'bundles/core/jquery-ui.structure.min.css',
7 => 'bundles/core/jquery-ui.theme.min.css',
8 => 'bundles/core/main.css',
9 => 'bundles/core/rowReorder.dataTables.min.css',
10 => 'bundles/core/signin.css',
),
1 =>
array (
),
2 =>
array (
'output' => '_controller/css/103aba8.css',
'name' => '103aba8',
'debug' => NULL,
'combine' => NULL,
'vars' =>
array (
),
),
),
);
因此它也存在于缓存中的多个文件中。我无法理解发生了什么......
答案 0 :(得分:1)
您有另一个具有{% stylesheets ... %}
阻止的Twig模板。在这个块中,你有这个字符串:bundles/core/bootstrap-theme.min.css
。
尝试使用IDE找到它并进行修复。