Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsGalleryGalleryHow I Fixed the “A critical error has occurred”  ProblemHow I Fixed the “A critical error has occurred” Problem
Previous
 
Next
New Post
10/30/2005 5:02 PM
 

 

I did takes a view Day’s to get my Albums to Run.

Albums at http://www.Poorthuis.de

 

The Module did have several Bugs that have to be Fixed to get the Module to Run.

  1. Fixes about no User logged in.  Don’t make a request on PortalSecurity.HasNecessaryPermission if one of the requested Parameters is Nothing

Class Authorization about Row 100  and also about Row 119

  Public Function HasEditPermission() As Boolean

            If GalleryConfig.IsPrivate Then

                If HasAdminPermission() OrElse IsGalleryOwner() Then

                    Return True

                End If

            Else

                'Return PortalSecurity.HasEditPermissions(ModuleID)

                'HP Changed to:If Not IsNothing(mLoggedOnUserName) Then

                If Not IsNothing(mLoggedOnUserName) And Not IsNothing(mPortalSettings) And Not IsNothing(mModuleSettings) Then

                    Return PortalSecurity.HasNecessaryPermission(SecurityAccessLevel.Edit, mPortalSettings, mModuleSettings, mLoggedOnUserName)

                End If

            End If

            Return False

 

        End Function

 

Public Function HasItemEditPermission(ByVal DataItem As Object) As Boolean

            If GalleryConfig.IsPrivate Then

                If HasAdminPermission() OrElse IsGalleryOwner() OrElse IsItemOwner(DataItem) Then

                    Return True

                End If

            Else

                'Return PortalSecurity.HasEditPermissions(ModuleID)

                'HP Changed to:If Not IsNothing(mLoggedOnUserName) Then

 

                If Not IsNothing(mLoggedOnUserName) And    Not       IsNothing   (mPortalSettings) And Not IsNothing(mModuleSettings) Then

                    Return PortalSecurity.HasNecessaryPermission(SecurityAccessLevel.Edit, mPortalSettings, mModuleSettings, mLoggedOnUserName)

                End If

            End If

            Return False

 

        End Function

 

  1. Errors in the XML Class will have also the Result that the Module not will be loaded. Here to fix 3 Problems

Because of localisation the Date format can be written in US Format, but on Reading with a German localisation then CDate Function is not able to read a date like 10-28-2005 . Solution is to write the Dateformats with the “u” Format

About Row 435 in the XML Class.

subNode = xml.CreateElement("approveddate")

            subNode.InnerText = Format(ApprovedDate, "u")

            newNode.AppendChild(subNode)

 

            subNode = xml.CreateElement("createddate")

            subNode.InnerText = Format(CreatedDate, "u")

            newNode.AppendChild(subNode)

 

[Minor] To be sure that online a logged in User Changed the metadata File insert next in SaveMetadata:

If UserController.GetCurrentUserInfo.UserID <= 0 Then

                Exit Sub

End If

 

Some Other Problem: The ID generated by Random. The Server from my Provider seems to be so fast that sometimes 3 Pictures get the same ID (FTP Upload). Result the Picture will not being showed, Java Errors on the Page. I did write the ID Request new, and put it in the Utilities Class

Public Shared Function CreateNewID() As Int32

            Dim T As String, ID As Int32

            Dim rd As New Random

            

            T = Format(Now, "mmss") + rd.Next(1, 99999).ToString

 ' Wait to allow the timer to advance.         

   System.Threading.Thread.Sleep(1)

            Try

                ID = CType(T, Int32)

            Catch ex As Exception

                ID = rd.Next(1, Int32.MaxValue)

            End Try

            Return ID

        End Function

 

So everywhere where the Random is Used I Changed the Code (actuality a Thread.sleep(1) after the Rd.Next will help also.

 

  1. In the Config Class I changed the Sub New , but I’m not sure if this is really necessary.

Shared Sub New()

            'Change HP

            Dim p As New PortalController

            Dim _portalSettings As PortalSettings = p.GetCurrentPortalSettings

            'mPortalCssURL = _portalSettings.UploadDirectory & "portal.css"

        End Sub

 

Beware that the _metadata.resources File will be Cached, so use the Trick with changing one row in the web.config so the Application will start New after the changes.

 

The Module is Great, Yes its Beta, I wonder that I takes 4 Month to find this Problems

Greetings Hans

 

 
New Post
10/31/2005 12:10 PM
 
Hey, thanks for the feedback, and congratulations. Also, can you send me email or post how to repoduce these errors and then i will work on implemented these changes, once verified.?

DotNetNuke Search Engine
ASP.Net Search Engine
Email me to add your favorite sites to the search List.
 
New Post
12/26/2005 7:29 AM
 
Hi can u send me the corrected files, I can´t find where to replace those lines. Thanks in advance `n Happy New year!!!
 
New Post
12/26/2005 11:46 PM
 
This is an old post, the issues should have been fixed. Please make sure you have the latest beta version Gallery 3.0.11.

Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsGalleryGalleryHow I Fixed the “A critical error has occurred”  ProblemHow I Fixed the “A critical error has occurred” Problem


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out