Re: 5.4-beta3 JavaScript backward compatibility issue? - Tynamo CKEditor 0.0.1 with tapestry 5.4-beta3 does not seem to work

2014-03-14 Thread Dragan Sahpaski
Hi Balázs,
You're right and it is a bug in tapestry.
JavaScriptSupport.addInitializerCall is not backwards compatible when using
a JSONArray. I filled a JIRA with a patch
https://issues.apache.org/jira/browse/TAP5-2300 so please follow. I hope it
get's resolved soon. If not I'll probably release a new version of
tapestry-ckeditor. I wan't it to be compatible with 5.4 ASAP.

​Thanks for reporting this one and for the debugging info.

Cheers,
Dragan Sahpaski


On Thu, Mar 13, 2014 at 7:22 PM, Balázs Palcsó wrote:

> Hi All,
>
> I am trying to use tynamo/ckeditor mixin. Here is the template code:
>
>  t:mixins="tynamo/ckeditor" parameters="{'toolbar': 'Full'}" />
>
>
> I get the following error
> Invoking t5/core/init("initCKEditor", ["description",{"toolbar":"Full"}])
>
>1. RequireJS error: require: Cannot set property 'visibility' of
>undefined console.js:109<
> http://localhost:8080/AjanlatotKapok.hu/modules.gz/t5/core/console.js>
>   1. (anonymous
> function)console.js:109<
> http://localhost:8080/AjanlatotKapok.hu/modules.gz/t5/core/console.js>
>   2. requirejs.onErrorconsole.js:136<
> http://localhost:8080/AjanlatotKapok.hu/modules.gz/t5/core/console.js>
>   3. onErrorrequire.js:537<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   4. Module.checkrequire.js:886<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   5. (anonymous
> function)require.js:1113<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   6. (anonymous
> function)require.js:132<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   7. (anonymous
> function)require.js:1156<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   8. eachrequire.js:57<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   9. Module.emitrequire.js:1155<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   10. Module.checkrequire.js:917<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   11. Module.enablerequire.js:1143<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   12. Module.initrequire.js:774<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   13. callGetModulerequire.js:1170<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   14. context.completeLoadrequire.js:1544<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   15. context.onScriptLoad
>
>
>
> After some JavaScript debugging I found that
> Tapestry.Initializer.initCKEditor is called with incorrect arguments.
>
> Tapestry.Initializer.initCKEditor = function(textareaId, ckeditorInitJSON)
> {
>
> arguments when it gets called:
>
>1. ckeditorInitJSON: undefined
>2. textareaId: Array[2]
>   1. 0: "description"
>   2. 1: Object
>  1. toolbar: "Full"
>  2. __proto__: Object
>   3. length: 2
>   4. __proto__: Array[0]
>
>
> The correct would be this I assume
>
>1. ckeditorInitJSON: Object
>2.toolbar: "Full"
>3.  __proto__: Object
>4. textareaId: "description"
>
>
> It looks like to me that the module initialization is not backward
> compatible.
> Is this known/expected? Shall I raise a JIRA?
>
> Thanks and regards,
> Balazs Palcso
>


5.4-beta3 JavaScript backward compatibility issue? - Tynamo CKEditor 0.0.1 with tapestry 5.4-beta3 does not seem to work

2014-03-13 Thread Balázs Palcsó
Hi All,

I am trying to use tynamo/ckeditor mixin. Here is the template code:




I get the following error
Invoking t5/core/init("initCKEditor", ["description",{"toolbar":"Full"}])

   1. RequireJS error: require: Cannot set property 'visibility' of
   undefined 
console.js:109
  1. (anonymous
function)console.js:109
  2. 
requirejs.onErrorconsole.js:136
  3. 
onErrorrequire.js:537
  4. 
Module.checkrequire.js:886
  5. (anonymous
function)require.js:1113
  6. (anonymous
function)require.js:132
  7. (anonymous
function)require.js:1156
  8. 
eachrequire.js:57
  9. 
Module.emitrequire.js:1155
  10. 
Module.checkrequire.js:917
  11. 
Module.enablerequire.js:1143
  12. 
Module.initrequire.js:774
  13. 
callGetModulerequire.js:1170
  14. 
context.completeLoadrequire.js:1544
  15. context.onScriptLoad



After some JavaScript debugging I found that
Tapestry.Initializer.initCKEditor is called with incorrect arguments.

Tapestry.Initializer.initCKEditor = function(textareaId, ckeditorInitJSON) {

arguments when it gets called:

   1. ckeditorInitJSON: undefined
   2. textareaId: Array[2]
  1. 0: "description"
  2. 1: Object
 1. toolbar: "Full"
 2. __proto__: Object
  3. length: 2
  4. __proto__: Array[0]


The correct would be this I assume

   1. ckeditorInitJSON: Object
   2.toolbar: "Full"
   3.  __proto__: Object
   4. textareaId: "description"


It looks like to me that the module initialization is not backward
compatible.
Is this known/expected? Shall I raise a JIRA?

Thanks and regards,
Balazs Palcso