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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Change from Instance to Static Method = Breaking Change DNN 4.9.1 to 5.0.0Change from Instance to Static Method = Breaking Change DNN 4.9.1 to 5.0.0
Previous
 
Next
New Post
2/27/2009 11:23 PM
 

On the settings control for the new DNN Gallery module, I coded a method which sets the read permissions of gallery folders based on the roles allowed by the module configuration to download files so that when they are accessed via the LinkClick HttpHandler, the download attempt can be allowed to proceed or rejected.

Part of this code calls DotNetNuke.Security.Permissions.FolderPermissionsController.GetFolderPermissionsCollectionByFolderPath to obtain the permissions collection which will then be iterated over.

In DNN 4.9.xx, GetFolderPermissionsCollectionByFolderPath was defined as an instance method of the FolderPermissionsController class so was being called from an instantiated FolderPermissionsController object.

In DNN 5.0.xx, the instance method has been deprecated and replaced by a public shared (static) method of the same signature. Now, when testing the Gallery module in DNN 5.00.01, I find the following exception being thrown:

StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Method not found: 'DotNetNuke.Security.Permissions.FolderPermissionCollection DotNetNuke.Security.Permissions.FolderPermissionController.GetFolderPermissionsCollectionByFolderPath(Int32, System.String)'. ---> System.MissingMethodException: Method not found: 'DotNetNuke.Security.Permissions.FolderPermissionCollection DotNetNuke.Security.Permissions.FolderPermissionController.GetFolderPermissionsCollectionByFolderPath(Int32, System.String)'. at DotNetNuke.Modules.Gallery.Utils.SyncFolderPermissions(String specialPermissions, Int32 ModuleId, Int32 TabId) at . . .

Although I would normally like seeing this changed to a static method, I'm not sure what to do about the breaking change in a module which will need to support both 4.9.x and 5.x. I had thought that it was possible (but not recommended) to call a static method via an instantiated class - but apparently not when the method signature is the same. I recall that a similar situation occured in an earlier version of the core Events module but not sure how it was resolved.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Change from Instance to Static Method = Breaking Change DNN 4.9.1 to 5.0.0Change from Instance to Static Method = Breaking Change DNN 4.9.1 to 5.0.0


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