Fields added to a ContentType not displaying

Topics: Administration, Customizing Orchard, Troubleshooting
Aug 21, 2014 at 5:50 PM
I'm baffled on this one.

We have an Orchard site that we launched a few months ago and just updated it to 1.8.1. The site has ContentTypes which contain form inputs for using the Custom Forms module. For each of these forms we added a field to the ContentType and everything has been all good.

Today I went to create a ContentType for a new form and when I add a field it gives me the confirmation that the field was created but it doesn't display in the admin or on the front end of the site. When I browse the database and look at the dbo.Settings_ContentPartFieldDefinitionRecord I can see the fields were created in the database, and if I try to create new fields I get the validation error that a field with the same name already exists. For some reason the fields or inputs don't actually display though, nor do the options for them in the ContentType editor.

Has anyone else run in to this or know how to approach fixing it?

Thank you!
Aug 21, 2014 at 5:55 PM
Maybe you have some faulty data which would hide it.
Aug 21, 2014 at 6:00 PM
I was initially thinking that as well, but the other ContentTypes that contain fields are all displaying properly. I still looked at the for our Theme and didn't have anything there, but I'm not seeing a file for TheAdmin theme or in the ContentTypes module folder. Orchard.Fields looks good.
Aug 21, 2014 at 6:04 PM
Did you try to restart the app, maybe a caching issue? How many instances do you have ?
Aug 21, 2014 at 7:07 PM
Just tried restarting the site in IIS as well as the App Pool, along with clearing browser history and cache and still no luck. What is really strange is that I can add another field to an existing custom ContentType and it displays no problem. However, if I create a new ContentType with only the Common part, then try adding fields directly to the type they don't show up (but they do in the database).
Aug 21, 2014 at 8:04 PM
Sounds familiar ... what is the name of your content type ? What is the name of the field you are trying to add?
Aug 21, 2014 at 8:26 PM
I was able to get the fields to start displaying again, it looks like the issue was related to having a hyphen in the Content Type ID. On the previous version of the site, 1.7.2, the ContentType ids were set as Form-NameOfTheForm. When I just created the ContentType id as FormNameOfTheForm it is allowing me to add the fields in to it.
Aug 21, 2014 at 8:50 PM
Sounds right. This is why I had the impression I had hit this at some point.