This project is read-only.
1
Vote

Formsmode not working with OpenWaves.EPiServer.ExtendedContentAreaEditor

description

Tried getting the OpenWaves.EPiServer.ExtendedContentAreaEditor nuget to work in a new Alloy project.
I'm running in to an issue in the FormsMode in the Admin UI

steps I followed:
1. Installed the nuget package
2. Set the correct attributes on property ContentArea in the Startpage
    [Display(
        GroupName = SystemTabNames.Content,
        Order = 320)]
    [CultureSpecific]
    [UIHint(ExtendedContentAreaEditorDescriptor.UIHint)]
    [ContentAreaSupportedTypes(typeof(TeaserBlock), typeof(SitePageData), typeof(ContactPage))]
    public virtual ContentArea MainContentArea { get; set; }
3. Compile error:
The type 'EPiServer.Cms.Shell.UI.ObjectEditing.EditorDescriptors.ContentAreaEditorDescriptor' is defined in an assembly that is not referenced.
You must add a reference to assembly 'EPiServer.Cms.Shell.UI, Version=1.0.431.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.
I added a reference to EPiServer.Cms.Shell.UI.dll (from the modulesBin directory)
4. Formsmode doesn't work any more, the blue icon keeps spinning

Please advise

comments

ggroot wrote Oct 16, 2013 at 10:19 AM

After some digging I found out that the DisplayName property in the 'SiteContentType' attribute is required to get this to work.

If this property is not present the following exception occurs
[NullReferenceException: Object reference not set to an instance of an object.]
OpenWaves.EPiServer.ExtendedContentAreaEditor.<>c__DisplayClass1.<ModifyMetadata>b__0(Type ca) +78
System.Linq.WhereSelectArrayIterator2.MoveNext() +66
System.Collections.Generic.List
1..ctor(IEnumerable1 collection) +460
System.Linq.Enumerable.ToList(IEnumerable
1 source) +58

ggroot wrote Oct 16, 2013 at 2:56 PM

It's not working in my site.
It tries to load http://local.website.com/EPiServer/Shell/2.1.90/ClientResources/dtk/ow/epi/extendedContentAreaEditor/overlayBlockArea.js
the js/css in the wrong folder, although my modules.config is correct

ggroot wrote Oct 21, 2013 at 7:58 AM

to get this to work in 7.1 change the module.config to

<?xml version="1.0" encoding="utf-8" ?>

<module productName="OpenWaves Image Browser">
<assemblies>
    <add assembly="OpenWaves.EPiServer.ExtendedContentAreaEditor" />
</assemblies>

<dojo>
    <packages>
        <add name="ow-epi-extendedontentareaeditor" location="~/modules/ow.epi.extendedContentAreaEditor/Scripts" />
    </packages>
    <aliases>
        <add from="ow/epi/extendedContentAreaEditor/overlayBlockArea" to="ow-epi-extendedontentareaeditor/overlayBlockArea" />
        <add from="ow/epi/extendedContentAreaEditor/contentAreaValidator" to="ow-epi-extendedontentareaeditor/contentAreaValidator" />
        <add from="ow/epi/extendedContentAreaEditor/formEditingWidget" to="ow-epi-extendedontentareaeditor/formEditingWidget" />
    </aliases>
</dojo>
</module>

ggroot wrote Oct 21, 2013 at 8:19 AM

also change line 54 in the contentAreaValidator.js to
var dndData = source.getItem(nodes[0].id).data.dndData;