an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > Disable Left Master Block Container
Last Post 10/16/2008 8:17:38 AM By lukezy. 8 replies.
10/15/2008 6:55:55 AM
ciaran
Posts: 16
Joined: 8/25/2008
Disable Left Master Block Container
Hi
 
I have just recently purchase the suite producy so I have the letest version.
 
When I disable the the left master content block and close the page editor you cant see any of the data etc in the block but the space on the left (ie. 160 pixels) for block is still there. 
 
Is it possible to get rid of the table or td when the the master block is disbaled?
 
Also in the left master content block i clicked on add block and in the block templates category i ticked left and right nav. Now i ma getting the following errro.
Is t possible to delete the entries from the databasr that i made and what is the table?
 
 
Thanks, excellent product
 
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 73:
Line 74:         Block mastBlockLeft = Block.GetByName("MasterLeft");
Line 75:         masterContainerLeft.BlockId = mastBlockLeft.BlockId;
Line 76:         masterContainerLeft.Data = mastBlockLeft.Data;
Line 77:

Source File: c:\BT2\DotShoppingCartSuiteV2.53\Web\site.master.cs    Line: 75
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
   site.Page_Load(Object sender, EventArgs e) in c:\BT2\DotShoppingCartSuiteV2.53\Web\site.master.cs:75
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
 
10/15/2008 9:04:16 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Disable Left Master Block Container
How did you disable the left master block? I think you just need to click "Edit" and set the width to 0px.
 
It seems that "MasterLeft" block is gone. Try running "select * from dsc_block where name = 'MasterLeft' " against your DB to see if you have a record.
DotShoppingCart Staff
10/15/2008 9:22:11 AM
ciaran
Posts: 16
Joined: 8/25/2008
Re: Disable Left Master Block Container
Hi lukezy
 
Thanks for the quick reply
 
I have 2 records for master left, the second is the last entry in the table should i delete it?
 
10/15/2008 9:27:07 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Disable Left Master Block Container
Ah, I guess you are using block template feature. Please don't use it. I thought it was disabled before the release since it hasn't got all issues resolved.
 
Yes, just deleting the second entry should get your site back to normal.
DotShoppingCart Staff
10/15/2008 9:46:44 AM
ciaran
Posts: 16
Joined: 8/25/2008
Re: Disable Left Master Block Container
I deleted the last entry but now i am going this error. Is there another record in a related table?
Can i disable ths feature as I dont want to this to happen again?
 
 
"   at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)\r\n   at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)\r\n   at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)\r\n   at System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute[TResult](Expression expression)\r\n   at System.Linq.Queryable.Single[TSource](IQueryable`1 source, Expression`1 predicate)\r\n   at DotShoppingCart.Commercial.Core.Block.GetById(Int32 id)\r\n   at Controls_Blocks_BlockContainer.AddBlockToContainer(Int32 blockId, Control containerControls, Int32 level) in c:\\BT2\\DotShoppingCartSuiteV2.53\\Web\\Controls\\Blocks\\BlockContainer.ascx.cs:line 445\r\n   at Controls_Blocks_BlockContainer.LoadContainerContent() in c:\\BT2\\DotShoppingCartSuiteV2.53\\Web\\Controls\\Blocks\\BlockContainer.ascx.cs:line 329\r\n   at Controls_Blocks_BlockContainer.Page_Load(Object sender, EventArgs e) in c:\\BT2\\DotShoppingCartSuiteV2.53\\Web\\Controls\\Blocks\\BlockContainer.ascx.cs:line 107\r\n   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)\r\n   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)\r\n   at System.Web.UI.Control.OnLoad(EventArgs e)\r\n   at System.Web.UI.Control.LoadRecursive()\r\n   at System.Web.UI.Control.LoadRecursive()\r\n   at System.Web.UI.Control.LoadRecursive()\r\n   at System.Web.UI.Control.LoadRecursive()\r\n   at System.Web.UI.Control.LoadRecursive()\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)"
 
 
System.InvalidOperationException was unhandled by user code
  Message="Sequence contains no elements"
  Source="System.Data.Linq"
  StackTrace:
       at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
       at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
       at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
       at System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
       at System.Linq.Queryable.Single[TSource](IQueryable`1 source, Expression`1 predicate)
       at DotShoppingCart.Commercial.Core.Block.GetById(Int32 id)
       at Controls_Blocks_BlockContainer.AddBlockToContainer(Int32 blockId, Control containerControls, Int32 level) in c:\BT2\DotShoppingCartSuiteV2.53\Web\Controls\Blocks\BlockContainer.ascx.cs:line 445
       at Controls_Blocks_BlockContainer.LoadContainerContent() in c:\BT2\DotShoppingCartSuiteV2.53\Web\Controls\Blocks\BlockContainer.ascx.cs:line 329
       at Controls_Blocks_BlockContainer.Page_Load(Object sender, EventArgs e) in c:\BT2\DotShoppingCartSuiteV2.53\Web\Controls\Blocks\BlockContainer.ascx.cs:line 107
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException:
 
10/15/2008 10:23:55 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Disable Left Master Block Container
It seems there is a reference still pointing to the deleted block. Do you remember the blockId that you deleted? E.g. the blockId is 172, run " select * from dbo.DSC_Block where cast(data as nvarchar(max)) like '%172%' " against your DB. And then remove string "%%172%%' in the Data column for the record.
 
To disable the feature, comment out these lines in web\controls\blocks\blockcontainer.ascx.cx.
        //if (!CreateTemplateDisabled)
        //    AddLink(div, "btnCreateTemplate", "Create Template", string.Format("javascript:showDialog('Create Template', 400, 300, '{0}?blockId={1}&editModePara=createTemplate');",
        //        SiteNavigation.EditBlockControlPage, BlockId));
 
 
 
DotShoppingCart Staff
10/15/2008 1:23:53 PM
macker999
Posts: 30
Joined: 10/11/2008
Re: Disable Left Master Block Container
Thanks
 
I am not at my work computer right now but i will try this firts thing in the morning  
10/16/2008 1:57:37 AM
ciaran
Posts: 16
Joined: 8/25/2008
Re: Disable Left Master Block Container
Hi Lukezy
 
I didnt delete any blocks I, in the left master content block i clicked on add block and in the block templates category i ticked left and right nav.
 
I hide that section of code you metioned but the left and right nav options still appear on the popup window.
 
We purchased this 3 weeks ago and for another project I purchase another suite version about a week ago. The lastest version i purchased didnt have the left / right nav block section with it which is causing the problem
 
Is it possible for us to get the lastest version? I only started this project yesterday so it wont cause any major problems installing again.  
 
Thanks
10/16/2008 8:17:38 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Disable Left Master Block Container
The section of code is to hide creating block templates. Are you saying you see the templates when using add block popup window? If so, you could delete these entries in the DSC_Block_Reference table.
 
Yes, you could log in to our website and go to "My Account". In the order detail page you could download the latest version.  
DotShoppingCart Staff