Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nicolás Cova 48 posts 120 karma points
    Aug 06, 2014 @ 18:39
    Nicolás Cova
    0

    Code First form GUID changed after compilation

    Hi everybody,

    I was working on a form created in code-first which was working perfectly, despite being modified constantly for the last couple of days. The DLL that contained the code-first form also contained FieldTypes, PreValue Source Types and PreValue Sources.

    I decided to relocate the FieldTypes, PreValue Sources and PreValue Source Types to a separate project and keep the code-first form alone in it's own project. After replacing the DLL with the code-first form (plus other stuff) in the bin directory with the new DLL (the one with the code-first form by itself), I get a YSOD in the backend with the following error:

    No provider with id '4085adac-0dba-11e4-8c8d-9c301e5d46b0' found

    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: Umbraco.Forms.Core.Common.ProviderException: No provider with id '4085adac-0dba-11e4-8c8d-9c301e5d46b0' found

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ProviderException: No provider with id '4085adac-0dba-11e4-8c8d-9c301e5d46b0' found]
    Umbraco.Forms.Core.Common.ProviderCollection1.GetProvider(Guid id) +213 Umbraco.Forms.Core.Field.CreateFromDataReader(IRecordsReader reader) +1075
    Umbraco.Forms.Data.Storage.FieldStorage.GetAllFields(FieldSet fieldset) +272 Umbraco.Forms.Data.Storage.FieldSetStorage.GetAllFieldSets(Page page) +288 Umbraco.Forms.Data.Storage.PageStorage.GetAllPages(Form form) +290 Umbraco.Forms.Data.Storage..() +45 Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, Nullable
    1 timeout, Func1 getCacheItem, Object syncLock) +200
    Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, Nullable
    1 timeout, Func1 getCacheItem) +176 Umbraco.Core.CacheHelper.GetCacheItem(String cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, Func1 getCacheItem) +393 Umbraco.Forms.Data.Storage.FormStorage.GetAllForms(Boolean archived) +491
    Umbraco.Forms.UI.Dashboard.FormsDashboard.Page_Load(Object sender, EventArgs e) +1521
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +190 > System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190

    If I add the DLL to the bin directory of a test site, I can see that the form's GUID has changed. Why did it change if it's essentially the same form? Is there a way I can set the form's GUID to its previous value?

    I need to remove the YSOD because its happening in a production site. Is it possible to do so without having to re-install Contour?

    Thank you for your help.

  • Comment author was deleted

    Aug 06, 2014 @ 19:27

    You can set a guid on a code first form then it will never change :)

    For the error, probably because you are missing a custom fieldtype

  • Nicolás Cova 48 posts 120 karma points
    Aug 06, 2014 @ 19:49
    Nicolás Cova
    0

    Hi Tim!

    Thanks for the quick reply. I’m pretty sure I’m referencing correctly all of the custom fieldtypes, but I can double check in a moment. I’m sorry to ask for this but, how do I set the form's GUID? I can’t seem to find that in the documentation.

  • Comment author was deleted

    Aug 06, 2014 @ 20:18

    In the form attribute :)

  • Nicolás Cova 48 posts 120 karma points
    Aug 06, 2014 @ 22:08
    Nicolás Cova
    101

    Tim,

    I was so hell-bent on finding a "GUID" form attribute that I completely overlooked the "id" attribute. Good to know that.

    Anyways, concerning the error, you sort of put me in the right direction. It turns out that someone had changed the GUIDs of the custom fieldtypes. The form's fields were stored in the database (in the UFFields table) with the custom fieldtypes' old GUIDs. All I had to do was delete these rows from the table, restart the site in IIS, and the form's fields were stored again in the database with the new GUIDs. After that, everything seems to be working out just fine (so far).

Please Sign in or register to post replies

Write your reply to:

Draft