x First time here? Check out the FAQ

Come work for Umbraco - The Umbraco HQ are hiring Project managers, .NET developers and DevOps people!

  • Avatar27posts72karma

    No user exists with ID -1

    Dave Forster started this topic August 1, 2012 @ 09:44

    Got the YSOD ("No user exists with ID -1") when trying to publish via the Notifications Dashboard and judging by the release date of the package and lack of activity on here I figured the developer has washed his hands of it!

    So, my fix (to get it to work on Umbraco 4.7.2) was to download the source.. update the project references, change the target framework to .net 4 and update a couple of lines of code in UmbracoHelper.cs

    internal static void PublishItem(int id, string userId)
    {
        Document document = new Document(id);
        int uid;
        if (int.TryParse(userId, out uid))
        {
            User user = User.GetUser(uid);
            document.Publish(user);
            library.UpdateDocumentCache(document.Id);
        }
    }

    Compile and dump into your bin folder. 

    Hope this helps other who hit the same issue.


  • Rob de Mercado posted this reply July 31, 2014 @ 05:48

    I found the same problem. Decompiled the source, did as Dave had done to get it to .NET 4 and made this change (which worked). Made a few other tweaks to what on the surface could be a really useful plug-in. No idea why it was apparently abandoned.


Please login or Sign up To post replies