Copied to clipboard

Flag this post as spam?

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


  • J 447 posts 864 karma points
    May 13, 2021 @ 11:32
    J
    0

    Final attempt with Section (project on GitHub)

    I have gone through a few tutorials and videos and even asked for help on this forum but unfortunately we never got to a satisfactory outcome :-(

    What i am attempting to do is create a new section in Umbraco's backend (which i have completed). I then attempt to create a AngualrJS file (editcontroller.js) for the edit.html page.

    So far i can click onto the new section but when i click create i get

    Error: Argument 'Example.editcontroller' is not a function, got undefined

    Ive searched a number of articles on this and have made a number of changes but cant figure out what is wrong or if its just something with this particular version of Umbraco.

    • Ive added debug=true to the config file.
    • I have changed " to ' in the package.manifest file.
    • Attempted to save the manifest file as with BOM
    • Changed the directory of the manifest file

    and more....

    I have uploaded this project to gitHub and wonder if someone could take a look to see if they can see any issues? Ive completely run out of ideas.

    https://github.com/JamiePattison/UmbracoTutorials.git
    

    Thanks for any help

  • Brendan Rice 538 posts 1102 karma points
    May 13, 2021 @ 13:42
    Brendan Rice
    0

    It seems like there is an issue with your package manifest file:

    {
    javascript:[
    '~app_plugins/Example/backoffice/personTree/editcontroller.js',
    '~app_plugins/Example/backoffice/personTree/deleteController.js',
    '~app_plugins/Example/personResource.js'
    ]
    }
    

    should be:

    {
    javascript:[
    '~/app_plugins/Example/backoffice/personTree/editcontroller.js',
    '~/app_plugins/Example/backoffice/personTree/deleteController.js',
    '~/app_plugins/Example/personResource.js'
    ]
    }
    
  • J 447 posts 864 karma points
    May 13, 2021 @ 13:52
    J
    0

    I think you suggested i missed off "/" so i added that in but still the same error.

    I touched the config file and cleared the temp folder, tried in Incognito but no luck :-(

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 13, 2021 @ 15:17
    Huw Reddick
    0

    one thing I noticed, you seem to have a folder called

    "Backoffice/PersonTree"

    that is not valid, you should have a sub folder under Backoffice called PersonTree

  • Brendan Rice 538 posts 1102 karma points
    May 13, 2021 @ 15:24
    Brendan Rice
    0

    Huw I downloaded the solution (can't run it without the DB) but the folder structure seems correct:

    enter image description here

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 13, 2021 @ 15:25
    Huw Reddick
    1

    must just look weird in github then

    enter image description here

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 13, 2021 @ 15:43
    Huw Reddick
    0

    shouldn't javascript: be "javascript": (with quotes)

  • J 447 posts 864 karma points
    May 13, 2021 @ 15:52
    J
    0

    I have changed the manifest file to the below but same error

    {
      "javascript": [
        "~/app_plugins/Example/backoffice/personTree/editcontroller.js",
        "~/app_plugins/Example/backoffice/personTree/deleteController.js",
        "~/app_plugins/Example/personResource.js"
      ]
    }
    

    I have now also uploaded the database to the root folder in case that helps.

    Thanks

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 13, 2021 @ 16:18
    Huw Reddick
    0

    you will need to provide a login too otherwise won't be able to access the back office :)

  • J 447 posts 864 karma points
    May 13, 2021 @ 16:47
    J
    0

    Oh sorry

    [email protected] P@ssw0rd1

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 13, 2021 @ 18:27
    Huw Reddick
    0

    I will take a look later see if I can help

  • J 447 posts 864 karma points
    May 20, 2021 @ 12:29
    J
    0

    @HuwReddick - Just wanted to see if you had a chance on this?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 20, 2021 @ 16:03
    Huw Reddick
    1

    Not yet sorry, swamped at work at the moment. Should be able to have a look at the weekend.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 23, 2021 @ 11:01
    Huw Reddick
    0

    Not able to get your solution to run as no database and don't have time to fiddle around and get one setup.

Please Sign in or register to post replies

Write your reply to:

Draft