关于 SAP Spartacus 和 SmartEdit 集成的问题
Spartacus 里打不开 smartEdit:
已经在 manifest.xml 里添加了 context path
,但是没办法用 SmartEdit 打开任何 Spartacus url:
- https://jsapps.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com/smartedit
- https://smartedit.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com/
you have deployed your Smartedit under accstorefront
aspect so Smartedit should be accessed under https://accstorefront.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com
Regarding putting only Smartedit webapp under backoffice aspect, 这不是正确的做法,as you should put all Smartedit under aspect to 让它工作.
Regarding Smartedit working with Spartacus, you cannot run Smartedit under JS Storefront url. In order to setup Smartedit with Spartacus, please refer to following documentation:
-
https://help.sap.com/viewer/e1391e5265574bfbb56ca4c0573ba1dc/v2005/en-US/a7d68ea9820c4e16962797298cd8499b.html
-
https://sap.github.io/spartacus-docs/smartEdit-setup-instructions-for-spartacus/#page-title
客户新一轮的问题:
====
在 ccv2 上配置 SmartEdit,登录 url 格式如下:
https://api.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com/smartedit
新的问题:
SmartEdit is not allowing us 进行增删改查。 只能使用 preview 模式浏览。
新一轮的 check:
====
either in Smartedit and when accessing your Spartacus storefront directly:
"Allowed whitelist characters are a-z, A-Z, 0-9, -, period, or *
The wildcard * can be used to represent a prefixed domain, Good example: *.domain.com:80
but not a suffix or port, Bad examples: subdomain..com subdomain.domain.com:.
Every whitelisting must contain a specific port."
After checking your storefront I can see that you have set property data-smartedit-allow-origin="https://jsapps.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com
"
However, according to documentation you should specify domain on which smartedit is deployed without prefix https:// and with port number at the end.
Please set it to: api.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com:443
For more info please refer to following documentation pages Smartedit setup for Spartacus
Cross origin setup for Smartedit
进一步检查
使用 smart edit 访问 Storefront 时有一些 warning:
spartacus-storefront.js:14147 No component implementation found for the CMS component type ‘NavigationBarCollectionComponent’. Make sure you implement a component and register it in the mapper.
spartacus-storefront.js:14147 No component implementation found for the CMS component type ‘FooterComponent’. Make sure you implement a component and register it in the mapper.
No component implementation found for the CMS component type ‘AssistedServiceComponent’. Make sure you implement a component and register it in the mapper.
Missing SmartEdit attributes on body element of the storefront - SmartEdit will resume once the attributes are added
The last one usually occurs when smartedit is not installed correctly, after checking your storefront there are no Smartedit classes in it. Please make sure that you setup Smartedit with spartacussampledata for Spartacus according to this documentation
特征
For some reason there are no Smartedit classes injected into body tag.
说明如果 smart edit setup 成功,我们应该可以在 body 元素里看到对应的 class.
Please refer to following documentation page describing in details how Smartedit Contract is implemented and make sure you do the same for your Storefront.
再次研究
I tried to go to smartedit with provided URL again 但是只看到下列画面:
in webapplicationInjector tag, instead of:
..model-t.cc.commerce.ondemand.com:443
try to put the whole url of api
like:
api.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com:443
Also I tried to access jsstorefront from
https://jsapps.xxx-comercial1-d1-public.model-t.cc.commerce.ondemand.com/
but it only give me blank page instead of the storefront.
新的发现
主要原因:somehow body classes are not added in preview as we saw on call.
https://sap.github.io/spartacus-docs/smartEdit-setup-instructions-for-spartacus/
specifically step 3 as ading webApplicationInjector.js in angular.json file
Also when you built your spartacus storefront, follow all the steps described below:
https://sap.github.io/spartacus-docs/building-the-spartacus-storefront-from-libraries/
本地实验
I have installed OOTB spartacus storefront in my ccv2 environment and smartedit is working fine with it.
manifest.json is at \New\hybris\core-customize and localExtensions.xml is at \New\hybris\core-customize\hybris\config
Please try to install OOTB in ccv2 and check the differences.
As discussed on call, can you please try to add spartacussampledata extension and check if the OOTB electronic storefront is working with smartedit
小技巧:首先检查标准的 electronic Storefront 和 smartEdit 是否工作正常。
回复:
Smartedit should be accessed from url depending under which aspect got deployed.
根据部署的 aspect 不同, smartEdit 访问的 url 也不同。
To enable smartedit in this spartacus project, please follow 这个帮助文档 according to your spartacus storefront version.
另一个错误截图:
SmartEdit is having difficulty loading the page. The page is either not compatible with SmartEdit or connection to it has been lost. Wait for the page to load or disable editing by going to Preview mode.
更多Jerry的原创文章,尽在:“汪子熙”:
相关文章
- SAP UI5 sap.ui.core.Element 的概要介绍
- SAP Fiori Elements SmartLink 创建实例的单步调试
- SAP UI5 sap.ui.layout.Grid 控件概述
- SAP MII(SAP制造集成和智能)-灵活且可扩展
- 使用 SAP UI5 sap.ui.export.Spreadsheet API 进行 Excel 导出的一些限制
- SAP UI5 sap.ui.Device.media.RANGESETS 的使用介绍
- SAP UI5 sap.ui.Device.media 的使用介绍
- SAP UI5 OData 请求的自定义 HTTP header 设置方法
- 七大场景,带你玩转SAP ECN
- [ChatGPT 勘误] SAP UI5 的 sap.ui.base.Object
- SAP MM Output Procedure中条件类型里的Requirement是在哪里定义的?
- SAP MM 采购订单的Output Type NEU要等其它Output完成后才能成功输出
- 关于sap的字段和对象修改记录的查找详解编程语言
- SAP与企业微信集成—-DEMO详解编程语言
- SAP中数据库表长度的界定详解编程语言
- SAP 无料号成本中心采购-物料组对应总帐科目详解编程语言
- SAP MM PR的审批策略中设置经过了审批的PR就不能再被修改详解编程语言
- SAP事务代码之-IMG设置详解编程语言
- 系统SAP在Linux系统上的开启之旅(sap启动linux)
- SAP在Linux系统的安装与使用(sap安装linux)
- 比拼Oracle与SAP的优劣对比(oracle与sap优劣)
- Oracle与SAP金蝶谁更具竞争力(oracle sap金蝶)
- Oracle与SAP的技术潜力比较(oracle sap比较)