Root Image Directory in DNN 3

Last post 03-31-2005, 11:04 AM by Adam. 3 replies.
Sort Posts: Previous Next
  •  03-01-2005, 6:41 PM 4356

    Root Image Directory in DNN 3

    Hi Adam,

    This still doesn't seem to be getting populated and sticks to the default (c:\inetpub\wwwroot\).

    I'm using 4.0.0.5 and need to manually apply:

    RootImageDirectory = PortalSettings.HomeDirectory

    in Initialise() event of  CEHtmlEditorProvider.vb.

    I haven't got time at the moment to step through it and see why the property isn't being populated, but I will post back when I do  (DNN 3.0.11).

    Cheers,
    Andrew
  •  03-02-2005, 11:20 AM 4364 in reply to 4356

    Re: Root Image Directory in DNN 3

    Andrew,

    Can you give me more details about what's wrong?

    We are using the following code to get the RootImageDirectory:

     
      Public Overrides Property RootImageDirectory() As String
                Get
                    If _RootImageDirectory = "" Then
                        Dim _portalSettings As PortalSettings = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings
                        RootImageDirectory = _portalSettings.HomeDirectory.Substring(_portalSettings.HomeDirectory.IndexOf("/Portals/"))
                    Else
                        RootImageDirectory = _RootImageDirectory
                    End If
                End Get
                Set(ByVal Value As String)
                    _RootImageDirectory = Value
                End Set
     End Property

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-31-2005, 10:42 AM 5185 in reply to 4364

    Re: Root Image Directory in DNN 3

    Hi Adam,

    Sorry  I missed this one.. The issue still exists in the latest .06 release.  The RootImageDirectoy property doesn't seem to get populated by the PortalSettings call.

    After stepping through in the debugger, its jumps to the 'ELSE" branch of the IF statement, as _RootImageDirectory has somewhere been populated to be a default setting of c:\inetpub\wwwroot... whereas it should be completely different (ie point to the portal root, such as ...\portals\0\for example)

    This can be demonstrated by the error received when openign the image gallery from the editor.

    By changing the initial class declaration in the provider it seems to work fine. ie, change:
    Private _RootImageDirectory As String
    to
    Private _RootImageDirectory As String = PortalSettings.HomeDirectory

    This has occured in a few different installs in our environment so didn't think it would be unique to us. I'm thinking perhaps that  the Property declaration you've listed above is a carryover from an older version of DNN.  I can't see any reason why PortalSettings.HomeDirectory wouldn't suffice..

    More info:
    DNN 3 installed into Virtual Directory on Win 2003 (same error occurs on XP)
    Occurs with Friendly URLS on or Off

  •  03-31-2005, 11:04 AM 5188 in reply to 5185

    Re: Root Image Directory in DNN 3

    Andrew,
     
    Try
     
    Private _RootImageDirectory As String = String.Empty
     
    Keep me posted.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML