Quantcast

resources: r:external leaking to other pages

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

resources: r:external leaking to other pages

David-2
I've got an application where some of our pages require CSS or
javascript files that are specific to just that page.  I added the
resources plugin and module definitions for the commonly used
resources, but was planning on leaving page-specific CSS/javascript as
r:external tags in the individual pages (and not declared within a
module).  I've been testing with Grails 2.0.3, and tried both versions
1.1.6 and 1.2-RC1 of the resources plugin.

However, something doesn't seem to be working as I would have
expected.  When I do this, it looks like the first page I visit upon
application start-up renders properly.  After that, the undeclared
resources that have been viewed in any page appear to be included in
each subsequent page.

For example, if I have 3 pages, index/page1/page2, with index having
no page-specific resources, page1 having page1.css, and page2 having
page2.css.  Loading index the first time is fine (neither page1.css or
page2.css included).  After that, loading page1 is fine (only
page1.css included).  If I then view index, it includes page1.css even
though it shouldn't.  If I then view page2, it includes both page2.css
(which it should) and page1.css (which it shouldn't).  After that,
viewing any page (index/page1/page2) would include both page1.css and
page2.css.

Does anyone have ideas what's going on, or what I might be able to do
to fix this so that resources linked to in a particular page don't get
automatically included in other pages?
--
David
[hidden email]

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

Marc Palmer Local

On 28 Jun 2012, at 16:39, David wrote:

> I've got an application where some of our pages require CSS or
> javascript files that are specific to just that page.  I added the
> resources plugin and module definitions for the commonly used
> resources, but was planning on leaving page-specific CSS/javascript as
> r:external tags in the individual pages (and not declared within a
> module).  I've been testing with Grails 2.0.3, and tried both versions
> 1.1.6 and 1.2-RC1 of the resources plugin.
>
> However, something doesn't seem to be working as I would have
> expected.  When I do this, it looks like the first page I visit upon
> application start-up renders properly.  After that, the undeclared
> resources that have been viewed in any page appear to be included in
> each subsequent page.
>
> For example, if I have 3 pages, index/page1/page2, with index having
> no page-specific resources, page1 having page1.css, and page2 having
> page2.css.  Loading index the first time is fine (neither page1.css or
> page2.css included).  After that, loading page1 is fine (only
> page1.css included).  If I then view index, it includes page1.css even
> though it shouldn't.  If I then view page2, it includes both page2.css
> (which it should) and page1.css (which it shouldn't).  After that,
> viewing any page (index/page1/page2) would include both page1.css and
> page2.css.
>

Hi,

I'll look in to this. I think I know what the problem is.

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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

David-2
On Thu, Jun 28, 2012 at 11:52 AM, Marc Palmer <[hidden email]> wrote:

>
> On 28 Jun 2012, at 16:39, David wrote:
>
>> I've got an application where some of our pages require CSS or
>> javascript files that are specific to just that page.  I added the
>> resources plugin and module definitions for the commonly used
>> resources, but was planning on leaving page-specific CSS/javascript as
>> r:external tags in the individual pages (and not declared within a
>> module).  I've been testing with Grails 2.0.3, and tried both versions
>> 1.1.6 and 1.2-RC1 of the resources plugin.
>>
>> However, something doesn't seem to be working as I would have
>> expected.  When I do this, it looks like the first page I visit upon
>> application start-up renders properly.  After that, the undeclared
>> resources that have been viewed in any page appear to be included in
>> each subsequent page.
>>
>> For example, if I have 3 pages, index/page1/page2, with index having
>> no page-specific resources, page1 having page1.css, and page2 having
>> page2.css.  Loading index the first time is fine (neither page1.css or
>> page2.css included).  After that, loading page1 is fine (only
>> page1.css included).  If I then view index, it includes page1.css even
>> though it shouldn't.  If I then view page2, it includes both page2.css
>> (which it should) and page1.css (which it shouldn't).  After that,
>> viewing any page (index/page1/page2) would include both page1.css and
>> page2.css.
>>
>
> Hi,
>
> I'll look in to this. I think I know what the problem is.
>
> 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
>
>

Here's a minimal application that reproduces the issue.  To reproduce:
* Unzip the app and run it.
* Open http://localhost:8080/resources-implicit/test/index
* Click on the links as described in my example scenario above (page1,
index, page2, index, page1)

https://dl.dropbox.com/u/67936939/resources-implicit.zip
--
David
[hidden email]

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

GavinHogan2
I am seeing the same issue.  Any progress?

Thanks.

Gavin

On Thu, Jun 28, 2012 at 12:17 PM, David <[hidden email]> wrote:
On Thu, Jun 28, 2012 at 11:52 AM, Marc Palmer <[hidden email]> wrote:
>
> On 28 Jun 2012, at 16:39, David wrote:
>
>> I've got an application where some of our pages require CSS or
>> javascript files that are specific to just that page.  I added the
>> resources plugin and module definitions for the commonly used
>> resources, but was planning on leaving page-specific CSS/javascript as
>> r:external tags in the individual pages (and not declared within a
>> module).  I've been testing with Grails 2.0.3, and tried both versions
>> 1.1.6 and 1.2-RC1 of the resources plugin.
>>
>> However, something doesn't seem to be working as I would have
>> expected.  When I do this, it looks like the first page I visit upon
>> application start-up renders properly.  After that, the undeclared
>> resources that have been viewed in any page appear to be included in
>> each subsequent page.
>>
>> For example, if I have 3 pages, index/page1/page2, with index having
>> no page-specific resources, page1 having page1.css, and page2 having
>> page2.css.  Loading index the first time is fine (neither page1.css or
>> page2.css included).  After that, loading page1 is fine (only
>> page1.css included).  If I then view index, it includes page1.css even
>> though it shouldn't.  If I then view page2, it includes both page2.css
>> (which it should) and page1.css (which it shouldn't).  After that,
>> viewing any page (index/page1/page2) would include both page1.css and
>> page2.css.
>>
>
> Hi,
>
> I'll look in to this. I think I know what the problem is.
>
> 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
>
>

Here's a minimal application that reproduces the issue.  To reproduce:
* Unzip the app and run it.
* Open http://localhost:8080/resources-implicit/test/index
* Click on the links as described in my example scenario above (page1,
index, page2, index, page1)

https://dl.dropbox.com/u/67936939/resources-implicit.zip
--
David
[hidden email]

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

Marc Palmer Local

On 2 Jul 2012, at 14:19, Gavin Hogan wrote:

> I am seeing the same issue.  Any progress?

Sorry, no - I've not had any time to look at the moment, my client needs me :(

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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

David-2
On Mon, Jul 2, 2012 at 9:42 AM, Marc Palmer <[hidden email]> wrote:

>
> On 2 Jul 2012, at 14:19, Gavin Hogan wrote:
>
>> I am seeing the same issue.  Any progress?
>
> Sorry, no - I've not had any time to look at the moment, my client needs me :(
>
> 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
>
>

Any updates on this?
--
David
[hidden email]

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

David-2
On Mon, Jul 23, 2012 at 7:35 AM, Marc Palmer <[hidden email]> wrote:

>
> On 11 Jul 2012, at 15:54, David <[hidden email]> wrote:
>
>> On Mon, Jul 2, 2012 at 9:42 AM, Marc Palmer <[hidden email]> wrote:
>>>
>>> On 2 Jul 2012, at 14:19, Gavin Hogan wrote:
>>>
>>>> I am seeing the same issue.  Any progress?
>>
>> Any updates on this?
>>
>
> Hi David,
>
> I've been away on holiday. I will try to find some time for it this week, but as all my work on Grails plugins apart from Weceem is on a voluntary basis (nobody is paying for support), I can not make any guarantees.
>
> Cheers
> Marc

Thanks for the response, Marc.  Upon looking further through JIRA, I
found GPRESOURCES-159, which I think is the same issue.  I've added a
comment on that issue with the extent of my understanding of what's
going on.  For now, I'm using a patched version of the plugin to work
around this issue, though I'm unsure of whether there's other
functionality that may have been impacted by the patch.

JIRA ticket: http://jira.grails.org/browse/GPRESOURCES-159
Patch I'm using:
https://github.com/davidmc24/grails-resources/commit/c20b6ac3575835c523f34c23006a3b7678e22bb8

--
David M. Carr
[hidden email]

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


cla
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

cla
Is it only with r:external and not with r:script ?

I have tried (by advice of a colleague) putting som rubbish in the disposition attribute, eg.  disposition="BUGGPRESOURCES159". This seems to solve the problem, but you lose the disposition fuctionality :-(

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

David-2
On Mon, Sep 10, 2012 at 9:37 AM, cla <[hidden email]> wrote:

> Is it only with r:external and not with r:script ?
>
> I have tried (by advice of a colleague) putting som rubbish in the
> disposition attribute, eg.  disposition="BUGGPRESOURCES159". This seems to
> solve the problem, but you lose the disposition fuctionality :-(
>
>
>
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/resources-r-external-leaking-to-other-pages-tp4630795p4634568.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

We don't use r:script, so I don't know if it affects that as well.
The rubbish disposition looks like a good work-around to be aware of.
Thanks for sharing.

--
David M. Carr
[hidden email]

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: resources: r:external leaking to other pages

Marc Palmer Local
Hi,

I really am aware of this problem and am trying to get a release done this week.

Plugin workload is killing me at the moment.

Marc

On 10 Sep 2012, at 15:36, "David M. Carr" <[hidden email]> wrote:

> On Mon, Sep 10, 2012 at 9:37 AM, cla <[hidden email]> wrote:
>> Is it only with r:external and not with r:script ?
>>
>> I have tried (by advice of a colleague) putting som rubbish in the
>> disposition attribute, eg.  disposition="BUGGPRESOURCES159". This seems to
>> solve the problem, but you lose the disposition fuctionality :-(
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://grails.1312388.n4.nabble.com/resources-r-external-leaking-to-other-pages-tp4630795p4634568.html
>> Sent from the Grails - user mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
> We don't use r:script, so I don't know if it affects that as well.
> The rubbish disposition looks like a good work-around to be aware of.
> Thanks for sharing.
>
> --
> David M. Carr
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

~ ~ ~
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


Loading...