在叠加功能错误AEM 6.3经典UI问题 “类型错误:CQ.security.data是未定义”

问题描述:

在AEM 6.3经典UI,当我试图覆盖在叠加功能错误AEM 6.3经典UI问题 “类型错误:CQ.security.data是未定义”

/libs/cq/security/widgets/source/widgets/security/data/AclStore.js 

/apps/cq/security/widgets/source/widgets/security/data/AclStore.js 

下面的错误来了

TypeError: CQ.security.data is undefined CQ.security.data.UserAclStore = CQ.Ext.extend(CQ.security.data.AclStore,{

这样我们就越来越误差全部覆盖JS有问题AEM 6.3 enter image description here

+0

这个问题与extjs有什么关系? – MarthyM

+0

extjs在这里不会造成任何问题。但是AEM 6.3覆盖功能导致问题。基本上是在将单个客户机lib文件覆盖到应用程序之后,剩余的文件不会被加载,这在libs中可用。吊索资源合并有一些问题。 –

纠正我,如果我错了,但我不相信解决客户端库的内容时Sling资源决议踢。

为了延长开箱即用的功能,你需要:

  • 与依赖于原始
  • 创建自己的客户端库的相应类别
  • 覆盖的功能/对象作为你的一部分希望

更多信息:https://docs.adobe.com/docs/en/aem/6-2/develop/extending/customizing-page-authoring-touch.html

Sling资源合并本身似乎只适用于触摸用户界面,我只在创作用户界面(即创建用户界面)时才使用它。导航菜单)

The Sling Resource Merger and related methods can only be used with Granite. This also means that it is only appropriate for the touch-optimized UI; in particular overrides defined in this manner are only applicable for the touch-optimized dialog of a component.

来源:https://docs.adobe.com/docs/en/aem/6-2/develop/platform/sling-resource-merger.html

+0

我同意你的触摸界面的答案。我们使用的是经典用户界面,所以我尝试了下面的方法,并解决了我的问题。 –

我已经使用下面的逻辑解决了这个问题。 AEM 6.3中Clientlibs js文件创建逻辑不同。

在AEM 6.1中,Clientlibs js creation绑定来自/apps/cq/security/widgets/source/widgets/js.txt的覆盖文件和/ libs/cq/security/widgets/source/widgets/js.txt

在AEM 6.3中,Clientlibs js creation仅从/apps/cq/security/widgets/source/widgets/js.txt绑定文件。

由于这种非叠加文件(CQ.security.js)的没有约束力到clientlibs JS(widgets.js)及其给出了以下错误

TypeError: CQ.security.data is undefined CQ.security.data.UserAclStore = CQ.Ext.extend(CQ.security.data.AclStore,{

So i have merged the js.txt of /libs/cq/security/widgets/source/widgets/js.txt into /apps/cq/security/widgets/source/widgets/js.txt and it's resolved the issue.

请提供你的答案,如果有任何其他解决这个问题的方法。