Copied to clipboard

Flag this post as spam?

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


  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 10:13
    Enny
    0

    Umbraco 6.0.7 - Umbraco adds number (1) to Document Name on Save / Publish

    If I edit a document an save it or publish it, umbraco adds automaticly a (1) to the document name.  (The document name is unique).

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 10:58
    Jan Skovgaard
    0

    Hi Enny and welcome to our :)

    Does this happen to every document hat you create?

    I suppose the documents are created from within the Umbraco backoffice - not using the API or doing some API interaction on document creation somehow?

    Feel free to post a screendump as well - btw what database are you using?

    Looking forward to hearing from you.

    /Jan

  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 11:09
    Enny
    0

    Hi Jan and thank you for the fast response. We use MS SQL Server 2012 Express.

    • the documents were initialy created by the API, but last year.
    • if i edit "per hand" in backoffice or with the api in both cases - umbraco adds (1), i can remove it, if i save again, the (1) will be added again, so i can't remove
    • till version 6.0.5 every thing was ok

    Thanks for your help!

    Image: http://www.rhc-software.de/transfer?f=&i=scrimg_umbr.png

    /Enny

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 11:12
    Jan Skovgaard
    0

    Hi Enny

    Hmm ok, can you show some of the code you use to interact with the API? I think this might be an issue to report on the issue tracker but perhaps the answer lies in the code if someting has changed in the API (Can't remember if it has though - but let's have a look).

    /Jan

  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 11:23
    Enny
    0

    The code I used is the folowing:

     


                                    umbraco.cms.businesslogic.web.Document d = new umbraco.cms.businesslogic.web.Document(n.Id);
                                    var p = d.getProperty("date");
                                    if (p != null)
                                    {
                                        p.Value = DateTime.Now;
                                        d.SaveAndPublish(new umbraco.BusinessLogic.User("umbracoExtensions.rhcsw"));
                                        umbraco.library.UpdateDocumentCache(d.Id);
                                    }


    But it happens now, even if I use the backoffice.

    Thanks!


     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 11:29
    Jan Skovgaard
    0

    Hi Enny

    Ok, one reason for this might be that the above code is based on the old API, which still works but is deprecated.

    You can read more about the new API's in v6 here http://our.umbraco.org/documentation/Reference/Management-v6/

    I think I have an example on how to create documents using the new API somewhere...I'll try to see if I can find it and then post an example in here.

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 11:41
    Jan Skovgaard
    0

    Hi Enny

    Think that you should perhaps place a issue on the issue tracker about this - missed the "Happens when I create using the backoffice" part before - you find the issue tracker here http://issues.umbraco.org

    /Jan

  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 11:41
    Enny
    0

    Thank you Jan,

    Hi, i will change the code, but what should i do with the existing content. The content was created by api one year ago and if i edit it in backoffice the (1) will be added.

    do you hav any idea?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 11:44
    Jan Skovgaard
    0

    How many nodes are we talking about?

    /Jan

  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 11:53
    Enny
    0

    151 nodes.

    But now i have a bigger problem. I opened the sort window for the parent node and clicked SAVE. Now every childnode has the (1) and i can't change.

    I have to restore a backup....

    /Enny

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 11:55
    Jan Skovgaard
    0

    Hi Enny

    Hmm, ok that's really weird. I'm sorry I don't have any clue about what is going on.

    But perhaps you should disable the API interaction and see if the problem still persists?

    /Jan

  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 12:05
    Enny
    0

    Hi! Restored the backup, no interaction with API only backoffice, the problem persits.

    I tried this with an other installation, and ther it works.Problem seems to bin in database.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 12:12
    Jan Skovgaard
    0

    Hi Enny

    Ok, seems like a bug to me - I think the best thing you can do now is to report it as an issue on the aforementioned issue tracker. However I don't think anything is done to the database during the upgrade form 6.0.5 to 6.0.7 though.

    But if it is a problem in Umbraco then the core team will have a look at it.

    Cheers,
    Jan 

  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 12:29
    Enny
    0

    Thank you very much. I set "ensureUniqueNaming" to false, so it works for me now. But I never changed this setting and all content names are unique. I posted an issiue. Thank you very much!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 12:30
    Jan Skovgaard
    0

    Hi Enny

    Yeah, sounds like a weird issue. Glad you figured out a workaround for now :)

    /Jan

  • Enny 12 posts 63 karma points
    Jul 03, 2013 @ 17:24
    Enny
    101

    Posted an Issue: http://issues.umbraco.org/issue/U4-2457

    with the great help of the core team we found the reason!

    The nodes were duplicated and had no entry in cmsDocument, so i removed them in the database. Now everything works just fine - as it schould. It is no Problem with 6.0.7, but maybe it was a problem in 4.xxx, when some nodes were deleted and recreated under same name.
    Now, because "ensureUniqueNaming" is woring correct, it looks like an error.

     

    Thank you all for that great help!

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 03, 2013 @ 17:40
    Jan Skovgaard
    0

    Hi Enny

    Super glad you managed to find the solution and thank you very much for sharing the link and how you solved it. That's the way things should be - #H5yr! - If you're thinking...wat? Then have a look at http://www.h5yr.com :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft