Has anyone got examples of running contour 3.0 within a Umbraco 4.11 MVC build.
Cannot get the forms to appear within a richtext area.
When I add a Macro using (Insert form from Umbraco Contour(Razor)) to a content page it renders in the editor text area fine but on the webpage it displays the following error
"Umbraco Contour will only work properly if placed inside a <form runat="server"> tag."
If you add a (@using (Html.BeginForm)) block to the template you get a redbox displayed with 3 dots rendered on the webpage.
Any suggestions how to fix this?
Also I cannot see any method of adding the contour forms to a template using razor format, is this possible?
Are you using the MVC templates or the webform templates? If you intend to run MVC make sure that this setting in the /config/umbracoSettings.config file has been set to MVC <defaultRenderingEngine>MVC</defaultRenderingEngine>.
If it's not been changed then the default is webforms and if you intend to be keep using webforms then you should just make sure that you have a <form runat="server"><!-- Content her --></form> wrapped around your html content...like this...
<body>
<form runat="server"><!--Rest of your html here --></form>
When you are running with the mvc rendering engine make sure to use the razor contour macro, not the usercontrol one. Do you see the 2 contour macros when you go to the developer section?
Ah good catch was sure it was the Razor Macro - but with Razor I get
\Umbraco\Plugins\umbracoContour\Views\Form.cshtml(28): error CS0619: 'System.Web.Mvc.HtmlHelper.AntiForgeryToken(string)' is obsolete: 'This method is deprecated. Use the AntiForgeryToken() method instead. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.'
Spotted that this has been fixed in version 3.0.6 so Uninstalled Contour on my site with a view to reinstalling version 3.0.6 but cannot get access to my site now when I run it. Hmm should have taken a backup before I did that.
Could not load file or assembly 'Umbraco.Forms.References, Version=1.0.10920.32880, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Yup you'll need 3.0.6 since it looks like you are running on MVC 4 (already on a 6.0 build ?)
To get your site back make sure all the umbraco.forms assemblies have been removed from the bin directory + make sure to update the web.config and get rid of the line
It reported the Issue below. Items that had been previously created in pages reported an format issue as well as a newly inserted form.( i did not record) restarted IIS and new items and previously created items all popped up (as we say in Glasgow ya wee beauty)
Looking forward to playing with forms now - one last question (Can the forms be set up in a mvc template, if so how?)
Much thanks.
Database could not be installed + umbraco.DataLayer.SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery ---> SqlCE4Umbraco.SqlCeProviderException: Error running NonQuery: SQL Statement: CREATE TABLE [UFWorkflowsToForms] ( [Workflow] [uniqueidentifier] NOT NULL, [Form] [uniqueidentifier] NOT NULL ) Exception: System.Data.SqlServerCe.SqlCeException (0x80004005): The specified table already exists. [ UFWorkflowsToForms ] at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options) at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters) at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters) at SqlCE4Umbraco.SqlCEHelper.ExecuteNonQuery(String commandText, SqlCeParameter[] parameters) at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) --- End of inner exception stack trace --- at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) at Umbraco.Forms.UI.Usercontrols.Installer.Page_Load(Object sender, EventArgs e
Umbraco 4.11 MVC and Contour 3.0 Examples
Has anyone got examples of running contour 3.0 within a Umbraco 4.11 MVC build.
Cannot get the forms to appear within a richtext area.
When I add a Macro using (Insert form from Umbraco Contour(Razor)) to a content page it renders in the editor text area fine but on the webpage it displays the following error
"Umbraco Contour will only work properly if placed inside a <form runat="server"> tag."
If you add a (@using (Html.BeginForm)) block to the template you get a redbox displayed with 3 dots rendered on the webpage.
Any suggestions how to fix this?
Also I cannot see any method of adding the contour forms to a template using razor format, is this possible?
Thanks
Hi p.kidd and welcome to our :)
Are you using the MVC templates or the webform templates? If you intend to run MVC make sure that this setting in the /config/umbracoSettings.config file has been set to MVC <defaultRenderingEngine>MVC</defaultRenderingEngine>.
If it's not been changed then the default is webforms and if you intend to be keep using webforms then you should just make sure that you have a <form runat="server"><!-- Content her --></form> wrapped around your html content...like this...
<body>
<form runat="server"><!--Rest of your html here --></form>
</body>
Hope this helps.
/Jan
Using MVC Templates and my settings are as below.
However should the MaterPages be removed or set to false would this make a difference or is it ignored due to the selection of render engine?
Comment author was deleted
Hi,
When you are running with the mvc rendering engine make sure to use the razor contour macro, not the usercontrol one. Do you see the 2 contour macros when you go to the developer section?
Yes I can see the 2 contour macros.
I used the (Insert form from Umbraco Contour (Razor)) Macro into the text editor and the content page looked like the following:
But when run it gave me the following error.
Is there any examples of this for MVC for me to follow.
Comment author was deleted
Hi,
That error is from the usercontrol macro, are you 100% sure you are using the razor one.
Could you also check the settings of that one to make sure it's linked to a razor script
Ah good catch was sure it was the Razor Macro - but with Razor I get
\Umbraco\Plugins\umbracoContour\Views\Form.cshtml(28): error CS0619: 'System.Web.Mvc.HtmlHelper.AntiForgeryToken(string)' is obsolete: 'This method is deprecated. Use the AntiForgeryToken() method instead. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.'
Spotted that this has been fixed in version 3.0.6 so Uninstalled Contour on my site with a view to reinstalling version 3.0.6 but cannot get access to my site now when I run it. Hmm should have taken a backup before I did that.
Could not load file or assembly 'Umbraco.Forms.References, Version=1.0.10920.32880, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Comment author was deleted
Yup you'll need 3.0.6 since it looks like you are running on MVC 4 (already on a 6.0 build ?)
To get your site back make sure all the umbraco.forms assemblies have been removed from the bin directory + make sure to update the web.config and get rid of the line
<add name="ContourFormBuilderHttpModule" type="Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule, Umbraco.Forms.CodeFirst" />
(might be in there twice)
once those 2 things are done the site should be back
Brilliant done as suggested and reinstalled 3.0.6
It reported the Issue below. Items that had been previously created in pages reported an format issue as well as a newly inserted form.( i did not record) restarted IIS and new items and previously created items all popped up (as we say in Glasgow ya wee beauty)
Looking forward to playing with forms now - one last question (Can the forms be set up in a mvc template, if so how?)
Much thanks.
Database could not be installed +
umbraco.DataLayer.SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery ---> SqlCE4Umbraco.SqlCeProviderException: Error running NonQuery: SQL Statement: CREATE TABLE [UFWorkflowsToForms] ( [Workflow] [uniqueidentifier] NOT NULL, [Form] [uniqueidentifier] NOT NULL ) Exception: System.Data.SqlServerCe.SqlCeException (0x80004005): The specified table already exists. [ UFWorkflowsToForms ] at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options) at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters) at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters) at SqlCE4Umbraco.SqlCEHelper.ExecuteNonQuery(String commandText, SqlCeParameter[] parameters) at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) --- End of inner exception stack trace --- at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) at Umbraco.Forms.UI.Usercontrols.Installer.Page_Load(Object sender, EventArgs e
is working on a reply...