Copied to clipboard

Flag this post as spam?

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


  • Mark Bowser 261 posts 846 karma points c-trib
    Jul 23, 2014 @ 21:12
    Mark Bowser
    0

    Doc Type Properties Not Mapped Correctly

    We have an issue where the doc type properties are not being read in correctly to our staging site.

    On our Home Page, we have 4 Archetypes (see http://our.umbraco.org/projects/backoffice-extensions/archetype). Here are the archetypes in the order in which they appear on the doc type:

    1. Hero Images [data type: Hero Images]
    2. Top Feature Boxes [data type: Feature Boxes]
    3. Bottom Feature Boxes [data type: Feature Boxes]
    4. Social Links [data type: Social Link Editor]

    Here is a little bit of the usync definition of the Home Page doc type

    <GenericProperty>
      <Name>Hero Images</Name>
      <Alias>heroImages</Alias>
      <Type>Imulus.Archetype</Type>
      <Definition>9beb166e-e261-41c9-867f-8a147248f595</Definition>
      <Tab>Hero</Tab>
      <Mandatory>False</Mandatory>
      <Validation></Validation>
      <Description><![CDATA[Slider images in main image area]]></Description>
      <SortOrder>0</SortOrder>
    </GenericProperty>
    <GenericProperty>
      <Name>Top Feature Boxes</Name>
      <Alias>topFeatureBoxes</Alias>
      <Type>Imulus.Archetype</Type>
      <Definition>e32314d3-929a-45b6-a2c3-bec984d91a11</Definition>
      <Tab>Feature Boxes</Tab>
      <Mandatory>False</Mandatory>
      <Validation></Validation>
      <Description><![CDATA[For the featured boxes above the search box]]>       </Description>
      <SortOrder>0</SortOrder>
    </GenericProperty>
    <GenericProperty>
      <Name>Bottom Feature Boxes</Name>
      <Alias>bottomFeatureBoxes</Alias>
      <Type>Imulus.Archetype</Type>
      <Definition>e32314d3-929a-45b6-a2c3-bec984d91a11</Definition>
      <Tab>Feature Boxes</Tab>
      <Mandatory>False</Mandatory>
      <Validation></Validation>
      <Description><![CDATA[For the featured boxes below the search box]]></Description>
      <SortOrder>0</SortOrder>
    </GenericProperty>
    <GenericProperty>
      <Name>Social Links</Name>
      <Alias>socialLinks</Alias>
      <Type>Imulus.Archetype</Type>
      <Definition>e47d5285-8403-48c8-abb4-c2d10614e654</Definition>
      <Tab>Social</Tab>
      <Mandatory>False</Mandatory>
      <Validation></Validation>
      <Description><![CDATA[]]></Description>
      <SortOrder>0</SortOrder>
    </GenericProperty>
    

    When I deploy this code to our dev site, usync reads all of the properties in correctly. When I deploy the exact same code to our staging site, all of the properties above are read in with the data type: Hero Images. I can manually change the properties back to Feature Boxes and Social Link Editors, but on every deploy, those properties revert to Hero Images. I've verified that the usync GenericProperty definitions are on the staging site as above. I've also found other doc types with multiple Archetype properties and none of them have this problem for dev or staging.

    Here is the usync configuration for both the staging and dev sites:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
        <section name="usync" type="jumps.umbraco.usync.uSyncSettingsSection,jumps.umbraco.usync" allowLocation="true" allowDefinition="Everywhere" />
      </configSections>
    
      <usync read="true" write="false" attach="false" folder="~/uSync/" archive="~/uSync.Archive" versions="false" preserve="false" watchFolder="false">
        <!-- legacy config - has been replaced in v7/v6.2 -->
        <PreservedPreValues>
            <add key="f8d60f68-ec59-4974-b43b-c46eb5677985" value="Colour Picker"/>
            <add key="b4471851-82b6-4c75-afa4-39fa9c6a75e9" value="checkbox list"/>
            <add key="a74ea9c9-8e18-4d2a-8cf6-73c6206c5da6" value="dropdown"/>
            <add key="928639ed-9c73-4028-920c-1e55dbb68783" value="dropdown multiple"/>
            <add key="a52c7c1c-c330-476e-8605-d63d3b84b6a6" value="radiobox"/>
        </PreservedPreValues>
        <MatchedPreValues>
            <add key="7e062c13-7c41-4ad9-b389-41d88aeef87c" value="Multi Node Tree Picker"/>
            <add key="ef94c406-9e83-4058-a780-0375624ba7ca" value="DAMP Media Picker"/>
        </MatchedPreValues>
        <!-- turn bits on/off - default is on (true) (for backwards compatability) -->
        <Elements dataTypes="true" docTypes="true" mediaTypes="true" macros="true" stylesheets="false" templates="false" dictionary="true"/>
        <!-- 
            DocumentTypes -> DeletePropertyValues - 
              remove property values that are not in the uSync file 
        -->
        <DocumentTypes DeletePropertyValues="true"/>
      </usync>
    </configuration>
    

    Do you have any clues as to what could cause this? What kind of things should I look for?

    Here are some umbraco logs. I couldn't find anything interesting in them:

    2014-07-23 13:26:53,092 [10] INFO  umbraco.BusinessLogic.Log - [Thread 31] Log scrubbed.  Removed all items older than 2014-05-24 13:26:53
    2014-07-23 13:26:53,094 [10] INFO  Umbraco.Core.UmbracoApplicationBase - [Thread 31] Application shutdown. Reason: BinDirChangeOrDirectoryRename
    2014-07-23 13:27:26,281 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Determining hash of code files on disk
    2014-07-23 13:27:26,304 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Hash determined (took 11ms)
    2014-07-23 13:27:26,318 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of umbraco.interfaces.IApplicationStartupHandler
    2014-07-23 13:27:26,639 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of umbraco.interfaces.IApplicationStartupHandler, found 63 (took 319ms)
    2014-07-23 13:27:26,767 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter
    2014-07-23 13:27:26,775 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter, found 1 (took 7ms)
    2014-07-23 13:27:26,775 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyValueConverter
    2014-07-23 13:27:26,786 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyValueConverter, found 17 (took 11ms)
    2014-07-23 13:27:26,810 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Web.Mvc.SurfaceController
    2014-07-23 13:27:26,817 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Web.Mvc.SurfaceController, found 7 (took 6ms)
    2014-07-23 13:27:26,817 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Web.WebApi.UmbracoApiController
    2014-07-23 13:27:26,832 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Web.WebApi.UmbracoApiController, found 45 (took 14ms)
    2014-07-23 13:27:26,837 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Core.Media.IThumbnailProvider
    2014-07-23 13:27:26,842 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Core.Media.IThumbnailProvider, found 3 (took 5ms)
    2014-07-23 13:27:26,843 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Core.Media.IImageUrlProvider
    2014-07-23 13:27:26,848 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Core.Media.IImageUrlProvider, found 1 (took 5ms)
    2014-07-23 13:27:28,341 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] uSync Starting - for detailed debug info. set priority to 'Debug' in log4net.config file
    2014-07-23 13:27:28,384 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Core.Persistence.Mappers.BaseMapper
    2014-07-23 13:27:28,392 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Core.Persistence.Mappers.BaseMapper, found 22 (took 8ms)
    2014-07-23 13:27:29,855 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] Processed data types (1509ms)
    ...
    2014-07-23 13:27:32,610 [14] INFO  jumps.umbraco.usync.SyncDocType - [Thread 11] updating DocType HomePage
    ...
    2014-07-23 13:27:35,737 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] Processed Doctypes [83](5880ms)
    2014-07-23 13:27:35,885 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] Processed Macros (146ms)
    2014-07-23 13:27:36,943 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] Processed Media types (1057ms)
    2014-07-23 13:27:36,961 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] Processed Languages (16ms)
    2014-07-23 13:27:36,965 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] Processed Dictionary items (3ms)
    2014-07-23 13:27:36,966 [14] INFO  jumps.umbraco.usync.uSync - [Thread 11] uSync Initilized (8625ms)
    2014-07-23 13:27:36,968 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of umbraco.interfaces.IApplication
    2014-07-23 13:27:36,982 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of umbraco.interfaces.IApplication, found 7 (took 13ms)
    2014-07-23 13:27:37,040 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of Umbraco.Web.Trees.TreeController
    2014-07-23 13:27:37,046 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of Umbraco.Web.Trees.TreeController, found 4 (took 5ms)
    2014-07-23 13:27:37,061 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of umbraco.interfaces.ITree
    2014-07-23 13:27:37,077 [14] INFO  Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of umbraco.interfaces.ITree, found 19 (took 15ms)
    2014-07-23 13:27:37,086 [14] INFO  Umbraco.Web.Search.ExamineEvents - [Thread 11] Initializing Examine and binding to business logic events
    2014-07-23 13:27:37,087 [14] INFO  Umbraco.Web.Search.ExamineEvents - [Thread 11] Adding examine event handlers for index providers: 4
    2014-07-23 13:27:37,635 [14] INFO  umbraco.content - [Thread 9] Loading content from disk cache...
    2014-07-23 13:27:37,859 [14] INFO  Umbraco.Core.PluginManager - [Thread 9] Starting resolution types of Umbraco.Core.PropertyEditors.IParameterEditor
    2014-07-23 13:27:37,914 [14] INFO  Umbraco.Core.PluginManager - [Thread 9] Completed resolution of types of Umbraco.Core.PropertyEditors.IParameterEditor, found 63 (took 55ms)
    

    To shorten the log a bit, I put '...' next to a lot of the doc types that usync imported. They were just a bunch of 'updating DocType xxxx' lines.

    Thanks!

  • Kevin Jump 1431 posts 9168 karma points MVP 3x c-trib
    Jul 28, 2014 @ 13:58
    Kevin Jump
    0

    I'm just looking at something where uSync has an issue when the datatype of a property is changed - so i think this is the issue, however once the datatype has been changed manually it shouldn't revert. (or at least it doesn't in any of my tests).

    Can you confirm how you are importing to the stage site (as I've just saw another bug!) where importing through the dashboard, when attach is set to true in the config causes some odd issues.

  • Kevin Jump 1431 posts 9168 karma points MVP 3x c-trib
    Jul 28, 2014 @ 15:33
    Kevin Jump
    100

    Version 2.3.0 fixes a number of minor issues when importing via the Dashboard, if you can try again and see if the import works better?

    http://our.umbraco.org/FileDownload?id=12232

  • Mark Bowser 261 posts 846 karma points c-trib
    Jul 28, 2014 @ 18:55
    Mark Bowser
    0

    We are currently using usync 2.2.2, and we never do dashboard imports. We are deploying using TeamCity. TeamCity is doing an MSBuild and deploy of the project. The app pool recycling in combination with the usync read="true" is how we are doing the import.

    I can fix the datatype and when I recycle the app pool, it is reverted. This is repeatable. This only happens on one of our staging sites. The other sites appear to be unaffected by this malady. Also, it is just the two Archetypes on the home page. We have other pages with multiple archetypes, but they are not affected.

    I forgot to mention this before, but we recently upgraded Archetype from 0.5.1 to 1.4.0. There was a breaking change for Archetype during this upgrade where the Archetype property is now using a GUID for configuring the datatype instead of an Integer. Again, usync succeeded at deploying these change to one of our staging sites. The other site is the only one having this issue.

    Also, it is interesting that all of the Archetypes on the home page are choosing to revert to the Hero Images Archetype and not some other data type..

  • Mark Bowser 261 posts 846 karma points c-trib
    Aug 06, 2014 @ 00:40
    Mark Bowser
    0

    I'm not sure all of what was going on, but I uninstalled usync and reinstalled usync 2.3.0 via nuget. It appears to have solved my problem. I think my original problem had something to do with the fact that I changed some doc type names in the past and it just took a while for me to notice that something was wrong.

    I had a DocTypeA I wanted to move under a different parent. Since I don't know how to move doctypes, I renamed it DocTypeA_Old. Then I created a new DocTypeA under the parent doc type I wanted it under. After that, I did umbraco's cool change your content's doc type deal to move all of my content over to the new doc type.

    That in combination with the way that I was doing deployment was really confusing usync until 2.3.0. I would delete the usync directory and have usync regenerate it. I would push the changes to source control. But then, when I had TeamCity deploy my code, I had told it that it shouldn't delete any files on the server. It should just modify them. That left all the old usync on the destination server while I was under the impression that I had regenerated the usync directory.

    After my problem was solved via installing usync 2.3.0, I noticed the Multiple doc type definition issue and fixed that.

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft