Expand my Community achievements bar.

SOLVED

AEM 6 -> xtype not working (used to work in 5.6)

Avatar

Level 2

Would it be possible for someone to test following assumption? I'm afraid the tutorials, explaining how to create a custom xtype, require an update. 

I followed the 2 tutorials as mentioned below. They used to work with AEM 5.6 but don't work anymore with AEM 6.0 (but don't mention the support of AEM 6.0)

http://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html
http://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html 
The document http://docs.adobe.com/docs/en/aem/6-0/develop/components/widgets.html is entirely AEM 6.0 specific but doesn't contain the required javascript (causing the problem).  

Please find below 2 images and a short description of the behavior: 

- the CustomWdiget javascript is triggered partially but the constructor is never invoked (is invoked in AEM 5.6) 

- as a consequence, I never see my 2 or 3 fields in the dialog but I only get a (default) textfield

Many thanks in advance, 

Wim

1 Accepted Solution

Avatar

Correct answer by
Level 8

Do your custom X-Types work when you edit the page in the Classic UI? I wouldn't be surprised if they don't work in the Touch UI since that's a completely different framework for rendering the dialogs. My assumption has been that I'd need to port any custom X-Types over to the new Granite interface as part of any upgrade, and that in the future I'd have to maintain both a custom X-Type and a Granite UI type if I wanted the dialogs to work in both the classic UI and the Touch UI. 

If custom X-Types don't work in the Classic UI then I to am very concerned. 

View solution in original post

7 Replies

Avatar

Level 10

If you look at the table at the beginning of the articles, it provides the corresponding CQ version. Xtype articles are not for 6. The articles may  be updated for 6. However, first we will release Touch UI component development for CQ 6.

Avatar

Level 2

I was aware of the versioning issue but, by now, I'm inclined to believe it's fair to say there is no (detailed and complete and AEM 6 compliant) documentation available with regards to custom xtypes and as a side remark (since we are not impacted), I'm a tad concerned on the challenge of migration since it seems to me the cusomized AEM 5 xtypes are not going to work anymore with AEM 6.  Still hoping I'm mistaken but up to other people to confirm. 

Avatar

Correct answer by
Level 8

Do your custom X-Types work when you edit the page in the Classic UI? I wouldn't be surprised if they don't work in the Touch UI since that's a completely different framework for rendering the dialogs. My assumption has been that I'd need to port any custom X-Types over to the new Granite interface as part of any upgrade, and that in the future I'd have to maintain both a custom X-Type and a Granite UI type if I wanted the dialogs to work in both the classic UI and the Touch UI. 

If custom X-Types don't work in the Classic UI then I to am very concerned. 

Avatar

Level 2

I tested this morning with the Classic UI and the Granite UI but no success. Pleas find attached a snippet of the dialog.xml. AFAIK everything is correct (and part of the CustomWidget.js is being executed) but a straightforward test from someone @ Adobe would clarify the status quite a bit. 

Avatar

Level 10

I tested xtypes in Classic UI and they work in Classic UI on AEM 6. I can send you a test one if you email me at scottm@adobe.com

The test one contains a custom xtype and other functionality that developers use. ie - Drag and drop,  Rich Text editor, etc.

Install it and then look in sidekick under Nook category.

[img]Nook.png[/img]

The component is called Hero. This contains a custom xtype as well. 

Avatar

Level 2

Scott, 

many thanks for fast reply and for confirmation of your test results. I ran another test today and I'm quite happy to confirm my custom xtype is rendered correctly in edit mode (classic UI). I'm still facing JS errors in my CustomWidget JS in design and preview mode (classic UI once again) but I'm inclined to believe this error is rather related to improper loading of all the (responsive related) JS we are trying to manage (although it occurs in the CustomWidget JS). Anyhow, I'm glad I asked for a second opinion and feel relieved because of the positive results. 

thanks again, 

Wim