ERROR

Jan 28, 2012 at 2:07 PM
Edited Jan 29, 2012 at 5:35 AM
1. Browser.aspx ---------------------------------------
protected void CmdCloseClick(object sender, EventArgs e)
...........
...........
case "lnkClick":
......
 				//  sFilePath = string.Empty;
  • !!!!!!!! Isn't present in your MODULE --->> sFilePath = MapUrl(this.lblCurrentDir.Text);
......
--------------------------------------
2.----------------------------------------
 private void ShowFileHelpUrl(string sFileName, IFileInfo fileInfo)
.....
  • !!!!!! Isn't present in your MODULE --->> if (this.rblLinkType.Items.Count > 2)
                {
                    this.rblLinkType.Items[2].Text = Localization.GetString("lnkClick.Text"this.SResXFile, this.SLang);
                }

.......
  • !!!!!!!! Isn't present in your MODULE --->> if (this.rblLinkType.Items.Count > 2)
                {
                    this.rblLinkType.Items[2].Text =
                        this.rblLinkType.Items[2].Text.Replace(
                            @"/LinkClick.aspx?fileticket=xyz",
                            Globals.LinkClick(link, int.Parse(this.request.QueryString["tabid"]), Null.NullInteger));
                } ////////
            }

 catch (Exception)
            {
  • !!!!!!!! Isn't present in your MODULE --->> if (this.rblLinkType.Items.Count > 2)
                {
                    this.rblLinkType.Items[2].Text = Localization.GetString("lnkClick.Text"this.SResXFile, this.SLang);
                }

------------------------------------
Jan 28, 2012 at 2:22 PM
Edited Jan 29, 2012 at 6:37 AM

???

What is the Problem none of the code throws any exceptions, or did you receive any ?

1. This code line is unneeded and can be removed

2. Whats the Problem with that code it checks if the item exists

if (this.rblLinkType.Items.Count > 2) {
... 
}

Jan 29, 2012 at 5:34 AM

Привет с России! Hi From Russia!

Has corrected the message Module Version 1.13 DNN 06.01.02 (98)

Jan 29, 2012 at 6:35 AM
Edited Jan 29, 2012 at 6:38 AM
tsb2000 wrote:

!!!!!!!! Isn't present in your MODULE --->> if (this.rblLinkType.Items.Count > 2)

Ok i see this check wasnt on every line i added it code is in the Repository

I also removed that line

 

sFilePath = string.Empty;

 

tsb2000 wrote:

!!!!!!!! Isn't present in your MODULE --->> sFilePath = MapUrl(this.lblCurrentDir.Text); 

This is not needed

Jan 29, 2012 at 10:35 AM
Edited Jan 29, 2012 at 10:41 AM
this.rblLinkType.Items[2] != null --- error - Index was out of range. Must be non-negative and less than the size of the collection.
this.rblLinkType.Items.Count > 2 --- No error

-------------------------
sFilePath = string.Empty; ------>> LINK http://Links.aspx......  Error No page
To replace on
sFilePath = MapUrl(this.lblCurrentDir.Text); --------->>> Liks http://domain.com/portals/0/Links.aspx?...... NO error


Jan 29, 2012 at 2:18 PM
Edited Jan 29, 2012 at 2:19 PM
this.rblLinkType.Items[2] != null

Removed and replaced with ".Count > 2" and moved in to one Method.

tsb2000 wrote:
sFilePath = MapUrl(this.lblCurrentDir.Text); --------->>> Liks http://domain.com/portals/0/Links.aspx?...... NO error

This still would return the wrong url. Actually there was only the "/" Missing because of the ".Remove(0, 1);" No the URL is correct.

But i need to change the logic to allow to choose between Secured Relative and Absolute URLs. Currently the Secured Url is always Relative.

Jan 30, 2012 at 4:13 AM
Edited Jan 30, 2012 at 4:17 AM

Hi!

Browser.aspx.cs (line 556)
case "lnkClick":
{
	var fullPath = MapUrl(Path.Combine(this.lblCurrentDir.Text, sFileName));

	if (!string.IsNullOrEmpty(this.Request.ApplicationPath)) --- Portals/2/file.png
	{
		fullPath = fullPath.Replace(this.Request.ApplicationPath, string.Empty);
 -- ERROR Portals2file.png
	}
	..........
	...........
	 var file = FileManager.Instance.GetFile(folder, fileName); ???? sFileName
	 var link = string.Format("fileID={0}", file.FileId); 
/// file = Null ///--- ERROR /Object reference not set to an instance of an object./

 

 

	 
Jan 30, 2012 at 1:41 PM

I replaced the code completly, this was old code anyway