|
I'm struggling a bit trying to disable resource management of images. It seems I have the scaffolding images in in apps web-app/images folder but I get 404 not found trying to access them. I've tried to remove:
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*'] I've also tried removing the images part instead of commenting the whole thing out: grails.resources.adhoc.patterns = '/css/*', '/js/*', '/plugins/*'] and set grails.resources.rewrite.css = false grails.resources.processing.enabled = false However I still got 404s For example /myapp/images/skin/house.png is not found. Is there anything else I can do to disable things mucking with my image paths? Even /static/images/skin/house.png is not found either. I'm coming from Grails 1.3.x land where the resources plugin isn't forced on me so this is a bit perplexing :) It still seems to rewrite image access to /static as well, from what I understand if I remove it from the adhoc patterns it should not be messing with the images? There are all images using the main.css from Grails scaffolding, so I can't use any of the resources or image custom tags there either. Thanks, Ryan Vanderwerf --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
On 30 May 2012, at 01:10, Ryan Vanderwerf wrote: > I'm struggling a bit trying to disable resource management of images. It seems I have the scaffolding images in in apps web-app/images folder but I get 404 not found trying to access them. I've tried to remove: > grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*'] > > I've also tried removing the images part instead of commenting the whole thing out: > grails.resources.adhoc.patterns = '/css/*', '/js/*', '/plugins/*'] > and set > grails.resources.rewrite.css = false > grails.resources.processing.enabled = false > > However I still got 404s > > For example /myapp/images/skin/house.png is not found. Is there anything else I can do to disable things mucking with my image paths? Even /static/images/skin/house.png is not found either. I'm coming from Grails 1.3.x land where the resources plugin isn't forced on me so this is a bit perplexing :) It still seems to rewrite image access to /static as well, from what I understand if I remove it from the adhoc patterns it should not be messing with the images? > > There are all images using the main.css from Grails scaffolding, so I can't use any of the resources or image custom tags there either. > Hi, Do you know if this works OK with Grails 2.0.1 or 2.0.2? I've not seen such problems yet, but I have not tried out the latest Grails builds with it. Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
I will give it a try on 2.0.1 and 2.1 RC2 today to see if that makes any difference. The resource plugin is great, but for a lot of people it adds a lot of complexity for them when it may just be easier for simple situations to turn it off. I'm just trying to find an off button :)
Ryan ________________________________________ From: Marc Palmer [[hidden email]] Sent: Wednesday, May 30, 2012 3:54 AM To: [hidden email] Subject: Re: [grails-user] grails 2.0.3 / 2.0.4 disable resource plugin for images? On 30 May 2012, at 01:10, Ryan Vanderwerf wrote: > I'm struggling a bit trying to disable resource management of images. It seems I have the scaffolding images in in apps web-app/images folder but I get 404 not found trying to access them. I've tried to remove: > grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*'] > > I've also tried removing the images part instead of commenting the whole thing out: > grails.resources.adhoc.patterns = '/css/*', '/js/*', '/plugins/*'] > and set > grails.resources.rewrite.css = false > grails.resources.processing.enabled = false > > However I still got 404s > > For example /myapp/images/skin/house.png is not found. Is there anything else I can do to disable things mucking with my image paths? Even /static/images/skin/house.png is not found either. I'm coming from Grails 1.3.x land where the resources plugin isn't forced on me so this is a bit perplexing :) It still seems to rewrite image access to /static as well, from what I understand if I remove it from the adhoc patterns it should not be messing with the images? > > There are all images using the main.css from Grails scaffolding, so I can't use any of the resources or image custom tags there either. > Hi, Do you know if this works OK with Grails 2.0.1 or 2.0.2? I've not seen such problems yet, but I have not tried out the latest Grails builds with it. Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
On 30 May 2012, at 15:37, Ryan Vanderwerf wrote: > I will give it a try on 2.0.1 and 2.1 RC2 today to see if that makes any difference. The resource plugin is great, but for a lot of people it adds a lot of complexity for them when it may just be easier for simple situations to turn it off. I'm just trying to find an off button :) Uninstall the plugin? Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
>> I will give it a try on 2.0.1 and 2.1 RC2 today to see if that makes any difference. The resource plugin is great, but for a lot of people it adds a lot of complexity for them when it may just be easier for simple situations to turn it off. I'm just trying to find an off button :)
> > > Uninstall the plugin? A potential alternative is to add: compile ":webxml:1.4.1" to your application's plugin dependencies. It would be great if you could try this and let us know if it helps. Thanks, Peter -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by Marc Palmer Local
lol I tried that, since it's part of 2.x it just re-installs it again when you start the app up again ;)
I tried 2.0.1 ( I couldn't get 2.1RC2 to run, I'll make a separate post about that) and I get the same behavior. It seems the resource plugin has an issue disabling it, I can file a JIRA ticket. In Config.groovy, if you set (in 2.0.1 to 2.0.4): grails.resources.processing.enabled = false grails.resources.adhoc.patterns = [] grails.resources.rewrite.css = false It will still rewrite all of my image calls in .css files to read '/static/images' which gets a 404 not found (random things work and some don't I can't seem to find any rhyme or reason). It's least broken in 2.0.1 - I can access the images, if I set all of the above variables, directly from /images/blah.png. In 2.0.3 and 2.0.4, I can't even see /images/blah.png, just gives me a 404. If i make my own filter mapping for /static to drop that from the url, I will be in good shape running 2.0.1 for now :) Ryan _______ ________________________________________ From: Marc Palmer [[hidden email]] Sent: Wednesday, May 30, 2012 9:45 AM To: [hidden email] Subject: Re: [grails-user] grails 2.0.3 / 2.0.4 disable resource plugin for images? On 30 May 2012, at 15:37, Ryan Vanderwerf wrote: > I will give it a try on 2.0.1 and 2.1 RC2 today to see if that makes any difference. The resource plugin is great, but for a lot of people it adds a lot of complexity for them when it may just be easier for simple situations to turn it off. I'm just trying to find an off button :) Uninstall the plugin? Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
On 30 May 2012, at 17:09, Ryan Vanderwerf wrote: > lol I tried that, since it's part of 2.x it just re-installs it again when you start the app up again ;) > It should not do this. Did you remove it from BuildConfig? > I tried 2.0.1 ( I couldn't get 2.1RC2 to run, I'll make a separate post about that) and I get the same behavior. > > It seems the resource plugin has an issue disabling it, I can file a JIRA ticket. > > In Config.groovy, if you set (in 2.0.1 to 2.0.4): > grails.resources.processing.enabled = false > grails.resources.adhoc.patterns = [] > grails.resources.rewrite.css = false > > It will still rewrite all of my image calls in .css files to read '/static/images' which gets a 404 not found (random things work and some don't I can't seem to find any rhyme or reason). > > It's least broken in 2.0.1 - I can access the images, if I set all of the above variables, directly from /images/blah.png. In 2.0.3 and 2.0.4, I can't even see /images/blah.png, just gives me a 404. I'm sorry you're having problems. Most people seem to get on fine. Please build a sample project and zip the source and attach it to an issue and I will attempt to reproduce and fix. Thanks Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Removing it from BuildConfig, and adding 'compile ":webxml:1.4.1' to BuildConfig successfully keeps the resource plugin removed and things are working great now, on 2.0.1, and 2.0.4, thanks :)
Ryan ________________________________________ From: Marc Palmer [[hidden email]] Sent: Wednesday, May 30, 2012 11:15 AM To: [hidden email] Subject: Re: [grails-user] grails 2.0.3 / 2.0.4 disable resource plugin for images? On 30 May 2012, at 17:09, Ryan Vanderwerf wrote: > lol I tried that, since it's part of 2.x it just re-installs it again when you start the app up again ;) > It should not do this. Did you remove it from BuildConfig? > I tried 2.0.1 ( I couldn't get 2.1RC2 to run, I'll make a separate post about that) and I get the same behavior. > > It seems the resource plugin has an issue disabling it, I can file a JIRA ticket. > > In Config.groovy, if you set (in 2.0.1 to 2.0.4): > grails.resources.processing.enabled = false > grails.resources.adhoc.patterns = [] > grails.resources.rewrite.css = false > > It will still rewrite all of my image calls in .css files to read '/static/images' which gets a 404 not found (random things work and some don't I can't seem to find any rhyme or reason). > > It's least broken in 2.0.1 - I can access the images, if I set all of the above variables, directly from /images/blah.png. In 2.0.3 and 2.0.4, I can't even see /images/blah.png, just gives me a 404. I'm sorry you're having problems. Most people seem to get on fine. Please build a sample project and zip the source and attach it to an issue and I will attempt to reproduce and fix. Thanks Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
> Removing it from BuildConfig, and adding 'compile ":webxml:1.4.1' to BuildConfig successfully keeps the resource plugin removed and things are working great now, on 2.0.1, and 2.0.4, thanks :)
Quick clarification: you don't need to add webxml if you have removed Resources plugin. Adding webxml is a potential workaround if you want to keep Resources in your application. -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
ok.. in that case, I did try the webxml before removing the resource plugin, and it didn't help. It seems if you turn off css rewriting via Config.groovy and remove it from the adhoc map it will still rewrite all images with /static in front of them. Removing the plugin seems to be the only way to disable it.
Thanks, Ryan ________________________________________ From: [hidden email] [[hidden email]] On Behalf Of Peter Ledbrook [[hidden email]] Sent: Thursday, May 31, 2012 2:13 AM To: [hidden email] Subject: Re: [grails-user] grails 2.0.3 / 2.0.4 disable resource plugin for images? > Removing it from BuildConfig, and adding 'compile ":webxml:1.4.1' to BuildConfig successfully keeps the resource plugin removed and things are working great now, on 2.0.1, and 2.0.4, thanks :) Quick clarification: you don't need to add webxml if you have removed Resources plugin. Adding webxml is a potential workaround if you want to keep Resources in your application. -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Putting the following in Config.groovy has worked for me (to disable Resources adhoc processing without removing the plugin):
On Thu, May 31, 2012 at 7:49 AM, Ryan Vanderwerf <[hidden email]> wrote: ok.. in that case, I did try the webxml before removing the resource plugin, and it didn't help. It seems if you turn off css rewriting via Config.groovy and remove it from the adhoc map it will still rewrite all images with /static in front of them. Removing the plugin seems to be the only way to disable it. |
|
On 1 Jun 2012, at 21:32, Drake Emko wrote: > Putting the following in Config.groovy has worked for me (to disable Resources adhoc processing without removing the plugin): > > grails.resources.adhoc.excludes = ['**'] > > > On Thu, May 31, 2012 at 7:49 AM, Ryan Vanderwerf <[hidden email]> wrote: > ok.. in that case, I did try the webxml before removing the resource plugin, and it didn't help. It seems if you turn off css rewriting via Config.groovy and remove it from the adhoc map it will still rewrite all images with /static in front of them. Removing the plugin seems to be the only way to disable it. > Just to be clear here - do you mean it rewrites image URIs in the CSS files, or <img> links to images in HTML are having their URLs modified? Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
> Just to be clear here - do you mean it rewrites image URIs in the CSS files, or <img> links to images in HTML are having their URLs modified?
It rewrites image URIs inside CSS files, even if you remove *.css from the adhoc map. Removing the plugin entirely made the problem go away. I haven't had a chance yet to create a test project and raise a jira with it yet. Ryan ________________________________________ From: Marc Palmer [[hidden email]] Sent: Tuesday, June 05, 2012 4:43 AM To: [hidden email] Subject: Re: [grails-user] grails 2.0.3 / 2.0.4 disable resource plugin for images? On 1 Jun 2012, at 21:32, Drake Emko wrote: > Putting the following in Config.groovy has worked for me (to disable Resources adhoc processing without removing the plugin): > > grails.resources.adhoc.excludes = ['**'] > > > On Thu, May 31, 2012 at 7:49 AM, Ryan Vanderwerf <[hidden email]> wrote: > ok.. in that case, I did try the webxml before removing the resource plugin, and it didn't help. It seems if you turn off css rewriting via Config.groovy and remove it from the adhoc map it will still rewrite all images with /static in front of them. Removing the plugin seems to be the only way to disable it. > Just to be clear here - do you mean it rewrites image URIs in the CSS files, or <img> links to images in HTML are having their URLs modified? Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java/UX) I offer commercial support for Grails plugins from as low as $50/mo. For details see: http://grailsrocks.com Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc Contributor @ http://grails.org | Founder @ http://noticelocal.com Developer @ http://weceem.org | Member @ http://spottymushroom.com Twitter: http://twitter.com/wangjammer5 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
