on 2021 Mar 03 4:41 PM
Hello experts,
During the upgrade of hybris 5.7 to 2005. Once you access smartEdit and selected to a page in order to edit/preview it it has a loading that doesn't finish.
Our storefront is having angular 1.3.15 and SmartEdit is injecting in their vendors.js angular 1.8
I opened the console from my browser it has these errors:
Uncaught TypeError: e.module(...).info is not a function at prelibraries.js:368 at prelibraries.js:369
Uncaught TypeError: e.component is not a function at addFullComponentGraphToModule (smarteditcommons.js:2) at smarteditcommons.js:2 at Array.forEach (<anonymous>) at smarteditcommons.js:2 at Module.__decorate (vendor_chunk.js:2) at smarteditcommons.js:2 at Module../jsTarget/web/app/common/components/tree/TreeModule.ts (smarteditcommons.js:2) at __webpack_require__ (smarteditcommons.js:2) at Module../jsTarget/web/app/common/components/tree/index.ts (smarteditcommons.js:2) at __webpack_require__ (smarteditcommons.js:2)
cmssmartedit.js:1 Uncaught TypeError: Object(...) is not a function at cmssmartedit.js:1 at Object.<anonymous> (cmssmartedit.js:1) at __webpack_require__ (cmssmartedit.js:1) at Object.<anonymous> (cmssmartedit.js:1) at __webpack_require__ (cmssmartedit.js:1) at Module.<anonymous> (cmssmartedit.js:1) at __webpack_require__ (cmssmartedit.js:1) at cmssmartedit.js:1 at cmssmartedit.js:1
smarteditbootstrap.js:1 Uncaught TypeError: Cannot read property 'addModuleToAngularJSApp' of undefined at smarteditbootstrap.js:1 at Array.map (<anonymous>) at BootstrapService.bootstrap (smarteditbootstrap.js:1) at HTMLDocument.<anonymous> (smarteditbootstrap.js:1) at i (jquery-2.2.4.min.js:2) at Object.add [as done] (jquery-2.2.4.min.js:2) at n.fn.init.n.fn.ready (jquery-2.2.4.min.js:2) at Module.99 (smarteditbootstrap.js:1) at __webpack_require__ (smarteditbootstrap.js:1) at smarteditbootstrap.js:1
vendor_chunk.js:2 Unhandled Promise rejection: {error: "MessageGateway.publish - Not able to publish event…ax retries for gateway CROSS_FRAME_EVENT and data", data: 0} ; Zone: <root> ; Task: Promise.then ; Value:
After some time I commented storefront's angular scripts I was able to load the edition/preview.
Does SmartEdit's angular is clashing with our Storefront's angular? There is any way to avoid that?
Request clarification before answering.
Hi team, this could be related to not starting spartacus with --ssl parameter and having the whiteListedStorefronts property of the SmartEditConfiguration as well as the previewUrl on the WCMSsite pointing to an https FE site.
package.json
"start": "ng serve --disable-host-check --ssl",
allowOrigin
Also it is important to allow the origin on smartedit feature module file of Spartacus
allowOrigin: 'localhost:9002, local.<project>.com:9002....'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.