1
Vote

Merging after update to DNN7

description

I forgot to use the merge function before updating to dotnetnuke 7.
now the MVC is not used any more but instead the WebAPI has taken over. Therefore the code for merging profile pictures does not work, giving a error

Object [object Object] has no method 'getAntiForgeryProperty'

something about this here
http://www.dotnetnuke.com/Resources/Blogs/cid/142631/Converting-Services-Framework-MVC-to-WebAPI.aspx

I can see the code in version 1.01 looks like this:
<script type="text/javascript">
    jQuery(function ($) {
        var inProgress = false;
        $('#movePic').click(function (event) {
            event.preventDefault();
            if (inProgress == true) {
                return false;
            }else{
                inProgress = true;
            }
            
             var sf = $.ServicesFramework(<%=ModuleId %>);
                var data = {};
                sf.getAntiForgeryProperty(data);
                $.ajax({
                    type: "POST",
                    url: sf.getServiceRoot('ActiveSocialMigrator') + "ProfilesService.ashx/MoveProfilePics",
                    beforeSend: sf.setModuleHeaders,
                    data: data,
                    success: function (data) {
                        inProgress = false;
                        alert('Profile Pictures have been moved');
                    },
                    error: function (xhr, status, error) {
                        inProgress = false;
                        alert(error);
                    }
                });
        });
    })

</script>

comments