Try our conversational search powered by Generative AI!

"Create a new block" link not showing in Content Area in Commerce

Vote:
 

Hello,

I am using some content areas in commerce, but I only can drag and drop blocks on them. I am not able to see the "create a new block" link, like it appears in CMS.

My CMS versions are:

  • CMS: 9.8.2
  • CMS.UI: 9.4.4

I tried using the following dojo template, and I was able to see the link, but when I clicked publish button, I got an error: "Unable to load /epiui/edit/cms/Stores/contentdata/ status: 500. Value cannot be null. Parameter name: parentContent.

define([
  "dojo/_base/declare",
  "epi-cms/contentediting/editors/ContentAreaEditor"
  ],
  function( declare, _ContentAreaEditor) {
    return declare('shop.editors.ContentAreaWithCreateLink', [_ContentAreaEditor], {
      isCreateLinkVisible: function() {
        return true;
      }
   });
});

I found that something similar was a bug in version 7, https://world.episerver.com/support/Bug-list/bug/110583, but it seems to be fixed.

Anyone can help me?

Thanks in advances,

Kind regards.

#186785
Edited, Jan 04, 2018 13:01
Vote:
 

I realize that it might be a bug, but why can't you just drag and drop a block? :)

#186786
Jan 04, 2018 13:24
Vote:
 

Yes, I could do. But it is easier and faster to create a block clicking directly the link, which only shows you the allowed types, than going to blocks panel > select block type > create block > drag and drop the created block...

#186788
Jan 04, 2018 13:57
Vote:
 

Fair enough, you wouldn't know which blocks are available until you actually start drag blocks and notice they won't drop. I believe there are some other differences as well, if a block is created on a page it isn't a IContent, but if it is created in a blocks folder, it is IContent. Either that or it's when a page has a single block as a property, can't recall. 

#186793
Jan 04, 2018 14:40
Vote:
 

It is when the page have a block as a property that is the special case, i.e. "local" block.

#186795
Jan 04, 2018 14:59
Vote:
 

Hey Joel,

What he is saying is that on non commerce pages you have the follwoign for contetn areas:

The  "create a new block" text  is not available if you are editing a page type that inherits from ProductContent.   This means the content staff have to go create the block manually, then come back to the product page.  They then need to find the newly created block and drag that on to the area.  Although this is a workaround, adding this link will save them a lot of time.  this seems like an omission from Episerver, that we are trying to work around.  I will have a look and see if it is fixed in the new version.

#187327
Edited, Jan 19, 2018 12:02
Vote:
 

Hi guys,

Obviously this is an old post but for anyone looking for a solution I wrote the following blog providing a solution to this:

https://world.episerver.com/blogs/david-harlow/dates/2018/3/extending-commerce---content-area-functionality/

Thanks

#191230
Apr 24, 2018 12:03
Vote:
 

Thanks David,  I'll give that a go.  If it works my content team are going to love you.  Makes you wonder why Episerver haven't doen it, if it is so simple.

#191539
Apr 25, 2018 9:39
Vote:
 

It is not that simple if you think from a framework perspective. Commerce contents already have their own collection of assets. Implementing IResourcable will make it duplicated, and it's hard to handle assets in an easy to understand way.

Yes we thought about it, talked about it, but it's not that easy. 

#191542
Apr 25, 2018 9:48
Vote:
 

So you would recommend not doing this change?

#191543
Apr 25, 2018 9:51
Vote:
 

No I'm not saying that. If that works for you then it works for you. I'm just replying to your "Makes you wonder why Episerver haven't doen it, if it is so simple.". Everything might be simple if it is a "workaround" for one site. But if it is something at framework level which has to work for every site then it might not be that simple.

#191546
Apr 25, 2018 10:00
Vote:
 

I actually suggested the approach (not trying to undermine David's blog post), if that matters: https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2018/2/quotcreate-new-blockquot-option-unavailable-in-content-area-for-commerce-items/

My comment stands: "However this is obviously a work around, so you will have to live with the drawback (if any) "

#191547
Apr 25, 2018 10:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.