I have noticed a number of posts recently on the DotNetNuke.com forums regarding numerous errors being reported in the event log relating to the portal id of -1 and typically with an InnerException of "Value cannot be null. Parameter name: type". This issue can become very annoying and can have an actual effect on your site's performance as when the size of the event log grows you will start to notice performance slowdowns. This article will discuss the root cause of the issue and a solution.
Cause
The root cause of this issue appears to be traced to an issue with the DNN Installer included in version 4.5.3. When the installer loads a new module to a DNN site it checks for the supporting of the 3 optional interfaces (IPortable, ISearchable, and IUpgradable), it then populates a database value to indicate the supported feature. The bug is that if the installer cannot determine the support is placing a -1 value in this field rather than a 0. I personally think this is also a bug in the search indexer as if -1 is not valid it should not be checking them, but regardless this is what is causing the problem.
The Fix
As explained above the problem is quite simple, luckily the resolution is just the same. You can simply run the below query to update the DesktopModules table to fix any incorrect entries.
This is a very simple update query where we are simply changing the value to 0 where it is currently -1. You will need to modify this query to append any object qualifier that you might have listed for your specific database. After performing this change you should notice that the errors will go away!