有个使用SAP Spartacus的客户遇到一个问题:

We are getting one issue in our Spartacus application (currently we are on 2.1 version).
When we are trying to load checkout-login page with 100% zoom in the browser, it is loading not-found page instead of checkout-login page and when the same page is refreshed with 90% zoom in the browser, we can see the correct checkout-login page with proper data.

这个问题乍一看有点奇怪,当浏览器缩放比率为90%时,checkout-login 页面可以正常工作,但是当缩放率调至100%时,反而不能正常工作了,会显示not-found页面。

We checked the cms-page.guard.ts file in that it is going to canActivateNotFoundPage method instead of canActivatePage from canActivate Method.

原因分析

we found an error in “CustomOccCmsPageNormalizer” at:

问题是下面这段客户自开发代码引起的:

accountNavigationChildren = accountNavigationChildren.concat(supportComponentData.navigationNode
);

It seems like “supportComponentData” is undefined in some case. This variable contains the “MySupportComponent” component from the response. Since “supportComponentData” is undefined an error is thrown which causes the “checkout-login” page rendering to fail. Spartacus then falls back to getting the “not found” page.

To explain further, in the “CmsPageGuard”, Spartacus calls “CmsService.getPage” which will try to load the checkout page.

Since there is an error in the page normalizer, the “CmsService” will return “false” to the “CmsPageGuard” meaning the page wasn’t rendered. The “CmsPageGuard” then goes ahead and requests the “not found” page.

Because of an “if statement” wrapping the failing logic, the problem is only visible for screen sizes between 768 and 1399 (inclusively).

这个问题只有在屏幕尺寸位于区间768~1399区域内才能重现。

Additionally, we were not able to witness this same problem on the d1 server which might mean that the p1 server is missing the “MySupportComponent”.

SAP Spartacus在某些屏幕尺寸下无法正常工作的原因分析相关推荐

  1. linux系统脚本安装失败,ubuntu16.04下vim安装失败的原因分析及解决方案

    先给大家说下问题描述? 重装了ubuntu系统,安装vim出现了以下问题: sudo apt-get install vim 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信 ...

  2. SAP Spartacus 在未登录状态下浏览器 local storage 里存储的数据

    url: http://localhost:4200/powertools-spa/en/USD/ 未登录状态下: 观察local storage存储的数据: auth: {token: {}, us ...

  3. SAP Spartacus 4.0 源代码模式下开启 SSR,为什么会从本地去加载 all.css?

    为什么会从本地去加载 all.css 文件呢?这路径不对头: CSR 模式下,css 的加载是好的: 在 icon-loader.service.ts 代码里设置断点: 更多Jerry的原创文章,尽在 ...

  4. SAP Spartacus新建org unit之后,排序不正确的问题分析

    我插入的顺序是test1, test2, test3, 最后显示的结果: test1 test 3 test 2 Restful API的endpoint: https://spartacus-dev ...

  5. SAP Spartacus B2B Unit page Expand all按钮的工作原理

    输入参数:node就是UnitTreeService.getTree返回的数据,key在这个例子为undefine: 因为activeUnitId为空,所以什么也没有执行: 最后的页面显示: Unit ...

  6. SAP Spartacus的double maintenance -使用Cherrypick进行维护工作

    we do that for all things related to my company now alfter merge to develop we must add the same cha ...

  7. 部署在SAP ABAP服务器上的SAP UI5应用,从bsp redirect(重定向)到ui5_ui5的原因分析

    Created by Jerry Wang on Aug 04, 2014 在浏览器中访问https:///sap/bc/bsp/sap/mymap/webcontent/index.html?sap ...

  8. SAP中查询财务与物流月度物料消耗统计差异原因分析实例

    近期遇到一个用户咨询.财务出具的备件类物料月度消耗与部门核对的有差异,不知是何原因? 展开分析,财务与物流在系统中的统计方法是不同的.财务通常通过FBL3N,汇总备件物料消耗对应的所有总账科目,再输出 ...

  9. 关于SAP Spartacus在服务器端渲染模式和SAP Commerce Cloud API白名单的问题

    We are configuring our Spartacus application with SSR in SAP Commerce Cloud. Also we used the IP Fil ...

最新文章

  1. 算法----计算机程序设计之魂
  2. 【机器学习】怎样将Embedding融入传统机器学习框架?
  3. python多个对象调用类方法、且之间有联系_趣味解读Python面向对象编程 (类和对象)...
  4. android微信预览pdf,网页的pdf、office链接安卓版面微信浏览器无法打开
  5. LeetCode之Binary Tree Level Order Traversal 层序遍历二叉树
  6. [React] 尚硅谷 -- 学习笔记(三)
  7. c++ using 前置声明_详解C++ 前置声明
  8. IT专业沦为新时代农民工?为什么你身边的人都不让你报计算机专业?
  9. 大数据毕设/课设 - 基于大数据的医疗与疾病监控大数据可视化设计与实现
  10. Winxp系统文件夹完全解析
  11. rv1126 固件编译规则
  12. 第一章 为什么我们对机器学习感兴趣?(二)
  13. 精心收集17套电子课件
  14. 计算机作文600字关于科学事业,对科学事业的执着追求作文600字
  15. 35岁的程序员:第17章,悲欢离合
  16. GDAL error: ‘NoneType‘ object has no attribute ‘GetGeoTransform‘
  17. shamir秘密共享方案_Shamir秘密分享的初学者指南
  18. function Function函数
  19. Vue中directives用法--自定义指令控制按钮权限
  20. Unity 工具之 获取当前所在城市的天气数据的封装(自动定位当前所在城市,天气数据可以获得多天天数据)

热门文章

  1. 【转】Nginx服务器的反向代理proxy_pass配置方法讲解
  2. LAMP 搭建BBS论坛实战
  3. 重写Gallery中方法去处理Gallery滑动时的惯性
  4. 机房系统(九)——【组合查询】
  5. CSS知识点个人总结(不断更新)
  6. 方立勋_30天掌握JavaWeb_Servlet
  7. scanf和gets的差别
  8. POJ 3258 River Hopscotch(二分查找答案)
  9. $arr[]=$v 把 $v 这个东西 放到 $arr[] 这个数组中
  10. SDK Manager failed to install 'java.exe' locking directory