Copied to clipboard

Flag this post as spam?

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


  • Jakob Kristensen 36 posts 169 karma points
    Dec 08, 2017 @ 09:48
    Jakob Kristensen
    0

    Cant register custom section

    Hello Umbraco

    Ive been for a day now trying to register a package in an umbraco 7.5.1 but it cant be done.

    Ive tried using just a iapplication section like so:

     [Application("customsecton", "CustomSection", "icon-wrench", 1)]
    public class CustomSection : IApplication
    {
    }
    

    i also tried adding a new tree, however nothing works, ive done this before just adding the section and a package in tried that code and copied and it doesnt work..

    That is same version as this website, i then try to add the section to the database as the administrator has changed name, but this does not trigger anything i cant pick the custom section inside users..

    per this link: https://stackoverflow.com/questions/26671066/umbraco-6-cutom-section-set-up-not-working

    Please help this is getting really frustrating and havent been a problem before?

  • Jakob Kristensen 36 posts 169 karma points
    Dec 08, 2017 @ 09:56
    Jakob Kristensen
    0

    So it turns out there is some dependency on the first created administrator when adding custom sections, im not excactly sure what happened but i upgraded my user to usertype 1.

    Then i added customsection to the database, and then i could add it, but i think the user i thought was the administrator in reality wasnt the main administrator, as they didnt have the correct user type.

    This is hard to fix from the backend had to edit umbracoUser and umbracoUser2App to get it to work again..

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Dec 08, 2017 @ 09:57
    Dan Diplo
    2

    The article you linked to is for Umbraco 6. It's a bit different in 7.

    Are you trying to add a new tree? In that case refer to https://our.umbraco.org/documentation/Extending/Section-Trees/

    You don't need to manually add anything to the database - your DLL should do this automatically and then add an entry to /config/trees.config

    You then need to ensure your user has been granted access to the new section - they won't have by default.

  • Jakob Kristensen 36 posts 169 karma points
    Dec 18, 2017 @ 14:47
    Jakob Kristensen
    0

    Hello Dan thank you for taking you time to answer, however the issue is that if you have a new administrator user he will start as a nr 3 type of user.

    If he isnt nr 1 he cant see the custom sections and add them to users, so you will need to set that 3 to a 1 in the database to actually be able to add custom sections to a user..

    Am i right in this is abit flawed since if you dont have the root administrator anymore you will need a database upgrade?

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Dec 18, 2017 @ 15:17
    Markus Johansson
    1

    You would need to either add access from the UI when you create the new user (by clicking the checkbox) or, like you are saying in the db.

    / m

  • Jakob Kristensen 36 posts 169 karma points
    Dec 18, 2017 @ 20:14
    Jakob Kristensen
    0

    Yeah i couldnt create a new one with the sections they where still missing until i set the user to 1 in the database, this was on 7.5.4, anyhow fairly easy to fix when you know hehe :D

Please Sign in or register to post replies

Write your reply to:

Draft