Copied to clipboard

Flag this post as spam?

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


  • Marcus Maunula 229 posts 386 karma points
    Mar 31, 2015 @ 14:02
    Marcus Maunula
    0

    Weird issue with hyphen in documenttypes

    Since later versions you cannot have hyphen in document types anymore. The problem is this. Even if I rename, republish and even delete umbraco.config. The old name still remains somewhere. WHere else could it be stored? If i delete umbraco.config then it will be rebuilt with old name, even after recycling, emptying cache and all that.'

    What could be the cause?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 31, 2015 @ 14:36
    Jan Skovgaard
    1

    Hi Marcus

    Not sure I understand the issue? - Are you saying that it's no longer possible to have a url like http://www.mysite.com/my-long-page-name ? Or am I misunderstanding? Or is it when creating a document type in the settings section?

    Sorry if I'm being a bit slow here - But just need to make sure I get what you're asking since it should still be possible to have url's with hyphens in them :)

    /Jan

  • Marcus Maunula 229 posts 386 karma points
    Mar 31, 2015 @ 14:38
    Marcus Maunula
    0

    Hi Jan,

    Yes I am talking about the Alias. Before named blabla-blabla which is not allowed anymore

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 31, 2015 @ 14:41
    Jan Skovgaard
    1

    Hi Marcus

    Aaaah, yes ok - That's correct.

    What version of Umbraco are you using? And can you share a screendump or a video recording displaying the issue?

    /Jan

  • Marcus Maunula 229 posts 386 karma points
    Mar 31, 2015 @ 15:07
    Marcus Maunula
    0

    7.24. I have seen the error before but most suggestions was about umbraco.config. Problem is that this is re-created with old alias even after delete.

    I will try to fish it up

    Here is the error.

  • Marcus Maunula 229 posts 386 karma points
    Apr 01, 2015 @ 11:09
    Marcus Maunula
    0

    I have tracked down at least one occurence where it could happen.

    Looks like this. It hits when doing the Descendants. Thing is this, there are no such document types left,. Where could it possibly be looking for this?

      var searchPage = startpage.Descendants(SearchModel.NodeTypeAlias).FirstOrDefault();

  • Marcus Maunula 229 posts 386 karma points
    Apr 01, 2015 @ 12:57
    Marcus Maunula
    0

    More deduction. The faulty Content is embedded in the table cmsContentXml it seems. I guess
    there is no easy way to change that? 

    This seems to be the best explanation but this "patch" is ancient, is this really still a problem then and not workable on 7?

     

    http://allan-laustsen.blogspot.se/2012/03/umbraco-no-node-exists-cmscontentxml.html

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 01, 2015 @ 20:30
    Jan Skovgaard
    1

    Hi Marcus

    If simply renaming the document type so it's not using the hyphen does not work then I'm afraid you'll need to do some database work. I have not read the link you have posted but since the DB structure has not changed that much (if any) between 4.10.x and 7 the things he is writing about might still work.

    But before trying to do any of this make sure to backup both the files and your current database.

    /Jan

  • Marcus Maunula 229 posts 386 karma points
    Apr 01, 2015 @ 21:05
    Marcus Maunula
    0

    I was thinking to myself that renaming before upgrading could be a better option. I haven not seen this problem before (I do not use hyphens myself).

    Thanks for trying.

  • David Sheiles 67 posts 337 karma points
    Jan 10, 2019 @ 03:05
    David Sheiles
    0

    I just came across this when updating a V5 to V7.

    I was able to fix by updating the cmsContentXml table, however I have an alternate fix if you don't want to mess with the database.

    1. Unpublish all pages that have the document Type that could have the Hyphen
    2. Delete the `/App_Data/umbraco.config' file
    3. Restart IIS or touch the Web.config
    4. Republish all nodes

    A few more steps involved, but hope this helps anyone if they come across this in the future when upgrading old sites.

Please Sign in or register to post replies

Write your reply to:

Draft