Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Obsolete messages without solution but "Do not use"?

Obsolete messages without solution but "Do not use"?

Hans Kloppenborg
Reply

Hello,

After updating our solution to the latest DW 9.15.6 version we are stuck on a couple of warnings with as only hint "Do not use". When I check the API documentation for these methods there is no obsolete tag. Are the following methods really obsolete and can you give an alternative for these, or is the message incorrect?

  • 'ModuleScriptPanelAttribute' is obsolete: 'Do not use'
  • 'FilesAndFolders' is obsolete: 'Do not use'
  • 'FilesAndFolders.GetFilesFolderName()' is obsolete: 'Use 'Files' instead.'  (How/Where/What??)
  • 'PageService.Repository' is obsolete: 'Do not use'
  • 'ProductService.GetAllProducts(string, bool)' is obsolete: 'Do not use'
  • 'FilesPermissionHelper' is obsolete: 'Do not use'

Maybe it is just us, but the "Do not use" message does not really help when trying to solve these warnings on our side.

Greets Hans


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Hans

All the obsolete messages are in relation to things that will not be available on Dynamicweb 10 - for now you can just use them, but if you want to move the solution to DW10 you need to address them at some point.

I.e. ModuleScriptPanelAttribute is related to the .aspx that handles the modulesettings - this feature has no alternative on DW9 and has to be implemented in a different way on DW10.

I agree that the obsolete warnings are lacking the context and information about how to handle the warnings.

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Hi Hans,

Sorry about the useless messages. These are features that have been (or will be) removed in DW 10.
We often use "Do not use" when there is no direct alternative. But I can see that some of these should probably have contained some more useful information.

  • 'ModuleScriptPanelAttribute' is obsolete: 'Do not use' => This and some other module attributes are not supported in DW10.
  • 'FilesAndFolders' is obsolete: 'Do not use' => Nothing useful here. These are all legacy helper methods which will be removed.
  • 'FilesAndFolders.GetFilesFolderName()' is obsolete: 'Use 'Files' instead.'  => For 99.99 % of all solutions this just returns the string value "Files". Not used in DW10.
  • 'PageService.Repository' is obsolete: 'Do not use' => You should not be using the repository directly. Use the service instead: Dynamicweb.Content.Services.Pages
  • 'ProductService.GetAllProducts(string, bool)' is obsolete: 'Do not use' => There are many methods for fetching products. Try using methods like GetProductsByShopId or GetProductsByGroupId instead.
  • 'FilesPermissionHelper' is obsolete: 'Do not use' => File permissions are usually handled internally by the system and you shouldn't have to use this. You can use PermissionControlledFile instead, if you need to check for file permissions.

/Morten

Votes for this answer: 1

 

You must be logged in to post in the forum