November Happy Hour will be moved to Thursday December 5th.

Episerver Forms missing script

Vote:
 

Hi,

I need some help figuring out whats wrong with Episever Forms. The @Html.RequiredClientResources(RenderingTags.Header) is not generating any code. When a page with a form is rendered I get a javascript error: 

GetFormInitScript:6 Uncaught ReferenceError: epi is not defined
WebResource.axd:1 Uncaught ReferenceError: $$epiforms is not defined

The error is created because the @Html.RequiredClientResources(RenderingTags.Header) is empty.

My page inherits from PageController. I have both @Html.RequiredClientResources(RenderingTags.Header) and @Html.RequiredClientResources(RenderingTags.Footer) on the page. The contentarea is rendered on the page with @Html.PropertyFor(m => m.FirstArea).

The site is fully functional except this. It uses ImageVault, Siteseeker and Social Reach.

Is's a swedish site with swedish edit/admin mode. 

ProtectedAddons is setup i Episerver.framework like this.

I have tried with a copy of the .config files from Alloy without success. I have also tried from an empty databse without luck.

#148419
May 12, 2016 13:01
Vote:
 

Hi!

I had the same problem. Solved it by adding a @RenderBody() to my layout. We only used @RenderSection and somehow the @Html.RequiredClientResources(RenderingTags.Header)  happens before the FormContainerBlockController that is responsible for adding the client resourses when you do it that way.

/Malin

#148421
May 12, 2016 14:30
Vote:
 
Hello and thanks Malin . It worked perfectly with your solution.
#148449
May 13, 2016 8:39
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.