Closed filefontaine closed 3 years ago
I am not sure why the GUID version would be obsolete, that's definitely the one we should prefer! I'll have to have a look, please keep using formStorage.GetForm(GUID)
.
Alright I had a look, formService.Get(id)
goes straight to the database, it looks like we don't check if StoreUmbracoFormsInDb
is true or false, we'll have to fix that up.
For now, using formStorage.GetForm(GUID)
is recommended for you.
@nul800sebastiaan I'm still getting that error when using formService.GetForm(GUID) in 8.5.3. I had to downgrade to 8.4.2
Hello @OnlinePseudonym ,
If you haven't set the parameter StoreUmbracoFormsInDb as True in UmbracoFroms.config you need to use formStorage.GetForm(GUID);
not the formService.GetForm(GUID)
the class for the formStorage
is IFormStorage
.
You can get it with :
using Umbraco.Forms.Core.Data.Storage;
var formStorage = Current.Factory.GetInstance<IFormStorage>();
@nul800sebastiaan Thanks for all, i will do that.
@filefontaine ahhh! Thanks, my brain just glossed over the class name difference! I even had to read over your comment twice to see it.
Is this still an issue in 8.5.5 , @nul800sebastiaan Data.SqlClient.SqlException (0x80131904): Invalid object name 'UFForms'. i keep getting this error , on rebuild of the Forms index Index populating failed for populator "Umbraco.Forms.Core.Data.RecordIndex.FormsIndexPopulator" ?\ Formsconfig , is set to false . (fyi)
For now you can ignore it, it's not harmful.
This will be due in the next version of Forms
I know this issue is marked "closed" but I'm building an Umbraco CMS 8.14.0 site with UForms 8.7.4 and I'm still seeing the issue. The config key "StoreUmbracoFormsInDb" is marked "False". I have a workflow helper class where I'm being directed to use:
Form form = _formService.Get(record.Form);
But that's throwing a SqlException.
You need to be using IFormStorage
when working with forms stored on disk. IFormService
is a newer service that expects the forms in the database. IFormStorage
is marked as obsolete - it's been removed in V9 - but it'll be available for any subsequent releases of Umbraco Forms V8.
@Umbraco.RenderMacro("renderUmbracoForm". i am using RenderMarco still i am getting this error I am not using any Controller and using 8.18.9 version
If the option StoreUmbracoFormsInDb is set to false, the formService.Get(id) as a Sql Error.
For get the form we need to do : formStorage.GetForm(GUID)
But is set as Obselete.
Have you another solution or the best is to set up StoreUmbracoFormsInDb as True
_This item has been added to our backlog AB#8726_