Copied to clipboard

Flag this post as spam?

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


  • Andrew Blackmore 84 posts 127 karma points
    Feb 25, 2010 @ 18:19
    Andrew Blackmore
    0

    Dashboard doesn't show except for admin

    Hey all,

     

    i have my dashboard just how I want it. It shows the blog post creation and the comment moderation tags. This is perfect when I'm logged in as admin, but when I'm logged in under one of my editors user name I get an error on the post creation page. It says:

     

    Could not load control '/usercontrols/Blog4Umbraco/CreatePost.ascx'.
    Error message: System.InvalidOperationException: Invalid attempt to read when no data is present. at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout) at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i) at umbraco.DataLayer.RecordsReaderAdapter`1.GetInt(String fieldName) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\RecordsReaderAdapter.cs:line 285 at Umlaut.Umb.Blog.Dashboard.CreatePost.SetBlogRoot() in d:\TeamCity\buildAgent\work\6c8a1edaa924eb51\Umlaut.Umb.Blog\Dashboard\CreatePost.ascx.cs:line 123 at Umlaut.Umb.Blog.Dashboard.CreatePost.OnInit(EventArgs e) in d:\TeamCity\buildAgent\work\6c8a1edaa924eb51\Umlaut.Umb.Blog\Dashboard\CreatePost.ascx.cs:line 41 at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at umbraco.cms.presentation.dashboard.OnInit(EventArgs e)

     

    I have no idea why. I'm assuming its a permissions issue, but I'm not sure how to fix it.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 25, 2010 @ 18:42
    Douglas Robar
    0

    Any chance the user with the problem has a 'start node' set on his user settings that doesn't allow him access to the nodes?

    By the way, Is this true for all editors or just one? What happens if you temporarily escalate the editor to be an 'admin'?

    Let us know what you find out.

    cheers,
    doug.

     

  • Andrew Blackmore 84 posts 127 karma points
    Feb 25, 2010 @ 19:25
    Andrew Blackmore
    0

    Hi Doug,

     

    The start node is set differently. I didn't think that would effect this as this dashboard is set to come up whenever content area is selected but no node.

    I changed the start node and it works so that is the issue, however I can't leave their start node as the site root, I need it to be the subsection so I'm not sure how to make it so I can do this.

     

     

  • Andrew Blackmore 84 posts 127 karma points
    Feb 25, 2010 @ 19:28
    Andrew Blackmore
    0

    also, I have it set as the default dashboard and I still get that error if I change the start node back.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 25, 2010 @ 19:38
    Douglas Robar
    0

    Okay, here's another way to handle this...

    Leave the user with no start node so the dashboard control works properly, then in the Content section...

    1. Right-click the home page for the site and select the 'Permissions' menu
    2. Disable as many permissions for this user as necessary (these settings affect all child nodes as well)
    3. Right-click the node you previous set as the user's start node and select the 'Permissions' menu
    4. Enable as many permissions for this user as necessary (these settings affect all child nodes as well)

    Slightly more tedious to set up (though much finer control if you ever want it) but I think it'll do the trick.

    The other option would be to get the source and recompile the dashboard control for your use. It shouldn't give an error in this case, though I also think it should NOT show any posts or comments for nodes the user cannot view in the content tree either... that would be a potential security issue if it did.

    cheers,
    doug.

  • Andrew Blackmore 84 posts 127 karma points
    Feb 25, 2010 @ 19:47
    Andrew Blackmore
    0

    Hi Doug,

    It worked in that it made the control show up but the controls didn't work. As soon as I tried to use the controls it said that I did not have the permissions to access the file. I'm not 100%

     

    This is the message:

    The current user doesn't have permissions to browse this document. Please contact the system administrator.

  • Andrew Blackmore 84 posts 127 karma points
    Feb 25, 2010 @ 20:12
    Andrew Blackmore
    0

    I actually have an idea which I believe would solve this problem and another one but I'm unsure of how to implement it. If I was able to add a content chooser piece to the post dashboard item it would make sure the correct blog is being selected and I believe the permissions issue would go away...and this also solves the issue for the admin that when clicking create post it always goes into the top blog

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 25, 2010 @ 22:49
    Douglas Robar
    0

    Ahhh... I didn't reaslize you had more than one blog in your site. That's the crux of the issue as I'm sure b4u was not designed with that in mind.

    Not that you couldn't make it work but it would take a bit of code in the various controls to handle it elegantly. I like your idea of adding a content picker or maybe a list of all the blogs in your site, especially if the selection were "sticky" and defaulted to the last-used selection the next time the user viewed the page.

    Looks like you'll need to download the source for b4u and add some logic for umbraco installations with multiple blogs.

    cheers,
    doug.

     

  • Andrew Blackmore 84 posts 127 karma points
    Feb 26, 2010 @ 16:25
    Andrew Blackmore
    0

    Ok,

    Thanks a lot Doug. I will take a look at this and see what I can do. If I'm able to figure something out I'll post it. I've been busy trying to get the templates to work exactly how I want so this may take a back seat for a week or so I'll have a go at it.

     

    Thanks again

Please Sign in or register to post replies

Write your reply to:

Draft