SAP Spartacus 和 SmartEdit 集成的一些 bug:2021-6-29

2021-6-29 17:03 Michele

嗨,团队,我正在尝试使用 spartacus 和 smartedit,特别是我有兴趣查看选择分阶段产品目录版本的预览模式是否工作正常,但显然不是…我看不到对我在 stage 版本上做的属性,如果我查看浏览器发送到服务器的 occ 调用,我本来希望在每个 occ 调用中总是看到 cmsTicketid 参数,因为据我所知,参数将设置 会话属性,如要使用的目录版本等,并且由于 occ 服务是无状态的,我想每个请求都需要发送 param ,但事实并非如此。

您是否知道有关此功能的任何错误,还是我遗漏了什么?

nevertheless if I have to explain the mechanism I think it should work like this:

(1)we create a preview ticket holding the context informations (content and product catalog version, language, time, …)

(2)then we pass the ticket in every occ request
(3)a filter on the occ web app manage to restore the context in the session (setting language, catalog versions, etc) based on the preview ticket

occ is stateless, it is stateless in terms of session … but there is state in terms of cart, etc.

In practice although it is ‘stateles’ it actually create a session for the length of each request.

but you’ve to pass the ticketid for every request.

代码:https://github.com/SAP/spartacus/blob/develop/feature-libs/smartedit/root/http-interceptors/cms-ticket.interceptor.ts

if (this.service.cmsTicketId && request.url.includes('/cms/'))

issue created:https://github.com/SAP/spartacus/issues/12954

上一篇:2021-10-28 SAP Spartacus SSR 性能方面的一些学习笔记


下一篇:CF1304C Air Conditioner 题解