+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Type '' cannot be resolved anytime a field is added

Type '' cannot be resolved anytime a field is added

8 posts, 0 answered
  1. bryan
    bryan avatar
    10 posts
    Registered:
    11 Apr 2016
    05 Jun
    Link to this post

    Howdy, 

    I'm having a problem with adding custom interface widgets to a content type. I have two types, a Resource type which I can add any custom interface/field combo i want to and everything is cool with it. But then I have a Project type that I can't seem to add a field with a custom interface widget to. Every time I do, it immediately throws the type cannot be resolved error when trying to edit Project items. 

    I'm not sure if this information is of any use, but in the database the Resource type's table is called "resrce" and the Project's table is called "resource_projects". Which seems weird since this implies hierarchy (and potentially permissions?), and that isn't supposed to be the case. Any help would be greatly appreciated. Thank you.

  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    09 Jun
    Link to this post
    Hi Bryan,

    You can find more information how to create field controls that could be used in Sitefinity in the following articles:
    http://docs.sitefinity.com/tutorial-build-a-custom-field-control
    - http://docs.sitefinity.com/thunder-field-controls (by using Sitefinity Thunder)

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. bryan
    bryan avatar
    10 posts
    Registered:
    11 Apr 2016
    09 Jun in reply to Svetoslav Manchev
    Link to this post

    Hey Svetoslav,

    I'm pretty well acquainted with the documentation, as such I've gone through these steps and have even tried with an entirely new custom content type with no luck. I can't even add a regular Textbox to it without getting this error. It's really strange, because it apparently can't resolve the Resources.Projects type, but the code reference says the type is"Telerik.Sitefinity.DynamicTypes.Model.Exchange.Project"

     

    As I mentioned earlier, something strange is happening on the database side, where any new content types are being created with the resource_ prefix where Resource is another one of my content types. But i'm not creating new content types with Resource as a parent, so I don't understand why sitefinity is setting that prefix. I imagine this is where the core of this problem lies since one part of sitefinity is saying the type should be one thing and another part of it says otherwise.

     

    TLDR: the content type Project is being created in the database as though it were a child of the type Resource and not its own top level content type. Why is this happening? How can i stop it? All content types that I now create seem to immediately do this.

  4. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    13 Jun
    Link to this post
    Hello Bryan,

    Do you have the same issue when create a new content type?

    Can you provide the exact structure you have, with the exact names of the types and fields added, as there might be some issue with that (as default shorttext field could not be added also)?

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  5. bryan
    bryan avatar
    10 posts
    Registered:
    11 Apr 2016
    20 Jun
    Link to this post

    I can make a new content type, but i can't seem to add any fields to it as the same error comes up.

    The structure is this:
    Module: Asset Exchange
    Content types: Partners, Resources, Downloads, Projects where none of the content types are children of another content type. 

    I've attached the fields as images. the file names indicate which image relates to which content type but the order is the same order as I mentioned above.

  6. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    22 Jun
    Link to this post
    Hello Bryan,

    I have tested the scenario with the same structure and Module and Content type names but this seems works fine.

    Can you confirm your version, as it seems not the latest one. You can try on a backup project to regenerate the configurations - remove the DynamicModulesConfig and run the respective code from that KB:
    http://www.sitefinity.com/developer-network/knowledge-base/details/regenerate-configuration-files-for-dynamic-modules

    If this does not help you can open a support ticket, where to insect your project more detailed.

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  7. bryan
    bryan avatar
    10 posts
    Registered:
    11 Apr 2016
    23 Jun in reply to Svetoslav Manchev
    Link to this post

    My version is 6.1. Can you please explain how I can use the code you provided? Thank you.

  8. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    23 Jun
    Link to this post
    Hello Bryan,

    Open (on a test/back-up copy first) your project in Visual studio and in its root folder place the respective files for your version (in that case before 6.3), then build the project and open the page, e.g.
    http:/localhost/RegenerateConfigs.aspx
    then click "Regenerate configs" button.

    Just to remind you to remove your DynamicModulesConfig.config file in advance.

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
8 posts, 0 answered