UI Performance Plugin

css links with null version generated from p:css tag

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: Grails-UI-Performance 1.2.1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    grails 1.2-M2
    ui-performance 1.2.1

Description

Not entirely sure if this is a bug in ui-performance or not. But i simply can't make p:css generate meaningful hrefs.

<p:css name="main" /> generates:
<link rel='stylesheet' type='text/css' href='/<context>/css/main__vnull.gz.css' />

Steps to reproduce:

1. Create grails application (tested with 1.2-M2)
2. install ui-performance plugin (1.2.1)
3. In grails-app\views\layouts\main.gsp replace

<link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />

with

<p:css name="main" />

This behavior is observable whether or not the project is in subversion. Both in dev and prod environment.
I've tried including:

uiperformance.determineVersion = { -> return '1' }

in config.groovy with the same result.

The same issue exists for javascript includes as far as i can tell.

Activity

Hide
Henrik Skaarup Andersen added a comment -
Show
Henrik Skaarup Andersen added a comment - Possibly related issue: http://jira.codehaus.org/browse/GRAILSPLUGINS-1362
Hide
Burt Beckwith added a comment -

Is this in run-app mode or as a deployed war? The plugin doesn't make sense in dev mode since the versioning work is done during war build. You'll need to disable it in the dev environment in Config.groovy:

environments {
   development {
      uiperformance.enabled = false
   }
}

See http://grails.org/plugin/ui-performance for usage notes.

Show
Burt Beckwith added a comment - Is this in run-app mode or as a deployed war? The plugin doesn't make sense in dev mode since the versioning work is done during war build. You'll need to disable it in the dev environment in Config.groovy:
environments {
   development {
      uiperformance.enabled = false
   }
}
See http://grails.org/plugin/ui-performance for usage notes.
Hide
Henrik Skaarup Andersen added a comment -

Hello.

Thank you for clarifying this. After reading the documentation, I was under the impression that it worked in all environments, and was using run-app.

Perhaps it should be made more clear under the "usage" section that although the plugin is enabled by default in all environments, it should only be enabled for environments that deploys a war.

My apologies for incorrectly filing this as a bug.

Show
Henrik Skaarup Andersen added a comment - Hello. Thank you for clarifying this. After reading the documentation, I was under the impression that it worked in all environments, and was using run-app. Perhaps it should be made more clear under the "usage" section that although the plugin is enabled by default in all environments, it should only be enabled for environments that deploys a war. My apologies for incorrectly filing this as a bug.
Hide
Henrik Skaarup Andersen added a comment -

Not a bug.

The plugin will only work with environments deploying a war, and should be disabled in development.

environments {
development { uiperformance.enabled = false }
}

Show
Henrik Skaarup Andersen added a comment - Not a bug. The plugin will only work with environments deploying a war, and should be disabled in development. environments { development { uiperformance.enabled = false } }
Hide
Paul Bakker added a comment -

This should be clarified in the documentation. In the usage section it seems that disabling the plugin during development is optional.

Show
Paul Bakker added a comment - This should be clarified in the documentation. In the usage section it seems that disabling the plugin during development is optional.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: