_ContentMixin.getCurrentContext() returns incorrect context on ContentArea->Create a new Block

Vote:
 

I have a custom component on a block that uses the _ContextMixin as described in the following link

https://world.episerver.com/documentation/developer-guides/CMS/user-interface/Context-sensitive-components/

If I create a new block the context describes the block where the property exists as expected.

If I, on the other hand, have a page with a ContentArea and clicks the "Create a new block" link on that content area, the context returned is not the block context but the page context where the ContentArea is located.

#190886
Apr 18, 2018 11:25
Vote:
 

Seems like a bug. You should probably report it to Epi. 

#191189
Apr 23, 2018 16:26
Vote:
 

Already done, but they need a working code sample based on their alloy sample so I have to write such an example to get any further.... Frustrating....

#191191
Apr 23, 2018 16:48
Vote:
 

Problem can be reproduced by the AlloyDemoKit fork at 

https://github.com/meriworks/AlloyDemoKit/commit/29dbb082750562240136e2edb931bf7d5c24cbb8

#191251
Edited, Apr 24, 2018 16:53
Vote:
 
<p>Solved the issue with help from episerver support.</p> <p>The solution was to add information to the metadata for the editor.</p> <p>See commit below</p> <p>https://github.com/meriworks/AlloyDemoKit/commit/e1d8e35b906e70680a95bd25f5b50ed3f90de80c</p>
#193697
Jun 04, 2018 8:50
* 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.