リソースプラグインを使用してcache-busting change made to CKEditorを処理するGrails 2.5.2アプリケーションを取得できません。Grailsリソースがキャッシュ破棄CKEditorリリース(4.5.5+)で動作しない
grails.resources.adhoc.patterns = ['/js/*', '/images/*', '/css/*', '/plugins/*', '/thirdparty/*', '/templates/*']
grails.resources.adhoc.includes = ['/js/**', '/images/**', '/css/**', '/plugins/**', '/thirdparty/**', '/templates/**']
CKEditorバージョンコードはapp-dir/web-app/thirdparty/ckeditor
下に置かれ、バージョン4.5.9で現在次のようにリソースプラグインが構成されています。キャッシュ破棄の変更は4.5.5で行われ、バージョン4.5.4はグレイイルresources
で完全に機能します。
4.5.9でアプリを実行しているとき、私は、コンソールで次のエラーを取得する:
GET resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe net::ERR_UNKNOWN_URL_SCHEME
resources
プラグインは、ファイルが務めた(CKEditorバージョンのeditor.cssファイルの値とよく対処されていないようですアプリではapp-dir/thirdparty/ckeditor/skins/moono/editor.css?t=G4CD
をhttp://localhost:8080/app-dir/static/thirdparty/ckeditor/skins/moono/editor.css?t=G4CD
としています)。このファイルを直接見ると、resources
プラグインがイメージファイルのリンク(実際は最初のものを除く)を「リソース:/」で間違って置換していることを示すicons.pngファイルとicons_hidpi.pngファイルが次のように表示されます。 .. "そこにいる必要はないはずなので、コンソールエラーです。不思議なことに、このように変更されるのは、tパラメータを持つicons.pngファイルとicons_hidpi.pngファイルだけです。同じeditor.css
ファイル内の他の画像ファイルはそのままです。
.cke_button__bold_icon {background: url(icons.png?t=a35abfe) no-repeat 0 -0px !important;}
.cke_button__italic_icon {background: url(resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe) no-repeat 0 -24px !important;}
.cke_button__strike_icon {background: url(resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe) no-repeat 0 -48px !important;}
.cke_button__subscript_icon {background: url(resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe) no-repeat 0 -72px !important;}
次の設定を追加すると、アプリが実行され、完全に表示されます。
grails.resources.processing.enabled = false
私はckeditor's editor.css
ファイルを変更することからresources
を防止するための試みで
grails.resources.mappers.cssrewriter.excludes = ['/thirdparty/ckeditor/skins/moono/**']
を使用している場合は、何も変化していないようにみえます。
どうすればよいですか? 4.5.4にckeditorを残すことはできません。私が修正しようとしていることと対話があるからです。私はすでに同じ設定as recommended in another postを使用していますが、それでも問題は解決しません。 Disabling css rewriting altogetherは他のプラグインを破壊するだけです。
他の多くの提案されたソリューションを試した後で、これだけが私のために働いた(同じ問題ですが、Font AwesomeとGrails 2.5.5を使用)。ありがとう! – Drey