HomeHome Product Discus... Product Discus...SmithCartSmithCartError when going to another tab after save a new itemError when going to another tab after save a new item
Previous
 
Next
New Post
7/5/2010 9:36 PM
 

I am encountering an error after I save a new item and then scroll up to the top and go to another tab for that item. You can see it in the log viewer on your test portal (www9.smith-consulting.com), it was at 7/5/2010 9:22:58 PM.

Exact steps I followed that trigger this:

  1. Go to "Add Products"
  2. Create new item and click "Submit" at bottom
  3. After it says "Product Saved" scroll up to the different tabs for the item and click on Variants/Discounts/Shipping etc.
  4. If the error doesn't show right away it will after you try to save the changes made on the tab you go to.

This is important to resolve as it causes a major incovenience to an average end user (my client) when adding inventory. Please let me know when you are able to fix this.


Here is the error in the event log:

AssemblyVersion: 04.09.04
PortalID: 0
PortalName: My Website
UserID: 17
UserName: dooley
ActiveTabID: 38
ActiveTabName: Home
RawURL: /Home/tabid/38/ctl/AddProducts/mid/460/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www9.smith-consulting.com/Home/tabid/38/ctl/AddProducts/mid/460/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; InfoPath.2)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 6b54608a-90ae-4810-be48-d3eb0f88458d
InnerException: Invalid object name 'Smith_ProductRestrictedStates'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Data.SqlClient.SqlConnection.OnError
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Invalid object name 'Smith_ProductRestrictedStates'. ---> System.Data.SqlClient.SqlException: Invalid object name 'Smith_ProductRestrictedStates'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at Smith.DNN.Modules.BuyNow.SqlDataProvider.ListRestrictedState(Int32 ProductID) at Smith.DNN.Modules.BuyNow.ProductsController.ListRestrictedState(Int32 ProductID) at Smith.DNN.Modules.BuyNow.AddProducts.BindRestrictedStates() at Smith.DNN.Modules.BuyNow.AddProducts.btnShippingSetup_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:

 
New Post
7/6/2010 6:57 PM
 

Can you verify that you have the table 'Smith_ProductRestrictedStates' in your database.


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
7/6/2010 7:07 PM
 

Yes, I have that table in the database.

 
New Post
7/7/2010 1:24 AM
 

To fix this issue download the hotfix titled Smith_BuyNow.dll.zip dated today from the cart downloads page. Also, open up the "Smith_AddProducts" stored procedure on the last line of the sproc add "select @myProdID". The updated stored procedure is as follows:

ALTER PROCEDURE [dbo].[dnn_Smith_AddProducts]
@CategoryID int,
@Manufacturer nvarchar(50),
@ModelNumber nvarchar(50),
@ModelName nvarchar(200),
@ProductImage nvarchar(500),
@ThumbnailImage nvarchar(500),
@UnitCost money,
@MemberPrice money,
@QuantityOnHand int,
@Summary nvarchar(1000),
@Description ntext,
@DownloadUrl nvarchar(1000),
@Featured bit,
@Archived bit,
@weight decimal(12,5),
@sortOrder int,
@ExcludeCoupon bit ,
@Items int,
@Share bit,
@TabModuleId int,
@CreatedByUser nvarchar(100),
@CreatedDate datetime,
@LogicallyDeleted bit,
@Recurring bit ,
@SubscriptionInterval varchar(50) ,
@RecurringOccurances int ,
-- @RequiredProductID int ,
@UrlGUID varchar(50) ,
@EncryptUrl bit,
@AddDnnRole varchar(50),
@RequireLogin bit,
@UsePriPriceWght bit,
@bundleID int,
@masterBundleID int,
@RoleExpireDays varchar(50),
@SubCategoryID int,
@TaxExempt bit,
@PortalID int,
@AffiliateUrl nvarchar(1000),
@RequireCoupon bit,
@ShowPDUDF bit,
@AutoGUID bit,
@Description2 ntext,
@Description3 ntext,
@Description4 ntext,
@Description5 ntext,
@TabName1 varchar(50),
@TabName2 varchar(50),
@TabName3 varchar(50),
@TabName4 varchar(50),
@TabName5 varchar(50)

AS

