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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Page Management is currently unavailablePage Management is currently unavailable
Previous
 
Next
New Post
3/13/2009 10:44 AM
 

Hi Brandon,

Devan is working on my site, I have tnow logged in as host and recieved the following error:

DotNetNuke.Services.Exceptions.ModuleLoadException: Conversion from type 'DBNull' to type 'Integer' is not valid. ---> System.InvalidCastException: Conversion from type 'DBNull' to type 'Integer' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(Object Value) at DotNetNuke.Data.SqlDataProvider.AddTab(Int32 PortalId, String TabName, Boolean IsVisible, Boolean DisableLink, Int32 ParentId, String IconFile, String Title, String Description, String KeyWords, String Url, String SkinSrc, String ContainerSrc, String TabPath, DateTime StartDate, DateTime EndDate, Int32 RefreshInterval, String PageHeadText, Boolean IsSecure) at DotNetNuke.Entities.Tabs.TabController.AddTab(TabInfo objTab, Boolean AddAllTabsModules) at DotNetNuke.Entities.Tabs.TabController.AddTab(TabInfo objTab) at DotNetNuke.Modules.Admin.Tabs.ManageTabs.SaveTabData(String strAction) at DotNetNuke.Modules.Admin.Tabs.ManageTabs.cmdUpdate_Click(Object Sender, EventArgs e) --- End of inner exception stack trace ---

Event log for this error is:

ModuleId: -1
ModuleDefId: -1
FriendlyName: Page Management
ModuleControlSource: Admin/Tabs/ManageTabs.ascx
AssemblyVersion: 04.08.03
PortalID: 0
PortalName: Integrated Home Entertainment
UserID: 1
UserName: host
ActiveTabID: 48
ActiveTabName: Event Viewer
RawURL: /Admin/LogViewer/tabid/48/ctl/Tab/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://integratedhome.co.za/Admin/LogViewer/tabid/48/ctl/Tab/Default.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 2233e097-95bd-4d3a-920a-a54deb22e64a
InnerException: Conversion from type 'DBNull' to type 'Integer' is not valid.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Conversion from type 'DBNull' to type 'Integer' is not valid. ---> System.InvalidCastException: Conversion from type 'DBNull' to type 'Integer' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(Object Value) at DotNetNuke.Data.SqlDataProvider.AddTab(Int32 PortalId, String TabName, Boolean IsVisible, Boolean DisableLink, Int32 ParentId, String IconFile, String Title, String Description, String KeyWords, String Url, String SkinSrc, String ContainerSrc, String TabPath, DateTime StartDate, DateTime EndDate, Int32 RefreshInterval, String PageHeadText, Boolean IsSecure) at DotNetNuke.Entities.Tabs.TabController.AddTab(TabInfo objTab, Boolean AddAllTabsModules) at DotNetNuke.Entities.Tabs.TabController.AddTab(TabInfo objTab) at DotNetNuke.Modules.Admin.Tabs.ManageTabs.SaveTabData(String strAction) at DotNetNuke.Modules.Admin.Tabs.ManageTabs.cmdUpdate_Click(Object Sender, EventArgs e) --- End of inner exception stack trace ---

I'm still a 'learner' so I hope this is what you're looking for :)


 

 

 
New Post
3/17/2009 9:58 AM
 

Hi guys has anyone got any ideas?

 
New Post
3/17/2009 4:27 PM
 

Hi Paul,

I didn't see that you'd responded to the thread; my apologies for not responding sooner.

The exception you posted indicates that there is an issue with the return value of the AddTab stored procedure.  The relevant call is:

Return CType(SqlHelper.ExecuteScalar(ConnectionString, DatabaseOwner & ObjectQualifier & "AddTab", GetNull(PortalId), TabName, IsVisible, DisableLink, GetNull(ParentId), IconFile, Title, Description, KeyWords, Url, GetNull(SkinSrc), GetNull(ContainerSrc), TabPath, GetNull(StartDate), GetNull(EndDate), GetNull(RefreshInterval), GetNull(PageHeadText), IsSecure, PermanentRedirect), Integer)

And here, the CType(..., Integer) is the only possible element of the call hierarchy that could be producing this exception (I am looking at the 4.8.4 code; I no longer have a copy of 4.8.3 on my machine).  Clearly your AddTab stored procedure is returning DBNull, where an integer is expected.
 
This leaves us with the question as to why this is occurring, and that is unfortunately more difficult to determine.  The AddTab SP itself is very straightforward, and there is little room for error there.  One possibility is that you are submitting a tab name that is longer than fifty characters, but I assume this is not the case.
 
Your next step is attempt manual execution of this stored procedure.  Log in as a host, go to Host->SQL, and execute the following script:
SET XACT_ABORT ON
DECLARE @PortalId int
DECLARE @TabId int

SELECT TOP 1 @PortalId = PortalId FROM Portals
SELECT TOP 1 @TabId = TabId FROM Tabs WHERE PortalId = @PortalId

BEGIN TRANSACTION

EXEC AddTab
@PortalId, 'tab name', 0, 0, @Tabid, '', 'title', 'description', '', 
    'url', '', '', 'path', '1/1/2000', '1/1/2000', 0, 'text', 0

ROLLBACK TRANSACTION
 
Note that if you have a different databaseowner or objectqualifier defined, you will need to modify the SQL above.
 
What result do you receive?  If it is not a single numeric value, post any error here.
 
Hope this helps you move forward!
 
Brandon

 


Brandon Haynes
BrandonHaynes.org
 
New Post
3/17/2009 7:33 PM
 

Hi Brandon,

Thank you for getting back to me.

I ran the SQL as a script, and got the following back The Query completed successfully!

I then ran it without selecting the "run as script" box and got:


Column1
 
 
 

Would it make a difference if i ran the upgrade process? () Does DNN replace the files, if it does it may replace a corrupt file.

Thanks again,

Paul.

 
New Post
3/18/2009 7:52 AM
 

 Hi Paul,

Well, you've found the source of your problem.  The framework is expecting an integer value to be returned there, and nothing is being returned.  This is the source of your exception.

I have no idea why the SP might be doing this; it could be perhaps due to a mismatch between the framework version and your database schema version.  Post the SQL associated with your AddTabs SP and we'll see.

Also, look in the Versions table and post the highest version reported there (look for the highest VersionId and post the major, minor, and build values -- hopefully 4.8.3).
 
Finally, check the version of your framework.  The easiest way to do this is to right-click on the DotNetNuke.dll in your bin directory and look for the version attribute, probably under the details tab.
 
I would not recommend upgrading until you have identified what is going on insofar as is feasible; this would risk compounding your problems (I don't see anything relevant that was fixed in Gemini).  As soon as you are able, however, I do recommend upgrading to 4.9.2.
 
It is sounding more and more like there is a mismatch between your framework and database schema.  Do you have any idea how this might have occurred?  Did your new host install the non-db framework on your behalf?
 
Brandon

Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Page Management is currently unavailablePage Management is currently unavailable


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