Quantcast

Grails ui-performance plugin not working with CKEditor

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

Grails ui-performance plugin not working with CKEditor

Maricel
I installed Grails ui-performance plugin and made the necessary changes in the code. It didn't seem to work for development, I was getting files which name was ending with "_vnull" so I disabled it for development and tried to test with a WAR file. However, when generating the WAR file I get the following error and exception:

    [ERROR] 1:0:Compilation produced 55 syntax errors. in lineSource: null sourceName: null
   
    ERROR: problem minifying /Users/maricel/.grails/1.3.5/projects/community-services/stage/plugins/ckeditor-3.4.1.1-SNAPSHOT/js/ofm/scripts/languages/ca.js: Compilation produced 55 syntax errors.

    org.mozilla.javascript.EvaluatorException: Compilation produced 55 syntax errors.
    at com.studentsonly.grails.plugins.uiperformance.JsErrorReporter.runtimeError(JsErrorReporter.groovy:35)
    at org.mozilla.javascript.Parser.parse(Parser.java:410)
    at org.mozilla.javascript.Parser.parse(Parser.java:355)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionAndMinifyJs(ResourceVersionHelper.groovy:230)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionAndMinifyJs(ResourceVersionHelper.groovy)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionAndMinifyJs.callCurrent(Unknown Source)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.applyVersion(ResourceVersionHelper.groovy:158)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$applyVersion(ResourceVersionHelper.groovy)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$_versionResources_closure1.doCall(ResourceVersionHelper.groovy:101)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionResources(ResourceVersionHelper.groovy:91)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionResources(ResourceVersionHelper.groovy)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionResources.callCurrent(Unknown Source)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.version(ResourceVersionHelper.groovy:44)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$version.call(Unknown Source)
    at _Events.versionResources(_Events.groovy:36)
    at _Events$_run_closure2.doCall(_Events.groovy:16)
    at _GrailsEvents_groovy$_run_closure5.doCall(_GrailsEvents_groovy:58)
    at _GrailsEvents_groovy$_run_closure5.call(_GrailsEvents_groovy)
    at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:327)
    at War$_run_closure1.doCall(War.groovy:38)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:590)
    at gant.Gant.executeTargets(Gant.groovy:589)
    Error executing script War: org.mozilla.javascript.EvaluatorException: Compilation produced 55 syntax errors.

Is this some conflict with the CKEditor plugin? Any idea how to fix it?

Thanks for your help!
- Maricel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails ui-performance plugin not working with CKEditor

tomas lin
Hiya, it might be possible that this js file cannot be parsed correctly.

A workaround might be to not include this via the p:javascript tag but
use the traditional grails g:javascript tag. I think this will make
ui-performance not try to compress this file.

Then you need to set uiperformance.keepOriginals = true in your config.

On Mon, Feb 7, 2011 at 10:57 PM, Maricel <[hidden email]> wrote:

>
> I installed Grails ui-performance plugin and made the necessary changes in
> the code. It didn't seem to work for development, I was getting files which
> name was ending with "_vnull" so I disabled it for development and tried to
> test with a WAR file. However, when generating the WAR file I get the
> following error and exception:
>
>    [ERROR] 1:0:Compilation produced 55 syntax errors. in lineSource: null
> sourceName: null
>
>    ERROR: problem minifying
> /Users/maricel/.grails/1.3.5/projects/community-services/stage/plugins/ckeditor-3.4.1.1-SNAPSHOT/js/ofm/scripts/languages/ca.js:
> Compilation produced 55 syntax errors.
>
>    org.mozilla.javascript.EvaluatorException: Compilation produced 55
> syntax errors.
>        at
> com.studentsonly.grails.plugins.uiperformance.JsErrorReporter.runtimeError(JsErrorReporter.groovy:35)
>        at org.mozilla.javascript.Parser.parse(Parser.java:410)
>        at org.mozilla.javascript.Parser.parse(Parser.java:355)
>        at
> com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
>        at
> com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionAndMinifyJs(ResourceVersionHelper.groovy:230)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionAndMinifyJs(ResourceVersionHelper.groovy)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionAndMinifyJs.callCurrent(Unknown
> Source)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.applyVersion(ResourceVersionHelper.groovy:158)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$applyVersion(ResourceVersionHelper.groovy)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$_versionResources_closure1.doCall(ResourceVersionHelper.groovy:101)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionResources(ResourceVersionHelper.groovy:91)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionResources(ResourceVersionHelper.groovy)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionResources.callCurrent(Unknown
> Source)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.version(ResourceVersionHelper.groovy:44)
>        at
> com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$version.call(Unknown
> Source)
>        at _Events.versionResources(_Events.groovy:36)
>        at _Events$_run_closure2.doCall(_Events.groovy:16)
>        at _GrailsEvents_groovy$_run_closure5.doCall(_GrailsEvents_groovy:58)
>        at _GrailsEvents_groovy$_run_closure5.call(_GrailsEvents_groovy)
>        at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:327)
>        at War$_run_closure1.doCall(War.groovy:38)
>        at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
>        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
>        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
>        at gant.Gant.withBuildListeners(Gant.groovy:427)
>        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>        at gant.Gant.dispatch(Gant.groovy:415)
>        at gant.Gant.this$2$dispatch(Gant.groovy)
>        at gant.Gant.invokeMethod(Gant.groovy)
>        at gant.Gant.executeTargets(Gant.groovy:590)
>        at gant.Gant.executeTargets(Gant.groovy:589)
>    Error executing script War: org.mozilla.javascript.EvaluatorException:
> Compilation produced 55 syntax errors.
>
> Is this some conflict with the CKEditor plugin? Any idea how to fix it?
>
> Thanks for your help!
>
> -----
> - Maricel
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-ui-performance-plugin-not-working-with-CKEditor-tp3265346p3265346.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
>
>
>

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

Re: Grails ui-performance plugin not working with CKEditor

Maricel
Thanks Tomas for your answer.

I am using the CKEditor plug in for Grails as well, so I am including the CKEditor files with the tag the plug in provides, something like:

<ckeditor:resources />

I am not using <p:javascript />, so I am not sure why the ui-performance plug in is processing the files from the CKEditor, does anybody has an idea? Is there any way to exclude the CKEditor plug in to be processed by the ui-performance plug in?
- Maricel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails ui-performance plugin not working with CKEditor

lucastex
as Tomas said setting uiperformance.keepOriginals = true will keep the original js files, and they'll probably reachable by the plugin tag...

[]s,

Lucas Frare Teixeira .·.
- [hidden email]
- lucastex.com.br
- blog.lucastex.com
- twitter.com/lucastex


On Tue, Feb 8, 2011 at 1:58 PM, Maricel <[hidden email]> wrote:

Thanks Tomas for your answer.

I am using the CKEditor plug in for Grails as well, so I am including the
CKEditor files with the tag the plug in provides, something like:

<ckeditor:resources />

I am not using <p:javascript />, so I am not sure why the ui-performance
plug in is processing the files from the CKEditor, does anybody has an idea?
Is there any way to exclude the CKEditor plug in to be processed by the
ui-performance plug in?

-----
- Maricel
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-ui-performance-plugin-not-working-with-CKEditor-tp3265346p3276183.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



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

Re: Grails ui-performance plugin not working with CKEditor

Maricel
The main problem is that the WAR generation fails, it is not that the CKEditor cannot find the original files when using the plugin tag to add the resources. I tried putting the setting to keep the originals to true like you guys said, but I still get the same problem when generating the WAR file.

ERROR: problem minifying /Users/maricel/.grails/1.3.5/projects/community-services/stage/plugins/ckeditor-3.4.1.1-SNAPSHOT/js/ofm/scripts/languages/ca.js: Compilation produced 55 syntax errors.
- Maricel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails ui-performance plugin not working with CKEditor

lucastex
You can continue after the minify problem by setting:

uiperformance.continueAfterMinifyJsError = true

You'll have to check manually if this haven't made your war corrupted...

[]s,



Lucas Frare Teixeira .·.
- [hidden email]
- lucastex.com.br
- blog.lucastex.com
- twitter.com/lucastex


On Tue, Feb 8, 2011 at 3:16 PM, Maricel <[hidden email]> wrote:

The main problem is that the WAR generation fails, it is not that the
CKEditor cannot find the original files when using the plugin tag to add the
resources. I tried putting the setting to keep the originals to true like
you guys said, but I still get the same problem when generating the WAR
file.

ERROR: problem minifying
/Users/maricel/.grails/1.3.5/projects/community-services/stage/plugins/ckeditor-3.4.1.1-SNAPSHOT/js/ofm/scripts/languages/ca.js:
Compilation produced 55 syntax errors.


-----
- Maricel
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-ui-performance-plugin-not-working-with-CKEditor-tp3265346p3276340.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



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

