Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Roy 6 posts 26 karma points
    Aug 08, 2011 @ 15:39
    Chris Roy
    0

    Application error with templates in DB when deploying

    We have recently upgraded our Umbraco from version 4.0.3 to version 4.7.0. For the upgrade, we also changed our database from a SQL DB to a SQL Compact Edition database. The primary focus of the upgrade was so that we could then install and utilise Courier to allow for more streamlined development and publishing of content.

    We did come across some issues in our Umbraco installation when upgrading such as missing media recycle bin, all of which now seem to be resolved. However, when we try to utilise the courier deploy command and publish any section of the site to a different environment, we get the error as seen at the foot of this message. We have checked the DB and can confirm that the Base template is present in cmsTemplate and umbracoNode tables, and so we are unsure why we are getting the message “

    Error retrieving item [Base] from provider.”

    Could you please review the full error below and offer any help/advice with this matter? Your help is much appreicated.

    ERROR AS FOLLOWS:

    Umbraco.Courier.Core.Exceptions.PackageException: Unable to load item width id 'Base' from provider 'Templates' ---> Umbraco.Courier.Core.Exceptions.RetrieveException: Error retrieving item [Base] from provider [25867200-e67e-11df-9492-0800200c9a66]. ---> NHibernate.ObjectNotFoundException: No row with the given identifier exists[Umbraco.Courier.Persistence.V4.NHibernate.EntityClasses.UmbracoNode#0]
    at NHibernate.Impl.SessionFactoryImpl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id)
    at NHibernate.Proxy.AbstractLazyInitializer.CheckTargetState()
    at NHibernate.Proxy.AbstractLazyInitializer.Initialize()
    at NHibernate.ByteCode.Castle.LazyInitializer.Intercept(IInvocation invocation)
    at Castle.DynamicProxy.AbstractInvocation.Proceed()
    at UmbracoNodeProxy3e26461fd39842e5991d9faec2f1cc16.get_CmsTemplates()
    at Umbraco.Courier.Persistence.V4.NHibernate.Persisters.TemplateItem.RetrieveItem[T](ItemIdentifier itemId) in d:\TeamCity6\buildAgent\work\399aef48762b5884\Umbraco.Courier.Persistence.NHibernate\Persisters\Template.cs:line 76
    at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId)
    --- End of inner exception stack trace ---
    at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId)
    at Umbraco.Courier.ItemProviders.TemplateItemProvider.HandlePack(ItemIdentifier id) in d:\TeamCity6\buildAgent\work\399aef48762b5884\Umbraco.Courier.Providers\ItemProviders\TemplateItemProvider.cs:line 52
    at Umbraco.Courier.Core.ItemProvider.Package(ItemIdentifier id)
    at Umbraco.Courier.RepositoryProviders.Local.Package(ItemIdentifier itemId) in d:\TeamCity6\buildAgent\work\399aef48762b5884\Umbraco.Courier.RepositoryProviders\Local\Local.cs:line 173
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)
    --- End of inner exception stack trace ---
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)
    at Umbraco.Courier.Core.PackagingManager.š()
    at Umbraco.Courier.Core.PackagingManager.š()
    at Umbraco.Courier.Core.PackagingManager.š()
    at Umbraco.Courier.Core.PackagingManager.š()
    at Umbraco.Courier.Core.PackagingManager.PackageQueue()
    at Umbraco.Courier.UI.Dialogs.CommitItem.PackageSelectedItems()
    at Umbraco.Courier.UI.Dialogs.CommitItem.oneSteptransfer(Object sender, EventArgs e)
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Error retrieving item [Base] from provider [25867200-e67e-11df-9492-0800200c9a66].


    Umbraco.Courier.Core.Exceptions.RetrieveException: Error retrieving item [Base] from provider [25867200-e67e-11df-9492-0800200c9a66]. ---> NHibernate.ObjectNotFoundException: No row with the given identifier exists[Umbraco.Courier.Persistence.V4.NHibernate.EntityClasses.UmbracoNode#0]
    at NHibernate.Impl.SessionFactoryImpl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id)
    at NHibernate.Proxy.AbstractLazyInitializer.CheckTargetState()
    at NHibernate.Proxy.AbstractLazyInitializer.Initialize()
    at NHibernate.ByteCode.Castle.LazyInitializer.Intercept(IInvocation invocation)
    at Castle.DynamicProxy.AbstractInvocation.Proceed()
    at UmbracoNodeProxy3e26461fd39842e5991d9faec2f1cc16.get_CmsTemplates()
    at Umbraco.Courier.Persistence.V4.NHibernate.Persisters.TemplateItem.RetrieveItem[T](ItemIdentifier itemId) in d:\TeamCity6\buildAgent\work\399aef48762b5884\Umbraco.Courier.Persistence.NHibernate\Persisters\Template.cs:line 76
    at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId)
    --- End of inner exception stack trace ---
    at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId)
    at Umbraco.Courier.ItemProviders.TemplateItemProvider.HandlePack(ItemIdentifier id) in d:\TeamCity6\buildAgent\work\399aef48762b5884\Umbraco.Courier.Providers\ItemProviders\TemplateItemProvider.cs:line 52
    at Umbraco.Courier.Core.ItemProvider.Package(ItemIdentifier id)
    at Umbraco.Courier.RepositoryProviders.Local.Package(ItemIdentifier itemId) in d:\TeamCity6\buildAgent\work\399aef48762b5884\Umbraco.Courier.RepositoryProviders\Local\Local.cs:line 173
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)

    No row with the given identifier exists[Umbraco.Courier.Persistence.V4.NHibernate.EntityClasses.UmbracoNode#0]


    NHibernate.ObjectNotFoundException: No row with the given identifier exists[Umbraco.Courier.Persistence.V4.NHibernate.EntityClasses.UmbracoNode#0]
    at NHibernate.Impl.SessionFactoryImpl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id)
    at NHibernate.Proxy.AbstractLazyInitializer.CheckTargetState()
    at NHibernate.Proxy.AbstractLazyInitializer.Initialize()
    at NHibernate.ByteCode.Castle.LazyInitializer.Intercept(IInvocation invocation)
    at Castle.DynamicProxy.AbstractInvocation.Proceed()
    at UmbracoNodeProxy3e26461fd39842e5991d9faec2f1cc16.get_CmsTemplates()
    at Umbraco.Courier.Persistence.V4.NHibernate.Persisters.TemplateItem.RetrieveItem[T](ItemIdentifier itemId) in d:\TeamCity6\buildAgent\work\399aef48762b5884\Umbraco.Courier.Persistence.NHibernate\Persisters\Template.cs:line 76
    at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId)

  • Per Ploug 865 posts 3491 karma points MVP admin
    Aug 09, 2011 @ 22:45
    Per Ploug
    0

    I did the grave mistake of installing Windows 7 service pack, it has effectively crippled my develope machine IIS

    So can't reproduce and dig deeper into it right now...

    But can tell you what the code is doing specificly on those lines in the trace..

    It looks in the db, and only in the cmsTemplates table, for the row, with the alias column = "base" (not [base] as in the headline)

    so if you have a row with the alias = base, then thats very strange.

    Hopefully I got a dev IIS to test this on tomorrow so I can reproduce and find out why this is happening

    /Per

  • Chris Roy 6 posts 26 karma points
    Aug 10, 2011 @ 09:51
    Chris Roy
    0

    That's great Per. Thanks for having a look at this! Will check the DB today with regard to your point above.

    Cheers 

  • Chris Roy 6 posts 26 karma points
    Aug 10, 2011 @ 11:59
    Chris Roy
    0

    OK Per, we have had a look at the DB and there is no coulmn with the alias base. We do have a column called alias which has a base row in it, which you can see from below. (I have also shown the row from the umbracoNode table which corresponds to this Base template)

    cmsTemplate row:

    4     1056  0     Base  <%@ Master Language="C#" MasterPageFile="/umbraco/mast...

     umbracoNode row:

    1056  False -1    0     1     -1,1056     2     80a196cc-eb18-40d2-9403-2830611deac3      Base  6fbde604-4178-42ce-a10b-8a2600a2f07d      10/05/2010 16:00:25

     

    One thing we did discover is that the last column (alias: design), which seems to store all the markup for this template, is old. We did a quick check for other templates in this table and they seem to be up to date, but the base row seems to be a good 6 months or more behind, which may be something to do with this issue?

    Another thing worth noting, is that we did have an issue at one point with a duplicate Base templates. When we done the upgrade from 4.0.3 to 4.7.0, we tidied up the site to remove this duplicate, but fear this may be having a knock-on effect somehow. Looking back at the old DB, the other Base entry's ID is not referenced anywhere (as a parent for example), so we don't believe that anything is depending on that base. The strangest thing is that the DB entry for the current base doesnt seem to be up to date with the actual markup being used within the site.

    Cheers, Chris

  • Jason Prothero 422 posts 1243 karma points c-trib
    Aug 19, 2011 @ 22:39
    Jason Prothero
    0

    I'm getting the same error

    Unable to load item width id 'SiteMaster' from provider 'Templates'

    However, I actually have a SiteMaster template and it should be valid as far as I know.  We also upgraded our sites from 4.0.x to 4.5.2 and finally 4.7.0.

     

    Here's my cmsTemplate:

    pknodeIdmasteraliasdesign
    110560SiteMaster<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %> <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">...

    and the umbracoNode:

    idtrashedparentIDnodeUserlevelpathsortOrderuniqueIDtextnodeObjectTypecreateDate
    10560-101-1,1056253ADDB69-93CB-4F20-9A37-403107682B31Site Master6FBDE604-4178-42CE-A10B-8A2600A2F07D2010-06-07 12:44:36.063

     

    Any ideas?

     

    Thanks,
    Jason 

  • Jason Prothero 422 posts 1243 karma points c-trib
    Aug 19, 2011 @ 23:11
    Jason Prothero
    0

    I thought maybe it was because the parentId was 0.  Set it to NULL.  But I'm still getting the error.

     

     

  • Jason Prothero 422 posts 1243 karma points c-trib
    Aug 22, 2011 @ 19:33
    Jason Prothero
    0

    OK, I found another difference.  The SiteMaster template had a slight issue.  There was a macro inserted that had mis-matched start/end tags.  Like this:

    <umbraco:macro ...> </umbraco:Macro>

    I made them both camel-case and now I am able to deploy some of my nodes.  More testing is needed, but this is a break-through for me.

     

    J

  • Chris Roy 6 posts 26 karma points
    Sep 13, 2011 @ 17:03
    Chris Roy
    0

    OK, for some unbeknownst reason, it would appear that courier has now began working and we are now having no problems deploying the content between our development and preprod environments. I may be back to visit this forum when it comes to pushing content to the live site, but for now all seems to be well. Unfortunately for anyone else experiencing a similar issue I cannot say what was done to resolve this...it just seemed to 'work' one day.

  • Paul Mieczkowski 6 posts 52 karma points
    Sep 30, 2011 @ 12:48
    Paul Mieczkowski
    0

    in order to resolve this, all you need to do is run an upgrade sql script -  to be found in the source code of the version of umbraco you're upgrading to

    \umbraco\datalayer\SqlHelpers\SqlServer\Sql\Version4_Upgrade.sql (4.7.1)

    hope this helps :)

Please Sign in or register to post replies

Write your reply to:

Draft