1
votes

I am looking to extract Digital Assets Manager / Management module (DAM) from source distribution of DotNetNuke 7.3.1 platform which is to be compiled into a separate module so that I can do some modifications to suit certain use cases.

What I have done:

  1. I copied DigitalAssets module into fresh copy of local dev environment (DNN 7.3.1)
  2. I changed all namespaces (I didn't bother renaming file names)
  3. I used DotNetNuke.Modules.DigitalAssets.csproj to get VisualStudio sln
  4. I cleaned out virtual directories and apps from IIS
  5. I fixed other issues with libraries that were throwing errors
  6. I got it to compile and produce a .dll with a different name to original module

So, now when I throw this module on a page (in theory) I should expect exactly the same behaviour as the original DigitalAssets module that came with framework.

But it doesn't behave the same.

  1. In fact it appears to be refreshing the page like it is stuck in an infinite loop.
  2. It doesn't load any documents either.
  3. It doesn't load Digital Assets Management Settings tab either.
  4. Original DigitalAssets module works just fine.

I have noticed a POST error in console window of the form:

JQMIGRATE: Logging is active jquery-migrate.js?cdv=23:21

POST http://devsite1.me/DesktopModules/DigitalAssets/API/ContentService/GetFolderContent 401 (Unauthorized) - jquery.js?cdv=23:8526

send - jquery.js?cdv=23:8526

jQuery.extend.ajax - jquery.js?cdv=23:7978

loadFolder - dnn.DigitalAssets.js?cdv=23:1492

loadFolderFirstPage - dnn.DigitalAssets.js?cdv=23:1437

loadInitialContent - dnn.DigitalAssets.js?cdv=23:1431

gridOnGridCreated - dnn.DigitalAssetsController.js?cdv=23:47

gridOnGridCreated - dnn.DigitalAssets.js?cdv=23:205

(anonymous function) - jquery.js:9597

Telerik.Web.UI.RadWebControl.raiseEvent - jquery.js:9597

(anonymous function) - jquery.js:9597

Telerik.Web.UI.RadGrid.initialize - jquery.js:9597

Sys.Component.endUpdate - jquery.js:9597

Sys.Component.create - jquery.js:9597

(anonymous function) - My-DAM?folderId=41&view=gridview&pageSize=10:1154

(anonymous function) - jquery.js:9597

Sys._Application._raiseInit - jquery.js:9597

Sys._Application.initialize - jquery.js:9597

b - jquery.js:9597

document.addEventListener.a - jquery.js:9597

Interesting to note that I am not getting any other errors or event logs. These anonymous function calls make me worried.

It appears to me I missed something important. Any help with this is greatly appreciated.

EDIT 1:

Found this error within loadFolder - dnn.DigitalAssets.js?cdv=23:1492

An error occurred while loading the folder content

An error caused by ajax call to /DesktopModules/DigitalAssets/API/ContentService/GetFolderContent service. Problem with this is its actually pointing to the original DigitalAssets module and not the one I am working on. So, this has to change.

Status 401 Unauthorized didn't get fixed.

EDIT 2:

Upon further investigation I have found GetFolderContent() function in ContentServiceController.cs which in turn supposed to return an object with folder structure.

[AllowAnonymous] on this function didn't make Status 401 go away either.

EDIT 3:

Changing url to anything other then /DesktopModules/Module_Name/API/ContentService/GetFolderContent causes ajax call throw Status 404 Not Found and display error dialog An error occured while loading the folder content. Not Found.

Which I hope means that the ajax call actually gets to GetDolderContent() and back. As to why it comes back with Status 401 is still under investigation.

EDIT 4:

OK, there seems to be an issue with the way I got the module to build in Visual Studio. Tried building it in Release mode and while it build successfully I didn't get my install and packages folders packed with all important goodness.

EDIT 5:

All work trying to take ownership of this module has been suspended for the time being. I have managed to get it to compile in place of the original DigitalAssets module which was fairly easy. But now it's pulling DotNetNuke.Web.dll (or File Uploader to be more specific) after itself.

Getting DotNetNuke.Web to compile was exactly the same process which is fairly straight forward. But now I am trading upgradability of the platform in more than one place. Which I don't particularly fancy.

1
Did you end up finding a resolution here?box86rowh
No, I haven't. What I ended up doing (in the interest of saving time) is to recompile DigitalAssets module that was shipped with DNN installation throwing upgradability out the window. Going forward I can see myself revisiting this issue again and trying to take ownership of the module.iiminov

1 Answers

0
votes

Just to close off the question the conclusion as follows.

The project; Digital Assets Manager takeover has been put on hold. At the time there wasn't enough knowledge of DNN inner workings that would allow me to progress without wasting too much time.

For now I ended up modifying the core module (not ideal). In the future when I have less things that need to be done ASAP I will definitely revisit this idea.