Re: Grails ui-performance plugin not working with CKEditor

Maricel
If I use uiperformance.continueAfterMinifyJsError = true that lets me generate the WAR successfully, all the files seem to be there, I still need to deploy it to make sure everything works fine though.

Do you know if the CKEditor plug in is designed to work with the ui-performance plug in? So if the ui-performance plug in is installed then when using the resources tag from the CKEditor plugin the files included are the ones managed by the ui-performance plugin? Because if not, there should be way to say to the ui-performance plug in to not process the files from the CKEDitor plugin since we are adding more files to the WAR that are not going to be used.

Thanks for the help!

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

Re: Grails ui-performance plugin not working with CKEditor

lucastex
I really don't know.

All I can recommend you, is that if you are starting a project, use resources plugin instead of ui-performance.
Will be incorporated in the grails-core soon.

[]s,


Lucas Frare Teixeira .·.
- [hidden email]
- lucastex.com.br
- blog.lucastex.com
- twitter.com/lucastex


On Tue, Feb 8, 2011 at 4:14 PM, Maricel <[hidden email]> wrote:

If I use uiperformance.continueAfterMinifyJsError = true that lets me
generate the WAR successfully, all the files seem to be there, I still need
to deploy it to make sure everything works fine though.

Do you know if the CKEditor plug in is designed to work with the
ui-performance plug in? So if the ui-performance plug in is installed then
when using the resources tag from the CKEditor plugin the files included are
the ones managed by the ui-performance plugin? Because if not, there should
be way to say to the ui-performance plug in to not process the files from
the CKEDitor plugin since we are adding more files to the WAR that are not
going to be used.

Thanks for the help!



-----
- Maricel
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-ui-performance-plugin-not-working-with-CKEditor-tp3265346p3276439.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



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

Re: Grails ui-performance plugin not working with CKEditor

Maricel
That is good to know, thanks a lot for your help.
- Maricel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails ui-performance plugin not working with CKEditor

tomas lin
In reply to this post by Maricel
One of the things to consider might be that the js files included with
CKEditor might already be minified - most js libraries would be. It
might be worth getting the uncompressed versions of these files and
try to see if they are able to get you past this minification error.

On Tue, Feb 8, 2011 at 6:14 PM, Maricel <[hidden email]> wrote:

>
> If I use uiperformance.continueAfterMinifyJsError = true that lets me
> generate the WAR successfully, all the files seem to be there, I still need
> to deploy it to make sure everything works fine though.
>
> Do you know if the CKEditor plug in is designed to work with the
> ui-performance plug in? So if the ui-performance plug in is installed then
> when using the resources tag from the CKEditor plugin the files included are
> the ones managed by the ui-performance plugin? Because if not, there should
> be way to say to the ui-performance plug in to not process the files from
> the CKEDitor plugin since we are adding more files to the WAR that are not
> going to be used.
>
> Thanks for the help!
>
>
>
> -----
> - Maricel
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-ui-performance-plugin-not-working-with-CKEditor-tp3265346p3276439.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
>
>
>

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

Re: Grails ui-performance plugin not working with CKEditor

Rob Meidal
In reply to this post by Maricel
We solved it by just adding an exclusion for the plugins directory:

uiperformance.exclusions = [
        "**/plugins/**",
        "**/images/**",
        "**/dojo/**"
]


On Feb 8, 2011, at 11:14 AM, Maricel wrote:

>
> If I use uiperformance.continueAfterMinifyJsError = true that lets me
> generate the WAR successfully, all the files seem to be there, I still need
> to deploy it to make sure everything works fine though.
>
> Do you know if the CKEditor plug in is designed to work with the
> ui-performance plug in? So if the ui-performance plug in is installed then
> when using the resources tag from the CKEditor plugin the files included are
> the ones managed by the ui-performance plugin? Because if not, there should
> be way to say to the ui-performance plug in to not process the files from
> the CKEDitor plugin since we are adding more files to the WAR that are not
> going to be used.
>
> Thanks for the help!
>
>
>
> -----
> - Maricel
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-ui-performance-plugin-not-working-with-CKEditor-tp3265346p3276439.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
>
>


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

Re: Grails ui-performance plugin not working with CKEditor

Maricel
Rob that worked great and that is what I was looking for since the files in the CKEditor plug in come already minimized so I don't really need to apply the ui-performance plug in there. Thanks a lot!
- Maricel
Loading...