Join our community!

Get everything you need to start developing EPiServer solutions.

EPiServer Composer admin mode not working

July 11 2011, 15:09

Hi,
I upgraded composer to episerver 4.0 R2. When I go to admin mode "EPiServer Composer" I get the following error"

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Dropit.Extension.UI.Admin.Controls.FunctionTypeList.<DataBind>b__1(PageDefinition pageDef) +41
   System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +166
   Dropit.Extension.UI.Admin.Controls.FunctionTypeList.<DataBind>b__0(ContentFunctionType cf) +142
   System.Collections.Generic.List`1.RemoveAll(Predicate`1 match) +79
   Dropit.Extension.UI.Admin.Controls.FunctionTypeList.DataBind() +583
   Dropit.Extension.UI.Admin.Controls.FunctionTypeList.Page_Load(Object sender, EventArgs e) +12
   System.Web.UI.Control.OnLoad(EventArgs e) +131
   System.Web.UI.Control.LoadRecursive() +65
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3618

Could you please help me solving this issue.

Kind regards,

Stephen Albert


  • July 12 2011, 13:52

    Hi Stephen

    From which version of Composer did you run the upgrading? Please re-check the following document, specially if your previous version of Composer was 3.2.6,

    http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-Composer/EPiServer-Composer-4-R2---Upgrading-from-Composer-326/

     

    Regards

    Hieu Doan

  • July 14 2011, 7:56

    Hi Doan,

    The previous version of composer(dropit.extension.dll) was 4.0.0.70. I tried the link you provided above, but it seems I do not have access to the document.

    Kind regards,

    Stephen Albert

     

     

  • November 22 2011, 9:42

    Same problem here. Can you post an answer on how did you solve the issue?

     

  • November 22 2011, 10:00

    Did you follow the document Hieu linked?

  • November 22 2011, 10:10

    No. I get Access denied when I click that link.

     

  • November 22 2011, 10:13

    If you go here, can you see the "Upgrading from Composer 3.2.6 - EPiServer Composer 4 R2" under tech notes?

  • November 22 2011, 10:22
  • November 22 2011, 12:35

    Hi,

    I experienced the same error when the EPiServer.ComposerSampleTemplates.dll assembly was not present in the bin folder.

    I'm currently installing a new instance of Composer on a new CMS 6 R2 site (no upgrade).

    Regards,

    Vibeke

  • November 22 2011, 12:54

    Thanks Vibeke, that really help me, works like a dream now

  • January 4 2012, 18:05

    I am getting the exact same error as above after upgrading Composer.

    The site didn't use ComposerSampleTemplates.dll before upgrade and it doesn't fix issue if I place it in bin folder as described above.

    Anyone got any ideas as to the cause of this?

  • January 6 2012, 17:04

    I would imagine this is happening because one of the dependencies - didn't get added to the solution during the upgrade. This is likely to either be a property definition or a pagetype (composer definition). Composer 4.1 adds a custom property called Personalization Container Property and also a new Function (PageType) definition called [ExtensionSys] Personalization Container

    Can you see this property and PageType listed in the in Admin mode?

    If not I would check the following:

    1) Are the Composer Libraries correctly included in the bin and are they the correct version

    DropIt.Extension.dll - version 4.1.0.142

    DropIt.Extension.Ui.dll - version 4.1.0.142

    One of these libraries will contain the definition for new page custom properties, which should be added on initialization

    2) Have the additional function types been set up. I've written a blog about one page type that I found was missing (which was my own fault during upgrade). You can import this via the xml file I've included on my blog - though this probably will fail if the new custom property defintion doesn't exist.

     

  • Ted
    February 7 2012, 18:18

    I have this exact same problem, but it's been Composer 4 R2 from the beginning. The exception message isn't too helpful. ;)

  • February 7 2012, 18:25

    A little more information - we've seen these type of exceptions thrown when the EPiServer database contains records of custom properties from assemblies that are no longer in the solution.

    I'm not sure exactly why the upgrade process uncovers these - but we managed to help fix one issue like this by purging the database of obsolete custom property references.

  • Ted
    February 7 2012, 20:09

    Mark, you're my hero. I could seriously hug you right now - but not in a weird way or anything. :)

    Ok, so here's how to reproduce it:

    1. Create a custom property
    2. Use the custom property for a Composer function
    3. Move the custom property to another assembly (causing two separate property type definitions in the database)
    4. Go to "EPiServer Composer" in admin mode
    5. Behold the miracles of a NullReferenceException

    Thanks a LOT for pointing me in the right direction!

  • February 7 2012, 23:06

    Awesome - glad that helped. I can't take the credit for that discovery though. Gareth Kelly who posted earlier in this thread was the 'hero' who wrestled with the issue to find that solution.

    Looks like this may be a genuine bug, as the core CMS product doesn't display similar behaviour.