Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails: Images / CSS missing from time to time

Tags:

css

image

grails

While developing a website I experience a weird bug. From time to time my images or my css are missing.

It's not really predictable and therefore not reproducible.

Usually it happens after I edit my css, save it and reload the page (in the browser).

It's always syntactical correct CSS, so no compilation erros or anything similar.

I think it's the way Grails updates the running application, but I really can't say why or where it happens as it is quite rarely, but definitely annoying.

It doesn't matter if I run the application with my IDE (IntelliJ 9.0.4) or with the commandline (Windows).

The only thing I did not test so far is whether it happens only when I use the IDE or not.

Did anyone experience this?

EDIT: Sorry for an unclear description: "missing" means the browser is unable to load the corresponding ressource: "The Ressource () is not available"

Another Edit:

Thanks for the comments so far. In addition to my main css-file and my images, which change quite frequently, my reset-css-file disappeared. I never touched it since creation, so I think one can exclude the compilation-script as cause of this mess. (further info in the comments)

like image 399
Zobbl Avatar asked Nov 04 '22 14:11

Zobbl


1 Answers

Like John Smith I arrived here googling for this problem. But I found another solution, and i hope that it helps you too.

I googled a little bit more and found this discussion Disabling static resource stuff, here i found a contributor of grails application, and author of Resources Plugin, Mark Palmer (take a look his website), telling what he is doing and answering the questions about this plugin.

Today, all you need to do is to update the Resources Plugin to version 1.2-RC1 or a recent one that will fix this problem.

like image 89
leomeurer Avatar answered Nov 14 '22 01:11

leomeurer