- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
使用这个 tutorial ,我正在尝试启动并运行 Symfony2 CMF。我能够启动框架,但没有加载任何样式或脚本。我收到 js 和 css 的错误:
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/3428277_bootstrap.min_1.css". en:14
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/06935bc_font-awesome_3.css". en:32
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/3428277_style_3.css". en:28
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/06935bc_create-ui_2.css". en:31
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/06935bc_tags_1.css". en:30
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/3428277_bootstrap-responsive.min_2.css". en:21
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/06935bc_overlay_7.css". en:36
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/06935bc_createStyle_6.css". en:35
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/06935bc_midgardnotif_4.css". en:33
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_jquery_1.js". en:283
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_jquery-ui_2.js". en:284
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://cmf.local/app_dev.php/css/06935bc_halloCmfStyle_5.css". en:34
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_underscore_3.js". en:285
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_rangy-core_5.js". en:287
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_vie_6.js". en:288
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_backbone_4.js". en:286
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_jquery.rdfquery.core_7.js". en:289
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_jquery.rdfquery.rules_8.js". en:290
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_annotate_10.js". en:292
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_create_11.js". en:293
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/create_jquery.tagsinput_9.js". en:291
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/ckeditor_ckeditor_1.js". en:297
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/ckeditor_init-create-ckeditor_2.js". en:298
Resource interpreted as Script but transferred with MIME type text/html: "http://cmf.local/app_dev.php/js/ckeditor_init-create-common_3.js".
这些样式和脚本是从 skeleton.html.twig:
加载的{% stylesheets
...
<link rel="stylesheet" href="{{ asset_url }}" media="screen" type="text/css"/>
{% endstylesheets %}
和
{% block bottom_scripts %}
{% render(controller("cmf_create.jsloader.controller:includeJSFilesAction", { "editor": "ckeditor", "_locale": app.request.locale })) %}
{% endblock %}
根据教程,这些样式应该可以正常加载。我还使用了 CMF 文档 here ,并且可以加载样式,但遇到了文档的许多其他问题。有什么我需要在我的 config.yml 中调整的吗?
更新
这似乎是 assetic 的问题。如果我手动将样式加载到 skeleton.html.twig 中,它们就会出现。
为什么 assetic 会导致这种 mime 类型转移?在这个庞大的框架中我没有正确的某些设置?
最佳答案
尝试转储 Assets :
$ app/console assetic:dump
09:27:19 [file+] /var/www/app/../web/css/06935bc.css
09:27:19 [file+] /var/www/app/../web/css/06935bc_tags_1.css
09:27:19 [file+] /var/www/app/../web/css/06935bc_create-ui_2.css
09:27:19 [file+] /var/www/app/../web/css/06935bc_font-awesome_3.css
09:27:19 [file+] /var/www/app/../web/css/06935bc_midgardnotif_4.css
09:27:19 [file+] /var/www/app/../web/css/06935bc_halloCmfStyle_5.css
09:27:19 [file+] /var/www/app/../web/css/06935bc_createStyle_6.css
09:27:19 [file+] /var/www/app/../web/css/06935bc_overlay_7.css
09:27:19 [file+] /var/www/app/../web/js/ckeditor.js
09:27:19 [file+] /var/www/app/../web/js/ckeditor_ckeditor_1.js
09:27:19 [file+] /var/www/app/../web/js/ckeditor_init-create-ckeditor_2.js
09:27:19 [file+] /var/www/app/../web/js/ckeditor_init-create-common_3.js
09:27:19 [file+] /var/www/app/../web/js/create.js
09:27:19 [file+] /var/www/app/../web/js/create_jquery_1.js
09:27:19 [file+] /var/www/app/../web/js/create_jquery-ui_2.js
09:27:19 [file+] /var/www/app/../web/js/create_underscore_3.js
09:27:19 [file+] /var/www/app/../web/js/create_backbone_4.js
09:27:19 [file+] /var/www/app/../web/js/create_rangy-core_5.js
09:27:19 [file+] /var/www/app/../web/js/create_vie_6.js
09:27:19 [file+] /var/www/app/../web/js/create_jquery.rdfquery.core_7.js
09:27:19 [file+] /var/www/app/../web/js/create_jquery.rdfquery.rules_8.js
09:27:19 [file+] /var/www/app/../web/js/create_jquery.tagsinput_9.js
09:27:19 [file+] /var/www/app/../web/js/create_annotate_10.js
09:27:19 [file+] /var/www/app/../web/js/create_create_11.js
09:27:19 [file+] /var/www/app/../web/js/hallo-extra.js
09:27:19 [file+] /var/www/app/../web/js/hallo-extra_jquery.htmlClean_1.js
09:27:19 [file+] /var/www/app/../web/js/hallo-extra_hallo_2.js
09:27:19 [file+] /var/www/app/../web/js/hallo-extra_init-create-hallo_3.js
09:27:19 [file+] /var/www/app/../web/js/hallo-extra_init-create-common_4.js
关于javascript - Symfony CMF CSS 未加载 : Resource interpreted as Stylesheet but transferred with MIME type text/html:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21141753/
解释用于评估 haskell 表达式吗?如果可以,我该如何使用它? Language.Haskell.Interpreter> :t interpret interpret :: (Data.Type
解释用于评估 haskell 表达式吗?如果可以,我该如何使用它? Language.Haskell.Interpreter> :t interpret interpret :: (Data.Type
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我今天正在帮助某人从我们作为 txt 文件读入的 pdf 文件中正则表达式一些信息。不幸的是,tm 包 readPDF 功能当时无法正常工作,尽管通过一些修改我们能够让它正常工作。当我们正则表达式从
我们以 Python 为例。如果我没记错的话,当你用它编程时,计算机首先将代码“翻译”成 C。然后再从 C 到汇编。汇编是用机器代码编写的。 (这只是我对此的一个模糊想法,所以如果我错了,请纠正我)但
这个问题在这里已经有了答案: 9年前关闭。 Possible Duplicate: Bootstrapping a language 为以目标语言编写的给定语言(例如 PyPy)配备解释器的重要性是什
这个问题在这里已经有了答案: 12年前关闭。 Possible Duplicate: What’s with the love of dynamic Languages 我已经阅读了this ,但我不
我有一个AST(抽象语法树),现在我想通过给它2个或多个数字来测试我的编译器,并期望输出带有数学运算结果的计算器(例如计算器)。 我的问题是,构建解释器的最佳方法是什么? AST节点的访问是递归的,因
这个问题在这里已经有了答案: What is the exact definition of a Metacircular Interpreter? (4 个回答) 3年前关闭。 同人可以向我解释一下
我正在研究我自己的玩具编程语言。现在我正在解释来自 AST 的源语言,我想知道编译为字节码然后解释它可以为我提供什么优势。 目前我想到了三件事: 数百次遍历语法树可能比在数组中运行指令慢,特别是如果数
我正在试验一个 3 加速度计分线板。 X 轴和 Y 轴很容易控制,但 Z 轴有点神秘。我试图找到一种方法来解释我的代码中的数据,以在设备在空中抬起时增加输出,并在降低时减少输出。这可能吗?如果是这样,
我是一个刚从其他IDE转到Pycharm的新用户。 我有一个关于交互式python解释器的问题,这是我运行脚本后可以键入变量以检查变量的“窗口”。 Pyscripter有一个叫做“Python解释器”
我记得遇到过一个网站,我可以在其中输入一些代码,它会编译并运行它(或出错),显示任何控制台输出。它接受各种解释型和非解释型语言——我特别记得我可以使用 C(也许也可以使用 Python...我不完全确
我问这个问题是因为我对解释器开发还比较陌生,我想在重新发明轮子之前了解一些基本概念。 我想到了存储在数组中的所有变量的值,该数组构成当前作用域,在进入函数时,数组将被交换,并将原始数组放入某种堆栈中。
我正在考虑在基于 Actor 的语言的解释器中使用类似 CPS 的东西。 函数参数在变体数组中传递,延续在同一个数组中返回,所以一个简单的函数 def add (x,y) => x + y 所以来自读
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 4 年前。
有没有办法改变对象在 Python 解释器中的显示方式?例如: >>> test = myobject(2) >>> test 'I am 2' 或 >>> test = myobject(2) >>
REPL 和解释器之间有什么技术区别吗? 最佳答案 交互式解释器使用 REPL。解释器不需要有一个。例如,您可以在非交互模式下(在文件上)运行 Python,并且它不会使用 read-eval-pri
在我看来,如果您使用解释性语言编写软件,那么销售软件一定很困难,因为购买它的任何人都可以毫不费力地对其进行编辑/更改/转售。 你如何解决这个问题?我有几个 PHP 应用程序,我不愿意出售给人们,因为他
我正在学习有关抽象解释的类(class),但是我还没有看到有关该理论如何映射到实际代码的任何示例。 我正在寻找简短的代码示例,在这些示例中,我最好不必使用整个编译器。分析不一定有用,我只想看一个示例,
我是一名优秀的程序员,十分优秀!