Upgrade to DD4T 2.0 – Issues and Fixes

While upgrading to DD4T 2.0, there were some issues/bugs I have encountered – some of them quite obvious, some are tricky and some really drives me crazy – Below is a list of few of them and the resolution which worked for me:

  1. Installing DD4T 2.0 Templates in a CMS Instance:
    Error:
    While installing the DD4T 2.0 templates using the installer available on DD4T website, it always through below error:

    Product: DD4T Templates -- Error 1001. Error 1001. Unable to upload the DD4T Templates into SDL Tridion. Please verify your input.
    Error: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.
    

    Root Cause:
    This issues happens in the scenario when the CM database is being restored from some other environment. Also, this applies to not only installing the DD4T TBBs but also for any Custom TBBs referring the DD4T TBBs.

    Resolution:

    • Open the Tridion CM database in SQL Server Management Studio
    • Locate the table – Queue_Consumer and open it in edit mode
    • Mark status of all other hosts from online to offline – you need to update the field value IS_ONLINEto 0 for all hosts other than your current host machine.
      dmcyt
  2. Using Component Factory in DD4T 2.0
    Error:
    ComponentFactory in DD4T 2.0 is marked as “deprecated” but the code (which is working fine till DD4T 1.31) does not work while using ComponentFactory in DD4T 2.0.

    Root Cause:
    The ComponentFactory has been marked as deprecated but all the method in the class are throwing “Not Implemented” exception.

    This has been raised as a bug with DD4T team and can be followed here – Issue 79

    Resolution:
    Use Component Presentation Factory instead of Component Factory. If you need to get an IComponent object, then you can use

    ComponentPresentationFactory.GetComponentPresentation().Component
    
    
  3. Using already published Xml Format DCP with your updated DD4T project
    Error:
    You can use the Xml Format DCP (published through older version of DD4T) with your DD4T 2.0 APIs; however, depending on your Content Delivery code, after update to DD4T 2.0, you might get below error:

    Object reference not set to an instance of an object

    Root Cause:
    In the ContentModel.cs class, quite a few numbers of attributes related to Metadata and Keywords are decorated with [XmlIgnore]. Due to this, while you try to Xml Deserialized, you will receive these XmlIgnored attributes as null.

    This has been raised as a bug with DD4T team and can be followed here Issue 80

    Resolution:
    You may either need to wait for this issue to be fixed by the DD4T team or you can take the latest code for the DD4T.Model package, update the ContentModel.cs class in it to remove the [XmlIgnore] attributes. Create a fresh DD4T.ContentModel.dll and replace it in the DD4T.Model package in your project.
    NOTE: If you restore your package from nuGet again, it may overwrite your solution.

  4. Publishing with Custom TBBs referring the DD4T TBBs
    Error:
    In case you have some custom TBBs written for your specific business need and it is expecting the XML format  to manipulate with, the publishing will fail in “Rendering” phase

    Root Cause:
    The DD4T 2.0 does not produce the XML format output but only JSON format instead.

    Resolution:
    Update your custom TBBs such that it does not depends and manipulate the XML format content but accets and work with the JSON format.

Advertisements

11+ years of experience in Software Development Life Cycle using AGILE, Iterative and RUP approaches. Hand-on experience in following: - CMS packages: SDL Tridion, Umbraco, Kentico, SiteFinity and Alfresco - Search Engines: SOLR, Endecca, FAST - .NET Technologies: .NET & .NET CE Framework, ASP.NET, ASP.NET MVC, WCF, WinForms - Mobile Development: Android Native App, Windows Mobile App - Database: MS-SQL Server, MySQL - Program Management: JIRA, MS-Project - Design Tools: MS-Visio, StarUML Have decent knowledge about Core Java, Spring MVC, Ektron and Google Mini Instrumental in Application Architecture, Designing (HLD & LLD), Coding and deployment .NET applications (Web, Desktop, Mobile). Experience in following domain: - Digital Media & eCommerce - Travel & Hospitality - Aviation Industry - Education - Insurance - Automation - Automobile - Railways Freelance trainer and consultant in .NET, CMS, SDL Tridion, Alfresco and soft skills like business communication, e-mail etiquette etc. Education: Bachelor Degree in Computer Engineering and Post Graduate Diploma in Business Administration with specialization in Marketing

Tagged with: , , , ,
Posted in SDL Tridion

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: