Copied to clipboard

Flag this post as spam?

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


  • James Harkins 5 posts 95 karma points
    Jun 19, 2019 @ 04:01
    James Harkins
    0

    uSync Content Manager v8 ignore settings not working

     <Handler Alias="contentHandler" Enabled="true">
        <Setting Key="rulesonexport" Value="true" />
        <Setting Key="useshortidnames" Value="true" />
        <Setting Key="ignore" Value="home" />
      </Handler>
    

    The config file appears to be different in v8. How do we make Content Edition ignore items?

    Above is an attempt to ignore the root Home page. I've tried several things, but the home.config file always writes to disk.

    Thanks!

  • James Harkins 5 posts 95 karma points
    Jun 19, 2019 @ 12:31
    James Harkins
    0

    Or better yet, can Content Edition be configured to only export certain Document Types in v8?

    Similar to this? Issue with exporting content

    My goal is to export only certain container nodes, but not their actual children. This would allow the Content Picker editor to have the "Starting Node" property set in the Development environment and remain consistent throughout all other environments.

    I'm new to using Content Edition, so thanks for your help!

  • James Harkins 5 posts 95 karma points
    Jun 28, 2019 @ 18:49
    James Harkins
    0

    Anyone have a suggestion or example?

    I'd really like to export content based on its name and or some common property.

    I have not found a complete working example of how to extend uSync content edition and the docs appear to be related to older versions.

  • James Harkins 5 posts 95 karma points
    Jun 29, 2019 @ 17:24
    James Harkins
    100

    I figured it out, if anyone else wants to accomplished something similar. I made a copy of the the ContentHandler class from uSync source code and added it to my Umbraco web project.

    Altered the SyncHandler attributes:

        [SyncHandler("repoContentHandler", "Repos", "Repos", uSyncBackOfficeConstants.Priorites.Content
        , Icon = "icon-file-cabinet usync-addon-icon", IsTwoPass = true)]
    

    Renamed the Class to RepoContentHander and added the following override :

     protected override IEnumerable<IEntity> GetExportItems(int parent, UmbracoObjectTypes objectType)
        {
    
            return entityService.GetChildren(parent, objectType)
                .Where(x => (x as DocumentEntitySlim).ContentTypeAlias.EndsWith("Repo"));
    
        }
    

    Only exports items with a content type alias that ends with Repo, such as componentRepo, menuRepo, pageHeaderRepo, etc. Requires a root item of type Repo. There is probably a better way to do this, but this works perfectly for my needs.

  • Marcus Olkerud 2 posts 72 karma points
    Mar 26, 2020 @ 09:42
    Marcus Olkerud
    0

    As pointed out editing the config like this doesn't appear to work.

    <Handler Alias="contentHandler" Enabled="true" Actions="All">
      <Add Key="Exclude" Value="/PathToExclude" />
      <Add Key="RulesOnExport" Value="True" />
    </Handler>
    

    And I can't implement the solution posted by James either. There is no GetExportItems method to override. Should I instead override the ShouldExport and/or ShouldImport methods? Or is there another solution?

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Jan 06, 2020 @ 12:01
    Kevin Jump
    0

    Hi ,

    for v8.4 we've added the settings back into uSync

    https://jumoo.co.uk/usync/docs/v8/contentEdition/contentHandler/

    something like this should now work.

    <Handler Alias="contentHandler" Enabled="true">
        <Add Key="Include" Value="/Homepage,/settings" />
        <Add Key="Exclude" Value="/Homepage/Blog" />
        <Add Key="RulesOnExport" Value="true" />
    </Handler>
    
  • Mathias 47 posts 191 karma points
    Mar 26, 2020 @ 07:45
    Mathias
    0

    This does not work, there is my relevant config section:

     <Handlers Name="default">
        <Handler Alias="dataTypeHandler" Enabled="false" />
        <Handler Alias="languageHandler" Enabled="false" />
        <Handler Alias="macroHandler" Enabled="false" />
        <Handler Alias="mediaTypeHandler" Enabled="false" />
        <Handler Alias="memberTypeHandler" Enabled="false" />
        <Handler Alias="templateHandler" Enabled="false" />
        <Handler Alias="contentTypeHandler" Enabled="false" />
        <!--<Handler Alias="contentHandler" Enabled="true" />-->
        <Handler Alias="contentHandler" Enabled="true">
          <Add Key="Exclude" Value="/Partners" />
          <Add Key="RulesOnExport" Value="true" />
        </Handler>
        <Handler Alias="contentTemplateHandler" Enabled="false" />
        <Handler Alias="dictionaryHandler" Enabled="false" />
        <Handler Alias="domainHandler" Enabled="false" />
        <Handler Alias="mediaHandler" Enabled="false" />
      </Handlers>
    

    I've disabled all other handlers except the content one. and I want uSync to ignore exporting anything from the /Partners node. However, each time I perform an export, the content from the /Partners node get's exported.

    I've tried with "/Partners", "/Partners/", "/Partners/*" and even "/Partners/DevInstallatoren" (which is one specific piece of content under that node.

    But alas, nothing works. Please advise!

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Mar 26, 2020 @ 10:14
    Kevin Jump
    2

    Yeah, sorry stupid error in the code for that one 😥

    patch update (8.5.1.1) for uSync.ContentEdition fixes it.

    Install-Package uSync.ContentEdition -Version 8.5.1.1
    

    see : https://www.nuget.org/packages/uSync.ContentEdition/8.5.1.1

    Issue (now closed) : https://github.com/KevinJump/uSync8/issues/87

  • Marcus Olkerud 2 posts 72 karma points
    Mar 26, 2020 @ 10:39
    Marcus Olkerud
    0

    It works as intended now! Thank you for the quick response!

  • Mathias 47 posts 191 karma points
    Mar 26, 2020 @ 12:08
    Mathias
    0

    thanks a lot for the quick response King!

  • James Harkins 5 posts 95 karma points
    Mar 30, 2020 @ 21:30
    James Harkins
    0

    LOL, Reported June 2019, I'd hate to see slow response.

  • Mathias 47 posts 191 karma points
    Mar 31, 2020 @ 06:45
    Mathias
    0

    LOL indeed, I just noticed when this post was originally created. I guess we were just lucky that Kevin was around when we posted

Please Sign in or register to post replies

Write your reply to:

Draft