我遵循了Spartacus文档中有关SmartEdit设置的说明,但无法使SmartEdit正常运行。允许来源设置为:data-smartedit-allow-origin="localhost:9002"
我的smartedit地址与此本地主机匹配:
如您在图像上看到的,我得到一个错误:
Http failure response for https://localhost:9002/cmswebservices/v1/catalogs/financialContentCatalog/versions/Online/pages/HomeownersCategoryPage/typerestrictions: 404 OK
编辑有效,但是整个应用程序都很缓慢,当尝试以预览模式单击链接时,在浏览器控制台中出现以下错误:
core.js:4127 ERROR Error: Uncaught (in promise): Error: No value provided for @angular/core symbol 'ɵɵgetInheritedFactory'.
Error: No value provided for @angular/core symbol 'ɵɵgetInheritedFactory'.
at R3JitReflector.resolveExternalReference (vendor_chunk.js:2)
at JitEmitterVisitor.visitExternalExpr (vendor_chunk.js:2)
at ExternalExpr.visitExpression (vendor_chunk.js:2)
at JitEmitterVisitor.AbstractEmitterVisitor.visitInvokeFunctionExpr (vendor_chunk.js:2)
at JitEmitterVisitor.AbstractJsEmitterVisitor.visitInvokeFunctionExpr (vendor_chunk.js:2)
at InvokeFunctionExpr.visitExpression (vendor_chunk.js:2)
at JitEmitterVisitor.AbstractJsEmitterVisitor.visitDeclareVarStmt (vendor_chunk.js:2)
at JitEmitterVisitor.visitDeclareVarStmt (vendor_chunk.js:2)
at DeclareVarStmt.visitStatement (vendor_chunk.js:2)
at vendor_chunk.js:2
at resolvePromise (zone.js:832)
at resolvePromise (zone.js:784)
at zone.js:894
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:28132)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:601)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:507)
at invokeTask (zone.js:1671)
我还尝试将通配符放在data-smartedit-allow-origin="*localhost:9002"
中,然后Smartedit可以更快地运行,所有链接都可以正常工作,但是我无法编辑任何内容:
在该消息中单击“预览”模式后^^,我获得了预览导航,但由于它已被禁用,因此无法单击它:
请注意,WCMS Cockpit预览URL设置为http://localhost:4200/financial/en/EUR
,并且服务器以正常而非SSL模式运行。如果将WCMS Cockpit预览URL更改为https
并以SSL模式运行服务器,则没有任何区别。
另外,whiteListedStorefronts
设置为:
[
"http://localhost:4200/financial/en/EUR",
"https://localhost:4200/financial/en/EUR",
"http://localhost:4200",
"https://localhost:4200"
]