Live Edit Failure; “Name” cannot be null

See, told you I can’t promise to be active (sorry I’m bad at being sarcastic ^^’ ). Anyway, wanted to do a quick post about a recent obstacle I was tackling when playing with the B2C_acc_responsive recipe. When I opened WCMS Cockpit, hybris’s built in CMS tool, I tapped on Live Edit to see the control behavior with a responsive site, but was blocked by a mysterious error

"Name" cannot be null

So descriptive and helpful! ok ok, maybe not so much. I tried to dig around in logs, command window, etc, but was just more lost.  I then stumbled across the following article in the https://wiki.hybris.com website.

https://wiki.hybris.com/display/release5/Workaround+for+Responsive+Live+Edit+with+yacceleratorcockpits+Extension

To summarize, there is a conflict in the application which causes the error. This conflict is between two components in the recipe: Live Edit Addon and yacceleratorcockpits extension. Some quick background on what the heck is yacceleratorcockpits extension.

hybris is a powerful, extendable platform, but like any flexible platform, it is complex to build new objects, whether they are extending an existing component, or building an entirely new experience. In an effort to help developers focus on the more important aspects like UI and business logic functions, hybris developed the yacceleratorcockpits extension as a starting point (or better known as a template). If a developer wants to build a new interface or cockpit, they will EXTEND off of this extension.  This is a concept used throughout hybris, including creation of new product types, components, models, etc.

For reasons beyond my skills, the yacceleratorcockpits extension and Live Edit add on conflict with each other, but sadly, both are included in the recipe for B2C_acc_responsive. As a result, this causes Live Edit Addon to fail in CMS cockpit.  To solve this issue, you need to REMOVE the yacceleratorcockpits extension from your compiled code.  There is a couple methods, but I’ll describe the easiest method below using the installer.bat and recipe combination.

To begin,

  1. go to the recipe directory (in my case, D:hybrisinstallerrecipesb2c_acc_responsive) and open the build.gradle file in a text editor.
  2. Locate the line extName ‘yacceleratorcockpits and remove it.
  3. Save the file, then start over the install process (must start with Setup). For more details see here

After you successfully start your hybris server, you will likely see ANOTHER error when you tap on Live Edit as shown below:

nullerror

This error occurs when you are accessing the cockpit using http, and not https.  Try:

https://localhost:9002/cmscockpit/index.zul

instead of

http://localhost:9001/cmscockpit/index.zul

Finally you will be able to see Live Edit interface

LiveEditSuccess

So, will disabling the yacceleratorcockpits extension, will that have negative effect on your experience using a provided recipe? There is no clear details about what impact (if any) this has, but since it is just a template for developers to create new objects, it should have no direct impact. In the end, this actually reinforces a best practice of separating developer environments from business user environments. Typically a developer will not be interested in Live Edit, so they would likely remove live edit extension. On flip site, business users (such as content administrators) will not require ability to code not components or interfaces, so they would likely remove the yacceleratorcockpits extension and leave live edit live.

Happy exploring!

Advertisements

2 thoughts on “Live Edit Failure; “Name” cannot be null

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s