not allowed to edit list-link accessdenied message

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
2/10/2013 4:12:22 PM
Gravatar
Total Posts 10

not allowed to edit list-link accessdenied message

I recently updated to the latest version of mojoportal from a prior version (like 2 prior).  The upgrade went fine and things seem to be working okay.  I did notice today however that I cannot edit any of the links of a list/links part.  I even created a new page, added the list/links part and added a new link.  I went to edit it (hitting the pencil) and it immediately gave the me following error.

Sorry, you are not allowed to view this content. If you have questions about your permissions, please contact a site administrator.

Either you are not currently logged in, or you do not have access to this page within the site. Please contact the site administrator to obtain access.

Return to Site Home

 

I have tried walking/stepping through the code in debug mode and have yet to find why i am getting redirected to accessdenied.aspx.

Any help would be appreciated -dave


mojoPortal Version 2.3.9.5 MSSQL
Operating System Microsoft Windows NT 6.1.7601 Service Pack 1
ASP.NET Info v4.0.30319 Running in Full Trust
Server Time Zone Eastern Standard Time
Server Local Time (GMT -5) 2/10/2013 5:10:11 PM
I am using sql server.

2/10/2013 5:03:56 PM
Gravatar
Total Posts 10

Re: not allowed to edit list-link accessdenied message

A bit more information. Odd and not sure if this is the correct resolution.

It seems that the problem is with the link (pencil) next to the list item. The link is generated by the following code in ItemList.ascx.cs

 

        protected string FormatEditUrl(int itemId)
        {
            return SiteRoot + "/List/Edit.aspx?ItemID=" + itemId.ToInvariantString()
                + "&mid=" + ModuleId.ToInvariantString()
                + "&pageid=" + PageId.ToInvariantString();
        }

The Request.QueryString["mid"] is not being found correctly and so mid (which is the ModuleId) is coming back -1.  If i change the above code to following the request.querystring["mid"] returns correctly.  This is happening on more than one pc, but i am concerned that others have not noticed this.

        protected string FormatEditUrl(int itemId)
        {
            return SiteRoot + "/List/Edit.aspx?ItemID=" + itemId.ToInvariantString()
                + "&mid=" + ModuleId.ToInvariantString()
                + "&pageid=" + PageId.ToInvariantString();
        }

(This one works)

http://localhost/List/Edit.aspx?ItemID=23&mid=156&pageid=11

Where oddly, the following does not work

http://localhost/List/Edit.aspx?ItemID=23&mid=156&pageid=11

 

2/11/2013 9:44:10 AM
Gravatar
Total Posts 18439

Re: not allowed to edit list-link accessdenied message

Hi,

Thanks for the bug report. This is now fixed in the source code repository and I have patched the 2.3.9.5 release. If you download it again, the only files that changed are the dll files in the /bin folder

Thanks,

Joe

2/11/2013 11:39:01 AM
Gravatar
Total Posts 10

Re: not allowed to edit list-link accessdenied message

I am a little surprised i was the first to find this.  I did download the source for mojoportal via tortoisehg.  What is the best way to just get an update for particular files (i am new to tortoise and not quite sure)

 

2/11/2013 11:48:37 AM
Gravatar
Total Posts 18439

Re: not allowed to edit list-link accessdenied message

If you are working from the source code you should never just get specific files, you always want all the updated files from the latest commit to the default branch.  ie pull all changes in TortoiseHG Workbench, then close TortoiseHG Workbench and right click the top level folder and choose TortoiseHG > Update (make sure it says Default branch in the dialog). This updates your working copy with the latest files, then you need to rebuild the solution and generally you should also visit the /Setup/Default.aspx page in case any sql scripts have been added or updated.

If you are deploying an official release package then just download it again and replace the files in the /bin folder as I mentioned.

You must sign in to post in the forums. This thread is closed to new posts.