Type '' cannot be resolved anytime a field is added

Posted by Community Admin on 04-Aug-2018 18:55

Type '' cannot be resolved anytime a field is added

All Replies

Posted by Community Admin on 05-Jun-2016 00:00

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.

Posted by Community Admin on 09-Jun-2016 00:00

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
 

Posted by Community Admin on 09-Jun-2016 00:00

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.

Posted by Community Admin on 13-Jun-2016 00:00

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
 

Posted by Community Admin on 20-Jun-2016 00:00

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.

Posted by Community Admin on 22-Jun-2016 00:00

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
 

Posted by Community Admin on 23-Jun-2016 00:00

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

Posted by Community Admin on 23-Jun-2016 00:00

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
 

This thread is closed