Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How to remove widget from page that shows "Server Error"? View modes: 
User avatar
Member
Member
Giuliano - 2/22/2012 3:04:30 PM
   
How to remove widget from page that shows "Server Error"?
Hi,

I updated WHERE property for widget on one of the pages and page is not accessible anymore. Page is showing
"Server Error"
[DataConnection.ExecuteQuery]: Query: SELECT * FROM View_CMS_Tree_Joined_Versions INNER JOIN CONTENT_MenuItem ON....... etc......

What is the easiest way to remove widget or update property so I can access this page again?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_radekm - 2/22/2012 10:33:03 PM
   
RE:How to remove widget from page that shows "Server Error"?
Hello.

Can you provide more details, please?
Is this user or editor widget? I.e. was it added by editor on Design tab, or by user on Page tab? How exactly did you change it and what is whole text of the error message? Can you see the same error both on Page and Design tabs? What if you disable given widgets directly in Site Manager / Development / Widgets / <select> / System properties section, disabling “Visible” property? Can you also set some default and very simple where condition on Properties tab? It could override problematic where condition which is causing the problem. Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
Giuliano - 2/23/2012 9:46:22 AM
   
RE:How to remove widget from page that shows "Server Error"?
Hi Radek, Here are answers to your questions:

Is this user or editor widget? I.e. was it added by editor on Design tab, or by user on Page tab?
This is editor widget. It's a simple duplicate of Repeater webpart. It was added on the Page tab. This happened before too. Basically, every time we have typo in the WHERE field whole page will brake.

How exactly did you change it and what is whole text of the error message?
For testing purpose I simply added letter "a" inside WHERE textbox this time

Can you see the same error both on Page and Design tabs?
No, only under Page tab. Design tab is working fine.

What if you disable given widgets directly in Site Manager / Development / Widgets / <select> / System properties section, disabling “Visible” property?
I don't have that property in this webpart. It'a a duplicate of Repeater webpart.

Can you also set some default and very simple where condition on Properties tab? It could override problematic where condition which is causing the problem.
Even when I set default value CMS is still looking for the value I added directly into webpart, ignoring default value.

PS: We have solved this issue by changing code behind causing widget to not load. Then we simply removed it from the page and added again. I was only hoping there is a easier way to fix this since every time I have typo in WHERE field I have to go through the same process.

Thanks.

This is error text


Server Error in '/' Application.

[DataConnection.ExecuteQuery]: Query: SELECT * FROM View_CMS_Tree_Joined_Versions INNER JOIN CONTENT_MenuItem ON View_CMS_Tree_Joined_Versions.DocumentForeignKeyValue = CONTENT_MenuItem.[MenuItemID] WHERE (((((SiteName = N'CorporateSite') AND (DocumentCulture = N'en-CA')) AND (NodeLevel <= 3)) AND (NodeAliasPath LIKE N'/Development-By-Inorbital/Form/%')) AND (a)) AND (ClassName = 'CMS.MenuItem') ORDER BY NodeOrder : caused exception: An expression of non-boolean type specified in a context where a condition is expected, near ')'.

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.Exception: [DataConnection.ExecuteQuery]: Query: SELECT * FROM View_CMS_Tree_Joined_Versions INNER JOIN CONTENT_MenuItem ON View_CMS_Tree_Joined_Versions.DocumentForeignKeyValue = CONTENT_MenuItem.[MenuItemID] WHERE (((((SiteName = N'CorporateSite') AND (DocumentCulture = N'en-CA')) AND (NodeLevel <= 3)) AND (NodeAliasPath LIKE N'/Development-By-Inorbital/Form/%')) AND (a)) AND (ClassName = 'CMS.MenuItem') ORDER BY NodeOrder : caused exception: An expression of non-boolean type specified in a context where a condition is expected, near ')'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[Exception: [DataConnection.ExecuteQuery]: Query: SELECT * FROM View_CMS_Tree_Joined_Versions INNER JOIN CONTENT_MenuItem ON View_CMS_Tree_Joined_Versions.DocumentForeignKeyValue = CONTENT_MenuItem.[MenuItemID] WHERE (((((SiteName = N'CorporateSite') AND (DocumentCulture = N'en-CA')) AND (NodeLevel <= 3)) AND (NodeAliasPath LIKE N'/Development-By-Inorbital/Form/%')) AND (a)) AND (ClassName = 'CMS.MenuItem') ORDER BY NodeOrder : caused exception: An expression of non-boolean type specified in a context where a condition is expected, near ')'.]
CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, Object[,] queryParams, QueryTypeEnum queryType) +461
CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query) +548
CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query) +484
CMS.TreeEngine.TreeProvider.SelectNodes(String siteName, String aliasPath, String cultureCode, Boolean combineWithDefaultCulture, String classNames, String where, String orderBy, Int32 maxRelativeLevel, Boolean selectOnlyPublished, Int32 topN, String columns) +1454
CMS.WorkflowEngine.DocumentHelper.GetDocuments(String siteName, String aliasPath, String cultureCode, Boolean combineWithDefaultCulture, String classNames, String where, String orderBy, Int32 maxRelativeLevel, Boolean selectOnlyPublished, Int32 topN, String columns, TreeProvider tree) +231
CMS.Controls.CMSAbstractDataProperties.GetDataSet(String path, String where, Boolean forceReload) +2430
CMS.Controls.CMSAbstractDataProperties.LoadData(Object& DataSource, Boolean forceReload) +182
CMS.Controls.CMSRepeater.ReloadData(Boolean forceReload) +1693
CMS.Controls.CMSRepeater.OnInit(EventArgs e) +176
System.Web.UI.Control.InitRecursive(Control namingContainer) +508
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Control.InitRecursive(Control namingContainer) +250
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1651

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

User avatar
Kentico Support
Kentico Support
kentico_radekm - 2/27/2012 4:55:54 AM
   
RE:How to remove widget from page that shows "Server Error"?
Hello.

I was able to reproduce the problem and I did submit it as a bug. We will have a look on it. Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
Giuliano - 2/27/2012 8:12:54 AM
   
RE:How to remove widget from page that shows "Server Error"?
That's great, thanks Radek. Have a great day.