INSERT INTO dnn_Smith_Products(
[CategoryID]
,[Manufacturer]
,[ModelNumber]
,[ModelName]
,[ProductImage]
,[ThumbnailImage]
,[UnitCost]
,[MemberPrice]
,[QuantityOnHand]
,[Summary]
,[Description]
,[DownloadUrl]
,[Featured]
,[Archived]
,[Weight]
,[SortOrder]
,[ExcludeCoupon]
,[Items]
,[Share]
,[TabModuleId]
,[CreatedByUser]
,[CreatedDate]
,[LogicallyDeleted]
,[Recurring]
,[SubscriptionInterval]
,[RecurringOccurances]
,[UrlGUID]
,[EncryptUrl]
,[AddDNNRole]
,[RequireLogin]
,[UsePriPriceWght]
,[BundleID]
,[MasterBundleID]
,[RoleExpireDays]
,[TaxExempt]
,[PortalID]
,[AffiliateUrl]
,[RequireCoupon]
,ShowPDUDF
,AutoGUID
,Description2
,Description3
,Description4
,Description5
,TabName1
,TabName2
,TabName3
,TabName4
,TabName5

) VALUES (
@CategoryID,
@Manufacturer,
@ModelNumber,
@ModelName,
@ProductImage,
@ThumbnailImage,
@UnitCost,
@MemberPrice,
@QuantityOnHand,
@Summary,
@Description,
@DownloadUrl,
@Featured,
@Archived,
@weight,
@sortOrder,
@ExcludeCoupon,
@Items,
@Share,
@TabModuleId,
@CreatedByUser,
@CreatedDate,
@LogicallyDeleted,
@Recurring,
@SubscriptionInterval,
@RecurringOccurances,
-- @RequiredProductID,
@UrlGUID ,
@EncryptUrl,
@AddDnnRole,
@RequireLogin,
@UsePriPriceWght,
@BundleID,
@masterBundleID,
@RoleExpireDays,
@TaxExempt,
@PortalID,
@AffiliateUrl,
@RequireCoupon,
@ShowPDUDF,
@AutoGUID,
@Description2,
@Description3,
@Description4,
@Description5,
@TabName1,
@TabName2,
@TabName3,
@TabName4,
@TabName5
)


DECLARE @myProdID int
SELECT @myProdID=scope_identity()

INSERT INTO dnn_Smith_CategoryProduct(ProductID, CategoryID) VALUES (@myProdID, @CategoryID)

IF (@SubCategoryID IS NOT NULL) and (@SubCategoryID <> '') and (@SubCategoryID <> 0)
INSERT INTO dnn_Smith_CategoryProduct(ProductID, CategoryID) VALUES (@myProdID, @SubCategoryID)

select @myProdID


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
7/7/2010 2:24 AM
 

I followed the steps you gave but the error still occurs. I also tried again on your test portal with the same result. You can see in your test site Log Viewer at:

  • 7/7/2010 2:16:29 AM (after submitting new item I clicked on Photos and added one additional photo, then got error)
  • 7/7/2010 2:22:21 AM (after submitting new item I clicked on Shipping and then got error)
 
New Post
7/7/2010 3:26 PM
 

The hotfix was never uploaded to the test server. I will deploy it to the test server and see if I can replicate the error.

-Scott


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
7/7/2010 9:46 PM
 

The hotfix "AddProducts-HotFix-070710.zip" dated today is availible on the downloads page. Copy the dll's in the attached zip to your \bin folder and the ascx to your \desktopmodules\smith.buynow folder. The test site has been updated and is now working also http://www9.smith-consulting.com


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
7/7/2010 10:34 PM
 

I applied the fix and it corrected the problem. Thanks!

I also noticed the change to the description tabs and there is one new issue realted to this after applying the hotfix.
Create a new item: After you enter an image to upload, and then click one of the description buttons ("Description 2" etc) the image disappears. The first time I did this I didn't even notice because you cannot see that field when it switches description tabs. So once you add more than one description tab to an item and save it you would have to go back in to Manage Products to edit the item and add the primary photo again.

 
New Post
7/8/2010 12:03 AM
 

Attached is an updated addproducts dll that fixes this. Copy the dll in the attached zip to your \bin folder

I also updated the hotfix on the cart downloads page


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
 Login to download attachment
New Post
7/8/2010 12:56 AM
 

That still didn't fix it. Here are the steps again just to make sure I am clear with the issue:

  1. Click "Add Products"
  2. Fill out the required fields
  3. Click "Browse" to upload a primary photo
  4. Under "Description" click the button "Description 2"
  5. Now the path to the primary photo is blank.

When you are down that far on the screen you don't even know and so you have just saved an item without a primary photo.

 
New Post
7/8/2010 2:25 AM
 

Its fixed now and updated the hotfix on the downloads page make sure you deploy both the dll and ascx. I had to add an ajax updatepanel to the form becuase the file upload control has some special security on it that clears the textbox on postback. In order to enable ajax on the add products screen you will need to go into host - module definitions and check "supports partial rendering" for addproducts.ascx


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
7/8/2010 11:11 AM
 

I followed everyting you said and while the primary photo field does stay populated now, the photo never actually uploads. In fact now I am not able to upload a photo at all.

 
New Post
7/8/2010 11:26 AM
 

I just discovered that if I turned OFF "suports partial rendering" for addproducts.ascx, then it works except it doesn't show the thumbnail of the primary photo that was just uploaded(but it really does upload).

Then I can go to another tab like Photos or Discounts without any errors, and when I look at the actual item in the store, everything is there. This means that functionally everything is working without any errors, but it would be nice to have the primary thumbnail show right away so the end user knows it was really uploaded.

Thanks.

 
New Post
7/8/2010 12:04 PM
 

Are you able to replicate this on the test site?

-Scott


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
7/8/2010 1:41 PM
 

Your test site doesn't seem to have the latest hotfix you uploaded here. Right now on the test site if you add a primary photo and then click on one of the Description buttons, then the image path disappears and nothing gets uploaded if you hit Submit.

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartError when going to another tab after save a new itemError when going to another tab after save a new item