Expand my Community achievements bar.

SOLVED

Custom widget dialog in a workflow

Avatar

Former Community Member

Hi,

I have a problem with a workflow. When I use a dialog with standard CQ widgets, i.e. xtypes (e.g. textfield, multifield, etc.), everything works great, but when I place my custom widget/xtype instead, it crashes (doesn't go further - next step) and a JavaScript error comes up: "uncaught exception: cannot create Component: xtype 'pagetreebrowse' not found and no default supplied" (my custom xtype is named "pagetreebrowse"), on line 93351 in widget.js :

return cw.CQ.wcm.mobile.simulator.DeviceSimulator.getInstance(config);

When I use this custom widget in a normal CQ enviroment/dialog, it works great. Is this a CQ limitation (no custom widgets in workflow dialogs), or can it be solved?

Thank you for your time and help in advance!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I'm sorry. After a lot of trying to figure this out in a lot of places, I went back to what you wrote and tried a couple of more combinations. And finally found the right combination to work... cq.widgets and cq.workflow:

<?xml version="1.0" encoding="UTF-8"?>


<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:ClientLibraryFolder"
    sling:resourceType="widgets/clientlib"
    categories="[cq.widgets, cq.workflow]"/>

 

Thanks again!

View solution in original post

5 Replies

Avatar

Level 1

Hi,

I am facing the same error while trying to access the page properties of a page from context menu on the siteadmin page. However when i try accessing the page properties of the same page through side kick after opening the page, it works.

Please help.

thanks in advance,

Nikash

Avatar

Level 4

Are you running the workflow from the inbox? Make sure the widget's clientlib is being loaded into the page. Check the clientlibs "categories" property. I had to add "cq.workflow" to it for it to be loaded into the workflow inbox page as neither "cq.wcm.admin" or "cq.wcm.edit" are loaded.

Avatar

Correct answer by
Former Community Member

I'm sorry. After a lot of trying to figure this out in a lot of places, I went back to what you wrote and tried a couple of more combinations. And finally found the right combination to work... cq.widgets and cq.workflow:

<?xml version="1.0" encoding="UTF-8"?>


<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:ClientLibraryFolder"
    sling:resourceType="widgets/clientlib"
    categories="[cq.widgets, cq.workflow]"/>

 

Thanks again!

Avatar

Former Community Member

Thank you for the reply, and sorry for the long time it took me to answer, was a non-working day.

I tried it from within the site (from the sidekick), and also now from the inbox. Same thing. Then I tried all possible combinations to the categories property of my custom "clientlib" (before, I only had cq.widgets). I tried: "<project_name>.global", "cq.widgets", "cq.wcm.admin", "cq.wcm.edit" and of course "cq.workflow". The same problem persisted both from the sidekick and from the inbox. 

Avatar

Former Community Member

Hmm... sorry, I don't know what this could be, never had this exact problem. The problem in the thread / topic was the registration of custom clientlib. Did you try any of it on listed above?

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----