Forum


HomeHomePremiumPremiumDevelopmentDevelopmentDNN 8/Web APIDNN 8/Web API
Previous
 
Next
New Post
5/23/2016 6:50 AM
 

Hi Scott,

I'm upgrading a module from DNN 7 to 8. I've simply copied the DNN 7 project code over to a DNN 8 installation.

When loading the edit.ascx, I get the following javascript error: $.ServicesFramework is not a function

I've implemented web services according to your video and this works perfectly in DNN 7:
http://www.dnnhero.com/Premium/Tutorial/ArticleID/247/Client-Centric-Module-Development-in-DNN-Introduction-Explanation-Part-2-4

Is this technique still valid for DNN 8? Is there something I need to do to get this to work?

I had a look around but couldn't see anything for DNN 8.

Best Regards,

Steve

 

 

 
New Post
5/25/2016 4:30 AM
 

Steve,

Try adding these lines to your Page load or Page Prerender:

            DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxScriptSupport();


            DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxAntiForgerySupport();


 

That should explicitly register /js/dnn.servicesframework.js.  I'm not sure why this is needed in DNN 8 as I haven't had to do that in my new modules.

 
New Post
5/25/2016 12:49 PM
 

Hi Scott,

Thank you for your reply.

I already have those lines in the page_load. I tried taking them out as you mentioned they should be implicit, also tried moving them to the Prerender, but get the same error in each case.

Am thinking what to do.

Steve

 
New Post
1/12/2017 10:09 AM
 

For anyone who's interested, I finally had another go at moving my application to DNN 8.

I discovered accidentally that changing the order the jQuery files are loaded (via ClientResourceManager) gave a different error.
That got me thinking, I validated all my jQuery using this site: http://jshint.com/

Just found a few missing semi-colons, but enough to remove all errors.

I realise I should be using GULP.

 
New Post
1/13/2017 4:23 AM
 

Thank you for sharing Steve!

Aderson

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentDNN 8/Web APIDNN 8/Web API



Try FREE
30 days money back guaranteed