More in this section

Forums / Bugs & Issues / Unable to delete invalid form

Unable to delete invalid form

2 posts, 0 answered
  1. Viktor
    Viktor avatar
    22 posts
    01 Nov 2011
    16 Nov 2011
    Link to this post

    I have created form with invalid name through code:
    var form = formManager.CreateForm("Feedback Form");
    form.Title = "Feedback Form Title";
    form.Name = "Feedback Form Name"; // This is invalid name which will break the form

    I have created and saved invalid form. Now I'm unable to go to Content -> Forms because exception gets thrown when I call
    var formManager = FormsManager.GetManager();


    [ArgumentOutOfRangeException: The artificial type name must be a valid language independend identifier.
    Parameter name: name
    Actual value was Feedback Form Name.]
       Telerik.OpenAccess.RT.ArtificialBase.GenerateType(String nsname, String name, Type idFieldType, String idFieldName, String superClassName) +768
       OpenAccessRuntime.metadata.MetaDataBuilder.CreateArtificialTypes(PackageMetaData[] packageMetaDataParam) +1335
       OpenAccessRuntime.metadata.MetaDataBuilder.buildMetaData(DataObjectsRoot[] roots, Boolean ignoreNoClasses) +727
       OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b) +1321
       OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL() +184

    It's easy to mistype the name and end up in a similar position. Is there a way to fix this through code or by modifying values in the database (something I'd like to avoid)?

    I have tried to remove all the forms by doing the following:

    foreach(var form in formManager.GetForms())

    but I'm unable to execute this as I can't create a form manager.

    Edit: This is by no way a solution, but it allowed me to carry on with prototyping. I have searched all SF tables for a string token and then removed all the rows where this string token appeared. This is something that we must avoid for a range of good reasons.

    Thank you,

  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    03 Nov 2014
    21 Nov 2011
    Link to this post
    Hello Viktor,

    I believe I already answered you about this problem in the support ticket that you opened. So, I will close this thread, to not duplicate responses.

    Kind regards,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered