Copied to clipboard

Flag this post as spam?

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


  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 14, 2013 @ 18:36
    Anthony Dang
    0

    Bug: Path too long causes no deletion of doctypes etc

    uSync doesnt allow deletion of anything if the filesys path of the stored config file is too long.

     

     

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Mar 14, 2013 @ 19:19
    Kevin Jump
    0

    eek -

    so just to confirm it's not letting you delete the uSync file in  say ~\usync\\umbraco.cms.businesslogic.web.DocumentType\thing\thing\thing.config 

    and it's stopping umbraco from deleteing by throwing an error ? 

    - ok, i'll look, i suspect it's my desire to call the folder the type coming back to bite me . 

     

     

     

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Mar 14, 2013 @ 20:14
    Kevin Jump
    0

    OK, some code options, would appreciate your views. 

    1. currently usync creates type folders based ont the name i.e umbraco.cms.businesslogic.datatype.DataTypeDefinition

    I can change it (i have a version now) so usync will just create the end type e.g /uSync/DataTypeDefinition/....

    2. the issue is with nested really with doctypes ? 

    as the moment i create folder names based on doctype names, and save the file with the same name, it makes navigation simple. 

    i can (again i have a version that does this) create the folder names based on the ID you then get 

    \uSync\DocumentType\1066\1067\1070\News Item.config - less nice browser wise but much shorter. 

    3. this is because the default .net file classes limit to 260 chars (why microsoft? why?)

    i can bite the bullet, and Import the true API calls, that can handle 32000 char folder names like this http://stackoverflow.com/questions/2223007/c-sharp-deleting-a-folder-that-has-long-paths just feels ugly. 

     

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 14, 2013 @ 22:01
    Anthony Dang
    0

    umbraco.cms.businesslogic.datatype.DataTypeDefinition is definitely too long.

    Use these:

    DTD, M, MT, T, DT, SS

     

    I dont really like the following. It's hard to find what doctypes you are looking for

    \uSync\DocumentType\1066\1067\1070\News Item.config

    I think use doctype alias for folder name instead as they will likely be shorter than the doctype names

    Also, no need to have a .config file name so long

    Call the config file def.config or or dt.config. You already know what it is based on the folder it is in.

    So it will be:

    uSync/DT/MyDocTypeAlias1/def.config

    I quite like seeing the full doctype name though, so maybe it will suffice to reduce umbraco.cms.businesslogic.web.DocumentType to DT, and reduce the config filename to def.config or dt.config 

    Mind you it also depends on folders that the solution sits in. 

     

    Here is my current proj:

    D:\_PROJECTS\***********\**********\********\Source\*********.**********.***.*******.****.Web\uSync\umbraco.cms.businesslogic.web.DocumentType\[Core] [Base] Page\[Core] Regionalisation List Page\[Core] Regionalisation List Page.config

     

    Swapping in DT folder and dt.config

    D:\_PROJECTS\***********\**********\********\Source\*********.**********.***.*******.****.Web\uSync\DT\[Core] [Base] Page\[Core] Regionalisation List Page\dt.config

     

    Swapping in doctype aliases

    D:\_PROJECTS\***********\**********\********\Source\*********.**********.***.*******.****.Web\uSync\DT\CoreBasePage\CoreRegionalisationListPage\dt.config


  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Mar 14, 2013 @ 23:19
    Kevin Jump
    0

    I'm probibly not going to go that drastic, thinking of keeping the top folder names as the end of the class names so the top level will be. 

    • DataTypeDefinition
    • DocumentType
    • Macro
    • MediaType
    • Stylesheet
    • Template
    I am going to switch to Aliases, and have the configs for documenttypes be dt.config and templates be tp.config
    I want the usync directories to be a browsable as possible so people can understand them if they go looking. 
  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 15, 2013 @ 11:16
    Anthony Dang
    0

    For consistency, perhaps call all .config files def.config. Because it's the definition.

     

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Mar 15, 2013 @ 23:41
    Kevin Jump
    1

    uSync 1.1 is now avalible - it 'fixes' this problem by writing much smaller filenames. 

    1. just writes final type as directory -> umbraco.cms.businesslogic.datatype.DataTypeDefinition becomes DataTypeDefinition
    2. Uses Aliases instead of file names 
    3. tempates and doctypes create a def.config in the final folder for brevity
    4. an error saving to archive folder doesn't stop the umbraco action. (save or delete)
    uSync 4 works with 4.11.x - works best with 4.11.5 (datatype on save works properly in 4.11.5)
    uSync 6 only really works on 6.0.3 nighly builds 

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 16, 2013 @ 19:12
    Anthony Dang
    0

    Nice work!

    You're a legend!

     

  • mary pablate 2 posts 22 karma points
    Feb 24, 2014 @ 15:44
    mary pablate
    0

    Well, long path tool also works good for such problems.

Please Sign in or register to post replies

Write your reply to:

Draft