4.1 SDK Jobs Module error
Has anyone had any success loading and using the Jobs Module in the 4.1 SDK?
From the SDK menu, I opened the Jobs Module in VS2010, rebuilt the solution. When the page loaded in the browser, the following an error displayed:
Cannot find template "~/SFJobs/Jobs.Resources.Views.JobApplicationUpload.ascx".
Hi Suzanne,
We know about this
problem regarding Jobs sample and we are working on to fix it asap. As a workaround I can suggest you to restart the project.
Regards,
Victor Velev
the Telerik team
Victor,
We are running SP2 of Sitefinity and are also experiencing this issue. I am not sure what you mean by restart the project means. If it means stop the Sitefinity site and restart it then we have done so many times and are still receiving the message
Hi Garry,
Yesterday we released SP2 for our SDK, which contains the fix for your issue. Please download it from your account and see if the problem is still at hand.
Regards,
Victor Velev
the Telerik team
Victor,
I work with Garry and he sent me your response. I downloaded SDK SP2 and updated my references in the Jobs module and we are still getting this error when we drag the Job Application Form onto a page and try and access that page. Any other ideas?
Error We receive
Server Error in '/Time_Management' Application.
--------------------------------------------------------------------------------
Cannot find template "~/SFJobs/Jobs.Resources.Views.JobApplicationUpload.ascx".
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: System.ArgumentException: Cannot find template "~/SFJobs/Jobs.Resources.Views.JobApplicationUpload.ascx".
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:
[ArgumentException: Cannot find template "~/SFJobs/Jobs.Resources.Views.JobApplicationUpload.ascx".]
Telerik.Sitefinity.Web.UI.ControlUtilities.GetTemplate(String virtualPath, String resourceFileName, Type assemblyInfo, String templateDeclaration, Boolean addChildrenAsDirectDescendants) +864
Telerik.Sitefinity.Web.UI.ControlUtilities.GetControlTemplate(TemplateInfo info) +436
Telerik.Sitefinity.Web.UI.ControlUtilities.GetTemplate(TemplateInfo info) +1056
Telerik.Sitefinity.Web.UI.SimpleView.get_LayoutTemplate() +119
Telerik.Sitefinity.Web.UI.SimpleView.get_Container() +21
Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +46
System.Web.UI.Control.EnsureChildControls() +122
System.Web.UI.Control.PreRenderRecursiveInternal() +49
System.Web.UI.Control.PreRenderRecursiveInternal() +204
System.Web.UI.Control.PreRenderRecursiveInternal() +204
System.Web.UI.Control.PreRenderRecursiveInternal() +204
System.Web.UI.Control.PreRenderRecursiveInternal() +204
System.Web.UI.Control.PreRenderRecursiveInternal() +204
System.Web.UI.Control.PreRenderRecursiveInternal() +204
System.Web.UI.Control.PreRenderRecursiveInternal() +204
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6878
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Victor,
The path and template that the error is saying it can not find truly does not exist in the physical directory. When we debug the code the template is being set to "~/SFJobs/Jobs.Resources.Views.JobApplicationUpload.ascx", which as far as I can tell there is no SFJobs directory at all in our Sitefinity directory structure. Could it be that the installer is not creating it or am I just not understanding fully how this path is constructured, such as is it being pulled from the DB like pages are?
Thanks,
Garry
Hi Garry,
By restarting the project Victor Velev meant that you can click on the Reset button in the SDK. This will automatically delete your old sample and will replace it with the SP2 sample. My suggestion is to verify the following things:
1. That the virtual path ~/SFJobs/* is registered in the Settings of your Application.
2. That the actual template JobApplicationUpload has its build action set to Embedded Resource
3. That you have successfully upgraded your Sitefinity instance to SP2 by checking the Version & Licensing screen in the Administration tab.
For step by step guide on how to use the virtual path you can take a look at our Taking advantage of the virtual path provider blog post.
Garry you are right that the physical path doesn't exist for the ~/SFJobs. This is a path along with its assembly that you have to register in the settings file as virtual. Once registered, the virtual path is used by Sitefinity to serve templates from your assembly.
Regards,
Hristo Borisov
the Telerik team