URLs within CSS files broken with Grails resources plugin 1.2.7 -


recently upgraded grails project 2.3.7 , plugins newest, has brought resources plugin 1.2.7. worked fine grails 2.1.2 , resources plugin 1.2rc3, not:

whenever have css file references via url this

.checkbox-input-wrap.checked {   background-image: url(/img/uniform-assets/checkbox.png); } 

on webpage leads error (it leaving 'resource:/' on front of url)

get resource:/img/uniform-assets/checkbox.png net::err_unknown_url_scheme

according comment earlier, wasn't issue me because default resources under /images, /css , /js served adhoc resources in grails , testing .png file images.

i came across issue again colleague made me think twice. :) in case, trying access fonts /fonts provided plugin used in app.

before trying below answer, tried disable css rewriting adding below configuration:

//not required //grails.resources.rewrite.css = false 

but made no sense me dealing font resource.

ultimately, adding part of config.groovy fonts made trick. case, need below:

grails.resources.adhoc.includes = ['/img/**'] //if resource served plugin //grails.resources.adhoc.includes = ['/plugins/**', '/img/**'] 

if have configuration, like:

grails.resources.adhoc.includes = [     '/images/**', '/css/**', '/js/**', '/img/**' ] 

but said might not need adding adhoc includes existing resources in grails app.

go ahead

  • grails clean (to on safer side)
  • grails run-app.
  • clean browser cache (i prefer incognito mode in chrome, if chrome used)
  • hit app url

it should not complain resource more.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -