Technical support This forum is closed.
Version 1.x > Technical support > Adding Template Attributes View modes: 
User avatar
Member
Member
JeremyThake - 2/9/2006 8:01:22 AM
   
Adding Template Attributes
I've been trying to add some attributes to a CMS option and I get this error below when I do. It makes the change to the scheme.config and query.config but doesn't add the field to the database table and the page comes up with this.

One thing I did notice is that I've actually customised the SelectByPath query and it actually over writes it when you add a field into it!


Server Error in '/BibTrackKenticoCMS' Application.
--------------------------------------------------------------------------------

Specified argument was out of the range of valid values. Parameter name: testtest
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.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: testtest

Source Error:


Line 1016: }
Line 1017: this.LoadAttributes();
Line 1018: lstAttributes.SelectedValue = fieldnode.Attributes[ "column" ].Value;
Line 1019: this.lblInfo.Text = ResMan.GetString( "TemplateDesigner.InfoChangesSaved" );
Line 1020: ViewState[ "originalColumn" ] = this.txtAttributeName.Text;


Source File: D:\Inetpub\wwwroot\BibTrackKenticoCMS\cmsdesk\MetaDesigner\TemplateDesigner.ascx.cs Line: 1018

Stack Trace:


[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: testtest]
System.Web.UI.WebControls.ListControl.set_SelectedValue(String value)
Kentico.CMS.CMSDesk.TemplateDesigner.SaveSelectedField() in D:\Inetpub\wwwroot\BibTrackKenticoCMS\cmsdesk\MetaDesigner\TemplateDesigner.ascx.cs:1018
Kentico.CMS.CMSDesk.TemplateDesigner.btnOK_Click(Object sender, EventArgs e) in D:\Inetpub\wwwroot\BibTrackKenticoCMS\cmsdesk\MetaDesigner\TemplateDesigner.ascx.cs:613
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain() +1277




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573







This is the error in the error log

Event ID: 6
Event type: Error
Event time: 2/9/2006 2:57:28 PM
Source: CMSDESK
Event code: EXCEPTION
User ID:
User name: administrator
IP address: 127.0.0.1
Node ID:
Document name:
Description:
System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: testtest at System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) at Kentico.CMS.CMSDesk.TemplateDesigner.SaveSelectedField() in D:\Inetpub\wwwroot\BibTrackKenticoCMS\cmsdesk\MetaDesigner\TemplateDesigner.ascx.cs:line 1018 at Kentico.CMS.CMSDesk.TemplateDesigner.btnOK_Click(Object sender, EventArgs e) in D:\Inetpub\wwwroot\BibTrackKenticoCMS\cmsdesk\MetaDesigner\TemplateDesigner.ascx.cs:line 613 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) 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() --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)







User avatar
Guest
admin - 2/11/2006 3:00:53 PM
   
Re: Adding Template Attributes
Hi Jeremy,

could you please write me what exactly you changed? Which document type or table were you trying to modify?

Thank you.

Best Regards,

User avatar
Member
Member
JeremyThake - 2/13/2006 2:11:24 AM
   
Re: Adding Template Attributes
Was a custom document type called Events.

We are using Kentico under Visual Source SAfe. I got two errors when queries.config and the schema.config were not checked out...but then it still didn't work after that. When I check out the entire CMS folder...it works fine.

So it must be trying to access another file but there is no error message to say that it failed.

Jeremy

User avatar
Guest
admin - 2/14/2006 9:43:57 AM
   
Re: Adding Template Attributes
Hi Jeremy,

If you're trying to modify some document template, you need to check out the whole <web project>\cmsdesk\metadata\cms\events folder from VSS. I know it's not really convenient and we will improve this in Kentico CMS 2.0.

If the configuration files and database table structure are inconsistent now, I would recommend you this:

1) Check out the appropriate metadata folder so that it's not write-protected.
2) Add a new temporary field to your document template.
3) Remove the temporary field.
4) Remove the incorrectly created field (if it's present).
5) Remove the incorrectly created field from your database table manually (if it's present).
6) Create a new field as you originally wanted.

Please let me know if you need any help with that.

Best Regards,