cancel
Showing results for 
Search instead for 
Did you mean: 

I am using hybris 5.5 for b2b project. But Cmscockpit Live edit is not working. I am not getting any error as well. Is it require any additional configuration?

Former Member
0 Kudos
 
Former Member
0 Kudos

I am using hybris 5.3 using the B2B accelerator as the basis. OOTB CMS Cockpit Live Edit works fine in hybris 5.3, say, for the Powertools Site. However, for a custom site, I am not seeing the CmsUrlChangeEvent getting fired either. Instead it appears that hybris (via the ZK Framework for CMS Cockpit) is firing the onLaterCockpitEvent. It seems that an onUrlChangeEvent should occur to create this event. Any ideas on why an onUrlChangeEvent does not occur?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos
 May 21, 2015 2:07:39 PM org.zkoss.zk.ui.impl.HybrisUiEngineImpl handleError:1618
 SEVERE: >>java.lang.IllegalArgumentException: 'name' must not be null
 >>      at org.springframework.util.Assert.notNull(Assert.java:112)
 >>      at org.springframework.beans.factory.BeanFactoryUtils.transformedBeanName(BeanFactoryUtils.java:72)
 >>      at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:1024)
 >>      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:234)
 >>      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 >>      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
 >>      at de.hybris.liveeditaddon.cockpit.service.editor.UiExperienceLevelEnumEditor.createViewComponent(UiExperienceLevelEnumEditor.java:41)
 >>      at de.hybris.platform.cmscockpit.session.impl.LiveEditContentBrowser$DefaultLiveEditCaptionComponent.createEditor(LiveEditContentBrowser.java:456)
 >>      at de.hybris.platform.cmscockpit.session.impl.LiveEditContentBrowser$DefaultLiveEditCaptionComponent.renderEditors(LiveEditContentBrowser.java:542)
 >>      at de.hybris.platform.cmscockpit.session.impl.LiveEditContentBrowser$DefaultLiveEditCaptionComponent.createAdvancedArea(LiveEditContentBrowser.java:558)
 >>      at de.hybris.platform.cockpit.components.contentbrowser.CaptionBrowserComponent.initialize(CaptionBrowserComponent.java:74)
 >>      at de.hybris.platform.cockpit.components.contentbrowser.DefaultAdvancedContentBrowser.initialize(DefaultAdvancedContentBrowser.java:231)
 >>      at de.hybris.platform.cockpit.components.contentbrowser.AbstractContentBrowser.setModel(AbstractContentBrowser.java:154)
 >>      at de.hybris.platform.cockpit.components.contentbrowser.DefaultAdvancedContentBrowser.setModel(DefaultAdvancedContentBrowser.java:81)
 >>      at de.hybris.platform.cmscockpit.session.impl.LiveEditContentBrowser.setModel(LiveEditContentBrowser.java:146)
 >>      at de.hybris.platform.cockpit.session.impl.AbstractBrowserArea.createBrowserView(AbstractBrowserArea.java:981)
 >>      at de.hybris.platform.cockpit.session.impl.AbstractBrowserArea.update(AbstractBrowserArea.java:559)
 >>      at de.hybris.platform.cockpit.session.impl.AbstractBrowserArea.initBrowsers(AbstractBrowserArea.java:421)
 >>      at de.hybris.platform.cockpit.components.contentbrowser.CenterAreaContainer$1.onEvent(CenterAreaContainer.java:44)
 >>      at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197)
 >>      at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141)
 >>      at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519)
 >>      at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446)
Former Member
0 Kudos

This is not answer, it is a stack trace that I added to show the issue that still exists in Live Edit even after enabling the liveeditaddon and running an init. This happens when I hit the Live Edit link in the CMS cockpit.

Former Member
0 Kudos

Did you run init ? when you enabled liveediaddon ? because it seams that some data were not populated from impex.

Former Member
0 Kudos

Hello Dariusz,

I don't think I had run the init since enabling liveeditaddon, so I ran the init. However, I am still encountering a stack trace after I log onto the CMS Cockpit and hit the Live Edit link.

Greg

Former Member
0 Kudos

Additionally you will have to fix the previewJS.tag and previewCSS.tag files for b2b accelerator. Those files are missing logic for loading js and css files at liveedit context. Best would be to compare their version with b2c and add missing logic. In my team we made liveedit working with b2b so it is possible.

Former Member
0 Kudos

Hello Dariusz. I just compared the previewCSS.tag and previewJS.tag files in both B2C and B2B accelerator templates for hybris v5.3. They are identical. Since I'm not seeing any differences and I do see LiveEdit working in the Powertools store, I'm wondering what a good area to look at is for a custom B2B accelerator based implementation where Live Edit does not function and there is no onUrlChangeEvent happening? Thanks.

Former Member
0 Kudos

Yes I agree for v5.3 they might look the same and liveeditaddon is enabled since version 5.5 so in 5.3 it will not work. If you will compare 5.5 version of this files you will notice that b2b version is missing: addOnLiveEditJavaScriptPaths logic and that b2b is using: parent.notifyIframeAboutUrlChanage(window.location.href, currentPagePk, currentUserId, currentJaloSessionId); but b2c is using: parent.postMessage({eventName:'notifyIframeAboutUrlChange', data: [window.location.href, currentPagePk, currentUserId, currentJaloSessionId]},'*');

Former Member
0 Kudos

Hello Dariusz,

I see your point for v5.5. The B2B versions of previewJS.tag and previewCSS.tag are missing logic for loading js and css files at liveedit context.

For v5.3, are you saying that Live Edit does not work? The OOTB Powertools store seems to have Live Edit functionality working; however a custom B2B site (generated through modulegen) does not. I'm wondering if v5.3 is correctable or not?

Thanks, Greg

Former Member
0 Kudos

Liveeditaddon has been released with v5.5 of commerce suite. in v5.3 there was Liveedit Reloaded which is no longer available it could be downloaded as unsupported zip of addons from wiki download page. This version was supporting b2b by default.

Former Member
0 Kudos

Thanks for clarifying.

Former Member
0 Kudos

I've made the changes to both PreviewCSS.tag and PreviewJS.tag as Dariusz advised. I've also backed-out Spring changes in a custom cockpit in favor of allowing Live Edit to function from the liveeditaddon extension exclusively. I'm seeing a severe error when I click on the Live Edit link in the CMS cockpit. I will show the error in another comment below. I would appreciate further ideas on getting Live Edit working.

Former Member
0 Kudos

It is a bug in hybris 5.5. Its not coming because CmsUrlChangeEvent is not get fired.

if (event instanceof CmsUrlChangeEvent) { //exit when comes from another perspective! if (!event.getSource().equals(getPerspective())) { return; } final AbstractContentBrowser abstractContentBrowser = getCorrespondingContentBrowser(getFocusedBrowser()); if (abstractContentBrowser != null) { final DefaultLiveEditContentBrowser liveEditContentBrowser = (DefaultLiveEditContentBrowser) abstractContentBrowser; liveEditContentBrowser.updateAfterChangedUrl((CmsUrlChangeEvent) event); } }

Former Member
0 Kudos

Hi Ravi. Thanks for showing this excerpt from DefaultLiveEditBrowserArea.java. Could you add the live edit tag to your question in addition to cmscockpit tag? Thanks.

Former Member
0 Kudos

Same has been done.